|
|
@@ -5,24 +5,24 @@
|
|
5
|
5
|
<transition-group type="transition" name="slide-list">
|
|
6
|
6
|
<svg-icon v-show="!telIsLogin" key="0" icon-class="guaduan" />
|
|
7
|
7
|
<i
|
|
8
|
|
- v-show="telIsLogin && (telSeatState===2 && telLineState===1)"
|
|
|
8
|
+ v-show="telIsLogin && telSeatState === 2 && telLineState === 1"
|
|
9
|
9
|
key="1"
|
|
10
|
10
|
class="calli free"
|
|
11
|
11
|
/>
|
|
12
|
12
|
<!-- <svg-icon v-show="telIsLogin && (telSeatState===2 && telLineState===1)" icon-class="xiuxi" /> -->
|
|
13
|
13
|
<svg-icon
|
|
14
|
|
- v-show="telIsLogin && (telSeatState===5 && telLineState===1)"
|
|
|
14
|
+ v-show="telIsLogin && telSeatState === 5 && telLineState === 1"
|
|
15
|
15
|
key="2"
|
|
16
|
16
|
icon-class="manglu01"
|
|
17
|
17
|
/>
|
|
18
|
18
|
<svg-icon
|
|
19
|
|
- v-show="telIsLogin && (telLineState===2)"
|
|
|
19
|
+ v-show="telIsLogin && telLineState === 2"
|
|
20
|
20
|
key="3"
|
|
21
|
21
|
icon-class="fenji"
|
|
22
|
22
|
class="ringing"
|
|
23
|
23
|
/>
|
|
24
|
24
|
<svg-icon
|
|
25
|
|
- v-show="telIsLogin && (telLineState===3)"
|
|
|
25
|
+ v-show="telIsLogin && telLineState === 3"
|
|
26
|
26
|
key="4"
|
|
27
|
27
|
icon-class="huchu"
|
|
28
|
28
|
class="ringing"
|
|
|
@@ -30,60 +30,97 @@
|
|
30
|
30
|
<!-- <svg-icon v-show="telIsLogin && (telLineState===4)" icon-class="zhenling" class="ringing" /> -->
|
|
31
|
31
|
<!-- <svg-icon v-show="telIsLogin && (telLineState===6)" icon-class="tonghuazhong01" class="incall" /> -->
|
|
32
|
32
|
<!-- <svg-icon v-show="telIsLogin && (telLineState===10)" icon-class="tonghuazhong01" class="incall" /> -->
|
|
33
|
|
- <i v-show="telIsLogin && (telLineState===4)" key="5" class="calli callringing" />
|
|
34
|
|
- <i v-show="telIsLogin && (telLineState===6)" key="6" class="calli incalling" />
|
|
35
|
|
- <i v-show="telIsLogin && (telLineState===10)" key="7" class="calli incalling" />
|
|
|
33
|
+ <i
|
|
|
34
|
+ v-show="telIsLogin && telLineState === 4"
|
|
|
35
|
+ key="5"
|
|
|
36
|
+ class="calli callringing"
|
|
|
37
|
+ />
|
|
|
38
|
+ <i
|
|
|
39
|
+ v-show="telIsLogin && telLineState === 6"
|
|
|
40
|
+ key="6"
|
|
|
41
|
+ class="calli incalling"
|
|
|
42
|
+ />
|
|
|
43
|
+ <i
|
|
|
44
|
+ v-show="telIsLogin && telLineState === 10"
|
|
|
45
|
+ key="7"
|
|
|
46
|
+ class="calli incalling"
|
|
|
47
|
+ />
|
|
36
|
48
|
</transition-group>
|
|
37
|
49
|
</div>
|
|
38
|
50
|
<div class="call_content">
|
|
39
|
51
|
<p class="call_text">
|
|
40
|
52
|
<!-- <transition-group type="transition" name="fade-text"> -->
|
|
41
|
53
|
<span v-show="!telIsLogin" key="8">还未开始工作</span>
|
|
42
|
|
- <span v-show="telIsLogin && (telSeatState===2 && telLineState===1)" key="9">空闲中</span>
|
|
43
|
|
- <span v-show="telIsLogin && (telSeatState===5 && telLineState===1)" key="10">忙碌中</span>
|
|
44
|
|
- <span v-show="telIsLogin && (telLineState===2)" key="11">摘机中</span>
|
|
45
|
|
- <span v-show="telIsLogin && (telLineState===3)" key="12">拨号中</span>
|
|
46
|
|
- <span v-show="telIsLogin && (telLineState===4)" key="13">振铃中</span>
|
|
47
|
|
- <span v-show="telIsLogin && (telLineState===6)" key="14">通话中</span>
|
|
48
|
|
- <span v-show="telIsLogin && (telLineState===10)" key="15">保持中</span>
|
|
|
54
|
+ <span
|
|
|
55
|
+ v-show="telIsLogin && telSeatState === 2 && telLineState === 1"
|
|
|
56
|
+ key="9"
|
|
|
57
|
+ >空闲中</span
|
|
|
58
|
+ >
|
|
|
59
|
+ <span
|
|
|
60
|
+ v-show="telIsLogin && telSeatState === 5 && telLineState === 1"
|
|
|
61
|
+ key="10"
|
|
|
62
|
+ >忙碌中</span
|
|
|
63
|
+ >
|
|
|
64
|
+ <span v-show="telIsLogin && telLineState === 2" key="11">摘机中</span>
|
|
|
65
|
+ <span v-show="telIsLogin && telLineState === 3" key="12">拨号中</span>
|
|
|
66
|
+ <span v-show="telIsLogin && telLineState === 4" key="13">振铃中</span>
|
|
|
67
|
+ <span v-show="telIsLogin && telLineState === 6" key="14">通话中</span>
|
|
|
68
|
+ <span v-show="telIsLogin && telLineState === 10" key="15"
|
|
|
69
|
+ >保持中</span
|
|
|
70
|
+ >
|
|
49
|
71
|
<!-- </transition-group> -->
|
|
50
|
72
|
<svg-icon v-show="telIsLogin" icon-class="xinhao" />
|
|
51
|
73
|
</p>
|
|
52
|
74
|
<p
|
|
53
|
|
- v-show="(telSeatState===2 && telLineState < 6)|| (telSeatState === 5 && telLineState < 6)"
|
|
|
75
|
+ v-show="
|
|
|
76
|
+ (telSeatState === 2 && telLineState < 6) ||
|
|
|
77
|
+ (telSeatState === 5 && telLineState < 6)
|
|
|
78
|
+ "
|
|
54
|
79
|
class="call_time"
|
|
55
|
|
- >--:--:--</p>
|
|
56
|
|
- <p v-show="telIsLogin && (telLineState===6 || telLineState===10)" class="call_time">
|
|
57
|
|
- <span v-show="Number(telCallTime.hh) === 0">{{ telCallTime.hh }}</span>
|
|
58
|
|
- <span v-show="Number(telCallTime.hh) > 0 && Number(telCallTime.hh) < 10">
|
|
59
|
|
- <span>{{ telCallTime.hh.substr(0,1) }}</span>
|
|
|
80
|
+ >
|
|
|
81
|
+ --:--:--
|
|
|
82
|
+ </p>
|
|
|
83
|
+ <p
|
|
|
84
|
+ v-show="telIsLogin && (telLineState === 6 || telLineState === 10)"
|
|
|
85
|
+ class="call_time"
|
|
|
86
|
+ >
|
|
|
87
|
+ <span v-show="Number(telCallTime.hh) === 0">{{
|
|
|
88
|
+ telCallTime.hh
|
|
|
89
|
+ }}</span>
|
|
|
90
|
+ <span
|
|
|
91
|
+ v-show="Number(telCallTime.hh) > 0 && Number(telCallTime.hh) < 10"
|
|
|
92
|
+ >
|
|
|
93
|
+ <span>{{ telCallTime.hh.substr(0, 1) }}</span>
|
|
60
|
94
|
<span class="blue_color">{{ telCallTime.hh.substr(1) }}</span>
|
|
61
|
95
|
</span>
|
|
62
|
|
- <span v-show="Number(telCallTime.hh) > 9" class="blue_color">{{ telCallTime.hh }}</span>
|
|
63
|
|
- <span v-show="Number(telCallTime.mm) === 0">:{{ telCallTime.mm }}</span>
|
|
64
|
|
- <span v-show="Number(telCallTime.mm) > 0 && Number(telCallTime.mm) < 10">
|
|
65
|
|
- <span>:{{ telCallTime.mm.substr(0,1) }}</span>
|
|
|
96
|
+ <span v-show="Number(telCallTime.hh) > 9" class="blue_color">{{
|
|
|
97
|
+ telCallTime.hh
|
|
|
98
|
+ }}</span>
|
|
|
99
|
+ <span v-show="Number(telCallTime.mm) === 0"
|
|
|
100
|
+ >:{{ telCallTime.mm }}</span
|
|
|
101
|
+ >
|
|
|
102
|
+ <span
|
|
|
103
|
+ v-show="Number(telCallTime.mm) > 0 && Number(telCallTime.mm) < 10"
|
|
|
104
|
+ >
|
|
|
105
|
+ <span>:{{ telCallTime.mm.substr(0, 1) }}</span>
|
|
66
|
106
|
<span class="blue_color">{{ telCallTime.mm.substr(1) }}</span>
|
|
67
|
107
|
</span>
|
|
68
|
|
- <span v-show="Number(telCallTime.mm) > 9" class="blue_color">:{{ telCallTime.mm }}</span>
|
|
|
108
|
+ <span v-show="Number(telCallTime.mm) > 9" class="blue_color"
|
|
|
109
|
+ >:{{ telCallTime.mm }}</span
|
|
|
110
|
+ >
|
|
69
|
111
|
<span class="blue_color ft16">:{{ telCallTime.ss }}</span>
|
|
70
|
112
|
</p>
|
|
71
|
113
|
</div>
|
|
72
|
114
|
</div>
|
|
73
|
115
|
<div v-show="telIsLogin" class="call_middle">
|
|
74
|
116
|
<el-input
|
|
75
|
|
- :class="{no_write: true}"
|
|
|
117
|
+ :class="{ no_write: true }"
|
|
76
|
118
|
:readonly="true"
|
|
77
|
119
|
v-model="telCallNum"
|
|
78
|
120
|
size="small"
|
|
79
|
121
|
placeholder
|
|
80
|
122
|
/>
|
|
81
|
|
- <button
|
|
82
|
|
-
|
|
83
|
|
- slot="reference"
|
|
84
|
|
- class="call_btn"
|
|
85
|
|
- @click="makeCall"
|
|
86
|
|
- >外呼</button>
|
|
|
123
|
+ <button slot="reference" class="call_btn" @click="makeCall">外呼</button>
|
|
87
|
124
|
<el-popover
|
|
88
|
125
|
:value="telIsVisCallout"
|
|
89
|
126
|
:disabled="false"
|
|
|
@@ -107,7 +144,7 @@
|
|
107
|
144
|
@after-leave="afterLeave"
|
|
108
|
145
|
>
|
|
109
|
146
|
<!-- <Transfer /> -->
|
|
110
|
|
- <Dialplate ref="waihu"/>
|
|
|
147
|
+ <Dialplate ref="waihu" />
|
|
111
|
148
|
</el-popover>
|
|
112
|
149
|
</div>
|
|
113
|
150
|
<div class="call_right">
|
|
|
@@ -122,36 +159,34 @@
|
|
122
|
159
|
>开始工作</button> -->
|
|
123
|
160
|
<button
|
|
124
|
161
|
v-waves
|
|
125
|
|
-
|
|
126
|
162
|
key="17"
|
|
127
|
163
|
type="button"
|
|
128
|
164
|
class="call_btn"
|
|
129
|
165
|
@click="setBusy"
|
|
130
|
|
- >置忙</button>
|
|
|
166
|
+ >
|
|
|
167
|
+ 置忙
|
|
|
168
|
+ </button>
|
|
131
|
169
|
<button
|
|
132
|
170
|
v-waves
|
|
133
|
|
-
|
|
134
|
171
|
key="18"
|
|
135
|
172
|
type="button"
|
|
136
|
173
|
class="call_btn"
|
|
137
|
174
|
@click="setFree"
|
|
138
|
|
- >置闲</button>
|
|
|
175
|
+ >
|
|
|
176
|
+ 置闲
|
|
|
177
|
+ </button>
|
|
139
|
178
|
<button
|
|
140
|
179
|
v-waves
|
|
141
|
|
-
|
|
142
|
180
|
key="19"
|
|
143
|
181
|
type="button"
|
|
144
|
182
|
class="call_btn"
|
|
145
|
183
|
@click="signOut"
|
|
146
|
|
- >签出</button>
|
|
147
|
|
- <button
|
|
148
|
|
- v-waves
|
|
149
|
|
-
|
|
150
|
|
- key="27"
|
|
151
|
|
- type="button"
|
|
152
|
|
- class="call_btn"
|
|
153
|
|
- @click="signIn"
|
|
154
|
|
- >签入</button>
|
|
|
184
|
+ >
|
|
|
185
|
+ 签出
|
|
|
186
|
+ </button>
|
|
|
187
|
+ <button v-waves key="27" type="button" class="call_btn" @click="signIn">
|
|
|
188
|
+ 签入
|
|
|
189
|
+ </button>
|
|
155
|
190
|
<!-- <button
|
|
156
|
191
|
v-waves
|
|
157
|
192
|
v-show="telIsLogin && (telLineState===6)"
|
|
|
@@ -162,37 +197,45 @@
|
|
162
|
197
|
>保持通话</button> -->
|
|
163
|
198
|
<button
|
|
164
|
199
|
v-waves
|
|
165
|
|
- v-show="telIsLogin && (telLineState===6)"
|
|
|
200
|
+ v-show="telIsLogin && telLineState === 6"
|
|
166
|
201
|
key="20"
|
|
167
|
202
|
type="button"
|
|
168
|
203
|
class="call_btn yellow_bg"
|
|
169
|
204
|
@click="holdBack"
|
|
170
|
|
- >保持通话</button>
|
|
|
205
|
+ >
|
|
|
206
|
+ 保持通话
|
|
|
207
|
+ </button>
|
|
171
|
208
|
|
|
172
|
209
|
<button
|
|
173
|
210
|
v-waves
|
|
174
|
|
- v-show="telIsLogin && (telLineState===10)"
|
|
|
211
|
+ v-show="telIsLogin && telLineState === 10"
|
|
175
|
212
|
key="21"
|
|
176
|
213
|
type="button"
|
|
177
|
214
|
class="call_btn green_bg"
|
|
178
|
215
|
@click="retrieveBack"
|
|
179
|
|
- >接回通话</button>
|
|
|
216
|
+ >
|
|
|
217
|
+ 接回通话
|
|
|
218
|
+ </button>
|
|
180
|
219
|
<button
|
|
181
|
220
|
v-waves
|
|
182
|
|
- v-show="telIsLogin && (telLineState===6 || telLineState===10)"
|
|
|
221
|
+ v-show="telIsLogin && (telLineState === 6 || telLineState === 10)"
|
|
183
|
222
|
key="24"
|
|
184
|
223
|
type="button"
|
|
185
|
224
|
class="call_btn"
|
|
186
|
225
|
@click="transferCall"
|
|
187
|
|
- >转移</button>
|
|
|
226
|
+ >
|
|
|
227
|
+ 转移
|
|
|
228
|
+ </button>
|
|
188
|
229
|
<button
|
|
189
|
230
|
v-waves
|
|
190
|
|
- v-show="telIsLogin && (telLineState===6 || telLineState===10)"
|
|
|
231
|
+ v-show="telIsLogin && (telLineState === 6 || telLineState === 10)"
|
|
191
|
232
|
key="25"
|
|
192
|
233
|
type="button"
|
|
193
|
234
|
class="call_btn"
|
|
194
|
235
|
@click="meetingCall"
|
|
195
|
|
- >多方通话</button>
|
|
|
236
|
+ >
|
|
|
237
|
+ 多方通话
|
|
|
238
|
+ </button>
|
|
196
|
239
|
<!--
|
|
197
|
240
|
<button
|
|
198
|
241
|
v-waves
|
|
|
@@ -204,230 +247,236 @@
|
|
204
|
247
|
>转IVR</button> -->
|
|
205
|
248
|
<button
|
|
206
|
249
|
v-waves
|
|
207
|
|
- v-show="telIsLogin && (telLineState>2 && telLineState!==5)"
|
|
|
250
|
+ v-show="telIsLogin && telLineState > 2 && telLineState !== 5"
|
|
208
|
251
|
key="23"
|
|
209
|
252
|
type="button"
|
|
210
|
253
|
class="call_btn red_bg"
|
|
211
|
254
|
@click="dropCall"
|
|
212
|
|
- >挂断</button>
|
|
|
255
|
+ >
|
|
|
256
|
+ 挂断
|
|
|
257
|
+ </button>
|
|
213
|
258
|
</transition-group>
|
|
214
|
259
|
</div>
|
|
215
|
260
|
<div v-if="telIsVisCallout" class="mask" @click="maskshow"></div>
|
|
216
|
261
|
</div>
|
|
217
|
|
-
|
|
218
|
262
|
</template>
|
|
219
|
263
|
|
|
220
|
264
|
<script>
|
|
221
|
|
-import { mapGetters } from 'vuex'
|
|
222
|
|
-import store from '@/store'
|
|
223
|
|
-import { Send } from '@/utils/telWebsocket'
|
|
224
|
|
-import Dialplate from '@/components/Dialplate'
|
|
225
|
|
-import Transfer from '@/components/Transfer'
|
|
|
265
|
+import { mapGetters } from "vuex";
|
|
|
266
|
+import store from "@/store";
|
|
|
267
|
+import { Send } from "@/utils/telWebsocket";
|
|
|
268
|
+import Dialplate from "@/components/Dialplate";
|
|
|
269
|
+import Transfer from "@/components/Transfer";
|
|
226
|
270
|
export default {
|
|
227
|
|
- name: 'Teloperation',
|
|
|
271
|
+ name: "Teloperation",
|
|
228
|
272
|
components: {
|
|
229
|
273
|
Dialplate,
|
|
230
|
|
- Transfer
|
|
|
274
|
+ Transfer,
|
|
231
|
275
|
},
|
|
232
|
276
|
data() {
|
|
233
|
277
|
return {
|
|
234
|
278
|
// maskshow: false,
|
|
235
|
279
|
scoketDatas: {}, // 发送的数据
|
|
236
|
|
- telNumber: '',
|
|
237
|
|
- telTimer: null // 时间定时器
|
|
238
|
|
- }
|
|
|
280
|
+ telNumber: "",
|
|
|
281
|
+ telTimer: null, // 时间定时器
|
|
|
282
|
+ };
|
|
239
|
283
|
},
|
|
240
|
284
|
computed: {
|
|
241
|
285
|
...mapGetters([
|
|
242
|
|
- 'usercode', // 工号
|
|
243
|
|
- 'extension', // 分机号
|
|
244
|
|
- 'groupcode', // 坐席组code
|
|
245
|
|
- 'telIsLogin', // 是否签入
|
|
246
|
|
- 'telSeatState', // 坐席状态
|
|
247
|
|
- 'telLineState', // 线路状态
|
|
248
|
|
- 'telCallNum', // 电话号码
|
|
249
|
|
- 'telIsVisCallout', // 外呼操作面板是否显示
|
|
250
|
|
- 'telCallTime', // 通话时间
|
|
251
|
|
- 'telMessageData', // telwebsocket 接收的数据
|
|
252
|
|
- 'telIsVisTransfer' // 转移操作面板
|
|
253
|
|
- ])
|
|
|
286
|
+ "usercode", // 工号
|
|
|
287
|
+ "extension", // 分机号
|
|
|
288
|
+ "groupcode", // 坐席组code
|
|
|
289
|
+ "telIsLogin", // 是否签入
|
|
|
290
|
+ "telSeatState", // 坐席状态
|
|
|
291
|
+ "telLineState", // 线路状态
|
|
|
292
|
+ "telCallNum", // 电话号码
|
|
|
293
|
+ "telIsVisCallout", // 外呼操作面板是否显示
|
|
|
294
|
+ "telCallTime", // 通话时间
|
|
|
295
|
+ "telMessageData", // telwebsocket 接收的数据
|
|
|
296
|
+ "telIsVisTransfer", // 转移操作面板
|
|
|
297
|
+ ]),
|
|
254
|
298
|
},
|
|
255
|
299
|
watch: {
|
|
256
|
300
|
// 如果 `telLineState` 发生改变,这个函数就会运行
|
|
257
|
|
- telLineState: function(newT, oldT) {
|
|
|
301
|
+ telLineState: function (newT, oldT) {
|
|
258
|
302
|
// console.log(newT, oldT);
|
|
259
|
|
- this.watchTelLineState(newT, oldT)
|
|
260
|
|
- }
|
|
|
303
|
+ this.watchTelLineState(newT, oldT);
|
|
|
304
|
+ },
|
|
261
|
305
|
},
|
|
262
|
306
|
methods: {
|
|
263
|
307
|
// 签入
|
|
264
|
308
|
signIn() {
|
|
265
|
|
- console.log(this.groupcode)
|
|
266
|
|
- console.log(this.extension)
|
|
|
309
|
+ console.log(this.groupcode);
|
|
|
310
|
+ console.log(this.extension);
|
|
267
|
311
|
// if(!this.groupcode){
|
|
268
|
312
|
// this.$message.error('分机号不存在')
|
|
269
|
313
|
// return false
|
|
270
|
314
|
// }
|
|
271
|
315
|
if (!this.extension) {
|
|
272
|
|
- this.$confirm('如果您想进行话务操作,请重新登录并且输入分机号, 是否重新登录?', '提示', {
|
|
273
|
|
- confirmButtonText: '是',
|
|
274
|
|
- cancelButtonText: '否',
|
|
275
|
|
- type: 'warning'
|
|
276
|
|
- }).then(() => {
|
|
277
|
|
- this.$store.dispatch('FedLogOut').then(() => {
|
|
278
|
|
- location.reload() // 为了重新实例化vue-router对象 避免bug
|
|
|
316
|
+ this.$confirm(
|
|
|
317
|
+ "如果您想进行话务操作,请重新登录并且输入分机号, 是否重新登录?",
|
|
|
318
|
+ "提示",
|
|
|
319
|
+ {
|
|
|
320
|
+ confirmButtonText: "是",
|
|
|
321
|
+ cancelButtonText: "否",
|
|
|
322
|
+ type: "warning",
|
|
|
323
|
+ }
|
|
|
324
|
+ )
|
|
|
325
|
+ .then(() => {
|
|
|
326
|
+ this.$store.dispatch("FedLogOut").then(() => {
|
|
|
327
|
+ location.reload(); // 为了重新实例化vue-router对象 避免bug
|
|
|
328
|
+ });
|
|
279
|
329
|
})
|
|
280
|
|
- }).catch(() => {
|
|
281
|
|
- })
|
|
282
|
|
- return
|
|
|
330
|
+ .catch(() => {});
|
|
|
331
|
+ return;
|
|
283
|
332
|
}
|
|
284
|
333
|
this.scoketDatas = {
|
|
285
|
|
- 'Type': 'Login',
|
|
286
|
|
- 'AgentID': this.usercode,
|
|
287
|
|
- 'AgentExten': this.extension,
|
|
288
|
|
- 'AgentGroup': window.localStorage.getItem('groupCode'), // 坐席组id
|
|
289
|
|
- 'AgentType': '0',
|
|
290
|
|
- 'DisposeTime': '0' // 话后处理时长设置,0代表一致话后处理,除非发送置闲 (按照历史习惯,字符串形式)
|
|
291
|
|
- }
|
|
292
|
|
- Send(this.scoketDatas)
|
|
|
334
|
+ Type: "Login",
|
|
|
335
|
+ AgentID: this.usercode,
|
|
|
336
|
+ AgentExten: this.extension,
|
|
|
337
|
+ AgentGroup: window.localStorage.getItem("groupCode"), // 坐席组id window.localStorage.getItem('groupCode')
|
|
|
338
|
+ AgentType: "0",
|
|
|
339
|
+ DisposeTime: "0", // 话后处理时长设置,0代表一致话后处理,除非发送置闲 (按照历史习惯,字符串形式)
|
|
|
340
|
+ };
|
|
|
341
|
+ Send(this.scoketDatas);
|
|
293
|
342
|
},
|
|
294
|
343
|
// 签出
|
|
295
|
344
|
signOut() {
|
|
296
|
345
|
this.scoketDatas = {
|
|
297
|
|
- 'Type': 'Logout',
|
|
298
|
|
- 'AgentID': this.usercode,
|
|
299
|
|
- 'AgentExten': this.extension
|
|
300
|
|
- }
|
|
301
|
|
- Send(this.scoketDatas)
|
|
302
|
|
- store.dispatch('UpdateCalloutScreen', false)
|
|
|
346
|
+ Type: "Logout",
|
|
|
347
|
+ AgentID: this.usercode,
|
|
|
348
|
+ AgentExten: this.extension,
|
|
|
349
|
+ };
|
|
|
350
|
+ Send(this.scoketDatas);
|
|
|
351
|
+ store.dispatch("UpdateCalloutScreen", false);
|
|
303
|
352
|
},
|
|
304
|
353
|
// 置忙
|
|
305
|
354
|
setBusy() {
|
|
306
|
355
|
this.scoketDatas = {
|
|
307
|
|
- 'Type': 'SayBusy',
|
|
308
|
|
- 'AgentID': this.usercode,
|
|
309
|
|
- 'AgentExten': this.extension
|
|
310
|
|
- }
|
|
311
|
|
- Send(this.scoketDatas)
|
|
|
356
|
+ Type: "SayBusy",
|
|
|
357
|
+ AgentID: this.usercode,
|
|
|
358
|
+ AgentExten: this.extension,
|
|
|
359
|
+ };
|
|
|
360
|
+ Send(this.scoketDatas);
|
|
312
|
361
|
},
|
|
313
|
362
|
// 置闲
|
|
314
|
363
|
setFree() {
|
|
315
|
364
|
this.scoketDatas = {
|
|
316
|
|
- 'Type': 'SayFree',
|
|
317
|
|
- 'AgentID': this.usercode,
|
|
318
|
|
- 'AgentExten': this.extension
|
|
319
|
|
- }
|
|
320
|
|
- Send(this.scoketDatas)
|
|
|
365
|
+ Type: "SayFree",
|
|
|
366
|
+ AgentID: this.usercode,
|
|
|
367
|
+ AgentExten: this.extension,
|
|
|
368
|
+ };
|
|
|
369
|
+ Send(this.scoketDatas);
|
|
321
|
370
|
},
|
|
322
|
371
|
// 转IVR
|
|
323
|
372
|
btn_IVR() {
|
|
324
|
373
|
this.scoketDatas = {
|
|
325
|
|
- 'Type': 'TurnIvr',
|
|
326
|
|
- 'AgentID': this.usercode,
|
|
327
|
|
- 'AgentExten': this.extension,
|
|
328
|
|
- 'IvrName': 'MYD_ZXZ',
|
|
329
|
|
- 'IvrPos': '1'
|
|
330
|
|
- }
|
|
331
|
|
- Send(this.scoketDatas)
|
|
|
374
|
+ Type: "TurnIvr",
|
|
|
375
|
+ AgentID: this.usercode,
|
|
|
376
|
+ AgentExten: this.extension,
|
|
|
377
|
+ IvrName: "MYD_ZXZ",
|
|
|
378
|
+ IvrPos: "1",
|
|
|
379
|
+ };
|
|
|
380
|
+ Send(this.scoketDatas);
|
|
332
|
381
|
},
|
|
333
|
382
|
// 挂断
|
|
334
|
383
|
dropCall() {
|
|
335
|
384
|
this.scoketDatas = {
|
|
336
|
|
- 'Type': 'DropCall',
|
|
337
|
|
- 'AgentID': this.usercode,
|
|
338
|
|
- 'AgentExten': this.extension
|
|
339
|
|
- }
|
|
340
|
|
- Send(this.scoketDatas)
|
|
341
|
|
- store.dispatch('UpdateCalloutScreen', false)
|
|
|
385
|
+ Type: "DropCall",
|
|
|
386
|
+ AgentID: this.usercode,
|
|
|
387
|
+ AgentExten: this.extension,
|
|
|
388
|
+ };
|
|
|
389
|
+ Send(this.scoketDatas);
|
|
|
390
|
+ store.dispatch("UpdateCalloutScreen", false);
|
|
342
|
391
|
},
|
|
343
|
392
|
// 保持通话
|
|
344
|
393
|
holdBack() {
|
|
345
|
394
|
this.scoketDatas = {
|
|
346
|
|
- 'Type': 'Hold',
|
|
347
|
|
- 'AgentID': this.usercode,
|
|
348
|
|
- 'AgentExten': this.extension
|
|
349
|
|
- }
|
|
350
|
|
- Send(this.scoketDatas)
|
|
|
395
|
+ Type: "Hold",
|
|
|
396
|
+ AgentID: this.usercode,
|
|
|
397
|
+ AgentExten: this.extension,
|
|
|
398
|
+ };
|
|
|
399
|
+ Send(this.scoketDatas);
|
|
351
|
400
|
},
|
|
352
|
401
|
// 接回通话
|
|
353
|
402
|
retrieveBack() {
|
|
354
|
403
|
this.scoketDatas = {
|
|
355
|
|
- 'Type': 'Retrieve',
|
|
356
|
|
- 'AgentID': this.usercode,
|
|
357
|
|
- 'AgentExten': this.extension
|
|
358
|
|
- }
|
|
359
|
|
- Send(this.scoketDatas)
|
|
|
404
|
+ Type: "Retrieve",
|
|
|
405
|
+ AgentID: this.usercode,
|
|
|
406
|
+ AgentExten: this.extension,
|
|
|
407
|
+ };
|
|
|
408
|
+ Send(this.scoketDatas);
|
|
360
|
409
|
},
|
|
361
|
410
|
// 外呼
|
|
362
|
411
|
makeCall() {
|
|
363
|
412
|
// this.maskshow = true
|
|
364
|
|
- store.dispatch('ChangeCallType', 'MakeCall')
|
|
365
|
|
- store.dispatch('UpdateCalloutScreen', !this.telIsVisCallout)
|
|
|
413
|
+ store.dispatch("ChangeCallType", "MakeCall");
|
|
|
414
|
+ store.dispatch("UpdateCalloutScreen", !this.telIsVisCallout);
|
|
366
|
415
|
},
|
|
367
|
416
|
// 转移
|
|
368
|
417
|
transferCall() {
|
|
369
|
|
- store.dispatch('ChangeCallType', 'Transfer')
|
|
370
|
|
- store.dispatch('UpdatetelIsVisCallout', !this.telIsVisCallout)
|
|
|
418
|
+ store.dispatch("ChangeCallType", "Transfer");
|
|
|
419
|
+ store.dispatch("UpdatetelIsVisCallout", !this.telIsVisCallout);
|
|
371
|
420
|
},
|
|
372
|
421
|
// 多方通话
|
|
373
|
422
|
meetingCall() {
|
|
374
|
|
- store.dispatch('ChangeCallType', 'Meeting')
|
|
375
|
|
- store.dispatch('UpdateCalloutScreen', !this.telIsVisCallout)
|
|
|
423
|
+ store.dispatch("ChangeCallType", "Meeting");
|
|
|
424
|
+ store.dispatch("UpdateCalloutScreen", !this.telIsVisCallout);
|
|
376
|
425
|
},
|
|
377
|
426
|
maskshow() {
|
|
378
|
|
- store.dispatch('UpdatetelIsVisCallout', !this.telIsVisCallout)
|
|
379
|
|
- this.$refs.waihu.clearcontent()
|
|
380
|
|
- this.$refs.waihu.getList()
|
|
|
427
|
+ store.dispatch("UpdatetelIsVisCallout", !this.telIsVisCallout);
|
|
|
428
|
+ this.$refs.waihu.clearcontent();
|
|
|
429
|
+ this.$refs.waihu.getList();
|
|
381
|
430
|
},
|
|
382
|
431
|
// 外呼操作面板 关闭后
|
|
383
|
432
|
afterLeave() {
|
|
384
|
|
- store.dispatch('ChangeCallType', 'MakeCall')
|
|
|
433
|
+ store.dispatch("ChangeCallType", "MakeCall");
|
|
385
|
434
|
},
|
|
386
|
435
|
// 通话时间
|
|
387
|
436
|
callTime() {
|
|
388
|
437
|
// 通话时间重置为00:00:00
|
|
389
|
|
- store.dispatch('UpdateCallTime', {
|
|
390
|
|
- hh: '00',
|
|
391
|
|
- mm: '00',
|
|
392
|
|
- ss: '00'
|
|
393
|
|
- })
|
|
|
438
|
+ store.dispatch("UpdateCallTime", {
|
|
|
439
|
+ hh: "00",
|
|
|
440
|
+ mm: "00",
|
|
|
441
|
+ ss: "00",
|
|
|
442
|
+ });
|
|
394
|
443
|
// 时间 计时
|
|
395
|
|
- let _n = 0
|
|
|
444
|
+ let _n = 0;
|
|
396
|
445
|
if (this.telTimer) {
|
|
397
|
|
- clearInterval(this.telTimer)
|
|
|
446
|
+ clearInterval(this.telTimer);
|
|
398
|
447
|
}
|
|
399
|
448
|
this.telTimer = setInterval(() => {
|
|
400
|
|
- _n++
|
|
401
|
|
-
|
|
402
|
|
- store.dispatch('UpdateCallTime', {
|
|
403
|
|
- hh: this.toDub(parseInt(_n / 60 / 60 % 60)), // 小时
|
|
404
|
|
- mm: this.toDub(parseInt(_n / 60 % 60)), // 分钟
|
|
405
|
|
- ss: this.toDub(parseInt(_n % 60)) // 秒
|
|
406
|
|
- })
|
|
407
|
|
- }, 1000)
|
|
|
449
|
+ _n++;
|
|
|
450
|
+
|
|
|
451
|
+ store.dispatch("UpdateCallTime", {
|
|
|
452
|
+ hh: this.toDub(parseInt((_n / 60 / 60) % 60)), // 小时
|
|
|
453
|
+ mm: this.toDub(parseInt((_n / 60) % 60)), // 分钟
|
|
|
454
|
+ ss: this.toDub(parseInt(_n % 60)), // 秒
|
|
|
455
|
+ });
|
|
|
456
|
+ }, 1000);
|
|
408
|
457
|
},
|
|
409
|
458
|
// 清除定时器
|
|
410
|
459
|
clearInter() {
|
|
411
|
|
- clearInterval(this.telTimer)
|
|
|
460
|
+ clearInterval(this.telTimer);
|
|
412
|
461
|
},
|
|
413
|
462
|
// 小于10补0
|
|
414
|
463
|
toDub(i) {
|
|
415
|
|
- return i < 10 ? '0' + i : '' + i
|
|
|
464
|
+ return i < 10 ? "0" + i : "" + i;
|
|
416
|
465
|
},
|
|
417
|
466
|
// 监听 线路状态
|
|
418
|
467
|
watchTelLineState(newT, oldT) {
|
|
419
|
468
|
// 外呼
|
|
420
|
469
|
if (newT === 6 && oldT === 4) {
|
|
421
|
|
- this.callTime()
|
|
|
470
|
+ this.callTime();
|
|
422
|
471
|
}
|
|
423
|
472
|
// 来电
|
|
424
|
473
|
if (newT === 6 && oldT === 5) {
|
|
425
|
|
- this.callTime()
|
|
|
474
|
+ this.callTime();
|
|
426
|
475
|
}
|
|
427
|
476
|
if (newT === 1) {
|
|
428
|
477
|
if (this.telTimer) {
|
|
429
|
|
- clearInterval(this.telTimer)
|
|
430
|
|
- this.telTimer = null
|
|
|
478
|
+ clearInterval(this.telTimer);
|
|
|
479
|
+ this.telTimer = null;
|
|
431
|
480
|
// //通话时间重置为00:00:00
|
|
432
|
481
|
// store.dispatch('UpdateCallTime', {
|
|
433
|
482
|
// hh: '00',
|
|
|
@@ -436,9 +485,9 @@ export default {
|
|
436
|
485
|
// });
|
|
437
|
486
|
}
|
|
438
|
487
|
}
|
|
439
|
|
- }
|
|
440
|
|
- }
|
|
441
|
|
-}
|
|
|
488
|
+ },
|
|
|
489
|
+ },
|
|
|
490
|
+};
|
|
442
|
491
|
</script>
|
|
443
|
492
|
|
|
444
|
493
|
<style rel="stylesheet/scss" lang="scss">
|
|
|
@@ -479,18 +528,18 @@ export default {
|
|
479
|
528
|
</style>
|
|
480
|
529
|
|
|
481
|
530
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
482
|
|
- .call_btn {
|
|
483
|
|
- outline: none;
|
|
484
|
|
- cursor: pointer;
|
|
485
|
|
- background-color: #42484d;
|
|
486
|
|
- border: 2px solid #191c26;
|
|
487
|
|
- height: 26px;
|
|
488
|
|
- padding: 0 6px;
|
|
489
|
|
- margin-right: 2px;
|
|
490
|
|
- border-radius: 11px;
|
|
491
|
|
- font-size: 12px;
|
|
492
|
|
- color: #ffffff;
|
|
493
|
|
- }
|
|
|
531
|
+.call_btn {
|
|
|
532
|
+ outline: none;
|
|
|
533
|
+ cursor: pointer;
|
|
|
534
|
+ background-color: #42484d;
|
|
|
535
|
+ border: 2px solid #191c26;
|
|
|
536
|
+ height: 26px;
|
|
|
537
|
+ padding: 0 6px;
|
|
|
538
|
+ margin-right: 2px;
|
|
|
539
|
+ border-radius: 11px;
|
|
|
540
|
+ font-size: 12px;
|
|
|
541
|
+ color: #ffffff;
|
|
|
542
|
+}
|
|
494
|
543
|
.tel_operation {
|
|
495
|
544
|
position: absolute;
|
|
496
|
545
|
left: 185px;
|
|
|
@@ -607,10 +656,10 @@ export default {
|
|
607
|
656
|
vertical-align: text-bottom;
|
|
608
|
657
|
}
|
|
609
|
658
|
}
|
|
610
|
|
-.call_middle .el-input__inner{
|
|
611
|
|
- background-color: #fff!important;
|
|
612
|
|
- color:#282b36!important;
|
|
613
|
|
-}
|
|
|
659
|
+ .call_middle .el-input__inner {
|
|
|
660
|
+ background-color: #fff !important;
|
|
|
661
|
+ color: #282b36 !important;
|
|
|
662
|
+ }
|
|
614
|
663
|
.call_right {
|
|
615
|
664
|
margin-left: 0px;
|
|
616
|
665
|
|
|
|
@@ -661,15 +710,14 @@ export default {
|
|
661
|
710
|
}
|
|
662
|
711
|
</style>
|
|
663
|
712
|
<style >
|
|
664
|
|
- .mask{
|
|
665
|
|
- width: 1920px;
|
|
666
|
|
- height: 900px;
|
|
667
|
|
- position: absolute;
|
|
668
|
|
- z-index: -99;
|
|
669
|
|
- background-color:#000000;
|
|
670
|
|
- opacity:0.5;
|
|
671
|
|
- -moz-opacity:0.5;
|
|
672
|
|
- filter:alpha(opacity=50);
|
|
673
|
|
-
|
|
674
|
|
- }
|
|
|
713
|
+.mask {
|
|
|
714
|
+ width: 1920px;
|
|
|
715
|
+ height: 900px;
|
|
|
716
|
+ position: absolute;
|
|
|
717
|
+ z-index: -99;
|
|
|
718
|
+ background-color: #000000;
|
|
|
719
|
+ opacity: 0.5;
|
|
|
720
|
+ -moz-opacity: 0.5;
|
|
|
721
|
+ filter: alpha(opacity=50);
|
|
|
722
|
+}
|
|
675
|
723
|
</style>
|