From f7a5fb8c05a7ed70ee96043481fc074cdd9b0e51 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 25 九月 2024 08:41:57 +0800
Subject: [PATCH] #
---
zy-asrs-admin/src/views/base/loc/index.vue | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/zy-asrs-admin/src/views/base/loc/index.vue b/zy-asrs-admin/src/views/base/loc/index.vue
index c6242b3..a435151 100644
--- a/zy-asrs-admin/src/views/base/loc/index.vue
+++ b/zy-asrs-admin/src/views/base/loc/index.vue
@@ -17,11 +17,17 @@
const searchInput = ref("")
const editChild = ref(null)
+const state = reactive({
+ selectedRowKeys: [],
+ loading: false,
+});
+
let tableData = ref([]);
getPage();
const {
getColumnSearchProps,
+ handleResizeColumn,
} = useTableSearch();
const columns = [
@@ -133,10 +139,7 @@
},
];
-const state = reactive({
- selectedRowKeys: [],
- loading: false,
-});
+
const hasSelected = computed(() => state.selectedRowKeys.length > 0);
const start = () => {
state.loading = true;
@@ -152,6 +155,7 @@
};
function getPage() {
+ state.loading = true;
post('/api/loc/page', {
current: currentPage,
pageSize: pageSize,
@@ -161,6 +165,8 @@
if (result.code == 200) {
let data = result.data;
tableData.value = data;
+
+ state.loading = false;
} else if (result.code === 401) {
message.error(result.msg);
logout()
@@ -228,7 +234,7 @@
<script>
export default {
- name: '搴撲綅'
+ name: '搴撲綅绠$悊'
}
</script>
@@ -246,7 +252,7 @@
<a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
:data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id"
:pagination="{ total: tableData.total, onChange: onPageChange }"
- :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns">
+ :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn" :loading="state.loading">
<template #bodyCell="{ column, text, record }">
<template v-if="column.dataIndex === 'oper'">
<div style="display: flex;justify-content: space-evenly;">
--
Gitblit v1.9.1