fix(noticePopup): 公告弹窗不展示问题修复 bug-81

This commit is contained in:
woody 2025-05-08 15:26:32 +08:00
parent 9b9345bbff
commit 4b606dbb43
1 changed files with 25 additions and 24 deletions

View File

@ -5,16 +5,17 @@
* @Date: 2022-08-08 10:42:29
-->
<template>
<el-dialog class="notice"
<el-dialog
class="notice"
width="45%"
:title="'公告'"
:visible.sync="noticeFlag"
@close="closeTap">
@close="closeTap"
>
<!-- <div class="title">-->
<!-- {{ content.title }}-->
<!-- </div>-->
<div class="img-auto"
v-html="content.content"></div>
<div class="img-auto" v-html="content.content"></div>
<!-- <div class="surebtn1">-->
<!-- <div class="btn hh" @click="closeTap">取消</div>-->
<!-- <div class="btn " @click="closeTap">确认</div>-->
@ -23,9 +24,9 @@
</template>
<script>
import { indexPopScreen } from '@/api/index.js'
import { indexPopScreen } from "@/api/index.js";
export default {
name: 'Title',
name: "Title",
props: {
userInfo: {
type: Object,
@ -37,18 +38,18 @@ export default {
data() {
return {
noticeFlag: false,
content: '',
}
content: "",
};
},
created() {
// EventBus.$on('callMethod', this.getUserTc);
},
// mounted() {
// this.getUserTc()
// },
mounted() {
this.getUserTc();
},
methods: {
closeTap() {
this.noticeFlag = false
this.noticeFlag = false;
// this.$parent.getTree()
},
getUserTc() {
@ -56,23 +57,23 @@ export default {
grade: this.userInfo.pkGradeId,
awards: this.userInfo.pkAwardsId,
}).then((res) => {
if (res.code == '200') {
if (res.code == "200") {
if (res.data.length > 0) {
let arr = res.data[0].publishLocation.split(',')
let arr = res.data[0].publishLocation.split(",");
arr.forEach((items) => {
if (items == this.publishLocationIndex) {
this.noticeFlag = true
this.content = res.data[0]
this.noticeFlag = true;
this.content = res.data[0];
}
})
});
} else {
// this.$parent.getTree()
}
}
})
});
},
},
}
};
</script>
<style lang="scss" scoped>