公告通知

This commit is contained in:
‘huanghaiixia’
2026-01-09 17:10:56 +08:00
parent f7e71c8a95
commit 8df05f6179
6 changed files with 141 additions and 31 deletions

View File

@ -51,14 +51,14 @@ export const tabListData: TabItem[] = [
// unreadNum: 0,
// },
{
key: '4',
key: '3',
name: t('工作流'),
list: [],
read: [],
unreadNum: 0,
},
{
key: '5',
key: '4',
name: t('系统通知'),
list: [],
unreadNum: 0,

View File

@ -12,8 +12,8 @@
{{ item.name }}
<span v-if="item.unreadNum !== 0">({{ item.unreadNum }})</span>
</template>
<div v-if="item.key === '4'" class="min-h-88">
<!--工作流程-->
<div v-if="item.key === '3'" class="min-h-88">
<div>
<div class="list-item">
<span class="header-title">{{ t('流程审批') }}</span>
@ -65,7 +65,7 @@
</div>
</div>
<!--系统通知消息-->
<div v-else-if="item.key === '5'" class="h-88">
<div v-else-if="item.key === '4'" class="h-88">
<div v-if="item.list.length > 0" class="h-82">
<div
class="list-item readed-mark"
@ -214,7 +214,7 @@
try {
if (import.meta.env.VITE_GLOB_DISABLE_NEWS !== 'true') {
let res = await getOaNews(1);
res.list.forEach((o) => {
(res || []).forEach((o) => {
if (!o.readId) listData.value[0].unreadNum += 1;
listData.value[0].list.push({
id: o.id,
@ -228,7 +228,7 @@
});
});
let res1 = await getOaNews(2);
res1.list.forEach((o) => {
(res1 || []).forEach((o) => {
if (!o.readId) listData.value[1].unreadNum += 1;
listData.value[1].list.push({
id: o.id,
@ -244,21 +244,23 @@
let res2 = await getOaMessage();
res2.forEach((o) => {
if (o.messageType === 0) {
// 日程
// if (!o.isRead) listData.value[2].unreadNum += 1;
// listData.value[2].list.push({
// id: o.id,
// avatar: '',
// title: o.messageContent,
// description: '',
// datetime: o.sendTime,
// timeFormat: o.timeFormat,
// color: '',
// type: '3',
// read: o.isRead
// });
} else if (o.messageType == 1) {
// 工作流 listData.value[3]
if (!o.isRead) listData.value[2].unreadNum += 1;
listData.value[2].list.push({
id: o.id,
avatar: '',
title: o.messageContent,
description: '',
datetime: o.sendTime,
timeFormat: o.timeFormat,
color: '',
type: '3',
read: o.isRead
});
} else if (o.messageType == 1) {
if (!o.isRead) listData.value[3].unreadNum += 1;
listData.value[3].list.push({
id: o.id,
avatar: '',
title: o.messageContent,
@ -273,8 +275,9 @@
read: o.isRead
});
} else if (o.messageType == 2) {
if (!o.isRead) listData.value[3].unreadNum += 1;
listData.value[3].read?.push({
//工作流 listData.value[3]
if (!o.isRead) listData.value[2].unreadNum += 1;
listData.value[2].read?.push({
id: o.id,
avatar: '',
title: o.messageContent,
@ -292,14 +295,16 @@
//系统消息
let res4 = import.meta.env.VITE_DISABLE_NOTE === 'true' ? { list: [] } : await queryLoginUserNotices({ limit: 1, size: 10 });
listData.value[4].list = res4.list;
listData.value[4].unreadNum = res4.list.filter((item) => item.isRead == 0).length;
//listData.value[4]
listData.value[3].list = res4.list;
listData.value[3].unreadNum = res4.list.filter((item) => item.isRead == 0).length;
}
let res3 = await getScheduleMsg();
res3.list.forEach((item) => (item.read = item.isRead));
listData.value[2].unreadNum = res3.list.filter((x) => !x.isRead).length;
listData.value[2].list.push(...res3.list);
// 日程
// listData.value[2].unreadNum = res3.list.filter((x) => !x.isRead).length;
// listData.value[2].list.push(...res3.list);
console.log('message', listData.value);
} catch (error) {
console.error('message error', error);

View File

@ -1,8 +1,9 @@
<template>
<a-spin :spinning="spinning" tip="加载中...">
<div class="page-bg-wrap formViewStyle" :class="isViewForm ? 'pdcss':''">
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
<Card title="" :bordered="false" >
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="isViewFormTask?layoutNew:layout">
<viewForm v-if='isViewFormTask' :formState="formState" :isDisable="isDisable" :optionSelect="optionSelect"></viewForm>
<Card title="" :bordered="false" v-else>
<a-row>
<a-col :span="8">
<a-form-item label="编号" name="code">
@ -111,7 +112,7 @@
import UploadList from '/@/components/Form/src/components/UploadList.vue';
import deptUserModal from '/@/components/common/deptUserModal.vue';
import deptListModal from '/@/components/common/deptListModal.vue';
import viewForm from './viewForm.vue';
import { Modal } from 'ant-design-vue';
import { useUserStore } from '/@/store/modules/user';
const userStore = useUserStore();
@ -141,6 +142,7 @@
const pageType = ref(currentRoute.value.query?.type);
const pageId = ref(currentRoute.value.query?.id)
const isViewForm = currentRoute.value.path.includes('viewForm')
const isViewFormTask = currentRoute.value.path.includes('processtasks')
const spinning = ref(false);
const curIdx = ref(null)
@ -168,6 +170,10 @@
labelCol: { span: 8 },
wrapperCol: { span: 16 },
}
const layoutNew = {
labelCol: { span: 6 },
wrapperCol: { span: 18 },
}
const dataFile = ref([]);
let optionSelect= reactive({
approCodeList: [],

View File

@ -0,0 +1,99 @@
<template>
<Card title="" :bordered="false" >
<a-row>
<a-col :span="12">
<a-form-item label="编号" name="code">
<a-input v-model:value="formState.code" disabled />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="标题" name="title">
<a-input v-model:value="formState.title" :disabled="isDisable" placeholder="请输入标题"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="签报类型" name="typeCode">
<a-select v-model:value="formState.typeCode" :disabled="isDisable" placeholder="请选择签报类型" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.typeCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- <a-col :span="8">
<a-form-item label="密级" name="securityCode">
<a-select v-model:value="formState.securityCode" :disabled="isDisable" placeholder="请选择密级" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.securityCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col> -->
<a-col :span="12">
<a-form-item label="缓急" name="urgencyCode">
<a-select v-model:value="formState.urgencyCode" :disabled="isDisable" placeholder="请选择缓急" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.urgencyCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="拟稿人" name="empName">
<a-input v-model:value="formState.empName" :disabled="isDisable" placeholder="请选择拟稿人" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="拟稿人所属部门" name="bDeptName">
<a-input v-model:value="formState.bDeptName" :disabled="isDisable" placeholder="请选择拟稿人部门"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="拟稿人所属公司" name="comName">
<a-input v-model:value="formState.comName" disabled/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="拟稿日期" name="dateAppro">
<a-date-picker v-model:value="formState.dateAppro" :disabled="isDisable" style="width: 100%" placeholder="请选择评价日期" />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="审批状态" name="approCode">
<a-select v-model:value="formState.approCode" disabled style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.approCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="内容摘要" name="content" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<a-textarea v-model:value="formState.content" :disabled="isDisable" placeholder="请输入备注最多1000字" :maxlength="1000" :auto-size="{ minRows: 1, }"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<a-textarea v-model:value="formState.note" :disabled="isDisable" placeholder="请输入备注最多200字" :maxlength="200" :auto-size="{ minRows: 1, maxRows: 5 }"/>
</a-form-item>
</a-col>
</a-row>
</Card>
</template>
<script lang="ts" setup>
import { Card } from 'ant-design-vue';
const props = defineProps({
isDisable: Boolean,
optionSelect: Object,
formState: Object
});
</script>
<style lang="less" scoped>
</style>

View File

@ -118,7 +118,7 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [],
defaultSelect: 'Facts',
defaultSelect: '',
datasourceType: 'dic',
params: { itemId: NewsCategoryDic.ID },
labelField: 'name',

View File

@ -114,7 +114,7 @@ export const formProps: FormProps = {
clearable: false,
disabled: false,
staticOptions: [],
defaultSelect: 'Facts',
defaultSelect: '',
datasourceType: 'dic',
params: { itemId: NewsCategoryDic.ID },
labelField: 'name',