|
@@ -39,26 +39,25 @@
|
39
|
39
|
</el-table-column>
|
40
|
40
|
<el-table-column
|
41
|
41
|
v-for="(item,index) in columns" :key="index"
|
42
|
|
- :prop="item.prop"
|
|
42
|
+ :prop="item.item_id"
|
43
|
43
|
:label="item.item_name"
|
44
|
44
|
width="150">
|
45
|
45
|
<template slot-scope="scope" >
|
46
|
|
-
|
47
|
46
|
<span v-if="item.range_type == 3">
|
48
|
|
- {{ getItemValueOne(scope.row.inspect_date,item.item_name) }}
|
|
47
|
+ {{ getItemValueOne(scope.row.inspect_date,item.item_name) }}
|
49
|
48
|
</span>
|
50
|
49
|
|
51
|
50
|
<span v-if="item.range_type == 2">
|
52
|
51
|
<span v-if="getItemValue(scope.row.inspect_date,item.item_name)=='阳性'" style="color: red"> {{ getItemValue(scope.row.inspect_date,item.item_name) }}</span>
|
53
|
|
- <span v-if="getItemValue(scope.row.inspect_date,item.item_name)=='阴性'"> {{ getItemValue(scope.row.inspect_date,item.item_name) }}</span>
|
|
52
|
+ <span v-else> {{ getItemValue(scope.row.inspect_date,item.item_name) }}</span>
|
54
|
53
|
</span>
|
55
|
54
|
|
56
|
55
|
<span v-if="item.range_type == 1">
|
57
|
56
|
<span v-if="parseFloat(getItemValue(scope.row.inspect_date,item.item_name)) < parseFloat(item.range_min) ">
|
58
|
57
|
{{ getItemValue(scope.row.inspect_date,item.item_name) }} <span style="color: blue;" v-if="getItemValue(scope.row.inspect_date,item.item_name)>0">↓</span>
|
59
|
58
|
</span>
|
60
|
|
- <span v-if="parseFloat(item.range_min)<= parseFloat( getItemValue(scope.row.inspect_date,item.item_name)) && parseFloat(getItemValue(scope.row.inspect_date,item.item_name)) <= parseFloat(item.range_max) ">
|
61
|
|
- {{ getItemValue(scope.row.inspect_date,item.item_name) }}
|
|
59
|
+ <span v-if="parseFloat(item.range_min)<= parseFloat( getItemValue(scope.row.inspect_date,item.item_name)) && parseFloat(getItemValue(scope.row.inspect_date,item.item_name))<= parseFloat(item.range_max) ">
|
|
60
|
+ {{ getItemValue(scope.row.inspect_date,item.item_name) }}
|
62
|
61
|
</span>
|
63
|
62
|
<span v-if="parseFloat(item.range_min) =='' || parseFloat(item.range_max) == '' ">
|
64
|
63
|
{{ getItemValue(scope.row.inspect_date,item.item_name) }}
|
|
@@ -68,7 +67,7 @@
|
68
|
67
|
</span>
|
69
|
68
|
|
70
|
69
|
</span>
|
71
|
|
-
|
|
70
|
+
|
72
|
71
|
</template>
|
73
|
72
|
</el-table-column>
|
74
|
73
|
<!-- <el-table-column v-for="(item,index) in columns" :key="index"
|
|
@@ -211,7 +210,7 @@ export default {
|
211
|
210
|
|
212
|
211
|
const list = response.data.data.inspection
|
213
|
212
|
const tablehed = response.data.data.referenceList
|
214
|
|
- console.log('response11111',tablehed);
|
|
213
|
+ console.log('response11111',response.data.data);
|
215
|
214
|
|
216
|
215
|
this.tableData = list
|
217
|
216
|
var columns = []
|
|
@@ -232,8 +231,9 @@ export default {
|
232
|
231
|
|
233
|
232
|
this.columns = tablehed
|
234
|
233
|
|
235
|
|
- // console.log('list[0].Child121',columns);
|
236
|
|
-
|
|
234
|
+ console.log('list[0].Child121',this.columns);
|
|
235
|
+ console.log('this.tableData',this.tableData);
|
|
236
|
+
|
237
|
237
|
// list.forEach(item =>{
|
238
|
238
|
// const datable1 ={
|
239
|
239
|
// inspect_date:item.inspect_date,
|
|
@@ -246,7 +246,7 @@ export default {
|
246
|
246
|
// if(item1.inspect_date == datable[i].inspect_date && columns[j].label == item1.item_name){
|
247
|
247
|
// console.log("item1---------------",item1)
|
248
|
248
|
// if(item1.inspect_type == 2){
|
249
|
|
- // datable[i][columns[j].prop] = item1.inspect_value
|
|
249
|
+ // datable[i][columns[j].prop] = item1.inspect_value
|
250
|
250
|
// }
|
251
|
251
|
// datable[i][columns[j].prop] = item1.inspect_value
|
252
|
252
|
// }
|
|
@@ -273,7 +273,7 @@ export default {
|
273
|
273
|
}
|
274
|
274
|
},
|
275
|
275
|
getItemValue(inspect_date,item_name){
|
276
|
|
-
|
|
276
|
+
|
277
|
277
|
var inspect_value = ""
|
278
|
278
|
for(let i=0;i<this.tableData.length;i++){
|
279
|
279
|
for(let j=0;j<this.tableData[i].Child.length;j++){
|
|
@@ -281,7 +281,6 @@ export default {
|
281
|
281
|
inspect_value = this.tableData[i].Child[j].inspect_value
|
282
|
282
|
}
|
283
|
283
|
}
|
284
|
|
-
|
285
|
284
|
}
|
286
|
285
|
return inspect_value
|
287
|
286
|
},
|
|
@@ -293,7 +292,7 @@ export default {
|
293
|
292
|
inspect_value = this.tableData[i].Child[j].inspect_value
|
294
|
293
|
}
|
295
|
294
|
}
|
296
|
|
-
|
|
295
|
+
|
297
|
296
|
}
|
298
|
297
|
return inspect_value
|
299
|
298
|
},
|