Browse Source

Merge branch '20230223_pad_vue_new_branch' of http://git.shengws.com/csx/Pad_New into 20230223_pad_vue_new_branch

28169 1 week ago
parent
commit
d02266d412
1 changed files with 13 additions and 14 deletions
  1. 13 14
      src/pages/doctorAdvice/components/new_Inspectiondetails.vue

+ 13 - 14
src/pages/doctorAdvice/components/new_Inspectiondetails.vue View File

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