|
@@ -93,13 +93,13 @@
|
93
|
93
|
|
94
|
94
|
// 所有页码数据
|
95
|
95
|
const formPageList = reactive([]);
|
96
|
|
-
|
|
96
|
+
|
97
|
97
|
// 故障来源列表
|
98
|
98
|
const defaultSourceValue = ref();
|
99
|
99
|
|
100
|
100
|
// 表单
|
101
|
101
|
const baseForm = ref()
|
102
|
|
-
|
|
102
|
+
|
103
|
103
|
// 图片上传ref数组
|
104
|
104
|
const itemRefs = ref({});
|
105
|
105
|
|
|
@@ -137,7 +137,7 @@
|
137
|
137
|
function changeForm(){
|
138
|
138
|
handleData(true);
|
139
|
139
|
}
|
140
|
|
-
|
|
140
|
+
|
141
|
141
|
// 跳转巡检列表
|
142
|
142
|
function toInspectionExecute(){
|
143
|
143
|
inspectionValueStore.clearInspectionValueData();
|
|
@@ -145,7 +145,7 @@
|
145
|
145
|
url: `/pages/inspection/inspectionExecute/inspectionExecute`
|
146
|
146
|
})
|
147
|
147
|
}
|
148
|
|
-
|
|
148
|
+
|
149
|
149
|
// 获取故障来源列表
|
150
|
150
|
function getSources(){
|
151
|
151
|
let postData = {
|
|
@@ -160,7 +160,7 @@
|
160
|
160
|
}
|
161
|
161
|
})
|
162
|
162
|
}
|
163
|
|
-
|
|
163
|
+
|
164
|
164
|
// 跳转新建事件
|
165
|
165
|
function toBuildIncident(res){
|
166
|
166
|
let imgList = Object.values(itemRefs.value);
|
|
@@ -173,7 +173,7 @@
|
173
|
173
|
place: res.inspectionNode.floorDTO,
|
174
|
174
|
houseNumber: res.inspectionNode.address,
|
175
|
175
|
source: defaultSourceValue.value,
|
176
|
|
- description: res.inspectionValuesList.filter(v => v.exception == 1).map(v => `${v.name}填写值为${v.valuex}`).join(';'),
|
|
176
|
+ description: res.inspectionValuesList.filter(v => v.exception == 1).map(v => `${v.name}填写值为${v.valuex ? v.valuex : (v.formItemConfigList ? v.formItemConfigList.map(vv => v.name).join(',') : '')}`).join(';'),
|
177
|
177
|
requester: loginUserStore.loginUser.user,
|
178
|
178
|
branch: loginUserStore.loginUser.user.currentHospital.parent ? loginUserStore.loginUser.user.currentHospital.parent.id : loginUserStore.loginUser.user.currentHospital.id,
|
179
|
179
|
contacts: loginUserStore.loginUser.user.name,
|
|
@@ -209,7 +209,7 @@
|
209
|
209
|
})
|
210
|
210
|
}
|
211
|
211
|
})
|
212
|
|
-
|
|
212
|
+
|
213
|
213
|
nextTick(() => {
|
214
|
214
|
baseForm.value.validate().then(res => {
|
215
|
215
|
console.log('success', res);
|
|
@@ -387,15 +387,18 @@
|
387
|
387
|
|
388
|
388
|
// 其他项
|
389
|
389
|
if(!isException){
|
|
390
|
+ console.log(firstPage, 'firstPage')
|
|
391
|
+ console.log(formValues, 'formValues')
|
|
392
|
+ console.log(isException, 'isException')
|
390
|
393
|
firstPage.forEach(v => {
|
391
|
394
|
// 下拉,单选
|
392
|
395
|
if(v.type === '1' || v.type === '2'){
|
393
|
|
- let obj = v.list.find(vv => formValues[v.key] === vv.value);
|
|
396
|
+ let obj = v.list.find(vv => v.value === vv.value);
|
394
|
397
|
v.isException = obj ? obj.checkException === 1 : false;
|
395
|
398
|
} else if(v.type === '3'){
|
396
|
399
|
// 多选
|
397
|
400
|
v.isException = v.list.some(vv => {
|
398
|
|
- if(formValues[v.key].includes(vv.value)){
|
|
401
|
+ if(v.value.includes(vv.value)){
|
399
|
402
|
return vv.checkException === 1;
|
400
|
403
|
}else{
|
401
|
404
|
return false;
|