Merge branch 'develop' of ssh://gitlab.91isoft.com:10022/LAWS/laws-system-front-FOTON into develop

This commit is contained in:
zhaoxianhui
2022-07-06 10:15:17 +08:00
2 changed files with 24 additions and 12 deletions
@@ -1963,6 +1963,14 @@
} }
return data return data
}, },
filterStringDate(data){
if(data === undefined || data === null || data === '' || data === 'null'){
return ""
}else {
data = data.toString()
}
return data
},
handleProcessStandardNext(status) { handleProcessStandardNext(status) {
switch (status) { switch (status) {
// 新增 // 新增
@@ -1994,11 +2002,11 @@
// 引用标准 // 引用标准
this.form.YYBZ = this.filterDate(this.standardCheckedList[0].esMatingRelations) this.form.YYBZ = this.filterDate(this.standardCheckedList[0].esMatingRelations)
// 起草人带入 // 起草人带入
this.form.QCRBUSS = this.filterDate(this.standardCheckedList[0].drafterName) this.form.QCRBUSS = this.filterStringDate(this.standardCheckedList[0].drafterName)
this.form.QCRBUSSID = this.filterDate(this.standardCheckedList[0].drafter) this.form.QCRBUSSID = this.filterStringDate(this.standardCheckedList[0].drafter)
// 起草部门带入 // 起草部门带入
this.form.QCDW = this.filterDate(this.standardCheckedList[0].unitName) this.form.QCDW = this.filterStringDate(this.standardCheckedList[0].unitName)
this.form.QCDWID = this.filterDate(this.standardCheckedList[0].unit) this.form.QCDWID = this.filterStringDate(this.standardCheckedList[0].unit)
this.form.TXLBBUSS = this.filterDate(this.standardCheckedList[0].tsJsonName) this.form.TXLBBUSS = this.filterDate(this.standardCheckedList[0].tsJsonName)
this.form.menuId = this.filterDate(this.standardCheckedList[0].tsJson) this.form.menuId = this.filterDate(this.standardCheckedList[0].tsJson)
this.form.treeType = 'sarMs' this.form.treeType = 'sarMs'
@@ -1100,32 +1100,36 @@
this.modalshowflag2 = true this.modalshowflag2 = true
}, },
checkedRole2 (data) { checkedRole2 (data) {
let idList = '' let idList = ''
let nameList = '' let nameList = ''
let bmIdList = ''
let bmNameList = ''
data.forEach( item => { data.forEach( item => {
if (nameList.length > 0) { if (nameList.length > 0) {
nameList += ',' nameList += ','
idList += ',' idList += ','
bmIdList += ','
bmNameList += ','
} }
idList += item.id idList += item.id
nameList += item.name nameList += item.name
bmIdList += item.topUnitId
bmNameList += item.topUnit
}) })
if (this.type === 'resPerson') { if (this.type === 'resPerson') {
this.addForm.resPerson = idList this.addForm.resPerson = idList
this.addForm.resPersonName = nameList this.addForm.resPersonName = nameList
} else if (this.type === 'drafter') { } else if (this.type === 'drafter') {
this.addForm.drafter = idList this.addForm.drafter = idList
this.addForm.drafterName = nameList this.addForm.drafterName = nameList
this.addForm.unitName = bmNameList if(data && data.length > 0){
this.addForm.unit = bmIdList const institutionIdList = this.unique(data.map(item => item.topUnitId)).join(",")
const institutionNameList = this.unique(data.map(item => item.topUnit)).join(",")
this.addForm.unitName = institutionNameList
this.addForm.unit = institutionIdList
}
} }
}, },
unique(newArr) {
const res = new Map();
return newArr.filter((newArr) => !res.has(newArr) && res.set(newArr, 1));
},
addDrawerSubmit () { addDrawerSubmit () {
this.$refs['addForm'].validate((valid) => { this.$refs['addForm'].validate((valid) => {
if (valid) { if (valid) {