处理消息中心页面种的table 及 分页的样式问题

This commit is contained in:
任珮宇 2023-11-30 14:38:15 +08:00
parent ed0e11eedc
commit 5ddfc7f189

View File

@ -4,7 +4,6 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="6"> <a-col :span="6">
<a-form-item label="Title"> <a-form-item label="Title">
<a-input placeholder="Please enter the title" v-model="queryParam.titile"></a-input> <a-input placeholder="Please enter the title" v-model="queryParam.titile"></a-input>
@ -17,12 +16,11 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">Query</a-button> <a-button type="primary" @click="searchQuery" icon="search">Query</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">Reset</a-button> <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">Reset</a-button>
</span> </span>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
@ -33,14 +31,14 @@
<a-table <a-table
ref="table" ref="table"
size="default" size="middle"
bordered
rowKey="id" rowKey="id"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
:loading="loading" :loading="loading"
@change="handleTableChange"> @change="handleTableChange"
>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="showAnnouncement(record)">VIEW</a> <a @click="showAnnouncement(record)">VIEW</a>
</span> </span>
@ -58,135 +56,154 @@
import DynamicNotice from '../../components/tools/DynamicNotice' import DynamicNotice from '../../components/tools/DynamicNotice'
export default { export default {
name: "UserAnnouncementList", name: 'UserAnnouncementList',
mixins: [JeecgListMixin], mixins: [JeecgListMixin],
components: { components: {
DynamicNotice, DynamicNotice,
ShowAnnouncement ShowAnnouncement,
}, },
data() { data() {
return { return {
description: '系统通告表管理页面', description: '系统通告表管理页面',
queryParam: {}, queryParam: {},
columns: [{ columns: [
{
title: 'TITLE', title: 'TITLE',
align:"center", align: 'center',
dataIndex: 'titile' dataIndex: 'titile',
},{ },
{
title: 'MESSAGE TYPE', title: 'MESSAGE TYPE',
align: "center", align: 'center',
dataIndex: 'msgCategory', dataIndex: 'msgCategory',
customRender: function (text) { customRender: function (text) {
if (text == '1') { if (text == '1') {
return "NOTICE"; return 'NOTICE'
} else if (text == "2") { } else if (text == '2') {
return "SYSTEM"; return 'SYSTEM'
} else { } else {
return text; return text
} }
} },
},{ },
{
title: 'SENDER', title: 'SENDER',
align:"center", align: 'center',
dataIndex: 'sender' dataIndex: 'sender',
},{ },
{
title: 'SEND TIME', title: 'SEND TIME',
align:"center", align: 'center',
dataIndex: 'sendTime' dataIndex: 'sendTime',
},{ },
{
title: 'PRIORTIY', title: 'PRIORTIY',
align:"center", align: 'center',
dataIndex: 'priority', dataIndex: 'priority',
customRender: function (text) { customRender: function (text) {
if (text == 'L') { if (text == 'L') {
return "LOW"; return 'LOW'
}else if(text=="M"){ } else if (text == 'M') {
return "MIDDLE"; return 'MIDDLE'
}else if(text=="H"){ } else if (text == 'H') {
return "HIGH"; return 'HIGH'
} else { } else {
return text; return text
} }
} },
},{ },
{
title: 'READING STATE', title: 'READING STATE',
align:"center", align: 'center',
dataIndex: 'readFlag', dataIndex: 'readFlag',
customRender: function (text) { customRender: function (text) {
if (text == '0') { if (text == '0') {
return "UNREAD"; return 'UNREAD'
}else if(text=="1"){ } else if (text == '1') {
return "READ"; return 'READ'
} else { } else {
return text; return text
} }
} },
},{ },
{
title: 'ACTION', title: 'ACTION',
dataIndex: 'action', dataIndex: 'action',
align:"center", align: 'center',
scopedSlots: { customRender: 'action' }, scopedSlots: { customRender: 'action' },
}], },
],
url: { url: {
list: "/sys/sysAnnouncementSend/getMyAnnouncementSend", list: '/sys/sysAnnouncementSend/getMyAnnouncementSend',
editCementSend:"sys/sysAnnouncementSend/editByAnntIdAndUserId", editCementSend: 'sys/sysAnnouncementSend/editByAnntIdAndUserId',
readAllMsg:"sys/sysAnnouncementSend/readAll", readAllMsg: 'sys/sysAnnouncementSend/readAll',
}, },
loading: false, loading: false,
openPath: '', openPath: '',
formData:'' formData: '',
} }
}, },
methods: { methods: {
handleDetail: function (record) { handleDetail: function (record) {
this.$refs.sysAnnouncementModal.detail(record); this.$refs.sysAnnouncementModal.detail(record)
this.$refs.sysAnnouncementModal.title="VIEW"; this.$refs.sysAnnouncementModal.title = 'VIEW'
}, },
showAnnouncement(record) { showAnnouncement(record) {
putAction(this.url.editCementSend, { anntId: record.anntId }).then((res) => { putAction(this.url.editCementSend, { anntId: record.anntId }).then((res) => {
if (res.success) { if (res.success) {
this.loadData(); this.loadData()
this.syncHeadNotic(record.anntId) this.syncHeadNotic(record.anntId)
} }
}); })
if (record.openType === 'component') { if (record.openType === 'component') {
this.openPath = record.openPage; this.openPath = record.openPage
this.formData = {id:record.busId}; this.formData = { id: record.busId }
this.$refs.showDynamNotice.detail(); this.$refs.showDynamNotice.detail()
} else { } else {
this.$refs.ShowAnnouncement.detail(record); this.$refs.ShowAnnouncement.detail(record)
} }
}, },
syncHeadNotic(anntId) { syncHeadNotic(anntId) {
getAction("sys/annountCement/syncNotic",{anntId:anntId}) getAction('sys/annountCement/syncNotic', { anntId: anntId })
}, },
readAll() { readAll() {
var that = this; var that = this
that.$confirm({ that.$confirm({
title:"Config", title: 'Config',
content:"Whether all marks are read?", content: 'Whether all marks are read?',
onOk: function () { onOk: function () {
putAction(that.url.readAllMsg).then((res) => { putAction(that.url.readAllMsg).then((res) => {
if (res.success) { if (res.success) {
that.$message.success(res.message); that.$message.success(res.message)
that.loadData(); that.loadData()
that.syncHeadNotic(); that.syncHeadNotic()
} }
}); })
} },
}); })
},
}, },
} }
}
</script> </script>
<style scoped> <style lang="less" scoped>
.ant-card-body .table-operator { .ant-card-body .table-operator {
margin-bottom: 18px; margin-bottom: 18px;
} }
.anty-row-operator button{margin: 0 5px} .anty-row-operator button {
.ant-btn-danger{background-color: #ffffff}z margin: 0 5px;
}
.ant-modal-cust-warp{height: 100%} .ant-btn-danger {
.ant-modal-cust-warp .ant-modal-body{height:calc(100% - 110px) !important;overflow-y: auto} background-color: #ffffff;
.ant-modal-cust-warp .ant-modal-content{height:90% !important;overflow-y: hidden} }
z .ant-modal-cust-warp {
height: 100%;
}
.ant-modal-cust-warp .ant-modal-body {
height: calc(100% - 110px) !important;
overflow-y: auto;
}
.ant-modal-cust-warp .ant-modal-content {
height: 90% !important;
overflow-y: hidden;
}
</style> </style>