Browse Source

11月26 检验检查

yq1 6 months ago
parent
commit
040657a9c3
1 changed files with 30 additions and 21 deletions
  1. 30 21
      src/xt_pages/user/inspection.vue

+ 30 - 21
src/xt_pages/user/inspection.vue View File

148
                         <span v-else> {{ scope.row.value }}</span>
148
                         <span v-else> {{ scope.row.value }}</span>
149
                       </span>
149
                       </span>
150
                       <span v-if="scope.row.range_type == 1">
150
                       <span v-if="scope.row.range_type == 1">
151
-                        <span v-if="scope.row.value < parseFloat(scope.row.range_min) ">
151
+                        <span v-if="parseFloat(scope.row.value) < parseFloat(getrange(scope.row.range_min)) ">
152
                           {{ scope.row.value }} <span style="color: blue;" v-if="scope.row.value>0">↓</span>
152
                           {{ scope.row.value }} <span style="color: blue;" v-if="scope.row.value>0">↓</span>
153
                         </span>
153
                         </span>
154
-                        <span v-if="parseFloat(scope.row.range_min)<= parseFloat( scope.row.value) && parseFloat(scope.row.value)<= parseFloat(scope.row.range_max) ">
154
+                        <span v-if="parseFloat(getrange(scope.row.range_min))<= parseFloat( scope.row.value) && parseFloat(scope.row.value)<= parseFloat(getrange(scope.row.range_max)) ">
155
                           {{ scope.row.value }}
155
                           {{ scope.row.value }}
156
                         </span>
156
                         </span>
157
-                        <span v-if="parseFloat(scope.row.value) >parseFloat(scope.row.range_max) ">
157
+                        <span v-if="parseFloat(scope.row.value) >parseFloat(getrange(scope.row.range_max)) ">
158
                           {{ scope.row.value }} <span style="color: red;" v-if="scope.row.value>0">↑</span>
158
                           {{ scope.row.value }} <span style="color: red;" v-if="scope.row.value>0">↑</span>
159
                         </span>
159
                         </span>
160
                         <span v-if ="scope.row.range_max ==''||scope.row.range_min ==''">
160
                         <span v-if ="scope.row.range_max ==''||scope.row.range_min ==''">
311
     </el-dialog>
311
     </el-dialog>
312
 
312
 
313
 
313
 
314
-
314
+<!-- 新增 -->
315
     <el-dialog
315
     <el-dialog
316
       :title="formTitle"
316
       :title="formTitle"
317
       :visible.sync="dialogFormVisible"
317
       :visible.sync="dialogFormVisible"
693
             date: this.itemDate,
693
             date: this.itemDate,
694
             project_id: this.project.project_id
694
             project_id: this.project.project_id
695
           }
695
           }
696
+          console.log('params',params);
696
           DeletePatientInspection(params).then(response => {
697
           DeletePatientInspection(params).then(response => {
697
             if (response.data.state == 0) {
698
             if (response.data.state == 0) {
698
               this.$message.error(response.data.msg)
699
               this.$message.error(response.data.msg)
843
           }
844
           }
844
 
845
 
845
         }
846
         }
846
-        console.log(this.form.formItem)
847
+        console.log('11111',this.form.formItem)
847
         this.dialogFormVisible = true
848
         this.dialogFormVisible = true
848
 
849
 
849
       }
850
       }
897
 
898
 
898
     },
899
     },
899
     openNew() {
900
     openNew() {
901
+      console.log('this.project',this.project);
902
+
900
       if (this.project == null) {
903
       if (this.project == null) {
901
         this.$message.error('请先选择项目')
904
         this.$message.error('请先选择项目')
902
         return false
905
         return false
916
       for (var index in this.project.inspection_reference) {
919
       for (var index in this.project.inspection_reference) {
917
         var item_id =0
920
         var item_id =0
918
         if(this.project.inspection_reference[index].item_id == 0){
921
         if(this.project.inspection_reference[index].item_id == 0){
919
-            item_id =  parseInt(this.project.inspection_reference[index].id) 
922
+            item_id =  parseInt(this.project.inspection_reference[index].id)
920
         }
923
         }
921
         if(this.project.inspection_reference[index].item_id > 0){
924
         if(this.project.inspection_reference[index].item_id > 0){
922
-          item_id = parseInt(this.project.inspection_reference[index].item_id) 
925
+          item_id = parseInt(this.project.inspection_reference[index].item_id)
923
         }
926
         }
924
         this.form.formItem.push({
927
         this.form.formItem.push({
925
           id: 0,
928
           id: 0,
1031
 
1034
 
1032
           console.log("this.form",this.form)
1035
           console.log("this.form",this.form)
1033
 
1036
 
1034
-         
1037
+
1035
           CreatePatientInspection(
1038
           CreatePatientInspection(
1036
             this.patientID,
1039
             this.patientID,
1037
             this.form,
1040
             this.form,
1327
             }
1330
             }
1328
 
1331
 
1329
             this.inspections = response.data.data.inspections
1332
             this.inspections = response.data.data.inspections
1330
-            console.log("this.inpections",this.inspections)
1333
+            console.log("this.inpections",response.data.data)
1331
             if (inspections == null) {
1334
             if (inspections == null) {
1332
               this.inspections = []
1335
               this.inspections = []
1333
               return false
1336
               return false
1354
 
1357
 
1355
               console.log("item=-----------------12",inspectionsMap[items[index].id],inspectionsMap[parseInt(items[index].item_id)])
1358
               console.log("item=-----------------12",inspectionsMap[items[index].id],inspectionsMap[parseInt(items[index].item_id)])
1356
               if (item.item_id > 0) {
1359
               if (item.item_id > 0) {
1357
-                console.log('执行0',inspectionsMap[items[index].id]);
1358
 
1360
 
1359
                 if (typeof(inspectionsMap[parseInt(items[index].item_id)])  == "undefined") {
1361
                 if (typeof(inspectionsMap[parseInt(items[index].item_id)])  == "undefined") {
1360
                   if(this.org_id == 10121 || this.org_id ==10138 || this.org_id ==10278){
1362
                   if(this.org_id == 10121 || this.org_id ==10138 || this.org_id ==10278){
1361
                     item.value = inspectionsMap[items[index].id].inspect_value
1363
                     item.value = inspectionsMap[items[index].id].inspect_value
1362
                     item.item_name = inspectionsMap[items[index].id].item_name
1364
                     item.item_name = inspectionsMap[items[index].id].item_name
1363
                   }else{
1365
                   }else{
1364
-                    console.log('执行3',inspectionsMap,item);
1365
-                    if(this.org_id == 10702 || this.org_id == 0){
1366
-                      if(item.project_name == '血常规'|| item.project_name == '透后肾功能' || 
1366
+                    console.log('执行1');
1367
+                    
1368
+                    if(this.org_id == 10702){
1369
+                      if(item.project_name == '血常规'|| item.project_name == '透后肾功能' ||
1367
                           item.project_name == '肝功能' || item.project_name == '电解质' || item.project_name == '透前肾功能'
1370
                           item.project_name == '肝功能' || item.project_name == '电解质' || item.project_name == '透前肾功能'
1368
                         ){
1371
                         ){
1369
-                        console.log('11111',inspectionsMap[items[index].id].inspect_value);
1372
+
1370
                         item.value = inspectionsMap[items[index].id].inspect_value.replace(/&lt;/g, "<").replace(/&gt;/g, ">")
1373
                         item.value = inspectionsMap[items[index].id].inspect_value.replace(/&lt;/g, "<").replace(/&gt;/g, ">")
1371
                         item.item_name = inspectionsMap[items[index].id].item_name
1374
                         item.item_name = inspectionsMap[items[index].id].item_name
1372
                       }else{
1375
                       }else{
1373
-                        
1374
                         item.value = ''
1376
                         item.value = ''
1375
                         item.item_name = ''
1377
                         item.item_name = ''
1376
                       }
1378
                       }
1377
                     } else{
1379
                     } else{
1380
+                      console.log('执行2');
1378
                       item.value = ''
1381
                       item.value = ''
1379
                       item.item_name = ''
1382
                       item.item_name = ''
1380
                     }
1383
                     }
1381
                   }
1384
                   }
1382
                 } else {
1385
                 } else {
1383
-                  console.log('执行1',inspectionsMap);
1386
+                  console.log('执行3',inspectionsMap[items[index].item_id].inspect_value);
1384
                   item.value = inspectionsMap[items[index].item_id].inspect_value.replace(/&lt;/g, "<").replace(/&gt;/g, ">")
1387
                   item.value = inspectionsMap[items[index].item_id].inspect_value.replace(/&lt;/g, "<").replace(/&gt;/g, ">")
1385
                   item.item_name = inspectionsMap[items[index].item_id].item_name
1388
                   item.item_name = inspectionsMap[items[index].item_id].item_name
1386
                 }
1389
                 }
1387
-               
1388
-
1389
                 if(this.org_id ==10191){
1390
                 if(this.org_id ==10191){
1390
                   if(item.project_name == "乙肝定性(五项)"){
1391
                   if(item.project_name == "乙肝定性(五项)"){
1391
                     console.log("金阿迪发到付阿打发")
1392
                     console.log("金阿迪发到付阿打发")
1397
                 if(typeof(inspectionsMap[parseInt(items[index].id)])  == "undefined"){
1398
                 if(typeof(inspectionsMap[parseInt(items[index].id)])  == "undefined"){
1398
                   continue
1399
                   continue
1399
                 }
1400
                 }
1400
-                console.log('执行2',inspectionsMap);
1401
+                console.log('执行4',inspectionsMap);
1401
                 item.value = inspectionsMap[items[index].id].inspect_value
1402
                 item.value = inspectionsMap[items[index].id].inspect_value
1402
                 item.item_name = inspectionsMap[items[index].id].item_name
1403
                 item.item_name = inspectionsMap[items[index].id].item_name
1403
               }
1404
               }
1405
               // item["inspect_type"] = inspectionsMap[items[index].id].inspect_type
1406
               // item["inspect_type"] = inspectionsMap[items[index].id].inspect_type
1406
               item.value_direction = ''
1407
               item.value_direction = ''
1407
               if (item.range_type == 1) {
1408
               if (item.range_type == 1) {
1409
+                console.log('执行5',parseFloat(item.value));
1408
                 var value = parseFloat(item.value)
1410
                 var value = parseFloat(item.value)
1409
                 var range_min = parseFloat(item.range_min)
1411
                 var range_min = parseFloat(item.range_min)
1410
                 var range_max = parseFloat(item.range_max)
1412
                 var range_max = parseFloat(item.range_max)
1432
                 this.isPic = false
1434
                 this.isPic = false
1433
               }
1435
               }
1434
 
1436
 
1435
-
1436
               console.log("woowwoow",this.isPic)
1437
               console.log("woowwoow",this.isPic)
1437
               console.log("isPicwowowow",this.items)
1438
               console.log("isPicwowowow",this.items)
1438
             }
1439
             }
1443
       setTimeout(() => {
1444
       setTimeout(() => {
1444
         this.itemLoading = false
1445
         this.itemLoading = false
1445
       }, 1000)
1446
       }, 1000)
1446
-    }
1447
+    },
1448
+    getrange(val){
1449
+      if(val !=''){
1450
+        return (val.replace(/[^\d.]/g, ''))*1;
1451
+      }else{
1452
+        return ''
1453
+      }
1454
+
1455
+    },
1447
   },
1456
   },
1448
   created() {
1457
   created() {
1449
     const id = this.$route.query && this.$route.query.id
1458
     const id = this.$route.query && this.$route.query.id