计量客户列表优化
This commit is contained in:
@ -57,7 +57,7 @@
|
|||||||
const logId = ref('')
|
const logId = ref('')
|
||||||
const logPath = ref('/dayPlan/lngMeasureSales/datalog');
|
const logPath = ref('/dayPlan/lngMeasureSales/datalog');
|
||||||
import { DataLog } from '/@/components/pcitc';
|
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 { Modal } from 'ant-design-vue';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-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 btnEvent = {add : handleAdd,refresh : handleRefresh,datalog : handleDatalog,delete : handleDelete,save: handleSave, submit: handleSubmit, cancel: handleCancel}
|
||||||
|
|
||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
|
const tableData = ref([])
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const formIdComputedRef = ref();
|
const formIdComputedRef = ref();
|
||||||
formIdComputedRef.value = currentRoute.value.meta.formId
|
formIdComputedRef.value = currentRoute.value.meta.formId
|
||||||
@ -158,6 +159,11 @@
|
|||||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit,cuCode:curCuCode.value };
|
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit,cuCode:curCuCode.value };
|
||||||
},
|
},
|
||||||
afterFetch: (res) => {
|
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();
|
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) {
|
function onSelectChange(selectedRowKeys: [], selectedRows) {
|
||||||
selectedKeys.value = selectedRowKeys;
|
selectedKeys.value = selectedRowKeys;
|
||||||
selectedRowsData.value = selectedRows;
|
selectedRowsData.value = selectedRows;
|
||||||
|
|||||||
Reference in New Issue
Block a user