Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
681cd9b2
提交
681cd9b2
authored
5月 29, 2019
作者:
sin-ning@aliyun.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
短信收尾
- 添加修改,sign 签名下拉选择 - 短信模板 sign 下拉查询 - 添加重置 form 表单
上级
780ed5b2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
54 行增加
和
18 行删除
+54
-18
SignList.js
admin-web/src/pages/Sms/SignList.js
+1
-0
TemplateList.js
admin-web/src/pages/Sms/TemplateList.js
+31
-12
TemplateListModal.js
admin-web/src/pages/Sms/TemplateListModal.js
+11
-3
TemplateListSearch.js
admin-web/src/pages/Sms/TemplateListSearch.js
+11
-3
没有找到文件。
admin-web/src/pages/Sms/SignList.js
浏览文件 @
681cd9b2
...
@@ -58,6 +58,7 @@ class SignList extends PureComponent {
...
@@ -58,6 +58,7 @@ class SignList extends PureComponent {
visible
:
true
,
visible
:
true
,
type
:
'add'
,
type
:
'add'
,
title
:
'添加签名'
,
title
:
'添加签名'
,
sign
:
{},
});
});
};
};
...
...
admin-web/src/pages/Sms/TemplateList.js
浏览文件 @
681cd9b2
...
@@ -9,7 +9,8 @@ import styles from '../List/TableList.less';
...
@@ -9,7 +9,8 @@ import styles from '../List/TableList.less';
import
TemplateListSearch
from
'./TemplateListSearch'
;
import
TemplateListSearch
from
'./TemplateListSearch'
;
import
TemplateListModal
from
'./TemplateListModal'
;
import
TemplateListModal
from
'./TemplateListModal'
;
@
connect
(({
smsTemplateList
,
loading
})
=>
({
@
connect
(({
smsSignList
,
smsTemplateList
,
loading
})
=>
({
smsSignList
,
smsTemplateList
,
smsTemplateList
,
loading
:
loading
.
models
.
smsTemplateList
,
loading
:
loading
.
models
.
smsTemplateList
,
}))
}))
...
@@ -19,7 +20,7 @@ class TemplateList extends PureComponent {
...
@@ -19,7 +20,7 @@ class TemplateList extends PureComponent {
title
:
'添加模板'
,
// 添加签名 修改签名
title
:
'添加模板'
,
// 添加签名 修改签名
type
:
'add'
,
// add update
type
:
'add'
,
// add update
id
:
''
,
id
:
''
,
sign
:
{},
template
:
{},
};
};
componentDidMount
()
{
componentDidMount
()
{
...
@@ -31,8 +32,24 @@ class TemplateList extends PureComponent {
...
@@ -31,8 +32,24 @@ class TemplateList extends PureComponent {
// 查询 page
// 查询 page
this
.
queryPage
();
this
.
queryPage
();
// 查询 sign 用于 signList
this
.
querySignList
();
}
}
querySignList
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'smsSignList/page'
,
payload
:
{
current
:
1
,
total
:
0
,
size
:
100
,
// ...searchParams,
},
});
};
queryPage
=
()
=>
{
queryPage
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
}
=
this
.
props
;
const
{
current
,
total
,
size
,
searchParams
}
=
this
;
const
{
current
,
total
,
size
,
searchParams
}
=
this
;
...
@@ -58,25 +75,26 @@ class TemplateList extends PureComponent {
...
@@ -58,25 +75,26 @@ class TemplateList extends PureComponent {
visible
:
true
,
visible
:
true
,
type
:
'add'
,
type
:
'add'
,
title
:
'添加模板'
,
title
:
'添加模板'
,
template
:
{},
});
});
};
};
handleUpdateShow
=
sign
=>
{
handleUpdateShow
=
template
=>
{
const
{
id
}
=
sign
;
const
{
id
}
=
template
;
this
.
setState
({
this
.
setState
({
visible
:
true
,
visible
:
true
,
type
:
'update'
,
type
:
'update'
,
title
:
'更新模板'
,
title
:
'更新模板'
,
id
,
id
,
sign
,
template
,
});
});
};
};
handleDeleted
=
({
id
,
sign
})
=>
{
handleDeleted
=
({
id
,
template
})
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
}
=
this
.
props
;
Modal
.
confirm
({
Modal
.
confirm
({
title
:
`提示消息`
,
title
:
`提示消息`
,
content
:
`确认删除
${
sign
}
签名吗`
,
content
:
`确认删除
${
template
}
签名吗`
,
okText
:
'确认'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
cancelText
:
'取消'
,
onOk
:
()
=>
{
onOk
:
()
=>
{
...
@@ -147,9 +165,9 @@ class TemplateList extends PureComponent {
...
@@ -147,9 +165,9 @@ class TemplateList extends PureComponent {
render
()
{
render
()
{
// props
// props
const
{
loading
,
smsTemplateList
}
=
this
.
props
;
const
{
loading
,
smsTemplateList
,
smsSignList
}
=
this
.
props
;
const
{
list
,
total
,
index
,
size
}
=
smsTemplateList
;
const
{
list
,
total
,
index
,
size
}
=
smsTemplateList
;
const
{
visible
,
title
,
type
,
sign
}
=
this
.
state
;
const
{
visible
,
title
,
type
,
template
}
=
this
.
state
;
const
columns
=
[
const
columns
=
[
{
{
...
@@ -167,7 +185,7 @@ class TemplateList extends PureComponent {
...
@@ -167,7 +185,7 @@ class TemplateList extends PureComponent {
},
},
},
},
{
{
title
:
'
签名
'
,
title
:
'
模板
'
,
dataIndex
:
'template'
,
dataIndex
:
'template'
,
key
:
'template'
,
key
:
'template'
,
},
},
...
@@ -237,7 +255,7 @@ class TemplateList extends PureComponent {
...
@@ -237,7 +255,7 @@ class TemplateList extends PureComponent {
<
PageHeaderWrapper
>
<
PageHeaderWrapper
>
<
Card
>
<
Card
>
<
div
className
=
{
styles
.
tableListForm
}
>
<
div
className
=
{
styles
.
tableListForm
}
>
<
TemplateListSearch
handleSearch
=
{
this
.
handleSearch
}
/
>
<
TemplateListSearch
signList
=
{
smsSignList
.
list
}
handleSearch
=
{
this
.
handleSearch
}
/
>
<
/div
>
<
/div
>
<
br
/>
<
br
/>
<
div
>
<
div
>
...
@@ -258,7 +276,8 @@ class TemplateList extends PureComponent {
...
@@ -258,7 +276,8 @@ class TemplateList extends PureComponent {
<
/Card
>
<
/Card
>
<
TemplateListModal
<
TemplateListModal
initData
=
{
sign
}
initData
=
{
template
}
signList
=
{
smsSignList
.
list
}
title
=
{
title
}
title
=
{
title
}
visible
=
{
visible
}
visible
=
{
visible
}
type
=
{
type
}
type
=
{
type
}
...
...
admin-web/src/pages/Sms/TemplateListModal.js
浏览文件 @
681cd9b2
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Form
,
Input
,
Modal
}
from
'antd'
;
import
{
Form
,
Input
,
Modal
,
Select
}
from
'antd'
;
import
DictionarySelect
from
'../../components/Dictionary/DictionarySelect'
;
import
DictionarySelect
from
'../../components/Dictionary/DictionarySelect'
;
import
dictionary
from
'../../utils/dictionary'
;
import
dictionary
from
'../../utils/dictionary'
;
...
@@ -9,7 +9,7 @@ import dictionary from '../../utils/dictionary';
...
@@ -9,7 +9,7 @@ import dictionary from '../../utils/dictionary';
* @type {React.ComponentClass<RcBaseFormProps & Omit<FormComponentProps, keyof FormComponentProps>>}
* @type {React.ComponentClass<RcBaseFormProps & Omit<FormComponentProps, keyof FormComponentProps>>}
*/
*/
const
SignListModal
=
Form
.
create
()(
props
=>
{
const
SignListModal
=
Form
.
create
()(
props
=>
{
const
{
onOk
,
onCancel
,
visible
,
title
,
form
,
initData
=
{}
}
=
props
;
const
{
onOk
,
onCancel
,
visible
,
title
,
form
,
signList
,
initData
=
{}
}
=
props
;
const
{
getFieldDecorator
,
validateFields
}
=
props
.
form
;
const
{
getFieldDecorator
,
validateFields
}
=
props
.
form
;
function
handleOk
(
e
)
{
function
handleOk
(
e
)
{
...
@@ -47,7 +47,15 @@ const SignListModal = Form.create()(props => {
...
@@ -47,7 +47,15 @@ const SignListModal = Form.create()(props => {
},
},
],
],
initialValue
:
initData
.
sign
?
initData
.
sign
.
id
:
null
,
initialValue
:
initData
.
sign
?
initData
.
sign
.
id
:
null
,
})(
<
Input
placeholder
=
"请输入签名"
/>
)}
})(
<
Select
>
{
signList
.
map
(
item
=>
(
<
Select
.
Option
key
=
{
item
.
id
}
value
=
{
item
.
id
}
>
{
item
.
sign
}
<
/Select.Option
>
))}
<
/Select
>
)}
<
/Form.Item
>
<
/Form.Item
>
<
Form
.
Item
{...
formItemLayout
}
label
=
"类型"
>
<
Form
.
Item
{...
formItemLayout
}
label
=
"类型"
>
{
getFieldDecorator
(
'smsType'
,
{
{
getFieldDecorator
(
'smsType'
,
{
...
...
admin-web/src/pages/Sms/TemplateListSearch.js
浏览文件 @
681cd9b2
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Button
,
Col
,
Form
,
Input
,
Row
}
from
'antd'
;
import
{
Button
,
Col
,
Form
,
Input
,
Row
,
Select
}
from
'antd'
;
const
FormItem
=
Form
.
Item
;
const
FormItem
=
Form
.
Item
;
...
@@ -9,7 +9,7 @@ const FormItem = Form.Item;
...
@@ -9,7 +9,7 @@ const FormItem = Form.Item;
* @type {React.ComponentClass<RcBaseFormProps & Omit<FormComponentProps, keyof FormComponentProps>>}
* @type {React.ComponentClass<RcBaseFormProps & Omit<FormComponentProps, keyof FormComponentProps>>}
*/
*/
const
SignListSearch
=
Form
.
create
()(
props
=>
{
const
SignListSearch
=
Form
.
create
()(
props
=>
{
const
{
handleSearch
}
=
props
;
const
{
handleSearch
,
signList
}
=
props
;
const
{
getFieldDecorator
,
validateFields
,
form
}
=
props
.
form
;
const
{
getFieldDecorator
,
validateFields
,
form
}
=
props
.
form
;
function
onSubmit
(
e
)
{
function
onSubmit
(
e
)
{
...
@@ -37,7 +37,15 @@ const SignListSearch = Form.create()(props => {
...
@@ -37,7 +37,15 @@ const SignListSearch = Form.create()(props => {
<
/Col
>
<
/Col
>
<
Col
md
=
{
8
}
sm
=
{
24
}
>
<
Col
md
=
{
8
}
sm
=
{
24
}
>
<
FormItem
label
=
"签名"
>
<
FormItem
label
=
"签名"
>
{
getFieldDecorator
(
'smsSignId'
)(
<
Input
placeholder
=
"请输入签名"
/>
)}
{
getFieldDecorator
(
'smsSignId'
)(
<
Select
>
{
signList
.
map
(
item
=>
(
<
Select
.
Option
key
=
{
item
.
id
}
value
=
{
item
.
id
}
>
{
item
.
sign
}
<
/Select.Option
>
))}
<
/Select
>
)}
<
/FormItem
>
<
/FormItem
>
<
/Col
>
<
/Col
>
<
/Row
>
<
/Row
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论