From 36d55c999ea546664cf98fc1f6bfb16077981626 Mon Sep 17 00:00:00 2001
From: wanglei <1336977847@qq.com>
Date: Mon, 13 Dec 2021 14:02:07 +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 | 47 +-
src/apps/AppNotification/add.vue | 20 +-
src/apps/AppNotification/detail.vue | 525 ++++++++++---------
3 files changed, 287 insertions(+), 305 deletions(-)
diff --git a/src/apps/AppNotification/AppNotification.vue b/src/apps/AppNotification/AppNotification.vue
index 04a97ba5..2c7cc54e 100644
--- a/src/apps/AppNotification/AppNotification.vue
+++ b/src/apps/AppNotification/AppNotification.vue
@@ -171,7 +171,7 @@ export default {
this.show = false;
this.changeState();
},
- handleOpt(item) {
+ handleOpt(item){
this.content = {
1: "撤回",
2: "发布",
@@ -180,27 +180,20 @@ export default {
if (item.val == 0) {
this.show = false;
- this.comp = "detail";
- this.params = {
- id: this.detail.id,
- flag: true
- };
- this.showList = false;
- return
+ return uni.navigateTo({
+ url: "/apps/notification/detail?id=" + this.detail.id
+ });
}
- if ([1, 2, 4].includes(item.val)) {
+ if ([1,2,4].includes(item.val)) {
return this.modal = true;
}
- if (item.val == 3) {
+ if(item.val==3){
this.show = false;
- this.comp = "add";
- this.params = {
- id: this.detail.id,
- flag: false
- };
- this.showList = false;
+ return uni.navigateTo({
+ url:"/apps/notification/add?id=" + this.detail.id + "&flag=" + false
+ });
}
},
color(status) {
@@ -215,22 +208,16 @@ export default {
this.detail = item;
if (this.index == 1) {
this.show = true;
- } else {
- this.comp = "detail";
- this.params = {
- id: this.detail.id,
- flag: true
- };
- this.showList = false;
+ }else {
+ uni.navigateTo({
+ url: "/apps/notification/detail?id=" + this.detail.id + "&flag=" + true
+ })
}
},
- add() {
- this.comp = "add";
- this.params = {
- id: null,
- flag: false
- };
- this.showList = false;
+ add(){
+ uni.navigateTo({
+ url: "/apps/notification/add"
+ })
},
change(val) {
this.index = val;
diff --git a/src/apps/AppNotification/add.vue b/src/apps/AppNotification/add.vue
index 1283cdf4..98dda13c 100644
--- a/src/apps/AppNotification/add.vue
+++ b/src/apps/AppNotification/add.vue
@@ -100,23 +100,16 @@ export default {
},
}
},
- watch: {
- params: {
- handler: function () {
- if (this.params?.id) {
- this.form.id = this.params?.id;
- this.flag = this.params?.flag;
- }
- },
- immediate: true
- }
- },
- created() {
+
+ onLoad(opt) {
document.title = "新增公告";
- if (this.params?.id) {
+ if(opt.id) {
+ this.form.id = opt.id;
+ this.flag = opt.flag;
this.getDetail();
}
},
+
methods: {
...mapActions(['selectEnterpriseContact']),
handleSelectUser() {
@@ -125,7 +118,6 @@ export default {
type: ["user"],
selectedUserIds: this.form.persons?.map(e => e.id)
}).then(res => {
- console.log(res);
this.form.persons = res?.userList || []
})
},
diff --git a/src/apps/AppNotification/detail.vue b/src/apps/AppNotification/detail.vue
index 7fc19362..52811928 100644
--- a/src/apps/AppNotification/detail.vue
+++ b/src/apps/AppNotification/detail.vue
@@ -60,299 +60,302 @@