通知公告
This commit is contained in:
@@ -171,7 +171,7 @@ export default {
|
|||||||
this.show = false;
|
this.show = false;
|
||||||
this.changeState();
|
this.changeState();
|
||||||
},
|
},
|
||||||
handleOpt(item) {
|
handleOpt(item){
|
||||||
this.content = {
|
this.content = {
|
||||||
1: "撤回",
|
1: "撤回",
|
||||||
2: "发布",
|
2: "发布",
|
||||||
@@ -180,27 +180,20 @@ export default {
|
|||||||
|
|
||||||
if (item.val == 0) {
|
if (item.val == 0) {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
this.comp = "detail";
|
return uni.navigateTo({
|
||||||
this.params = {
|
url: "/apps/notification/detail?id=" + this.detail.id
|
||||||
id: this.detail.id,
|
});
|
||||||
flag: true
|
|
||||||
};
|
|
||||||
this.showList = false;
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([1, 2, 4].includes(item.val)) {
|
if ([1,2,4].includes(item.val)) {
|
||||||
return this.modal = true;
|
return this.modal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.val == 3) {
|
if(item.val==3){
|
||||||
this.show = false;
|
this.show = false;
|
||||||
this.comp = "add";
|
return uni.navigateTo({
|
||||||
this.params = {
|
url:"/apps/notification/add?id=" + this.detail.id + "&flag=" + false
|
||||||
id: this.detail.id,
|
});
|
||||||
flag: false
|
|
||||||
};
|
|
||||||
this.showList = false;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
color(status) {
|
color(status) {
|
||||||
@@ -215,22 +208,16 @@ export default {
|
|||||||
this.detail = item;
|
this.detail = item;
|
||||||
if (this.index == 1) {
|
if (this.index == 1) {
|
||||||
this.show = true;
|
this.show = true;
|
||||||
} else {
|
}else {
|
||||||
this.comp = "detail";
|
uni.navigateTo({
|
||||||
this.params = {
|
url: "/apps/notification/detail?id=" + this.detail.id + "&flag=" + true
|
||||||
id: this.detail.id,
|
})
|
||||||
flag: true
|
|
||||||
};
|
|
||||||
this.showList = false;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
add() {
|
add(){
|
||||||
this.comp = "add";
|
uni.navigateTo({
|
||||||
this.params = {
|
url: "/apps/notification/add"
|
||||||
id: null,
|
})
|
||||||
flag: false
|
|
||||||
};
|
|
||||||
this.showList = false;
|
|
||||||
},
|
},
|
||||||
change(val) {
|
change(val) {
|
||||||
this.index = val;
|
this.index = val;
|
||||||
|
|||||||
@@ -100,23 +100,16 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
params: {
|
onLoad(opt) {
|
||||||
handler: function () {
|
|
||||||
if (this.params?.id) {
|
|
||||||
this.form.id = this.params?.id;
|
|
||||||
this.flag = this.params?.flag;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
immediate: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
document.title = "新增公告";
|
document.title = "新增公告";
|
||||||
if (this.params?.id) {
|
if(opt.id) {
|
||||||
|
this.form.id = opt.id;
|
||||||
|
this.flag = opt.flag;
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['selectEnterpriseContact']),
|
...mapActions(['selectEnterpriseContact']),
|
||||||
handleSelectUser() {
|
handleSelectUser() {
|
||||||
@@ -125,7 +118,6 @@ export default {
|
|||||||
type: ["user"],
|
type: ["user"],
|
||||||
selectedUserIds: this.form.persons?.map(e => e.id)
|
selectedUserIds: this.form.persons?.map(e => e.id)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res);
|
|
||||||
this.form.persons = res?.userList || []
|
this.form.persons = res?.userList || []
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -60,19 +60,25 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapActions} from "vuex";
|
import {mapActions} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "detail",
|
name: "detail",
|
||||||
props: {
|
|
||||||
params: Object
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
detailObj: {},
|
detailObj: {},
|
||||||
pageShow: false
|
id: null,
|
||||||
|
pageShow: false,
|
||||||
|
flag: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onLoad(opt) {
|
||||||
|
document.title = "公告详情";
|
||||||
|
this.id = opt.id;
|
||||||
|
this.flag = opt.flag;
|
||||||
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.injectJWeixin(['sendChatMessage']).then(() => {
|
this.injectJWeixin(['sendChatMessage']).then(() => {
|
||||||
@@ -83,9 +89,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
|
||||||
document.title = "公告详情";
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['previewFile', 'injectJWeixin']),
|
...mapActions(['previewFile', 'injectJWeixin']),
|
||||||
preFile(e) {
|
preFile(e) {
|
||||||
@@ -101,8 +104,8 @@ export default {
|
|||||||
getDetail() {
|
getDetail() {
|
||||||
this.$http.post("/app/appannouncement/detail", null, {
|
this.$http.post("/app/appannouncement/detail", null, {
|
||||||
params: {
|
params: {
|
||||||
id: this.params?.id,
|
id: this.id,
|
||||||
detail: this.params?.flag
|
detail: this.flag
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
@@ -113,16 +116,16 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleClick() {
|
handleClick() {
|
||||||
this.$parent.params = this.params.id;
|
uni.navigateTo({
|
||||||
this.$parent.comp = "read";
|
url:"/apps/notification/read?id=" + this.id,
|
||||||
this.$parent.showList = false;
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.detail {
|
.detail {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
background-color: #F5F5F5;
|
background-color: #F5F5F5;
|
||||||
padding-bottom: 140px;
|
padding-bottom: 140px;
|
||||||
@@ -354,5 +357,5 @@ export default {
|
|||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user