From fb4e7fd8575a97467a972028a91484f71985656c Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期四, 12 九月 2024 17:03:47 +0800
Subject: [PATCH] #

---
 zy-asrs-framework/src/main/resources/templates/vue/Index.txt |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/zy-asrs-framework/src/main/resources/templates/vue/Index.txt b/zy-asrs-framework/src/main/resources/templates/vue/Index.txt
index 367711a..bf8b96a 100644
--- a/zy-asrs-framework/src/main/resources/templates/vue/Index.txt
+++ b/zy-asrs-framework/src/main/resources/templates/vue/Index.txt
@@ -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 = [
@@ -32,13 +38,10 @@
     dataIndex: 'oper',
     key: 'oper',
     width: 140,
+    fixed: 'right',
   },
 ];
 
-const state = reactive({
-  selectedRowKeys: [],
-  loading: false,
-});
 const hasSelected = computed(() => state.selectedRowKeys.length > 0);
 const start = () => {
   state.loading = true;
@@ -54,6 +57,7 @@
 };
 
 function getPage() {
+  state.loading = true;
   post('/api/@{SIMPLEENTITYNAME}/page', {
     current: currentPage,
     pageSize: pageSize,
@@ -63,6 +67,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()
@@ -148,7 +154,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