Browse Source

Merge branch 'test' into byll

luolei 4 years ago
parent
commit
c1e9a4cf0f

+ 2 - 0
src/api/config.js

@@ -549,6 +549,7 @@ export default {
     'diseaseDelete':'/api/cdssman/klDisease/delete',
     'getBaseDetail':'/api/cdssman/klDisease/getDetail',
     'searchConcept':'/api/cdssman/klDisease/searchConcept',
+    'findDisName':'/api/cdssman/klDisease/findDisName',
     'diseaseBaseSave':'/api/cdssman/klDisease/save',
     //静态知识术语
     'staticBaseKnowledge':'/api/cdssman/kl/conceptInfo/getPage',
@@ -563,6 +564,7 @@ export default {
     'getResultRulePage':'/api/cdssman/test/rule/getResultRulePage',
     'ruleExportExcel':'/api/cdssman/test/rule/ruleExportExcel',
     'autoRuleTest':'/api/cdssman/test/rule/ruleTest',
+    'clearDrug':'/api/cdssman/cache/clearDrug',
   },
   menuIconList: { //菜单对应图标
     'YH-KZT': 'el-icon-menu',

+ 6 - 0
src/api/knowledgeTree.js

@@ -120,4 +120,10 @@ export default {
   zskgetDict(param) {
     return axios.post(urls.zskgetDict, param);
   },
+  clearDrug(param) {//清除药品缓存
+    return axios.post(urls.clearDrug, param);
+  },
+  findDisName(param) {
+    return axios.post(urls.findDisName, param);
+  },
 };

+ 31 - 18
src/components/basicKnow/AddTerm.vue

@@ -248,9 +248,9 @@
             </el-form-item>
             <el-form-item
               v-if="data.type=='实验室检查子项目'" label="最大值与最小值:" class="ages">
-              <el-input v-model.number="minValue" type="number" @input="inputAge"></el-input>
+              <el-input v-model.trim="minValue" type="number" @input="inputAge"></el-input>
               <span class="ageLine">~</span>
-              <el-input v-model.number="maxValue" type="number" @input="inputAge"></el-input>
+              <el-input v-model.trim="maxValue" type="number" @input="inputAge"></el-input>
             </el-form-item>
             <el-form-item v-if="data.type=='实验室检查子项目'" label="范围:" class="range">
               <el-select v-model="rangeSelect">
@@ -764,7 +764,7 @@ export default {
     // 保存基础术语
     comfirn(flg) {
       if (!this.data.name) {
-        this.warning('请输入标准词');
+        this.warning('请输入医学标准术语名称');
         return;
       }
       if (!this.data.code && !this.unfit && !this.data.type) {
@@ -795,10 +795,20 @@ export default {
           this.warning('年龄必须是0-200');
           return;
         }
-        if(this.minValue >= this.maxValue&&this.data.type=='实验室检查子项目'){
-          this.warning('最小值小于最大值');
+        if(this.minAge >= this.maxAge){
+          this.warning('年龄最小值应该小于最大值');
           return;
         }
+        if(this.data.type=='实验室检查子项目'){
+          if(this.minValue<0||this.minValue>99999||this.maxValue<0||this.maxValue>99999){
+            this.warning('取值范围必须是0-99999');
+            return;
+          }
+          if(this.minValue&&this.maxValue&&this.minValue >= this.maxValue){
+            this.warning('最小值应该小于最大值');
+            return;
+          }
+        }
       }
       // 过滤同义词空数据
       let realData = [];
@@ -827,7 +837,10 @@ export default {
       for (let i = 0; i < realData.length; i++) {
         let obj = {}
         realData[i].synonymName = realData[i].name;
-        realData[i].typeId = this.data.typeId||this.data.code;
+        realData[i].typeId = undefined;
+        realData[i].conceptId = undefined;
+        realData[i].status = undefined;
+        realData[i].libType = this.data.code||this.data.typeId;
 
         // obj.isConcept=realData[i].isConcept
         // obj.remark=realData[i].remark
@@ -884,14 +897,14 @@ export default {
           // typeId:this.data.typeId,
           synonymName: this.data.synonymName,
           isHasCommon: 1,
-          libId: this.data.libId,
-          klConceptSub:detailList,
+          libId: this.copy ? '' :this.data.libId,
+          klConceptSub:detailList||[],
           sexType:sexCode,
           scopeType:this.rangeSelect == '外'?'1':'0',
           maxAge:this.maxAge,
           minAge:this.minAge,
-          maxVal:this.maxValue,
-          minVal:this.minValue,
+          maxVal:this.maxValue||null,
+          minVal:this.minValue||null,
           icdCode:this.icdCode||undefined
         }
       }else{
@@ -904,17 +917,17 @@ export default {
           status: this.data.status||1,
           libType: this.data.typeId||this.data.code,
           // typeId:this.data.typeId||this.data.code,
-          libId: this.data.libId,
-          sexType:sexCode,
-          maxAge:this.maxAge,
-          minAge:this.minAge,
-          maxVal:this.maxValue,
-          minVal:this.minValue,
-          icdCode: this.icdCode||undefined,
-          scopeType:this.rangeSelect == '外'?1:0,
+          libId: this.copy ? '' :this.data.libId,
           isHasCommon: this.data.isHasCommon||0,
           synonymName: '',
           klConceptSub: detailList||[],
+          sexType:sexCode,
+          scopeType:this.rangeSelect == '外'?1:0,
+          maxAge:this.maxAge,
+          minAge:this.minAge,
+          maxVal:this.maxValue||null,
+          minVal:this.minValue||null,
+          icdCode: this.icdCode||undefined
         };
       }
       // return false

+ 4 - 4
src/components/basicKnow/BasicRelationship.vue

@@ -25,9 +25,9 @@
         <el-table-column type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
         <el-table-column prop="name" label="关系类型名称" show-overflow-tooltip></el-table-column>
         <el-table-column prop="code" label="数字编码" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="operName" label="操作人" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="gmtModified" label="操作时间" show-overflow-tooltip></el-table-column>
-        <el-table-column label="操作" width="160">
+        <!-- <el-table-column prop="operName" label="操作人" show-overflow-tooltip></el-table-column> -->
+        <!-- <el-table-column prop="gmtModified" label="操作时间" show-overflow-tooltip></el-table-column> -->
+        <!-- <el-table-column label="操作" width="160">
           <template slot-scope="scope">
             <el-button
               type="text"
@@ -35,7 +35,7 @@
               :disabled="true"
             >修改</el-button>
           </template>
-        </el-table-column>
+        </el-table-column> -->
       </el-table>
       <el-pagination
         :current-page.sync="currentPage"

+ 25 - 25
src/components/basicKnow/BasicTermsMaintenance.vue

@@ -38,13 +38,6 @@
           <el-button
             size="mini"
             @click="reloadLib"
-            :style="{
-              'margin':'0 10px',
-              'background':reloadFlag?'#fff':'#aaa',
-              'color':reloadFlag?'#48C5D7':'#fff',
-              'border-color':reloadFlag?'#48C5D7':'#aaa',
-              'cursor':reloadFlag?'pointer':'not-allowed',
-            }"
           >更新数据</el-button>
         </el-form-item>
       </el-form>
@@ -57,7 +50,7 @@
         <el-table-column prop="synonymName" label="同义词" show-overflow-tooltip></el-table-column>
         <el-table-column label="状态" width="100">
           <template slot-scope="scope">
-            <span :class="scope.row.isDeleted == 'Y'?'deletes':'reviews'">{{scope.row.isDeleted == 'N'?'启用':'禁用'}}</span>
+            <span>{{scope.row.isDeleted == 'N'?'启用':'禁用'}}</span>
           </template>
         </el-table-column>
         <el-table-column prop="modifierName" label="操作人"></el-table-column>
@@ -67,14 +60,12 @@
             <el-button
               type="text"
               size="small"
-              :disabled="scope.row.isDeleted != 'N'"
               @click="toEditProduct(scope.row)"
             >修改</el-button>
             <span style="margin:0 3px;">|</span>
             <el-button
               type="text"
               size="small"
-              :disabled="scope.row.isDeleted != 'N'"
               @click="toEditProduct(scope.row,true)"
             >复制</el-button>
             <span style="margin:0 3px;">|</span>
@@ -133,14 +124,18 @@ export default {
     };
   },
   created() {
-    // this.getDataList();
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
+    
     this.getTypeList();
-    const that = this;
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-    });
     this.$nextTick(()=>{
-      that.getDataList();
+      this.getDataList();
     })
   },
   watch: {
@@ -151,13 +146,13 @@ export default {
       deep: true
     }
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
+  // beforeRouteEnter(to, from, next) {
+  //   next(vm => {
+  //     //const pm = to.param;
+  //     Object.assign(vm, to.params);
+  //     vm.inCurrentPage = to.params.currentPage;
+  //   });
+  // },
   methods: {
     handleSizeChange(val) {
       this.pageSize = val;
@@ -169,10 +164,16 @@ export default {
       this.getDataList();
     },
     reloadLib() {
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
       if (this.reloadFlag) {
         this.reloadFlag = false;
-        return
         api.clearStandRuleDrug().then(res => {
+          this.getDataList();
           if (res.data.code == 0) {
             this.reloadFlag = true;
           }
@@ -328,8 +329,7 @@ export default {
               } else {
                 if (this.filter.isState !== '' && this.list.length === 1) {
                   //有启用状态筛选条件且当前页只有最后一条数据删除时,删除成功后跳转到前一页
-                  this.currentPage =
-                    this.currentPage === 1 ? 1 : this.currentPage - 1;
+                  this.currentPage = this.currentPage === 1 ? 1 : this.currentPage - 1;
                 }
               }
               this.warning(res.data.msg || '操作成功', 'success');

+ 3 - 3
src/components/basicKnow/SearchList.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="conceptSearch" :style="{'top':top?top:'200px'}" ref="conceptSearch">
-    <h4  class="conceptTitle">术语(概念ID)搜索</h4>
+    <h4  class="conceptTitle">{{title||'术语(概念ID)搜索'}}</h4>
     <img class="closeSearch" src="../../images/close-icon.png" @click="closeSearch" alt="">
     <p class="searchWrap">
       <img class="search" src="../../images/search.png" alt="搜索">
-      <input v-model.trim="conceptText" @input="searchConcept" type="text" ref="conceptInput" class="searchText" placeholder="请输入关键词搜索">
+      <input v-model.trim="conceptText" @input="searchConcept" type="text" ref="conceptInput" class="searchText" :placeholder="placeTxt||'请输入关键词搜索'">
     </p>
     <ul class="conceptList" ref="conceptList">
       <li 
@@ -22,7 +22,7 @@
 import api from '@api/knowledgeTree.js';
 
 export default {
-  props:['conceptList','addLevel','top'],
+  props:['conceptList','addLevel','top','title','placeTxt'],
   data(){
     return {
       conceptText: '',

+ 16 - 13
src/components/knowledgeExtra/AboutDisease.vue

@@ -3,7 +3,7 @@
         <crumbs title="疾病相关维护" minWidth="995px">
             <el-form :inline="true" class="demo-form-inline">
                 <el-form-item label="疾病名称:">
-                    <el-input size="mini" v-model="filter.term" placeholder="请输入名称"></el-input>
+                    <el-input size="mini" v-model.trim="filter.term" placeholder="请输入名称"></el-input>
                 </el-form-item>
                 <el-form-item>
                     <el-button size="mini" @click="filterDatas">确认</el-button>
@@ -89,12 +89,15 @@
       }
     },
     created() {
-      const that = this;
+      const param = this.$route.params;
+      if(param.currentPage&&param.filter){
+        this.inCurrentPage = param.currentPage
+        this.filter = param.filter
+      }
       //返回时避免参数未赋值就获取列表
-      setTimeout(function(){
-        that.getDataList();
+      this.$nextTick(()=>{
+        this.getDataList();
       });
-      // this.getTypeList();
     },
     watch: {
       'filter': {
@@ -104,13 +107,13 @@
         deep: true
       }
     },
-    beforeRouteEnter(to, from, next){
-      next(vm => {
-        //const pm = to.param;
-        Object.assign(vm,to.params);
-        vm.inCurrentPage=to.params.currentPage;
-      })
-    },
+    // beforeRouteEnter(to, from, next){
+    //   next(vm => {
+    //     //const pm = to.param;
+    //     Object.assign(vm,to.params);
+    //     vm.inCurrentPage=to.params.currentPage;
+    //   })
+    // },
     methods: {
       handleSizeChange(val){
         this.pageSize = val;
@@ -200,7 +203,7 @@
           this.clearFilter();
         };
         const param = {
-          disName: this.filter.term.trim(),
+          disName: this.filter.term,
           current: this.inCurrentPage||this.currentPage,
           size: this.pageSize
         };

+ 3 - 4
src/components/knowledgeExtra/AddDevKnow.vue

@@ -19,7 +19,7 @@
               loading-text="加载中..."
               @change="changeWord"
               @visible-change="handleVisible"
-              value-key="conceptId"
+              value-key="id"
               @clear="handleClear"
               ref="termName"
               placeholder="搜索"
@@ -359,9 +359,8 @@ export default {
       const name = newVal.name;
       const typeName = newVal.typeName;
       const type = newVal.type;
-      this.form.selectedTermName =
-        name + (typeName ? '(' + typeName + ')' : '');
-      this.form.selectedTerm = name + (typeName ? '(' + typeName + ')' : '');
+      this.form.selectedTermName = name + (typeName ? '(' + typeName + ')' : '');
+      // this.form.selectedTerm = name + (typeName ? '(' + typeName + ')' : '');
       this.form.name = name;
       this.form.fileList = [];
       this.showFileList = false;

+ 57 - 31
src/components/knowledgeExtra/AddNewRule.vue

@@ -20,7 +20,7 @@
                                     :value="item.id">
                             </el-option>
                         </el-select>
-                        <span class="tip-text">注:更改术语类型,将会清空已填写的规则内容~</span>
+                        <span class="tip-text">注:更改规则类型,将会清空已填写的规则内容~</span>
                     </el-form-item>
                     <el-form-item label="规则术语类型:" prop="parLenCode">
                         <el-select v-model="form.parLenCode"
@@ -36,7 +36,7 @@
                         <span class="tip-text">注:更改规则术语类型,将会清空已填写的规则内容~</span>
                     </el-form-item>
                     <el-form-item  class="addDepartFormItem" label="医学标准术语:" prop="parConceptId">
-                        <el-select clearable filterable remote :remote-method="searchConcept" v-model="form.parConceptId">
+                        <el-select clearable filterable remote :remote-method="searchConcept" v-model.trim="form.parConceptId">
                             <el-option
                                     v-for="item in conceptList"
                                     :key="item.conceptId"
@@ -45,10 +45,10 @@
                             </el-option>
                         </el-select>
                     </el-form-item>
-                    <!--<el-form-item label="有无子条件:" prop="parHasSub">
+                    <el-form-item v-if="showHasSub" label="有无子条件:" prop="parHasSub">
                         <el-select v-model="form.parHasSub"
                                    placeholder="请选择"
-                                   size="small">
+                                   size="small" @change="hasSubChange">
                             <el-option
                                     v-for="item in hasSub"
                                     :key="item.id"
@@ -56,9 +56,9 @@
                                     :value="item.id">
                             </el-option>
                         </el-select>
-                    </el-form-item>-->
+                    </el-form-item>
                     <el-form-item v-if="showMsg" label="附加信息:" prop="parMsg" class="parMsg">
-                        <el-input type="textarea" :rows="3" placeholder="请输入附加信息" v-model="form.parMsg"></el-input>
+                        <el-input type="textarea" :rows="3" placeholder="请输入附加信息" v-model.trim="form.parMsg"></el-input>
                     </el-form-item>
                     <el-form-item v-if="form.parHasSub===1" label="规则内容:" prop="remind" class="discDesc">
                         <SubRulesGroup v-for="(group,i) in subGroups"
@@ -118,6 +118,7 @@
                     parRuleType:'',
                     parConceptId:'',
                     parlibName:'',
+                    parLenName:'',
                     parHasSub:undefined,
                     parLenCode:'',
                     parMsg:'',
@@ -139,8 +140,8 @@
                     parHasSub:[{ required: true, message: '请选择有无子条件',trigger: ['change'] }],
                     parMsg:[{ required: true, message: '请输入附加信息',trigger: ['change'] },{
                         validator: (rule,value,callback)=>{
-                            if(value.length>300){
-                                callback(new Error('附加信息不能超过300字'));
+                            if(value.length>100){
+                                callback(new Error('附加信息不能超过100字'));
                             }else{
                                 callback();
                             }}, trigger: 'change'
@@ -152,7 +153,7 @@
         },
         created(){
             this.getTypeList();
-            this.getDict();
+            this.setDict();
             const param = this.$route.params;
             let info = param.data;
             if(info){
@@ -177,12 +178,15 @@
                 }
                 const obj = this.ruleTermTypeList.find((it)=>it.code===val);
                 this.baseTypeList = obj.subMenuList;
-
+                this.subRuleMaxNum=obj.number;
             },
             'form.parConceptId':function(val){
-                if(this.checkFirstPlace) {
+                if(val&&this.checkFirstPlace&&this.conceptList) {
                     this.firstPlace = this.conceptList.find((it) => it.conceptId === val);
                     this.firstPlace['checkedType']=this.ruleTermCodeStr;
+                }else if(!val){
+                    this.setInitGroupData();
+                    this.firstPlace =null;
                 }else{
                     this.firstPlace =null;
                 }
@@ -200,21 +204,21 @@
             },
             showMsg:function(){
                 return this.ruleTermCodeStr.length>1&&this.msgDict.indexOf(this.ruleTermCodeStr)>-1;
+            },
+            showHasSub:function(){
+                return this.subDict.indexOf(this.ruleTermCodeStr)>-1;
             }
         },
         methods:{
-            getDict(){
-                api.zskgetDict().then((res) => {
-                    if (res.data.code == '0') {
-                        const data = res.data.data;
-                        const arr =data['20'].map((it)=>it.val);
-                        this.dict = arr.join(",");
-                        this.msgDict=(data['21'].map((it)=>it.val)||[]).join(",");
-                        localStorage.setItem("zskDicts",arr.join(","));
-                    }
-                }).catch((error) => {
-                    console.log(error);
-                });
+            hasSubChange(val){
+                if(val){
+                    this.setInitGroupData();
+                }
+            },
+            setDict(){
+                this.dict = localStorage.getItem("zskDicts");
+                this.msgDict = localStorage.getItem("zskMsgDict");
+                this.subDict = localStorage.getItem("zskSubDict");
             },
             showConfirmDialog(msg,resolve){
                 this.$alert(msg, '提示', {
@@ -228,13 +232,14 @@
                 let arr=[];
                 data.map((it)=>{
                     if(!arr[it.groupType]){arr[it.groupType]=[];}
-                    if(it.subMaxOperator){
+                    if(it.subMaxOperator||it.subMinOperator){
                         it.dataType='1';
                     }else if(it.subEqValue){
                         it.dataType='2';
                     }
                     arr[it.groupType].push(it);
-                })
+                });
+                arr = arr.filter((it)=>{if(it)return it});
                 return arr;
             },
             searchConcept(val){
@@ -262,6 +267,7 @@
             ruleTermChange(val){        //规则术语类型选中
                 this.form.parLenCode=val;
                 const obj = this.ruleTermTypeList.find((it)=>it.code===val);
+                this.form.parLenName=obj.name;
                 this.baseTypeList = obj.subMenuList;
                 this.subRuleMaxNum = obj.number;
                 this.setInitGroupData();
@@ -291,11 +297,12 @@
               this.conceptList=[];  //下拉列表清空
             },
             addGroup(){
-                this.subGroups.push([{
+                let temp = {
                     subDescription:'',
-                    parRuleType:'',
                     subConceptId:'',
                     subType:'',
+                    subLenCode:'',
+                    dataType:'',
                     subMaxOperator:'',
                     subMaxUnit:'',
                     subMaxValue:'',
@@ -303,9 +310,28 @@
                     subMinUnit:'',
                     subMinValue:'',
                     subEqValue:'',
-                    subLenCode:'',
-                    dataType:'',
-                }]);
+                };
+                if(this.checkFirstPlace){
+                    const obj=this.subGroups[0][0];
+                    temp = {
+                        subDescription:obj.subConceptName,
+                        subConceptId:obj.subConceptId,
+                        subConceptName:obj.subConceptName,
+                        subLenCode:this.form.parLenCode,
+                        subLenName: this.form.parLenName,
+                        subLibName: this.form.parlibName,
+                        subType:obj.subType,
+                        dataType:'',
+                        subMaxOperator:'',
+                        subMaxUnit:'',
+                        subMaxValue:'',
+                        subMinOperator:'',
+                        subMinUnit:'',
+                        subMinValue:'',
+                        subEqValue:'',
+                    };
+                }
+                this.subGroups.push([temp]);
             },
             delGroup(i){
                 this.subGroups.splice(i,1);
@@ -369,7 +395,7 @@
                     _this.form.klRuleInfoSaveSub = _this.form.parHasSub?_this.formatGroups():undefined;
                     let params = _this.form;
                     if(_this.parId){//修改/复制
-                        params = Object.assign({},_this.form,{parId:_this.isCopy?undefined:_this.parId})
+                        params = Object.assign({},_this.form,{parId:_this.isCopy?undefined:_this.parId,parStatus:_this.isCopy?1:_this.form.parStatus})
                     }
                     console.log(params)
                     _this.saveRule(params);

+ 24 - 9
src/components/knowledgeExtra/DiseaseTree.vue

@@ -36,7 +36,7 @@
                   </el-button>
                   <el-button
                       class="btn-del fr"
-                      v-if="data.level != 0"
+                      v-if="data.level > 1"
                       type="text"
                       size="mini"
                       @click="() => remove(node, data)">
@@ -60,6 +60,8 @@
       v-if="showSearch" 
       :conceptList="conceptList||[]" 
       :addLevel="addLevel"
+      placeTxt="请输入术语"
+      title="疾病相关术语"
       top="120px"
       @closeSearch="closeSearch" 
       @selectConcept="selectConcept" 
@@ -211,7 +213,7 @@ export default {
         }
       },
       allowDrag(draggingNode) {
-        return draggingNode.data.level != 0;//一级不可拖动
+        return draggingNode.data.level > 1;//一级不可拖动
       },
       handleNodeClick(data) {
           if(data.nodeList.length > 0) {
@@ -237,8 +239,13 @@ export default {
         const nodeListResult = []
         this.IteraNodeList(this.list[0].nodeList, nodeListResult, 0)
         param.nodeList = nodeListResult
+        const {params,grandson} = this.reparams(param)
+        if(grandson == 0){
+          this.message('增加子项数据后才能保存~');
+          return
+        }
         this.saveDisable = true  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
-        api.diseaseBaseSave(this.reparams(param)).then((res) => {
+        api.diseaseBaseSave(params).then((res) => {
           const { data } = res
           if(data.code == '0') {
             this.message(res.data.msg||'保存成功','success');
@@ -289,10 +296,12 @@ export default {
         this.list.length>0&&this.excludedConceptIds.push(this.list[0].conceptId)
         const params = {
           "name": txt,
+          "diseaseName":txt,
           "excludedConceptIds": this.excludedConceptIds||[],
           "libType": this.addLevel == 0?100:libType&&libType[0]||''
         }
-        api.searchConcept(params).then((res) => {
+        let searchUrl = this.addLevel == 0?'findDisName':'searchConcept'
+        api[searchUrl](params).then((res) => {
           const { data } = res
           if(data.code == '0') {
             this.conceptList = data.data
@@ -316,8 +325,11 @@ export default {
           data.nodeList.push(newChild);
         }
         this.conceptList = [];
-        this.searchConcept(txt)
-        // this.closeSearch();
+        if(this.addLevel == 0){
+          this.closeSearch();
+        }else{
+          this.searchConcept(txt)
+        }
       },
       openSearch(e) {
         this.showSearch = true
@@ -347,15 +359,18 @@ export default {
           nodeList.splice(index, 1);
       },
       reparams(param){
-        let params = []
+        let params = [],grandson = 0;
         const tmplis = param.nodeList||[];
         for(let i = 0;i < tmplis.length;i++){
-          let item = tmplis[i],sonIds=[]
+          let item = tmplis[i],sonIds=[];
           if(item.nodeList&&item.nodeList.length>0){
             for(let j = 0;j < item.nodeList.length;j++){
               sonIds.push(item.nodeList[j].conceptId)
             }
           }
+          if(sonIds.length > 0){
+            ++grandson
+          }
           let obj = {
             "sid": param.conceptId,
             "rid": item.conceptId,
@@ -365,7 +380,7 @@ export default {
           }
           params.push(obj)
         }
-        return params
+        return {params,grandson}
       },
       message(msg,type){
         this.$message({

+ 43 - 10
src/components/knowledgeExtra/KnowledgeAll.vue

@@ -2,6 +2,8 @@
   <div class="addMedicalMultRelationWrapper">
     <crumbs :title="minTitle" fix="fixed" linkTo=""></crumbs>
     <TreeTab @getTreeList="getTreeList" />
+    <div class="updataData" @click="updataTree" v-if="id == 1||id == 2||id == 3||id == 4"><span>更新数据</span></div>
+    
     <div class="contents">
       <div class="content">
         <div class="addBtn" v-if="list.length == 0">
@@ -79,16 +81,7 @@ export default {
     data(){
       return{
         minTitle:'树形结构维护',
-        tab:[
-          {name:'ICD10疾病类别',id:'1'},
-          {name:'科室疾病类别',id:'2'},
-          {name:'药物类别',id:'3'},
-          {name:'症状类别',id:'4'},
-          {name:'手术和操作类别',id:'5'},
-          {name:'实验室检查类别',id:'6'},
-          {name:'辅助检查类别',id:'7'},
-        ],
-        curId:'1',
+        id:1,
         list: [],
         defaultProps: {
           children: 'nodeList',
@@ -110,15 +103,34 @@ export default {
       this.getTreeList(1)
     },
     methods:{
+      updataTree(){
+        const {id} = this
+        api.clearDrug({}).then((res)=>{
+          const loading = this.$loading({
+            lock: true,
+            text: 'Loading',
+            spinner: 'el-icon-loading',
+            background: 'rgba(0, 0, 0, 0.7)'
+          });
+          this.getTreeList(id)
+        })
+      },
       getTreeList(id){
         if(id != this.id){
           this.id = id
           this.showSearch = false
         }
+        const loading = this.$loading({
+          lock: true,
+          text: 'Loading',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
         const params = {
           "type": id,
         }
         api.getlistTree(params).then((res) => {
+          loading.close();
           const { data } = res
           if(data.code == '0') {
             let result = data.data.treeDTO||{}
@@ -316,6 +328,27 @@ export default {
 </script>
 <style lang="less" scoped>
 @import "../../less/admin.less";
+.updataData {
+  position:absolute;
+  right:20px;
+  top:0;
+  z-index:100;
+  height:40px;
+  line-height:40px;
+  cursor:pointer;
+  span {
+    display:inline-block;
+    border:1px solid #48c5d7;
+    color:#48c5d7;
+    margin-top:7px;
+    padding:0 10px;
+    height:24px;
+    line-height:24px;
+    border-radius: 3px;
+    font-size:14px;
+  }
+}
+
 .el-button+.el-button {
   margin-left: 0;
 }

+ 4 - 4
src/components/knowledgeExtra/KnowledgeBaseType.vue

@@ -28,9 +28,9 @@
         <el-table-column prop="isHasCommonCn" label="是否支持通用扩展" show-overflow-tooltip></el-table-column>
         <el-table-column prop="canChangeCn" label="是否允许修改" show-overflow-tooltip></el-table-column>
         <el-table-column prop="onlyOneCn" label="是否只有单个词" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="operName" label="操作人" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="gmtModified" label="操作时间" show-overflow-tooltip></el-table-column>
-        <el-table-column label="操作" width="160">
+        <!-- <el-table-column prop="operName" label="操作人" show-overflow-tooltip></el-table-column> -->
+        <!-- <el-table-column prop="gmtModified" label="操作时间" show-overflow-tooltip></el-table-column> -->
+        <!-- <el-table-column label="操作" width="160">
           <template slot-scope="scope">
             <el-button
               type="text"
@@ -38,7 +38,7 @@
               :disabled="true"
             >修改</el-button>
           </template>
-        </el-table-column>
+        </el-table-column> -->
       </el-table>
       <el-pagination
         :current-page.sync="currentPage"

+ 59 - 13
src/components/knowledgeExtra/RuleManager.vue

@@ -53,11 +53,17 @@
                         prop="parDescription"
                         label="规则名称"
                         width="160">
+                    <template slot-scope="scope">
+                        <el-tooltip v-if="scope.row.parDescription.length>8" class="item" effect="dark" :content="scope.row.parDescription" placement="top">
+                            <span>{{scope.row.parDescription.slice(0,8)+'...'}}</span>
+                        </el-tooltip>
+                        <span v-if="scope.row.parDescription.length<9">{{scope.row.parDescription}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="parRuleType"
                         label="规则类型"
-                        width="100">
+                        width="150">
                     <template slot-scope="scope">
                         {{statusTrans(scope.row.parRuleType)}}
                     </template>
@@ -66,11 +72,17 @@
                         prop="parConceptName"
                         label="医学标准术语"
                         width="160">
+                    <template slot-scope="scope">
+                        <el-tooltip v-if="scope.row.parConceptName.length>8" class="item" effect="dark" :content="scope.row.parConceptName" placement="top">
+                            <span>{{scope.row.parConceptName.slice(0,8)+'...'}}</span>
+                        </el-tooltip>
+                        <span v-if="scope.row.parConceptName.length<9">{{scope.row.parConceptName}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         prop="parLibTypeName"
                         label="术语类型"
-                        width="130">
+                        width="150">
                 </el-table-column>
                 <el-table-column
                         prop="parHasSub"
@@ -84,6 +96,12 @@
                         prop="parMsg"
                         label="附加信息"
                         width="160">
+                    <template slot-scope="scope">
+                        <el-tooltip v-if="scope.row.parMsg.length>8" class="item" effect="dark" :content="scope.row.parMsg" placement="top">
+                            <span>{{scope.row.parMsg.slice(0,8)+'...'}}</span>
+                        </el-tooltip>
+                        <span v-if="scope.row.parMsg.length<9">{{scope.row.parMsg}}</span>
+                    </template>
                 </el-table-column>
                 <el-table-column
                         label="状态">
@@ -94,7 +112,7 @@
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="modifier"
+                        prop="modifierName"
                         label="操作人">
                 </el-table-column>
                 <el-table-column
@@ -104,13 +122,13 @@
                 </el-table-column>
                 <el-table-column
                         label="操作"
-                        width="180">
+                        width="180" fixed="right">
                     <template slot-scope="scope">
                         <el-button type="text" size="small" @click="editData(scope.row.parId)">修改</el-button>
                         <span style="margin:0 3px;">|</span>
                         <el-button type="text" size="small" @click="editData(scope.row.parId,true)">复制</el-button>
                         <span style="margin:0 3px;">|</span>
-                        <el-button type="text" size="small" :class="scope.row.parStatus === 0?'':'delete'" @click="showDelDialog(scope.row)">{{scope.row.parStatus === 0?'启用':'禁用'}}</el-button>
+                        <el-button type="text" size="small" :class="scope.row.parStatus === 0?'':'unvailable'" @click="showDelDialog(scope.row)">{{scope.row.parStatus === 0?'启用':'禁用'}}</el-button>
                         <span style="margin:0 3px;">|</span>
                         <el-button type="text" size="small" class="delete" @click="showDelDialog(scope.row,1)">删除</el-button>
                     </template>
@@ -162,12 +180,18 @@
             }
         },
         created() {
+            const param = this.$route.params;
+            if(param.currentPage){
+                this.inCurrentPage = param.currentPage
+                this.filter = param.filter
+            }
             this.getTypeList();
             const that = this;
             //返回时避免参数未赋值就获取列表
             setTimeout(function(){
                 that.getDataList();
             });
+            this.getDict();
         },
         watch: {
             'filter': {
@@ -177,14 +201,30 @@
                 deep: true
             }
         },
-        beforeRouteEnter(to, from, next) {
-            next(vm => {
-                //const pm = to.param;
-                Object.assign(vm, to.params);
-                vm.inCurrentPage=to.params.currentPage;
-            })
-        },
+        // 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;
+                        const arr =data['20'].map((it)=>it.val);
+                        //this.dict = arr.join(",");
+                        //this.msgDict=(data['21'].map((it)=>it.val)||[]).join(",");
+                        localStorage.setItem("zskDicts",arr.join(","));
+                        localStorage.setItem("zskMsgDict",(data['21'].map((it)=>it.val)||[]).join(","));
+                        localStorage.setItem("zskNumDict",data['22'][0].val);
+                        localStorage.setItem("zskSubDict",data['23'][0].val);
+                    }
+                }).catch((error) => {
+                    console.log(error);
+                });
+            },
             statusTrans(type){
                 const obj = this.ruleTypeList.find((it)=>it.type===type);
                 return obj&&obj.name;
@@ -195,7 +235,7 @@
                     this.ruleTypeList = typeListData;
                     return;
                 }
-                api.getTypesList({}).then((res) => {
+                api.getTypesList({planCode:'rule'}).then((res) => {
                     if (res.data.code == '0') {
                         const data = res.data.data;
                         this.ruleTypeList = data;
@@ -404,4 +444,10 @@
     #upFile{
         display: none !important;
     }
+    .unvailable{
+        color: #FE7D3D;
+        &:hover{
+            color: #f19061;
+        }
+    }
 </style>

+ 19 - 15
src/components/knowledgeExtra/StaticInfo.vue

@@ -54,7 +54,7 @@
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="modifierName"
+                        prop="modifier"
                         label="操作人"
                         width="80">
                 </el-table-column>
@@ -67,11 +67,12 @@
                 <el-table-column
                         label="操作" width="140">
                     <template slot-scope="scope">
-                        <el-button v-if="scope.row.isDeleted=='Y'" type="text" size="small" class="is-disabled">修改</el-button>
-                        <el-button v-if="scope.row.isDeleted=='N'" type="text" size="small" @click="toEditProduct(scope.row)">修改</el-button>
+                        <!-- <el-button v-if="scope.row.isDeleted=='Y'" type="text" size="small" class="is-disabled">修改</el-button> -->
+                        <el-button type="text" size="small" @click="toEditProduct(scope.row)">修改</el-button>
                         <span style="margin:0 3px;">|</span>
-                        <el-button v-if="scope.row.isDeleted=='Y' || scope.row.typeId === 82 || scope.row.typeId === 83" type="text" size="small" class="is-disabled">复制</el-button>
-                        <el-button v-if="scope.row.isDeleted=='N'&&scope.row.typeId !== 82 && scope.row.typeId !== 83" type="text" size="small" @click="toCopyProduct(scope.row)">复制</el-button>
+                        <!-- <el-button v-if="scope.row.isDeleted=='Y' || scope.row.typeId === 82 || scope.row.typeId === 83" type="text" size="small" class="is-disabled">复制</el-button> -->
+                        <!-- <el-button v-if="scope.row.isDeleted=='N'&&scope.row.typeId !== 82 && scope.row.typeId !== 83" type="text" size="small" @click="toCopyProduct(scope.row)">复制</el-button> -->
+                        <el-button type="text" size="small" @click="toCopyProduct(scope.row)">复制</el-button>
                         <span style="margin:0 3px;">|</span>
                         <el-button v-if="scope.row.isDeleted=='Y'" type="text" size="small" @click="showReuseDialog(scope.row)">启用</el-button>
                         <el-button v-if="scope.row.isDeleted=='N'" type="text" size="small" class="delete" @click="showDelDialog(scope.row)">禁用</el-button>
@@ -125,13 +126,16 @@
       }
     },
     created() {
+      const param = this.$route.params;
+      if(param.currentPage){
+        this.inCurrentPage = param.currentPage
+        this.filter = param.filter
+      }
       //返回时避免参数未赋值就获取列表
-      setTimeout(()=>{
+      this.$nextTick(()=>{
         this.getDataList();
         this.getListBack();
       });
-      // const enums = JSON.parse(localStorage.getItem('knowledgeEnumsData'));
-      // this.typeList = enums.conceptDetailLexiconTypeEnum;
     },
     watch: {
       'filter': {
@@ -141,13 +145,13 @@
         deep: true
       }
     },
-    beforeRouteEnter(to, from, next){
-      next(vm => {
-        //const pm = to.param;
-        Object.assign(vm,to.params);
-        vm.inCurrentPage=to.params.currentPage;
-      })
-    },
+    // beforeRouteEnter(to, from, next){
+    //   next(vm => {
+    //     //const pm = to.param;
+    //     Object.assign(vm,to.params);
+    //     vm.inCurrentPage=to.params.currentPage;
+    //   })
+    // },
     methods: {
       handleSizeChange(val){
         this.pageSize = val;

+ 105 - 44
src/components/knowledgeExtra/SubConditions.vue

@@ -33,7 +33,7 @@
                 </el-select>
             </el-form-item>
             <el-form-item  class="addDepartFormItem" label="医学标准术语:" prop="subConceptId">
-                <el-select clearable remote filterable :disabled="disabled" :remote-method="searchConcept" v-model="groupData.subConceptId">
+                <el-select clearable remote filterable :disabled="disabled" :remote-method="searchConcept" v-model.trim="groupData.subConceptId">
                     <el-option
                             v-for="item in conceptList"
                             :key="item.conceptId"
@@ -42,7 +42,7 @@
                     </el-option>
                 </el-select>
             </el-form-item>
-            <el-form-item v-if="groupData.subType===2" label="选择类型:" prop="dataType">
+            <el-form-item v-if="groupData.subType===2&&showDataType" label="选择类型:" prop="dataType">
                 <el-select v-model="groupData.dataType"
                            placeholder="请选择"
                            size="small" @change="dataTypeChange">
@@ -56,7 +56,7 @@
             </el-form-item>
             <el-form-item class="min-margin" v-if="groupData.dataType==='1'" label="最大值:">
                 <div class="select-item clearfix">
-                    <el-col :span="4">
+                    <el-col :span="3">
                         <el-form-item prop="subMaxOperator">
                             <el-select v-model="groupData.subMaxOperator"
                                        placeholder="请选择"
@@ -70,21 +70,21 @@
                             </el-select>
                         </el-form-item>
                     </el-col>
-                    <el-col :span="4">
+                    <el-col :span="3">
                         <el-form-item prop="subMaxValue">
-                            <el-input-number controls-position="right" type="text" v-model="groupData.subMaxValue" placeholder="填写数值"/>
+                            <el-input type="text" v-model="groupData.subMaxValue" placeholder="填写数值"/>
                         </el-form-item>
                     </el-col>
-                    <el-col :span="4">
+                    <el-col :span="3">
                         <el-form-item prop="subMaxUnit">
-                            <el-input  type="text" v-model="groupData.subMaxUnit" placeholder="填写单位"/>
+                            <el-input  type="text" v-model.trim="groupData.subMaxUnit" placeholder="填写单位"/>
                         </el-form-item>
                     </el-col>
                 </div>
             </el-form-item>
             <el-form-item class="min-margin" v-if="groupData.dataType==='1'" label="最小值:">
                 <div class="select-item clearfix">
-                    <el-col :span="4">
+                    <el-col :span="3">
                         <el-form-item prop="subMinOperator">
                             <el-select v-model="groupData.subMinOperator"
                                        placeholder="请选择"
@@ -98,23 +98,23 @@
                             </el-select>
                         </el-form-item>
                     </el-col>
-                    <el-col :span="4">
-                        <el-form-item prop="subMaxValue">
-                            <el-input-number controls-position="right" type="text" v-model="groupData.subMinValue" placeholder="填写数值"/>
+                    <el-col :span="3">
+                        <el-form-item prop="subMinValue">
+                            <el-input type="text" v-model="groupData.subMinValue" placeholder="填写数值"/>
                         </el-form-item>
                     </el-col>
-                    <el-col :span="4">
+                    <el-col :span="3">
                         <el-form-item prop="subMinUnit">
-                            <el-input  type="text" v-model="groupData.subMinUnit" placeholder="填写单位"/>
+                            <el-input  type="text" v-model.trim="groupData.subMinUnit" placeholder="填写单位"/>
                         </el-form-item>
                     </el-col>
                 </div>
             </el-form-item>
-            <el-form-item v-if="groupData.subType!==6&&groupData.dataType==='2'" label="医学内容:" prop="subEqValue" class="discDesc">
-                <el-input type="textarea" rows="3" placeholder="请输入医学内容" v-model="groupData.subEqValue"></el-input>
+            <el-form-item v-if="groupData.subType!==6&&groupData.dataType==='2'" label="医学内容:" prop="subEqValue" class="discDesc is-required">
+                <el-input type="textarea" rows="3" placeholder="请输入医学内容" v-model.trim="groupData.subEqValue"></el-input>
             </el-form-item>
-            <el-form-item v-if="groupData.subType===6" label="正则表达式:" prop="subEqValue" class="discDesc">
-                <el-input type="textarea" rows="3" placeholder="请输入正则表达式" v-model="groupData.subEqValue"></el-input>
+            <el-form-item v-if="groupData.subType===6" label="正则表达式:" prop="subEqValue" class="discDesc is-required">
+                <el-input type="textarea" rows="3" placeholder="请输入正则表达式" v-model.trim="groupData.subEqValue"></el-input>
             </el-form-item>
         </el-form>
         <div class="inner-oper" v-if="showAdd">
@@ -132,9 +132,10 @@
             return {
                 baseTermTypeList:[],
                 typeList:[],
+                numTypes:'',    //只有数值类型的类型id
                 operMaxList:[
                     {name:'<=',key:'<='},
-                    {name:'=',key:'='},
+                    {name:'<',key:'<'},
                 ],
                 operMinList:[{name:'>',key:'>'},
                     {name:'>=',key:'>='},
@@ -156,7 +157,9 @@
                     dataType:[{ required: true, message: '请选择类型',trigger: ['change'] }],
                     subMaxOperator:[{
                         validator: (rule,value,callback)=>{
-                            if((!value)&&this.groupData.subMinOperator===''){
+                            const {subMaxValue,subMinOperator,subMinValue}=this.groupData;
+                            const val=value+subMinOperator+subMinValue+subMaxValue;
+                            if(!val||(!value&&subMaxValue!=='')){
                                 callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
                             }else{
                                 callback();
@@ -164,13 +167,50 @@
                     }],
                     subMinOperator:[{
                         validator: (rule,value,callback)=>{
-                            if((!value)&&this.groupData.subMaxOperator===''){
+                            const {subMaxValue,subMaxOperator,subMinValue}=this.groupData;
+                            const val=value+subMaxOperator+subMinValue+subMaxValue;
+                            if(!val||(!value&&subMinValue!=='')){
+                                callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+                            }else{
+                                callback();
+                            }}, trigger: 'blur'
+                    }],
+                    subMaxValue:[{
+                        validator: (rule,value,callback)=>{
+                            const {subMaxOperator,subMinOperator,subMinValue}=this.groupData;
+                            const val=value+subMaxOperator+subMinValue+subMinOperator;
+                            const isNum=/^(\-|\+)?\d+(\.\d+)?$/.test(value);
+                            if(!val||(value==''&&subMaxOperator)){
+                                callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+                            }else if(value!==''&&!isNum){
+                                callback(new Error('只能输入数字'));
+                            }else{
+                                callback();
+                            }}, trigger: 'blur'
+                    }],
+                    subMinValue:[{
+                        validator: (rule,value,callback)=>{
+                            const {subMaxValue,subMinOperator,subMaxOperator}=this.groupData;
+                            const val=value+subMaxOperator+subMaxValue+subMinOperator;
+                            const isNum=/^(\-|\+)?\d+(\.\d+)?$/.test(value);
+                            if(!val||(value==''&&subMinOperator)){
                                 callback(new Error('最大值和最小值至少完整填写一个,单位不必填'));
+                            }else if(value!==''&&!isNum){
+                                callback(new Error('只能输入数字'));
+                            }else{
+                                callback();
+                            }}, trigger: 'blur'
+                    }],
+                    subEqValue:[{
+                        validator: (rule,value,callback)=>{
+                            if(value===''){
+                                callback(new Error('请输入'+this.textName));
+                            }else if(value.length>200){
+                                callback(new Error(this.textName+'不能超过200字'));
                             }else{
                                 callback();
                             }}, trigger: 'blur'
                     }],
-                    subEqValue:[{ required: true, message: '请输入医学内容',trigger: ['blur'] }],
                 },
             }
         },
@@ -182,44 +222,56 @@
                 deep:true
             },
             'baseTypes':{
-                handler:function(){
+                handler:function(val){
                     if(!this.groupData.subType){
                         this.baseTermTypeList =[];
                         return;
                     }
-                    const obj = this.baseTypes.find((it)=>it.type===this.groupData.subType);
+                    const obj = val.find((it)=>it.type===this.groupData.subType);
                     this.baseTermTypeList = obj.subMenuList;
                 },
                 deep:true
             },
-            'firstPlace':function(val){
-                if(!val)return;
-                const types= val.checkedType.split("-");
-                const sub = this.baseTypes.find((it)=>it.ruleType===+types[0]&&it.type===2);
-                this.groupData.subType=sub.type;
-                this.baseTermTypeList =sub.subMenuList;
-                this.groupData.subLenCode=this.baseTermTypeList.find((it)=>it.ruleType===+types[0]).code;
-                this.conceptList=[val];
-                this.groupData.subDescription=val.conceptName;
-                this.groupData.subConceptId = val.conceptId;
-                this.groupData.subConceptName = val.conceptName;
+            'firstPlace':{
+                handler:function(val) {
+                    if (this.ind!==0||!val) return;
+                    const dict = localStorage.getItem("zskDicts").match(new RegExp(val.checkedType+'-\\d+','g'))||[];
+                    const types = dict[0].split("-");
+                    const sub = this.baseTypes.find((it) => it.ruleType === +types[0] && it.type === +types[2]);
+                    this.groupData.subType = sub.type;
+                    this.baseTermTypeList = sub.subMenuList;
+                    this.groupData.subLenCode = (this.baseTermTypeList.find((it) => it.ruleType === +types[0])||{}).code;
+                    this.conceptList = [val];
+                    this.groupData.subDescription = val.conceptName;
+                    this.groupData.subConceptId = val.conceptId;
+                    this.groupData.subConceptName = val.conceptName;
+                },
+                deep:true
             }
         },
         created(){
-            this.conceptList=[{conceptName:this.groupData.subLibName,conceptId:this.groupData.subConceptId}];
+            this.numTypes = localStorage.getItem("zskNumDict");
+            this.conceptList=[{conceptName:this.groupData.subLibName||this.groupData.subConceptName,conceptId:this.groupData.subConceptId}];
+            if(this.groupData.subLenCode){
+                this.baseTermTypeList=[{name:this.groupData.subLenName,code:this.groupData.subLenCode}];
+            }
         },
-        methods:{
-            minMaxValidate(rule, value, callback){
-                if(this.groupData.dataType==='1'){
-
-                }
+        computed:{
+            showDataType:function(){
+               return (this.numTypes+',').indexOf(this.groupData.subLenCode+',')===-1;
             },
+            textName:function(){
+                return this.groupData.subType!==6&&this.groupData.dataType==='2'?'医学内容':'正则表达式';
+            }
+        },
+        methods:{
             dataTypeChange(val){
-                this.groupData.subEqOperator=val==='2'?'=':undefined;
-                this.groupData.dataType=val;
+                this.groupData.subEqOperator=(val==='2'?'=':'');
                 this.clearNumText();
+                delete this.groupData.dataType;     //触发更新
+                this.$set(this.groupData,'dataType',val);
             },
-            subTypeChange(val){         //基础规则类型修改
+            subTypeChange(val){        //基础规则类型修改
                 this.groupData.subLenCode='';
                 this.groupData.dataType='';
                 this.clearConcept();
@@ -233,7 +285,11 @@
             },
             subCodeChange(val){        //基础规则术语类型修改
                 this.groupData.subLenCode=val;
-                this.groupData.dataType='';
+                if((this.numTypes+',').indexOf(val+',')>-1){
+                    this.groupData.dataType='1';
+                }else{
+                    this.groupData.dataType='';
+                }
                 this.clearConcept();
                 this.clearNumText();
             },
@@ -249,6 +305,7 @@
                 this.groupData.subMinValue='';
                 this.groupData.subMinUnit='';
                 this.groupData.subEqValue='';
+                this.groupData.subEqOperator='';
             },
             searchConcept(val){
                 const param = {
@@ -379,6 +436,7 @@
         .el-form-item__error{
             top: auto;
             white-space: nowrap;
+            background: #fff;
         }
         .el-input-number{
             width: 95px;
@@ -388,5 +446,8 @@
             height: 15px;
             line-height: 16px;
         }
+        .el-col-3 {
+            width: 94px;
+        }
     }
 </style>

+ 5 - 1
src/components/knowledgeExtra/SubRulesGroup.vue

@@ -29,7 +29,7 @@
         },
         computed:{
           'disable':function(){
-              return Object.keys(this.firstPlace||{}).length>0&&this.inx===0;
+              return Object.keys(this.firstPlace||{}).length>0;
           }
         },
         methods:{
@@ -102,6 +102,10 @@
         border-top: 4px solid #F5F5F5;
         background: #fff;
     }
+    .el-button--danger.is-plain:focus, .el-button--danger.is-plain:hover{
+        color: #fbc4c4;
+        border-color:#fbc4c4;
+    }
     .el-button--danger.is-plain{
         background: none;
         &.is-disabled{

+ 0 - 10
src/routes.js

@@ -596,16 +596,6 @@ export default [
                 component: AddTerm,
                 name: 'AddTerm',
             },
-            {
-                path: 'LT-ZSKKZWH-JTXXWH',
-                component: StaticInfo,
-                name: 'StaticInfo',
-            },
-            {
-                path: 'LT-ZSKKZWH-JTXXWH-EDIT',
-                component: AddDevKnow,
-                name: 'AddDevKnow',
-            },
             {
                 path: 'LT-ZSKKZWH-GZWH',
                 component: ZskRuleManager,