Browse Source

合并test

zhouna 4 years ago
parent
commit
1325e450e5

+ 7 - 8
src/components/autoTest/AutoBillCommonTest.vue

@@ -158,7 +158,7 @@
           className="collectTwo"
         >
           <template slot-scope="scope">
-            <div v-html="returnDom(scope.row.baseRules,'ruleBaseInputValue')"></div>
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseInputValue','ruleBaseUnit')"></div>
           </template>
         </el-table-column>
         <el-table-column
@@ -252,7 +252,7 @@ export default {
     this.getDroplistData(params);
   },
   methods: {
-    returnDom(list,name){
+    returnDom(list,name,unit){
       let str = ''
       if(name === 'ruleBaseType'){
         const params = JSON.parse(localStorage.getItem("zskDicts"));
@@ -260,7 +260,7 @@ export default {
           for(let j = 0;j < params.length;j++){
             if(list[i].ruleBaseType == params[j].val){
               // if(params[j].name){
-                str += `<p style="padding:0 10px;border-bottom:${i == list.length-1?'0':'1px solid #EBEEF5'};overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" class="collTxt">
+                str += `<p style="border-bottom:${i == list.length-1?'0':'1px solid #EBEEF5'};overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" class="collTxt">
                       ${params[j].name||'&nbsp;'}
                   </p>`
               // }
@@ -270,8 +270,8 @@ export default {
       }else{
         for(let i = 0;i < list.length;i++){
           // if(list[i][name]){
-            str += `<p style="padding:0 10px;border-bottom:${i == list.length-1?'0':'1px solid #EBEEF5'};overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" class="collTxt">
-                  ${list[i][name]||'&nbsp;'}
+            str += `<p style="border-bottom:${i == list.length-1?'0':'1px solid #EBEEF5'};overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" class="collTxt">
+                  ${list[i][name]?list[i][unit]?(list[i][name]+list[i][unit]):list[i][name]:'&nbsp;'}
               </p>`
           // }
         }
@@ -370,7 +370,7 @@ export default {
               this.$message({ message: '导出成功', type: 'success' });
               utils.downloadExportedData(
                 res.data,
-                `${parm.hospitalName}-开单合理性提醒规则测试结果.xlsx`
+                `${parm.hospitalName}-${this.titleName}测试结果.xls`
               );
             }
           });
@@ -383,7 +383,7 @@ export default {
 
 <style lang="less">
 .collectTwo .cell {
-  padding:0;
+  padding:0 8px;
 }
 </style>
 <style lang="less" scoped>
@@ -406,7 +406,6 @@ export default {
   .cell {
     padding:0 !important;
     .collTxt {
-      padding:0 10px;
       overflow: hidden;
       text-overflow: ellipsis;
       white-space: nowrap;

+ 5 - 47
src/components/autoTest/AutoKnowledgeMapRuleTest.vue

@@ -86,7 +86,7 @@ export default {
       list: [],
       hospitalData: [],
       hospitalId: '', //选中医院
-      runningStatusArr: [0, 0, 0, 0, 0, 0, 0, 0, 0] //知识图谱规则 测试状态
+      runningStatusArr: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] //知识图谱规则 测试状态
     };
   },
   computed: {
@@ -131,7 +131,7 @@ export default {
       if (this.hospitalId === '') return;
       api.getRunningStatusByHospitalId({ hospitalId }).then(res => {
         if (res.data.code === '0' && res.data.data) {
-          this.runningStatusArr = Object.values(res.data.data).slice(0, 9);
+          this.runningStatusArr = Object.values(res.data.data).slice(0, 10);
         }
       });
     },
@@ -179,48 +179,6 @@ export default {
         caseId,
         hospitalId: this.hospitalId
       };
-      // let requestAjax;
-      // let billType; // 开单合理性规则类型  1  通用  2 输血
-      // let criticalType; //危急值测试规则类型(1:检验,2:检查)
-      // let highriskType; //高危测试规则类型(1:药品,2:手术)
-      // let otherType; // 其他提醒测试规则类型(1:化验,2:辅检,3:输血)
-      // if (caseName === '开单合理性提醒_通用规则') {
-      //   billType = 1;
-      //   params = { ...params, billType };
-      //   requestAjax = 'billRuleTest';
-      // } else if (caseName === '开单类型提醒_输血规则') {
-      //   billType = 2;
-      //   params = { ...params, billType };
-      //   requestAjax = 'billRuleTest';
-      // } else if (caseName === '危机值提醒_实验室检查规则') {
-      //   criticalType = 1;
-      //   params = { ...params, criticalType };
-      //   requestAjax = 'criticalRuleTest';
-      // } else if (caseName === '危机值提醒_辅助检查规则') {
-      //   criticalType = 2;
-      //   params = { ...params, criticalType };
-      //   requestAjax = 'criticalRuleTest';
-      // } else if (caseName === '高风险提醒_高危药品规则') {
-      //   highriskType = 1;
-      //   params = { ...params, highriskType };
-      //   requestAjax = 'highRiskRuleTest';
-      // } else if (caseName === '高风险提醒_高危手术规则') {
-      //   highriskType = 2;
-      //   params = { ...params, highriskType };
-      //   requestAjax = 'highRiskRuleTest';
-      // } else if (caseName === '其他提醒_化验规则') {
-      //   otherType = 1;
-      //   params = { ...params, otherType };
-      //   requestAjax = 'otherRuleTest';
-      // } else if (caseName === '其他提醒_输血规则') {
-      //   otherType = 3;
-      //   params = { ...params, otherType };
-      //   requestAjax = 'otherRuleTest';
-      // } else if (caseName === '其他提醒_辅检规则') {
-      //   otherType = 2;
-      //   params = { ...params, otherType };
-      //   requestAjax = 'otherRuleTest';
-      // }
 
       api.autoRuleTest(params).then(res => {
         if (res.data.code === '0' && res.data.data) {
@@ -233,7 +191,7 @@ export default {
           this.$message.error('测试失败');
           this.getDataList(this.hospitalId);
         }
-        this.runningStatusArr = [0, 0, 0, 0, 0, 0, 0, 0, 0];
+        this.runningStatusArr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
       });
     },
     // 所有规则测试
@@ -245,9 +203,9 @@ export default {
         });
         return;
       }
-      this.runningStatusArr = [1, 1, 1, 1, 1, 1, 1, 1, 1];
+      this.runningStatusArr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
       api.allRuleTest({ hospitalId: this.hospitalId }).then(res => {
-        this.runningStatusArr = [0, 0, 0, 0, 0, 0, 0, 0, 0];
+        this.runningStatusArr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
         if (res.data.code === '0' && res.data.data) {
           this.getDataList(this.hospitalId);
           this.$message({