outaozhen 3 лет назад
Родитель
Сommit
ec3cdf935a

+ 12 - 12
src/pages/Institutions/Company/List/index.tsx

@@ -85,8 +85,7 @@ const CompanyList: React.FC<ListProps> = ({ base, dispatch, pTypeList }) => {
               managerID: record.manager.ID
             })
           }
-          className="text-primary cursor-pointer"
-        >
+          className="text-primary cursor-pointer">
           {name}
         </span>
       )
@@ -99,16 +98,16 @@ const CompanyList: React.FC<ListProps> = ({ base, dispatch, pTypeList }) => {
     {
       dataIndex: 'institutionAcountTotal',
       title: '人员账号',
-<<<<<<< HEAD
       renderText: (text, record) => `${text}/${record.memberTotal}`
-=======
       width: 96
->>>>>>> ba83460... feat: 调整表格、表单列宽
+      width: 96,
+      align: 'center'
     },
     {
       dataIndex: 'createdTime',
       title: '创建时间',
       width: 106,
+      align: 'center',
       renderText: text => dayjs(text).format('YYYY-MM-DD')
     },
     // {
@@ -128,12 +127,14 @@ const CompanyList: React.FC<ListProps> = ({ base, dispatch, pTypeList }) => {
     {
       dataIndex: 'created',
       title: '创建人',
-      width: 116
+      width: 116,
+      align: 'center'
     },
     {
       title: '操作',
       dataIndex: 'operation',
       width: 61,
+      align: 'center',
       render: (_, record) => (
         <div className="divide-x divide-bg-gray-400 flex flex-row">
           <div
@@ -145,8 +146,7 @@ const CompanyList: React.FC<ListProps> = ({ base, dispatch, pTypeList }) => {
                 currentModalType: ModalType.UPDATE,
                 defaultFormData: record
               })
-            }}
-          >
+            }}>
             编辑
           </div>
           {/* <Popconfirm
@@ -191,8 +191,9 @@ const CompanyList: React.FC<ListProps> = ({ base, dispatch, pTypeList }) => {
           actions: [
             <Button
               type="primary"
-              onClick={() => setState({ ...state, visible: true, currentModalType: ModalType.ADD })}
-            >
+              onClick={() =>
+                setState({ ...state, visible: true, currentModalType: ModalType.ADD })
+              }>
               新建企事业单位
             </Button>
           ]
@@ -202,8 +203,7 @@ const CompanyList: React.FC<ListProps> = ({ base, dispatch, pTypeList }) => {
       <AnimateContent
         title={state.currentModalType === ModalType.ADD ? '新增企事业单位' : '编辑企事业单位'}
         visible={state.visible}
-        onVisibleChange={visible => setState({ ...state, visible })}
-      >
+        onVisibleChange={visible => setState({ ...state, visible })}>
         <CompanyDrawer
           type={state.currentModalType}
           defaultFormData={state.defaultFormData}

+ 11 - 1
src/pages/Institutions/Staff/index.tsx

@@ -61,6 +61,7 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
       key: 'account',
       title: '账号',
       width: 116,
+      align: 'center',
       render: (name, record) => (
         <div
           className="text-primary cursor-pointer hover:text-hex-967bbd"
@@ -86,13 +87,15 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
       dataIndex: 'name',
       key: 'name',
       title: '名称',
-      width: 86
+      width: 86,
+      align: 'center'
     },
     {
       dataIndex: 'enable',
       key: 'enable',
       title: '状态',
       width: 56,
+      align: 'center',
       filters: true,
       filterMultiple: false,
       valueEnum: {
@@ -105,6 +108,7 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
       key: 'gender',
       title: '性别',
       width: 56,
+      align: 'center',
       render: (_, { gender }) => {
         return <span>{genderEum[gender]}</span>
       }
@@ -114,6 +118,7 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
       key: 'organizationalStructureID',
       title: '组织架构',
       width: 146,
+      align: 'center',
       renderText: (_, record) => record.organizationalStructure?.name
     },
     {
@@ -121,12 +126,14 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
       key: 'institutionID',
       title: '所属企事业单位',
       width: 286,
+      align: 'center',
       renderText: (_, record) => record.institution.name
     },
     {
       dataIndex: 'createdTime',
       key: 'createdTime',
       width: 106,
+      align: 'center',
       title: '创建时间',
       renderText: text => dayjs(text).format('YYYY-MM-DD')
     },
@@ -135,6 +142,7 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
       key: 'created',
       title: '创建者',
       width: 116,
+      align: 'center',
       renderText: (_, record) => record?.created?.name
     },
     {
@@ -142,6 +150,7 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
       key: 'accountType',
       title: '账号类型',
       width: 96,
+      align: 'center',
       filters: true,
       filterMultiple: false,
       valueEnum: accountTypeList.reduce((prev, curr) => {
@@ -156,6 +165,7 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
       title: '操作',
       dataIndex: 'operation',
       width: 61,
+      align: 'center',
       render: (_, record) => (
         <div className="divide-x divide-bg-gray-400 flex flex-row">
           <div

+ 9 - 10
src/pages/Project/Created/index.tsx

@@ -49,12 +49,14 @@ const Created = () => {
     {
       dataIndex: 'account',
       title: '账号',
-      width: 116
+      width: 116,
+      align: 'center'
     },
     {
       dataIndex: 'name',
       title: '名称',
-      width: 86
+      width: 86,
+      align: 'center'
     },
     {
       dataIndex: 'institutionID',
@@ -66,6 +68,7 @@ const Created = () => {
       dataIndex: 'organizationalStructureID',
       title: '组织架构',
       width: 146,
+      align: 'center',
       renderText: (_, record) => record?.organizationalStructure?.name
     },
     {
@@ -82,8 +85,7 @@ const Created = () => {
               modalType: CreatedModalType.DEL,
               modalVisible: true
             })
-          }
-        >
+          }>
           <DeleteOutlined />
         </div>
       )
@@ -125,8 +127,7 @@ const Created = () => {
               type="primary"
               onClick={() =>
                 setState({ ...state, modalVisible: true, modalType: CreatedModalType.ADD })
-              }
-            >
+              }>
               添加创建人
             </Button>
           ]
@@ -155,16 +156,14 @@ const Created = () => {
         }}
         isKeyPressSubmit
         visible={state.modalVisible}
-        onVisibleChange={visible => setState({ ...state, modalVisible: visible })}
-      >
+        onVisibleChange={visible => setState({ ...state, modalVisible: visible })}>
         {state.modalType === CreatedModalType.ADD ? (
           <>
             {/* <p className="mb-4">创建人可在前台创建项目、上传项目数据、编制项目等</p> */}
             <Form.Item
               name="ID"
               label="创建人可在前台创建项目、上传项目数据、编制项目等"
-              rules={[{ required: true, message: '请选择创建人' }]}
-            >
+              rules={[{ required: true, message: '请选择创建人' }]}>
               <TreeNodeSelect params={{ isCreated: 0 }} />
             </Form.Item>
             {/* <ProFormSelect

+ 2 - 0
src/pages/Project/Management/List/index.tsx

@@ -88,12 +88,14 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
       dataIndex: 'createdTime',
       title: '创建时间',
       width: 116,
+      align: 'center',
       renderText: text => dayjs(text).format('YYYY-MM-DD')
     },
     {
       dataIndex: 'projectTypeID',
       title: '项目类型',
       width: 126,
+      align: 'center',
       filters: true,
       filterMultiple: false,
       valueEnum: pTypeList.reduce((prev, curr) => {