From f3eb217f5e2f18b855d179970c5b2c103bdf48db Mon Sep 17 00:00:00 2001 From: "DESKTOP-369JRHT\\12997" <9> Date: Tue, 5 Nov 2024 18:04:38 +0800 Subject: [PATCH] 11.5 --- .../src/views/notificationList/index.vue | 5 +- fuintAdmin/src/views/power/page/mode.vue | 88 +++++++++++-------- fuintAdmin/src/views/shopowner.vue | 2 +- 3 files changed, 55 insertions(+), 40 deletions(-) diff --git a/fuintAdmin/src/views/notificationList/index.vue b/fuintAdmin/src/views/notificationList/index.vue index bdbdce4b3..36ab9d4cb 100644 --- a/fuintAdmin/src/views/notificationList/index.vue +++ b/fuintAdmin/src/views/notificationList/index.vue @@ -123,7 +123,7 @@ export default { } .table-box { width: 100%; - height: 66vh; + height: 81vh; overflow: auto; background: #FFF; box-sizing: border-box; @@ -133,7 +133,8 @@ export default { } .hui_box{ box-sizing: border-box; - padding: 15px; + padding: 10px; + padding-bottom: 0px; background: #f6f8f9; } .top-box{ diff --git a/fuintAdmin/src/views/power/page/mode.vue b/fuintAdmin/src/views/power/page/mode.vue index bfbc704fd..a799169d5 100644 --- a/fuintAdmin/src/views/power/page/mode.vue +++ b/fuintAdmin/src/views/power/page/mode.vue @@ -87,14 +87,14 @@ - + - + - + @@ -104,7 +104,7 @@ - +
@@ -115,7 +115,7 @@
- + @@ -125,7 +125,7 @@ - +
取消 - 保存 + 保存
@@ -206,6 +206,24 @@ export default { legalRepresentativeContact: '', appStatus: '', }, + rules: { + notificationName: [ + { required: true, message: '不能为空', trigger: 'blur' }, + ], + notificationType:[ + { required: true, message: '不能为空', trigger: 'blur' }, + ], + templateContent:[ + { required: true, message: '不能为空', trigger: 'blur' }, + ], + recipientRoles:[ + { required: true, message: '不能为空', trigger: 'blur' }, + ], + conditions:[ + { required: true, message: '不能为空', trigger: 'blur' }, + ], + }, + roleList: [], }; }, @@ -264,38 +282,34 @@ export default { // }); // }, - handleSubmit() { - this.open = false + handleSubmit(formName) { + + this.$refs[formName].validate((valid) =>{ + if (valid) { + // 表单验证通过,可以提交数据 + this.open = false + if (this.form.id) { + updateSysNotifyApi(this.form).then(res => { + if (res.code === 200) { + this.getList() + this.open = false + } + }) + } else { + saveSysNotifyApi(this.form).then(res => { + if (res.code === 200) { + this.getList() + this.open = false + } + }) + } + + } + + }) + - // 在这里调用接口提交设备信息数据 - console.log('提交设备信息数据:', this.form); - if (this.form.conditions.length === 0 || this.form.conditions[0].field == '') { - this.form.conditions = '' - this.$message({ - type: 'info', - message: '请选择发送条件!' - }); - return - } else { - this.form.conditions = JSON.stringify(this.form.conditions) - } - this.form.recipientRoles = JSON.stringify(this.form.recipientRoles) - if (this.form.id) { - updateSysNotifyApi(this.form).then(res => { - if (res.code === 200) { - this.getList() - this.open = false - } - }) - } else { - saveSysNotifyApi(this.form).then(res => { - if (res.code === 200) { - this.getList() - this.open = false - } - }) - } }, handleReset() { this.open = false diff --git a/fuintAdmin/src/views/shopowner.vue b/fuintAdmin/src/views/shopowner.vue index 146ac3fcc..657d9154a 100644 --- a/fuintAdmin/src/views/shopowner.vue +++ b/fuintAdmin/src/views/shopowner.vue @@ -1271,7 +1271,7 @@ export default background: #fff; box-sizing: border-box; padding: 20px; - margin-top: 20px; + margin-top:15px; } .anniu-h {