|
@@ -278,7 +278,13 @@ export default {
|
|
|
} else {
|
|
|
newObj.user_group_id = newItem.user_group_id
|
|
|
}
|
|
|
- const { code, returnData } = await this.getQueryList(SERVICE_ID.userAuthorizationId, newObj)
|
|
|
+ let msgId = null
|
|
|
+ if (newItem.hasOwnProperty('user_id')) {
|
|
|
+ msgId = SERVICE_ID.userAuthorizationId
|
|
|
+ } else {
|
|
|
+ msgId = SERVICE_ID.userGroupAuthorizationId
|
|
|
+ }
|
|
|
+ const { code, returnData } = await this.getQueryList(msgId, newObj)
|
|
|
if (code == 0) {
|
|
|
const result = returnData
|
|
|
if (result && result.length) {
|
|
@@ -317,6 +323,7 @@ export default {
|
|
|
this.treeCheckId = null
|
|
|
this.$refs.tree.setCurrentKey(null)
|
|
|
this.msgUserId = null
|
|
|
+ this.checkDatas = []
|
|
|
this.getRoleQuth(item)
|
|
|
},
|
|
|
//服务列表-保存
|
|
@@ -427,7 +434,13 @@ export default {
|
|
|
const newObj = { auth_id, auth_type, queryTemplateColumnSetID, row_auth, user_group_id, user_id }
|
|
|
newDatas.push(newObj)
|
|
|
})
|
|
|
- const { code } = await this.getChangeList(SERVICE_ID.userAuthorizationId, newDatas, 1)
|
|
|
+ let msgId = null
|
|
|
+ if (newItem.hasOwnProperty('user_id')) {
|
|
|
+ msgId = SERVICE_ID.userAuthorizationId
|
|
|
+ } else {
|
|
|
+ msgId = SERVICE_ID.userGroupAuthorizationId
|
|
|
+ }
|
|
|
+ const { code } = await this.getChangeList(msgId, newDatas, 1)
|
|
|
if (code == 0) {
|
|
|
setTimeout(() => {
|
|
|
this.getRoleQuth(this.dataObj)
|
|
@@ -467,11 +480,22 @@ export default {
|
|
|
const newMsgs = _.cloneDeep(addRes)
|
|
|
newMsgs.forEach(item => {
|
|
|
const { auth_id, auth_type, queryTemplateColumnSetID, row_auth, user_group_id, user_id } = item
|
|
|
- const newObj = { auth_id, auth_type, queryTemplateColumnSetID, row_auth, user_group_id, user_id }
|
|
|
+ let newObj = null
|
|
|
+ if (newItem.hasOwnProperty('user_id')) {
|
|
|
+ newObj = { auth_id, auth_type, queryTemplateColumnSetID, row_auth, user_id }
|
|
|
+ } else {
|
|
|
+ newObj = { auth_id, auth_type, queryTemplateColumnSetID, row_auth, user_group_id }
|
|
|
+ }
|
|
|
newDatas.push(newObj)
|
|
|
})
|
|
|
if (type == 'add') {
|
|
|
- const { code } = await this.getChangeList(SERVICE_ID.userAuthorizationId, newDatas, 1)
|
|
|
+ let msgId = null
|
|
|
+ if (newItem.hasOwnProperty('user_id')) {
|
|
|
+ msgId = SERVICE_ID.userAuthorizationId
|
|
|
+ } else {
|
|
|
+ msgId = SERVICE_ID.userGroupAuthorizationId
|
|
|
+ }
|
|
|
+ const { code } = await this.getChangeList(msgId, newDatas, 1)
|
|
|
if (code == 0) {
|
|
|
setTimeout(() => {
|
|
|
this.getRoleQuth(this.dataObj)
|
|
@@ -479,7 +503,13 @@ export default {
|
|
|
}
|
|
|
this.tipMsg(code)
|
|
|
} else {
|
|
|
- const { code } = await this.getChangeList(SERVICE_ID.userAuthorizationId, newDatas, 3)
|
|
|
+ let msgId = null
|
|
|
+ if (newItem.hasOwnProperty('user_id')) {
|
|
|
+ msgId = SERVICE_ID.userAuthorizationId
|
|
|
+ } else {
|
|
|
+ msgId = SERVICE_ID.userGroupAuthorizationId
|
|
|
+ }
|
|
|
+ const { code } = await this.getChangeList(msgId, newDatas, 3)
|
|
|
if (code == 0) {
|
|
|
this.msgUserId = null
|
|
|
this.checkArrs = []
|
|
@@ -510,7 +540,13 @@ export default {
|
|
|
item.row_auth = null
|
|
|
})
|
|
|
this.checkArrs = [...result]
|
|
|
- const { code, returnData } = await this.getQueryList(SERVICE_ID.userAuthorizationId, newObj)
|
|
|
+ let msgId = null
|
|
|
+ if (newItem.hasOwnProperty('user_id')) {
|
|
|
+ msgId = SERVICE_ID.userAuthorizationId
|
|
|
+ } else {
|
|
|
+ msgId = SERVICE_ID.userGroupAuthorizationId
|
|
|
+ }
|
|
|
+ const { code, returnData } = await this.getQueryList(msgId, newObj)
|
|
|
if (code == 0 && returnData && returnData.length) {
|
|
|
const res = returnData.filter(item => item.queryTemplateColumnSetID)
|
|
|
if (res && res.length) {
|
|
@@ -599,9 +635,15 @@ export default {
|
|
|
newObj.user_group_id = newItem.user_group_id
|
|
|
}
|
|
|
const result = this.sendCheckData(this.multipleTable)
|
|
|
- const tes = await this.getChangeList(SERVICE_ID.userAuthorizationId, [newObj], 3)
|
|
|
+ let msgId = null
|
|
|
+ if (newItem.hasOwnProperty('user_id')) {
|
|
|
+ msgId = SERVICE_ID.userAuthorizationId
|
|
|
+ } else {
|
|
|
+ msgId = SERVICE_ID.userGroupAuthorizationId
|
|
|
+ }
|
|
|
+ const tes = await this.getChangeList(msgId, [newObj], 3)
|
|
|
if (tes.code == 0) {
|
|
|
- const { code } = await this.getChangeList(SERVICE_ID.userAuthorizationId, result, 1)
|
|
|
+ const { code } = await this.getChangeList(msgId, result, 1)
|
|
|
this.tipMsg(code)
|
|
|
}
|
|
|
} else {
|