Sfoglia il codice sorgente

11月26 检验检查

yq1 6 mesi fa
parent
commit
040657a9c3
1 ha cambiato i file con 30 aggiunte e 21 eliminazioni
  1. 30 21
      src/xt_pages/user/inspection.vue

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

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