瀏覽代碼

chore: 使用eslint格式化项目代码

lanjianrong 4 年之前
父節點
當前提交
462d262df8
共有 59 個文件被更改,包括 271 次插入274 次删除
  1. 1 0
      .gitignore
  2. 17 1
      package.json
  3. 17 17
      src/components/AuditContent/index.tsx
  4. 0 2
      src/components/Authorization/index.tsx
  5. 7 7
      src/components/Button/index.tsx
  6. 15 15
      src/components/FileModal/index.tsx
  7. 2 3
      src/components/LeftSide/index.tsx
  8. 1 1
      src/components/Menu/MenuItem.tsx
  9. 4 4
      src/components/Menu/index.tsx
  10. 4 4
      src/components/RuleModal/index.tsx
  11. 2 2
      src/layout/NavSide/index.tsx
  12. 1 8
      src/pages/Account/Information/api.ts
  13. 6 6
      src/pages/Account/Information/index.tsx
  14. 9 9
      src/pages/Account/Safe/index.tsx
  15. 2 2
      src/pages/Account/index.tsx
  16. 22 22
      src/pages/Contract/Content/Income/components/Modal/index.tsx
  17. 5 6
      src/pages/Contract/Content/Income/components/TableContent/index.tsx
  18. 1 1
      src/pages/Contract/Content/Income/components/Tabs/File/index.tsx
  19. 2 3
      src/pages/Contract/Content/Income/components/Tabs/Receivable/index.tsx
  20. 11 11
      src/pages/Contract/Content/Income/index.tsx
  21. 5 6
      src/pages/Contract/Content/Spending/components/TableContent/index.tsx
  22. 1 1
      src/pages/Contract/Content/Spending/components/Tabs/File/index.tsx
  23. 2 3
      src/pages/Contract/Content/Spending/components/Tabs/Receivable/index.tsx
  24. 10 10
      src/pages/Contract/Content/Spending/index.tsx
  25. 2 2
      src/pages/Contract/Content/Summary/components/Content/index.tsx
  26. 3 3
      src/pages/Contract/Content/Summary/index.tsx
  27. 2 2
      src/pages/Contract/Content/index.tsx
  28. 2 3
      src/pages/Contract/List/index.tsx
  29. 1 1
      src/pages/Contract/index.tsx
  30. 5 5
      src/pages/Dashboard/index.tsx
  31. 3 4
      src/pages/Login/index.tsx
  32. 4 4
      src/pages/Management/Info/index.tsx
  33. 10 10
      src/pages/Management/Setting/components/Modal.tsx
  34. 2 2
      src/pages/Management/Setting/components/PswModal.tsx
  35. 4 4
      src/pages/Management/Setting/index.tsx
  36. 0 1
      src/pages/Management/Tender/List/api.ts
  37. 4 4
      src/pages/Management/Tender/List/components/ModalForm.tsx
  38. 11 11
      src/pages/Management/Tender/List/index.tsx
  39. 7 7
      src/pages/Management/Tender/Member/index.tsx
  40. 2 2
      src/pages/Management/Tender/Member/modal.tsx
  41. 1 1
      src/pages/Management/Tender/index.tsx
  42. 2 2
      src/pages/Management/index.tsx
  43. 8 8
      src/pages/Quality/Content/Info/Detail/components/Modal/index.tsx
  44. 12 12
      src/pages/Quality/Content/Info/Detail/index.tsx
  45. 3 3
      src/pages/Quality/Content/Info/Summary/index.tsx
  46. 1 1
      src/pages/Quality/Content/Info/index.tsx
  47. 1 2
      src/pages/Quality/Content/List/index.tsx
  48. 1 1
      src/pages/Quality/Content/List/modal.tsx
  49. 2 2
      src/pages/Quality/Content/index.tsx
  50. 1 1
      src/pages/Quality/List/index.tsx
  51. 1 1
      src/pages/Quality/index.tsx
  52. 3 3
      src/pages/Safe/Content/Info/Summary/index.tsx
  53. 1 1
      src/pages/Safe/Content/Info/index.tsx
  54. 1 1
      src/pages/Safe/index.tsx
  55. 22 22
      src/react-app-env.d.ts
  56. 1 1
      src/store/mobx/tender/index.ts
  57. 0 1
      src/utils/common/customHooks.ts
  58. 0 1
      src/utils/common/user.ts
  59. 1 1
      src/utils/util.ts

+ 1 - 0
.gitignore

@@ -7,3 +7,4 @@ dist
 .vscode
 /.vscode
 .vscode
+.eslintcache

+ 17 - 1
package.json

@@ -7,7 +7,22 @@
     "dev": "node scripts/start.js",
     "build": "node scripts/build.js",
     "test": "node scripts/test.js",
-    "deploy": "auto-deploy build -t win"
+    "deploy": "auto-deploy build -t win",
+    "lint": "npm run lint:js && npm run lint:style && npm run lint:prettier",
+    "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ",
+    "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx ./src && npm run lint:style",
+    "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx ./src",
+    "lint:prettier": "prettier --check \"src/**/*\" --end-of-line auto",
+    "lint:style": "stylelint --fix \"src/**/*.less\" --syntax less",
+    "precommit": "lint-staged",
+    "prettier": "prettier -c --write \"src/**/*\""
+  },
+  "lint-staged": {
+    "**/*.less": "stylelint --syntax less",
+    "**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js",
+    "**/*.{js,jsx,tsx,ts,less,md,json}": [
+      "prettier --write"
+    ]
   },
   "browserslist": {
     "production": [
@@ -142,6 +157,7 @@
     "jest-watch-typeahead": "0.4.2",
     "less": "^3.12.2",
     "less-loader": "^7.0.2",
+    "lint-staged": "^10.5.3",
     "mini-css-extract-plugin": "0.9.0",
     "mobx-react-devtools": "^6.1.1",
     "node-sass": "^4.14.1",

+ 17 - 17
src/components/AuditContent/index.tsx

@@ -1,5 +1,5 @@
 import { userStore } from '@/store/mobx'
-import { iAuditHistoryState, iAuditor, iLatestAuditorState } from '@/types/safe'
+import { iAuditHistoryState, iAuditor } from '@/types/safe'
 import { iAccountGroupItem, iUserInfo } from '@/types/setting'
 import { auditConsts } from '@/utils/common/constStatus'
 import { getUserGroup } from '@/utils/common/user'
@@ -26,7 +26,7 @@ export const GroupItem: React.FC<iGroupItem> = props => {
   return props.children.length ? (
     <div>
       <div className="group-item-label-name pi-align-center">
-        <ExpandButton expanded={visible} onExpand={() => setVisible(!visible)}></ExpandButton>
+        <ExpandButton expanded={visible} onExpand={() => setVisible(!visible)} />
         <span onClick={changeVisible} className="pi-mg-left-5">
           {props.value}
         </span>
@@ -177,7 +177,7 @@ const Index: React.FC<iAuditContentProps> = props => {
     if (isEnd) {
       iconType = 'xxh-caret-down1'
     }
-    return <div className={[ 'timeline-item-icon', 'pi-justify-center', 'pi-align-center', bgColor ].join(' ')}>{iconType ? <SvgIcon type={iconType}></SvgIcon> : null}</div>
+    return <div className={[ 'timeline-item-icon', 'pi-justify-center', 'pi-align-center', bgColor ].join(' ')}>{iconType ? <SvgIcon type={iconType} /> : null}</div>
   }
 
   const renderStatusEle = (status: number, progress: string) => {
@@ -268,7 +268,7 @@ const Index: React.FC<iAuditContentProps> = props => {
         <tr>
           <td className="pi-text-center">检查人</td>
           <td>
-            <SvgIcon type="xxh-play-circle"></SvgIcon>
+            <SvgIcon type="xxh-play-circle" />
             <span className="pi-mg-left-3">{auditors[0]?.name}</span>
             <small className="text-muted pi-mg-left-3">{auditors[0]?.position}</small>
           </td>
@@ -287,7 +287,7 @@ const Index: React.FC<iAuditContentProps> = props => {
                   审批
                 </td>
                 <td>
-                  <SvgIcon type={item.status === 0 ? 'xxh-stop-circle' : 'xxh-chevron-circle-down'}></SvgIcon>
+                  <SvgIcon type={item.status === 0 ? 'xxh-stop-circle' : 'xxh-chevron-circle-down'} />
                   <span className="pi-mg-left-3">{item.name}</span>
                   <small className="text-muted pi-mg-left-3">{item.position}</small>
                 </td>
@@ -300,7 +300,7 @@ const Index: React.FC<iAuditContentProps> = props => {
             ) : (
               <tr key={item.id}>
                 <td>
-                  <SvgIcon type={item.status === 0 ? 'xxh-stop-circle' : 'xxh-chevron-circle-down'}></SvgIcon>
+                  <SvgIcon type={item.status === 0 ? 'xxh-stop-circle' : 'xxh-chevron-circle-down'} />
                   <span className="pi-mg-left-3">{item.name}</span>
                   <small className="text-muted pi-mg-left-3">{item.position}</small>
                 </td>
@@ -315,7 +315,7 @@ const Index: React.FC<iAuditContentProps> = props => {
         <tr>
           <td className="pi-text-center">整改人</td>
           <td>
-            <SvgIcon type={status === 0 ? 'xxh-stop-circle' : 'xxh-chevron-circle-down'}></SvgIcon>
+            <SvgIcon type={status === 0 ? 'xxh-stop-circle' : 'xxh-chevron-circle-down'} />
             {status ? (
               auditors.find(item => item.progress === '1') ? (
                 <>
@@ -352,7 +352,7 @@ const Index: React.FC<iAuditContentProps> = props => {
                   复查
                 </td>
                 <td>
-                  <SvgIcon type={item.status === 0 ? 'xxh-stop-circle' : 'xxh-chevron-circle-down'}></SvgIcon>
+                  <SvgIcon type={item.status === 0 ? 'xxh-stop-circle' : 'xxh-chevron-circle-down'} />
                   <span className="pi-mg-left-3">{item.name}</span>
                   <small className="text-muted pi-mg-left-3">{item.position}</small>
                 </td>
@@ -365,7 +365,7 @@ const Index: React.FC<iAuditContentProps> = props => {
             ) : (
               <tr key={item.id}>
                 <td>
-                  <SvgIcon type={item.status === 0 ? 'xxh-stop-circle' : 'xxh-chevron-circle-down'}></SvgIcon>
+                  <SvgIcon type={item.status === 0 ? 'xxh-stop-circle' : 'xxh-chevron-circle-down'} />
                   <span className="pi-mg-left-3">{item.name}</span>
                   <small className="text-muted pi-mg-left-3">{item.position}</small>
                 </td>
@@ -394,8 +394,8 @@ const Index: React.FC<iAuditContentProps> = props => {
                       className="timeline-item-date pi-flex-column"
                       dangerouslySetInnerHTML={{
                         __html: formatDate(auditor.create_time)
-                      }}></div>
-                    <div className={item.length - 1 === idx ? '' : 'timeline-item-tail'}></div>
+                      }} />
+                    <div className={item.length - 1 === idx ? '' : 'timeline-item-tail'} />
                     {renderStatusIcon(auditor.status, idx === item.length - 1)}
                     <div className="timeline-item-content">
                       <div className="card-container">
@@ -442,9 +442,9 @@ const Index: React.FC<iAuditContentProps> = props => {
               <td width="70%">
                 <div className="pi-justify-end">
                   <Popover
-                    title={<Input.Search size="small" placeholder="姓名/手机 检索" onSearch={search} onChange={e => change(e)}></Input.Search>}
+                    title={<Input.Search size="small" placeholder="姓名/手机 检索" onSearch={search} onChange={e => change(e)} />}
                     content={groups.map(item => (
-                      <GroupItem {...item} key={item.value} onSelect={(item: iUserInfo) => itemSelectHandler('check', item)}></GroupItem>
+                      <GroupItem {...item} key={item.value} onSelect={(item: iUserInfo) => itemSelectHandler('check', item)} />
                     ))}
                     overlayClassName="popover-card"
                     trigger="click"
@@ -452,7 +452,7 @@ const Index: React.FC<iAuditContentProps> = props => {
                     onVisibleChange={visible => handleVisibleChange('check', visible)}
                     placement="bottomRight">
                     <ZhButton size="small" onClick={() => showPopover('check')}>
-                      <span>添加审批流程</span><SvgIcon type="xxh-caret-down"></SvgIcon>
+                      <span>添加审批流程</span><SvgIcon type="xxh-caret-down" />
                     </ZhButton>
                   </Popover>
                 </div>
@@ -470,9 +470,9 @@ const Index: React.FC<iAuditContentProps> = props => {
                 </div>
                 <div className="pi-justify-end">
                   <Popover
-                    title={<Input.Search size="small" placeholder="姓名/手机 检索" onSearch={search} onChange={e => change(e)}></Input.Search>}
+                    title={<Input.Search size="small" placeholder="姓名/手机 检索" onSearch={search} onChange={e => change(e)} />}
                     content={groups.map(item => (
-                      <GroupItem {...item} key={item.value} onSelect={(item: iUserInfo) => itemSelectHandler('reCheck', item)}></GroupItem>
+                      <GroupItem {...item} key={item.value} onSelect={(item: iUserInfo) => itemSelectHandler('reCheck', item)} />
                     ))}
                     overlayClassName="popover-card"
                     trigger="click"
@@ -480,7 +480,7 @@ const Index: React.FC<iAuditContentProps> = props => {
                     onVisibleChange={visible => handleVisibleChange('reCheck', visible)}
                     placement="bottomRight">
                     <ZhButton size="small" onClick={() => showPopover('reCheck')}>
-                      <span>添加审批流程</span><SvgIcon type="xxh-caret-down"></SvgIcon>
+                      <span>添加审批流程</span><SvgIcon type="xxh-caret-down" />
                     </ZhButton>
                   </Popover>
                 </div>

+ 0 - 2
src/components/Authorization/index.tsx

@@ -1,6 +1,4 @@
 import { tenderStore } from '@/store/mobx'
-import history from '@/utils/history'
-import { storage } from '@/utils/util'
 import { observer } from 'mobx-react'
 import React, { useEffect } from 'react'
 interface Authorization {

+ 7 - 7
src/components/Button/index.tsx

@@ -4,27 +4,27 @@ import { ButtonProps } from 'antd/lib/button/button'
 import React from 'react'
 import styles from './index.module.scss'
 const ZhButton:React.FC<ButtonProps> = props => {
-  return <div className={styles.primaryButton}><Button {...props}></Button></div>
+  return <div className={styles.primaryButton}><Button {...props} /></div>
 }
 
 const ZhCloseButton:React.FC<ButtonProps> = props => {
-  return <div className={styles.closeButton}><Button {...props}></Button></div>
+  return <div className={styles.closeButton}><Button {...props} /></div>
 }
 
 const ZhSubmitButton:React.FC<ButtonProps> = props => {
-  return <div className={styles.submitButton}><Button {...props}></Button></div>
+  return <div className={styles.submitButton}><Button {...props} /></div>
 }
 
 const ZhUploadButton:React.FC<ButtonProps> = props => {
-  return <div className={styles.uploadButton}><Button {...props} type="text"></Button></div>
+  return <div className={styles.uploadButton}><Button {...props} type="text" /></div>
 }
 
 const ZhAuditBackButton:React.FC<ButtonProps> = props => {
-  return <div className={styles.auditBackButton}><Button {...props}></Button></div>
+  return <div className={styles.auditBackButton}><Button {...props} /></div>
 }
 
 const ZhDangerButton:React.FC<ButtonProps> = props => {
-  return <div className={styles.dangerButton}><Button {...props}></Button></div>
+  return <div className={styles.dangerButton}><Button {...props} /></div>
 }
 interface iExpandProps {
   onExpand: () => void
@@ -33,7 +33,7 @@ interface iExpandProps {
 const ExpandButton:React.FC<iExpandProps> = props => {
   const { onExpand, expanded = true } = props
   const className = expanded ? "ant-table-row-expand-icon-expanded" : "ant-table-row-expand-icon-collapsed"
-  return <button type="button" className={[ "ant-table-row-expand-icon", className ].join(" ")} onClick={onExpand}></button>
+  return <button type="button" className={[ "ant-table-row-expand-icon", className ].join(" ")} onClick={onExpand} />
 }
 export {
   ZhButton,

+ 15 - 15
src/components/FileModal/index.tsx

@@ -43,7 +43,7 @@ export default function FileModal(props: iFileModalProps) {
       initData()
     }
   }, [ visible ])
-  const initData = async(pageNo: number = 1, pageSize: number = consts.PAGE_SIZE) => {
+  const initData = async (pageNo: number = 1, pageSize: number = consts.PAGE_SIZE) => {
     // const { current: pageNo = 1, pageSize = consts.PAGESIZE } = pagination || {}
     const { code = -1, data = [], total = 0 } = await apiGetFileList(dataType, dataId, pageNo, pageSize)
     if (code === consts.RET_CODE.SUCCESS) {
@@ -133,8 +133,8 @@ export default function FileModal(props: iFileModalProps) {
             maxWidth: 287,
             overflow: 'hidden',
             whiteSpace: 'nowrap',
-            textOverflow:'ellipsis',
-            cursor:'pointer'
+            textOverflow: 'ellipsis',
+            cursor: 'pointer'
           }
         }
       },
@@ -155,7 +155,7 @@ export default function FileModal(props: iFileModalProps) {
       title: "操作",
       align: "center",
       // eslint-disable-next-line react/display-name
-      render: (_, record) => <a href={consts.OSS_PATH.DOWNLOAD + record.filepath} download><SvgIcon type="xxh-download"></SvgIcon></a>
+      render: (_, record) => <a href={consts.OSS_PATH.DOWNLOAD + record.filepath} download><SvgIcon type="xxh-download" /></a>
     }
   ]
   return (
@@ -165,9 +165,9 @@ export default function FileModal(props: iFileModalProps) {
       visible={visible}
       onCancel={onCancel}
       footer={<ZhCloseButton onClick={() => onCancel()} size="small">关闭</ZhCloseButton>}
-      >
-        {
-          showUpload ?
+    >
+      {
+        showUpload ?
           <div className="pi-mg-bottom-10">
             <Dragger
               name="file"
@@ -181,17 +181,17 @@ export default function FileModal(props: iFileModalProps) {
               // accept={consts.UPLOAD_WHITE}
               onRemove={onRemove}
             >
-                <p className="ant-upload-drag-icon">
+              <p className="ant-upload-drag-icon">
                 <InboxOutlined />
-                </p>
-                <p className="ant-upload-text">把文件拖入指定区域,完成上传,同样支持点击上传。</p>
-                <p className="ant-upload-hint">
-                  支持单文件/多文件上传。附件大小最大为30MB!
+              </p>
+              <p className="ant-upload-text">把文件拖入指定区域,完成上传,同样支持点击上传。</p>
+              <p className="ant-upload-hint">
+                支持单文件/多文件上传。附件大小最大为30MB!
                 </p>
             </Dragger>
           </div>
           : ''
-        }
+      }
       <Table
         dataSource={files}
         columns={columns}
@@ -204,8 +204,8 @@ export default function FileModal(props: iFileModalProps) {
           onChange: (page, pageSize) => initData(page, pageSize),
           total
         }}
-        // onChange={(pagination) => initData(pagination)}
-        ></Table>
+      // onChange={(pagination) => initData(pagination)}
+      />
     </Modal>
   )
 }

+ 2 - 3
src/components/LeftSide/index.tsx

@@ -28,12 +28,11 @@ const LeftSide:React.FC<iNavSide> = ({ childRoutes, location }) => {
         </Tooltip>
         <div className="pi-flex-column pi-justify-start">
           { childRoutes.map((item, idx) =>
-            item.meta && <Link key={idx} to={{ pathname: basePathname + item.path }} className={pathname.indexOf(item.path) !== -1 ? 'nav-link active' : 'nav-link'}>{item.meta.icon ? <SvgIcon type={item.meta.icon}></SvgIcon> : ''} {item.meta.title}</Link>
+            item.meta && <Link key={idx} to={{ pathname: basePathname + item.path }} className={pathname.indexOf(item.path) !== -1 ? 'nav-link active' : 'nav-link'}>{item.meta.icon ? <SvgIcon type={item.meta.icon} /> : ''} {item.meta.title}</Link>
           )}
         </div>
       </div>
-      <div>
-      </div>
+      <div />
       {/* <div className="pi-text-center pi-pd-10 pi-pointer" onClick={() => userStore.toggleLeftSide()}>
         <Tooltip title="折叠侧栏">
           <SvgIcon type="xxh-sign-out" style={{ color: '#007bff', fontSize: 24 }}></SvgIcon>

+ 1 - 1
src/components/Menu/MenuItem.tsx

@@ -15,7 +15,7 @@ const Meun:React.FC<iMeunProps> = props => {
   return (
     <Tooltip placement="right" title={title}>
       <Link to={path} className={ isActive ? 'active' : ''}>
-        <SvgIcon type={icon} style={{ fontSize: 27, color: '#7786ab' }}></SvgIcon>
+        <SvgIcon type={icon} style={{ fontSize: 27, color: '#7786ab' }} />
         { isActive && isTop ? <span className="pi-fz-12">{title}</span> : ''}
       </Link>
     </Tooltip>

+ 4 - 4
src/components/Menu/index.tsx

@@ -17,12 +17,12 @@ class NavSider extends Component<iMenuProps, any> {
     const { list: MeunList } = this.props
     return ( 
       <div className="main-nav">
-        <div className="logo"><img src={logo}></img></div>
+        <div className="logo"><img src={logo} /></div>
         <div className="nav-content">
           <div className="nav-top">
             {
               MeunList?.map((item: iMenuItem, idx: number) =>
-                item.isTop && <MenuItem key={idx} item={item}></MenuItem>
+                item.isTop && <MenuItem key={idx} item={item} />
               )
             }
           </div>
@@ -30,9 +30,9 @@ class NavSider extends Component<iMenuProps, any> {
             {
               MeunList?.map((item: iMenuItem, idx: number) => {
                 if (item.path === '/console/management') {
-                  return userStore.role === 'ADMIN' ? !item.isTop && <MenuItem key={idx} item={item}></MenuItem> : ''
+                  return userStore.role === 'ADMIN' ? !item.isTop && <MenuItem key={idx} item={item} /> : ''
                 } else {
-                  return !item.isTop && <MenuItem key={idx} item={item}></MenuItem>
+                  return !item.isTop && <MenuItem key={idx} item={item} />
                 }
               })
             }

+ 4 - 4
src/components/RuleModal/index.tsx

@@ -161,7 +161,7 @@ const SafeCreateForm: React.FC<iSafeCreateFormProps> = ({
               <TabPane tab="编号规则设置" key="1">
               <div className={styles.ruleContaniner}>
                 <h5 className={styles.ruleText}>当前规则:{ruleArr.map(item => item.value).join('-')}</h5>
-                <div><RenderTags ruleArr={ruleArr} setRuleArr={setRuleArr}></RenderTags></div>
+                <div><RenderTags ruleArr={ruleArr} setRuleArr={setRuleArr} /></div>
               </div>
                 <Form.Item label="添加新组建规则" name="ruleType" initialValue="3">
                   <Select onChange={(value: string) => setRuleType(value)}>
@@ -175,10 +175,10 @@ const SafeCreateForm: React.FC<iSafeCreateFormProps> = ({
                   ruleType === '3' ?
                     <>
                       <Form.Item label="自动编号位数" name="digits" initialValue="3">
-                        <InputNumber size="small" min={1} style={{ width: '100%' }} onChange={(value) => digitHandler(value)}></InputNumber>
+                        <InputNumber size="small" min={1} style={{ width: '100%' }} onChange={(value) => digitHandler(value)} />
                       </Form.Item>
                       <Form.Item label="起始编号" name="initCode" initialValue="001">
-                        <Input type="number"></Input>
+                        <Input type="number" />
                       </Form.Item>
                     </>
                   : ''
@@ -187,7 +187,7 @@ const SafeCreateForm: React.FC<iSafeCreateFormProps> = ({
                   ruleType === '1' ?
                   <>
                     <Form.Item label="规则文本" name="ruleText">
-                      <Input></Input>
+                      <Input />
                     </Form.Item>
                   </>
                   : ''

+ 2 - 2
src/layout/NavSide/index.tsx

@@ -14,10 +14,10 @@ export default function NavSide(props: any) {
 
   return (
     <div className="pi-flex-row pi-height-100P pi-width-100P">
-      <Menu list={menuList}></Menu>
+      <Menu list={menuList} />
       <div className={[ 'pi-flex-row', 'pi-height-100P', 'pi-width-100P', styles.layout ].join(' ')}>
         <Switch>
-          <Guards routeConfig={routeConfig} match={match}></Guards>
+          <Guards routeConfig={routeConfig} match={match} />
         </Switch>
       </div>
     </div>

+ 1 - 8
src/pages/Account/Information/api.ts

@@ -1,10 +1,3 @@
-/*
- * @description: 
- * @Author: CP
- * @Date: 2021-01-07 15:04:37
- * @FilePath: \management\src\pages\Account\Information\api.ts
- */
-import {  iUserInfo } from "@/types/setting"
 import request from "@/utils/common/request"
 /**
  * 获取项目信息
@@ -21,4 +14,4 @@ export async function apiProjectAccountInfo() {
 export async function apiAccountEdit(payload: any) {
   const { data } = await request.post(`/api/projectAccount/account/save`, payload)
   return data
-}
+}

+ 6 - 6
src/pages/Account/Information/index.tsx

@@ -61,23 +61,23 @@ export default function Info() {
 
   return (
     <div className="wrap-contaniner">
-      <Header title="账号资料"></Header>
+      <Header title="账号资料" />
       <div className={styles.projectInfo}>
         <Form form={form} className={styles.formContent} layout="vertical" size="small">
           <Form.Item name="account" label="账号">
-            <Input disabled></Input>
+            <Input disabled />
           </Form.Item>
           <Form.Item name="name" label="姓名" rules={[ { required: true, message: '请输入姓名' } ]}>
-            <Input></Input>
+            <Input />
           </Form.Item>
           <Form.Item name="company" label="单位" rules={[ { required: true, message: '请输入单位' } ]}>
-            <Input></Input>
+            <Input />
           </Form.Item>
           <Form.Item name="position" label="职称" rules={[ { required: true, message: '请输入职称' } ]}>
-            <Input></Input>
+            <Input />
           </Form.Item>
           <Form.Item name="telephone" label="电话" >
-            <Input></Input>
+            <Input />
           </Form.Item>
           <Button type="primary" size="small" loading={loading}    onClick={() => {
               form.validateFields().then(values => {

+ 9 - 9
src/pages/Account/Safe/index.tsx

@@ -1,4 +1,4 @@
-import React, { useEffect, useState } from 'react'
+import React, { useState } from 'react'
 import Header from '@/components/Header'
 import { Button, Form, Input, message } from 'antd'
 import styles from './index.module.scss'
@@ -7,36 +7,36 @@ import { apiChangePassword } from './api'
 
 
 export default function Index() {
-  const [ form ] = Form.useForm() 
+  const [ form ] = Form.useForm()
   const [ loading, setLoading ] = useState<boolean>(false)
 
   // 保存表单信息
   const changePassword = async (values:any) => {
     setLoading(true)
-    
+
     const { code = -1 } = await apiChangePassword(values)
     if (code === consts.RET_CODE.SUCCESS) {
       message.success("更新成功!")
     }
-   
+
     setLoading(false)
   }
 
   return (
     <div className="wrap-contaniner">
-      <Header title="账号安全"></Header>
+      <Header title="账号安全" />
       <div className={styles.projectInfo}>
         <Form form={form} className={styles.formContent} layout="vertical" size="small">
           <Form.Item name="password" label="原密码" rules={[ { required: true, message: '请输入原密码' } ]}>
-            <Input.Password></Input.Password>
+            <Input.Password />
           </Form.Item>
           <Form.Item name="newPassword" label="新密码" rules={[ { required: true, message: '请输入新密码' } ]}>
-          <Input.Password></Input.Password>
+          <Input.Password />
           </Form.Item>
           <Form.Item name="confirmPassword" label="确认新密码" rules={[ { required: true, message: '请输入确认新密码' } ]}>
-          <Input.Password></Input.Password>
+          <Input.Password />
           </Form.Item>
-          
+
           <Button type="primary" size="small" loading={loading}  onClick={() => {
               form.validateFields().then(values => {
                  changePassword(values)

+ 2 - 2
src/pages/Account/index.tsx

@@ -7,10 +7,10 @@ const Account: React.FC<NavigationGuardsProps> = props => {
   const { routeConfig, match, location } = props
   return (
     <>
-      <LeftSide childRoutes={routeConfig} location={location}></LeftSide>
+      <LeftSide childRoutes={routeConfig} location={location} />
       <div className="panel-content">
         <Switch>
-          <Guards routeConfig={routeConfig} match={match} location={location}></Guards>
+          <Guards routeConfig={routeConfig} match={match} location={location} />
         </Switch>
       </div>
 

+ 22 - 22
src/pages/Contract/Content/Income/components/Modal/index.tsx

@@ -139,10 +139,10 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
       }>
       <Form form={form} layout="vertical" style={type === 'update' ? { maxHeight: '482px', overflowY: 'scroll', paddingRight: 5 } : { overflow: 'hidden' }}>
         <Form.Item name="bidsectionId" hidden>
-          <Input></Input>
+          <Input />
         </Form.Item>
         <Form.Item name="treeId" label="合同劳务" hidden>
-          <Input></Input>
+          <Input />
         </Form.Item>
         {type === 'create' ? (
           <>
@@ -152,10 +152,10 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
                   <span className="pi-pd-lr-11" onClick={() => autoCodeHandler()}>
                     自动编号
                   </span>
-                }></Input>
+                } />
             </Form.Item>
             <Form.Item name="name" label="合同名称" rules={[ { required: true, message: '请输入合同名称' } ]}>
-              <Input placeholder="输入合同名称"></Input>
+              <Input placeholder="输入合同名称" />
             </Form.Item>
             {/* <Form.Item name="contractsType" label="合同类型" rules={[ { required: true, message: '请选择合同类型' } ]}>
               <Select showSearch>
@@ -164,7 +164,7 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
               </Select>
             </Form.Item> */}
             <Form.Item name="price" label="合同金额" rules={[ { required: true, message: '请输入合同金额' } ]}>
-              <Input type="number" placeholder="输入合同金额" addonAfter={<span>元</span>}></Input>
+              <Input type="number" placeholder="输入合同金额" addonAfter={<span>元</span>} />
             </Form.Item>
           </>
         ) : (
@@ -173,31 +173,31 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
         {type === 'update' ? (
           <>
             <Form.Item name="content" label="项目内容" rules={[ { required: true, message: '请输入项目内容' } ]}>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <Form.Item name="name" label="合同名称" rules={[ { required: true, message: '请输入项目内容' } ]}>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <Form.Item name="price" label="合同金额" rules={[ { required: true, message: '请输入项目金额' } ]}>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <Form.Item name="partyA" label="甲方" rules={[ { required: true, message: '请输入甲方' } ]}>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <Form.Item name="partyASigner" label="甲方签约人" rules={[ { required: true, message: '请输入甲方签约人' } ]}>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <Form.Item name="partyB" label="乙方" rules={[ { required: true, message: '请输入乙方' } ]}>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <Form.Item name="partyBSigner" label="乙方签约人" rules={[ { required: true, message: '请输入乙方签约人' } ]}>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <Form.Item name="signerTime" label="合同签约日期" rules={[ { required: true, message: '请选择签约日期' } ]}>
-              <DatePicker allowClear locale={locale} className="pi-width-100P"></DatePicker>
+              <DatePicker allowClear locale={locale} className="pi-width-100P" />
             </Form.Item>
             <Form.Item name="remarks" label="备注">
-              <Input.TextArea maxLength={100}></Input.TextArea>
+              <Input.TextArea maxLength={100} />
             </Form.Item>
           </>
         ) : (
@@ -206,7 +206,7 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
         {type === 'close' ? (
           <>
             <Form.Item name="id" hidden>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <span>关闭后,合同将锁定,无法进行编辑、上传文件等操作。</span>
           </>
@@ -216,7 +216,7 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
         {type === 'unlock' ? (
           <>
             <Form.Item name="id" hidden>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <span>解锁后,合同将锁定,无法进行编辑、上传文件等操作。</span>
           </>
@@ -226,7 +226,7 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
         {type === 'del' ? (
           <>
             <Form.Item name="id" hidden>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <p className="mb-2">删除后,数据无法恢复,请谨慎操作。</p>
             <p className="mb-2">
@@ -244,7 +244,7 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
                   }
                 })
               ]}>
-              <Input placeholder="输入文本, 确认删除"></Input>
+              <Input placeholder="输入文本, 确认删除" />
             </Form.Item>
           </>
         ) : (
@@ -253,19 +253,19 @@ const ContractModal: React.FC<iModalCommonProps> = ({ modalObj: { type, visible,
         {type === 'return' ? (
           <>
             <Form.Item name="contractsId" hidden>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <Form.Item name="time" label="回款日期" rules={[ { required: true, message: '请选择回款日期' } ]}>
-              <DatePicker allowClear locale={locale} className="pi-width-100P"></DatePicker>
+              <DatePicker allowClear locale={locale} className="pi-width-100P" />
             </Form.Item>
             <Form.Item name="price" label="回款金额" rules={[ { required: true, message: '请选择回款金额' } ]}>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <Form.Item name="way" label="支付方式" rules={[ { required: true, message: '请选择回款方式' } ]}>
               <Select>{options}</Select>
             </Form.Item>
             <Form.Item name="remarks" label="备注">
-              <Input.TextArea maxLength={100}></Input.TextArea>
+              <Input.TextArea maxLength={100} />
             </Form.Item>
           </>
         ) : (

+ 5 - 6
src/pages/Contract/Content/Income/components/TableContent/index.tsx

@@ -304,8 +304,7 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
             scroll={{ y: '300px' }}
             rowKey={record => record.id}
             defaultExpandAllRows={true}
-            >
-          </Table> : ''
+             /> : ''
           }
         </div>
 
@@ -382,13 +381,13 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
           </div>
         }}>
         <TabPane key="1" tab="合同详情">
-          <Detail {...contractReturnStore.contract}></Detail>
+          <Detail {...contractReturnStore.contract} />
         </TabPane>
         <TabPane key="2" tab="合同回款">
-          <Receivable></Receivable>
+          <Receivable />
         </TabPane>
         <TabPane key="3" tab="合同文件">
-          <File></File>
+          <File />
         </TabPane>
       </Tabs>
     </div>
@@ -397,7 +396,7 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
       onCancel={() => setVisible(false)}
       onCreate={onCreate}
       onShow={onShow}
-    ></OssUploadModal>
+     />
   </div>
 }
 

+ 1 - 1
src/pages/Contract/Content/Income/components/Tabs/File/index.tsx

@@ -95,7 +95,7 @@ const File:React.FC<{}> = () => {
         onChange: (page, pageSize) => initData(page, pageSize),
         total
       }}
-      ></Table>
+       />
   )
 }
 

+ 2 - 3
src/pages/Contract/Content/Income/components/Tabs/Receivable/index.tsx

@@ -224,8 +224,7 @@ const Receivable:React.FC<{}> = () => {
           rowClassName="editable-row"
           pagination={{ onChange: cancel, size:"small", pageSize: 7 }}
           rowKey={record => record.id}
-          >
-        </Table>
+           />
       </Form>
       <FileModal
         visible={fileModal.visible}
@@ -233,7 +232,7 @@ const Receivable:React.FC<{}> = () => {
         dataId={fileModal.dataId}
         onCancel={() => setFileModal({ ...fileModal, visible: false })}
         showUpload={true}
-      ></FileModal>
+       />
     </>
   )
 }

+ 11 - 11
src/pages/Contract/Content/Income/index.tsx

@@ -8,7 +8,7 @@ import { iIncomeTree, iModalBooleanProps } from '@/types/contract'
 import { contractTreeBaseId } from '@/utils/common/constStatus'
 import consts from '@/utils/consts'
 import { Button, message, Tooltip } from 'antd'
-import React, { useMemo, useState } from 'react'
+import React, { useState } from 'react'
 import { apiResfulContract, apiResfulContractTree } from './api'
 import ContractModal from './components/Modal'
 import TableContent from './components/TableContent'
@@ -123,19 +123,19 @@ export default function Income() {
               row.id ?
               <>
                 <Tooltip title="添加子项">
-                  <Button type="text" icon={<SvgIcon type="xxh-plus" style={{ color: '#007bff', fontSize: 12 }}></SvgIcon>} onClick={() => treeResfulApiHandler('add', { id: row.id, bidsectionId: row.bidsectionId })}></Button>
+                  <Button type="text" icon={<SvgIcon type="xxh-plus" style={{ color: '#007bff', fontSize: 12 }} />} onClick={() => treeResfulApiHandler('add', { id: row.id, bidsectionId: row.bidsectionId })} />
                 </Tooltip>
                 {
                   !row.children?.length ?
                   <Tooltip title="删除">
-                    <Button type="text" icon={<SvgIcon type="xxh-times" style={{ color: '#007bff', fontSize: 12 }}></SvgIcon>} onClick={() => treeResfulApiHandler('del', { id: row.id, bidsectionId: row.bidsectionId })} />
+                    <Button type="text" icon={<SvgIcon type="xxh-times" style={{ color: '#007bff', fontSize: 12 }} />} onClick={() => treeResfulApiHandler('del', { id: row.id, bidsectionId: row.bidsectionId })} />
                   </Tooltip>
-                  : <span className="pi-width-32 pi-height-32 pi-pd-tb-4 pi-flex-row-center"><SvgIcon type="xxh-times" style={{ color: '#9a9a9a', fontSize: 12 }}></SvgIcon></span>
+                  : <span className="pi-width-32 pi-height-32 pi-pd-tb-4 pi-flex-row-center"><SvgIcon type="xxh-times" style={{ color: '#9a9a9a', fontSize: 12 }} /></span>
                 }
                 {
                   row.parentId && row.parentId !== contractTreeBaseId ?
                   <Tooltip title="升级">
-                    <Button type="text" icon={<SvgIcon type="xxh-arrow-left" style={{ color: '#007bff', fontSize: 12 }} onClick={() => treeResfulApiHandler('depth', { id: row.id, bidsectionId: row.bidsectionId, operation: 'upDepth' })}></SvgIcon>}></Button>
+                    <Button type="text" icon={<SvgIcon type="xxh-arrow-left" style={{ color: '#007bff', fontSize: 12 }} onClick={() => treeResfulApiHandler('depth', { id: row.id, bidsectionId: row.bidsectionId, operation: 'upDepth' })} />} />
                   </Tooltip>
                   :
                   <span className="pi-width-32 pi-height-32 pi-pd-tb-4 pi-flex-row-center"><SvgIcon type="xxh-arrow-left" style={{ color: '#9a9a9a', fontSize: 12 }}/></span>
@@ -143,7 +143,7 @@ export default function Income() {
                 {
                   row.elderBrother ?
                   <Tooltip title="降级">
-                    <Button type="text" icon={<SvgIcon type="xxh-arrow-right" style={{ color: '#007bff', fontSize: 12 }}/>} onClick={() => treeResfulApiHandler('depth', { id: row.id, bidsectionId: row.bidsectionId, operation: 'downDepth' })} ></Button>
+                    <Button type="text" icon={<SvgIcon type="xxh-arrow-right" style={{ color: '#007bff', fontSize: 12 }}/>} onClick={() => treeResfulApiHandler('depth', { id: row.id, bidsectionId: row.bidsectionId, operation: 'downDepth' })}  />
                   </Tooltip>
                   :
                   <span className="pi-width-32 pi-height-32 pi-pd-tb-4 pi-flex-row-center"><SvgIcon type="xxh-arrow-right" style={{ color: '#9a9a9a', fontSize: 12 }}/></span>
@@ -151,7 +151,7 @@ export default function Income() {
                 {
                   row.elderBrother ?
                   <Tooltip title="上移">
-                    <Button type="text" icon={<SvgIcon type="xxh-arrow-up" style={{ color: '#007bff', fontSize: 12 }}/>} onClick={() => treeResfulApiHandler('serial', { id: row.id, bidsectionId: row.bidsectionId, operation: 'upSerial' })}  disabled={!row.elderBrother}></Button>
+                    <Button type="text" icon={<SvgIcon type="xxh-arrow-up" style={{ color: '#007bff', fontSize: 12 }}/>} onClick={() => treeResfulApiHandler('serial', { id: row.id, bidsectionId: row.bidsectionId, operation: 'upSerial' })}  disabled={!row.elderBrother} />
                   </Tooltip>
                   :
                   <span className="pi-width-32 pi-height-32 pi-pd-tb-4 pi-flex-row-center"><SvgIcon type="xxh-arrow-up" style={{ color: '#9a9a9a', fontSize: 12 }}/></span>
@@ -159,7 +159,7 @@ export default function Income() {
                 {
                   !row.isEnd ?
                   <Tooltip title="下移">
-                    <Button type="text" icon={<SvgIcon type="xxh-arrow-down" style={{ color: '#007bff', fontSize: 12 }}/>} onClick={() => treeResfulApiHandler('serial', { id: row.id, bidsectionId: row.bidsectionId, operation: 'downSerial' })} disabled={row.isEnd}></Button>
+                    <Button type="text" icon={<SvgIcon type="xxh-arrow-down" style={{ color: '#007bff', fontSize: 12 }}/>} onClick={() => treeResfulApiHandler('serial', { id: row.id, bidsectionId: row.bidsectionId, operation: 'downSerial' })} disabled={row.isEnd} />
                   </Tooltip>
                   :
                   <span className="pi-width-32 pi-height-32 pi-pd-tb-4 pi-flex-row-center"><SvgIcon type="xxh-arrow-down" style={{ color: '#9a9a9a', fontSize: 12 }}/></span>
@@ -180,7 +180,7 @@ export default function Income() {
           }
         </Slot>
       </Header>
-      <TableContent changeModalType={changeModalType} row={row} setRow={(record: iIncomeTree) => setRow({ ...row, ...record })}></TableContent>
+      <TableContent changeModalType={changeModalType} row={row} setRow={(record: iIncomeTree) => setRow({ ...row, ...record })} />
       <RuleModal
         type={consts.RULE.CONTRACT_RETURN}
         title="合同管理编号设置"
@@ -188,8 +188,8 @@ export default function Income() {
         onCreate={onRuleCreate}
         loading={ruleModal.loading}
         onCancel={() => setRuleModal({ ...ruleModal, visible: false })}
-      ></RuleModal>
-      <ContractModal row={row} modalObj={modalObj} onConfirm={onCreate} onCancel={ () => setModalObj({ ...modalObj, visible: false })} reload={(type) => handleReload(type)}></ContractModal>
+       />
+      <ContractModal row={row} modalObj={modalObj} onConfirm={onCreate} onCancel={ () => setModalObj({ ...modalObj, visible: false })} reload={(type) => handleReload(type)} />
     </div>
   )
 }

+ 5 - 6
src/pages/Contract/Content/Spending/components/TableContent/index.tsx

@@ -305,8 +305,7 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
             scroll={{ y: '300px' }}
             rowKey={record => record.id}
             defaultExpandAllRows={true}
-            >
-          </Table> : ''
+             /> : ''
           }
         </div>
 
@@ -383,13 +382,13 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
           </div>
         }}>
         <TabPane key="1" tab="合同详情">
-          <Detail {...contractPaidStore.contract}></Detail>
+          <Detail {...contractPaidStore.contract} />
         </TabPane>
         <TabPane key="2" tab="合同支出">
-          <Receivable></Receivable>
+          <Receivable />
         </TabPane>
         <TabPane key="3" tab="合同文件">
-          <File></File>
+          <File />
         </TabPane>
       </Tabs>
     </div>
@@ -398,7 +397,7 @@ const GCsheet: React.FC<iTableContentPorps> = ({ changeModalType, row, setRow })
       onCancel={() => setVisible(false)}
       onCreate={onCreate}
       onShow={onShow}
-    ></OssUploadModal>
+     />
   </div>
 }
 

+ 1 - 1
src/pages/Contract/Content/Spending/components/Tabs/File/index.tsx

@@ -95,7 +95,7 @@ const File:React.FC<{}> = () => {
         onChange: (page, pageSize) => initData(page, pageSize),
         total
       }}
-      ></Table>
+       />
   )
 }
 

+ 2 - 3
src/pages/Contract/Content/Spending/components/Tabs/Receivable/index.tsx

@@ -218,8 +218,7 @@ const Receivable:React.FC<{}> = () => {
           rowClassName="editable-row"
           pagination={{ onChange: cancel, size:"small", pageSize: 7 }}
           rowKey={record => record.id}
-          >
-        </Table>
+           />
       </Form>
       <FileModal
         visible={fileModal.visible}
@@ -227,7 +226,7 @@ const Receivable:React.FC<{}> = () => {
         dataId={fileModal.dataId}
         onCancel={() => setFileModal({ ...fileModal, visible: false })}
         showUpload={true}
-      ></FileModal>
+       />
     </>
   )
 }

+ 10 - 10
src/pages/Contract/Content/Spending/index.tsx

@@ -123,19 +123,19 @@ export default function Expenditure() {
               row.id ?
               <>
                 <Tooltip title="添加子项">
-                  <Button type="text" icon={<SvgIcon type="xxh-plus" style={{ color: '#007bff', fontSize: 12 }}></SvgIcon>} onClick={() => treeResfulApiHandler('add', { id: row.id, bidsectionId: row.bidsectionId })}></Button>
+                  <Button type="text" icon={<SvgIcon type="xxh-plus" style={{ color: '#007bff', fontSize: 12 }} />} onClick={() => treeResfulApiHandler('add', { id: row.id, bidsectionId: row.bidsectionId })} />
                 </Tooltip>
                 {
                   !row.children?.length ?
                   <Tooltip title="删除">
-                    <Button type="text" icon={<SvgIcon type="xxh-times" style={{ color: '#007bff', fontSize: 12 }}></SvgIcon>} onClick={() => treeResfulApiHandler('del', { id: row.id, bidsectionId: row.bidsectionId })} />
+                    <Button type="text" icon={<SvgIcon type="xxh-times" style={{ color: '#007bff', fontSize: 12 }} />} onClick={() => treeResfulApiHandler('del', { id: row.id, bidsectionId: row.bidsectionId })} />
                   </Tooltip>
-                  : <span className="pi-width-32 pi-height-32 pi-pd-tb-4 pi-flex-row-center"><SvgIcon type="xxh-times" style={{ color: '#9a9a9a', fontSize: 12 }}></SvgIcon></span>
+                  : <span className="pi-width-32 pi-height-32 pi-pd-tb-4 pi-flex-row-center"><SvgIcon type="xxh-times" style={{ color: '#9a9a9a', fontSize: 12 }} /></span>
                 }
                 {
                   row.parentId && row.parentId !== contractTreeBaseId ?
                   <Tooltip title="升级">
-                    <Button type="text" icon={<SvgIcon type="xxh-arrow-left" style={{ color: '#007bff', fontSize: 12 }} onClick={() => treeResfulApiHandler('depth', { id: row.id, bidsectionId: row.bidsectionId, operation: 'upDepth' })}></SvgIcon>}></Button>
+                    <Button type="text" icon={<SvgIcon type="xxh-arrow-left" style={{ color: '#007bff', fontSize: 12 }} onClick={() => treeResfulApiHandler('depth', { id: row.id, bidsectionId: row.bidsectionId, operation: 'upDepth' })} />} />
                   </Tooltip>
                   :
                   <span className="pi-width-32 pi-height-32 pi-pd-tb-4 pi-flex-row-center"><SvgIcon type="xxh-arrow-left" style={{ color: '#9a9a9a', fontSize: 12 }}/></span>
@@ -143,7 +143,7 @@ export default function Expenditure() {
                 {
                   row.elderBrother ?
                   <Tooltip title="降级">
-                    <Button type="text" icon={<SvgIcon type="xxh-arrow-right" style={{ color: '#007bff', fontSize: 12 }}/>} onClick={() => treeResfulApiHandler('depth', { id: row.id, bidsectionId: row.bidsectionId, operation: 'downDepth' })} ></Button>
+                    <Button type="text" icon={<SvgIcon type="xxh-arrow-right" style={{ color: '#007bff', fontSize: 12 }}/>} onClick={() => treeResfulApiHandler('depth', { id: row.id, bidsectionId: row.bidsectionId, operation: 'downDepth' })}  />
                   </Tooltip>
                   :
                   <span className="pi-width-32 pi-height-32 pi-pd-tb-4 pi-flex-row-center"><SvgIcon type="xxh-arrow-right" style={{ color: '#9a9a9a', fontSize: 12 }}/></span>
@@ -151,7 +151,7 @@ export default function Expenditure() {
                 {
                   row.elderBrother ?
                   <Tooltip title="上移">
-                    <Button type="text" icon={<SvgIcon type="xxh-arrow-up" style={{ color: '#007bff', fontSize: 12 }}/>} onClick={() => treeResfulApiHandler('serial', { id: row.id, bidsectionId: row.bidsectionId, operation: 'upSerial' })}  disabled={!row.elderBrother}></Button>
+                    <Button type="text" icon={<SvgIcon type="xxh-arrow-up" style={{ color: '#007bff', fontSize: 12 }}/>} onClick={() => treeResfulApiHandler('serial', { id: row.id, bidsectionId: row.bidsectionId, operation: 'upSerial' })}  disabled={!row.elderBrother} />
                   </Tooltip>
                   :
                   <span className="pi-width-32 pi-height-32 pi-pd-tb-4 pi-flex-row-center"><SvgIcon type="xxh-arrow-up" style={{ color: '#9a9a9a', fontSize: 12 }}/></span>
@@ -159,7 +159,7 @@ export default function Expenditure() {
                 {
                   !row.isEnd ?
                   <Tooltip title="下移">
-                    <Button type="text" icon={<SvgIcon type="xxh-arrow-down" style={{ color: '#007bff', fontSize: 12 }}/>} onClick={() => treeResfulApiHandler('serial', { id: row.id, bidsectionId: row.bidsectionId, operation: 'downSerial' })} disabled={row.isEnd}></Button>
+                    <Button type="text" icon={<SvgIcon type="xxh-arrow-down" style={{ color: '#007bff', fontSize: 12 }}/>} onClick={() => treeResfulApiHandler('serial', { id: row.id, bidsectionId: row.bidsectionId, operation: 'downSerial' })} disabled={row.isEnd} />
                   </Tooltip>
                   :
                   <span className="pi-width-32 pi-height-32 pi-pd-tb-4 pi-flex-row-center"><SvgIcon type="xxh-arrow-down" style={{ color: '#9a9a9a', fontSize: 12 }}/></span>
@@ -180,7 +180,7 @@ export default function Expenditure() {
           }
         </Slot>
       </Header>
-      <TableContent changeModalType={changeModalType} row={row} setRow={(record: iIncomeTree) => setRow({ ...row, ...record })}></TableContent>
+      <TableContent changeModalType={changeModalType} row={row} setRow={(record: iIncomeTree) => setRow({ ...row, ...record })} />
       <RuleModal
         type={consts.RULE.CONTRACT_PAID}
         title="合同管理编号设置"
@@ -188,8 +188,8 @@ export default function Expenditure() {
         onCreate={onRuleCreate}
         loading={ruleModal.loading}
         onCancel={() => setRuleModal({ ...ruleModal, visible: false })}
-      ></RuleModal>
-      <ContractModal row={row} modalObj={modalObj} onConfirm={onCreate} onCancel={ () => setModalObj({ ...modalObj, visible: false })} reload={(type) => toggleReloadModal(type)}></ContractModal>
+       />
+      <ContractModal row={row} modalObj={modalObj} onConfirm={onCreate} onCancel={ () => setModalObj({ ...modalObj, visible: false })} reload={(type) => toggleReloadModal(type)} />
     </div>
   )
 }

+ 2 - 2
src/pages/Contract/Content/Summary/components/Content/index.tsx

@@ -154,7 +154,7 @@ const Content:React.FC<iContentProps> = ({ data, type }) => {
       </div>
       <div className="pi-justify-between">
         <div className="pi-flex-sub pi-mg-right-15 card-border pi-mg-right-15">
-          <Pie {...pieConfig}></Pie>
+          <Pie {...pieConfig} />
         </div>
         <div className="pi-flex-sub pi-mg-left-15 pi-mg-left-15">
           <div className="pi-flex-column pi-justify-between">
@@ -175,7 +175,7 @@ const Content:React.FC<iContentProps> = ({ data, type }) => {
       </div>
       <div className="card-body card-border dual-axes-content pi-mg-bottom-32">
         {/* <h5>{type === 'expenditure' ? '收入' : '支出'}合同结算趋势</h5> */}
-        <DualAxes {...dualAxesConfig}></DualAxes>
+        <DualAxes {...dualAxesConfig} />
       </div>
     </div>
   )

+ 3 - 3
src/pages/Contract/Content/Summary/index.tsx

@@ -127,10 +127,10 @@ export default function Summary() {
   }, [ state.incomeData ])
   return (
     <div className="wrap-contaniner">
-      <Header title="合同概况"></Header>
+      <Header title="合同概况" />
       <div className="wrap-content m-3 pi-grid pi-col-2 pi-col-space-3">
-        <Content data={expenditurePieData} type="expenditure"></Content>
-        <Content data={incomePieData} type="income"></Content>
+        <Content data={expenditurePieData} type="expenditure" />
+        <Content data={incomePieData} type="income" />
       </div>
     </div>
   )

+ 2 - 2
src/pages/Contract/Content/index.tsx

@@ -7,10 +7,10 @@ const Content:React.FC<NavigationGuardsProps> = props => {
   const { routeConfig, match, location } = props
   return (
     <>
-      <LeftSide childRoutes={routeConfig} location={location}></LeftSide>
+      <LeftSide childRoutes={routeConfig} location={location} />
       <div className="panel-content">
         <Switch>
-              <Guards routeConfig={routeConfig} match={match} location={location}></Guards>
+              <Guards routeConfig={routeConfig} match={match} location={location} />
         </Switch>
       </div>
     </>

+ 2 - 3
src/pages/Contract/List/index.tsx

@@ -10,11 +10,10 @@ import { Button, Dropdown, Menu, Table } from 'antd'
 import { ColumnsType } from 'antd/lib/table'
 import React, { useState, useEffect } from 'react'
 import { useAliveController } from 'react-activation'
-import { RouteComponentProps, withRouter } from 'react-router-dom'
 import styles from './index.module.scss'
 import { apiContractList } from '@/utils/common/api'
 import { handleIntoBidsection } from '@/utils/util'
-const List: React.FC<RouteComponentProps> = props => {
+const List: React.FC<{}> = () => {
   const { clear } = useAliveController()
   const [ loading, setLoading ] = useState<boolean>(false)
   useEffect(() => {
@@ -142,4 +141,4 @@ const List: React.FC<RouteComponentProps> = props => {
     </div>
   )
 }
-export default withRouter(List)
+export default List

+ 1 - 1
src/pages/Contract/index.tsx

@@ -7,7 +7,7 @@ const Contract:React.FC<NavigationGuardsProps> = props => {
   return (
     <>
       <Switch>
-            <Guards routeConfig={routeConfig} match={match} location={location}></Guards>
+            <Guards routeConfig={routeConfig} match={match} location={location} />
         </Switch>
     </>
   )

+ 5 - 5
src/pages/Dashboard/index.tsx

@@ -44,7 +44,7 @@ const Index = () => {
   }
   return (
     <div className="wrap-contaniner hide-menu dashborad-content">
-      <Header title="待办事项"></Header>
+      <Header title="待办事项" />
       <div className={styles.content}>
         <span>系统消息</span>
         <h5 className={styles.title}>{userStore.projectName}</h5>
@@ -136,19 +136,19 @@ const Index = () => {
               <ul className="list-group">
                 <Tooltip title="腾讯QQ" placement="left">
                   <li className="list-group-item">
-                    <SvgIcon type="xxh-qq1" style={{ fontSize: 14 }}></SvgIcon>
+                    <SvgIcon type="xxh-qq1" style={{ fontSize: 14 }} />
                     <span className="pi-mg-left-5">914630468</span>
                   </li>
                 </Tooltip>
                 <Tooltip title="手机号码" placement="left">
                   <li className="list-group-item">
-                    <SvgIcon type="xxh-mobile-alt" style={{ fontSize: 14 }}></SvgIcon>
+                    <SvgIcon type="xxh-mobile-alt" style={{ fontSize: 14 }} />
                     <span className="pi-mg-left-5">15812644017</span>
                   </li>
                 </Tooltip>
                 <Tooltip title="固定电话" placement="left">
                   <li className="list-group-item">
-                    <SvgIcon type="xxh-phone-volume1" style={{ fontSize: 14 }}></SvgIcon>
+                    <SvgIcon type="xxh-phone-volume1" style={{ fontSize: 14 }} />
                     <span className="pi-mg-left-5">0756-3850891</span>
                   </li>
                 </Tooltip>
@@ -159,7 +159,7 @@ const Index = () => {
                 <span className="pi-link-blue">当前版本: {state.versionData.name}</span>
               </div>
             </div>
-            <div></div>
+            <div />
           </div>
         </div>
       </div>

+ 3 - 4
src/pages/Login/index.tsx

@@ -81,7 +81,7 @@ class NormalLoginForm extends Component<iLoginProps, iState> {
         <div className={styles.textRight}>
           <span onClick={this.handleForgetPsw}>忘记密码?</span>
         </div>
-        <RetrieveForm visible={this.state.visible} setVisible={this.setVisible}></RetrieveForm>
+        <RetrieveForm visible={this.state.visible} setVisible={this.setVisible} />
       </Form>
     )
   }
@@ -106,8 +106,7 @@ const RetrieveForm:React.FC<iRetrieveFormProps>= ({ visible, setVisible }) => {
           cancelText="取消"
           closable={false}
           okText="重置密码"
-        >
-        </Modal>
+         />
   )
 }
 
@@ -121,7 +120,7 @@ const Login = (props: RouteComponentProps) => {
             <img src={logo} />
           </div>
           <div className="pi-flex-sub">
-            <NormalLoginForm history={history}></NormalLoginForm>
+            <NormalLoginForm history={history} />
           </div>
         </div>
         <footer>

+ 4 - 4
src/pages/Management/Info/index.tsx

@@ -61,16 +61,16 @@ const [ loading, setLoading ] = useState<boolean>(false)
       <div className={styles.projectInfo}>
         <Form form={form} className={styles.formContent} layout="vertical" size="small">
           <Form.Item name="code" label="项目编号">
-            <Input disabled></Input>
+            <Input disabled />
           </Form.Item>
           <Form.Item name="projectName" label="项目名称">
-            <Input></Input>
+            <Input />
           </Form.Item>
           <Form.Item name="mobile" label="管理员">
-            <Input disabled></Input>
+            <Input disabled />
           </Form.Item>
           <Form.Item name="createTime" label="创建时间">
-            <Input disabled></Input>
+            <Input disabled />
           </Form.Item>
         </Form>
       </div>

+ 10 - 10
src/pages/Management/Setting/components/Modal.tsx

@@ -16,7 +16,7 @@ export interface iUserModal {
   onCancel: () => void
   initData: () => void
 }
-const userModal:React.FC<iUserModal> = ({ visible, loading, onCreate, onCancel, userInfo, initData }) => {
+const UserModal:React.FC<iUserModal> = ({ visible, loading, onCreate, onCancel, userInfo, initData }) => {
   const [ form ] = Form.useForm()
   const [ delLoading, setDelLoading ] = useState<boolean>(false)
   const [ showPswModal, setShowPswModal ] = useState<boolean>(false)
@@ -74,7 +74,7 @@ const userModal:React.FC<iUserModal> = ({ visible, loading, onCreate, onCancel,
       {
         userInfo.id ?
         <Form.Item name="id" hidden>
-          <Input></Input>
+          <Input />
         </Form.Item>
         : ''
       }
@@ -92,7 +92,7 @@ const userModal:React.FC<iUserModal> = ({ visible, loading, onCreate, onCancel,
         </Select>
       </Form.Item>
       <Form.Item name="account" label="登录账号" rules={[ { required: true, message: '请输入登录账号' } ]}>
-        <Input size="small" placeholder="支持英文数字组合" disabled={userInfo.id ? true : false}></Input>
+        <Input size="small" placeholder="支持英文数字组合" disabled={userInfo.id ? true : false} />
       </Form.Item>
       {
         !userInfo.id ?
@@ -106,25 +106,25 @@ const userModal:React.FC<iUserModal> = ({ visible, loading, onCreate, onCancel,
         : ''
       }
       <Form.Item name="name" label="姓名" rules={[ { required: true, message: '请输入姓名' } ]}>
-        <Input size="small"></Input>
+        <Input size="small" />
       </Form.Item>
       <Form.Item name="company" label="单位名称" rules={[ { required: true, message: '请输入单位名称' } ]}>
-        <Input size="small"></Input>
+        <Input size="small" />
       </Form.Item>
       <Form.Item name="position" label="职位名称" rules={[ { required: true, message: '请输入职位名称' } ]}>
-        <Input size="small"></Input>
+        <Input size="small" />
       </Form.Item>
       <Form.Item name="mobile" label="手机" rules={[ { required: true, message: '请输入手机号码' } ]}>
-        <Input size="small"></Input>
+        <Input size="small" />
       </Form.Item>
       <Form.Item name="telephone" label="电话">
-        <Input size="small" placeholder="格式000-0000000"></Input>
+        <Input size="small" placeholder="格式000-0000000" />
       </Form.Item>
     </Form>
   </Modal>
-      <PswModal visible={showPswModal} onCancel={() => setShowPswModal(false)} userInfo={userInfo}></PswModal>
+      <PswModal visible={showPswModal} onCancel={() => setShowPswModal(false)} userInfo={userInfo} />
     </>
 
   )
 }
-export default userModal
+export default UserModal

+ 2 - 2
src/pages/Management/Setting/components/PswModal.tsx

@@ -59,10 +59,10 @@ const PswModal:React.FC<iPswModalProps> = ({ visible, onCancel, userInfo: { id,
             className={styles.FormContent}
             >
             <Form.Item name="id" hidden>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <Form.Item name="ps_account" label="登录账号" rules={[ { required: true, message: '请输入账号' } ]}>
-              <Input></Input>
+              <Input />
             </Form.Item>
             <Form.Item name="ps_password" label="登录密码" rules={[ { required: true, message: '请输入登录密码' } ]}>
               <Input.Password

+ 4 - 4
src/pages/Management/Setting/index.tsx

@@ -87,7 +87,7 @@ export default function Info() {
             <span>{text}</span>
             {
               record.isAdmin ?
-                <Tooltip title="管理员"><span className="pi-mg-left-5"><SvgIcon type="xxh-user-circle"></SvgIcon></span></Tooltip>
+                <Tooltip title="管理员"><span className="pi-mg-left-5"><SvgIcon type="xxh-user-circle" /></span></Tooltip>
               : ''
             }
           </div>
@@ -144,7 +144,7 @@ export default function Info() {
           }}>添加账号</Button>
         </Slot>
         <Slot position="left">
-          <Search placeholder="账号/姓名/单位/手机 搜索" loading={false} size="small"></Search>
+          <Search placeholder="账号/姓名/单位/手机 搜索" loading={false} size="small" />
         </Slot>
       </Header>
       <div className={styles.SettingContent}>
@@ -159,9 +159,9 @@ export default function Info() {
             size: "small",
             pageSize: 10
           }}
-        ></Table>
+         />
       </div>
-      <UserModal {...modalStatus} userInfo={row} onCreate={onCreate} onCancel={onCancel} initData={initData}></UserModal>
+      <UserModal {...modalStatus} userInfo={row} onCreate={onCreate} onCancel={onCancel} initData={initData} />
     </div>
   )
 }

+ 0 - 1
src/pages/Management/Tender/List/api.ts

@@ -1,4 +1,3 @@
-import { iModalTypeProps } from '@/types/tender'
 import request from '@/utils/common/request'
 
 /**

+ 4 - 4
src/pages/Management/Tender/List/components/ModalForm.tsx

@@ -104,7 +104,7 @@ const ModalForm: React.FC<iModalFormProps> = ({
         })
       }}>
       <Form form={form} layout="vertical">
-        <Form.Item name={type === 'tender' ? 'folderId' : 'id'} hidden ><Input></Input></Form.Item>
+        <Form.Item name={type === 'tender' ? 'folderId' : 'id'} hidden ><Input /></Form.Item>
         {
           showNameInput ? <Form.Item  name="name" label={modalObj[type].nameTitle} rules={[ { required: true, message: '请输入文件夹名称!' },{
             validator: async (_, names) => {
@@ -113,14 +113,14 @@ const ModalForm: React.FC<iModalFormProps> = ({
               }
             }
           } ]}>
-            <Input allowClear size="small" autoComplete="off"></Input>
+            <Input allowClear size="small" autoComplete="off" />
           </Form.Item> : ''
         }
         {
-          showNameInput ? <Form.Item name="depth" hidden><Input></Input></Form.Item> : ''
+          showNameInput ? <Form.Item name="depth" hidden><Input /></Form.Item> : ''
         }
         {
-          type === 'move' ? <Form.Item name="targetFolderId"><TreeSelect treeData={cascader} placeholder={modalObj[type].namePlaceholder} allowClear ></TreeSelect></Form.Item> : ''
+          type === 'move' ? <Form.Item name="targetFolderId"><TreeSelect treeData={cascader} placeholder={modalObj[type].namePlaceholder} allowClear  /></Form.Item> : ''
         }
         {
           type.indexOf('del') !== -1 ? <div><p>确认删除「{name}」?</p><p>删除后,数据无法恢复,请谨慎操作。</p></div> : ''

+ 11 - 11
src/pages/Management/Tender/List/index.tsx

@@ -90,40 +90,40 @@ const Tender: React.FC<{}> = () =>{
         return <Dropdown overlay={() => {
           return (
             <Menu>
-              <Menu.Item key="0"><div className="menu-item"  onClick={() => treeBtnClick({ type: 'rename', id: record.id })}><SvgIcon type="xxh-edit" style={{ fontSize: 12 }}></SvgIcon><span className="pi-mg-left-5">重命名</span></div></Menu.Item>
-              <Menu.Item key="1"><div className="menu-item" onClick={() => treeBtnClick({ type: 'move', id: record.id, isFolder: Boolean(record.isfolder) })}><SvgIcon type="xxh-exchange-alt" style={{ fontSize: 12 }}></SvgIcon><span className="pi-mg-left-5">移动</span></div></Menu.Item>
+              <Menu.Item key="0"><div className="menu-item"  onClick={() => treeBtnClick({ type: 'rename', id: record.id })}><SvgIcon type="xxh-edit" style={{ fontSize: 12 }} /><span className="pi-mg-left-5">重命名</span></div></Menu.Item>
+              <Menu.Item key="1"><div className="menu-item" onClick={() => treeBtnClick({ type: 'move', id: record.id, isFolder: Boolean(record.isfolder) })}><SvgIcon type="xxh-exchange-alt" style={{ fontSize: 12 }} /><span className="pi-mg-left-5">移动</span></div></Menu.Item>
               {
                 record.children?.length ?
                   <Menu.Item key="2">
                     <Tooltip placement="left" title="请先移除所有数据">
                       <div className="menu-item text-muted">
-                        <SvgIcon type="xxh-times" style={{ fontSize: 12 }}></SvgIcon><span className="pi-mg-left-5">删除</span>
+                        <SvgIcon type="xxh-times" style={{ fontSize: 12 }} /><span className="pi-mg-left-5">删除</span>
                       </div>
                     </Tooltip>
                   </Menu.Item>
                 :
-                <Menu.Item key="2"><div className="menu-item" onClick={() => treeBtnClick({ type : record.isfolder ? 'delFolder' : 'delTender', id: record.id, name: record.name })}><SvgIcon type="xxh-times" style={{ fontSize: 12 }}></SvgIcon><span className="pi-mg-left-5">删除</span></div></Menu.Item>
+                <Menu.Item key="2"><div className="menu-item" onClick={() => treeBtnClick({ type : record.isfolder ? 'delFolder' : 'delTender', id: record.id, name: record.name })}><SvgIcon type="xxh-times" style={{ fontSize: 12 }} /><span className="pi-mg-left-5">删除</span></div></Menu.Item>
               }
               {
                 record.isfolder ? <Menu.Divider /> : ''
               }
               {
                 record.isfolder ? (!record.hasFolder) ?
-                <Menu.Item key="3"><div className= "menu-item" onClick={() => treeBtnClick({ type: 'tender', id: record.id })}><SvgIcon type="xxh-plus" style={{ fontSize: 12 }}></SvgIcon><span className="pi-mg-left-5">新建标段</span></div></Menu.Item>
+                <Menu.Item key="3"><div className= "menu-item" onClick={() => treeBtnClick({ type: 'tender', id: record.id })}><SvgIcon type="xxh-plus" style={{ fontSize: 12 }} /><span className="pi-mg-left-5">新建标段</span></div></Menu.Item>
                 :
                 <Menu.Item key="3">
                   <Tooltip placement="left" title="标段无法与文件夹同层">
-                    <div className= "menu-item text-muted"><SvgIcon type="xxh-plus" style={{ fontSize: 12 }}></SvgIcon><span className="pi-mg-left-5">新建标段</span></div>
+                    <div className= "menu-item text-muted"><SvgIcon type="xxh-plus" style={{ fontSize: 12 }} /><span className="pi-mg-left-5">新建标段</span></div>
                   </Tooltip></Menu.Item>
                 : ''
               }
               {
                 record.isfolder ? !record.isBid ?
-                <Menu.Item key="4"><div className="menu-item" onClick={() => treeBtnClick({ type : 'folder', id: record.id })}><SvgIcon type="xxh-folders" style={{ fontSize: 12 }}></SvgIcon><span className="pi-mg-left-5">新建子文件夹</span></div></Menu.Item>
+                <Menu.Item key="4"><div className="menu-item" onClick={() => treeBtnClick({ type : 'folder', id: record.id })}><SvgIcon type="xxh-folders" style={{ fontSize: 12 }} /><span className="pi-mg-left-5">新建子文件夹</span></div></Menu.Item>
                 :
                 <Menu.Item key="4">
                   <Tooltip placement="left" title="文件夹无法与标段同层">
-                    <div className="menu-item text-muted"><SvgIcon type="xxh-folders" style={{ fontSize: 12 }}></SvgIcon><span className="pi-mg-left-5">新建子文件夹</span></div>
+                    <div className="menu-item text-muted"><SvgIcon type="xxh-folders" style={{ fontSize: 12 }} /><span className="pi-mg-left-5">新建子文件夹</span></div>
                   </Tooltip>
                 </Menu.Item>
                 : ''
@@ -133,7 +133,7 @@ const Tender: React.FC<{}> = () =>{
           )
         }} trigger={[ 'click' ]}>
           <span>
-          <SvgIcon type="xxh-align-justify" style={{ fontSize: 12, color: "#007bff" }}></SvgIcon>
+          <SvgIcon type="xxh-align-justify" style={{ fontSize: 12, color: "#007bff" }} />
             <CaretDownOutlined style={{ fontSize: "12px", color: "#007bff" }}/>
           </span>
         </Dropdown>
@@ -187,12 +187,12 @@ const Tender: React.FC<{}> = () =>{
             rowKey={record => record.id}
             indentSize={20}
             bordered
-            ></Table>
+             />
         </div>
         <ModalForm modalObj={modal}  treeObj={tree} onCreate={onCreate} onCancel={() => setModal({
           ...modal,
           visible: false
-        })} ></ModalForm>
+        })}  />
       </div>
     </div>
   )

+ 7 - 7
src/pages/Management/Tender/Member/index.tsx

@@ -10,7 +10,7 @@ import consts from '@/utils/consts'
 import { Button, Input, message, Popover, Table } from 'antd'
 import { ColumnsType } from 'antd/lib/table'
 import { observer } from 'mobx-react'
-import React, { useState, useEffect, ChangeEvent, useMemo, useCallback } from 'react'
+import React, { useState, useEffect, ChangeEvent } from 'react'
 import { useActivate } from 'react-activation'
 import { RouteComponentProps } from 'react-router'
 import { apiCreateBidAccount, apiDelBidAccount, apiGetSettingAccount, apiUpdateBidAccountAuth } from './api'
@@ -122,7 +122,7 @@ const Member: React.FC<RouteComponentProps> = props => {
           }
         }
       }
-      return <div className="permission-text" dangerouslySetInnerHTML={{ __html: textNode }}></div>
+      return <div className="permission-text" dangerouslySetInnerHTML={{ __html: textNode }} />
     }
   }
   const columns: ColumnsType<iTableDataState> = [
@@ -272,9 +272,9 @@ const Member: React.FC<RouteComponentProps> = props => {
       <Header title={`${name} 成员管理`}>
         <Slot position="right">
           <Popover
-            title={<Input.Search size="small" placeholder="姓名/手机 检索" onSearch={search} onChange={e => change(e)}></Input.Search>}
+            title={<Input.Search size="small" placeholder="姓名/手机 检索" onSearch={search} onChange={e => change(e)} />}
             content={state.groups.map(item => (
-              <GroupItem {...item} key={item.value} onSelect={(item: iUserInfo) => itemSelectHandler(item)}></GroupItem>
+              <GroupItem {...item} key={item.value} onSelect={(item: iUserInfo) => itemSelectHandler(item)} />
             ))}
             overlayClassName="popover-card"
             trigger="click"
@@ -283,7 +283,7 @@ const Member: React.FC<RouteComponentProps> = props => {
             placement="bottomRight">
             <Button type="primary" size="small" onClick={showPopover}>
               <span>添加成员</span>
-              <SvgIcon type="xxh-caret-down"></SvgIcon>
+              <SvgIcon type="xxh-caret-down" />
             </Button>
           </Popover>
         </Slot>
@@ -295,9 +295,9 @@ const Member: React.FC<RouteComponentProps> = props => {
           columns={columns}
           rowKey={record => record.id}
           pagination={{ size: 'small' }}
-          bordered></Table>
+          bordered />
       </div>
-      <PermissionModal data={calcPermissionData()} onCreate={onModalConfirm} onCancel={onModalCancel}></PermissionModal>
+      <PermissionModal data={calcPermissionData()} onCreate={onModalConfirm} onCancel={onModalCancel} />
     </div>
   )
 }

+ 2 - 2
src/pages/Management/Tender/Member/modal.tsx

@@ -45,7 +45,7 @@ const PermissionSettingModal: React.FC<iPermissionSettingProps> = ({ onCreate, o
       render: (_, record) => {
         return (
           <Form.Item key={record.type} name={record.type}>
-            <Checkbox.Group options={checkboxOptions}></Checkbox.Group>
+            <Checkbox.Group options={checkboxOptions} />
           </Form.Item>
         )
       }
@@ -81,7 +81,7 @@ const PermissionSettingModal: React.FC<iPermissionSettingProps> = ({ onCreate, o
         </div>
       }>
       <Form form={form}>
-        <Table<iPermissionData> dataSource={permissionArr} columns={columns} rowKey={record => record.label} pagination={false} bordered></Table>
+        <Table<iPermissionData> dataSource={permissionArr} columns={columns} rowKey={record => record.label} pagination={false} bordered />
       </Form>
     </Modal>
   )

+ 1 - 1
src/pages/Management/Tender/index.tsx

@@ -8,7 +8,7 @@ const Management:React.FC<NavigationGuardsProps> = props => {
     <>
       <div className="panel-content">
         <Switch>
-            <Guards routeConfig={routeConfig} match={match} location={location}></Guards>
+            <Guards routeConfig={routeConfig} match={match} location={location} />
         </Switch>
       </div>
     </>

+ 2 - 2
src/pages/Management/index.tsx

@@ -8,10 +8,10 @@ const Management:React.FC<NavigationGuardsProps> = props => {
   const locationRef = useLocation()
   return (
     <>
-      <LeftSide childRoutes={routeConfig} location={locationRef}></LeftSide>
+      <LeftSide childRoutes={routeConfig} location={locationRef} />
       <div className="panel-content">
         <Switch>
-            <Guards routeConfig={routeConfig} match={match} location={location}></Guards>
+            <Guards routeConfig={routeConfig} match={match} location={location} />
         </Switch>
       </div>
     </>

+ 8 - 8
src/pages/Quality/Content/Info/Detail/components/Modal/index.tsx

@@ -6,7 +6,7 @@ import { iAuditor, iLatestAuditorState } from '@/types/safe'
 import { iAccountGroupItem, iUserInfo } from '@/types/setting'
 import { getUserGroup } from '@/utils/common/user'
 import { Button, Form, Input, message, Modal, Popover } from 'antd'
-import React, { ChangeEvent, useEffect, useMemo, useState, memo } from 'react'
+import React, { ChangeEvent, useEffect, useMemo, useState } from 'react'
 interface iAuditModalProps {
   type: 'safe' | 'quality'
   onCancel: () => void
@@ -246,12 +246,12 @@ const AuditModal: React.FC<iAuditModalProps> = props => {
         {type === 'back' ? (
           <>
             <Form.Item name="opinion" label="审批意见">
-              <Input.TextArea rows={5}></Input.TextArea>
+              <Input.TextArea rows={5} />
             </Form.Item>
             {curAuditor.progress !== '1' ? (
               <Popover
                 content={groups.map(item => (
-                  <GroupItem {...item} key={item.value} onSelect={(item: iUserInfo, type?: string) => itemSelectHandler(item, type)}></GroupItem>
+                  <GroupItem {...item} key={item.value} onSelect={(item: iUserInfo, type?: string) => itemSelectHandler(item, type)} />
                 ))}
                 overlayClassName="popover-card"
                 trigger="click"
@@ -290,7 +290,7 @@ const AuditModal: React.FC<iAuditModalProps> = props => {
                   }
                 })
               ]}>
-              <Input placeholder="输入文本, 确认删除"></Input>
+              <Input placeholder="输入文本, 确认删除" />
             </Form.Item>
           </>
         ) : null}
@@ -298,7 +298,7 @@ const AuditModal: React.FC<iAuditModalProps> = props => {
         {type === 'close' ? (
           <>
             <Form.Item name="opinion" label="审批意见">
-              <Input.TextArea rows={5}></Input.TextArea>
+              <Input.TextArea rows={5} />
             </Form.Item>
             <p className="pi-warning">审批关闭,将直接停止该巡检流程。</p>
           </>
@@ -306,13 +306,13 @@ const AuditModal: React.FC<iAuditModalProps> = props => {
         {type === 'pass' ? (
           <>
             <Form.Item name="opinion" label="审批意见">
-              <Input.TextArea rows={5}></Input.TextArea>
+              <Input.TextArea rows={5} />
             </Form.Item>
             {isLastAuditor && curAuditor.progress === '0' ? (
               <Popover
-                title={<Input.Search size="small" placeholder="姓名/手机 检索" onSearch={search} onChange={e => change(e)}></Input.Search>}
+                title={<Input.Search size="small" placeholder="姓名/手机 检索" onSearch={search} onChange={e => change(e)} />}
                 content={groups.map(item => (
-                  <GroupItem {...item} key={item.value} onSelect={(item: iUserInfo, type?: string) => itemSelectHandler(item, type)}></GroupItem>
+                  <GroupItem {...item} key={item.value} onSelect={(item: iUserInfo, type?: string) => itemSelectHandler(item, type)} />
                 ))}
                 overlayClassName="popover-card"
                 trigger="click"

+ 12 - 12
src/pages/Quality/Content/Info/Detail/index.tsx

@@ -297,7 +297,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
                       value={detail.inspection}
                       onChange={e => {
                         setDetail({ ...detail, inspection: e.currentTarget.value })
-                      }}></TextArea>
+                      }} />
                   )}
                 </td>
               </tr>
@@ -311,7 +311,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
                       value={detail.inspectionDetail}
                       onChange={e => {
                         setDetail({ ...detail, inspectionDetail: e.currentTarget.value })
-                      }}></TextArea>
+                      }} />
                   )}
                 </td>
               </tr>
@@ -325,7 +325,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
                       value={detail.demand}
                       onChange={e => {
                         setDetail({ ...detail, demand: e.currentTarget.value })
-                      }}></TextArea>
+                      }} />
                   )}
                 </td>
               </tr>
@@ -340,7 +340,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
                       locale={locale}
                       allowClear={false}
                       value={dayjs(detail.createTime)}
-                      onChange={value => setDetail({ ...detail, createTime: value?.format() })}></DatePicker>
+                      onChange={value => setDetail({ ...detail, createTime: value?.format() })} />
                   )}
                 </td>
               </tr>
@@ -365,7 +365,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
                   <td>
                     <TextArea
                       value={detail.checkOrder.opinion}
-                      onChange={e => setDetail({ ...detail, checkOrder: { ...detail.checkOrder, opinion: e.currentTarget.value } })}></TextArea>
+                      onChange={e => setDetail({ ...detail, checkOrder: { ...detail.checkOrder, opinion: e.currentTarget.value } })} />
                   </td>
                 </tr>
                 <tr>
@@ -376,7 +376,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
                       locale={locale}
                       allowClear={false}
                       value={dayjs(detail.checkOrder.create_time)}
-                      onChange={value => setDetail({ ...detail, checkOrder: { ...detail.checkOrder, create_time: value?.format() } })}></DatePicker>
+                      onChange={value => setDetail({ ...detail, checkOrder: { ...detail.checkOrder, create_time: value?.format() } })} />
                   </td>
                 </tr>
                 <tr>
@@ -415,7 +415,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
           <table className="pi-table pi-bordered mt-3">
             <thead>
               <tr>
-                <th></th>
+                <th />
                 <th className="pi-text-center">附件</th>
                 <th className="pi-text-center">上传者</th>
                 <th className="pi-text-center" style={{ width: 200 }}>
@@ -445,7 +445,7 @@ const Detail: React.FC<RouteComponentProps> = props => {
                   <td className="pi-text-center">{dayjsFormat(file.createTime)}</td>
                   <td className="pi-text-center pi-width-90">
                     <Tooltip title="移除">
-                      <Button size="small" type="text" icon={<SvgIcon type="xxh-times-circle1" />} style={{ color: '#df3f45' }} onClick={() => delFile(file.id, !idx)}></Button>
+                      <Button size="small" type="text" icon={<SvgIcon type="xxh-times-circle1" />} style={{ color: '#df3f45' }} onClick={() => delFile(file.id, !idx)} />
                     </Tooltip>
                   </td>
                 </tr>
@@ -459,17 +459,17 @@ const Detail: React.FC<RouteComponentProps> = props => {
                       pageSize={consts.PAGE_SIZE}
                       hideOnSinglePage={true}
                       total={detail.file.total}
-                      onChange={(page, pageSize) => fileListChange(page, pageSize)}></Pagination>
+                      onChange={(page, pageSize) => fileListChange(page, pageSize)} />
                   </td>
                 </tr>
               ) : null}
             </tbody>
           </table>
-          <AuditContent data={auditData} onSelect={addAuditor} onDelete={delAuditor}></AuditContent>
+          <AuditContent data={auditData} onSelect={addAuditor} onDelete={delAuditor} />
         </div>
       </div>
-      <OssUploadModal visible={modalObj.ossModal} onCancel={() => setModalObj({ ...modalObj, ossModal: false })} onCreate={onCreate} onShow={onOssModalShow}></OssUploadModal>
-      <AuditModal type="quality" modalObj={modalProps} onCancel={hideAuditModal} onCreate={onModalConfirm} auditors={detail.auditors} curAuditor={detail.latestAuditor}></AuditModal>
+      <OssUploadModal visible={modalObj.ossModal} onCancel={() => setModalObj({ ...modalObj, ossModal: false })} onCreate={onCreate} onShow={onOssModalShow} />
+      <AuditModal type="quality" modalObj={modalProps} onCancel={hideAuditModal} onCreate={onModalConfirm} auditors={detail.auditors} curAuditor={detail.latestAuditor} />
     </div>
   )
 }

+ 3 - 3
src/pages/Quality/Content/Info/Summary/index.tsx

@@ -83,7 +83,7 @@ const Summary: React.FC<{}> = () => {
   }
   return (
     <div className="wrap-contaniner">
-      <Header title="巡检概况"></Header>
+      <Header title="巡检概况" />
       <div className="wrap-content m-3 pi-flex-column pi-justify-start">
         <div className="pi-justify-start">
           <div className="pi-flex-twice card pi-flex-column">
@@ -103,13 +103,13 @@ const Summary: React.FC<{}> = () => {
             </div>
           </div>
           <div className="pi-flex-treble pi-mg-left-30 card">
-            <PieChart data={pieData}></PieChart>
+            <PieChart data={pieData} />
           </div>
         </div>
         <div className="card echarts-column-chart mt-3">
           <h5 className="pi-fz-25 pi-fw-5">整改趋势</h5>
           <div className="pi-width-100P">
-            <ColumnChart data={columnCharData}></ColumnChart>
+            <ColumnChart data={columnCharData} />
           </div>
         </div>
       </div>

+ 1 - 1
src/pages/Quality/Content/Info/index.tsx

@@ -8,7 +8,7 @@ const Content:React.FC<NavigationGuardsProps> = props => {
     <>
       <div className="panel-content">
         <Switch>
-              <Guards routeConfig={routeConfig} match={match} location={location}></Guards>
+              <Guards routeConfig={routeConfig} match={match} location={location} />
         </Switch>
       </div>
     </>

+ 1 - 2
src/pages/Quality/Content/List/index.tsx

@@ -5,7 +5,6 @@ import Slot from '@/components/Header/slot'
 import RuleModal from '@/components/RuleModal'
 import SvgIcon from '@/components/SvgIcon'
 import { tenderStore } from '@/store/mobx'
-import { iFileModal } from '@/types/file'
 import { iCreateSafe } from '@/types/safe'
 import { safeStatus } from '@/utils/common/constStatus'
 import { useListModal } from '@/utils/common/customHooks'
@@ -13,7 +12,7 @@ import consts from '@/utils/consts'
 import { dayjsFormat } from '@/utils/util'
 import { Button, message, Table } from 'antd'
 import { ColumnsType } from 'antd/lib/table'
-import React, { useEffect, useState } from 'react'
+import React, { useEffect } from 'react'
 import { Link } from 'react-router-dom'
 import { apiCreateQuality, apiQualityList, apiSaveRule } from './api'
 import AddModel from './modal'

+ 1 - 1
src/pages/Quality/Content/List/modal.tsx

@@ -83,7 +83,7 @@ const QualityCreateForm: React.FC<iQualityCreateFormProps> = ({
           <Input placeholder="请填写巡检项"/>
         </Form.Item>
         <Form.Item name="createTime" label="日期" rules={[ { required: true, message: '请选择日期' } ]}>
-          <DatePicker locale={locale} allowClear className="pi-width-100P"></DatePicker>
+          <DatePicker locale={locale} allowClear className="pi-width-100P" />
         </Form.Item>
         <div className={styles.warningFooter}>添加后再补充完善其余信息</div>
       </Form>

+ 2 - 2
src/pages/Quality/Content/index.tsx

@@ -7,10 +7,10 @@ const Content:React.FC<NavigationGuardsProps> = props => {
   const { routeConfig, match, location } = props
   return (
     <>
-      <LeftSide childRoutes={routeConfig} location={location}></LeftSide>
+      <LeftSide childRoutes={routeConfig} location={location} />
       <div className="panel-content">
         <Switch>
-              <Guards routeConfig={routeConfig} match={match} location={location}></Guards>
+              <Guards routeConfig={routeConfig} match={match} location={location} />
         </Switch>
       </div>
     </>

+ 1 - 1
src/pages/Quality/List/index.tsx

@@ -1,7 +1,7 @@
 import Header from '@/components/Header'
 import Slot from '@/components/Header/slot'
 import SvgIcon from '@/components/SvgIcon'
-import { tenderStore, userStore } from '@/store/mobx'
+import { tenderStore } from '@/store/mobx'
 import { ContractTree } from '@/types/contract'
 import { apiContractList } from '@/utils/common/api'
 import { useContractTree, useTableExpand } from '@/utils/common/customHooks'

+ 1 - 1
src/pages/Quality/index.tsx

@@ -7,7 +7,7 @@ const Contract:React.FC<NavigationGuardsProps> = props => {
   return (
     <>
       <Switch>
-            <Guards routeConfig={routeConfig} match={match} location={location}></Guards>
+            <Guards routeConfig={routeConfig} match={match} location={location} />
         </Switch>
     </>
   )

+ 3 - 3
src/pages/Safe/Content/Info/Summary/index.tsx

@@ -83,7 +83,7 @@ const Summary: React.FC<{}> = () => {
   }
   return (
     <div className="wrap-contaniner">
-      <Header title="巡检概况"></Header>
+      <Header title="巡检概况" />
       <div className="wrap-content m-3 pi-flex-column pi-justify-start">
         <div className="pi-justify-start">
           <div className="pi-flex-twice card pi-flex-column">
@@ -103,13 +103,13 @@ const Summary: React.FC<{}> = () => {
             </div>
           </div>
           <div className="pi-flex-treble pi-mg-left-30 card">
-            <PieChart data={pieData}></PieChart>
+            <PieChart data={pieData} />
           </div>
         </div>
         <div className="card echarts-column-chart mt-3">
           <h5 className="pi-fz-25 pi-fw-5">整改趋势</h5>
           <div className="pi-width-100P">
-            <ColumnChart data={columnCharData}></ColumnChart>
+            <ColumnChart data={columnCharData} />
           </div>
         </div>
       </div>

+ 1 - 1
src/pages/Safe/Content/Info/index.tsx

@@ -7,7 +7,7 @@ const Content: React.FC<NavigationGuardsProps> = props => {
   return (
     <div className="panel-content">
       <Switch>
-        <Guards routeConfig={routeConfig} match={match} location={location}></Guards>
+        <Guards routeConfig={routeConfig} match={match} location={location} />
       </Switch>
     </div>
   )

+ 1 - 1
src/pages/Safe/index.tsx

@@ -7,7 +7,7 @@ const Contract:React.FC<NavigationGuardsProps> = props => {
   return (
     <>
       <Switch>
-            <Guards routeConfig={routeConfig} match={match} location={location}></Guards>
+            <Guards routeConfig={routeConfig} match={match} location={location} />
         </Switch>
     </>
   )

+ 22 - 22
src/react-app-env.d.ts

@@ -10,57 +10,57 @@ declare namespace NodeJS {
 }
 
 declare module '*.bmp' {
-  const src: string;
-  export default src;
+  const src: string
+  export default src
 }
 
 declare module '*.gif' {
-  const src: string;
-  export default src;
+  const src: string
+  export default src
 }
 
 declare module '*.jpg' {
-  const src: string;
-  export default src;
+  const src: string
+  export default src
 }
 
 declare module '*.jpeg' {
-  const src: string;
-  export default src;
+  const src: string
+  export default src
 }
 
 declare module '*.png' {
-  const src: string;
-  export default src;
+  const src: string
+  export default src
 }
 
 declare module '*.webp' {
-    const src: string;
-    export default src;
+    const src: string
+    export default src
 }
 
 declare module '*.svg' {
-  import * as React from 'react';
+  import * as React from 'react'
 
   export const ReactComponent: React.FunctionComponent<React.SVGProps<
     SVGSVGElement
-  > & { title?: string }>;
+  > & { title?: string }>
 
-  const src: string;
-  export default src;
+  const src: string
+  export default src
 }
 
 declare module '*.module.css' {
-  const classes: { readonly [key: string]: string };
-  export default classes;
+  const classes: { readonly [key: string]: string }
+  export default classes
 }
 
 declare module '*.module.scss' {
-  const classes: { readonly [key: string]: string };
-  export default classes;
+  const classes: { readonly [key: string]: string }
+  export default classes
 }
 
 declare module '*.module.sass' {
-  const classes: { readonly [key: string]: string };
-  export default classes;
+  const classes: { readonly [key: string]: string }
+  export default classes
 }

+ 1 - 1
src/store/mobx/tender/index.ts

@@ -1,5 +1,5 @@
 import { iPermission } from "@/types/setting"
-import { apiGetPermission, apiGetPermissionWithBid } from "@/utils/common/api"
+import { apiGetPermission } from "@/utils/common/api"
 import consts from "@/utils/consts"
 import { storage } from "@/utils/util"
 import { action, computed, observable } from "mobx"

+ 0 - 1
src/utils/common/customHooks.ts

@@ -2,7 +2,6 @@
 import { useState } from 'react'
 import { ContractTree } from '@/types/contract'
 import { ListModal } from '@/types/safe'
-import consts from '../consts'
 
 /** 合同树的自定义hook */
 export const useContractTree = (): [ContractTree, (newTree: ContractTree) => void] => {

+ 0 - 1
src/utils/common/user.ts

@@ -1,7 +1,6 @@
 import { userStore } from '@/store/mobx'
 import { iAccountGroupItem, iGroup, iUserInfo } from '@/types/setting'
 import { storage } from '@/utils/util'
-import { resolve } from 'dns'
 import consts from '../consts'
 import { apiGetAccountWithSearch } from './api'
 const USER_INFO = 'user_info' // 用户个人信息

+ 1 - 1
src/utils/util.ts

@@ -1,4 +1,4 @@
-import { tenderStore, userStore } from '@/store/mobx'
+import { tenderStore } from '@/store/mobx'
 import { message } from 'antd'
 import dayjs from 'dayjs'
 import history from './history'