miaofuhao лет назад: 6
Родитель
Сommit
239209194f

+ 3 - 4
fuwaiCallCenterWeb.UI/src/views/clickoutbound/allot/index.vue

@@ -66,7 +66,6 @@
66 66
           <span class="pager_num">(可分配号码数量: {{ distribnum }})</span>
67 67
         </el-form-item>
68 68
       </el-form>
69
-      <!-- <span v-if="distribnum">可分配数量: {{ distribnum }}</span> -->
70 69
       <el-col :md="24" class="allot_btn">
71 70
         <el-button type="primary" @click="submitList">分配</el-button>
72 71
       </el-col>
@@ -160,15 +159,15 @@ export default {
160 159
           })
161 160
           const datas = {
162 161
             taskid: this.rowid, //	是	string	任务id
163
-            fpvalue: this.ruleForm.taskname, // 分配号码数
162
+            fpvalue: this.ruleForm.taskname, // 分配号码数  this.distribnum
164 163
             arruser: arruser //	否	string[]	分配坐席
165 164
           }
166 165
           fpdata(datas).then(response => {
167 166
             this.loading = false
168 167
             if (response.state.toLowerCase() === 'success') {
169 168
               debugger
170
-              this.$parent.$layer.close(this.layerid)
171
-              this.$parent.getList() // 重新加载父级数据
169
+              this.ruleForm.taskname = ''
170
+              this.getDetail() // 重新加载父级数据
172 171
               this.$message.success('恭喜你,分配成功!')
173 172
             }
174 173
           }).catch(() => {

+ 162 - 20
fuwaiCallCenterWeb.UI/src/views/clickoutbound/myTaskresult/components/tabPager.vue

@@ -1,6 +1,16 @@
1 1
 <template>
2 2
   <div class="tabPager">
3 3
     <h1 class="pager_title">{{ title }}</h1>
4
+    <p class="remark">
5
+      <el-row :gutter="20">
6
+        <el-col :lg="8">
7
+          <span v-if="quesName">姓名: {{ quesName }}</span>
8
+        </el-col>
9
+        <el-col :lg="8">
10
+          <span v-if="quesPhone">电话: <span class="quesephon" @click="outboundClick(quesPhone)">{{ quesPhone }}</span></span>
11
+        </el-col>
12
+      </el-row>
13
+    </p>
4 14
     <p v-if="remark" class="remark">
5 15
       {{ remark }}
6 16
     </p>
@@ -32,6 +42,17 @@
32 42
         </div>
33 43
       </template>
34 44
     </div>
45
+    <!-- 呼叫结果 -->
46
+    <el-card v-if="callResults.length" shadow="hover" class="call_result">
47
+      <h5 class="title">呼叫结果</h5>
48
+      <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="order_form">
49
+        <el-radio-group v-model="ruleForm.callresultid">
50
+          <el-radio v-for="item in callResults" :key="item.id" :label="item.id" border>
51
+            {{ item.name }}
52
+          </el-radio>
53
+        </el-radio-group>
54
+      </el-form>
55
+    </el-card>
35 56
     <p v-if="pagerLists.length > 0" class="btn">
36 57
       <el-button type="primary" @click="submitPager">提 交</el-button>
37 58
     </p>
@@ -39,7 +60,11 @@
39 60
 </template>
40 61
 
41 62
 <script>
42
-import { getPager, answerPager } from '@/api/questionnaire/management'
63
+import store from '@/store'
64
+import { mapGetters } from 'vuex'
65
+import { Send } from '@/utils/telWebsocket'
66
+import { getPager, answerPager, taskId, getPhone } from '@/api/questionnaire/management'
67
+import { getDictionary } from '@/api/commonAPI'
43 68
 import { uniqueObjArray } from '@/utils'
44 69
 
45 70
 export default {
@@ -48,18 +73,58 @@ export default {
48 73
     pagerDatas: {
49 74
       type: Object,
50 75
       default: () => {}
76
+    },
77
+    rowid: {
78
+      type: String,
79
+      default: ''
80
+    },
81
+    layerid: {
82
+      type: String,
83
+      default: ''
51 84
     }
52 85
   },
53 86
   data() {
54 87
     return {
88
+      ruleForm: {
89
+        id: '',
90
+        callresultid: '5bfe540c5a10b06b7a35a83a'
91
+      },
92
+      rules: {
93
+        callresultid: [{
94
+          required: true,
95
+          message: '请选择呼叫结果',
96
+          trigger: 'blur'
97
+        }]
98
+      },
55 99
       loading: false,
56 100
       title: '',
101
+      quesName: '',
102
+      taskid: '',
103
+      recordid: '',
104
+      quesPhone: '',
57 105
       remark: '',
58 106
       pagerid: '',
59 107
       pagerLists: [],
108
+      callResults: [], // 呼叫结果数据
60 109
       jumpItem: [] // 跳过的试题
61 110
     }
62 111
   },
112
+  computed: {
113
+    ...mapGetters([
114
+      'usercode', // 工号
115
+      'extension', // 分机号
116
+      'telIsLogin', // 是否签入
117
+      'telSeatState', // 坐席状态
118
+      'telLineState', // 线路状态
119
+      'telIsVisCallout' // 外呼面板是否显示
120
+    ]),
121
+    // 是否可以点击外呼
122
+    isAllowCallout: function() {
123
+      // `this` 指向 vm 实例
124
+      return this.telIsLogin && this.telSeatState === 2 && this.telLineState === 1
125
+    }
126
+    //
127
+  },
63 128
   watch: {
64 129
     pagerDatas(newValue, oldValue) {
65 130
       // console.log(newValue.pageid, oldValue.pageid)
@@ -68,13 +133,49 @@ export default {
68 133
       }
69 134
     }
70 135
   },
71
-  created() {},
136
+
137
+  created() {
138
+    if (this.rowid) {
139
+      this.ruleForm.id = this.rowid
140
+      // this.getPagers(this.rowid)
141
+      this.taskPagers(this.rowid)
142
+      this.getCallResuts() // 获取呼叫结果
143
+    }
144
+  },
72 145
   methods: {
146
+    // 通过id获取问卷id
147
+    taskPagers(rid) {
148
+      this.loading = true
149
+      return new Promise(resolve => {
150
+        taskId(rid).then(response => {
151
+          this.loading = false
152
+          if (response.state.toLowerCase() === 'success') {
153
+            this.taskid = response.data.pagerid
154
+            this.recordid = response.data.tasktel.id
155
+            this.quesName = response.data.tasktel.cusname
156
+            this.quesPhone = response.data.tasktel.phone
157
+            this.getPagers(this.taskid)
158
+          }
159
+        })
160
+        resolve()
161
+      })
162
+    },
163
+    // 获取呼叫结果
164
+    getCallResuts() {
165
+      return new Promise(resolve => {
166
+        getDictionary('ZDWHJG').then(response => {
167
+          if (response.state.toLowerCase() === 'success') {
168
+            this.callResults = response.data
169
+          }
170
+        })
171
+        resolve()
172
+      })
173
+    },
73 174
     // 获取问卷信息
74
-    getPagers() {
175
+    getPagers(rid) {
75 176
       this.loading = true
76 177
       return new Promise(resolve => {
77
-        getPager(this.pagerDatas.pageid).then(response => {
178
+        getPager(rid).then(response => {
78 179
           this.loading = false
79 180
           if (response.state.toLowerCase() === 'success') {
80 181
             // 修改父组件的值
@@ -92,33 +193,71 @@ export default {
92 193
 
93 194
     // 提交
94 195
     submitPager() {
95
-      // 验证必填项
96 196
       let pagerOptions = []
97
-      // 正常接通
98
-      if (this.pagerDatas.callresult === '5bfe540c5a10b06b7a35a83a') {
99
-        if (this.validPager() === false) {
100
-          return
101
-        }
102
-        // 修改试题数据用于提交
103
-        pagerOptions = this.getPagerOptions()
197
+      let pagerDatas
198
+      // 修改试题数据用于提交
199
+      pagerOptions = this.getPagerOptions()
200
+      // console.log(pagerOptions)
201
+      const data = {
202
+        fullname: this.quesName,
203
+        tel: this.quesPhone,
204
+        pageid: this.taskid,
205
+        recordid: this.recordid,
206
+        result: pagerOptions,
207
+        callresult: this.ruleForm.callresultid
104 208
       }
105
-
106
-      const data = Object.assign(this.pagerDatas, {
107
-        result: pagerOptions
108
-      })
109
-      // console.log(JSON.stringify(data));
209
+      console.log(this.ruleForm.callresultid)
110 210
       answerPager(data).then(response => {
111 211
         this.loading = false
112 212
         if (response.state.toLowerCase() === 'success') {
213
+          debugger
113 214
           // 触发父组件的方法
114
-          this.$emit('getTP')
215
+          this.$parent.$layer.close(this.layerid)
216
+          this.$parent.getList() // 重新加载父级数据
115 217
           this.$message.success('恭喜你,数据提交成功!')
116 218
         }
117 219
       }).catch(() => {
118 220
         this.loading = false
119 221
       })
120 222
     },
121
-
223
+    outboundClick(quesPhone) {
224
+      // this.loading = true
225
+      this.$confirm('您确定要对此客户发起呼叫吗?', '提示', {
226
+        confirmButtonText: '确定',
227
+        cancelButtonText: '取消',
228
+        type: 'warning'
229
+      })
230
+        .then(() => {
231
+          getPhone(quesPhone).then(response => {
232
+            if (response.state.toLowerCase() === 'success') {
233
+              const res = response.data
234
+              this.scoketDatas = {
235
+                'Type': 'MakeCall',
236
+                'AgentID': this.usercode,
237
+                'AgentExten': this.extension,
238
+                'Header': res.fix, // 号码前缀 用于截断前缀得到真实号码
239
+                'DestinationNumber': res.phone //
240
+              }
241
+              store.dispatch('ChangeCallNum', quesPhone)
242
+              Send(this.scoketDatas)
243
+              // store.dispatch('UpdateCalloutScreen', false)// 关闭外呼面板
244
+            }
245
+          })
246
+        })
247
+        .catch(() => {
248
+          // this.loading = false
249
+          this.$message.info('已取消呼叫')
250
+        })
251
+      // return new Promise(resolve => {
252
+      //   getPhone(quesPhone).then(response => {
253
+      //     this.loading = false
254
+      //     if (response.state.toLowerCase() === 'success') {
255
+      //       debugger
256
+      //     }
257
+      //   })
258
+      //   resolve()
259
+      // })
260
+    },
122 261
     // 单选题跳题
123 262
     jumpPage(value, e) {
124 263
       // 1.获取跳题的 queguid
@@ -275,7 +414,10 @@ export default {
275 414
 			font-size: 24px;
276 415
 			color: #333333;
277 416
 		}
278
-
417
+    .quesephon{
418
+      color: #337ab7;
419
+      cursor: pointer;
420
+    }
279 421
 		.remark {
280 422
 			font-size: 16px;
281 423
 			text-align: justify;

+ 4 - 8
fuwaiCallCenterWeb.UI/src/views/clickoutbound/myTaskresult/index.vue

@@ -26,16 +26,12 @@
26 26
           {{ scope.row.cusaddr | formatterContent }}
27 27
         </template>
28 28
       </el-table-column>
29
-      <el-table-column label="呼叫结果" align="center" min-width="110">
30
-        <template slot-scope="scope">
31
-          {{ callResultsFilter(scope.row.askres) }}
32
-        </template>
33
-      </el-table-column>
29
+      <el-table-column prop="hjjgname" label="呼叫结果" align="center" min-width="110"/>
34 30
       <el-table-column prop="userid" label="坐席工号" align="center" min-width=""/>
35 31
       <el-table-column prop="createtime" label="创建时间" align="center" min-width="130"/>
36 32
       <el-table-column label="操作" width="160" align="center" class-name="oparate_btn" fixed="right">
37 33
         <template slot-scope="scope">
38
-          <el-button size="mini" plain type="primary" @click="btn_detail(scope.row.id)">查看</el-button>
34
+          <el-button size="mini" plain type="primary" @click="btn_detail(scope.row.quelistid)">查看</el-button>
39 35
         </template>
40 36
       </el-table-column>
41 37
     </el-table>
@@ -52,7 +48,7 @@
52 48
 <script>
53 49
 import { getMyTaskResultLists } from '@/api/clickoutbound/tasks'
54 50
 import { getDictionary } from '@/api/commonAPI'
55
-import tabPager from './components/tabPager'
51
+import detail from './detail'
56 52
 import { pickerOptions, formatterContent } from '@/utils'
57 53
 import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
58 54
 export default {
@@ -127,7 +123,7 @@ export default {
127 123
     btn_detail(editId) {
128 124
       this.$layer.iframe({
129 125
         content: {
130
-          content: tabPager, // 传递的组件对象
126
+          content: detail, // 传递的组件对象
131 127
           parent: this, // 当前的vue对象
132 128
           data: {
133 129
             'rowid': editId

+ 13 - 18
fuwaiCallCenterWeb.UI/src/views/clickoutbound/taskResult/index.vue

@@ -26,16 +26,12 @@
26 26
           {{ scope.row.cusaddr | formatterContent }}
27 27
         </template>
28 28
       </el-table-column>
29
-      <el-table-column label="呼叫结果" align="center" min-width="110">
30
-        <template slot-scope="scope">
31
-          {{ callResultsFilter(scope.row.askres) }}
32
-        </template>
33
-      </el-table-column>
29
+      <el-table-column prop="hjjgname" label="呼叫结果" align="center" min-width="110"/>
34 30
       <el-table-column prop="userid" label="坐席工号" align="center" min-width=""/>
35 31
       <el-table-column prop="createtime" label="创建时间" align="center" min-width="130"/>
36 32
       <el-table-column label="操作" width="160" align="center" class-name="oparate_btn" fixed="right">
37 33
         <template slot-scope="scope">
38
-          <el-button size="mini" plain type="primary" @click="btn_detail(scope.row.id)">查看</el-button>
34
+          <el-button size="mini" plain type="primary" @click="btn_detail(scope.row.quelistid)">查看</el-button>
39 35
         </template>
40 36
       </el-table-column>
41 37
     </el-table>
@@ -125,18 +121,17 @@ export default {
125 121
     },
126 122
 
127 123
     btn_detail(editId) {
128
-      // alert('222')
129
-      // this.$layer.iframe({
130
-      //   content: {
131
-      //     content: detail, // 传递的组件对象
132
-      //     parent: this, // 当前的vue对象
133
-      //     data: {
134
-      //       'rowid': editId
135
-      //     } // props
136
-      //   },
137
-      //   area: ['80%', '90%'],
138
-      //   title: '查看问卷'
139
-      // })
124
+      this.$layer.iframe({
125
+        content: {
126
+          content: detail, // 传递的组件对象
127
+          parent: this, // 当前的vue对象
128
+          data: {
129
+            'rowid': editId
130
+          } // props
131
+        },
132
+        area: ['80%', '90%'],
133
+        title: '查看问卷'
134
+      })
140 135
     },
141 136
 
142 137
     // 获取呼叫结果数据

+ 6 - 4
fuwaiCallCenterWeb.UI/src/views/clickoutbound/tasks/components/tabPager.vue

@@ -47,7 +47,7 @@
47 47
       <h5 class="title">呼叫结果</h5>
48 48
       <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="order_form">
49 49
         <el-radio-group v-model="ruleForm.callresultid">
50
-          <el-radio v-for="item in callResults" :key="item.id" :label="item.id" border>
50
+          <el-radio v-for="item in callResults" :key="item.name" :label="item.name" border>
51 51
             {{ item.name }}
52 52
           </el-radio>
53 53
         </el-radio-group>
@@ -87,7 +87,7 @@ export default {
87 87
     return {
88 88
       ruleForm: {
89 89
         id: '',
90
-        callresultid: '5bfe540c5a10b06b7a35a83a'
90
+        callresultid: '正常接通'
91 91
       },
92 92
       rules: {
93 93
         callresultid: [{
@@ -212,7 +212,8 @@ export default {
212 212
         if (response.state.toLowerCase() === 'success') {
213 213
           debugger
214 214
           // 触发父组件的方法
215
-          this.$emit('getTP')
215
+          this.$parent.$layer.close(this.layerid)
216
+          this.$parent.getList() // 重新加载父级数据
216 217
           this.$message.success('恭喜你,数据提交成功!')
217 218
         }
218 219
       }).catch(() => {
@@ -220,7 +221,7 @@ export default {
220 221
       })
221 222
     },
222 223
     outboundClick(quesPhone) {
223
-      this.loading = true
224
+      // this.loading = true
224 225
       this.$confirm('您确定要对此客户发起呼叫吗?', '提示', {
225 226
         confirmButtonText: '确定',
226 227
         cancelButtonText: '取消',
@@ -244,6 +245,7 @@ export default {
244 245
           })
245 246
         })
246 247
         .catch(() => {
248
+          // this.loading = false
247 249
           this.$message.info('已取消呼叫')
248 250
         })
249 251
       // return new Promise(resolve => {

+ 10 - 1
fuwaiCallCenterWeb.UI/src/views/qualityCheck/quotaManagement/index.vue

@@ -10,7 +10,16 @@
10 10
 
11 11
         </div>
12 12
         <el-alert :closable="false" title="质检分类" type="success"/>
13
-        <el-tree ref="treeRef" :data="treelists" :default-expand-all="defaultExpandAll" :expand-on-click-node="expandOnNode" show-checkbox node-key="id" check-strictly highlight-current @node-click="treeNodeClick"/>
13
+        <el-tree
14
+          ref="treeRef"
15
+          :data="treelists"
16
+          :default-expand-all="defaultExpandAll"
17
+          :expand-on-click-node="expandOnNode"
18
+          show-checkbox
19
+          node-key="id"
20
+          check-strictly
21
+          highlight-current
22
+          @node-click="treeNodeClick"/>
14 23
 
15 24
       </el-col>
16 25
       <el-col :span="12">

+ 4 - 3
fuwaiCallCenterWeb.UI/src/views/repository/repositoryManage/index.vue

@@ -9,12 +9,13 @@
9 9
         </div>
10 10
         <el-alert :closable="false" title="知识库分类" type="success"/>
11 11
         <el-tree
12
-          ref="tree"
12
+          ref="treeRef"
13 13
           :data="treelists"
14 14
           :default-expand-all="defaultExpandAll"
15 15
           :expand-on-click-node="expandOnNode"
16 16
           show-checkbox
17 17
           node-key="id"
18
+          check-strictly
18 19
           highlight-current
19 20
           @node-click="treeNodeClick"/>
20 21
       </el-col>
@@ -102,7 +103,7 @@ export default {
102 103
           if (response.state.toLowerCase() === 'success') {
103 104
             this.pageParams.total = response.data.total
104 105
             this.scoreLists = response.data.rows
105
-            this.$refs.treeRef.setCheckedKeys([]) // 清空权限树的选中状态
106
+            // this.$refs.treeRef.setCheckedKeys([]) // 清空权限树的选中状态
106 107
           }
107 108
         })
108 109
         resolve()
@@ -137,7 +138,7 @@ export default {
137 138
       })
138 139
     },
139 140
     //		    //左侧编辑
140
-    btn_editL() {
141
+    btn_editL(editId) {
141 142
       this.checkTreeId = this.$refs.treeRef.getCheckedKeys()
142 143
 
143 144
       if (this.checkTreeId.length !== 1) {

+ 308 - 0
fuwaiCallCenterWeb.UI/src/views/trafficData/busyCallRecord/index.vue

@@ -0,0 +1,308 @@
1
+<template>
2
+  <div class="app-container">
3
+    <div class="filter-container">
4
+      <el-date-picker
5
+        v-model="searchDate"
6
+        :picker-options="pickerOptions"
7
+        class="filter-item"
8
+        type="daterange"
9
+        format="yyyy年MM月dd日"
10
+        value-format="yyyy-MM-dd"
11
+        align="left"
12
+        unlink-panels
13
+        range-separator="至"
14
+        start-placeholder="开始日期"
15
+        end-placeholder="结束日期"/>
16
+      <el-input v-model="keyword" placeholder="请输入呼叫号码" class="filter-item"/>
17
+      <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
18
+    </div>
19
+
20
+    <el-table :data="dataLists" border stripe>
21
+      <el-table-column type="index" label="编号" align="center" fixed width="80"/>
22
+      <el-table-column label="呼叫号码" align="center" min-width="">
23
+        <template slot-scope="scope">
24
+          <div :type="scope.row.callnumber" class="phoneNum" @click="outboundClick(scope.row.callnumber)">
25
+            {{ scope.row.callnumber }}
26
+          </div>
27
+        </template>
28
+      </el-table-column>
29
+      <el-table-column prop="agent_code" label="坐席工号" align="center" min-width=""/>
30
+      <el-table-column prop="agent_extnumber" label="分机号" align="center" min-width=""/>
31
+      <el-table-column label="呼叫类型" align="center" min-width="">
32
+        <template slot-scope="scope">
33
+          {{ scope.row.calltype | calltypeFilter }}
34
+        </template>
35
+      </el-table-column>
36
+      <el-table-column label="呼叫状态" align="center" min-width="">
37
+        <template slot-scope="scope">
38
+          <el-tag
39
+            :type="scope.row.callstate === 1 ? 'success' : 'danger'"
40
+            size="mini"
41
+            disable-transitions>
42
+            {{ scope.row.callstate | statusFilter }}
43
+          </el-tag>
44
+        </template>
45
+      </el-table-column>
46
+      <el-table-column label="处理方式" align="center" min-width="">
47
+        <template slot-scope="scope">
48
+          {{ scope.row.dealtype | dealtypeFilter }}
49
+        </template>
50
+      </el-table-column>
51
+      <el-table-column label="满意度" align="center" min-width="">
52
+        <template slot-scope="scope">
53
+          {{ scope.row.evaluation | evaluationFilter }}
54
+        </template>
55
+      </el-table-column>
56
+      <el-table-column label="录音" align="center" min-width="">
57
+        <template slot-scope="scope">
58
+          <svg-icon v-if="scope.row.FilePath.length" class="rec_file" icon-class="bofangluyin" @click.native="playSound(scope.row.FilePath, scope.row.agent_code)"/>
59
+          <span v-else>-</span>
60
+        </template>
61
+      </el-table-column>
62
+      <el-table-column label="呼叫开始时间" align="center" min-width="110">
63
+        <template slot-scope="scope">
64
+          <span>{{ scope.row.begintime | timesFilter }}</span>
65
+        </template>
66
+      </el-table-column>
67
+      <el-table-column label="通话开始时间" align="center" min-width="110">
68
+        <template slot-scope="scope">
69
+          <span>{{ scope.row.begintime_talk | timesFilter }}</span>
70
+        </template>
71
+      </el-table-column>
72
+      <el-table-column label="通话结束时间" align="center" min-width="110">
73
+        <template slot-scope="scope">
74
+          <span>{{ scope.row.endtime_talk | timesFilter }}</span>
75
+        </template>
76
+      </el-table-column>
77
+      <el-table-column label="挂机时间" align="center" min-width="110">
78
+        <template slot-scope="scope">
79
+          <span>{{ scope.row.endtime | timesFilter }}</span>
80
+        </template>
81
+      </el-table-column>
82
+      <el-table-column prop="longs_talk" label="通话时长" align="center" min-width=""/>
83
+      <el-table-column label="外呼类型" align="center" min-width="150">
84
+        <template slot-scope="scope">
85
+          {{ scope.row.callopttype | callopttypeFilter }}
86
+        </template>
87
+      </el-table-column>
88
+      <el-table-column label="操作" width="" align="center" fixed="right" class-name="oparate_btn">
89
+        <template slot-scope="scope">
90
+          <el-button size="mini" type="text" @click.stop="btn_ruturn(scope.row.id)">添加工单</el-button>
91
+        </template>
92
+      </el-table-column>
93
+      <!-- <el-table-column 更多公告信息="操作" align="center" min-width="">
94
+        <template>
95
+          <div class="footer_menu">
96
+            <router-link class="inlineBlock" to="order/orderCreateHY">
97
+              <el-dropdown-item>
98
+                <i class="el-icon-more"/>更多公告信息
99
+              </el-dropdown-item>
100
+            </router-link>
101
+          </div>
102
+        </template>
103
+      </el-table-column> -->
104
+    </el-table>
105
+    <pagination
106
+      v-show="pageParams.total > 0"
107
+      :total="pageParams.total"
108
+      :pageindex.sync="pageParams.pageindex"
109
+      :pagesize.sync="pageParams.pagesize"
110
+      class="pagination"
111
+      @pagination="getList" />
112
+
113
+  </div>
114
+</template>
115
+
116
+<script>
117
+import store from '@/store'
118
+import { mapGetters } from 'vuex'
119
+import { getCallRecords } from '@/api/trafficData/trafficData'
120
+import audioPlayer from '@/components/audioPlayer'
121
+import { Send } from '@/utils/telWebsocket'
122
+import { getPhone } from '@/api/questionnaire/management'
123
+import { pickerOptions } from '@/utils'
124
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
125
+export default {
126
+  name: 'CallRecord',
127
+  components: {
128
+    Pagination
129
+  },
130
+  filters: {
131
+    // 呼叫类型
132
+    calltypeFilter(status) {
133
+      const statusMap = {
134
+        0: '呼入',
135
+        1: '呼出'
136
+      }
137
+      return statusMap[status]
138
+    },
139
+    // 呼叫状态
140
+    statusFilter(status) {
141
+      const statusMap = {
142
+        0: '未接通',
143
+        1: '已接通'
144
+      }
145
+      return statusMap[status]
146
+    },
147
+    // 外呼类型
148
+    callopttypeFilter(status) {
149
+      const statusMap = {
150
+        0: '拨号外呼',
151
+        1: '回访外呼'
152
+      }
153
+      return statusMap[status]
154
+    },
155
+    // 处理方式
156
+    dealtypeFilter(status) {
157
+      const statusMap = {
158
+        0: 'IVR处理',
159
+        1: '骚扰电话',
160
+        2: '自助服务',
161
+        3: '转值班电话',
162
+        4: '留言',
163
+        5: '呼损',
164
+        6: '人工处理'
165
+      }
166
+      return statusMap[status]
167
+    },
168
+    // 满意度
169
+    evaluationFilter(status) {
170
+      const statusMap = {
171
+        0: '-',
172
+        1: '非常满意',
173
+        2: '基本满意',
174
+        3: '不满意'
175
+      }
176
+      return statusMap[status]
177
+    },
178
+    // 时间格式化
179
+    timesFilter(tm) {
180
+      if (tm === '1970-01-01 08:00:00') {
181
+        return '-'
182
+      } else {
183
+        return tm
184
+      }
185
+    }
186
+  },
187
+  data() {
188
+    return {
189
+      loading: false,
190
+      keyword: '',
191
+      searchDate: '',
192
+      pickerOptions,
193
+      recordpath: '', // 录音的路径
194
+      pageParams: {
195
+        pageindex: 1, // 当前第几页
196
+        pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
197
+        total: 0 // 总共多少数据
198
+      },
199
+      dataLists: [] // 列表数据
200
+    }
201
+  },
202
+  computed: {
203
+    ...mapGetters([
204
+      'usercode', // 工号
205
+      'extension', // 分机号
206
+      'telIsLogin', // 是否签入
207
+      'telSeatState', // 坐席状态
208
+      'telLineState', // 线路状态
209
+      'telIsVisCallout' // 外呼面板是否显示
210
+    ]),
211
+    // 是否可以点击外呼
212
+    isAllowCallout: function() {
213
+      // `this` 指向 vm 实例
214
+      return this.telIsLogin && this.telSeatState === 2 && this.telLineState === 1
215
+    }
216
+    //
217
+  },
218
+  created() {
219
+    this.getList()
220
+    document.onkeyup = (e) => {
221
+      if (e.keyCode === 13) {
222
+        this.getList()
223
+      }
224
+    }
225
+  },
226
+  methods: {
227
+    getList() {
228
+      this.loading = true
229
+      return new Promise(resolve => {
230
+        const params = {
231
+          pageindex: this.pageParams.pageindex, // 第几页
232
+          pagesize: this.pageParams.pagesize, // 每页几条信息
233
+          callstate: 0,
234
+          keyword: this.keyword, //	否	string	模糊查询(呼叫号码)
235
+          stime: this.searchDate && this.searchDate[0],
236
+          etime: this.searchDate && this.searchDate[1]
237
+        }
238
+        getCallRecords(params).then(response => {
239
+          this.loading = false
240
+          if (response.state.toLowerCase() === 'success') {
241
+            this.recordpath = response.data.recordpath
242
+            this.pageParams.total = response.data.total
243
+            this.dataLists = response.data.rows
244
+          }
245
+        })
246
+        resolve()
247
+      })
248
+    },
249
+    btn_search() {
250
+      this.getList()
251
+    },
252
+    btn_ruturn() {
253
+      alert('1')
254
+    },
255
+    outboundClick(quesPhone) {
256
+      this.$confirm('您确定要对此客户发起呼叫吗?', '提示', {
257
+        confirmButtonText: '确定',
258
+        cancelButtonText: '取消',
259
+        type: 'warning'
260
+      })
261
+        .then(() => {
262
+          this.scoketDatas = {
263
+            'Type': 'MakeCall',
264
+            'AgentID': this.usercode,
265
+            'AgentExten': this.extension,
266
+            'DestinationNumber': quesPhone //
267
+          }
268
+          store.dispatch('ChangeCallNum', quesPhone)
269
+          Send(this.scoketDatas)
270
+          this.getList()
271
+        })
272
+        .catch(() => {
273
+          this.$message.info('已取消呼叫')
274
+        })
275
+    },
276
+    // 播放录音
277
+    playSound(rec_file, artist) {
278
+      this.$layer.iframe({
279
+        content: {
280
+          content: audioPlayer, // 传递的组件对象
281
+          parent: this, // 当前的vue对象
282
+          data: { 'recFiles': this.recordpath + rec_file, 'artists': artist.toString() }// props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
283
+        },
284
+        area: ['600px', '230px'],
285
+        shadeClose: true,
286
+        title: '录音详情'
287
+      })
288
+    }
289
+  }
290
+}
291
+</script>
292
+
293
+<style rel="stylesheet/scss" lang="scss" scoped>
294
+.footer_menu{
295
+        .el-dropdown-menu__item{
296
+          padding: 20px;
297
+          line-height: 20px;
298
+        }
299
+      }
300
+.footer_menu{
301
+      background-color: #f3f7f9;
302
+      border-top: 1px solid #e4eaec;
303
+    }
304
+  .phoneNum{
305
+    color: #409EFF;
306
+    cursor: pointer;
307
+  }
308
+</style>

+ 1 - 1
fuwaiCallCenterWeb.UI/src/views/trafficData/callRecord/index.vue

@@ -189,7 +189,7 @@ export default {
189 189
         const params = {
190 190
           pageindex: this.pageParams.pageindex, // 第几页
191 191
           pagesize: this.pageParams.pagesize, // 每页几条信息
192
-          keyword: this.keyword, //	否	string	模糊查询(呼叫号码)          
192
+          keyword: this.keyword, //	否	string	模糊查询(呼叫号码)
193 193
           stime: this.searchDate && this.searchDate[0],
194 194
           etime: this.searchDate && this.searchDate[1]
195 195
         }

+ 9 - 85
fuwaiCallCenterWeb.UI/src/views/voice/voicePlan/addOrEdit.vue

@@ -68,38 +68,9 @@
68 68
           </el-form-item>
69 69
         </el-col>
70 70
       </div>
71
-      <el-form-item label="呼叫方式" prop="calltype">
72
-        <el-radio-group v-model="ruleForm.calltype">
73
-          <el-radio class="radio_type" border label="0">不播放语音直接转坐席</el-radio>
74
-          <el-radio class="radio_type" border label="1">播放语音后转坐席</el-radio>
75
-          <el-radio class="radio_type" border label="2">播放语音后按1键转坐席</el-radio>
76
-          <el-radio class="radio_type" border label="3">不转坐席</el-radio>
77
-        </el-radio-group>
71
+      <el-form-item label="语音文字" prop="taskremark">
72
+        <el-input v-model="ruleForm.voicepath" type="textarea" autosize placeholder="请输入文字"/>
78 73
       </el-form-item>
79
-      <el-form-item v-show="ruleForm.calltype === '1' || ruleForm.calltype === '2'" label="上传文件" prop="voicepath">
80
-        <el-upload
81
-          ref="upload"
82
-          :limit="1"
83
-          :file-list="uploadData.fileList"
84
-          :action= "uploadData.uploadUrl"
85
-          :data = "uploadData.uploaderFiles"
86
-          :on-success="uploadSuccess"
87
-          :on-exceed="uploadExceed"
88
-          :on-error="uploadError"
89
-          :on-remove="uploadRemove"
90
-          class="uploadFiles"
91
-          list-type="text"
92
-          accept="audio/*">
93
-          <el-button size="small" type="primary">上传录音</el-button>
94
-          <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
95
-          <!-- <i class="el-icon-plus"></i> -->
96
-        </el-upload>
97
-      </el-form-item>
98
-      <el-collapse-transition>
99
-        <el-form-item v-if="ruleForm.voicepath.length > 0" label="试听录音">
100
-          <aplayer :music="musicList" theme="#41b883"/>
101
-        </el-form-item>
102
-      </el-collapse-transition>
103 74
       <el-form-item label="说明备注" prop="taskremark">
104 75
         <el-input v-model="ruleForm.taskremark" type="textarea" autosize placeholder="请输入说明备注"/>
105 76
       </el-form-item>
@@ -159,12 +130,16 @@ export default {
159 130
         pagerid: '', // 问卷id
160 131
         bftype: '0', //	否	int	并发类型
161 132
         bfnum: '0', //	否	string	并发数
162
-        calltype: '0', // 否	int	呼叫方式:0为不播放直接转坐席,1为播放转坐席,2为播放后按1键转坐席 3 不转坐席
163 133
         voicepath: [], //	否	string	语音文件路径
164 134
         pressnum: '', //	否	string	按键
165 135
         taskremark: '' // 否	string	说明备注
166 136
       },
167 137
       rules: {
138
+        voicepath: [{
139
+          required: true,
140
+          trigger: 'blur',
141
+          message: '请输入语音文字!'
142
+        }],
168 143
         taskname: [{
169 144
           required: true,
170 145
           trigger: 'blur',
@@ -199,11 +174,6 @@ export default {
199 174
           required: true,
200 175
           message: '请输入并发数/进号速率!',
201 176
           trigger: 'blur'
202
-        }],
203
-        calltype: [{
204
-          required: true,
205
-          message: '请选择呼叫方式!',
206
-          trigger: 'blur'
207 177
         }]
208 178
       },
209 179
       pagerOptions: [], // 问卷数据
@@ -241,7 +211,7 @@ export default {
241 211
             swtime2: this.ruleForm.wtime2 && this.ruleForm.wtime2[0], //	否	string	工作开始时间2
242 212
             ewtime2: this.ruleForm.wtime2 && this.ruleForm.wtime2[1], //	否	string	工作结束时间2
243 213
             pagerid: this.ruleForm.pagerid, //	否	string	问卷id
244
-            calltype: this.ruleForm.calltype, //	否	int	呼叫方式:0为不播放直接转坐席,1为播放转坐席,2为播放后按键转坐席
214
+            calltype: 3, //	否	int	呼叫方式:0为不播放直接转坐席,1为播放转坐席,2为播放后按键转坐席
245 215
             voicepath: this.ruleForm.voicepath, //	否	string	语音文件路径
246 216
             pressnum: this.ruleForm.pressnum, //	否	string	按键
247 217
             bftype: this.ruleForm.bftype, //	否	int	并发类型
@@ -280,12 +250,6 @@ export default {
280 250
       })
281 251
     },
282 252
     resetForm() {
283
-      if (this.ruleForm.voicepath.length > 0) {
284
-        for (let i = 0, len = this.ruleForm.voicepath.length; i < len; i++) {
285
-          delFiles(this.ruleForm.voicepath[i].filesmallurl, this.ruleForm.voicepath[i].fileurl)
286
-          this.ruleForm.voicepath.splice(i, 1)
287
-        }
288
-      }
289 253
       this.$refs.upload.clearFiles()	// 清空已上传的文件列表(该方法不支持在 before-upload 中调用)
290 254
       this.$refs.ruleForm.resetFields()
291 255
     },
@@ -302,53 +266,13 @@ export default {
302 266
             this.ruleForm.pagerid = res.pagerid
303 267
             this.ruleForm.bftype = res.bftype
304 268
             this.ruleForm.bfnum = res.bfnum
305
-            this.ruleForm.calltype = res.calltype.toString()
306
-            if (res.voicepath && res.voicepath.length > 0) {
307
-              for (let i = 0, len = res.voicepath.length; i < len; i++) {
308
-                this.uploadData.fileList.push({
309
-                  'name': res.voicepath[i].filename,
310
-                  'url': res.voicepath[i].fileurl
311
-                })
312
-              }
313
-              this.ruleForm.voicepath = res.voicepath
314
-              this.$set(this.musicList, 'src', res.voicepath[0].fileurl)
315
-              this.$set(this.musicList, 'title', res.voicepath[0].filename)
316
-            }
269
+            this.ruleForm.voicepath = res.voicepath
317 270
             this.ruleForm.pressnum = res.pressnum
318 271
             this.ruleForm.taskremark = res.taskremark
319 272
           }
320 273
         }
321 274
       })
322 275
     },
323
-
324
-    // 文件上传
325
-    uploadSuccess(response, file, fileList) {
326
-      if (response.state.toLowerCase() === 'success') {
327
-        this.musicList.src = response.data[0].fileurl
328
-        this.musicList.title = response.data[0].filename
329
-        this.ruleForm.voicepath.push(response.data[0])
330
-      } else {
331
-        this.$message.error(response.message)
332
-      }
333
-    },
334
-    uploadRemove(file, fileList) {
335
-      if (this.ruleForm.voicepath.length > 0) {
336
-        for (let i = 0, len = this.ruleForm.voicepath.length; i < len; i++) {
337
-          if (this.ruleForm.voicepath[i].filename === file.name) {
338
-            delFiles(this.ruleForm.voicepath[i].filesmallurl, this.ruleForm.voicepath[i].fileurl)
339
-            this.ruleForm.voicepath.splice(i, 1)
340
-            return
341
-          }
342
-        }
343
-      }
344
-    },
345
-    uploadError(err, file, fileList) {
346
-      // console.log(err)
347
-      this.$message.error(err)
348
-    },
349
-    uploadExceed(file, fileList) {
350
-      this.$message.warning('只能选择一个文件!')
351
-    },
352 276
     // 获取问卷下拉
353 277
     getPagerSelectList() {
354 278
       return new Promise(resolve => {