|
@@ -4,23 +4,33 @@
|
4
|
4
|
<div class="navBar">
|
5
|
5
|
<div class="fl">
|
6
|
6
|
<a
|
7
|
|
- :class="{'active':label=='incidentInfo'}"
|
|
7
|
+ :class="{ active: label == 'incidentInfo' }"
|
8
|
8
|
href="javascript:;"
|
9
|
9
|
@click="toInfo('incidentInfo')"
|
10
|
|
- >事件信息</a>
|
|
10
|
+ >事件信息</a
|
|
11
|
+ >
|
11
|
12
|
</div>
|
12
|
13
|
<div class="fl">
|
13
|
14
|
<a
|
14
|
|
- :class="{'active':label=='handlerInfo'}"
|
|
15
|
+ :class="{ active: label == 'handlerInfo' }"
|
15
|
16
|
href="javascript:;"
|
16
|
17
|
@click="toInfo('handlerInfo')"
|
17
|
|
- >处理信息</a>
|
|
18
|
+ >处理信息</a
|
|
19
|
+ >
|
18
|
20
|
</div>
|
19
|
21
|
</div>
|
20
|
22
|
<div class="label" id="incidentInfo">事件信息</div>
|
21
|
|
- <cube-form :model="model" @validate="validateHandler" @submit="submitHandler">
|
|
23
|
+ <cube-form
|
|
24
|
+ :model="model"
|
|
25
|
+ @validate="validateHandler"
|
|
26
|
+ @submit="submitHandler"
|
|
27
|
+ >
|
22
|
28
|
<cube-form-group>
|
23
|
|
- <cube-form-item :field="fields[20]" v-if="valConfig==2" class="btn_plcaeholde btn_local">
|
|
29
|
+ <cube-form-item
|
|
30
|
+ :field="fields[20]"
|
|
31
|
+ v-if="valConfig == 2"
|
|
32
|
+ class="btn_plcaeholde btn_local"
|
|
33
|
+ >
|
24
|
34
|
<!-- <cube-button @click="showPlacePicker()">{{selectedPlaceTxt?selectedPlaceTxt:'请输入故障地点'}}</cube-button> -->
|
25
|
35
|
<input
|
26
|
36
|
type="text"
|
|
@@ -31,8 +41,14 @@
|
31
|
41
|
@click="showDeptPicker()"
|
32
|
42
|
/>
|
33
|
43
|
</cube-form-item>
|
34
|
|
- <cube-form-item v-if="valConfig==1" :field="fields[0]"></cube-form-item>
|
35
|
|
- <cube-form-item v-if="valConfig==2" :field="fields[21]"></cube-form-item>
|
|
44
|
+ <cube-form-item
|
|
45
|
+ v-if="valConfig == 1"
|
|
46
|
+ :field="fields[0]"
|
|
47
|
+ ></cube-form-item>
|
|
48
|
+ <cube-form-item
|
|
49
|
+ v-if="valConfig == 2"
|
|
50
|
+ :field="fields[21]"
|
|
51
|
+ ></cube-form-item>
|
36
|
52
|
<cube-form-item :field="fields[1]"></cube-form-item>
|
37
|
53
|
<!-- <cube-form-item :field="fields[2]" class="btn_plcaeholde">
|
38
|
54
|
<cube-button @click="showPlacePicker()">{{selectedPlaceTxt?selectedPlaceTxt:'请选择区域地点'}}</cube-button>
|
|
@@ -51,11 +67,14 @@
|
51
|
67
|
</cube-form-item>
|
52
|
68
|
<!-- <cube-form-item :field="fields[3]"></cube-form-item> -->
|
53
|
69
|
<cube-form-item :field="fields[4]" class="btn_plcaeholde">
|
54
|
|
- <cube-button
|
55
|
|
- @click="showCategoryPicker()"
|
56
|
|
- >{{selectedCategoryTxt?selectedCategoryTxt:'请选择事件分类'}}</cube-button>
|
|
70
|
+ <cube-button @click="showCategoryPicker()">{{
|
|
71
|
+ selectedCategoryTxt ? selectedCategoryTxt : "请选择事件分类"
|
|
72
|
+ }}</cube-button>
|
57
|
73
|
</cube-form-item>
|
58
|
|
- <cube-form-item :field="fields[5]" class="btn_plcaeholde"></cube-form-item>
|
|
74
|
+ <cube-form-item
|
|
75
|
+ :field="fields[5]"
|
|
76
|
+ class="btn_plcaeholde"
|
|
77
|
+ ></cube-form-item>
|
59
|
78
|
<!-- <cube-form-item :field="fields[6]" class="btn_plcaeholde incidentTitle">
|
60
|
79
|
<div class="titleRefer">
|
61
|
80
|
<textarea
|
|
@@ -84,7 +103,10 @@
|
84
|
103
|
</div>
|
85
|
104
|
<!-- <cube-form-item :field="fields[8]" class="btn_plcaeholde"></cube-form-item>
|
86
|
105
|
<cube-form-item :field="fields[9]" class="btn_plcaeholde"></cube-form-item>-->
|
87
|
|
- <cube-form-item :field="fields[10]" class="btn_plcaeholde"></cube-form-item>
|
|
106
|
+ <cube-form-item
|
|
107
|
+ :field="fields[10]"
|
|
108
|
+ class="btn_plcaeholde"
|
|
109
|
+ ></cube-form-item>
|
88
|
110
|
<div class="label" id="handlerInfo">处理信息</div>
|
89
|
111
|
<div class="handleRadio">
|
90
|
112
|
<cube-radio-group
|
|
@@ -95,14 +117,26 @@
|
95
|
117
|
/>
|
96
|
118
|
</div>
|
97
|
119
|
<!-- 直接处理 begin -->
|
98
|
|
- <cube-form-item v-if="order==1" :field="fields[11]" class="btn_plcaeholde"></cube-form-item>
|
99
|
|
- <cube-form-item v-if="order==1" :field="fields[12]" class="btn_plcaeholde"></cube-form-item>
|
100
|
|
- <cube-form-item v-if="order==1" :field="fields[13]" class="btn_plcaeholde"></cube-form-item>
|
101
|
|
- <div v-if="order==1" class="label formLabel">
|
|
120
|
+ <cube-form-item
|
|
121
|
+ v-if="order == 1"
|
|
122
|
+ :field="fields[11]"
|
|
123
|
+ class="btn_plcaeholde"
|
|
124
|
+ ></cube-form-item>
|
|
125
|
+ <cube-form-item
|
|
126
|
+ v-if="order == 1"
|
|
127
|
+ :field="fields[12]"
|
|
128
|
+ class="btn_plcaeholde"
|
|
129
|
+ ></cube-form-item>
|
|
130
|
+ <cube-form-item
|
|
131
|
+ v-if="order == 1"
|
|
132
|
+ :field="fields[13]"
|
|
133
|
+ class="btn_plcaeholde"
|
|
134
|
+ ></cube-form-item>
|
|
135
|
+ <div v-if="order == 1" class="label formLabel">
|
102
|
136
|
报修图片
|
103
|
137
|
<span>(最多可上传3张JPG或PNG,每张不能超过10M)</span>
|
104
|
138
|
</div>
|
105
|
|
- <div class="uplod" v-if="order==1">
|
|
139
|
+ <div class="uplod" v-if="order == 1">
|
106
|
140
|
<cube-upload
|
107
|
141
|
ref="upload1"
|
108
|
142
|
:max="3"
|
|
@@ -112,23 +146,23 @@
|
112
|
146
|
@file-submitted="fileSubmitted1"
|
113
|
147
|
/>
|
114
|
148
|
</div>
|
115
|
|
- <cube-form-item v-if="order==1" :field="fields[14]"></cube-form-item>
|
|
149
|
+ <cube-form-item v-if="order == 1" :field="fields[14]"></cube-form-item>
|
116
|
150
|
<cube-form-item
|
117
|
|
- v-if="order==1&&model.knowledge==true"
|
|
151
|
+ v-if="order == 1 && model.knowledge == true"
|
118
|
152
|
:field="fields[15]"
|
119
|
153
|
class="btn_plcaeholde"
|
120
|
154
|
></cube-form-item>
|
121
|
155
|
<!-- 直接处理 end -->
|
122
|
156
|
|
123
|
157
|
<!-- 派单 begin -->
|
124
|
|
- <cube-form-item v-if="order==2" :field="fields[16]"></cube-form-item>
|
|
158
|
+ <cube-form-item v-if="order == 2" :field="fields[16]"></cube-form-item>
|
125
|
159
|
<cube-form-item
|
126
|
|
- v-if="order==2&&model.handleUserOrGroup==true"
|
|
160
|
+ v-if="order == 2 && model.handleUserOrGroup == true"
|
127
|
161
|
:field="fields[17]"
|
128
|
162
|
class="btn_plcaeholde"
|
129
|
163
|
></cube-form-item>
|
130
|
164
|
<cube-form-item
|
131
|
|
- v-if="order==2&&model.handleUserOrGroup==false"
|
|
165
|
+ v-if="order == 2 && model.handleUserOrGroup == false"
|
132
|
166
|
:field="fields[18]"
|
133
|
167
|
class="btn_plcaeholde"
|
134
|
168
|
></cube-form-item>
|
|
@@ -139,7 +173,10 @@
|
139
|
173
|
</cube-form-group>
|
140
|
174
|
</cube-form>
|
141
|
175
|
<load-ing v-show="loadShow"></load-ing>
|
142
|
|
- <promp-ting :conents="promptingConent" :status="promptingStatus"></promp-ting>
|
|
176
|
+ <promp-ting
|
|
177
|
+ :conents="promptingConent"
|
|
178
|
+ :status="promptingStatus"
|
|
179
|
+ ></promp-ting>
|
143
|
180
|
</div>
|
144
|
181
|
</template>
|
145
|
182
|
<script>
|
|
@@ -164,8 +201,9 @@ const solution = {
|
164
|
201
|
selected: [],
|
165
|
202
|
selectData: [],
|
166
|
203
|
initVal: JSON.parse(localStorage.getItem("solution")) || [0, 0, 0],
|
167
|
|
- allPlace:{},//存放请求到的所有区域地点
|
168
|
|
- sleectHouseNumber:{}//区域地点
|
|
204
|
+ allPlace: {}, //存放请求到的所有区域地点
|
|
205
|
+ sleectHouseNumber: {}, //区域地点
|
|
206
|
+ initSjList: [] //原始事件列表
|
169
|
207
|
};
|
170
|
208
|
},
|
171
|
209
|
render(createElement) {
|
|
@@ -266,11 +304,13 @@ export default {
|
266
|
304
|
|
267
|
305
|
valid: undefined,
|
268
|
306
|
action: {
|
269
|
|
- target: this.$host + "/service/common/common/uploadAttachment/incident/",
|
|
307
|
+ target:
|
|
308
|
+ this.$host + "/service/common/common/uploadAttachment/incident/",
|
270
|
309
|
data: {}
|
271
|
310
|
},
|
272
|
311
|
action1: {
|
273
|
|
- target: this.$host + "/service/common/common/uploadAttachment/incident/",
|
|
312
|
+ target:
|
|
313
|
+ this.$host + "/service/common/common/uploadAttachment/incident/",
|
274
|
314
|
data: {}
|
275
|
315
|
},
|
276
|
316
|
isUploading: false,
|
|
@@ -869,12 +909,11 @@ export default {
|
869
|
909
|
// }
|
870
|
910
|
|
871
|
911
|
that.modelData.incident.houseNumber = that.model.address[0];
|
872
|
|
- that.modelData.incident['repairType']=that.valConfig
|
|
912
|
+ that.modelData.incident["repairType"] = that.valConfig;
|
873
|
913
|
if (that.valConfig == 1) {
|
874
|
914
|
// that.modelData.incident.requester = that.loginUser;
|
875
|
915
|
// that.modelData.incident.account = that.loginUser.account;
|
876
|
916
|
// that.modelData.requestershow = that.loginUser;
|
877
|
|
-
|
878
|
917
|
} else if (that.valConfig == 2) {
|
879
|
918
|
that.modelData.incident.department = that.model.requester;
|
880
|
919
|
}
|
|
@@ -1006,11 +1045,13 @@ export default {
|
1006
|
1045
|
that.model.contacts = that.loginUser.name;
|
1007
|
1046
|
that.model.houseNumber = that.loginUser.houseNumber;
|
1008
|
1047
|
}
|
1009
|
|
- if (that.loginUser.place.id) {
|
1010
|
|
- if (that.loginUser.place.area) {
|
1011
|
|
- that.model.placeValue[0] = that.loginUser.place.area.id;
|
|
1048
|
+ if (that.loginUser.place && that.loginUser.place.length) {
|
|
1049
|
+ if (that.loginUser.place.id) {
|
|
1050
|
+ if (that.loginUser.place.area) {
|
|
1051
|
+ that.model.placeValue[0] = that.loginUser.place.area.id;
|
|
1052
|
+ }
|
|
1053
|
+ that.model.placeValue[1] = that.loginUser.place.id;
|
1012
|
1054
|
}
|
1013
|
|
- that.model.placeValue[1] = that.loginUser.place.id;
|
1014
|
1055
|
}
|
1015
|
1056
|
|
1016
|
1057
|
if (localStorage.getItem("model")) {
|
|
@@ -1045,10 +1086,14 @@ export default {
|
1045
|
1086
|
$("#fade").fadeOut();
|
1046
|
1087
|
var that = this;
|
1047
|
1088
|
that.setLocalStroageData();
|
1048
|
|
- if(that.selectHouseNumber.place){
|
|
1089
|
+ if (that.selectHouseNumber && that.selectHouseNumber.place) {
|
1049
|
1090
|
that.modelData.incident.place = that.selectHouseNumber;
|
1050
|
1091
|
}
|
1051
|
|
- console.log( that.modelData,that.selectHouseNumber,'2020年4月25日14:09:29');
|
|
1092
|
+ console.log(
|
|
1093
|
+ that.modelData,
|
|
1094
|
+ that.selectHouseNumber,
|
|
1095
|
+ "2020年4月25日14:09:29"
|
|
1096
|
+ );
|
1052
|
1097
|
that.$http
|
1053
|
1098
|
.post("service/bpm/bpm/start/bpm_incident", that.modelData)
|
1054
|
1099
|
.then(function(res) {
|
|
@@ -1194,6 +1239,24 @@ export default {
|
1194
|
1239
|
txt: this.selectedCategoryTxt
|
1195
|
1240
|
};
|
1196
|
1241
|
localStorage.setItem("category", JSON.stringify(category));
|
|
1242
|
+ // ----------------------回显其他数据---------------------
|
|
1243
|
+ console.log(selectedVal, "seimin");
|
|
1244
|
+ let reverseArr = selectedVal.filter(Boolean).reverse(); //数组翻转,取第一项不为空的
|
|
1245
|
+ let sjId = reverseArr[0]; //事件Id baba
|
|
1246
|
+ let sj = this.initSjList.filter(v => v.id == sjId)[0];
|
|
1247
|
+ console.log(sj);
|
|
1248
|
+ this.model.priority = sj.priority.id;
|
|
1249
|
+ if (sj.userOrGroupType === 1) {
|
|
1250
|
+ //派人
|
|
1251
|
+ this.order = 2;
|
|
1252
|
+ this.model.handleUserOrGroup = true;
|
|
1253
|
+ this.model.handlerUser = sj.handleUser.id;
|
|
1254
|
+ } else if (sj.userOrGroupType === 2) {
|
|
1255
|
+ //派组
|
|
1256
|
+ this.order = 2;
|
|
1257
|
+ this.model.handleUserOrGroup = false;
|
|
1258
|
+ this.model.candidateGroups = sj.group.id;
|
|
1259
|
+ }
|
1197
|
1260
|
},
|
1198
|
1261
|
// 事件分类
|
1199
|
1262
|
getIncidentcategory() {
|
|
@@ -1204,6 +1267,7 @@ export default {
|
1204
|
1267
|
sum: 1000
|
1205
|
1268
|
})
|
1206
|
1269
|
.then(function(res) {
|
|
1270
|
+ that.initSjList = JSON.parse(JSON.stringify(res.data.list));
|
1207
|
1271
|
var list = res.data.list;
|
1208
|
1272
|
var tree = [];
|
1209
|
1273
|
list.forEach((v, i) => {
|
|
@@ -1256,14 +1320,15 @@ export default {
|
1256
|
1320
|
},
|
1257
|
1321
|
selectPlaceHandler(selectedVal, selectedIndex, selectedTxt) {
|
1258
|
1322
|
console.log(selectedVal, selectedIndex, selectedTxt);
|
1259
|
|
- this.inpLocalVal = this.model.address = selectedTxt;//seimin
|
1260
|
|
- console.log(this.allPlace,'allPlace');
|
1261
|
|
- this.allPlace.forEach(item=>{
|
1262
|
|
- if(item.id == selectedVal&&item.place){//如果存在地点
|
|
1323
|
+ this.inpLocalVal = this.model.address = selectedTxt; //seimin
|
|
1324
|
+ console.log(this.allPlace, "allPlace");
|
|
1325
|
+ this.allPlace.forEach(item => {
|
|
1326
|
+ if (item.id == selectedVal && item.place) {
|
|
1327
|
+ //如果存在地点
|
1263
|
1328
|
this.selectHouseNumber = this.allPlace[selectedIndex];
|
1264
|
1329
|
}
|
1265
|
|
- })
|
1266
|
|
- console.log(this.selectHouseNumber,2222);
|
|
1330
|
+ });
|
|
1331
|
+ console.log(this.selectHouseNumber, 2222);
|
1267
|
1332
|
|
1268
|
1333
|
// this.model.houseNumber = this.selectedPlaceTxt = selectedTxt.join(" ");
|
1269
|
1334
|
// var place = {
|
|
@@ -1303,10 +1368,9 @@ export default {
|
1303
|
1368
|
},
|
1304
|
1369
|
// 取消选中报修科室
|
1305
|
1370
|
cancelDeptHandler() {
|
1306
|
|
- if(this.model.requester){
|
1307
|
|
- this.deptInpVal=this.model.requester.dept
|
1308
|
|
- }
|
1309
|
|
- else if (!this.model.requester) {
|
|
1371
|
+ if (this.model.requester) {
|
|
1372
|
+ this.deptInpVal = this.model.requester.dept;
|
|
1373
|
+ } else if (!this.model.requester) {
|
1310
|
1374
|
this.deptInpVal = "";
|
1311
|
1375
|
this.model.requester = "";
|
1312
|
1376
|
}
|
|
@@ -1518,7 +1582,7 @@ export default {
|
1518
|
1582
|
}
|
1519
|
1583
|
};
|
1520
|
1584
|
</script>
|
1521
|
|
-<style >
|
|
1585
|
+<style>
|
1522
|
1586
|
.newIncident .cube-form-group {
|
1523
|
1587
|
border-bottom: 0.02rem solid rgb(245, 245, 245);
|
1524
|
1588
|
}
|