Commit de6008e8 authored by 皮倩雯's avatar 皮倩雯

fix: '修改事件受理流程,辅助视图界面样式'

parent 66f20aef
Pipeline #43256 passed with stages
in 7 minutes 10 seconds
...@@ -367,7 +367,7 @@ const AddFlowsModal = props => { ...@@ -367,7 +367,7 @@ const AddFlowsModal = props => {
<Drawer <Drawer
title={type === 'add' ? '添加受理流程' : '编辑受理流程'} title={type === 'add' ? '添加受理流程' : '编辑受理流程'}
visible={visible} visible={visible}
width="600px" width="500px"
onClose={onClose} onClose={onClose}
destroyOnClose destroyOnClose
footer={ footer={
...@@ -380,15 +380,11 @@ const AddFlowsModal = props => { ...@@ -380,15 +380,11 @@ const AddFlowsModal = props => {
> >
<Form form={form} labelCol={{ span: 7 }} style={{ overflowY: 'scroll' }}> <Form form={form} labelCol={{ span: 7 }} style={{ overflowY: 'scroll' }}>
<Row> <Row>
<Col span={23}> <Col span={24}>
{type === 'edit' ? ( {type === 'edit' ? (
<> <>
<Item label="受理流程" name="FlowName" labelCol={{ span: 4 }}> <Item label="受理流程" name="FlowName" labelCol={{ span: 4 }}>
<Select <Select placeholder="选择受理流程" placeholder={selectValue} disabled>
placeholder="选择受理流程"
placeholder={selectValue}
disabled
>
{standingTable {standingTable
? standingTable.map((item, index) => ( ? standingTable.map((item, index) => (
<Option key={index} value={item}> <Option key={index} value={item}>
...@@ -415,7 +411,7 @@ const AddFlowsModal = props => { ...@@ -415,7 +411,7 @@ const AddFlowsModal = props => {
</> </>
)} )}
</Col> </Col>
<Col span={23}> <Col span={24}>
<Item label="受理权限" name="Roles" labelCol={{ span: 4 }}> <Item label="受理权限" name="Roles" labelCol={{ span: 4 }}>
<div className={styles.filed_listItem}> <div className={styles.filed_listItem}>
<Input <Input
...@@ -429,7 +425,7 @@ const AddFlowsModal = props => { ...@@ -429,7 +425,7 @@ const AddFlowsModal = props => {
type="dashed" type="dashed"
onClick={() => pickFiled1('Roles')} onClick={() => pickFiled1('Roles')}
icon={<PlusOutlined style={{ marginTop: '5px' }} />} icon={<PlusOutlined style={{ marginTop: '5px' }} />}
style={{ marginLeft: '0.5rem', width: '4rem' }} style={{ marginLeft: '5px', width: '58px' }}
/> />
</div> </div>
</Item> </Item>
......
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Drawer, Form, Input, notification, Row, Col, Button, Space} from 'antd'; import { Drawer, Form, Input, notification, Row, Col, Button, Space } from 'antd';
import { CM_Event_OperateEventExtendPage, GetEventExtendPage} from '@/services/standingBook/api'; import { CM_Event_OperateEventExtendPage, GetEventExtendPage } from '@/services/standingBook/api';
import { IdcardTwoTone } from '@ant-design/icons'; import { IdcardTwoTone } from '@ant-design/icons';
const AddViewModal = props => { const AddViewModal = props => {
const { callBackSubmit = () => { }, visible, onClose, maxLength, title2, obj, type } = props; const { callBackSubmit = () => {}, visible, onClose, maxLength, title2, obj, type } = props;
const [id, setId]= useState('') const [id, setId] = useState('');
const [form] = Form.useForm(); const [form] = Form.useForm();
const { Item } = Form; const { Item } = Form;
const { TextArea } = Input; const { TextArea } = Input;
const onSubmit = () => { const onSubmit = () => {
let aa = title2; let aa = title2;
let bb = form.getFieldsValue().WebLabel; let bb = form.getFieldsValue().WebLabel;
let cc = form.getFieldsValue().WebPage; let cc = form.getFieldsValue().WebPage;
let dd = form.getFieldsValue().WebParam; let dd = form.getFieldsValue().WebParam;
let ee = form.getFieldsValue().MobileLabel; let ee = form.getFieldsValue().MobileLabel;
let ff = form.getFieldsValue().MobilePage; let ff = form.getFieldsValue().MobilePage;
let gg = form.getFieldsValue().MobileParam; let gg = form.getFieldsValue().MobileParam;
if(type=='edit'){ if (type == 'edit') {
CM_Event_OperateEventExtendPage({ CM_Event_OperateEventExtendPage({
ID: id, ID: id,
EventName: aa, EventName: aa,
WebLabel: bb, WebLabel: bb,
WebPage: cc, WebPage: cc,
WebParam: dd, WebParam: dd,
MobileLabel: ee, MobileLabel: ee,
MobilePage: ff, MobilePage: ff,
MobileParam: gg, MobileParam: gg,
}).then(res => { }).then(res => {
if (res.msg === '') { if (res.msg === '') {
form.resetFields(); form.resetFields();
callBackSubmit(); callBackSubmit();
notification.success({ notification.success({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: '编辑成功', description: '编辑成功',
}); });
} else { } else {
notification.error({ notification.error({
message: '提示', message: '提示',
duration: 3, duration: 3,
description: res.msg, description: res.msg,
}); });
}
})
}else{
CM_Event_OperateEventExtendPage({
ID: 0,
EventName: aa,
WebLabel: bb,
WebPage: cc,
WebParam: dd,
MobileLabel: ee,
MobilePage: ff,
MobileParam: gg,
}).then(res => {
if (res.msg === '') {
form.resetFields();
callBackSubmit();
notification.success({
message: '提示',
duration: 3,
description: '添加成功',
});
} else {
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
})
} }
});
} else {
} CM_Event_OperateEventExtendPage({
useEffect(() => { ID: 0,
console.log(type) EventName: aa,
if(type==='edit'){ WebLabel: bb,
GetEventExtendPage({eventExtendPageId:obj}).then(res=>{ WebPage: cc,
console.log(res.data) WebParam: dd,
form.setFieldsValue({...res.data}) MobileLabel: ee,
setId(res.data.ID) MobilePage: ff,
}) MobileParam: gg,
}else if(type==='add'){ }).then(res => {
form.resetFields(); if (res.msg === '') {
form.resetFields();
callBackSubmit();
notification.success({
message: '提示',
duration: 3,
description: '添加成功',
});
} else {
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
} }
}, [visible]) });
return ( }
<Drawer };
visible={visible} useEffect(() => {
onClose={onClose} if (type === 'edit') {
width="500px" GetEventExtendPage({ eventExtendPageId: obj }).then(res => {
title={type=='edit' ? '编辑事件辅助视图配置':'添加事件辅助视图配置'} form.setFieldsValue({ ...res.data });
footer={ setId(res.data.ID);
<Space> });
<Button onClick={onSubmit} type="primary" > } else if (type === 'add') {
确定 form.resetFields();
</Button> }
</Space> }, [visible]);
} return (
> <Drawer
<Form form={form} labelCol={{ span: 7 }} style={{ height: '24rem', overflowY: 'scroll' }}> visible={visible}
<Row> onClose={onClose}
<Col span={23}> width="500px"
<Item title={type == 'edit' ? '编辑事件辅助视图配置' : '添加事件辅助视图配置'}
label="前端标签" footer={
name="WebLabel" <Space>
rules={[ <Button onClick={onSubmit} type="primary">
{ 确定
required: true, </Button>
message: '请输入前端标签', </Space>
}, }
]} >
> <Form form={form} labelCol={{ span: 5 }} style={{ overflowY: 'scroll' }}>
<Input style={{ width: '17rem' }} placeholder="请输入前端标签" /> <Row>
</Item> <Col span={24}>
</Col> <Item
<Col span={23}> label="前端标签"
<Item name="WebLabel"
label="前端视图" rules={[
name="WebPage" {
rules={[ required: true,
{ message: '请输入前端标签',
required: true, },
message: '请输入前端视图', ]}
}, >
]} <Input placeholder="请输入前端标签" />
> </Item>
<Input style={{ width: '17rem' }} placeholder="请输入前端视图" /> </Col>
</Item> <Col span={24}>
</Col> <Item
<Col span={23}> label="前端视图"
<Item name="WebPage"
label="视图参数" rules={[
name="WebParam" {
> required: true,
<TextArea style={{ width: '17rem' }} placeholder="请输入视图参数" /> message: '请输入前端视图',
</Item> },
</Col> ]}
<Col span={23}> >
<Item <Input placeholder="请输入前端视图" />
label="手持标签" </Item>
name="MobileLabel" </Col>
> <Col span={24}>
<Input style={{ width: '17rem' }} placeholder="请输入手持标签" /> <Item label="视图参数" name="WebParam">
</Item> <TextArea placeholder="请输入视图参数" />
</Col> </Item>
<Col span={23}> </Col>
<Item <Col span={24}>
label="手持视图" <Item label="手持标签" name="MobileLabel">
name="MobilePage" <Input placeholder="请输入手持标签" />
> </Item>
<Input style={{ width: '17rem' }} placeholder="请输入手持视图" /> </Col>
</Item> <Col span={24}>
</Col> <Item label="手持视图" name="MobilePage">
<Col span={23}> <Input placeholder="请输入手持视图" />
<Item </Item>
label="手持参数" </Col>
name="MobileParam" <Col span={24}>
> <Item label="手持参数" name="MobileParam">
<TextArea style={{ width: '17rem' }} placeholder="请输入手持参数" /> <TextArea placeholder="请输入手持参数" />
</Item> </Item>
</Col> </Col>
</Row> </Row>
</Form>
</Form> </Drawer>
</Drawer> );
) };
} export default AddViewModal;
export default AddViewModal;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment