From 55234d83d82c9777ec4bf15570259c0c3fc09631 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 18 九月 2024 13:32:03 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/loc/LocList.jsx |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/zy-acs-flow/src/page/loc/LocList.jsx b/zy-acs-flow/src/page/loc/LocList.jsx
index 4a4e0e7..20bf815 100644
--- a/zy-acs-flow/src/page/loc/LocList.jsx
+++ b/zy-acs-flow/src/page/loc/LocList.jsx
@@ -42,6 +42,8 @@
 import MyField from "../components/MyField";
 import { PAGE_DRAWER_WIDTH, OPERATE_MODE } from '@/config/setting';
 import * as Common from '@/utils/common';
+import InitButton from "./InitButton";
+import RepartitionIcon from '@mui/icons-material/Repartition';
 
 const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
     '& .css-1vooibu-MuiSvgIcon-root': {
@@ -50,7 +52,8 @@
     '& .RaDatagrid-row': {
         cursor: 'auto'
     },
-    '& .column-name': {
+    '& .column-locNo': {
+        minWidth: 180
     },
     '& .opt': {
         width: 200
@@ -115,10 +118,11 @@
                 title={"menu.loc"}
                 empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
                 filters={filters}
-                sort={{ field: "create_time", order: "desc" }}
+                sort={{ field: "locNo", order: "asc" }}
                 actions={(
                     <TopToolbar>
                         <FilterButton />
+                        <InitButton label='page.loc.init' icon={<RepartitionIcon />} />
                         <MyCreateButton onClick={() => { setCreateDialog(true) }} />
                         <SelectColumnsButton preferenceKey='loc' />
                         <MyExportButton />
@@ -132,7 +136,7 @@
                     rowClick={(id, resource, record) => false}
                     expand={() => <LocPanel />}
                     expandSingle={true}
-                    omit={['id', 'locType', 'uuid', 'updateBy', 'createTime', 'createBy', 'memo']}
+                    omit={['id', 'locType', 'uuid', 'statusBool', 'updateBy', 'createTime', 'createBy', 'memo']}
                 >
                     <NumberField source="id" />
                     <TextField source="locNo" label="table.field.loc.locNo" />
@@ -146,7 +150,7 @@
                         <TextField source="data" />
                     </ReferenceField>
                     {/* <TextField source="compDirect$" label="table.field.loc.compDirect" sortable={false} /> */}
-                    <ReferenceField source="locSts" label="table.field.loc.locSts" reference="locSts" link={false} sortable={false}>
+                    <ReferenceField source="locSts" label="table.field.loc.locSts" reference="locSts" link={false} sortable={true}>
                         <TextField source="name" />
                     </ReferenceField>
                     <NumberField source="row" label="table.field.loc.row" />
@@ -171,7 +175,7 @@
                     <TextField source="memo" label="common.field.memo" sortable={false} />
                     <WrapperField cellClassName="opt" label="common.field.opt">
                         <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} />
-                        <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
+                        <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={'optimistic'} />
                     </WrapperField>
                 </StyledDatagrid>
             </List>

--
Gitblit v1.9.1