From 5f14e63a2400456055086632e027951086114648 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期五, 06 十二月 2024 15:07:04 +0800
Subject: [PATCH] #
---
zy-asrs-admin/src/views/base/zpalletBarcode/index.vue | 26 +++++++++++++++++++++-----
1 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/zy-asrs-admin/src/views/base/zpalletBarcode/index.vue b/zy-asrs-admin/src/views/base/zpalletBarcode/index.vue
index 4402c12..f65dd53 100644
--- a/zy-asrs-admin/src/views/base/zpalletBarcode/index.vue
+++ b/zy-asrs-admin/src/views/base/zpalletBarcode/index.vue
@@ -7,6 +7,7 @@
import EditView from './edit.vue'
import { formatMessage } from '@/utils/localeUtils.js';
import ZpalletBarcodePrint from '@/components/print/zpalletBarcodePrint/index.vue';
+import useTableSearch from '@/utils/tableUtils.jsx';
const context = getCurrentInstance()?.appContext.config.globalProperties;
const router = useRouter();
@@ -22,8 +23,18 @@
let generateBarcodeValue = ref("80000001");
let generateNum = ref(100);
+const state = reactive({
+ selectedRowKeys: [],
+ loading: false,
+});
+
let tableData = ref([]);
getPage();
+
+const {
+ getColumnSearchProps,
+ handleResizeColumn,
+} = useTableSearch();
const columns = [
{
@@ -31,18 +42,21 @@
dataIndex: 'barcode',
width: 140,
ellipsis: true,
+ ...getColumnSearchProps('barcode'),
},
{
title: formatMessage('db.man_zpallet_barcode.flag', '鏍囪瘑'),
dataIndex: 'flag',
width: 140,
ellipsis: true,
+ ...getColumnSearchProps('flag'),
},
{
title: formatMessage('db.man_zpallet_barcode.barcode_print', '鎵撳嵃鐘舵��'),
dataIndex: 'barcodePrint$',
width: 140,
ellipsis: true,
+ ...getColumnSearchProps('barcodePrint$'),
},
// {
// title: formatMessage('db.man_zpallet_barcode.uuid', '缂栧彿'),
@@ -55,6 +69,7 @@
dataIndex: 'status$',
width: 140,
ellipsis: true,
+ ...getColumnSearchProps('status$'),
},
// {
// title: formatMessage('db.man_zpallet_barcode.create_time', '娣诲姞鏃堕棿'),
@@ -85,6 +100,7 @@
dataIndex: 'memo',
width: 140,
ellipsis: true,
+ ...getColumnSearchProps('memo'),
},
{
@@ -96,10 +112,7 @@
},
];
-const state = reactive({
- selectedRowKeys: [],
- loading: false,
-});
+
const hasSelected = computed(() => state.selectedRowKeys.length > 0);
const start = () => {
state.loading = true;
@@ -115,6 +128,7 @@
};
function getPage() {
+ state.loading = true;
post('/api/zpalletBarcode/page', {
current: currentPage,
pageSize: pageSize,
@@ -124,6 +138,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()
@@ -256,7 +272,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