ZZJ
2022-07-15 a3f357e8a60443b74b64c7479113c68eb35ce1f5
src/pages/library/components/addBase.vue
@@ -213,9 +213,9 @@
        },
      },
      rules: {
        tableName: [{ required: true, message: "底库名称不能为空"}],
        tableName: [{ required: true, message: "底库名称不能为空" }],
        tableType: [{ required: true, message: "底库类型不能为空" }],
        bwType: [{ required: true, message: "黑白名单必选"}],
        bwType: [{ required: true, message: "黑白名单必选" }],
        startTime: [
          { required: !this.foreverChecked, message: "请选择起始时间" },
        ],
@@ -305,7 +305,6 @@
              bwType: this.form.bwType,
              enable: this.form.enable,
              tableDesc: this.form.tableDesc,
              // isSync: this.form.isSync,
            });
            if (res.success === true) {
              this.$notify({
@@ -314,6 +313,7 @@
                type: "success",
              });
              this.$emit("refresh");
              this.$emit("closeAdd");
            } else {
              this.$notify({
                title: "失败",
@@ -342,22 +342,22 @@
              enabled: this.form.enabled,
              tableDesc: this.form.tableDesc,
              analyServerId: this.type,
              // isSync: this.form.isSync,
            })
              .then((res) => {
                this.$notify({
                  title: "成功",
                  message: "底库信息保存成功!",
                  type: "success",
                });
                this.$emit("refresh");
                if (res.success) {
                  this.$notify({
                    title: "成功",
                    message: "底库信息保存成功!",
                    type: "success",
                  });
                  this.$emit("refresh");
                  this.$emit("closeAdd");
                } else {
                  this.$notify.error(err.msg);
                }
              })
              .catch((err) => {
                this.$notify({
                  title: "失败",
                  message: err.data,
                  type: "error",
                });
                this.$notify.error(err.msg);
              });
          }
        });
@@ -374,7 +374,7 @@
    init() {
      if (Object.keys(this.baseObject).length > 3) {
        this.form = this.baseObject;
        this.foreverChecked = !this.form.endTime
        this.foreverChecked = !this.form.endTime;
      } else {
        this.$refs.baseForm.resetFields();
      }
@@ -394,7 +394,7 @@
      return new Date(dateArray[0], dateArray[1] - 1, dateArray[2]);
    },
    isEmpty(str) {
        return !str || str === undefined || str === null
      return !str || str === undefined || str === null;
    },
    dateCompare(dateString, compareDateString) {
      // dateString:当前时间
@@ -601,12 +601,12 @@
    }
    .el-form-item__error {
      color: #fe6d68;
      padding-top: 3px;
      padding-top: 5px;
      left: 15px;
    }
    .start-time-pick {
      .el-form-item__error {
        top: 36px;
        top: 34px;
        left: 105px;
      }
    }