This commit is contained in:
jl-zhoujl2
2022-07-12 15:10:29 +08:00
parent aa571b8c14
commit 20f092d6b1
9 changed files with 463 additions and 2 deletions

View File

@ -4,12 +4,13 @@ import home from './HomePage/router_home';
import juryRoom from './JuryRoom/router_menuJury.config'; import juryRoom from './JuryRoom/router_menuJury.config';
import approvalForm from './router_approval_form'; import approvalForm from './router_approval_form';
import partyMemberTopic from './router_partyMemberTopic'; import partyMemberTopic from './router_partyMemberTopic';
import partyManagement from './router_partyManagement';
export default [ export default [
//========================================================================登陆 //========================================================================登陆
...transfer,//跳转、登陆 ...transfer,//跳转、登陆
//审批单 //审批单
...approvalForm, ...approvalForm,
//党员专题 //党建攻坚
...partyMemberTopic, ...partyMemberTopic,
{ {
path: '/userformal', path: '/userformal',
@ -106,6 +107,7 @@ export default [
}, },
...home,//各角色主页 ...home,//各角色主页
...menuaZhaoBiao,//项目菜单所有路由 ...menuaZhaoBiao,//项目菜单所有路由
...partyManagement,//党建攻坚管理端
{//问卷调查 {//问卷调查
name: 'Questionnaire', name: 'Questionnaire',
icon: 'UnorderedListOutlined', icon: 'UnorderedListOutlined',
@ -243,7 +245,7 @@ export default [
path: '/Supervision', path: '/Supervision',
component: './Project/ProjectManage/Supervision' component: './Project/ProjectManage/Supervision'
}, },
{//审查人员 项目管理页 {//审查人员 项目管理页
name: 'Examination', name: 'Examination',
path: '/Examination', path: '/Examination',
component: './Project/ProjectManage/Examination' component: './Project/ProjectManage/Examination'

View File

@ -0,0 +1,23 @@
export default [
{
name: 'partyMemberTopicManage',
path: '/partyMemberTopicManage',
routes: [
{//活动维护
name: 'EventMaintenance',
path: '/partyMemberTopicManage/EventMaintenance',
component: './PartyMemberTopic/Management/EventMaintenance',
},
{ //意见收集管理
name: 'OpinionCollection',
path: '/partyMemberTopicManage/OpinionCollection',
component: './PartyMemberTopic/Management/OpinionCollection',
},
{ //物资采购专业线数据维护
name: 'ProLineMaintenance',
path: '/partyMemberTopicManage/ProLineMaintenance',
component: './PartyMemberTopic/Management/ProLineMaintenance',
},
]
}
];

View File

@ -0,0 +1,101 @@
import React, { useRef } from 'react';
import { Modal, Card, Col, Form, Input, Row, Space, Typography, Select } from 'antd';
import BraftText from '@/components/richText/wang';
import ExtendUpload from '@/utils/ExtendUpload';
const layout = {
labelCol: { span: 3 },
wrapperCol: { span: 21 },
};
const validateMessages = {
required: '请填写此项',
};
const modalHeight = window.innerHeight * 96 / 100;
interface EventMaintenanceModalProps {
modalVisible: boolean;
onCancel: () => void;
}
const EventMaintenanceModal: React.FC<EventMaintenanceModalProps> = (props) => {
const { modalVisible, onCancel } = props;
const [form] = Form.useForm();
const { Option } = Select;
const braftRef = useRef<any>(null);
const onFinish = (values: any) => {
console.log(values);
};
return (
<Modal
destroyOnClose
title="新建"
visible={modalVisible}
onCancel={() => onCancel()}
okText="保存"
maskClosable={false}
style={{ maxHeight: modalHeight }}
bodyStyle={{ maxHeight: modalHeight - 108, overflowY: 'auto', }}
centered
cancelText="返回"
width={'70%'}
>
<Form {...layout} name="nest-messages" form={form} onFinish={onFinish} validateMessages={validateMessages}>
<Form.Item name="id" hidden>
<Input />
</Form.Item>
<Form.Item name="num" label="活动类型" rules={[{ required: true }]}>
<Select style={{ width: 150 }}>
<Option value="0"></Option>
<Option value="1"></Option>
<Option value="2"></Option>
</Select>
</Form.Item>
<Form.Item
name="title"
label="标题名称"
rules={[{ required: true }]}
tooltip="此项不超过18个汉字"
>
<Input maxLength={18} />
</Form.Item>
<Form.Item
name="subtitle"
label="副标题名称"
rules={[{ required: true }]}
tooltip="此项不超过120个汉字"
>
<Input maxLength={120} />
</Form.Item>
<Form.Item
name="file"
label="主图"
extra="注为了避免页面进入加载时间过长照片尽量压缩至500K左右"
>
<ExtendUpload bid={''} btnName="上传" maxCount={1} maxSize={0.6} uploadProps={{ name: "file", disabled: false, accept: ".jfif,.pjpeg,.jpeg,.pjp,.jpg,.png,.gif,.bmp,.dib" }} />
</Form.Item>
<Form.Item label="编制人员" style={{ margin: 0 }}>
<Row>
<Col span={10}>
<Form.Item name="people">
<Input readOnly />
</Form.Item>
</Col>
<Col span={12} offset={2}>
<Form.Item name="date" label="编制日期">
<Input readOnly />
</Form.Item>
</Col>
</Row>
</Form.Item>
<Form.Item name="col" label="正文内容" rules={[{ required: true }]}>
<BraftText braftRef={braftRef} echo={null} disabled={false} />
</Form.Item>
</Form>
</Modal>
);
};
export default EventMaintenanceModal;

View File

@ -0,0 +1,151 @@
import { PlusOutlined } from '@ant-design/icons';
import { ActionType, ProColumns } from '@ant-design/pro-table';
import ProTable from '@ant-design/pro-table';
import { Button, Card } from 'antd';
import React, { useState } from 'react';
import { useRef } from 'react';
import EventMaintenanceModal from './components/EventMaintenanceModal';
const data = [
{
id: 1,
index: 1,
title: 1,
type: 0,
},
{
id: 2,
index: 2,
title: 2,
type: 1,
},
{
id: 3,
index: 3,
title: 3,
type: 2,
},
{
id: 4,
index: 4,
title: 4,
type: 2,
},
]
const columns: ProColumns<any>[] = [
{
title: '序号',
dataIndex: 'index',
valueType: 'index',
width: 48,
},
{
title: '标题名称',
dataIndex: 'title',
ellipsis: true,
},
{
title: '类型',
dataIndex: 'type',
valueType: 'select',
valueEnum: {
0: { text: '首页' },
1: { text: '活动风采' },
2: { text: '攻坚克难项目' },
},
},
{
title: '发布时间',
key: 'showTime',
dataIndex: 'created_at',
valueType: 'dateTime',
hideInSearch: true,
},
{
title: '状态',
dataIndex: 'state',
valueType: 'select',
valueEnum: {
0: { text: '草稿' },
1: { text: '发布' },
},
},
{
title: '开始时间',
dataIndex: 'starttime',
valueType: 'date',
hideInTable: true,
},
{
title: '结束时间',
dataIndex: 'endtime',
valueType: 'date',
hideInTable: true,
},
{
title: '发布人',
dataIndex: 'people',
hideInSearch: true,
},
{
title: '操作',
hideInSearch: true,
render: (text, record, _, action) => [
<Button type='text' key="view">
</Button>,
<Button type='text' key="withdraw">
</Button>,
<Button
type='text'
key="editable"
>
</Button>,
<Button type='text' key="delete">
</Button>,
<Button type='text' key="release">
</Button>,
],
},
];
export default () => {
const actionRef = useRef<ActionType>();
const [modalVisible, setModalVisible] = useState<boolean>(false);
return (
<Card className="zjl-entrust confirm">
<ProTable<any>
columns={columns}
actionRef={actionRef}
request={async (params) => {
return {
data: data,
success: true,
};
}}
rowKey="id"
options={false}
pagination={{
pageSize: 10,
onChange: (page) => console.log(page),
}}
search={{
defaultCollapsed: false,//默认展开
}}
dateFormatter="string"
toolBarRender={() => [
<Button key="button" icon={<PlusOutlined />} type="primary" onClick={() => setModalVisible(true)}>
</Button>
]}
/>
<EventMaintenanceModal modalVisible={modalVisible} onCancel={() => setModalVisible(false)} />
</Card>
);
};

View File

@ -0,0 +1,133 @@
import { UploadOutlined } from '@ant-design/icons';
import { ActionType, ProColumns } from '@ant-design/pro-table';
import ProTable from '@ant-design/pro-table';
import { Button, Card } from 'antd';
import React from 'react';
import { useRef } from 'react';
const data = [
{
id: 1,
index: 1,
title: 1,
type: 0,
},
{
id: 2,
index: 2,
title: 2,
type: 1,
},
{
id: 3,
index: 3,
title: 3,
type: 2,
},
{
id: 4,
index: 4,
title: 4,
type: 2,
},
]
const columns: ProColumns<any>[] = [
{
title: '序号',
dataIndex: 'index',
valueType: 'index',
width: 48,
},
{
title: '意见类型',
dataIndex: 'type',
valueType: 'select',
valueEnum: {
0: { text: '网络运营' },
1: { text: '综合行政' },
2: { text: '市场' },
},
},
{
title: '意见内容',
dataIndex: 'title',
ellipsis: true,
hideInSearch: true,
},
{
title: '补充信息',
dataIndex: 'other',
ellipsis: true,
hideInSearch: true,
},
{
title: '提交时间',
key: 'showTime',
dataIndex: 'created_at',
valueType: 'dateTime',
hideInSearch: true,
},
{
title: '开始时间',
dataIndex: 'starttime',
valueType: 'date',
hideInTable: true,
},
{
title: '结束时间',
dataIndex: 'endtime',
valueType: 'date',
hideInTable: true,
},
{
title: '提交人员',
dataIndex: 'people',
hideInSearch: true,
},
{
title: '附件管理',
hideInSearch: true,
render: (text, record, _, action) => [
<Button type='text' key="download">
</Button>,
],
},
];
export default () => {
const actionRef = useRef<ActionType>();
return (
<Card className="zjl-entrust confirm">
<ProTable<any>
columns={columns}
actionRef={actionRef}
request={async (params) => {
return {
data: data,
success: true,
};
}}
rowKey="id"
options={false}
pagination={{
pageSize: 10,
onChange: (page) => console.log(page),
}}
search={{
span: 6,
defaultCollapsed: false,//默认展开
}}
rowSelection={{}}
dateFormatter="string"
toolBarRender={() => [
<Button key="button" icon={<UploadOutlined />} type="primary">
</Button>
]}
/>
</Card>
);
};

View File

@ -0,0 +1,51 @@
import { Button, Card, Col, Form, Input, Row, Space, Typography } from 'antd';
import React from 'react';
const layout = {
labelCol: { span: 6 },
wrapperCol: { span: 15 },
};
const validateMessages = {
required: '请填写此项',
};
export default () => {
const { Title } = Typography;
const onFinish = (values: any) => {
console.log(values);
};
return (
<Card>
<Space>
<Button type='primary'></Button>
<Button></Button>
</Space>
<Title level={3}></Title>
<Form {...layout} name="nest-messages" onFinish={onFinish} validateMessages={validateMessages}>
<Row>
<Col span={12}>
<Form.Item name="num" label="一线调研次数" rules={[{ required: true }]}>
<Input />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="name" label="访问人数" rules={[{ required: true }]}>
<Input />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="req" label="保障需求条数" rules={[{ required: true }]}>
<Input />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="bumb" label="攻坚克难项目个数" rules={[{ required: true }]}>
<Input />
</Form.Item>
</Col>
</Row>
</Form>
</Card>
);
};