From 81309e8bf0c1767a604a19c5d605bb312ed4daa2 Mon Sep 17 00:00:00 2001 From: 21819 Date: Wed, 6 Mar 2024 18:12:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E6=BB=A1=E6=84=8F=E4=BF=A1=E4=BB=B6?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/util.ts | 56 ++++- src/views/work/Dissatisfied.vue | 26 ++- src/views/work/components/AppealProgress.vue | 62 +++-- src/views/work/components/HandleAppeal.vue | 87 +++++-- src/views/work/components/HandleOverrule.vue | 228 +++++++++++++++++++ src/views/work/components/LaunchAppeal.vue | 2 + src/views/work/components/OverruleReason.vue | 83 +++++-- 7 files changed, 487 insertions(+), 57 deletions(-) create mode 100644 src/views/work/components/HandleOverrule.vue diff --git a/src/utils/util.ts b/src/utils/util.ts index 5f44fec..95a0773 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -1,6 +1,7 @@ import { isObject } from '@vue/shared' import { cloneDeep } from 'lodash' import moment from 'moment' +import { listSecond } from '@/api/org/department' /** * @description 添加单位 @@ -170,16 +171,16 @@ export const formatTimeText = (seconds: number) => { } // 分钟 if (seconds < 3600) { - return `${ Math.floor(seconds / 60) }分${ seconds % 60 }秒` + return `${Math.floor(seconds / 60)}分${seconds % 60}秒` } // 小时 if (seconds < 86400) { const remainder = seconds % 3600; - return `${ Math.floor(seconds / 3600) }小时${ parseInt(seconds % 3600 / 60) }分` + return `${Math.floor(seconds / 3600)}小时${parseInt(seconds % 3600 / 60)}分` } // 天 const remainder = seconds % 86400; - return `${ Math.floor(seconds / 86400) }天${ parseInt(seconds % 86400 / 3600) }小时` + return `${Math.floor(seconds / 86400)}天${parseInt(seconds % 86400 / 3600)}小时` } /** @@ -279,7 +280,7 @@ export function validatorIdCard(rule: object, code: string, callback: any) { } if (!code.match(idCardReg)) { return callback(new Error('请输入正确的身份证号码')) - } + } if (!city[code.substr(0, 2)]) { // 区域数组中不包含需验证的身份证前两位 return callback(new Error('请输入正确的身份证号码')) @@ -324,4 +325,49 @@ export function validatorPhone(rule: object, phonenumber: string, callback: any) return callback(new Error('请输入正确的手机号码')) } callback() -} \ No newline at end of file +} + +export function getAppealType(appealState: String) { + switch (appealState) { + case '1': + return 'primary' + case '2': + return 'success' + case '3': + return 'danger' + + default: + break; + } + +} + +export function getAppealName(appealState: String) { + switch (appealState) { + case '0': return '未审诉' + case '1': return '申诉中' + case '2': return '申诉成功' + case '3': return '已驳回' + } +} + +export function getAppealDept(handlingDept) { + if (handlingDept === 1) { + return Promise.resolve('市局专班'); + } else { + return new Promise((resolve, reject) => { + listSecond().then((res) => { + for (let item of res) { + if (item.id === handlingDept) { + resolve(item.name); + return; + } + } + resolve(null); // 如果循环结束都没找到,resolve为null + }).catch((err) => { + console.error(err); + reject(err); // 如果请求失败,reject这个promise + }); + }); + } +} diff --git a/src/views/work/Dissatisfied.vue b/src/views/work/Dissatisfied.vue index 2b3025b..febb097 100644 --- a/src/views/work/Dissatisfied.vue +++ b/src/views/work/Dissatisfied.vue @@ -117,7 +117,16 @@ 未签收 - + + + +