瀏覽代碼

类型获取

luolei 4 年之前
父節點
當前提交
3db2bbfb8d

+ 3 - 0
src/api/knowledgeTree.js

@@ -102,4 +102,7 @@ export default {
   updateRunningStatus(param) {
     return axios.post(urls.updateRunningStatus, param);
   },
+  getTypesList(param) {
+    return axios.post(urls.zskTypeList, param);
+  },
 };

+ 41 - 13
src/components/autoTest/AutoBillCommonTest.vue

@@ -102,48 +102,72 @@
           className="collectTwo"
         >
           <template slot-scope="scope">
-            <div v-html="returnDom(scope.row.baseRules,'ruleBaseLibName')"></div>
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseType')"></div>
           </template>
         </el-table-column>
         <el-table-column
           :resizable="false"
-          prop="ruleBaseLibType"
+          prop="ruleBaseLibTypeName"
           label="基础规则术语类型"
           show-overflow-tooltip
-        ></el-table-column>
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseLibTypeName')"></div>
+          </template>
+        </el-table-column>
         <el-table-column
           :resizable="false"
           prop="ruleBaseLibName"
           label="基础规则医学标准术语"
           show-overflow-tooltip
-        ></el-table-column>
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseLibName')"></div>
+          </template>
+        </el-table-column>
         <el-table-column
           :resizable="false"
           prop="ruleBaseHisName"
           label="基础规则医院术语"
           show-overflow-tooltip
-        ></el-table-column>
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseHisName')"></div>
+          </template>
+        </el-table-column>
         <el-table-column
           :resizable="false"
-          prop="expectedOutput"
+          prop="ruleBaseHisDetailName"
           label="基础规则医院术语细则"
           show-overflow-tooltip
-        ></el-table-column>
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseHisDetailName')"></div>
+          </template>
+        </el-table-column>
         <el-table-column
           :resizable="false"
-          prop="expectedOutput"
+          prop="ruleBaseInputValue"
           label="基础规则输入值"
           show-overflow-tooltip
-        ></el-table-column>
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'ruleBaseInputValue')"></div>
+          </template>
+        </el-table-column>
         <el-table-column
           :resizable="false"
-          prop="expectedOutput"
+          prop="referenceValue"
           label="基础规则参考值"
           show-overflow-tooltip
-        ></el-table-column>
+        >
+          <template slot-scope="scope">
+            <div v-html="returnDom(scope.row.baseRules,'referenceValue')"></div>
+          </template>
+        </el-table-column>
         <el-table-column
           :resizable="false"
-          prop="expectedOutput"
+          prop="output"
           label="实际结果"
           show-overflow-tooltip
         ></el-table-column>
@@ -226,9 +250,13 @@ export default {
   methods: {
     returnDom(list,name){
       let str = ''
+      if(name === 'ruleBaseType'){
+        const params = JSON.parse(localStorage.getItem("getTypesList"));
+        console.log(params)
+      }
       for(let i = 0;i < list.length;i++){
         str += `<p>
-              ${list[i][name]}
+              ${list[i][name]||'no'}
           </p>`
       }
       return str

+ 15 - 0
src/components/autoTest/AutoKnowledgeMapRuleTest.vue

@@ -98,6 +98,7 @@ export default {
   },
   created() {
     this._getHospitalInfoCDSS();
+    this.getTypeList()
     // this._getRunningStatus()   // 进入页面立即确认状态
     this.timer = setInterval(this._getRunningStatus, 20 * 1000);
   },
@@ -114,6 +115,20 @@ export default {
     });
   },
   methods: {
+    getTypeList(){
+        const typeListData = JSON.parse(localStorage.getItem("getTypesList"));
+        if(!typeListData){
+          api.getTypesList({}).then((res) => {
+              if (res.data.code == '0') {
+                  const data = res.data.data;
+                  localStorage.setItem("getTypesList",JSON.stringify(data));
+              }
+          }).catch((error) => {
+              console.log(error);
+          });
+        }
+
+    },
     _getRunningStatus() {
       const { hospitalId } = this;
       if (this.hospitalId === '') return;