| | |
| | | </span> |
| | | </div> |
| | | |
| | | <div class="notice"> |
| | | <div class="notice" v-if="chatDisplayMode==='default'"> |
| | | <el-badge :value="`${state.announcementList.length}`"> |
| | | <el-button link size="small" icon="ele-Message" class="set-notice" @click="handleAnnouncementClick">系统公告</el-button> |
| | | </el-badge> |
| | |
| | | import { computed, onMounted, reactive } from 'vue'; |
| | | import { systemNotifyList } from '/@/api/ai/chat'; |
| | | import router from '/@/router'; |
| | | import { chatDisplayMode } from '/@/stores/chatRoom'; |
| | | let state = reactive({ |
| | | isShowAnnouncement: false, |
| | | isAnnouncementDialog: false, |
| | |
| | | |
| | | const getSystemNotify = async () => { |
| | | const res = await systemNotifyList(); |
| | | res.messages.forEach((element) => { |
| | | res.messages?.forEach((element) => { |
| | | element.notify_time = element.notify_time.slice(0, 10); |
| | | }); |
| | | state.announcementList = res.messages.sort(sortData).slice(0, 5); |
| | | state.announcementList = res.messages?.sort(sortData).slice(0, 5) ??[]; |
| | | }; |
| | | const routerMeta = computed(() => router.currentRoute.value.meta); |
| | | const handleAnnouncementClick = () => { |
| | |
| | | height: 42px; |
| | | background-color: #fff; |
| | | top: 0; |
| | | z-index: 10; |
| | | z-index: 0; |
| | | } |
| | | |
| | | .notice { |