From d2627b856fd87262bcb474515efc8a79ad747726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Wed, 18 Mar 2026 16:23:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E9=87=8F=E5=AE=A2=E6=88=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dayPlan/LngMeasureSales/index.vue | 23 ++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/views/dayPlan/LngMeasureSales/index.vue b/src/views/dayPlan/LngMeasureSales/index.vue index ff8df86..e0fc33b 100644 --- a/src/views/dayPlan/LngMeasureSales/index.vue +++ b/src/views/dayPlan/LngMeasureSales/index.vue @@ -57,7 +57,7 @@ const logId = ref('') const logPath = ref('/dayPlan/lngMeasureSales/datalog'); import { DataLog } from '/@/components/pcitc'; - import { ref, computed, onMounted, onUnmounted, createVNode, } from 'vue'; + import { ref, computed, onMounted, onUnmounted, createVNode, watch} from 'vue'; import { Modal } from 'ant-design-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; @@ -129,6 +129,7 @@ const btnEvent = {add : handleAdd,refresh : handleRefresh,datalog : handleDatalog,delete : handleDelete,save: handleSave, submit: handleSubmit, cancel: handleCancel} const { currentRoute } = useRouter(); + const tableData = ref([]) const router = useRouter(); const formIdComputedRef = ref(); formIdComputedRef.value = currentRoute.value.meta.formId @@ -158,6 +159,11 @@ return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit,cuCode:curCuCode.value }; }, afterFetch: (res) => { + tableData.value = res || [] + tableData.value.forEach(v => { + v.timeIn = v.timeIn ? dayjs(v.timeIn) : null + v.timeOut = v.timeOut ? dayjs(v.timeOut) : null + }) tableRef.value.setToolBarWidth(); }, @@ -181,6 +187,21 @@ }, }); + watch( + () => tableData.value, + (val) => { + if (val) { + + if (tableData.value.length) { + setTableData(tableData.value) + } + } + }, + { + immediate: true, + deep: true, + } + ); function onSelectChange(selectedRowKeys: [], selectedRows) { selectedKeys.value = selectedRowKeys; selectedRowsData.value = selectedRows;