Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-message
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-message
Commits
f74d0e37
提交
f74d0e37
authored
8月 10, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 新增分发短信记录
上级
dfa42d0e
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
147 行增加
和
43 行删除
+147
-43
common.js
src/api/common.js
+12
-0
drawerTable.vue
src/pages/sms/smsRecord/components/drawerTable.vue
+50
-0
index.vue
src/pages/sms/smsRecord/index.vue
+32
-29
sendContent.vue
src/pages/sms/smsTemplate/components/sendContent.vue
+26
-8
index.vue
src/pages/sms/smsTemplate/index.vue
+27
-6
没有找到文件。
src/api/common.js
浏览文件 @
f74d0e37
...
@@ -138,6 +138,18 @@ export function getSmsTempDetail(id) {
...
@@ -138,6 +138,18 @@ export function getSmsTempDetail(id) {
export
function
editSmsTemp
(
id
,
params
)
{
export
function
editSmsTemp
(
id
,
params
)
{
return
httpRequest
.
put
(
`/api/message/admin/v1/sms/
${
id
}
/template`
,
params
)
return
httpRequest
.
put
(
`/api/message/admin/v1/sms/
${
id
}
/template`
,
params
)
}
}
/**
* 短信分发列表
*/
export
function
getSmsRecordList
(
params
)
{
return
httpRequest
.
get
(
'/api/message/admin/v1/sms/records'
,
{
params
})
}
/**
* 短信分发列表
*/
export
function
getQueryRecord
(
params
)
{
return
httpRequest
.
get
(
'/api/message/admin/v1/sms/query-record'
,
{
params
})
}
// export function uploadFile(data) {
// export function uploadFile(data) {
// return httpRequest.post('/api/lms/util/upload-file', data, {
// return httpRequest.post('/api/lms/util/upload-file', data, {
// headers: { 'Content-Type': 'multipart/form-data' }
// headers: { 'Content-Type': 'multipart/form-data' }
...
...
src/pages/sms/smsRecord/components/drawerTable.vue
0 → 100644
浏览文件 @
f74d0e37
<
template
>
<div>
<el-table
:data=
"data"
>
<el-table-column
property=
"Content"
label=
"短信内容"
></el-table-column>
<el-table-column
property=
"PhoneNum"
label=
"接收短信的手机号码"
></el-table-column>
<el-table-column
property=
"ReceiveDate"
label=
"短信接收日期和时间"
></el-table-column>
<el-table-column
property=
"SendDate"
label=
"短信发送日期和时间"
></el-table-column>
<el-table-column
property=
"SendDate"
label=
"短信发送日期和时间"
></el-table-column>
<el-table-column
label=
"短信发送状态"
>
<template
slot-scope=
"scope"
>
{{
getStatus
(
scope
.
row
.
SendStatus
)
}}
</
template
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
export
default
{
props
:
{
data
:
{
type
:
Array
}
},
data
()
{
return
{
drawer
:
true
,
direction
:
'rtl'
}
},
methods
:
{
getStatus
(
n
)
{
const
val
=
{
1
:
'等待回执'
,
2
:
'发送失败'
,
3
:
'发送成功'
}
return
val
[
n
]
},
handleClose
(
done
)
{
this
.
$confirm
(
'确认关闭?'
)
.
then
(
_
=>
{
done
()
})
.
catch
(
_
=>
{})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
src/pages/sms/smsRecord/index.vue
浏览文件 @
f74d0e37
...
@@ -3,35 +3,20 @@
...
@@ -3,35 +3,20 @@
<div
class=
"temp-box"
>
<div
class=
"temp-box"
>
<div
class=
"temp-title"
>
<div
class=
"temp-title"
>
<div
class=
"search"
>
<div
class=
"search"
>
<span>
名称
</span>
<el-input
v-model=
"input"
placeholder=
""
class=
"input"
></el-input>
<el-input
v-model=
"input"
placeholder=
"请输入模板名称"
class=
"input"
></el-input>
<el-button
type=
"primary"
class=
"btn"
@
click=
"searchList"
>
搜索
</el-button>
<el-button
type=
"primary"
class=
"btn"
@
click=
"searchList"
>
搜索
</el-button>
</div>
</div>
<div
class=
"tool-btn"
>
<el-button
class=
"btn"
@
click=
"createTamp"
>
创建
</el-button>
<!--
<el-button
class=
"btn"
>
编辑
</el-button>
-->
<el-button
v-if=
"selectItem.length"
class=
"btn"
@
click=
"deleteTampList"
>
删除
</el-button>
<el-button
v-else
disabled
class=
"btn"
>
删除
</el-button>
</div>
</div>
</div>
<div
class=
"table-box"
>
<div
class=
"table-box"
>
<el-table
@
selection-change=
"handleSelectionChange"
:data=
"tableData"
tooltip-effect=
"dark"
style=
"width: 100%"
>
<el-table
@
selection-change=
"handleSelectionChange"
:data=
"tableData"
tooltip-effect=
"dark"
style=
"width: 100%"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<!--
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
-->
<el-table-column
align=
"center"
header-align=
"center"
prop=
"id"
label=
"id"
width=
"180"
>
</el-table-column>
<el-table-column
align=
"center"
header-align=
"center"
prop=
"id"
label=
"id"
>
</el-table-column>
<el-table-column
align=
"center"
header-align=
"center"
prop=
"name"
label=
"名称"
width=
"180"
>
</el-table-column>
<el-table-column
align=
"center"
header-align=
"center"
prop=
"title"
label=
"标题"
>
</el-table-column>
<el-table-column
align=
"center"
header-align=
"center"
prop=
"created_at"
label=
"创建时间"
width=
"180"
>
<el-table-column
align=
"center"
header-align=
"center"
prop=
"created_at"
label=
"创建时间"
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
header-align=
"center"
prop=
"payload"
label=
"消息模板载体"
>
</el-table-column>
<el-table-column
align=
"center"
header-align=
"center"
label=
"通道"
>
<template
slot-scope=
"scope"
>
<span
v-for=
"(items, index) in scope.row.templates"
:key=
"index"
>
{{
channelValue
(
items
.
channel
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
header-align=
"center"
>
<el-table-column
label=
"操作"
align=
"center"
header-align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-button
class=
"btn-color"
type=
"text"
@
click=
"handleEdit(scope.$index, scope.row)"
>
编辑
</el-button>
<el-button
class=
"btn-color"
type=
"text"
@
click=
"handleDelete(scope.row)"
>
查询
</el-button>
<el-button
class=
"btn-color"
type=
"text"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -40,18 +25,25 @@
...
@@ -40,18 +25,25 @@
<el-pagination
layout=
"prev, pager, next"
@
current-change=
"changePage"
:total=
"totals"
>
</el-pagination>
<el-pagination
layout=
"prev, pager, next"
@
current-change=
"changePage"
:total=
"totals"
>
</el-pagination>
</div>
</div>
</div>
</div>
<el-drawer
size=
"100%"
title=
""
:visible
.
sync=
"drawer"
:direction=
"direction"
>
<drawer-table
:data=
"drawerData"
></drawer-table>
</el-drawer>
</app-container>
</app-container>
</template>
</template>
<
script
>
<
script
>
import
AppContainer
from
'@/components/AppContainer'
import
AppContainer
from
'@/components/AppContainer'
import
*
as
api
from
'@/api/common.js'
import
*
as
api
from
'@/api/common.js'
import
drawerTable
from
'./components/drawerTable.vue'
export
default
{
export
default
{
components
:
{
components
:
{
AppContainer
AppContainer
,
drawerTable
},
},
data
()
{
data
()
{
return
{
return
{
drawer
:
false
,
drawerData
:
[],
input
:
''
,
input
:
''
,
page
:
{
page
:
{
page
:
1
,
page
:
1
,
...
@@ -59,7 +51,8 @@ export default {
...
@@ -59,7 +51,8 @@ export default {
},
},
totals
:
1
,
totals
:
1
,
tableData
:
[],
tableData
:
[],
selectItem
:
[]
selectItem
:
[],
direction
:
'rtl'
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -76,14 +69,23 @@ export default {
...
@@ -76,14 +69,23 @@ export default {
}
}
return
json
[
n
]
return
json
[
n
]
},
},
templateTypeValue
(
n
)
{
const
val
=
{
0
:
'验证码'
,
1
:
'短信通知'
,
2
:
'推广短信'
,
3
:
'国际/港澳台消息'
}
return
val
[
n
]
},
searchList
()
{
searchList
()
{
this
.
getMsgTempList
({
name
:
this
.
input
})
this
.
getMsgTempList
({
search_str
:
this
.
input
})
},
},
getMsgTempList
(
params
)
{
getMsgTempList
(
params
)
{
api
api
.
get
MsgTemp
List
(
params
)
.
get
SmsRecord
List
(
params
)
.
then
(
response
=>
{
.
then
(
response
=>
{
this
.
tableData
=
response
.
data
.
data
this
.
tableData
=
response
.
data
.
items
this
.
totals
=
response
.
data
.
total
this
.
totals
=
response
.
data
.
total
this
.
page
.
page
=
response
.
data
.
current_page
this
.
page
.
page
=
response
.
data
.
current_page
// this.page.page = response.data.current_page
// this.page.page = response.data.current_page
...
@@ -93,9 +95,10 @@ export default {
...
@@ -93,9 +95,10 @@ export default {
},
},
handleDelete
(
data
)
{
handleDelete
(
data
)
{
api
api
.
deleteTemp
(
data
.
id
)
.
getQueryRecord
({
id
:
data
.
id
}
)
.
then
(
response
=>
{
.
then
(
response
=>
{
this
.
getMsgTempList
()
this
.
drawerData
=
response
.
data
.
detail
.
SmsSendDetailDTOs
.
SmsSendDetailDTO
this
.
drawer
=
true
})
})
.
finally
(()
=>
{})
.
finally
(()
=>
{})
},
},
...
...
src/pages/sms/smsTemplate/components/sendContent.vue
浏览文件 @
f74d0e37
...
@@ -29,6 +29,17 @@
...
@@ -29,6 +29,17 @@
</el-option>
</el-option>
</el-select>
</el-select>
</div>
</div>
<div
class=
"write"
>
<div
class=
"name"
>
使用场景说明
</div>
<el-input
v-if=
"tabIndex == 0"
class=
"inp-w inp-h"
type=
"textarea"
:rows=
"2"
placeholder=
"请输入内容"
v-model=
"formAll.form1.content2"
>
</el-input>
</div>
</div>
</div>
<div
class=
"btn-box"
>
<div
class=
"btn-box"
>
<div
class=
"content"
>
<div
class=
"content"
>
...
@@ -74,6 +85,10 @@
...
@@ -74,6 +85,10 @@
<div
class=
"name"
>
消息内容:
</div>
<div
class=
"name"
>
消息内容:
</div>
<div
class=
"con-text"
v-html=
"formAll.form1.content"
></div>
<div
class=
"con-text"
v-html=
"formAll.form1.content"
></div>
</div>
</div>
<div
class=
"write"
>
<div
class=
"name"
>
使用场景说明:
</div>
<div
class=
"con-text"
v-html=
"formAll.form1.content2"
></div>
</div>
</div>
</div>
<div
class=
"btn-box"
>
<div
class=
"btn-box"
>
<div
class=
"content"
>
<div
class=
"content"
>
...
@@ -99,6 +114,7 @@ export default {
...
@@ -99,6 +114,7 @@ export default {
form1
:
{
form1
:
{
title
:
''
,
title
:
''
,
content
:
''
,
content
:
''
,
content2
:
''
,
select
:
0
select
:
0
}
}
},
},
...
@@ -127,10 +143,11 @@ export default {
...
@@ -127,10 +143,11 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
if
(
this
.
$route
r
.
query
.
id
)
{
if
(
this
.
$route
.
query
.
id
)
{
const
conForm
=
this
.
formAll
.
form1
const
conForm
=
this
.
formAll
.
form1
conForm
.
title
=
this
.
form
.
title
conForm
.
title
=
this
.
form
.
title
conForm
.
content
=
this
.
form
.
desc
conForm
.
content
=
this
.
form
.
payload
conForm
.
content2
=
this
.
form
.
desc
conForm
.
select
=
this
.
form
.
template_type
conForm
.
select
=
this
.
form
.
template_type
}
}
},
},
...
@@ -158,9 +175,9 @@ export default {
...
@@ -158,9 +175,9 @@ export default {
const
forms
=
this
.
formAll
.
form1
const
forms
=
this
.
formAll
.
form1
const
param
=
{
const
param
=
{
title
:
forms
.
title
,
title
:
forms
.
title
,
desc
:
forms
.
content
,
desc
:
forms
.
content
2
,
template_type
:
forms
.
select
,
template_type
:
forms
.
select
,
payload
:
'您正在申请手机注册,验证码为:,5分钟内有效!'
payload
:
forms
.
content
}
}
if
(
id
)
{
if
(
id
)
{
api
api
...
@@ -229,15 +246,16 @@ export default {
...
@@ -229,15 +246,16 @@ export default {
padding-right
:
20px
;
padding-right
:
20px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
display
:
flex
;
display
:
flex
;
height
:
40px
;
//
height: 40px;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
&
:nth-child
(
1
)
{
&
:nth-child
(
1
)
{
margin-top
:
30px
;
margin-top
:
30px
;
}
}
&
:nth-child
(
2
)
{
&
:nth-child
(
2
)
{
height
:
118px
;
//
height: 118px;
}
}
.name
{
.name
{
min-width
:
90px
;
font-size
:
14px
;
font-size
:
14px
;
color
:
#333333
;
color
:
#333333
;
line-height
:
40px
;
line-height
:
40px
;
...
@@ -246,7 +264,7 @@ export default {
...
@@ -246,7 +264,7 @@ export default {
}
}
::v-deep
{
::v-deep
{
textarea
{
textarea
{
height
:
100%
!
important
;
// height: 50px
!important;
resize
:none
;
resize
:none
;
}
}
}
}
...
@@ -454,7 +472,7 @@ export default {
...
@@ -454,7 +472,7 @@ export default {
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
&
:nth-child
(
2
)
{
&
:nth-child
(
2
)
{
height
:
118px
;
//
height: 118px;
}
}
.name
{
.name
{
font-size
:
14px
;
font-size
:
14px
;
...
...
src/pages/sms/smsTemplate/index.vue
浏览文件 @
f74d0e37
...
@@ -2,11 +2,10 @@
...
@@ -2,11 +2,10 @@
<app-container>
<app-container>
<div
class=
"temp-box"
>
<div
class=
"temp-box"
>
<div
class=
"temp-title"
>
<div
class=
"temp-title"
>
<!--
<div
class=
"search"
>
<div
class=
"search"
>
<span>
名称
</span>
<el-input
v-model=
"input"
placeholder=
""
class=
"input"
></el-input>
<el-input
v-model=
"input"
placeholder=
"请输入模板名称"
class=
"input"
></el-input>
<el-button
type=
"primary"
class=
"btn"
@
click=
"searchList"
>
搜索
</el-button>
<el-button
type=
"primary"
class=
"btn"
@
click=
"searchList"
>
搜索
</el-button>
</div>
-->
</div>
<div>
<div>
<el-button
class=
"btn"
@
click=
"createTamp"
>
创建
</el-button>
<el-button
class=
"btn"
@
click=
"createTamp"
>
创建
</el-button>
</div>
</div>
...
@@ -23,9 +22,23 @@
...
@@ -23,9 +22,23 @@
{{
templateTypeValue
(
scope
.
row
.
template_type
)
}}
{{
templateTypeValue
(
scope
.
row
.
template_type
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
header-align=
"center"
label=
"审核状态"
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.audit_status == 3"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"scope.row.audit_info"
placement=
"top-start"
>
<div>
{{
statusType
(
scope
.
row
.
audit_status
)
}}
</div>
</el-tooltip>
</
template
>
<
template
v-else
>
{{
statusType
(
scope
.
row
.
audit_status
)
}}
</
template
>
</template>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
header-align=
"center"
>
<el-table-column
label=
"操作"
align=
"center"
header-align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
class=
"btn-color"
type=
"text"
@
click=
"handleEdit(scope.$index, scope.row)"
>
编辑
</el-button>
<el-button
v-if=
"scope.row.audit_status == 3"
class=
"btn-color"
type=
"text"
@
click=
"handleEdit(scope.$index, scope.row)"
>
编辑
</el-button>
<el-button
class=
"btn-color"
type=
"text"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
<el-button
class=
"btn-color"
type=
"text"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -80,8 +93,16 @@ export default {
...
@@ -80,8 +93,16 @@ export default {
}
}
return
val
[
n
]
return
val
[
n
]
},
},
statusType
(
n
)
{
const
val
=
{
1
:
'审核中'
,
2
:
'审核通过'
,
3
:
'审核未通过'
}
return
val
[
n
]
},
searchList
()
{
searchList
()
{
this
.
getMsgTempList
({
nam
e
:
this
.
input
})
this
.
getMsgTempList
({
titl
e
:
this
.
input
})
},
},
getMsgTempList
(
params
)
{
getMsgTempList
(
params
)
{
api
api
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论