|
@@ -114,6 +114,9 @@
|
114
|
114
|
<el-popconfirm @confirm="copyDetail(scope.row)" :title="`确定复制【${scope.row.name}】群发消息?`">
|
115
|
115
|
<div slot="reference" class="c-00B38A pointer table_button">复制</div>
|
116
|
116
|
</el-popconfirm>
|
|
117
|
+ <div v-if="scope.row.enable==3" class="pointer table_button c-FF604D" @click="onClickCancelSend(scope.row)">
|
|
118
|
+ 停止群发
|
|
119
|
+ </div>
|
117
|
120
|
</div>
|
118
|
121
|
</template>
|
119
|
122
|
</el-table-column>
|
|
@@ -418,7 +421,42 @@ export default {
|
418
|
421
|
}
|
419
|
422
|
]
|
420
|
423
|
this.$exportOrder({ excelDatas, name: `员工群发消息(导出时间:${this.$getDay(0)})` })
|
421
|
|
- }
|
|
424
|
+ },
|
|
425
|
+
|
|
426
|
+ // 监听点击“停止群发”
|
|
427
|
+ async onClickCancelSend({ name, rule_id }) {
|
|
428
|
+ try {
|
|
429
|
+ await this.$confirm(`确定停止当前群发任务吗?`, `${ name }`, {
|
|
430
|
+ confirmButtonText: '确定',
|
|
431
|
+ cancelButtonText: '取消',
|
|
432
|
+ type: 'warning'
|
|
433
|
+ })
|
|
434
|
+ this.handleCancelSend(rule_id)
|
|
435
|
+ } catch (error) {
|
|
436
|
+ console.log('error => ', error)
|
|
437
|
+ }
|
|
438
|
+ },
|
|
439
|
+ // async handleCancelSend(rule_id) {
|
|
440
|
+ // try {
|
|
441
|
+ // this.loading = true
|
|
442
|
+ // const url = `${this.URL.BASEURL}${this.URL.massMsgCancel_setConfig}`
|
|
443
|
+ // const params = {
|
|
444
|
+ // rule_id,
|
|
445
|
+ // type: 1, // 群发消息类型。1正常群发 2智能群发 3客户群群发
|
|
446
|
+ // }
|
|
447
|
+ // const { data: res = {} } = await this.$axios.post(url, params)
|
|
448
|
+ // if (res && res.errno == 0) {
|
|
449
|
+ // this.$message.success('操作成功')
|
|
450
|
+ // this.resetEvent()
|
|
451
|
+ // } else if (res.errno != 4002) {
|
|
452
|
+ // this.$message.warning(res.err)
|
|
453
|
+ // }
|
|
454
|
+ // } catch (error) {
|
|
455
|
+ // console.log(error)
|
|
456
|
+ // } finally {
|
|
457
|
+ // this.loading = false
|
|
458
|
+ // }
|
|
459
|
+ // },
|
422
|
460
|
}
|
423
|
461
|
}
|
424
|
462
|
</script>
|