From a54fb06582bb5380e03f6fec22107c93e0f8529a Mon Sep 17 00:00:00 2001 From: dengchao <754083046@qq.com> Date: Tue, 27 Dec 2022 17:51:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=BE=85=E5=8A=A9=E8=A7=86=E5=9B=BE=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auxiliaryComponents/ParmarModal.jsx | 2 - .../nodeModalComponents/AddView.jsx | 75 +++++++++++++++++-- .../platformCenter/messageManage/indexNew.jsx | 30 ++++---- 3 files changed, 84 insertions(+), 23 deletions(-) diff --git a/src/pages/bsmanager/workOrder/workFlow/flowNode/flowNodeComponents/auxiliaryComponents/ParmarModal.jsx b/src/pages/bsmanager/workOrder/workFlow/flowNode/flowNodeComponents/auxiliaryComponents/ParmarModal.jsx index d8ceca57..647de062 100644 --- a/src/pages/bsmanager/workOrder/workFlow/flowNode/flowNodeComponents/auxiliaryComponents/ParmarModal.jsx +++ b/src/pages/bsmanager/workOrder/workFlow/flowNode/flowNodeComponents/auxiliaryComponents/ParmarModal.jsx @@ -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 }}> diff --git a/src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/AddView.jsx b/src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/AddView.jsx index 43eb79ac..a757f90e 100644 --- a/src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/AddView.jsx +++ b/src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/AddView.jsx @@ -1,16 +1,22 @@ -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> ); }; diff --git a/src/pages/platformCenter/messageManage/indexNew.jsx b/src/pages/platformCenter/messageManage/indexNew.jsx index 2ac7f334..641a5df1 100644 --- a/src/pages/platformCenter/messageManage/indexNew.jsx +++ b/src/pages/platformCenter/messageManage/indexNew.jsx @@ -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', -- 2.17.1