From 4950cc39e5f70dc4af6f23d82180f0e880a2edab Mon Sep 17 00:00:00 2001 From: wxc <191104855@qq.com> Date: Tue, 6 Feb 2024 18:45:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E3=80=81=E7=AD=BE=E6=94=B6?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/home.ts | 5 ++ src/api/perms/admin.ts | 8 +- .../{ic_banjieshenpi.svg => approval.svg} | 0 ..._lianxiqunzhong.svg => contact_writer.svg} | 0 .../{ic_shenqingyanqi.svg => extension.svg} | 0 ...nzhongjiefang.svg => interview_writer.svg} | 0 .../icons/{ic_qianshou.svg => un_sign.svg} | 0 .../{ic_zhengzaibanli.svg => verify.svg} | 0 src/components/MailCategorySelect.vue | 5 +- src/components/Upload.vue | 86 +++++++++++++++++++ src/layout/components/Header.vue | 2 +- src/style/public.scss | 9 +- src/utils/util.ts | 13 +++ src/views/home/components/Daily.vue | 43 +++++++--- src/views/home/components/Duty.vue | 83 +++++++++++++++--- src/views/home/components/MailTable.vue | 85 ++++++++++++++++-- src/views/home/components/Overall.vue | 14 ++- src/views/work/Todo.vue | 34 +++++--- src/views/work/components/MailDialog.vue | 30 +++++-- .../templates/InterviewWriterFrom.vue | 17 +--- .../templates/MailApprovalDetail.vue | 48 ++++++----- .../components/templates/MailTypeForm.vue | 22 +++-- .../work/components/templates/VerifyForm.vue | 18 ++-- 23 files changed, 405 insertions(+), 117 deletions(-) create mode 100644 src/api/home.ts rename src/assets/icons/{ic_banjieshenpi.svg => approval.svg} (100%) rename src/assets/icons/{ic_lianxiqunzhong.svg => contact_writer.svg} (100%) rename src/assets/icons/{ic_shenqingyanqi.svg => extension.svg} (100%) rename src/assets/icons/{ic_qunzhongjiefang.svg => interview_writer.svg} (100%) rename src/assets/icons/{ic_qianshou.svg => un_sign.svg} (100%) rename src/assets/icons/{ic_zhengzaibanli.svg => verify.svg} (100%) create mode 100644 src/components/Upload.vue diff --git a/src/api/home.ts b/src/api/home.ts new file mode 100644 index 0000000..cc6836d --- /dev/null +++ b/src/api/home.ts @@ -0,0 +1,5 @@ +import request from '@/utils/request' + +export function getMailOverall() { + return request.get({ url: '/home/mail/overall'}) +} \ No newline at end of file diff --git a/src/api/perms/admin.ts b/src/api/perms/admin.ts index 3a47a93..456b9f8 100644 --- a/src/api/perms/admin.ts +++ b/src/api/perms/admin.ts @@ -37,8 +37,12 @@ export function adminStatus(params: any) { return request.post({ url: '/system/admin/disable', params }) } - -// 管理员删除 +// 领导列表(正职) export function getLeaderList() { return request.get({ url: '/system/admin/leader/list'}) +} + +// 领导列表(副职) +export function getDeputyList() { + return request.get({ url: '/system/admin/leader/list'}) } \ No newline at end of file diff --git a/src/assets/icons/ic_banjieshenpi.svg b/src/assets/icons/approval.svg similarity index 100% rename from src/assets/icons/ic_banjieshenpi.svg rename to src/assets/icons/approval.svg diff --git a/src/assets/icons/ic_lianxiqunzhong.svg b/src/assets/icons/contact_writer.svg similarity index 100% rename from src/assets/icons/ic_lianxiqunzhong.svg rename to src/assets/icons/contact_writer.svg diff --git a/src/assets/icons/ic_shenqingyanqi.svg b/src/assets/icons/extension.svg similarity index 100% rename from src/assets/icons/ic_shenqingyanqi.svg rename to src/assets/icons/extension.svg diff --git a/src/assets/icons/ic_qunzhongjiefang.svg b/src/assets/icons/interview_writer.svg similarity index 100% rename from src/assets/icons/ic_qunzhongjiefang.svg rename to src/assets/icons/interview_writer.svg diff --git a/src/assets/icons/ic_qianshou.svg b/src/assets/icons/un_sign.svg similarity index 100% rename from src/assets/icons/ic_qianshou.svg rename to src/assets/icons/un_sign.svg diff --git a/src/assets/icons/ic_zhengzaibanli.svg b/src/assets/icons/verify.svg similarity index 100% rename from src/assets/icons/ic_zhengzaibanli.svg rename to src/assets/icons/verify.svg diff --git a/src/components/MailCategorySelect.vue b/src/components/MailCategorySelect.vue index 69b5a1d..483a17e 100644 --- a/src/components/MailCategorySelect.vue +++ b/src/components/MailCategorySelect.vue @@ -4,16 +4,18 @@ :data="mailStore.mailCategorys" filterable @current-change="handleCategoryChange" + placeholder="请选择信件分类" /> diff --git a/src/components/Upload.vue b/src/components/Upload.vue new file mode 100644 index 0000000..c7ecf25 --- /dev/null +++ b/src/components/Upload.vue @@ -0,0 +1,86 @@ + + + \ No newline at end of file diff --git a/src/layout/components/Header.vue b/src/layout/components/Header.vue index 684f983..a31a116 100644 --- a/src/layout/components/Header.vue +++ b/src/layout/components/Header.vue @@ -12,7 +12,7 @@
- {{ userStore.userInfo.roleName }} + {{ userStore.userInfo.deptName + ' ' + userStore.userInfo.name }}
退出 diff --git a/src/style/public.scss b/src/style/public.scss index 62537b0..f23abb5 100644 --- a/src/style/public.scss +++ b/src/style/public.scss @@ -3,6 +3,7 @@ body { font-size: 14px; margin: 0; overflow: hidden; + color: #333; } p { @@ -139,7 +140,9 @@ body { .mr-10 { margin-right: 10px; } - + .mr-18 { + margin-right: 18px; + } .mr-20 { margin-right: 20px; } @@ -154,7 +157,9 @@ body { .mt-10 { margin-top: 10px; } - + .mt-16 { + margin-top: 16px; + } .mt-20 { margin-top: 20px; } diff --git a/src/utils/util.ts b/src/utils/util.ts index f948684..9de6db0 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -206,5 +206,18 @@ export const getDictLable = (dictArr: any[], value: string) => { if (!value) { return '' } + if (!dictArr || !dictArr.length) { + return '' + } return dictArr.filter(item => item.value === value)[0].name +} + +export function getFlowTagType(flowKey) { + if (flowKey === 'first_sign' || flowKey === 'second_sign' || flowKey === 'three_sign') { + return 'danger' + } + if (flowKey === 'first_distribute' || flowKey === 'second_distribute') { + return 'success' + } + return '' } \ No newline at end of file diff --git a/src/views/home/components/Daily.vue b/src/views/home/components/Daily.vue index 7090ca0..7e18b9f 100644 --- a/src/views/home/components/Daily.vue +++ b/src/views/home/components/Daily.vue @@ -1,33 +1,56 @@ \ No newline at end of file diff --git a/src/views/home/components/MailTable.vue b/src/views/home/components/MailTable.vue index 92f3ce5..e500f3a 100644 --- a/src/views/home/components/MailTable.vue +++ b/src/views/home/components/MailTable.vue @@ -2,6 +2,55 @@ + + + + + + + + + + + + + + + + + - + + + @@ -45,7 +100,6 @@ - 即将到期 - + + + @@ -120,7 +180,13 @@ label="信件内容" show-overflow-tooltip /> - + + + @@ -138,12 +204,20 @@ - + \ No newline at end of file diff --git a/src/views/work/components/MailDialog.vue b/src/views/work/components/MailDialog.vue index e1ce9a4..31fad1e 100644 --- a/src/views/work/components/MailDialog.vue +++ b/src/views/work/components/MailDialog.vue @@ -56,7 +56,7 @@
-
+
- {{ getMailLevel(dictData.mail_level, mail.mailLevel) }} + {{ getDictLable(dictData.mail_level, mail.mailLevel) }}
@@ -237,7 +237,7 @@
@@ -297,7 +298,7 @@ import { getMailFlowDetail, flowNext } from "@/api/mail"; import { addFav, delFav } from "@/api/work/fav"; import { useDictData } from "@/hooks/useDictOptions"; import feedback from "@/utils/feedback"; -import { timeDiffSeconds, formatTimeText } from "@/utils/util"; +import { timeDiffSeconds, formatTimeText, getDictLable } from "@/utils/util"; const { dictData } = useDictData(["mail_level"]); @@ -306,6 +307,8 @@ const deptSelectFormRef = ref(); const contactWriterFromRef = ref(); const interviewWriterFromRef = ref(); const verifyFormRef = ref(); + +const loading = ref(true) const mail = ref({}); const flows = ref([]); const flowNode = ref({}); @@ -381,8 +384,10 @@ watch( let timer; function getDetail() { + loading.value = true // 信件详情 getMailFlowDetail(props.mailId).then((data) => { + loading.value = false mail.value = data.mail; flows.value = data.flows; isFav.value = data.isFav; @@ -462,12 +467,22 @@ watch(flowRemainingTime, (val) => { )}小时`; }); -const requestBody = ref({}); const requestData = ref({}); const messageRef = ref(); const approvedShow = ref(false); const completionShow = ref(false); const countersignShow = ref(false); +// 办结按钮 +const completionBtnFlag = ref(false) +// 监听信件类目变化 +watch(() => requestData.value.mailFirstCategory, () => { + if (requestData.value.mailFirstCategory === "无效类" || requestData.value.mailFirstCategory === "终止类") { + completionBtnFlag.value = true + } else { + completionBtnFlag.value = false + } +}) + async function handleAction(key) { if (!key) { return; @@ -507,13 +522,14 @@ async function handleAction(key) { completeShow.value = true; return; } - requestBody.value = { + const requestBody = { mailId: props.mailId, nextActionKey: key, flowKey: flowNode.value.key, data: requestData.value, }; - flowNext(requestBody.value).then(() => { + loading.value = true + flowNext(requestBody).then(() => { // 刷新 emits("update"); if ( diff --git a/src/views/work/components/templates/InterviewWriterFrom.vue b/src/views/work/components/templates/InterviewWriterFrom.vue index ab3628c..483bc9b 100644 --- a/src/views/work/components/templates/InterviewWriterFrom.vue +++ b/src/views/work/components/templates/InterviewWriterFrom.vue @@ -44,20 +44,7 @@ - - 上传 - - - - + @@ -76,7 +63,7 @@ import { getToken } from "@/utils/auth"; import { useDictData } from "@/hooks/useDictOptions"; -const { VITE_API_URL } = process.env; + const { dictData } = useDictData(["interview_type"]); const form = ref({}); diff --git a/src/views/work/components/templates/MailApprovalDetail.vue b/src/views/work/components/templates/MailApprovalDetail.vue index 407c1c5..6fb5766 100644 --- a/src/views/work/components/templates/MailApprovalDetail.vue +++ b/src/views/work/components/templates/MailApprovalDetail.vue @@ -1,6 +1,6 @@