Przeglądaj źródła

feat: 业务设置-开放编辑按钮进入表单设计器页面

lanjianrong 3 lat temu
rodzic
commit
3d2974d40b
2 zmienionych plików z 4 dodań i 115 usunięć
  1. 4 4
      src/pages/Schema/Base/index.tsx
  2. 0 111
      src/utils/schema.ts

+ 4 - 4
src/pages/Schema/Base/index.tsx

@@ -32,6 +32,7 @@ import {
   loadProjectTypeData
 } from '@/utils/schema'
 import type { ConnectProps } from 'umi'
+import { Button } from 'antd'
 
 export enum BaseMenuEnum {
   PROJECT = '1',
@@ -158,10 +159,9 @@ const Index: React.FC<BaseProps> = ({ base, pTypeList, dispatch }) => {
         />
         <div className="w-6/7 ml-8 bg-white p-4 rounded-20px">
           <div className="flex flex-row-reverse mb-4 w-full">
-            <div
-              onClick={() => gotoDetail(state.activeKey)}
-              className="w-14px h-14px rounded-1/2 hover:bg-dark-50 hover:cursor-pointer"
-            />
+            <Button type="primary" onClick={() => gotoDetail(state.activeKey)}>
+              编辑
+            </Button>
           </div>
           <div className="max-w-800px">{renderForm()}</div>
         </div>

+ 0 - 111
src/utils/schema.ts

@@ -25,14 +25,6 @@ export const projectSchema = {
       'x-component': 'Input',
       'x-index': 2
     }
-    // projectTypeID: {
-    //   type: 'string',
-    //   title: '项目类型',
-    //   required: true,
-    //   'x-decorator': 'FormItem',
-    //   'x-component': 'Select',
-    //   'x-index': 3
-    // }
   }
 }
 
@@ -53,89 +45,6 @@ export const institutionSchema = {
       'x-decorator': 'FormItem',
       'x-component': 'Input'
     }
-    // layout: {
-    //   type: 'void',
-    //   'x-component': 'FormLayout',
-    //   'x-component-props': {
-    //     labelCol: 8,
-    //     layout: 'horizontal'
-    //   },
-    //   properties: {
-    //     gird: {
-    //       type: 'void',
-    //       'x-component': 'FormGrid',
-    //       'x-component-props': {
-    //         minColumns: 1,
-    //         maxColumns: 2,
-    //         columnGap: 0
-    //       },
-    //       properties: {
-    //         acronym: {
-    //           type: 'string',
-    //           title: '企事业单位简称',
-    //           required: true,
-    //           'x-decorator': 'FormItem',
-    //           'x-component': 'Input'
-    //         },
-    //         enterpriseCode: {
-    //           type: 'string',
-    //           title: '企业编码',
-    //           required: true,
-    //           'x-decorator': 'FormItem',
-    //           'x-component': 'Input'
-    //         },
-    //         phone: {
-    //           type: 'string',
-    //           title: '办公电话',
-    //           'x-decorator': 'FormItem',
-    //           'x-component': 'Input'
-    //         },
-    //         address: {
-    //           type: 'string',
-    //           title: '地址',
-    //           'x-decorator': 'FormItem',
-    //           'x-component': 'Input'
-    //         },
-    //         fax: {
-    //           type: 'string',
-    //           title: '传真号码',
-    //           'x-decorator': 'FormItem',
-    //           'x-component': 'Input'
-    //         },
-    //         organizationCode: {
-    //           type: 'string',
-    //           title: '组织架构代码',
-    //           'x-decorator': 'FormItem',
-    //           'x-component': 'Input'
-    //         },
-    //         bank: {
-    //           type: 'string',
-    //           title: '银行',
-    //           'x-decorator': 'FormItem',
-    //           'x-component': 'Input'
-    //         },
-    //         idCard: {
-    //           type: 'string',
-    //           title: '身份证号码',
-    //           'x-decorator': 'FormItem',
-    //           'x-component': 'Input'
-    //         },
-    //         bankAccount: {
-    //           type: 'string',
-    //           title: '银行账号',
-    //           'x-decorator': 'FormItem',
-    //           'x-component': 'Input'
-    //         },
-    //         legalPerson: {
-    //           type: 'string',
-    //           title: '法人代表',
-    //           'x-decorator': 'FormItem',
-    //           'x-component': 'Input'
-    //         }
-    //       }
-    //     }
-    //   }
-    // }
   }
 }
 
@@ -192,14 +101,6 @@ export const staffSchema = {
       'x-component': 'Input',
       'x-index': 5
     },
-    // accountType: {
-    //   type: 'string',
-    //   title: '账号类型',
-    //   required: true,
-    //   'x-decorator': 'FormItem',
-    //   'x-component': 'Select',
-    //   'x-index': 6
-    // },
     organizationalStructureID: {
       type: 'string',
       title: '组织架构',
@@ -207,18 +108,6 @@ export const staffSchema = {
       'x-component': 'TreeSelect',
       'x-index': 7
     }
-    // gender: {
-    //   type: 'string',
-    //   title: '性别',
-    //   required: true,
-    //   'x-decorator': 'FormItem',
-    //   'x-component': 'Select',
-    //   'x-index': 8,
-    //   enum: [
-    //     { label: '男', value: '0' },
-    //     { label: '女', value: '1' }
-    //   ]
-    // },
   }
 }