|
@@ -27,11 +27,14 @@
|
27
|
27
|
>
|
28
|
28
|
<cube-form-group>
|
29
|
29
|
<cube-form-item
|
|
30
|
+ :field="fields[24]"
|
|
31
|
+ class="btn_plcaeholde"
|
|
32
|
+ ></cube-form-item>
|
|
33
|
+ <cube-form-item
|
30
|
34
|
:field="fields[20]"
|
31
|
35
|
v-if="valConfig == 2"
|
32
|
36
|
class="btn_plcaeholde btn_local"
|
33
|
37
|
>
|
34
|
|
- <!-- <cube-button @click="showPlacePicker()">{{selectedPlaceTxt?selectedPlaceTxt:'请输入故障地点'}}</cube-button> -->
|
35
|
38
|
<input
|
36
|
39
|
type="text"
|
37
|
40
|
class="inp_local"
|
|
@@ -42,6 +45,20 @@
|
42
|
45
|
/>
|
43
|
46
|
</cube-form-item>
|
44
|
47
|
<cube-form-item
|
|
48
|
+ :field="fields[25]"
|
|
49
|
+ v-if="valConfig == 2"
|
|
50
|
+ class="btn_plcaeholde btn_local"
|
|
51
|
+ >
|
|
52
|
+ <input
|
|
53
|
+ type="text"
|
|
54
|
+ class="inp_local"
|
|
55
|
+ placeholder="请输入报修人"
|
|
56
|
+ v-model="userInpVal"
|
|
57
|
+ @input="changeUserList()"
|
|
58
|
+ @click="showUserPicker()"
|
|
59
|
+ />
|
|
60
|
+ </cube-form-item>
|
|
61
|
+ <cube-form-item
|
45
|
62
|
v-if="valConfig == 1"
|
46
|
63
|
:field="fields[0]"
|
47
|
64
|
></cube-form-item>
|
|
@@ -52,43 +69,20 @@
|
52
|
69
|
<cube-form-item :field="fields[1]"></cube-form-item>
|
53
|
70
|
<cube-form-item :field="fields[2]" class="btn_plcaeholde">
|
54
|
71
|
<cube-button @click="showPlacePicker()">{{
|
55
|
|
- selectedPlaceTxt ? selectedPlaceTxt : "请选择区域地点"
|
|
72
|
+ selectedPlaceTxt ? selectedPlaceTxt : "请选择院区楼栋"
|
56
|
73
|
}}</cube-button>
|
57
|
74
|
</cube-form-item>
|
58
|
75
|
<cube-form-item :field="fields[23]" v-if="ifRoom == 1"></cube-form-item>
|
59
|
|
- <!-- 故障地点: -->
|
60
|
|
- <!-- <cube-form-item :field="fields[19]" class="btn_plcaeholde btn_local"> -->
|
61
|
|
- <!-- <cube-button @click="showPlacePicker()">{{selectedPlaceTxt?selectedPlaceTxt:'请输入故障地点'}}</cube-button> -->
|
62
|
|
- <!-- <input
|
63
|
|
- type="text"
|
64
|
|
- class="inp_local"
|
65
|
|
- placeholder="请输入故障地点"
|
66
|
|
- v-model="inpLocalVal"
|
67
|
|
- @input="changeLocalList()"
|
68
|
|
- @click="showPlacePicker()"
|
69
|
|
- />
|
70
|
|
- </cube-form-item> -->
|
71
|
76
|
<cube-form-item :field="fields[3]"></cube-form-item>
|
72
|
77
|
<cube-form-item :field="fields[4]" class="btn_plcaeholde">
|
73
|
78
|
<cube-button @click="showCategoryPicker()">{{
|
74
|
|
- selectedCategoryTxt ? selectedCategoryTxt : "请选择事件分类"
|
|
79
|
+ selectedCategoryTxt ? selectedCategoryTxt : "请选择故障现象"
|
75
|
80
|
}}</cube-button>
|
76
|
81
|
</cube-form-item>
|
77
|
82
|
<cube-form-item
|
78
|
83
|
:field="fields[5]"
|
79
|
84
|
class="btn_plcaeholde"
|
80
|
85
|
></cube-form-item>
|
81
|
|
- <!-- <cube-form-item :field="fields[6]" class="btn_plcaeholde incidentTitle">
|
82
|
|
- <div class="titleRefer">
|
83
|
|
- <textarea
|
84
|
|
- class="titleTxtArea fl"
|
85
|
|
- placeholder="请输入事件主题"
|
86
|
|
- v-model="incidentTitle"
|
87
|
|
- @input="inpTitle()"
|
88
|
|
- ></textarea>
|
89
|
|
- <span class="abtn fl" @click="referKnowledge()">引入知识库</span>
|
90
|
|
- </div>
|
91
|
|
- </cube-form-item>-->
|
92
|
86
|
<cube-form-item :field="fields[7]"></cube-form-item>
|
93
|
87
|
<div class="label formLabel">
|
94
|
88
|
报修图片
|
|
@@ -96,7 +90,8 @@
|
96
|
90
|
</div>
|
97
|
91
|
<div class="uplod">
|
98
|
92
|
<cube-upload
|
99
|
|
- ref="upload"
|
|
93
|
+ ref="upload"
|
|
94
|
+ v-model="imgFiles"
|
100
|
95
|
:max="3"
|
101
|
96
|
:action="action"
|
102
|
97
|
:simultaneous-uploads="3"
|
|
@@ -104,8 +99,6 @@
|
104
|
99
|
@file-submitted="fileSubmitted"
|
105
|
100
|
/>
|
106
|
101
|
</div>
|
107
|
|
- <!-- <cube-form-item :field="fields[8]" class="btn_plcaeholde"></cube-form-item>
|
108
|
|
- <cube-form-item :field="fields[9]" class="btn_plcaeholde"></cube-form-item>-->
|
109
|
102
|
<cube-form-item
|
110
|
103
|
:field="fields[10]"
|
111
|
104
|
class="btn_plcaeholde"
|
|
@@ -117,6 +110,11 @@
|
117
|
110
|
></cube-form-item>
|
118
|
111
|
<span class="icon dash dash-saoyisao zc-sao" @click="scan()"></span>
|
119
|
112
|
</div>
|
|
113
|
+ <cube-form-item :field="fields[26]" class="btn_plcaeholde">
|
|
114
|
+ <cube-button @click="showTimePicker()">{{
|
|
115
|
+ selectedYytimeTxt ? selectedYytimeTxt : "请选择预约时间"
|
|
116
|
+ }}</cube-button>
|
|
117
|
+ </cube-form-item>
|
120
|
118
|
<div class="label" id="handlerInfo">处理信息</div>
|
121
|
119
|
<div class="handleRadio">
|
122
|
120
|
<cube-radio-group
|
|
@@ -128,11 +126,11 @@
|
128
|
126
|
/>
|
129
|
127
|
</div>
|
130
|
128
|
<!-- 直接处理 begin -->
|
131
|
|
- <cube-form-item
|
|
129
|
+ <!-- <cube-form-item
|
132
|
130
|
v-if="order == 1"
|
133
|
131
|
:field="fields[11]"
|
134
|
132
|
class="btn_plcaeholde"
|
135
|
|
- ></cube-form-item>
|
|
133
|
+ ></cube-form-item> -->
|
136
|
134
|
<cube-form-item
|
137
|
135
|
v-if="order == 1"
|
138
|
136
|
:field="fields[12]"
|
|
@@ -143,7 +141,7 @@
|
143
|
141
|
:field="fields[13]"
|
144
|
142
|
class="btn_plcaeholde"
|
145
|
143
|
></cube-form-item>
|
146
|
|
- <div v-if="order == 1" class="label formLabel">
|
|
144
|
+ <!-- <div v-if="order == 1" class="label formLabel">
|
147
|
145
|
报修图片
|
148
|
146
|
<span>(最多可上传3张JPG或PNG,每张不能超过10M)</span>
|
149
|
147
|
</div>
|
|
@@ -156,8 +154,8 @@
|
156
|
154
|
@files-added="filesAdded1"
|
157
|
155
|
@file-submitted="fileSubmitted1"
|
158
|
156
|
/>
|
159
|
|
- </div>
|
160
|
|
- <cube-form-item v-if="order == 1" :field="fields[14]"></cube-form-item>
|
|
157
|
+ </div> -->
|
|
158
|
+ <!-- <cube-form-item v-if="order == 1" :field="fields[14]"></cube-form-item> -->
|
161
|
159
|
<cube-form-item
|
162
|
160
|
v-if="order == 1 && model.knowledge == true"
|
163
|
161
|
:field="fields[15]"
|
|
@@ -192,6 +190,7 @@
|
192
|
190
|
</div>
|
193
|
191
|
</template>
|
194
|
192
|
<script>
|
|
193
|
+import dateFormat from 'seiminutils/es/dateFormat';
|
195
|
194
|
import seiminModel from "./../custom/seiminModel";
|
196
|
195
|
import CubePage from "./../components/cube-page.vue";
|
197
|
196
|
import CubeButtonGroup from "./../components/cube-button-group.vue";
|
|
@@ -214,7 +213,7 @@ const solution = {
|
214
|
213
|
return {
|
215
|
214
|
selected: [],
|
216
|
215
|
selectData: [],
|
217
|
|
- initVal: JSON.parse(localStorage.getItem("solution")) || [0, 0, 0],
|
|
216
|
+ initVal: [0, 0, 0],
|
218
|
217
|
allPlace: {}, //存放请求到的所有区域地点
|
219
|
218
|
sleectHouseNumber: {}, //区域地点
|
220
|
219
|
initSjList: [], //原始事件列表
|
|
@@ -251,7 +250,6 @@ const solution = {
|
251
|
250
|
});
|
252
|
251
|
this.selected = selected;
|
253
|
252
|
this.$emit("input", selectedVal);
|
254
|
|
- localStorage.setItem("solution", JSON.stringify(selectedIndex));
|
255
|
253
|
},
|
256
|
254
|
// 获取事件分类数据
|
257
|
255
|
getTree() {
|
|
@@ -318,8 +316,11 @@ const solution = {
|
318
|
316
|
export default {
|
319
|
317
|
data() {
|
320
|
318
|
return {
|
|
319
|
+ imgFiles: [],
|
|
320
|
+ selectDeptIndex:[0],
|
|
321
|
+ selectUserIndex:[0],
|
|
322
|
+ selectedPlaceIndex:[0, 0],
|
321
|
323
|
validity: {},
|
322
|
|
-
|
323
|
324
|
valid: undefined,
|
324
|
325
|
action: {
|
325
|
326
|
target:
|
|
@@ -349,22 +350,28 @@ export default {
|
349
|
350
|
incidentTitle: "", //事件主题
|
350
|
351
|
referenceInfo: {}, //引用信息
|
351
|
352
|
placeSelectData: [], //区域地点下拉框选项
|
352
|
|
- inpLocalVal: "", //故障地点输入框
|
|
353
|
+ // inpLocalVal: "", //故障地点输入框
|
353
|
354
|
faultLocationList: [], //区域地点拼接下拉框选项
|
354
|
355
|
deptInpVal: "", //报修科室输入框
|
355
|
356
|
deptList: [], //报修科室下拉选项
|
356
|
357
|
deptRes: "", //下拉框科室信息
|
|
358
|
+ userInpVal: "", //报修人输入框
|
|
359
|
+ userList: [], //报修人下拉选项
|
|
360
|
+ userRes: "", //下拉框报修人信息
|
357
|
361
|
model: {
|
|
362
|
+ contacts: "",
|
358
|
363
|
contactsInformation: "",
|
359
|
364
|
placeValue: [],
|
360
|
365
|
address: "", //故障地点
|
361
|
366
|
requester: "", //报修科室
|
|
367
|
+ requesterUser: "", //报修人
|
362
|
368
|
houseNumber: "", //详细地址
|
363
|
369
|
description: "", //事件描述
|
364
|
370
|
// bxcode: "",
|
365
|
371
|
assetId: "", //资产
|
366
|
372
|
category: [],
|
367
|
373
|
source: "", //事件来源
|
|
374
|
+ branch: "", //院区
|
368
|
375
|
title: "", //事件主题
|
369
|
376
|
priority: "", //优先级
|
370
|
377
|
emergency: "", //紧急度
|
|
@@ -377,14 +384,17 @@ export default {
|
377
|
384
|
candidateGroups: "", //处理组
|
378
|
385
|
solutionType: [], //知识库类型
|
379
|
386
|
handleUserOrGroup: false, //处理人or处理组
|
380
|
|
- room: "" //房间号
|
|
387
|
+ room: "", //房间号
|
381
|
388
|
},
|
382
|
389
|
selectedCategoryTxt: "", //事件分类选中展示
|
383
|
390
|
selectedPlaceTxt: "", //区域地点选中展示
|
|
391
|
+ selectedYytimeTxt: dateFormat(Date.now(),'yyyy-MM-dd hh:mm'), //预约时间
|
|
392
|
+ selectedYytimeStamp: 0, //预约时间戳
|
384
|
393
|
// showPrompting:false,
|
385
|
394
|
promptingConent: "",
|
386
|
395
|
promptingStatus: "",
|
387
|
396
|
order: 1, //处理方式 1:直接处理,2:派单
|
|
397
|
+ branchArr: [], //院区数组
|
388
|
398
|
sourceArr: [], //事件来源数组
|
389
|
399
|
priorityArr: [], //优先级数组
|
390
|
400
|
emergencyArr: [], //紧急度数组
|
|
@@ -431,12 +441,12 @@ export default {
|
431
|
441
|
{
|
432
|
442
|
component: "button",
|
433
|
443
|
modelKey: "placeValue",
|
434
|
|
- label: "区域地点:",
|
|
444
|
+ label: "院区楼栋:",
|
435
|
445
|
rules: {
|
436
|
446
|
required: false
|
437
|
447
|
},
|
438
|
448
|
messages: {
|
439
|
|
- required: "请选择区域地点"
|
|
449
|
+ required: "请选择院区楼栋"
|
440
|
450
|
}
|
441
|
451
|
},
|
442
|
452
|
{
|
|
@@ -454,7 +464,7 @@ export default {
|
454
|
464
|
{
|
455
|
465
|
component: "button",
|
456
|
466
|
modelKey: "category",
|
457
|
|
- label: "事件分类:",
|
|
467
|
+ label: "故障现象:",
|
458
|
468
|
rules: {
|
459
|
469
|
required: true
|
460
|
470
|
}
|
|
@@ -472,7 +482,7 @@ export default {
|
472
|
482
|
placeholder: "请选择事件来源"
|
473
|
483
|
},
|
474
|
484
|
rules: {
|
475
|
|
- required: true
|
|
485
|
+ required: false
|
476
|
486
|
}
|
477
|
487
|
},
|
478
|
488
|
{
|
|
@@ -490,7 +500,7 @@ export default {
|
490
|
500
|
{
|
491
|
501
|
type: "textarea",
|
492
|
502
|
modelKey: "description",
|
493
|
|
- label: "事件描述:",
|
|
503
|
+ label: "故障描述:",
|
494
|
504
|
props: {
|
495
|
505
|
placeholder: "请详细描述故障,并上传故障图片,例如:网络故障。"
|
496
|
506
|
},
|
|
@@ -694,7 +704,7 @@ export default {
|
694
|
704
|
modelKey: "requester",
|
695
|
705
|
label: "报修科室:",
|
696
|
706
|
props: {
|
697
|
|
- options: this.requesterList,
|
|
707
|
+ options: [],
|
698
|
708
|
title: "请选择报修科室",
|
699
|
709
|
placeholder: "请选择报修科室"
|
700
|
710
|
},
|
|
@@ -736,7 +746,56 @@ export default {
|
736
|
746
|
rules: {
|
737
|
747
|
required: false
|
738
|
748
|
}
|
739
|
|
- }
|
|
749
|
+ },
|
|
750
|
+ {
|
|
751
|
+ type: "select",
|
|
752
|
+ modelKey: "branch",
|
|
753
|
+ label: "院区:",
|
|
754
|
+ props: {
|
|
755
|
+ options: this.branchArr,
|
|
756
|
+ title: "请选择院区",
|
|
757
|
+ placeholder: "请选择院区"
|
|
758
|
+ },
|
|
759
|
+ events: {
|
|
760
|
+ change: (value, index, text) => {
|
|
761
|
+ console.log(value, index, text);
|
|
762
|
+ console.log(this.model);
|
|
763
|
+ if (this.valConfig == 2) {
|
|
764
|
+ this.getDept();
|
|
765
|
+ this.getAreaData();
|
|
766
|
+ this.model.contactsInformation = '';
|
|
767
|
+ this.model.requester = '';
|
|
768
|
+ this.deptInpVal = '';
|
|
769
|
+ this.model.placeValue = [];
|
|
770
|
+ this.selectedPlaceTxt = '';
|
|
771
|
+ }
|
|
772
|
+ }
|
|
773
|
+ },
|
|
774
|
+ rules: {
|
|
775
|
+ required: true
|
|
776
|
+ }
|
|
777
|
+ },
|
|
778
|
+ {
|
|
779
|
+ type: "select",
|
|
780
|
+ modelKey: "requesterUser",
|
|
781
|
+ label: "报修人:",
|
|
782
|
+ props: {
|
|
783
|
+ options: [],
|
|
784
|
+ title: "请选择报修人",
|
|
785
|
+ placeholder: "请选择报修人"
|
|
786
|
+ },
|
|
787
|
+ rules: {
|
|
788
|
+ required: false
|
|
789
|
+ }
|
|
790
|
+ },
|
|
791
|
+ {
|
|
792
|
+ component: "button",
|
|
793
|
+ modelKey: "yyTime",
|
|
794
|
+ label: "预约时间:",
|
|
795
|
+ rules: {
|
|
796
|
+ required: false
|
|
797
|
+ }
|
|
798
|
+ },
|
740
|
799
|
]
|
741
|
800
|
};
|
742
|
801
|
},
|
|
@@ -765,11 +824,28 @@ export default {
|
765
|
824
|
}
|
766
|
825
|
},
|
767
|
826
|
methods: {
|
|
827
|
+ // 选择预约时间
|
|
828
|
+ showTimePicker() {
|
|
829
|
+ let timePicker = this.$createTimePicker({
|
|
830
|
+ title: '选择预约时间',
|
|
831
|
+ showNow: false,
|
|
832
|
+ delay: 1,
|
|
833
|
+ minuteStep: 1,
|
|
834
|
+ onSelect: (selectedTime, selectedText, formatedTime) => {
|
|
835
|
+ console.log(selectedTime, selectedText, formatedTime);
|
|
836
|
+ this.selectedYytimeTxt = formatedTime;
|
|
837
|
+ this.selectedYytimeStamp = selectedTime;
|
|
838
|
+ },
|
|
839
|
+ onCancel: () => {}
|
|
840
|
+ }).show();
|
|
841
|
+ timePicker.setTime(this.selectedYytimeStamp)
|
|
842
|
+ },
|
768
|
843
|
// 切换处理方式
|
769
|
844
|
changeHandleTypes() {
|
770
|
|
- let reverseArr = this.model.category.filter(Boolean).reverse(); //数组翻转,取第一项不为空的
|
771
|
|
- let sjId = reverseArr[0]; //事件Id baba
|
772
|
|
- let sj = this.initSjList.filter(v => v.id == sjId)[0];
|
|
845
|
+ // let reverseArr = this.model.category.filter(Boolean).reverse(); //数组翻转,取第一项不为空的
|
|
846
|
+ // let sjId = reverseArr[0]; //事件Id baba
|
|
847
|
+ // let sj = this.initSjList.filter(v => v.id == sjId)[0];
|
|
848
|
+ let sj = this.model.category;
|
773
|
849
|
console.log(this.order, sj);
|
774
|
850
|
this.isShowDes = !(this.order == 1 && sj && sj.hasSimple == 1);
|
775
|
851
|
},
|
|
@@ -823,6 +899,33 @@ export default {
|
823
|
899
|
});
|
824
|
900
|
});
|
825
|
901
|
that.fields[5].props.options = that.sourceArr;
|
|
902
|
+ that.model.source = 1547;//默认电话
|
|
903
|
+ });
|
|
904
|
+ },
|
|
905
|
+ // 获取院区
|
|
906
|
+ getBranch() {
|
|
907
|
+ this.$http
|
|
908
|
+ .post("service/user/data/fetchDataList/branch", {"idx":0,"sum":100})
|
|
909
|
+ .then((res) => {
|
|
910
|
+ if(res.data.status == 200){
|
|
911
|
+ res.data.list.forEach((v) => {
|
|
912
|
+ this.branchArr.push({
|
|
913
|
+ text: v.hosName,
|
|
914
|
+ value: v.id
|
|
915
|
+ });
|
|
916
|
+ });
|
|
917
|
+ this.fields[24].props.options = this.branchArr;
|
|
918
|
+ if(this.loginUser.duty){
|
|
919
|
+ this.model.branch = this.loginUser.duty.branch;
|
|
920
|
+ }else if(this.loginUser.branch){
|
|
921
|
+ this.model.branch = this.loginUser.branch.id;
|
|
922
|
+ }
|
|
923
|
+ // 获取报修科室
|
|
924
|
+ if (this.valConfig == 2) {
|
|
925
|
+ this.getDept();
|
|
926
|
+ this.getAreaData();
|
|
927
|
+ }
|
|
928
|
+ }
|
826
|
929
|
});
|
827
|
930
|
},
|
828
|
931
|
// 获取优先级
|
|
@@ -913,6 +1016,7 @@ export default {
|
913
|
1016
|
});
|
914
|
1017
|
});
|
915
|
1018
|
that.fields[12].props.options = that.closecodeArr;
|
|
1019
|
+ that.model.closecode = 1572;//设计如此,默认“完全解决”
|
916
|
1020
|
});
|
917
|
1021
|
},
|
918
|
1022
|
// 获取处理人
|
|
@@ -963,12 +1067,7 @@ export default {
|
963
|
1067
|
a2 = [],
|
964
|
1068
|
category = [],
|
965
|
1069
|
solutionType = [];
|
966
|
|
- that.model.category.forEach(function(v, i) {
|
967
|
|
- if (v) {
|
968
|
|
- a1.push(v);
|
969
|
|
- }
|
970
|
|
- });
|
971
|
|
- category = a1;
|
|
1070
|
+ category = that.model.category;
|
972
|
1071
|
that.model.solutionType.forEach(function(v, i) {
|
973
|
1072
|
if (v) {
|
974
|
1073
|
a2.push(v);
|
|
@@ -1089,9 +1188,6 @@ export default {
|
1089
|
1188
|
var that = this;
|
1090
|
1189
|
if (!that.model.title) return;
|
1091
|
1190
|
that.setLocalStroageData();
|
1092
|
|
- localStorage.setItem("modelData", JSON.stringify(that.modelData));
|
1093
|
|
- localStorage.setItem("model", JSON.stringify(that.model));
|
1094
|
|
- localStorage.setItem("order", that.order);
|
1095
|
1191
|
|
1096
|
1192
|
this.$router.push({
|
1097
|
1193
|
name: "ReferenceList",
|
|
@@ -1120,55 +1216,12 @@ export default {
|
1120
|
1216
|
if (inspecInfo.handlerUser) {
|
1121
|
1217
|
that.model.handlerUser = inspecInfo.handlerUser.id;
|
1122
|
1218
|
}
|
1123
|
|
- // that.modelData.incident.handlingPersonnelUser = {
|
1124
|
|
- // id: that.model.handlerUser
|
1125
|
|
- // };
|
1126
|
1219
|
|
1127
|
1220
|
if (that.$route.params.abnormal) {
|
1128
|
1221
|
that.model.description = that.modelData.incident.description =
|
1129
|
1222
|
that.$route.params.abnormal;
|
1130
|
1223
|
}
|
1131
|
|
- } else {
|
1132
|
|
- that.name = that.loginUser.name;
|
1133
|
|
- that.model.contactsInformation = that.loginUser.phone;
|
1134
|
|
- that.model.contacts = that.loginUser.name;
|
1135
|
|
- that.model.houseNumber = that.loginUser.houseNumber;
|
1136
|
|
- }
|
1137
|
|
- if (that.loginUser.place && that.loginUser.place.length) {
|
1138
|
|
- if (that.loginUser.place.id) {
|
1139
|
|
- if (that.loginUser.place.area) {
|
1140
|
|
- that.model.placeValue[0] = that.loginUser.place.area.id;
|
1141
|
|
- }
|
1142
|
|
- that.model.placeValue[1] = that.loginUser.place.id;
|
1143
|
|
- }
|
1144
|
|
- }
|
1145
|
|
-
|
1146
|
|
- if (localStorage.getItem("model")) {
|
1147
|
|
- that.model = JSON.parse(localStorage.getItem("model"));
|
1148
|
|
- that.incidentTitle = that.model.title;
|
1149
|
|
- }
|
1150
|
|
- if (localStorage.getItem("modelData")) {
|
1151
|
|
- that.modelData = JSON.parse(localStorage.getItem("modelData"));
|
1152
|
|
- }
|
1153
|
|
- if (localStorage.getItem("referenceInfo")) {
|
1154
|
|
- that.referenceInfo = JSON.parse(localStorage.getItem("referenceInfo"));
|
1155
|
|
- that.incidentTitle = that.model.title = that.referenceInfo.title;
|
1156
|
|
- that.model.handleDescription = that.referenceInfo.content;
|
1157
|
|
- }
|
1158
|
|
- if (localStorage.getItem("order")) {
|
1159
|
|
- that.order = localStorage.getItem("order") - 0;
|
1160
|
|
- }
|
1161
|
|
-
|
1162
|
|
- // if (localStorage.getItem("category")) {
|
1163
|
|
- // that.selectedCategoryTxt = JSON.parse(
|
1164
|
|
- // localStorage.getItem("category")
|
1165
|
|
- // ).txt;
|
1166
|
|
- // console.log(that.selectedCategoryTxt);
|
1167
|
|
- // }
|
1168
|
|
- // if (localStorage.getItem("place")) {
|
1169
|
|
- // that.selectedPlaceTxt = JSON.parse(localStorage.getItem("place")).txt;
|
1170
|
|
- // console.log(that.selectedPlaceTxt);
|
1171
|
|
- // }
|
|
1224
|
+ } else {}
|
1172
|
1225
|
},
|
1173
|
1226
|
// 提交
|
1174
|
1227
|
submitHandler() {
|
|
@@ -1350,15 +1403,6 @@ export default {
|
1350
|
1403
|
|
1351
|
1404
|
that.validity = result.validity;
|
1352
|
1405
|
that.valid = result.valid;
|
1353
|
|
- // if (that.vali == true) {
|
1354
|
|
- // $("#fade").fadeIn();
|
1355
|
|
- // that.promptingConent = "提交失败,请填写必填信息!";
|
1356
|
|
- // that.promptingStatus = false;
|
1357
|
|
- // setTimeout(function() {
|
1358
|
|
- // $("#fade").fadeOut();
|
1359
|
|
- // }, 2000);
|
1360
|
|
- // }
|
1361
|
|
- // that.vali = false;
|
1362
|
1406
|
},
|
1363
|
1407
|
|
1364
|
1408
|
dateSelectHandler(selectedVal) {
|
|
@@ -1370,7 +1414,7 @@ export default {
|
1370
|
1414
|
},
|
1371
|
1415
|
filesAdded(files) {
|
1372
|
1416
|
let hasIgnore = false;
|
1373
|
|
- const maxSize = 1000 * 1024 * 1024; // 1M
|
|
1417
|
+ const maxSize = 10000 * 1024 * 1024; // 1M
|
1374
|
1418
|
for (let k in files) {
|
1375
|
1419
|
const file = files[k];
|
1376
|
1420
|
if (file.size > maxSize) {
|
|
@@ -1382,7 +1426,7 @@ export default {
|
1382
|
1426
|
this.$createToast({
|
1383
|
1427
|
type: "warn",
|
1384
|
1428
|
time: 1000,
|
1385
|
|
- txt: "不能上传超过100M的文件"
|
|
1429
|
+ txt: "不能上传超过10M的文件"
|
1386
|
1430
|
}).show();
|
1387
|
1431
|
},
|
1388
|
1432
|
filesAdded1(files) {
|
|
@@ -1410,31 +1454,51 @@ export default {
|
1410
|
1454
|
},
|
1411
|
1455
|
// 展示事件分类选择器
|
1412
|
1456
|
showCategoryPicker() {
|
1413
|
|
- this.categoryPicker.show();
|
|
1457
|
+ let other = {
|
|
1458
|
+ selectedPlaceTxt: this.selectedPlaceTxt,
|
|
1459
|
+ userInpVal: this.userInpVal,
|
|
1460
|
+ deptInpVal: this.deptInpVal,
|
|
1461
|
+ selectUserIndex: this.selectUserIndex,
|
|
1462
|
+ selectDeptIndex: this.selectDeptIndex,
|
|
1463
|
+ selectedPlaceIndex: this.selectedPlaceIndex,
|
|
1464
|
+ order: this.order,
|
|
1465
|
+ imgFiles: this.imgFiles,
|
|
1466
|
+ selectedYytimeTxt: this.selectedYytimeTxt,
|
|
1467
|
+ selectedYytimeStamp: this.selectedYytimeStamp,
|
|
1468
|
+ }
|
|
1469
|
+ console.log(this.model, '传');
|
|
1470
|
+ console.log(this.imgFiles);
|
|
1471
|
+ console.log(other)
|
|
1472
|
+ this.$router.push(`/searchDept?model=${JSON.stringify(this.model)}&other=${JSON.stringify(other)}`)
|
|
1473
|
+ // this.categoryPicker.show();
|
1414
|
1474
|
},
|
1415
|
1475
|
// 选择事件分类
|
1416
|
|
- selectCategoryHandler(selectedVal, selectedIndex, selectedTxt) {
|
1417
|
|
- // console.log(this.initSjList, "事件分类列表");
|
1418
|
|
- // console.log(this.model.category.slice(-1)[0], "事件分类");
|
1419
|
|
- var selected = [];
|
1420
|
|
- selectedTxt.forEach(function(v, i) {
|
1421
|
|
- if (v != "") {
|
1422
|
|
- selected.push(v);
|
1423
|
|
- }
|
1424
|
|
- });
|
1425
|
|
- this.selectedCategoryTxt = this.model.title = this.model.description = this.incidentTitle =
|
1426
|
|
- selected[selected.length - 1];
|
1427
|
|
- this.model.category = selectedVal;
|
1428
|
|
- // var category = {
|
1429
|
|
- // index: selectedIndex,
|
1430
|
|
- // txt: this.selectedCategoryTxt
|
1431
|
|
- // };
|
1432
|
|
- // localStorage.setItem("category", JSON.stringify(category));
|
|
1476
|
+ selectCategoryHandler() {
|
|
1477
|
+ this.$createDialog({
|
|
1478
|
+ type: 'confirm',
|
|
1479
|
+ icon: 'cubeic-alert',
|
|
1480
|
+ title: '提示',
|
|
1481
|
+ content: '是否覆盖故障描述?',
|
|
1482
|
+ confirmBtn: {
|
|
1483
|
+ text: '确认覆盖',
|
|
1484
|
+ active: true,
|
|
1485
|
+ disabled: false,
|
|
1486
|
+ href: 'javascript:;'
|
|
1487
|
+ },
|
|
1488
|
+ cancelBtn: {
|
|
1489
|
+ text: '取消操作',
|
|
1490
|
+ active: false,
|
|
1491
|
+ disabled: false,
|
|
1492
|
+ href: 'javascript:;'
|
|
1493
|
+ },
|
|
1494
|
+ onConfirm: () => {
|
|
1495
|
+ this.model.description = this.model.title = this.incidentTitle = this.model.category.mutiCategory;
|
|
1496
|
+ },
|
|
1497
|
+ onCancel: () => {}
|
|
1498
|
+ }).show()
|
|
1499
|
+ this.selectedCategoryTxt = this.model.category.mutiCategory;
|
1433
|
1500
|
// ----------------------回显其他数据---------------------
|
1434
|
|
- console.log(selectedVal, "seimin");
|
1435
|
|
- let reverseArr = selectedVal.filter(Boolean).reverse(); //数组翻转,取第一项不为空的
|
1436
|
|
- let sjId = reverseArr[0]; //事件Id baba
|
1437
|
|
- let sj = this.initSjList.filter(v => v.id == sjId)[0];
|
|
1501
|
+ let sj = this.model.category;
|
1438
|
1502
|
console.log(sj);
|
1439
|
1503
|
this.model.priority = sj.priority?sj.priority.id:null;
|
1440
|
1504
|
if (sj.branchType == 0) {
|
|
@@ -1558,9 +1622,7 @@ export default {
|
1558
|
1622
|
that.categoryPicker = that.$createCascadePicker({
|
1559
|
1623
|
title: "事件分类选择",
|
1560
|
1624
|
data: that.selectData,
|
1561
|
|
- // selectedIndex: localStorage.getItem("category")
|
1562
|
|
- // ? JSON.parse(localStorage.getItem("category")).index
|
1563
|
|
- // : [0, 0, 0],
|
|
1625
|
+ // selectedIndex: [0, 0, 0],
|
1564
|
1626
|
selectedIndex:[0, 0, 0],
|
1565
|
1627
|
onSelect: that.selectCategoryHandler
|
1566
|
1628
|
});
|
|
@@ -1596,7 +1658,8 @@ export default {
|
1596
|
1658
|
console.log(selectedVal, selectedIndex, selectedTxt);
|
1597
|
1659
|
console.log(selectedVal[0], "区域");
|
1598
|
1660
|
console.log(this.initSjList, "事件分类列表");
|
1599
|
|
- console.log(this.model.category.slice(-1)[0], "事件分类");
|
|
1661
|
+ this.selectedPlaceIndex = selectedIndex;
|
|
1662
|
+ // console.log(this.model.category.slice(-1)[0], "事件分类");
|
1600
|
1663
|
if (this.ifRoom == 1) {
|
1601
|
1664
|
this.getRoomData(selectedVal[1]);
|
1602
|
1665
|
}
|
|
@@ -1604,10 +1667,11 @@ export default {
|
1604
|
1667
|
this.selectedPlaceTxt = selectedTxt.join(" ");
|
1605
|
1668
|
// 分院区
|
1606
|
1669
|
// --------------------start---------------------
|
1607
|
|
- let categoryId = this.model.category.slice(-1)[0];
|
|
1670
|
+ // let categoryId = this.model.category.slice(-1)[0];
|
|
1671
|
+ let categoryId = this.model.category.id;
|
1608
|
1672
|
if (categoryId) {
|
1609
|
|
- // 选择了事件分类 liaomingming
|
1610
|
|
- let categoryObj = this.initSjList.find(v => v.id == categoryId);
|
|
1673
|
+ // 选择了事件分类
|
|
1674
|
+ let categoryObj = this.model.category;
|
1611
|
1675
|
if (categoryObj) {
|
1612
|
1676
|
if (categoryObj.branchType == 1) {
|
1613
|
1677
|
// 分院区开关打开的情况下
|
|
@@ -1656,40 +1720,42 @@ export default {
|
1656
|
1720
|
this.model.candidateGroups = "";
|
1657
|
1721
|
}
|
1658
|
1722
|
// --------------------end---------------------
|
1659
|
|
- // var place = {
|
1660
|
|
- // index: selectedIndex,
|
1661
|
|
- // txt: this.model.houseNumber
|
1662
|
|
- // };
|
1663
|
|
- // localStorage.setItem("place", JSON.stringify(place));
|
1664
|
1723
|
},
|
1665
|
1724
|
// 报修科室
|
1666
|
1725
|
showDeptPicker() {
|
|
1726
|
+ this.deptList = [];
|
1667
|
1727
|
this.deptPicker.show();
|
|
1728
|
+ this.getDept(true);
|
|
1729
|
+ },
|
|
1730
|
+ // 报修人
|
|
1731
|
+ showUserPicker() {
|
|
1732
|
+ this.userList = [];
|
|
1733
|
+ this.userPicker.show();
|
|
1734
|
+ this.getUser(true);
|
1668
|
1735
|
},
|
1669
|
1736
|
// 选中报修科室
|
1670
|
1737
|
selectDeptHandler(selectedVal, selectedIndex, selectedTxt) {
|
1671
|
1738
|
console.log(selectedVal, selectedIndex, selectedTxt);
|
1672
|
|
- this.deptInpVal = selectedTxt;
|
1673
|
|
- this.model.requester = this.deptRes[selectedIndex];
|
1674
|
|
- console.log(this.deptRes[selectedIndex]);
|
1675
|
|
- this.inpLocalVal = this.model.address = this.deptRes[selectedIndex].place
|
1676
|
|
- .area
|
1677
|
|
- ? this.deptRes[selectedIndex].place.area.area
|
1678
|
|
- ? this.deptRes[selectedIndex].place.place
|
1679
|
|
- ? this.deptRes[selectedIndex].place.area.area +
|
1680
|
|
- this.deptRes[selectedIndex].place.place
|
1681
|
|
- : this.deptRes[selectedIndex].place.area.area
|
1682
|
|
- : this.deptRes[selectedIndex].place.area
|
1683
|
|
- : this.deptRes[selectedIndex].place.place;
|
1684
|
|
- if (this.deptRes[selectedIndex].phone) {
|
1685
|
|
- this.model.contactsInformation = this.deptRes[selectedIndex].phone;
|
|
1739
|
+ this.deptInpVal = selectedTxt[0];
|
|
1740
|
+ this.selectDeptIndex = selectedIndex;
|
|
1741
|
+ if(!selectedVal[0]){
|
|
1742
|
+ return;
|
|
1743
|
+ }
|
|
1744
|
+ let index = selectedIndex[0].toString();
|
|
1745
|
+ this.model.requester = this.deptRes[index];
|
|
1746
|
+ console.log(this.deptRes[index]);
|
|
1747
|
+ console.log(this.model);
|
|
1748
|
+ if(this.deptRes[index].place){
|
|
1749
|
+ console.log(this.placeSelectData);
|
|
1750
|
+ this.model.placeValue = [this.deptRes[index].place.area.id, this.deptRes[index].place.id];
|
|
1751
|
+ this.selectedPlaceTxt = `${this.deptRes[index].place.area.area} ${this.deptRes[index].place.place}`;
|
|
1752
|
+ let areaIndex = this.placeSelectData.findIndex(v=>v.value == this.deptRes[index].place.area.id);
|
|
1753
|
+ let placeIndex = this.placeSelectData[areaIndex].children.findIndex(v=>v.value == this.deptRes[index].place.id);
|
|
1754
|
+ this.placePicker.setData(this.placeSelectData, [areaIndex, placeIndex]);
|
|
1755
|
+ }
|
|
1756
|
+ if (this.deptRes[index].phone) {
|
|
1757
|
+ this.model.contactsInformation = this.deptRes[index].phone;
|
1686
|
1758
|
}
|
1687
|
|
- // this.model.houseNumber = this.selectedPlaceTxt = selectedTxt.join(" ");
|
1688
|
|
- // var place = {
|
1689
|
|
- // index: selectedIndex,
|
1690
|
|
- // txt: this.model.houseNumber
|
1691
|
|
- // };
|
1692
|
|
- // localStorage.setItem("place", JSON.stringify(place));
|
1693
|
1759
|
},
|
1694
|
1760
|
// 取消选中报修科室
|
1695
|
1761
|
cancelDeptHandler() {
|
|
@@ -1699,12 +1765,53 @@ export default {
|
1699
|
1765
|
this.deptInpVal = "";
|
1700
|
1766
|
this.model.requester = "";
|
1701
|
1767
|
}
|
1702
|
|
- // this.model.houseNumber = this.selectedPlaceTxt = selectedTxt.join(" ");
|
1703
|
|
- // var place = {
|
1704
|
|
- // index: selectedIndex,
|
1705
|
|
- // txt: this.model.houseNumber
|
1706
|
|
- // };
|
1707
|
|
- // localStorage.setItem("place", JSON.stringify(place));
|
|
1768
|
+ },
|
|
1769
|
+ // 选中报修人
|
|
1770
|
+ selectUserHandler(selectedVal, selectedIndex, selectedTxt) {
|
|
1771
|
+ console.log(selectedVal, selectedIndex, selectedTxt);
|
|
1772
|
+ this.userInpVal = selectedTxt[0];
|
|
1773
|
+ this.selectUserIndex = selectedIndex;
|
|
1774
|
+ if(!selectedVal[0]){
|
|
1775
|
+ return;
|
|
1776
|
+ }
|
|
1777
|
+ let index = selectedIndex[0].toString();
|
|
1778
|
+ console.log(this.model,'model');
|
|
1779
|
+ this.model.contacts = this.userRes[index].name;
|
|
1780
|
+ this.model.requesterUser = this.userRes[index];
|
|
1781
|
+ console.log(this.userRes[index]);
|
|
1782
|
+ // if (this.userRes[index].mphone) {
|
|
1783
|
+ this.$createDialog({
|
|
1784
|
+ type: 'confirm',
|
|
1785
|
+ icon: 'cubeic-alert',
|
|
1786
|
+ title: '提示',
|
|
1787
|
+ content: '是否覆盖联系电话?',
|
|
1788
|
+ confirmBtn: {
|
|
1789
|
+ text: '确认覆盖',
|
|
1790
|
+ active: true,
|
|
1791
|
+ disabled: false,
|
|
1792
|
+ href: 'javascript:;'
|
|
1793
|
+ },
|
|
1794
|
+ cancelBtn: {
|
|
1795
|
+ text: '取消操作',
|
|
1796
|
+ active: false,
|
|
1797
|
+ disabled: false,
|
|
1798
|
+ href: 'javascript:;'
|
|
1799
|
+ },
|
|
1800
|
+ onConfirm: () => {
|
|
1801
|
+ this.model.contactsInformation = this.userRes[index].mphone;
|
|
1802
|
+ },
|
|
1803
|
+ onCancel: () => {}
|
|
1804
|
+ }).show()
|
|
1805
|
+ // }
|
|
1806
|
+ },
|
|
1807
|
+ // 取消选中报修人
|
|
1808
|
+ cancelUserHandler() {
|
|
1809
|
+ if (this.model.requesterUser) {
|
|
1810
|
+ this.userInpVal = this.model.requesterUser.name + '('+ this.model.requesterUser.account +')';
|
|
1811
|
+ } else if (!this.model.requesterUser) {
|
|
1812
|
+ this.userInpVal = "";
|
|
1813
|
+ this.model.requesterUser = "";
|
|
1814
|
+ }
|
1708
|
1815
|
},
|
1709
|
1816
|
getAreaData() {
|
1710
|
1817
|
this.$http
|
|
@@ -1712,12 +1819,14 @@ export default {
|
1712
|
1819
|
idx: 0,
|
1713
|
1820
|
sum: 1000,
|
1714
|
1821
|
area: {
|
|
1822
|
+ branch: this.model.branch,
|
1715
|
1823
|
wechatArea: true
|
1716
|
1824
|
}
|
1717
|
1825
|
})
|
1718
|
1826
|
.then(res => {
|
1719
|
1827
|
this.initAreaList = JSON.parse(JSON.stringify(res.data.list));
|
1720
|
1828
|
var data = res.data.list;
|
|
1829
|
+ this.placeSelectData = [];
|
1721
|
1830
|
for (var i = 0; i < data.length; i++) {
|
1722
|
1831
|
this.placeSelectData.push({
|
1723
|
1832
|
text: data[i].area,
|
|
@@ -1725,6 +1834,7 @@ export default {
|
1725
|
1834
|
children: []
|
1726
|
1835
|
});
|
1727
|
1836
|
}
|
|
1837
|
+ this.getPlaceData();
|
1728
|
1838
|
});
|
1729
|
1839
|
},
|
1730
|
1840
|
getPlaceData() {
|
|
@@ -1737,7 +1847,7 @@ export default {
|
1737
|
1847
|
wechatAreaId: ""
|
1738
|
1848
|
}
|
1739
|
1849
|
})
|
1740
|
|
- .then(function(res) {
|
|
1850
|
+ .then((res) => {
|
1741
|
1851
|
var data = res.data.list;
|
1742
|
1852
|
for (var i = 0; i < data.length; i++) {
|
1743
|
1853
|
for (var j = 0; j < that.placeSelectData.length; j++) {
|
|
@@ -1751,14 +1861,37 @@ export default {
|
1751
|
1861
|
}
|
1752
|
1862
|
|
1753
|
1863
|
that.placePicker = that.$createCascadePicker({
|
1754
|
|
- title: "区域地点选择",
|
|
1864
|
+ title: "院区楼栋选择",
|
1755
|
1865
|
data: that.placeSelectData,
|
1756
|
|
- // selectedIndex: localStorage.getItem("place")
|
1757
|
|
- // ? JSON.parse(localStorage.getItem("place")).index
|
1758
|
|
- // : [0, 0],
|
|
1866
|
+ selectedIndex: this.selectedPlaceIndex || [0, 0],
|
1759
|
1867
|
selectedIndex: [0, 0],
|
1760
|
1868
|
onSelect: that.selectPlaceHandler
|
1761
|
1869
|
});
|
|
1870
|
+ console.log(this.$route,'路由参数');
|
|
1871
|
+ if(this.$route.params.id){
|
|
1872
|
+ let other = this.$route.params.other;
|
|
1873
|
+ this.model = this.$route.params.model;
|
|
1874
|
+ this.selectedPlaceTxt = other.selectedPlaceTxt;
|
|
1875
|
+ this.userInpVal = other.userInpVal;
|
|
1876
|
+ this.deptInpVal = other.deptInpVal;
|
|
1877
|
+ this.selectUserIndex = other.selectUserIndex;
|
|
1878
|
+ this.selectDeptIndex = other.selectDeptIndex;
|
|
1879
|
+ this.selectedPlaceIndex = other.selectedPlaceIndex;
|
|
1880
|
+ this.order = other.order;
|
|
1881
|
+ this.imgFiles = other.imgFiles;
|
|
1882
|
+ this.selectedYytimeTxt = other.selectedYytimeTxt,
|
|
1883
|
+ this.selectedYytimeStamp = other.selectedYytimeStamp,
|
|
1884
|
+
|
|
1885
|
+
|
|
1886
|
+ this.placePicker.setData(this.placeSelectData, this.selectedPlaceIndex);
|
|
1887
|
+ console.log(this.model);
|
|
1888
|
+ console.log(other);
|
|
1889
|
+ this.selectCategoryHandler();
|
|
1890
|
+ //回显事件分类
|
|
1891
|
+ // this.$http.get(`service/bpm/data/fetchData/incidentcategory/${this.$route.query.id}`).then(res=>{
|
|
1892
|
+ // console.log(res);
|
|
1893
|
+ // })
|
|
1894
|
+ }
|
1762
|
1895
|
});
|
1763
|
1896
|
},
|
1764
|
1897
|
// 故障地点
|
|
@@ -1793,9 +1926,7 @@ export default {
|
1793
|
1926
|
that.placePicker = that.$createCascadePicker({
|
1794
|
1927
|
title: "区域地点选择",
|
1795
|
1928
|
data: that.faultLocationList,
|
1796
|
|
- // selectedIndex: localStorage.getItem("place")
|
1797
|
|
- // ? JSON.parse(localStorage.getItem("place")).index
|
1798
|
|
- // : [0, 0],
|
|
1929
|
+ // selectedIndex: [0, 0],
|
1799
|
1930
|
onSelect: that.selectPlaceHandler
|
1800
|
1931
|
});
|
1801
|
1932
|
// that.fields[19].props.options = that.faultLocationList;
|
|
@@ -1812,47 +1943,85 @@ export default {
|
1812
|
1943
|
}, 600);
|
1813
|
1944
|
},
|
1814
|
1945
|
// 报修科室
|
1815
|
|
- getDept(type) {
|
1816
|
|
- var that = this;
|
|
1946
|
+ getDept(isFirst) {
|
1817
|
1947
|
this.$http
|
1818
|
1948
|
.post("service/user/data/fetchDataList/department", {
|
1819
|
1949
|
idx: 0,
|
1820
|
|
- sum: 50,
|
1821
|
|
- department: { dept: that.deptInpVal || "" }
|
|
1950
|
+ sum: 1000,
|
|
1951
|
+ department: {
|
|
1952
|
+ branch: this.model.branch,
|
|
1953
|
+ selectType:"pinyin_qs",
|
|
1954
|
+ dept: isFirst ? '': (this.deptInpVal || "")
|
|
1955
|
+ }
|
1822
|
1956
|
})
|
1823
|
|
- .then(function(res) {
|
|
1957
|
+ .then((res) => {
|
1824
|
1958
|
var data = res.data.list;
|
1825
|
|
- if (type == 1) {
|
1826
|
|
- that.deptList.length = 0;
|
1827
|
|
- that.$set(that.deptList, true, []);
|
1828
|
|
- that.deptList;
|
1829
|
|
- }
|
1830
|
|
- that.deptRes = res.data.list;
|
|
1959
|
+ this.deptRes = res.data.list;
|
|
1960
|
+ this.deptList = [];
|
1831
|
1961
|
for (var i = 0; i < data.length; i++) {
|
1832
|
|
- that.deptList.push({
|
|
1962
|
+ this.deptList.push({
|
1833
|
1963
|
text: data[i].dept,
|
1834
|
1964
|
value: data[i].id
|
1835
|
1965
|
});
|
1836
|
1966
|
}
|
1837
|
|
-
|
1838
|
|
- that.deptPicker = that.$createCascadePicker({
|
1839
|
|
- title: "报修科室选择",
|
1840
|
|
- data: that.deptList,
|
1841
|
|
- onSelect: that.selectDeptHandler,
|
1842
|
|
- onCancel: that.cancelDeptHandler
|
1843
|
|
- });
|
|
1967
|
+ console.log(this.deptList)
|
|
1968
|
+ this.deptPicker.setData(this.deptList, isFirst?this.selectDeptIndex:[0])
|
|
1969
|
+ });
|
|
1970
|
+ },
|
|
1971
|
+ // 报修人
|
|
1972
|
+ getUser(isFirst) {
|
|
1973
|
+ this.$http
|
|
1974
|
+ .post("service/user/data/fetchDataList/requester", {
|
|
1975
|
+ idx: 0,
|
|
1976
|
+ sum: 1000,
|
|
1977
|
+ requester: {
|
|
1978
|
+ searchKey: isFirst ? '': (this.userInpVal || "")
|
|
1979
|
+ }
|
|
1980
|
+ })
|
|
1981
|
+ .then((res) => {
|
|
1982
|
+ var data = res.data.list;
|
|
1983
|
+ this.userRes = res.data.list;
|
|
1984
|
+ this.userList = [];
|
|
1985
|
+ for (var i = 0; i < data.length; i++) {
|
|
1986
|
+ this.userList.push({
|
|
1987
|
+ text: data[i].name + '('+ data[i].account +')',
|
|
1988
|
+ value: data[i].id
|
|
1989
|
+ });
|
|
1990
|
+ }
|
|
1991
|
+ console.log(this.userList)
|
|
1992
|
+ this.userPicker.setData(this.userList, isFirst?this.selectUserIndex:[0])
|
1844
|
1993
|
});
|
1845
|
1994
|
},
|
1846
|
1995
|
changeDeptList() {
|
1847
|
1996
|
var that = this;
|
1848
|
1997
|
clearTimeout(that.timer);
|
1849
|
1998
|
that.timer = setTimeout(() => {
|
1850
|
|
- this.getDept(1);
|
|
1999
|
+ this.getDept();
|
|
2000
|
+ }, 600);
|
|
2001
|
+ },
|
|
2002
|
+ changeUserList() {
|
|
2003
|
+ clearTimeout(this.timer);
|
|
2004
|
+ this.timer = setTimeout(() => {
|
|
2005
|
+ this.getUser();
|
1851
|
2006
|
}, 600);
|
1852
|
2007
|
}
|
1853
|
2008
|
},
|
1854
|
2009
|
created() {
|
1855
|
2010
|
console.log(this.$route.params.data);
|
|
2011
|
+ this.deptPicker = this.$createCascadePicker({
|
|
2012
|
+ title: "报修科室选择",
|
|
2013
|
+ data: this.deptList,
|
|
2014
|
+ onSelect: this.selectDeptHandler,
|
|
2015
|
+ onCancel: this.cancelDeptHandler
|
|
2016
|
+ });
|
|
2017
|
+ this.userPicker = this.$createCascadePicker({
|
|
2018
|
+ title: "报修人选择",
|
|
2019
|
+ data: this.userList,
|
|
2020
|
+ onSelect: this.selectUserHandler,
|
|
2021
|
+ onCancel: this.cancelUserHandler
|
|
2022
|
+ });
|
|
2023
|
+ //获取院区
|
|
2024
|
+ this.getBranch();
|
1856
|
2025
|
//获取事件来源
|
1857
|
2026
|
this.getSource();
|
1858
|
2027
|
// 优先级
|
|
@@ -1874,14 +2043,11 @@ export default {
|
1874
|
2043
|
// 事件单号
|
1875
|
2044
|
this.getsjnum();
|
1876
|
2045
|
// 事件分类
|
1877
|
|
- this.getIncidentcategory();
|
1878
|
|
- this.getAreaData();
|
1879
|
|
- this.getPlaceData();
|
|
2046
|
+ // this.getIncidentcategory();
|
|
2047
|
+ // this.getAreaData();
|
|
2048
|
+ // this.getPlaceData();
|
1880
|
2049
|
// 获取故障地点
|
1881
|
2050
|
// this.getFaultLocation();
|
1882
|
|
- if (this.valConfig == 2) {
|
1883
|
|
- this.getDept();
|
1884
|
|
- }
|
1885
|
2051
|
},
|
1886
|
2052
|
beforeRouteLeave(to, from, next) {
|
1887
|
2053
|
console.log(to);
|
|
@@ -1925,9 +2091,9 @@ export default {
|
1925
|
2091
|
border: none;
|
1926
|
2092
|
}
|
1927
|
2093
|
|
1928
|
|
-.btn_local {
|
1929
|
|
- /* z-index: 101; */
|
1930
|
|
-}
|
|
2094
|
+/* .btn_local {
|
|
2095
|
+ z-index: 101;
|
|
2096
|
+} */
|
1931
|
2097
|
.inp_local {
|
1932
|
2098
|
outline: none;
|
1933
|
2099
|
width: 100%;
|