From 255e34123fb25dd5f45577a2e5a4047dc6a9e920 Mon Sep 17 00:00:00 2001 From: PQZ Date: Mon, 9 Dec 2024 17:17:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/base/cont/form/ContTempForm.vue | 14 +++++++++----- src/views/base/cont/index.vue | 2 +- .../company/property/position/PropertyPosForm.vue | 2 -- src/views/company/property/position/index.vue | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/views/base/cont/form/ContTempForm.vue b/src/views/base/cont/form/ContTempForm.vue index df719b6..dcad81c 100644 --- a/src/views/base/cont/form/ContTempForm.vue +++ b/src/views/base/cont/form/ContTempForm.vue @@ -88,7 +88,9 @@ export default { }, methods: { close(){ - this.$router.go(-1); + this.$router.push({ + name: "BaseContTemp", + }); }, /** 打开弹窗 */ async open(id) { @@ -106,7 +108,6 @@ export default { }, /** 提交按钮 */ async submitForm() { - debugger // 校验主表 await this.$refs["formRef"].validate(); this.formLoading = true; @@ -116,13 +117,17 @@ export default { if (data.id) { await ContTempApi.updateContTemp(data); this.$modal.msgSuccess("修改成功"); - this.$router.go(-1); + await this.$router.push({ + name: "BaseContTemp", + }); return; } // 添加的提交 await ContTempApi.createContTemp(data); this.$modal.msgSuccess("新增成功"); - this.$router.go(-1); + await this.$router.push({ + name: "BaseContTemp", + }); } finally { this.formLoading = false; } @@ -139,7 +144,6 @@ export default { status: undefined, tempContent: undefined, }; - debugger this.resetForm("formRef"); } } diff --git a/src/views/base/cont/index.vue b/src/views/base/cont/index.vue index 75a5d4c..4633ef7 100644 --- a/src/views/base/cont/index.vue +++ b/src/views/base/cont/index.vue @@ -91,7 +91,7 @@ import * as ContTempApi from '@/api/base/cont'; export default { - name: "ContTemp", + name: "BaseContTemp", components: { }, data() { diff --git a/src/views/company/property/position/PropertyPosForm.vue b/src/views/company/property/position/PropertyPosForm.vue index 0c41a20..f0b8c64 100644 --- a/src/views/company/property/position/PropertyPosForm.vue +++ b/src/views/company/property/position/PropertyPosForm.vue @@ -67,8 +67,6 @@ export default { formRules: { posName: [{ required: true, message: '存放地名称不能为空', trigger: 'blur' }], depositType: [{ required: true, message: '存放类型不能为空', trigger: 'blur' }], - area: [{ required: true, message: '面积不能为空', trigger: 'blur' }], - address: [{ required: true, message: '存放地地址不能为空', trigger: 'blur' }], }, }; }, diff --git a/src/views/company/property/position/index.vue b/src/views/company/property/position/index.vue index 0d9f077..1230d8b 100644 --- a/src/views/company/property/position/index.vue +++ b/src/views/company/property/position/index.vue @@ -36,7 +36,7 @@ }} - +