From 904471d156cb5dcc2bc9595f4827b3c433a622c3 Mon Sep 17 00:00:00 2001 From: hebo Date: Wed, 24 Dec 2025 19:42:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 4 +- src/api/base/zwApi.ts | 4 + .../BasicForm/components/BasicDateTime.vue | 11 ++ .../BasicForm/components/BasicPicker.vue | 11 ++ .../BasicForm/components/BasicTree.vue | 19 +- src/components/BasicPicker/Picker.vue | 13 ++ .../BasicPicker/TimePicker/DatetimePicker.vue | 17 +- src/components/BasicTree/Tree.vue | 21 +++ .../view/routine/JiFenPingJia/jfdj/edit.vue | 100 ++++++---- .../JiFenPingJia/jfself/IntegralApply.vue | 37 +++- .../view/routine/JiFenPingJia/jfsp/JfEdit.vue | 38 +++- .../view/routine/JiFenPingJia/jfsp/JfFlow.vue | 64 ++++--- src/pages/view/routine/wj/index.vue | 2 +- src/pages/view/routine/wj/indexdl.vue | 2 +- src/pages/view/routine/wj/indexwb.vue | 172 ++++-------------- src/pages/view/routine/wj/wjDetail.vue | 2 +- src/pages/view/routine/wj/wjEvaluate.vue | 30 ++- src/pages/view/routine/wj/wjEvaluatedl.vue | 29 ++- 18 files changed, 356 insertions(+), 220 deletions(-) diff --git a/index.html b/index.html index c04172b..cb0ff4b 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - + @@ -14,7 +14,7 @@ document.write( '') - log=false + var log = false; // 版本检查:如果检测到新版本,清除缓存并刷新 (function() { diff --git a/src/api/base/zwApi.ts b/src/api/base/zwApi.ts index aa428c3..b69e9a1 100644 --- a/src/api/base/zwApi.ts +++ b/src/api/base/zwApi.ts @@ -78,6 +78,10 @@ export const findAllZw = () => { + + + + diff --git a/src/components/BasicForm/components/BasicDateTime.vue b/src/components/BasicForm/components/BasicDateTime.vue index 55e5a47..5ad3d6c 100644 --- a/src/components/BasicForm/components/BasicDateTime.vue +++ b/src/components/BasicForm/components/BasicDateTime.vue @@ -19,6 +19,7 @@ :mode="attrs.componentProps.mode" :title="attrs.label" :value="newValue ? newValue : undefined" + :onPopupChange="handlePopupChange" @confirm="confirm" /> @@ -94,4 +95,14 @@ function confirm(e: any) { attrs.componentProps.ok(e, attrs); } } + +// 处理弹窗状态变化 +function handlePopupChange(e: any) { + if ( + attrs.componentProps.onPopupChange && + typeof attrs.componentProps.onPopupChange === "function" + ) { + attrs.componentProps.onPopupChange(e); + } +} diff --git a/src/components/BasicForm/components/BasicPicker.vue b/src/components/BasicForm/components/BasicPicker.vue index 23775d6..842e2af 100644 --- a/src/components/BasicForm/components/BasicPicker.vue +++ b/src/components/BasicForm/components/BasicPicker.vue @@ -35,6 +35,7 @@ v-model="pickerKey" @ok="ok" @change="change" + @popupChange="handlePopupChange" /> @@ -161,6 +162,16 @@ function change(e: any) { } } +// 处理弹窗状态变化 +function handlePopupChange(e: any) { + if ( + attrs.componentProps.onPopupChange && + typeof attrs.componentProps.onPopupChange === "function" + ) { + attrs.componentProps.onPopupChange(e); + } +} + const pickerValue = ref(""); watchEffect(() => { diff --git a/src/components/BasicForm/components/BasicTree.vue b/src/components/BasicForm/components/BasicTree.vue index a7ebf80..5711b35 100644 --- a/src/components/BasicForm/components/BasicTree.vue +++ b/src/components/BasicForm/components/BasicTree.vue @@ -19,7 +19,8 @@ :rangeKey="rangeKey" :title="'选择'+ attrs.label" @confirm="confirm" - v-bind="attrs.componentProps" + :onPopupChange="handlePopupChange" + v-bind="treeProps" /> @@ -60,6 +61,12 @@ const rangeKey = ref(attrs.componentProps && attrs.componentProps.rangeKey || '') const savaKey = ref(attrs.componentProps && attrs.componentProps.savaKey || '') + // 过滤掉 onPopupChange,避免重复传递 + const treeProps = computed(() => { + const { onPopupChange, ...rest } = attrs.componentProps || {} + return rest + }) + const range = computed({ get() { if (attrs.componentProps && attrs.componentProps.range) { @@ -106,6 +113,16 @@ } } + // 处理弹窗状态变化 + function handlePopupChange(e: any) { + if ( + attrs.componentProps.onPopupChange && + typeof attrs.componentProps.onPopupChange === "function" + ) { + attrs.componentProps.onPopupChange(e); + } + } + function hx(rangeData: any, data: any) { let valueList = data.split(',') for (const key in rangeData) { diff --git a/src/components/BasicPicker/Picker.vue b/src/components/BasicPicker/Picker.vue index e4de712..3eb1ead 100644 --- a/src/components/BasicPicker/Picker.vue +++ b/src/components/BasicPicker/Picker.vue @@ -81,6 +81,11 @@ const props = defineProps({ type: Array, default: [0], }, + // 支持通过 props 传递弹窗状态变化回调 + onPopupChange: { + type: Function, + default: null, + }, }); const emits = defineEmits([ @@ -132,6 +137,14 @@ function ok() { function popupChange(e) { emits("popupChange", e); + // 如果传递了回调函数,调用它 + if (props.onPopupChange) { + try { + props.onPopupChange(e); + } catch (err) { + console.error('[BasicPicker] 调用 onPopupChange 失败:', err); + } + } } defineExpose({ open, close }); diff --git a/src/components/BasicPicker/TimePicker/DatetimePicker.vue b/src/components/BasicPicker/TimePicker/DatetimePicker.vue index 571dcc5..3fd89a2 100644 --- a/src/components/BasicPicker/TimePicker/DatetimePicker.vue +++ b/src/components/BasicPicker/TimePicker/DatetimePicker.vue @@ -1,5 +1,5 @@