From 7235ee4ec1efcc8a0fd70bbb586cc7959c6c1137 Mon Sep 17 00:00:00 2001 From: Dayu <1010@qq.com> Date: Fri, 12 Jul 2024 17:50:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inspection/inspectiontasks.vue | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) 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({