Browse Source

fixbug 7733

reaper 4 years ago
parent
commit
0887776be3

+ 50 - 1
src/components/knowledgeExtra/AddNewRule.vue

@@ -48,6 +48,29 @@
   /deep/ .el-form-item.is-success .el-textarea__inner {
     border-color: #c9c9c9 !important;
   }
+  .my_error {
+    position: absolute;
+    top: 0;
+    left: -16px;
+    img {
+      width: 12px;
+      height: 12px;
+      cursor: pointer;
+    }
+  }
+}
+</style>
+<style lang="less">
+
+.popper_class {
+  // background: #fff !important;
+  border: 1px solid #FFA0A0 !important;
+  color: #999999 !important;
+  padding: 3px 50px 3px 10px !important;
+  margin-left: -10px;
+}
+.popper__arrow{
+  border-top-color: #FFA0A0!important;
 }
 </style>
 <template>
@@ -96,6 +119,19 @@
                 >
                 </el-option>
               </el-select>
+              <template slot="error" slot-scope="scope">
+                <div class="my_error">
+                  <el-tooltip
+                    class="item"
+                    effect="light"
+                    :content="scope.error"
+                    placement="top-start"
+                    popper-class="popper_class"
+                  >
+                    <img src="../../images/exclamationpoint.png" alt="" />
+                  </el-tooltip>
+                </div>
+              </template>
               <div class="tip_text">
                 注:更改规则类型,将会清空已填写的规则内容~
               </div>
@@ -109,6 +145,19 @@
               :rules="rules.parLenCode"
               prop="parLenCode"
             >
+              <template slot="error" slot-scope="scope">
+                <div class="my_error">
+                  <el-tooltip
+                    class="item"
+                    effect="light"
+                    :content="scope.error"
+                    placement="top-start"
+                    popper-class="popper_class"
+                  >
+                    <img src="../../images/exclamationpoint.png" alt="" />
+                  </el-tooltip>
+                </div>
+              </template>
               <el-select
                 v-model="form.parLenCode"
                 placeholder="请选择"
@@ -659,7 +708,7 @@ export default {
         });
       },
       deep: true
-    },
+    }
     // "form.parHasSub"(val) {
     //   console.log(val);
     //   console.log(this.form);

+ 41 - 42
src/components/knowledgeExtra/AddNewRuleTable.vue

@@ -558,7 +558,7 @@ export default {
           `klRuleByIdSub[${val}].subMinOperator`
         ]);
       }
-      this.setScrollRight()
+      this.setScrollRight();
     },
     minChange(e, val, type) {
       if (
@@ -580,7 +580,7 @@ export default {
           `klRuleByIdSub[${val}].subMaxValue`
         ]);
       }
-      this.setScrollRight()
+      this.setScrollRight();
     },
     addGroup(scope) {
       this.$emit("addGroup", null, { groupId: scope.row.groupId });
@@ -805,47 +805,46 @@ export default {
   beforeUpdate() {
     this.getSpanArr(this.klRuleByIdSub);
   },
-  mounted() {},
-  // beforeUpdate() {
-  //   this.getSpanArr(this.klRuleByIdSub);
-  //   console.log("boxxxxxxx", this.box);
-  //   // if (this.box) {
-  //   //   this.box.removeEventListener("scroll");
-  //   // }
-  //   // console.log(box);
-  //   // if (!this.box) {
-  //     this.box = document.querySelector(".el-table__body-wrapper");
-  //   // }
 
-  //   let that = this;
-  //   this.box.addEventListener("scroll", function (e) {
-  //     console.log(that.klRuleByIdSub.length);
-  //     console.log('subType',that.$refs[`klRuleByIdSub[1].subType`]);
-  //     that.klRuleByIdSub.forEach((ite, index) => {
-  //       // console.log(
-  //       //   that.$refs[`klRuleByIdSub[${index}].subType`],
-  //       //   that.$refs[`klRuleByIdSub[${index}].subLenCode`],
-  //       //   that.$refs[`klRuleByIdSub[${index}].subConceptId`],
-  //       //   that.$refs[`klRuleByIdSub[${index}].subMaxOperator`],
-  //       //   that.$refs[`klRuleByIdSub[${index}].subMinOperator`],
-  //       //   that.$refs[`klRuleByIdSub[${index}].subMinOperator`]
-  //       // );
-  //       that.$refs[`klRuleByIdSub[${index}].subType`] &&
-  //         that.$refs[`klRuleByIdSub[${index}].subType`].blur();
-  //       that.$refs[`klRuleByIdSub[${index}].subLenCode`] &&
-  //         that.$refs[`klRuleByIdSub[${index}].subLenCode`].blur();
-  //       that.$refs[`klRuleByIdSub[${index}].subConceptId`] &&
-  //         that.$refs[`klRuleByIdSub[${index}].subConceptId`].blur();
-  //       that.$refs[`klRuleByIdSub[${index}].dataType`] &&
-  //         that.$refs[`klRuleByIdSub[${index}].dataType`].blur();
-  //       that.$refs[`klRuleByIdSub[${index}].subMaxOperator`] &&
-  //         that.$refs[`klRuleByIdSub[${index}].subMaxOperator`].blur();
-  //       that.$refs[`klRuleByIdSub[${index}].subMinOperator`] &&
-  //         that.$refs[`klRuleByIdSub[${index}].subMinOperator`].blur();
-  //       that.$refs[`klRuleByIdSub[${index}]subMinOperator`] &&
-  //         that.$refs[`klRuleByIdSub[${index}]subMinOperator`].blur();
-  //     });
-  //   });
+  // watch: {
+  //   klRuleByIdSub: {
+  //     handler() {
+  //       let that = this;
+  //       // let box = document.querySelector(".el-table__body-wrapper");
+  //       this.$refs.table.bodyWrapper.addEventListener("scroll", function (e) {
+  //         // console.log(that.klRuleByIdSub.length);
+  //         // console.log('subType',that.$refs[`klRuleByIdSub[1].subType`]);
+  //         that.$nextTick(() => {
+  //           that.klRuleByIdSub.forEach((ite, index) => {
+  //             console.log(index);
+  //             console.log(
+  //               that.$refs[`klRuleByIdSub[${index}].subType`],
+  //               that.$refs[`klRuleByIdSub[${index}].subLenCode`],
+  //               that.$refs[`klRuleByIdSub[${index}].subConceptId`],
+  //               that.$refs[`klRuleByIdSub[${index}].subMaxOperator`],
+  //               that.$refs[`klRuleByIdSub[${index}].subMinOperator`],
+  //               that.$refs[`klRuleByIdSub[${index}].subMinOperator`]
+  //             );
+  //             that.$refs[`klRuleByIdSub[${index}].subType`] &&
+  //               that.$refs[`klRuleByIdSub[${index}].subType`].blur();
+  //             that.$refs[`klRuleByIdSub[${index}].subLenCode`] &&
+  //               that.$refs[`klRuleByIdSub[${index}].subLenCode`].blur();
+  //             that.$refs[`klRuleByIdSub[${index}].subConceptId`] &&
+  //               that.$refs[`klRuleByIdSub[${index}].subConceptId`].blur();
+  //             that.$refs[`klRuleByIdSub[${index}].dataType`] &&
+  //               that.$refs[`klRuleByIdSub[${index}].dataType`].blur();
+  //             that.$refs[`klRuleByIdSub[${index}].subMaxOperator`] &&
+  //               that.$refs[`klRuleByIdSub[${index}].subMaxOperator`].blur();
+  //             that.$refs[`klRuleByIdSub[${index}].subMinOperator`] &&
+  //               that.$refs[`klRuleByIdSub[${index}].subMinOperator`].blur();
+  //             that.$refs[`klRuleByIdSub[${index}]subMinOperator`] &&
+  //               that.$refs[`klRuleByIdSub[${index}]subMinOperator`].blur();
+  //           });
+  //         });
+  //       });
+  //     },
+  //     deep: true
+  //   }
   // },
   updated() {},
   props: {

BIN
src/images/exclamationpoint.png