From ac4341ea6b66ae02427d39d35f41d42d78b2eb2e Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 14 二月 2025 10:08:32 +0800
Subject: [PATCH] #
---
zy-asrs-framework/src/main/resources/templates/vue/Index.txt | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 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 4bbdddf..1bd5260 100644
--- a/zy-asrs-framework/src/main/resources/templates/vue/Index.txt
+++ b/zy-asrs-framework/src/main/resources/templates/vue/Index.txt
@@ -17,6 +17,11 @@
const searchInput = ref("")
const editChild = ref(null)
+const state = reactive({
+ selectedRowKeys: [],
+ loading: false,
+});
+
let tableData = ref([]);
getPage();
@@ -33,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;
@@ -55,6 +57,7 @@
};
function getPage() {
+ state.loading = true;
post('/api/@{SIMPLEENTITYNAME}/page', {
current: currentPage,
pageSize: pageSize,
@@ -64,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()
@@ -105,7 +110,9 @@
}
const handleExport = async (intl) => {
- postBlob('/api/@{SIMPLEENTITYNAME}/export', {}).then(result => {
+ postBlob('/api/@{SIMPLEENTITYNAME}/export', {
+ condition: searchInput.value
+ }).then(result => {
const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' });
window.location.href = window.URL.createObjectURL(blob);
return true;
@@ -149,7 +156,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" @resizeColumn="handleResizeColumn">
+ :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