| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <template>
- <a-modal
- class="notice"
- v-model:visible="visible"
- @cancel="cancel"
- width="890px"
- centered
- :footer="null"
- >
- <a-tabs v-model:activeKey="activeKey">
- <a-tab-pane key="1">
- <template #tab>
- <span>
- 公告
- <a-badge
- :count="getUnReadNoticeByType([1])"
- :number-style="{ backgroundColor: '#FF9000' }"
- />
- </span>
- </template>
- <NoticeContent :noticeList="getNoticeByType([1])" />
- </a-tab-pane>
- <a-tab-pane key="2">
- <template #tab>
- <span>
- 系统消息
- <a-badge
- :count="getUnReadNoticeByType([2])"
- :number-style="{ backgroundColor: '#FF9000' }"
- />
- </span>
- </template>
- <NoticeContent :noticeList="getNoticeByType([2])" />
- </a-tab-pane>
- </a-tabs>
- </a-modal>
- </template>
- <script lang="ts">
- import { defineComponent, ref } from 'vue';
- import { closeModal } from '@/common/setup/modal/index';
- import NoticeContent from './components/noticeContent.vue';
- import { initData } from '@/common/methods';
- import { handleNotice } from './setup';
- export default defineComponent({
- name: 'notice',
- components: {
- NoticeContent,
- },
- setup() {
- const { visible, cancel } = closeModal('notice');
- // 公告消息
- const { noticeList, queryNoticeAction, getNoticeByType, updateNotice, getUnReadNoticeByType } = handleNotice();
- initData(() => {
- queryNoticeAction();
- updateNotice();
- });
- return {
- visible,
- cancel,
- noticeList,
- getNoticeByType,
- getUnReadNoticeByType,
- activeKey: ref('1'),
- };
- },
- });
- </script>
- <style lang="less">
- .notice {
- .ant-tabs {
- width: 100%;
- .ant-tabs-bar {
- border-bottom-color: @m-black26;
- margin-bottom: 0;
- }
- .ant-tabs-tab {
- width: 140px;
- text-align: center;
- margin-right: 0;
- }
- .ant-tabs-nav {
- height: 50px;
- font-size: 16px;
- color: @m-grey2;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- .ant-tabs-tab-active {
- color: @m-white0;
- background: linear-gradient(0deg, @m-blue8 0%, @m-blue9 100%);
- }
- }
- .ant-tabs-ink-bar {
- display: none !important;
- }
- }
- .ant-modal-close-x {
- height: 50px;
- line-height: 50px;
- svg {
- color: @m-grey1;
- }
- }
- .ant-modal-body {
- padding: 0;
- background: @m-grey9;
- }
- }
- </style
- >;
|