From e6a0428542af9f5d8f619cfba554d8d993893ca5 Mon Sep 17 00:00:00 2001 From: liugongyu <290219706@qq.com> Date: Fri, 26 Dec 2025 14:04:45 +0800 Subject: [PATCH] 单图情况 宽高70*70 --- api/user.js | 8 ++++++++ common/config/global.js | 3 ++- common/utils/common.js | 21 ++++++++++++++++++++- pages-sub/daily/patrol-manage/add-patrol-record.vue | 22 +++++++++++++++++++--- pages-sub/daily/patrol-manage/index.vue | 1 + pages-sub/daily/quick-order/order-detail.vue | 3 +-- pages-sub/problem/work-order-manage/add-maintain-order.vue | 5 ++--- pages-sub/problem/work-order-manage/add-order.vue | 264 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------- pages-sub/problem/work-order-manage/index.vue | 21 ++++++++++++++++----- pages-sub/problem/work-order-manage/order-detail.vue | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------- pages.json | 17 +++++++++-------- pages/login/index.vue | 10 +++++----- pages/workbench/index.vue | 33 +++++++++++++++++++++++++++++++++ pinia/user.js | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 14 files changed, 461 insertions(+), 134 deletions(-) diff --git a/api/user.js b/api/user.js index d1a36f2..58ab7ef 100644 --- a/api/user.js +++ b/api/user.js @@ -41,3 +41,11 @@ export const moduleList = () => { export const getSimpleDictDataList = () => { return get('/admin-api/system/dict-data/simple-list') } + +/** + * 刷新token + * @returns {Promise} + */ +export const refreshToken = (params) => { + return post('/admin-api/system/auth/refresh-token?refreshToken='+params) +} diff --git a/common/config/global.js b/common/config/global.js index 2ed4bd5..5729efd 100644 --- a/common/config/global.js +++ b/common/config/global.js @@ -23,7 +23,8 @@ export default { expireTimeKey: 'jcss_token_expire', userIdKey:'jcss_user_id', moduleListKey:'jcss_module_list', - dictDataKey:'jcss_dict_data' + dictDataKey:'jcss_dict_data', + refreshTokenKey: 'jcss_user_refresh_token', // 新增:刷新令牌缓存key }, appName: 'JCSS管理系统', tokenExpireTime: 7 * 24 * 60 * 60 * 1000 diff --git a/common/utils/common.js b/common/utils/common.js index 97fde66..7a1e978 100644 --- a/common/utils/common.js +++ b/common/utils/common.js @@ -162,4 +162,23 @@ export const calculateFormatTimeDiff = (startTime, endTime) => { // 8. 拼接并返回结果 return validTimeParts.join(''); -}; \ No newline at end of file +}; + + +/** + * 将日期数组 [年, 月, 日] 转为标准日期字符串(兼容 iOS/Android) + * @param {Array} dateArr 日期数组,如 [2025, 12, 20] + * @returns {String} 标准日期字符串,如 '2025-12-20' + */ +export const convertArrToDateStr= (dateArr)=> { + // 边界判断:非数组/长度不足3,返回空 + if (!Array.isArray(dateArr) || dateArr.length < 3) { + return dateArr; + } + // 解构年、月、日,补零处理(确保格式统一,如 12月→12,2月→02) + const [year, month, day] = dateArr; + const formatMonth = month.toString().padStart(2, '0'); + const formatDay = day.toString().padStart(2, '0'); + // 拼接为标准字符串 + return `${year}-${formatMonth}-${formatDay}`; +} \ No newline at end of file diff --git a/pages-sub/daily/patrol-manage/add-patrol-record.vue b/pages-sub/daily/patrol-manage/add-patrol-record.vue index 70b49b4..8e0640e 100644 --- a/pages-sub/daily/patrol-manage/add-patrol-record.vue +++ b/pages-sub/daily/patrol-manage/add-patrol-record.vue @@ -6,7 +6,7 @@ label-position="left" :model="inspectForm" ref="inspectFormRef" - labelWidth="190rpx" + labelWidth="200rpx" > + - > + @@ -292,6 +302,12 @@ export default { this.show = false this.$refs.inspectFormRef.validateField('expectedFinishDate') }, + // 新增:清除希望完成时间的方法 + clearExpectedFinishDate() { + this.inspectForm.expectedFinishDate = '' + // 清除后触发一次字段校验,确保校验状态更新 + this.$refs.inspectFormRef.validateField('expectedFinishDate') + }, deleteImg(event) { this.imagesList.splice(event.index, 1) diff --git a/pages-sub/daily/patrol-manage/index.vue b/pages-sub/daily/patrol-manage/index.vue index ffdfd7b..f31fae4 100644 --- a/pages-sub/daily/patrol-manage/index.vue +++ b/pages-sub/daily/patrol-manage/index.vue @@ -108,6 +108,7 @@ import { timeFormat } from '@/uni_modules/uview-plus'; import { ref } from 'vue'; import { onLoad, onShow } from '@dcloudio/uni-app'; import { inspectionPlanPage } from "@/api/patrol-manage/patrol-plan"; +import { convertArrToDateStr } from "@/common/utils/common"; // Tabs 配置 const tabList = ref([ {name: '待完成', id: '1'}, diff --git a/pages-sub/daily/quick-order/order-detail.vue b/pages-sub/daily/quick-order/order-detail.vue index 0e626a7..2dfb0f7 100644 --- a/pages-sub/daily/quick-order/order-detail.vue +++ b/pages-sub/daily/quick-order/order-detail.vue @@ -21,7 +21,7 @@ @@ -42,7 +42,6 @@ diff --git a/pages-sub/problem/work-order-manage/add-maintain-order.vue b/pages-sub/problem/work-order-manage/add-maintain-order.vue index 838609c..0ca8c54 100644 --- a/pages-sub/problem/work-order-manage/add-maintain-order.vue +++ b/pages-sub/problem/work-order-manage/add-maintain-order.vue @@ -64,6 +64,7 @@ active-color="#1989fa" inactive-color="#666666" @change = "imgTabChange" + >