|
@@ -2,7 +2,7 @@
|
|
|
<div class="bf-postmanagementadd">
|
|
|
<div class="postmanagementadd_header">
|
|
|
<div class="postmanagementadd_top">
|
|
|
- <div class="tltleLeft">编辑账号组</div>
|
|
|
+ <div class="tltleLeft">{{ pageTitle }}</div>
|
|
|
<div
|
|
|
class="btn"
|
|
|
style="margin-top: 20px"
|
|
@@ -54,7 +54,7 @@
|
|
|
nodekey="GroupId"
|
|
|
:type="true"
|
|
|
:defaultProps="defaultProps"
|
|
|
- :checkedKeys="[GroupUpId]"
|
|
|
+ :checkedKeys="accountGroupTreeCheckedList"
|
|
|
@getTreeData="getAccountGroupChecked"
|
|
|
/>
|
|
|
</div>
|
|
@@ -141,7 +141,7 @@ import PermissionList from '@/components/permissionlist/index.vue'
|
|
|
// import Dialog from '@/layout/components/Dialog/index.vue'
|
|
|
|
|
|
import { RoleAuths } from '@/api/apiAuthority'
|
|
|
-import { GetGroupDetails, EditGroupAcc, SaveGroup } from '@/api/AccountGroup.js'
|
|
|
+import { GetGroupDetails, EditGroup, SaveGroup } from '@/api/AccountGroup.js'
|
|
|
// import treeData from '../minixs/treeData'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
@@ -161,10 +161,11 @@ export default {
|
|
|
GroupId: 0,
|
|
|
GroupUpId: this.$route.query.GroupUpId,
|
|
|
// dialogVisible: false,
|
|
|
- OpenRole: 0,
|
|
|
+ openRole: 0,
|
|
|
authTo: {},
|
|
|
authList: [],
|
|
|
- accountGroupTreeCheckedTemp: [], // 账号组书当前勾选项
|
|
|
+ accountGroupTreeCheckedList: [], // 账号组树初始勾选项
|
|
|
+ accountGroupTreeCheckedTemp: [], // 账号组树当前勾选项
|
|
|
roleListCheckedList: [], // 角色列表初始勾选项
|
|
|
roleListCheckedTemp: [], // 角色列表当前勾选项
|
|
|
permissionTreeChckedKeys: [], // 权限树初始勾选项
|
|
@@ -177,7 +178,7 @@ export default {
|
|
|
editForm: {
|
|
|
name: '',
|
|
|
desc: '',
|
|
|
- isUsed: ''
|
|
|
+ isUsed: 0
|
|
|
},
|
|
|
rules: {
|
|
|
// 表单验证
|
|
@@ -202,12 +203,14 @@ export default {
|
|
|
} else {
|
|
|
obj = this.systemSet
|
|
|
}
|
|
|
+ console.log(obj)
|
|
|
const { OpenRole } = obj
|
|
|
this.openRole = OpenRole
|
|
|
this.accountGroupTreeCheckedTemp.push(this.GroupUpId)
|
|
|
this.queryType = this.GroupUpId === -1 ? 'all' : 'group'
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.accountGroupTreeCheckedList = [this.GroupUpId]
|
|
|
this.roleType = 'roleByUpId'
|
|
|
if (this.doesGroupExist) {
|
|
|
this.GroupId = this.$route.query.GroupId
|
|
@@ -265,15 +268,13 @@ export default {
|
|
|
},
|
|
|
// 获取当前勾选的账号组
|
|
|
getAccountGroupChecked(arr) {
|
|
|
- console.log(arr)
|
|
|
- this.accountGroupTreeCheckedTemp.length = 0
|
|
|
if (arr && arr.length && arr[0] !== -1) {
|
|
|
this.queryType = 'group'
|
|
|
- const GroupUpId = arr[0]
|
|
|
- this.accountGroupTreeCheckedTemp.push(GroupUpId)
|
|
|
+ const GroupUpId = arr[0].GroupId
|
|
|
+ this.accountGroupTreeCheckedTemp = [GroupUpId]
|
|
|
} else {
|
|
|
this.queryType = 'all'
|
|
|
- this.accountGroupTreeCheckedTemp.push(-1)
|
|
|
+ this.accountGroupTreeCheckedTemp = [-1]
|
|
|
}
|
|
|
},
|
|
|
// 角色选取
|
|
@@ -344,7 +345,7 @@ export default {
|
|
|
AuthList,
|
|
|
GroupName: this.editForm.name,
|
|
|
GroupDesc: this.editForm.desc,
|
|
|
- GroupUpId: this.accountGroupTreeCheckedTemp[0],
|
|
|
+ GroupUpid: this.accountGroupTreeCheckedTemp[0],
|
|
|
RoleList: this.roleListCheckedTemp
|
|
|
}
|
|
|
|
|
@@ -352,7 +353,7 @@ export default {
|
|
|
this.saveEditGroup({
|
|
|
...params,
|
|
|
GroupId: this.GroupId,
|
|
|
- Status: this.editForm.isUsed
|
|
|
+ Status: this.editForm.isUsed || 0
|
|
|
})
|
|
|
} else {
|
|
|
this.saveAddGroup(params)
|
|
@@ -360,7 +361,7 @@ export default {
|
|
|
},
|
|
|
async saveEditGroup(params) {
|
|
|
try {
|
|
|
- const res = await EditGroupAcc(params)
|
|
|
+ const res = await EditGroup(params)
|
|
|
if (res.code === 0) {
|
|
|
this.$message.success(res.message)
|
|
|
setTimeout(() => {
|