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 bc7a4b02
authored
Aug 18, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
d7d7923e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
63 deletions
src/config/index.js
src/views/outbound/details.vue
src/views/outbound/index.vue
src/config/index.js
View file @
bc7a4b0
...
...
@@ -12,7 +12,7 @@ let cfg = require('./conf.js')
import
{
Http
}
from
'glsx-common'
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
...
...
@@ -21,7 +21,8 @@ export const fetchConfig = function (isEnv = true) {
//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'
)
}
export
const
config
=
{
install
(
vue
,
cfg
)
{
...
...
src/views/outbound/details.vue
View file @
bc7a4b0
...
...
@@ -61,7 +61,7 @@ const TASK_STATUS = [
value
:
2
},
{
label
:
'已发送
好友
申请'
,
label
:
'已发送申请'
,
value
:
3
},
{
...
...
@@ -305,14 +305,13 @@ export default {
}
}
.container-detail
{
padding
:
20px
0
;
padding
:
0
0
20px
0
;
overflow-y
:
scroll
;
height
:
100%
;
.outbound-info
{
width
:
100%
;
height
:
auto
;
background
:
#ffffff
;
box-shadow
:
0px
10px
20px
0px
rgba
(
88
,
80
,
255
,
0.1
);
margin-bottom
:
10px
;
&-title
{
line-height
:
28px
;
...
...
@@ -383,23 +382,5 @@ export default {
background-color
:
#fff
;
}
}
.detailsTable
{
//
/deep/
{
//
.el-table__header
tr,
//
.el-table
th.el-table__cell
{
//
background
:
#f4f6fc
;
//
font-size
:
14px
;
//
color
:
#333
;
//
display
:
flex
;
//
line-height
:
20px
;
//
width
:
100vw
;
//
}
//
th
:nth-child
(
1
)
{
//
visibility
:
hidden
;
//
}
//
th
{
//
flex
:
1
;
//
}
//
}
}
</
style
>
src/views/outbound/index.vue
View file @
bc7a4b0
...
...
@@ -7,14 +7,14 @@
<div
class=
"choseRow"
>
<div
class=
"choseItem"
:class=
"
{ active: currentIndex == index + 1 }" v-for="(item, index) in tabList" :key="index" @click="tabClick(index + 1)">
{{
item
.
label
}}
(
{{
taskStatus
[
item
.
name
]
}}
)
</div>
</div>
<el-button
:size=
"size"
type=
"primary"
class=
"outbound-set-btn"
plain
@
click=
"outbound
Visible = tru
e"
>
外呼设置
</el-button>
<el-button
:size=
"size"
type=
"primary"
class=
"outbound-set-btn"
plain
@
click=
"outbound
SetHandl
e"
>
外呼设置
</el-button>
</div>
<div
class=
"outbound-tabe-wrap"
>
<!-- 表格区域 开始 -->
<GLTable
ref=
"outboundRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"outboundInfo"
slot-scope=
"scope"
>
<!-- 子任务 -->
<el-table
class=
"subtasks-wrap"
border
:data=
"scope.scope.executeTaskList"
>
<el-table
class=
"subtasks-wrap"
:data=
"scope.scope.executeTaskList"
>
<template
v-for=
"(col, index) in outboundInfoParams"
>
<el-table-column
v-if=
"col.addHtml"
:prop=
"col.prop"
:label=
"col.label"
:key=
"index"
:width=
"col.width || ''"
>
<template
slot-scope=
"endTime"
>
...
...
@@ -27,7 +27,7 @@
<
template
slot-scope=
"scopeChild"
>
<el-button
type=
"text"
v-if=
"scopeChild.row.taskStatus == 2"
@
click
.
stop=
"handleStop(scope.scope, 1)"
>
暂停
</el-button>
<el-button
type=
"text"
v-if=
"scopeChild.row.taskStatus == 3 && scope.scope.stopType == '手动暂停'"
@
click
.
stop=
"handleStop(scope.scope, 2)"
>
开启外呼
</el-button>
<el-button
type=
"text"
v-if=
"scopeChild.row.taskStatus == 4"
@
click
.
stop=
"download(scopeChild.row, 'executeTaskId')"
>
下载本次数据
</el-button>
<el-button
type=
"text"
v-if=
"scopeChild.row.taskStatus == 4"
@
click
.
stop=
"download(scopeChild.row, 'executeTaskId')"
>
下载本次数据
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -54,13 +54,13 @@
<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=
"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>
<div
class=
"upload-btn"
v-if=
"currentIndex == 4"
>
<el-button
type=
"text"
size=
"small"
>
导入
</el-button>
<input
type=
"file"
style=
"opacity: 0"
ref=
"file
"
accept=
"*"
@
change=
"importExcel($event, scope.scope)"
/>
<input
type=
"file"
style=
"opacity: 0"
:ref=
"'file' + scope.scope.id
"
accept=
"*"
@
change=
"importExcel($event, scope.scope)"
/>
</div>
<el-button
type=
"text"
v-if=
"currentIndex == 4"
@
click=
"download(scope.scope, 'taskId')"
>
下载
</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
...
...
@@ -70,7 +70,7 @@
<GLDialog
:mode=
"mode"
class=
"outboungSet-dialog"
title=
"外呼设置"
@
onOk=
"handleOutboundConfirm"
@
onCancel=
"handleOutboundClose"
:visible
.
sync=
"outboundVisible"
>
<el-form
ref=
"outboundsetRef"
:model=
"outboundForm"
label-width=
"154px"
:rules=
"outboundRule"
>
<el-form-item
label=
"每天外呼数量:"
prop=
"outboundNum"
>
<el-input
v-model=
"outboundForm.outboundNum"
@
keyup
.
native=
"outboundForm.outboundNum = oninput(outboundForm.outboundNum
)"
></el-input>
<el-input
v-model=
"outboundForm.outboundNum"
@
blur=
"outboundForm.outboundNum = oninput(outboundForm.outboundNum, 1, 1000
)"
></el-input>
</el-form-item>
</el-form>
<p
class=
"marked"
>
默认所有外呼任务按此规则进行外呼
</p>
...
...
@@ -81,12 +81,13 @@
<glsx-combi-form
formRef=
"outboundChildRef"
ref=
"outboundFormRef"
labelWidth=
"154px"
:formObj=
"outboundForm"
:formData=
"outboundFormData"
:formRules=
"outboundRule"
>
<
template
slot=
"replay"
>
<div
class=
"flex m-b-10"
>
<label
class=
"font-14 color6 m-r-4"
>
重
播
次数
</label>
<el-input-number
size=
"mini"
v-model=
"outboundForm.retryTimes"
:min=
"0"
:max=
"2"
label=
"描述文字"
></el-input-number>
<label
class=
"font-14 color6 m-r-4"
>
重
拨
次数
</label>
<el-input-number
size=
"mini"
v-model=
"outboundForm.retryTimes"
@
blur=
"outboundForm.retryTimes = oninput(outboundForm.retryTimes, 0, 2)"
:min=
"0"
:max=
"2"
label=
"描述文字"
></el-input-number>
</div>
<div
class=
"flex"
>
<label
class=
"font-14 color6 m-r-4"
>
重播间隔
</label>
<el-input-number
size=
"mini"
v-model=
"outboundForm.retryInterval"
:min=
"5"
:max=
"60"
label=
"描述文字"
></el-input-number>
<label
class=
"font-14 color6 m-r-4"
>
重拨间隔
</label>
<el-input-number
size=
"mini"
v-model=
"outboundForm.retryInterval"
@
blur=
"outboundForm.retryInterval = oninput(outboundForm.retryInterval, 5, 60)"
:min=
"5"
:max=
"60"
label=
"描述文字"
></el-input-number>
分钟
</div>
</
template
>
</glsx-combi-form>
...
...
@@ -98,6 +99,7 @@
const
timeRules
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
)
{
const
date
=
new
Date
()
let
endYear
=
date
.
getFullYear
()
//获取年份
let
endMonth
=
date
.
getMonth
()
+
1
// 获取月份
let
endDay
=
date
.
getDate
()
...
...
@@ -152,7 +154,7 @@ export default {
isDisabled
:
'true'
},
{
label
:
'外呼主
机
号码'
,
label
:
'外呼主
叫
号码'
,
name
:
'callerNums'
,
type
:
'select'
,
width
:
'360px'
,
...
...
@@ -180,7 +182,7 @@ export default {
width
:
'360px'
},
{
label
:
'重
播
设置'
,
label
:
'重
拨
设置'
,
addHtml
:
'replay'
,
name
:
'replay'
},
...
...
@@ -280,18 +282,18 @@ export default {
{
label
:
'商户号'
,
prop
:
'merchantId'
,
width
:
16
0
minWidth
:
12
0
},
{
label
:
'门店名称'
,
prop
:
'merchantName'
,
width
:
16
0
,
minWidth
:
15
0
,
line
:
1
},
{
label
:
'任务名称'
,
prop
:
'taskName'
,
w
idth
:
150
,
minW
idth
:
150
,
line
:
1
},
{
...
...
@@ -299,7 +301,7 @@ export default {
prop
:
'phoneCount'
,
filter
:
'executing,notExecute,stop,executed'
,
line
:
1
,
w
idth
:
120
minW
idth
:
120
},
{
label
:
'进度'
,
...
...
@@ -341,7 +343,7 @@ export default {
label
:
'当前执行次数'
,
prop
:
'executeTimes'
,
filter
:
'executing,stop,executed'
,
width
:
1
5
0
width
:
1
2
0
},
{
label
:
'最后一次暂停时间'
,
...
...
@@ -369,13 +371,16 @@ export default {
{
label
:
'操作'
,
addHtml
:
'auth-button'
,
fixed
:
'right'
,
width
:
180
}
],
outboundInfoParams
:
[
{
label
:
'子任务名称'
,
prop
:
'executeTaskName'
prop
:
'executeTaskName'
,
line
:
1
,
width
:
200
},
{
label
:
'执行数量'
,
...
...
@@ -407,17 +412,12 @@ export default {
this
.
getCallerList
()
// 获取呼叫电话列表
this
.
initParams
()
this
.
getStatusStatistics
()
this
.
getOutBoundNum
()
},
methods
:
{
timeCompare
()
{
let
startDate
=
new
Date
(
this
.
outboundForm
.
dialDate
[
0
]).
getTime
()
let
endDate
=
new
Date
(
this
.
outboundForm
.
dialDate
[
1
]).
getTime
()
// if (startGetTime != 0 && endGetTime != 0 && startGetTime > endGetTime) {
// return true
// }
outboundSetHandle
()
{
this
.
outboundVisible
=
true
this
.
getOutBoundNum
()
},
calcNum
(
val
)
{
let
count
=
'0%'
...
...
@@ -495,7 +495,9 @@ export default {
this
.
url
=
res
this
.
importTask
(
row
,
res
)
}
// this.$refs.file.value = ''
let
refName
=
'file'
+
row
.
id
e
.
target
.
value
=
''
this
.
$refs
[
refName
].
value
=
''
})
}
},
...
...
@@ -534,12 +536,12 @@ export default {
})
}
},
oninput
(
value
)
{
oninput
(
value
,
min
,
max
)
{
let
limitNum
=
value
if
(
!
/^
[
0-9
]
+$/
.
test
(
value
))
limitNum
=
value
.
replace
(
/
\D
/g
,
''
)
if
(
limitNum
>=
2000
)
limitNum
=
2000
if
(
limitNum
<=
0
)
limitNum
=
1
return
limitNum
if
(
!
/^
[
0-9
]
+$/
.
test
(
value
))
limitNum
=
new
String
(
value
)
.
replace
(
/
\D
/g
,
''
)
if
(
limitNum
>=
max
)
limitNum
=
max
if
(
limitNum
<=
min
)
limitNum
=
min
return
Number
(
limitNum
)
},
// 统计:所有任务的执行状态
getStatusStatistics
()
{
...
...
@@ -587,7 +589,6 @@ export default {
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
this
.
outboundVisible
=
false
this
.
getOutBoundNum
()
})
},
//初始化数据回显
...
...
@@ -680,7 +681,9 @@ export default {
}
if
(
res
.
code
==
0
)
{
window
.
open
(
res
.
data
)
const
link
=
document
.
createElement
(
'a'
)
link
.
href
=
res
.
data
link
.
click
()
}
})
},
...
...
@@ -837,6 +840,10 @@ export default {
box-sizing
:
border-box
;
z-index
:
99
;
/deep/
{
.el-table__body
{
box-sizing
:
border-box
;
border
:
1px
solid
#e5e5e5
;
}
.expanded
{
&
+
tr
:
hover
td
{
background
:
none
!important
;
...
...
@@ -892,6 +899,36 @@ export default {
width
:
16.6%
;
}
}
.subtasks-wrap
{
margin
:
16px
;
box-sizing
:
border-box
;
width
:
69vw
!important
;
/deep/
{
.el-table__header
tr
{
background
:
#f9f9f9
!important
;
height
:
40px
;
}
.el-table__header
tr
th
{
background
:
#f9f9f9
!important
;
height
:
40px
;
}
.el-table__body
{
box-sizing
:
border-box
;
border
:
1px
solid
#e5e5e5
;
height
:
40px
;
}
.el-table__row
td
{
height
:
40px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#666666
;
}
.el-table__body-wrapper
{
overflow
:
hidden
!important
;
}
}
}
}
}
.marked
{
...
...
@@ -937,9 +974,4 @@ export default {
visibility
:
hidden
;
}
}
.subtasks-wrap
{
margin
:
16px
;
box-sizing
:
border-box
;
width
:
98%
!important
;
}
</
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