diff --git a/src/views/quality/checkreport/index.vue b/src/views/quality/checkreport/index.vue index 5d9b7d4..a9aa60f 100644 --- a/src/views/quality/checkreport/index.vue +++ b/src/views/quality/checkreport/index.vue @@ -205,7 +205,7 @@ export default { data() { return { queryParams: { - checkDate: moment(moment().add(-1, 'days').startOf('day').valueOf()).format('YYYY-MM-DD') + checkDate: moment(moment().add(-0, 'days').startOf('day').valueOf()).format('YYYY-MM-DD') }, pickerOption: { disabledDate(date) { diff --git a/src/views/quality/checkrule/CheckRuleAdd.vue b/src/views/quality/checkrule/CheckRuleAdd.vue index d08c591..51a12b3 100644 --- a/src/views/quality/checkrule/CheckRuleAdd.vue +++ b/src/views/quality/checkrule/CheckRuleAdd.vue @@ -3,14 +3,17 @@
{{ title }} - {{ loadingOptions.loadingText }} + {{ + loadingOptions.loadingText }} + 返回
- + @@ -70,14 +73,15 @@ - + - + - + - + - + + + + + + + + + + + + + 手机号码 + 邮箱 + 整数 + 负数 + 身份证 + 日期格式yyyy-mm-dd + IP + + + {{ dict.itemValue }} + >{{ dict.itemValue }} + - +
@@ -166,7 +194,7 @@ export default { props: { data: { type: Object, - default: function() { + default: function () { return {} } } @@ -222,9 +250,13 @@ export default { }, accuracy: { maxLength: undefined + }, + regular: { + regular: undefined } }, - status: '1' + status: '1', + zzStatus: '0' // 状态正则 }, // 表单校验 rules: { @@ -307,7 +339,7 @@ export default { }) }, ruleItemSelectChanged(val) { - const item = this.ruleItemOptions.find(function(item) { + const item = this.ruleItemOptions.find(function (item) { return item.id === val }) this.form.ruleConfig.ruleItemCode = item.itemCode @@ -317,7 +349,7 @@ export default { if (response.success) { this.tableOptions = response.data this.columnOptions = [] - const source = this.sourceOptions.find(function(item) { + const source = this.sourceOptions.find(function (item) { return item.id === val }) this.form.ruleSource = source.sourceName @@ -335,7 +367,7 @@ export default { listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => { if (response.success) { this.columnOptions = response.data - const table = this.tableOptions.find(function(item) { + const table = this.tableOptions.find(function (item) { return item.id === val }) this.form.ruleTable = table.tableName @@ -347,7 +379,7 @@ export default { }) }, columnSelectChanged(val) { - const column = this.columnOptions.find(function(item) { + const column = this.columnOptions.find(function (item) { return item.id === val }) this.form.ruleColumn = column.columnName @@ -355,7 +387,7 @@ export default { this.$forceUpdate() }, dictTypeSelectChanged(val) { - const item = this.dictTypeOptions.find(function(item) { + const item = this.dictTypeOptions.find(function (item) { return item.id === val }) this.form.ruleConfig.consistent.gbTypeCode = item.gbTypeCode @@ -365,7 +397,7 @@ export default { listDataColumn({ sourceId: this.form.ruleSourceId, tableId: val }).then(response => { if (response.success) { this.relatedColumnOptions = response.data - const table = this.tableOptions.find(function(item) { + const table = this.tableOptions.find(function (item) { return item.id === val }) this.form.ruleConfig.relevance.relatedTable = table.tableName @@ -377,19 +409,20 @@ export default { }) }, relatedColumnSelectChanged(val) { - const column = this.relatedColumnOptions.find(function(item) { + const column = this.relatedColumnOptions.find(function (item) { return item.id === val }) this.form.ruleConfig.relevance.relatedColumn = column.columnName this.form.ruleConfig.relevance.relatedColumnComment = column.columnComment }, /** 提交按钮 */ - submitForm: function() { + submitForm: function () { this.$refs['form'].validate(valid => { if (valid) { this.loadingOptions.loading = true this.loadingOptions.loadingText = '保存中...' this.loadingOptions.isDisabled = true + console.log("this.form====", this.form) addCheckRule(this.form).then(response => { if (response.success) { this.$message.success('保存成功') @@ -410,14 +443,22 @@ export default { }) } }) + }, + handleZzStatusRadioChange(value) { + // 在这里执行其他需要的操作 + if (value === '1') { + this.form.ruleConfig.regular.regular = '^[1-9][0-9]{10}$' + } else if (value === '2') { + this.form.ruleConfig.regular.regular = '^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$' + } } } }