ソースを参照

fix:通话记录回复操作

scholar-wei 3 年 前
コミット
db9ebb8e74

+ 94 - 94
CallCenterWeb.UI/RMYY/src/utils/request.js

@@ -1,11 +1,11 @@
1
-import axios from "axios";
2
-import qs from "qs"; // 引入axios时同时引入qs即可。
3
-import { Message, MessageBox } from "element-ui";
4
-import store from "../store";
5
-import { getToken } from "@/utils/auth";
1
+import axios from 'axios'
2
+import qs from 'qs' // 引入axios时同时引入qs即可。
3
+import { Message, MessageBox } from 'element-ui'
4
+import store from '../store'
5
+import { getToken } from '@/utils/auth'
6 6
 
7 7
 // 正在进行中的请求列表
8
-const reqList = [];
8
+const reqList = []
9 9
 /**
10 10
  * 阻止重复请求
11 11
  * @param {array} reqList - 请求缓存列表
@@ -14,15 +14,15 @@ const reqList = [];
14 14
  * @param {string} errorMessage - 请求中断时需要显示的错误信息
15 15
  */
16 16
 const stopRepeatRequest = function(reqList, url, cancel, errorMessage) {
17
-  const errorMsg = errorMessage || "";
17
+  const errorMsg = errorMessage || ''
18 18
   for (let i = 0; i < reqList.length; i++) {
19 19
     if (reqList[i] === url) {
20
-      cancel(errorMsg);
21
-      return;
20
+      cancel(errorMsg)
21
+      return
22 22
     }
23 23
   }
24
-  reqList.push(url);
25
-};
24
+  reqList.push(url)
25
+}
26 26
 
27 27
 /**
28 28
  * 允许某个请求可以继续进行
@@ -32,12 +32,12 @@ const stopRepeatRequest = function(reqList, url, cancel, errorMessage) {
32 32
 const allowRequest = function(reqList, url) {
33 33
   for (let i = 0; i < reqList.length; i++) {
34 34
     if (reqList[i] === url) {
35
-      reqList.splice(i, 1);
36
-      break;
35
+      reqList.splice(i, 1)
36
+      break
37 37
     }
38 38
   }
39
-  console.log(reqList);
40
-};
39
+  console.log(reqList)
40
+}
41 41
 
42 42
 // const baseURL = process.env.BASE_API
43 43
 // 创建axios实例
@@ -45,7 +45,7 @@ const service = axios.create({
45 45
   // baseURL: baseURL, // api的base_url
46 46
   timeout: 30000, // 请求超时时间
47 47
   headers: {
48
-    "Content-Type": "application/x-www-form-urlencoded"
48
+    'Content-Type': 'application/x-www-form-urlencoded'
49 49
   },
50 50
   // `transformRequest` 允许在向服务器发送前,修改请求数据
51 51
   // 只能用在 'PUT', 'POST' 和 'PATCH' 这几个请求方法
@@ -54,7 +54,7 @@ const service = axios.create({
54 54
   transformRequest: [
55 55
     function(data) {
56 56
       // 对 data 进行任意转换处理
57
-      return qs.stringify(data);
57
+      return qs.stringify(data)
58 58
     }
59 59
   ],
60 60
 
@@ -65,38 +65,38 @@ const service = axios.create({
65 65
   // return qs.stringify({ids: [1, 2, 3]}, {arrayFormat: 'brackets'})  // 形式:ids[]=1&ids[]=2&ids[]=3
66 66
   // return qs.stringify({ids: [1, 2, 3]}, {arrayFormat: 'repeat'})  // 形式: ids=1&ids=2&id=3
67 67
   paramsSerializer: function(params) {
68
-    return qs.stringify(params, { arrayFormat: "indices" }); // 形式:ids=1&ids=2&id=3
68
+    return qs.stringify(params, { arrayFormat: 'indices' }) // 形式:ids=1&ids=2&id=3
69 69
   }
70
-});
70
+})
71 71
 // request拦截器
72 72
 service.interceptors.request.use(
73 73
   config => {
74 74
     if (store.getters.token) {
75
-      config.headers["Authorization"] = getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
75
+      config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
76 76
     }
77
-    let cancel;
78
-    if (config.method === "post") {
77
+    let cancel
78
+    if (config.method === 'post') {
79 79
       // 设置cancelToken对象
80 80
       config.cancelToken = new axios.CancelToken(function(c) {
81
-        cancel = c;
82
-      });
81
+        cancel = c
82
+      })
83 83
       // 阻止重复请求。当上个请求未完成时,相同的请求不会进行
84 84
       stopRepeatRequest(
85 85
         reqList,
86 86
         config.url,
87 87
         cancel,
88 88
         `${config.url} 请求被中断`
89
-      );
89
+      )
90 90
       // stopRepeatRequest(reqList, config.url, cancel, `请求被中断`)
91 91
     }
92 92
 
93
-    return config;
93
+    return config
94 94
   },
95 95
   error => {
96 96
     // Do something with request error
97
-    Promise.reject(error);
97
+    Promise.reject(error)
98 98
   }
99
-);
99
+)
100 100
 
101 101
 // respone拦截器
102 102
 service.interceptors.response.use(
@@ -105,130 +105,130 @@ service.interceptors.response.use(
105 105
      * state为非"success"时抛错
106 106
      */
107 107
     // 增加延迟,相同请求不得在短时间内重复发送
108
-    if (response.config.method === "post") {
108
+    if (response.config.method === 'post') {
109 109
       setTimeout(() => {
110
-        const replaceList = response.config.url.split("/");
110
+        const replaceList = response.config.url.split('/')
111 111
         const newUrl =
112 112
           replaceList[replaceList.length - 2] +
113
-          "/" +
114
-          replaceList[replaceList.length - 1];
115
-        allowRequest(reqList, newUrl);
116
-      }, 1000);
113
+          '/' +
114
+          replaceList[replaceList.length - 1]
115
+        allowRequest(reqList, newUrl)
116
+      }, 1000)
117 117
     }
118
-    const res = response.data;
119
-    if (res.state && res.state.toLowerCase() !== "success") {
118
+    const res = response.data
119
+    if (res.state && res.state.toLowerCase() !== 'success') {
120 120
       Message({
121 121
         message: res.message,
122
-        type: "error",
122
+        type: 'error',
123 123
         duration: 5 * 1000
124
-      });
124
+      })
125 125
       // 50008:非法的token; 50012:其他客户端登录了;  "notoken":Token 过期了
126 126
       if (
127 127
         res.state.toLowerCase() === 50008 ||
128 128
         res.state.toLowerCase() === 50012 ||
129
-        res.state.toLowerCase() === "notoken"
129
+        res.state.toLowerCase() === 'notoken'
130 130
       ) {
131 131
         MessageBox.confirm(
132
-          "你已被登出,可以取消继续留在该页面,或者重新登录",
133
-          "确定登出",
132
+          '你已被登出,可以取消继续留在该页面,或者重新登录',
133
+          '确定登出',
134 134
           {
135
-            confirmButtonText: "重新登录",
136
-            cancelButtonText: "取消",
137
-            type: "warning"
135
+            confirmButtonText: '重新登录',
136
+            cancelButtonText: '取消',
137
+            type: 'warning'
138 138
           }
139 139
         ).then(() => {
140
-          store.dispatch("FedLogOut").then(() => {
141
-            location.reload(); // 为了重新实例化vue-router对象 避免bug
142
-          });
143
-        });
140
+          store.dispatch('FedLogOut').then(() => {
141
+            location.reload() // 为了重新实例化vue-router对象 避免bug
142
+          })
143
+        })
144 144
       }
145
-      return Promise.reject("error");
145
+      return Promise.reject('error')
146 146
     } else {
147
-      if (response.config.responseType === "blob") {
148
-        return response;
147
+      if (response.config.responseType === 'blob') {
148
+        return response
149 149
       }
150
-      return response.data;
150
+      return response.data
151 151
     }
152 152
   },
153 153
   error => {
154
-    if (error.response.config.method === "post") {
154
+    if (error && !error.message && error.response.config.method === 'post') {
155 155
       setTimeout(() => {
156
-        const replaceList = error.response.config.url.split("/");
156
+        const replaceList = error.response.config.url.split('/')
157 157
         const newUrl =
158 158
           replaceList[replaceList.length - 2] +
159
-          "/" +
160
-          replaceList[replaceList.length - 1];
161
-        allowRequest(reqList, newUrl);
162
-      }, 500);
159
+          '/' +
160
+          replaceList[replaceList.length - 1]
161
+        allowRequest(reqList, newUrl)
162
+      }, 500)
163 163
     }
164
-    console.log("err:" + error); // for debug
164
+    console.log('err:' + error) // for debug
165 165
     if (error && error.response) {
166 166
       switch (
167 167
         error.response.status // 跨域存在获取不到状态码的情况
168 168
       ) {
169 169
         case 400:
170
-          error.message = `请求错误(400):${error.response.config.url}`;
171
-          break;
170
+          error.message = `请求错误(400):${error.response.config.url}`
171
+          break
172 172
 
173 173
         case 401:
174
-          error.message = `未授权,请登录(401):${error.response.config.url}`;
175
-          store.dispatch("FedLogOut").then(() => {
176
-            location.reload(); // 为了重新实例化vue-router对象 避免bug
177
-          });
178
-          break;
174
+          error.message = `未授权,请登录(401):${error.response.config.url}`
175
+          store.dispatch('FedLogOut').then(() => {
176
+            location.reload() // 为了重新实例化vue-router对象 避免bug
177
+          })
178
+          break
179 179
 
180 180
         case 403:
181
-          error.message = `拒绝访问(403):${error.response.config.url}`;
182
-          break;
181
+          error.message = `拒绝访问(403):${error.response.config.url}`
182
+          break
183 183
 
184 184
         case 404:
185
-          error.message = `请求地址出错(404): ${error.response.config.url}`;
186
-          break;
185
+          error.message = `请求地址出错(404): ${error.response.config.url}`
186
+          break
187 187
 
188 188
         case 408:
189
-          error.message = `请求超时(408):${error.response.config.url}`;
190
-          break;
189
+          error.message = `请求超时(408):${error.response.config.url}`
190
+          break
191 191
 
192 192
         case 500:
193
-          error.message = `服务器内部错误(500):${error.response.config.url}`;
194
-          break;
193
+          error.message = `服务器内部错误(500):${error.response.config.url}`
194
+          break
195 195
 
196 196
         case 501:
197
-          error.message = `服务未实现(501):${error.response.config.url}`;
198
-          break;
197
+          error.message = `服务未实现(501):${error.response.config.url}`
198
+          break
199 199
 
200 200
         case 502:
201
-          error.message = `网关错误(502):${error.response.config.url}`;
202
-          break;
201
+          error.message = `网关错误(502):${error.response.config.url}`
202
+          break
203 203
 
204 204
         case 503:
205
-          error.message = `服务不可用(503):${error.response.config.url}`;
206
-          break;
205
+          error.message = `服务不可用(503):${error.response.config.url}`
206
+          break
207 207
 
208 208
         case 504:
209
-          error.message = `网关超时(504):${error.response.config.url}`;
210
-          break;
209
+          error.message = `网关超时(504):${error.response.config.url}`
210
+          break
211 211
 
212 212
         case 505:
213
-          error.message = `HTTP版本不受支持(505):${error.response.config.url}`;
214
-          break;
213
+          error.message = `HTTP版本不受支持(505):${error.response.config.url}`
214
+          break
215 215
 
216 216
         default:
217
-          error.message = `连接错误:${error.response.status}`;
218
-          break;
217
+          error.message = `连接错误:${error.response.status}`
218
+          break
219 219
       }
220
-    } else if (error.message.indexOf("请求被中断") !== -1) {
221
-      error.message = "请勿重复请求!";
220
+    } else if (error.message.indexOf('请求被中断') !== -1) {
221
+      error.message = '请勿重复请求!'
222 222
     } else {
223
-      error.message = "网络出现问题,请稍后重试!";
223
+      error.message = '网络出现问题,请稍后重试!'
224 224
     }
225 225
     Message({
226 226
       message: error.message,
227
-      type: "error",
227
+      type: 'error',
228 228
       duration: 5 * 1000
229
-    });
230
-    return Promise.reject(error);
229
+    })
230
+    return Promise.reject(error)
231 231
   }
232
-);
232
+)
233 233
 
234
-export default service;
234
+export default service

+ 98 - 100
CallCenterWeb.UI/RMYY/src/views/dashboard/index.vue

@@ -19,7 +19,7 @@
19 19
                 <span>呼入总数:{{ callInTotal }}</span>
20 20
               </div>
21 21
               <div>
22
-                <label class="answer">{{ answersNum }}<br />接听数</label>
22
+                <label class="answer">{{ answersNum }}<br >接听数</label>
23 23
               </div>
24 24
             </div>
25 25
             <div class="telTime">
@@ -34,7 +34,7 @@
34 34
                 <span>外呼总数:{{ calOutTotal }}</span>
35 35
               </div>
36 36
               <div>
37
-                <label class="answer">{{ ConnectNum }}<br />接通数</label>
37
+                <label class="answer">{{ ConnectNum }}<br >接通数</label>
38 38
               </div>
39 39
             </div>
40 40
             <div class="telTime">
@@ -50,7 +50,7 @@
50 50
           <span>实时统计</span>
51 51
         </div>
52 52
         <div class="pending">
53
-          <img src="../../assets/imgs/cl.png" alt="" class="cl" />
53
+          <img src="../../assets/imgs/cl.png" alt="" class="cl" >
54 54
           <span>后台排队:{{ waitcountNumber }}</span>
55 55
         </div>
56 56
       </el-col>
@@ -64,22 +64,22 @@
64 64
         </div>
65 65
         <ul class="centerPart">
66 66
           <li>
67
-            <img src="../../assets/imgs/pd.png" alt="" />
67
+            <img src="../../assets/imgs/pd.png" alt="" >
68 68
             <div style="margin: 8px 0">待处理</div>
69 69
             <div>{{ dealOrder }}</div>
70 70
           </li>
71 71
           <li>
72
-            <img src="../../assets/imgs/pd.png" alt="" />
72
+            <img src="../../assets/imgs/pd.png" alt="" >
73 73
             <div style="margin: 8px 0">待派工</div>
74 74
             <div>{{ dispatch }}</div>
75 75
           </li>
76 76
           <li>
77
-            <img src="../../assets/imgs/pd.png" alt="" />
77
+            <img src="../../assets/imgs/pd.png" alt="" >
78 78
             <div style="margin: 8px 0">待完工</div>
79 79
             <div>{{ finish }}</div>
80 80
           </li>
81 81
           <li>
82
-            <img src="../../assets/imgs/pd.png" alt="" />
82
+            <img src="../../assets/imgs/pd.png" alt="" >
83 83
             <div style="margin: 8px 0">待评价</div>
84 84
             <div>{{ evaluate }}</div>
85 85
           </li>
@@ -92,18 +92,17 @@
92 92
           <span
93 93
             style="float: right; color: #4a5064; cursor: pointer"
94 94
             @click="goseeMore()"
95
-            >查看更多>></span
95
+          >查看更多>></span
96 96
           >
97 97
         </div>
98 98
         <div class="notices">
99 99
           <p v-for="(item, index) in noticeData" :key="index">
100
-            <span class="circle"></span
101
-            ><a @click="btn_see(item.F_NoticeId)">{{
100
+            <span class="circle"/><a @click="btn_see(item.F_NoticeId)">{{
102 101
               item.F_Title.length > 20
103 102
                 ? item.F_Title.substring(0, 20) + "..."
104 103
                 : item.F_Title
105 104
             }}</a>
106
-            <span style="color: #555; font-size: 15px">{{
105
+            <span style="color: #555; font-size: 15px;float:right;">{{
107 106
               item.F_CreateOn
108 107
             }}</span>
109 108
           </p>
@@ -144,68 +143,67 @@
144 143
 </template>
145 144
 
146 145
 <script>
147
-import { mapGetters } from "vuex";
148
-import { getOneIndex, getTelCount, GetListTop } from "@/api/dashboard";
149
-import FinishOrder from "./finishOrder";
150
-import NoticeDetail from "../AnnounceManagement/Notice/components/detail.vue";
146
+import { mapGetters } from 'vuex'
147
+import { getOneIndex, getTelCount, GetListTop } from '@/api/dashboard'
148
+import FinishOrder from './finishOrder'
149
+import NoticeDetail from '../AnnounceManagement/Notice/components/detail.vue'
151 150
 export default {
152
-  name: "Dashboard",
151
+  name: 'Dashboard',
153 152
   components: {
154
-    FinishOrder,
153
+    FinishOrder
155 154
   },
156 155
   data() {
157 156
     return {
158 157
       finishOrder: {
159
-        jkzxfinishcount: "",
160
-        wpzjzxcount: "",
161
-        jtyysmcount: "",
162
-        jmzgwhcount: "",
163
-        zhallcount: "",
164
-        wobxcount: "",
165
-        sbzldevcount: "",
166
-        clddcarcount: "",
158
+        jkzxfinishcount: '',
159
+        wpzjzxcount: '',
160
+        jtyysmcount: '',
161
+        jmzgwhcount: '',
162
+        zhallcount: '',
163
+        wobxcount: '',
164
+        sbzldevcount: '',
165
+        clddcarcount: ''
167 166
       },
168
-      activeName: "0",
169
-      timeDate: "",
170
-      callInTotal: "",
171
-      answersNum: "",
172
-      totalCallInTime: "",
173
-      averageCallInTime: "",
174
-      calOutTotal: "",
175
-      ConnectNum: "",
176
-      totalCallOutTime: "",
177
-      averageCallOutTime: "",
178
-      dealOrder: "",
179
-      dispatch: "",
180
-      finish: "",
181
-      evaluate: "",
167
+      activeName: '0',
168
+      timeDate: '',
169
+      callInTotal: '',
170
+      answersNum: '',
171
+      totalCallInTime: '',
172
+      averageCallInTime: '',
173
+      calOutTotal: '',
174
+      ConnectNum: '',
175
+      totalCallOutTime: '',
176
+      averageCallOutTime: '',
177
+      dealOrder: '',
178
+      dispatch: '',
179
+      finish: '',
180
+      evaluate: '',
182 181
       noticeData: [],
183
-      isNotice: "1",
184
-    };
182
+      isNotice: '1'
183
+    }
185 184
   },
186
-  computed: {},
187 185
   computed: {
188 186
     ...mapGetters([
189
-      "waitcountNumber", // 工号
190
-    ]),
187
+      'waitcountNumber' // 工号
188
+    ])
191 189
   },
192 190
   created() {
193
-    this.getTelInfor();
194
-    this.getInfor();
195
-    this.getNotice();
191
+    this.getTelInfor()
192
+    this.getInfor()
193
+    this.getNotice()
196 194
   },
197 195
   mounted() {},
198 196
   methods: {
199 197
     getNotice() {
200 198
       return new Promise((resolve) => {
201 199
         const params = {
202
-          top: 4,
203
-        };
200
+          top: 4
201
+        }
204 202
         GetListTop(params).then((response) => {
205
-          this.noticeData = response.rows;
206
-        });
207
-        resolve();
208
-      });
203
+          this.noticeData = response.rows
204
+        })
205
+        resolve()
206
+      })
209 207
     },
210 208
     btn_see(rowdata) {
211 209
       this.$layer.iframe({
@@ -213,75 +211,75 @@ export default {
213 211
           content: NoticeDetail, // 传递的组件对象
214 212
           parent: this, // 当前的vue对象
215 213
           data: {
216
-            rowdata: rowdata.toString(),
217
-          }, // props
214
+            rowdata: rowdata.toString()
215
+          } // props
218 216
         },
219
-        area: ["70%", "70%"],
220
-        title: "公告详情",
221
-      });
217
+        area: ['70%', '70%'],
218
+        title: '公告详情'
219
+      })
222 220
     },
223 221
     goseeMore() {
224 222
       this.$router.push({
225
-        name: "Notice",
223
+        name: 'Notice',
226 224
         params: {
227
-          isNotice: this.isNotice,
228
-        },
229
-      });
225
+          isNotice: this.isNotice
226
+        }
227
+      })
230 228
     },
231 229
     initInfor() {
232
-      this.getTelInfor();
233
-      this.getInfor();
230
+      this.getTelInfor()
231
+      this.getInfor()
234 232
     },
235 233
     initTime() {
236
-      console.log(11);
237
-      this.getInfor();
234
+      console.log(11)
235
+      this.getInfor()
238 236
     },
239 237
     handleClick(tab) {
240
-      this.activeName = tab.name;
241
-      this.getInfor();
238
+      this.activeName = tab.name
239
+      this.getInfor()
242 240
     },
243 241
     getInfor() {
244 242
       return new Promise((resolve) => {
245 243
         const params = {
246 244
           isweek: this.activeName,
247 245
           stime: this.timeDate && this.timeDate[0],
248
-          etime: this.timeDate && this.timeDate[1],
249
-        };
246
+          etime: this.timeDate && this.timeDate[1]
247
+        }
250 248
         getOneIndex(params).then((response) => {
251
-          this.dealOrder = response.data.dclallcount;
252
-          this.dispatch = response.data.dpgallcount;
253
-          this.finish = response.data.dwgallcount;
254
-          this.evaluate = response.data.dpjallcount;
255
-          this.finishOrder.jkzxfinishcount = response.data.jkzxfinishcount;
256
-          this.finishOrder.wpzjzxcount = response.data.wpzjzxcount;
257
-          this.finishOrder.jtyysmcount = response.data.jtyysmcount;
258
-          this.finishOrder.jmzgwhcount = response.data.jmzgwhcount;
259
-          this.finishOrder.zhallcount = response.data.zhallcount;
260
-          this.finishOrder.wobxcount = response.data.wobxcount;
261
-          this.finishOrder.sbzldevcount = response.data.sbzldevcount;
262
-          this.finishOrder.clddcarcount = response.data.clddcarcount;
263
-        });
264
-        resolve();
265
-      });
249
+          this.dealOrder = response.data.dclallcount
250
+          this.dispatch = response.data.dpgallcount
251
+          this.finish = response.data.dwgallcount
252
+          this.evaluate = response.data.dpjallcount
253
+          this.finishOrder.jkzxfinishcount = response.data.jkzxfinishcount
254
+          this.finishOrder.wpzjzxcount = response.data.wpzjzxcount
255
+          this.finishOrder.jtyysmcount = response.data.jtyysmcount
256
+          this.finishOrder.jmzgwhcount = response.data.jmzgwhcount
257
+          this.finishOrder.zhallcount = response.data.zhallcount
258
+          this.finishOrder.wobxcount = response.data.wobxcount
259
+          this.finishOrder.sbzldevcount = response.data.sbzldevcount
260
+          this.finishOrder.clddcarcount = response.data.clddcarcount
261
+        })
262
+        resolve()
263
+      })
266 264
     },
267 265
     getTelInfor() {
268 266
       return new Promise((resolve) => {
269
-        const params = {};
267
+        const params = {}
270 268
         getTelCount(params).then((response) => {
271
-          this.callInTotal = response.dayin.count;
272
-          this.answersNum = response.jtconin;
273
-          this.totalCallInTime = response.thtimesin;
274
-          this.averageCallInTime = response.pjthtimesin;
275
-          this.calOutTotal = response.dayout.count;
276
-          this.ConnectNum = response.jtconout;
277
-          this.totalCallOutTime = response.thtimesout;
278
-          this.averageCallOutTime = response.pjthtimesout;
279
-        });
280
-        resolve();
281
-      });
282
-    },
283
-  },
284
-};
269
+          this.callInTotal = response.dayin.count
270
+          this.answersNum = response.jtconin
271
+          this.totalCallInTime = response.thtimesin
272
+          this.averageCallInTime = response.pjthtimesin
273
+          this.calOutTotal = response.dayout.count
274
+          this.ConnectNum = response.jtconout
275
+          this.totalCallOutTime = response.thtimesout
276
+          this.averageCallOutTime = response.pjthtimesout
277
+        })
278
+        resolve()
279
+      })
280
+    }
281
+  }
282
+}
285 283
 </script>
286 284
 
287 285
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 4 - 18
CallCenterWeb.UI/RMYY/src/views/orderManage/addWorkOrder/index.vue

@@ -6,7 +6,7 @@
6 6
         <div style="margin-bottom: 10px;">
7 7
           <div class="msgbox"/><span style="line-height: 30px;font-size: 14px;color: #333;">新建工单</span>
8 8
         </div>
9
-        <add-or-edit-order :iswomanage="'1'" :callid="callinCallid" :fid="fid" @order-type-data="getOrderTypeData" />
9
+        <add-or-edit-order :iswomanage="'1'" :callid="callinCallid" :source="source" :fid="fid" @order-type-data="getOrderTypeData" />
10 10
       </el-col>
11 11
     </el-row>
12 12
   </div>
@@ -16,14 +16,6 @@
16 16
 import {
17 17
   mapGetters
18 18
 } from 'vuex'
19
-
20
-  // 此处引用的是黑名单管理的添加视图
21
-import AddressNumber from '../../callScreen/components/AddressNumber'
22
-import AddOrEditCustomer from '../../callScreen/components/AddOrEditCustomer'
23
-import AddOrEditDept from '../../callScreen/components/AddOrEditDept'
24
-import CallList from '../../callScreen/components/CallList'
25
-import OrderList from '../../callScreen/components/OrderList'
26
-import KnowledgeList from '../../callScreen/components/KnowledgeList'
27 19
 import AddOrEditOrder from '../../callScreen/components/AddOrEditOrder'
28 20
 import {
29 21
   GetUserInfoByPhone
@@ -31,12 +23,6 @@ import {
31 23
 export default {
32 24
   name: 'CallScreenComponent',
33 25
   components: {
34
-    CallList,
35
-    OrderList,
36
-    AddressNumber,
37
-    AddOrEditCustomer,
38
-    AddOrEditDept,
39
-    KnowledgeList,
40 26
     AddOrEditOrder
41 27
   },
42 28
   props: {
@@ -56,13 +42,14 @@ export default {
56 42
   data() {
57 43
     return {
58 44
       orderTypeData: {
59
-        F_Type1: 1000, // 工单类别
60
-        F_TypeName1: '业务咨询', // 工单类别
45
+        F_Type1: 2000, // 工单类别
46
+        F_TypeName1: '综合调度', // 工单类别
61 47
         F_Type2: 0, // 工单子类
62 48
         F_TypeName2: '', // 工单子类
63 49
         F_Type3: 0, // 工单三类
64 50
         F_TypeName3: '' // 工单三类
65 51
       },
52
+      source: 'cjgd',
66 53
       phoneData: '', // 归属地
67 54
       // 咨询类型级联
68 55
       activeName: 'first', // tab切换默认显示来电历史工单
@@ -146,7 +133,6 @@ export default {
146 133
     },
147 134
     getOrderTypeData(data) {
148 135
       this.orderTypeData = data
149
-      // console.log(data,'88888888888888')
150 136
     },
151 137
     // 根据来电号码获取客户信息或者部门信息
152 138
     getUserInfor() {

+ 1 - 1
CallCenterWeb.UI/RMYY/src/views/systemSetup/roleSetting/menuSetup/iconDatas.js

@@ -101,7 +101,7 @@ export const iconDatas = [{
101 101
   'value': 'gonggaoguanli',
102 102
   'label': '公告管理'
103 103
 }, {
104
-  'value': 'tongxunlu1',
104
+  'value': 'tongxunlu',
105 105
   'label': '通讯录'
106 106
 }, {
107 107
   'value': 'cheliangguanli',

+ 137 - 134
CallCenterWeb.UI/RMYY/src/views/trafficData/callRecord/index.vue

@@ -96,7 +96,7 @@
96 96
               margin-left: 5px;
97 97
               cursor: pointer;
98 98
             "
99
-            @click="oncall(scope.row.CallNumber, scope.row.CallRecordsId)"
99
+            @click="oncall(scope.row, scope.$index)"
100 100
           />
101 101
         </template>
102 102
       </el-table-column>
@@ -223,144 +223,144 @@ import {
223 223
   getCallRecords,
224 224
   getCallOutprefix,
225 225
   getListExpt,
226
-  getUpdateCallRecord,
227
-} from "@/api/trafficData/trafficData";
228
-import { Send } from "@/utils/telWebsocket";
229
-import fieldDATA from "@/utils/fieldsData.js";
230
-import { GetFiledState, AddFiled } from "@/api/commonAPI";
231
-import addDefinedList from "@/components/context/addDefinedList";
232
-import audioPlayer from "@/components/context/audioPlayer";
233
-import { pickerOptions } from "@/utils";
234
-import { exportExcel } from "@/utils";
235
-import Pagination from "@/components/context/Pagination"; // 对el-pagination 二次封装
236
-import store from "@/store";
237
-import { mapGetters } from "vuex";
226
+  getUpdateCallRecord
227
+} from '@/api/trafficData/trafficData'
228
+import { Send } from '@/utils/telWebsocket'
229
+import fieldDATA from '@/utils/fieldsData.js'
230
+import { GetFiledState, AddFiled } from '@/api/commonAPI'
231
+import addDefinedList from '@/components/context/addDefinedList'
232
+import audioPlayer from '@/components/context/audioPlayer'
233
+import { pickerOptions } from '@/utils'
234
+import { exportExcel } from '@/utils'
235
+import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
236
+import store from '@/store'
237
+import { mapGetters } from 'vuex'
238 238
 export default {
239
-  name: "CallRecord",
239
+  name: 'CallRecord',
240 240
   components: {
241
-    Pagination,
241
+    Pagination
242 242
   },
243 243
   filters: {
244 244
     // 呼叫类型
245 245
     calltypeFilter(status) {
246 246
       const statusMap = {
247
-        0: "呼入",
248
-        1: "呼出",
249
-      };
250
-      return statusMap[status];
247
+        0: '呼入',
248
+        1: '呼出'
249
+      }
250
+      return statusMap[status]
251 251
     },
252 252
     // 呼叫状态
253 253
     statusFilter(status) {
254 254
       const statusMap = {
255
-        0: "未接通",
256
-        1: "已接通",
257
-      };
258
-      return statusMap[status];
255
+        0: '未接通',
256
+        1: '已接通'
257
+      }
258
+      return statusMap[status]
259 259
     },
260 260
     // 外呼类型
261 261
     callopttypeFilter(status) {
262 262
       const statusMap = {
263
-        0: "拨号外呼",
264
-        1: "回访外呼",
265
-      };
266
-      return statusMap[status];
263
+        0: '拨号外呼',
264
+        1: '回访外呼'
265
+      }
266
+      return statusMap[status]
267 267
     },
268 268
     // 满意度
269 269
     evaluationFilter(status) {
270 270
       const statusMap = {
271
-        0: "-",
272
-        1: "非常满意",
273
-        2: "基本满意",
274
-        3: "不满意",
275
-      };
276
-      return statusMap[status];
271
+        0: '-',
272
+        1: '非常满意',
273
+        2: '基本满意',
274
+        3: '不满意'
275
+      }
276
+      return statusMap[status]
277 277
     },
278 278
     // 时间格式化
279 279
     timesFilter(tm) {
280
-      if (tm === "1970-01-01 08:00:00") {
281
-        return "-";
280
+      if (tm === '1970-01-01 08:00:00') {
281
+        return '-'
282 282
       } else {
283
-        return tm;
283
+        return tm
284 284
       }
285 285
     },
286 286
     // 是否回访
287 287
     isReturnvisitFilter(status) {
288 288
       const statusMap = {
289
-        0: "未回访",
290
-        1: "已回访",
291
-      };
292
-      return statusMap[status];
293
-    },
289
+        0: '未回访',
290
+        1: '已回访'
291
+      }
292
+      return statusMap[status]
293
+    }
294 294
   },
295 295
   data() {
296 296
     return {
297 297
       loading: false,
298
-      keyword: "",
299
-      roleId: "",
300
-      CallType: "", // 呼叫类型
301
-      CallState: "", // 呼叫状态
302
-      searchDate: "",
298
+      keyword: '',
299
+      roleId: '',
300
+      CallType: '', // 呼叫类型
301
+      CallState: '', // 呼叫状态
302
+      searchDate: '',
303 303
       pickerOptions,
304
-      timer: "",
305
-      recordpath: "", // 录音的路径
304
+      timer: '',
305
+      recordpath: '', // 录音的路径
306 306
       fieldListFlag: {},
307 307
       pageParams: {
308 308
         pageindex: 1, // 当前第几页
309 309
         pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
310
-        total: 0, // 总共多少数据
310
+        total: 0 // 总共多少数据
311 311
       },
312 312
       dataLists: [], // 列表数据
313
-      multipleSelection: [], // 选中数据
314
-    };
313
+      multipleSelection: [] // 选中数据
314
+    }
315 315
   },
316 316
   computed: {
317 317
     ...mapGetters([
318
-      "token",
319
-      "usercode", // 工号
320
-      "extension", // 分机号
321
-      "telIsVisCallout", // 外呼面板是否显示
322
-    ]),
318
+      'token',
319
+      'usercode', // 工号
320
+      'extension', // 分机号
321
+      'telIsVisCallout' // 外呼面板是否显示
322
+    ])
323 323
   },
324 324
   created() {
325
-    this.getFiledTabDetail(this.$route.path.split("/").join("_"));
326
-    this.getList();
325
+    this.getFiledTabDetail(this.$route.path.split('/').join('_'))
326
+    this.getList()
327 327
     document.onkeyup = (e) => {
328 328
       if (e.keyCode === 13) {
329
-        this.getList();
329
+        this.getList()
330 330
       }
331
-    };
331
+    }
332 332
   },
333 333
   mounted() {
334 334
     this.timer = setInterval(() => {
335
-      this.getList();
336
-    }, 12000);
335
+      this.getList()
336
+    }, 12000)
337 337
   },
338 338
   methods: {
339 339
     getList() {
340
-      this.loading = true;
340
+      this.loading = true
341 341
       return new Promise((resolve) => {
342 342
         const params = {
343 343
           page: this.pageParams.pageindex, // 第几页
344 344
           pagesize: this.pageParams.pagesize, // 每页几条信息
345
-          phone: this.keyword.replace(/\s*/g, ""), //	否	string	模糊查询(呼叫号码)
345
+          phone: this.keyword.replace(/\s*/g, ''), //	否	string	模糊查询(呼叫号码)
346 346
           usercode: this.roleId, //	否	string	模糊查询(呼叫号码) CallNumber
347
-          calltype: this.CallType == null ? "" : this.CallType, // 呼叫类型
347
+          calltype: this.CallType == null ? '' : this.CallType, // 呼叫类型
348 348
           callstate: this.CallState, // 呼叫状态
349 349
           starttime: this.searchDate && this.searchDate[0],
350
-          endtime: this.searchDate && this.searchDate[1],
351
-        };
350
+          endtime: this.searchDate && this.searchDate[1]
351
+        }
352 352
         getCallRecords(params).then((response) => {
353
-          this.loading = false;
354
-          if (response.state.toLowerCase() === "success") {
355
-            this.pageParams.total = response.total;
356
-            this.dataLists = response.rows;
353
+          this.loading = false
354
+          if (response.state.toLowerCase() === 'success') {
355
+            this.pageParams.total = response.total
356
+            this.dataLists = response.rows
357 357
           }
358
-        });
359
-        resolve();
360
-      });
358
+        })
359
+        resolve()
360
+      })
361 361
     },
362 362
     btn_search() {
363
-      this.getList();
363
+      this.getList()
364 364
     },
365 365
     btn_add_list() {
366 366
       this.$layer.iframe({
@@ -368,120 +368,123 @@ export default {
368 368
           content: addDefinedList, // 传递的组件对象
369 369
           parent: this, // 当前的vue对象
370 370
           data: {
371
-            definedId: this.$route.path,
372
-          }, // props
371
+            definedId: this.$route.path
372
+          } // props
373 373
         },
374
-        area: ["70%", "30%"],
375
-        title: "自定义字段",
376
-      });
374
+        area: ['70%', '30%'],
375
+        title: '自定义字段'
376
+      })
377 377
     },
378 378
     getFiledTabDetail(TableId) {
379 379
       GetFiledState(TableId).then((res) => {
380 380
         if (res.F_Fileds) {
381
-          this.fieldListFlag = fieldDATA.getFieldListFlag(res.F_Fileds);
382
-          this.$refs["multipleTable"].doLayout();
381
+          this.fieldListFlag = fieldDATA.getFieldListFlag(res.F_Fileds)
382
+          this.$refs['multipleTable'].doLayout()
383 383
         } else {
384
-          const Fileds = fieldDATA.getOptionsValue(fieldDATA[TableId]);
384
+          const Fileds = fieldDATA.getOptionsValue(fieldDATA[TableId])
385 385
           AddFiled({ TableId, Fileds })
386 386
             .then((response) => {
387
-              if (response.state.toLowerCase() === "success") {
388
-                this.getFiledTabDetail(TableId);
387
+              if (response.state.toLowerCase() === 'success') {
388
+                this.getFiledTabDetail(TableId)
389 389
               }
390 390
             })
391 391
             .catch(() => {
392
-              this.loading = false;
393
-            });
392
+              this.loading = false
393
+            })
394 394
         }
395
-      });
395
+      })
396 396
     },
397 397
 
398
-    oncall(phone, callid) {
398
+    oncall(callLogInfo, index) {
399 399
       const pas = {
400
-        id: callid,
401
-      };
400
+        id: callLogInfo.CallRecordsId
401
+      }
402 402
       getUpdateCallRecord(pas).then((response) => {
403
-        if (response.state.toLowerCase() === "success") {
403
+        if (response.state.toLowerCase() === 'success') {
404
+          if (callLogInfo.Showstate !== '已回复') {
405
+            this.dataLists[index].Showstate = '已回复'
406
+          }
404 407
         }
405
-      });
408
+      })
406 409
       const params = {
407
-        phone: phone,
408
-      };
410
+        phone: callLogInfo.CallNumber
411
+      }
409 412
       getCallOutprefix(params).then((response) => {
410
-        if (response.state.toLowerCase() === "success") {
413
+        if (response.state.toLowerCase() === 'success') {
411 414
           const scoketDatas = {
412
-            Type: "MakeCall",
413
-            AgentID: localStorage.getItem("storageUsercode"),
414
-            AgentExten: localStorage.getItem("ext"),
415
+            Type: 'MakeCall',
416
+            AgentID: localStorage.getItem('storageUsercode'),
417
+            AgentExten: localStorage.getItem('ext'),
415 418
             Header: response.data.fix,
416
-            DestinationNumber: response.data.phone,
417
-          };
418
-          Send(scoketDatas);
419
+            DestinationNumber: response.data.phone
420
+          }
421
+          Send(scoketDatas)
419 422
         }
420
-      });
423
+      })
421 424
     },
422 425
     // 导出
423 426
     btn_export() {
424 427
       const exportparams = {
425 428
         pageindex: this.pageParams.pageindex,
426 429
         pagesize: this.pageParams.pagesize,
427
-        phone: this.keyword.replace(/\s+/g, ""),
430
+        phone: this.keyword.replace(/\s+/g, ''),
428 431
         usercode: this.roleId,
429
-        calltype: this.CallType == null ? "" : this.CallType,
432
+        calltype: this.CallType == null ? '' : this.CallType,
430 433
         callstate: this.CallState,
431 434
         starttime: this.searchDate && this.searchDate[0],
432 435
         endtime: this.searchDate && this.searchDate[1],
433
-        isdc: 1,
434
-      };
435
-      exportExcel(exportparams, getListExpt);
436
+        isdc: 1
437
+      }
438
+      exportExcel(exportparams, getListExpt)
436 439
     },
437 440
     // 播放录音
438 441
     playSound(rec_file, artist) {
439
-      console.log("artist", artist);
442
+      console.log('artist', artist)
440 443
       this.$layer.iframe({
441 444
         content: {
442 445
           content: audioPlayer, // 传递的组件对象
443 446
           parent: this, // 当前的vue对象
444 447
           data: {
445 448
             recFiles: rec_file,
446
-            artists: artist.toString(),
447
-          }, // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
449
+            artists: artist.toString()
450
+          } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
448 451
         },
449
-        area: ["600px", "230px"],
452
+        area: ['600px', '230px'],
450 453
         shadeClose: true,
451
-        title: "录音详情",
452
-      });
454
+        title: '录音详情'
455
+      })
453 456
     },
454 457
     handleSelectionChange(selection) {
455
-      this.multipleSelection = selection;
458
+      this.multipleSelection = selection
456 459
     },
457 460
     formtTime(val) {
458 461
       if (!val) {
459
-        return "0秒";
462
+        return '0秒'
460 463
       }
461
-      var secondTime = parseInt(val);
462
-      var minuteTime = 0;
463
-      var hourTime = 0;
464
+      var secondTime = parseInt(val)
465
+      var minuteTime = 0
466
+      var hourTime = 0
464 467
       if (secondTime > 60) {
465
-        minuteTime = parseInt(secondTime / 60);
466
-        secondTime = parseInt(secondTime % 60);
468
+        minuteTime = parseInt(secondTime / 60)
469
+        secondTime = parseInt(secondTime % 60)
467 470
         if (minuteTime > 60) {
468
-          hourTime = parseInt(minuteTime / 60);
469
-          minuteTime = parseInt(minuteTime % 60);
471
+          hourTime = parseInt(minuteTime / 60)
472
+          minuteTime = parseInt(minuteTime % 60)
470 473
         }
471 474
       }
472
-      var result = "" + parseInt(secondTime) + "秒";
475
+      var result = '' + parseInt(secondTime) + '秒'
473 476
       if (minuteTime > 0) {
474
-        result = "" + parseInt(minuteTime) + "分" + result;
477
+        result = '' + parseInt(minuteTime) + '分' + result
475 478
       }
476 479
       if (hourTime > 0) {
477
-        result = "" + parseInt(hourTime) + "小时" + result;
480
+        result = '' + parseInt(hourTime) + '小时' + result
478 481
       }
479
-      return result;
482
+      return result
480 483
     },
481 484
 
482 485
     // 外呼
483 486
     clickCallOut(phoneNumber, id) {
484
-      this.callOut(phoneNumber, id);
487
+      this.callOut(phoneNumber, id)
485 488
     },
486 489
     // 外呼
487 490
     callOut(phoneNumber, id) {
@@ -504,13 +507,13 @@ export default {
504 507
         // })
505 508
       } else {
506 509
         this.$message({
507
-          message: "请先输入电话号码!",
508
-          type: "warning",
509
-        });
510
+          message: '请先输入电话号码!',
511
+          type: 'warning'
512
+        })
510 513
       }
511
-    },
512
-  },
513
-};
514
+    }
515
+  }
516
+}
514 517
 </script>
515 518
 
516 519
 <style rel="stylesheet/scss" lang="scss" scoped>