| | |
| | | }, |
| | | }, |
| | | 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: "请选择起始时间" }, |
| | | ], |
| | |
| | | bwType: this.form.bwType, |
| | | enable: this.form.enable, |
| | | tableDesc: this.form.tableDesc, |
| | | // isSync: this.form.isSync, |
| | | }); |
| | | if (res.success === true) { |
| | | this.$notify({ |
| | |
| | | type: "success", |
| | | }); |
| | | this.$emit("refresh"); |
| | | this.$emit("closeAdd"); |
| | | } else { |
| | | this.$notify({ |
| | | title: "失败", |
| | |
| | | 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); |
| | | }); |
| | | } |
| | | }); |
| | |
| | | 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(); |
| | | } |
| | |
| | | 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:当前时间 |
| | |
| | | } |
| | | .el-form-item__error { |
| | | color: #fe6d68; |
| | | padding-top: 5px; |
| | | padding-top: 5px; |
| | | left: 15px; |
| | | } |
| | | .start-time-pick { |