diff --git a/src/views/modules/plugins/point/icpointNoice.vue b/src/views/modules/plugins/point/icpointNoice.vue index b75a9e63..03f8b24e 100644 --- a/src/views/modules/plugins/point/icpointNoice.vue +++ b/src/views/modules/plugins/point/icpointNoice.vue @@ -62,30 +62,31 @@ diff --git a/src/views/modules/plugins/point/icpointnucleicmonitoring.vue b/src/views/modules/plugins/point/icpointnucleicmonitoring.vue index dc4f1605..ffba3c65 100644 --- a/src/views/modules/plugins/point/icpointnucleicmonitoring.vue +++ b/src/views/modules/plugins/point/icpointnucleicmonitoring.vue @@ -105,6 +105,7 @@ class="diy-button--more" size="small" @click="handleSendNotice" + v-if="noticeVisible" >发送通知 @@ -208,9 +209,10 @@ width="850px" top="5vh" class="dialog-h" - @closed="diaClose"> + @closed="diaClose" + :destroy-on-close="true"> + @diaClose="diaClose" :noticeOrigin="noticeOrigin"> @@ -239,6 +241,8 @@ export default { orgIds: [], updateId: null, sendNoticeFormShow:false, + noticeVisible:false, + noticeOrigin:"3" }; }, components: { @@ -246,15 +250,13 @@ export default { icpointNoice }, created() { + this.noticeFun() this.getFormInfo(); }, methods: { // 发送通知 handleSendNotice () { this.sendNoticeFormShow = true - this.$nextTick(() => { - this.$refs.ref_sendnotice.initForm(this.selectionAll, '3') - }) }, // 关闭通知 diaClose(){ @@ -287,6 +289,17 @@ export default { }) .catch(() => {}); }, + // 获取发送通知按钮显示与隐藏 + noticeFun(){ + this.$http + .post(`/epmetuser/icPointNucleicMonitoring/getShowType`) + .then(({ data: res }) => { + if (res.code === 0 && res.data) { + this.noticeVisible = true + } + }) + .catch(() => {}); + }, deleteChildren(arr) { let childs = arr; for (let i = childs.length; i--; i > 0) { diff --git a/src/views/modules/plugins/point/icpointvaccinesinoculation.vue b/src/views/modules/plugins/point/icpointvaccinesinoculation.vue index b4c2b227..2fac69f9 100644 --- a/src/views/modules/plugins/point/icpointvaccinesinoculation.vue +++ b/src/views/modules/plugins/point/icpointvaccinesinoculation.vue @@ -80,6 +80,7 @@ class="diy-button--more" size="small" @click="handleSendNotice" + v-if="noticeVisible" >发送通知 @@ -212,9 +213,10 @@ width="850px" top="5vh" class="dialog-h" - @closed="diaClose"> + @closed="diaClose" + :destroy-on-close="true"> + @diaClose="diaClose" :noticeOrigin="noticeOrigin" > @@ -240,24 +242,37 @@ export default { }, updateId: null, sendNoticeFormShow:false, + noticeVisible:false, + noticeOrigin:"4" }; }, components: { AddOrUpdate, icpointNoice }, + mounted(){ + this.noticeFun() + }, methods: { // 发送通知 handleSendNotice () { this.sendNoticeFormShow = true - this.$nextTick(() => { - this.$refs.ref_sendnotice.initForm(this.selectionAll, '4') - }) }, // 关闭通知 diaClose(){ this.sendNoticeFormShow = false }, + // 获取发送通知按钮显示与隐藏 + noticeFun(){ + this.$http + .post(`/epmetuser/icPointNucleicMonitoring/getShowType`) + .then(({ data: res }) => { + if (res.code === 0 && res.data) { + this.noticeVisible = true + } + }) + .catch(() => {}); + }, // 新增 / 修改 addOrUpdateHandle(id) { this.updateId = id;