From ef9eb48046f8dfbb3c18b0f45befcbeddbdf6899 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期三, 29 五月 2024 03:56:23 +0800
Subject: [PATCH] 光纤配置数据回显和保存
---
src/components/view/person-manage.vue | 27 +++++++++++++--------------
1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/components/view/person-manage.vue b/src/components/view/person-manage.vue
index c8f2816..5938846 100644
--- a/src/components/view/person-manage.vue
+++ b/src/components/view/person-manage.vue
@@ -289,7 +289,7 @@
font: '缂栬緫',
type: 'text',
method: 'doDiy',
- field: ['createUserName', 'updateUserName', 'roleName', '瑙掕壊=roleId', '瀵嗙爜=password',
+ field: ['roleName', '瑙掕壊=roleId', '瀵嗙爜=password',
'濮撳悕EN=nameEn','骞撮緞=age','閭=email','鍗曚綅=company','绛惧悕=pictureUrl','鏈汉鐓�=signatureUrl']
}],
tagField: {
@@ -524,7 +524,7 @@
}
this.selectTree = data2.replace(' - ', '')
this.addOb.fatherId = val.id;
- this.componentData.entity.departId = val.id;
+ this.componentData.entity.departId = val.id + ',';
this.refreshTable()
},
nodeOpen(data, node, el) {
@@ -600,7 +600,7 @@
})
},
nodeClick2(ob, node, el) {
- this.currentCompaniesList[node.level-1] = ob.id
+ this.getNodeParent(node)
if (ob.id !== 'SC21') {
this.personLoad = true
this.$axios.post(this.$api.companies.selectSimpleList, {
@@ -613,6 +613,12 @@
})
}
},
+ getNodeParent(val){
+ this.currentCompaniesList[val.level-1] = val.data.id
+ if(val.parent!=null){
+ this.getNodeParent(val.parent)
+ }
+ },
handleSelectionChange(val) {
this.multipleSelection = val;
},
@@ -623,24 +629,17 @@
if(this.currentCompaniesList.length === 0){
return this.$message.error('璇烽�夋嫨缁勭粐')
}
- for (let index = this.currentCompaniesList.length-1; index >1; index--) {
+ /* for (let index = this.currentCompaniesList.length-1; index >1; index--) {
let obj = this.multipleSelection.find(a=>a.companyId==this.currentCompaniesList[index])
if(!obj){
this.currentCompaniesList.splice(index,1)
- }else{
- return
}
- }
+ } */
let arr = []
this.currentCompaniesList.forEach(b=>{
- /* this.companiesList.forEach(a=>{
- if(a.companyId===b){
- console.log(a)
- }
- }) */
let obj = this.companiesList.find(a=>a.companyId==b)
arr.push(obj)
- })
+ })
this.addLoad = true
this.$axios.post(this.$api.companies.addPersonUser, {
company: arr,
@@ -661,7 +660,7 @@
this.addLoad = false
this.personList = []
this.userSearch2 = ''
- this.refresh()
+ this.selectTreeList()
}).catch(e => {
this.addthirdParty = false
this.addLoad = false
--
Gitblit v1.9.3