Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -831,10 +831,13 @@ export default {
|
|||||||
this.modalshowflag2 = true;
|
this.modalshowflag2 = true;
|
||||||
},
|
},
|
||||||
checkedRole2(data) {
|
checkedRole2(data) {
|
||||||
console.log(data);
|
let unList = []
|
||||||
|
let uidList = []
|
||||||
let idList = "", nameList = ""
|
let idList = "", nameList = ""
|
||||||
let unitList = "", unitNameList = ""
|
let unitList = "", unitNameList = ""
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
|
unList.push(item.institutionName)
|
||||||
|
uidList.push(item.institutionId)
|
||||||
if (nameList.length) {
|
if (nameList.length) {
|
||||||
nameList += ",";
|
nameList += ",";
|
||||||
idList += ",";
|
idList += ",";
|
||||||
@@ -846,11 +849,39 @@ export default {
|
|||||||
unitList += item.institutionId
|
unitList += item.institutionId
|
||||||
unitNameList += item.institutionName
|
unitNameList += item.institutionName
|
||||||
});
|
});
|
||||||
|
let unNameList = []
|
||||||
|
let unIdList = []
|
||||||
|
unList.forEach(item => {
|
||||||
|
if(unNameList.length){
|
||||||
|
unNameList.forEach(items => {
|
||||||
|
if(items !== item){
|
||||||
|
unNameList.push(item)
|
||||||
|
}else{
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
unNameList.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
uidList.forEach(item => {
|
||||||
|
if(unIdList.length){
|
||||||
|
unIdList.forEach(items => {
|
||||||
|
if(items !== item){
|
||||||
|
unIdList.push(item)
|
||||||
|
}else{
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
unIdList.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
if(this.roleType === '1'){
|
if(this.roleType === '1'){
|
||||||
this.$set(this.qbfsForm, 'drafter', idList)
|
this.$set(this.qbfsForm, 'drafter', idList)
|
||||||
this.$set(this.qbfsForm, 'drafterName', nameList)
|
this.$set(this.qbfsForm, 'drafterName', nameList)
|
||||||
this.$set(this.qbfsForm, 'unit', unitList)
|
this.$set(this.qbfsForm, 'unit', unIdList.join(','))
|
||||||
this.$set(this.qbfsForm, 'unitName', unitNameList)
|
this.$set(this.qbfsForm, 'unitName', unNameList.join(','))
|
||||||
}else if(this.roleType === '2'){
|
}else if(this.roleType === '2'){
|
||||||
this.$set(this.qbfsForm, 'resPerson', idList)
|
this.$set(this.qbfsForm, 'resPerson', idList)
|
||||||
this.$set(this.qbfsForm, 'resPersonName', nameList)
|
this.$set(this.qbfsForm, 'resPersonName', nameList)
|
||||||
|
|||||||
@@ -942,30 +942,62 @@ export default {
|
|||||||
this.modalshowflag2 = true;
|
this.modalshowflag2 = true;
|
||||||
},
|
},
|
||||||
checkedRole2(data) {
|
checkedRole2(data) {
|
||||||
|
let unList = []
|
||||||
|
let uidList = []
|
||||||
let idList = "", nameList = ""
|
let idList = "", nameList = ""
|
||||||
let unitList = "", unitNameList = ""
|
let unitList = "", unitNameList = ""
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
|
unList.push(item.institutionName)
|
||||||
|
uidList.push(item.institutionId)
|
||||||
if (nameList.length) {
|
if (nameList.length) {
|
||||||
nameList += ",";
|
nameList += ",";
|
||||||
idList += ",";
|
idList += ",";
|
||||||
unitList += ",";
|
unitList += ","
|
||||||
unitNameList += ",";
|
unitNameList += ",";
|
||||||
}
|
}
|
||||||
idList += item.id;
|
idList += item.id;
|
||||||
nameList += item.name;
|
nameList += item.name;
|
||||||
unitList += item.institutionId
|
unitList += item.institutionId
|
||||||
unitNameList += item.institutionName
|
unitNameList += item.institutionName
|
||||||
|
|
||||||
});
|
});
|
||||||
if(this.type === '1'){
|
let unNameList = []
|
||||||
|
let unIdList = []
|
||||||
|
unList.forEach(item => {
|
||||||
|
if(unNameList.length){
|
||||||
|
unNameList.forEach(items => {
|
||||||
|
if(items !== item){
|
||||||
|
unNameList.push(item)
|
||||||
|
}else{
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
unNameList.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
uidList.forEach(item => {
|
||||||
|
if(unIdList.length){
|
||||||
|
unIdList.forEach(items => {
|
||||||
|
if(items !== item){
|
||||||
|
unIdList.push(item)
|
||||||
|
}else{
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
unIdList.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(this.roleType === '1'){
|
||||||
this.$set(this.qbfsForm, 'drafter', idList)
|
this.$set(this.qbfsForm, 'drafter', idList)
|
||||||
this.$set(this.qbfsForm, 'drafterName', nameList)
|
this.$set(this.qbfsForm, 'drafterName', nameList)
|
||||||
this.$set(this.qbfsForm, 'unit', unitList)
|
this.$set(this.qbfsForm, 'unit', unIdList.join(','))
|
||||||
this.$set(this.qbfsForm, 'unitName', unitNameList)
|
this.$set(this.qbfsForm, 'unitName', unNameList.join(','))
|
||||||
}else if(this.type === '2'){
|
}else if(this.roleType === '2'){
|
||||||
this.$set(this.qbfsForm, 'resPerson', idList)
|
this.$set(this.qbfsForm, 'resPerson', idList)
|
||||||
this.$set(this.qbfsForm, 'resPersonName', nameList)
|
this.$set(this.qbfsForm, 'resPersonName', nameList)
|
||||||
}
|
}
|
||||||
|
// === '0' false null undefined都属于false类变量 如果里面有值可以直接判断
|
||||||
if(this.qbfsForm.drafterName){
|
if(this.qbfsForm.drafterName){
|
||||||
this.$refs.qbfsForm.validateField('drafterName');
|
this.$refs.qbfsForm.validateField('drafterName');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user