|
@@ -1,5 +1,15 @@
|
|
<template>
|
|
<template>
|
|
<div class="notice flex flex-col h-full">
|
|
<div class="notice flex flex-col h-full">
|
|
|
|
+ <div class="page-action">
|
|
|
|
+ <div
|
|
|
|
+ v-for="item in tabs"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :class="['page-tab', { 'is-active': params.status === item.value }]"
|
|
|
|
+ @click="switchTab(item)"
|
|
|
|
+ >{{ item.label }}</div
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<SearchForm :fields="fields" :params="params">
|
|
<SearchForm :fields="fields" :params="params">
|
|
<template #service="{ item, params }">
|
|
<template #service="{ item, params }">
|
|
<select-service-unit
|
|
<select-service-unit
|
|
@@ -8,53 +18,32 @@
|
|
></select-service-unit>
|
|
></select-service-unit>
|
|
</template>
|
|
</template>
|
|
</SearchForm>
|
|
</SearchForm>
|
|
- <div class="page-wrap flex-1">
|
|
|
|
- <t-tabs
|
|
|
|
- v-model="params.status"
|
|
|
|
- class="h-full"
|
|
|
|
- v-loading="loading"
|
|
|
|
- @change="tabChange"
|
|
|
|
- >
|
|
|
|
- <t-tab-panel value="undefined" label="全部">
|
|
|
|
- <NoticeList
|
|
|
|
- :loading="loading"
|
|
|
|
- :tableData="tableData"
|
|
|
|
- :pagination="pagination"
|
|
|
|
- :onChange="onChange"
|
|
|
|
- @open="open"
|
|
|
|
- ></NoticeList>
|
|
|
|
- </t-tab-panel>
|
|
|
|
- <t-tab-panel value="false" label="未读">
|
|
|
|
- <NoticeList
|
|
|
|
- :loading="loading"
|
|
|
|
- :tableData="tableData"
|
|
|
|
- :pagination="pagination"
|
|
|
|
- :onChange="onChange"
|
|
|
|
- @open="open"
|
|
|
|
- ></NoticeList>
|
|
|
|
- </t-tab-panel>
|
|
|
|
- <t-tab-panel value="true" label="已读">
|
|
|
|
- <NoticeList
|
|
|
|
- :loading="loading"
|
|
|
|
- :tableData="tableData"
|
|
|
|
- :pagination="pagination"
|
|
|
|
- :onChange="onChange"
|
|
|
|
- @open="open"
|
|
|
|
- ></NoticeList>
|
|
|
|
- </t-tab-panel>
|
|
|
|
- </t-tabs>
|
|
|
|
|
|
+
|
|
|
|
+ <div v-loading="loading" class="page-wrap flex-1">
|
|
|
|
+ <NoticeList
|
|
|
|
+ :loading="loading"
|
|
|
|
+ :tableData="tableData"
|
|
|
|
+ :pagination="pagination"
|
|
|
|
+ :onChange="onChange"
|
|
|
|
+ @open="open"
|
|
|
|
+ ></NoticeList>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
<t-drawer
|
|
<t-drawer
|
|
v-model:visible="visible"
|
|
v-model:visible="visible"
|
|
header="通知公告"
|
|
header="通知公告"
|
|
- :footer="false"
|
|
|
|
- size="700px"
|
|
|
|
|
|
+ size="80%"
|
|
|
|
+ :close-btn="true"
|
|
>
|
|
>
|
|
<h2 class="text-center notice-title">{{ curNotice.title }}</h2>
|
|
<h2 class="text-center notice-title">{{ curNotice.title }}</h2>
|
|
<div class="text-center notice-subtitle"
|
|
<div class="text-center notice-subtitle"
|
|
>发布时间:{{ dateFormat(curNotice.sendTime, 'yyyy-MM-dd') }}</div
|
|
>发布时间:{{ dateFormat(curNotice.sendTime, 'yyyy-MM-dd') }}</div
|
|
>
|
|
>
|
|
<p class="notice-content">{{ curNotice.content }}</p>
|
|
<p class="notice-content">{{ curNotice.content }}</p>
|
|
|
|
+
|
|
|
|
+ <template #footer>
|
|
|
|
+ <t-button theme="primary" @click="visible = false">返回</t-button>
|
|
|
|
+ </template>
|
|
</t-drawer>
|
|
</t-drawer>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -66,11 +55,29 @@ import { getMyMessages } from '@/api/my-workbenches';
|
|
import NoticeList from './notice-list.vue';
|
|
import NoticeList from './notice-list.vue';
|
|
import { omit } from 'lodash';
|
|
import { omit } from 'lodash';
|
|
import { dateFormat } from '@/utils/tool';
|
|
import { dateFormat } from '@/utils/tool';
|
|
|
|
+
|
|
const curNotice = ref({});
|
|
const curNotice = ref({});
|
|
const visible = ref(false);
|
|
const visible = ref(false);
|
|
const open = (notice) => {
|
|
const open = (notice) => {
|
|
curNotice.value = notice;
|
|
curNotice.value = notice;
|
|
|
|
+ visible.value = true;
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+const tabs = [
|
|
|
|
+ {
|
|
|
|
+ label: '全部',
|
|
|
|
+ value: 'undefined',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '未读',
|
|
|
|
+ value: 'false',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '已读',
|
|
|
|
+ value: 'true',
|
|
|
|
+ },
|
|
|
|
+];
|
|
|
|
+
|
|
const params = reactive({
|
|
const params = reactive({
|
|
types: ['SYSTEM'],
|
|
types: ['SYSTEM'],
|
|
title: '',
|
|
title: '',
|
|
@@ -97,9 +104,12 @@ const {
|
|
} = useFetchTable(getMyMessages, {
|
|
} = useFetchTable(getMyMessages, {
|
|
params: transParams,
|
|
params: transParams,
|
|
});
|
|
});
|
|
-const tabChange = () => {
|
|
|
|
|
|
+
|
|
|
|
+const switchTab = (tab) => {
|
|
|
|
+ params.status = tab.value;
|
|
search();
|
|
search();
|
|
};
|
|
};
|
|
|
|
+
|
|
const fields = ref([
|
|
const fields = ref([
|
|
{
|
|
{
|
|
prop: 'time',
|
|
prop: 'time',
|
|
@@ -136,12 +146,6 @@ const fields = ref([
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
.notice {
|
|
.notice {
|
|
- .page-wrap {
|
|
|
|
- :deep(.t-tabs__content) {
|
|
|
|
- height: calc(100% - var(--td-comp-size-xxl));
|
|
|
|
- overflow: auto;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
.notice-title {
|
|
.notice-title {
|
|
color: #333;
|
|
color: #333;
|
|
font-size: 20px;
|
|
font-size: 20px;
|