miaofuhao лет назад: 4
Родитель
Сommit
c360fa2eeb
1 измененных файлов с 73 добавлено и 86 удалено
  1. 73 86
      CallCenterWeb.UI/src/views/telCall/missedCalls/index.vue

+ 73 - 86
CallCenterWeb.UI/src/views/telCall/missedCalls/index.vue

@@ -22,9 +22,9 @@
22 22
         <el-option value="已回拨" label="已回拨"/>
23 23
       </el-select>
24 24
       <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
25
-      <el-button :loading="downloadLoading" :disabled="disableBL"  class="filter-item" type="primary" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
25
+      <el-button :loading="downloadLoading" :disabled="disableBL" class="filter-item" type="primary" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
26 26
     </div>
27
-      <!-- @row-dblclick="customerDetail" -->
27
+    <!-- @row-dblclick="customerDetail" -->
28 28
     <el-table v-loading="loading" :data="dataLists" border stripe max-height="500">
29 29
       <el-table-column type="index" label="编号" align="center" fixed width="80" ></el-table-column>
30 30
       <el-table-column prop="callerNumber" label="主叫号码" align="center" min-width ></el-table-column>
@@ -33,14 +33,14 @@
33 33
 
34 34
       <el-table-column label="客户类型" align="center" min-width >
35 35
         <template slot-scope="scope">
36
-         {{scope.row.servAgentGroupId|custometType}}
36
+          {{ scope.row.servAgentGroupId|custometType }}
37 37
         </template>
38 38
       </el-table-column>
39 39
       <el-table-column prop="cusName" label="客户名称" align="center" min-width ></el-table-column>
40 40
       <el-table-column prop="cusCode" label="客户编号" align="center" min-width ></el-table-column>
41 41
       <el-table-column prop="salMan" label="销售经理" align="center" min-width ></el-table-column>
42 42
       <!-- <el-table-column prop="saleNo" label="销售经理编号" align="center" min-width ></el-table-column> -->
43
-      
43
+
44 44
       <!-- <el-table-column label="呼叫状态" align="center" min-width>
45 45
         <template slot-scope="scope">
46 46
           <el-tag
@@ -51,7 +51,7 @@
51 51
         </template>
52 52
       </el-table-column> -->
53 53
       <el-table-column label="回拨状态" align="center" min-width>
54
-        <template slot-scope="scope">{{scope.row.hbStatus| calltypeFilter }}</template>
54
+        <template slot-scope="scope">{{ scope.row.hbStatus| calltypeFilter }}</template>
55 55
       </el-table-column>
56 56
       <el-table-column prop="ringLongTime" label="振铃时长" align="center" min-width ></el-table-column>
57 57
       <el-table-column label="来电时间" align="center" min-width="110">
@@ -86,10 +86,10 @@
86 86
 </template>
87 87
 
88 88
 <script>
89
-import { getList,addRemark } from '@/api/telCall/missedCalls/missedCalls'
89
+import { getList, addRemark } from '@/api/telCall/missedCalls/missedCalls'
90 90
 import { pickerOptions, formatterContent } from '@/utils'
91 91
 import { Send } from '@/utils/telWebsocket'
92
-import { timestampToTime} from '@/utils'
92
+import { timestampToTime } from '@/utils'
93 93
 import { getCallOutprefix } from '@/api/teloperation'
94 94
 import { mapGetters } from 'vuex'
95 95
 import store from '@/store'
@@ -104,7 +104,6 @@ export default {
104 104
   filters: {
105 105
     // 回拨类型
106 106
     calltypeFilter(status) {
107
-      
108 107
       const statusMap = {
109 108
         null: '未回拨',
110 109
         '未回拨': '未回拨',
@@ -112,15 +111,14 @@ export default {
112 111
         '已回拨': '已回拨'
113 112
       }
114 113
       return statusMap[status]
115
-
116 114
     },
117
-    custometType(status){
115
+    custometType(status) {
118 116
       const statusMap = {
119
-        101:'军品业务',
120
-        102:'民品业务',
121
-        103:'新能源业务',
122
-        104:'外贸业务',
123
-        105:'华亿业务'
117
+        101: '军品业务',
118
+        102: '民品业务',
119
+        103: '新能源业务',
120
+        104: '外贸业务',
121
+        105: '华亿业务'
124 122
       }
125 123
       return statusMap[status]
126 124
     }
@@ -131,8 +129,8 @@ export default {
131 129
       loading: false,
132 130
       keyword: '',
133 131
       hbStatus: '', // 回拨状态
134
-      remarkId:'',
135
-      disableBL:true,
132
+      remarkId: '',
133
+      disableBL: true,
136 134
       roleOptions: [],
137 135
       searchDate: '',
138 136
       pickerOptions,
@@ -147,7 +145,7 @@ export default {
147 145
       },
148 146
       downloadLoading: false,
149 147
       dataLists: [], // 列表数据
150
-      dataListsExport:[]
148
+      dataListsExport: []
151 149
     }
152 150
   },
153 151
   computed: {
@@ -163,17 +161,15 @@ export default {
163 161
       'groupid'
164 162
     ])
165 163
   },
166
-  watch:{
164
+  watch: {
167 165
     callStateUp: function() {
168
-        
169
-        console.log("watch---"+this.callStateUp)
170
-
171
-				if (this.callStateUp) {
172
-          this.getList()
173
-          this.getListExport()
174
-				}
166
+      console.log('watch---' + this.callStateUp)
175 167
 
176
-			}
168
+      if (this.callStateUp) {
169
+        this.getList()
170
+        this.getListExport()
171
+      }
172
+    }
177 173
   },
178 174
   created() {
179 175
     this.getList()
@@ -188,7 +184,7 @@ export default {
188 184
   methods: {
189 185
     getList() {
190 186
       this.loading = true
191
-      //this.disableBL = true
187
+      // this.disableBL = true
192 188
       return new Promise(resolve => {
193 189
         const params = {
194 190
           pageindex: this.pageParams.pageindex, // 第几页
@@ -202,7 +198,7 @@ export default {
202 198
         }
203 199
         getList(params).then(response => {
204 200
           this.loading = false
205
-          //this.disableBL = false
201
+          // this.disableBL = false
206 202
           if (response.state.toLowerCase() === 'success') {
207 203
             if (response.total == null) {
208 204
               this.pageParams.total = 0
@@ -210,19 +206,18 @@ export default {
210 206
               this.pageParams.total = response.total
211 207
             }
212 208
             this.dataLists = response.data
213
-            //this.dataListsExport = response.data
209
+            // this.dataListsExport = response.data
214 210
           }
215 211
         })
216 212
         resolve()
217 213
       })
218 214
     },
219 215
     // 添加
220
-    addRemarkHbStatus(){
221
-      
216
+    addRemarkHbStatus() {
222 217
       this.loading = true
223 218
       const datas = {
224 219
         id: this.remarkId,
225
-        hbStatus: "已回拨"
220
+        hbStatus: '已回拨'
226 221
       }
227 222
       // 添加
228 223
       addRemark(datas).then(response => {
@@ -239,11 +234,9 @@ export default {
239 234
       }).catch(() => {
240 235
         this.loading = false
241 236
       })
242
-        
243
-
244 237
     },
245
-						
246
-    getListExport(){
238
+
239
+    getListExport() {
247 240
       this.loading = true
248 241
       this.disableBL = true
249 242
       return new Promise(resolve => {
@@ -264,45 +257,39 @@ export default {
264 257
             this.$message({
265 258
               message: '导出未接来电数据查询成功!',
266 259
               type: 'success',
267
-              duration: 1000
268
-              ,offset:50
260
+              duration: 1000,
261
+              offset: 50
269 262
             })
270 263
             this.dataListsExport = response.data
271
-
272 264
           }
273 265
         })
274 266
         resolve()
275 267
       })
276 268
     },
277
-    calltypeState(index){
278
-      
269
+    calltypeState(index) {
279 270
       if (index.callBackTime) {
280
-        
281
-        if(index.hbStatus=="不用回拨"){
271
+        if (index.hbStatus == '不用回拨') {
282 272
           return '不用回拨'
283
-        }else {
273
+        } else {
284 274
           return '已回拨'
285 275
         }
286
-
287
-      } else{
288
-
276
+      } else {
289 277
         if (!index.hbStatus) {
290 278
           return '未回拨'
291 279
         } else {
292 280
           return index.hbStatus
293 281
         }
294
-
295 282
       }
296 283
     },
297
-	//显示客户信息
298
-    btn_remark(remarkId){
299
-      console.log(remarkId);
284
+    // 显示客户信息
285
+    btn_remark(remarkId) {
286
+      console.log(remarkId)
300 287
       this.$layer.iframe({
301 288
         content: {
302 289
           content: remarkIndex, // 传递的组件对象
303 290
           parent: this, // 当前的vue对象
304 291
           data: {
305
-            remarkId:remarkId
292
+            remarkId: remarkId
306 293
           } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
307 294
         },
308 295
         area: ['40%', '40%'],
@@ -318,30 +305,30 @@ export default {
318 305
       this.downloadLoading = true
319 306
       import('@/vendor/Export2Excel').then(excel => {
320 307
         const tHeader = [
321
-          '主叫号码', 
322
-          '被叫坐席分机号', 
323
-          '坐席名称', 
324
-          '客户类型', 
308
+          '主叫号码',
309
+          '被叫坐席分机号',
310
+          '坐席名称',
311
+          '客户类型',
325 312
           '客户名称',
326
-          '客户编号', 
327
-          '销售经理', 
328
-          '回拨状态', 
329
-          '振铃时长', 
313
+          '客户编号',
314
+          '销售经理',
315
+          '回拨状态',
316
+          '振铃时长',
330 317
           '来电时间',
331
-          '回拨时间', 
332
-          '备注' ]
318
+          '回拨时间',
319
+          '备注']
333 320
         const filterVal = [
334
-          'callerNumber', 
335
-          'agentExtNumber', 
336
-          'agentName',  
337
-          'servAgentGroupId', 
338
-          'cusName', 
339
-          'cusCode', 
340
-          'salMan',  
341
-          'hbStatus', 
342
-          'ringLongTime', 
343
-          'callInTime', 
344
-          'callBackTime', 
321
+          'callerNumber',
322
+          'agentExtNumber',
323
+          'agentName',
324
+          'servAgentGroupId',
325
+          'cusName',
326
+          'cusCode',
327
+          'salMan',
328
+          'hbStatus',
329
+          'ringLongTime',
330
+          'callInTime',
331
+          'callBackTime',
345 332
           'remark']
346 333
         const list = this.dataListsExport
347 334
         const data = this.formatJson(filterVal, list)
@@ -358,12 +345,12 @@ export default {
358 345
     },
359 346
     // 回拨
360 347
     btn_call(dataListLine) {
361
-      //dataListLine.callerNumber
348
+      // dataListLine.callerNumber
362 349
       console.log(dataListLine.id)
363 350
       console.log(dataListLine.callerNumber)
364
-      this.remarkId =dataListLine.id
351
+      this.remarkId = dataListLine.id
365 352
       this.addRemarkHbStatus()
366
-      
353
+
367 354
       this.callOut(dataListLine.callerNumber)
368 355
     },
369 356
     formatJson(filterVal, jsonData) {
@@ -385,20 +372,20 @@ export default {
385 372
             return timestampToTime(v[j])
386 373
           } else if (j == 'callBackTime') {
387 374
             return timestampToTime(v[j])
388
-          } else{
375
+          } else {
389 376
             return v[j]
390 377
           }
391 378
         })
392 379
       )
393 380
     },
394
-    
395
-    custometType(status){
381
+
382
+    custometType(status) {
396 383
       const statusMap = {
397
-        101:'军品业务',
398
-        102:'民品业务',
399
-        103:'新能源业务',
400
-        104:'外贸业务',
401
-        105:'华亿业务'
384
+        101: '军品业务',
385
+        102: '民品业务',
386
+        103: '新能源业务',
387
+        104: '外贸业务',
388
+        105: '华亿业务'
402 389
       }
403 390
       return statusMap[status]
404 391
     },
@@ -406,7 +393,7 @@ export default {
406 393
     calltypeFilter(status) {
407 394
       const statusMap = {
408 395
         null: '未回拨'
409
-        
396
+
410 397
       }
411 398
       return statusMap[status]
412 399
     },