Commit c1facb6f authored by 邓超's avatar 邓超

fix: 修改解决方案描述,修改消息方案配置bug

parent 99ec47cd
Pipeline #43732 skipped with stages
...@@ -112,15 +112,14 @@ const CurrentSolution = () => { ...@@ -112,15 +112,14 @@ const CurrentSolution = () => {
<strong>友情提示:</strong> <strong>友情提示:</strong>
</p> </p>
<p> <p>
熊猫智慧水务应用解决方案的管理,集成了数据库管理、用户权限管理、基础平台管理、应用中心管理、系统日志管理等核心模块; 熊猫智慧水务应用解决方案的管理,集成了数据库管理、用户权限管理、基础平台管理、应用中心管理、业务中心管理、系统日志管理等核心模块;
</p> </p>
<p> <p>
主要为客户项目经理在实施应用部署的过程中提供可视化配置系统,一站式交付用户需求的熊猫智慧水务相关产品; 主要为客户项目经理在实施应用部署的过程中提供可视化配置系统,一站式交付用户需求的熊猫智慧水务相关产品;
</p> </p>
<p>数据库支持SQL Server、Oracle、MongoDB、MySQL四大类常见数据库;</p> <p>数据库支持SQL Server、Oracle、MongoDB、MySQL四大类常见数据库;</p>
<p> <p>平台中心涵盖GIS平台、物联网平台、消息平台等基础平台;</p>
平台中心涵盖GIS平台、物联网平台、业务平台、消息平台等基础平台,2021年会推出数字孪生平台、数据治理平台、AI平台等进阶平台; <p>业务中心涵盖表字段配置、台账管理、工单管理、巡维保等业务;</p>
</p>
{/* 无线App端、微信小程序端 */} {/* 无线App端、微信小程序端 */}
<p> <p>
应用中心主要把客户应用按端分离,分为PCWeb端、移动应用端,结合应用界面与菜单权限配置完成; 应用中心主要把客户应用按端分离,分为PCWeb端、移动应用端,结合应用界面与菜单权限配置完成;
......
import React, { useState, useEffect } from 'react' import React, { useState, useEffect } from 'react';
import SiteModal from '@/components/Modal/SiteModa'; import SiteModal from '@/components/Modal/SiteModa';
import { Form, Input, notification, Select, Row, Col } from 'antd' import { Form, Input, notification, Select, Row, Col } from 'antd';
const { Item } = Form; const { Item } = Form;
const { TextArea } = Input; const { TextArea } = Input;
...@@ -11,14 +10,14 @@ const EditModal = props => { ...@@ -11,14 +10,14 @@ const EditModal = props => {
const [form] = Form.useForm(); const [form] = Form.useForm();
const [templateName, setTemplateName] = useState([]); const [templateName, setTemplateName] = useState([]);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [flag, setFlag] = useState(0);
const onSubmit = () => { const onSubmit = () => {
form.submit() form.submit();
};
}
const onSubmitSuccess = () => { const onSubmitSuccess = () => {
const result = form.getFieldValue() const result = form.getFieldValue();
props.onSubmit & props.onSubmit({ Id: props.template.Id, ...result }) props.onSubmit & props.onSubmit({ Id: props.template.Id, ...result });
} };
useEffect(() => { useEffect(() => {
form.setFieldsValue({ form.setFieldsValue({
...@@ -26,18 +25,21 @@ const EditModal = props => { ...@@ -26,18 +25,21 @@ const EditModal = props => {
type: props.template.type, type: props.template.type,
third_name: props.template.third_name, third_name: props.template.third_name,
third_id: props.template.third_id, third_id: props.template.third_id,
weixin:props.template.weixin, weixin: props.template.weixin,
params: props.template.template_params1, params: props.template.template_params1,
param1: props.template.template_params2, param1: props.template.template_params2,
desc: props.template.desc, desc: props.template.desc,
analysis_params: props.template.analysis_params, analysis_params: props.template.analysis_params,
}) });
console.log(form.getFieldsValue().type) setTimeout(() => {
console.log(form.getFieldsValue().type);
setFlag(flag + 1);
}, 0);
if (option) { if (option) {
setTemplateName(option.filter(item => item.Type === props.template.type)) setTemplateName(option.filter(item => item.Type === props.template.type));
} }
}, [props.template]);
}, [props.template])
const layout = { const layout = {
layout: 'horizontal', layout: 'horizontal',
...@@ -49,23 +51,22 @@ const EditModal = props => { ...@@ -49,23 +51,22 @@ const EditModal = props => {
}, },
}; };
const onChangeType = (value) => { const onChangeType = value => {
console.log(option.filter(item => item.Type === value), '123'); console.log(option.filter(item => item.Type === value), '123');
setTemplateName(option.filter(item => item.Type === value)) setTemplateName(option.filter(item => item.Type === value));
} };
const onChange = (value, option) => { const onChange = (value, options) => {
form.setFieldsValue({ form.setFieldsValue({
third_id: option.code third_id: options.code,
}) });
// setTemplateName(option.filter(item => item.Type === value)) // setTemplateName(option.filter(item => item.Type === value))
}; };
const onChangeType1 = (value) => { const onChangeType1 = value => {
form.setFieldsValue({ form.setFieldsValue({
third_id: value third_id: value,
}) });
} };
return ( return (
<SiteModal <SiteModal
...@@ -80,7 +81,7 @@ const EditModal = props => { ...@@ -80,7 +81,7 @@ const EditModal = props => {
onOk={() => onSubmit()} onOk={() => onSubmit()}
confirmLoading={loading} confirmLoading={loading}
> >
<div style={{ width: "750px", height: "500px", overflowY: "scroll", overflowX: "hidden" }}> <div style={{ width: '750px', height: '500px', overflowY: 'scroll', overflowX: 'hidden' }}>
<Form form={form} {...layout} onFinish={onSubmitSuccess}> <Form form={form} {...layout} onFinish={onSubmitSuccess}>
<Row gutter={24}> <Row gutter={24}>
<Col span={11}> <Col span={11}>
...@@ -108,7 +109,7 @@ const EditModal = props => { ...@@ -108,7 +109,7 @@ const EditModal = props => {
}, },
]} ]}
> >
<Select onChange={(value) => onChangeType(value)}> <Select onChange={value => onChangeType(value)}>
<Select.Option value="公众号">公众号</Select.Option> <Select.Option value="公众号">公众号</Select.Option>
<Select.Option value="短信">短信</Select.Option> <Select.Option value="短信">短信</Select.Option>
<Select.Option value="企业微信">企业微信</Select.Option> <Select.Option value="企业微信">企业微信</Select.Option>
...@@ -116,7 +117,7 @@ const EditModal = props => { ...@@ -116,7 +117,7 @@ const EditModal = props => {
</Item> </Item>
</Col> </Col>
</Row> </Row>
{form.getFieldsValue().type == '企业微信'||props.template.type=='企业微信' ? {form.getFieldsValue().type === '企业微信' ? (
<> <>
<Row gutter={24}> <Row gutter={24}>
<Col span={11}> <Col span={11}>
...@@ -130,7 +131,11 @@ const EditModal = props => { ...@@ -130,7 +131,11 @@ const EditModal = props => {
}, },
]} ]}
> >
<Select style={{ width: '11.5rem' }} onChange={(value) => onChangeType1(value)} placeholder="请选择模板名称" > <Select
style={{ width: '11.5rem' }}
onChange={value => onChangeType1(value)}
placeholder="请选择模板名称"
>
<Select.Option value="普通文本">普通文本</Select.Option> <Select.Option value="普通文本">普通文本</Select.Option>
<Select.Option value="文字卡片">文字卡片</Select.Option> <Select.Option value="文字卡片">文字卡片</Select.Option>
<Select.Option value="图片消息">图片消息</Select.Option> <Select.Option value="图片消息">图片消息</Select.Option>
...@@ -154,7 +159,13 @@ const EditModal = props => { ...@@ -154,7 +159,13 @@ const EditModal = props => {
</Item> </Item>
</Col> </Col>
</Row> </Row>
</> : </>
) : (
''
)}
{form.getFieldsValue().type !== '企业微信' &&
form.getFieldsValue().type !== 'APP' &&
form.getFieldsValue().type !== 'WEB' ? (
<> <>
<Row gutter={24}> <Row gutter={24}>
<Col span={11}> <Col span={11}>
...@@ -171,7 +182,6 @@ const EditModal = props => { ...@@ -171,7 +182,6 @@ const EditModal = props => {
<Select <Select
placeholder="请选择模板名称" placeholder="请选择模板名称"
onChange={(value, option) => onChange(value, option)} onChange={(value, option) => onChange(value, option)}
> >
{templateName && {templateName &&
templateName.length > 0 && templateName.length > 0 &&
...@@ -198,14 +208,13 @@ const EditModal = props => { ...@@ -198,14 +208,13 @@ const EditModal = props => {
</Item> </Item>
</Col> </Col>
</Row> </Row>
</> </>
} ) : (
''
)}
<Row gutter={24}> <Row gutter={24}>
<Col span={1}> <Col span={1}>
<Item> <Item />
</Item>
</Col> </Col>
<Col span={23}> <Col span={23}>
<Item <Item
...@@ -228,9 +237,7 @@ const EditModal = props => { ...@@ -228,9 +237,7 @@ const EditModal = props => {
</Row> </Row>
<Row gutter={24}> <Row gutter={24}>
<Col span={1}> <Col span={1}>
<Item> <Item />
</Item>
</Col> </Col>
<Col span={23}> <Col span={23}>
<Item <Item
...@@ -238,17 +245,17 @@ const EditModal = props => { ...@@ -238,17 +245,17 @@ const EditModal = props => {
labelCol={{ span: 3 }} labelCol={{ span: 3 }}
style={{ marginLeft: '1.4rem' }} style={{ marginLeft: '1.4rem' }}
name="desc" name="desc"
> >
<TextArea rows={4} placeholder="first: 标题信息|Second: 展示内容|Third: 时间|Four: 备注信息" /> <TextArea
rows={4}
placeholder="first: 标题信息|Second: 展示内容|Third: 时间|Four: 备注信息"
/>
</Item> </Item>
</Col> </Col>
</Row> </Row>
<Row gutter={24}> <Row gutter={24}>
<Col span={1}> <Col span={1}>
<Item> <Item />
</Item>
</Col> </Col>
<Col span={23}> <Col span={23}>
<Item <Item
...@@ -264,6 +271,6 @@ const EditModal = props => { ...@@ -264,6 +271,6 @@ const EditModal = props => {
</Form> </Form>
</div> </div>
</SiteModal> </SiteModal>
) );
} };
export default EditModal; export default EditModal;
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