|
|
@@ -22,7 +22,16 @@
|
|
22
|
22
|
<el-table-column label="发送时间" align="center" prop="sendTime" />
|
|
23
|
23
|
<el-table-column label="发送状态" align="center" prop="sendStatus" />
|
|
24
|
24
|
<el-table-column label="发送内容" align="center" prop="sendContent" :show-overflow-tooltip="true" />
|
|
|
25
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
26
|
+ <template slot-scope="scope">
|
|
|
27
|
+ <el-button size="mini" @click="copyContent(scope.row.sendContent)" type="text"
|
|
|
28
|
+ icon="el-icon-document-copy">复制内容</el-button>
|
|
|
29
|
+ <el-button size="mini" @click="resend(scope.row)" type="text" icon="el-icon-s-promotion">编辑内容</el-button>
|
|
|
30
|
+ <el-button v-if="scope.row.sendStatus == '发送失败'|| scope.row.sendStatus == '发送中'" size="mini" type="text" @click="resendMessage(scope.row)" icon="el-icon-s-promotion">重新发送</el-button>
|
|
|
31
|
+ </template>
|
|
|
32
|
+ </el-table-column>
|
|
25
|
33
|
</el-table>
|
|
|
34
|
+ <resend :resendVidable="resendVidable" :rowData="rowData" @getList="getList" @cancelSend="cancelSend" :queryParams="queryParams"></resend>
|
|
26
|
35
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
|
27
|
36
|
@pagination="getList({caseNum:queryParams.caseNum},{pageNum:queryParams.pageNum,pageSize:queryParams.pageSize})" />
|
|
28
|
37
|
|
|
|
@@ -31,20 +40,22 @@
|
|
31
|
40
|
|
|
32
|
41
|
<script>
|
|
33
|
42
|
import {
|
|
34
|
|
- smsList,
|
|
|
43
|
+ recordList,reSendShortMessage
|
|
35
|
44
|
} from "@/api/deliveryRecord/deliveryRecord.js";
|
|
36
|
|
-
|
|
|
45
|
+import resend from "./components/resend.vue";
|
|
37
|
46
|
import { getDicts } from '@/api/system/dict/data.js'
|
|
38
|
47
|
export default {
|
|
39
|
48
|
name: "paymentList",
|
|
40
|
49
|
dicts: ["case_status"],
|
|
41
|
|
- components: { },
|
|
|
50
|
+ components: {resend },
|
|
42
|
51
|
data() {
|
|
43
|
52
|
return {
|
|
44
|
53
|
queryParams: {
|
|
45
|
54
|
pageNum: 1,
|
|
46
|
55
|
pageSize: 10,
|
|
47
|
56
|
},
|
|
|
57
|
+ resendVidable:false,
|
|
|
58
|
+ rowData:{},
|
|
48
|
59
|
caseStatus: [],
|
|
49
|
60
|
// 遮罩层
|
|
50
|
61
|
loading: false,
|
|
|
@@ -76,16 +87,16 @@ export default {
|
|
76
|
87
|
// 查询列表数据
|
|
77
|
88
|
getList(data,params) {
|
|
78
|
89
|
this.loading = true;
|
|
79
|
|
- smsList(data,params).then((response) => {
|
|
|
90
|
+ recordList(data,params).then((response) => {
|
|
80
|
91
|
this.dataList = response.rows;
|
|
|
92
|
+ console.log(this.dataList)
|
|
81
|
93
|
this.dataList.forEach(item=>{
|
|
82
|
|
- if(item.sendStatus == 0){
|
|
83
|
|
- item.sendStatus = "发送失败"
|
|
84
|
|
- }else if(item.sendStatus == 1){
|
|
85
|
|
- item.sendStatus = "已送达"
|
|
|
94
|
+ console.log(item)
|
|
|
95
|
+ if(item.sendStatus == 1){
|
|
|
96
|
+ item.sendStatus = "发送成功"
|
|
86
|
97
|
}else if(item.sendStatus == 2){
|
|
87
|
|
- item.sendStatus = "已读取"
|
|
88
|
|
- }else{
|
|
|
98
|
+ item.sendStatus = "发送中"
|
|
|
99
|
+ }else if(item.sendStatus == 3){
|
|
89
|
100
|
item.sendStatus = "发送失败"
|
|
90
|
101
|
}
|
|
91
|
102
|
})
|
|
|
@@ -93,6 +104,45 @@ export default {
|
|
93
|
104
|
this.loading = false;
|
|
94
|
105
|
});
|
|
95
|
106
|
},
|
|
|
107
|
+ /** 复制内容 */
|
|
|
108
|
+ copyContent(row) {
|
|
|
109
|
+ const el = document.createElement('textarea');
|
|
|
110
|
+ el.value = row;
|
|
|
111
|
+ document.body.appendChild(el);
|
|
|
112
|
+ el.select();
|
|
|
113
|
+ document.execCommand('copy');
|
|
|
114
|
+ document.body.removeChild(el);
|
|
|
115
|
+ this.$message.success('复制成功');
|
|
|
116
|
+ },
|
|
|
117
|
+ /**重新发送 */
|
|
|
118
|
+ resend(row){
|
|
|
119
|
+ console.log(row)
|
|
|
120
|
+ this.resendVidable = true;
|
|
|
121
|
+ this.rowData = row;
|
|
|
122
|
+ },
|
|
|
123
|
+ /**关闭弹窗 */
|
|
|
124
|
+ cancelSend(){
|
|
|
125
|
+ this.resendVidable = false;
|
|
|
126
|
+ },
|
|
|
127
|
+ // 重新发送
|
|
|
128
|
+ resendMessage(row){
|
|
|
129
|
+ console.log(row.sendStatus)
|
|
|
130
|
+ let valuesRow ={
|
|
|
131
|
+ id:row.id,
|
|
|
132
|
+ templateId:row.templateId,
|
|
|
133
|
+ phone:row.phone,
|
|
|
134
|
+ templateParams:row.templateParams
|
|
|
135
|
+ }
|
|
|
136
|
+ this.reSendShortMessageFn(valuesRow)
|
|
|
137
|
+ console.log(valuesRow)
|
|
|
138
|
+
|
|
|
139
|
+ },
|
|
|
140
|
+ reSendShortMessageFn(valuesRow){
|
|
|
141
|
+ reSendShortMessage(valuesRow).then(res=>{
|
|
|
142
|
+ this.$message.success('发送成功');
|
|
|
143
|
+ this.getList({ caseNum: this.queryParams.caseNum }, { pageNum: this.queryParams.pageNum, pageSize: this.queryParams.pageSize });
|
|
|
144
|
+ })
|
|
|
145
|
+ }
|
|
96
|
146
|
},
|
|
97
|
147
|
};
|
|
98
|
148
|
</script>
|