From a222a1024581067cc7823298172aaef539128d82 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 10 三月 2026 15:51:07 +0800
Subject: [PATCH] fix: 安全培训-筛选日期有误
---
package.json | 50 ++++++++++++------------
vite.config.js | 2
src/pages/safeProduction/safetyTrainingAssessment/index.vue | 18 ++++++++-
3 files changed, 42 insertions(+), 28 deletions(-)
diff --git a/package.json b/package.json
index c31f1c2..c771476 100644
--- a/package.json
+++ b/package.json
@@ -52,22 +52,22 @@
"clean:windows": "rd /s /q dist || rd /s /q node_modules"
},
"dependencies": {
- "@dcloudio/uni-app": "3.0.0-4060420250429001",
- "@dcloudio/uni-app-harmony": "3.0.0-4060420250429001",
- "@dcloudio/uni-app-plus": "3.0.0-4060420250429001",
- "@dcloudio/uni-components": "3.0.0-4060420250429001",
- "@dcloudio/uni-h5": "3.0.0-4060420250429001",
- "@dcloudio/uni-mp-alipay": "3.0.0-4060420250429001",
- "@dcloudio/uni-mp-baidu": "3.0.0-4060420250429001",
- "@dcloudio/uni-mp-harmony": "3.0.0-4060420250429001",
- "@dcloudio/uni-mp-jd": "3.0.0-4060420250429001",
- "@dcloudio/uni-mp-kuaishou": "3.0.0-4060420250429001",
- "@dcloudio/uni-mp-lark": "3.0.0-4060420250429001",
- "@dcloudio/uni-mp-qq": "3.0.0-4060420250429001",
- "@dcloudio/uni-mp-toutiao": "3.0.0-4060420250429001",
- "@dcloudio/uni-mp-weixin": "3.0.0-4060420250429001",
- "@dcloudio/uni-mp-xhs": "3.0.0-4060420250429001",
- "@dcloudio/uni-quickapp-webview": "3.0.0-4060420250429001",
+ "@dcloudio/uni-app": "3.0.0-4080720251210001",
+ "@dcloudio/uni-app-harmony": "3.0.0-4080720251210001",
+ "@dcloudio/uni-app-plus": "3.0.0-4080720251210001",
+ "@dcloudio/uni-components": "3.0.0-4080720251210001",
+ "@dcloudio/uni-h5": "3.0.0-4080720251210001",
+ "@dcloudio/uni-mp-alipay": "3.0.0-4080720251210001",
+ "@dcloudio/uni-mp-baidu": "3.0.0-4080720251210001",
+ "@dcloudio/uni-mp-harmony": "3.0.0-4080720251210001",
+ "@dcloudio/uni-mp-jd": "3.0.0-4080720251210001",
+ "@dcloudio/uni-mp-kuaishou": "3.0.0-4080720251210001",
+ "@dcloudio/uni-mp-lark": "3.0.0-4080720251210001",
+ "@dcloudio/uni-mp-qq": "3.0.0-4080720251210001",
+ "@dcloudio/uni-mp-toutiao": "3.0.0-4080720251210001",
+ "@dcloudio/uni-mp-weixin": "3.0.0-4080720251210001",
+ "@dcloudio/uni-mp-xhs": "3.0.0-4080720251210001",
+ "@dcloudio/uni-quickapp-webview": "3.0.0-4080720251210001",
"@dcloudio/uvm": "^0.3.1",
"@jridgewell/sourcemap-codec": "^1.5.0",
"@qiun/wx-ucharts": "2.5.0-20230101",
@@ -80,21 +80,21 @@
"tslib": "^2.7.0",
"uview-plus": "^3.4.62",
"vue": "3.4.21",
- "vue-i18n": "^9.14.2"
+ "vue-i18n": "9.14.4"
},
"devDependencies": {
- "@dcloudio/types": "^3.4.14",
- "@dcloudio/uni-automator": "3.0.0-4060420250429001",
- "@dcloudio/uni-cli-shared": "3.0.0-4060420250429001",
- "@dcloudio/uni-stacktracey": "3.0.0-4060420250429001",
- "@dcloudio/vite-plugin-uni": "3.0.0-4060420250429001",
- "@vue/runtime-core": "^3.5.12",
+ "@dcloudio/types": "3.4.19",
+ "@dcloudio/uni-automator": "3.0.0-4080720251210001",
+ "@dcloudio/uni-cli-shared": "3.0.0-4080720251210001",
+ "@dcloudio/uni-stacktracey": "3.0.0-4080720251210001",
+ "@dcloudio/vite-plugin-uni": "3.0.0-4080720251210001",
+ "@vue/runtime-core": "3.5.30",
"@vue/tsconfig": "^0.5.1",
"less": "^4.2.0",
"sass": "1.78.0",
"sass-loader": "^16.0.1",
"typescript": "^5.6.2",
- "vite": "5.4.10",
+ "vite": "5.2.8",
"vue-tsc": "2.1.6"
}
-}
\ No newline at end of file
+}
diff --git a/src/pages/safeProduction/safetyTrainingAssessment/index.vue b/src/pages/safeProduction/safetyTrainingAssessment/index.vue
index 44a99c7..e13c2a8 100644
--- a/src/pages/safeProduction/safetyTrainingAssessment/index.vue
+++ b/src/pages/safeProduction/safetyTrainingAssessment/index.vue
@@ -284,8 +284,22 @@
// 澶勭悊鏃ユ湡閫夋嫨纭
const handleDateConfirm = e => {
- searchKeyword.value = dayjs(e.value).format("YYYY-MM-DD");
- searchForm.value.trainingDate = dayjs(e.value).format("YYYY-MM-DD");
+ const raw = e?.value;
+ // up-datetime-picker 鐨� value 鍙兘鏄� Date / 姣鏃堕棿鎴�(13浣�) / 绉掓椂闂存埑(10浣�) / 瀛楃涓�
+ const normalized =
+ typeof raw === "number"
+ ? raw < 1e12
+ ? raw * 1000
+ : raw
+ : typeof raw === "string" && /^\d+$/.test(raw)
+ ? raw.length === 10
+ ? Number(raw) * 1000
+ : Number(raw)
+ : raw;
+
+ const formatted = dayjs(normalized).format("YYYY-MM-DD");
+ searchKeyword.value = formatted;
+ searchForm.value.trainingDate = formatted;
trainingDateVisible.value = false;
getList();
};
diff --git a/vite.config.js b/vite.config.js
index 1d873bb..47bdde1 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -9,7 +9,7 @@
outDir: 'dist',
},
server: {
- port: '80'
+ port: 5173
},
plugins: [
uni()
--
Gitblit v1.9.3