fix: 日期选择清空异常和移除console

This commit is contained in:
TsMask
2023-09-26 18:52:35 +08:00
parent 34c43c5af1
commit 3b9b56fec9
14 changed files with 46 additions and 21 deletions

View File

@@ -36,7 +36,7 @@ function fnQueryReset() {
queryParams = Object.assign(queryParams, {
accountName: '',
beginTime: '',
endTime: undefined,
endTime: '',
pageNum: 1,
pageSize: 20,
});
@@ -97,7 +97,7 @@ let tableColumns: ColumnsType = [
title: 'MML',
dataIndex: 'mml',
key: 'mml',
align: 'center',
align: 'left',
},
{
title: '记录时间',
@@ -147,10 +147,12 @@ function fnTableSize({ key }: MenuInfo) {
function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listMML(toRaw(queryParams)).then(res => {
console.log(res);
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
tablePagination.total = res.total;
tableState.data = res.rows;
@@ -279,12 +281,10 @@ onMounted(() => {
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'mml'">
<a-space :size="8" align="center">
<a-tooltip>
<template #title>{{ record.result }}</template>
<div class="mmlText">{{ record.mml }}</div>
</a-tooltip>
</a-space>
<a-tooltip>
<template #title>{{ record.result }}</template>
<div class="mmlText">{{ record.mml }}</div>
</a-tooltip>
</template>
</template>
</a-table>
@@ -297,8 +297,7 @@ onMounted(() => {
padding: 0 24px;
}
.mmlText {
max-width: 200px;
max-width: 800px;
cursor: pointer;
text-align: start;
}
</style>