reaper 4 年 前
コミット
768f77f297
1 ファイル変更15 行追加4 行削除
  1. 15 4
      src/components/knowledgeExtra/AddNewRule.vue

+ 15 - 4
src/components/knowledgeExtra/AddNewRule.vue

@@ -140,7 +140,7 @@
               </el-select>
             </el-form-item>
           </div>
-          <div class="table_cell" v-if="showHasSub" style="max-width:25%">
+          <div class="table_cell" v-if="showHasSub" style="max-width: 25%">
             <el-form-item
               label-width="130px"
               label="有无子条件:"
@@ -157,7 +157,11 @@
               </el-select>
             </el-form-item>
           </div>
-          <div class="table_cell" style="flex: 3;max-width:50%" v-if="showMsg">
+          <div
+            class="table_cell"
+            style="flex: 3; max-width: 50%"
+            v-if="showMsg"
+          >
             <el-form-item
               label-width="130px"
               label="附加信息:"
@@ -636,7 +640,11 @@ export default {
       return Object.keys(this.firstPlace || {}).length > 0;
     },
     ruleTermCodeStr: function () {
-      return this.form.parRuleType + "-" + this.form.parLenCode;
+      const str = this.form.parRuleType + "-" + this.form.parLenCode;
+      if (str.length <= 1) {
+        return "";
+      }
+      return str;
     },
     showMsg: function () {
       return (
@@ -645,7 +653,10 @@ export default {
       );
     },
     showHasSub() {
-      return this.subDict.indexOf(this.ruleTermCodeStr) > -1;
+      if (this.ruleTermCodeStr.length != 0) {
+        return this.subDict.indexOf(this.ruleTermCodeStr) != -1;
+      }
+      return false;
     },
     checkFirstPlace: function () {
       return this.dict.indexOf(this.ruleTermCodeStr) > -1;