瀏覽代碼

报修端初步修改

seimin 1 年之前
父節點
當前提交
b6f8273065
共有 9 個文件被更改,包括 296 次插入418 次删除
  1. 1 1
      src/views/Login.vue
  2. 2 2
      src/views/evaluate.vue
  3. 31 135
      src/views/incidentDetails.vue
  4. 67 80
      src/views/incidentList.vue
  5. 107 119
      src/views/indes.vue
  6. 7 5
      src/views/my.vue
  7. 6 6
      src/views/myModify.vue
  8. 72 67
      src/views/repair.vue
  9. 3 3
      src/views/supplementary.vue

+ 1 - 1
src/views/Login.vue

@@ -244,7 +244,7 @@ export default {
244 244
           );
245 245
           // 判断是否有区域地点或联系电话,没有则需要补充 liaomingming
246 246
           var requester = res.data.data.requester;
247
-          if (!requester.place || !requester.mphone) {
247
+          if (!requester.place || !requester.phone) {
248 248
             this.$router.push({ path: "/supplementary" });
249 249
           } else {
250 250
             this.loginNext(res.data.data.requester);

+ 2 - 2
src/views/evaluate.vue

@@ -165,8 +165,8 @@ export default {
165 165
             if(type === 'wechatRequesterIncident'){
166 166
               id = this.data.id;
167 167
             }else if(type === 'incident'){
168
-              if(this.data.incident){
169
-                id = this.data.incident.processInstanceId;
168
+              if(this.data){
169
+                id = this.data.processInstanceId;
170 170
               } else {
171 171
                 that['imgs_' + type] = [];
172 172
                 return;

+ 31 - 135
src/views/incidentDetails.vue

@@ -5,15 +5,15 @@
5 5
         报修信息
6 6
       </div>
7 7
       <div class="state">
8
-        <div>报修编号:{{ data.bxcode }}</div>
8
+        <div>工单单号:{{ data.incidentsign }}</div>
9 9
         <div :class="stateClassFn(data.state.name)">{{ data.state.name }}</div>
10 10
       </div>
11
-      <div class="description">
11
+      <div class="description" v-if="data.category">
12 12
         <div>
13 13
           报修类别:
14 14
         </div>
15 15
         <div>
16
-          {{ data.category ? data.category.category : '' }}
16
+          {{ data.category.category }}
17 17
         </div>
18 18
       </div>
19 19
       <div class="description">
@@ -59,7 +59,7 @@
59 59
         <div>
60 60
           <template v-if="data.place">
61 61
             {{ data.place.area.area }} {{ data.place.place }}
62
-          {{ data.address }}
62
+          {{ data.houseNumber }}
63 63
           </template>
64 64
         </div>
65 65
       </div>
@@ -68,8 +68,8 @@
68 68
           维修总金额:
69 69
         </div>
70 70
         <div>
71
-          <template v-if="data.incident.repairSummaryDTO">
72
-            {{ data.incident.repairSummaryDTO.totalMaintenancePrice }}元
71
+          <template v-if="data.repairSummaryDTO">
72
+            {{ data.repairSummaryDTO.totalMaintenancePrice }}元
73 73
           </template>
74 74
         </div>
75 75
       </div>
@@ -89,25 +89,25 @@
89 89
       <div class="handleUser">
90 90
         <div>
91 91
           维修人:{{
92
-            data.incident.handlingPersonnelUser &&
93
-            data.incident.handlingPersonnelUser.name
94
-              ? data.incident.handlingPersonnelUser.name
92
+            data.handlingPersonnelUser &&
93
+            data.handlingPersonnelUser.name
94
+              ? data.handlingPersonnelUser.name
95 95
               : "暂无"
96 96
           }}
97 97
         </div>
98 98
         <div>
99 99
           电话:<a
100
-            :href="'tel:' + data.incident.handlingPersonnelUser.phone"
100
+            :href="'tel:' + data.handlingPersonnelUser.phone"
101 101
             v-if="
102
-              data.incident.handlingPersonnelUser &&
103
-                data.incident.handlingPersonnelUser.phone
102
+              data.handlingPersonnelUser &&
103
+                data.handlingPersonnelUser.phone
104 104
             "
105
-            >{{ data.incident.handlingPersonnelUser.phone }}</a
105
+            >{{ data.handlingPersonnelUser.phone }}</a
106 106
           >
107 107
           <span
108 108
             v-if="
109
-              !data.incident.handlingPersonnelUser ||
110
-                !data.incident.handlingPersonnelUser.phone
109
+              !data.handlingPersonnelUser ||
110
+                !data.handlingPersonnelUser.phone
111 111
             "
112 112
             >暂无</span
113 113
           >
@@ -116,16 +116,16 @@
116 116
         <i
117 117
           class="iconfont icon-shouji"
118 118
           v-if="
119
-            !data.incident.handlingPersonnelUser ||
120
-              !data.incident.handlingPersonnelUser.phone
119
+            !data.handlingPersonnelUser ||
120
+              !data.handlingPersonnelUser.phone
121 121
           "
122 122
         ></i>
123 123
         <a
124 124
           v-if="
125
-            data.incident.handlingPersonnelUser &&
126
-              data.incident.handlingPersonnelUser.phone
125
+            data.handlingPersonnelUser &&
126
+              data.handlingPersonnelUser.phone
127 127
           "
128
-          :href="'tel:' + data.incident.handlingPersonnelUser.phone"
128
+          :href="'tel:' + data.handlingPersonnelUser.phone"
129 129
           ><i class="iconfont icon-shouji"></i
130 130
         ></a>
131 131
       </div>
@@ -207,46 +207,6 @@
207 207
           v-html="processMessage[3] ? processMessage[3].desc : ''"
208 208
         ></div>
209 209
       </div>
210
-      <!-- 处理日志 start -->
211
-      <div v-for="(item, i) in data.incident.handlerLogs" :key="i">
212
-        <div
213
-          class="process"
214
-          v-if="
215
-            processData == '处理' ||
216
-              processData == '评价' ||
217
-              (processData == '结束' && processData != '重复事件')
218
-          "
219
-        >
220
-          <div class="status">
221
-            {{ processMessage[2] ? processMessage[2].name : "" }}
222
-          </div>
223
-          <div class="ico">
224
-            <i
225
-              class="iconfont icon-icon_zhengzaijinx now"
226
-              v-if="processData == '处理' && i === 0"
227
-            ></i>
228
-            <i
229
-              class="iconfont icon-icon_weizuo last"
230
-              v-else
231
-            ></i>
232
-          </div>
233
-          <div class="time">
234
-            {{ item.opTime | timeFormat("MM-dd HH:mm:ss")}},{{ item.userName }}
235
-          </div>
236
-        </div>
237
-        <div
238
-          class="processCont"
239
-          v-if="
240
-            processData == '处理' ||
241
-              processData == '评价' ||
242
-              (processData == '结束' && processData != '重复事件')
243
-          "
244
-        >
245
-          <div class="status"></div>
246
-          <div class="conents"><span v-if="item.repairType && item.expectedDate">{{item.repairType.name}} {{item.expectedDate|timeFormat("MM月dd日前完成")}}</span><br>{{ item.opValue }}</div>
247
-        </div>
248
-      </div>
249
-      <!-- 处理日志 end -->
250 210
       <div
251 211
         class="process"
252 212
         v-if="
@@ -261,7 +221,7 @@
261 221
         <div class="ico">
262 222
           <i
263 223
             class="iconfont icon-icon_zhengzaijinx now"
264
-            v-if="processData == '处理' && !data.incident.handlerLogs"
224
+            v-if="processData == '处理'"
265 225
           ></i>
266 226
           <i
267 227
             class="iconfont icon-icon_weizuo last"
@@ -360,28 +320,6 @@
360 320
         ></div>
361 321
       </div>
362 322
     </div>
363
-    <!-- 处理日志 -->
364
-    <!-- <div class="repairProgress">
365
-      <div class="label">
366
-        处理日志
367
-      </div>
368
-      <div class="handlerLog">
369
-        <table class="handlerLog__table">
370
-          <tr>
371
-            <td class="xh">序号</td>
372
-            <td class="clr">处理人</td>
373
-            <td class="date">时间</td>
374
-            <td>内容</td>
375
-          </tr>
376
-          <tr v-for="(item,i) in data.incident.handlerLogs" :key="item.id">
377
-            <td>{{ i + 1 }}</td>
378
-            <td>{{ item.userName }}</td>
379
-            <td>{{ item.opTime | timeFormat("yyyy-MM-dd HH:mm:ss")}}</td>
380
-            <td>{{ item.opValue }}</td>
381
-          </tr>
382
-        </table>
383
-      </div>
384
-    </div> -->
385 323
     <!-- 撤回原因 -->
386 324
     <div class="label" v-if="processData == '已撤回'">
387 325
       撤回原因
@@ -408,13 +346,13 @@
408 346
     </div>
409 347
     <div class="chehui" v-if="processData == '申请'">
410 348
       <div class="btn" @click="cehui()">撤&nbsp;回</div>
411
-      <div class="btn" @click="goToSummary()" v-if="data.incident.duty && data.incident.duty.addSummary == 1">维修单</div>
349
+      <div class="btn" @click="goToSummary()" v-if="data.duty && data.duty.addSummary == 1">维修单</div>
412 350
     </div>
413 351
     <div class="chehui" v-if="processData == '评价'">
414 352
       <div class="btn" @click="evaluate()">评&nbsp;价</div>
415
-      <div class="btn" @click="goToSummary()" v-if="data.incident.duty && data.incident.duty.addSummary == 1">维修单</div>
353
+      <div class="btn" @click="goToSummary()" v-if="data.duty && data.duty.addSummary == 1">维修单</div>
416 354
     </div>
417
-    <div class="chehui" v-if="processData != '申请' && processData != '评价' && data.incident.duty && data.incident.duty.addSummary == 1">
355
+    <div class="chehui" v-if="processData != '申请' && processData != '评价' && data.duty && data.duty.addSummary == 1">
418 356
       <div class="btn" @click="goToSummary()">维修单</div>
419 357
     </div>
420 358
     <div class="fot"></div>
@@ -453,7 +391,7 @@ export default {
453 391
   methods: {
454 392
     goToSummary(){
455 393
       this.$router.push({
456
-        path: `/summaryOrderDetail/${this.data.incident.id}`
394
+        path: `/summaryOrderDetail/${this.data.id}`
457 395
       });
458 396
     },
459 397
     evaluate() {
@@ -548,12 +486,7 @@ export default {
548 486
     getParamsData() {
549 487
       this.data = JSON.parse(this.$route.params.data);
550 488
       console.log(this.data);
551
-      if(!this.data.incident.handlerLogs){
552
-        this.data.incident.handlerLogs = [];
553
-      }else{
554
-        this.data.incident.handlerLogs.reverse();
555
-      }
556
-      if (this.data.incident.repeat) {
489
+      if (this.data.repeat) {
557 490
         this.processData = "重复事件";
558 491
       } else if (this.data.state.name == "不受理") {
559 492
         this.processData = "不受理";
@@ -572,11 +505,11 @@ export default {
572 505
     },
573 506
     getProcessTime() {
574 507
       var that = this;
575
-      if (this.data.incident.processInstanceId) {
508
+      if (this.data.processInstanceId) {
576 509
         this.$http
577 510
           .post(
578 511
             "service/bpm/bpm/flowTracing/" +
579
-              this.data.incident.processInstanceId,
512
+              this.data.processInstanceId,
580 513
             {}
581 514
           )
582 515
           .then(function(res) {
@@ -590,8 +523,8 @@ export default {
590 523
       if(type === 'wechatRequesterIncident'){
591 524
         id = this.data.id;
592 525
       }else if(type === 'incident'){
593
-        if(this.data.incident){
594
-          id = this.data.incident.processInstanceId;
526
+        if(this.data){
527
+          id = this.data.id;
595 528
         } else {
596 529
           that['imgs_' + type] = [];
597 530
           return;
@@ -600,16 +533,11 @@ export default {
600 533
       this.$http
601 534
         .get(
602 535
           "service/common/common/listAttachment/"+ type +"/" + id,
603
-          {
604
-            // this.$http.get('service/common/common/listAttachment/wechatRequesterIncident/'+this.data.bxcode,{
605
-          }
536
+          {}
606 537
         )
607 538
         .then(function(res) {
608 539
           for (var i = 0; i < res.data.data.length; i++) {
609
-            // that.imgs_wechatRequesterIncident.push("http://localhost/service/common/common/downloadAttachment/"+res.data.data[i].token)
610
-            // that.imgs_wechatRequesterIncident.push("http://weixintest.ngser.dashitech.com/service/common/common/downloadAttachment/"+res.data.data[i].token)
611 540
             that['imgs_' + type].push(location.origin + '/file' + res.data.data[i].relativeFilePath);
612
-            // that.imgs_wechatRequesterIncident.push("http://192.168.3.95/service/common/common/downloadAttachment/"+res.data.data[i].token)
613 541
           }
614 542
         });
615 543
     },
@@ -630,32 +558,6 @@ export default {
630 558
         return "yichehui";
631 559
       }
632 560
     },
633
-    getProcessData() {
634
-      var that = this;
635
-      this.$http
636
-        .post(
637
-          "service/bpm/bpm/flowTracing/" + this.data.incident.processInstanceId,
638
-          {}
639
-        )
640
-        .then(function(res) {
641
-          var data = res.data.data;
642
-          // if(data.length==0&&that.data.state.name=="已解决"){
643
-          //     that.processData="不受理"
644
-          // }else if(data.length==0&&that.data.state.name=="未受理"){
645
-          //     that.processData="申请"
646
-          // }else if(data.length>0&&data[data.length-1].activityName=="接单"){
647
-          //     that.processData="处理"
648
-          // }else if(data.length>0&&data[data.length-1].activityName=="事件处理"){
649
-          //     that.processData="处理"
650
-          // }else if(data.length>0&&data[data.length-1].activityName=="事件关闭"){
651
-          //     that.processData="评价"
652
-          // }else if(data.length>0&&data[data.length-1].activityName=="结束"){
653
-          //     that.processData="结束"
654
-          // }else{
655
-          //     that.processData="已撤回"
656
-          // }
657
-        });
658
-    },
659 561
     getProcessMessageData() {
660 562
       var that = this;
661 563
       this.$http
@@ -669,11 +571,6 @@ export default {
669 571
         .then(function(res) {
670 572
           that.processMessage = res.data.list;
671 573
           console.log(that.processMessage);
672
-          // that.shenqing=that.processMessage[0].desc;
673
-          // that.shouli=that.processMessage[1].desc;
674
-          // that.chuli=that.processMessage[2].desc;
675
-          // that.pingjia=that.processMessage[3].desc;
676
-          // that.jieshu=that.processMessage[4].desc;
677 574
         });
678 575
     }
679 576
   },
@@ -686,7 +583,6 @@ export default {
686 583
     this.getParamsData();
687 584
     this.getImgsData('wechatRequesterIncident');
688 585
     this.getImgsData('incident');
689
-    this.getProcessData();
690 586
     this.getProcessMessageData();
691 587
     this.getProcessTime();
692 588
   }

+ 67 - 80
src/views/incidentList.vue

@@ -28,7 +28,7 @@
28 28
                   <div class="title">
29 29
                     <div>
30 30
                       <i class="iconfont icon-baoxiuliebiao"></i
31
-                      ><span>{{ data.bxcode || "暂无" }}</span>
31
+                      ><span>{{ data.incidentsign || "暂无" }}</span>
32 32
                     </div>
33 33
                     <div :class="stateClassFn(data.state.name)">
34 34
                       {{ data.state.name }}
@@ -40,12 +40,12 @@
40 40
                   <div class="timeBox">
41 41
                     <div>
42 42
                       维修人:&nbsp;{{
43
-                        data.incident.handlingPersonnelUser
44
-                          ? data.incident.handlingPersonnelUser.name
43
+                        data.handlingPersonnelUser
44
+                          ? data.handlingPersonnelUser.name
45 45
                           : "暂无"
46 46
                       }}
47 47
                     </div>
48
-                    <div>报修时间:&nbsp;{{ data.createTime }}</div>
48
+                    <div>报修时间:&nbsp;{{ data.startDate }}</div>
49 49
                   </div>
50 50
                   <div
51 51
                     class="timeBox noneBorder"
@@ -130,36 +130,7 @@ export default {
130 130
       pullUpLoadMoreTxt: "Load more",
131 131
       pullUpLoadNoMoreTxt: "没有更多数据",
132 132
       customPullDown: true,
133
-      stateData: [
134
-        {
135
-          text: "全部",
136
-          value: 0,
137
-        },
138
-        {
139
-          text: "未受理",
140
-          value: 1592,
141
-        },
142
-        {
143
-          text: "不受理",
144
-          value: 1593,
145
-        },
146
-        {
147
-          text: "处理中",
148
-          value: 1594,
149
-        },
150
-        {
151
-          text: "待评价",
152
-          value: 1595,
153
-        },
154
-        {
155
-          text: "已解决",
156
-          value: 1596,
157
-        },
158
-        {
159
-          text: "已撤回",
160
-          value: 1597,
161
-        },
162
-      ],
133
+      stateData: [],
163 134
       stateValue: 0,
164 135
       sum: 10,
165 136
       idx: 0,
@@ -203,6 +174,19 @@ export default {
203 174
     },
204 175
   },
205 176
   methods: {
177
+    getIncidentStatus(){
178
+        this.$http.post('service/common/common/getDictionary',{
179
+            key: "incident_status",
180
+            type: "list"
181
+        }).then((res) => {
182
+            let stateData = res.data.map(v => ({
183
+              text: v.name,
184
+              value: v.id,
185
+            }));
186
+            this.stateData = [...[{text: '全部', value: 0}], ...stateData];
187
+            this.getData(this.idx, this.sum);
188
+        })
189
+    },
206 190
     changeTab(tab){
207 191
       this.avtiveTabId = tab.id;
208 192
       this.stateChange();
@@ -234,26 +218,27 @@ export default {
234 218
       this.loadShow = true;
235 219
       that.items = [];
236 220
       this.$http
237
-        .post("service/apply/bpm/fetchServiceTasks", {
238
-          deptId: that.loginUser.dept?that.loginUser.dept.id:undefined,
239
-          state: that.stateValue,
221
+        .post("service/user/data/fetchDataList/incident", {
240 222
           idx: 0,
241 223
           sum: 10,
242
-          assignee: this.avtiveTabId == -1 ? this.loginUser.account : undefined,
243
-          deptId: this.avtiveTabId == -2 ? this.loginUser.dept.id : undefined,
224
+          incident: {
225
+            requester: this.avtiveTabId == -1 ? { id: this.loginUser.id } : undefined,
226
+            department: this.avtiveTabId == -2 ? { id: this.loginUser.dept.id } : undefined,
227
+            statusId: that.stateValue || undefined,
228
+          }
244 229
         })
245 230
         .then((res) => {
246
-          if (res.data.data.length > 0) {
247
-            for (var i = 0; i < res.data.data.length; i++) {
248
-              res.data.data[i].createTime = formatDate(
249
-                new Date(res.data.data[i].createTime),
231
+          if (res.data.list.length > 0) {
232
+            for (var i = 0; i < res.data.list.length; i++) {
233
+              res.data.list[i].startDate = formatDate(
234
+                new Date(res.data.list[i].startDate),
250 235
                 "yyyy-MM-dd hh:mm"
251 236
               );
252 237
             }
253 238
             if (this.idx) {
254
-              this.items = this.items.concat(res.data.data);
239
+              this.items = this.items.concat(res.data.list);
255 240
             } else {
256
-              this.items = res.data.data;
241
+              this.items = res.data.list;
257 242
             }
258 243
           } else {
259 244
             that.$refs.scroll.forceUpdate();
@@ -276,27 +261,27 @@ export default {
276 261
         var that = this;
277 262
         // that.items=[];
278 263
         this.$http
279
-          .post("service/apply/bpm/fetchServiceTasks", {
280
-            // assignee: that.loginUser.account,
281
-            deptId: that.loginUser.dept?that.loginUser.dept.id:undefined,
282
-            state: that.stateValue,
264
+          .post("service/user/data/fetchDataList/incident", {
283 265
             idx: 0,
284 266
             sum: 10,
285
-            assignee: this.avtiveTabId == -1 ? this.loginUser.account : undefined,
286
-            deptId: this.avtiveTabId == -2 ? this.loginUser.dept.id : undefined,
267
+            incident: {
268
+              requester: this.avtiveTabId == -1 ? { id: this.loginUser.id } : undefined,
269
+              department: this.avtiveTabId == -2 ? { id: this.loginUser.dept.id } : undefined,
270
+              statusId: that.stateValue || undefined,
271
+            }
287 272
           })
288 273
           .then((res) => {
289
-            if (res.data.data.length > 0) {
290
-              for (var i = 0; i < res.data.data.length; i++) {
291
-                res.data.data[i].createTime = formatDate(
292
-                  new Date(res.data.data[i].createTime),
274
+            if (res.data.list.length > 0) {
275
+              for (var i = 0; i < res.data.list.length; i++) {
276
+                res.data.list[i].startDate = formatDate(
277
+                  new Date(res.data.list[i].startDate),
293 278
                   "yyyy-MM-dd hh:mm"
294 279
                 );
295 280
               }
296 281
               if (this.idx) {
297
-                this.items = this.items.concat(res.data.data);
282
+                this.items = this.items.concat(res.data.list);
298 283
               } else {
299
-                this.items = res.data.data;
284
+                this.items = res.data.list;
300 285
               }
301 286
             } else {
302 287
               that.$refs.scroll.forceUpdate();
@@ -307,26 +292,27 @@ export default {
307 292
     getData(idx, sum) {
308 293
       var that = this;
309 294
       this.$http
310
-        .post("service/apply/bpm/fetchServiceTasks", {
311
-          deptId: that.loginUser.dept?that.loginUser.dept.id:undefined,
312
-          state: that.stateValue,
295
+        .post("service/user/data/fetchDataList/incident", {
313 296
           idx: idx,
314 297
           sum: sum,
315
-          assignee: this.avtiveTabId == -1 ? this.loginUser.account : undefined,
316
-          deptId: this.avtiveTabId == -2 ? this.loginUser.dept.id : undefined,
298
+          incident: {
299
+            requester: this.avtiveTabId == -1 ? { id: this.loginUser.id } : undefined,
300
+            department: this.avtiveTabId == -2 ? { id: this.loginUser.dept.id } : undefined,
301
+            statusId: that.stateValue || undefined,
302
+          }
317 303
         })
318 304
         .then((res) => {
319
-          if (res.data.data.length > 0) {
320
-            for (var i = 0; i < res.data.data.length; i++) {
321
-              res.data.data[i].createTime = formatDate(
322
-                new Date(res.data.data[i].createTime),
305
+          if (res.data.list.length > 0) {
306
+            for (var i = 0; i < res.data.list.length; i++) {
307
+              res.data.list[i].startDate = formatDate(
308
+                new Date(res.data.list[i].startDate),
323 309
                 "yyyy-MM-dd hh:mm"
324 310
               );
325 311
             }
326 312
             if (this.idx) {
327
-              this.items = this.items.concat(res.data.data);
313
+              this.items = this.items.concat(res.data.list);
328 314
             } else {
329
-              this.items = res.data.data;
315
+              this.items = res.data.list;
330 316
             }
331 317
           } else {
332 318
             this.$refs.scroll.forceUpdate();
@@ -338,26 +324,27 @@ export default {
338 324
       var that = this;
339 325
       that.idx = that.idx + 1;
340 326
       this.$http
341
-        .post("service/apply/bpm/fetchServiceTasks", {
342
-          deptId: that.loginUser.dept?that.loginUser.dept.id:undefined,
343
-          state: that.stateValue,
327
+        .post("service/user/data/fetchDataList/incident", {
344 328
           idx: that.idx,
345 329
           sum: that.sum,
346
-          assignee: this.avtiveTabId == -1 ? this.loginUser.account : undefined,
347
-          deptId: this.avtiveTabId == -2 ? this.loginUser.dept.id : undefined,
330
+          incident: {
331
+            requester: this.avtiveTabId == -1 ? { id: this.loginUser.id } : undefined,
332
+            department: this.avtiveTabId == -2 ? { id: this.loginUser.dept.id } : undefined,
333
+            statusId: that.stateValue || undefined,
334
+          }
348 335
         })
349 336
         .then((res) => {
350
-          for (var i = 0; i < res.data.data.length; i++) {
351
-            res.data.data[i].createTime = formatDate(
352
-              new Date(res.data.data[i].createTime),
337
+          for (var i = 0; i < res.data.list.length; i++) {
338
+            res.data.list[i].startDate = formatDate(
339
+              new Date(res.data.list[i].startDate),
353 340
               "yyyy-MM-dd hh:mm"
354 341
             );
355 342
           }
356
-          if (res.data.data.length > 0) {
343
+          if (res.data.list.length > 0) {
357 344
             if (this.idx) {
358
-              this.items = this.items.concat(res.data.data);
345
+              this.items = this.items.concat(res.data.list);
359 346
             } else {
360
-              this.items = res.data.data;
347
+              this.items = res.data.list;
361 348
             }
362 349
           } else {
363 350
             that.$refs.scroll.forceUpdate();
@@ -399,7 +386,7 @@ export default {
399 386
   mounted() {
400 387
     this.getParamsState();
401 388
     setTimeout(()=>{
402
-      this.getData(this.idx, this.sum);
389
+      this.getIncidentStatus();
403 390
     },0)
404 391
   },
405 392
 };

+ 107 - 119
src/views/indes.vue

@@ -59,106 +59,104 @@
59 59
             >更多<i class="iconfont icon-moren"></i
60 60
           ></span>
61 61
         </div>
62
-        <div
63
-          class="conentBox"
64
-          v-for="v in newRapirData"
65
-          @click="toIncidentDetails(v)"
66
-          v-if="!newRapirNoData && !newRapirLoading"
67
-        >
68
-          <div class="conent">
69
-            <div class="head">
70
-              <!-- <span>{{v.requester.name}}</span> -->
71
-              <span>报修编号:{{ v.bxcode }}</span>
72
-              <span>{{ v.createTime }}</span>
73
-            </div>
74
-            <div class="cot">
75
-              {{ v.description }}
62
+        <template v-if="!newRapirNoData && !newRapirLoading">
63
+          <div class="conentBox" v-for="v in newRapirData" :key="v.id" @click="toIncidentDetails(v)">
64
+            <div class="conent">
65
+              <div class="head">
66
+                <!-- <span>{{v.requester.name}}</span> -->
67
+                <span>工单单号:{{ v.incidentsign }}</span>
68
+                <span>{{ v.startDate }}</span>
69
+              </div>
70
+              <div class="cot">
71
+                {{ v.description }}
72
+              </div>
76 73
             </div>
77
-          </div>
78
-          <div class="flowChart">
79
-            <div class="pits">
80
-              <div :class="state != 1 ? 'yesLine' : ''"></div>
81
-              <div :class="state != 1 && state != 2 ? 'yesLine' : ''"></div>
82
-              <div
83
-                :class="state != 1 && state != 2 && state != 3 ? 'yesLine' : ''"
84
-              ></div>
85
-              <div
86
-                :class="
87
-                  state != 1 && state != 2 && state != 3 && state != 4
88
-                    ? 'yesLine'
89
-                    : ''
90
-                "
91
-              ></div>
74
+            <div class="flowChart">
75
+              <div class="pits">
76
+                <div :class="state != 1 ? 'yesLine' : ''"></div>
77
+                <div :class="state != 1 && state != 2 ? 'yesLine' : ''"></div>
78
+                <div
79
+                  :class="state != 1 && state != 2 && state != 3 ? 'yesLine' : ''"
80
+                ></div>
81
+                <div
82
+                  :class="
83
+                    state != 1 && state != 2 && state != 3 && state != 4
84
+                      ? 'yesLine'
85
+                      : ''
86
+                  "
87
+                ></div>
92 88
 
93
-              <i class="iconfont icon-icon_weizuo shenqing no" v-if="false"></i>
94
-              <i
95
-                class="iconfont icon-icon_weizuo shouli no"
96
-                v-if="state == 1"
97
-              ></i>
98
-              <i
99
-                class="iconfont icon-icon_weizuo chuli no"
100
-                v-if="state == 2 || state == 1"
101
-              ></i>
102
-              <i
103
-                class="iconfont icon-icon_weizuo pingjia no"
104
-                v-if="state == 3 || state == 2 || state == 1"
105
-              ></i>
106
-              <i
107
-                class="iconfont icon-icon_weizuo wancheng no"
108
-                v-if="state == 4 || state == 3 || state == 2 || state == 1"
109
-              ></i>
89
+                <i class="iconfont icon-icon_weizuo shenqing no" v-if="false"></i>
90
+                <i
91
+                  class="iconfont icon-icon_weizuo shouli no"
92
+                  v-if="state == 1"
93
+                ></i>
94
+                <i
95
+                  class="iconfont icon-icon_weizuo chuli no"
96
+                  v-if="state == 2 || state == 1"
97
+                ></i>
98
+                <i
99
+                  class="iconfont icon-icon_weizuo pingjia no"
100
+                  v-if="state == 3 || state == 2 || state == 1"
101
+                ></i>
102
+                <i
103
+                  class="iconfont icon-icon_weizuo wancheng no"
104
+                  v-if="state == 4 || state == 3 || state == 2 || state == 1"
105
+                ></i>
110 106
 
111
-              <i
112
-                class="iconfont icon-icon_weizuo shenqing yes"
113
-                v-if="state != 1"
114
-              ></i>
115
-              <i
116
-                class="iconfont icon-icon_weizuo shouli yes"
117
-                v-if="state != 1 && state != 2"
118
-              ></i>
119
-              <i
120
-                class="iconfont icon-icon_weizuo chuli yes"
121
-                v-if="state != 1 && state != 2 && state != 3"
122
-              ></i>
123
-              <i
124
-                class="iconfont icon-icon_weizuo pingjia yes"
125
-                v-if="state != 1 && state != 2 && state != 3 && state != 4"
126
-              ></i>
127
-              <i
128
-                class="iconfont icon-icon_weizuo wancheng yes"
129
-                v-if="false"
130
-              ></i>
107
+                <i
108
+                  class="iconfont icon-icon_weizuo shenqing yes"
109
+                  v-if="state != 1"
110
+                ></i>
111
+                <i
112
+                  class="iconfont icon-icon_weizuo shouli yes"
113
+                  v-if="state != 1 && state != 2"
114
+                ></i>
115
+                <i
116
+                  class="iconfont icon-icon_weizuo chuli yes"
117
+                  v-if="state != 1 && state != 2 && state != 3"
118
+                ></i>
119
+                <i
120
+                  class="iconfont icon-icon_weizuo pingjia yes"
121
+                  v-if="state != 1 && state != 2 && state != 3 && state != 4"
122
+                ></i>
123
+                <i
124
+                  class="iconfont icon-icon_weizuo wancheng yes"
125
+                  v-if="false"
126
+                ></i>
131 127
 
132
-              <i
133
-                class="iconfont icon-icon_zhengzaijinx shenqing now"
134
-                v-if="state == 1"
135
-              ></i>
136
-              <i
137
-                class="iconfont icon-icon_zhengzaijinx shouli now"
138
-                v-if="state == 2"
139
-              ></i>
140
-              <i
141
-                class="iconfont icon-icon_zhengzaijinx chuli now"
142
-                v-if="state == 3"
143
-              ></i>
144
-              <i
145
-                class="iconfont icon-icon_zhengzaijinx pingjia now"
146
-                v-if="state == 4"
147
-              ></i>
148
-              <i
149
-                class="iconfont icon-icon_zhengzaijinx wancheng now"
150
-                v-if="state == 5"
151
-              ></i>
152
-            </div>
153
-            <div class="words">
154
-              <div>申请</div>
155
-              <div>受理</div>
156
-              <div>处理</div>
157
-              <div>评价</div>
158
-              <div>完成</div>
128
+                <i
129
+                  class="iconfont icon-icon_zhengzaijinx shenqing now"
130
+                  v-if="state == 1"
131
+                ></i>
132
+                <i
133
+                  class="iconfont icon-icon_zhengzaijinx shouli now"
134
+                  v-if="state == 2"
135
+                ></i>
136
+                <i
137
+                  class="iconfont icon-icon_zhengzaijinx chuli now"
138
+                  v-if="state == 3"
139
+                ></i>
140
+                <i
141
+                  class="iconfont icon-icon_zhengzaijinx pingjia now"
142
+                  v-if="state == 4"
143
+                ></i>
144
+                <i
145
+                  class="iconfont icon-icon_zhengzaijinx wancheng now"
146
+                  v-if="state == 5"
147
+                ></i>
148
+              </div>
149
+              <div class="words">
150
+                <div>申请</div>
151
+                <div>受理</div>
152
+                <div>处理</div>
153
+                <div>评价</div>
154
+                <div>完成</div>
155
+              </div>
159 156
             </div>
160 157
           </div>
161
-        </div>
158
+        </template>
159
+
162 160
         <!-- 无数据 -->
163 161
         <div class="wushuju" v-if="newRapirNoData">
164 162
           <img src="./../../static/images/wushuju.svg" alt="" />
@@ -183,7 +181,7 @@
183 181
         <div class="conentBox" v-if="!newNoticeNoData && !newNoticeLoading">
184 182
           <div
185 183
             class="conent"
186
-            v-for="v in noticeData"
184
+            v-for="v in noticeData" :key="v.id"
187 185
             @click="toNoticeDetails(v)"
188 186
           >
189 187
             <div class="head">
@@ -260,46 +258,36 @@ export default {
260 258
     getNewRapir() {
261 259
       var that = this;
262 260
       this.$http
263
-        .post("service/apply/bpm/fetchServiceTasks", {
264
-          deptId: that.loginUser.dept?that.loginUser.dept.id:undefined,
261
+        .post("service/user/data/fetchDataList/incident", {
262
+          incident: {
263
+            department: that.loginUser.dept ? { id: that.loginUser.dept.id, } : undefined,
264
+            source:{value:'im'}
265
+          },
265 266
           idx: 0,
266 267
           sum: 1
267 268
         })
268 269
         .then(function(res) {
269 270
           that.newRapirLoading = false;
270
-          if (res.data.data.length > 0) {
271
+          if (res.data.list.length > 0) {
271 272
             that.newRapirNoData = false;
272
-            that.newRapirData = res.data.data;
273
-            that.newRapirData[0].createTime = formatDate(
274
-              new Date(that.newRapirData[0].createTime),
273
+            that.newRapirData = res.data.list;
274
+            that.newRapirData[0].startDate = formatDate(
275
+              new Date(that.newRapirData[0].startDate),
275 276
               "MM-dd hh:mm"
276 277
             );
277
-            if (
278
-              that.newRapirData[0].state.name == "未受理" ||
279
-              that.newRapirData[0].state.name == "未受理"
280
-            ) {
278
+            if (that.newRapirData[0].state.value == "accept" || that.newRapirData[0].state.value == "storage" || that.newRapirData[0].state.value == "reassign") {
281 279
               that.state = 1;
282
-            } else if (that.newRapirData[0].state.name == "已受理") {
280
+            } else if (that.newRapirData[0].state.value == "pending") {
283 281
               that.state = 2;
284
-            } else if (that.newRapirData[0].state.name == "处理中") {
282
+            } else if (that.newRapirData[0].state.value == "handler") {
285 283
               that.state = 3;
286
-            } else if (that.newRapirData[0].state.name == "待评价") {
284
+            } else if (that.newRapirData[0].state.value == "resolved") {
287 285
               that.state = 4;
288
-            } else if (that.newRapirData[0].state.name == "已解决") {
286
+            } else if (that.newRapirData[0].state.value == "close") {
289 287
               that.state = 5;
290 288
             } else {
291 289
               that.state = 5;
292 290
             }
293
-            if (
294
-              that.newRapirData[0].incident.state &&
295
-              that.newRapirData[0].incident.state.name
296
-            ) {
297
-              if (that.newRapirData[0].incident.state.name == "待接单") {
298
-                that.state = 3;
299
-              } else if (that.newRapirData[0].incident.state.name == "处理中") {
300
-                that.state = 3;
301
-              }
302
-            }
303 291
             console.log(that.state);
304 292
           } else {
305 293
             that.newRapirNoData = true;

+ 7 - 5
src/views/my.vue

@@ -52,7 +52,7 @@
52 52
 
53 53
         <li>
54 54
           <div><span class="red">*</span>联系电话</div>
55
-          <div><cube-input v-model="loginUser.mphone" class="inputName"></cube-input></div>
55
+          <div><cube-input v-model="loginUser.phone" class="inputName"></cube-input></div>
56 56
         </li>
57 57
 
58 58
       </ul>
@@ -253,7 +253,7 @@ export default {
253 253
         }).show();
254 254
         return;
255 255
       }
256
-      if (!this.loginUser.mphone) {
256
+      if (!this.loginUser.phone) {
257 257
         this.$createDialog({
258 258
           type: "alert",
259 259
           content: "联系电话不能为空",
@@ -268,9 +268,8 @@ export default {
268 268
       });
269 269
       toast.show();
270 270
       this.$http
271
-        .post("service/user/data/addData/requester", {
272
-          repairType: this.repairMain.valueconfig,
273
-          requester: this.loginUser,
271
+        .post("service/user/data/addData/user", {
272
+          user: this.loginUser,
274 273
         })
275 274
         .then((res) => {
276 275
           toast.hide();
@@ -296,6 +295,9 @@ export default {
296 295
     }
297 296
   },
298 297
   created() {
298
+    if(this.loginUser.place){
299
+      this.loginUser.area = this.loginUser.place.area;
300
+    }
299 301
     // 回显选择的报修科室
300 302
     if(this.$route.params.dataInfo){
301 303
       this.loginUser = this.$route.params.dataInfo;

+ 6 - 6
src/views/myModify.vue

@@ -38,17 +38,17 @@ export default {
38 38
             value: this.loginUser.houseNumber
39 39
           };
40 40
           break;
41
-        case "mphone":
41
+        case "phone":
42 42
           this.value = {
43
-            type: "mphone",
43
+            type: "phone",
44 44
             name: "联系电话",
45
-            value: this.loginUser.mphone
45
+            value: this.loginUser.phone
46 46
           };
47 47
           break;
48 48
       }
49 49
     },
50 50
     sub() {
51
-      if (!this.value.value && this.value.type == "mphone") {
51
+      if (!this.value.value && this.value.type == "phone") {
52 52
         this.$createDialog({
53 53
           type: "alert",
54 54
           title: "保存失败",
@@ -67,11 +67,11 @@ export default {
67 67
               houseNum: that.value.value
68 68
             };
69 69
             break;
70
-          case "mphone":
70
+          case "phone":
71 71
             url = "service/user/updPhone";
72 72
             postData = {
73 73
               reqId: that.loginUser.id,
74
-              mphone: that.value.value
74
+              phone: that.value.value
75 75
             };
76 76
             break;
77 77
         }

+ 72 - 67
src/views/repair.vue

@@ -441,74 +441,79 @@ export default {
441 441
     },
442 442
     submmitBx(){
443 443
       var that = this;
444
-      this.$http.get("service/bpm/bpm/restful/sj", {}).then((res) => {
445
-        that.model.incidentsign = res.data.data;
446
-        delete this.model.pcaValue;
447
-        this.model["requester"] = this.loginUser;
448
-        this.model.fileUrl = "url";
449
-        this.model.sourceType = "wechatRequesterIncident";
450
-        var reqData = {
451
-          incident: JSON.parse(JSON.stringify(this.model))
452
-        };
453
-        //  报修主体是报修科室的时候,不传科室id
454
-        if (this.repairMain.valueconfig == 2) {
455
-          reqData.incident.deptId = this.deptId;
456
-        } else {
457
-          delete reqData.incident.deptId;
458
-        }
459
-        if (this.ifRoom == 1) {
460
-          reqData.incident.roomId = this.model.roomId;
461
-        } else {
462
-          delete reqData.incident.roomId;
463
-        }
464
-        reqData.incident.branch = this.model.branch || undefined;
465
-        this.$http
466
-          .post("service/flow/incident/task/request", reqData)
467
-          .then(function(res) {
468
-            if (res.data.state == 200) {
469
-              that.action.target = that.action.target + res.data.data.id;
470
-              setTimeout(function() {
471
-                that.$refs.upload.start();
472
-              }, 100);
473
-              $("#fade").fadeIn();
474
-              that.promptingConent = "恭喜您,新建报修成功!";
475
-              that.promptingStatus = true;
476
-              that.dialog = that
477
-                .$createDialog({
478
-                  type: "alert",
479
-                  title: "报修成功",
480
-                  content: "点击返回首页",
481
-                  icon: "cubeic-right",
482
-                  onConfirm: (e, promptValue) => {
483
-                    that.$router.push({ path: "/main" });
484
-                  }
485
-                })
486
-                .show();
487
-              setTimeout(function() {
488
-                $("#fade").fadeOut();
489
-              }, 2000);
490
-            } else {
491
-              $("#fade").fadeIn();
492
-              that.promptingConent = "系统错误,请稍后再试!";
493
-              that.promptingStatus = false;
494
-              that.loadShow = false;
495
-              that.dialog = that
496
-                .$createDialog({
497
-                  type: "alert",
498
-                  title: "系统错误,请稍后再试!",
499
-                  content: "点击返回首页",
500
-                  icon: "cubeic-wrong",
501
-                  onConfirm: (e, promptValue) => {
502
-                    that.$router.push({ path: "/main" });
503
-                  }
504
-                })
505
-                .show();
506
-              setTimeout(function() {
507
-                $("#fade").fadeOut();
508
-              }, 2000);
509
-            }
510
-          });
444
+      this.$http.post('service/common/common/getDictionary',{
445
+          key: "incident_source",
446
+          type: "list"
447
+      }).then((res1) => {
448
+          let incidentSourceList = res1.data || [];
449
+          let im = incidentSourceList.find(v => v.value === 'im');
450
+          this.$http.get("service/bpm/bpm/restful/sj", {}).then((res2) => {
451
+          var reqData = {
452
+            incident: {
453
+              "incidentsign": res2.data.data,
454
+              "deleteFlag": 0,
455
+              "department": { id: this.deptId },
456
+              "contactsInformation": this.model.contactsInformation,
457
+              "contacts": this.model.contacts,
458
+              "branch": this.model.branch,
459
+              "area": { id: this.model.areaId },
460
+              "place": { id: this.model.placeId },
461
+              "houseNumber":this.model.address,
462
+              "source": im,
463
+              "description": this.model.description,
464
+              "repairType": JSON.parse(localStorage.getItem("repairMain"))?JSON.parse(localStorage.getItem("repairMain")).valueconfig:undefined,
465
+              "requester": this.loginUser,
466
+              "acceptUser": this.loginUser,
467
+            },
468
+          };
469
+          this.$http
470
+            .post("service/flow/incident/task/request", reqData)
471
+            .then(function(res) {
472
+              if (res.data.state == 200) {
473
+                that.action.target = that.action.target + res.data.data.id;
474
+                setTimeout(function() {
475
+                  that.$refs.upload.start();
476
+                }, 100);
477
+                $("#fade").fadeIn();
478
+                that.promptingConent = "恭喜您,新建报修成功!";
479
+                that.promptingStatus = true;
480
+                that.dialog = that
481
+                  .$createDialog({
482
+                    type: "alert",
483
+                    title: "报修成功",
484
+                    content: "点击返回首页",
485
+                    icon: "cubeic-right",
486
+                    onConfirm: (e, promptValue) => {
487
+                      that.$router.push({ path: "/main" });
488
+                    }
489
+                  })
490
+                  .show();
491
+                setTimeout(function() {
492
+                  $("#fade").fadeOut();
493
+                }, 2000);
494
+              } else {
495
+                $("#fade").fadeIn();
496
+                that.promptingConent = "系统错误,请稍后再试!";
497
+                that.promptingStatus = false;
498
+                that.loadShow = false;
499
+                that.dialog = that
500
+                  .$createDialog({
501
+                    type: "alert",
502
+                    title: "系统错误,请稍后再试!",
503
+                    content: "点击返回首页",
504
+                    icon: "cubeic-wrong",
505
+                    onConfirm: (e, promptValue) => {
506
+                      that.$router.push({ path: "/main" });
507
+                    }
508
+                  })
509
+                  .show();
510
+                setTimeout(function() {
511
+                  $("#fade").fadeOut();
512
+                }, 2000);
513
+              }
514
+            });
511 515
         });
516
+      })
512 517
     },
513 518
     // 获取报修类别
514 519
     getCategory(){

+ 3 - 3
src/views/supplementary.vue

@@ -17,8 +17,8 @@
17 17
         </li>
18 18
         <li>
19 19
           <div>联系电话</div>
20
-          <div class="factionAdd" @click="toModify('mphone')">
21
-            <span>{{ loginUser.mphone || "暂无" }}</span>
20
+          <div class="factionAdd" @click="toModify('phone')">
21
+            <span>{{ loginUser.phone || "暂无" }}</span>
22 22
             <i class="iconfont icon-moren"></i>
23 23
           </div>
24 24
         </li>
@@ -101,7 +101,7 @@ export default {
101 101
       // seimin
102 102
     },
103 103
     goToSystem() {
104
-      if (!this.loginUser.mphone) {
104
+      if (!this.loginUser.phone) {
105 105
         this.$createDialog({
106 106
           type: "alert",
107 107
           content: "联系电话不能为空",