【增加】增加字典接口 增加权限的组件

This commit is contained in:
zhoulingpo
2023-05-05 18:04:30 +08:00
parent 2b32ef9201
commit 2da2f29c11
3 changed files with 11 additions and 9 deletions
+3 -2
View File
@@ -24,8 +24,9 @@ export default {
}, },
delDic (data) { delDic (data) {
return request({ return request({
url: '/api/sys/dict/'+data, url: '/api/sys/dict/delete',
method: 'get', method: 'delete',
params:data
}) })
}, },
} }
+3 -3
View File
@@ -174,7 +174,7 @@ export default {
// }, // },
// 删除 // 删除
deleteRow (row) { deleteRow (row) {
this.deleteUser(row.id) this.deleteUser([row.id])
}, },
// 新增用户 // 新增用户
sysUserAddUser () { sysUserAddUser () {
@@ -224,7 +224,7 @@ export default {
if (!users.length) { if (!users.length) {
return this.$message.warning('请选择数据后在进行操作') return this.$message.warning('请选择数据后在进行操作')
} }
const ids = users.map(item => item.id).join(',') const ids = users.map(item => item.id)
this.deleteUser(ids) this.deleteUser(ids)
}, },
// 删除用户 // 删除用户
@@ -234,7 +234,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$api.dictionary.delDic(ids ).then(_ => { this.$api.dictionary.delDic({ids:ids} ).then(_ => {
this.$message.success('操作成功') this.$message.success('操作成功')
this.sysUserList() this.sysUserList()
}) })
@@ -265,18 +265,19 @@ export default {
if (this.$route.query.isBegin || this.$route.query.isDraft) { if (this.$route.query.isBegin || this.$route.query.isDraft) {
let list1 = this.listOne.map(item => { let list1 = this.listOne.map(item => {
let obj = { let obj = {
userId: item.id, userId: item,
power: 1 power: 1
} }
return obj return obj
}) })
let list2 = this.listTwo.map(item => { let list2 = this.listTwo.map(item => {
let obj = { let obj = {
userId: item.id, userId: item,
power: 2 power: 2
} }
return obj return obj
}) })
this.form.powerList=[...list1,...list2]
this.dialogUser = false this.dialogUser = false
} else { } else {
//如果是发起人编辑节点 //如果是发起人编辑节点
@@ -305,8 +306,8 @@ export default {
let newlist = data.records.map(item => { let newlist = data.records.map(item => {
let obj = { let obj = {
key: item.USID, key: item.USID,
value: item.USNAME, value: item.USID,
label: item.USNAME label: item.USID
} }
return obj return obj
}) })