Browse Source

Merge remote-tracking branch 'origin/master' into referMaster

zhouna 3 years ago
parent
commit
46df2fddf3

+ 9 - 0
babel.config.js

@@ -1,5 +1,14 @@
 module.exports = {
   presets: [
     '@vue/app'
+  ],
+  "plugins": [
+	[
+	  "component",
+	  {
+		"libraryName": "umy-ui",
+		"styleLibraryName": "theme-chalk"
+	  }
+	]
   ]
 }

File diff suppressed because it is too large
+ 13821 - 54
package-lock.json


+ 2 - 0
package.json

@@ -8,8 +8,10 @@
     "lint": "vue-cli-service lint"
   },
   "dependencies": {
+    "babel-plugin-component": "^1.1.1",
     "js-md5": "^0.7.3",
     "quill-image-extend-module": "^1.1.2",
+    "umy-ui": "^1.1.6",
     "vue": "^2.5.17",
     "vue-fragment": "^1.5.2",
     "vue-quill-editor": "^3.0.6"

+ 3 - 0
src/api/config.js

@@ -585,6 +585,9 @@ export default {
     'zskActiveRule': '/api/cdssman/klRule/startRuleInfo',//启用规则
     'zskDisableRule': '/api/cdssman/klRule/disableRuleInfo',//禁用规则
     'zskDelRule': '/api/cdssman/klRule/clearRuleInfo',//删除规则
+	
+	'zskgetRulePage': '/api/cdssman/klRule/getRulePage',//查询所有有效的规则
+	'zskgetRuleDetail': '/api/cdssman/klRule/getRuleDetail',//根据录入内容查询有效规则的明细
     'zskRuleDetail': '/api/cdssman/klRule/getByIdRuleInfo',//规则详情
     'zskTypeList': '/api/cdssman/klRulePlan/getMenu',//类型列表
     'zskSearchConcept': '/api/cdssman/klDisease/searchConceptRuleClass',//知识库搜索术语

+ 1 - 1
src/api/index.js

@@ -3,7 +3,7 @@ import config from './config.js';
 
 axios.default.timeout = 500000;
 axios.defaults.headers.post['Content-Type'] = "application/json;charset=utf-8";
- //axios.defaults.baseURL = 'http://192.168.2.236:5050';
+ axios.defaults.baseURL = 'http://192.168.2.241:5050';
 // axios.defaults.baseURL = 'http://192.168.2.241';
 // axios.defaults.baseURL = 'http://192.168.3.117:5050';
 

+ 6 - 0
src/api/knowledgeLib.js

@@ -13,6 +13,12 @@ export default {
     deleteRule(param) {
         return axios.post(urls.zskDelRule, param);
     },
+	zskgetRulePage(param) {
+	    return axios.post(urls.zskgetRulePage, param);
+	},
+	zskgetRuleDetail(param) {
+	    return axios.post(urls.zskgetRuleDetail, param);
+	},
     deleteRuleApply(param) {
         return axios.post(urls.zskDisableRule, param);
     },

+ 0 - 8
src/components/cdssManage/MedicalTerm.vue

@@ -54,14 +54,6 @@
             >{{scope.row.drugNum}}</span>
           </template>
         </el-table-column>
-        <el-table-column :resizable="false" prop="anesthesiaNum" label="麻醉关联">
-          <template slot-scope="scope">
-            <span
-              class="relation"
-              @click="goRelationPage('Hemp',scope.row)"
-            >{{scope.row.anesthesiaNum}}</span>
-          </template>
-        </el-table-column>
         <el-table-column :resizable="false" prop="scaleNum" label="量表关联">
           <template slot-scope="scope">
             <span

+ 1 - 1
src/components/cdssManage/hemp/Hemp.vue

@@ -229,7 +229,7 @@ export default {
       e.preventDefault();
       let formData = new FormData();
       formData.append('file', fileInfo);
-      formData.append('type', 5);
+      formData.append('type', 14);
       const header = {
         headers: {
           'Content-Type': 'multipart/form-data'

+ 67 - 27
src/components/knowledgeExtra/AddNewRule.vue

@@ -74,7 +74,11 @@
 </style>
 <template>
   <div>
-    <crumbs :title="title" :param="$route.params" linkTo="ZskRuleManager"></crumbs>
+    <crumbs
+      :title="title"
+      :param="$route.params"
+      linkTo="ZskRuleManager"
+    ></crumbs>
     <div id="AddRuleContent">
       <el-form size="mini" :model="form" ref="ruleForm">
         <div class="table_form">
@@ -86,7 +90,10 @@
               :rules="rules.parDescription"
               prop="parDescription"
             >
-              <el-input style="width: 100%" v-model.trim="form.parDescription" />
+              <el-input
+                style="width: 100%"
+                v-model.trim="form.parDescription"
+              />
             </el-form-item>
           </div>
 
@@ -98,7 +105,11 @@
               :rules="rules.parRuleType"
               prop="parRuleType"
             >
-              <el-select v-model="form.parRuleType" placeholder="请选择" @change="ruleTypeChange">
+              <el-select
+                v-model="form.parRuleType"
+                placeholder="请选择"
+                @change="ruleTypeChange"
+              >
                 <el-option
                   v-for="item in ruleTypeList"
                   :key="item.id"
@@ -119,7 +130,9 @@
                   </el-tooltip>
                 </div>
               </template>
-              <div class="tip_text">注:更改规则类型,将会清空已填写的规则内容~</div>
+              <div class="tip_text">
+                注:更改规则类型,将会清空已填写的规则内容~
+              </div>
             </el-form-item>
           </div>
           <div class="table_cell">
@@ -143,7 +156,11 @@
                   </el-tooltip>
                 </div>
               </template>
-              <el-select v-model="form.parLenCode" placeholder="请选择" @change="ruleTermChange">
+              <el-select
+                v-model="form.parLenCode"
+                placeholder="请选择"
+                @change="ruleTermChange"
+              >
                 <el-option
                   v-for="item in ruleTermTypeList"
                   :key="item.id"
@@ -151,7 +168,9 @@
                   :value="item.code"
                 ></el-option>
               </el-select>
-              <div class="tip_text">注:更改规则术语类型,将会清空已填写的规则内容~</div>
+              <div class="tip_text">
+                注:更改规则术语类型,将会清空已填写的规则内容~
+              </div>
             </el-form-item>
           </div>
           <div class="table_cell">
@@ -180,14 +199,22 @@
               </el-select>
             </el-form-item>
           </div>
-          <div class="table_cell" v-if="showHasSub" style="max-width: 25%">
+          <div
+            class="table_cell"
+            v-if="showHasSub && isShow"
+            style="max-width: 25%"
+          >
             <el-form-item
               label-width="130px"
               label="有无子条件:"
               :rules="rules.parHasSub"
               prop="parHasSub"
             >
-              <el-select v-model="form.parHasSub" placeholder="请选择" @change="hasSubChange">
+              <el-select
+                v-model="form.parHasSub"
+                placeholder="请选择"
+                @change="hasSubChange"
+              >
                 <el-option label="有" :value="1"></el-option>
                 <el-option label="无" :value="0"></el-option>
               </el-select>
@@ -238,7 +265,12 @@
         />
         <el-form-item>
           <div class="form_btn">
-            <el-button type="primary" size="medium " @click="submitForm('ruleForm')">确定</el-button>
+            <el-button
+              type="primary"
+              size="medium "
+              @click="submitForm('ruleForm')"
+              >确定</el-button
+            >
           </div>
         </el-form-item>
       </el-form>
@@ -275,6 +307,7 @@ export default {
         parLenCode: "",
         klRuleByIdSub: [],
       },
+      isShow: false,
       rules: formRules,
       dragVal: null,
       dragArr: null,
@@ -310,6 +343,7 @@ export default {
       const obj = await this.ruleTermTypeList.find(
         (it1) => it1.code == this.form.parLenCode
       );
+      console.log(obj);
       this.baseTypeList = obj.subMenuList;
       this.subRuleMaxNum = obj.number;
 
@@ -409,7 +443,7 @@ export default {
               const dragArr = list[0].remark.split("|")[1].split(",");
               this.dragArr = dragArr;
               this.dragVal = item.subLenCode;
-              item.dragArr = dragArr
+              item.dragArr = dragArr;
               //取出互斥项
               const screenArr = obj.subMenuList.filter((item) =>
                 dragArr.some(
@@ -524,6 +558,7 @@ export default {
       this.baseTypeList = obj.subMenuList;
       this.subRuleMaxNum = obj.number;
       this.form.parHasSub = obj.subMenuList.length ? 1 : 0;
+      this.isShow = obj.subMenuList.length ? 1 : 0;
       this.setInitGroupData();
     },
     // 医学标准术语
@@ -679,9 +714,9 @@ export default {
         }
         if (arr.length == 3 && key != 0 && type) {
           //获取互斥项code
-          const val = key==1?arr[2].subLenCode:arr[1].subLenCode
+          const val = key == 1 ? arr[2].subLenCode : arr[1].subLenCode;
           const list = obj.subMenuList.filter((it) => {
-            return it.code ==val && it.remark.split("|")[0] == 3;
+            return it.code == val && it.remark.split("|")[0] == 3;
           });
           console.log(obj.subMenuList);
           const dragArr = list[0].remark.split("|")[1].split(",");
@@ -740,7 +775,7 @@ export default {
       this.$set(
         this.form.klRuleByIdSub[index],
         "baseTermTypeList",
-        (isDel && val == 1) || dragType ? screenArr : obj.subMenuList
+        (isDel && val == 2) || dragType ? screenArr : obj.subMenuList
       );
       this.$set(this.form.klRuleByIdSub[index], "subLenCode", "");
       this.$set(this.form.klRuleByIdSub[index], "dataType", "");
@@ -821,14 +856,16 @@ export default {
               }
             });
           });
-          if (len.length == 3 && (key == 1 || key == 0) && key==0?len[2].subLenCode:len[1].subLenCode) {
-            const dragVal = key==0?len[2].subLenCode:len[1].subLenCode
-            this.dragVal =dragVal;
+          if (
+            len.length == 3 && (key == 1 || key == 0) && key == 0
+              ? len[2].subLenCode
+              : len[1].subLenCode
+          ) {
+            const dragVal = key == 0 ? len[2].subLenCode : len[1].subLenCode;
+            this.dragVal = dragVal;
             const subobj = this.baseTypeList.find((it) => it.type == 1);
             const list = subobj.subMenuList.filter((it) => {
-              return (
-                it.code == dragVal && it.remark.split("|")[0] == 3
-              );
+              return it.code == dragVal && it.remark.split("|")[0] == 3;
             });
             // //获取互斥项code
             const dragArr = list[0].remark.split("|")[1].split(",");
@@ -953,7 +990,7 @@ export default {
             });
             len[1].baseTermTypeList = screenArr;
           }
-          
+
           this.dragVal = len[1].subLenCode;
         }
       } else {
@@ -1183,17 +1220,17 @@ export default {
     },
   },
   computed: {
-    disable: function() {
+    disable: function () {
       return Object.keys(this.firstPlace || {}).length > 0;
     },
-    ruleTermCodeStr: function() {
+    ruleTermCodeStr: function () {
       const str = this.form.parRuleType + "-" + this.form.parLenCode + "-" + 1;
       if (str.length <= 1) {
         return "";
       }
       return str;
     },
-    ruleTermCodeStr2: function() {
+    ruleTermCodeStr2: function () {
       const str = this.form.parRuleType + "-" + this.form.parLenCode + "-" + 0;
       if (str.length <= 1) {
         return "";
@@ -1201,32 +1238,35 @@ export default {
 
       return str;
     },
-    ruleTermCodeStrs: function() {
+    ruleTermCodeStrs: function () {
       const str = this.form.parRuleType + "-" + this.form.parLenCode;
       if (str.length <= 1) {
         return "";
       }
       return str;
     },
-    showMsg: function() {
+    showMsg: function () {
       return (
         this.ruleTermCodeStr.length > 2 &&
         this.msgDict.indexOf(this.ruleTermCodeStr) > -1
       );
     },
-    showMsg2: function() {
+    showMsg2: function () {
       return (
         this.ruleTermCodeStr2.length > 2 &&
         this.msgDict.indexOf(this.ruleTermCodeStr2) > -1
       );
     },
     showHasSub() {
+      console.log(this.ruleTermCodeStrs);
+      console.log(this.subDict);
       if (this.ruleTermCodeStrs.length > 2) {
+        console.log(this.subDict.indexOf(this.ruleTermCodeStrs) != -1);
         return this.subDict.indexOf(this.ruleTermCodeStrs) != -1;
       }
       return false;
     },
-    checkFirstPlace: function() {
+    checkFirstPlace: function () {
       return this.dict.indexOf(this.ruleTermCodeStrs) > -1;
     },
   },

+ 242 - 0
src/components/knowledgeExtra/DiagCheckRule.vue

@@ -0,0 +1,242 @@
+<template>
+  <div>
+    <div style="margin: 10px 0">
+      <span v-if="description" class="span1"
+        ><i>规则名称:</i>{{ description }}</span
+      >
+      <span class="span1"><i>规则类型:</i>{{ row.ruleTypeName || "-" }}</span>
+      <span class="span1"
+        ><i>规则术语类型:</i>{{ row.libTypeName || "-" }}</span
+      >
+      <span class="span1"><i>医学标准术语:</i>{{ row.libName || "-" }}</span>
+      <span v-if="baseTermTypeName" class="span1"
+        ><i>基础规则术语类型:</i>{{ baseTermTypeName }}</span
+      >
+      <span v-if="baseLibName" class="span1"
+        ><i>基础医学标准术语:</i>{{ baseLibName }}</span
+      >
+      <!--<el-form :inline="true" style="margin-top: 10px;height: 45px;">
+				<el-form-item label="基础规则术语类型:">
+					<el-select v-model="filter.baseLibType" clearable placeholder="请选择" size="mini">
+						<el-option v-for="item in baseTermTypeList2" :key="item.val" :label="item.name"
+							:value="item.val">
+						</el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="基础医学标准术语:">
+					<el-input size="mini" v-model="filter.baseLibName" placeholder="请输入" clearable></el-input>
+				</el-form-item>
+				<el-form-item>
+					<el-button size="mini" @click="getRuleDetail">确认</el-button>
+				</el-form-item>
+			</el-form>-->
+    </div>
+    <el-main>
+      <ux-grid
+        ref="plxTable"
+        :merge-cells="tdSpanArr"
+        show-overflow
+        style="width: 100%"
+        height="600px"
+      >
+        <ux-table-column
+          field="id"
+          :title="'组(共' + total + '组)'"
+          width="120"
+        ></ux-table-column>
+        <ux-table-column field="description" title="规则名称"></ux-table-column>
+        <ux-table-column field="hasSubCond" title="子条件">
+          <template slot-scope="scope">
+            {{ scope.row.hasSubCond ? "有" : "无" }}
+          </template>
+        </ux-table-column>
+        <ux-table-column
+          field="msg"
+          title="附加信息"
+          show-overflow-tooltip
+        ></ux-table-column>
+        <ux-table-column field="baseType" title="基础规则类型">
+          <template slot-scope="scope">
+            {{ transDataMap(baseTypeList)[scope.row.baseType] }}
+          </template>
+        </ux-table-column>
+        <ux-table-column prop="baseLibType" title="基础规则术语类型">
+          <template slot-scope="scope">
+            {{ transDataMap(baseTermTypeList)[scope.row.baseLibType] }}
+          </template>
+        </ux-table-column>
+        <ux-table-column
+          field="baseLibName"
+          title="基础医学标准术语"
+        ></ux-table-column>
+        <ux-table-column
+          field="baseMinOperator"
+          title="最小域比较符"
+          width="80"
+        ></ux-table-column>
+        <ux-table-column
+          field="baseMinValue"
+          title="最小域值"
+          width="80"
+        ></ux-table-column>
+        <ux-table-column
+          field="baseMinUnit"
+          title="最小域单位"
+          width="80"
+        ></ux-table-column>
+        <ux-table-column
+          field="baseMaxOperator"
+          title="最大域比较符"
+          width="80"
+        ></ux-table-column>
+        <ux-table-column
+          field="baseMaxValue"
+          title="最大域值"
+          width="80"
+        ></ux-table-column>
+        <ux-table-column
+          field="baseMaxUnit"
+          title="最大域单位"
+          width="80"
+        ></ux-table-column>
+        <ux-table-column
+          field="baseEqValue"
+          title="等于阈值"
+          width="80"
+        ></ux-table-column>
+        <ux-table-column
+          field="baseEqUnit"
+          title="等于域单位"
+          width="80"
+        ></ux-table-column>
+      </ux-grid>
+    </el-main>
+  </div>
+</template>
+
+<script>
+import api from "@api/knowledgeLib.js";
+export default {
+  name: "CheckRule",
+  data: function () {
+    return {
+      tdSpanArr: this.mergeCells,
+      pos: 0,
+      filter: {
+        baseLibType: "",
+        baseLibName: "",
+      },
+      baseTermTypeList2: [],
+      total: this.ruleTeamNum,
+    };
+  },
+  computed: {
+    baseTermTypeName() {
+      const item = this.baseTermTypeList.filter((it) => {
+        return it.val === this.filterp.baseLibType;
+      });
+      return item[0] ? item[0].name : "";
+    },
+  },
+  created() {
+    this.baseTermTypeList2 = this.baseTermTypeList;
+    this.filter.baseLibName = this.baseLibName;
+    this.filter.baseLibType = this.baseLibType;
+  },
+  mounted() {
+    this.$refs.plxTable.reloadData(this.rulelist);
+    //this.loading.close();
+  },
+  props: [
+    "loading",
+    "mergeCells",
+    "filterp",
+    "rulelist",
+    "ruleTeamNum",
+    "baseTypeList",
+    "baseTermTypeList",
+    "row",
+    "description",
+    "baseLibType",
+    "baseLibName",
+  ],
+  methods: {
+    transDataMap(data) {
+      const obj = {};
+      data.map((it) => {
+        obj[it.val] = it.name;
+      });
+      return obj;
+    },
+    getRuleDetail() {
+      const param = {
+        baseLibName: this.filter.baseLibName,
+        baseLibType: this.filter.baseLibType,
+        description: this.description,
+        libName: this.row.libName,
+        libType: this.row.libType,
+        ruleType: this.row.ruleType,
+      };
+      api
+        .zskgetRuleDetail(param)
+        .then((res) => {
+          if (res.data.code == "0") {
+            let datalist = [];
+            const data = res.data.data.ruleConditionDTOList;
+            this.total = data.length;
+            let mergeArr = [];
+            for (let i in data) {
+              let datai = data[i];
+              const dtoList = datai.ruleBaseDTOList;
+              for (let j = 0; j < dtoList.length; j++) {
+                const isFirst = j === 0;
+                if (isFirst) {
+                  const len = datalist.length;
+                  mergeArr.push(
+                    { row: len, col: 0, rowspan: dtoList.length, colspan: 1 },
+                    { row: len, col: 1, rowspan: dtoList.length, colspan: 1 },
+                    { row: len, col: 2, rowspan: dtoList.length, colspan: 1 }
+                  );
+                }
+                datalist.push({
+                  id: +i + 1,
+                  rowspan: isFirst ? dtoList.length : 0,
+                  colspan: isFirst ? 1 : 0,
+                  ruleGroup: datai.ruleGroup,
+                  msg: datai.msg,
+                  description: datai.description,
+                  ...dtoList[j],
+                });
+              }
+            }
+            this.tdSpanArr = mergeArr;
+            this.$refs.plxTable.reloadData(datalist);
+          } else {
+            this.$message(res.data.msg || "获取详情失败,请稍后重试");
+          }
+        })
+        .catch((error) => {
+          this.$message(error.msg || "接口出错");
+        });
+    },
+  },
+};
+</script>
+
+<style scoped lang="less">
+/deep/.el-table .cell {
+  line-height: 25px;
+}
+
+.span1 {
+  i {
+    font-weight: bolder;
+  }
+  margin: 0 60px 0 0;
+}
+
+/deep/.el-form--inline .el-form-item__label {
+  font-weight: bolder;
+  font-size: 14px;
+}
+</style>

+ 462 - 0
src/components/knowledgeExtra/RuleCheck.vue

@@ -0,0 +1,462 @@
+<template>
+  <div>
+    <crumbs title="规则查询" :minWidth="titleWidth" class="knowledgeTitle">
+      <el-form :inline="true" class="demo-form-inline">
+        <el-form-item label="规则名称:">
+          <el-input
+            size="mini"
+            v-model.trim="filter.description"
+            placeholder="请输入"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="规则类型:">
+          <el-select
+            v-model="filter.ruleType"
+            clearable
+            placeholder="请选择"
+            size="mini"
+          >
+            <el-option
+              v-for="item in ruleTypeList"
+              :key="item.val"
+              :label="item.name"
+              :value="item.val"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="规则术语类型:">
+          <el-select
+            v-model="filter.libType"
+            clearable
+            placeholder="请选择"
+            size="mini"
+          >
+            <el-option
+              v-for="item in ruleTermTypeList"
+              :key="item.val"
+              :label="item.name"
+              :value="item.val"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="医学标准术语:">
+          <el-input
+            size="mini"
+            v-model.trim="filter.libName"
+            placeholder="请输入"
+            clearable
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <el-form class="secLine" :inline="true">
+        <el-form-item label="基础规则术语类型:">
+          <el-select
+            v-model="filter.baseLibType"
+            clearable
+            placeholder="请选择"
+            size="mini"
+          >
+            <el-option
+              v-for="item in baseTermTypeList"
+              :key="item.val"
+              :label="item.name"
+              :value="item.val"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="基础医学标准术语:">
+          <el-input
+            size="mini"
+            v-model.trim="filter.baseLibName"
+            placeholder="请输入"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button size="mini" @click="filterDatas">确认</el-button>
+        </el-form-item>
+      </el-form>
+    </crumbs>
+    <div class="contents knowledgeContents">
+      <el-table :data="list" border style="width: 100%">
+        <el-table-column
+          type="index"
+          :index="indexMethod"
+          label="编号"
+          width="120"
+        ></el-table-column>
+        <el-table-column prop="ruleTypeName" label="规则类型" width="240">
+        </el-table-column>
+        <el-table-column
+          prop="libTypeName"
+          label="规则术语类型"
+        ></el-table-column>
+        <el-table-column prop="libName" label="医学标准术语"> </el-table-column>
+        <el-table-column label="操作" width="120" fixed="right">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="checkData(scope.row)"
+              >查看</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        :current-page.sync="currentPage"
+        @current-change="currentChange"
+        background
+        :page-size="pageSize"
+        :page-sizes="pageSizeArr"
+        @size-change="handleSizeChange"
+        :layout="pageLayout"
+        :total="total"
+      ></el-pagination>
+    </div>
+    <el-dialog
+      title="查看"
+      :visible.sync="dialogVisible"
+      :before-close="closecheckDialog"
+      width="80rem"
+      v-if="dialogVisible"
+      :close-on-click-modal="false"
+      :fullscreen="true"
+    >
+      <CheckRule
+        :mergeCells="mergeCells"
+        :rulelist="rulelist"
+        :ruleTeamNum="ruleTeamNum"
+        :baseTypeList="baseTypeList"
+        :baseTermTypeList="baseTermTypeList"
+        :row="row"
+        :filterp="filter"
+        :description="filter.description"
+        :baseLibType="filter.baseLibType"
+        :baseLibName="filter.baseLibName"
+      >
+      </CheckRule>
+      <div style="text-align: center">
+        <el-button @click="closecheckDialog" style="width: 180px"
+          >关闭</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import api from "@api/knowledgeLib.js";
+import config from "@api/config.js";
+import utils from "@api/utils.js";
+import CheckRule from "./DiagCheckRule.vue";
+
+export default {
+  name: "ZskRuleCheck",
+  data: function () {
+    return {
+      list: [],
+      searched: false,
+      filter: {
+        // 	parStatus: '',
+        // 	parDescription: '',
+        // 	parConceptName: '',
+        // 	parRuleType: '',
+        description: "", //规则名称
+        ruleType: "", //规则类型
+        libType: "", //规则术语类型
+        libName: "", //医学标准术语
+        baseLibType: "", //基础规则术语类型
+        baseLibName: "", //基础医学标准术语
+      },
+      ruleTeamNum: 0, //规则组个数
+      ruleTypeList: [], //规则类型列表  1
+      ruleTermTypeList: [], //规则术语类型列表  2
+      conceptList: [], //医学标准术语列表 3
+      baseTypeList: [], //基础规则类型列表  4
+      baseTermTypeList: [], //基础规则术语类型列表 5
+      rulelist: [], //查看
+      cacheData: {},
+      currentPage: 1,
+      pageSize: config.pageSize,
+      pageSizeArr: config.pageSizeArr,
+      pageLayout: config.pageLayout,
+      total: 0,
+      titleWidth: "970px", //头部最小宽度
+      dialogVisible: false,
+      row: {},
+      loading: null, //loading对象,
+      mergeCells: [], //单元格合并规则
+    };
+  },
+  components: {
+    CheckRule,
+  },
+  created() {
+    const that = this;
+    this.getDict();
+    //返回时避免参数未赋值就获取列表
+    setTimeout(function () {
+      that.getDataList();
+    });
+  },
+  watch: {
+    filter: {
+      handler: function () {
+        this.searched = false;
+      },
+      deep: true,
+    },
+  },
+  // beforeRouteEnter(to, from, next) {
+  //     next(vm => {
+  //         //const pm = to.param;
+  //         Object.assign(vm, to.params);
+  //         vm.inCurrentPage=to.params.currentPage;
+  //     })
+  // },
+  methods: {
+    getDict() {
+      api
+        .zskgetDict()
+        .then((res) => {
+          if (res.data.code == "0") {
+            const data = res.data.data;
+            this.ruleTypeList = data[-101];
+            this.ruleTermTypeList = data[-102];
+            this.baseTypeList = data[-103];
+            this.baseTermTypeList = data[-104];
+          }
+        })
+        .catch((error) => {
+          console.log(error);
+        });
+    },
+    statusTrans(type) {
+      const obj = this.ruleTypeList.find((it) => it.type === type);
+      return obj && obj.name;
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = utils.getCurrentPage(
+        this.currentPage,
+        this.total,
+        this.pageSize
+      );
+      this.getDataList();
+    },
+    filterDatas() {
+      this.currentPage = 1;
+      this.getDataList(1);
+    },
+    getDataList(flag, isTurnPage) {
+      const params = this.getFilterItems(isTurnPage);
+      this.searched = true;
+      api
+        .zskgetRulePage(params)
+        .then((res) => {
+          if (res.data.code == "0") {
+            const data = res.data.data;
+            this.list = data.records;
+            if (!flag) {
+              //搜索时不缓存
+              this.cacheData[params.current] = data.records;
+            } else {
+              this.cacheData = {};
+            }
+            this.total = data.total;
+            if (this.inCurrentPage !== undefined) {
+              this.currentPage = this.inCurrentPage;
+              this.inCurrentPage = undefined;
+            }
+          } else {
+            this.warning(res.data.msg || "获取列表数据失败");
+          }
+        })
+        .catch((error) => {
+          loading.close();
+          console.log(error);
+        });
+    },
+    getFilterItems(isTurnPage) {
+      //翻页时筛选条件没点确定则清空
+      if (isTurnPage && !this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        current: this.inCurrentPage || this.currentPage,
+        size: this.pageSize,
+        libName: this.filter.libName.trim(),
+        libType: this.filter.libType,
+        ruleType: this.filter.ruleType,
+        baseLibName: this.filter.baseLibName.trim(),
+        baseLibType: this.filter.baseLibType,
+        description: this.filter.description.trim(),
+      };
+      return param;
+    },
+    indexMethod(index) {
+      return (this.currentPage - 1) * this.pageSize + index + 1;
+    },
+    currentChange(next) {
+      this.currentPage = next;
+      /*if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
+				            this.list = this.cacheData[next];
+				          } else {*/
+      this.getDataList(1, true);
+      //}
+    },
+    warning(msg, type) {
+      this.$message({
+        showClose: true,
+        message: msg,
+        type: type || "warning",
+      });
+    },
+    checkData(row) {
+      this.row = row;
+      if (!this.searched) {
+        this.clearFilter();
+      }
+      const param = {
+        baseLibName: this.filter.baseLibName,
+        baseLibType: this.filter.baseLibType,
+        description: this.filter.description,
+        libName: row.libName,
+        libType: row.libType,
+        ruleType: row.ruleType,
+      };
+      const loading = this.$loading({
+        lock: true,
+        text: "Loading",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)",
+      });
+      api
+        .zskgetRuleDetail(param)
+        .then((res) => {
+          loading.close();
+          if (res.data.code == "0") {
+            this.dialogVisible = true;
+            let datalist = [];
+            const data = res.data.data.ruleConditionDTOList;
+            this.ruleTeamNum = data.length;
+            let mergeArr = [];
+            for (let i in data) {
+              let datai = data[i];
+              const dtoList = datai.ruleBaseDTOList;
+              for (let j = 0; j < dtoList.length; j++) {
+                const isFirst = j === 0;
+                if (isFirst) {
+                  const len = datalist.length;
+                  mergeArr.push(
+                    { row: len, col: 0, rowspan: dtoList.length, colspan: 1 },
+                    { row: len, col: 1, rowspan: dtoList.length, colspan: 1 },
+                    { row: len, col: 2, rowspan: dtoList.length, colspan: 1 },
+                    { row: len, col: 3, rowspan: dtoList.length, colspan: 1 }
+                  );
+                }
+                datalist.push({
+                  id: +i + 1,
+                  rowspan: isFirst ? dtoList.length : 0,
+                  colspan: isFirst ? 1 : 0,
+                  ruleGroup: datai.ruleGroup,
+                  hasSubCond: datai.hasSubCond,
+                  msg: datai.msg,
+                  description: datai.description,
+                  ...dtoList[j],
+                });
+              }
+            }
+            this.rulelist = datalist;
+            this.mergeCells = mergeArr;
+          } else {
+            this.$message(res.data.msg || "获取详情失败,请稍后重试");
+          }
+        })
+        .catch((error) => {
+          console.log(error);
+        });
+    },
+    closecheckDialog() {
+      this.dialogVisible = false;
+    },
+    clearFilter() {
+      this.filter = {
+        description: "",
+        ruleType: "",
+        libType: "",
+        libName: "",
+        baseLibType: "",
+        baseLibName: "",
+      };
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@import "../../less/admin.less";
+
+/deep/ .container.knowledgeTitle {
+  height: 80px;
+}
+
+/deep/ .contents.knowledgeContents {
+  padding: 104px 20px 0;
+}
+
+/deep/ .secLine.el-form {
+  float: right;
+  display: block;
+  position: relative;
+  top: -5px;
+}
+
+.delete {
+  color: red;
+}
+
+.review {
+  color: #22ccc8;
+}
+
+#upFile {
+  display: none !important;
+}
+
+.unvailable {
+  color: #fe7d3d;
+
+  &:hover {
+    color: #f19061;
+  }
+}
+
+/deep/.el-dialog__body {
+  padding-top: 0px;
+}
+/deep/.el-dialog__title {
+  color: #333333;
+  font-weight: bold;
+  font-size: 16px;
+}
+/deep/.el-dialog__header {
+  border-left: 4px #48c5d7 solid;
+}
+/deep/.elx-header--column.col--ellipsis > .elx-cell .elx-cell--title {
+  overflow: unset;
+  text-overflow: unset;
+  white-space: break-spaces;
+  text-align: center;
+}
+/deep/.elx-table
+  .elx-body--column.col--ellipsis:not(.col--actived)
+  > .elx-cell {
+  text-align: center;
+}
+/deep/.elx-table .elx-body--row.row--current {
+  background-color: unset;
+}
+</style>

+ 4 - 2
src/less/common.less

@@ -198,8 +198,6 @@
 .activeBgcF5 {
   background-color: #f5f5f5;
 }
-
-
 .btmFix {
   position: fixed;
   width: 100%;
@@ -207,4 +205,8 @@
   left: 280px;
   bottom: 0;
   background-color: #dee2ea;
+}
+/***规则查询查看弹窗表格tooltip***/
+.elx-table--tooltip-wrapper{
+  z-index: 9999!important;
 }

+ 5 - 0
src/main.js

@@ -3,6 +3,7 @@ import Vue from 'vue'
 import App from './App.vue'
 import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
+import { UTable, UTableColumn,UxGrid,UxTableColumn} from 'umy-ui';
 import VueRouter from 'vue-router';
 import routes from './routes.js';
 import axios from 'axios'
@@ -16,6 +17,10 @@ Vue.prototype.qs = qs;
 
 Vue.use(VueRouter);
 Vue.use(ElementUI);
+Vue.use(UTableColumn);
+Vue.use(UTable);
+Vue.use(UxGrid);
+Vue.use(UxTableColumn);
 
 const router = new VueRouter({
   routes

+ 6 - 0
src/routes.js

@@ -216,6 +216,7 @@ import AddTerm from '@components/basicKnow/AddTerm.vue'   //知识库基础维
 import StaticInfo from '@components/knowledgeExtra/StaticInfo.vue'   //知识库扩展维护-静态信息维护
 import AddDevKnow from '@components/knowledgeExtra/AddDevKnow.vue'   //知识库扩展维护-静态信息维护-编辑
 import ZskRuleManager from '@components/knowledgeExtra/RuleManager.vue';  //知识库规则维护
+import ZskRuleCheck from '@components/knowledgeExtra/RuleCheck.vue';  //知识库规则查询
 import AddZskRule from '@components/knowledgeExtra/AddNewRule.vue';   //知识库添加规则
 import KnowledgeAll from '@components/knowledgeExtra/KnowledgeAll.vue'   //知识库树
 import KnowledgeBaseType from '@components/knowledgeExtra/KnowledgeBaseType.vue'
@@ -625,6 +626,11 @@ export default [
                 component: ZskRuleManager,
                 name: 'ZskRuleManager',
             },
+			{
+			    path: 'LT-ZSKKZWH-GZCX',
+			    component: ZskRuleCheck,
+			    name: 'ZskRuleCheck',
+			},
             {
                 path: 'LT-ZSKKZWH-TJGZ',
                 component: AddZskRule,

File diff suppressed because it is too large
+ 7773 - 8394
yarn.lock