修改员工权限

This commit is contained in:
duan 2024-10-17 09:47:35 +08:00
parent f0a88d3ad0
commit 2c2811f65a
2 changed files with 22 additions and 17 deletions

View File

@ -64,7 +64,7 @@ function commonsProcess(showLoading, httpReqCallback) {
return httpReqCallback().then((httpData) => {
reqFinishFunc(); // 请求完毕的动作
console.log(httpData,'调试1')
// 从http响应数据中解构响应数据 [ 响应码、 bodyData ]
let {
statusCode,
@ -93,20 +93,20 @@ function commonsProcess(showLoading, httpReqCallback) {
}
// 业务响应异常
if (bodyData.hasOwnProperty('code') && bodyData.code != 200) {
isShowErrorToast = true
infoBox.showToast(bodyData.msg)
if (bodyData.code == 5005) { // 密码已过期, 直接跳转到更改密码页面
uni.reLaunch({
url: '/pageUser/setting/updatePwd'
})
}
// if(bodyData.code == 500){ // 密码已过期, 直接跳转到更改密码页面
// uni.redirectTo({url: '/pages/login/index'})
// }
return bodyData
// return Promise.reject(bodyData)
}
// if (bodyData.hasOwnProperty('code') && bodyData.code != 200) {
// isShowErrorToast = true
// infoBox.showToast(bodyData.msg)
// if (bodyData.code == 5005) { // 密码已过期, 直接跳转到更改密码页面
// uni.reLaunch({
// url: '/pageUser/setting/updatePwd'
// })
// }
// // if(bodyData.code == 500){ // 密码已过期, 直接跳转到更改密码页面
// // uni.redirectTo({url: '/pages/login/index'})
// // }
// return bodyData
// // return Promise.reject(bodyData)
// }
// 加密数据
if (!bodyData.data && bodyData.encryptData) {

View File

@ -71,7 +71,7 @@
<view class="">
<up-checkbox shape='circle' :customStyle="{marginBottom: '8px'}" v-model:checked="ele.hasPermission"
usedAlone v-for="(ele, index) in item.children" :key="index" :label="ele.label"
style="margin-right: 40rpx;font-size: 28rpx;">
:labelColor="ele.isImportant==1?'#e66c6d':''" style="margin-right: 40rpx;font-size: 28rpx;">
</up-checkbox>
</view>
</view>
@ -132,13 +132,18 @@
} else {
// id
gettbPlussShopStaffDetail(props.id)
uni.setNavigationBarTitle({
title: '编辑员工'
})
}
})
function gettbPlussShopStaffDetail(id) {
tbPlussShopStaffDetail(id).then(res => {
datas.formData = res
datas.rolesdata = datas.rolesList.filter(ele => ele.id == res.roleId)[0].name
if (datas.rolesList) {
datas.rolesdata = datas.rolesList.filter(ele => ele.id == res.roleId)[0].name
}
})
}