Explorar o código

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

zhouna %!s(int64=4) %!d(string=hai) anos
pai
achega
06586dd6d7

+ 3 - 1
src/api/config.js

@@ -628,7 +628,9 @@ export default {
     'jhSearchConcept': '/api/cdssman/klDisease/addConceptClass',
     'deleteById': '/api/cdssman/kl/conceptCollection/deleteById',
     'saveOrUpdateRecord': '/api/cdssman/kl/conceptCollection/saveOrUpdateRecord',
-
+    'searchCollectionConceptVO': '/api/cdssman/klDisease/searchCollectionConceptVO',
+    'collectionMatch': '/api/cdssman/kl/conceptCollection/collectionMatch',
+    
   },
   menuIconList: { //菜单对应图标
     'YH-KZT': 'el-icon-menu',

+ 6 - 0
src/api/knowledgeLib.js

@@ -54,5 +54,11 @@ export default {
     saveOrUpdateRecord(param) {
         return axios.post(urls.saveOrUpdateRecord, param);
     },
+    searchCollectionConceptVO(param) {
+        return axios.post(urls.searchCollectionConceptVO, param);
+    },
+    collectionMatch(param) {
+        return axios.post(urls.collectionMatch, param);
+    },
     
 }

+ 6 - 5
src/components/base/LtModal.vue

@@ -235,8 +235,8 @@ export default {
       this.form.hisCode = this.data.hisCode;
       let name;
       if (
+        (this.data.hisDetailName == null || this.data.hisDetailName === '') &&
         this.data.hisName !== '' &&
-        this.data.hisDetailName === '' &&
         this.type == 1
       ) {
         this.ty = 1; // 1-化验大项、2-化验小项
@@ -251,6 +251,7 @@ export default {
         this.searchType = 2;
         name = this.data.hisDetailName;
       }
+      console.log(this.ty)
       this.getTermMatching(this.ty, name);
       this.getRelatedMapping();
     }
@@ -288,10 +289,10 @@ export default {
         this.form.source = row.source;
       }
     },
-    handleChoose(val,id) {
+    handleChoose(val, id) {
       this.form.searchTextPre = val;
       this.form.searchText = val;
-      this.form.conceptId = id
+      this.form.conceptId = id;
     },
     // 搜索列表
     searchTerms(query) {
@@ -300,7 +301,7 @@ export default {
         return;
       }
       const { hisName, hisDetailName } = this.form;
-      if (hisName !== '' && hisDetailName === '' && this.type == 1) {
+      if (hisName !== '' && (this.data.hisDetailName == null || this.data.hisDetailName === '') && this.type == 1) {
         this.ty = 1;
       } else if (hisName !== '' && hisDetailName !== '' && this.type == 1) {
         this.ty = 2;
@@ -391,7 +392,7 @@ export default {
       }
       this.getTermMatching(type, name);
     },
-    clear(){
+    clear() {
       const { hisName, hisDetailName } = this.form;
       this.getTermMatching(1, hisName);
     },

+ 400 - 171
src/components/knowledgeExtra/AddTermSet.vue

@@ -20,21 +20,23 @@
   }
 
   .left_header {
+    height: 40px;
     display: flex;
     justify-content: space-between;
     .tips {
       margin-top: 15px;
     }
     .inp {
-      width: 280px;
-
+      width: 150px;
       /deep/.el-input__inner {
         height: 30px;
         margin-top: 10px;
       }
     }
   }
-
+  .right_header {
+    display: flex;
+  }
   .table_form {
     width: 100%;
     box-sizing: border-box;
@@ -45,36 +47,60 @@
     flex-wrap: wrap;
   }
   .table_content {
-    min-height: 200px;
-    height: calc(100vh - 264px);
     margin-top: 10px;
-    display: flex;
-    justify-content: space-between;
+    overflow: hidden;
     .table_left {
-      flex: 1;
+      width: 45%;
+      float: left;
       margin-right: 10px;
       background: #ffffff;
-      padding: 0 50px;
-
+      padding: 0 2%;
       .left_box {
         margin: 30px 0;
         overflow: hidden;
-        overflow-y: auto;
-        height: calc(100vh - 410px);
+        min-height: calc(100vh - 410px);
       }
       .tabs {
-        float: left;
-        max-width: 49%;
-        min-width: 49%;
+        max-width: 100%;
+        min-width: 100%;
+        border-color: #dcdfe6;
       }
       .form_btn {
         display: flex;
         justify-content: flex-end;
+        padding-bottom: 15px;
       }
     }
     .table_right {
-      width: 300px;
+      width: 45%;
+      float: right;
       background: #ffffff;
+      padding: 0 2%;
+      .right_box {
+        margin: 30px 0;
+        overflow: hidden;
+        min-height: calc(100vh - 410px);
+      }
+      .tabs {
+        max-width: 100%;
+        min-width: 100%;
+        border-color: #dcdfe6;
+      }
+      .inp {
+        width: 100px;
+        /deep/.el-input__inner {
+          height: 30px;
+          margin-top: 10px;
+        }
+      }
+      .inps {
+        margin-right: 10px;
+      }
+      .form_btn {
+        display: flex;
+        justify-content: space-between;
+        padding-bottom: 15px;
+      }
     }
   }
   /deep/.el-select-dropdown__item.hover,
@@ -100,56 +126,42 @@
   /deep/ .el-form-item.is-success .el-textarea__inner {
     border-color: #c9c9c9 !important;
   }
-  .conceptSearch {
-    width: 100%;
-    text-align: center;
-    z-index: 2;
-    padding: 30px;
-    box-sizing: border-box;
-    .conceptTitle {
-      width: 100%;
-      text-align: center;
-      padding: 20px 0;
-    }
-    .searchText {
-      padding: 0 35px 0 15px;
-      width: 100%;
-      height: 34px;
-      border: 1px solid #c9c9c9;
-      box-sizing: border-box;
-    }
-    .conceptList {
-      min-height: 200px;
-      max-height: 300px;
-      margin: -2px auto 0;
-      border: 1px solid #e1dfdf;
-      overflow: hidden;
-      overflow-y: auto;
-    }
-    .conceptItem {
-      height: 34px;
-      line-height: 34px;
-      text-align: left;
-      padding: 0 15px;
-      cursor: pointer;
-    }
-    .conceptItem:hover {
-      background: #f5f7fa;
-    }
-    .searchWrap {
-      position: relative;
-      .search {
-        position: absolute;
-        right: 7px;
-        top: 8px;
-      }
-    }
+  /deep/ .el-table th.gutter {
+    display: table-cell !important;
+  }
+  /deep/.el-table .cell,
+  .el-table--border td:first-child .cell,
+  .el-table--border th:first-child .cell {
+    padding-right: 14px;
+  }
+  /*table边框颜色*/
+  /deep/ .el-table--border:after,
+  .el-table--group:after,
+  .el-table:before {
+    background-color: #dcdfe6;
+  }
+  /deep/ .el-table--border,
+  .el-table--group {
+    border-color: #dcdfe6;
   }
-  .noresult {
-    padding: 20px 0;
-    color: #ccc;
+  /deep/ .el-table td,
+  .el-table th.is-leaf {
+    border-bottom: 1px solid #dcdfe6;
+  }
+
+  /deep/ .el-table--border th,
+  .el-table--border th.gutter:last-of-type {
+    border-bottom: 1px solid #dcdfe6;
+  }
+
+  /deep/ .el-table--border td,
+  .el-table--border th {
+    border-right: 1px solid #dcdfe6;
   }
 }
+/deep/ .el-textarea__inner {
+  resize: none;
+}
 </style>
 <template>
   <div>
@@ -207,21 +219,32 @@
       <div class="table_content" v-if="onshow">
         <div class="table_left">
           <div class="left_header">
-            <h4 class="tips">关联的术语({{form.concepts.length}})</h4>
-            <el-input v-model="searchtext" @input="searchList" placeholder="请搜索" class="inp"></el-input>
+            <h5 class="tips">关联的术语({{form.concepts.length}})</h5>
+            <div style="display:flex">
+              <el-input v-model.trim="searchtext" @input="searchList" placeholder="关键词" class="inp"></el-input>
+              <span style="display:flex;align-items: center;margin:0 5px">-</span>
+              <el-input
+                v-model.trim="searchtext2"
+                @input="searchList"
+                placeholder="关键词"
+                class="inp"
+              ></el-input>
+            </div>
           </div>
 
           <div class="left_box">
             <el-table
-              v-if="firstList.length>0"
-              :data="firstList"
+              :data="leftList"
               border
+              style="min-height: 200px"
+              height="calc(100vh - 393px)"
               class="tabs"
+              ref="table"
               :header-row-style="{height:'40px'}"
-              :header-cell-style="{height:'40px',padding:'0',background:'#f7f7f7'}"
+              :header-cell-style="{height:'40px',borderColor:'#DCDFE6'}"
             >
               <el-table-column prop="conceptLibName" :show-overflow-tooltip="true" label="术语名称"></el-table-column>
-              <el-table-column label="操作" fixed="right">
+              <el-table-column label="操作">
                 <template slot-scope="scope">
                   <el-button
                     type="text"
@@ -232,60 +255,81 @@
                 </template>
               </el-table-column>
             </el-table>
+          </div>
+
+          <div class="form_btn">
+            <el-button type="primary" size="medium " @click="saveSet">确定</el-button>
+          </div>
+        </div>
+        <div class="table_right">
+          <div class="right_header">
+            <el-select
+              v-model="formInline.logicalOperator"
+              class="inp inps"
+              @change="searchConcept"
+            >
+              <el-option label="and" value="0"></el-option>
+              <el-option label="or" value="1"></el-option>
+            </el-select>
+            <el-input
+              v-model.trim="formInline.name1"
+              @input="searchConcept"
+              placeholder="关键词"
+              class="inp"
+            ></el-input>
+            <span style="display:flex;align-items: center;margin:0 5px">-</span>
+            <el-input
+              v-model.trim="formInline.name2"
+              @input="searchConcept"
+              placeholder="关键词"
+              class="inp"
+            ></el-input>
+            <span style="display:flex;align-items: center;margin:0 5px">-</span>
+            <el-input
+              v-model.trim="formInline.name3"
+              @input="searchConcept"
+              placeholder="关键词"
+              class="inp"
+            ></el-input>
+          </div>
+
+          <div class="right_box">
             <el-table
-              v-if="lastList.length>0"
-              :data="lastList"
+              :data="conceptList"
               border
+              style="min-height: 200px"
+              height="calc(100vh - 393px)"
               class="tabs"
+              ref="tables"
+              @row-click="btn"
               :header-row-style="{height:'40px'}"
-              :header-cell-style="{height:'40px',padding:'0',background:'#f7f7f7'}"
+              :header-cell-style="{height:'40px',borderColor:'#DCDFE6'}"
+              @selection-change="handleSelectionChange"
             >
-              <el-table-column prop="conceptLibName" :show-overflow-tooltip="true" label="术语名称"></el-table-column>
-              <el-table-column label="操作" fixed="right">
-                <template slot-scope="scope">
-                  <el-button
-                    type="text"
-                    size="small"
-                    class="delete"
-                    @click="showDelDialog(scope.row)"
-                  >移除</el-button>
-                </template>
-              </el-table-column>
+              <el-table-column type="selection"></el-table-column>
+              <el-table-column prop="conceptName" :show-overflow-tooltip="true" label="术语名称"></el-table-column>
             </el-table>
           </div>
-
           <div class="form_btn">
-            <el-button type="primary" size="medium " @click="saveSet">确定</el-button>
-          </div>
-        </div>
-        <div class="table_right">
-          <div class="conceptSearch" ref="conceptSearch">
-            <h4 class="conceptTitle">添加关联术语</h4>
-            <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="请输入关键词搜索"
-              />
-            </p>
-            <ul class="conceptList" ref="conceptList">
-              <li
-                v-for="item in conceptList"
-                class="conceptItem ellipsis"
-                :title="item.conceptName"
-                @click="selectConcept(item)"
-                :key="item.conceptId"
-              >{{item.conceptName}}</li>
-              <li class="noresult" v-if="conceptList.length==0">暂无结果~</li>
-            </ul>
+            <el-button size="medium " @click="add" icon="el-icon-caret-left">添加</el-button>
+            <el-button size="medium " @click="dialogVisible = true">文本批量添加</el-button>
           </div>
         </div>
       </div>
     </div>
+    <el-dialog
+      :title="'请输入要添加到关联的标准术语(每行一个)'+'共'+len+'行'"
+      :visible.sync="dialogVisible"
+      width="30%"
+      :close-on-click-modal="false"
+      :showClose="false"
+    >
+      <el-input type="textarea" :rows="15" placeholder="请输入内容" v-model="innerText"></el-input>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="collectcancel">保存并关闭</el-button>
+        <el-button type="primary" @click="collectionMatch">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script type="text/javascript">
@@ -297,17 +341,25 @@ export default {
   data() {
     return {
       title: '术语集合内容维护-添加',
+      formInline: {
+        logicalOperator: '0',
+        name1: '',
+        name2: '',
+        name3: ''
+      },
+      innerText: '',
       ruleTypeList: [],
       ruleTermTypeList: [],
       conceptList: [],
       conceptText: '',
       excludedConceptIds: [],
       type: [],
-      firstList: [],
-      lastList: [],
+      leftList: [],
+      multipleSelection: [],
       sign: 1,
       searchtext: '',
-      len: null,
+      searchtext2: '',
+      dialogVisible: false,
       form: {
         collectionLibType: '',
         collectionLibName: '',
@@ -334,27 +386,53 @@ export default {
   created() {
     this.getDict();
     const param = this.$route.params;
-    let info = param.data;
-    if (info) {
+    let type = param.type;
+    if (type == 2) {
       this.title = '术语集合内容维护-' + '修改';
-      this.form.collectionLibType = JSON.stringify(info.collectionLibType);
-      this.form.collectionLibName = info.collectionLibName;
-      this.form.concepts = info.concepts;
-      this.form.conceptLibType = info.concepts[0].conceptLibType;
-      this.form.collectionId = info.collectionId;
-      this.form.collectionRemark = info.collectionRemark;
+      this.getInfo(param.id);
       this.sign = 2;
-      this.$nextTick(() => {
-        this.getList(this.form.concepts);
-        this.getIds(this.form.concepts);
-        this.getTreeSearchList();
-      });
     }
     setTimeout(() => {
       this.startCount = this.editCount;
     }, 500);
   },
   methods: {
+    getInfo(id) {
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      api
+        .getRecordById({ id })
+        .then(res => {
+          loading.close();
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            this.form.collectionLibType = JSON.stringify(
+              data.collectionLibType
+            );
+            this.form.collectionLibName = data.collectionLibName;
+            this.form.concepts = data.concepts;
+            this.form.conceptLibType = data.concepts[0].conceptLibType;
+            this.form.collectionId = data.collectionId;
+            this.form.collectionRemark = data.collectionRemark;
+            this.leftList = data.concepts;
+            this.$nextTick(() => {
+              this.getIds(this.form.concepts);
+              this.getTreeSearchList();
+            });
+          }
+        })
+        .catch(error => {
+          loading.close();
+          this.warning('获取详情失败,请重试');
+        });
+    },
+    collectcancel() {
+      this.dialogVisible = false;
+    },
     cancelRequest() {
       if (typeof this.source === 'function') {
         this.source('终止请求');
@@ -398,8 +476,21 @@ export default {
           console.log(error);
         });
     },
-    searchList(val) {
-      let concepts = JSON.parse(JSON.stringify(this.form.concepts));
+    searchList() {
+      let concepts, val;
+      if (
+        (this.searchtext != '' && this.searchtext2 == '') ||
+        (this.searchtext == '' && this.searchtext2 != '')
+      ) {
+        concepts = JSON.parse(JSON.stringify(this.form.concepts));
+        val = this.searchtext != '' ? this.searchtext : this.searchtext2;
+      } else if (this.searchtext != '' && this.searchtext2 != '') {
+        concepts = JSON.parse(JSON.stringify(this.leftList));
+        val = this.searchtext2;
+      } else if (this.searchtext == '' && this.searchtext2 == '') {
+        this.leftList = JSON.parse(JSON.stringify(this.form.concepts));
+        return;
+      }
       let str = '.*' + val + '.*';
       let reg = new RegExp(str);
       let arr = [];
@@ -409,7 +500,8 @@ export default {
           arr.push(concepts[i]);
         }
       }
-      this.getList(arr);
+      this.$refs.table.bodyWrapper.scrollTop = 0;
+      this.leftList = arr;
     },
     getCollectionLib(newValue) {
       this.ruleTermTypeList.forEach(item => {
@@ -422,41 +514,108 @@ export default {
     },
     // 基础术语
     searchConcept(e) {
-      this.conceptText = e.target.value
       if (this.timeout) {
         clearTimeout(this.timeout);
       }
       this.timeout = setTimeout(() => {
-        this.getTreeSearchList()
+        this.getTreeSearchList();
+        this.$refs.tables.bodyWrapper.scrollTop = 0;
       }, 800);
     },
-    async getTreeSearchList(){
+    async getTreeSearchList() {
       this.whether = true;
       const params = {
-        typeId: this.form.conceptLibType,
-        name: this.conceptText,
-        excludedConceptIds: this.excludedConceptIds
+        libType: this.form.conceptLibType,
+        names: [
+          this.formInline.name1,
+          this.formInline.name2,
+          this.formInline.name3
+        ],
+        excludedConceptIds: this.excludedConceptIds,
+        logicalOperator: this.formInline.logicalOperator
       };
-      const data = await api.getTreeSearchList(params)
+      const data = await api.searchCollectionConceptVO(params);
       if (data.data.code == '0') {
         this.conceptList = data.data.data;
         this.whether = false;
       }
     },
-    // 选择基础术语
-    selectConcept(item) {
+    btn(row) {
       if (this.whether) {
         return;
       }
       let concepts = {
-        conceptId: item.conceptId,
-        conceptLibType: item.conceptNameType,
-        conceptLibName: item.conceptName
+        conceptId: row.conceptId,
+        conceptLibType: row.libType,
+        conceptLibName: row.conceptName
       };
-      this.excludedConceptIds.push(item.conceptId);
+      this.excludedConceptIds.push(row.conceptId);
       this.form.concepts.push(concepts);
-      this.getList(this.form.concepts);
-      this.conceptList = []
+      this.leftList = this.form.concepts;
+      this.conceptList = [];
+      this.searchtext = '';
+      this.searchtext2 = '';
+      this.$nextTick(() => {
+        setTimeout(() => {
+          this.getTreeSearchList();
+        }, 150);
+      });
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    add() {
+      if (this.multipleSelection.length == 0) {
+        this.$message({
+          message: '添加数据不能为空',
+          type: 'warning'
+        });
+        return;
+      }
+      this.processing(this.multipleSelection);
+      this.searchtext = '';
+      this.searchtext2 = '';
+    },
+    //去重
+    unique(arr) {
+      let obj = {};
+      arr = arr.reduce(function(item, next) {
+        obj[next.conceptId]
+          ? ''
+          : (obj[next.conceptId] = true && item.push(next));
+        return item;
+      }, []);
+      return arr;
+    },
+    //过滤数组去重
+    unique2(arr) {
+      let obj = {};
+      arr = arr.reduce(function(item, next) {
+        obj[next] ? '' : (obj[next] = true && item.push(next));
+        return item;
+      }, []);
+      return arr;
+    },
+    //处理数据
+    processing(arr) {
+      if (this.whether) {
+        return;
+      }
+      arr.forEach(it => {
+        let concepts = {
+          conceptId: it.conceptId,
+          conceptLibType: it.libType ? it.libType : it.conceptLibType,
+          conceptLibName: it.conceptName ? it.conceptName : it.conceptLibName
+        };
+        this.excludedConceptIds.push(it.conceptId);
+        this.form.concepts.push(concepts);
+      });
+
+      this.form.concepts = this.unique(this.form.concepts);
+      this.excludedConceptIds = this.unique2(this.excludedConceptIds);
+      this.leftList = this.form.concepts;
+      this.conceptList = [];
+      this.multipleSelection = [];
       this.$nextTick(() => {
         setTimeout(() => {
           this.getTreeSearchList();
@@ -475,44 +634,48 @@ export default {
     },
     // 移除术语
     showDelDialog(row) {
-      this.form.concepts.forEach((item, index) => {
-        if (item.conceptId == row.conceptId) {
-          this.form.concepts.splice(index, 1);
-          this.excludedConceptIds.splice(index, 1);
-        }
-      });
-      this.getTreeSearchList();
-      if (this.searchtext != '') {
-        this.searchList(this.searchtext);
+      if (this.searchtext == '' && this.searchtext2 == '') {
+        this.form.concepts.forEach((item, index) => {
+          if (item.conceptId == row.conceptId) {
+            this.form.concepts.splice(index, 1);
+            this.excludedConceptIds.splice(index, 1);
+          }
+        });
+        this.leftList = this.form.concepts;
       } else {
-        this.getList(this.form.concepts);
+        this.leftList.forEach((item, index) => {
+          if (item.conceptId == row.conceptId) {
+            this.leftList.splice(index, 1);
+          }
+        });
+        this.form.concepts.forEach((item, index) => {
+          if (item.conceptId == row.conceptId) {
+            this.form.concepts.splice(index, 1);
+            this.excludedConceptIds.splice(index, 1);
+          }
+        });
       }
-    },
-    getchk(num) {
-      return num % 2 == 0 ? '偶数' : '奇数'; //判断是否能整除2
-    },
-    getList(arr) {
-      this.firstList = [];
-      this.lastList = [];
-      arr.forEach((item, index) => {
-        if (this.getchk(index) == '偶数') {
-          this.firstList.push(item);
-        } else {
-          this.lastList.push(item);
-        }
-      });
+      this.getTreeSearchList();
     },
     saveSet() {
       let params = {
         ...this.form,
         relationId: 0
       };
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
       api.saveOrUpdateRecord(params).then(res => {
+        loading.close();
         if (res.data.code == 0) {
           this.$message({
             message: '操作成功',
             type: 'success'
           });
+          this.loading2 = false;
           this.isSaveSuccess = true;
           this.$router.push({
             name: 'TermSet',
@@ -521,17 +684,73 @@ export default {
         } else {
           this.$message({
             message: res.data.msg,
-            type: 'warning'
+            type: 'error'
           });
+          loading.close();
         }
       });
     },
+    collectionMatch() {
+      this.innerText = this.innerText.replace(/(^\s*)|(\s*$)/g, "");
+      if (this.innerText.length == 0) {
+        this.$message({
+          message: '术语名称不能为空',
+          type: 'error'
+        });
+        return;
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      let params = {
+        conceptLibNames: this.innerText,
+        conceptLibType: this.form.conceptLibType
+      };
+      api
+        .collectionMatch(params)
+        .then(res => {
+          loading.close();
+          if (res.data.code == '0') {
+            const data = res.data.data;
+            let text = '';
+            if (data.matchList.length > 0) {
+              this.processing(data.matchList);
+              if (
+                data.unMatchList.length == 0 &&
+                data.disableList.length == 0
+              ) {
+                this.dialogVisible = false;
+              }
+            }
+            if (data.unMatchList.length > 0 || data.disableList.length > 0) {
+              this.$message({
+                message: '列表中存在非标准术语或禁用术语',
+                type: 'error'
+              });
+              let arr = data.unMatchList.concat(data.disableList);
+              arr.forEach(it => {
+                text += it.conceptLibName + '\n';
+              });
+            }
+            this.innerText = text;
+            this.searchtext = '';
+            this.searchtext2 = '';
+          }
+        })
+        .catch(error => {
+          console.log(error);
+          loading.close();
+        });
+    },
     clearData() {
       this.form.collectionLibName = '';
       this.conceptText = '';
       this.ruleTermTypeList = [];
       this.form.concepts = [];
-      this.getList(this.form.concepts);
+      this.leftList = [];
       this.getTreeSearchList();
     }
   },
@@ -570,6 +789,16 @@ export default {
       return (
         this.form.collectionLibType != '' && this.form.collectionLibName != ''
       );
+    },
+    len() {
+      let arr = this.innerText.split('\n');
+      let len = 0;
+      arr.forEach(it => {
+        if (it != '') {
+          len++;
+        }
+      });
+      return len;
     }
   }
 };

+ 1 - 15
src/components/knowledgeExtra/RuleManager.vue

@@ -42,21 +42,7 @@
     <div class="contents knowledgeContents">
       <el-table :data="list" border style="width: 100%">
         <el-table-column type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
-        <el-table-column prop="parDescription" label="规则名称" width="160">
-          <template slot-scope="scope">
-              <span>{{scope.row.parDescription}}</span>
-            <!-- <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="parDescription" label="规则名称" width="160"></el-table-column>
         <el-table-column prop="parRuleType" label="规则类型" width="150">
           <template slot-scope="scope">{{statusTrans(scope.row.parRuleType)}}</template>
         </el-table-column>

+ 29 - 25
src/components/knowledgeExtra/TermSet.vue

@@ -3,7 +3,12 @@
     <crumbs title="术语集合内容维护" :minWidth="titleWidth" class="knowledgeTitle">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item label="术语集合类型:">
-          <el-select v-model="filter.collectionLibType" clearable placeholder="请选择" size="mini">
+          <el-select
+            v-model.trim="filter.collectionLibType"
+            clearable
+            placeholder="请选择"
+            size="mini"
+          >
             <el-option
               v-for="item in ruleTypeList"
               :key="item.val"
@@ -13,15 +18,15 @@
           </el-select>
         </el-form-item>
         <el-form-item label="术语集合名称:">
-          <el-input size="mini" v-model="filter.collectionLibName" placeholder="请输入" clearable></el-input>
+          <el-input size="mini" v-model.trim="filter.collectionLibName" placeholder="请输入" clearable></el-input>
         </el-form-item>
         <el-form-item label="基础术语名称:">
-          <el-input size="mini" v-model="filter.conceptLibName" placeholder="请输入" clearable></el-input>
+          <el-input size="mini" v-model.trim="filter.conceptLibName" placeholder="请输入" clearable></el-input>
         </el-form-item>
       </el-form>
       <el-form :inline="true" class="demo-form-inline secLine">
         <el-form-item label="说明:">
-          <el-input size="mini" v-model="filter.collectionRemark" placeholder="请输入" clearable></el-input>
+          <el-input size="mini" v-model.trim="filter.collectionRemark" placeholder="请输入" clearable></el-input>
         </el-form-item>
         <el-form-item>
           <el-button size="mini" @click="filterDatas">确认</el-button>
@@ -35,7 +40,7 @@
     <div class="contents knowledgeContents">
       <el-table :data="list" border style="width: 100%">
         <el-table-column type="index" :index="indexMethod" label="编号" width="60"></el-table-column>
-        <el-table-column prop="collectionLibName" label="术语集合名称" ></el-table-column>
+        <el-table-column prop="collectionLibName" label="术语集合名称"></el-table-column>
         <el-table-column prop="conceptLibName" label="术语集合类型">
           <template slot-scope="scope">
             <span
@@ -43,7 +48,7 @@
             >{{item.val==scope.row.collectionLibType?item.name:''}}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="collectionRemark" label="说明"  width="400">
+        <el-table-column prop="collectionRemark" label="说明" width="400">
           <template slot-scope="scope">
             <el-tooltip
               v-if="scope.row.collectionRemark && scope.row.collectionRemark.length>80"
@@ -54,15 +59,17 @@
             >
               <span>{{scope.row.collectionRemark.slice(0,80)+'...'}}</span>
             </el-tooltip>
-            <span v-if="scope.row.collectionRemark && scope.row.collectionRemark.length<81">{{scope.row.collectionRemark}}</span>
+            <span
+              v-if="scope.row.collectionRemark && scope.row.collectionRemark.length<81"
+            >{{scope.row.collectionRemark}}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="concatConceptLibName" label="基础术语名称" >
+        <el-table-column prop="concatConceptLibName" label="基础术语名称">
           <template slot-scope="scope">
             <el-tooltip
               class="item"
               effect="dark"
-              :content="scope.row.concatConceptLibName"
+              :content="scope.row.concatConceptLibName.length>200?scope.row.concatConceptLibName.slice(0,200)+'...':scope.row.concatConceptLibName"
               placement="top"
             >
               <span
@@ -270,23 +277,20 @@ export default {
         ? {
             currentPage: this.currentPage,
             pageSize: this.pageSize,
-            filter: this.filter
-          }
-        : { currentPage: this.currentPage, pageSize: this.pageSize };
-      api
-        .getRecordById({ id })
-        .then(res => {
-          if (res.data.code == '0') {
-            const data = res.data.data;
-            this.$router.push({
-              name: 'AddTermSet',
-              params: { ...pam, data }
-            });
+            filter: this.filter,
+            type: 2,
+            id: id
           }
-        })
-        .catch(error => {
-          this.warning('获取详情失败,请重试');
-        });
+        : {
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            type: 2,
+            id: id
+          };
+      this.$router.push({
+        name: 'AddTermSet',
+        params: { ...pam }
+      });
     },
     showDelDialog(row) {
       const param = {

+ 2 - 2
vue.config.js

@@ -1,6 +1,6 @@
 const path = require('path');
-// const proxy_path = 'http://192.168.2.241:88';
-const proxy_path = 'http://192.168.2.236:88';
+const proxy_path = 'http://192.168.2.241:88';
+// const proxy_path = 'http://192.168.2.236:5050';
 // const proxy_path = 'http://192.168.3.101:5050';
 // const proxy_path = 'http://192.168.3.117:5050';//周铁刚
 // const proxy_path = 'http://192.168.3.113:5050'; //王峰