|
@@ -0,0 +1,439 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="bgColor">
|
|
3
|
+ <div class="head">
|
|
4
|
+ <div class="img"></div>
|
|
5
|
+ <div class="name">{{ loginUser.name }}</div>
|
|
6
|
+ </div>
|
|
7
|
+ <div class="myMessage">
|
|
8
|
+ <div class="label">个人信息</div>
|
|
9
|
+ <ul>
|
|
10
|
+ <li>
|
|
11
|
+ <div>姓名</div>
|
|
12
|
+ <div>{{ loginUser.name || "暂无" }}</div>
|
|
13
|
+ </li>
|
|
14
|
+ <li>
|
|
15
|
+ <div>工号</div>
|
|
16
|
+ <div>{{ loginUser.account || "暂无" }}</div>
|
|
17
|
+ </li>
|
|
18
|
+ <li>
|
|
19
|
+ <div>联系电话</div>
|
|
20
|
+ <div class="factionAdd" @click="toModify('mphone')">
|
|
21
|
+ <span>{{ loginUser.mphone || "暂无" }}</span>
|
|
22
|
+ <i class="iconfont icon-moren"></i>
|
|
23
|
+ </div>
|
|
24
|
+ </li>
|
|
25
|
+ <li class="myArea">
|
|
26
|
+ <div>区域地点</div>
|
|
27
|
+ <div>
|
|
28
|
+ <cube-button @click="showCascadePicker">
|
|
29
|
+ {{ areaData || "暂无" }}
|
|
30
|
+ <i class="iconfont icon-moren"></i>
|
|
31
|
+ </cube-button>
|
|
32
|
+ </div>
|
|
33
|
+ </li>
|
|
34
|
+ <li>
|
|
35
|
+ <div>详细地址</div>
|
|
36
|
+ <div class="factionAdd" @click="toModify('houseNumber')">
|
|
37
|
+ <span>{{ loginUser.houseNumber || "暂无" }}</span>
|
|
38
|
+ <i class="iconfont icon-moren"></i>
|
|
39
|
+ </div>
|
|
40
|
+ </li>
|
|
41
|
+ </ul>
|
|
42
|
+ </div>
|
|
43
|
+ <div class="goToSystem" @click="goToSystem">进入系统</div>
|
|
44
|
+ <promp-ting
|
|
45
|
+ :conents="promptingConent"
|
|
46
|
+ :status="promptingStatus"
|
|
47
|
+ ></promp-ting>
|
|
48
|
+ </div>
|
|
49
|
+</template>
|
|
50
|
+<script>
|
|
51
|
+import "./../../static/css/iconfont.js";
|
|
52
|
+import PrompTing from "./../views/prompting.vue";
|
|
53
|
+export default {
|
|
54
|
+ data() {
|
|
55
|
+ return {
|
|
56
|
+ repairMain: null,
|
|
57
|
+ loginUser: JSON.parse(localStorage.getItem("loginUser")),
|
|
58
|
+ incidentStateData: "",
|
|
59
|
+ treeData: [],
|
|
60
|
+ areaData: "",
|
|
61
|
+ promptingConent: "",
|
|
62
|
+ promptingStatus: ""
|
|
63
|
+ };
|
|
64
|
+ },
|
|
65
|
+ methods: {
|
|
66
|
+ loginNext() {
|
|
67
|
+ // seimin
|
|
68
|
+ // 获取报修主体
|
|
69
|
+ this.$http
|
|
70
|
+ .post("service/sysinfo/data/fetchDataList/systemConfiguration", {
|
|
71
|
+ idx: 0,
|
|
72
|
+ sum: 1000,
|
|
73
|
+ systemConfiguration: { keyconfig: "repairMain" }
|
|
74
|
+ })
|
|
75
|
+ .then(result => {
|
|
76
|
+ if (result.data.status == 200) {
|
|
77
|
+ var repairMain = result.data.list[0];
|
|
78
|
+ window.localStorage.setItem(
|
|
79
|
+ "repairMain",
|
|
80
|
+ JSON.stringify(repairMain)
|
|
81
|
+ );
|
|
82
|
+ // 获取是否自动建单
|
|
83
|
+ this.$http
|
|
84
|
+ .post("service/sysinfo/data/fetchDataList/systemConfiguration", {
|
|
85
|
+ idx: 0,
|
|
86
|
+ sum: 1000,
|
|
87
|
+ systemConfiguration: { keyconfig: "ifCreate" }
|
|
88
|
+ })
|
|
89
|
+ .then(result => {
|
|
90
|
+ if (result.data.status == 200) {
|
|
91
|
+ var ifCreate = result.data.list[0];
|
|
92
|
+ window.localStorage.setItem(
|
|
93
|
+ "ifCreate",
|
|
94
|
+ JSON.stringify(ifCreate)
|
|
95
|
+ );
|
|
96
|
+ this.$router.push({ path: "/main" });
|
|
97
|
+ }
|
|
98
|
+ });
|
|
99
|
+ }
|
|
100
|
+ });
|
|
101
|
+ // seimin
|
|
102
|
+ },
|
|
103
|
+ goToSystem() {
|
|
104
|
+ if (!this.loginUser.mphone) {
|
|
105
|
+ this.$createDialog({
|
|
106
|
+ type: "alert",
|
|
107
|
+ content: "联系电话不能为空",
|
|
108
|
+ icon: "cubeic-wrong"
|
|
109
|
+ }).show();
|
|
110
|
+ } else if (!this.areaData) {
|
|
111
|
+ this.$createDialog({
|
|
112
|
+ type: "alert",
|
|
113
|
+ content: "区域地点不能为空",
|
|
114
|
+ icon: "cubeic-wrong"
|
|
115
|
+ }).show();
|
|
116
|
+ } else {
|
|
117
|
+ this.loginNext();
|
|
118
|
+ }
|
|
119
|
+ },
|
|
120
|
+ toModify(data) {
|
|
121
|
+ this.$router.push({
|
|
122
|
+ name: "MyModify",
|
|
123
|
+ params: {
|
|
124
|
+ data
|
|
125
|
+ }
|
|
126
|
+ });
|
|
127
|
+ },
|
|
128
|
+ getUserAreaData() {
|
|
129
|
+ if (this.loginUser.place) {
|
|
130
|
+ this.areaData =
|
|
131
|
+ this.loginUser.place.area.area + " " + this.loginUser.place.place;
|
|
132
|
+ }
|
|
133
|
+ },
|
|
134
|
+ toIncidentList(res) {
|
|
135
|
+ this.$router.push({
|
|
136
|
+ name: "IncidentList",
|
|
137
|
+ params: {
|
|
138
|
+ state: res
|
|
139
|
+ }
|
|
140
|
+ });
|
|
141
|
+ },
|
|
142
|
+ getIncidentData() {
|
|
143
|
+ var that = this;
|
|
144
|
+ this.$http
|
|
145
|
+ .post("service/apply/bpm/fetchServiceTasks", {
|
|
146
|
+ assignee: that.loginUser.id,
|
|
147
|
+ idx: 0,
|
|
148
|
+ sum: 9999
|
|
149
|
+ })
|
|
150
|
+ .then(function(res) {
|
|
151
|
+ that.incidentStateData = res.data;
|
|
152
|
+ });
|
|
153
|
+ },
|
|
154
|
+ getAreaData() {
|
|
155
|
+ var that = this;
|
|
156
|
+ this.$http
|
|
157
|
+ .post("service/user/data/fetchDataList/area", {
|
|
158
|
+ idx: 0,
|
|
159
|
+ sum: 1000,
|
|
160
|
+ area: {
|
|
161
|
+ wechatArea: true
|
|
162
|
+ }
|
|
163
|
+ })
|
|
164
|
+ .then(function(res) {
|
|
165
|
+ var data = res.data.list;
|
|
166
|
+ for (var i = 0; i < data.length; i++) {
|
|
167
|
+ that.treeData.push({
|
|
168
|
+ text: data[i].area,
|
|
169
|
+ value: data[i].id,
|
|
170
|
+ children: []
|
|
171
|
+ });
|
|
172
|
+ }
|
|
173
|
+ });
|
|
174
|
+ },
|
|
175
|
+ getPlaceData() {
|
|
176
|
+ var that = this;
|
|
177
|
+ this.$http
|
|
178
|
+ .post("service/user/data/fetchDataList/place", {
|
|
179
|
+ idx: 0,
|
|
180
|
+ sum: 1000,
|
|
181
|
+ area: {
|
|
182
|
+ wechatAreaId: ""
|
|
183
|
+ }
|
|
184
|
+ })
|
|
185
|
+ .then(function(res) {
|
|
186
|
+ var data = res.data.list;
|
|
187
|
+ for (var i = 0; i < data.length; i++) {
|
|
188
|
+ for (var j = 0; j < that.treeData.length; j++) {
|
|
189
|
+ if (data[i].area.id == that.treeData[j].value) {
|
|
190
|
+ that.treeData[j].children.push({
|
|
191
|
+ text: data[i].place,
|
|
192
|
+ value: data[i].id
|
|
193
|
+ });
|
|
194
|
+ }
|
|
195
|
+ }
|
|
196
|
+ }
|
|
197
|
+ that.cascadePicker = that.$createCascadePicker({
|
|
198
|
+ title: "请选择区域地点",
|
|
199
|
+ data: that.treeData,
|
|
200
|
+ selectedIndex: [0, 0],
|
|
201
|
+ onSelect: that.selectHandle,
|
|
202
|
+ onCancel: that.cancelHandle
|
|
203
|
+ });
|
|
204
|
+ });
|
|
205
|
+ },
|
|
206
|
+ showCascadePicker() {
|
|
207
|
+ this.cascadePicker.show();
|
|
208
|
+ },
|
|
209
|
+ selectHandle(selectedVal, selectedIndex, selectedText) {
|
|
210
|
+ var that = this;
|
|
211
|
+ this.$http
|
|
212
|
+ .get(
|
|
213
|
+ "service/user/updPlace/" + this.loginUser.id + "/" + selectedVal[1],
|
|
214
|
+ {}
|
|
215
|
+ )
|
|
216
|
+ .then(function(res) {
|
|
217
|
+ if (res.status == 200) {
|
|
218
|
+ that.promptingConent = "恭喜您,修改区域地点成功!";
|
|
219
|
+ that.promptingStatus = true;
|
|
220
|
+ $("#fade").fadeIn();
|
|
221
|
+ setTimeout(function() {
|
|
222
|
+ $("#fade").fadeOut();
|
|
223
|
+ }, 2000);
|
|
224
|
+ if (!that.loginUser.place) {
|
|
225
|
+ that.loginUser.place = {
|
|
226
|
+ area: {}
|
|
227
|
+ };
|
|
228
|
+ }
|
|
229
|
+ that.loginUser.place.id = selectedVal[1];
|
|
230
|
+ that.loginUser.place.area.id = selectedVal[0];
|
|
231
|
+ that.loginUser.place.place = selectedText[1];
|
|
232
|
+ that.loginUser.place.area.area = selectedText[0];
|
|
233
|
+ var loginUserStr = JSON.stringify(that.loginUser);
|
|
234
|
+ localStorage.setItem("loginUser", loginUserStr);
|
|
235
|
+ that.areaData = selectedText[0] + " " + selectedText[1];
|
|
236
|
+ } else {
|
|
237
|
+ that.promptingConent = "对不起,修改失败,请稍后再试!";
|
|
238
|
+ that.promptingStatus = false;
|
|
239
|
+ $("#fade").fadeIn();
|
|
240
|
+ setTimeout(function() {
|
|
241
|
+ $("#fade").fadeOut();
|
|
242
|
+ }, 2000);
|
|
243
|
+ }
|
|
244
|
+ });
|
|
245
|
+ },
|
|
246
|
+ cancelHandle() {}
|
|
247
|
+ },
|
|
248
|
+ created() {
|
|
249
|
+ this.getUserAreaData();
|
|
250
|
+ this.getAreaData();
|
|
251
|
+ this.getPlaceData();
|
|
252
|
+ this.getIncidentData();
|
|
253
|
+ // 获取报修主体
|
|
254
|
+ this.repairMain = JSON.parse(localStorage.getItem("repairMain"));
|
|
255
|
+ },
|
|
256
|
+ mounted() {
|
|
257
|
+ // this.cascadePicker = this.$createCascadePicker({
|
|
258
|
+ // title: '请选择区域地点',
|
|
259
|
+ // data: this.treeData,
|
|
260
|
+ // selectedIndex: [0,0],
|
|
261
|
+ // onSelect: this.selectHandle,
|
|
262
|
+ // onCancel: this.cancelHandle
|
|
263
|
+ // })
|
|
264
|
+ },
|
|
265
|
+ components: {
|
|
266
|
+ PrompTing
|
|
267
|
+ }
|
|
268
|
+};
|
|
269
|
+</script>
|
|
270
|
+<style scoped>
|
|
271
|
+.goToSystem {
|
|
272
|
+ position: fixed;
|
|
273
|
+ left: 50%;
|
|
274
|
+ bottom: 0;
|
|
275
|
+ transform: translateX(-50%);
|
|
276
|
+ width: 90%;
|
|
277
|
+ height: 1rem;
|
|
278
|
+ background-color: #005395;
|
|
279
|
+ border-radius: 10px;
|
|
280
|
+ line-height: 1rem;
|
|
281
|
+ color: white;
|
|
282
|
+ font-size: 0.36rem;
|
|
283
|
+ text-align: center;
|
|
284
|
+}
|
|
285
|
+.bgColor {
|
|
286
|
+ background-color: white;
|
|
287
|
+}
|
|
288
|
+.icon {
|
|
289
|
+ width: 1em;
|
|
290
|
+ height: 1em;
|
|
291
|
+ vertical-align: -0.15em;
|
|
292
|
+ fill: currentColor;
|
|
293
|
+ overflow: hidden;
|
|
294
|
+}
|
|
295
|
+.label {
|
|
296
|
+ background-color: rgb(238, 238, 238);
|
|
297
|
+ height: 0.6rem;
|
|
298
|
+ line-height: 0.6rem;
|
|
299
|
+ padding-left: 0.2rem;
|
|
300
|
+ font-size: 0.24rem;
|
|
301
|
+ color: #666666;
|
|
302
|
+ border-top: 0.01rem rgb(223, 222, 222) solid;
|
|
303
|
+ border-bottom: 0.01rem rgb(223, 222, 222) solid;
|
|
304
|
+}
|
|
305
|
+/* 头像 */
|
|
306
|
+
|
|
307
|
+.head {
|
|
308
|
+ height: 2.4rem;
|
|
309
|
+ background: linear-gradient(#005395, #226ca8);
|
|
310
|
+ padding-top: 0.3rem;
|
|
311
|
+}
|
|
312
|
+
|
|
313
|
+.head .img {
|
|
314
|
+ width: 1.36rem;
|
|
315
|
+ height: 1.36rem;
|
|
316
|
+ border-radius: 50%;
|
|
317
|
+ margin: 0 auto;
|
|
318
|
+ overflow: hidden;
|
|
319
|
+ background: url(./../../static/images/avatar-1-big.jpg);
|
|
320
|
+ background-size: contain;
|
|
321
|
+}
|
|
322
|
+
|
|
323
|
+.head .name {
|
|
324
|
+ font-size: 0.32rem;
|
|
325
|
+ text-align: center;
|
|
326
|
+ margin-top: 0.2rem;
|
|
327
|
+ color: #ffffff;
|
|
328
|
+}
|
|
329
|
+
|
|
330
|
+/* 个人信息 */
|
|
331
|
+
|
|
332
|
+/* .myMessage { */
|
|
333
|
+/* background-color: rgb(242, 242, 242); */
|
|
334
|
+/* margin-top: .2rem */
|
|
335
|
+/* } */
|
|
336
|
+
|
|
337
|
+.myMessage li {
|
|
338
|
+ border-bottom: 0.01rem rgb(223, 222, 222) solid;
|
|
339
|
+ display: flex;
|
|
340
|
+ justify-content: space-between;
|
|
341
|
+ align-items: center;
|
|
342
|
+ /* padding: .2rem .28rem */
|
|
343
|
+ /* height: .88rem; */
|
|
344
|
+ /* line-height: .88rem; */
|
|
345
|
+ line-height: 0.4rem;
|
|
346
|
+ padding: 0.24rem 0.24rem;
|
|
347
|
+}
|
|
348
|
+
|
|
349
|
+.myMessage li div:nth-child(1) {
|
|
350
|
+ width: 35%;
|
|
351
|
+ font-size: 0.32rem;
|
|
352
|
+}
|
|
353
|
+
|
|
354
|
+.myMessage li div:nth-child(2) {
|
|
355
|
+ width: 55%;
|
|
356
|
+ display: flex;
|
|
357
|
+ justify-content: flex-end;
|
|
358
|
+ font-size: 0.32rem;
|
|
359
|
+ /* line-height: .3rem */
|
|
360
|
+}
|
|
361
|
+.factionAdd {
|
|
362
|
+ display: flex;
|
|
363
|
+ justify-content: space-between;
|
|
364
|
+ align-items: center;
|
|
365
|
+}
|
|
366
|
+.factionAdd span {
|
|
367
|
+ display: inline-block;
|
|
368
|
+ width: 90%;
|
|
369
|
+ text-align: right;
|
|
370
|
+}
|
|
371
|
+.factionAdd i {
|
|
372
|
+ display: inline-block;
|
|
373
|
+ font-size: 0.34rem;
|
|
374
|
+ width: 12%;
|
|
375
|
+}
|
|
376
|
+/* 我的报修 */
|
|
377
|
+
|
|
378
|
+/* .myRapir {
|
|
379
|
+ margin-top: .2rem
|
|
380
|
+} */
|
|
381
|
+
|
|
382
|
+.myRapir .tit {
|
|
383
|
+ /* background-color: rgb(242, 242, 242); */
|
|
384
|
+ height: 0.88rem;
|
|
385
|
+ line-height: 0.88rem;
|
|
386
|
+ display: flex;
|
|
387
|
+ padding: 0 0.24rem;
|
|
388
|
+ font-size: 0.32rem;
|
|
389
|
+ justify-content: space-between;
|
|
390
|
+ border-bottom: 0.01rem rgb(223, 222, 222) solid;
|
|
391
|
+}
|
|
392
|
+
|
|
393
|
+.rapirMessage {
|
|
394
|
+ display: flex;
|
|
395
|
+ height: 1.4rem;
|
|
396
|
+ border-bottom: 0.01rem rgb(223, 222, 222) solid;
|
|
397
|
+}
|
|
398
|
+.rapirMessage .status {
|
|
399
|
+ width: 16.5%;
|
|
400
|
+ border-left: 0.01rem rgb(223, 222, 222) solid;
|
|
401
|
+ display: flex;
|
|
402
|
+ align-items: center;
|
|
403
|
+ justify-content: center;
|
|
404
|
+ flex-direction: column;
|
|
405
|
+}
|
|
406
|
+.rapirMessage .status div:nth-child(1) {
|
|
407
|
+ width: 100%;
|
|
408
|
+ text-align: center;
|
|
409
|
+}
|
|
410
|
+.rapirMessage .status div:nth-child(1) svg {
|
|
411
|
+ width: 0.48rem;
|
|
412
|
+ height: 0.48rem;
|
|
413
|
+}
|
|
414
|
+.rapirMessage .status div:nth-child(2) {
|
|
415
|
+ margin-top: 0.2rem;
|
|
416
|
+ display: flex;
|
|
417
|
+ align-items: center;
|
|
418
|
+}
|
|
419
|
+.rapirMessage .status div:nth-child(2) span:nth-child(1) {
|
|
420
|
+ font-size: 0.24rem;
|
|
421
|
+ color: #333333;
|
|
422
|
+}
|
|
423
|
+.rapirMessage .status div:nth-child(2) span:nth-child(2) {
|
|
424
|
+ display: inline-block;
|
|
425
|
+ margin-left: 0.08rem;
|
|
426
|
+ font-size: 0.32rem;
|
|
427
|
+}
|
|
428
|
+</style>
|
|
429
|
+<style>
|
|
430
|
+.myArea .cube-btn {
|
|
431
|
+ padding: 0 !important;
|
|
432
|
+ background-color: white !important;
|
|
433
|
+ color: #333333 !important;
|
|
434
|
+ text-align: right !important;
|
|
435
|
+ overflow: hidden;
|
|
436
|
+ white-space: nowrap;
|
|
437
|
+ text-overflow: ellipsis;
|
|
438
|
+}
|
|
439
|
+</style>
|