Sfoglia il codice sorgente

feat: 合同管理ui更新

lanjianrong 4 anni fa
parent
commit
ce04bf88a6

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

@@ -47,7 +47,7 @@ const EditableCell: React.FC<EditableCellProps> = ({
   index,
   ...restProps
 }) => {
-  console.log(dataIndex, record)
+  // console.log(dataIndex, record)
 
   const cellNode = cellType === 'text' ? <Input value={dataIndex && record[dataIndex]} size="small" allowClear/> : <DatePicker  value={dataIndex && record[dataIndex]} size="small" allowClear locale={locale} />
 

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

@@ -84,47 +84,47 @@ export default function Income() {
               row.id ?
               <>
                 <Tooltip title="添加子项">
-                  <Button type="text" icon={<SvgIcon type="xxh-plus" style={{ color: '#007bff' }}></SvgIcon>} onClick={() => treeResfulApiHandler('add', { id: row.id, bidsectionId: row.bidsectionId })}></Button>
+                  <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={<PlusOutlined style={{ color: '#007bff' }}/>} onClick={() => treeResfulApiHandler('add', { id: row.id, bidsectionId: row.bidsectionId })}></Button> */}
                 </Tooltip>
                 {
                   !row.children?.length ?
                   <Tooltip title="删除">
-                    <Button type="text" icon={<SvgIcon type="xxh-times" style={{ color: '#007bff' }}></SvgIcon>} onClick={() => treeResfulApiHandler('del', { id: row.id, bidsectionId: row.bidsectionId })} />
+                    <Button type="text" icon={<SvgIcon type="xxh-times" style={{ color: '#007bff', fontSize: 12 }}></SvgIcon>} 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' }}></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 }}></SvgIcon></span>
                 }
                 {
                   row.parentId && row.parentId !== contractTreeBaseId ?
                   <Tooltip title="升级">
-                    <Button type="text" icon={<SvgIcon type="xxh-arrow-left" style={{ color: '#007bff' }} 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' })}></SvgIcon>}></Button>
                   </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' }}/></span>
+                  <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>
                 }
                 {
                   row.elderBrother ?
                   <Tooltip title="降级">
-                    <Button type="text" icon={<SvgIcon type="xxh-arrow-right" style={{ color: '#007bff' }}/>} 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' })} ></Button>
                   </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' }}/></span>
+                  <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>
                 }
                 {
                   row.elderBrother ?
                   <Tooltip title="上移">
-                    <Button type="text" icon={<SvgIcon type="xxh-arrow-up" style={{ color: '#007bff' }}/>} 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}></Button>
                   </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' }}/></span>
+                  <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>
                 }
                 {
                   !row.isEnd ?
                   <Tooltip title="下移">
-                    <Button type="text" icon={<SvgIcon type="xxh-arrow-down" style={{ color: '#007bff' }}/>} 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}></Button>
                   </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' }}/></span>
+                  <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>
                 }
               </>
               : ''

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

@@ -50,7 +50,7 @@ const List: React.FC<{}> = () => {
       width: '25%',
       render: (text: string, record: ContractTree) => {
         if (record.isfolder) {
-          return <div style={{ verticalAlign: "baseline" }}><SvgIcon type="xxh-folder-open" /><span className="pi-mg-left-2">{text}</span></div>
+          return <div style={{ verticalAlign: "baseline" }}><SvgIcon type={record.hasFolder ? "xxh-folder-open" : "xxh-folder"} /><span className="pi-mg-left-2">{text}</span></div>
         } else {
         return <div><span style={{ color: '#6c757d', marginRight: '.5rem' }}>{record.isEnd ? '└' : '├'}</span>
         <Link to={{ pathname: '/console/contract/content/summary', state: { id: record.bidsectionId } }}>{text}</Link>

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

@@ -84,40 +84,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>重命名</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>移动</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 }}></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>
               {
                 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>删除</span>
+                        <SvgIcon type="xxh-times" style={{ fontSize: 12 }}></SvgIcon><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>删除</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 }}></SvgIcon><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>新建标段</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 }}></SvgIcon><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>新建标段</span></div>
+                    <div className= "menu-item text-muted"><SvgIcon type="xxh-plus" style={{ fontSize: 12 }}></SvgIcon><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>新建子文件夹</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 }}></SvgIcon><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>新建子文件夹</span></div>
+                    <div className="menu-item text-muted"><SvgIcon type="xxh-folders" style={{ fontSize: 12 }}></SvgIcon><span className="pi-mg-left-5">新建子文件夹</span></div>
                   </Tooltip>
                 </Menu.Item>
                 : ''

+ 1 - 1
src/router/routes.ts

@@ -87,7 +87,7 @@ export const routeConfig: RouteModel[] = [
         component: AsyncModuleLoader(() => import('@/pages/Safe')),
         auth: [ 'USER', 'ADMIN' ],
         meta: {
-          icon: 'xxh-toolbox',
+          icon: 'xxh-users-cog',
           title: '安全巡检',
           isTop: true,
           sort: 3