Commit 29ee6bdc by 前端

Merge branch 'v2.10.0' into 'master'

V2.10.0

See merge request !3
2 parents f9f5b884 4c8153ca
......@@ -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}
......@@ -18,9 +18,6 @@ export const fetchConfig = function (isEnv = true) {
// Object.assign(request, { timeout })
// 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({ request: { timeout: 100000 } }).get('https://oss-config.test.glsx.com.cn/mock/62fe2a36abac6ff6ac239d3c/outbound/config')
}
......
......@@ -42,7 +42,7 @@
</template>
<template slot="excelName" slot-scope="scope">
<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>
</el-tooltip>
<div v-else>{{ scope.scope.excelName }}</div>
......@@ -54,14 +54,13 @@
</template>
<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" @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 == 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>
<el-button type="text" size="small">导入</el-button>
<input type="file" style="opacity: 0" :ref="'file' + scope.scope.id" accept="*" @change="importExcel($event, scope.scope)" />
</div>
</div>
......@@ -80,6 +79,20 @@
</div>
<p class="marked">默认所有外呼任务按此规则进行外呼</p>
</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">
<tip-panel panelMinHeight="45px" :panelContent="panelContent" v-if="isPanel" @closePanel="closePanel"></tip-panel>
......@@ -104,14 +117,13 @@
const timeRules = (rule, value, callback) => {
if (value) {
const date = new Date()
let endYear = date.getFullYear() //获取年份
let endMonth = date.getMonth() + 1 // 获取月份
let endDay = date.getDate()
const startTime = endYear + '-' + endMonth + '-' + endDay + ' ' + value[0]
const endTime = endYear + '-' + endMonth + '-' + endDay + ' ' + value[1]
const start = endYear + '-' + endMonth + '-' + endDay + ' ' + '9:00'
const end = endYear + '-' + endMonth + '-' + endDay + ' ' + '20:00'
const startTime = endYear + '/' + endMonth + '/' + endDay + ' ' + value[0]
const endTime = endYear + '/' + endMonth + '/' + endDay + ' ' + value[1]
const start = endYear + '/' + endMonth + '/' + endDay + ' ' + '9:00'
const end = endYear + '/' + endMonth + '/' + endDay + ' ' + '20:00'
let result = new Date(startTime) >= new Date(start) && new Date(endTime) <= new Date(end)
if (!result) {
callback(new Error('外呼时间只限于09:00-20:00'))
......@@ -135,8 +147,15 @@ export default {
activeName: 'notExecute',
isPanel: true,
outboundVisible: false,
outboundmarketVisible: false,
openVisible: false,
taskData: {},
message: {
messageAutograph: '',
messageDetail: '',
messageSuffix: ''
},
marketNote: '',
outboundForm: {
outboundNum: 60,
taskId: '',
......@@ -211,7 +230,9 @@ export default {
outboundNum: [{ required: true, message: '请输入外呼数量', trigger: 'blur' }],
callerNums: [{ 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: [
{
......@@ -294,7 +315,7 @@ export default {
{
label: '任务名称',
prop: 'taskName',
width: 150,
width: 210,
line: 1
},
{
......@@ -430,7 +451,7 @@ export default {
},
downloadFile(url, fileName) {
this.getBlob(url).then(blob => {
this.saveAs(blob, fileName + '.xlsx')
this.saveAs(blob, fileName)
})
},
getBlob(url) {
......@@ -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) {
this.$router.push({
......@@ -693,7 +760,7 @@ export default {
if (item.label == '操作') {
switch (this.currentIndex) {
case 1:
item.width = 90
item.width = 170
break
case 2:
item.width = 115
......@@ -1005,6 +1072,20 @@ export default {
/deep/ .row-expand-cover .el-table__expand-icon {
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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!