Browse Source

fixbug:5月20号下午

reaper 4 năm trước cách đây
mục cha
commit
3ce0b3e232

+ 17 - 10
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -108,18 +108,19 @@
       :data="klRuleByIdSub"
       size="mini"
       style="min-height: 200px"
-      height="calc(100vh - 443px)"
+      height="calc(100vh - 415px)"
       :row-style="rowStyle"
       :header-row-style="{ background: '#E3EAF4' }"
       :cell-style="cellStyle"
       :span-method="ObjectSpanMethod"
+      ref="table"
     >
       <el-table-column width="80px" label="组" prop="groupType" fixed="left">
         <template slot-scope="scope">
           <div class="btn_box">
             <div class="btn_div">
               <img
-                @click="$emit('addGroup', null, { groupId: scope.row.groupId })"
+                @click="addGroup(scope)"
                 src="../../images/add-new-rule-sub.png"
                 alt=""
               />
@@ -145,9 +146,7 @@
           <div class="btn_box">
             <div class="btn_div" v-if="!isMax(scope.row.groupId)">
               <img
-                @click="
-                  $emit('addGroup', scope.row.groupId, { index: scope.$index })
-                "
+                @click="addChildGroup(scope)"
                 src="../../images/add-new-rule-sub.png"
                 alt=""
               />
@@ -166,7 +165,7 @@
         </template>
       </el-table-column>
       <el-table-column width="170px" prop="subDescription">
-        <template slot="header" slot-scope="scope">
+        <template slot="header">
           <div class="custom_table_header">基础规则名称</div>
         </template>
         <template slot-scope="scope">
@@ -186,7 +185,7 @@
         </template>
       </el-table-column>
       <el-table-column width="170px" prop="subType">
-        <template slot="header" slot-scope="scope">
+        <template slot="header">
           <div class="custom_table_header">基础规则类型</div>
         </template>
         <template slot-scope="scope">
@@ -213,7 +212,7 @@
         </template>
       </el-table-column>
       <el-table-column width="170px" prop="subLenCode">
-        <template slot="header" slot-scope="scope">
+        <template slot="header">
           <div class="custom_table_header">基础规则术语类型</div>
         </template>
         <template slot-scope="scope">
@@ -240,7 +239,7 @@
         </template>
       </el-table-column>
       <el-table-column width="170px" label="医学标准术语" prop="subConceptId">
-        <template slot="header" slot-scope="scope">
+        <template slot="header">
           <div class="custom_table_header">医学标准术语</div>
         </template>
         <template slot-scope="scope">
@@ -399,7 +398,7 @@
                         validator: (rule, value, callback) => {
                           subMinValueRule(scope, rule, value, callback);
                         },
-                        trigger: [ 'blur']
+                        trigger: ['blur']
                       }
                     ]"
                   >
@@ -510,6 +509,14 @@ export default {
     };
   },
   methods: {
+    addGroup(scope) {
+      this.$emit("addGroup", null, { groupId: scope.row.groupId });
+      this.$refs.table.bodyWrapper.scrollLeft = 0;
+    },
+    addChildGroup(scope) {
+      this.$emit("addGroup", scope.row.groupId, { index: scope.$index });
+      this.$refs.table.bodyWrapper.scrollLeft = 0;
+    },
     // table 隔行换色
     rowStyle({ row }) {
       if (row.rowIndex % 2 == 0) {

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

@@ -171,7 +171,7 @@
                 pageSizeArr:config.pageSizeArr,
                 pageLayout:config.pageLayout,
                 total: 0,
-                titleWidth:'1070px' //头部最小宽度
+                titleWidth:'970px' //头部最小宽度
             }
         },
         created() {