瀏覽代碼

feat: 修改时间转换成毫秒级单位

lanjianrong 3 年之前
父節點
當前提交
3256c1b276

+ 9 - 7
src/pages/Institutions/Company/List/index.tsx

@@ -84,7 +84,8 @@ const CompanyList: React.FC<ListProps> = ({ base, dispatch, pTypeList }) => {
               managerID: record.manager.ID
             })
           }
-          className="text-primary cursor-pointer">
+          className="text-primary cursor-pointer"
+        >
           {name}
         </span>
       )
@@ -101,7 +102,7 @@ const CompanyList: React.FC<ListProps> = ({ base, dispatch, pTypeList }) => {
     {
       dataIndex: 'createdTime',
       title: '创建时间',
-      renderText: text => dayjs(text * 1000).format('YYYY-MM-DD')
+      renderText: text => dayjs(text).format('YYYY-MM-DD')
     },
     // {
     //   dataIndex: 'project_type_id',
@@ -135,7 +136,8 @@ const CompanyList: React.FC<ListProps> = ({ base, dispatch, pTypeList }) => {
                 currentModalType: ModalType.UPDATE,
                 defaultFormData: record
               })
-            }}>
+            }}
+          >
             编辑
           </div>
           {/* <Popconfirm
@@ -180,9 +182,8 @@ 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>
           ]
@@ -191,7 +192,8 @@ const CompanyList: React.FC<ListProps> = ({ base, dispatch, pTypeList }) => {
       />
       <AnimateContent
         visible={state.visible}
-        onVisibleChange={visible => setState({ ...state, visible })}>
+        onVisibleChange={visible => setState({ ...state, visible })}
+      >
         <CompanyDrawer
           type={state.currentModalType}
           defaultFormData={state.defaultFormData}

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

@@ -116,7 +116,7 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
       dataIndex: 'createdTime',
       key: 'createdTime',
       title: '创建时间',
-      renderText: text => dayjs(text * 1000).format('YYYY-MM-DD')
+      renderText: text => dayjs(text).format('YYYY-MM-DD')
     },
     {
       dataIndex: 'created',

+ 1 - 1
src/pages/Project/Management/List/index.tsx

@@ -86,7 +86,7 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
     {
       dataIndex: 'createdTime',
       title: '创建时间',
-      renderText: text => dayjs(text * 1000).format('YYYY-MM-DD')
+      renderText: text => dayjs(text).format('YYYY-MM-DD')
     },
     {
       dataIndex: 'projectTypeID',