telephone-clients 4.0.0-1-43 → 4.0.0-1-44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telephone-clients",
3
- "version": "4.0.0-1-43",
3
+ "version": "4.0.0-1-44",
4
4
  "description": "呼叫模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,563 +1,562 @@
1
- <template>
2
- <div style="height: auto;width: 100%">
3
- <div class="row app-row">
4
- <div class="col-xs-4">
5
- <label>用户姓名</label>
6
- </div>
7
- <div class="col-xs-8">
8
- <input class="inputText4" v-model=model.f_user_name style="width: 100%"></input>
9
- </div>
10
-
11
- </div>
12
- <div class="row app-row">
13
- <div class="col-xs-4">
14
- <label>联系电话</label>
15
- </div>
16
- <div class="col-xs-8">
17
- <input class="input-font inputText4 " v-model=model.f_contact_phone style="width: 100%"></input>
18
- </div>
19
-
20
- </div>
21
- <div class="row app-row">
22
- <div class="col-xs-4">
23
- <label>详细地址</label>
24
- </div>
25
- <div class="col-xs-8">
26
- <input class="input-font inputText4 " v-model=model.f_address style="width: 100%"></input>
27
- </div>
28
-
29
- </div>
30
- <div class="row app-row">
31
- <div class="col-xs-4">
32
- <label>用户类型</label>
33
- </div>
34
- <div class="col-xs-8">
35
- <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
36
- :options='user_types' placeholder='请选择用户类型'
37
- class="inputText4"
38
- :width="'100%'"
39
- :value-single="true"
40
- v-model="model.f_user_type" close-on-select clear-button></v-select>
41
-
42
- </div>
43
-
44
- </div>
45
-
46
- <div class="row app-row">
47
- <div class="col-xs-4">
48
- <label>是否上报</label>
49
- </div>
50
- <div class="col-xs-8">
51
- <v-select id="f_user_paidan" :value.sync="model.f_handlingtype" class="input-font"
52
- :options='handling_types' placeholder='请选择是否上报'
53
- class="inputText4"
54
- :width="'100%'"
55
- :value-single="true"
56
- v-model="model.f_handlingtype" close-on-select clear-button></v-select>
57
- </div>
58
-
59
- </div>
60
- <div class="row app-row" v-if="model.f_handlingtype=='转站点'">
61
- <div class="col-xs-4">
62
- <label>选择站点</label>
63
- </div>
64
- <div class="col-xs-8">
65
- <v-select id="f_user_paidan" :value.sync="model.f_reciever" class="input-font"
66
- :options='recievers' placeholder='请选择站点'
67
- class="inputText4"
68
- :width="'100%'"
69
- :value-single="true"
70
- v-model="model.f_reciever" close-on-select clear-button></v-select>
71
- <!-- <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" v-ref:f_reciever width="100%"
72
- style="width: 100%">-->
73
-
74
- </right-tree>
75
- </div>
76
-
77
- </div>
78
- <div class="row app-row">
79
- <div class="col-xs-4">
80
- <label>报修类型</label>
81
- </div>
82
- <div class="col-xs-8">
83
- <v-select id="f_qiangxiu" :value.sync="model.f_repairtype" class="input-font"
84
- :options='repairstypes' placeholder='请选择报修类型'
85
- class="inputText4"
86
- :width="'100%'"
87
- :value-single="true"
88
- v-model="model.f_repairtype" close-on-select clear-button></v-select>
89
- </div>
90
-
91
- </div>
92
- <div class="row app-row">
93
- <div class="col-xs-4">
94
- <label>故障类型</label>
95
- </div>
96
- <div class="col-xs-8">
97
- <v-select id="f_guzhang" :value.sync="failure" class="input-font"
98
- :options='failuretypes' placeholder='请选择故障类型'
99
- class="inputText4"
100
- :width="'100%'"
101
- multiple
102
- v-model="failure" clear-button></v-select>
103
- </div>
104
-
105
- </div>
106
- <div class="row app-row">
107
- <div class="col-xs-4">
108
- <label>备注</label>
109
- </div>
110
- <div class="col-xs-8">
111
- <textarea class="input-font " v-model=model.f_remarks style="width: 100%"></textarea>
112
- </div>
113
-
114
- </div>
115
- <div class="form-group col-sm-12">
116
-
117
- <div class="panel" style="padding: 10px 10px 5px 10px;">
118
- <div class="panel-body panel-self"
119
- style="background-color: #F8F8F8;width: 90%;margin-left:5%;height: 220px;position: relative">
120
- <div class="row" style="height: 180px;overflow: scroll;top: 1px">
121
- <div class="col-sm-4">
122
- <img-self :src="model.f_single_path" alt="抢修照片" :width="140" :height="170" capture="camera" type="file"
123
- @change="upload"></img-self>
124
- </div>
125
- </div>
126
-
127
- <div class="row text-right div-photo" style="height: 50px">
128
- <img src="../../assets/remove.png" @click="delfile('f_single_path', model.f_single_path)"/>
129
- <button type="button" name="button" class="btn btn-primary btn-photo"
130
- @click="takePic('f_single_path','抢修照片','拍照')">拍照
131
- </button>
132
- <button type="button" name="button" class="btn btn-primary btn-photo"
133
- @click="takePic('f_single_path','抢修照片','相册')">相册
134
- </button>
135
- </div>
136
- </div>
137
- </div>
138
-
139
- </div>
140
- <div class="form-group col-sm-12">
141
-
142
- <div class="panel" style="padding: 10px 10px 5px 10px;">
143
- <div class="panel-body panel-self"
144
- style="background-color: #F8F8F8;width: 90%;margin-left:5%;height: 220px;position: relative">
145
- <div class="row" style="height: 180px;overflow: scroll;top: 1px">
146
- <div class="col-sm-4">
147
- <img-self :src="model.f_singlea_path" alt="抢修照片" :width="140" :height="170" capture="camera" type="file"
148
- @change="upload"></img-self>
149
- </div>
150
- </div>
151
-
152
- <div class="row text-right div-photo" style="height: 50px">
153
- <img src="../../assets/remove.png" @click="delfile('f_singlea_path', model.f_singlea_path)"/>
154
- <button type="button" name="button" class="btn btn-primary btn-photo"
155
- @click="takePic1('f_singlea_path','抢修照片','拍照')">拍照
156
- </button>
157
- <button type="button" name="button" class="btn btn-primary btn-photo"
158
- @click="takePic1('f_singlea_path','抢修照片','相册')">相册
159
- </button>
160
- </div>
161
- </div>
162
- </div>
163
-
164
- </div>
165
- <div class="form-group col-sm-12">
166
-
167
- <div class="panel" style="padding: 10px 10px 5px 10px;">
168
- <div class="panel-body panel-self"
169
- style="background-color: #F8F8F8;width: 90%;margin-left:5%;height: 220px;position: relative">
170
- <div class="row" style="height: 180px;overflow: scroll;top: 1px">
171
- <div class="col-sm-4">
172
- <img-self :src="model.f_singleb_path" alt="抢修照片" :width="140" :height="170" capture="camera" type="file"
173
- @change="upload"></img-self>
174
- </div>
175
- </div>
176
-
177
- <div class="row text-right div-photo" style="height: 50px">
178
- <img src="../../assets/remove.png" @click="delfile('f_singleb_path', model.f_singleb_path)"/>
179
- <button type="button" name="button" class="btn btn-primary btn-photo"
180
- @click="takePic2('f_singleb_path','抢修照片','拍照')">拍照
181
- </button>
182
- <button type="button" name="button" class="btn btn-primary btn-photo"
183
- @click="takePic2('f_singleb_path','抢修照片','相册')">相册
184
- </button>
185
- </div>
186
- </div>
187
- </div>
188
-
189
- </div>
190
- <div class="row app-row text-center" style="margin-top: 20px;">
191
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="save">保存</button>
192
- </div>
193
-
194
- </div>
195
- </template>
196
-
197
- <script>
198
- import Vue from 'vue'
199
- import * as Util from '../../components/Util'
200
- import {HttpResetClass} from "vue-client";
201
- import * as ldapHelper from "system-phone/src/util/LdapHelper";
202
-
203
- export default {
204
- title: '在线维修处理',
205
- props: {
206
- userinfo: {
207
- type: Object,
208
- default: null
209
- },
210
- f_userinfo_id: {
211
- type: String,
212
- default: ''
213
- }
214
- },
215
- data() {
216
- return {
217
- source:
218
- 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
219
- 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
220
- userid: Vue.user.id,
221
- is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
222
- failure: [],
223
- model: {
224
- f_userinfo_id: '',
225
- f_userinfo_code: '',
226
- aState: null,
227
- f_address: '',
228
- f_area: "",
229
- f_attendant: Vue.user.name,
230
- f_building: "",
231
- f_card_id: "",
232
- f_contact_phone: "",
233
- f_depid: Vue.user.depids,
234
- f_filiale_id: "",
235
- f_floor: "",
236
- f_handlingtype: "转维修员",
237
- f_enter_number: '',
238
- f_meetunit: "",
239
- f_operator: Vue.user.name,
240
- f_operatorid: Vue.user.id,
241
- f_orgid: Vue.user.orgid,
242
- f_orgname: Vue.user.orgs,
243
- f_outlets: "",
244
- f_phone: "",
245
- f_reciever: "",
246
- f_remarks: "",
247
- f_repair_date: Util.getNowDate(),
248
- f_repairman_phone: "",
249
- f_repairtype: "整改",
250
- f_residential_area: "",
251
- f_room: "",
252
- f_service_id: "",
253
- f_source: "临时派单",
254
- f_street: "",
255
- f_unit: "",
256
- f_unit_name: "",
257
- f_user_name: "",
258
- f_user_type: "",
259
- failure: "",
260
- f_single_path: '',
261
- f_singlea_path: '',
262
- f_singleb_path: '',
263
- serviceacitivity: [{
264
- f_service_acitivity_type: "派单",
265
- f_reciever: Vue.user.name
266
- }]
267
- },
268
- repairstypes: this.$appdata.getParam('报修类型'),
269
- failuretypes: this.$appdata.getParam('在线维修故障类型'),
270
- recievers: [],
271
- user_types: [{label: "民用", value: "民用"},
272
- {label: "非民用", value: "非民用"}],
273
- repair_types: [{label: "民用", value: "民用"},
274
- {label: "非民用", value: "非民用"}],
275
- handling_types: [{label: "", value: "转站点"},
276
- {label: "否", value: "转维修员"}]
277
- }
278
- },
279
- methods: {
280
- delfile(prop, fileName) {
281
- if (fileName == Vue.nopic)
282
- return
283
- else {
284
- HostApp.delfile(fileName)
285
- this.model[prop] = Vue.nopic
286
- }
287
- },
288
- cameraCallBack(prop, fileName) {
289
- HostApp.__this__.model.f_single_path = fileName + '?' + Math.random()
290
- HostApp.__callback__ = null
291
- HostApp.__this__ = null
292
- },
293
- cameraCallBack1(prop, fileName) {
294
- HostApp.__this__.model.f_singlea_path = fileName + '?' + Math.random()
295
- HostApp.__callback__ = null
296
- HostApp.__this__ = null
297
- },
298
- cameraCallBack2(prop, fileName) {
299
- HostApp.__this__.model.f_singleb_path = fileName + '?' + Math.random()
300
- HostApp.__callback__ = null
301
- HostApp.__this__ = null
302
- },
303
-
304
- takePic(prop, title,type) {
305
- HostApp.__callback__ = this.cameraCallBack
306
- HostApp.__this__ = this
307
- let fileName
308
- if (!this.model.f_single_path || this.model.f_single_path.includes("nopic.png")) {
309
- fileName = Util.guid() + '-' + prop + '.jpg'
310
- } else {
311
- fileName = Util.getFileName(this.model.f_single_path)
312
- }
313
- let jingweidu = ''
314
- if (this.is_has_jingweidu == 'true') {
315
- const obj = HostApp.getGpsDetailAddress()
316
- jingweidu = '\t经度:' + obj.longitude + '\t纬度:' + obj.latitude
317
- }
318
- //tag
319
- //tag
320
- let page = 'com.aofeng.hybrid.android.peripheral.CameraActivity'
321
- if(type === '相册'){
322
- page ='com.aofeng.hybrid.android.peripheral.ActionPickActivity'
323
- }
324
- HostApp._open_a_page({
325
- type: 'boomerang',
326
- page: page,
327
- param: {
328
- file: fileName,
329
- requestCode: 111,
330
- callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
331
- watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name + jingweidu
332
- }
333
- })
334
- },
335
- takePic1(prop, title,type) {
336
- HostApp.__callback__ = this.cameraCallBack1
337
- HostApp.__this__ = this
338
- let fileName
339
- if (!this.model.f_singlea_path || this.model.f_singlea_path.includes("nopic.png")) {
340
- fileName = Util.guid() + '-' + prop + '.jpg'
341
- } else {
342
- fileName = Util.getFileName(this.model.f_singlea_path)
343
- }
344
- //tag
345
- //tag
346
- let page = 'com.aofeng.hybrid.android.peripheral.CameraActivity'
347
- if(type === '相册'){
348
- page ='com.aofeng.hybrid.android.peripheral.ActionPickActivity'
349
- }
350
- HostApp._open_a_page({
351
- type: 'boomerang',
352
- page: page,
353
- param: {
354
- file: fileName,
355
- requestCode: 111,
356
- callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
357
- watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
358
- }
359
- })
360
- },
361
- takePic2(prop, title,type) {
362
- HostApp.__callback__ = this.cameraCallBack2
363
- HostApp.__this__ = this
364
- let fileName
365
- if (!this.model.f_singleb_path || this.model.f_singleb_path.includes("nopic.png")) {
366
- fileName = Util.guid() + '-' + prop + '.jpg'
367
- } else {
368
- fileName = Util.getFileName(this.model.f_singleb_path)
369
- }
370
- //tag
371
- //tag
372
- let page = 'com.aofeng.hybrid.android.peripheral.CameraActivity'
373
- if(type === '相册'){
374
- page ='com.aofeng.hybrid.android.peripheral.ActionPickActivity'
375
- }
376
- HostApp._open_a_page({
377
- type: 'boomerang',
378
- page: page,
379
- param: {
380
- file: fileName,
381
- requestCode: 111,
382
- callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
383
- watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
384
- }
385
- })
386
- },
387
-
388
- save() {
389
- if (!this.model.f_address) {
390
- this.$showMessage('请填写地址信息')
391
- return
392
- }
393
- //tag)
394
- let data = {
395
- model: this.model, loginUser: {
396
- name: Vue.user.name,
397
- ename: Vue.user.ename
398
- }, user: null, callObj: null
399
- }
400
- this.model.serviceacitivity[0].f_meetunit = Vue.user.deps
401
- this.model.f_meetunit = Vue.user.deps
402
- this.model.f_orgid = Vue.user.orgid
403
- this.model.f_filiale = Vue.user.org
404
- this.model.f_outlets = Vue.user.deps
405
- this.model.f_filiale_id = Vue.user.orgid
406
- if (this.model.f_handlingtype == '转维修员') {
407
- data.toRepair = '一级派单'
408
- }else{
409
- this.model.serviceacitivity[0].f_reciever = this.model.f_reciever
410
- }
411
- //tag
412
- HostApp.__this__ = this
413
- HostApp.logicWithHint({
414
- 'logic': 'callerSendPhone', 'callback': 'javascript: HostApp.__this__.commitCallBack()',
415
- 'data': data, 'backresult': 1
416
- })
417
- },
418
- commitCallBack(jo) {
419
- if (jo.state == "ok" && this.model.f_handlingtype == '转站点') {
420
- this.$showMessage('抢修上报成功', ['confirm']).then((req) => {
421
- if (req === 'confirm') {
422
- this.$dispatch('confirm')
423
- }
424
- })
425
- } else if (jo.state == "ok" && this.model.f_handlingtype == '转维修员') {
426
- this.$showMessage('抢修上报成功,请前往待办工单页面查看', ['confirm']).then((req) => {
427
- if (req === 'confirm') {
428
- this.$dispatch('confirm')
429
- }
430
- })
431
- } else {
432
- this.$showMessage('服务器内部错误')
433
- }
434
- },
435
- reres(val) {
436
- if (val.res == undefined || val.res[0] == undefined || val.res[0] == '') {
437
- return
438
- }
439
- this.model.serviceacitivity[0].f_meetunit = val.res[0]
440
- this.model.f_meetunit = val.res[0]
441
- this.model.f_filiale_id = val.orgobj[0].parentid
442
- this.model.f_filiale = val.orgobj[0].parentname
443
- this.model.f_outlets = val.res[0]
444
- this.model.serviceacitivity[0].f_reciever = val.resids[0]
445
- },
446
- changeFailure(val) {
447
- let failure = []
448
- for (let i = 0; i < val.length; i++) {
449
- failure.push({"f_failure_type": val[i], "failurecase": []})
450
- }
451
- this.model.failure = JSON.stringify(failure)
452
- }
453
- },
454
- ready() {
455
- this.changeFailure(this.failure)
456
- // let gen = select(this)
457
- // co(gen)
458
- if (this.f_userinfo_id) {
459
- new HttpResetClass().load('POST', 'af-telephone/rs/sql/tel_getUserInfoAdress', {
460
- data: {
461
- condition: `ti.f_userinfo_id = '${this.f_userinfo_id}'`
462
- }
463
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
464
- this.userinfo = res.data[0]
465
- })
466
- }
467
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/search`, {
468
- source: this.source,
469
- userid: this.userid
470
- }).then((ret) => {
471
- console.log('向资源服务请求结束')
472
- // 去掉前面的两层节点
473
- ret.data.forEach((item) => {
474
- this.recievers.push({label: item.name, value: item.old_id})
475
- })
476
- })
477
- },
478
- watch: {
479
- 'failure'(val) {
480
- this.changeFailure(val)
481
- },
482
- 'userinfo'(val) {
483
- if (val) {
484
- this.model.f_user_name = val.f_user_name
485
- this.model.f_contact_phone = val.f_user_phone
486
- this.model.f_userinfo_id = val.f_userinfo_id
487
- this.model.f_userinfo_code = val.f_userinfo_code
488
- this.model.f_address = val.f_address
489
- this.model.f_user_type = val.f_user_type
490
- this.model.f_enter_number = val.f_enter_number
491
- }
492
- }
493
- }
494
- }
495
- </script>
496
-
497
- <style scoped>
498
- .inputText4 {
499
- font-family: Arial, Helvetica, sans-serif;
500
- background: none repeat scroll 0 0 #F5F7FD;
501
- border: 1px solid #B8BFE9;
502
- padding: 5px 7px;
503
- width: 100px;
504
- vertical-align: middle;
505
- height: 30px;
506
- font-size: 12px;
507
- margin: 0;
508
- list-style: none outside none;
509
- }
510
-
511
- .input-font {
512
- font: 15px PingFang-SC-Medium;
513
- color: #333333;
514
- }
515
-
516
- .app-row {
517
- background-color: white;
518
- padding: 10px 10px 0 10px;
519
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
520
- }
521
-
522
- .bg {
523
- background-color: blue;
524
- height: 1px;
525
- border: 0;
526
- }
527
-
528
- .app-row {
529
- background-color: white;
530
- padding: 10px 10px 0 10px;
531
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
532
- }
533
-
534
- .search_input {
535
- border: 0;
536
- outline: none;
537
- }
538
-
539
- .font {
540
- font: 15px PingFang-SC-Medium;
541
- color: #666666;
542
- }
543
-
544
- .input-font {
545
- font: 15px PingFang-SC-Medium;
546
- color: #333333;
547
- }
548
-
549
- .btn-font {
550
- font: 600 16px PingFang-SC-Bold;
551
- color: #499EDF;
552
- }
553
-
554
- .btn-color {
555
- background-color: #FFFFFF;
556
- border-radius: 10px;
557
- border: 1px solid #499EDF;
558
- }
559
-
560
- .app-text {
561
- font-size: 12px;
562
- }
563
- </style>
1
+ <template>
2
+ <div style="height: auto;width: 100%">
3
+ <div class="row app-row">
4
+ <div class="col-xs-4">
5
+ <label>用户姓名</label>
6
+ </div>
7
+ <div class="col-xs-8">
8
+ <input class="inputText4" v-model=model.f_user_name style="width: 100%"></input>
9
+ </div>
10
+
11
+ </div>
12
+ <div class="row app-row">
13
+ <div class="col-xs-4">
14
+ <label>联系电话</label>
15
+ </div>
16
+ <div class="col-xs-8">
17
+ <input class="input-font inputText4 " v-model=model.f_contact_phone style="width: 100%"></input>
18
+ </div>
19
+
20
+ </div>
21
+ <div class="row app-row">
22
+ <div class="col-xs-4">
23
+ <label>详细地址</label>
24
+ </div>
25
+ <div class="col-xs-8">
26
+ <input class="input-font inputText4 " v-model=model.f_address style="width: 100%"></input>
27
+ </div>
28
+
29
+ </div>
30
+ <div class="row app-row">
31
+ <div class="col-xs-4">
32
+ <label>用户类型</label>
33
+ </div>
34
+ <div class="col-xs-8">
35
+ <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
36
+ :options='user_types' placeholder='请选择用户类型'
37
+ class="inputText4"
38
+ :width="'100%'"
39
+ :value-single="true"
40
+ v-model="model.f_user_type" close-on-select clear-button></v-select>
41
+
42
+ </div>
43
+
44
+ </div>
45
+
46
+ <div class="row app-row">
47
+ <div class="col-xs-4">
48
+ <label>是否上报</label>
49
+ </div>
50
+ <div class="col-xs-8">
51
+ <v-select id="f_user_paidan" :value.sync="model.f_handlingtype" class="input-font"
52
+ :options='handling_types' placeholder='请选择是否上报'
53
+ class="inputText4"
54
+ :width="'100%'"
55
+ :value-single="true"
56
+ v-model="model.f_handlingtype" close-on-select clear-button></v-select>
57
+ </div>
58
+
59
+ </div>
60
+ <div class="row app-row" v-if="model.f_handlingtype=='转站点'">
61
+ <div class="col-xs-4">
62
+ <label>选择站点</label>
63
+ </div>
64
+ <div class="col-xs-8">
65
+ <v-select id="f_user_paidan" :value.sync="model.f_reciever" class="input-font"
66
+ :options='recievers' placeholder='请选择站点'
67
+ class="inputText4"
68
+ :width="'100%'"
69
+ :value-single="true"
70
+ v-model="model.f_reciever" close-on-select clear-button></v-select>
71
+ <!-- <right-tree islist :userid="userid" :source="source" v-on:re-res="reres" v-ref:f_reciever width="100%"
72
+ style="width: 100%">-->
73
+
74
+ </right-tree>
75
+ </div>
76
+
77
+ </div>
78
+ <div class="row app-row">
79
+ <div class="col-xs-4">
80
+ <label>报修类型</label>
81
+ </div>
82
+ <div class="col-xs-8">
83
+ <v-select id="f_qiangxiu" :value.sync="model.f_repairtype" class="input-font"
84
+ :options='repairstypes' placeholder='请选择报修类型'
85
+ class="inputText4"
86
+ :width="'100%'"
87
+ :value-single="true"
88
+ v-model="model.f_repairtype" close-on-select clear-button></v-select>
89
+ </div>
90
+
91
+ </div>
92
+ <div class="row app-row">
93
+ <div class="col-xs-4">
94
+ <label>故障类型</label>
95
+ </div>
96
+ <div class="col-xs-8">
97
+ <v-select id="f_guzhang" :value.sync="failure" class="input-font"
98
+ :options='failuretypes' placeholder='请选择故障类型'
99
+ class="inputText4"
100
+ :width="'100%'"
101
+ multiple
102
+ v-model="failure" clear-button></v-select>
103
+ </div>
104
+
105
+ </div>
106
+ <div class="row app-row">
107
+ <div class="col-xs-4">
108
+ <label>备注</label>
109
+ </div>
110
+ <div class="col-xs-8">
111
+ <textarea class="input-font " v-model=model.f_remarks style="width: 100%"></textarea>
112
+ </div>
113
+
114
+ </div>
115
+ <div class="form-group col-sm-12">
116
+
117
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
118
+ <div class="panel-body panel-self"
119
+ style="background-color: #F8F8F8;width: 90%;margin-left:5%;height: 220px;position: relative">
120
+ <div class="row" style="height: 180px;overflow: scroll;top: 1px">
121
+ <div class="col-sm-4">
122
+ <img-self :src="model.f_single_path" alt="抢修照片" :width="140" :height="170" capture="camera" type="file"
123
+ @change="upload"></img-self>
124
+ </div>
125
+ </div>
126
+
127
+ <div class="row text-right div-photo" style="height: 50px">
128
+ <img src="../../assets/remove.png" @click="delfile('f_single_path', model.f_single_path)"/>
129
+ <button type="button" name="button" class="btn btn-primary btn-photo"
130
+ @click="takePic('f_single_path','抢修照片','拍照')">拍照
131
+ </button>
132
+ <button type="button" name="button" class="btn btn-primary btn-photo"
133
+ @click="takePic('f_single_path','抢修照片','相册')">相册
134
+ </button>
135
+ </div>
136
+ </div>
137
+ </div>
138
+
139
+ </div>
140
+ <div class="form-group col-sm-12">
141
+
142
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
143
+ <div class="panel-body panel-self"
144
+ style="background-color: #F8F8F8;width: 90%;margin-left:5%;height: 220px;position: relative">
145
+ <div class="row" style="height: 180px;overflow: scroll;top: 1px">
146
+ <div class="col-sm-4">
147
+ <img-self :src="model.f_singlea_path" alt="抢修照片" :width="140" :height="170" capture="camera" type="file"
148
+ @change="upload"></img-self>
149
+ </div>
150
+ </div>
151
+
152
+ <div class="row text-right div-photo" style="height: 50px">
153
+ <img src="../../assets/remove.png" @click="delfile('f_singlea_path', model.f_singlea_path)"/>
154
+ <button type="button" name="button" class="btn btn-primary btn-photo"
155
+ @click="takePic1('f_singlea_path','抢修照片','拍照')">拍照
156
+ </button>
157
+ <button type="button" name="button" class="btn btn-primary btn-photo"
158
+ @click="takePic1('f_singlea_path','抢修照片','相册')">相册
159
+ </button>
160
+ </div>
161
+ </div>
162
+ </div>
163
+
164
+ </div>
165
+ <div class="form-group col-sm-12">
166
+
167
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
168
+ <div class="panel-body panel-self"
169
+ style="background-color: #F8F8F8;width: 90%;margin-left:5%;height: 220px;position: relative">
170
+ <div class="row" style="height: 180px;overflow: scroll;top: 1px">
171
+ <div class="col-sm-4">
172
+ <img-self :src="model.f_singleb_path" alt="抢修照片" :width="140" :height="170" capture="camera" type="file"
173
+ @change="upload"></img-self>
174
+ </div>
175
+ </div>
176
+
177
+ <div class="row text-right div-photo" style="height: 50px">
178
+ <img src="../../assets/remove.png" @click="delfile('f_singleb_path', model.f_singleb_path)"/>
179
+ <button type="button" name="button" class="btn btn-primary btn-photo"
180
+ @click="takePic2('f_singleb_path','抢修照片','拍照')">拍照
181
+ </button>
182
+ <button type="button" name="button" class="btn btn-primary btn-photo"
183
+ @click="takePic2('f_singleb_path','抢修照片','相册')">相册
184
+ </button>
185
+ </div>
186
+ </div>
187
+ </div>
188
+
189
+ </div>
190
+ <div class="row app-row text-center" style="margin-top: 20px;">
191
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="save">保存</button>
192
+ </div>
193
+
194
+ </div>
195
+ </template>
196
+
197
+ <script>
198
+ import Vue from 'vue'
199
+ import * as Util from '../../components/Util'
200
+ import {HttpResetClass} from "vue-client";
201
+
202
+ export default {
203
+ title: '在线维修处理',
204
+ props: {
205
+ userinfo: {
206
+ type: Object,
207
+ default: null
208
+ },
209
+ f_userinfo_id: {
210
+ type: String,
211
+ default: ''
212
+ }
213
+ },
214
+ data() {
215
+ return {
216
+ source:
217
+ 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
218
+ 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
219
+ userid: Vue.user.id,
220
+ is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
221
+ failure: [],
222
+ model: {
223
+ f_userinfo_id: '',
224
+ f_userinfo_code: '',
225
+ aState: null,
226
+ f_address: '',
227
+ f_area: "",
228
+ f_attendant: Vue.user.name,
229
+ f_building: "",
230
+ f_card_id: "",
231
+ f_contact_phone: "",
232
+ f_depid: Vue.user.depids,
233
+ f_filiale_id: "",
234
+ f_floor: "",
235
+ f_handlingtype: "转维修员",
236
+ f_enter_number: '',
237
+ f_meetunit: "",
238
+ f_operator: Vue.user.name,
239
+ f_operatorid: Vue.user.id,
240
+ f_orgid: Vue.user.orgid,
241
+ f_orgname: Vue.user.orgs,
242
+ f_outlets: "",
243
+ f_phone: "",
244
+ f_reciever: "",
245
+ f_remarks: "",
246
+ f_repair_date: Util.getNowDate(),
247
+ f_repairman_phone: "",
248
+ f_repairtype: "整改",
249
+ f_residential_area: "",
250
+ f_room: "",
251
+ f_service_id: "",
252
+ f_source: "临时派单",
253
+ f_street: "",
254
+ f_unit: "",
255
+ f_unit_name: "",
256
+ f_user_name: "",
257
+ f_user_type: "",
258
+ failure: "",
259
+ f_single_path: '',
260
+ f_singlea_path: '',
261
+ f_singleb_path: '',
262
+ serviceacitivity: [{
263
+ f_service_acitivity_type: "派单",
264
+ f_reciever: Vue.user.name
265
+ }]
266
+ },
267
+ repairstypes: this.$appdata.getParam('报修类型'),
268
+ failuretypes: this.$appdata.getParam('在线维修故障类型'),
269
+ recievers: [],
270
+ user_types: [{label: "民用", value: "民用"},
271
+ {label: "非民用", value: "非民用"}],
272
+ repair_types: [{label: "民用", value: "民用"},
273
+ {label: "非民用", value: "非民用"}],
274
+ handling_types: [{label: "", value: "转站点"},
275
+ {label: "", value: "转维修员"}]
276
+ }
277
+ },
278
+ methods: {
279
+ delfile(prop, fileName) {
280
+ if (fileName == Vue.nopic)
281
+ return
282
+ else {
283
+ HostApp.delfile(fileName)
284
+ this.model[prop] = Vue.nopic
285
+ }
286
+ },
287
+ cameraCallBack(prop, fileName) {
288
+ HostApp.__this__.model.f_single_path = fileName + '?' + Math.random()
289
+ HostApp.__callback__ = null
290
+ HostApp.__this__ = null
291
+ },
292
+ cameraCallBack1(prop, fileName) {
293
+ HostApp.__this__.model.f_singlea_path = fileName + '?' + Math.random()
294
+ HostApp.__callback__ = null
295
+ HostApp.__this__ = null
296
+ },
297
+ cameraCallBack2(prop, fileName) {
298
+ HostApp.__this__.model.f_singleb_path = fileName + '?' + Math.random()
299
+ HostApp.__callback__ = null
300
+ HostApp.__this__ = null
301
+ },
302
+
303
+ takePic(prop, title,type) {
304
+ HostApp.__callback__ = this.cameraCallBack
305
+ HostApp.__this__ = this
306
+ let fileName
307
+ if (!this.model.f_single_path || this.model.f_single_path.includes("nopic.png")) {
308
+ fileName = Util.guid() + '-' + prop + '.jpg'
309
+ } else {
310
+ fileName = Util.getFileName(this.model.f_single_path)
311
+ }
312
+ let jingweidu = ''
313
+ if (this.is_has_jingweidu == 'true') {
314
+ const obj = HostApp.getGpsDetailAddress()
315
+ jingweidu = '\t经度:' + obj.longitude + '\t纬度:' + obj.latitude
316
+ }
317
+ //tag
318
+ //tag
319
+ let page = 'com.aofeng.hybrid.android.peripheral.CameraActivity'
320
+ if(type === '相册'){
321
+ page ='com.aofeng.hybrid.android.peripheral.ActionPickActivity'
322
+ }
323
+ HostApp._open_a_page({
324
+ type: 'boomerang',
325
+ page: page,
326
+ param: {
327
+ file: fileName,
328
+ requestCode: 111,
329
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
330
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name + jingweidu
331
+ }
332
+ })
333
+ },
334
+ takePic1(prop, title,type) {
335
+ HostApp.__callback__ = this.cameraCallBack1
336
+ HostApp.__this__ = this
337
+ let fileName
338
+ if (!this.model.f_singlea_path || this.model.f_singlea_path.includes("nopic.png")) {
339
+ fileName = Util.guid() + '-' + prop + '.jpg'
340
+ } else {
341
+ fileName = Util.getFileName(this.model.f_singlea_path)
342
+ }
343
+ //tag
344
+ //tag
345
+ let page = 'com.aofeng.hybrid.android.peripheral.CameraActivity'
346
+ if(type === '相册'){
347
+ page ='com.aofeng.hybrid.android.peripheral.ActionPickActivity'
348
+ }
349
+ HostApp._open_a_page({
350
+ type: 'boomerang',
351
+ page: page,
352
+ param: {
353
+ file: fileName,
354
+ requestCode: 111,
355
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
356
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
357
+ }
358
+ })
359
+ },
360
+ takePic2(prop, title,type) {
361
+ HostApp.__callback__ = this.cameraCallBack2
362
+ HostApp.__this__ = this
363
+ let fileName
364
+ if (!this.model.f_singleb_path || this.model.f_singleb_path.includes("nopic.png")) {
365
+ fileName = Util.guid() + '-' + prop + '.jpg'
366
+ } else {
367
+ fileName = Util.getFileName(this.model.f_singleb_path)
368
+ }
369
+ //tag
370
+ //tag
371
+ let page = 'com.aofeng.hybrid.android.peripheral.CameraActivity'
372
+ if(type === '相册'){
373
+ page ='com.aofeng.hybrid.android.peripheral.ActionPickActivity'
374
+ }
375
+ HostApp._open_a_page({
376
+ type: 'boomerang',
377
+ page: page,
378
+ param: {
379
+ file: fileName,
380
+ requestCode: 111,
381
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
382
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
383
+ }
384
+ })
385
+ },
386
+
387
+ save() {
388
+ if (!this.model.f_address) {
389
+ this.$showMessage('请填写地址信息')
390
+ return
391
+ }
392
+ //tag)
393
+ let data = {
394
+ model: this.model, loginUser: {
395
+ name: Vue.user.name,
396
+ ename: Vue.user.ename
397
+ }, user: null, callObj: null
398
+ }
399
+ this.model.serviceacitivity[0].f_meetunit = Vue.user.deps
400
+ this.model.f_meetunit = Vue.user.deps
401
+ this.model.f_orgid = Vue.user.orgid
402
+ this.model.f_filiale = Vue.user.org
403
+ this.model.f_outlets = Vue.user.deps
404
+ this.model.f_filiale_id = Vue.user.orgid
405
+ if (this.model.f_handlingtype == '转维修员') {
406
+ data.toRepair = '一级派单'
407
+ }else{
408
+ this.model.serviceacitivity[0].f_reciever = this.model.f_reciever
409
+ }
410
+ //tag
411
+ HostApp.__this__ = this
412
+ HostApp.logicWithHint({
413
+ 'logic': 'callerSendPhone', 'callback': 'javascript: HostApp.__this__.commitCallBack()',
414
+ 'data': data, 'backresult': 1
415
+ })
416
+ },
417
+ commitCallBack(jo) {
418
+ if (jo.state == "ok" && this.model.f_handlingtype == '转站点') {
419
+ this.$showMessage('抢修上报成功', ['confirm']).then((req) => {
420
+ if (req === 'confirm') {
421
+ this.$dispatch('confirm')
422
+ }
423
+ })
424
+ } else if (jo.state == "ok" && this.model.f_handlingtype == '转维修员') {
425
+ this.$showMessage('抢修上报成功,请前往待办工单页面查看', ['confirm']).then((req) => {
426
+ if (req === 'confirm') {
427
+ this.$dispatch('confirm')
428
+ }
429
+ })
430
+ } else {
431
+ this.$showMessage('服务器内部错误')
432
+ }
433
+ },
434
+ reres(val) {
435
+ if (val.res == undefined || val.res[0] == undefined || val.res[0] == '') {
436
+ return
437
+ }
438
+ this.model.serviceacitivity[0].f_meetunit = val.res[0]
439
+ this.model.f_meetunit = val.res[0]
440
+ this.model.f_filiale_id = val.orgobj[0].parentid
441
+ this.model.f_filiale = val.orgobj[0].parentname
442
+ this.model.f_outlets = val.res[0]
443
+ this.model.serviceacitivity[0].f_reciever = val.resids[0]
444
+ },
445
+ changeFailure(val) {
446
+ let failure = []
447
+ for (let i = 0; i < val.length; i++) {
448
+ failure.push({"f_failure_type": val[i], "failurecase": []})
449
+ }
450
+ this.model.failure = JSON.stringify(failure)
451
+ }
452
+ },
453
+ ready() {
454
+ this.changeFailure(this.failure)
455
+ // let gen = select(this)
456
+ // co(gen)
457
+ if (this.f_userinfo_id) {
458
+ new HttpResetClass().load('POST', 'af-telephone/rs/sql/tel_getUserInfoAdress', {
459
+ data: {
460
+ condition: `ti.f_userinfo_id = '${this.f_userinfo_id}'`
461
+ }
462
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
463
+ this.userinfo = res.data[0]
464
+ })
465
+ }
466
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/search`, {
467
+ source: this.source,
468
+ userid: this.userid
469
+ }).then((ret) => {
470
+ console.log('向资源服务请求结束')
471
+ // 去掉前面的两层节点
472
+ ret.data.forEach((item) => {
473
+ this.recievers.push({label: item.name, value: item.old_id})
474
+ })
475
+ })
476
+ },
477
+ watch: {
478
+ 'failure'(val) {
479
+ this.changeFailure(val)
480
+ },
481
+ 'userinfo'(val) {
482
+ if (val) {
483
+ this.model.f_user_name = val.f_user_name
484
+ this.model.f_contact_phone = val.f_user_phone
485
+ this.model.f_userinfo_id = val.f_userinfo_id
486
+ this.model.f_userinfo_code = val.f_userinfo_code
487
+ this.model.f_address = val.f_address
488
+ this.model.f_user_type = val.f_user_type
489
+ this.model.f_enter_number = val.f_enter_number
490
+ }
491
+ }
492
+ }
493
+ }
494
+ </script>
495
+
496
+ <style scoped>
497
+ .inputText4 {
498
+ font-family: Arial, Helvetica, sans-serif;
499
+ background: none repeat scroll 0 0 #F5F7FD;
500
+ border: 1px solid #B8BFE9;
501
+ padding: 5px 7px;
502
+ width: 100px;
503
+ vertical-align: middle;
504
+ height: 30px;
505
+ font-size: 12px;
506
+ margin: 0;
507
+ list-style: none outside none;
508
+ }
509
+
510
+ .input-font {
511
+ font: 15px PingFang-SC-Medium;
512
+ color: #333333;
513
+ }
514
+
515
+ .app-row {
516
+ background-color: white;
517
+ padding: 10px 10px 0 10px;
518
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
519
+ }
520
+
521
+ .bg {
522
+ background-color: blue;
523
+ height: 1px;
524
+ border: 0;
525
+ }
526
+
527
+ .app-row {
528
+ background-color: white;
529
+ padding: 10px 10px 0 10px;
530
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
531
+ }
532
+
533
+ .search_input {
534
+ border: 0;
535
+ outline: none;
536
+ }
537
+
538
+ .font {
539
+ font: 15px PingFang-SC-Medium;
540
+ color: #666666;
541
+ }
542
+
543
+ .input-font {
544
+ font: 15px PingFang-SC-Medium;
545
+ color: #333333;
546
+ }
547
+
548
+ .btn-font {
549
+ font: 600 16px PingFang-SC-Bold;
550
+ color: #499EDF;
551
+ }
552
+
553
+ .btn-color {
554
+ background-color: #FFFFFF;
555
+ border-radius: 10px;
556
+ border: 1px solid #499EDF;
557
+ }
558
+
559
+ .app-text {
560
+ font-size: 12px;
561
+ }
562
+ </style>