From ad49a47367c28466e42ae4c233d873d03a526c58 Mon Sep 17 00:00:00 2001 From: xuli3099 Date: Fri, 22 Aug 2025 21:58:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BE=85=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/notice.js | 10 +- src/pages.json | 12 +- src/pages/home/home.vue | 6 +- src/pages/notice/waitApprove.vue | 216 +++++++++++++++++++++++++++++++ src/utils/datetime.js | 41 ++++++ src/utils/status.js | 9 ++ 6 files changed, 285 insertions(+), 9 deletions(-) create mode 100644 src/pages/notice/waitApprove.vue diff --git a/src/api/notice.js b/src/api/notice.js index 483f367..d260280 100644 --- a/src/api/notice.js +++ b/src/api/notice.js @@ -6,4 +6,12 @@ export function noticeList(data) { url: '/acc/message/notify/detail', data }) -} \ No newline at end of file +} + +// 获取用户审批的待办和已办详情 +export function flowList(data) { + return request.post({ + url: '/acc/message/flow/detail', + data + }) +} diff --git a/src/pages.json b/src/pages.json index 5e726d4..bed6007 100644 --- a/src/pages.json +++ b/src/pages.json @@ -106,11 +106,13 @@ { "path": "pages/notice/notice", "style": { - "navigationBarTitleText": "", - "app-plus" : { - "bounce" : "none" // 取消APP端iOS回弹,避免与下拉刷新冲突 (可统一配在 'globalStyle') - }, - "mp-alipay":{"allowsBounceVertical":"NO"} // 取消支付宝和钉钉小程序的iOS回弹,避免与下拉刷新冲突 (可统一配在 'globalStyle') + "navigationBarTitleText": "" + } + }, + { + "path": "pages/notice/waitApprove", + "style": { + "navigationBarTitleText": "" } }, { diff --git a/src/pages/home/home.vue b/src/pages/home/home.vue index d0e9cc1..2c5547d 100644 --- a/src/pages/home/home.vue +++ b/src/pages/home/home.vue @@ -25,7 +25,7 @@ {{ backBlogObj.count1 }} 待办 - + {{ backBlogObj.count2 }} 待审查 @@ -141,12 +141,12 @@ + + \ No newline at end of file diff --git a/src/utils/datetime.js b/src/utils/datetime.js index b69b13c..8246eb1 100644 --- a/src/utils/datetime.js +++ b/src/utils/datetime.js @@ -86,4 +86,45 @@ export function getDate(type) { day = day > 9 ? day : '0' + day; return `${year}-${month}-${day}`; +} + +// 日期格式化 +export function parseTime(time, pattern) { + if (arguments.length === 0 || !time) { + return null + } + const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' + let date + if (typeof time === 'object') { + date = time + } else { + if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { + time = parseInt(time) + } else if (typeof time === 'string') { + time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), ''); + } + if ((typeof time === 'number') && (time.toString().length === 10)) { + time = time * 1000 + } + date = new Date(time) + } + const formatObj = { + y: date.getFullYear(), + m: date.getMonth() + 1, + d: date.getDate(), + h: date.getHours(), + i: date.getMinutes(), + s: date.getSeconds(), + a: date.getDay() + } + const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { + let value = formatObj[key] + // Note: getDay() returns 0 on Sunday + if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } + if (result.length > 0 && value < 10) { + value = '0' + value + } + return value || 0 + }) + return time_str } \ No newline at end of file diff --git a/src/utils/status.js b/src/utils/status.js index f46e3ab..1d3cb5c 100644 --- a/src/utils/status.js +++ b/src/utils/status.js @@ -8,4 +8,13 @@ export function formatIOS(type){ return result[type]; } +// 紧急程度 1-紧急 2-急 3-一般 +export function formatLevel(type){ + const result = { + 1:'紧急', + 2:'急', + 3:'一般', + } + return result[type]; +}