6.18宁夏问题修改

This commit is contained in:
FrancisHu 2024-06-18 17:44:13 +08:00
parent ef279443f2
commit 0a92f972ab
4 changed files with 68 additions and 48 deletions

View File

@ -319,13 +319,9 @@ import { basePath } from '../../public'
}).catch(err => {
console.log(err);
})
}
},
onShow() {
initFetch () {
let that = this
// that.roles = uni.getStorageSync('roles')
console.log(that.roles, uni.getStorageSync('userInfo').sysUser.companyId);
if (that.roles.includes('admin')) that.roles = ['admin', 'jjfgs', 'tsfgs']
// 退
that.$api.exitExam.exitExamList({
companyId: uni.getStorageSync('userInfo').sysUser.companyId
@ -364,6 +360,21 @@ import { basePath } from '../../public'
console.log(err);
})
}
},
onShow() {
let that = this
// that.roles = uni.getStorageSync('roles')
console.log(that.roles, uni.getStorageSync('userInfo').sysUser.companyId);
for (let i = 0; i < that.roles.length; i++) {
if (that.roles[i] == 'em01' || that.roles[i] == 'em02') {
that.roles[i] = 'jjfgs'
} else if (that.roles[i] == 'dm01' || that.roles[i] == 'dm02') {
that.roles[i] = 'tsfgs'
}
}
if (that.roles.includes('admin')) that.roles = ['admin', 'jjfgs', 'tsfgs']
that.initFetch()
}
}
</script>

View File

@ -140,6 +140,7 @@
</view>
</view>
</uni-popup>
<u-loading-page :loading="showLoading" color="#000" loading-text="表单提交中,请稍后..."></u-loading-page>
</view>
</template>
@ -223,7 +224,8 @@ import { basePath } from '../../public'
remark: ''
},
fetchedList: [],
ableRoleArr: ['admin', 'em04', 'me02', 'dm03']
ableRoleArr: ['admin', 'em04', 'me02', 'dm03'],
showLoading: false
}
},
methods: {
@ -259,6 +261,7 @@ import { basePath } from '../../public'
},
formSubmit () {
let that = this
that.showLoading = true
that.$refs.exitForm.validate().then(formData => {
that.$refs.popup.close()
// idid
@ -280,6 +283,7 @@ import { basePath } from '../../public'
that.$api.exitMaterial.newExitList(that.newAdd).then(res => {
console.log(res);
if (res.data.code == 200) {
that.showLoading = false
uni.showToast({
icon: 'none',
title: '新增申请成功!',
@ -289,6 +293,12 @@ import { basePath } from '../../public'
})
}
})
} else {
that.showLoading = false
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err => {
console.log(err);

View File

@ -64,19 +64,18 @@
}
]
}
}
},
strongPwdReg: /^\S*(?=\S{8,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/
}
},
methods: {
submitForm() {
let that = this
let strongPwdReg = /^\S*(?=\S{8,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/
that.$refs.pwdForm.validate().then(formData => {
if (!strongPwdReg.test(formData.newPassword)) {
if (!that.strongPwdReg.test(formData.newPassword)) {
uni.showToast({
icon: 'none',
title: '新密码格式有误!',
duration: 3000
title: '新密码格式有误!'
})
} else if (formData.newPassword != formData.confirmNewPassword) {
uni.showToast({

View File

@ -321,13 +321,13 @@
//
that.$api.testExam.testExamList().then(res => {
console.log(res);
if (res.data.total != 0) {
for (let i = 0; i < res.data.rows.length; i++) {
if (res.data.rows[i].taskStatus == 46) {
res.data.rows[i].checked = false
if (res.data.data.total != 0) {
for (let i = 0; i < res.data.data.rows.length; i++) {
if (res.data.data.rows[i].taskStatus == 46) {
res.data.data.rows[i].checked = false
}
}
that.fetchMaterialList = res.data.rows
that.fetchMaterialList = res.data.data.rows
} else {
uni.showToast({
icon: 'none',