From bbc62226c028f2c886daa9c7343b2d06e1f86335 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期四, 26 二月 2026 14:36:37 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/page/code/CodeList.jsx | 34 ++++++++++++++++++----------------
1 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/zy-acs-flow/src/page/code/CodeList.jsx b/zy-acs-flow/src/page/code/CodeList.jsx
index 5f6f6f7..1f45bad 100644
--- a/zy-acs-flow/src/page/code/CodeList.jsx
+++ b/zy-acs-flow/src/page/code/CodeList.jsx
@@ -46,8 +46,10 @@
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)}`;
+// 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 IMPORT_TEMP_URL = '/imports/code_import_template.xlsx';
const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
'& .css-1vooibu-MuiSvgIcon-root': {
@@ -80,15 +82,15 @@
alwaysOn
/>,
// <TextInput source="scale" label="table.field.code.scale" />,
- <SelectInput source="spin" label="table.field.code.spin"
- choices={[
- { id: 0, name: 'page.code.enums.spin.na' },
- { id: 1, name: 'page.code.enums.spin.cw' },
- { id: 2, name: 'page.code.enums.spin.ccw' },
- ]}
- // alwaysOn
- // emptyText={false}
- />,
+ // <SelectInput source="spin" label="table.field.code.spin"
+ // choices={[
+ // { id: 0, name: 'page.code.enums.spin.na' },
+ // { id: 1, name: 'page.code.enums.spin.cw' },
+ // { id: 2, name: 'page.code.enums.spin.ccw' },
+ // ]}
+ // alwaysOn
+ // emptyText={false}
+ // />,
<TextInput label="common.field.memo" source="memo" />,
<SelectInput
label="common.field.status"
@@ -115,7 +117,7 @@
theme.transitions.create(['all'], {
duration: theme.transitions.duration.enteringScreen,
}),
- marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
+ marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
}}
title={"menu.code"}
empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
@@ -126,7 +128,7 @@
<FilterButton />
<MyCreateButton onClick={() => { setCreateDialog(true) }} />
<SelectColumnsButton preferenceKey='code' />
- <ImportButton importTemp={IMPORT_TEMP_URL} useCodeImport={useCodeImport} onceBatch={10} />
+ <ImportButton type="xlsx" importTemp={IMPORT_TEMP_URL} useImport={useCodeImport} onceBatch={10} />
<MyExportButton />
</TopToolbar>
)}
@@ -146,8 +148,8 @@
<NumberField source="x" label="table.field.code.x" />
<NumberField source="y" label="table.field.code.y" />
<BooleanField source="cornerBool" label="table.field.code.corner" sortable={false} />
- <TextField source="scale" label="table.field.code.scale" />
- <FunctionField
+ {/* <TextField source="scale" label="table.field.code.scale" /> */}
+ {/* <FunctionField
label="table.field.code.spin"
sortable={false}
render={(record) => {
@@ -162,7 +164,7 @@
return 'N/A';
}
}}
- />
+ /> */}
<ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
<TextField source="nickname" />
</ReferenceField>
--
Gitblit v1.9.1