From 3d4666d68b16b181acd369409e455e5036b61212 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 26 九月 2023 17:23:25 +0800
Subject: [PATCH] 集成系统信息-分类授权-取消勾选
---
Source/UBCS-WEB/src/page/login/userlogin.vue | 1 +
Source/UBCS-WEB/src/api/system/user.js | 1 -
Source/UBCS-WEB/src/views/integration/systemInfo.vue | 43 +++++++++++++++++++++++++++++--------------
Source/UBCS-WEB/src/views/docking/infoForm.vue | 2 +-
4 files changed, 31 insertions(+), 16 deletions(-)
diff --git a/Source/UBCS-WEB/src/api/system/user.js b/Source/UBCS-WEB/src/api/system/user.js
index c4440d9..f6721fe 100644
--- a/Source/UBCS-WEB/src/api/system/user.js
+++ b/Source/UBCS-WEB/src/api/system/user.js
@@ -162,7 +162,6 @@
//鍗曠偣鐧诲綍鎺ュ彛
export const ssoLogin =(empCode) => {
const params = new URLSearchParams();
- console.log(empCode);
params.append('empCode', empCode);
return request({
url: '/api/ubcs-code/passwordFree/ssoLogin',
diff --git a/Source/UBCS-WEB/src/page/login/userlogin.vue b/Source/UBCS-WEB/src/page/login/userlogin.vue
index f5e40d6..301be98 100644
--- a/Source/UBCS-WEB/src/page/login/userlogin.vue
+++ b/Source/UBCS-WEB/src/page/login/userlogin.vue
@@ -299,6 +299,7 @@
},
props: [],
methods: {
+ //鍗曠偣鐧诲綍璺宠浆
ChandleLogin() {
this.$router.push({ path: '/sso' });
},
diff --git a/Source/UBCS-WEB/src/views/docking/infoForm.vue b/Source/UBCS-WEB/src/views/docking/infoForm.vue
index a5772d4..a72bdfe 100644
--- a/Source/UBCS-WEB/src/views/docking/infoForm.vue
+++ b/Source/UBCS-WEB/src/views/docking/infoForm.vue
@@ -548,7 +548,7 @@
})
this.$nextTick(function (){
if(pass){
- that.formData.sysIntParamDTOs=this.formData.sysIntParamVOs.map(item=>{
+ that.formData.sysIntParamDTOS=this.formData.sysIntParamVOs.map(item=>{
return {
...item,
ordernNo:item.$index
diff --git a/Source/UBCS-WEB/src/views/integration/systemInfo.vue b/Source/UBCS-WEB/src/views/integration/systemInfo.vue
index 4d3dee2..ac49796 100644
--- a/Source/UBCS-WEB/src/views/integration/systemInfo.vue
+++ b/Source/UBCS-WEB/src/views/integration/systemInfo.vue
@@ -59,7 +59,7 @@
return {
checkAll: {},
ParentList: [],
- ParentRemoveList:[],
+ ParentRemoveList: [],
//閬垮厤缂撳瓨
reload: Math.random(),
TreeLoading: false,
@@ -147,7 +147,7 @@
//鍒嗙被鎺堟潈澶氶�夊洖璋�
checkChange(row, checked) {
if (checked) {
- if (!row.parentId && row.children) {
+ if (!row.parentId) {
const parentRecord = {
oid: row.oid,
classifyId: row.attributes.classifyId,
@@ -179,26 +179,41 @@
}
}
}
- console.log(this.ParentList);
}
} else {
- if (!row.parentId && row.children) {
- this.ParentRemoveList = this.ParentList.filter(record => record.oid !== row.oid);
+ // 鍙栨秷鍕鹃�夌殑鑺傜偣鏄埗鑺傜偣
+ if (!row.parentId) {
+ // 鎵惧埌鐖惰妭鐐瑰湪ParentList涓殑绱㈠紩
+ const parentIndex = this.ParentList.findIndex(item => item.oid === row.oid);
+ if (parentIndex !== -1) {
+ const parentOid = this.ParentList[parentIndex].classifyOid;
- if (row.children && row.children.length > 0) {
- for (let child of row.children) {
- this.ParentRemoveList = this.ParentList.filter(record => record.oid !== child.oid);
-
- if (child.children && child.children.length > 0) {
- for (let subChild of child.children) {
- this.ParentRemoveList = this.ParentList.filter(record => record.oid !== subChild.oid);
- }
+ // 鏌ユ壘鎵�鏈夐渶瑕佸垹闄ょ殑瀛愯妭鐐圭殑绱㈠紩
+ const childIndexes = this.ParentList.reduce((indexes, item, index) => {
+ if (item.classParentOid === parentOid && item.classifyOid !== parentOid) {
+ indexes.push(index);
}
+ return indexes;
+ }, []);
+
+ // 浠庡悗寰�鍓嶅垹闄ゅ瓙鑺傜偣鐨勬暟鎹紝淇濊瘉绱㈠紩鐨勬纭��
+ for (let i = childIndexes.length - 1; i >= 0; i--) {
+ this.ParentList.splice(childIndexes[i], 1);
}
+
+ // 鍒犻櫎鐖惰妭鐐圭殑鏁版嵁
+ this.ParentList.splice(parentIndex, 1);
+ }
+ } else {
+ // 鍙栨秷鍕鹃�夌殑鑺傜偣鏄瓙鑺傜偣
+ const childIndex = this.ParentList.findIndex(item => item.oid === row.oid);
+ if (childIndex !== -1) {
+ // 鍒犻櫎瀛愯妭鐐圭殑鏁版嵁
+ this.ParentList.splice(childIndex, 1);
}
}
- console.log(this.ParentRemoveList)
}
+ console.log(this.ParentList);
},
//鍒嗙被鎺堟潈
classifyHandler(row) {
--
Gitblit v1.9.3