|
|
@@ -4,65 +4,44 @@
|
|
4
|
4
|
<div class="call_icon">
|
|
5
|
5
|
<transition-group type="transition" name="slide-list">
|
|
6
|
6
|
<svg-icon v-show="!telIsLogin" key="0" icon-class="guaduan" />
|
|
7
|
|
- <i
|
|
8
|
|
- v-show="telIsLogin && (telSeatState===2 && telLineState===1)"
|
|
9
|
|
- key="1"
|
|
10
|
|
- class="calli free"
|
|
11
|
|
- />
|
|
|
7
|
+ <i v-show="telIsLogin && telSeatState === 2 && telLineState === 1" key="1" class="calli free" />
|
|
12
|
8
|
<!-- <svg-icon v-show="telIsLogin && (telSeatState===2 && telLineState===1)" icon-class="xiuxi" /> -->
|
|
13
|
|
- <svg-icon
|
|
14
|
|
- v-show="telIsLogin && (telSeatState===5 && telLineState===1)"
|
|
15
|
|
- key="2"
|
|
16
|
|
- icon-class="manglu01"
|
|
17
|
|
- />
|
|
18
|
|
- <svg-icon
|
|
19
|
|
- v-show="telIsLogin && (telLineState===2)"
|
|
20
|
|
- key="3"
|
|
21
|
|
- icon-class="fenji"
|
|
22
|
|
- class="ringing"
|
|
23
|
|
- />
|
|
24
|
|
- <svg-icon
|
|
25
|
|
- v-show="telIsLogin && (telLineState===3)"
|
|
26
|
|
- key="4"
|
|
27
|
|
- icon-class="huchu"
|
|
28
|
|
- class="ringing"
|
|
29
|
|
- />
|
|
|
9
|
+ <svg-icon v-show="telIsLogin && telSeatState === 5 && telLineState === 1" key="2" icon-class="manglu01" />
|
|
|
10
|
+ <svg-icon v-show="telIsLogin && telLineState === 2" key="3" icon-class="fenji" class="ringing" />
|
|
|
11
|
+ <svg-icon v-show="telIsLogin && telLineState === 3" key="4" icon-class="huchu" class="ringing" />
|
|
30
|
12
|
<!-- <svg-icon v-show="telIsLogin && (telLineState===4)" icon-class="zhenling" class="ringing" /> -->
|
|
31
|
13
|
<!-- <svg-icon v-show="telIsLogin && (telLineState===6)" icon-class="tonghuazhong01" class="incall" /> -->
|
|
32
|
14
|
<!-- <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" />
|
|
|
15
|
+ <i v-show="telIsLogin && telLineState === 4" key="5" class="calli callringing" />
|
|
|
16
|
+ <i v-show="telIsLogin && telLineState === 6" key="6" class="calli incalling" />
|
|
|
17
|
+ <i v-show="telIsLogin && telLineState === 10" key="7" class="calli incalling" />
|
|
36
|
18
|
</transition-group>
|
|
37
|
19
|
</div>
|
|
38
|
20
|
<div class="call_content">
|
|
39
|
21
|
<p class="call_text">
|
|
40
|
22
|
<!-- <transition-group type="transition" name="fade-text"> -->
|
|
41
|
23
|
<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>
|
|
|
24
|
+ <span v-show="telIsLogin && telSeatState === 2 && telLineState === 1" key="9">空闲中</span>
|
|
|
25
|
+ <span v-show="telIsLogin && telSeatState === 5 && telLineState === 1" key="10">忙碌中</span>
|
|
|
26
|
+ <span v-show="telIsLogin && telLineState === 2" key="11">摘机中</span>
|
|
|
27
|
+ <span v-show="telIsLogin && telLineState === 3" key="12">拨号中</span>
|
|
|
28
|
+ <span v-show="telIsLogin && telLineState === 4" key="13">振铃中</span>
|
|
|
29
|
+ <span v-show="telIsLogin && telLineState === 6" key="14">通话中</span>
|
|
|
30
|
+ <span v-show="telIsLogin && telLineState === 10" key="15">保持中</span>
|
|
49
|
31
|
<!-- </transition-group> -->
|
|
50
|
32
|
<svg-icon v-show="telIsLogin" icon-class="xinhao" />
|
|
51
|
33
|
</p>
|
|
52
|
|
- <p
|
|
53
|
|
- v-show="(telSeatState===2 && telLineState < 6)|| (telSeatState === 5 && telLineState < 6)"
|
|
54
|
|
- class="call_time"
|
|
55
|
|
- >--:--:--</p>
|
|
56
|
|
- <p v-show="telIsLogin && (telLineState===6 || telLineState===10)" class="call_time">
|
|
|
34
|
+ <p v-show="(telSeatState === 2 && telLineState < 6) || (telSeatState === 5 && telLineState < 6)" class="call_time">--:--:--</p>
|
|
|
35
|
+ <p v-show="telIsLogin && (telLineState === 6 || telLineState === 10)" class="call_time">
|
|
57
|
36
|
<span v-show="Number(telCallTime.hh) === 0">{{ telCallTime.hh }}</span>
|
|
58
|
37
|
<span v-show="Number(telCallTime.hh) > 0 && Number(telCallTime.hh) < 10">
|
|
59
|
|
- <span>{{ telCallTime.hh.substr(0,1) }}</span>
|
|
|
38
|
+ <span>{{ telCallTime.hh.substr(0, 1) }}</span>
|
|
60
|
39
|
<span class="blue_color">{{ telCallTime.hh.substr(1) }}</span>
|
|
61
|
40
|
</span>
|
|
62
|
41
|
<span v-show="Number(telCallTime.hh) > 9" class="blue_color">{{ telCallTime.hh }}</span>
|
|
63
|
42
|
<span v-show="Number(telCallTime.mm) === 0">:{{ telCallTime.mm }}</span>
|
|
64
|
43
|
<span v-show="Number(telCallTime.mm) > 0 && Number(telCallTime.mm) < 10">
|
|
65
|
|
- <span>:{{ telCallTime.mm.substr(0,1) }}</span>
|
|
|
44
|
+ <span>:{{ telCallTime.mm.substr(0, 1) }}</span>
|
|
66
|
45
|
<span class="blue_color">{{ telCallTime.mm.substr(1) }}</span>
|
|
67
|
46
|
</span>
|
|
68
|
47
|
<span v-show="Number(telCallTime.mm) > 9" class="blue_color">:{{ telCallTime.mm }}</span>
|
|
|
@@ -71,160 +50,70 @@
|
|
71
|
50
|
</div>
|
|
72
|
51
|
</div>
|
|
73
|
52
|
<div v-show="telIsLogin" class="call_middle">
|
|
74
|
|
- <el-input
|
|
75
|
|
- :class="{no_write: true}"
|
|
76
|
|
- :readonly="true"
|
|
77
|
|
- v-model="telCallNum"
|
|
78
|
|
- size="small"
|
|
79
|
|
- placeholder
|
|
80
|
|
- />
|
|
81
|
|
- <i
|
|
82
|
|
- v-show="telSeatState===2 && telLineState===1"
|
|
83
|
|
- slot="reference"
|
|
84
|
|
- class="dialicon"
|
|
85
|
|
- @click="makeCall"
|
|
86
|
|
- />
|
|
87
|
|
- <el-popover
|
|
88
|
|
- :value="telIsVisCallout"
|
|
89
|
|
- :disabled="false"
|
|
90
|
|
- trigger="manual"
|
|
91
|
|
- popper-class="dial_popover"
|
|
92
|
|
- placement="bottom-start"
|
|
93
|
|
- width="300"
|
|
94
|
|
- transition="fade-in-linear"
|
|
95
|
|
- @after-leave="afterLeave"
|
|
96
|
|
- >
|
|
|
53
|
+ <el-input :class="{ no_write: true }" :readonly="true" v-model="telCallNum" size="small" placeholder />
|
|
|
54
|
+ <i v-show="(telSeatState === 2 && telLineState === 1) || (telSeatState === 5 && telLineState === 1)" slot="reference" class="dialicon" @click="makeCall" />
|
|
|
55
|
+ <el-popover :value="telIsVisCallout" :disabled="false" trigger="manual" popper-class="dial_popover" placement="bottom-start" width="300" transition="fade-in-linear" @after-leave="afterLeave">
|
|
97
|
56
|
<Dialplate />
|
|
98
|
57
|
</el-popover>
|
|
99
|
58
|
</div>
|
|
100
|
59
|
<div class="call_right">
|
|
101
|
60
|
<transition-group type="transition" name="fade-list">
|
|
102
|
|
- <button
|
|
103
|
|
- v-waves
|
|
104
|
|
- v-show="!telIsLogin"
|
|
105
|
|
- key="27"
|
|
106
|
|
- type="button"
|
|
107
|
|
- class="start_btn"
|
|
108
|
|
- @click="signIn"
|
|
109
|
|
- >开始工作</button>
|
|
110
|
|
- <button
|
|
111
|
|
- v-waves
|
|
112
|
|
- v-show="telIsLogin && (telSeatState===2 && telLineState===1)"
|
|
113
|
|
- key="17"
|
|
114
|
|
- type="button"
|
|
115
|
|
- class="call_btn"
|
|
116
|
|
- @click="setBusy"
|
|
117
|
|
- >置忙</button>
|
|
118
|
|
- <button
|
|
119
|
|
- v-waves
|
|
120
|
|
- v-show="telIsLogin && (telSeatState===5 && telLineState===1)"
|
|
121
|
|
- key="18"
|
|
122
|
|
- type="button"
|
|
123
|
|
- class="call_btn"
|
|
124
|
|
- @click="setFree"
|
|
125
|
|
- >置闲</button>
|
|
126
|
|
- <button
|
|
127
|
|
- v-waves
|
|
128
|
|
- v-show="telIsLogin && ((telSeatState===2 || telSeatState===5) && telLineState===1)"
|
|
129
|
|
- key="19"
|
|
130
|
|
- type="button"
|
|
131
|
|
- class="call_btn"
|
|
132
|
|
- @click="signOut"
|
|
133
|
|
- >签出</button>
|
|
134
|
|
- <button
|
|
135
|
|
- v-waves
|
|
136
|
|
- v-show="telIsLogin && (telLineState===6)"
|
|
137
|
|
- key="20"
|
|
138
|
|
- type="button"
|
|
139
|
|
- class="call_btn yellow_bg"
|
|
140
|
|
- @click="holdBack"
|
|
141
|
|
- >保持通话</button>
|
|
142
|
|
- <button
|
|
143
|
|
- v-waves
|
|
144
|
|
- v-show="telIsLogin && (telLineState===10)"
|
|
145
|
|
- key="21"
|
|
146
|
|
- type="button"
|
|
147
|
|
- class="call_btn green_bg"
|
|
148
|
|
- @click="retrieveBack"
|
|
149
|
|
- >接回通话</button>
|
|
150
|
|
- <button
|
|
151
|
|
- v-waves
|
|
152
|
|
- v-show="telIsLogin && (telLineState===6 || telLineState===10)"
|
|
153
|
|
- key="24"
|
|
154
|
|
- type="button"
|
|
155
|
|
- class="call_btn"
|
|
156
|
|
- @click="transferCall"
|
|
157
|
|
- >转接</button>
|
|
158
|
|
- <button
|
|
159
|
|
- v-waves
|
|
160
|
|
- v-show="telIsLogin && (telLineState===6 || telLineState===10)"
|
|
161
|
|
- key="25"
|
|
162
|
|
- type="button"
|
|
163
|
|
- class="call_btn"
|
|
164
|
|
- @click="meetingCall"
|
|
165
|
|
- >多方通话</button>
|
|
166
|
|
- <button
|
|
167
|
|
- v-waves
|
|
168
|
|
- v-show="telIsLogin && (telLineState>2)"
|
|
169
|
|
- key="22"
|
|
170
|
|
- type="button"
|
|
171
|
|
- class="call_btn"
|
|
172
|
|
- @click="btn_IVR"
|
|
173
|
|
- >转IVR</button>
|
|
174
|
|
- <button
|
|
175
|
|
- v-waves
|
|
176
|
|
- v-show="telIsLogin && (telLineState>2)"
|
|
177
|
|
- key="23"
|
|
178
|
|
- type="button"
|
|
179
|
|
- class="call_btn red_bg"
|
|
180
|
|
- @click="dropCall"
|
|
181
|
|
- >挂断</button>
|
|
|
61
|
+ <button v-waves v-show="!telIsLogin" key="27" type="button" class="start_btn" @click="signIn">开始工作</button>
|
|
|
62
|
+ <button v-waves v-show="telIsLogin && telSeatState === 2 && telLineState === 1" key="17" type="button" class="call_btn" @click="setBusy">置忙</button>
|
|
|
63
|
+ <button v-waves v-show="telIsLogin && telSeatState === 5 && telLineState === 1" key="18" type="button" class="call_btn" @click="setFree">置闲</button>
|
|
|
64
|
+ <button v-waves v-show="telIsLogin && (telSeatState === 2 || telSeatState === 5) && telLineState === 1" key="19" type="button" class="call_btn" @click="signOut">签出</button>
|
|
|
65
|
+ <button v-waves v-show="telIsLogin && telLineState === 6" key="20" type="button" class="call_btn yellow_bg" @click="holdBack">保持通话</button>
|
|
|
66
|
+ <button v-waves v-show="telIsLogin && telLineState === 10" key="21" type="button" class="call_btn green_bg" @click="retrieveBack">接回通话</button>
|
|
|
67
|
+ <button v-waves v-show="telIsLogin && (telLineState === 6 || telLineState === 10)" key="24" type="button" class="call_btn" @click="transferCall">转接</button>
|
|
|
68
|
+ <button v-waves v-show="telIsLogin && (telLineState === 6 || telLineState === 10)" key="25" type="button" class="call_btn" @click="meetingCall">多方通话</button>
|
|
|
69
|
+ <button v-waves v-show="telIsLogin && telLineState > 2" key="22" type="button" class="call_btn" @click="btn_IVR">转IVR</button>
|
|
|
70
|
+ <button v-waves v-show="telIsLogin && telLineState > 2" key="23" type="button" class="call_btn red_bg" @click="dropCall">挂断</button>
|
|
182
|
71
|
</transition-group>
|
|
183
|
72
|
</div>
|
|
184
|
73
|
</div>
|
|
185
|
74
|
</template>
|
|
186
|
75
|
|
|
187
|
76
|
<script>
|
|
188
|
|
-import { mapGetters } from 'vuex'
|
|
189
|
|
-import store from '@/store'
|
|
190
|
|
-import { Send } from '@/utils/telWebsocket'
|
|
191
|
|
-import Dialplate from '@/components/Dialplate'
|
|
|
77
|
+import { mapGetters } from "vuex"
|
|
|
78
|
+import store from "@/store"
|
|
|
79
|
+import { Send } from "@/utils/telWebsocket"
|
|
|
80
|
+import Dialplate from "@/components/Dialplate"
|
|
192
|
81
|
export default {
|
|
193
|
|
- name: 'Teloperation',
|
|
|
82
|
+ name: "Teloperation",
|
|
194
|
83
|
components: {
|
|
195
|
|
- Dialplate
|
|
|
84
|
+ Dialplate,
|
|
196
|
85
|
},
|
|
197
|
|
- data () {
|
|
|
86
|
+ data() {
|
|
198
|
87
|
return {
|
|
199
|
88
|
scoketDatas: {}, // 发送的数据
|
|
200
|
|
- telNumber: '',
|
|
201
|
|
- telTimer: null // 时间定时器
|
|
|
89
|
+ telNumber: "",
|
|
|
90
|
+ telTimer: null, // 时间定时器
|
|
202
|
91
|
}
|
|
203
|
92
|
},
|
|
204
|
93
|
computed: {
|
|
205
|
94
|
...mapGetters([
|
|
206
|
|
- 'usercode', // 工号
|
|
207
|
|
- 'extension', // 分机号
|
|
208
|
|
- 'groupcode', // 坐席组code
|
|
209
|
|
- 'telIsLogin', // 是否签入
|
|
210
|
|
- 'telSeatState', // 坐席状态
|
|
211
|
|
- 'telLineState', // 线路状态
|
|
212
|
|
- 'telCallNum', // 电话号码
|
|
213
|
|
- 'telIsVisCallout', // 外呼操作面板是否显示
|
|
214
|
|
- 'telCallTime', // 通话时间
|
|
215
|
|
- 'telMessageData' // telwebsocket 接收的数据
|
|
216
|
|
- ])
|
|
|
95
|
+ "usercode", // 工号
|
|
|
96
|
+ "extension", // 分机号
|
|
|
97
|
+ "groupcode", // 坐席组code
|
|
|
98
|
+ "telIsLogin", // 是否签入
|
|
|
99
|
+ "telSeatState", // 坐席状态
|
|
|
100
|
+ "telLineState", // 线路状态
|
|
|
101
|
+ "telCallNum", // 电话号码
|
|
|
102
|
+ "telIsVisCallout", // 外呼操作面板是否显示
|
|
|
103
|
+ "telCallTime", // 通话时间
|
|
|
104
|
+ "telMessageData", // telwebsocket 接收的数据
|
|
|
105
|
+ ]),
|
|
217
|
106
|
},
|
|
218
|
107
|
watch: {
|
|
219
|
108
|
// 如果 `telLineState` 发生改变,这个函数就会运行
|
|
220
|
109
|
telLineState: function (newT, oldT) {
|
|
221
|
110
|
// console.log(newT, oldT);
|
|
222
|
111
|
this.watchTelLineState(newT, oldT)
|
|
223
|
|
- }
|
|
|
112
|
+ },
|
|
224
|
113
|
},
|
|
225
|
114
|
methods: {
|
|
226
|
115
|
// 签入
|
|
227
|
|
- signIn () {
|
|
|
116
|
+ signIn() {
|
|
228
|
117
|
console.log(this.groupcode)
|
|
229
|
118
|
console.log(this.extension)
|
|
230
|
119
|
// if(!this.groupcode){
|
|
|
@@ -232,121 +121,122 @@ export default {
|
|
232
|
121
|
// return false
|
|
233
|
122
|
// }
|
|
234
|
123
|
if (!this.extension) {
|
|
235
|
|
- this.$confirm('如果您想进行话务操作,请重新登录并且输入分机号, 是否重新登录?', '提示', {
|
|
236
|
|
- confirmButtonText: '是',
|
|
237
|
|
- cancelButtonText: '否',
|
|
238
|
|
- type: 'warning'
|
|
239
|
|
- }).then(() => {
|
|
240
|
|
- this.$store.dispatch('FedLogOut').then(() => {
|
|
241
|
|
- location.reload() // 为了重新实例化vue-router对象 避免bug
|
|
|
124
|
+ this.$confirm("如果您想进行话务操作,请重新登录并且输入分机号, 是否重新登录?", "提示", {
|
|
|
125
|
+ confirmButtonText: "是",
|
|
|
126
|
+ cancelButtonText: "否",
|
|
|
127
|
+ type: "warning",
|
|
|
128
|
+ })
|
|
|
129
|
+ .then(() => {
|
|
|
130
|
+ this.$store.dispatch("FedLogOut").then(() => {
|
|
|
131
|
+ location.reload() // 为了重新实例化vue-router对象 避免bug
|
|
|
132
|
+ })
|
|
242
|
133
|
})
|
|
243
|
|
- }).catch(() => {
|
|
244
|
|
- })
|
|
|
134
|
+ .catch(() => {})
|
|
245
|
135
|
return
|
|
246
|
136
|
}
|
|
247
|
137
|
this.scoketDatas = {
|
|
248
|
|
- 'Type': 'Login',
|
|
249
|
|
- 'AgentID': this.usercode,
|
|
250
|
|
- 'AgentExten': this.extension,
|
|
251
|
|
- 'AgentGroup': window.localStorage.getItem("groupCode"), // 坐席组id
|
|
252
|
|
- 'AgentType': '0',
|
|
253
|
|
- 'DisposeTime': '0' // 话后处理时长设置,0代表一致话后处理,除非发送置闲 (按照历史习惯,字符串形式)
|
|
|
138
|
+ Type: "Login",
|
|
|
139
|
+ AgentID: this.usercode,
|
|
|
140
|
+ AgentExten: this.extension,
|
|
|
141
|
+ AgentGroup: window.localStorage.getItem("groupCode"), // 坐席组id
|
|
|
142
|
+ AgentType: "0",
|
|
|
143
|
+ DisposeTime: "0", // 话后处理时长设置,0代表一致话后处理,除非发送置闲 (按照历史习惯,字符串形式)
|
|
254
|
144
|
}
|
|
255
|
145
|
Send(this.scoketDatas)
|
|
256
|
146
|
},
|
|
257
|
147
|
// 签出
|
|
258
|
|
- signOut () {
|
|
|
148
|
+ signOut() {
|
|
259
|
149
|
this.scoketDatas = {
|
|
260
|
|
- 'Type': 'Logout',
|
|
261
|
|
- 'AgentID': this.usercode,
|
|
262
|
|
- 'AgentExten': this.extension
|
|
|
150
|
+ Type: "Logout",
|
|
|
151
|
+ AgentID: this.usercode,
|
|
|
152
|
+ AgentExten: this.extension,
|
|
263
|
153
|
}
|
|
264
|
154
|
Send(this.scoketDatas)
|
|
265
|
|
- store.dispatch('UpdateCalloutScreen', false)
|
|
|
155
|
+ store.dispatch("UpdateCalloutScreen", false)
|
|
266
|
156
|
},
|
|
267
|
157
|
// 置忙
|
|
268
|
|
- setBusy () {
|
|
|
158
|
+ setBusy() {
|
|
269
|
159
|
this.scoketDatas = {
|
|
270
|
|
- 'Type': 'SayBusy',
|
|
271
|
|
- 'AgentID': this.usercode,
|
|
272
|
|
- 'AgentExten': this.extension
|
|
|
160
|
+ Type: "SayBusy",
|
|
|
161
|
+ AgentID: this.usercode,
|
|
|
162
|
+ AgentExten: this.extension,
|
|
273
|
163
|
}
|
|
274
|
164
|
Send(this.scoketDatas)
|
|
275
|
165
|
},
|
|
276
|
166
|
// 置闲
|
|
277
|
|
- setFree () {
|
|
|
167
|
+ setFree() {
|
|
278
|
168
|
this.scoketDatas = {
|
|
279
|
|
- 'Type': 'SayFree',
|
|
280
|
|
- 'AgentID': this.usercode,
|
|
281
|
|
- 'AgentExten': this.extension
|
|
|
169
|
+ Type: "SayFree",
|
|
|
170
|
+ AgentID: this.usercode,
|
|
|
171
|
+ AgentExten: this.extension,
|
|
282
|
172
|
}
|
|
283
|
173
|
Send(this.scoketDatas)
|
|
284
|
174
|
},
|
|
285
|
175
|
// 转IVR
|
|
286
|
|
- btn_IVR () {
|
|
|
176
|
+ btn_IVR() {
|
|
287
|
177
|
this.scoketDatas = {
|
|
288
|
|
- 'Type': 'TurnIvr',
|
|
289
|
|
- 'AgentID': this.usercode,
|
|
290
|
|
- 'AgentExten': this.extension,
|
|
291
|
|
- 'IvrName': 'MYD_ZXZ',
|
|
292
|
|
- 'IvrPos': '1'
|
|
|
178
|
+ Type: "TurnIvr",
|
|
|
179
|
+ AgentID: this.usercode,
|
|
|
180
|
+ AgentExten: this.extension,
|
|
|
181
|
+ IvrName: "MYD_ZXZ",
|
|
|
182
|
+ IvrPos: "1",
|
|
293
|
183
|
}
|
|
294
|
184
|
Send(this.scoketDatas)
|
|
295
|
185
|
},
|
|
296
|
186
|
// 挂断
|
|
297
|
|
- dropCall () {
|
|
|
187
|
+ dropCall() {
|
|
298
|
188
|
this.scoketDatas = {
|
|
299
|
|
- 'Type': 'DropCall',
|
|
300
|
|
- 'AgentID': this.usercode,
|
|
301
|
|
- 'AgentExten': this.extension
|
|
|
189
|
+ Type: "DropCall",
|
|
|
190
|
+ AgentID: this.usercode,
|
|
|
191
|
+ AgentExten: this.extension,
|
|
302
|
192
|
}
|
|
303
|
193
|
Send(this.scoketDatas)
|
|
304
|
|
- store.dispatch('UpdateCalloutScreen', false)
|
|
|
194
|
+ store.dispatch("UpdateCalloutScreen", false)
|
|
305
|
195
|
},
|
|
306
|
196
|
// 保持通话
|
|
307
|
|
- holdBack () {
|
|
|
197
|
+ holdBack() {
|
|
308
|
198
|
this.scoketDatas = {
|
|
309
|
|
- 'Type': 'Hold',
|
|
310
|
|
- 'AgentID': this.usercode,
|
|
311
|
|
- 'AgentExten': this.extension
|
|
|
199
|
+ Type: "Hold",
|
|
|
200
|
+ AgentID: this.usercode,
|
|
|
201
|
+ AgentExten: this.extension,
|
|
312
|
202
|
}
|
|
313
|
203
|
Send(this.scoketDatas)
|
|
314
|
204
|
},
|
|
315
|
205
|
// 接回通话
|
|
316
|
|
- retrieveBack () {
|
|
|
206
|
+ retrieveBack() {
|
|
317
|
207
|
this.scoketDatas = {
|
|
318
|
|
- 'Type': 'Retrieve',
|
|
319
|
|
- 'AgentID': this.usercode,
|
|
320
|
|
- 'AgentExten': this.extension
|
|
|
208
|
+ Type: "Retrieve",
|
|
|
209
|
+ AgentID: this.usercode,
|
|
|
210
|
+ AgentExten: this.extension,
|
|
321
|
211
|
}
|
|
322
|
212
|
Send(this.scoketDatas)
|
|
323
|
213
|
},
|
|
324
|
214
|
// 外呼
|
|
325
|
|
- makeCall () {
|
|
326
|
|
- store.dispatch('ChangeCallType', 'MakeCall')
|
|
327
|
|
- store.dispatch('UpdateCalloutScreen', !this.telIsVisCallout)
|
|
|
215
|
+ makeCall() {
|
|
|
216
|
+ store.dispatch("ChangeCallType", "MakeCall")
|
|
|
217
|
+ store.dispatch("UpdateCalloutScreen", !this.telIsVisCallout)
|
|
328
|
218
|
},
|
|
329
|
219
|
// 转接
|
|
330
|
|
- transferCall () {
|
|
331
|
|
- store.dispatch('ChangeCallType', 'Transfer')
|
|
332
|
|
- store.dispatch('UpdateCalloutScreen', !this.telIsVisCallout)
|
|
|
220
|
+ transferCall() {
|
|
|
221
|
+ store.dispatch("ChangeCallType", "Transfer")
|
|
|
222
|
+ store.dispatch("UpdateCalloutScreen", !this.telIsVisCallout)
|
|
333
|
223
|
},
|
|
334
|
224
|
// 多方通话
|
|
335
|
|
- meetingCall () {
|
|
336
|
|
- store.dispatch('ChangeCallType', 'Meeting')
|
|
337
|
|
- store.dispatch('UpdateCalloutScreen', !this.telIsVisCallout)
|
|
|
225
|
+ meetingCall() {
|
|
|
226
|
+ store.dispatch("ChangeCallType", "Meeting")
|
|
|
227
|
+ store.dispatch("UpdateCalloutScreen", !this.telIsVisCallout)
|
|
338
|
228
|
},
|
|
339
|
229
|
// 外呼操作面板 关闭后
|
|
340
|
|
- afterLeave () {
|
|
341
|
|
- store.dispatch('ChangeCallType', 'MakeCall')
|
|
|
230
|
+ afterLeave() {
|
|
|
231
|
+ store.dispatch("ChangeCallType", "MakeCall")
|
|
342
|
232
|
},
|
|
343
|
233
|
// 通话时间
|
|
344
|
|
- callTime () {
|
|
|
234
|
+ callTime() {
|
|
345
|
235
|
// 通话时间重置为00:00:00
|
|
346
|
|
- store.dispatch('UpdateCallTime', {
|
|
347
|
|
- hh: '00',
|
|
348
|
|
- mm: '00',
|
|
349
|
|
- ss: '00'
|
|
|
236
|
+ store.dispatch("UpdateCallTime", {
|
|
|
237
|
+ hh: "00",
|
|
|
238
|
+ mm: "00",
|
|
|
239
|
+ ss: "00",
|
|
350
|
240
|
})
|
|
351
|
241
|
// 时间 计时
|
|
352
|
242
|
let _n = 0
|
|
|
@@ -356,23 +246,23 @@ export default {
|
|
356
|
246
|
this.telTimer = setInterval(() => {
|
|
357
|
247
|
_n++
|
|
358
|
248
|
|
|
359
|
|
- store.dispatch('UpdateCallTime', {
|
|
360
|
|
- hh: this.toDub(parseInt(_n / 60 / 60 % 60)), // 小时
|
|
361
|
|
- mm: this.toDub(parseInt(_n / 60 % 60)), // 分钟
|
|
362
|
|
- ss: this.toDub(parseInt(_n % 60)) // 秒
|
|
|
249
|
+ store.dispatch("UpdateCallTime", {
|
|
|
250
|
+ hh: this.toDub(parseInt((_n / 60 / 60) % 60)), // 小时
|
|
|
251
|
+ mm: this.toDub(parseInt((_n / 60) % 60)), // 分钟
|
|
|
252
|
+ ss: this.toDub(parseInt(_n % 60)), // 秒
|
|
363
|
253
|
})
|
|
364
|
254
|
}, 1000)
|
|
365
|
255
|
},
|
|
366
|
256
|
// 清除定时器
|
|
367
|
|
- clearInter () {
|
|
|
257
|
+ clearInter() {
|
|
368
|
258
|
clearInterval(this.telTimer)
|
|
369
|
259
|
},
|
|
370
|
260
|
// 小于10补0
|
|
371
|
|
- toDub (i) {
|
|
372
|
|
- return i < 10 ? '0' + i : '' + i
|
|
|
261
|
+ toDub(i) {
|
|
|
262
|
+ return i < 10 ? "0" + i : "" + i
|
|
373
|
263
|
},
|
|
374
|
264
|
// 监听 线路状态
|
|
375
|
|
- watchTelLineState (newT, oldT) {
|
|
|
265
|
+ watchTelLineState(newT, oldT) {
|
|
376
|
266
|
// 外呼
|
|
377
|
267
|
if (newT === 6 && oldT === 4) {
|
|
378
|
268
|
this.callTime()
|
|
|
@@ -393,8 +283,8 @@ export default {
|
|
393
|
283
|
// });
|
|
394
|
284
|
}
|
|
395
|
285
|
}
|
|
396
|
|
- }
|
|
397
|
|
- }
|
|
|
286
|
+ },
|
|
|
287
|
+ },
|
|
398
|
288
|
}
|
|
399
|
289
|
</script>
|
|
400
|
290
|
|
|
|
@@ -483,8 +373,7 @@ export default {
|
|
483
|
373
|
background: url(../../assets/imgs/incalling.gif) center center no-repeat;
|
|
484
|
374
|
}
|
|
485
|
375
|
.callringing {
|
|
486
|
|
- background: url(../../assets/imgs/callringing.gif) center center
|
|
487
|
|
- no-repeat;
|
|
|
376
|
+ background: url(../../assets/imgs/callringing.gif) center center no-repeat;
|
|
488
|
377
|
}
|
|
489
|
378
|
|
|
490
|
379
|
.svg-icon {
|