|
@@ -191,6 +191,7 @@
|
|
|
placeholder="请选择被监审单位"
|
|
placeholder="请选择被监审单位"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
clearable
|
|
clearable
|
|
|
|
|
+ :multiple="isMultipleMode"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in allUnits"
|
|
v-for="item in allUnits"
|
|
@@ -466,9 +467,7 @@
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
watch: {},
|
|
watch: {},
|
|
|
- mounted() {
|
|
|
|
|
- this.loadOpts()
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ mounted() {},
|
|
|
methods: {
|
|
methods: {
|
|
|
handleDocumentTypeClick(data) {
|
|
handleDocumentTypeClick(data) {
|
|
|
this.activeDocumentTypeId = data.id
|
|
this.activeDocumentTypeId = data.id
|
|
@@ -517,9 +516,29 @@
|
|
|
this.allUnits = res.value || []
|
|
this.allUnits = res.value || []
|
|
|
// 过滤掉状态为停用的数据
|
|
// 过滤掉状态为停用的数据
|
|
|
this.allUnits = this.allUnits.filter((item) => item.status == 1)
|
|
this.allUnits = this.allUnits.filter((item) => item.status == 1)
|
|
|
- this.allUnits = this.allUnits.filter(
|
|
|
|
|
- (item) => item.unitId == this.project.auditedUnitId
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ // 筛选this.project.auditedUnitId中的单位,支持多种格式
|
|
|
|
|
+ if (this.project.auditedUnitId) {
|
|
|
|
|
+ // 确保将project.auditedUnitId转换为数组格式
|
|
|
|
|
+ let auditedUnitIds = []
|
|
|
|
|
+ if (Array.isArray(this.project.auditedUnitId)) {
|
|
|
|
|
+ auditedUnitIds = this.project.auditedUnitId
|
|
|
|
|
+ } else if (
|
|
|
|
|
+ typeof this.project.auditedUnitId === 'string' &&
|
|
|
|
|
+ this.project.auditedUnitId.includes(',')
|
|
|
|
|
+ ) {
|
|
|
|
|
+ // 如果是逗号分隔的字符串,转换为数组
|
|
|
|
|
+ auditedUnitIds = this.project.auditedUnitId
|
|
|
|
|
+ .split(',')
|
|
|
|
|
+ .map((id) => id.trim())
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 单个ID也转换为数组
|
|
|
|
|
+ auditedUnitIds = [this.project.auditedUnitId]
|
|
|
|
|
+ }
|
|
|
|
|
+ // 使用数组进行筛选
|
|
|
|
|
+ this.allUnits = this.allUnits.filter((item) =>
|
|
|
|
|
+ auditedUnitIds.includes(item.unitId)
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -553,6 +572,13 @@
|
|
|
updateBy: '',
|
|
updateBy: '',
|
|
|
updateTime: '',
|
|
updateTime: '',
|
|
|
}
|
|
}
|
|
|
|
|
+ // if(this.isMultipleMode){
|
|
|
|
|
+ // this.document.enterpriseId = this.project.auditedUnitId ? this.project.auditedUnitId.split(',') : []
|
|
|
|
|
+ // console.log('this.document.enterpriseId',this.document.enterpriseId)
|
|
|
|
|
+ // }else{
|
|
|
|
|
+ // this.document.enterpriseId = this.project.auditedUnitId
|
|
|
|
|
+ // }
|
|
|
|
|
+ this.loadOpts()
|
|
|
if (this.activeDocumentTypeId) {
|
|
if (this.activeDocumentTypeId) {
|
|
|
this.document.documentId = this.activeDocumentTypeId
|
|
this.document.documentId = this.activeDocumentTypeId
|
|
|
this.handleTemplateChange()
|
|
this.handleTemplateChange()
|
|
@@ -568,6 +594,7 @@
|
|
|
...this.document,
|
|
...this.document,
|
|
|
...res.value,
|
|
...res.value,
|
|
|
}
|
|
}
|
|
|
|
|
+ this.loadOpts()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|