企标数据权限配置 重点标准跟踪清单展示
This commit is contained in:
@@ -40,6 +40,12 @@
|
|||||||
v-btn-permission="'bb2571b08179edb36880aae169cb2e54'"
|
v-btn-permission="'bb2571b08179edb36880aae169cb2e54'"
|
||||||
size="mini">配置法规库权限
|
size="mini">配置法规库权限
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button type="primary"
|
||||||
|
class="common-button-primary add-button"
|
||||||
|
@click="roleDataAdd"
|
||||||
|
v-btn-permission="''"
|
||||||
|
size="mini">配置法规库数据权限
|
||||||
|
</el-button>
|
||||||
<el-button type="primary"
|
<el-button type="primary"
|
||||||
class="common-button-primary add-button"
|
class="common-button-primary add-button"
|
||||||
@click="RolesAdd(1)"
|
@click="RolesAdd(1)"
|
||||||
@@ -181,6 +187,37 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog
|
||||||
|
title="标准法规树数据"
|
||||||
|
:visible.sync="modalflag2"
|
||||||
|
:wrapperClosable="false"
|
||||||
|
@close="closeDialogData2"
|
||||||
|
size="800px">
|
||||||
|
<div class="myDialog">
|
||||||
|
<el-tree
|
||||||
|
v-if="modalflag2"
|
||||||
|
node-key="id"
|
||||||
|
class="filter-tree"
|
||||||
|
:data="treeData4"
|
||||||
|
:props="defaultProps3"
|
||||||
|
:default-checked-keys="nodeList4"
|
||||||
|
default-expand-all
|
||||||
|
highlight-current
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
:show-checkbox="true"
|
||||||
|
:check-strictly="true"
|
||||||
|
@check="nodeClick3"
|
||||||
|
ref="tree4">
|
||||||
|
</el-tree>
|
||||||
|
</div>
|
||||||
|
<div slot="footer">
|
||||||
|
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="closeDialogData2">取消
|
||||||
|
</el-button>
|
||||||
|
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="confirmDialogData2">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="addRoleTitle"
|
:title="addRoleTitle"
|
||||||
:visible.sync="addModel"
|
:visible.sync="addModel"
|
||||||
@@ -394,12 +431,15 @@ export default {
|
|||||||
],
|
],
|
||||||
addModel: false,
|
addModel: false,
|
||||||
treeData3: [],
|
treeData3: [],
|
||||||
|
treeData4: [],
|
||||||
defaultProps3: {
|
defaultProps3: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'menuName'
|
label: 'menuName'
|
||||||
},
|
},
|
||||||
nodeList2: [],
|
nodeList2: [],
|
||||||
|
nodeList4: [],
|
||||||
modalflag: false,
|
modalflag: false,
|
||||||
|
modalflag2: false,
|
||||||
sideClose: false, // 边栏收展状态
|
sideClose: false, // 边栏收展状态
|
||||||
filterText: '',
|
filterText: '',
|
||||||
treeData: [],
|
treeData: [],
|
||||||
@@ -606,6 +646,7 @@ export default {
|
|||||||
|
|
||||||
if(list1.length > 0){
|
if(list1.length > 0){
|
||||||
this.treeData3 = this.sortByKey(list1,"displaySeq")
|
this.treeData3 = this.sortByKey(list1,"displaySeq")
|
||||||
|
this.treeData4 = this.sortByKey(list1,"displaySeq")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -651,9 +692,27 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//配置数据确定按钮
|
||||||
|
confirmDialogData2(){
|
||||||
|
let menuIds = this.$refs.tree4.getCheckedKeys().join(',')
|
||||||
|
this.$http.postData('tsRoleMeunData/ts-role-menu-data/saveBatch', {
|
||||||
|
menuIds: menuIds,
|
||||||
|
roleId: this.id
|
||||||
|
}, {}, res => {
|
||||||
|
if (res.ok) {
|
||||||
|
this.$message.success('设置权限成功')
|
||||||
|
this.modalflag2 = false
|
||||||
|
}else{
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
closeDialogData() {
|
closeDialogData() {
|
||||||
this.modalflag = false
|
this.modalflag = false
|
||||||
},
|
},
|
||||||
|
closeDialogData2() {
|
||||||
|
this.modalflag2 = false
|
||||||
|
},
|
||||||
/** 父子节点的级联 */
|
/** 父子节点的级联 */
|
||||||
nodeClick(currentObj, treeStatus) {
|
nodeClick(currentObj, treeStatus) {
|
||||||
// 用于:父子节点严格互不关联时,父节点勾选变化时通知子节点同步变化,实现单向关联。
|
// 用于:父子节点严格互不关联时,父节点勾选变化时通知子节点同步变化,实现单向关联。
|
||||||
@@ -671,6 +730,30 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/** 父子节点的级联 */
|
||||||
|
nodeClick3(currentObj, treeStatus) {
|
||||||
|
// 用于:父子节点严格互不关联时,父节点勾选变化时通知子节点同步变化,实现单向关联。
|
||||||
|
let selected = treeStatus.checkedKeys.indexOf(currentObj.id) // -1未选中
|
||||||
|
// 选中
|
||||||
|
if (selected !== -1) {
|
||||||
|
// 子节点只要被选中父节点就被选中
|
||||||
|
this.selectedParent4(currentObj)
|
||||||
|
// 统一处理子节点为相同的勾选状态
|
||||||
|
this.uniteChildSame4(currentObj, true)
|
||||||
|
} else {
|
||||||
|
// 未选中 处理子节点全部未选中
|
||||||
|
if (currentObj.children.length !== 0) {
|
||||||
|
this.uniteChildSame4(currentObj, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 统一处理子节点为相同的勾选状态
|
||||||
|
uniteChildSame4(treeList, isSelected) {
|
||||||
|
this.$refs.tree4.setChecked(treeList.id, isSelected)
|
||||||
|
for (let i = 0; i < treeList.children.length; i++) {
|
||||||
|
this.uniteChildSame4(treeList.children[i], isSelected)
|
||||||
|
}
|
||||||
|
},
|
||||||
// 统一处理子节点为相同的勾选状态
|
// 统一处理子节点为相同的勾选状态
|
||||||
uniteChildSame(treeList, isSelected) {
|
uniteChildSame(treeList, isSelected) {
|
||||||
this.$refs.tree3.setChecked(treeList.id, isSelected)
|
this.$refs.tree3.setChecked(treeList.id, isSelected)
|
||||||
@@ -686,6 +769,14 @@ export default {
|
|||||||
this.selectedParent(currentNode.parent)
|
this.selectedParent(currentNode.parent)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 统一处理父节点为选中
|
||||||
|
selectedParent4(currentObj) {
|
||||||
|
let currentNode = this.$refs.tree4.getNode(currentObj)
|
||||||
|
if (currentNode.parent.key !== undefined) {
|
||||||
|
this.$refs.tree4.setChecked(currentNode.parent, true)
|
||||||
|
this.selectedParent4(currentNode.parent)
|
||||||
|
}
|
||||||
|
},
|
||||||
nodeClick2(currentObj, treeStatus) {
|
nodeClick2(currentObj, treeStatus) {
|
||||||
// 用于:父子节点严格互不关联时,父节点勾选变化时通知子节点同步变化,实现单向关联。
|
// 用于:父子节点严格互不关联时,父节点勾选变化时通知子节点同步变化,实现单向关联。
|
||||||
let selected = treeStatus.checkedKeys.indexOf(currentObj.id) // -1未选中
|
let selected = treeStatus.checkedKeys.indexOf(currentObj.id) // -1未选中
|
||||||
@@ -726,6 +817,16 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
roleDataAdd(){
|
||||||
|
this.$http.get('tsRoleMeunData/ts-role-menu-data/list', {
|
||||||
|
ids: this.id
|
||||||
|
}, {}, res => {
|
||||||
|
if (res.ok) {
|
||||||
|
this.nodeList4 = res.data
|
||||||
|
this.modalflag2 = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.treeData2 = []
|
this.treeData2 = []
|
||||||
this.modalshowflag = false
|
this.modalshowflag = false
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export default {
|
|||||||
library: false,
|
library: false,
|
||||||
list: [],
|
list: [],
|
||||||
tabValue: "",
|
tabValue: "",
|
||||||
menuName: ["国家/地区清单", "车型类别清单"/*, "重点标准跟踪清单"*/, "其他清单", "项目清单"]
|
menuName: ["国家/地区清单", "车型类别清单","重点标准跟踪清单", "其他清单", "项目清单"]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Reference in New Issue
Block a user