浏览代码

bug修改

luolei 4 年之前
父节点
当前提交
6f2df2fd16

+ 1 - 0
src/api/config.js

@@ -556,6 +556,7 @@ export default {
     'getBaseRecordById':'/api/cdssman/kl/conceptInfo/getRecordById',
     'saveBaseOrUpdateRecord':'/api/cdssman/kl/conceptInfo/saveOrUpdateRecord',
     'staticKnowledgeBaseInfo':'/api/cdssman/kl/conceptInfo/staticKnowledgeIndexWithoutInfo',
+    'clearDrug':'/api/cdssman/cache/clearDrug',
   },
   menuIconList: { //菜单对应图标
     'YH-KZT': 'el-icon-menu',

+ 3 - 0
src/api/knowledgeTree.js

@@ -82,4 +82,7 @@ export default {
   clearConceptInfo(param) {//删除同义词
     return axios.post(urls.clearConceptInfo, param);
   },
+  clearDrug(param) {//清除药品缓存
+    return axios.post(urls.clearDrug, param);
+  },
 };

+ 15 - 15
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">
@@ -799,7 +799,7 @@ export default {
           this.warning('年龄最小值应该小于最大值');
           return;
         }
-        if(this.minValue >= this.maxValue&&this.data.type=='实验室检查子项目'){
+        if(this.minValue&&this.maxValue&&this.minValue >= this.maxValue&&this.data.type=='实验室检查子项目'){
           this.warning('最小值应该小于最大值');
           return;
         }
@@ -891,14 +891,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{
@@ -911,17 +911,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

+ 8 - 10
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>
@@ -169,9 +160,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;
         api.clearStandRuleDrug().then(res => {
+          this.getDataList();
           if (res.data.code == 0) {
             this.reloadFlag = true;
           }

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

@@ -105,7 +105,15 @@ export default {
     methods:{
       updataTree(){
         const {id} = this
-        this.getTreeList(id)
+        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){
@@ -324,7 +332,7 @@ export default {
   position:absolute;
   right:20px;
   top:0;
-  z-index:9999;
+  z-index:100;
   height:40px;
   line-height:40px;
   cursor:pointer;