diff --git a/src/views/inspection/inspectiontasks.vue b/src/views/inspection/inspectiontasks.vue index d480ec8..c9fdfd1 100644 --- a/src/views/inspection/inspectiontasks.vue +++ b/src/views/inspection/inspectiontasks.vue @@ -61,8 +61,8 @@ @close="handleClose"> + ref="resultForm"> + 取 消 @@ -95,6 +95,7 @@ import {auditing, reject} from "@/api/leger/equipmentledger"; import expUtil from "@/util/exportUtil"; import {getToken} from "@/util/auth"; + import admin from "@/util/admin"; export default { data() { @@ -344,7 +345,7 @@ prop: "executeStartDate", type: "datetime", format: 'yyyy年MM月dd日 HH时mm分', - valueFormat: "yyyy/MM/dd HH:mm", + valueFormat: "yyyy/MM/dd HH:mm:ss", span:22, labelWidth: 150, rules: [{required: true, validator: validateStartTime, trigger: 'blur' }] @@ -354,7 +355,7 @@ prop: "executeEndDate", type: "datetime", format: 'yyyy年MM月dd日 HH时mm分', - valueFormat: "yyyy/MM/dd HH:mm", + valueFormat: "yyyy/MM/dd HH:mm:ss", span:22, labelWidth: 150, row: true, @@ -469,17 +470,20 @@ }, resultAdd(row) { this.resultBox = true; - this.$refs.resultForm.resetFields(); - this.currTaskNo = row.taskNo; - this.currStartDate = row.taskStartDate; - this.currEndDate = row.taskEndDate; + + setTimeout(() => { + this.$refs.resultForm.resetForm(); + this.currTaskNo = row.taskNo; + this.currStartDate = row.taskStartDate; + }, 100); }, submitResult(row, done, loading) { this.resultForm.taskNo = this.currTaskNo; - const form = this.$refs.resultForm; - form.validate((valid) => { + this.$refs.resultForm.validate((valid, done, msg) => { if (valid) { + done() add(this.resultForm).then(() => { + this.$refs.resultForm.resetForm(); this.resultBox = false; this.onLoad(this.page); this.$message({