|
@@ -40,7 +40,7 @@
|
40
|
40
|
<el-table-column
|
41
|
41
|
v-for="(item,index) in columns" :key="index"
|
42
|
42
|
:prop="item.prop"
|
43
|
|
- :label="item.label"
|
|
43
|
+ :label="item.label"
|
44
|
44
|
width="150">
|
45
|
45
|
<!-- <template slot-scope="scope" >
|
46
|
46
|
{{ scope.row.prop }}
|
|
@@ -55,7 +55,7 @@
|
55
|
55
|
{{ getname(scope.row.prop) }}
|
56
|
56
|
{{ scope.row.prop }}
|
57
|
57
|
</div>
|
58
|
|
-
|
|
58
|
+
|
59
|
59
|
</template>
|
60
|
60
|
</el-table-column> -->
|
61
|
61
|
|
|
@@ -176,15 +176,16 @@ export default {
|
176
|
176
|
// return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
|
177
|
177
|
return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
|
178
|
178
|
},
|
|
179
|
+ // 数据源
|
179
|
180
|
getinspectiondetails(patient_id,project_id){
|
180
|
|
- console.log("patient_id2333333333333",patient_id)
|
181
|
181
|
const params={
|
182
|
182
|
patient_id:patient_id,
|
183
|
183
|
project_id:project_id,
|
184
|
184
|
}
|
185
|
185
|
getinspectiongroupdetails(params).then(response =>{
|
186
|
|
-
|
|
186
|
+
|
187
|
187
|
const list = response.data.data.inspection
|
|
188
|
+ const tablehed = response.data.data.referenceList
|
188
|
189
|
console.log('response11111',list);
|
189
|
190
|
|
190
|
191
|
// this.tableData = list
|
|
@@ -194,20 +195,19 @@ export default {
|
194
|
195
|
let table = [{inspect_date:''}]
|
195
|
196
|
const datable =[]
|
196
|
197
|
// const arr ={}
|
197
|
|
- if(list[0].Child.length >0){
|
198
|
|
- const child = list[0].Child
|
199
|
|
- for(let i=0;i<child.length;i++){
|
|
198
|
+ if(tablehed.length >0){
|
|
199
|
+ for(let i=0;i<tablehed.length;i++){
|
200
|
200
|
const obj ={
|
201
|
|
- label:child[i].item_name,
|
|
201
|
+ label:tablehed[i].item_name,
|
202
|
202
|
// prop:child[i].item_name
|
203
|
203
|
prop:'value'+(i+1)
|
204
|
204
|
}
|
205
|
205
|
columns.push(obj)
|
206
|
206
|
}
|
207
|
207
|
}
|
208
|
|
-
|
|
208
|
+
|
209
|
209
|
// console.log('list[0].Child121',columns);
|
210
|
|
-
|
|
210
|
+
|
211
|
211
|
list.forEach(item =>{
|
212
|
212
|
const datable1 ={
|
213
|
213
|
inspect_date:item.inspect_date,
|
|
@@ -218,12 +218,7 @@ export default {
|
218
|
218
|
for(let i in datable){
|
219
|
219
|
for(let j in columns){
|
220
|
220
|
if(item1.inspect_date == datable[i].inspect_date && columns[j].label == item1.item_name){
|
221
|
|
- // if(item1.inspect_value !=''){
|
222
|
221
|
datable[i][columns[j].prop] = item1.inspect_value
|
223
|
|
- // }else{
|
224
|
|
- // datable[i][columns[j].prop] = 0
|
225
|
|
- // }
|
226
|
|
-
|
227
|
222
|
}
|
228
|
223
|
}
|
229
|
224
|
}
|
|
@@ -232,12 +227,12 @@ export default {
|
232
|
227
|
table =datable
|
233
|
228
|
this.datable = datable
|
234
|
229
|
// console.log('ppppp',columns);
|
235
|
|
-
|
|
230
|
+
|
236
|
231
|
this.tableData = table
|
237
|
|
- this.columns = columns
|
238
|
|
- console.log('11111',this.tableData);
|
|
232
|
+ this.columns = columns
|
|
233
|
+ console.log('11111',this.tableData);
|
239
|
234
|
})
|
240
|
|
-
|
|
235
|
+
|
241
|
236
|
},
|
242
|
237
|
getname(row,label){
|
243
|
238
|
for(let key in row){
|