公告通知
This commit is contained in:
@ -51,14 +51,14 @@ export const tabListData: TabItem[] = [
|
|||||||
// unreadNum: 0,
|
// unreadNum: 0,
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
key: '4',
|
key: '3',
|
||||||
name: t('工作流'),
|
name: t('工作流'),
|
||||||
list: [],
|
list: [],
|
||||||
read: [],
|
read: [],
|
||||||
unreadNum: 0,
|
unreadNum: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '5',
|
key: '4',
|
||||||
name: t('系统通知'),
|
name: t('系统通知'),
|
||||||
list: [],
|
list: [],
|
||||||
unreadNum: 0,
|
unreadNum: 0,
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
<span v-if="item.unreadNum !== 0">({{ item.unreadNum }})</span>
|
<span v-if="item.unreadNum !== 0">({{ item.unreadNum }})</span>
|
||||||
</template>
|
</template>
|
||||||
|
<!--工作流程-->
|
||||||
<div v-if="item.key === '4'" class="min-h-88">
|
<div v-if="item.key === '3'" class="min-h-88">
|
||||||
<div>
|
<div>
|
||||||
<div class="list-item">
|
<div class="list-item">
|
||||||
<span class="header-title">{{ t('流程审批') }}</span>
|
<span class="header-title">{{ t('流程审批') }}</span>
|
||||||
@ -65,7 +65,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</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 v-if="item.list.length > 0" class="h-82">
|
||||||
<div
|
<div
|
||||||
class="list-item readed-mark"
|
class="list-item readed-mark"
|
||||||
@ -214,7 +214,7 @@
|
|||||||
try {
|
try {
|
||||||
if (import.meta.env.VITE_GLOB_DISABLE_NEWS !== 'true') {
|
if (import.meta.env.VITE_GLOB_DISABLE_NEWS !== 'true') {
|
||||||
let res = await getOaNews(1);
|
let res = await getOaNews(1);
|
||||||
res.list.forEach((o) => {
|
(res || []).forEach((o) => {
|
||||||
if (!o.readId) listData.value[0].unreadNum += 1;
|
if (!o.readId) listData.value[0].unreadNum += 1;
|
||||||
listData.value[0].list.push({
|
listData.value[0].list.push({
|
||||||
id: o.id,
|
id: o.id,
|
||||||
@ -228,7 +228,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
let res1 = await getOaNews(2);
|
let res1 = await getOaNews(2);
|
||||||
res1.list.forEach((o) => {
|
(res1 || []).forEach((o) => {
|
||||||
if (!o.readId) listData.value[1].unreadNum += 1;
|
if (!o.readId) listData.value[1].unreadNum += 1;
|
||||||
listData.value[1].list.push({
|
listData.value[1].list.push({
|
||||||
id: o.id,
|
id: o.id,
|
||||||
@ -244,21 +244,23 @@
|
|||||||
let res2 = await getOaMessage();
|
let res2 = await getOaMessage();
|
||||||
res2.forEach((o) => {
|
res2.forEach((o) => {
|
||||||
if (o.messageType === 0) {
|
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;
|
if (!o.isRead) listData.value[2].unreadNum += 1;
|
||||||
listData.value[2].list.push({
|
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,
|
id: o.id,
|
||||||
avatar: '',
|
avatar: '',
|
||||||
title: o.messageContent,
|
title: o.messageContent,
|
||||||
@ -273,8 +275,9 @@
|
|||||||
read: o.isRead
|
read: o.isRead
|
||||||
});
|
});
|
||||||
} else if (o.messageType == 2) {
|
} else if (o.messageType == 2) {
|
||||||
if (!o.isRead) listData.value[3].unreadNum += 1;
|
//工作流 listData.value[3]
|
||||||
listData.value[3].read?.push({
|
if (!o.isRead) listData.value[2].unreadNum += 1;
|
||||||
|
listData.value[2].read?.push({
|
||||||
id: o.id,
|
id: o.id,
|
||||||
avatar: '',
|
avatar: '',
|
||||||
title: o.messageContent,
|
title: o.messageContent,
|
||||||
@ -292,14 +295,16 @@
|
|||||||
|
|
||||||
//系统消息
|
//系统消息
|
||||||
let res4 = import.meta.env.VITE_DISABLE_NOTE === 'true' ? { list: [] } : await queryLoginUserNotices({ limit: 1, size: 10 });
|
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]
|
||||||
listData.value[4].unreadNum = res4.list.filter((item) => item.isRead == 0).length;
|
listData.value[3].list = res4.list;
|
||||||
|
listData.value[3].unreadNum = res4.list.filter((item) => item.isRead == 0).length;
|
||||||
}
|
}
|
||||||
|
|
||||||
let res3 = await getScheduleMsg();
|
let res3 = await getScheduleMsg();
|
||||||
res3.list.forEach((item) => (item.read = item.isRead));
|
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);
|
console.log('message', listData.value);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('message error', error);
|
console.error('message error', error);
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-spin :spinning="spinning" tip="加载中...">
|
<a-spin :spinning="spinning" tip="加载中...">
|
||||||
<div class="page-bg-wrap formViewStyle" :class="isViewForm ? 'pdcss':''">
|
<div class="page-bg-wrap formViewStyle" :class="isViewForm ? 'pdcss':''">
|
||||||
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
|
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="isViewFormTask?layoutNew:layout">
|
||||||
<Card title="" :bordered="false" >
|
<viewForm v-if='isViewFormTask' :formState="formState" :isDisable="isDisable" :optionSelect="optionSelect"></viewForm>
|
||||||
|
<Card title="" :bordered="false" v-else>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="编号" name="code">
|
<a-form-item label="编号" name="code">
|
||||||
@ -111,7 +112,7 @@
|
|||||||
import UploadList from '/@/components/Form/src/components/UploadList.vue';
|
import UploadList from '/@/components/Form/src/components/UploadList.vue';
|
||||||
import deptUserModal from '/@/components/common/deptUserModal.vue';
|
import deptUserModal from '/@/components/common/deptUserModal.vue';
|
||||||
import deptListModal from '/@/components/common/deptListModal.vue';
|
import deptListModal from '/@/components/common/deptListModal.vue';
|
||||||
|
import viewForm from './viewForm.vue';
|
||||||
import { Modal } from 'ant-design-vue';
|
import { Modal } from 'ant-design-vue';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
@ -141,6 +142,7 @@
|
|||||||
const pageType = ref(currentRoute.value.query?.type);
|
const pageType = ref(currentRoute.value.query?.type);
|
||||||
const pageId = ref(currentRoute.value.query?.id)
|
const pageId = ref(currentRoute.value.query?.id)
|
||||||
const isViewForm = currentRoute.value.path.includes('viewForm')
|
const isViewForm = currentRoute.value.path.includes('viewForm')
|
||||||
|
const isViewFormTask = currentRoute.value.path.includes('processtasks')
|
||||||
|
|
||||||
const spinning = ref(false);
|
const spinning = ref(false);
|
||||||
const curIdx = ref(null)
|
const curIdx = ref(null)
|
||||||
@ -168,6 +170,10 @@
|
|||||||
labelCol: { span: 8 },
|
labelCol: { span: 8 },
|
||||||
wrapperCol: { span: 16 },
|
wrapperCol: { span: 16 },
|
||||||
}
|
}
|
||||||
|
const layoutNew = {
|
||||||
|
labelCol: { span: 6 },
|
||||||
|
wrapperCol: { span: 18 },
|
||||||
|
}
|
||||||
const dataFile = ref([]);
|
const dataFile = ref([]);
|
||||||
let optionSelect= reactive({
|
let optionSelect= reactive({
|
||||||
approCodeList: [],
|
approCodeList: [],
|
||||||
|
|||||||
99
src/views/approve/Appro/components/viewForm.vue
Normal file
99
src/views/approve/Appro/components/viewForm.vue
Normal 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>
|
||||||
@ -118,7 +118,7 @@ export const formProps: FormProps = {
|
|||||||
clearable: false,
|
clearable: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
staticOptions: [],
|
staticOptions: [],
|
||||||
defaultSelect: 'Facts',
|
defaultSelect: '',
|
||||||
datasourceType: 'dic',
|
datasourceType: 'dic',
|
||||||
params: { itemId: NewsCategoryDic.ID },
|
params: { itemId: NewsCategoryDic.ID },
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
|
|||||||
@ -114,7 +114,7 @@ export const formProps: FormProps = {
|
|||||||
clearable: false,
|
clearable: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
staticOptions: [],
|
staticOptions: [],
|
||||||
defaultSelect: 'Facts',
|
defaultSelect: '',
|
||||||
datasourceType: 'dic',
|
datasourceType: 'dic',
|
||||||
params: { itemId: NewsCategoryDic.ID },
|
params: { itemId: NewsCategoryDic.ID },
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
|
|||||||
Reference in New Issue
Block a user