点击排序时增加表格锁定

This commit is contained in:
lai
2024-01-05 11:35:09 +08:00
parent 327a377e79
commit 0b6303e544

View File

@@ -74,7 +74,7 @@ let queryParams: any = reactive({
/**表格分页、排序、筛选变化时触发操作, 排序方式,取值为 ascend descend */
function fnTableChange(pagination: any, filters: any, sorter: any, extra: any) {
console.log(sorter)
tableState.loading = true;
const { columnKey, order } = sorter;
if (order) {
queryParams.sortField = columnKey;
@@ -198,10 +198,11 @@ function fnDesign() {
let goldXDate: any = [];
let goldYData: any = [];
let hideAll: any = {};
goldData(queryParams).then(res => {
goldData(queryParams)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
console.log(res.data)
console.log(res.data);
tableState.data = res.data;
goldXDate = res.data.map((item: any) => item.timeGroup);
goldYData = Object.keys(res.data[0])
@@ -258,7 +259,9 @@ function fnDesign() {
right: '30%',
bottom: '20%',
},
yAxis: [{ type: 'value', splitNumber: 4, axisLabel: { fontSize: 10 } }],
yAxis: [
{ type: 'value', splitNumber: 4, axisLabel: { fontSize: 10 } },
],
};
chartsOption.perfChart = option;
@@ -269,6 +272,9 @@ function fnDesign() {
duration: 2,
});
}
})
.finally(() => {
tableState.loading = false;
});
}