weieryang %!s(int64=2) %!d(string=před) roky
rodič
revize
611d801490

File diff suppressed because it is too large
+ 443 - 441
CallCenterWeb.UI/RMYY/src/components/workOrder/dispatching/addOrEditDispatch.vue


File diff suppressed because it is too large
+ 373 - 374
CallCenterWeb.UI/RMYY/src/components/workOrder/information/addOrEditInfOrder.vue


File diff suppressed because it is too large
+ 334 - 328
CallCenterWeb.UI/RMYY/src/components/workOrder/repairbase/addRepairbase.vue


+ 250 - 250
CallCenterWeb.UI/RMYY/src/components/workOrder/vehicleDispatch/addOrEdit.vue

@@ -111,8 +111,7 @@
111 111
                   :key="index"
112 112
                   :label="item.T_Woname"
113 113
                   :value="item.T_Woname"
114
-                >
115
-                </el-option>
114
+                />
116 115
               </el-select>
117 116
             </el-form-item>
118 117
           </el-col>
@@ -181,103 +180,104 @@ import {
181 180
   // getList,
182 181
   getModelDetail,
183 182
   getAddWorkOrder,
184
-  getUpdateWorkOrder,
185
-} from "@/api/vehicleDispatch/vehicleScheduling.js";
186
-import { getOrderTypeList } from "@/api/commonAPI.js";
183
+  getUpdateWorkOrder
184
+} from '@/api/vehicleDispatch/vehicleScheduling.js'
185
+import { getOrderTypeList } from '@/api/commonAPI.js'
187 186
 // import selectDeptTree from '@/components/context/commonSelect/selectDeptTree.vue'
188
-import { getUserMsg } from "@/api/orderManagement/orderList";
189
-import { getCartype } from "@/api/vehicleDispatch/vehicleManagement";
190
-import { GetPerson } from "@/api/commonAPI";
191
-import { getTypeDetail } from "@/api/systemSetup/roleSetting/department";
192
-import { GetYuanqu } from "@/api/telCall/report";
193
-import { Send, ws } from "../../../utils/telWebsocket.js";
194
-import { mapGetters } from "vuex";
187
+import { getUserMsg } from '@/api/orderManagement/orderList'
188
+import { getCartype } from '@/api/vehicleDispatch/vehicleManagement'
189
+import { GetPerson } from '@/api/commonAPI'
190
+import { getTypeDetail } from '@/api/systemSetup/roleSetting/department'
191
+import { GetYuanqu } from '@/api/telCall/report'
192
+import { Send, ws } from '../../../utils/telWebsocket.js'
193
+import { mapGetters } from 'vuex'
194
+import { encrypt, decrypt } from '@/utils/secretKey'
195 195
 export default {
196
-  name: "AddOrEdit",
196
+  name: 'AddOrEdit',
197 197
   props: {
198 198
     orderTypeData: {
199 199
       type: Object,
200 200
       default() {
201
-        return {};
202
-      },
201
+        return {}
202
+      }
203 203
     },
204 204
     callid: {
205 205
       type: String,
206
-      default: "",
206
+      default: ''
207 207
     },
208 208
     rowid: {
209 209
       type: String,
210
-      default: "",
210
+      default: ''
211 211
     },
212 212
     wid: {
213 213
       type: String,
214
-      default: "",
214
+      default: ''
215 215
     },
216 216
     fid: {
217 217
       type: String,
218
-      default: "",
218
+      default: ''
219 219
     },
220 220
     wocode: {
221 221
       type: String,
222
-      default: "",
222
+      default: ''
223 223
     },
224 224
     layerid: {
225 225
       type: String,
226
-      default: "",
226
+      default: ''
227 227
     },
228 228
     iswomanage: {
229 229
       type: String,
230
-      default: "",
231
-    },
230
+      default: ''
231
+    }
232 232
   },
233 233
   data() {
234 234
     return {
235
-      worktypeInfo: "",
236
-      cid: "",
235
+      worktypeInfo: '',
236
+      cid: '',
237 237
       typeList: [],
238 238
       carArr: [],
239 239
       repairman: [], // 申请人数据
240 240
       yqarr: [],
241 241
       hospitalsParam: {
242 242
         id: 0,
243
-        name: "",
243
+        name: ''
244 244
       },
245 245
       departmentsParam: {
246 246
         id: 0,
247
-        name: "",
247
+        name: ''
248 248
       },
249 249
       repairmanParam: {
250 250
         id: 0,
251
-        name: "",
251
+        name: ''
252 252
       },
253 253
       rules: {
254 254
         type: [
255 255
           {
256 256
             required: true,
257
-            message: "请选择",
258
-            trigger: "change",
259
-          },
257
+            message: '请选择',
258
+            trigger: 'change'
259
+          }
260 260
         ],
261 261
         deptid: [
262 262
           {
263 263
             required: true,
264
-            message: "请选择",
265
-            trigger: "change",
266
-          },
264
+            message: '请选择',
265
+            trigger: 'change'
266
+          }
267 267
         ],
268 268
         needman: [
269 269
           {
270 270
             required: true,
271
-            message: "请选择",
272
-            trigger: "change",
273
-          },
271
+            message: '请选择',
272
+            trigger: 'change'
273
+          }
274 274
         ],
275 275
         cartype: [
276 276
           {
277 277
             required: true,
278
-            message: "请选择",
279
-            trigger: "change",
280
-          },
278
+            message: '请选择',
279
+            trigger: 'change'
280
+          }
281 281
         ],
282 282
         // usertime: [{
283 283
         //   type: 'string',
@@ -288,10 +288,10 @@ export default {
288 288
         phon: [
289 289
           {
290 290
             required: true,
291
-            trigger: "blur",
291
+            trigger: 'blur',
292 292
             // pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
293
-            message: "请输入电话号码",
294
-          },
293
+            message: '请输入电话号码'
294
+          }
295 295
           // {
296 296
           //   pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
297 297
           //   message: '请输入正确的电话号码或者固话号码',
@@ -302,32 +302,32 @@ export default {
302 302
         contact: [
303 303
           {
304 304
             required: true,
305
-            message: "请输入联系人",
306
-            trigger: "blur",
307
-          },
305
+            message: '请输入联系人',
306
+            trigger: 'blur'
307
+          }
308 308
         ],
309 309
         contactnumber: [
310 310
           {
311 311
             required: true,
312
-            trigger: "blur",
312
+            trigger: 'blur',
313 313
             // pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
314
-            message: "请输入电话号码",
315
-          },
314
+            message: '请输入电话号码'
315
+          }
316 316
         ],
317 317
         startplace: [
318 318
           {
319 319
             required: true,
320
-            message: "请输入",
321
-            trigger: "blur",
322
-          },
320
+            message: '请输入',
321
+            trigger: 'blur'
322
+          }
323 323
         ],
324 324
         endplace: [
325 325
           {
326 326
             required: true,
327
-            message: "请输入",
328
-            trigger: "blur",
329
-          },
330
-        ],
327
+            message: '请输入',
328
+            trigger: 'blur'
329
+          }
330
+        ]
331 331
         // content: [{
332 332
         //   required: true,
333 333
         //   message: '请输入',
@@ -335,187 +335,187 @@ export default {
335 335
         // }]
336 336
       },
337 337
       ruleForm: {
338
-        F_ID: "",
339
-        startplace: "",
340
-        endplace: "",
341
-        source: "",
342
-        hosid: "", // 院区id
343
-        hosname: "", // 院区id
344
-        deptid: "", // 申请科室id
345
-        deptname: "", // 申请科室名称
346
-        usercode: "", // 申请人编码
347
-        username: "", //	申请人
348
-        needman: "",
338
+        F_ID: '',
339
+        startplace: '',
340
+        endplace: '',
341
+        source: '',
342
+        hosid: '', // 院区id
343
+        hosname: '', // 院区id
344
+        deptid: '', // 申请科室id
345
+        deptname: '', // 申请科室名称
346
+        usercode: '', // 申请人编码
347
+        username: '', //	申请人
348
+        needman: '',
349 349
         birth: 1,
350
-        phon: "",
351
-        deptphone: "",
352
-        contact: "",
353
-        contactnumber: "",
354
-        type: "",
355
-        cartype: "",
356
-        F_CarMessage: "",
357
-        remark: "",
358
-        content: "",
359
-        EmergencyTypes: "一般",
350
+        phon: '',
351
+        deptphone: '',
352
+        contact: '',
353
+        contactnumber: '',
354
+        type: '',
355
+        cartype: '',
356
+        F_CarMessage: '',
357
+        remark: '',
358
+        content: '',
359
+        EmergencyTypes: '一般',
360 360
         type2Arr: [],
361
-        dispatch: "",
361
+        dispatch: ''
362 362
       },
363 363
       deptid: [],
364
-      usercodeSearch: "",
365
-      loading: false,
366
-    };
364
+      usercodeSearch: '',
365
+      loading: false
366
+    }
367 367
   },
368 368
   watch: {
369
-    "orderTypeData.F_Type2": function () {
370
-      console.log(this.orderTypeData.type2Arr);
371
-      this.ruleForm.type2Arr = this.orderTypeData.type2Arr;
369
+    'orderTypeData.F_Type2': function() {
370
+      console.log(this.orderTypeData.type2Arr)
371
+      this.ruleForm.type2Arr = this.orderTypeData.type2Arr
372 372
       this.worktypeInfo =
373 373
         this.$store.getters.workTypeMap[
374 374
           parseInt(this.orderTypeData.type2Arr[0])
375
-        ].tag || "";
376
-        console.log(this.worktypeInfo, "标识11");
375
+        ].tag || ''
376
+      console.log(this.worktypeInfo, '标识11')
377 377
       // this.ruleForm.F_Type2 = this.orderTypeData.F_Type2
378 378
       // this.ruleForm.identification = this.orderTypeData.identification
379
-    },
379
+    }
380 380
   },
381 381
   computed: {
382 382
     ...mapGetters([
383
-      "telTopRightState", // 状态信息
384
-    ]),
383
+      'telTopRightState' // 状态信息
384
+    ])
385 385
   },
386 386
   created() {
387
-    this.cid = this.callid;
387
+    this.cid = this.callid
388 388
     if (!this.cid) {
389
-      this.cid = window.localStorage.getItem("callidSave");
389
+      this.cid = window.localStorage.getItem('callidSave')
390 390
     }
391
-    this.getTypeOrder();
392
-    this.getCarlist();
393
-    this.getHos();
391
+    this.getTypeOrder()
392
+    this.getCarlist()
393
+    this.getHos()
394 394
     if (this.wocode) {
395
-      this.wocode = this.wocode;
396
-      this.getDetail("0");
395
+      this.wocode = this.wocode
396
+      this.getDetail('0')
397 397
     }
398 398
     if (this.wid) {
399
-      this.wocode = this.wid;
400
-      this.getDetail("0");
399
+      this.wocode = this.wid
400
+      this.getDetail('0')
401 401
     }
402
-    if (this.iswomanage === "1") {
403
-      this.usercodeSearch = window.localStorage.getItem("storageUsercode");
404
-      const dept = this.$store.getters.teamId;
405
-      this.deptid = this.$store.getters.deptmap[parseInt(dept)].ids;
406
-      this.ruleForm.hosid = this.$store.getters.deptmap[parseInt(dept)].ids[0];
407
-      this.ruleForm.deptid = dept;
408
-      this.getRepairman(dept);
409
-      this.getDeptAddress(dept);
410
-      this.ruleForm.needman = this.$store.getters.usercode;
411
-      this.ruleForm.phon = this.$store.getters.mobile;
412
-      this.ruleForm.startplace = this.$store.getters.location;
402
+    if (this.iswomanage === '1') {
403
+      this.usercodeSearch = window.localStorage.getItem('storageUsercode')
404
+      const dept = this.$store.getters.teamId
405
+      this.deptid = this.$store.getters.deptmap[parseInt(dept)].ids
406
+      this.ruleForm.hosid = this.$store.getters.deptmap[parseInt(dept)].ids[0]
407
+      this.ruleForm.deptid = dept
408
+      this.getRepairman(dept)
409
+      this.getDeptAddress(dept)
410
+      this.ruleForm.needman = this.$store.getters.usercode
411
+      this.ruleForm.phon = this.$store.getters.mobile
412
+      this.ruleForm.startplace = this.$store.getters.location
413 413
     }
414 414
     // this.getUserData()
415 415
   },
416 416
   methods: {
417 417
     getHos() {
418
-      const params = {};
418
+      const params = {}
419 419
       GetYuanqu(params).then((res) => {
420
-        this.yqarr = res.data;
421
-      });
420
+        this.yqarr = res.data
421
+      })
422 422
     },
423 423
     getUserData() {
424 424
       if (!this.usercodeSearch) {
425
-        return;
425
+        return
426 426
       }
427 427
       const params = {
428
-        usercode: this.usercodeSearch,
429
-      };
428
+        usercode: this.usercodeSearch
429
+      }
430 430
       getUserMsg(params).then((res) => {
431
-        const data = res.data;
432
-        this.ruleForm.deptid = data.F_DeptId;
433
-        this.deptid = this.$store.getters.deptmap[parseInt(data.F_DeptId)].ids;
431
+        const data = res.data
432
+        this.ruleForm.deptid = data.F_DeptId
433
+        this.deptid = this.$store.getters.deptmap[parseInt(data.F_DeptId)].ids
434 434
         this.ruleForm.hosid =
435
-          this.$store.getters.deptmap[parseInt(data.F_DeptId)].ids[0];
436
-        this.getRepairman(data.F_DeptId);
437
-        this.getDeptAddress(data.F_DeptId);
438
-        this.ruleForm.needman = data.F_UserCode;
439
-        this.ruleForm.phon = data.F_Telephone;
440
-        this.ruleForm.startplace = data.F_Location;
441
-      });
435
+          this.$store.getters.deptmap[parseInt(data.F_DeptId)].ids[0]
436
+        this.getRepairman(data.F_DeptId)
437
+        this.getDeptAddress(data.F_DeptId)
438
+        this.ruleForm.needman = data.F_UserCode
439
+        this.ruleForm.phon = data.F_Telephone ? decrypt(data.F_TelephoneShow) : ''
440
+        this.ruleForm.startplace = data.F_Location
441
+      })
442 442
     },
443 443
     // 获取申请人数据
444 444
     getRepairman(id) {
445 445
       return new Promise((resolve) => {
446 446
         const params = {
447
-          deptid: id, // 字典管理的工单标识
448
-        };
447
+          deptid: id // 字典管理的工单标识
448
+        }
449 449
         GetPerson(params).then((res) => {
450
-          this.repairman = res.rows;
451
-        });
452
-        resolve();
453
-      });
450
+          this.repairman = res.rows
451
+        })
452
+        resolve()
453
+      })
454 454
     },
455 455
     // 申请人
456 456
     changeRepairman(data) {
457
-      this.ruleForm.needman = data;
457
+      this.ruleForm.needman = data
458 458
       const user = this.repairman.find((o) => {
459
-        return o.usercode === data.toString();
460
-      });
459
+        return o.usercode === data.toString()
460
+      })
461 461
       if (user) {
462
-        this.ruleForm.phon = user.usertelphone;
462
+        this.ruleForm.phon = user.usertelphone
463 463
       }
464 464
     },
465 465
     getCarlist() {
466 466
       const params = {
467
-        Flag: "CLLX",
468
-        Name: "",
469
-      };
467
+        Flag: 'CLLX',
468
+        Name: ''
469
+      }
470 470
       getCartype(params).then((res) => {
471
-        this.carArr = res.rows;
472
-      });
471
+        this.carArr = res.rows
472
+      })
473 473
     },
474 474
     getTypeOrder() {
475 475
       const params = {
476 476
         pid: 2,
477
-        typeid: 4000,
478
-      };
477
+        typeid: 4000
478
+      }
479 479
       getOrderTypeList(params.pid, params.typeid).then((res) => {
480
-        this.typeList = res.rows;
481
-      });
480
+        this.typeList = res.rows
481
+      })
482 482
     },
483 483
     getDeptid(data) {
484
-      this.ruleForm.hosid = data[0];
485
-      this.ruleForm.deptid = data[data.length - 1];
486
-      this.deptid = data;
487
-      this.ruleForm.needman = "";
488
-      this.getRepairman(data[data.length - 1]);
489
-      this.getDeptAddress(data[data.length - 1]);
484
+      this.ruleForm.hosid = data[0]
485
+      this.ruleForm.deptid = data[data.length - 1]
486
+      this.deptid = data
487
+      this.ruleForm.needman = ''
488
+      this.getRepairman(data[data.length - 1])
489
+      this.getDeptAddress(data[data.length - 1])
490 490
     },
491 491
     getDeptAddress(id) {
492 492
       getTypeDetail(id).then((res) => {
493
-        this.ruleForm.startplace = res.data.F_Location;
494
-        this.ruleForm.deptphone = res.data.F_OfficeTelephone;
495
-      });
493
+        this.ruleForm.startplace = res.data.F_Location ? decrypt(res.data.F_LocationShow) : ''
494
+        this.ruleForm.deptphone = res.data.F_OfficeTelephone ? decrypt(res.data.F_OfficeTelephoneShow) : ''
495
+      })
496 496
     },
497 497
     submitForm() {
498
-      if (this.telTopRightState == "通话中") {
499
-        if (window.location.href.indexOf("callScreen") >= 0) {
500
-          this.$message("请挂断后再提交工单");
501
-          return;
498
+      if (this.telTopRightState == '通话中') {
499
+        if (window.location.href.indexOf('callScreen') >= 0) {
500
+          this.$message('请挂断后再提交工单')
501
+          return
502 502
         }
503 503
       }
504 504
       if (this.orderTypeData.type2Arr.length == 0 && !this.wid) {
505
-        this.$message.error("请选择工单类别");
506
-        return;
505
+        this.$message.error('请选择工单类别')
506
+        return
507 507
       }
508 508
       if (
509
-        this.worktypeInfo === "cldd_xsezy" &&
509
+        this.worktypeInfo === 'cldd_xsezy' &&
510 510
         this.ruleForm.birth === 0 &&
511
-        this.ruleForm.content === ""
511
+        this.ruleForm.content === ''
512 512
       ) {
513
-        this.$message.error("填写工单内容");
514
-        return;
513
+        this.$message.error('填写工单内容')
514
+        return
515 515
       }
516
-      if(this.worktypeInfo == "bloodtransfer"){
517
-        this.ruleForm.contact = ""
518
-        this.ruleForm.contactnumber = ""
516
+      if (this.worktypeInfo == 'bloodtransfer') {
517
+        this.ruleForm.contact = ''
518
+        this.ruleForm.contactnumber = ''
519 519
       }
520 520
 
521 521
       this.$refs.ruleForm.validate((valid) => {
@@ -544,13 +544,13 @@ export default {
544 544
               dispatch: this.ruleForm.dispatch,
545 545
               content: this.ruleForm.content, //	备注
546 546
               OrderSource: window.localStorage.getItem('loginway') || ''
547
-            };
547
+            }
548 548
             getAddWorkOrder(datas)
549 549
               .then((response) => {
550
-                this.loading = false;
551
-                if (response.state.toLowerCase() === "success") {
552
-                  this.getUrl();
553
-                  this.$parent.$layer.closeAll();
550
+                this.loading = false
551
+                if (response.state.toLowerCase() === 'success') {
552
+                  this.getUrl()
553
+                  this.$parent.$layer.closeAll()
554 554
                   // this.$parent.$layer.close(this.layerid)
555 555
                   // this.$parent.$parent.getList() // 重新加载父级数据
556 556
                   // this.$refs.ruleForm.resetFields()
@@ -559,27 +559,27 @@ export default {
559 559
                   //   type: 'success',
560 560
                   //   duration: 1000
561 561
                   // })
562
-                  if (window.location.href.indexOf("addWorkOrder") >= 0) {
562
+                  if (window.location.href.indexOf('addWorkOrder') >= 0) {
563 563
                     this.$message({
564
-                      message: "工单已提交成功!",
565
-                      type: "success",
566
-                      duration: 500,
567
-                    });
564
+                      message: '工单已提交成功!',
565
+                      type: 'success',
566
+                      duration: 500
567
+                    })
568 568
                     this.$router.push({
569
-                      path: "/orderManage/mySubmit",
570
-                    });
569
+                      path: '/orderManage/mySubmit'
570
+                    })
571 571
                   } else {
572 572
                     this.$message({
573
-                      message: "恭喜你,添加工单成功!",
574
-                      type: "success",
575
-                      duration: 500,
576
-                    });
573
+                      message: '恭喜你,添加工单成功!',
574
+                      type: 'success',
575
+                      duration: 500
576
+                    })
577 577
                   }
578 578
                 }
579 579
               })
580 580
               .catch(() => {
581
-                this.loading = false;
582
-              });
581
+                this.loading = false
582
+              })
583 583
           } else {
584 584
             // 编辑
585 585
             const datas = {
@@ -601,48 +601,48 @@ export default {
601 601
               dispatch: this.ruleForm.dispatch,
602 602
               content: this.ruleForm.content, //	备注
603 603
               OrderSource: window.localStorage.getItem('loginway') || ''
604
-            };
604
+            }
605 605
             getUpdateWorkOrder(datas)
606 606
               .then((response) => {
607
-                if (response.state.toLowerCase() === "success") {
607
+                if (response.state.toLowerCase() === 'success') {
608 608
                   // this.$parent.$layer.closeAll()
609 609
                   // this.$parent.$layer.close(this.layerid)
610 610
                   // this.$parent.$parent.getList() // 重新加载父级数据
611
-                  this.$emit("closeLayer");
612
-                  this.usercodeSearch = "";
611
+                  this.$emit('closeLayer')
612
+                  this.usercodeSearch = ''
613 613
                   this.$message({
614
-                    message: "恭喜你,编辑工单成功!",
615
-                    type: "success",
616
-                    duration: 1000,
617
-                  });
614
+                    message: '恭喜你,编辑工单成功!',
615
+                    type: 'success',
616
+                    duration: 1000
617
+                  })
618 618
                 }
619 619
               })
620
-              .catch(() => {});
620
+              .catch(() => {})
621 621
           }
622 622
         } else {
623
-          this.$message.error("请输入有效的必填项信息!");
624
-          return false;
623
+          this.$message.error('请输入有效的必填项信息!')
624
+          return false
625 625
         }
626
-      });
626
+      })
627 627
     },
628 628
     resetForm() {
629
-      this.$refs.ruleForm.resetFields();
629
+      this.$refs.ruleForm.resetFields()
630 630
     },
631 631
     getUrl() {
632
-      if (window.location.href.indexOf("callScreen") >= 0) {
633
-        this.$store.dispatch("delView", this.$route);
632
+      if (window.location.href.indexOf('callScreen') >= 0) {
633
+        this.$store.dispatch('delView', this.$route)
634 634
         const scoketDatas = {
635
-          Type: "SayFree",
636
-          AgentID: window.localStorage.getItem("storageUsercode"),
637
-          AgentExten: window.localStorage.getItem("ext"),
638
-        };
639
-        if (this.telTopRightState == "话后处理中") {
640
-          Send(scoketDatas);
635
+          Type: 'SayFree',
636
+          AgentID: window.localStorage.getItem('storageUsercode'),
637
+          AgentExten: window.localStorage.getItem('ext')
641 638
         }
642
-        window.sessionStorage.setItem("isBusyOrFree", 1); // 0是置忙1是置闲
639
+        if (this.telTopRightState == '话后处理中') {
640
+          Send(scoketDatas)
641
+        }
642
+        window.sessionStorage.setItem('isBusyOrFree', 1) // 0是置忙1是置闲
643 643
         this.$router.push({
644
-          path: "/Dashboard",
645
-        });
644
+          path: '/Dashboard'
645
+        })
646 646
       }
647 647
       // else{
648 648
       //   window.location.reload()
@@ -652,51 +652,51 @@ export default {
652 652
     getDetail(num) {
653 653
       const params = {
654 654
         WorkOrderCode: this.wocode,
655
-        type: num,
656
-      };
655
+        type: num
656
+      }
657 657
       getModelDetail(params).then((response) => {
658
-        if (response.state.toLowerCase() === "success") {
659
-          const res = response.model;
660
-          this.getRepairman(res.F_ProposerDeptId);
661
-          this.getDeptAddress(res.F_ProposerDeptId);
662
-          this.ruleForm.F_ID = res.F_ID;
663
-          this.ruleForm.type = res.F_Type;
664
-          this.type = res.F_Type;
665
-          this.hospitalsParam.id = res.F_HosId;
666
-          this.hospitalsParam.name = res.HosName;
667
-          this.departmentsParam.id = res.F_ProposerDeptId;
668
-          this.departmentsParam.name = res.F_ProposerDeptName;
669
-          this.repairmanParam.id = res.F_ProposerCode;
670
-          this.repairmanParam.name = res.F_ProposerName;
671
-          this.ruleForm.username = res.F_ProposerName;
672
-          this.ruleForm.hosid = res.F_HosId;
673
-          this.ruleForm.hosname = res.HosName;
674
-          this.ruleForm.deptid = res.F_ProposerDeptId;
675
-          this.ruleForm.deptname = res.F_ProposerDeptName;
676
-          this.ruleForm.usercode = res.F_ProposerCode;
677
-          this.ruleForm.username = res.F_ProposerName;
678
-          this.ruleForm.phon = res.F_Phon;
679
-          this.ruleForm.contact = res.F_Contact;
680
-          this.ruleForm.contactnumber = res.F_ContactNumber;
681
-          this.ruleForm.cartype = res.F_CarType;
682
-          this.ruleForm.startplace = res.F_DepartPlace;
683
-          this.ruleForm.endplace = res.F_Destination;
684
-          this.ruleForm.F_CarMessage = res.F_CarMessage;
685
-          this.ruleForm.remark = res.F_Remark;
686
-          this.ruleForm.usertime = res.F_UseTime;
687
-          this.ruleForm.birth = res.F_Birth;
688
-          this.ruleForm.content = res.F_Content;
689
-          this.ruleForm.EmergencyTypes = res.F_EmergencyTypes;
690
-          this.ruleForm.dispatch = res.F_Dispatch;
658
+        if (response.state.toLowerCase() === 'success') {
659
+          const res = response.model
660
+          this.getRepairman(res.F_ProposerDeptId)
661
+          this.getDeptAddress(res.F_ProposerDeptId)
662
+          this.ruleForm.F_ID = res.F_ID
663
+          this.ruleForm.type = res.F_Type
664
+          this.type = res.F_Type
665
+          this.hospitalsParam.id = res.F_HosId
666
+          this.hospitalsParam.name = res.HosName
667
+          this.departmentsParam.id = res.F_ProposerDeptId
668
+          this.departmentsParam.name = res.F_ProposerDeptName
669
+          this.repairmanParam.id = res.F_ProposerCode
670
+          this.repairmanParam.name = res.F_ProposerName
671
+          this.ruleForm.username = res.F_ProposerName
672
+          this.ruleForm.hosid = res.F_HosId
673
+          this.ruleForm.hosname = res.HosName
674
+          this.ruleForm.deptid = res.F_ProposerDeptId
675
+          this.ruleForm.deptname = res.F_ProposerDeptName
676
+          this.ruleForm.usercode = res.F_ProposerCode
677
+          this.ruleForm.username = res.F_ProposerName
678
+          this.ruleForm.phon = res.F_Phon
679
+          this.ruleForm.contact = res.F_Contact
680
+          this.ruleForm.contactnumber = res.F_ContactNumber
681
+          this.ruleForm.cartype = res.F_CarType
682
+          this.ruleForm.startplace = res.F_DepartPlace
683
+          this.ruleForm.endplace = res.F_Destination
684
+          this.ruleForm.F_CarMessage = res.F_CarMessage
685
+          this.ruleForm.remark = res.F_Remark
686
+          this.ruleForm.usertime = res.F_UseTime
687
+          this.ruleForm.birth = res.F_Birth
688
+          this.ruleForm.content = res.F_Content
689
+          this.ruleForm.EmergencyTypes = res.F_EmergencyTypes
690
+          this.ruleForm.dispatch = res.F_Dispatch
691 691
           this.deptid =
692
-            this.$store.getters.deptmap[parseInt(res.F_ProposerDeptId)].ids;
693
-          this.ruleForm.needman = res.F_ProposerCode;
694
-          this.usercodeSearch = res.F_ProposerCode;
692
+            this.$store.getters.deptmap[parseInt(res.F_ProposerDeptId)].ids
693
+          this.ruleForm.needman = res.F_ProposerCode
694
+          this.usercodeSearch = res.F_ProposerCode
695 695
         }
696
-      });
697
-    },
698
-  },
699
-};
696
+      })
697
+    }
698
+  }
699
+}
700 700
 </script>
701 701
 
702 702
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 5 - 1
CallCenterWeb.UI/RMYY/src/store/modules/user.js

@@ -116,7 +116,7 @@ const user = {
116 116
       const loginway = userInfo.loginway
117 117
 	  const dept = userInfo.dept
118 118
       return new Promise((resolve, reject) => {
119
-        OAlogin(loginid, oploginid,loginway, dept)
119
+        OAlogin(loginid, oploginid, loginway, dept)
120 120
           .then(response => {
121 121
             setToken(response.data)
122 122
             commit('SET_TOKEN', response.data)
@@ -157,6 +157,10 @@ const user = {
157 157
               'storageUserphone',
158 158
               data.User.F_Telephone
159 159
             )
160
+            window.localStorage.setItem(
161
+              'storageUserphoneShow',
162
+              data.User.F_TelephoneShow
163
+            )
160 164
             window.localStorage.setItem('storageUsertx', data.User.F_See)
161 165
             window.localStorage.setItem('storageUserid', data.User.F_UserId)
162 166
             window.localStorage.setItem(

+ 153 - 150
CallCenterWeb.UI/RMYY/src/views/faultRepairManagement/addRepairbase/index.vue

@@ -159,8 +159,10 @@
159 159
           </el-col>
160 160
         </el-row>
161 161
         <el-form-item>
162
-          <el-button type="primary" @click="submitForm('ruleForm')"
163
-            >提交工单</el-button
162
+          <el-button
163
+            type="primary"
164
+            @click="submitForm('ruleForm')"
165
+          >提交工单</el-button
164 166
           >
165 167
         </el-form-item>
166 168
       </el-row>
@@ -169,253 +171,254 @@
169 171
 </template>
170 172
 
171 173
 <script>
172
-import selectDeptTree from "@/components/context/commonSelect/selectDeptTree.vue";
173
-import selectOrderTypeTwo from "@/components/context/commonSelect/selectOrderTypeTwo.vue";
174
-import { GetPerson, getClassByDeptId } from "@/api/commonAPI";
175
-import { getAddRepairbase } from "@/api/faultRepairManagement/faultRepair";
176
-import { getOrderTypeLists } from "@/api/systemSetup/roleSetting/orderTypeManage";
174
+import selectDeptTree from '@/components/context/commonSelect/selectDeptTree.vue'
175
+import selectOrderTypeTwo from '@/components/context/commonSelect/selectOrderTypeTwo.vue'
176
+import { GetPerson, getClassByDeptId } from '@/api/commonAPI'
177
+import { getAddRepairbase } from '@/api/faultRepairManagement/faultRepair'
178
+import { getOrderTypeLists } from '@/api/systemSetup/roleSetting/orderTypeManage'
179
+import { encrypt, decrypt } from '@/utils/secretKey'
177 180
 export default {
178
-  name: "AddRepairbase",
181
+  name: 'AddRepairbase',
179 182
   components: {
180 183
     selectDeptTree,
181
-    selectOrderTypeTwo,
184
+    selectOrderTypeTwo
182 185
   },
183 186
   props: {},
184 187
   data() {
185 188
     return {
186 189
       secondOrderType: {
187 190
         typeid: 2,
188
-        pid: 3000,
191
+        pid: 3000
189 192
       },
190 193
       TagProps: {
191
-        value: "id",
192
-        label: "text",
193
-        children: "children",
194
+        value: 'id',
195
+        label: 'text',
196
+        children: 'children'
194 197
       },
195 198
       orderData: [],
196 199
       orderType: [],
197
-      autodeptid: "",
198
-      worktypeInfo: "",
200
+      autodeptid: '',
201
+      worktypeInfo: '',
199 202
       fileList: [],
200 203
       imgUrl:
201 204
         this.$store.getters.serverConfig.BASE_API +
202
-        "FaultRepair/UploadFile?token=" +
203
-        localStorage.getItem("Admin-Token"),
205
+        'FaultRepair/UploadFile?token=' +
206
+        localStorage.getItem('Admin-Token'),
204 207
       repairman: [], // 申请人数据
205 208
       deptidArr: [], // 申请部门默认值
206 209
       assignman: [], // 指派人
207 210
       assignArr: [], // 默认指派部门
208 211
       ruleForm: {
209
-        repairDeptid: "", // 申请部门
210
-        repairmanid: "", // 申请人
211
-        repairmanphone: "", // 申请电话
212
-        repairmanCallNumber: "", // 联系电话
212
+        repairDeptid: '', // 申请部门
213
+        repairmanid: '', // 申请人
214
+        repairmanphone: '', // 申请电话
215
+        repairmanCallNumber: '', // 联系电话
213 216
         repairOrderType: [], // 工单类别
214
-        repairCenter: "", // 报修内容
215
-        repairAddress: "", // 报修地点
216
-        F_DeviceEncode: "",
217
-        repairImageid: "", // 附件
218
-        repairOper: "0", // 下不流程
219
-        assignDepart: "", // 指派部门
220
-        assignMant: "", // 指派人
217
+        repairCenter: '', // 报修内容
218
+        repairAddress: '', // 报修地点
219
+        F_DeviceEncode: '',
220
+        repairImageid: '', // 附件
221
+        repairOper: '0', // 下不流程
222
+        assignDepart: '', // 指派部门
223
+        assignMant: '' // 指派人
221 224
       },
222 225
       headers: {
223
-        Authorization: "Bearer " + localStorage.getItem("Admin-Token"),
226
+        Authorization: 'Bearer ' + localStorage.getItem('Admin-Token')
224 227
       },
225
-      imageUrl: "http://192.168.1.37:8000/FaultRepair/UploadFile",
228
+      imageUrl: 'http://192.168.1.37:8000/FaultRepair/UploadFile',
226 229
       rules: {
227 230
         repairOrderType: [
228 231
           {
229 232
             required: true,
230
-            message: "请选择工单类别",
231
-            trigger: "change",
232
-          },
233
+            message: '请选择工单类别',
234
+            trigger: 'change'
235
+          }
233 236
         ],
234 237
         repairDeptid: [
235 238
           {
236 239
             required: true,
237
-            message: "请选择申请部门",
238
-            trigger: "change",
239
-          },
240
+            message: '请选择申请部门',
241
+            trigger: 'change'
242
+          }
240 243
         ],
241 244
         repairmanid: [
242 245
           {
243 246
             required: true,
244
-            message: "请选择申请人",
245
-            trigger: "change",
246
-          },
247
+            message: '请选择申请人',
248
+            trigger: 'change'
249
+          }
247 250
         ],
248 251
         repairmanCallNumber: [
249 252
           {
250 253
             required: true,
251
-            message: "请输入联系电话",
252
-            trigger: "change",
253
-          },
254
+            message: '请输入联系电话',
255
+            trigger: 'change'
256
+          }
254 257
         ],
255 258
         repairOrderType: [
256 259
           {
257 260
             required: true,
258
-            message: "请选择工单类别",
259
-            trigger: "change",
260
-          },
261
+            message: '请选择工单类别',
262
+            trigger: 'change'
263
+          }
261 264
         ],
262 265
         repairCenter: [
263 266
           {
264 267
             required: true,
265
-            message: "请输入报修内容",
266
-            trigger: "change",
267
-          },
268
+            message: '请输入报修内容',
269
+            trigger: 'change'
270
+          }
268 271
         ],
269 272
         repairAddress: [
270 273
           {
271 274
             required: true,
272
-            message: "请输入报修地点",
273
-            trigger: "blur",
274
-          },
275
-        ],
275
+            message: '请输入报修地点',
276
+            trigger: 'blur'
277
+          }
278
+        ]
276 279
         // F_DeviceEncode: [{
277 280
         //   required: true,
278 281
         //   message: '请输入设备资产编码',
279 282
         //   trigger: 'blur'
280 283
         // }]
281
-      },
282
-    };
284
+      }
285
+    }
283 286
   },
284 287
   created() {
285
-    this.getTreeList();
286
-    const deptid = window.localStorage.getItem("deptId");
288
+    this.getTreeList()
289
+    const deptid = window.localStorage.getItem('deptId')
287 290
     if (deptid) {
288
-      this.deptidArr = this.$store.getters.deptmap[parseInt(deptid)].ids;
289
-      this.assignArr = this.deptidArr;
290
-      this.ruleForm.repairDeptid = deptid;
291
-      this.ruleForm.assignDepart = deptid;
292
-      this.getRepairman(deptid, 0);
293
-      this.getClassUser(deptid);
291
+      this.deptidArr = this.$store.getters.deptmap[parseInt(deptid)].ids
292
+      this.assignArr = this.deptidArr
293
+      this.ruleForm.repairDeptid = deptid
294
+      this.ruleForm.assignDepart = deptid
295
+      this.getRepairman(deptid, 0)
296
+      this.getClassUser(deptid)
294 297
     }
295
-    this.ruleForm.repairmanid = this.$store.getters.usercode;
296
-    this.ruleForm.repairmanphone = this.$store.getters.mobile;
297
-    this.ruleForm.repairmanCallNumber = this.$store.getters.mobile;
298
+    this.ruleForm.repairmanid = this.$store.getters.usercode
299
+    this.ruleForm.repairmanphone = decrypt(localStorage.getItem('storageUserphoneShow'))
300
+    this.ruleForm.repairmanCallNumber = this.ruleForm.repairmanphone
298 301
   },
299 302
   methods: {
300 303
     handleChange(data) {
301
-      this.worktypeInfo = this.$store.getters.workTypeMap[parseInt(data)].tag;
304
+      this.worktypeInfo = this.$store.getters.workTypeMap[parseInt(data)].tag
302 305
     },
303 306
     // 部门
304 307
     getDeptid(data) {
305
-      this.ruleForm.repairDeptid = data[data.length - 1];
306
-      this.deptidArr = data;
307
-      this.getRepairman(this.ruleForm.repairDeptid, 0);
308
+      this.ruleForm.repairDeptid = data[data.length - 1]
309
+      this.deptidArr = data
310
+      this.getRepairman(this.ruleForm.repairDeptid, 0)
308 311
     },
309 312
     getDeptid1(data) {
310
-      this.ruleForm.assignDepart = data[data.length - 1];
311
-      this.assignArr = data;
312
-      this.getClassUser(data[data.length - 1]);
313
+      this.ruleForm.assignDepart = data[data.length - 1]
314
+      this.assignArr = data
315
+      this.getClassUser(data[data.length - 1])
313 316
       // this.getRepairman(this.ruleForm.assignDepart, 1)
314 317
     },
315 318
     getClassUser(id) {
316
-      this.ruleForm.assignMant = "";
319
+      this.ruleForm.assignMant = ''
317 320
       const params = {
318
-        deptid: id,
319
-      };
321
+        deptid: id
322
+      }
320 323
       if (id) {
321 324
         getClassByDeptId(params).then((res) => {
322
-          this.assignman = res.rows;
323
-        });
325
+          this.assignman = res.rows
326
+        })
324 327
       }
325 328
     },
326 329
     // 获取申请人数据
327 330
     getRepairman(id, state) {
328 331
       return new Promise((resolve) => {
329 332
         const params = {
330
-          deptid: id, // 字典管理的工单标识
331
-        };
333
+          deptid: id // 字典管理的工单标识
334
+        }
332 335
         GetPerson(params).then((res) => {
333 336
           if (state === 0) {
334
-            this.repairman = res.rows;
337
+            this.repairman = res.rows
335 338
           } else if (state === 1) {
336
-            this.assignman = res.rows;
339
+            this.assignman = res.rows
337 340
           }
338
-        });
339
-        resolve();
340
-      });
341
+        })
342
+        resolve()
343
+      })
341 344
     },
342 345
     // 申请人
343 346
     changeRepairman(data) {
344
-      this.ruleForm.repairmanid = data;
347
+      this.ruleForm.repairmanid = data
345 348
       const user = this.repairman.find((o) => {
346
-        return o.usercode === data.toString();
347
-      });
349
+        return o.usercode === data.toString()
350
+      })
348 351
       if (user) {
349
-        this.ruleForm.repairmanphone = user.usertelphone;
350
-        this.ruleForm.repairmanCallNumber = user.usertelphone;
352
+        this.ruleForm.repairmanphone = user.usertelphone
353
+        this.ruleForm.repairmanCallNumber = user.usertelphone
351 354
       }
352 355
     },
353 356
     changeUser(data) {
354 357
       // 指派人
355
-      this.ruleForm.assignMant = data;
358
+      this.ruleForm.assignMant = data
356 359
     },
357 360
     getTreeList() {
358 361
       return new Promise((resolve) => {
359 362
         const params = {
360 363
           pid: 3000,
361
-          flag: 1,
362
-        };
364
+          flag: 1
365
+        }
363 366
         getOrderTypeLists(params).then((response) => {
364
-          if (response.state.toLowerCase() === "success") {
365
-            this.orderData = this.getTreeData(response.data);
367
+          if (response.state.toLowerCase() === 'success') {
368
+            this.orderData = this.getTreeData(response.data)
366 369
           }
367
-        });
368
-        resolve();
369
-      });
370
+        })
371
+        resolve()
372
+      })
370 373
     },
371 374
     getTreeData(data) {
372 375
       // 循环遍历json数据
373 376
       for (var i = 0; i < data.length; i++) {
374 377
         if (data[i].children.length < 1) {
375 378
           // children若为空数组,则将children设为undefined
376
-          data[i].children = undefined;
379
+          data[i].children = undefined
377 380
         } else {
378 381
           // children若不为空数组,则继续 递归调用 本方法
379
-          this.getTreeData(data[i].children);
382
+          this.getTreeData(data[i].children)
380 383
         }
381 384
       }
382
-      return data;
385
+      return data
383 386
     },
384
-    beforeUpload(file){
387
+    beforeUpload(file) {
385 388
       const FILE_NAME = file.name
386
-        if (FILE_NAME.substring(FILE_NAME.lastIndexOf('.')) !== '.mp4' && FILE_NAME.substring(FILE_NAME.lastIndexOf('.')) !== '.jpg' && FILE_NAME.substring(FILE_NAME.lastIndexOf('.')) !== '.jpeg' && FILE_NAME.substring(FILE_NAME.lastIndexOf('.')) !== '.png') {
387
-          this.$message.warning('仅支持.mp4,.jpg,.jpeg,.png文件')
388
-          return false
389
-        }
390
-        const isLt1M = file.size / 1024 / 1024 < 20
391
-        if (isLt1M) {
392
-          this.file = file
393
-          return true
394
-        }
395
-        this.$message.warning('请上传不超过20M的文件.')
389
+      if (FILE_NAME.substring(FILE_NAME.lastIndexOf('.')) !== '.mp4' && FILE_NAME.substring(FILE_NAME.lastIndexOf('.')) !== '.jpg' && FILE_NAME.substring(FILE_NAME.lastIndexOf('.')) !== '.jpeg' && FILE_NAME.substring(FILE_NAME.lastIndexOf('.')) !== '.png') {
390
+        this.$message.warning('仅支持.mp4,.jpg,.jpeg,.png文件')
396 391
         return false
392
+      }
393
+      const isLt1M = file.size / 1024 / 1024 < 20
394
+      if (isLt1M) {
395
+        this.file = file
396
+        return true
397
+      }
398
+      this.$message.warning('请上传不超过20M的文件.')
399
+      return false
397 400
     },
398 401
     handle_success(res) {
399
-      this.ruleForm.repairImageid += res.data[0].F_FileId + ",";
402
+      this.ruleForm.repairImageid += res.data[0].F_FileId + ','
400 403
     },
401 404
     handle_remove(res) {
402
-      const str = res.response.data[0].F_FileId + ",";
405
+      const str = res.response.data[0].F_FileId + ','
403 406
       this.ruleForm.repairImageid = this.ruleForm.repairImageid.replace(
404 407
         str,
405
-        ""
406
-      );
408
+        ''
409
+      )
407 410
     },
408 411
     submitForm(formName) {
409
-      console.log(this.ruleForm.repairDeptid);
412
+      console.log(this.ruleForm.repairDeptid)
410 413
       this.$refs[formName].validate((valid) => {
411 414
         if (valid) {
412
-          if (this.ruleForm.repairImageid === "") {
413
-            this.ruleForm.repairImageid = "";
415
+          if (this.ruleForm.repairImageid === '') {
416
+            this.ruleForm.repairImageid = ''
414 417
           } else {
415 418
             this.ruleForm.repairImageid = this.ruleForm.repairImageid.slice(
416 419
               0,
417 420
               this.ruleForm.repairImageid.length - 1
418
-            );
421
+            )
419 422
           }
420 423
           this.$refs.ruleForm.validate((valid) => {
421 424
             if (valid) {
@@ -429,52 +432,52 @@ export default {
429 432
                     this.ruleForm.repairOrderType.length - 1
430 433
                   ], // 工单类别
431 434
                 Content: this.ruleForm.repairCenter, // 工单内容
432
-                DeviceEncode: this.ruleForm.F_DeviceEncode, //设备资产编码
435
+                DeviceEncode: this.ruleForm.F_DeviceEncode, // 设备资产编码
433 436
                 PlaceOfRepair: this.ruleForm.repairAddress, // 报修地点
434 437
                 File: this.ruleForm.repairImageid, // 附件
435 438
                 MaintenanceDept: this.ruleForm.assignDepart, // 指派部门
436 439
                 IsEnd: this.ruleForm.repairOper, // 是否完结
437
-                Maintenancer: this.ruleForm.assignMant, // 指派人
438
-              };
440
+                Maintenancer: this.ruleForm.assignMant // 指派人
441
+              }
439 442
               getAddRepairbase(params).then((res) => {
440
-                if (res.state.toLowerCase() === "success") {
441
-                  this.deptidArr = [];
442
-                  this.assignArr = [];
443
-                  this.fileList = [];
444
-                  this.$refs.ruleForm.resetFields();
443
+                if (res.state.toLowerCase() === 'success') {
444
+                  this.deptidArr = []
445
+                  this.assignArr = []
446
+                  this.fileList = []
447
+                  this.$refs.ruleForm.resetFields()
445 448
                   this.$message({
446
-                    message: "恭喜你,添加工单成功!",
447
-                    type: "success",
448
-                    duration: 1000,
449
-                  });
450
-                  const deptid = window.localStorage.getItem("deptId");
449
+                    message: '恭喜你,添加工单成功!',
450
+                    type: 'success',
451
+                    duration: 1000
452
+                  })
453
+                  const deptid = window.localStorage.getItem('deptId')
451 454
                   if (deptid) {
452 455
                     this.deptidArr =
453
-                      this.$store.getters.deptmap[parseInt(deptid)].ids;
454
-                    this.assignArr = this.deptidArr;
455
-                    this.ruleForm.repairDeptid = deptid;
456
-                    this.ruleForm.assignDepart = deptid;
457
-                    this.getRepairman(deptid, 0);
458
-                    this.getClassUser(deptid);
456
+                      this.$store.getters.deptmap[parseInt(deptid)].ids
457
+                    this.assignArr = this.deptidArr
458
+                    this.ruleForm.repairDeptid = deptid
459
+                    this.ruleForm.assignDepart = deptid
460
+                    this.getRepairman(deptid, 0)
461
+                    this.getClassUser(deptid)
459 462
                   }
460
-                  this.ruleForm.repairmanid = this.$store.getters.usercode;
461
-                  this.ruleForm.repairmanphone = this.$store.getters.mobile;
463
+                  this.ruleForm.repairmanid = this.$store.getters.usercode
464
+                  this.ruleForm.repairmanphone = decrypt(localStorage.getItem('storageUserphoneShow'))
462 465
                   this.ruleForm.repairmanCallNumber =
463
-                    this.$store.getters.mobile;
466
+                     this.ruleForm.repairmanphone
464 467
                 }
465
-              });
468
+              })
466 469
             } else {
467
-              return false;
470
+              return false
468 471
             }
469
-          });
472
+          })
470 473
         } else {
471
-          console.log("error submit!!");
472
-          return false;
474
+          console.log('error submit!!')
475
+          return false
473 476
         }
474
-      });
475
-    },
476
-  },
477
-};
477
+      })
478
+    }
479
+  }
480
+}
478 481
 </script>
479 482
 <style rel="stylesheet/scss" lang="scss">
480 483
 .order_form {

+ 93 - 92
CallCenterWeb.UI/RMYY/src/views/layout/components/Navbar/permsgEdit.vue

@@ -22,8 +22,8 @@
22 22
               <el-col :span="24">
23 23
                 <el-form-item label="原密码" prop="oldpas">
24 24
                   <el-input
25
-                    show-password
26 25
                     v-model="form.oldpas"
26
+                    show-password
27 27
                     type="password"
28 28
                     autocomplete="off"
29 29
                   />
@@ -34,8 +34,8 @@
34 34
               <el-col :span="24">
35 35
                 <el-form-item label="新密码" prop="newpas">
36 36
                   <el-input
37
-                    show-password
38 37
                     v-model="form.newpas"
38
+                    show-password
39 39
                     type="password"
40 40
                     autocomplete="off"
41 41
                   />
@@ -46,8 +46,8 @@
46 46
               <el-col :span="24">
47 47
                 <el-form-item label="确认密码" prop="confirmpas">
48 48
                   <el-input
49
-                    show-password
50 49
                     v-model="form.confirmpas"
50
+                    show-password
51 51
                     type="password"
52 52
                     autocomplete="off"
53 53
                   />
@@ -100,118 +100,119 @@
100 100
 </template>
101 101
 
102 102
 <script>
103
-import { getResetPwd, getUploadTX } from "@/api/layout/permsgEdit";
104
-import { validPassword,strongvalidPassword } from "@/utils/validate";
105
-import md5 from "js-md5";
103
+import { getResetPwd, getUploadTX } from '@/api/layout/permsgEdit'
104
+import { validPassword, strongvalidPassword } from '@/utils/validate'
105
+import { encrypt, decrypt } from '@/utils/secretKey'
106
+import md5 from 'js-md5'
106 107
 export default {
107
-  name: "Permsg",
108
+  name: 'Permsg',
108 109
   props: {
109 110
     layerid: {
110 111
       type: String,
111
-      default: "",
112
-    },
112
+      default: ''
113
+    }
113 114
   },
114 115
   data() {
115 116
 	  const validatePass = (rule, value, callback) => {
116 117
 	    if (!strongvalidPassword(value)) {
117 118
 	      callback(
118
-	        new Error("请输入有效的密码(8-20个字符必须包含字母大小写和数字)!")
119
-	      );
119
+	        new Error('请输入有效的密码(8-20个字符必须包含字母大小写和数字)!')
120
+	      )
120 121
 	    } else {
121
-	      if (this.form.confirmpas !== "") {
122
-	        this.$refs.ruleForm.validateField("confirmpas");
122
+	      if (this.form.confirmpas !== '') {
123
+	        this.$refs.ruleForm.validateField('confirmpas')
123 124
 	      }
124
-	      callback();
125
+	      callback()
125 126
 	    }
126
-	  };
127
+	  }
127 128
     const validatePass2 = (rule, value, callback) => {
128 129
       if (!strongvalidPassword(this.form.confirmpas)) {
129 130
         callback(
130 131
           new Error(
131
-            "请输入有效的密码(8-20个字符必须包含字母大小写和数字)!"
132
+            '请输入有效的密码(8-20个字符必须包含字母大小写和数字)!'
132 133
           )
133
-        );
134
+        )
134 135
       } else {
135 136
         if (this.form.confirmpas !== this.form.newpas) {
136
-          callback(new Error("两次输入密码不一致!"));
137
+          callback(new Error('两次输入密码不一致!'))
137 138
         }
138
-        callback();
139
+        callback()
139 140
       }
140
-    };
141
+    }
141 142
     return {
142
-      rules:{
143
-        oldpas:[{
144
-           required: true,
145
-           trigger: "blur",
146
-           message: "请输入原密码",
147
-        }],
148
-        newpas:[{
149
-            required: true,
150
-            trigger: "blur",
151
-            validator: validatePass,
143
+      rules: {
144
+        oldpas: [{
145
+          required: true,
146
+          trigger: 'blur',
147
+          message: '请输入原密码'
152 148
         }],
153
-        confirmpas:[{
154
-            required: true,
155
-            trigger: "blur",
156
-            validator: validatePass2,
149
+        newpas: [{
150
+          required: true,
151
+          trigger: 'blur',
152
+          validator: validatePass
157 153
         }],
154
+        confirmpas: [{
155
+          required: true,
156
+          trigger: 'blur',
157
+          validator: validatePass2
158
+        }]
158 159
       },
159 160
       fileList: [],
160 161
       photoHide: true,
161
-      formLabelWidth: "120px",
162
+      formLabelWidth: '120px',
162 163
       form: {
163
-        num: localStorage.getItem("storageUsercode"),
164
-        name: localStorage.getItem("storageUsername"),
165
-        oldpas: "",
166
-        newpas: "",
167
-        confirmpas: "",
164
+        num: localStorage.getItem('storageUsercode'),
165
+        name: localStorage.getItem('storageUsername'),
166
+        oldpas: '',
167
+        newpas: '',
168
+        confirmpas: '',
168 169
         deptname:
169
-          this.$store.getters.deptmap[parseInt(localStorage.getItem("deptId"))]
170
+          this.$store.getters.deptmap[parseInt(localStorage.getItem('deptId'))]
170 171
             .text,
171
-        phone: localStorage.getItem("storageUserphone"),
172
+        phone: decrypt(localStorage.getItem('storageUserphoneShow'))
172 173
       },
173
-      repairImageid: "",
174
+      repairImageid: '',
174 175
       headers: {
175
-        Authorization: "Bearer " + localStorage.getItem("Admin-Token"),
176
+        Authorization: 'Bearer ' + localStorage.getItem('Admin-Token')
176 177
       },
177 178
       imgUrl:
178 179
         this.$store.getters.serverConfig.BASE_API +
179
-        "Index/UploadTX?token=" +
180
-        localStorage.getItem("Admin-Token"),
180
+        'Index/UploadTX?token=' +
181
+        localStorage.getItem('Admin-Token'),
181 182
       ruleForm: {},
182 183
       loading: false,
183
-      activeName: "first",
184
+      activeName: 'first',
184 185
       circleUrl:
185
-        "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
186
-    };
186
+        'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'
187
+    }
187 188
   },
188 189
   created() {
189
-    if (localStorage.getItem("storageUsertx")) {
190
+    if (localStorage.getItem('storageUsertx')) {
190 191
       this.fileList.push({
191
-        name: "",
192
+        name: '',
192 193
         url:
193 194
           this.$store.getters.serverConfig.BASE_API +
194
-          localStorage.getItem("storageUsertx"),
195
-      });
196
-      this.photoHide = true;
195
+          localStorage.getItem('storageUsertx')
196
+      })
197
+      this.photoHide = true
197 198
     } else {
198
-      this.photoHide = false;
199
+      this.photoHide = false
199 200
     }
200 201
   },
201 202
   methods: {
202 203
     handleClick(tab, event) {
203
-      console.log(tab, event);
204
+      console.log(tab, event)
204 205
     },
205 206
     onsub() {
206 207
       this.$refs.ruleForm.validate((valid) => {
207
-        if(valid){
208
+        if (valid) {
208 209
           const params = {
209 210
             oldpwd: md5(this.form.oldpas),
210
-            usercode: localStorage.getItem("storageUsercode"),
211
+            usercode: localStorage.getItem('storageUsercode'),
211 212
             pwd: md5(this.form.confirmpas),
212 213
             username: this.form.name,
213
-            phone: this.form.phone,
214
-          };
214
+            phone: this.form.phone
215
+          }
215 216
           // if (!this.form.oldpas) {
216 217
           //   this.$message.error("请输入原密码");
217 218
           //   return;
@@ -221,57 +222,57 @@ export default {
221 222
           //   return;
222 223
           // }
223 224
           getResetPwd(params).then((response) => {
224
-            if (response.state.toLowerCase() === "success") {
225
-              this.$parent.$layer.close(this.layerid);
226
-              this.$message.success("恭喜你,重置密码成功!");
227
-              window.localStorage.setItem("storageUserphone", this.form.phone);
228
-              window.localStorage.setItem("storageUsername", this.form.name);
229
-              window.localStorage.setItem("loginpass", this.form.confirmpas);
225
+            if (response.state.toLowerCase() === 'success') {
226
+              this.$parent.$layer.close(this.layerid)
227
+              this.$message.success('恭喜你,重置密码成功!')
228
+              window.localStorage.setItem('storageUserphone', this.form.phone)
229
+              window.localStorage.setItem('storageUsername', this.form.name)
230
+              window.localStorage.setItem('loginpass', this.form.confirmpas)
230 231
               window.location.reload()
231 232
             }
232
-          });
233
+          })
233 234
         }
234 235
       })
235 236
     },
236 237
     oncancel() {
237
-      this.$parent.$layer.close(this.layerid);
238
+      this.$parent.$layer.close(this.layerid)
238 239
     },
239 240
     // 移除图片
240 241
     photoRemove(file, fileList) {
241
-      this.photoHide = false;
242
+      this.photoHide = false
242 243
     },
243 244
     onupload() {
244 245
       return new Promise((resolve) => {
245 246
         const params = {
246
-          upFile: this.repairImageid,
247
-        };
248
-        if (this.repairImageid == "") {
249
-          this.$message.warning("请上传图片");
250
-          return;
247
+          upFile: this.repairImageid
248
+        }
249
+        if (this.repairImageid == '') {
250
+          this.$message.warning('请上传图片')
251
+          return
251 252
         }
252 253
         getUploadTX(params).then((response) => {
253
-          if (response.state.toLowerCase() === "success") {
254
-            this.$parent.$layer.close(this.layerid);
255
-            this.$message.success("恭喜你,修改成功!");
254
+          if (response.state.toLowerCase() === 'success') {
255
+            this.$parent.$layer.close(this.layerid)
256
+            this.$message.success('恭喜你,修改成功!')
256 257
           }
257
-        });
258
-        resolve();
259
-      });
258
+        })
259
+        resolve()
260
+      })
260 261
     },
261 262
     handle_success(res) {
262
-      this.repairImageid = res.data[0].F_FileId;
263
-      if (res.message == "成功") {
264
-        this.$message.success("上传成功");
265
-        this.photoHide = true;
266
-        this.$store.dispatch("GetInfo").then((res) => {
267
-          const data = res.data;
268
-          window.localStorage.setItem("storageUsertx", data.User.F_See);
269
-          this.$parent.upDataUsertx();
270
-        });
263
+      this.repairImageid = res.data[0].F_FileId
264
+      if (res.message == '成功') {
265
+        this.$message.success('上传成功')
266
+        this.photoHide = true
267
+        this.$store.dispatch('GetInfo').then((res) => {
268
+          const data = res.data
269
+          window.localStorage.setItem('storageUsertx', data.User.F_See)
270
+          this.$parent.upDataUsertx()
271
+        })
271 272
       }
272
-    },
273
-  },
274
-};
273
+    }
274
+  }
275
+}
275 276
 </script>
276 277
 
277 278
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 94 - 89
CallCenterWeb.UI/RMYY/src/views/orderManage/patientVisit/visit.vue

@@ -3,13 +3,12 @@
3 3
     <el-row :gutter="20">
4 4
       <el-col :md="24" class="order_detail_content">
5 5
         <el-alert
6
+          :closable="false"
6 7
           title="工单信息"
7 8
           type="success"
8 9
           class="ordertit"
9 10
           style=""
10
-          :closable="false"
11
-        >
12
-        </el-alert>
11
+        />
13 12
         <table class="tabdept" cellspacing="0" cellpadding="0">
14 13
           <tr>
15 14
             <th>业务类别:</th>
@@ -60,15 +59,13 @@
60 59
       </el-col>
61 60
       <el-col :md="24" class="order_detail_body">
62 61
         <el-alert
62
+          :closable="false"
63 63
           title="回访记录"
64 64
           type="success"
65 65
           class="ordertit"
66
-          :closable="false"
67
-        >
68
-        </el-alert>
66
+        />
69 67
         <el-table :data="visitarr" border highlight-current-row stripe>
70
-          <el-table-column type="index" width="100" label="序号" align="center">
71
-          </el-table-column>
68
+          <el-table-column type="index" width="100" label="序号" align="center"/>
72 69
           <el-table-column
73 70
             prop="F_CreateTime"
74 71
             label="回访时间"
@@ -95,14 +92,20 @@
95 92
           />
96 93
           <el-table-column label="满意度" align="center" min-width>
97 94
             <template slot-scope="scope">
98
-              <span v-if="scope.row.F_Satisfaction == 0" style="color: #00aaff"
99
-                >满意</span
95
+              <span
96
+                v-if="scope.row.F_Satisfaction == 0"
97
+                style="color: #00aaff"
98
+              >满意</span
100 99
               >
101
-              <span v-if="scope.row.F_Satisfaction == 1" style="color: #ffaa00"
102
-                >基本满意</span
100
+              <span
101
+                v-if="scope.row.F_Satisfaction == 1"
102
+                style="color: #ffaa00"
103
+              >基本满意</span
103 104
               >
104
-              <span v-if="scope.row.F_Satisfaction == 2" style="color: #ff0000"
105
-                >不满意</span
105
+              <span
106
+                v-if="scope.row.F_Satisfaction == 2"
107
+                style="color: #ff0000"
108
+              >不满意</span
106 109
               >
107 110
               <span v-if="scope.row.F_Satisfaction == -1">-</span>
108 111
             </template>
@@ -123,18 +126,17 @@
123 126
         </el-table>
124 127
       </el-col>
125 128
       <el-col
129
+        v-if="orderDetailData.F_State == 7"
126 130
         :md="24"
127 131
         class="order_detail_body"
128
-        v-if="orderDetailData.F_State == 7"
129 132
       >
130 133
         <el-alert
134
+          :closable="false"
131 135
           title="呼叫结果"
132 136
           type="success"
133 137
           class="ordertit"
134 138
           style="margin-bottom: 30px"
135
-          :closable="false"
136
-        >
137
-        </el-alert>
139
+        />
138 140
         <el-radio-group v-model="ruleForm.callResult" style="margin-left: 20px">
139 141
           <el-radio label="正常接通">正常接通</el-radio>
140 142
           <el-radio label="拒接">拒接</el-radio>
@@ -147,18 +149,17 @@
147 149
         </el-radio-group>
148 150
       </el-col>
149 151
       <el-col
152
+        v-if="ruleForm.callResult == '正常接通'"
150 153
         :md="24"
151 154
         class="order_detail_body"
152
-        v-if="ruleForm.callResult == '正常接通'"
153 155
       >
154 156
         <el-alert
157
+          :closable="false"
155 158
           title="回访结果"
156 159
           type="success"
157 160
           class="ordertit"
158 161
           style="margin-bottom: 20px"
159
-          :closable="false"
160
-        >
161
-        </el-alert>
162
+        />
162 163
         <el-form
163 164
           ref="ruleForm"
164 165
           :model="ruleForm"
@@ -169,7 +170,7 @@
169 170
           <el-form-item
170 171
             v-if="
171 172
               ruleForm.callResult == '正常接通' ||
172
-              ruleForm.callResult == '免回访'
173
+                ruleForm.callResult == '免回访'
173 174
             "
174 175
             label="满意度:"
175 176
           >
@@ -189,7 +190,7 @@
189 190
           <el-form-item
190 191
             v-if="
191 192
               ruleForm.callResult == '正常接通' ||
192
-              ruleForm.callResult == '免回访'
193
+                ruleForm.callResult == '免回访'
193 194
             "
194 195
             label="是否完结:"
195 196
           >
@@ -201,12 +202,15 @@
201 202
         </el-form>
202 203
       </el-col>
203 204
       <el-col
205
+        v-if="orderDetailData.F_State == 7"
204 206
         :md="24"
205 207
         class="order_detail_body"
206
-        v-if="orderDetailData.F_State == 7"
207 208
       >
208
-        <el-button style="margin-left: 35px" type="primary" @click="btnVisit"
209
-          >确定</el-button
209
+        <el-button
210
+          style="margin-left: 35px"
211
+          type="primary"
212
+          @click="btnVisit"
213
+        >确定</el-button
210 214
         >
211 215
       </el-col>
212 216
     </el-row>
@@ -214,30 +218,31 @@
214 218
 </template>
215 219
 
216 220
 <script>
217
-import { mapGetters } from "vuex";
221
+import { mapGetters } from 'vuex'
218 222
 import {
219 223
   GetOrderDetail,
220
-  GetVisitWorkOrder,
221
-} from "@/api/orderManagement/patientvisit";
222
-import { getCallOutprefix } from "@/api/trafficData/trafficData";
223
-import { Send } from "@/utils/telWebsocket";
224
-import audioPlayer from "@/components/context/audioPlayer";
225
-import Pagination from "@/components/context/Pagination"; // 对el-pagination 二次封装
224
+  GetVisitWorkOrder
225
+} from '@/api/orderManagement/patientvisit'
226
+import { getCallOutprefix } from '@/api/trafficData/trafficData'
227
+import { Send } from '@/utils/telWebsocket'
228
+import audioPlayer from '@/components/context/audioPlayer'
229
+import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
230
+import { encrypt, decrypt } from '@/utils/secretKey'
226 231
 
227 232
 export default {
228
-  name: "Visit",
233
+  name: 'Visit',
229 234
   components: {
230
-    Pagination,
235
+    Pagination
231 236
   },
232 237
   props: {
233 238
     rowid: {
234 239
       type: String,
235
-      default: "",
240
+      default: ''
236 241
     },
237 242
     layerid: {
238 243
       type: String,
239
-      default: "",
240
-    },
244
+      default: ''
245
+    }
241 246
   },
242 247
   data() {
243 248
     return {
@@ -246,52 +251,52 @@ export default {
246 251
       pageParams: {
247 252
         pageindex: 1, // 当前第几页
248 253
         pagesize: 5, // 每页几条数据
249
-        total: 0, // 总共多少数据
254
+        total: 0 // 总共多少数据
250 255
       },
251 256
       ruleForm: {
252
-        callResult: "免回访",
253
-        satisfaction: "",
254
-        result: "",
255
-        isover: 1,
257
+        callResult: '免回访',
258
+        satisfaction: '',
259
+        result: '',
260
+        isover: 1
256 261
       },
257
-      workOrderCirculationList: [], // 工单流转
258
-    };
262
+      workOrderCirculationList: [] // 工单流转
263
+    }
259 264
   },
260 265
   computed: {
261
-    ...mapGetters(["rolecode"]),
266
+    ...mapGetters(['rolecode'])
262 267
   },
263 268
   created() {
264
-    this.getDetail("0");
265
-    this.getDetail("2");
269
+    this.getDetail('0')
270
+    this.getDetail('2')
266 271
   },
267 272
   methods: {
268 273
     // 详情
269 274
     getDetail(num) {
270 275
       const params = {
271 276
         WorkOrderCode: this.rowid,
272
-        type: num,
273
-      };
277
+        type: num
278
+      }
274 279
       GetOrderDetail(params).then((response) => {
275 280
         if (num == 0) {
276
-          this.orderDetailData = response.data[0];
277
-          if( this.$store.getters.workTypeMap[
278
-              parseInt(response.data[0].F_type2)
279
-            ]){
280
-              this.orderDetailData.F_TypeName2 =
281
+          this.orderDetailData = response.data[0]
282
+          if (this.$store.getters.workTypeMap[
283
+            parseInt(response.data[0].F_type2)
284
+          ]) {
285
+            this.orderDetailData.F_TypeName2 =
281 286
                 this.$store.getters.workTypeMap[
282 287
                   parseInt(response.data[0].F_type2)
283
-                ].text; // 工单子类
284
-            }
288
+                ].text // 工单子类
289
+          }
285 290
         }
286 291
         if (num == 2) {
287
-          this.visitarr = response.data;
292
+          this.visitarr = response.data
288 293
         }
289
-      });
294
+      })
290 295
     },
291 296
     btnVisit() {
292
-      if (this.ruleForm.satisfaction == 2 && this.ruleForm.result == "") {
293
-        this.$message.error("请输入回访结果");
294
-        return;
297
+      if (this.ruleForm.satisfaction == 2 && this.ruleForm.result == '') {
298
+        this.$message.error('请输入回访结果')
299
+        return
295 300
       }
296 301
       const params = {
297 302
         WorkOrderCode: this.orderDetailData.F_WorkOrderCode,
@@ -300,51 +305,51 @@ export default {
300 305
         satisfaction: this.ruleForm.satisfaction,
301 306
         result: this.ruleForm.result,
302 307
         isover: this.ruleForm.isover,
303
-        phone: this.orderDetailData.F_Phon,
304
-      };
308
+        phone: this.orderDetailData.F_Phon
309
+      }
305 310
       GetVisitWorkOrder(params).then((res) => {
306
-        if (res.state == "success") {
307
-          this.$message.success("回访成功");
308
-          this.$parent.getList();
309
-          this.$parent.$layer.close(this.layerid);
311
+        if (res.state == 'success') {
312
+          this.$message.success('回访成功')
313
+          this.$parent.getList()
314
+          this.$parent.$layer.close(this.layerid)
310 315
         }
311
-      });
316
+      })
312 317
     },
313 318
     oncall() {
314 319
       const params = {
315
-        phone: this.orderDetailData.F_Phon,
316
-      };
320
+        phone: decrypt(this.orderDetailData.F_PhonShow)
321
+      }
317 322
       getCallOutprefix(params).then((response) => {
318
-        if (response.state.toLowerCase() === "success") {
323
+        if (response.state.toLowerCase() === 'success') {
319 324
           const scoketDatas = {
320
-            Type: "MakeCall",
321
-            AgentID: localStorage.getItem("storageUsercode"),
322
-            AgentExten: localStorage.getItem("ext"),
325
+            Type: 'MakeCall',
326
+            AgentID: localStorage.getItem('storageUsercode'),
327
+            AgentExten: localStorage.getItem('ext'),
323 328
             Header: response.data.fix,
324
-            DestinationNumber: response.data.phone,
325
-          };
326
-          Send(scoketDatas);
329
+            DestinationNumber: response.data.phone
330
+          }
331
+          Send(scoketDatas)
327 332
         }
328
-      });
333
+      })
329 334
     },
330 335
     playSound(rec_file, artist) {
331
-      console.log("artist", artist);
336
+      console.log('artist', artist)
332 337
       this.$layer.iframe({
333 338
         content: {
334 339
           content: audioPlayer, // 传递的组件对象
335 340
           parent: this, // 当前的vue对象
336 341
           data: {
337 342
             recFiles: rec_file,
338
-            artists: artist.toString(),
339
-          }, // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
343
+            artists: artist.toString()
344
+          } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
340 345
         },
341
-        area: ["600px", "230px"],
346
+        area: ['600px', '230px'],
342 347
         shadeClose: true,
343
-        title: "录音详情",
344
-      });
345
-    },
346
-  },
347
-};
348
+        title: '录音详情'
349
+      })
350
+    }
351
+  }
352
+}
348 353
 </script>
349 354
 
350 355
 <style rel="stylesheet/scss" lang="scss">