Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2021-12-13 14:04:26 +08:00
3 changed files with 287 additions and 305 deletions

View File

@@ -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;

View File

@@ -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 || []
})
},

View File

@@ -60,19 +60,25 @@
</template>
<script>
import {mapActions} from "vuex";
import {mapActions} from "vuex";
export default {
export default {
name: "detail",
props: {
params: Object
},
data() {
return {
detailObj: {},
pageShow: false
id: null,
pageShow: false,
flag: false,
}
},
onLoad(opt) {
document.title = "公告详情";
this.id = opt.id;
this.flag = opt.flag;
},
created() {
this.$loading()
this.injectJWeixin(['sendChatMessage']).then(() => {
@@ -83,9 +89,6 @@ export default {
})
},
mounted() {
document.title = "公告详情";
},
methods: {
...mapActions(['previewFile', 'injectJWeixin']),
preFile(e) {
@@ -101,8 +104,8 @@ export default {
getDetail() {
this.$http.post("/app/appannouncement/detail", null, {
params: {
id: this.params?.id,
detail: this.params?.flag
id: this.id,
detail: this.flag
}
}).then(res => {
if (res && res.data) {
@@ -113,16 +116,16 @@ export default {
})
},
handleClick() {
this.$parent.params = this.params.id;
this.$parent.comp = "read";
this.$parent.showList = false;
uni.navigateTo({
url:"/apps/notification/read?id=" + this.id,
})
}
},
}
}
</script>
<style lang="scss" scoped>
.detail {
.detail {
min-height: 100%;
background-color: #F5F5F5;
padding-bottom: 140px;
@@ -354,5 +357,5 @@ export default {
font-size: 36px;
color: #FFFFFF;
}
}
}
</style>