Commit a54fb065 authored by 邓超's avatar 邓超

fix: 修改流程中心辅助视图参数配置

parent 4850cd88
Pipeline #65966 passed with stages
......@@ -76,12 +76,10 @@ const ParmarModal = props => {
<Modal
title="参数配置"
visible={visible}
width="500px"
onOk={onFinish}
onCancel={handleCancel}
maskClosable={false}
destroyOnClose
centered
>
<div style={{ maxHeight: '400px', overflowY: 'scroll', marginBottom: '10px' }}>
<Form name="form" form={form} labelCol={{ span: 4 }}>
......
import React, { useEffect } from 'react';
import { Form, Modal, Input } from 'antd';
import React, { useEffect, useState } from 'react';
import { Form, Modal, Input, message, Button, Select, Tag } from 'antd';
import ParmarModal from '../../../../workFlow/flowNode/flowNodeComponents/auxiliaryComponents/ParmarModal';
const { Option } = Select;
const AddView = props => {
const { onSubumit, handleCancel, visible, msg, flowNodeId, modalType, title } = props;
const [form] = Form.useForm();
const [flag, setFlag] = useState(0);
const [showParmarModal, setShowParmarModal] = useState(false);
useEffect(() => {
form.resetFields();
if (visible) {
if (modalType === 'edit') {
getFormData();
} else {
form.setFieldsValue({ WebPage: 'FeedbackAccount' });
}
setFlag(flag + 1);
}
}, [visible]);
// 获取表单回显
......@@ -33,6 +39,15 @@ const AddView = props => {
}
});
};
// 节点配置表单监听
const changeValue = (changedFields, allFields) => {
if (changedFields[0].name[0] === 'WebPage') {
setFlag(flag + 1);
}
};
const addParama = () => {
setShowParmarModal(true);
};
return (
<Modal
title="流程节点辅助视图配置"
......@@ -47,6 +62,7 @@ const AddView = props => {
labelCol={{ span: 5 }}
wrapperCol={{ span: 18 }}
initialValues={{ remember: true }}
onFieldsChange={changeValue}
>
{/* <Form.Item label="流程节点" name="FlowName">
<Input disabled />
......@@ -55,10 +71,48 @@ const AddView = props => {
<Input placeholder="请输入前端标签" />
</Form.Item>
<Form.Item label="前端视图" name="WebPage">
<Input placeholder="请输入前端视图" />
<Select placeholder="请输入前端视图" showSearch optionLabelProp="label">
<Option value="FeedbackAccount" label="FeedbackAccount">
<div style={{ marginRight: '6px' }}>
<Tag color="blue">标准</Tag>
FeedbackAccount:工单反馈标准视图
</div>
</Option>
<Option value="GisGatherProjectView" label="GisGatherProjectView">
<div style={{ marginRight: '6px' }}>
<Tag color="purple">专用</Tag>
GisGatherProjectView:管网采集辅助视图
</div>
</Option>
</Select>
</Form.Item>
<Form.Item
label="视图参数"
style={{
display: form.getFieldValue('WebPage') === 'FeedbackAccount' ? 'flex' : 'none',
}}
>
<div style={{ display: 'flex' }}>
<Form.Item name="WebParam" style={{ marginBottom: '0', flex: '1' }}>
<Input placeholder="请输入视图参数" />
</Form.Item>
<Button onClick={addParama}>参数管理</Button>
</div>
</Form.Item>
<Form.Item label="视图参数" name="WebParam">
<Input placeholder="请输入视图参数" />
<Form.Item
label="视图参数"
name="WebParam"
style={{
display: form.getFieldValue('WebPage') === 'GisGatherProjectView' ? 'flex' : 'none',
}}
>
<Select placeholder="选择视图参数" showSearch>
{['一键入库', 'edit'].map((item, index) => (
<Option key={index} value={item}>
{item}
</Option>
))}
</Select>
</Form.Item>
<Form.Item label="手持标签" name="MobileLabel">
<Input placeholder="请输入手持标签" />
......@@ -70,6 +124,15 @@ const AddView = props => {
<Input placeholder="请输入手持参数" />
</Form.Item>
</Form>
<ParmarModal
pageUrl={form.getFieldsValue().WebParam}
handleCancel={() => setShowParmarModal(false)}
visible={showParmarModal}
parmarCallBack={url => {
form.setFieldsValue({ WebParam: url });
setShowParmarModal(false);
}}
/>
</Modal>
);
};
......
......@@ -71,21 +71,21 @@ const HostManager = () => {
render: (text, record) => <div>{text === null || !text ? '-' : text}</div>,
},
{
title: '推送组',
dataIndex: 'TimeJobGroup',
key: 'TimeJobGroup',
align: 'center',
ellipsis: true,
width: 500,
render: (text, record) => (
<span>
<Tooltip placement="topLeft" title={text.map(item => item.name).join(',')}>
{text.map(item => item.name).join(',') || '--'}
</Tooltip>
</span>
),
},
// {
// title: '推送组',
// dataIndex: 'TimeJobGroup',
// key: 'TimeJobGroup',
// align: 'center',
// ellipsis: true,
// width: 500,
// render: (text, record) => (
// <span>
// <Tooltip placement="topLeft" title={text.map(item => item.name).join(',')}>
// {text.map(item => item.name).join(',') || '--'}
// </Tooltip>
// </span>
// ),
// },
{
title: '消息平台',
dataIndex: 'Platform',
......
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