From 4857e4c124c0847fc6ff9976b57327cb7a1c7f97 Mon Sep 17 00:00:00 2001
From: wanglei <1336977847@qq.com>
Date: Mon, 22 Nov 2021 11:30:26 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/apps/AppNotification/AppNotification.vue | 29 ++++++++++++++------
src/apps/AppNotification/components/add.vue | 24 ++++++++++++----
2 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/src/apps/AppNotification/AppNotification.vue b/src/apps/AppNotification/AppNotification.vue
index 731e3b9d..e26f26ae 100644
--- a/src/apps/AppNotification/AppNotification.vue
+++ b/src/apps/AppNotification/AppNotification.vue
@@ -57,9 +57,9 @@
关闭
-
+ @confirm="confirm" :closeOnClickOverlay="true" @cancel="modal=false">
@@ -143,6 +143,7 @@
}).then(res => {
if (res.code == 0) {
this.$u.toast(this.content + "成功");
+ this.modal = false;
this.getList();
}
})
@@ -160,9 +161,13 @@
if (item.val == 0) {
this.show = false;
- return uni.navigateTo({
- url: "/pages/notification/components/detail?id=" + this.detail.id
- });
+ this.comp = "detail";
+ this.params = {
+ id: this.detail.id,
+ flag: true
+ };
+ this.showList = false;
+ return
}
if ([1, 2, 4].includes(item.val)) {
@@ -171,9 +176,13 @@
if (item.val == 3) {
this.show = false;
- return uni.navigateTo({
- url: "/pages/notification/components/add?id=" + this.detail.id + "&flag=" + false
- });
+ this.comp = "add";
+ this.params = {
+ id: this.detail.id,
+ flag: false
+ };
+ this.showList = false;
+ return
}
},
color(status) {
@@ -199,6 +208,10 @@
},
add() {
this.comp = "add";
+ this.params = {
+ id: null,
+ flag: false
+ };
this.showList = false;
},
change(val) {
diff --git a/src/apps/AppNotification/components/add.vue b/src/apps/AppNotification/components/add.vue
index f8526ae2..5d01efd0 100644
--- a/src/apps/AppNotification/components/add.vue
+++ b/src/apps/AppNotification/components/add.vue
@@ -61,7 +61,7 @@
-
+
@@ -74,6 +74,9 @@
export default {
name: "add",
components: {AiBack,AiSelectEnterprise,AiUploader},
+ props:{
+ params:Object
+ },
data() {
return {
show: false,
@@ -88,7 +91,7 @@
files: [],
},
userSelect: false,
- params: {
+ options: {
year: true,
month: true,
day: true,
@@ -100,10 +103,19 @@
flag: null,
}
},
- onLoad(opt) {
- if(opt.id) {
- this.form.id = opt.id;
- this.flag = opt.flag;
+ watch:{
+ params:{
+ handler:function (v) {
+ if(this.params?.id){
+ this.form.id = this.params?.id;
+ this.flag = this.params?.flag;
+ }
+ },
+ immediate:true
+ }
+ },
+ created() {
+ if(this.params?.id){
this.getDetail();
}
},