Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-outbound
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 29ee6bdc
authored
Nov 26, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v2.10.0' into 'master'
V2.10.0 See merge request
!3
2 parents
f9f5b884
4c8153ca
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
119 additions
and
18 deletions
src/api/modules/outbound.js
src/config/index.js
src/views/outbound/index.vue
src/api/modules/outbound.js
View file @
29ee6bd
...
@@ -132,4 +132,27 @@ const getOutBoundNum = params => {
...
@@ -132,4 +132,27 @@ const getOutBoundNum = params => {
})
})
}
}
export
default
{
getTaskList
,
getStatusStatistics
,
setOutBoundNum
,
createExecuteTask
,
getRobotList
,
getCallerList
,
taskbaseDetails
,
getphoneStatusList
,
downloadPhoneList
,
updateStatus
,
updatePhoneStatus
,
getOutBoundNum
}
// 查看外呼任务短信内容
const
getOutBoundtaskMessage
=
params
=>
{
params
.
method
=
'entmicro.api.outbound.task.message.detail.query'
return
http
({
url
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
// 修改外呼任务短信内容
const
updateOutBoundtaskMessage
=
params
=>
{
params
.
method
=
'entmicro.api.outbound.task.message.detail.update'
return
http
({
url
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
export
default
{
updateOutBoundtaskMessage
,
getOutBoundtaskMessage
,
getTaskList
,
getStatusStatistics
,
setOutBoundNum
,
createExecuteTask
,
getRobotList
,
getCallerList
,
taskbaseDetails
,
getphoneStatusList
,
downloadPhoneList
,
updateStatus
,
updatePhoneStatus
,
getOutBoundNum
}
src/config/index.js
View file @
29ee6bd
...
@@ -18,9 +18,6 @@ export const fetchConfig = function (isEnv = true) {
...
@@ -18,9 +18,6 @@ export const fetchConfig = function (isEnv = true) {
// Object.assign(request, { timeout })
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// return Promise.resolve(cfg)
// }
// }
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/62ecda0909756a6f4f85cf9a/outbound/config')
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/62ecda0909756a6f4f85cf9a/outbound/config')
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/62ecda0909756a6f4f85cf9a/outbound/config')
return
new
Http
({
request
:
{
timeout
:
100000
}
}).
get
(
'https://oss-config.test.glsx.com.cn/mock/62fe2a36abac6ff6ac239d3c/outbound/config'
)
return
new
Http
({
request
:
{
timeout
:
100000
}
}).
get
(
'https://oss-config.test.glsx.com.cn/mock/62fe2a36abac6ff6ac239d3c/outbound/config'
)
}
}
...
...
src/views/outbound/index.vue
View file @
29ee6bd
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
</
template
>
</
template
>
<
template
slot=
"excelName"
slot-scope=
"scope"
>
<
template
slot=
"excelName"
slot-scope=
"scope"
>
<div
class=
"flex"
>
<div
class=
"flex"
>
<el-tooltip
v-if=
"scope.scope.excelName.length >= Math.ceil((320 - 36) / 14)"
effect=
"light"
placement=
"top"
popper-class=
"base-popper"
:content=
"scope.scope.excelName"
>
<el-tooltip
v-if=
"scope.scope.excelName
&& scope.scope.excelName
.length >= Math.ceil((320 - 36) / 14)"
effect=
"light"
placement=
"top"
popper-class=
"base-popper"
:content=
"scope.scope.excelName"
>
<div
class=
"excelName"
>
{{
scope
.
scope
.
excelName
}}
</div>
<div
class=
"excelName"
>
{{
scope
.
scope
.
excelName
}}
</div>
</el-tooltip>
</el-tooltip>
<div
v-else
>
{{
scope
.
scope
.
excelName
}}
</div>
<div
v-else
>
{{
scope
.
scope
.
excelName
}}
</div>
...
@@ -54,14 +54,13 @@
...
@@ -54,14 +54,13 @@
</
template
>
</
template
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"currentIndex == 1 || (currentIndex == 3 && scope.scope.stopType == '自动暂停') || (currentIndex == 3 && scope.scope.stopType == null)"
@
click=
"handleOutboundOn(scope.scope)"
>
开启外呼
</el-button>
<el-button
type=
"text"
v-if=
"currentIndex == 1 || (currentIndex == 3 && scope.scope.stopType == '自动暂停') || (currentIndex == 3 && scope.scope.stopType == null)"
@
click=
"handleOutboundOn(scope.scope)"
>
开启外呼
</el-button>
<el-button
type=
"text"
v-if=
"currentIndex == 1"
@
click=
"marketing(scope.scope)"
>
外呼短信
</el-button>
<el-button
type=
"text"
v-if=
"currentIndex == 3 && scope.scope.stopType && scope.scope.stopType == '手动暂停'"
@
click=
"handleStop(scope.scope, 2)"
>
开启外呼
</el-button>
<el-button
type=
"text"
v-if=
"currentIndex == 3 && scope.scope.stopType && scope.scope.stopType == '手动暂停'"
@
click=
"handleStop(scope.scope, 2)"
>
开启外呼
</el-button>
<el-button
type=
"text"
v-if=
"currentIndex == 2 || currentIndex == 3 || currentIndex == 4"
@
click=
"handleDetails(scope.scope)"
>
详情
</el-button>
<el-button
type=
"text"
v-if=
"currentIndex == 2 || currentIndex == 3 || currentIndex == 4"
@
click=
"handleDetails(scope.scope)"
>
详情
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.taskStatus == 2"
@
click=
"handleStop(scope.scope, 1)"
>
暂停
</el-button>
<el-button
type=
"text"
v-if=
"scope.scope.taskStatus == 2"
@
click=
"handleStop(scope.scope, 1)"
>
暂停
</el-button>
<el-button
type=
"text"
v-if=
"currentIndex == 4"
@
click=
"download(scope.scope, 'taskId')"
>
下载
</el-button>
<el-button
type=
"text"
v-if=
"currentIndex == 4"
@
click=
"download(scope.scope, 'taskId')"
>
下载
</el-button>
<div
class=
"upload-btn"
v-if=
"currentIndex == 4"
>
<div
class=
"upload-btn"
v-if=
"currentIndex == 4"
>
<el-button
type=
"text"
size=
"small"
>
<el-button
type=
"text"
size=
"small"
>
导入
</el-button>
导入
</el-button>
<input
type=
"file"
style=
"opacity: 0"
:ref=
"'file' + scope.scope.id"
accept=
"*"
@
change=
"importExcel($event, scope.scope)"
/>
<input
type=
"file"
style=
"opacity: 0"
:ref=
"'file' + scope.scope.id"
accept=
"*"
@
change=
"importExcel($event, scope.scope)"
/>
</div>
</div>
</div>
</div>
...
@@ -80,6 +79,20 @@
...
@@ -80,6 +79,20 @@
</div>
</div>
<p
class=
"marked"
>
默认所有外呼任务按此规则进行外呼
</p>
<p
class=
"marked"
>
默认所有外呼任务按此规则进行外呼
</p>
</GLDialog>
</GLDialog>
<!-- 外呼短信 -->
<GLDialog
:mode=
"mode"
title=
"外呼短信"
:visible
.
sync=
"outboundmarketVisible"
@
onCancel=
"handleMessageClose"
@
onOk=
"handleMessageConfirm"
>
<div
class=
"gl-form-min"
>
<el-form
ref=
"outboundMessageRef"
:model=
"message"
label-width=
"154px"
:rules=
"outboundRule"
>
<el-form-item
label=
"短信签名:"
prop=
"messageAutograph"
>
<el-input
v-model=
"message.messageAutograph"
></el-input>
</el-form-item>
<el-form-item
label=
"短信内容:"
prop=
"messageDetail"
>
<el-input
v-model=
"message.messageDetail"
type=
"textarea"
:rows=
"3"
></el-input>
</el-form-item>
</el-form>
</div>
<div
class=
"market-note"
>
【{{ this.message.messageAutograph }}】 {{ this.message.messageDetail }}{{ this.message.messageSuffix }}
</div>
</GLDialog>
<!-- 开启外呼确认 -->
<!-- 开启外呼确认 -->
<GLDialog
:mode=
"mode"
title=
"开启外呼确认"
:visible
.
sync=
"openVisible"
@
onCancel=
"handleOpenOutboundClose"
@
onOk=
"handleOpenOutboundConfirm"
>
<GLDialog
:mode=
"mode"
title=
"开启外呼确认"
:visible
.
sync=
"openVisible"
@
onCancel=
"handleOpenOutboundClose"
@
onOk=
"handleOpenOutboundConfirm"
>
<tip-panel
panelMinHeight=
"45px"
:panelContent=
"panelContent"
v-if=
"isPanel"
@
closePanel=
"closePanel"
></tip-panel>
<tip-panel
panelMinHeight=
"45px"
:panelContent=
"panelContent"
v-if=
"isPanel"
@
closePanel=
"closePanel"
></tip-panel>
...
@@ -104,14 +117,13 @@
...
@@ -104,14 +117,13 @@
const
timeRules
=
(
rule
,
value
,
callback
)
=>
{
const
timeRules
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
)
{
if
(
value
)
{
const
date
=
new
Date
()
const
date
=
new
Date
()
let
endYear
=
date
.
getFullYear
()
//获取年份
let
endYear
=
date
.
getFullYear
()
//获取年份
let
endMonth
=
date
.
getMonth
()
+
1
// 获取月份
let
endMonth
=
date
.
getMonth
()
+
1
// 获取月份
let
endDay
=
date
.
getDate
()
let
endDay
=
date
.
getDate
()
const
startTime
=
endYear
+
'
-'
+
endMonth
+
'-
'
+
endDay
+
' '
+
value
[
0
]
const
startTime
=
endYear
+
'
/'
+
endMonth
+
'/
'
+
endDay
+
' '
+
value
[
0
]
const
endTime
=
endYear
+
'
-'
+
endMonth
+
'-
'
+
endDay
+
' '
+
value
[
1
]
const
endTime
=
endYear
+
'
/'
+
endMonth
+
'/
'
+
endDay
+
' '
+
value
[
1
]
const
start
=
endYear
+
'
-'
+
endMonth
+
'-
'
+
endDay
+
' '
+
'9:00'
const
start
=
endYear
+
'
/'
+
endMonth
+
'/
'
+
endDay
+
' '
+
'9:00'
const
end
=
endYear
+
'
-'
+
endMonth
+
'-
'
+
endDay
+
' '
+
'20:00'
const
end
=
endYear
+
'
/'
+
endMonth
+
'/
'
+
endDay
+
' '
+
'20:00'
let
result
=
new
Date
(
startTime
)
>=
new
Date
(
start
)
&&
new
Date
(
endTime
)
<=
new
Date
(
end
)
let
result
=
new
Date
(
startTime
)
>=
new
Date
(
start
)
&&
new
Date
(
endTime
)
<=
new
Date
(
end
)
if
(
!
result
)
{
if
(
!
result
)
{
callback
(
new
Error
(
'外呼时间只限于09:00-20:00'
))
callback
(
new
Error
(
'外呼时间只限于09:00-20:00'
))
...
@@ -135,8 +147,15 @@ export default {
...
@@ -135,8 +147,15 @@ export default {
activeName
:
'notExecute'
,
activeName
:
'notExecute'
,
isPanel
:
true
,
isPanel
:
true
,
outboundVisible
:
false
,
outboundVisible
:
false
,
outboundmarketVisible
:
false
,
openVisible
:
false
,
openVisible
:
false
,
taskData
:
{},
taskData
:
{},
message
:
{
messageAutograph
:
''
,
messageDetail
:
''
,
messageSuffix
:
''
},
marketNote
:
''
,
outboundForm
:
{
outboundForm
:
{
outboundNum
:
60
,
outboundNum
:
60
,
taskId
:
''
,
taskId
:
''
,
...
@@ -211,7 +230,9 @@ export default {
...
@@ -211,7 +230,9 @@ export default {
outboundNum
:
[{
required
:
true
,
message
:
'请输入外呼数量'
,
trigger
:
'blur'
}],
outboundNum
:
[{
required
:
true
,
message
:
'请输入外呼数量'
,
trigger
:
'blur'
}],
callerNums
:
[{
required
:
true
,
message
:
'请选择外呼主机号码'
,
trigger
:
'change'
}],
callerNums
:
[{
required
:
true
,
message
:
'请选择外呼主机号码'
,
trigger
:
'change'
}],
robotId
:
[{
required
:
true
,
message
:
'请选择话术机器人'
,
trigger
:
'change'
}],
robotId
:
[{
required
:
true
,
message
:
'请选择话术机器人'
,
trigger
:
'change'
}],
dialDate
:
[{
required
:
true
,
validator
:
timeRules
,
trigger
:
'change'
}]
dialDate
:
[{
required
:
true
,
validator
:
timeRules
,
trigger
:
'change'
}],
messageAutograph
:
[{
required
:
true
,
message
:
'请输入短信签名'
,
trigger
:
'blur'
}],
messageDetail
:
[{
required
:
true
,
message
:
'请输入短信内容'
,
trigger
:
'blur'
}]
},
},
tabList
:
[
tabList
:
[
{
{
...
@@ -294,7 +315,7 @@ export default {
...
@@ -294,7 +315,7 @@ export default {
{
{
label
:
'任务名称'
,
label
:
'任务名称'
,
prop
:
'taskName'
,
prop
:
'taskName'
,
width
:
15
0
,
width
:
21
0
,
line
:
1
line
:
1
},
},
{
{
...
@@ -430,7 +451,7 @@ export default {
...
@@ -430,7 +451,7 @@ export default {
},
},
downloadFile
(
url
,
fileName
)
{
downloadFile
(
url
,
fileName
)
{
this
.
getBlob
(
url
).
then
(
blob
=>
{
this
.
getBlob
(
url
).
then
(
blob
=>
{
this
.
saveAs
(
blob
,
fileName
+
'.xlsx'
)
this
.
saveAs
(
blob
,
fileName
)
})
})
},
},
getBlob
(
url
)
{
getBlob
(
url
)
{
...
@@ -642,6 +663,52 @@ export default {
...
@@ -642,6 +663,52 @@ export default {
}
}
})
})
},
},
handleMessageConfirm
()
{
this
.
$refs
.
outboundMessageRef
.
validate
(
valid
=>
{
if
(
valid
)
{
let
{
message
:
{
id
,
messageAutograph
,
messageDetail
,
messageSuffix
}
}
=
this
if
(
messageAutograph
.
length
+
messageDetail
.
length
+
messageSuffix
.
length
>
200
)
{
this
.
$message
({
message
:
'短信内容不能超过200字符'
,
type
:
'error'
})
return
}
let
params
=
{
id
,
messageAutograph
,
messageDetail
:
'【%s】'
+
messageDetail
}
this
.
$apis
.
outbound
.
updateOutBoundtaskMessage
(
params
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'修改成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
0
)
{
this
.
outboundmarketVisible
=
false
}
})
}
})
},
handleMessageClose
()
{
this
.
outboundmarketVisible
=
false
},
//营销短信
marketing
(
data
)
{
let
params
=
{
taskId
:
data
.
id
}
this
.
$apis
.
outbound
.
getOutBoundtaskMessage
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
outboundmarketVisible
=
true
this
.
message
=
{
...
res
.
data
}
this
.
message
.
messageDetail
=
this
.
message
.
messageDetail
.
replace
(
/【.*】/
,
''
)
}
})
},
//外呼详情
//外呼详情
handleDetails
(
data
)
{
handleDetails
(
data
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
...
@@ -693,7 +760,7 @@ export default {
...
@@ -693,7 +760,7 @@ export default {
if
(
item
.
label
==
'操作'
)
{
if
(
item
.
label
==
'操作'
)
{
switch
(
this
.
currentIndex
)
{
switch
(
this
.
currentIndex
)
{
case
1
:
case
1
:
item
.
width
=
9
0
item
.
width
=
17
0
break
break
case
2
:
case
2
:
item
.
width
=
115
item
.
width
=
115
...
@@ -1005,6 +1072,20 @@ export default {
...
@@ -1005,6 +1072,20 @@ export default {
/
deep
/
.row-expand-cover
.el-table__expand-icon
{
/
deep
/
.row-expand-cover
.el-table__expand-icon
{
visibility
:
hidden
;
visibility
:
hidden
;
}
}
/
deep
/
.el-textarea
{
width
:
432px
!important
;
}
.market-note
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
20px
;
padding
:
8px
;
background
:
#f9f9f9
;
margin-left
:
154px
;
width
:
432px
;
box-sizing
:
border-box
;
margin-top
:
-12px
;
}
}
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment