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
98495357
Commit
98495357
authored
Mar 26, 2021
by
mayongxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf:新增消息模板管理
parent
0b30e293
Pipeline
#25101
skipped with stages
Changes
5
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
161 additions
and
8 deletions
+161
-8
TemplateManage.jsx
...ormCenter/messageManage/templateManage/TemplateManage.jsx
+0
-0
TemplateManage.less
...rmCenter/messageManage/templateManage/TemplateManage.less
+2
-3
AddModal.jsx
...nter/messageManage/templateManage/components/AddModal.jsx
+127
-0
EditModal.jsx
...ter/messageManage/templateManage/components/EditModal.jsx
+20
-5
messagemanage.jsx
src/services/platform/messagemanage.jsx
+12
-0
No files found.
src/pages/platformCenter/messageManage/templateManage/TemplateManage.jsx
View file @
98495357
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/messageManage/templateManage/TemplateManage.less
View file @
98495357
...
...
@@ -39,8 +39,6 @@
width: 100%;
height: calc(100vh - 184px);
background-color: white;
display: flex;
flex-direction: column;
justify-content: flex-start;
overflow-y: scroll;
}
}
\ No newline at end of file
src/pages/platformCenter/messageManage/templateManage/components/AddModal.jsx
0 → 100644
View file @
98495357
import
React
,
{
useState
,
useEffect
}
from
'react'
import
SiteModal
from
'@/components/Modal/SiteModa'
;
import
{
Form
,
Input
,
notification
,
Select
}
from
'antd'
const
{
Item
}
=
Form
;
const
AddModal
=
props
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
onSubmit
=
()
=>
{
let
result
=
form
.
getFieldValue
()
props
.
onSubmit
&
props
.
onSubmit
({...
result
})
}
// useEffect(()=>{
// },[props.template])
return
(
<
SiteModal
{
...
props
}
title=
"模板添加"
bodyStyle=
{
{
width
:
'100%'
,
minHeight
:
'100px'
}
}
style=
{
{
top
:
200
,
borderRadius
:
'20px'
}
}
width=
"800px"
destroyOnClose
cancelText=
"取消"
okText=
"确认"
onOk=
{
()
=>
onSubmit
()
}
confirmLoading=
{
loading
}
>
<
Form
form=
{
form
}
labelCol=
{
{
span
:
4
}
}
>
<
Item
label=
"模板名称"
name=
"name"
rules=
{
[
{
required
:
true
,
message
:
'请输入模板名称'
,
},
]
}
>
<
Input
placeholder=
"请输入模板名称"
/>
</
Item
>
<
Item
label=
"模板类型"
name=
"type"
rules=
{
[
{
required
:
true
,
message
:
'请选择模板类型'
,
},
]
}
>
<
Select
defaultValue=
{
"公众号"
}
>
<
Option
value=
"公众号"
>
公众号
</
Option
>
<
Option
value=
"短信"
>
短信
</
Option
>
</
Select
>
</
Item
>
<
Item
label=
"第三方模板名称"
name=
"third_name"
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板名称'
,
},
]
}
>
<
Input
placeholder=
"请输入模板名称"
/>
</
Item
>
<
Item
label=
"第三方模板编号"
name=
"third_id"
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板编号'
,
},
]
}
>
<
Input
placeholder=
"请输入模板名称"
/>
</
Item
>
<
Item
label=
"模板参数"
name=
"params"
rules=
{
[
{
required
:
true
,
message
:
'请输入模板参数'
,
},
]
}
>
<
Input
placeholder=
"请输入模板参数"
/>
</
Item
>
<
Item
label=
"参数说明"
name=
"desc"
rules=
{
[
{
required
:
true
,
message
:
'请输入参数说明'
,
},
]
}
>
<
Input
placeholder=
"请输入参数说明"
/>
</
Item
>
<
Item
label=
"参数解析"
name=
"analysis_params"
rules=
{
[
{
required
:
true
,
message
:
'请输入参数解析'
,
},
]
}
>
<
Input
placeholder=
"请输入参数解析"
/>
</
Item
>
</
Form
>
</
SiteModal
>
)
}
export
default
AddModal
;
\ No newline at end of file
src/pages/platformCenter/messageManage/templateManage/components/EditModal.jsx
View file @
98495357
...
...
@@ -6,14 +6,29 @@ const { Item } = Form;
const
EditModal
=
props
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
onSubmit
=
()
=>
{
}
const
onSubmit
=
()
=>
{
let
result
=
form
.
getFieldValue
()
props
.
onSubmit
&
props
.
onSubmit
({
Id
:
props
.
template
.
Id
,...
result
})
}
useEffect
(()
=>
{
form
.
setFieldsValue
({
name
:
props
.
template
.
name
,
type
:
props
.
template
.
type
,
third_name
:
props
.
template
.
third_name
,
third_id
:
props
.
template
.
third_id
,
params
:
props
.
template
.
template_params
,
desc
:
props
.
template
.
desc
,
analysis_params
:
props
.
template
.
analysis_params
,
})
},[
props
.
template
])
return
(
<
SiteModal
{
...
props
}
title=
"
编辑站点
"
title=
"
模板编辑
"
bodyStyle=
{
{
width
:
'100%'
,
minHeight
:
'100px'
}
}
style=
{
{
top
:
200
,
borderRadius
:
'20px'
}
}
width=
"800px"
...
...
@@ -47,8 +62,8 @@ const EditModal = props => {
]
}
>
<
Select
>
<
Option
value=
"
1
"
>
公众号
</
Option
>
<
Option
value=
"
2
"
>
短信
</
Option
>
<
Option
value=
"
公众号
"
>
公众号
</
Option
>
<
Option
value=
"
短信
"
>
短信
</
Option
>
</
Select
>
</
Item
>
<
Item
...
...
src/services/platform/messagemanage.jsx
0 → 100644
View file @
98495357
import
{
get
,
post
,
PUBLISH_SERVICE
,
CITY_SERVICE
}
from
'@/services/index'
;
export
const
GetMessageTemplate
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/MessageTemplate/GetMessageTemplate`
,
param
);
export
const
InsertMessageTemplate
=
param
=>
post
(
`
${
PUBLISH_SERVICE
}
/MessageTemplate/InsertMessageTemplate`
,
param
);
export
const
UpdateMessageTemplate
=
param
=>
post
(
`
${
PUBLISH_SERVICE
}
/MessageTemplate/UpdateMessageTemplate`
,
param
);
export
const
DeleteMessageTemplate
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/MessageTemplate/DeleteMessageTemplate`
,
param
);
export
const
GetThirdpartyTemplates
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/MessageTemplate/GetThirdpartyTemplates`
,
param
);
\ No newline at end of file
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