From c899675f6cd2303dc802ee7d04d4bf5dc903ac02 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 18 三月 2026 11:37:31 +0800
Subject: [PATCH] 进销存升级app 1.工作台图标替换
---
src/pages/safeProduction/safetyTrainingAssessment/index.vue | 42 ++++++++++++++++++++++++++++++------------
1 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/src/pages/safeProduction/safetyTrainingAssessment/index.vue b/src/pages/safeProduction/safetyTrainingAssessment/index.vue
index f2107ae..fde745e 100644
--- a/src/pages/safeProduction/safetyTrainingAssessment/index.vue
+++ b/src/pages/safeProduction/safetyTrainingAssessment/index.vue
@@ -1,7 +1,7 @@
<template>
<view class="sales-accoun">
<!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
- <PageHeader title="瀹夊叏鍩硅璇勪及"
+ <PageHeader title="瀹夊叏鍩硅鑰冩牳"
@back="goBack" />
<!-- 鎼滅储鍜岀瓫閫夊尯鍩� -->
<view class="search-section">
@@ -100,7 +100,7 @@
</view>
<!-- 鎸夐挳鍖哄煙 -->
<view class="action-buttons">
- <u-button type="primary"
+ <!-- <u-button type="primary"
size="small"
class="action-btn"
:disabled="item.state !== 0"
@@ -118,7 +118,7 @@
class="action-btn"
@click="deleteVisit(item)">
鍒犻櫎
- </u-button>
+ </u-button> -->
</view>
<view class="action-buttons">
<u-button type="warning"
@@ -149,12 +149,12 @@
@cancel="handleDateCancel"
title="閫夋嫨鍩硅鏃ユ湡" />
<!-- 娴姩鏂板鎸夐挳 -->
- <view class="fab-button"
+ <!-- <view class="fab-button"
@click="addVisit">
<up-icon name="plus"
size="24"
color="#ffffff"></up-icon>
- </view>
+ </view> -->
</view>
</template>
@@ -186,20 +186,22 @@
// 鑾峰彇瀛楀吀鏁版嵁
const { safe_training_methods } = useDict("safe_training_methods");
- // 鎼滅储鍏抽敭璇�
- const searchKeyword = ref("");
+ // 鎼滅储鍏抽敭璇嶏紝榛樿涓哄綋澶╂棩鏈�
+ const searchKeyword = ref(dayjs().format("YYYY-MM-DD"));
// 鏃ユ湡閫夋嫨鍣ㄧ姸鎬�
const trainingDateVisible = ref(false);
+ // 鏃ユ湡缁勪欢缁戝畾鍊硷紙鐢ㄤ簬鎺у埗榛樿閫変腑鏃ユ湡锛�
+ const trainingDateModel = ref(Date.now());
const tabList = reactive([
{ name: "鏈紑濮�", value: 0 },
{ name: "杩涜涓�", value: 1 },
{ name: "宸茬粨鏉�", value: 2 },
]);
- // 鎼滅储琛ㄥ崟
+ // 鎼滅储琛ㄥ崟锛屽煿璁棩鏈熼粯璁ゅ綋澶�
const searchForm = ref({
- state: 0, // 榛樿鏄剧ず宸茬粨鏉�
- trainingDate: "",
+ state: 0,
+ trainingDate: dayjs().format("YYYY-MM-DD"),
});
const tabhandleQuery = val => {
searchForm.value.state = val.value;
@@ -275,6 +277,7 @@
const clearDate = () => {
searchKeyword.value = "";
searchForm.value.trainingDate = "";
+ trainingDateModel.value = Date.now();
getList();
};
// 鏄剧ず鏃ユ湡閫夋嫨鍣�
@@ -284,8 +287,23 @@
// 澶勭悊鏃ユ湡閫夋嫨纭
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;
+ trainingDateModel.value = typeof normalized === "undefined" ? Date.now() : normalized;
trainingDateVisible.value = false;
getList();
};
--
Gitblit v1.9.3