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
c0cf7174
Commit
c0cf7174
authored
Apr 28, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '消息平台推送模板配置新增WEB,APP配置'
parent
9e324b11
Pipeline
#49031
passed with stages
in 4 minutes 34 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
284 additions
and
229 deletions
+284
-229
index.jsx
src/components/ExpendableTree/index.jsx
+3
-2
standingBook.jsx
src/pages/bsmanager/base/standingBook/standingBook.jsx
+31
-7
AddModal.jsx
...nter/messageManage/templateManage/components/AddModal.jsx
+121
-103
EditModal.jsx
...ter/messageManage/templateManage/components/EditModal.jsx
+129
-117
No files found.
src/components/ExpendableTree/index.jsx
View file @
c0cf7174
...
...
@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-03-04 18:33:24
* @LastEditTime: 2022-0
3-24 17:41:25
* @LastEditTime: 2022-0
4-27 14:26:14
* @LastEditors: leizhe
*/
import
{
Tree
}
from
'antd'
;
...
...
@@ -18,7 +18,8 @@ export default props => {
const
{
expandedKeys
,
onExpand
,
onSelect
,
selectedKeys
,
keepTree
,
...
rest
}
=
props
;
const
[
epKeys
,
setEpKeys
]
=
useState
([
expandedKeys
]);
useEffect
(()
=>
{
console
.
log
(
expandedKeys
,
'expandedKeys'
);
console
.
log
(
expandedKeys
);
console
.
log
(
selectedKeys
);
setEpKeys
([
expandedKeys
]);
},
[
expandedKeys
]);
...
...
src/pages/bsmanager/base/standingBook/standingBook.jsx
View file @
c0cf7174
...
...
@@ -31,6 +31,7 @@ const StandingBook = props => {
const
[
allData
,
setAllData
]
=
useState
([]);
const
[
tableData
,
setTableData
]
=
useState
([]);
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
const
[
tableLoading
,
setTableLoading
]
=
useState
(
false
);
const
[
maxLength
,
setMaxLength
]
=
useState
(
0
);
const
[
treeVisible
,
setTreeVisible
]
=
useState
(
true
);
// 左边列表是否可见
const
[
formObj
,
setFormObj
]
=
useState
(
''
);
...
...
@@ -180,7 +181,7 @@ const StandingBook = props => {
setShowSearchStyle
(
false
);
// 第一次进入展示第一页 不是第一次进入根据当前选择的来进行展示
flag
===
0
?
setPickItem
(
newArr
[
0
])
:
setPickItem
(
pickItem
);
// pickItem ? setPickItem(pickItem) :
setPickItem(newArr[0]);
setPickItem
(
newArr
[
0
]);
console
.
log
(
newArr
,
'newArr'
);
setTableData
(
newArr
);
}
...
...
@@ -257,9 +258,9 @@ const StandingBook = props => {
const
onSearch
=
()
=>
{
console
.
log
(
searchWord
);
console
.
log
(
pickItem
);
setT
re
eLoading
(
true
);
setT
abl
eLoading
(
true
);
GetCM_Ledger_LoadLedgers
({
accountName
:
searchWord
}).
then
(
res
=>
{
setT
re
eLoading
(
false
);
setT
abl
eLoading
(
false
);
if
(
res
.
msg
===
'Ok'
&&
res
.
data
.
root
)
{
console
.
log
(
res
.
data
.
root
);
setMaxLength
(
res
.
data
.
root
.
length
+
1
);
...
...
@@ -270,7 +271,7 @@ const StandingBook = props => {
});
console
.
log
(
arr
);
setShowSearchStyle
(
true
);
setAllData
(
arr
);
//
setAllData(arr);
setSearchData
(
res
.
data
.
root
);
setPickItem
(
''
);
// 第一次进入展示第一页 不是第一次进入根据当前选择的来进行展示
...
...
@@ -285,7 +286,27 @@ const StandingBook = props => {
console
.
log
(
e
.
target
.
value
);
setSearchWord
(
e
.
target
.
value
);
if
(
e
.
target
.
value
==
''
)
{
handleReset
();
setTableLoading
(
true
);
GetCM_Ledger_LoadLedgers
().
then
(
res
=>
{
setTableLoading
(
false
);
if
(
res
.
msg
===
'Ok'
&&
res
.
data
.
root
)
{
console
.
log
(
res
.
data
.
root
);
setMaxLength
(
res
.
data
.
root
.
length
+
1
);
let
arr
=
formateArrDataA
(
res
.
data
.
root
,
'type'
);
let
newArr
=
[];
Object
.
keys
(
arr
).
map
((
item
,
index
)
=>
{
newArr
.
push
(
item
);
});
console
.
log
(
arr
);
setAllData
(
arr
);
setShowSearchStyle
(
false
);
// 第一次进入展示第一页 不是第一次进入根据当前选择的来进行展示
flag
===
0
?
setPickItem
(
newArr
[
0
])
:
setPickItem
(
pickItem
);
setPickItem
(
newArr
[
0
]);
console
.
log
(
newArr
,
'newArr'
);
setTableData
(
newArr
);
}
});
}
};
...
...
@@ -301,7 +322,6 @@ const StandingBook = props => {
};
const
handleReset
=
()
=>
{
setFlag
(
flag
+
1
);
setSearchWord
(
''
);
};
return
(
<
PageContainer
className=
{
styles
.
userManageContainer
}
>
...
...
@@ -354,7 +374,10 @@ const StandingBook = props => {
[
styles
.
pickItem
]:
item
===
pickItem
,
[
styles
.
listHover
]:
item
!==
pickItem
&&
item
===
hoverItemIndex
,
})
}
onClick=
{
e
=>
setPickItem
(
item
)
}
onClick=
{
()
=>
{
setPickItem
(
item
);
setSearchWord
(
''
);
}
}
onMouseEnter=
{
()
=>
{
setHoverItemIndex
(
item
);
}
}
...
...
@@ -422,6 +445,7 @@ const StandingBook = props => {
};
}
}
columns=
{
columns
}
loading=
{
tableLoading
}
dataSource=
{
pickItem
?
allData
[
pickItem
]
:
searchData
}
// loading={tableLoading}
scroll=
{
{
x
:
'max-content'
,
y
:
'calc(100vh - 180px)'
}
}
...
...
src/pages/platformCenter/messageManage/templateManage/components/AddModal.jsx
View file @
c0cf7174
/* eslint-disable default-case */
/* eslint-disable no-undef */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
SiteModal
from
'@/components/Modal/SiteModa'
;
import
{
Form
,
Input
,
notification
,
Select
,
Row
,
Col
}
from
'antd'
;
...
...
@@ -6,7 +8,7 @@ const { Item } = Form;
const
{
TextArea
}
=
Input
;
const
AddModal
=
props
=>
{
const
{
option
,
messageVersion
}
=
props
;
const
{
option
,
messageVersion
,
visible
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
loading
,
setLoading
]
=
useState
(
false
);
...
...
@@ -16,16 +18,25 @@ const AddModal = props => {
};
const
onSubmitSuccess
=
()
=>
{
const
result
=
form
.
getFieldValue
();
if
(
result
.
type
==
'APP'
||
result
.
type
==
'WEB'
)
{
delete
result
.
third_id
;
delete
result
.
third_name
;
delete
result
.
weixin
;
}
console
.
log
(
result
.
type
);
console
.
log
(
result
);
props
.
onSubmit
&
props
.
onSubmit
({
Id
:
props
.
template
.
Id
,
...
result
});
form
.
resetFields
();
};
useEffect
(()
=>
{
console
.
log
(
option
);
if
(
option
)
{
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
'公众号'
));
form
.
setFieldsValue
({
type
:
'公众号'
,
});
if
(
visible
)
{
console
.
log
(
option
);
if
(
option
)
{
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
'公众号'
));
form
.
setFieldsValue
({
type
:
'公众号'
,
});
}
}
},
[
props
]);
const
layout
=
{
...
...
@@ -37,9 +48,7 @@ const AddModal = props => {
span
:
19
,
},
};
// useEffect(()=>{
// },[props.template])
const
onChange
=
(
value
,
option
)
=>
{
form
.
setFieldsValue
({
third_id
:
option
.
code
,
...
...
@@ -47,6 +56,7 @@ const AddModal = props => {
// setTemplateName(option.filter(item => item.Type === value))
};
const
onChangeType
=
value
=>
{
form
.
setFieldsValue
({
third_name
:
''
,
third_id
:
''
,
weixin
:
''
});
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
value
));
console
.
log
(
option
.
filter
(
item
=>
item
.
Type
===
value
));
};
...
...
@@ -116,114 +126,122 @@ const AddModal = props => {
<
Select
style=
{
{
width
:
'85%'
}
}
onChange=
{
value
=>
onChangeType
(
value
)
}
>
<
Select
.
Option
value=
"公众号"
>
公众号
</
Select
.
Option
>
<
Select
.
Option
value=
"短信"
>
短信
</
Select
.
Option
>
<
Select
.
Option
value=
"APP"
>
APP
</
Select
.
Option
>
<
Select
.
Option
value=
"WEB"
>
WEB
</
Select
.
Option
>
<
Select
.
Option
value=
"企业微信"
>
企业微信
</
Select
.
Option
>
</
Select
>
</
Item
>
</
Col
>
</
Row
>
{
form
.
getFieldsValue
().
type
!==
'企业微信'
?
(
<>
<
Row
>
<
Col
span=
{
12
}
>
<
Item
label=
"第三方模板名称"
name=
"third_name"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
rules=
{
[
{
required
:
true
,
message
:
'请选择第三方模板名称'
,
},
]
}
>
{
/* <Input placeholder="请输入模板名称" /> */
}
<
Select
placeholder=
"请选择模板名称"
style=
{
{
width
:
'120%'
}
}
onChange=
{
(
value
,
option
)
=>
onChange
(
value
,
option
)
}
>
{
templateName
&&
templateName
.
length
>
0
&&
templateName
.
map
((
item
,
index
)
=>
(
<
Select
.
Option
value=
{
item
.
Name
}
key=
{
index
}
code=
{
item
.
Code
}
>
{
item
.
Name
}
</
Select
.
Option
>
))
}
</
Select
>
</
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Item
label=
"第三方模板编号"
name=
"third_id"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板编号'
,
},
]
}
>
<
Input
placeholder=
"请输入第三方模板编号"
style=
{
{
width
:
'85%'
}
}
/>
</
Item
>
</
Col
>
</
Row
>
</>
{
form
.
getFieldsValue
().
type
===
'APP'
||
form
.
getFieldsValue
().
type
===
'WEB'
?
(
<></>
)
:
(
<>
<
Row
>
<
Col
span=
{
12
}
>
<
Item
label=
"第三方模板名称"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
name=
"third_name"
rules=
{
[
{
required
:
true
,
message
:
'请选择第三方模板名称'
,
},
]
}
>
<
Select
style=
{
{
width
:
'120%'
}
}
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=
{
12
}
>
<
Item
label=
"企业微信应用id"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
name=
"weixin"
rules=
{
[
{
required
:
true
,
message
:
'请输入企业微信号'
,
},
]
}
>
<
Input
placeholder=
"请输入企业微信号"
style=
{
{
width
:
'160px'
}
}
/>
</
Item
>
</
Col
>
</
Row
>
{
form
.
getFieldsValue
().
type
!==
'企业微信'
?
(
<>
<
Row
>
<
Col
span=
{
12
}
>
<
Item
label=
"第三方模板名称"
name=
"third_name"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
rules=
{
[
{
required
:
true
,
message
:
'请选择第三方模板名称'
,
},
]
}
>
{
/* <Input placeholder="请输入模板名称" /> */
}
<
Select
placeholder=
"请选择模板名称"
style=
{
{
width
:
'120%'
}
}
onChange=
{
(
value
,
option
)
=>
onChange
(
value
,
option
)
}
>
{
templateName
&&
templateName
.
length
>
0
&&
templateName
.
map
((
item
,
index
)
=>
(
<
Select
.
Option
value=
{
item
.
Name
}
key=
{
index
}
code=
{
item
.
Code
}
>
{
item
.
Name
}
</
Select
.
Option
>
))
}
</
Select
>
</
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Item
label=
"第三方模板编号"
name=
"third_id"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板编号'
,
},
]
}
>
<
Input
placeholder=
"请输入第三方模板编号"
style=
{
{
width
:
'85%'
}
}
/>
</
Item
>
</
Col
>
</
Row
>
</>
)
:
(
<>
<
Row
>
<
Col
span=
{
12
}
>
<
Item
label=
"第三方模板名称"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
name=
"third_name"
rules=
{
[
{
required
:
true
,
message
:
'请选择第三方模板名称'
,
},
]
}
>
<
Select
style=
{
{
width
:
'120%'
}
}
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=
{
12
}
>
<
Item
label=
"企业微信应用id"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
name=
"weixin"
rules=
{
[
{
required
:
true
,
message
:
'请输入企业微信号'
,
},
]
}
>
<
Input
placeholder=
"请输入企业微信号"
style=
{
{
width
:
'160px'
}
}
/>
</
Item
>
</
Col
>
</
Row
>
</>
)
}
</>
)
}
<
Item
label=
"模板参数(仅针对2.0规则)"
labelCol=
{
{
span
:
6
}
}
name=
"params"
>
<
TextArea
rows=
{
2
}
style=
{
{
width
:
'95%'
}
}
placeholder=
"first|Second|Third|Four"
/>
</
Item
>
<
Item
label=
"
模板
参数(仅针对2.0规则)"
labelCol=
{
{
span
:
6
}
}
name=
"param1"
>
<
Item
label=
"
解析
参数(仅针对2.0规则)"
labelCol=
{
{
span
:
6
}
}
name=
"param1"
>
<
TextArea
rows=
{
2
}
style=
{
{
width
:
'95%'
}
}
placeholder=
"first|Second|Third|Four"
/>
</
Item
>
<
Item
label=
"参数说明"
name=
"desc"
labelCol=
{
{
span
:
6
}
}
>
...
...
src/pages/platformCenter/messageManage/templateManage/components/EditModal.jsx
View file @
c0cf7174
...
...
@@ -16,28 +16,37 @@ const EditModal = props => {
};
const
onSubmitSuccess
=
()
=>
{
const
result
=
form
.
getFieldValue
();
if
(
result
.
type
==
'APP'
||
result
.
type
==
'WEB'
)
{
delete
result
.
third_id
;
delete
result
.
third_name
;
delete
result
.
weixin
;
}
props
.
onSubmit
&
props
.
onSubmit
({
Id
:
props
.
template
.
Id
,
...
result
});
form
.
resetFields
();
};
useEffect
(()
=>
{
form
.
setFieldsValue
({
name
:
props
.
template
.
name
,
type
:
props
.
template
.
type
,
third_name
:
props
.
template
.
third_name
==
'-'
?
''
:
props
.
template
.
third_name
,
third_id
:
props
.
template
.
third_id
==
'-'
?
''
:
props
.
template
.
third_id
,
weixin
:
props
.
template
.
weixin
==
'-'
?
''
:
props
.
template
.
weixin
,
params
:
props
.
template
.
template_params1
==
'-'
?
''
:
props
.
template
.
template_params1
,
param1
:
props
.
template
.
template_params2
==
'-'
?
''
:
props
.
template
.
template_params2
,
desc
:
props
.
template
.
desc
==
'-'
?
''
:
props
.
template
.
desc
,
analysis_params
:
props
.
template
.
analysis_params
==
'-'
?
''
:
props
.
template
.
analysis_params
,
});
setTimeout
(()
=>
{
console
.
log
(
form
.
getFieldsValue
().
type
);
setFlag
(
flag
+
1
);
},
0
);
if
(
visible
)
{
form
.
setFieldsValue
({
name
:
props
.
template
.
name
,
type
:
props
.
template
.
type
,
third_name
:
props
.
template
.
third_name
==
'-'
?
''
:
props
.
template
.
third_name
,
third_id
:
props
.
template
.
third_id
==
'-'
?
''
:
props
.
template
.
third_id
,
weixin
:
props
.
template
.
weixin
==
'-'
?
''
:
props
.
template
.
weixin
,
params
:
props
.
template
.
template_params1
==
'-'
?
''
:
props
.
template
.
template_params1
,
param1
:
props
.
template
.
template_params2
==
'-'
?
''
:
props
.
template
.
template_params2
,
desc
:
props
.
template
.
desc
==
'-'
?
''
:
props
.
template
.
desc
,
analysis_params
:
props
.
template
.
analysis_params
==
'-'
?
''
:
props
.
template
.
analysis_params
,
});
setTimeout
(()
=>
{
console
.
log
(
form
.
getFieldsValue
().
type
);
setFlag
(
flag
+
1
);
},
0
);
if
(
option
)
{
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
props
.
template
.
type
));
if
(
option
)
{
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
props
.
template
.
type
));
}
}
},
[
props
.
template
,
visible
]);
...
...
@@ -52,6 +61,7 @@ const EditModal = props => {
};
const
onChangeType
=
value
=>
{
form
.
setFieldsValue
({
third_name
:
''
,
third_id
:
''
,
weixin
:
''
});
console
.
log
(
option
.
filter
(
item
=>
item
.
Type
===
value
),
'123'
);
setTemplateName
(
option
.
filter
(
item
=>
item
.
Type
===
value
));
};
...
...
@@ -128,118 +138,120 @@ const EditModal = props => {
<
Select
style=
{
{
width
:
'85%'
}
}
onChange=
{
value
=>
onChangeType
(
value
)
}
>
<
Select
.
Option
value=
"公众号"
>
公众号
</
Select
.
Option
>
<
Select
.
Option
value=
"短信"
>
短信
</
Select
.
Option
>
<
Select
.
Option
value=
"APP"
>
APP
</
Select
.
Option
>
<
Select
.
Option
value=
"WEB"
>
WEB
</
Select
.
Option
>
<
Select
.
Option
value=
"企业微信"
>
企业微信
</
Select
.
Option
>
</
Select
>
</
Item
>
</
Col
>
</
Row
>
{
form
.
getFieldsValue
().
type
===
'企业微信'
?
(
<>
<
Row
>
<
Col
span=
{
12
}
>
<
Item
label=
"第三方模板名称"
name=
"third_name"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板名称'
,
},
]
}
>
<
Select
style=
{
{
width
:
'120%'
}
}
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=
{
12
}
>
<
Item
label=
"企业微信应用id"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
name=
"weixin"
rules=
{
[
{
required
:
true
,
message
:
'请输入企业微信号'
,
},
]
}
>
<
Input
placeholder=
"请输入企业微信号"
style=
{
{
width
:
'160px'
}
}
/>
</
Item
>
</
Col
>
</
Row
>
</>
{
form
.
getFieldsValue
().
type
===
'APP'
||
form
.
getFieldsValue
().
type
===
'WEB'
?
(
<></>
)
:
(
''
)
}
{
form
.
getFieldsValue
().
type
!==
'企业微信'
&&
form
.
getFieldsValue
().
type
!==
'APP'
&&
form
.
getFieldsValue
().
type
!==
'WEB'
?
(
<>
<
Row
>
<
Col
span=
{
12
}
>
<
Item
label=
"第三方模板名称"
name=
"third_name"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板名称'
,
},
]
}
>
<
Select
placeholder=
"请选择模板名称"
style=
{
{
width
:
'120%'
}
}
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=
{
12
}
>
<
Item
label=
"第三方模板编号"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
name=
"third_id"
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板编号'
,
},
]
}
>
<
Input
placeholder=
"请输入模板名称"
style=
{
{
width
:
'85%'
}
}
/>
</
Item
>
</
Col
>
</
Row
>
{
form
.
getFieldsValue
().
type
!==
'企业微信'
?
(
<>
<
Row
>
<
Col
span=
{
12
}
>
<
Item
label=
"第三方模板名称"
name=
"third_name"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
rules=
{
[
{
required
:
true
,
message
:
'请选择第三方模板名称'
,
},
]
}
>
{
/* <Input placeholder="请输入模板名称" /> */
}
<
Select
placeholder=
"请选择模板名称"
style=
{
{
width
:
'120%'
}
}
onChange=
{
(
value
,
option
)
=>
onChange
(
value
,
option
)
}
>
{
templateName
&&
templateName
.
length
>
0
&&
templateName
.
map
((
item
,
index
)
=>
(
<
Select
.
Option
value=
{
item
.
Name
}
key=
{
index
}
code=
{
item
.
Code
}
>
{
item
.
Name
}
</
Select
.
Option
>
))
}
</
Select
>
</
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Item
label=
"第三方模板编号"
name=
"third_id"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
rules=
{
[
{
required
:
true
,
message
:
'请输入第三方模板编号'
,
},
]
}
>
<
Input
placeholder=
"请输入第三方模板编号"
style=
{
{
width
:
'85%'
}
}
/>
</
Item
>
</
Col
>
</
Row
>
</>
)
:
(
<>
<
Row
>
<
Col
span=
{
12
}
>
<
Item
label=
"第三方模板名称"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
name=
"third_name"
rules=
{
[
{
required
:
true
,
message
:
'请选择第三方模板名称'
,
},
]
}
>
<
Select
style=
{
{
width
:
'120%'
}
}
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=
{
12
}
>
<
Item
label=
"企业微信应用id"
wrapperCol=
{
{
span
:
12
}
}
labelCol=
{
{
span
:
12
}
}
name=
"weixin"
rules=
{
[
{
required
:
true
,
message
:
'请输入企业微信号'
,
},
]
}
>
<
Input
placeholder=
"请输入企业微信号"
style=
{
{
width
:
'160px'
}
}
/>
</
Item
>
</
Col
>
</
Row
>
</>
)
}
</>
)
:
(
''
)
}
<
Item
label=
"模板参数(仅针对2.0规则)"
labelCol=
{
{
span
:
6
}
}
name=
"params"
>
<
TextArea
rows=
{
2
}
style=
{
{
width
:
'95%'
}
}
placeholder=
"first|Second|Third|Four"
/>
</
Item
>
<
Item
label=
"
模板
参数(仅针对2.0规则)"
labelCol=
{
{
span
:
6
}
}
name=
"param1"
>
<
Item
label=
"
解析
参数(仅针对2.0规则)"
labelCol=
{
{
span
:
6
}
}
name=
"param1"
>
<
TextArea
rows=
{
2
}
style=
{
{
width
:
'95%'
}
}
placeholder=
"first|Second|Third|Four"
/>
</
Item
>
<
Item
label=
"参数说明"
labelCol=
{
{
span
:
6
}
}
name=
"desc"
>
...
...
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