Commit bc7a4b02 by 前端

commit

1 parent d7d7923e
...@@ -21,7 +21,8 @@ export const fetchConfig = function (isEnv = true) { ...@@ -21,7 +21,8 @@ export const fetchConfig = function (isEnv = true) {
//return window.fetch('https://', {}).then(res => res.json()) //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' }) // 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.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 = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -61,7 +61,7 @@ const TASK_STATUS = [ ...@@ -61,7 +61,7 @@ const TASK_STATUS = [
value: 2 value: 2
}, },
{ {
label: '已发送好友申请', label: '已发送申请',
value: 3 value: 3
}, },
{ {
...@@ -305,14 +305,13 @@ export default { ...@@ -305,14 +305,13 @@ export default {
} }
} }
.container-detail { .container-detail {
padding: 20px 0; padding:0 0 20px 0;
overflow-y: scroll; overflow-y: scroll;
height: 100%; height: 100%;
.outbound-info { .outbound-info {
width: 100%; width: 100%;
height: auto; height: auto;
background: #ffffff; background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-bottom: 10px; margin-bottom: 10px;
&-title { &-title {
line-height: 28px; line-height: 28px;
...@@ -383,23 +382,5 @@ export default { ...@@ -383,23 +382,5 @@ export default {
background-color: #fff; 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> </style>
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
<div class="choseRow"> <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 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> </div>
<el-button :size="size" type="primary" class="outbound-set-btn" plain @click="outboundVisible = true">外呼设置</el-button> <el-button :size="size" type="primary" class="outbound-set-btn" plain @click="outboundSetHandle">外呼设置</el-button>
</div> </div>
<div class="outbound-tabe-wrap"> <div class="outbound-tabe-wrap">
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="outboundRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="outboundRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="outboundInfo" slot-scope="scope"> <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"> <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 || ''"> <el-table-column v-if="col.addHtml" :prop="col.prop" :label="col.label" :key="index" :width="col.width || ''">
<template slot-scope="endTime"> <template slot-scope="endTime">
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<template slot-scope="scopeChild"> <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 == 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 == 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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -54,13 +54,13 @@ ...@@ -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 == 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>
<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" 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>
<el-button type="text" v-if="currentIndex == 4" @click="download(scope.scope, 'taskId')">下载</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<GLDialog :mode="mode" class="outboungSet-dialog" title="外呼设置" @onOk="handleOutboundConfirm" @onCancel="handleOutboundClose" :visible.sync="outboundVisible"> <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 ref="outboundsetRef" :model="outboundForm" label-width="154px" :rules="outboundRule">
<el-form-item label="每天外呼数量:" prop="outboundNum"> <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-item>
</el-form> </el-form>
<p class="marked">默认所有外呼任务按此规则进行外呼</p> <p class="marked">默认所有外呼任务按此规则进行外呼</p>
...@@ -81,12 +81,13 @@ ...@@ -81,12 +81,13 @@
<glsx-combi-form formRef="outboundChildRef" ref="outboundFormRef" labelWidth="154px" :formObj="outboundForm" :formData="outboundFormData" :formRules="outboundRule"> <glsx-combi-form formRef="outboundChildRef" ref="outboundFormRef" labelWidth="154px" :formObj="outboundForm" :formData="outboundFormData" :formRules="outboundRule">
<template slot="replay"> <template slot="replay">
<div class="flex m-b-10"> <div class="flex m-b-10">
<label class="font-14 color6 m-r-4">重播次数</label> <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> <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>
<div class="flex"> <div class="flex">
<label class="font-14 color6 m-r-4">重播间隔</label> <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> <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> </div>
</template> </template>
</glsx-combi-form> </glsx-combi-form>
...@@ -98,6 +99,7 @@ ...@@ -98,6 +99,7 @@
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()
...@@ -152,7 +154,7 @@ export default { ...@@ -152,7 +154,7 @@ export default {
isDisabled: 'true' isDisabled: 'true'
}, },
{ {
label: '外呼主机号码', label: '外呼主叫号码',
name: 'callerNums', name: 'callerNums',
type: 'select', type: 'select',
width: '360px', width: '360px',
...@@ -180,7 +182,7 @@ export default { ...@@ -180,7 +182,7 @@ export default {
width: '360px' width: '360px'
}, },
{ {
label: '重播设置', label: '重拨设置',
addHtml: 'replay', addHtml: 'replay',
name: 'replay' name: 'replay'
}, },
...@@ -280,18 +282,18 @@ export default { ...@@ -280,18 +282,18 @@ export default {
{ {
label: '商户号', label: '商户号',
prop: 'merchantId', prop: 'merchantId',
width: 160 minWidth: 120
}, },
{ {
label: '门店名称', label: '门店名称',
prop: 'merchantName', prop: 'merchantName',
width: 160, minWidth: 150,
line: 1 line: 1
}, },
{ {
label: '任务名称', label: '任务名称',
prop: 'taskName', prop: 'taskName',
width: 150, minWidth: 150,
line: 1 line: 1
}, },
{ {
...@@ -299,7 +301,7 @@ export default { ...@@ -299,7 +301,7 @@ export default {
prop: 'phoneCount', prop: 'phoneCount',
filter: 'executing,notExecute,stop,executed', filter: 'executing,notExecute,stop,executed',
line: 1, line: 1,
width: 120 minWidth: 120
}, },
{ {
label: '进度', label: '进度',
...@@ -341,7 +343,7 @@ export default { ...@@ -341,7 +343,7 @@ export default {
label: '当前执行次数', label: '当前执行次数',
prop: 'executeTimes', prop: 'executeTimes',
filter: 'executing,stop,executed', filter: 'executing,stop,executed',
width: 150 width: 120
}, },
{ {
label: '最后一次暂停时间', label: '最后一次暂停时间',
...@@ -369,13 +371,16 @@ export default { ...@@ -369,13 +371,16 @@ export default {
{ {
label: '操作', label: '操作',
addHtml: 'auth-button', addHtml: 'auth-button',
fixed: 'right',
width: 180 width: 180
} }
], ],
outboundInfoParams: [ outboundInfoParams: [
{ {
label: '子任务名称', label: '子任务名称',
prop: 'executeTaskName' prop: 'executeTaskName',
line: 1,
width: 200
}, },
{ {
label: '执行数量', label: '执行数量',
...@@ -407,17 +412,12 @@ export default { ...@@ -407,17 +412,12 @@ export default {
this.getCallerList() // 获取呼叫电话列表 this.getCallerList() // 获取呼叫电话列表
this.initParams() this.initParams()
this.getStatusStatistics() this.getStatusStatistics()
this.getOutBoundNum()
}, },
methods: { methods: {
timeCompare() { outboundSetHandle() {
let startDate = new Date(this.outboundForm.dialDate[0]).getTime() this.outboundVisible = true
let endDate = new Date(this.outboundForm.dialDate[1]).getTime() this.getOutBoundNum()
// if (startGetTime != 0 && endGetTime != 0 && startGetTime > endGetTime) {
// return true
// }
}, },
calcNum(val) { calcNum(val) {
let count = '0%' let count = '0%'
...@@ -495,7 +495,9 @@ export default { ...@@ -495,7 +495,9 @@ export default {
this.url = res this.url = res
this.importTask(row, 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 { ...@@ -534,12 +536,12 @@ export default {
}) })
} }
}, },
oninput(value) { oninput(value, min, max) {
let limitNum = value let limitNum = value
if (!/^[0-9]+$/.test(value)) limitNum = value.replace(/\D/g, '') if (!/^[0-9]+$/.test(value)) limitNum = new String(value).replace(/\D/g, '')
if (limitNum >= 2000) limitNum = 2000 if (limitNum >= max) limitNum = max
if (limitNum <= 0) limitNum = 1 if (limitNum <= min) limitNum = min
return limitNum return Number(limitNum)
}, },
// 统计:所有任务的执行状态 // 统计:所有任务的执行状态
getStatusStatistics() { getStatusStatistics() {
...@@ -587,7 +589,6 @@ export default { ...@@ -587,7 +589,6 @@ export default {
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
this.outboundVisible = false this.outboundVisible = false
this.getOutBoundNum()
}) })
}, },
//初始化数据回显 //初始化数据回显
...@@ -680,7 +681,9 @@ export default { ...@@ -680,7 +681,9 @@ export default {
} }
if (res.code == 0) { 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 { ...@@ -837,6 +840,10 @@ export default {
box-sizing: border-box; box-sizing: border-box;
z-index: 99; z-index: 99;
/deep/ { /deep/ {
.el-table__body {
box-sizing: border-box;
border: 1px solid #e5e5e5;
}
.expanded { .expanded {
& + tr:hover td { & + tr:hover td {
background: none !important; background: none !important;
...@@ -892,6 +899,36 @@ export default { ...@@ -892,6 +899,36 @@ export default {
width: 16.6%; 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 { .marked {
...@@ -937,9 +974,4 @@ export default { ...@@ -937,9 +974,4 @@ export default {
visibility: hidden; visibility: hidden;
} }
} }
.subtasks-wrap {
margin: 16px;
box-sizing: border-box;
width: 98% !important;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!