From 7f70cb15d035f0c233b9e62b9e43aa985317c908 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 04 十一月 2024 10:22:45 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/code/CodeList.jsx |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/zy-acs-flow/src/page/code/CodeList.jsx b/zy-acs-flow/src/page/code/CodeList.jsx
index 0bf323c..d41e9e5 100644
--- a/zy-acs-flow/src/page/code/CodeList.jsx
+++ b/zy-acs-flow/src/page/code/CodeList.jsx
@@ -40,8 +40,13 @@
 import MyExportButton from '../components/MyExportButton';
 import PageDrawer from "../components/PageDrawer";
 import MyField from "../components/MyField";
-import { PAGE_DRAWER_WIDTH, OPERATE_MODE } from '@/config/setting';
+import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
 import * as Common from '@/utils/common';
+import ImportButton from '../components/ImportButton'
+import { useCodeImport } from './useCodeImport';
+
+import * as importTemp from './importTemp.csv?raw';
+const IMPORT_TEMP_URL = `data:text/csv;name=crm_contacts_sample.csv;charset=utf-8,${encodeURIComponent(importTemp.default)}`;
 
 const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
     '& .css-1vooibu-MuiSvgIcon-root': {
@@ -63,13 +68,13 @@
     <DateInput label='common.time.before' source="timeEnd" alwaysOn />,
 
     <TextInput source="uuid" label="table.field.code.uuid" />,
-    <TextInput source="data" label="table.field.code.data" />,
+    <TextInput source="data" label="table.field.code.data" alwaysOn />,
     <NumberInput source="x" label="table.field.code.x" />,
     <NumberInput source="y" label="table.field.code.y" />,
     <SelectInput source="concer" label="table.field.code.concer"
         choices={[
-            { id: 1, name: '鏄�' },
-            { id: 0, name: '鍚�' },
+            { id: '1', name: 'common.enums.true' },
+            { id: '0', name: 'common.enums.false' },
         ]}
     />,
     <TextInput source="scale" label="table.field.code.scale" />,
@@ -111,10 +116,11 @@
                         <FilterButton />
                         <MyCreateButton onClick={() => { setCreateDialog(true) }} />
                         <SelectColumnsButton preferenceKey='code' />
+                        <ImportButton importTemp={IMPORT_TEMP_URL} useCodeImport={useCodeImport} onceBatch={10} />
                         <MyExportButton />
                     </TopToolbar>
                 )}
-                perPage={25}
+                perPage={DEFAULT_PAGE_SIZE}
             >
                 <StyledDatagrid
                     preferenceKey='code'
@@ -122,17 +128,23 @@
                     rowClick={(id, resource, record) => false}
                     expand={() => <CodePanel />}
                     expandSingle={true}
-                    omit={['id', 'createTime', 'memo']}
+                    omit={['id', 'createTime', 'createBy', 'memo']}
                 >
                     <NumberField source="id" />
                     <TextField source="uuid" label="table.field.code.uuid" />
                     <TextField source="data" label="table.field.code.data" />
                     <NumberField source="x" label="table.field.code.x" />
                     <NumberField source="y" label="table.field.code.y" />
-                    <TextField source="concer$" label="table.field.code.concer" sortable={false} />
+                    <BooleanField source="cornerBool" label="table.field.code.concer" sortable={false} />
                     <TextField source="scale" label="table.field.code.scale" />
 
+                    <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
+                        <TextField source="nickname" />
+                    </ReferenceField>
                     <DateField source="updateTime" label="common.field.updateTime" showTime />
+                    <ReferenceField source="createBy" label="common.field.createBy" reference="user" link={false} sortable={false}>
+                        <TextField source="nickname" />
+                    </ReferenceField>
                     <DateField source="createTime" label="common.field.createTime" showTime />
                     <BooleanField source="statusBool" label="common.field.status" sortable={false} />
                     <TextField source="memo" label="common.field.memo" sortable={false} />

--
Gitblit v1.9.1