Commit 42455ee0 by 前端

commit:外呼短信支持编辑

1 parent b191cc0c
...@@ -143,4 +143,16 @@ const getOutBoundtaskMessage = params => { ...@@ -143,4 +143,16 @@ const getOutBoundtaskMessage = params => {
returnAll: true returnAll: true
}) })
} }
export default { getOutBoundtaskMessage,getTaskList, getStatusStatistics, setOutBoundNum, createExecuteTask, getRobotList, getCallerList ,taskbaseDetails ,getphoneStatusList,downloadPhoneList,updateStatus,updatePhoneStatus,getOutBoundNum}
// 修改外呼任务短信内容
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}
...@@ -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>
...@@ -60,9 +60,7 @@ ...@@ -60,9 +60,7 @@
<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>
...@@ -82,10 +80,18 @@ ...@@ -82,10 +80,18 @@
<p class="marked">默认所有外呼任务按此规则进行外呼</p> <p class="marked">默认所有外呼任务按此规则进行外呼</p>
</GLDialog> </GLDialog>
<!-- 外呼短信 --> <!-- 外呼短信 -->
<GLDialog :mode="mode" title="外呼短信" :hasFooter="false" :visible.sync="outboundmarketVisible"> <GLDialog :mode="mode" title="外呼短信" :visible.sync="outboundmarketVisible" @onCancel="handleMessageClose" @onOk="handleMessageConfirm">
<div class="market-note"> <div class="gl-form-min">
{{ marketNote }} <el-form ref="outboundsetRef" :model="outboundForm" label-width="154px" :rules="outboundRule">
<el-form-item label="短信签名:">
<el-input v-model="message.messageAutograph"></el-input>
</el-form-item>
<el-form-item label="短信内容:">
<el-input v-model="message.messageDetail" type="textarea" :rows="3"></el-input>
</el-form-item>
</el-form>
</div> </div>
<div class="market-note">【{{ this.message.messageAutograph }}】 {{ this.message.messageDetail }}{{ this.message.messageSuffix }}</div>
</GLDialog> </GLDialog>
<!-- 开启外呼确认 --> <!-- 开启外呼确认 -->
<GLDialog :mode="mode" title="开启外呼确认" :visible.sync="openVisible" @onCancel="handleOpenOutboundClose" @onOk="handleOpenOutboundConfirm"> <GLDialog :mode="mode" title="开启外呼确认" :visible.sync="openVisible" @onCancel="handleOpenOutboundClose" @onOk="handleOpenOutboundConfirm">
...@@ -144,6 +150,11 @@ export default { ...@@ -144,6 +150,11 @@ export default {
outboundmarketVisible: false, outboundmarketVisible: false,
openVisible: false, openVisible: false,
taskData: {}, taskData: {},
message: {
messageAutograph: '',
messageDetail: '',
messageSuffix: ''
},
marketNote: '', marketNote: '',
outboundForm: { outboundForm: {
outboundNum: 60, outboundNum: 60,
...@@ -650,6 +661,28 @@ export default { ...@@ -650,6 +661,28 @@ export default {
} }
}) })
}, },
handleMessageConfirm() {
let {
message: {id, messageAutograph, messageDetail }
} = this
let params = {
id,
messageAutograph,
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) { marketing(data) {
let params = { let params = {
...@@ -657,11 +690,11 @@ export default { ...@@ -657,11 +690,11 @@ export default {
} }
this.$apis.outbound.getOutBoundtaskMessage(params).then(res => { this.$apis.outbound.getOutBoundtaskMessage(params).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.outboundmarketVisible = true this.outboundmarketVisible = true
this.marketNote = res.data.messageDetail this.message = { ...res.data }
this.message.messageDetail = this.message.messageDetail.replace(/【.*】/, '')
} }
}) })
}, },
//外呼详情 //外呼详情
handleDetails(data) { handleDetails(data) {
...@@ -1026,11 +1059,20 @@ export default { ...@@ -1026,11 +1059,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 { .market-note {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #333333; color: #666666;
line-height: 22px; line-height: 20px;
padding: 8px;
background: #f9f9f9;
margin-left: 154px;
width: 432px;
box-sizing: border-box;
margin-top: -12px;
} }
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!