Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
c1facb6f
Commit
c1facb6f
authored
Jan 28, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改解决方案描述,修改消息方案配置bug
parent
99ec47cd
Pipeline
#43732
skipped with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
266 additions
and
261 deletions
+266
-261
CurrentSolution.jsx
src/pages/currentSolution/CurrentSolution.jsx
+3
-4
EditModal.jsx
...ter/messageManage/templateManage/components/EditModal.jsx
+263
-257
No files found.
src/pages/currentSolution/CurrentSolution.jsx
View file @
c1facb6f
...
...
@@ -112,15 +112,14 @@ const CurrentSolution = () => {
<
strong
>
友情提示:
</
strong
>
</
p
>
<
p
>
熊猫智慧水务应用解决方案的管理,集成了数据库管理、用户权限管理、基础平台管理、应用中心管理、系统日志管理等核心模块;
熊猫智慧水务应用解决方案的管理,集成了数据库管理、用户权限管理、基础平台管理、应用中心管理、
业务中心管理、
系统日志管理等核心模块;
</
p
>
<
p
>
主要为客户项目经理在实施应用部署的过程中提供可视化配置系统,一站式交付用户需求的熊猫智慧水务相关产品;
</
p
>
<
p
>
数据库支持SQL Server、Oracle、MongoDB、MySQL四大类常见数据库;
</
p
>
<
p
>
平台中心涵盖GIS平台、物联网平台、业务平台、消息平台等基础平台,2021年会推出数字孪生平台、数据治理平台、AI平台等进阶平台;
</
p
>
<
p
>
平台中心涵盖GIS平台、物联网平台、消息平台等基础平台;
</
p
>
<
p
>
业务中心涵盖表字段配置、台账管理、工单管理、巡维保等业务;
</
p
>
{
/* 无线App端、微信小程序端 */
}
<
p
>
应用中心主要把客户应用按端分离,分为PCWeb端、移动应用端,结合应用界面与菜单权限配置完成;
...
...
src/pages/platformCenter/messageManage/templateManage/components/EditModal.jsx
View file @
c1facb6f
import
React
,
{
useState
,
useEffect
}
from
'react'
import
React
,
{
useState
,
useEffect
}
from
'react'
;
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
{
TextArea
}
=
Input
;
const
EditModal
=
props
=>
{
const
{
option
,
visible
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
templateName
,
setTemplateName
]
=
useState
([]);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
onSubmit
=
()
=>
{
form
.
submit
()
}
const
onSubmitSuccess
=
()
=>
{
const
result
=
form
.
getFieldValue
()
props
.
onSubmit
&
props
.
onSubmit
({
Id
:
props
.
template
.
Id
,
...
result
})
}
const
{
option
,
visible
}
=
props
;
useEffect
(()
=>
{
form
.
setFieldsValue
({
name
:
props
.
template
.
name
,
type
:
props
.
template
.
type
,
third_name
:
props
.
template
.
third_name
,
third_id
:
props
.
template
.
third_id
,
weixin
:
props
.
template
.
weixin
,
params
:
props
.
template
.
template_params1
,
param1
:
props
.
template
.
template_params2
,
desc
:
props
.
template
.
desc
,
analysis_params
:
props
.
template
.
analysis_params
,
})
console
.
log
(
form
.
getFieldsValue
().
type
)
if
(
option
)
{
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
props
.
template
.
type
))
}
},
[
props
.
template
])
const
[
form
]
=
Form
.
useForm
();
const
[
templateName
,
setTemplateName
]
=
useState
([]);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
onSubmit
=
()
=>
{
form
.
submit
();
};
const
onSubmitSuccess
=
()
=>
{
const
result
=
form
.
getFieldValue
();
props
.
onSubmit
&
props
.
onSubmit
({
Id
:
props
.
template
.
Id
,
...
result
});
};
const
layout
=
{
layout
:
'horizontal'
,
labelCol
:
{
span
:
10
,
},
wrapperCol
:
{
span
:
19
,
},
};
useEffect
(()
=>
{
form
.
setFieldsValue
({
name
:
props
.
template
.
name
,
type
:
props
.
template
.
type
,
third_name
:
props
.
template
.
third_name
,
third_id
:
props
.
template
.
third_id
,
weixin
:
props
.
template
.
weixin
,
params
:
props
.
template
.
template_params1
,
param1
:
props
.
template
.
template_params2
,
desc
:
props
.
template
.
desc
,
analysis_params
:
props
.
template
.
analysis_params
,
});
setTimeout
(()
=>
{
console
.
log
(
form
.
getFieldsValue
().
type
);
setFlag
(
flag
+
1
);
},
0
);
const
onChangeType
=
(
value
)
=>
{
console
.
log
(
option
.
filter
(
item
=>
item
.
Type
===
value
),
'123'
);
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
value
))
if
(
option
)
{
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
props
.
template
.
type
));
}
const
onChange
=
(
value
,
option
)
=>
{
form
.
setFieldsValue
({
third_id
:
option
.
code
})
// setTemplateName(option.filter(item => item.Type === value))
};
const
onChangeType1
=
(
value
)
=>
{
form
.
setFieldsValue
({
third_id
:
value
})
}
return
(
<
SiteModal
{
...
props
}
title=
"模板编辑"
bodyStyle=
{
{
width
:
'100%'
,
minHeight
:
'100px'
}
}
style=
{
{
top
:
200
,
borderRadius
:
'20px'
}
}
width=
"820px"
destroyOnClose
cancelText=
"取消"
okText=
"确认"
onOk=
{
()
=>
onSubmit
()
}
confirmLoading=
{
loading
}
>
<
div
style=
{
{
width
:
"750px"
,
height
:
"500px"
,
overflowY
:
"scroll"
,
overflowX
:
"hidden"
}
}
>
<
Form
form=
{
form
}
{
...
layout
}
onFinish=
{
onSubmitSuccess
}
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
11
}
>
<
Item
label=
"模板名称"
name=
"name"
rules=
{
[
{
required
:
true
,
message
:
'请输入模板名称'
,
},
]
}
>
<
Input
placeholder=
"请输入模板名称"
/>
</
Item
>
</
Col
>
<
Col
span=
{
11
}
>
<
Item
label=
"模板类型"
name=
"type"
rules=
{
[
{
required
:
true
,
message
:
'请选择模板类型'
,
},
]
}
>
<
Select
onChange=
{
(
value
)
=>
onChangeType
(
value
)
}
>
<
Select
.
Option
value=
"公众号"
>
公众号
</
Select
.
Option
>
<
Select
.
Option
value=
"短信"
>
短信
</
Select
.
Option
>
<
Select
.
Option
value=
"企业微信"
>
企业微信
</
Select
.
Option
>
</
Select
>
</
Item
>
</
Col
>
</
Row
>
{
form
.
getFieldsValue
().
type
==
'企业微信'
||
props
.
template
.
type
==
'企业微信'
?
<>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
11
}
>
<
Item
label=
"第三方模板名称"
name=
"third_name"
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板名称'
,
},
]
}
>
<
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
>
</
Item
>
</
Col
>
<
Col
span=
{
11
}
>
<
Item
label=
"企业微信应用id"
// labelCol=
{{
span
:
11
}}
name=
"weixin"
rules=
{
[
{
required
:
true
,
message
:
'请输入企业微信号'
,
},
]
}
>
<
Input
placeholder=
"请输入企业微信号"
/>
</
Item
>
</
Col
>
</
Row
>
</>
:
<>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
11
}
>
<
Item
label=
"第三方模板名称"
name=
"third_name"
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板名称'
,
},
]
}
>
<
Select
placeholder=
"请选择模板名称"
onChange=
{
(
value
,
option
)
=>
onChange
(
value
,
option
)
}
>
{
templateName
&&
templateName
.
length
>
0
&&
templateName
.
map
((
item
,
index
)
=>
(
<
Option
value=
{
item
.
Name
}
key=
{
item
.
Name
+
index
}
code=
{
item
.
Code
}
>
{
item
.
Name
}
</
Option
>
))
}
</
Select
>
</
Item
>
</
Col
>
<
Col
span=
{
11
}
>
<
Item
label=
"第三方模板编号"
name=
"third_id"
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板编号'
,
},
]
}
>
<
Input
placeholder=
"请输入模板名称"
/>
</
Item
>
</
Col
>
</
Row
>
</>
}
<
Row
gutter=
{
24
}
>
<
Col
span=
{
1
}
>
<
Item
>
},
[
props
.
template
]);
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"模板参数1.0"
labelCol=
{
{
span
:
3
}
}
style=
{
{
marginLeft
:
'1.4rem'
}
}
name=
"params"
>
<
TextArea
rows=
{
2
}
placeholder=
"first|Second|Third|Four"
/>
</
Item
>
<
Item
label=
"模板参数2.0"
labelCol=
{
{
span
:
3
}
}
style=
{
{
marginLeft
:
'1.4rem'
}
}
name=
"param1"
>
<
TextArea
rows=
{
2
}
placeholder=
"first|Second|Third|Four"
/>
</
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
1
}
>
<
Item
>
const
layout
=
{
layout
:
'horizontal'
,
labelCol
:
{
span
:
10
,
},
wrapperCol
:
{
span
:
19
,
},
};
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"参数说明"
labelCol=
{
{
span
:
3
}
}
style=
{
{
marginLeft
:
'1.4rem'
}
}
name=
"desc"
const
onChangeType
=
value
=>
{
console
.
log
(
option
.
filter
(
item
=>
item
.
Type
===
value
),
'123'
);
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
value
));
};
const
onChange
=
(
value
,
options
)
=>
{
form
.
setFieldsValue
({
third_id
:
options
.
code
,
});
// setTemplateName(option.filter(item => item.Type === value))
};
>
<
TextArea
rows=
{
4
}
placeholder=
"first: 标题信息|Second: 展示内容|Third: 时间|Four: 备注信息"
/>
</
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
1
}
>
<
Item
>
const
onChangeType1
=
value
=>
{
form
.
setFieldsValue
({
third_id
:
value
,
});
};
</
Item
>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"解析规则"
labelCol=
{
{
span
:
3
}
}
style=
{
{
marginLeft
:
'1.4rem'
}
}
name=
"analysis_params"
>
<
TextArea
rows=
{
2
}
placeholder=
"param1|param2|param3|param4"
/>
</
Item
>
</
Col
>
</
Row
>
</
Form
>
</
div
>
</
SiteModal
>
)
}
export
default
EditModal
;
\ No newline at end of file
return
(
<
SiteModal
{
...
props
}
title=
"模板编辑"
bodyStyle=
{
{
width
:
'100%'
,
minHeight
:
'100px'
}
}
style=
{
{
top
:
200
,
borderRadius
:
'20px'
}
}
width=
"820px"
destroyOnClose
cancelText=
"取消"
okText=
"确认"
onOk=
{
()
=>
onSubmit
()
}
confirmLoading=
{
loading
}
>
<
div
style=
{
{
width
:
'750px'
,
height
:
'500px'
,
overflowY
:
'scroll'
,
overflowX
:
'hidden'
}
}
>
<
Form
form=
{
form
}
{
...
layout
}
onFinish=
{
onSubmitSuccess
}
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
11
}
>
<
Item
label=
"模板名称"
name=
"name"
rules=
{
[
{
required
:
true
,
message
:
'请输入模板名称'
,
},
]
}
>
<
Input
placeholder=
"请输入模板名称"
/>
</
Item
>
</
Col
>
<
Col
span=
{
11
}
>
<
Item
label=
"模板类型"
name=
"type"
rules=
{
[
{
required
:
true
,
message
:
'请选择模板类型'
,
},
]
}
>
<
Select
onChange=
{
value
=>
onChangeType
(
value
)
}
>
<
Select
.
Option
value=
"公众号"
>
公众号
</
Select
.
Option
>
<
Select
.
Option
value=
"短信"
>
短信
</
Select
.
Option
>
<
Select
.
Option
value=
"企业微信"
>
企业微信
</
Select
.
Option
>
</
Select
>
</
Item
>
</
Col
>
</
Row
>
{
form
.
getFieldsValue
().
type
===
'企业微信'
?
(
<>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
11
}
>
<
Item
label=
"第三方模板名称"
name=
"third_name"
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板名称'
,
},
]
}
>
<
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
>
</
Item
>
</
Col
>
<
Col
span=
{
11
}
>
<
Item
label=
"企业微信应用id"
// labelCol=
{{
span
:
11
}}
name=
"weixin"
rules=
{
[
{
required
:
true
,
message
:
'请输入企业微信号'
,
},
]
}
>
<
Input
placeholder=
"请输入企业微信号"
/>
</
Item
>
</
Col
>
</
Row
>
</>
)
:
(
''
)
}
{
form
.
getFieldsValue
().
type
!==
'企业微信'
&&
form
.
getFieldsValue
().
type
!==
'APP'
&&
form
.
getFieldsValue
().
type
!==
'WEB'
?
(
<>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
11
}
>
<
Item
label=
"第三方模板名称"
name=
"third_name"
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板名称'
,
},
]
}
>
<
Select
placeholder=
"请选择模板名称"
onChange=
{
(
value
,
option
)
=>
onChange
(
value
,
option
)
}
>
{
templateName
&&
templateName
.
length
>
0
&&
templateName
.
map
((
item
,
index
)
=>
(
<
Option
value=
{
item
.
Name
}
key=
{
item
.
Name
+
index
}
code=
{
item
.
Code
}
>
{
item
.
Name
}
</
Option
>
))
}
</
Select
>
</
Item
>
</
Col
>
<
Col
span=
{
11
}
>
<
Item
label=
"第三方模板编号"
name=
"third_id"
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板编号'
,
},
]
}
>
<
Input
placeholder=
"请输入模板名称"
/>
</
Item
>
</
Col
>
</
Row
>
</>
)
:
(
''
)
}
<
Row
gutter=
{
24
}
>
<
Col
span=
{
1
}
>
<
Item
/>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"模板参数1.0"
labelCol=
{
{
span
:
3
}
}
style=
{
{
marginLeft
:
'1.4rem'
}
}
name=
"params"
>
<
TextArea
rows=
{
2
}
placeholder=
"first|Second|Third|Four"
/>
</
Item
>
<
Item
label=
"模板参数2.0"
labelCol=
{
{
span
:
3
}
}
style=
{
{
marginLeft
:
'1.4rem'
}
}
name=
"param1"
>
<
TextArea
rows=
{
2
}
placeholder=
"first|Second|Third|Four"
/>
</
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
1
}
>
<
Item
/>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"参数说明"
labelCol=
{
{
span
:
3
}
}
style=
{
{
marginLeft
:
'1.4rem'
}
}
name=
"desc"
>
<
TextArea
rows=
{
4
}
placeholder=
"first: 标题信息|Second: 展示内容|Third: 时间|Four: 备注信息"
/>
</
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
1
}
>
<
Item
/>
</
Col
>
<
Col
span=
{
23
}
>
<
Item
label=
"解析规则"
labelCol=
{
{
span
:
3
}
}
style=
{
{
marginLeft
:
'1.4rem'
}
}
name=
"analysis_params"
>
<
TextArea
rows=
{
2
}
placeholder=
"param1|param2|param3|param4"
/>
</
Item
>
</
Col
>
</
Row
>
</
Form
>
</
div
>
</
SiteModal
>
);
};
export
default
EditModal
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment