|
|
@@ -37,6 +37,7 @@
|
|
|
<el-tree
|
|
|
ref="treeRef"
|
|
|
node-key="code"
|
|
|
+ :highlight-current="true"
|
|
|
:data="treeData"
|
|
|
:props="treeProps"
|
|
|
@node-click="clickNode"
|
|
|
@@ -276,7 +277,7 @@
|
|
|
(item[1] as number[]).forEach((key) => {
|
|
|
newPerm.push({
|
|
|
workshopCode: item[0],
|
|
|
- permissionId: key,
|
|
|
+ permissionId: key + '',
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
@@ -286,6 +287,7 @@
|
|
|
};
|
|
|
|
|
|
function checkedModeTree(_, tree) {
|
|
|
+ isAll.value = tree.checkedKeys.length === modeList.value.length;
|
|
|
featurePermissionMap[selectedNodeKey.value] = tree.checkedKeys;
|
|
|
}
|
|
|
|
|
|
@@ -309,9 +311,8 @@
|
|
|
return message.error('请填写完整信息');
|
|
|
}
|
|
|
formParams.value.permissionList = getPermissionList();
|
|
|
- if (formParams.value.roleId) {
|
|
|
- console.log('bianji');
|
|
|
|
|
|
+ if (formParams.value.roleId) {
|
|
|
const updateData = {
|
|
|
permissionList: formParams.value.permissionList,
|
|
|
remark: formParams.value.remark,
|
|
|
@@ -351,13 +352,15 @@
|
|
|
// isAll.value = false;
|
|
|
}
|
|
|
function setFeaturePermission(permissionList) {
|
|
|
- permissionList.forEach((item) => {
|
|
|
- if (featurePermissionMap[item.workdshopCode]) {
|
|
|
- featurePermissionMap[item.workdshopCode].push(item.permissionId);
|
|
|
+ for (const item of permissionList) {
|
|
|
+ console.log(item);
|
|
|
+
|
|
|
+ if (featurePermissionMap[item.workshopCode]) {
|
|
|
+ featurePermissionMap[item.workshopCode].push(item.permissionId);
|
|
|
} else {
|
|
|
- featurePermissionMap[item.workdshopCode] = [item.permissionId];
|
|
|
+ featurePermissionMap[item.workshopCode] = [item.permissionId];
|
|
|
}
|
|
|
- });
|
|
|
+ }
|
|
|
}
|
|
|
// const selectNodes = ref<string[]>([]);
|
|
|
function getInfo() {
|
|
|
@@ -423,4 +426,7 @@
|
|
|
:deep(.permission-card .el-card__body) {
|
|
|
padding-top: 0;
|
|
|
}
|
|
|
+ :deep(.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content) {
|
|
|
+ color: #409eff;
|
|
|
+ }
|
|
|
</style>
|