[update] 首页添加公告面板
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<div class="main-box">
|
||||
<a-card :bordered="false">
|
||||
<!-- 2023-07变更:首页添加公告面板 -->
|
||||
<a-card
|
||||
:bordered="false"
|
||||
:tab-list="tabListTitle"
|
||||
:active-tab-key="titleKey"
|
||||
@tabChange="key => onTabChange(key, 'titleKey')"
|
||||
>
|
||||
<a-table
|
||||
v-if="titleKey === 'message'"
|
||||
ref="table"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
@@ -38,6 +45,34 @@
|
||||
<a class="readed" v-if="record.readFlag === '1' ">已读</a>
|
||||
</span>
|
||||
</a-table>
|
||||
|
||||
<a-table
|
||||
v-else-if="titleKey === 'notice'"
|
||||
ref="table"
|
||||
size="middle"
|
||||
rowKey="id"
|
||||
:columns="noticeColumns"
|
||||
:scroll="{x: 1000}"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
@change="handleTableChange"
|
||||
class="j-table-force-nowrap">
|
||||
|
||||
<template slot="text" slot-scope="text">
|
||||
<a-tooltip>
|
||||
<template slot="title">
|
||||
<span v-html="text" class="ellipsis-span"></span>
|
||||
</template>
|
||||
<span v-html="myEllipsis(text,35)"
|
||||
class="ellipsis-span"></span>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="showNotice(record)" style="margin-right: 8px">查看</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-card>
|
||||
<div class="download">
|
||||
|
||||
@@ -51,6 +86,7 @@
|
||||
</div>
|
||||
<show-announcement ref="ShowAnnouncement"></show-announcement>
|
||||
<dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData"/>
|
||||
<show-notice-modal ref="showNoticeModal"></show-notice-modal>
|
||||
</div>
|
||||
<!-- <div class="index-home">-->
|
||||
<!-- <img class="index-bgimg" src="../../assets/indexImgs/index-bg.png"/>-->
|
||||
@@ -105,13 +141,16 @@ import {Bus} from '@comp/tools/Bus'
|
||||
import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import DynamicNotice from '@comp/tools/DynamicNotice'
|
||||
// 查看公告详情
|
||||
import ShowNoticeModal from './components/ShowNoticeModal'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'Analysis',
|
||||
components: {
|
||||
DynamicNotice,
|
||||
ShowAnnouncement
|
||||
ShowAnnouncement,
|
||||
ShowNoticeModal
|
||||
},
|
||||
mixins: [JeroListMixin],
|
||||
data() {
|
||||
@@ -143,6 +182,30 @@ export default {
|
||||
scopedSlots: {customRender: 'action'}
|
||||
}
|
||||
],
|
||||
noticeColumns: [
|
||||
{
|
||||
title: '名称',
|
||||
align: 'center',
|
||||
dataIndex: 'noticeName',
|
||||
scopedSlots: {customRender: 'text'}
|
||||
}, {
|
||||
title: '内容',
|
||||
align: 'center',
|
||||
dataIndex: 'noticeContent',
|
||||
scopedSlots: {customRender: 'text'}
|
||||
}, {
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
scopedSlots: {customRender: 'action'}
|
||||
}
|
||||
],
|
||||
tabListTitle: [
|
||||
{ key: 'message', tab: '消息' },
|
||||
{ key: 'notice', tab: '公告'}
|
||||
],
|
||||
titleKey: 'message',
|
||||
url: {
|
||||
list: '/sys/sysAnnouncementSend/getCompanyMyAnnouncementSend',
|
||||
editCementSend: 'sys/sysAnnouncementSend/editCompanyByAnntIdAndUserId',
|
||||
@@ -346,6 +409,32 @@ export default {
|
||||
},
|
||||
syncHeadNotic(anntId) {
|
||||
getAction('sys/annountCement/syncNotic', {anntId: anntId})
|
||||
},
|
||||
// 2023-07变更:首页添加公告面板
|
||||
onTabChange(key, type) {
|
||||
this[type] = key
|
||||
this.ipagination = {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '20', '30', '50', '100'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + '-' + range[1] + ' 共' + total + '条'
|
||||
},
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
total: 0
|
||||
}
|
||||
this.dataSource = []
|
||||
if (key === 'message') {
|
||||
this.url.list = '/sys/sysAnnouncementSend/getCompanyMyAnnouncementSend'
|
||||
} else if (key === 'notice') {
|
||||
this.url.list = '/sysNotice/page'
|
||||
}
|
||||
this.loadData(1)
|
||||
},
|
||||
// 查看公告
|
||||
showNotice (record) {
|
||||
this.$refs.showNoticeModal.look(record)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user