Procházet zdrojové kódy

边框颜色修改

wyq před 3 roky
rodič
revize
0475ac7348

+ 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);
     },

+ 65 - 19
src/components/knowledgeExtra/AddTermSet.vue

@@ -63,6 +63,7 @@
       .tabs {
         max-width: 100%;
         min-width: 100%;
+        border-color: #979797;
       }
       .form_btn {
         display: flex;
@@ -83,6 +84,7 @@
       .tabs {
         max-width: 100%;
         min-width: 100%;
+        border-color: #979797;
       }
       .inp {
         width: 100px;
@@ -132,6 +134,30 @@
   .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: #979797;
+  }
+  /deep/ .el-table--border,
+  .el-table--group {
+    border-color: #979797;
+  }
+  /deep/ .el-table td,
+  .el-table th.is-leaf {
+    border-bottom: 1px solid #979797;
+  }
+
+  /deep/ .el-table--border th,
+  .el-table--border th.gutter:last-of-type {
+    border-bottom: 1px solid #979797;
+  }
+
+  /deep/ .el-table--border td,
+  .el-table--border th {
+    border-right: 1px solid #979797;
+  }
 }
 .test_box {
   min-height: 300px;
@@ -228,7 +254,7 @@
               class="tabs"
               ref="table"
               :header-row-style="{height:'40px'}"
-              :header-cell-style="{height:'40px',background:'#f7f7f7'}"
+              :header-cell-style="{height:'40px',borderColor:'#979797'}"
             >
               <el-table-column prop="conceptLibName" :show-overflow-tooltip="true" label="术语名称"></el-table-column>
               <el-table-column label="操作">
@@ -290,7 +316,7 @@
               ref="tables"
               @row-click="btn"
               :header-row-style="{height:'40px'}"
-              :header-cell-style="{height:'40px',background:'#f7f7f7'}"
+              :header-cell-style="{height:'40px',borderColor:'#979797'}"
               @selection-change="handleSelectionChange"
             >
               <el-table-column type="selection"></el-table-column>
@@ -373,22 +399,16 @@ export default {
         collectionLibName: [
           { required: true, message: '请选择术语集合名称', trigger: 'change' }
         ]
-      },
+      }
     };
   },
   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.leftList = info.concepts;
+      this.getInfo(param.id);
       this.sign = 2;
       this.$nextTick(() => {
         this.getIds(this.form.concepts);
@@ -404,6 +424,35 @@ export default {
       let text = event.target.innerText;
       this.innerText = text.replace(/(^\s*)|(\s*$)/g, '');
     },
+    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;
+          }
+        })
+        .catch(error => {
+          loading.close();
+          this.warning('获取详情失败,请重试');
+        });
+    },
     collectcancel() {
       this.dialogVisible = false;
     },
@@ -565,9 +614,7 @@ export default {
     unique2(arr) {
       let obj = {};
       arr = arr.reduce(function(item, next) {
-        obj[next]
-          ? ''
-          : (obj[next] = true && item.push(next));
+        obj[next] ? '' : (obj[next] = true && item.push(next));
         return item;
       }, []);
       return arr;
@@ -586,7 +633,7 @@ export default {
         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;
@@ -638,7 +685,7 @@ export default {
         ...this.form,
         relationId: 0
       };
-     const loading = this.$loading({
+      const loading = this.$loading({
         lock: true,
         text: 'Loading',
         spinner: 'el-icon-loading',
@@ -703,13 +750,12 @@ export default {
             if (data.unMatchList.length > 0 || data.disableList.length > 0) {
               this.$message({
                 message: '列表中存在非标准术语或禁用术语',
-                type: 'error',
+                type: 'error'
               });
               let arr = data.unMatchList.concat(data.disableList);
               arr.forEach(it => {
                 text += it.conceptLibName + '\n';
               });
-              
             }
             this.$refs.msg.innerHTML = text;
             this.innerText = text;

+ 23 - 24
src/components/knowledgeExtra/TermSet.vue

@@ -3,7 +3,7 @@
     <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 +13,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 +35,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 +43,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,10 +54,12 @@
             >
               <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" :show-overflow-tooltip="true" label="基础术语名称">
           <template slot-scope="scope">
             <el-tooltip
               class="item"
@@ -270,23 +272,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 = {