水利工程项目
parent
3b9a25a8fb
commit
46dd4a8200
|
|
@ -38,22 +38,34 @@ const SiderMenu: React.FC = () => {
|
|||
<Item key="7.2" icon={<ProfileOutlined />}>质量计划</Item>
|
||||
<Item key="7.3" icon={<ProfileOutlined />}>质量验收</Item>
|
||||
</SubMenu>
|
||||
<SubMenu key="8" icon={<ProfileOutlined />} title="现场管理">
|
||||
<Item key="8.1" icon={<ProfileOutlined />}><Link to="/site/log">施工日志</Link></Item>
|
||||
<Item key="8.2" icon={<ProfileOutlined />}><Link to="/site/picres">工程形象进度</Link></Item>
|
||||
|
||||
<SubMenu key="8" icon={<ProfileOutlined />} title="施工质量管理">
|
||||
<Item key="8.1" icon={<ProfileOutlined />}><Link to="/constructionQuality/wbs">工程项目划分</Link></Item>
|
||||
{/*<Item key="8.2" icon={<ProfileOutlined />}><Link to="/constructionQuality/constructionUnit">施工单位关联项目工序</Link></Item>
|
||||
<Item key="8.3" icon={<ProfileOutlined />}><Link to="/constructionQuality/constructionControlUnit">监理单位关联项目工序</Link></Item>*/}
|
||||
<Item key="8.4" icon={<ProfileOutlined />}><Link to="/constructionQuality/qualityManage">质量管理</Link></Item>
|
||||
</SubMenu>
|
||||
<SubMenu key="9" icon={<ProfileOutlined />} title="竣工管理">
|
||||
<Item key="9.1" icon={<ProfileOutlined />}>竣工档案</Item>
|
||||
<Item key="9.2" icon={<ProfileOutlined />}>竣工管理</Item>
|
||||
|
||||
<SubMenu key="9" icon={<ProfileOutlined />} title="现场管理">
|
||||
<Item key="9.1" icon={<ProfileOutlined />}><Link to="/site/log">施工日志</Link></Item>
|
||||
<Item key="9.2" icon={<ProfileOutlined />}><Link to="/site/picres">工程形象进度</Link></Item>
|
||||
</SubMenu>
|
||||
<SubMenu key="10" icon={<ProfileOutlined />} title="资料管理">
|
||||
<Item key="10.1" icon={<ProfileOutlined />}><Link to="/res/dir">文档目录</Link></Item>
|
||||
<Item key="10.2" icon={<ProfileOutlined />}><Link to="/res/adoc">行政公文</Link></Item>
|
||||
<Item key="10.3" icon={<ProfileOutlined />}><Link to="/res/pdoc">项目资料</Link></Item>
|
||||
<SubMenu key="10" icon={<ProfileOutlined />} title="竣工管理">
|
||||
<Item key="10.1" icon={<ProfileOutlined />}>竣工档案</Item>
|
||||
<Item key="10.2" icon={<ProfileOutlined />}>竣工管理</Item>
|
||||
</SubMenu>
|
||||
<SubMenu key="11" icon={<ProfileOutlined />} title="系统设置">
|
||||
<Item key="11.1" icon={<ProfileOutlined />}><Link to="/sys/user">用户管理</Link></Item>
|
||||
<Item key="11.2" icon={<ProfileOutlined />}><Link to="/sys/role">角色管理</Link></Item>
|
||||
<SubMenu key="11" icon={<ProfileOutlined />} title="资料管理">
|
||||
<Item key="11.1" icon={<ProfileOutlined />}><Link to="/res/dir">文档目录</Link></Item>
|
||||
<Item key="11.2" icon={<ProfileOutlined />}><Link to="/res/adoc">行政公文</Link></Item>
|
||||
<Item key="11.3" icon={<ProfileOutlined />}><Link to="/res/pdoc">项目资料</Link></Item>
|
||||
</SubMenu>
|
||||
<SubMenu key="12" icon={<ProfileOutlined />} title="系统设置">
|
||||
<Item key="12.1" icon={<ProfileOutlined />}><Link to="/sys/user">用户管理</Link></Item>
|
||||
<Item key="12.2" icon={<ProfileOutlined />}><Link to="/sys/role">角色管理</Link></Item>
|
||||
<Item key="12.3" icon={<ProfileOutlined />}><Link to="/sys/dataDictionary">数据字典</Link></Item>
|
||||
<Item key="12.4" icon={<ProfileOutlined />}><Link to="/sys/qualityStandard">质量标准</Link></Item>
|
||||
<Item key="12.5" icon={<ProfileOutlined />}><Link to="/sys/systemLog">系统日志</Link></Item>
|
||||
<Item key="12.6" icon={<ProfileOutlined />}><Link to="/sys/notify">消息通知</Link></Item>
|
||||
</SubMenu>
|
||||
</Menu>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,28 @@ export type Role = {
|
|||
desc?: string;
|
||||
}
|
||||
|
||||
export type DataDictionary = {
|
||||
zdlx: string;
|
||||
zdz: string;
|
||||
zdmc: string;
|
||||
}
|
||||
|
||||
export type QualityStandard = {
|
||||
bzlx: string;
|
||||
xm: string;
|
||||
jynr: string;
|
||||
zlbz: string;
|
||||
}
|
||||
|
||||
export type SystemLog = {
|
||||
bm: string;
|
||||
xglx: string;
|
||||
xgr: string;
|
||||
xsj: string;
|
||||
jsj: string;
|
||||
xgsj: string;
|
||||
}
|
||||
|
||||
export type ProjectLog = {
|
||||
code: string;
|
||||
name: string;
|
||||
|
|
@ -363,3 +385,47 @@ export type DocTypeDef = {
|
|||
remark?: string;
|
||||
}
|
||||
|
||||
export type Wbs = {
|
||||
code: string;
|
||||
name: string;
|
||||
proName: string;
|
||||
importantLevel?: string;
|
||||
createTime?: string;
|
||||
creater?: string;
|
||||
children?: Wbs[];
|
||||
addType: '单位工程' | '分部工程' | '单元工程' | '工序工程';
|
||||
}
|
||||
|
||||
export type Glgcl = {
|
||||
gclqd: string;
|
||||
gcl: string;
|
||||
unit: string;
|
||||
}
|
||||
|
||||
export type QualityManageTab1 = {
|
||||
dwgcName: string;
|
||||
fbgcName: string;
|
||||
dygcName: string;
|
||||
gxName: string;
|
||||
sgdw: string;
|
||||
sgrq: string;
|
||||
sgzpdj: string;
|
||||
jlfhdj: string;
|
||||
txsj: string;
|
||||
}
|
||||
|
||||
export type QualityManageTab2 = {
|
||||
dwgcName: string;
|
||||
fbgcName: string;
|
||||
sgdw: string;
|
||||
gclx: string;
|
||||
pdrq: string;
|
||||
}
|
||||
|
||||
export type QualityManageTab3 = {
|
||||
qxszdwgc: string;
|
||||
qxbw: string;
|
||||
qxlb: string;
|
||||
sgdw: string;
|
||||
txrq: string;
|
||||
}
|
||||
|
|
@ -3,6 +3,10 @@ import { Navigate, useRoutes } from 'react-router';
|
|||
import DashboardLayout from '../layouts/DashboardLayout';
|
||||
import Login from './auth/Login';
|
||||
import Role from './auth/Role';
|
||||
import DataDictionary from './systemSetting/DataDictionary';
|
||||
import QualityStandard from './systemSetting/QualityStandard';
|
||||
import SystemLog from './systemSetting/SystemLog';
|
||||
import Notify from './systemSetting/Notify';
|
||||
import UserPage from './auth/User';
|
||||
import BidLogPage from './bid/BidLog';
|
||||
import ContractorLogPage from './bid/ContractorLog';
|
||||
|
|
@ -21,6 +25,9 @@ import ConstructionLog from './site/ConstructionLog';
|
|||
import PicResources from './site/PicResources';
|
||||
import SupplierLogPage from './supplier/SupplierLog';
|
||||
|
||||
import WbsPage from './constructionQuality/wbs';
|
||||
import QualityManagePage from './constructionQuality/qualityManage';
|
||||
|
||||
const AppRouters: React.FC = () => {
|
||||
let element = useRoutes([
|
||||
{ path: '/login', element: <Login /> },
|
||||
|
|
@ -36,6 +43,13 @@ const AppRouters: React.FC = () => {
|
|||
{ path: '*', element: <Error404 /> },
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/constructionQuality', element: <DashboardLayout />, children: [
|
||||
{ path: 'wbs', element: <WbsPage /> },
|
||||
{ path: 'QualityManage', element: <QualityManagePage /> },
|
||||
{ path: '*', element: <Error404 /> },
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/site', element: <DashboardLayout />, children: [
|
||||
{ path: 'log', element: <ConstructionLog /> },
|
||||
|
|
@ -83,6 +97,10 @@ const AppRouters: React.FC = () => {
|
|||
path: '/sys', element: <DashboardLayout />, children: [
|
||||
{ path: 'user', element: <UserPage /> },
|
||||
{ path: 'role', element: <Role /> },
|
||||
{ path: 'dataDictionary', element: <DataDictionary /> },
|
||||
{ path: 'QualityStandard', element: <QualityStandard /> },
|
||||
{ path: 'SystemLog', element: <SystemLog /> },
|
||||
{ path: 'Notify', element: <Notify /> },
|
||||
{ path: '*', element: <Error404 /> },
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
import {Tree, Card, Space, Input, DatePicker, Button, Select} from 'antd'
|
||||
import React, { useState } from 'react'
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
const treeData = [
|
||||
{
|
||||
title: '新疆XX水库土建工程项目', key: '新疆XX水库土建工程项目', children: [
|
||||
{ title: '单位工程一', key: '新疆XX水库土建工程项目-单位工程一', children:[
|
||||
{ title: '分布工程1', key: '新疆XX水库土建工程项目-单位工程一-分布工程1', children:[
|
||||
{ title: '单元工程1', key: '新疆XX水库土建工程项目-单位工程一-分布工程1-单元工程1'},
|
||||
{ title: '单元工程2', key: '新疆XX水库土建工程项目-单位工程一-分布工程1-单元工程2'},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '新疆XX水库土建工程项目2', key: '新疆XX水库土建工程项目2', children: [
|
||||
{ title: '单位工程一', key: '新疆XX水库土建工程项目2-单位工程一', children:[
|
||||
{ title: '分布工程1', key: '新疆XX水库土建工程项目2-单位工程一-分布工程1', children:[
|
||||
{ title: '单元工程1', key: '新疆XX水库土建工程项目2-单位工程一-分布工程1-单元工程1'},
|
||||
{ title: '单元工程2', key: '新疆XX水库土建工程项目2-单位工程一-分布工程1-单元工程2'},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const MenuSelect: React.FC<{
|
||||
value?: string[];
|
||||
onChange?: (value: string[]) => void;
|
||||
}> = ({ value, onChange }) => {
|
||||
const [expandedKeys, setExpandedKeys] = useState<React.Key[]>(['新疆XX水库土建工程项目','新疆XX水库土建工程项目-单位工程一','新疆XX水库土建工程项目-单位工程一-分布工程1']);
|
||||
const [checkedKeys, setCheckedKeys] = useState<React.Key[] | { checked: React.Key[]; halfChecked: React.Key[]; }>([]);
|
||||
const [selectedKeys, setSelectedKeys] = useState<React.Key[]>([]);
|
||||
const [autoExpandParent, setAutoExpandParent] = useState<boolean>(true);
|
||||
|
||||
const onExpand = (expandedKeysValue: React.Key[]) => {
|
||||
console.log('onExpand', expandedKeysValue);
|
||||
// if not set autoExpandParent to false, if children expanded, parent can not collapse.
|
||||
// or, you can remove all expanded children keys.
|
||||
setExpandedKeys(expandedKeysValue);
|
||||
setAutoExpandParent(false);
|
||||
};
|
||||
|
||||
const onCheck = (checked: React.Key[] | { checked: React.Key[]; halfChecked: React.Key[]; }, info: any) => {
|
||||
console.log('onCheck', checked);
|
||||
setCheckedKeys(checked);
|
||||
};
|
||||
|
||||
const onSelect = (selectedKeysValue: React.Key[], info: any) => {
|
||||
console.log('onSelect', info);
|
||||
setSelectedKeys(selectedKeysValue);
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{width:"100%",background:"#fff"}}>
|
||||
<div style={{width:"500px",margin:"0 0 0 30px",padding:"20px 0px",boxSizing:"border-box"}}>
|
||||
<Space size="large" wrap>
|
||||
<Space>
|
||||
监理单位:
|
||||
<Select defaultValue="水电建XX局" style={{ width: 432 }}>
|
||||
<Option value="水电建XX局">水电建XX局</Option>
|
||||
<Option value="施工单位">施工单位</Option>
|
||||
<Option value="施工单位1">施工单位1</Option>
|
||||
</Select>
|
||||
</Space>
|
||||
</Space>
|
||||
<div className="card-h-margin" />
|
||||
<Card>
|
||||
<Tree
|
||||
checkable
|
||||
onExpand={onExpand}
|
||||
expandedKeys={expandedKeys}
|
||||
autoExpandParent={autoExpandParent}
|
||||
onCheck={onCheck}
|
||||
checkedKeys={checkedKeys}
|
||||
onSelect={onSelect}
|
||||
selectedKeys={selectedKeys}
|
||||
treeData={treeData}
|
||||
/>
|
||||
</Card>
|
||||
<div className="card-h-margin" />
|
||||
<div style={{textAlign:"center"}}>
|
||||
<Button type="primary">保存</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default MenuSelect
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import ConstructionControlUnit from './constructionControlUnit';
|
||||
|
||||
const constructionControlUnitPage = () => {
|
||||
return (
|
||||
<div className="content-root">
|
||||
<ConstructionControlUnit />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default constructionControlUnitPage
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
import ProCard from '@ant-design/pro-card';
|
||||
import { BarsOutlined } from '@ant-design/icons';
|
||||
import React from 'react';
|
||||
import { DirectoryDef } from '../../../service/def';
|
||||
import Tab1 from './tab1';
|
||||
import Tab2 from './tab2';
|
||||
import Tab3 from './tab3';
|
||||
|
||||
async function demodata(): Promise<DirectoryDef[]> {
|
||||
return [
|
||||
{
|
||||
name: '资料目录定义', code: '', children: [
|
||||
{ name: '前期项目阶段', code: '01', children: [] },
|
||||
{ name: '项目实施阶段', code: '02', children: [] },
|
||||
{ name: '项目竣工阶段', code: '03', children: [] },
|
||||
{ name: '项目收尾与总结', code: '04', children: [] },
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
const QualityManagetListPage = () => {
|
||||
return (
|
||||
<div>
|
||||
<ProCard
|
||||
tabs={{ type: 'card', }}
|
||||
headerBordered
|
||||
>
|
||||
<ProCard.TabPane key="tab1"
|
||||
tab={
|
||||
<span>
|
||||
<BarsOutlined />
|
||||
单元(工序)工程质量
|
||||
</span>
|
||||
}
|
||||
>
|
||||
<Tab1 />
|
||||
</ProCard.TabPane>
|
||||
<ProCard.TabPane key="tab2"
|
||||
tab={
|
||||
<span>
|
||||
<BarsOutlined />
|
||||
外观质量评定
|
||||
</span>
|
||||
}
|
||||
>
|
||||
<Tab2 />
|
||||
</ProCard.TabPane>
|
||||
<ProCard.TabPane key="tab3"
|
||||
tab={
|
||||
<span>
|
||||
<BarsOutlined />
|
||||
施工质量缺陷备案
|
||||
</span>
|
||||
}
|
||||
>
|
||||
<Tab3 />
|
||||
</ProCard.TabPane>
|
||||
<ProCard.TabPane key="tab4"
|
||||
tab={
|
||||
<span>
|
||||
<BarsOutlined />
|
||||
重要隐蔽(关键部位)单元工程质量等级签证
|
||||
</span>
|
||||
}
|
||||
>
|
||||
|
||||
</ProCard.TabPane>
|
||||
<ProCard.TabPane key="tab5"
|
||||
tab={
|
||||
<span>
|
||||
<BarsOutlined />
|
||||
施工质量评定
|
||||
</span>
|
||||
}
|
||||
>
|
||||
|
||||
</ProCard.TabPane>
|
||||
</ProCard>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default QualityManagetListPage
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import QualityManagetList from './QualityManagetList';
|
||||
|
||||
const QualityManagetPage = () => {
|
||||
return (
|
||||
<div className="content-root">
|
||||
<QualityManagetList />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default QualityManagetPage
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
import ProForm, { ProFormSelect, ProFormText, ProFormTextArea } from '@ant-design/pro-form'
|
||||
import { Typography } from 'antd'
|
||||
import React, { useMemo } from 'react'
|
||||
import CenterForm from '../../../../components/crud/CenterForm'
|
||||
import { DEF_INPUT_LEN } from '../../../../components/crud/FormLayoutProps'
|
||||
import { CrudContext } from '../../../../components/crud/useCrud'
|
||||
import { DesignAssets } from '../../../../service/def'
|
||||
|
||||
type IProps = {
|
||||
crudContext: CrudContext;
|
||||
}
|
||||
|
||||
const DataForm: React.FC<IProps> = ({ crudContext }) => {
|
||||
|
||||
const record: DesignAssets | null = crudContext.record ?? null;
|
||||
|
||||
const initDemoVals = useMemo(() => ({
|
||||
projs: ['test项目'],
|
||||
packs: [record?.packname || 'test设计包'],
|
||||
}), [])
|
||||
|
||||
return (
|
||||
<CenterForm>
|
||||
<ProForm initialValues={record || {}}>
|
||||
<Typography.Title level={5} type="secondary">基本信息</Typography.Title>
|
||||
<ProFormSelect name="proj" width={DEF_INPUT_LEN} label="项目" options={initDemoVals.projs} />
|
||||
<ProFormSelect name="packname" width={DEF_INPUT_LEN} label="任务包" options={initDemoVals.packs} />
|
||||
<ProForm.Group>
|
||||
<ProFormText name="code" label="成果编号" width="sm" rules={[{ required: true }]} />
|
||||
<ProFormSelect name="type" label="成果类型" width="sm" rules={[{ required: true }]} options={['科研试验成果类']} />
|
||||
</ProForm.Group>
|
||||
<ProFormText name="no" label="图号" width="sm" rules={[{ required: true }]} />
|
||||
<ProFormText name="name" label="成果名称" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
|
||||
<ProFormText name="keyword" label="关键字" width={DEF_INPUT_LEN} />
|
||||
|
||||
<ProForm.Group>
|
||||
<ProFormText name="desperosnel" label="设计人" width="sm" />
|
||||
<ProFormText name="commiter" label="提交人" width="sm" />
|
||||
</ProForm.Group>
|
||||
|
||||
<ProFormTextArea name="remark" label="备注" width={DEF_INPUT_LEN} />
|
||||
|
||||
</ProForm>
|
||||
</CenterForm>
|
||||
)
|
||||
}
|
||||
|
||||
export default DataForm;
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
import { DeleteOutlined, EditOutlined, PlusOutlined,InfoCircleOutlined,SearchOutlined } from '@ant-design/icons';
|
||||
import {Button, Card, DatePicker, Input, Modal, Space, Table} from 'antd';
|
||||
import { ColumnsType } from 'antd/lib/table';
|
||||
import React, {useMemo, useState} from 'react';
|
||||
import OpButton from '../../../../components/crud/OpButton';
|
||||
import useCrud, {CrudContext} from '../../../../components/crud/useCrud';
|
||||
import {BidLog, DesignAssets, QualityManageTab1} from '../../../../service/def';
|
||||
import useRequest from '../../../../utils/useRequest';
|
||||
import {PageTableContext} from "../../../../components/crud/usePageTable";
|
||||
import DataForm from './DataForm';
|
||||
|
||||
type IProps = {
|
||||
pagerCtx: PageTableContext<QualityManageTab1>;
|
||||
crudCtx: CrudContext;
|
||||
};
|
||||
|
||||
async function demodata(): Promise<QualityManageTab1[]> {
|
||||
return [];
|
||||
}
|
||||
|
||||
const DataTable: React.FC<IProps> = ({ pagerCtx, crudCtx }) => {
|
||||
const crud = useCrud();
|
||||
|
||||
let record = crudCtx.record || {};
|
||||
console.log(record);
|
||||
|
||||
const { data, loading } = useRequest(demodata);
|
||||
|
||||
const columns = useMemo<ColumnsType<QualityManageTab1>>(() => [
|
||||
{ title: '单位工程名称', key: 'dwgcName', dataIndex: 'dwgcName' },
|
||||
{ title: '分部工程名称', key: 'fbgcName', dataIndex: 'fbgcName' },
|
||||
{ title: '单元工程名称', key: 'dygcName', dataIndex: 'dygcName' },
|
||||
{ title: '工序名称', key: 'gxName', dataIndex: 'gxName' },
|
||||
{ title: '施工单位', key: 'sgdw', dataIndex: 'sgdw' },
|
||||
{ title: '施工日期', key: 'sgrq', dataIndex: 'sgrq' },
|
||||
{ title: '施工自评等级', key: 'sgzpdj', dataIndex: 'sgzpdj' },
|
||||
{ title: '监理复核等级', key: 'jlfhdj', dataIndex: 'jlfhdj' },
|
||||
{ title: '填写时间', key: 'txsj', dataIndex: 'txsj' },
|
||||
{
|
||||
title: '操作', key: 'op', render: rec => (
|
||||
<Space>
|
||||
<OpButton icon={<DeleteOutlined />} danger />
|
||||
</Space>
|
||||
)
|
||||
}
|
||||
], []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Table
|
||||
rowKey="code"
|
||||
dataSource={data}
|
||||
loading={loading}
|
||||
size="small"
|
||||
bordered
|
||||
pagination={false}
|
||||
columns={columns}
|
||||
{...pagerCtx.tableProps}
|
||||
/>
|
||||
{
|
||||
crud.mode ? (
|
||||
<Modal
|
||||
visible
|
||||
footer={null}
|
||||
title={crud.mode === '0' ? '添加单位工程' : crud.mode === '1' ? '添加分部工程' : crud.mode === '2' ? '添加单元工程' : '添加工序工程'}
|
||||
onCancel={() => crud.goto(null, null)}
|
||||
width={1000}
|
||||
>
|
||||
|
||||
</Modal>
|
||||
) : null
|
||||
}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default DataTable
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
import { PlusOutlined,SearchOutlined } from '@ant-design/icons';
|
||||
import {Button, Card, Col, DatePicker, Input, Row, Select, Space, Tree} from 'antd';
|
||||
import React, { useState } from 'react';
|
||||
import CancelCrud from '../../../../components/crud/CancelCrud';
|
||||
import useCrud from '../../../../components/crud/useCrud';
|
||||
import usePageTable from '../../../../components/crud/usePageTable';
|
||||
import { DesignAssets, PageResult, SearchOption,QualityManageTab1 } from '../../../../service/def';
|
||||
import { demoDate } from '../../../../utils/utils';
|
||||
import DataForm from './DataForm';
|
||||
import DataTable from './DataTable';
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
async function demofind(params?: SearchOption): Promise<PageResult<QualityManageTab1>> {
|
||||
if (!params || !params.search?.packname) {
|
||||
return { list: [], totalRow: 0 };
|
||||
}
|
||||
console.log(params.search);
|
||||
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
dwgcName: '单位工程一',
|
||||
fbgcName: '分部工程1',
|
||||
dygcName: '单元工程1',
|
||||
gxName: '/',
|
||||
sgdw: '建筑公司',
|
||||
sgrq: '1月1号-1月20号',
|
||||
sgzpdj: '合格',
|
||||
jlfhdj: '不合格',
|
||||
txsj: '2月1号',
|
||||
},
|
||||
{
|
||||
dwgcName: '单位工程一',
|
||||
fbgcName: '分部工程1',
|
||||
dygcName: '单元工程1',
|
||||
gxName: '/',
|
||||
sgdw: '建筑公司',
|
||||
sgrq: '1月1号-1月20号',
|
||||
sgzpdj: '合格',
|
||||
jlfhdj: '不合格',
|
||||
txsj: '2月1号',
|
||||
},
|
||||
],
|
||||
totalRow: 1
|
||||
};
|
||||
}
|
||||
|
||||
const treeData = [
|
||||
{
|
||||
title: '新疆XX水库土建工程项目',
|
||||
key: '新疆XX水库土建工程项目',
|
||||
selectable: false,
|
||||
children: [
|
||||
{
|
||||
title: '单位工程一', key: '新疆XX水库土建工程项目-单位工程一',
|
||||
children: [
|
||||
{ title: '分部工程1', key: '新疆XX水库土建工程项目-单位工程一-分布工程1', children:[
|
||||
{ title: '单元工程1', key: '新疆XX水库土建工程项目-单位工程一-分布工程1-单元工程1'},
|
||||
{ title: '单元工程2', key: '新疆XX水库土建工程项目-单位工程一-分布工程1-单元工程2'},
|
||||
]
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '项目2',
|
||||
key: '项目2',
|
||||
selectable: false,
|
||||
children: [
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
const DesignAssetsPage: React.FC = () => {
|
||||
|
||||
const [packname, setPackname] = useState<string | undefined>();
|
||||
|
||||
const crud = useCrud();
|
||||
|
||||
const pager = usePageTable<QualityManageTab1>(demofind);
|
||||
|
||||
const record = crud.record;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Card>
|
||||
<Space size="large" wrap>
|
||||
<Space>
|
||||
施工单位:
|
||||
<Select defaultValue="水电建XX局" style={{ width: 288 }}>
|
||||
<Option value="水电建XX局">水电建XX局</Option>
|
||||
<Option value="施工单位">施工单位</Option>
|
||||
<Option value="施工单位1">施工单位1</Option>
|
||||
</Select>
|
||||
</Space>
|
||||
<Space>施工时间:<DatePicker.RangePicker /></Space>
|
||||
<Space>
|
||||
<Button icon={<SearchOutlined />} type="primary">查询</Button>
|
||||
<Button icon={<PlusOutlined />} onClick={() => crud.goto('new', {})}>新增</Button>
|
||||
</Space>
|
||||
</Space>
|
||||
</Card>
|
||||
<div className="card-h-margin" />
|
||||
|
||||
<Row gutter={16}>
|
||||
<Col span={6}>
|
||||
<Card style={{ minHeight: 800 }}>
|
||||
<Space direction="vertical" style={{ width: '100%' }}>
|
||||
<Input.Search />
|
||||
<Tree.DirectoryTree
|
||||
defaultExpandAll
|
||||
treeData={treeData}
|
||||
multiple={false}
|
||||
onSelect={(selkeys) => {
|
||||
const packname = selkeys?.[0] as string;
|
||||
setPackname(packname);
|
||||
|
||||
pager.search({ search: { packname } })
|
||||
}}
|
||||
/>
|
||||
</Space>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={18}>
|
||||
<Card title={packname ? `单元评定记录列表(${packname})` : '(点击左侧树状列表查看单元评定记录)'}>
|
||||
<DataTable crudCtx={crud} pagerCtx={pager}/>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default DesignAssetsPage
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
import ProForm, { ProFormDatePicker, ProFormDigit, ProFormRadio, ProFormSelect, ProFormText } from '@ant-design/pro-form'
|
||||
import { Typography } from 'antd'
|
||||
import React from 'react'
|
||||
import CenterForm from '../../../../components/crud/CenterForm'
|
||||
import { DEF_INPUT_LEN } from '../../../../components/crud/FormLayoutProps'
|
||||
import { CrudContext } from '../../../../components/crud/useCrud'
|
||||
|
||||
const DataForm: React.FC<{
|
||||
crudCtx: CrudContext
|
||||
}> = ({ crudCtx }) => {
|
||||
const record = crudCtx.record || {};
|
||||
return (
|
||||
<CenterForm>
|
||||
<ProForm initialValues={record}>
|
||||
<Typography.Title level={5} type="secondary">基本信息</Typography.Title>
|
||||
<ProFormSelect name="proj" width={DEF_INPUT_LEN} label="项目" disabled={record.proj} rules={[{ required: true }]} />
|
||||
<ProFormSelect name="descontract" width={DEF_INPUT_LEN} label="设计合同" />
|
||||
<ProForm.Group>
|
||||
<ProFormText name="code" label="编码" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
<ProFormText name="name" label="名称" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
</ProForm.Group>
|
||||
<ProFormDigit name="imgnum" label="图纸张数" width="sm" rules={[{ required: true }]} />
|
||||
<ProFormRadio.Group name="status" label="状态" radioType="button" rules={[{ required: true }]} options={['设计', '评审', '完成']} />
|
||||
|
||||
<ProFormRadio.Group name="evalmethod" label="评审方式" radioType="button" rules={[{ required: true }]} options={['在线评审', '线下评审']} />
|
||||
<ProForm.Group>
|
||||
<ProFormDatePicker name="evaltm" label="计划评审时间" width="sm" rules={[{ required: true }]} />
|
||||
<ProFormDatePicker name="evaldonetm" label="实际评审时间" width="sm" />
|
||||
</ProForm.Group>
|
||||
<ProForm.Group>
|
||||
<ProFormDatePicker name="pubtm" label="计划发布时间" width="sm" rules={[{ required: true }]} />
|
||||
<ProFormDatePicker name="pubdonetm" label="实际发布时间" width="sm" />
|
||||
</ProForm.Group>
|
||||
|
||||
|
||||
<Typography.Title level={5} type="secondary">其他信息</Typography.Title>
|
||||
|
||||
<ProFormText name="desorg" label="设计单位" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
<ProFormText name="despersonel" label="设计人" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
<ProFormSelect name="desorg" label="施工合同" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
|
||||
</ProForm>
|
||||
</CenterForm>
|
||||
)
|
||||
}
|
||||
|
||||
export default DataForm;
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
import { DeleteOutlined, EditOutlined } from '@ant-design/icons';
|
||||
import { Button, Space, Table } from 'antd';
|
||||
import { ColumnsType } from 'antd/lib/table';
|
||||
import React, { useMemo } from 'react';
|
||||
import { CrudContext } from '../../../../components/crud/useCrud';
|
||||
import { PageTableContext } from '../../../../components/crud/usePageTable';
|
||||
import { QualityManageTab2 } from '../../../../service/def';
|
||||
import { renYYYYMMDD } from '../../../../utils/renutil';
|
||||
|
||||
type IProps = {
|
||||
pagerCtx: PageTableContext<QualityManageTab2>;
|
||||
crudCtx: CrudContext
|
||||
}
|
||||
|
||||
const DataTable: React.FC<IProps> = ({ pagerCtx, crudCtx }) => {
|
||||
|
||||
const columns = useMemo<ColumnsType<QualityManageTab2>>(() => [
|
||||
|
||||
{ title: '单位工程名称', key: 'dwgcName', dataIndex: 'dwgcName' },
|
||||
{ title: '分部工程', key: 'fbgcName', dataIndex: 'fbgcName' },
|
||||
{ title: '施工单位', key: 'sgdw', dataIndex: 'sgdw' },
|
||||
{ title: '工程类型', key: 'gclx', dataIndex: 'gclx' },
|
||||
{ title: '评定日期', key: 'pdrq', dataIndex: 'pdrq' },
|
||||
{
|
||||
title: '操作', key: '_', render: rec => (
|
||||
<Space>
|
||||
<Button icon={<EditOutlined />} type="link" />
|
||||
<Button icon={<DeleteOutlined />} type="link" danger />
|
||||
</Space>
|
||||
)
|
||||
}
|
||||
], []);
|
||||
|
||||
return (
|
||||
|
||||
<Table rowKey="id" columns={columns} {...pagerCtx.tableProps} />
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
export default DataTable
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
import { PlusOutlined, ProfileOutlined, SearchOutlined } from '@ant-design/icons';
|
||||
import {Button, Card, Col, DatePicker, Input, Menu, Row, Select, Space, Tree} from 'antd';
|
||||
import React, { useState } from 'react';
|
||||
import CancelCrud from '../../../../components/crud/CancelCrud';
|
||||
import useCrud from '../../../../components/crud/useCrud';
|
||||
import usePageTable from '../../../../components/crud/usePageTable';
|
||||
import {QualityManageTab2, PageResult, SearchOption, Role} from '../../../../service/def';
|
||||
import { demoDate } from '../../../../utils/utils';
|
||||
import DataForm from './DataForm';
|
||||
import DataTable from './DataTable';
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
async function demofind(): Promise<PageResult<QualityManageTab2>> {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
dwgcName: "单位工程一",
|
||||
fbgcName: '/',
|
||||
sgdw: '建筑公司',
|
||||
gclx: '枢纽工程',
|
||||
pdrq:'2月1号',
|
||||
},
|
||||
{
|
||||
dwgcName: "单位工程一",
|
||||
fbgcName: '/',
|
||||
sgdw: '建筑公司',
|
||||
gclx: '堤防工程',
|
||||
pdrq:'2月10号',
|
||||
},
|
||||
{
|
||||
dwgcName: "单位工程一",
|
||||
fbgcName: '/',
|
||||
sgdw: '建筑公司',
|
||||
gclx: '引水(渠道)工程',
|
||||
pdrq:'2月10号',
|
||||
},
|
||||
{
|
||||
dwgcName: "单位工程一",
|
||||
fbgcName: '分部工程1',
|
||||
sgdw: '建筑公司',
|
||||
gclx: '其他工程',
|
||||
pdrq:'2月10号',
|
||||
}
|
||||
],
|
||||
totalRow: 4
|
||||
};
|
||||
}
|
||||
|
||||
const DesignPackagePage: React.FC = () => {
|
||||
|
||||
const crud = useCrud();
|
||||
|
||||
const pager = usePageTable<QualityManageTab2>(demofind);
|
||||
|
||||
return (
|
||||
<div className="content-root">
|
||||
{
|
||||
crud.mode === 'new' ? (
|
||||
<Card key="new" title="新增招标信息" extra={<CancelCrud crudCtx={crud} confirm />} >
|
||||
<DataForm crudCtx={crud} />
|
||||
</Card>
|
||||
) : null
|
||||
}
|
||||
{
|
||||
!crud.mode ? (
|
||||
<>
|
||||
<Card>
|
||||
<Space size="large" wrap>
|
||||
<Space>
|
||||
单位工程:
|
||||
<Select defaultValue="单位工程一" style={{ width: 288 }}>
|
||||
<Option value="单位工程一">单位工程一</Option>
|
||||
</Select>
|
||||
</Space>
|
||||
<Space>施工时间:<DatePicker.RangePicker /></Space>
|
||||
<Space>
|
||||
<Button icon={<SearchOutlined />} type="primary">查询</Button>
|
||||
<Button icon={<PlusOutlined />} >新增</Button>
|
||||
</Space>
|
||||
</Space>
|
||||
</Card>
|
||||
<div className="card-h-margin" />
|
||||
<DataTable crudCtx={crud} pagerCtx={pager} />
|
||||
</>
|
||||
) : null
|
||||
}
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default DesignPackagePage
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
import ProForm, { ProFormDatePicker, ProFormDigit, ProFormRadio, ProFormSelect, ProFormText } from '@ant-design/pro-form'
|
||||
import { Typography } from 'antd'
|
||||
import React from 'react'
|
||||
import CenterForm from '../../../../components/crud/CenterForm'
|
||||
import { DEF_INPUT_LEN } from '../../../../components/crud/FormLayoutProps'
|
||||
import { CrudContext } from '../../../../components/crud/useCrud'
|
||||
|
||||
const DataForm: React.FC<{
|
||||
crudCtx: CrudContext
|
||||
}> = ({ crudCtx }) => {
|
||||
const record = crudCtx.record || {};
|
||||
return (
|
||||
<CenterForm>
|
||||
<ProForm initialValues={record}>
|
||||
<Typography.Title level={5} type="secondary">基本信息</Typography.Title>
|
||||
<ProFormSelect name="proj" width={DEF_INPUT_LEN} label="项目" disabled={record.proj} rules={[{ required: true }]} />
|
||||
<ProFormSelect name="descontract" width={DEF_INPUT_LEN} label="设计合同" />
|
||||
<ProForm.Group>
|
||||
<ProFormText name="code" label="编码" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
<ProFormText name="name" label="名称" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
</ProForm.Group>
|
||||
<ProFormDigit name="imgnum" label="图纸张数" width="sm" rules={[{ required: true }]} />
|
||||
<ProFormRadio.Group name="status" label="状态" radioType="button" rules={[{ required: true }]} options={['设计', '评审', '完成']} />
|
||||
|
||||
<ProFormRadio.Group name="evalmethod" label="评审方式" radioType="button" rules={[{ required: true }]} options={['在线评审', '线下评审']} />
|
||||
<ProForm.Group>
|
||||
<ProFormDatePicker name="evaltm" label="计划评审时间" width="sm" rules={[{ required: true }]} />
|
||||
<ProFormDatePicker name="evaldonetm" label="实际评审时间" width="sm" />
|
||||
</ProForm.Group>
|
||||
<ProForm.Group>
|
||||
<ProFormDatePicker name="pubtm" label="计划发布时间" width="sm" rules={[{ required: true }]} />
|
||||
<ProFormDatePicker name="pubdonetm" label="实际发布时间" width="sm" />
|
||||
</ProForm.Group>
|
||||
|
||||
|
||||
<Typography.Title level={5} type="secondary">其他信息</Typography.Title>
|
||||
|
||||
<ProFormText name="desorg" label="设计单位" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
<ProFormText name="despersonel" label="设计人" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
<ProFormSelect name="desorg" label="施工合同" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
|
||||
</ProForm>
|
||||
</CenterForm>
|
||||
)
|
||||
}
|
||||
|
||||
export default DataForm;
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
import { DeleteOutlined, EditOutlined } from '@ant-design/icons';
|
||||
import { Button, Space, Table } from 'antd';
|
||||
import { ColumnsType } from 'antd/lib/table';
|
||||
import React, { useMemo } from 'react';
|
||||
import { CrudContext } from '../../../../components/crud/useCrud';
|
||||
import { PageTableContext } from '../../../../components/crud/usePageTable';
|
||||
import { QualityManageTab3 } from '../../../../service/def';
|
||||
import { renYYYYMMDD } from '../../../../utils/renutil';
|
||||
|
||||
type IProps = {
|
||||
pagerCtx: PageTableContext<QualityManageTab3>;
|
||||
crudCtx: CrudContext
|
||||
}
|
||||
|
||||
const DataTable: React.FC<IProps> = ({ pagerCtx, crudCtx }) => {
|
||||
|
||||
const columns = useMemo<ColumnsType<QualityManageTab3>>(() => [
|
||||
|
||||
{ title: '缺陷所在单位工程', key: 'qxszdwgc', dataIndex: 'qxszdwgc' },
|
||||
{ title: '缺陷部位', key: 'qxbw', dataIndex: 'qxbw' },
|
||||
{ title: '缺陷类别', key: 'qxlb', dataIndex: 'qxlb' },
|
||||
{ title: '施工单位', key: 'sgdw', dataIndex: 'sgdw' },
|
||||
{ title: '填写日期', key: 'txrq', dataIndex: 'txrq' },
|
||||
{
|
||||
title: '操作', key: '_', render: rec => (
|
||||
<Space>
|
||||
<Button icon={<EditOutlined />} type="link" />
|
||||
<Button icon={<DeleteOutlined />} type="link" danger />
|
||||
</Space>
|
||||
)
|
||||
}
|
||||
], []);
|
||||
|
||||
return (
|
||||
|
||||
<Table rowKey="id" columns={columns} {...pagerCtx.tableProps} />
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
export default DataTable
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
import { PlusOutlined, ProfileOutlined, SearchOutlined } from '@ant-design/icons';
|
||||
import {Button, Card, Col, DatePicker, Input, Menu, Row, Select, Space, Tree} from 'antd';
|
||||
import React, { useState } from 'react';
|
||||
import CancelCrud from '../../../../components/crud/CancelCrud';
|
||||
import useCrud from '../../../../components/crud/useCrud';
|
||||
import usePageTable from '../../../../components/crud/usePageTable';
|
||||
import {QualityManageTab2, PageResult, SearchOption, Role, QualityManageTab3} from '../../../../service/def';
|
||||
import { demoDate } from '../../../../utils/utils';
|
||||
import DataForm from './DataForm';
|
||||
import DataTable from './DataTable';
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
async function demofind(): Promise<PageResult<QualityManageTab3>> {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
qxszdwgc: "单位工程一",
|
||||
qxbw: '分部工程1',
|
||||
qxlb: '',
|
||||
sgdw: '建筑公司',
|
||||
txrq:'2月1号',
|
||||
},
|
||||
{
|
||||
qxszdwgc: "单位工程一",
|
||||
qxbw: '分部工程1',
|
||||
qxlb: '',
|
||||
sgdw: '建筑公司',
|
||||
txrq:'2月10号',
|
||||
},
|
||||
{
|
||||
qxszdwgc: "单位工程一",
|
||||
qxbw: '分部工程1',
|
||||
qxlb: '',
|
||||
sgdw: '建筑公司',
|
||||
txrq:'2月10号',
|
||||
},
|
||||
{
|
||||
qxszdwgc: "单位工程一",
|
||||
qxbw: '分部工程1',
|
||||
qxlb: '',
|
||||
sgdw: '建筑公司',
|
||||
txrq:'2月10号',
|
||||
},
|
||||
],
|
||||
totalRow: 4
|
||||
};
|
||||
}
|
||||
|
||||
const DesignPackagePage: React.FC = () => {
|
||||
|
||||
const crud = useCrud();
|
||||
|
||||
const pager = usePageTable<QualityManageTab3>(demofind);
|
||||
|
||||
return (
|
||||
<div className="content-root">
|
||||
{
|
||||
crud.mode === 'new' ? (
|
||||
<Card key="new" title="新增招标信息" extra={<CancelCrud crudCtx={crud} confirm />} >
|
||||
<DataForm crudCtx={crud} />
|
||||
</Card>
|
||||
) : null
|
||||
}
|
||||
{
|
||||
!crud.mode ? (
|
||||
<>
|
||||
<Card>
|
||||
<Space size="large" wrap>
|
||||
<Space>
|
||||
单位工程:
|
||||
<Select defaultValue="单位工程一" style={{ width: 288 }}>
|
||||
<Option value="单位工程一">单位工程一</Option>
|
||||
</Select>
|
||||
</Space>
|
||||
<Space>填写时间:<DatePicker.RangePicker /></Space>
|
||||
<Space>
|
||||
<Button icon={<SearchOutlined />} type="primary">查询</Button>
|
||||
<Button icon={<PlusOutlined />} >新增</Button>
|
||||
</Space>
|
||||
</Space>
|
||||
</Card>
|
||||
<div className="card-h-margin" />
|
||||
<DataTable crudCtx={crud} pagerCtx={pager} />
|
||||
</>
|
||||
) : null
|
||||
}
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default DesignPackagePage
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
import {Tree, Card, Space, Input, DatePicker, Button, Select} from 'antd'
|
||||
import React, { useState } from 'react'
|
||||
import {CrudContext} from "../../../components/crud/useCrud";
|
||||
|
||||
type IProps = {
|
||||
crudCtx: CrudContext;
|
||||
value?: string[];
|
||||
onChange?: (value: string[]) => void;
|
||||
};
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
const treeData = [
|
||||
{
|
||||
title: '新疆XX水库土建工程项目', key: '新疆XX水库土建工程项目', children: [
|
||||
{ title: '单位工程一', key: '新疆XX水库土建工程项目-单位工程一', children:[
|
||||
{ title: '分布工程1', key: '新疆XX水库土建工程项目-单位工程一-分布工程1', children:[
|
||||
{ title: '单元工程1', key: '新疆XX水库土建工程项目-单位工程一-分布工程1-单元工程1'},
|
||||
{ title: '单元工程2', key: '新疆XX水库土建工程项目-单位工程一-分布工程1-单元工程2'},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const ConstructionUnit: React.FC<IProps> = ({ crudCtx, value, onChange }) => {
|
||||
const [expandedKeys, setExpandedKeys] = useState<React.Key[]>(['新疆XX水库土建工程项目','新疆XX水库土建工程项目-单位工程一','新疆XX水库土建工程项目-单位工程一-分布工程1']);
|
||||
const [checkedKeys, setCheckedKeys] = useState<React.Key[] | { checked: React.Key[]; halfChecked: React.Key[]; }>([]);
|
||||
const [selectedKeys, setSelectedKeys] = useState<React.Key[]>([]);
|
||||
const [autoExpandParent, setAutoExpandParent] = useState<boolean>(true);
|
||||
|
||||
const onExpand = (expandedKeysValue: React.Key[]) => {
|
||||
console.log('onExpand', expandedKeysValue);
|
||||
// if not set autoExpandParent to false, if children expanded, parent can not collapse.
|
||||
// or, you can remove all expanded children keys.
|
||||
setExpandedKeys(expandedKeysValue);
|
||||
setAutoExpandParent(false);
|
||||
};
|
||||
|
||||
const onCheck = (checked: React.Key[] | { checked: React.Key[]; halfChecked: React.Key[]; }, info: any) => {
|
||||
console.log('onCheck', checked);
|
||||
setCheckedKeys(checked);
|
||||
};
|
||||
|
||||
const onSelect = (selectedKeysValue: React.Key[], info: any) => {
|
||||
console.log('onSelect', info);
|
||||
setSelectedKeys(selectedKeysValue);
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{width:"100%",background:"#fff"}}>
|
||||
<div style={{width:"500px",margin:"0 0 0 30px",}}>
|
||||
<Space size="large" wrap>
|
||||
<Space>
|
||||
{crudCtx.mode==="glSgdw"?"施工单位:":"监理单位"}
|
||||
<Select defaultValue="水电建XX局" style={{ width: 432 }}>
|
||||
<Option value="水电建XX局">水电建XX局</Option>
|
||||
<Option value="施工单位">施工单位</Option>
|
||||
<Option value="施工单位1">施工单位1</Option>
|
||||
</Select>
|
||||
</Space>
|
||||
</Space>
|
||||
<div className="card-h-margin" />
|
||||
<Card>
|
||||
<Tree
|
||||
checkable
|
||||
onExpand={onExpand}
|
||||
expandedKeys={expandedKeys}
|
||||
autoExpandParent={autoExpandParent}
|
||||
onCheck={onCheck}
|
||||
checkedKeys={checkedKeys}
|
||||
onSelect={onSelect}
|
||||
selectedKeys={selectedKeys}
|
||||
treeData={treeData}
|
||||
/>
|
||||
</Card>
|
||||
<div className="card-h-margin" />
|
||||
<div style={{textAlign:"center"}}>
|
||||
<Button type="primary">保存</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ConstructionUnit
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
import ProForm, {ProFormSelect, ProFormText, ProFormTextArea} from '@ant-design/pro-form'
|
||||
import React, {useState} from 'react'
|
||||
import { DEF_INPUT_LEN } from '../../../components/crud/FormLayoutProps'
|
||||
import { CrudContext } from '../../../components/crud/useCrud'
|
||||
import { Radio, DatePicker, InputNumber } from 'antd';
|
||||
import moment from 'moment'
|
||||
import GlgclTable from './GlgclTable';
|
||||
|
||||
type IProps = {
|
||||
crudCtx: CrudContext;
|
||||
};
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
|
||||
const DataForm: React.FC<IProps> = ({ crudCtx }) => {
|
||||
|
||||
let record = crudCtx.record || {};
|
||||
|
||||
let initVal = {
|
||||
_proName: record.proName,
|
||||
_lastLevel: record.addType!=="单位工程"?record.name:"",
|
||||
_level: record.addType,
|
||||
};
|
||||
const [viewMode, setViewmode] = React.useState(1);
|
||||
const VIEWWMODEOPTIONS1 = [
|
||||
{ label: '主要单位工程', value: 1 },
|
||||
{ label: '一般单位工程', value: 2 },
|
||||
];
|
||||
const VIEWWMODEOPTIONS2 = [
|
||||
{ label: '主要分部工程', value: 1 },
|
||||
{ label: '一般分部工程', value: 2 },
|
||||
];
|
||||
const VIEWWMODEOPTIONS3 = [
|
||||
{ label: '重要隐蔽单元工程', value: 1 },
|
||||
{ label: '关键部位单元工程', value: 2 },
|
||||
{ label: '一般单元工程', value: 3 },
|
||||
];
|
||||
|
||||
const dateFormat = 'YYYY/MM/DD';
|
||||
|
||||
return (
|
||||
<div style={{ display: 'flex', justifyContent: 'center' }}>
|
||||
<ProForm initialValues={initVal}>
|
||||
{
|
||||
initVal._proName ? (<ProFormText name="_proName" label="项目名称" width={610} disabled />) : null
|
||||
}
|
||||
{
|
||||
initVal._lastLevel ? (<ProFormText name="_lastLevel" label="上一级别" width={610} disabled />) : null
|
||||
}
|
||||
<ProForm.Group>
|
||||
{
|
||||
initVal._level ? (<ProFormText name="_level" label="添加级别" width={288} disabled />) : null
|
||||
}
|
||||
<ProFormText name="name" label="名称" width={288} rules={[{ required: true }]} />
|
||||
</ProForm.Group>
|
||||
|
||||
{
|
||||
initVal._level !== "工序工程"?(
|
||||
<ProFormText name="importantLevel" label="重要级别" width={DEF_INPUT_LEN} rules={[{ required: true }]} >
|
||||
{
|
||||
initVal._level === "单位工程" ?
|
||||
(<Radio.Group options={VIEWWMODEOPTIONS1} onChange={(e) => setViewmode(e.target.value)} value={viewMode} />) :
|
||||
initVal._level === "分部工程" ?
|
||||
(<Radio.Group options={VIEWWMODEOPTIONS2} onChange={(e) => setViewmode(e.target.value)} value={viewMode} />) :
|
||||
initVal._level === "单元工程" ?
|
||||
(<Radio.Group options={VIEWWMODEOPTIONS3} onChange={(e) => setViewmode(e.target.value)} value={viewMode} />) :
|
||||
null
|
||||
}
|
||||
</ProFormText>
|
||||
):null
|
||||
}
|
||||
|
||||
<ProForm.Group>
|
||||
<ProFormText name="plannedProjectDuration" label="计划工期" width={288} rules={[{ required: true }]} >
|
||||
<RangePicker defaultValue={[moment('2021/01/01', dateFormat), moment('2021/12/01', dateFormat)]}
|
||||
format={dateFormat}/>
|
||||
</ProFormText>
|
||||
<ProFormText name="actualConstructionTime" label="实际工期" width={288} rules={[{ required: true }]} >
|
||||
<RangePicker />
|
||||
</ProFormText>
|
||||
</ProForm.Group>
|
||||
|
||||
<ProFormText name="order" label="显示顺序" rules={[{ required: true }]} >
|
||||
<InputNumber min={1} max={10} style={{ width: '100%' }} onChange={(e) => console.log(e)} />
|
||||
</ProFormText>
|
||||
|
||||
{
|
||||
initVal._level !== "单位工程"&&initVal._level !== "分部工程"?(
|
||||
<ProForm.Group>
|
||||
<ProFormSelect name="type" label="关联施工单位" width={288} rules={[{ required: true }]} options={['建筑公司']} />
|
||||
<ProFormSelect name="type" label="关联监理单位" width={288} rules={[{ required: true }]} options={['XX公司']} />
|
||||
</ProForm.Group>
|
||||
):null
|
||||
}
|
||||
{
|
||||
initVal._level !== "单位工程"&&initVal._level !== "分部工程"?(
|
||||
<ProForm.Group>
|
||||
<ProFormSelect name="type" label="质量评定表" width={610} rules={[{ required: true }]} options={['场地清理单元工程质量评定表']} />
|
||||
</ProForm.Group>
|
||||
):null
|
||||
}
|
||||
<div className="card-h-margin" />
|
||||
{
|
||||
initVal._level !== "单位工程"&&initVal._level !== "分部工程"?(
|
||||
<GlgclTable />
|
||||
):null
|
||||
}
|
||||
<div className="card-h-margin" />
|
||||
<ProFormTextArea name="remark" label="内容描述" width={610} />
|
||||
</ProForm>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default DataForm;
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
import { DeleteOutlined, EditOutlined, PlusOutlined,InfoCircleOutlined,SearchOutlined } from '@ant-design/icons';
|
||||
import {Button, Card, DatePicker, Input, Modal, Space, Table} from 'antd';
|
||||
import { ColumnsType } from 'antd/lib/table';
|
||||
import React, {useMemo, useState} from 'react';
|
||||
import OpButton from '../../../components/crud/OpButton';
|
||||
import useCrud, {CrudContext} from '../../../components/crud/useCrud';
|
||||
import {BidLog, Glgcl} from '../../../service/def';
|
||||
import useRequest from '../../../utils/useRequest';
|
||||
import {PageTableContext} from "../../../components/crud/usePageTable";
|
||||
import DataForm from './DataForm';
|
||||
|
||||
async function demodata(): Promise<Glgcl[]> {
|
||||
return [];
|
||||
}
|
||||
|
||||
const WbsList = () => {
|
||||
const crud = useCrud();
|
||||
|
||||
const { data, loading } = useRequest(demodata);
|
||||
|
||||
const columns = useMemo<ColumnsType<Glgcl>>(() => ([
|
||||
{ title: '工程量清单', key: 'gclqd', width: 140, },
|
||||
{ title: '工程量', key: 'gcl', dataIndex: 'importantLevel', width: 100 },
|
||||
{ title: '单位', key: 'unit', dataIndex: 'createTime', align: 'center', width: 100 },
|
||||
{
|
||||
title: '操作', key: 'op', align: 'center', width: 100,
|
||||
},
|
||||
]), []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Space size="large" wrap>
|
||||
<Space>关联工程量</Space>
|
||||
<Space>
|
||||
<Button icon={<PlusOutlined />} type="primary">新增清单</Button>
|
||||
</Space>
|
||||
</Space>
|
||||
<div className="card-h-margin" />
|
||||
<Table
|
||||
rowKey="code"
|
||||
dataSource={data}
|
||||
loading={loading}
|
||||
size="small"
|
||||
bordered
|
||||
pagination={false}
|
||||
columns={columns}
|
||||
defaultExpandAllRows={true}
|
||||
/>
|
||||
{
|
||||
crud.mode ? (
|
||||
<Modal
|
||||
visible
|
||||
footer={null}
|
||||
title={crud.mode === '0' ? '添加单位工程' : crud.mode === '1' ? '添加分部工程' : crud.mode === '2' ? '添加单元工程' : '添加工序工程'}
|
||||
onCancel={() => crud.goto(null, null)}
|
||||
width={1000}
|
||||
>
|
||||
<DataForm crudCtx={crud} />
|
||||
</Modal>
|
||||
) : null
|
||||
}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default WbsList
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
import { DeleteOutlined, EditOutlined, PlusOutlined,InfoCircleOutlined,SearchOutlined,SettingOutlined } from '@ant-design/icons';
|
||||
import {Button, Card, DatePicker, Input, Modal, Popconfirm, Space, Table} from 'antd';
|
||||
import { ColumnsType } from 'antd/lib/table';
|
||||
import React, {useMemo, useState} from 'react';
|
||||
import OpButton from '../../../components/crud/OpButton';
|
||||
import useCrud, {CrudContext} from '../../../components/crud/useCrud';
|
||||
import {BidLog, Wbs} from '../../../service/def';
|
||||
import useRequest from '../../../utils/useRequest';
|
||||
import {PageTableContext} from "../../../components/crud/usePageTable";
|
||||
import DataForm from './DataForm';
|
||||
import ConstructionUnit from './ConstructionUnitList';
|
||||
|
||||
async function demodata(): Promise<Wbs[]> {
|
||||
return [
|
||||
{
|
||||
name: '新疆XX水库土建工程项目', proName: "新疆XX水库土建工程项目", code: '1', createTime: '2021-01-01 10:00:00', creater: '张三', addType:"单位工程",children: [
|
||||
{ name: '单位工程一', proName: "新疆XX水库土建工程项目", code: '01', importantLevel: '主要单位工程', createTime: '2021-01-01 10:00:00', creater: '张三', addType:"分部工程",children: [
|
||||
{ name: '分布工程1', proName: "新疆XX水库土建工程项目", code: '001', importantLevel: '主要分布工程', createTime: '2021-01-01 10:00:00', creater: '张三', addType:"单元工程",children: [
|
||||
{ name: '单元工程1', proName: "新疆XX水库土建工程项目", code: '002', importantLevel: '重要隐蔽单元工程,关键部位单元工程', createTime: '2021-01-01 10:00:00', creater: '张三', addType:"工序工程",}
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{ name: '单位工程二', proName: "新疆XX水库土建工程项目", code: '02', importantLevel: '主要单位工程', createTime: '2021-01-01 10:00:00', creater: '张三', addType:"分部工程",children: [
|
||||
{ name: '分布工程1', proName: "新疆XX水库土建工程项目", code: '021', importantLevel: '主要分布工程', createTime: '2021-01-01 10:00:00', creater: '张三', addType:"单元工程"},
|
||||
{ name: '分布工程2', proName: "新疆XX水库土建工程项目", code: '022', importantLevel: '主要分布工程', createTime: '2021-01-01 10:00:00', creater: '张三', addType:"单元工程"},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '新疆XX水库土建工程项目2', proName: "新疆XX水库土建工程项目2", code: '2', createTime: '2021-02-01 09:30:00', creater: '李四', addType:"单位工程",children: [
|
||||
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
const WbsList = () => {
|
||||
const crud = useCrud();
|
||||
|
||||
const [selectedProj, setSelectedProj] = useState<object | undefined>();
|
||||
|
||||
const { data, loading } = useRequest(demodata);
|
||||
|
||||
const columns = useMemo<ColumnsType<Wbs>>(() => ([
|
||||
{
|
||||
title: '名称', key: 'name', width: 240, render: rec => (
|
||||
<Space>
|
||||
{`${rec.name}`}
|
||||
{/*<OpButton icon={<PlusOutlined />} onClick={() => crud.goto('new', rec)} />*/}
|
||||
</Space>
|
||||
)
|
||||
},
|
||||
{ title: '重要级别', key: 'importantLevel', dataIndex: 'importantLevel', width: 400 },
|
||||
{ title: '创建时间', key: 'createTime', dataIndex: 'createTime', align: 'center', width: 200 },
|
||||
{ title: '创建人', key: 'creater', dataIndex: 'creater', align: 'center', width: 100 },
|
||||
{
|
||||
title: '操作', key: 'op', align: 'center', width: 400, render: rec => (
|
||||
<Space>
|
||||
<Button size='small' type="text">查看</Button>
|
||||
{
|
||||
rec.addType === '单位工程' ? (
|
||||
<Button type="link" size='small' onClick={() => crud.goto('0', rec)}>添加单位工程</Button>
|
||||
) : null
|
||||
}
|
||||
{
|
||||
rec.addType === '分部工程' ? (
|
||||
<Button type="link" size='small' onClick={() => crud.goto('1', rec)}>添加分部工程</Button>
|
||||
) : null
|
||||
}
|
||||
{
|
||||
rec.addType === '单元工程' ? (
|
||||
<Button type="link" size='small' onClick={() => crud.goto('2', rec)}>添加单元工程</Button>
|
||||
) : null
|
||||
}
|
||||
{
|
||||
rec.addType === '工序工程' ? (
|
||||
<Button type="link" size='small' onClick={() => crud.goto('3', rec)}>添加工序工程</Button>
|
||||
) : null
|
||||
}
|
||||
<Button size='small' type="link" danger>删除</Button>
|
||||
</Space>
|
||||
)
|
||||
},
|
||||
]), []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card>
|
||||
<Space size="large" wrap>
|
||||
<Space>名称:<Input /></Space>
|
||||
<Space>创建人:<Input /></Space>
|
||||
<Space>创建时间:<DatePicker.RangePicker /></Space>
|
||||
<Space>
|
||||
<Button icon={<SearchOutlined />} type="primary">查询</Button>
|
||||
{
|
||||
selectedProj?(
|
||||
<Button icon={<SettingOutlined />} onClick={() => crud.goto('glSgdw', {})}>施工单位关联项目工序设置</Button>
|
||||
):<Popconfirm title="请先选择需要关联的项目" >
|
||||
<Button icon={<SettingOutlined />} >施工单位关联项目工序设置</Button>
|
||||
</Popconfirm>
|
||||
}
|
||||
{
|
||||
selectedProj?(
|
||||
<Button icon={<SettingOutlined />} onClick={() => crud.goto('glJldw', {})}>监理单位关联项目工序设置</Button>
|
||||
):<Popconfirm title="请先选择需要关联的项目" >
|
||||
<Button icon={<SettingOutlined />} >监理单位关联项目工序设置</Button>
|
||||
</Popconfirm>
|
||||
}
|
||||
</Space>
|
||||
</Space>
|
||||
</Card>
|
||||
<div className="card-h-margin" />
|
||||
<Card>
|
||||
{
|
||||
data && data.length?<Table
|
||||
rowKey="code"
|
||||
dataSource={data}
|
||||
loading={loading}
|
||||
size="small"
|
||||
bordered
|
||||
pagination={false}
|
||||
columns={columns}
|
||||
defaultExpandAllRows={true}
|
||||
rowSelection={{
|
||||
type: 'radio',
|
||||
onSelect: (r) => {
|
||||
setSelectedProj(r);
|
||||
}
|
||||
}}
|
||||
/>: '暂无数据'
|
||||
}
|
||||
</Card>
|
||||
{
|
||||
crud.mode ? (
|
||||
<Modal
|
||||
visible
|
||||
footer={null}
|
||||
title={
|
||||
crud.mode === '0' ? '添加单位工程' :
|
||||
crud.mode === '1' ? '添加分部工程' :
|
||||
crud.mode === '2' ? '添加单元工程' :
|
||||
crud.mode === '3' ? '添加工序工程' :
|
||||
crud.mode === 'glSgdw' ? '施工单位关联项目工序设置' :
|
||||
crud.mode === 'glJldw' ? '监理单位关联项目工序设置' :''
|
||||
}
|
||||
onCancel={() => crud.goto(null, null)}
|
||||
width={crud.mode === 'glSgdw' || crud.mode === 'glJldw' ?610:1000}
|
||||
>
|
||||
{
|
||||
crud.mode === 'glSgdw' || crud.mode === 'glJldw' ?(<ConstructionUnit crudCtx={crud}/>):(<DataForm crudCtx={crud} />)
|
||||
}
|
||||
</Modal>
|
||||
) : null
|
||||
}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default WbsList
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import React from 'react';
|
||||
import WbsList from './WbsList';
|
||||
|
||||
const WbsListPage = () => {
|
||||
return (
|
||||
<div className="content-root">
|
||||
<WbsList />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default WbsListPage
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
import ProForm, { ProFormCheckbox, ProFormText } from '@ant-design/pro-form'
|
||||
import {Col, Form, Row, Tree, InputNumber, Select, Space} from 'antd'
|
||||
import Checkbox from 'antd/lib/checkbox/Checkbox'
|
||||
import React, { useState } from 'react'
|
||||
import CenterForm from '../../../components/crud/CenterForm'
|
||||
import { DEF_INPUT_LEN } from '../../../components/crud/FormLayoutProps'
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
const DataForm: React.FC = () => {
|
||||
|
||||
return (
|
||||
<CenterForm>
|
||||
<ProForm>
|
||||
<ProFormText name="zdmc" label="字典名称" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
<ProFormText name="zdlx" label="字典类型" width={DEF_INPUT_LEN} >
|
||||
<Select>
|
||||
<Option value="工程质量事故分类">工程质量事故分类</Option>
|
||||
<Option value="工程项目划分">工程项目划分</Option>
|
||||
<Option value="工程工序重要等级">工程工序重要等级</Option>
|
||||
</Select>
|
||||
</ProFormText>
|
||||
<ProFormText name="zdz" label="字典值" width={DEF_INPUT_LEN}>
|
||||
<InputNumber min={1} max={10} style={{ width: '100%' }} onChange={(e) => console.log(e)} />
|
||||
</ProFormText>
|
||||
</ProForm>
|
||||
</CenterForm>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
export default DataForm;
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
import { DeleteOutlined, PlusOutlined, EditOutlined, SearchOutlined } from '@ant-design/icons';
|
||||
import { Button, Card, Input, Select, Space, Table } from 'antd';
|
||||
import { ColumnsType } from 'antd/lib/table';
|
||||
import React, { useMemo } from 'react';
|
||||
import { CrudContext } from '../../../components/crud/useCrud';
|
||||
import { PageTableContext } from '../../../components/crud/usePageTable';
|
||||
import { DataDictionary } from '../../../service/def';
|
||||
const { Option } = Select;
|
||||
type IProps = {
|
||||
pagerCtx: PageTableContext<DataDictionary>;
|
||||
crudCtx: CrudContext
|
||||
}
|
||||
|
||||
const DataTable: React.FC<IProps> = ({ pagerCtx, crudCtx }) => {
|
||||
|
||||
const columns = useMemo<ColumnsType<DataDictionary>>(() => [
|
||||
{ title: '字典类型', key: 'zdlx', dataIndex: 'zdlx' },
|
||||
{ title: '字典值', key: 'zdz', dataIndex: 'zdz' },
|
||||
{ title: '字典名称', key: 'zdmc', dataIndex: 'zdmc' },
|
||||
{
|
||||
title: '操作', key: '_', render: rec => (
|
||||
<Space>
|
||||
<Button icon={<EditOutlined />} type="link" />
|
||||
<Button icon={<DeleteOutlined />} type="link" danger />
|
||||
</Space>
|
||||
)
|
||||
}
|
||||
], []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card>
|
||||
<Space size="large" wrap>
|
||||
<Space>
|
||||
字典类型
|
||||
<Select style={{ width: 288 }}>
|
||||
<Option value="工程质量事故分类">工程质量事故分类</Option>
|
||||
<Option value="工程项目划分">工程项目划分</Option>
|
||||
<Option value="工程工序重要等级">工程工序重要等级</Option>
|
||||
</Select>
|
||||
</Space>
|
||||
<Space>
|
||||
<Button icon={<SearchOutlined />} type="primary">查询</Button>
|
||||
<Button icon={<PlusOutlined />} onClick={() => crudCtx.goto('new', {})}>新建</Button>
|
||||
</Space>
|
||||
</Space>
|
||||
</Card>
|
||||
<div className="card-h-margin" />
|
||||
<Card>
|
||||
<Table rowKey="name" columns={columns} {...pagerCtx.tableProps} />
|
||||
</Card>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default DataTable
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
import { Card } from 'antd';
|
||||
import React from 'react';
|
||||
import CancelCrud from '../../../components/crud/CancelCrud';
|
||||
import useCrud from '../../../components/crud/useCrud';
|
||||
import usePageTable from '../../../components/crud/usePageTable';
|
||||
import { PageResult, DataDictionary } from '../../../service/def';
|
||||
import { demoDate } from '../../../utils/utils';
|
||||
import DataForm from './DataForm';
|
||||
import DataTable from './DataTable';
|
||||
|
||||
async function demofind(): Promise<PageResult<DataDictionary>> {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
zdlx: '工程质量事故分类',
|
||||
zdz: '1',
|
||||
zdmc: '重大事故',
|
||||
},
|
||||
{
|
||||
zdlx: '工程项目划分',
|
||||
zdz: '1',
|
||||
zdmc: '单位工程',
|
||||
},
|
||||
{
|
||||
zdlx: '工程工序重要等级',
|
||||
zdz: '1',
|
||||
zdmc: '主要单位工程',
|
||||
},
|
||||
],
|
||||
totalRow: 3
|
||||
};
|
||||
}
|
||||
|
||||
const DataDictionaryPage: React.FC = () => {
|
||||
|
||||
const crud = useCrud();
|
||||
|
||||
const pager = usePageTable<DataDictionary>(demofind);
|
||||
|
||||
return (
|
||||
<div className="content-root">
|
||||
{
|
||||
crud.mode === 'new' ? (
|
||||
<Card key="new" title="新增" extra={<CancelCrud crudCtx={crud} confirm />} >
|
||||
<DataForm />
|
||||
</Card>
|
||||
) : null
|
||||
}
|
||||
{
|
||||
!crud.mode ? <DataTable crudCtx={crud} pagerCtx={pager} /> : null
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default DataDictionaryPage
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
import { DeleteOutlined, PlusOutlined, EditOutlined, SearchOutlined } from '@ant-design/icons';
|
||||
import { Button, Card, Input, Select, Space, Table, List,Skeleton } from 'antd';
|
||||
import { ColumnsType } from 'antd/lib/table';
|
||||
import React, { useMemo } from 'react';
|
||||
import { CrudContext } from '../../../components/crud/useCrud';
|
||||
import { PageTableContext } from '../../../components/crud/usePageTable';
|
||||
import { SystemLog } from '../../../service/def';
|
||||
const { Option } = Select;
|
||||
|
||||
type IProps = {
|
||||
pagerCtx: PageTableContext<SystemLog>;
|
||||
crudCtx: CrudContext
|
||||
}
|
||||
|
||||
const DataTable: React.FC<IProps> = ({ pagerCtx, crudCtx }) => {
|
||||
|
||||
const list = [
|
||||
{
|
||||
type:"消息类型1",
|
||||
description:"XX单元工程施工单位已填写自评表",
|
||||
isRead:false
|
||||
},
|
||||
{
|
||||
type:"消息类型2",
|
||||
description:"XX单元工程施工单位已填写自评表",
|
||||
isRead:false
|
||||
},
|
||||
{
|
||||
type:"消息类型3",
|
||||
description:"XX单元工程施工单位已填写自评表",
|
||||
isRead:true
|
||||
},
|
||||
{
|
||||
type:"消息类型3",
|
||||
description:"XX单元工程施工单位已填写自评表",
|
||||
isRead:true
|
||||
}
|
||||
]
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<div style={{width:"800px",margin:"0 0 0 30px"}}>
|
||||
<Space size="large" wrap>
|
||||
<Button type="primary">全部标记已读</Button>
|
||||
<Button>只显示未读消息</Button>
|
||||
</Space>
|
||||
<List style={{margin:"30px 0 0 0"}}
|
||||
className="demo-loadmore-list"
|
||||
itemLayout="horizontal"
|
||||
dataSource={list}
|
||||
renderItem={item => (
|
||||
<List.Item>
|
||||
<div style={{color:item.isRead?"#9F9B9B":"#333"}}>{item.type}</div>
|
||||
<div style={{color:item.isRead?"#9F9B9B":"#333"}}>{item.description}</div>
|
||||
<div style={{width:"196px",textAlign:"center"}}>
|
||||
{item.isRead?<Button>查看详情</Button>:[<Button>查看详情</Button>, <Button type="primary" style={{margin:"0 0 0 20px"}}>标记已读</Button>]}
|
||||
</div>
|
||||
</List.Item>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
|
||||
export default DataTable
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
import { Card } from 'antd';
|
||||
import React from 'react';
|
||||
import CancelCrud from '../../../components/crud/CancelCrud';
|
||||
import useCrud from '../../../components/crud/useCrud';
|
||||
import usePageTable from '../../../components/crud/usePageTable';
|
||||
import { PageResult, SystemLog } from '../../../service/def';
|
||||
import { demoDate } from '../../../utils/utils';
|
||||
import DataTable from './DataTable';
|
||||
|
||||
async function demofind(): Promise<PageResult<SystemLog>> {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
bm: 'XXXX',
|
||||
xglx: '新增',
|
||||
xgr: '张三',
|
||||
xsj: '{id:""}',
|
||||
jsj: '',
|
||||
xgsj: '',
|
||||
},
|
||||
{
|
||||
bm: 'XXXX',
|
||||
xglx: '修改',
|
||||
xgr: '张三',
|
||||
xsj: '{id:""}',
|
||||
jsj: '',
|
||||
xgsj: '',
|
||||
},
|
||||
{
|
||||
bm: 'XXXX',
|
||||
xglx: '删除',
|
||||
xgr: '张三',
|
||||
xsj: '{id:""}',
|
||||
jsj: '',
|
||||
xgsj: '',
|
||||
},
|
||||
],
|
||||
totalRow: 3
|
||||
};
|
||||
}
|
||||
|
||||
const SystemLogPage: React.FC = () => {
|
||||
|
||||
const crud = useCrud();
|
||||
|
||||
const pager = usePageTable<SystemLog>(demofind);
|
||||
|
||||
return (
|
||||
<div className="content-root">
|
||||
{
|
||||
!crud.mode ? <DataTable crudCtx={crud} pagerCtx={pager} /> : null
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default SystemLogPage
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
import ProForm, { ProFormCheckbox, ProFormText } from '@ant-design/pro-form'
|
||||
import {Col, Form, Row, Tree, InputNumber, Select, Space} from 'antd'
|
||||
import Checkbox from 'antd/lib/checkbox/Checkbox'
|
||||
import React, { useState } from 'react'
|
||||
import CenterForm from '../../../components/crud/CenterForm'
|
||||
import { DEF_INPUT_LEN } from '../../../components/crud/FormLayoutProps'
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
const DataForm: React.FC = () => {
|
||||
|
||||
return (
|
||||
<CenterForm>
|
||||
<ProForm>
|
||||
<ProFormText name="zdlx" label="标准类型" width={DEF_INPUT_LEN} rules={[{ required: true }]} >
|
||||
<Select>
|
||||
<Option value="枢纽工程外观质量标准">枢纽工程外观质量标准</Option>
|
||||
<Option value="堤防工程外观质量标准">堤防工程外观质量标准</Option>
|
||||
<Option value="引水(渠道)工程外观质量标准">引水(渠道)工程外观质量标准</Option>
|
||||
</Select>
|
||||
</ProFormText>
|
||||
<ProFormText name="xm" label="项目" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
<ProFormText name="jynr" label="检验内容" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
<ProFormText name="zlbz" label="质量标准" width={DEF_INPUT_LEN} rules={[{ required: true }]} />
|
||||
</ProForm>
|
||||
</CenterForm>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
export default DataForm;
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
import { DeleteOutlined, PlusOutlined, EditOutlined, SearchOutlined } from '@ant-design/icons';
|
||||
import { Button, Card, Input, Select, Space, Table } from 'antd';
|
||||
import { ColumnsType } from 'antd/lib/table';
|
||||
import React, { useMemo } from 'react';
|
||||
import { CrudContext } from '../../../components/crud/useCrud';
|
||||
import { PageTableContext } from '../../../components/crud/usePageTable';
|
||||
import { QualityStandard } from '../../../service/def';
|
||||
const { Option } = Select;
|
||||
type IProps = {
|
||||
pagerCtx: PageTableContext<QualityStandard>;
|
||||
crudCtx: CrudContext
|
||||
}
|
||||
|
||||
const DataTable: React.FC<IProps> = ({ pagerCtx, crudCtx }) => {
|
||||
|
||||
const columns = useMemo<ColumnsType<QualityStandard>>(() => [
|
||||
{ title: '标准类型', key: 'bzlx', dataIndex: 'bzlx' },
|
||||
{ title: '项目', key: 'xm', dataIndex: 'xm' },
|
||||
{ title: '检验内容', key: 'jynr', dataIndex: 'jynr' },
|
||||
{ title: '质量标准', key: 'zlbz', dataIndex: 'zlbz' },
|
||||
{
|
||||
title: '操作', key: '_', render: rec => (
|
||||
<Space>
|
||||
<Button icon={<EditOutlined />} type="link" />
|
||||
<Button icon={<DeleteOutlined />} type="link" danger />
|
||||
</Space>
|
||||
)
|
||||
}
|
||||
], []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card>
|
||||
<Space size="large" wrap>
|
||||
<Space>
|
||||
标准类型
|
||||
<Select style={{ width: 288 }}>
|
||||
<Option value="枢纽工程外观质量标准">枢纽工程外观质量标准</Option>
|
||||
<Option value="堤防工程外观质量标准">堤防工程外观质量标准</Option>
|
||||
<Option value="引水(渠道)工程外观质量标准">引水(渠道)工程外观质量标准</Option>
|
||||
</Select>
|
||||
</Space>
|
||||
<Space>
|
||||
<Button icon={<SearchOutlined />} type="primary">查询</Button>
|
||||
<Button icon={<PlusOutlined />} onClick={() => crudCtx.goto('new', {})}>新增</Button>
|
||||
</Space>
|
||||
</Space>
|
||||
</Card>
|
||||
<div className="card-h-margin" />
|
||||
<Card>
|
||||
<Table rowKey="name" columns={columns} {...pagerCtx.tableProps} />
|
||||
</Card>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default DataTable
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
import { Card } from 'antd';
|
||||
import React from 'react';
|
||||
import CancelCrud from '../../../components/crud/CancelCrud';
|
||||
import useCrud from '../../../components/crud/useCrud';
|
||||
import usePageTable from '../../../components/crud/usePageTable';
|
||||
import { PageResult, QualityStandard } from '../../../service/def';
|
||||
import { demoDate } from '../../../utils/utils';
|
||||
import DataForm from './DataForm';
|
||||
import DataTable from './DataTable';
|
||||
|
||||
async function demofind(): Promise<PageResult<QualityStandard>> {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
bzlx: '枢纽工程外观质量标准',
|
||||
xm: '外部尺寸',
|
||||
jynr: '宽度',
|
||||
zlbz: '允许偏差0~+15cm',
|
||||
},
|
||||
{
|
||||
bzlx: '堤防工程外观质量标准',
|
||||
xm: '外部尺寸',
|
||||
jynr: '宽度',
|
||||
zlbz: '允许偏差0~+15cm',
|
||||
},
|
||||
{
|
||||
bzlx: '引水(渠道)工程外观质量标准',
|
||||
xm: '外部尺寸',
|
||||
jynr: '宽度',
|
||||
zlbz: '允许偏差0~+15cm',
|
||||
},
|
||||
],
|
||||
totalRow: 3
|
||||
};
|
||||
}
|
||||
|
||||
const QualityStandardPage: React.FC = () => {
|
||||
|
||||
const crud = useCrud();
|
||||
|
||||
const pager = usePageTable<QualityStandard>(demofind);
|
||||
|
||||
return (
|
||||
<div className="content-root">
|
||||
{
|
||||
crud.mode === 'new' ? (
|
||||
<Card key="new" title="新增" extra={<CancelCrud crudCtx={crud} confirm />} >
|
||||
<DataForm />
|
||||
</Card>
|
||||
) : null
|
||||
}
|
||||
{
|
||||
!crud.mode ? <DataTable crudCtx={crud} pagerCtx={pager} /> : null
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default QualityStandardPage
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
import { DeleteOutlined, PlusOutlined, EditOutlined, SearchOutlined } from '@ant-design/icons';
|
||||
import { Button, Card, Input, Select, Space, Table } from 'antd';
|
||||
import { ColumnsType } from 'antd/lib/table';
|
||||
import React, { useMemo } from 'react';
|
||||
import { CrudContext } from '../../../components/crud/useCrud';
|
||||
import { PageTableContext } from '../../../components/crud/usePageTable';
|
||||
import { SystemLog } from '../../../service/def';
|
||||
const { Option } = Select;
|
||||
|
||||
type IProps = {
|
||||
pagerCtx: PageTableContext<SystemLog>;
|
||||
crudCtx: CrudContext
|
||||
}
|
||||
|
||||
const DataTable: React.FC<IProps> = ({ pagerCtx, crudCtx }) => {
|
||||
|
||||
const columns = useMemo<ColumnsType<SystemLog>>(() => [
|
||||
{ title: '表名', key: 'bm', dataIndex: 'bm' },
|
||||
{ title: '修改类型', key: 'xglx', dataIndex: 'xglx' },
|
||||
{ title: '修改人', key: 'xgr', dataIndex: 'xgr' },
|
||||
{ title: '新数据', key: 'xsj', dataIndex: 'xsj' },
|
||||
{ title: '旧数据', key: 'jsj', dataIndex: 'jsj' },
|
||||
{ title: '修改数据', key: 'xgsj', dataIndex: 'xgsj' },
|
||||
], []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card>
|
||||
<Space size="large" wrap>
|
||||
<Space>
|
||||
修改类型
|
||||
<Select style={{ width: 288 }}>
|
||||
<Option value="枢纽工程外观质量标准">枢纽工程外观质量标准</Option>
|
||||
<Option value="堤防工程外观质量标准">堤防工程外观质量标准</Option>
|
||||
<Option value="引水(渠道)工程外观质量标准">引水(渠道)工程外观质量标准</Option>
|
||||
</Select>
|
||||
</Space>
|
||||
<Space>
|
||||
<Button icon={<SearchOutlined />} type="primary">查询</Button>
|
||||
</Space>
|
||||
</Space>
|
||||
</Card>
|
||||
<div className="card-h-margin" />
|
||||
<Card>
|
||||
<Table rowKey="name" columns={columns} {...pagerCtx.tableProps} />
|
||||
</Card>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default DataTable
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
import { Card } from 'antd';
|
||||
import React from 'react';
|
||||
import CancelCrud from '../../../components/crud/CancelCrud';
|
||||
import useCrud from '../../../components/crud/useCrud';
|
||||
import usePageTable from '../../../components/crud/usePageTable';
|
||||
import { PageResult, SystemLog } from '../../../service/def';
|
||||
import { demoDate } from '../../../utils/utils';
|
||||
import DataTable from './DataTable';
|
||||
|
||||
async function demofind(): Promise<PageResult<SystemLog>> {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
bm: 'XXXX',
|
||||
xglx: '新增',
|
||||
xgr: '张三',
|
||||
xsj: '{id:""}',
|
||||
jsj: '',
|
||||
xgsj: '',
|
||||
},
|
||||
{
|
||||
bm: 'XXXX',
|
||||
xglx: '修改',
|
||||
xgr: '张三',
|
||||
xsj: '{id:""}',
|
||||
jsj: '',
|
||||
xgsj: '',
|
||||
},
|
||||
{
|
||||
bm: 'XXXX',
|
||||
xglx: '删除',
|
||||
xgr: '张三',
|
||||
xsj: '{id:""}',
|
||||
jsj: '',
|
||||
xgsj: '',
|
||||
},
|
||||
],
|
||||
totalRow: 3
|
||||
};
|
||||
}
|
||||
|
||||
const SystemLogPage: React.FC = () => {
|
||||
|
||||
const crud = useCrud();
|
||||
|
||||
const pager = usePageTable<SystemLog>(demofind);
|
||||
|
||||
return (
|
||||
<div className="content-root">
|
||||
{
|
||||
!crud.mode ? <DataTable crudCtx={crud} pagerCtx={pager} /> : null
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default SystemLogPage
|
||||
Loading…
Reference in New Issue