mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
测评platform动态权限
This commit is contained in:
@@ -878,6 +878,7 @@ import {downLoadZip} from "@/utils/zipdownload";
|
||||
bg_remarks: false,
|
||||
checkclick: [],
|
||||
permissionId:'',
|
||||
perWorkNum: '',
|
||||
filesList:[],
|
||||
tableData:[],
|
||||
tableData1:[],
|
||||
@@ -1289,6 +1290,7 @@ import {downLoadZip} from "@/utils/zipdownload";
|
||||
listData()
|
||||
}
|
||||
})
|
||||
getByUserIds(record.workNum)
|
||||
}
|
||||
const textDelete = (record) => {
|
||||
dialog({
|
||||
@@ -1301,12 +1303,14 @@ import {downLoadZip} from "@/utils/zipdownload";
|
||||
listData()
|
||||
}
|
||||
})
|
||||
getByUserIds(record.workNum)
|
||||
}
|
||||
})
|
||||
}
|
||||
const updateAuthority = (record) => {
|
||||
state.bg_power = true
|
||||
state.permissionId = record.id
|
||||
state.perWorkNum = record.workNum
|
||||
if(record.permission){
|
||||
state.checkclick = record.permission.split(',')
|
||||
}
|
||||
@@ -1725,21 +1729,22 @@ import {downLoadZip} from "@/utils/zipdownload";
|
||||
state.bg_power2 = false
|
||||
state.powerStatus = {}
|
||||
state.permissionId = ''
|
||||
state.perWorkNum = ''
|
||||
state.checkclick = []
|
||||
}
|
||||
const getByUserIds = async () => {
|
||||
// const roleCode = userInfo.value
|
||||
// const roleId = roleCode.roleList.find(item=>item.roleCode=='quiz-admin') || null
|
||||
// const isQuizAdmin = roleId ? 1 : 0
|
||||
// await getByUserId({loginId:roleCode.userId,roleId,isQuizAdmin}).then(res=>{
|
||||
|
||||
// })
|
||||
const getByUserIds = async (workNum) => {
|
||||
await getByUserId({workNum,}).then(res=>{
|
||||
// if(res.code == 200){
|
||||
// console.log(res.data,'workUnum')
|
||||
// }
|
||||
})
|
||||
}
|
||||
const powerTrue = async () => {
|
||||
state.powerStatus.permission = state.checkclick.join(",")
|
||||
if(state.permissionId){
|
||||
await updateStatus({id:state.permissionId,permission:state.checkclick.join(",")}).then((res)=>{
|
||||
saveListItem()
|
||||
getByUserIds(state.perWorkNum)
|
||||
})
|
||||
}
|
||||
listData()
|
||||
@@ -1751,9 +1756,9 @@ import {downLoadZip} from "@/utils/zipdownload";
|
||||
message.success('启用成功')
|
||||
listData()
|
||||
saveListItem()
|
||||
getByUserIds()
|
||||
}
|
||||
})
|
||||
getByUserIds(record.workNum)
|
||||
}
|
||||
const textEnableAdd = async (record) => {
|
||||
record.statusList = 0
|
||||
|
||||
Reference in New Issue
Block a user