Forráskód Böngészése

feat: 事项设置组件添加内容

outaozhen 2 éve
szülő
commit
acb797a54d

+ 101 - 14
src/pages/Business/Matter/components/AddAssembly.tsx

@@ -1,7 +1,14 @@
 import useModal from '@/components/Modal'
 import { updateAssembly } from '@/services/api/business'
 import consts from '@/utils/consts'
-import { CodepenSquareFilled, ProfileFilled, SlackSquareFilled } from '@ant-design/icons'
+import {
+  CodepenSquareFilled,
+  ContainerFilled,
+  DollarCircleFilled,
+  FolderFilled,
+  ProfileFilled,
+  SlackSquareFilled
+} from '@ant-design/icons'
 import { Button, Card, Checkbox, Col, message, Row } from 'antd'
 import React, { useState } from 'react'
 import { Assembly } from './AssemblyDetail'
@@ -54,15 +61,18 @@ const AddAssembly: React.FC<AddAssemblyProps> = ({ defaultData, close, event$ })
 
   return (
     <div>
-      <Row gutter={16} className="p-24px">
+      <Row gutter={[16, 16]} className="p-24px">
         <Col span={8}>
           <Card
+            size="small"
             className={classNames({ 'border border-hex-40a9ff': assemblyList.includes(Assembly.FORM) })}
             title={
-              <span>
-                <ProfileFilled className="mr-1" style={{ fontSize: '20px', color: '#40A9FF' }} />
-                表单
-              </span>
+              <div className="flex mt-1">
+                <span>
+                  <ProfileFilled className="mr-1" style={{ fontSize: '20px', color: '#40A9FF' }} />
+                </span>
+                <span>表单</span>
+              </div>
             }
             extra={
               <Checkbox
@@ -78,14 +88,17 @@ const AddAssembly: React.FC<AddAssemblyProps> = ({ defaultData, close, event$ })
         </Col>
         <Col span={8}>
           <Card
+            size="small"
             className={classNames({
               'border border-hex-40a9ff': assemblyList.includes(Assembly.COSTPROFILE)
             })}
             title={
-              <span>
-                <SlackSquareFilled className="mr-1" style={{ fontSize: '20px', color: '#52C41A' }} />
-                送审资料清单
-              </span>
+              <div className="flex mt-1">
+                <span>
+                  <SlackSquareFilled className="mr-1" style={{ fontSize: '20px', color: '#52C41A' }} />
+                </span>
+                <span>送审资料清单</span>
+              </div>
             }
             extra={
               <Checkbox
@@ -99,14 +112,17 @@ const AddAssembly: React.FC<AddAssemblyProps> = ({ defaultData, close, event$ })
         </Col>
         <Col span={8}>
           <Card
+            size="small"
             className={classNames({
               'border border-hex-40a9ff': assemblyList.includes(Assembly.DATAPROFILE)
             })}
             title={
-              <span>
-                <CodepenSquareFilled className="mr-1" style={{ fontSize: '20px', color: '#722ED1' }} />
-                造价文件
-              </span>
+              <div className="flex mt-1">
+                <span>
+                  <CodepenSquareFilled className="mr-1" style={{ fontSize: '20px', color: '#722ED1' }} />
+                </span>
+                <span>造价文件</span>
+              </div>
             }
             extra={
               <Checkbox
@@ -120,6 +136,77 @@ const AddAssembly: React.FC<AddAssemblyProps> = ({ defaultData, close, event$ })
             <Button onClick={() => openModal(Assembly.DATAPROFILE)}>点击预览组件</Button>
           </Card>
         </Col>
+        <Col span={8}>
+          <Card
+            size="small"
+            className={classNames({
+              'border border-hex-40a9ff': assemblyList.includes(Assembly.ACHIEVEMENT)
+            })}
+            title={
+              <div className="flex mt-1">
+                <span>
+                  <FolderFilled className="mr-1" style={{ fontSize: '20px', color: '#FA8C16' }} />
+                </span>
+                <span>其他成果文件</span>
+              </div>
+            }
+            extra={
+              <Checkbox
+                disabled
+                onChange={e => handleAssemblyOnchange(e.target.checked, Assembly.ACHIEVEMENT)}
+                checked={assemblyList.includes(Assembly.ACHIEVEMENT)}
+              />
+            }>
+            <div className="min-h-70px">功能开发中...</div>
+            <Button onClick={() => openModal(Assembly.ACHIEVEMENT)}>点击预览组件</Button>
+          </Card>
+        </Col>
+        <Col span={8}>
+          <Card
+            size="small"
+            className={classNames({ 'border border-hex-40a9ff': assemblyList.includes(Assembly.COST) })}
+            title={
+              <div className="flex mt-1">
+                <span>
+                  <DollarCircleFilled className="mr-1" style={{ fontSize: '20px', color: '#FAAD14' }} />
+                </span>
+                <span>审核金额汇总</span>
+              </div>
+            }
+            extra={
+              <Checkbox
+                disabled
+                onChange={e => handleAssemblyOnchange(e.target.checked, Assembly.COST)}
+                checked={assemblyList.includes(Assembly.COST)}
+              />
+            }>
+            <div className="min-h-70px">功能开发中...</div>
+            <Button onClick={() => openModal(Assembly.COST)}>点击预览组件</Button>
+          </Card>
+        </Col>
+        <Col span={8}>
+          <Card
+            size="small"
+            className={classNames({ 'border border-hex-40a9ff': assemblyList.includes(Assembly.FILE) })}
+            title={
+              <div className="flex mt-1">
+                <span>
+                  <ContainerFilled className="mr-1" style={{ fontSize: '20px', color: '#13C2C2' }} />
+                </span>
+                <span>工程预算审核管理档案目录</span>
+              </div>
+            }
+            extra={
+              <Checkbox
+                disabled
+                onChange={e => handleAssemblyOnchange(e.target.checked, Assembly.FILE)}
+                checked={assemblyList.includes(Assembly.FILE)}
+              />
+            }>
+            <div className="min-h-70px">功能开发中...</div>
+            <Button onClick={() => openModal(Assembly.FILE)}>点击预览组件</Button>
+          </Card>
+        </Col>
       </Row>
       <div className="ant-modal-footer mt-4">
         <Button onClick={close}>取消</Button>

+ 4 - 1
src/pages/Business/Matter/components/AssemblyDetail.tsx

@@ -15,7 +15,10 @@ import { EventEmitter } from '@/utils/emit/event'
 export enum Assembly {
   FORM = 'form', // 表单
   COSTPROFILE = 'costProfile', // 造价文件
-  DATAPROFILE = 'dataProfile' // 资料清单
+  DATAPROFILE = 'dataProfile', // 资料清单
+  ACHIEVEMENT = 'achievement', // 其他成果文件
+  COST = 'cost', // 审核金额汇总
+  FILE = 'file' // 工程预算审核管理档案目录
 }
 
 export const assemblyToMap = {

+ 7 - 1
src/pages/Business/Matter/components/Picture.tsx

@@ -12,7 +12,13 @@ const Picture: React.FC<PictureProps> = ({ type }) => {
     [Assembly.COSTPROFILE]:
       'https://wc-assets.oss-cn-guangzhou.aliyuncs.com/images/component-preview/matter_costProfile.png',
     [Assembly.DATAPROFILE]:
-      'https://wc-assets.oss-cn-guangzhou.aliyuncs.com/images/component-preview/matter_dataProfile.png'
+      'https://wc-assets.oss-cn-guangzhou.aliyuncs.com/images/component-preview/matter_dataProfile.png',
+    [Assembly.ACHIEVEMENT]:
+      'https://wc-assets.oss-cn-guangzhou.aliyuncs.com/images/component-preview/matter_achievement.png',
+    [Assembly.COST]:
+      'https://wc-assets.oss-cn-guangzhou.aliyuncs.com/images/component-preview/matter_cost.png',
+    [Assembly.FILE]:
+      'https://wc-assets.oss-cn-guangzhou.aliyuncs.com/images/component-preview/matter_file.png'
   }
   return (
     <div>