From 8527d83c19bf5047a0e6dfd1363d74b51acb0e8e Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期日, 18 二月 2024 16:29:27 +0800
Subject: [PATCH] #

---
 zy-asrs-framework/src/main/resources/templates/react/Index.txt |   76 ++++---------------------------------
 1 files changed, 9 insertions(+), 67 deletions(-)

diff --git a/zy-asrs-framework/src/main/resources/templates/react/Index.txt b/zy-asrs-framework/src/main/resources/templates/react/Index.txt
index da61022..f98ed08 100644
--- a/zy-asrs-framework/src/main/resources/templates/react/Index.txt
+++ b/zy-asrs-framework/src/main/resources/templates/react/Index.txt
@@ -15,7 +15,7 @@
 const handleSave = async (val) => {
     const hide = message.loading('姝e湪娣诲姞');
     try {
-        const resp = await Http.doPost('api/role/save', val);
+        const resp = await Http.doPost('api/@{SIMPLEENTITYNAME}/save', val);
         if (resp.code === 200) {
             message.success('娣诲姞鎴愬姛');
             return true;
@@ -34,7 +34,7 @@
 const handleUpdate = async (val) => {
     const hide = message.loading('姝e湪鏇存柊');
     try {
-        const resp = await Http.doPost('api/role/update', val);
+        const resp = await Http.doPost('api/@{SIMPLEENTITYNAME}/update', val);
         if (resp.code === 200) {
             message.success('鏇存柊鎴愬姛');
             return true;
@@ -54,7 +54,7 @@
     if (!rows) return true;
     const hide = message.loading('姝e湪鍒犻櫎');
     try {
-        const resp = await Http.doPost('api/role/remove/' + rows.map((row) => row.id).join(','));
+        const resp = await Http.doPost('api/@{SIMPLEENTITYNAME}/remove/' + rows.map((row) => row.id).join(','));
         if (resp.code === 200) {
             message.success('鍒犻櫎鎴愬姛');
             return true;
@@ -73,7 +73,7 @@
 const handleExport = async () => {
     const hide = message.loading('姝e湪瀵煎嚭');
     try {
-        const resp = await Http.doPostBlob('api/role/export');
+        const resp = await Http.doPostBlob('api/@{SIMPLEENTITYNAME}/export');
         const blob = new Blob([resp], { type: 'application/vnd.ms-excel' });
         window.location.href = window.URL.createObjectURL(blob);
         message.success('瀵煎嚭鎴愬姛');
@@ -106,66 +106,7 @@
             valueType: 'indexBorder',
             width: 48,
         },
-        {
-            title: '濮撳悕',
-            dataIndex: 'name',
-            valueType: 'text',
-            copyable: true,
-            filterDropdown: (props) => <TextFilter
-                name='name'
-                {...props}
-                actionRef={actionRef}
-                setSearchParam={setSearchParam}
-            />,
-        },
-        {
-            title: '鏍囪瘑',
-            dataIndex: 'code',
-            valueType: 'text',
-            filterDropdown: (props) => <TextFilter
-                name='code'
-                {...props}
-                actionRef={actionRef}
-                setSearchParam={setSearchParam}
-            />,
-        },
-        {
-            title: '鏈烘瀯',
-            dataIndex: 'hostId$',
-            valueType: 'text',
-            filterDropdown: (props) => <LinkFilter
-                name='hostId'
-                {...props}
-                actionRef={actionRef}
-                setSearchParam={setSearchParam}
-            />,
-        },
-        {
-            title: '鐘舵��',
-            dataIndex: 'status$',
-            valueType: 'text',
-            filterDropdown: (props) => <SelectFilter
-                name='status'
-                {...props}
-                actionRef={actionRef}
-                setSearchParam={setSearchParam}
-                data={[
-                    { label: '姝e父', value: 1 },
-                    { label: '绂佺敤', value: 0 },
-                ]}
-            />,
-        },
-        {
-            title: '淇敼鏃堕棿',
-            dataIndex: 'updateTime$',
-            valueType: 'text',
-            filterDropdown: (props) => <DatetimeRangeFilter
-                name='updateTime'
-                {...props}
-                actionRef={actionRef}
-                setSearchParam={setSearchParam}
-            />,
-        },
+@{TABLECOLUMNS}
         {
             title: '鎿嶄綔',
             dataIndex: 'option',
@@ -211,12 +152,13 @@
         <PageContainer>
             <div style={{ width: '100%', float: 'right' }}>
                 <ProTable
-                    key="role"
+                    key="@{SIMPLEENTITYNAME}"
                     rowKey="id"
                     actionRef={actionRef}
                     formRef={formTableRef}
                     columns={columns}
                     cardBordered
+                    scroll={{ x: 1300 }}
                     dateFormatter="string"
                     pagination={{ pageSize: 20 }}
                     search={false}
@@ -260,7 +202,7 @@
                         ],
                     }}
                     request={(params, sorter, filter) =>
-                        Http.doPostPromise('/api/role/page', { ...params, ...searchParam }, (res) => {
+                        Http.doPostPromise('/api/@{SIMPLEENTITYNAME}/page', { ...params, ...searchParam }, (res) => {
                             return {
                                 data: res.data.records,
                                 total: res.data.total,
@@ -274,7 +216,7 @@
                         }
                     }}
                     columnsState={{
-                        persistenceKey: 'pro-table-role',
+                        persistenceKey: 'pro-table-@{SIMPLEENTITYNAME}',
                         persistenceType: 'localStorage',
                         defaultValue: {
                             option: { fixed: 'right', disable: true },

--
Gitblit v1.9.1