|
@@ -1,45 +1,42 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <a-card>
|
|
|
|
|
- <a-row :gutter="10">
|
|
|
|
|
- <a-col :span="4">
|
|
|
|
|
- <a-menu id="userMessage" v-model:selected-keys="selectedKeys" mode="inline" @click="handleClick">
|
|
|
|
|
- <a-menu-item :key="messageCategory.value" v-for="messageCategory in messageCategoryList">{{
|
|
|
|
|
- messageCategory.label
|
|
|
|
|
- }}</a-menu-item>
|
|
|
|
|
- </a-menu>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="20">
|
|
|
|
|
- <div style="margin-top: -16px">
|
|
|
|
|
- <s-table
|
|
|
|
|
- ref="table"
|
|
|
|
|
- :columns="columns"
|
|
|
|
|
- :data="loadData"
|
|
|
|
|
- bordered
|
|
|
|
|
- :row-key="(record) => record.id"
|
|
|
|
|
- >
|
|
|
|
|
- <template #bodyCell="{ column, record }">
|
|
|
|
|
- <template v-if="column.dataIndex === 'subject'">
|
|
|
|
|
- <ellipsis :length="40" tooltip>
|
|
|
|
|
- {{ record.subject }}
|
|
|
|
|
- </ellipsis>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <a-image width="100%" :preview="false" :src="bannerSrc" class="mb-4" />
|
|
|
|
|
+ <a-card>
|
|
|
|
|
+ <a-row :gutter="10">
|
|
|
|
|
+ <a-col :span="4">
|
|
|
|
|
+ <a-menu id="userMessage" v-model:selected-keys="selectedKeys" mode="inline" @click="handleClick">
|
|
|
|
|
+ <a-menu-item :key="messageCategory.value" v-for="messageCategory in messageCategoryList">{{
|
|
|
|
|
+ messageCategory.label
|
|
|
|
|
+ }}</a-menu-item>
|
|
|
|
|
+ </a-menu>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="20">
|
|
|
|
|
+ <div style="margin-top: -16px">
|
|
|
|
|
+ <s-table ref="table" :columns="columns" :data="loadData" bordered :row-key="(record) => record.id">
|
|
|
|
|
+ <template #bodyCell="{ column, record }">
|
|
|
|
|
+ <template v-if="column.dataIndex === 'subject'">
|
|
|
|
|
+ <ellipsis :length="40" tooltip>
|
|
|
|
|
+ {{ record.subject }}
|
|
|
|
|
+ </ellipsis>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="column.dataIndex == 'createTime'">{{ formatDateTime(record.createTime) }}</template>
|
|
|
|
|
+ <template v-if="column.dataIndex === 'read'">
|
|
|
|
|
+ <span v-if="record.read" style="color: #d9d9d9">已读</span>
|
|
|
|
|
+ <span v-else style="color: #ff4d4f">未读</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="column.dataIndex === 'action'">
|
|
|
|
|
+ <a-space>
|
|
|
|
|
+ <a @click="detailRef.onOpen(record)">详情</a>
|
|
|
|
|
+ </a-space>
|
|
|
|
|
+ </template>
|
|
|
</template>
|
|
</template>
|
|
|
- <template v-if="column.dataIndex == 'createTime'">{{ formatDateTime(record.createTime) }}</template>
|
|
|
|
|
- <template v-if="column.dataIndex === 'read'">
|
|
|
|
|
- <span v-if="record.read" style="color: #d9d9d9">已读</span>
|
|
|
|
|
- <span v-else style="color: #ff4d4f">未读</span>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template v-if="column.dataIndex === 'action'">
|
|
|
|
|
- <a-space>
|
|
|
|
|
- <a @click="detailRef.onOpen(record)">详情</a>
|
|
|
|
|
- </a-space>
|
|
|
|
|
- </template>
|
|
|
|
|
- </template>
|
|
|
|
|
- </s-table>
|
|
|
|
|
- </div>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <detail ref="detailRef" @refresh="refresh" />
|
|
|
|
|
- </a-row>
|
|
|
|
|
- </a-card>
|
|
|
|
|
|
|
+ </s-table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <detail ref="detailRef" @refresh="refresh" />
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ </a-card>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="inSiteMessage">
|
|
<script setup name="inSiteMessage">
|
|
@@ -48,6 +45,7 @@
|
|
|
import tool from '@/utils/tool'
|
|
import tool from '@/utils/tool'
|
|
|
import { nextTick } from 'vue'
|
|
import { nextTick } from 'vue'
|
|
|
import { parseTime } from '@/utils/exam'
|
|
import { parseTime } from '@/utils/exam'
|
|
|
|
|
+ import bannerSrc from '@/assets/images/inSsiteMessage.jpg'
|
|
|
function formatDateTime(val) {
|
|
function formatDateTime(val) {
|
|
|
if (!val) return ''
|
|
if (!val) return ''
|
|
|
return parseTime(val, '{y}-{m}-{d} {h}:{i}:{s}')
|
|
return parseTime(val, '{y}-{m}-{d} {h}:{i}:{s}')
|