wyq 4 سال پیش
والد
کامیت
1f3fb34b98
1فایلهای تغییر یافته به همراه23 افزوده شده و 15 حذف شده
  1. 23 15
      src/components/knowledgeExtra/AddNewRuleTable.vue

+ 23 - 15
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -40,7 +40,7 @@
   .form-texarea {
     /deep/ .el-form-item__error {
       // position: absolute;
-      top: 54px!important;
+      top: 54px !important;
     }
     /deep/ .el-textarea__inner {
       resize: none;
@@ -178,12 +178,7 @@
           </el-form-item>
         </template>
       </el-table-column>
-      <el-table-column
-        width="80px"
-        v-if="maxNum && maxNum > 1"
-        label="基础规则"
-        prop="groupType"
-      >
+      <el-table-column width="80px" v-if="maxNum && maxNum > 1" label="基础规则" prop="groupType">
         <template slot-scope="scope">
           <div class="btn_box">
             <div class="btn_div" v-if="!isMax(scope.row.groupId)">
@@ -715,11 +710,13 @@ export default {
     isMax(id) {
       const typeNum = this.klRuleByIdSub.filter(item => item.groupId === id)
         .length;
+      console.log(typeNum);
+      console.log(this.maxNum);
       return typeNum >= this.maxNum;
     },
     // 基础规则类型选择
     subTypeChange(e, index) {
-      console.log(e)
+      console.log(e);
       this.$emit('subTypeChange', e, index);
     },
     //
@@ -798,13 +795,24 @@ export default {
     },
     // 合并单元格
     ObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
-      if (columnIndex == 0 || columnIndex == 1) {
-        const _row = this.spanArr[rowIndex];
-        const _col = _row > 0 ? 1 : 0;
-        return {
-          rowspan: _row,
-          colspan: _col
-        };
+      if (this.ruleTermCodeStr == '3-108-1' || this.ruleTermCodeStr == '4-108-1') {
+        if (columnIndex == 0) {
+          const _row = this.spanArr[rowIndex];
+          const _col = _row > 0 ? 1 : 0;
+          return {
+            rowspan: _row,
+            colspan: _col
+          };
+        }
+      } else {
+        if (columnIndex == 0 || columnIndex == 1) {
+          const _row = this.spanArr[rowIndex];
+          const _col = _row > 0 ? 1 : 0;
+          return {
+            rowspan: _row,
+            colspan: _col
+          };
+        }
       }
     },
     showDataType(index) {