seimin hace 1 año
padre
commit
30864d8a61

+ 8 - 0
pages.json

@@ -126,6 +126,14 @@
126 126
           "titleNView": false
127 127
         }
128 128
       }
129
+    },
130
+    {
131
+      "path": "pages/buildIncident/buildIncident",
132
+      "style": {
133
+        "h5": {
134
+          "titleNView": false
135
+        }
136
+      }
129 137
     }
130 138
   ],
131 139
   "globalStyle": {

+ 521 - 0
pages/buildIncident/buildIncident.vue

@@ -0,0 +1,521 @@
1
+<template>
2
+  <view class="buildIncident">
3
+    <scroll-view scroll-y class="body">
4
+      <view class="form_item">
5
+        <view class="title select"><text class="required newicon newicon-bitian"></text>院区:</view>
6
+        <uni-data-select class="value" v-model="dataInfo.groupId" :localdata="dataInfo.groupList" :clear="false" placeholder="请选择院区" @change="changeGroup" :class="{formRed: isSubmit && !dataInfo.groupId}"></uni-data-select>
7
+      </view>
8
+      <view class="form_item">
9
+        <view class="title select"><text class="required newicon newicon-bitian"></text>报修科室:</view>
10
+        <uni-data-select class="value" v-model="dataInfo.groupId" :localdata="dataInfo.groupList" :clear="false" placeholder="请选择报修科室" @change="changeGroup" :class="{formRed: isSubmit && !dataInfo.groupId}"></uni-data-select>
11
+      </view>
12
+      <view class="form_item">
13
+        <view class="title select"><text class="required newicon newicon-bitian transparent"></text>报修人:</view>
14
+        <uni-data-select class="value" v-model="dataInfo.groupId" :localdata="dataInfo.groupList" :clear="false" placeholder="请选择报修人" @change="changeGroup" :class="{formRed: isSubmit && !dataInfo.groupId}"></uni-data-select>
15
+      </view>
16
+    </scroll-view>
17
+    <view class="foot_common_btns">
18
+      <button @click="goBack" type="default" class="cancelButton btn">返回</button>
19
+      <button @click="submit" type="default" class="primaryButton btn">下一步</button>
20
+    </view>
21
+  </view>
22
+</template>
23
+
24
+<script setup>
25
+  import { ref, reactive } from 'vue'
26
+  import { onLoad } from '@dcloudio/uni-app'
27
+  import { api_group, api_incidentDetail, api_user, api_incidentTask, api_branch, api_dutyDepartment } from "@/http/api.js"
28
+  import { defaultColor } from '@/static/js/theme.js'
29
+  import { useSetTitle } from '@/share/useSetTitle.js'
30
+  import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
31
+  import { useGoBack } from '@/share/useGoBack.js'
32
+  import { useLoginUserStore } from '@/stores/loginUser'
33
+  
34
+  useSetTitle();
35
+  const loginUserStore = useLoginUserStore();
36
+  const { makePhoneCall }  = useMakePhoneCall();
37
+  const { goBack }  = useGoBack();
38
+  
39
+  // 主题颜色
40
+  const primaryColor = ref(defaultColor)
41
+  
42
+  // 数据
43
+  const dataInfo = reactive({
44
+    incidentId: undefined,//事件ID
45
+    incidentData: {},//事件对象
46
+    groupList: [], //工作组列表
47
+    groupId: undefined, //工作组ID
48
+    userList: [], //用户列表
49
+    userId: undefined, //用户ID
50
+    branchList: [], //院区列表
51
+    branchId: undefined, //院区ID
52
+    dutyList: [], //责任科室列表
53
+    dutyId: undefined, //责任科室ID
54
+    isAssignUser: 1, //工作组是否转派到人
55
+    isAssignUserList: [
56
+      { text: '是', value: 1 },
57
+      { text: '否', value: 0 },
58
+    ], //工作组是否转派到人选项
59
+    reassignRemark: '',//退回原因
60
+  })
61
+  
62
+  // 是否提交
63
+  const isSubmit = ref(false)
64
+  
65
+  // 重置
66
+  function reset(){
67
+    dataInfo.branchId = undefined;
68
+    dataInfo.branchList = [];
69
+    
70
+    dataInfo.dutyId = undefined;
71
+    dataInfo.dutyList = [];
72
+    
73
+    dataInfo.groupId = undefined;
74
+    dataInfo.groupList = [];
75
+    
76
+    dataInfo.userId = undefined;
77
+    dataInfo.userList = [];
78
+    
79
+    dataInfo.isAssignUser = 1;
80
+    
81
+    dataInfo.reassignRemark = '';
82
+  }
83
+  
84
+  // 获取事件详情
85
+  function getIncidentDetail(){
86
+    uni.showLoading({
87
+      title: "加载中",
88
+      mask: true,
89
+    });
90
+
91
+    api_incidentDetail(dataInfo.incidentId).then(res => {
92
+      uni.hideLoading();
93
+      if(res.status == 200){
94
+        dataInfo.incidentData = res.data || {};
95
+        
96
+        initForm()
97
+      }else{
98
+        uni.showToast({
99
+          icon: 'none',
100
+          title: res.msg || '请求数据失败!'
101
+        });
102
+      }
103
+    })
104
+  }
105
+  
106
+  // 获取院区列表
107
+  function getBranchs(){
108
+    uni.showLoading({
109
+      title: "加载中",
110
+      mask: true,
111
+    });
112
+    let postData = {
113
+      "idx": 0,
114
+      "sum": 9999,
115
+    };
116
+    api_branch(postData).then(res => {
117
+      uni.hideLoading();
118
+      if(res.status == 200){
119
+        res.list = res.list || [];
120
+        dataInfo.branchList = res.list.map(v => ({
121
+          text: v.hosName,
122
+          value: v.id,
123
+        }));
124
+        
125
+        if(loginUserStore.loginUser.user.duty){
126
+          // 当前的所属责任科室
127
+          dataInfo.branchId = loginUserStore.loginUser.user.duty.branch;
128
+          changeBranch();
129
+          
130
+          dataInfo.dutyId = loginUserStore.loginUser.user.duty.id;
131
+          changeDuty();
132
+        }else if(loginUserStore.loginUser.user.branch){
133
+          // 当前的所属院区
134
+          dataInfo.branchId = loginUserStore.loginUser.user.branch.id;
135
+        }
136
+      }else{
137
+        uni.showToast({
138
+          icon: 'none',
139
+          title: res.msg || '请求数据失败!'
140
+        });
141
+      }
142
+    })
143
+  }
144
+  
145
+  // 获取责任科室列表
146
+  function getDutys(){
147
+    uni.showLoading({
148
+      title: "加载中",
149
+      mask: true,
150
+    });
151
+    let postData = {
152
+      "idx": 0,
153
+      "sum": 9999,
154
+      "dutyDepartment": {
155
+        "branch": dataInfo.branchId,
156
+      }
157
+    };
158
+    api_dutyDepartment(postData).then(res => {
159
+      uni.hideLoading();
160
+      if(res.status == 200){
161
+        res.list = res.list || [];
162
+        dataInfo.dutyList = res.list.map(v => ({
163
+          text: v.dept,
164
+          value: v.id,
165
+        }));
166
+      }else{
167
+        uni.showToast({
168
+          icon: 'none',
169
+          title: res.msg || '请求数据失败!'
170
+        });
171
+      }
172
+    })
173
+  }
174
+  
175
+  // 获取工作组列表
176
+  function getGroups(){
177
+    uni.showLoading({
178
+      title: "加载中",
179
+      mask: true,
180
+    });
181
+    
182
+    let duty = undefined;
183
+    
184
+    let postData = {
185
+      "idx": 0,
186
+      "sum": 9999,
187
+      "group": {
188
+          "duty": duty,
189
+          "selectType": "nouser"
190
+      }
191
+    };
192
+    api_group(postData).then(res => {
193
+      uni.hideLoading();
194
+      if(res.status == 200){
195
+        res.list = res.list || [];
196
+        dataInfo.groupList = res.list.map(v => ({
197
+          text: v.groupName,
198
+          value: v.id,
199
+        }));
200
+      }else{
201
+        uni.showToast({
202
+          icon: 'none',
203
+          title: res.msg || '请求数据失败!'
204
+        });
205
+      }
206
+    })
207
+  }
208
+  
209
+  // 获取用户列表
210
+  function getUsers(){
211
+    uni.showLoading({
212
+      title: "加载中",
213
+      mask: true,
214
+    });
215
+    let postData = {
216
+      "idx": 0,
217
+      "sum": 9999,
218
+      "user": {
219
+          "groupdata":{
220
+            "id": dataInfo.groupId,
221
+          },
222
+          "roledata": {
223
+              "rolecode": "first-line support"
224
+          },
225
+          "roledata2": {
226
+              "rolecode": "second-line support"
227
+          },
228
+          "selectType": "1",
229
+          "selectDetails": 1,
230
+          "simple": true,
231
+          "engineer": 1
232
+      }
233
+    };
234
+    api_user(postData).then(res => {
235
+      uni.hideLoading();
236
+      if(res.status == 200){
237
+        res.list = res.list || [];
238
+        dataInfo.userList = res.list.map(v => ({
239
+          text: v.name,
240
+          value: v.id,
241
+        }));
242
+      }else{
243
+        uni.showToast({
244
+          icon: 'none',
245
+          title: res.msg || '请求数据失败!'
246
+        });
247
+      }
248
+    })
249
+  }
250
+  
251
+  // 选择院区
252
+  function changeBranch(){
253
+    dataInfo.dutyId = undefined;
254
+    dataInfo.dutyList = [];
255
+    
256
+    dataInfo.groupId = undefined;
257
+    dataInfo.groupList = [];
258
+    
259
+    dataInfo.userId = undefined;
260
+    dataInfo.userList = [];
261
+    getDutys();
262
+  }
263
+  
264
+  // 选择责任科室
265
+  function changeDuty(){
266
+    dataInfo.groupId = undefined;
267
+    dataInfo.groupList = [];
268
+    
269
+    dataInfo.userId = undefined;
270
+    dataInfo.userList = [];
271
+    getGroups();
272
+  }
273
+  
274
+  // 选择工作组
275
+  function changeGroup(){
276
+    dataInfo.userId = undefined;
277
+    dataInfo.userList = [];
278
+    getUsers();
279
+  }
280
+  
281
+  // 选择是否转派到人
282
+  function changeIsAssignUser(){
283
+    dataInfo.userId = undefined;
284
+  }
285
+  
286
+  // 提交
287
+  function submit(){
288
+    isSubmit.value = true;
289
+    
290
+  }
291
+  
292
+  // 转派提交
293
+  function submitRedeploy(){
294
+    if(!dataInfo.groupId){
295
+      uni.showToast({
296
+      	icon: 'none',
297
+        title: '请选择工作组'
298
+      });
299
+      return;
300
+    }
301
+    
302
+    if(dataInfo.isAssignUser == 1 && !dataInfo.userId){
303
+      uni.showToast({
304
+      	icon: 'none',
305
+        title: '请选择指派对象'
306
+      });
307
+      return;
308
+    }
309
+    
310
+    uni.showLoading({
311
+      title: "加载中",
312
+      mask: true,
313
+    });
314
+    
315
+    let postData = {
316
+      incident: dataInfo.incidentData,
317
+    }
318
+    
319
+    if(dataInfo.userId){
320
+      // 派人
321
+      postData.incident.assignee = dataInfo.userId;
322
+    } else {
323
+      // 派组
324
+      postData.incident.candidateGroups = dataInfo.groupId;
325
+    }
326
+    
327
+    // api_incidentTask('' postData).then(res => {
328
+    //   uni.hideLoading();
329
+    //   if(res.state == 200){
330
+    //     uni.showToast({
331
+    //     	icon: 'none',
332
+    //       title: '转派成功',
333
+    //       mask: true,
334
+    //     });
335
+    //     setTimeout(() => {
336
+    //       uni.reLaunch({
337
+    //         url: '/pages/incidentList/incidentList',
338
+    //       })
339
+    //     }, 1500)
340
+    //   }else{
341
+    //     uni.showToast({
342
+    //       icon: 'none',
343
+    //       title: res.msg || '请求数据失败!'
344
+    //     });
345
+    //   }
346
+    // })
347
+  }
348
+  
349
+  // 指派提交
350
+  function submitAssign(){
351
+    if(!dataInfo.branchId){
352
+      uni.showToast({
353
+      	icon: 'none',
354
+        title: '请选择院区'
355
+      });
356
+      return;
357
+    }
358
+    
359
+    if(!dataInfo.dutyId){
360
+      uni.showToast({
361
+      	icon: 'none',
362
+        title: '请选择责任科室'
363
+      });
364
+      return;
365
+    }
366
+    
367
+    if(!dataInfo.groupId){
368
+      uni.showToast({
369
+      	icon: 'none',
370
+        title: '请选择工作组'
371
+      });
372
+      return;
373
+    }
374
+    
375
+    if(dataInfo.isAssignUser == 1 && !dataInfo.userId){
376
+      uni.showToast({
377
+      	icon: 'none',
378
+        title: '请选择指派对象'
379
+      });
380
+      return;
381
+    }
382
+    
383
+    uni.showLoading({
384
+      title: "加载中",
385
+      mask: true,
386
+    });
387
+    
388
+    let postData = {
389
+      incident: dataInfo.incidentData,
390
+    }
391
+    
392
+    if(dataInfo.userId){
393
+      // 派人
394
+      postData.incident.assignee = dataInfo.userId;
395
+    } else {
396
+      // 派组
397
+      postData.incident.candidateGroups = dataInfo.groupId;
398
+    }
399
+    
400
+    // api_incidentTask('', postData).then(res => {
401
+    //   uni.hideLoading();
402
+    //   if(res.state == 200){
403
+    //     uni.showToast({
404
+    //     	icon: 'none',
405
+    //       title: '指派成功',
406
+    //       mask: true,
407
+    //     });
408
+    //     setTimeout(() => {
409
+    //       uni.reLaunch({
410
+    //         url: '/pages/incidentList/incidentList',
411
+    //       })
412
+    //     }, 1500)
413
+    //   }else{
414
+    //     uni.showToast({
415
+    //       icon: 'none',
416
+    //       title: res.msg || '请求数据失败!'
417
+    //     });
418
+    //   }
419
+    // })
420
+  }
421
+  
422
+  // 退回提交
423
+  function submitReassign(){
424
+    if(!dataInfo.reassignRemark.trim()){
425
+      uni.showToast({
426
+      	icon: 'none',
427
+        title: '请填写退回原因'
428
+      });
429
+      return;
430
+    }
431
+    
432
+    uni.showLoading({
433
+      title: "加载中",
434
+      mask: true,
435
+    });
436
+    
437
+    let postData = {
438
+      incident: dataInfo.incidentData,
439
+    }
440
+    
441
+    postData.incident.reassignRemark = dataInfo.reassignRemark;
442
+    
443
+    // api_incidentTask('', postData).then(res => {
444
+    //   uni.hideLoading();
445
+    //   if(res.state == 200){
446
+    //     uni.showToast({
447
+    //     	icon: 'none',
448
+    //       title: '退回成功',
449
+    //       mask: true,
450
+    //     });
451
+    //     setTimeout(() => {
452
+    //       uni.reLaunch({
453
+    //         url: '/pages/incidentList/incidentList',
454
+    //       })
455
+    //     }, 1500)
456
+    //   }else{
457
+    //     uni.showToast({
458
+    //       icon: 'none',
459
+    //       title: res.msg || '请求数据失败!'
460
+    //     });
461
+    //   }
462
+    // })
463
+  }
464
+  
465
+  onLoad((option) => {
466
+    dataInfo.incidentId = option.incidentId;
467
+    getIncidentDetail();
468
+  })
469
+</script>
470
+
471
+<style lang="scss" scoped>
472
+.buildIncident{
473
+  height: 100%;
474
+  display: flex;
475
+  flex-direction: column;
476
+  justify-content: space-between;
477
+  .body{
478
+    margin-top: 88rpx;
479
+    padding: 0 24rpx;
480
+    box-sizing: border-box;
481
+    flex: 1;
482
+    min-height: 0;
483
+    .form_item{
484
+      display: flex;
485
+      align-items: center;
486
+      padding-top: 24rpx;
487
+      min-height: 86rpx;
488
+      &.column{
489
+        height: auto;
490
+        flex-direction: column;
491
+        align-items: flex-start;
492
+        .title{
493
+          margin-right: 0;
494
+        }
495
+        .value{
496
+          margin-top: 10rpx;
497
+          padding-left: 20rpx;
498
+          box-sizing: border-box;
499
+        }
500
+        .tips{
501
+          padding: 24rpx;
502
+          text-align: center;
503
+          font-size: 22rpx;
504
+          color: #909399;
505
+          width: 100%;
506
+          box-sizing: border-box;
507
+        }
508
+      }
509
+      .title{
510
+        font-size: 26rpx;
511
+        display: flex;
512
+        align-items: center;
513
+        margin-right: 12rpx;
514
+        &.select{
515
+          width: calc(5em + 20rpx);
516
+        }
517
+      }
518
+    }
519
+  }
520
+}
521
+</style>

+ 2 - 0
pages/handler/handler.vue

@@ -444,6 +444,8 @@
444 444
     dataInfo.tabActiveValue = tabValue;
445 445
     isSubmit.value = false;
446 446
     reset();
447
+    dataInfo.category = dataInfo.incidentData.category || {};
448
+    dataInfo.synergetic = dataInfo.incidentData.synergetic || [];
447 449
     initForm();
448 450
   }
449 451
   

+ 10 - 1
pages/incidentList/incidentList.vue

@@ -70,9 +70,11 @@
70 70
   import { useSetTitle } from '@/share/useSetTitle.js'
71 71
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
72 72
   import { useLoginUserStore } from '@/stores/loginUser'
73
+  import { useIncidentNumStore } from '@/stores/incidentNum'
73 74
   
74 75
   useSetTitle();
75 76
   const loginUserStore = useLoginUserStore();
77
+  const incidentNumStore = useIncidentNumStore();
76 78
   const { formatDate }  = filterFormatDate();
77 79
   const { priorityStyle }  = computedPriorityStyle();
78 80
   const { stateStyle }  = computedStateStyle();
@@ -273,7 +275,7 @@
273 275
     }
274 276
     
275 277
     if(dataInfo.evtFilter && dataInfo.evtFilter.category && dataInfo.evtFilter.category.id){
276
-      postData.incident.levelCategory = dataInfo.evtFilter.category;
278
+      postData.incident.levelCategory = { id: dataInfo.evtFilter.category.id };
277 279
     }
278 280
     
279 281
     if(dataInfo.evtFilter && dataInfo.evtFilter.area && dataInfo.evtFilter.area.id){
@@ -329,6 +331,13 @@
329 331
   }
330 332
   
331 333
   onLoad((option) => {
334
+    // 我的-数量跳转
335
+    if(incidentNumStore.incidentNum.data){
336
+      dataInfo.evtFilter.selected = incidentNumStore.incidentNum.data.queryTask;
337
+      dataInfo.tabActiveId = incidentNumStore.incidentNum.data.statusId;
338
+      incidentNumStore.clearIncidentNumData();
339
+    }
340
+    
332 341
     for (let i = 0; i < loginUserStore.loginUser.menu.length; i++) {
333 342
       if (loginUserStore.loginUser.menu[i].link == "shijianliebiao_assign") {
334 343
         assignFlag.value = true;

+ 215 - 10
pages/my/my.vue

@@ -1,19 +1,224 @@
1 1
 <template>
2
-  <view>
3
-    我的
2
+  <view class="mine">
3
+    <scroll-view scroll-y class="body">
4
+      <view class="top">
5
+        <view class="top_name">Hi,廖小明</view>
6
+        <view class="top_count">
7
+          <view class="top_count_item" @click="toIncident('todoingAll', 1543)">
8
+            <view class="name">待接单</view>
9
+            <view class="value">{{dataInfo.todo}}</view>
10
+          </view>
11
+          <view class="top_count_item" @click="toIncident('todoingAll', 1544)">
12
+            <view class="name">处理中</view>
13
+            <view class="value">{{dataInfo.doing}}</view>
14
+          </view>
15
+          <view class="top_count_item" @click="toIncident('owns', 0)">
16
+            <view class="name">与我关联</view>
17
+            <view class="value">{{dataInfo.owns}}</view>
18
+          </view>
19
+          <view class="top_count_item" @click="toIncident('resolve', 0)">
20
+            <view class="name">由我解决</view>
21
+            <view class="value">{{dataInfo.resolve}}</view>
22
+          </view>
23
+        </view>
24
+      </view>
25
+      
26
+      <view class="bottom">
27
+        <view class="bottom_name">个人信息</view>
28
+        <view class="bottom_list">
29
+          <view class="bottom_list_item">
30
+            <view class="name">工号</view>
31
+            <view class="value">{{loginUserStore.loginUser.user.account}}</view>
32
+          </view>
33
+          <view class="bottom_list_item">
34
+            <view class="name">手机号</view>
35
+            <view class="value" @click="makePhoneCall(loginUserStore.loginUser.user.phone)"><uni-icons type="phone-filled" class="phone-filled" :size="18" :color="primaryColor"></uni-icons>{{loginUserStore.loginUser.user.phone}}</view>
36
+          </view>
37
+          <view class="bottom_list_item">
38
+            <view class="name">部门</view>
39
+            <view class="value">{{loginUserStore.loginUser.user.duty ? loginUserStore.loginUser.user.duty.dept : '无'}}</view>
40
+          </view>
41
+          <view class="bottom_list_item">
42
+            <view class="name">工作组</view>
43
+            <view class="value">{{(loginUserStore.loginUser.user.group && loginUserStore.loginUser.user.group.length) ? loginUserStore.loginUser.user.group.map(v => v.groupName).join('/') : '无'}}</view>
44
+          </view>
45
+        </view>
46
+      </view>
47
+    </scroll-view>
48
+    <view class="foot_common_btns">
49
+      <button @click="toBuildIncident" type="default" class="primaryButton btn"><text class="newicon newicon-xinjian2"></text>新建事件</button>
50
+    </view>
4 51
   </view>
5 52
 </template>
6 53
 
7
-<script>
8
-  export default {
9
-    data() {
10
-      return {
11
-        
12
-      };
54
+<script setup>
55
+  import { ref, reactive } from 'vue'
56
+  import { onLoad } from '@dcloudio/uni-app'
57
+  import { api_incident_count } from "@/http/api.js"
58
+  import { defaultColor } from '@/static/js/theme.js'
59
+  import { useSetTitle } from '@/share/useSetTitle.js'
60
+  import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
61
+  import { useLoginUserStore } from '@/stores/loginUser'
62
+  import { useIncidentNumStore } from '@/stores/incidentNum'
63
+  
64
+  useSetTitle();
65
+  const loginUserStore = useLoginUserStore();
66
+  const incidentNumStore = useIncidentNumStore();
67
+  const { makePhoneCall }  = useMakePhoneCall();
68
+  
69
+  // 主题颜色
70
+  const primaryColor = ref(defaultColor)
71
+  
72
+  // 数据
73
+  const dataInfo = reactive({
74
+    todo: 0,
75
+    doing: 0,
76
+    owns: 0,
77
+    resolve: 0,
78
+  })
79
+  
80
+  // 获取列表数量
81
+  function getCount(){
82
+    uni.showLoading({
83
+      title: "加载中",
84
+    });
85
+    let postData = {
86
+      incidentList: [
87
+        {
88
+          "queryTask": "todo",
89
+          "assignee": loginUserStore.loginUser.user.id,
90
+          "candidateGroups": loginUserStore.loginUser.user.group.map(v => v.id).toString()
91
+        },
92
+        {
93
+          "queryTask": "doing",
94
+          "assignee": loginUserStore.loginUser.user.id,
95
+        },
96
+        {
97
+          "queryTask": "owns",
98
+          "assignee": loginUserStore.loginUser.user.id,
99
+          "candidateGroups": loginUserStore.loginUser.user.group.map(v => v.id).toString()
100
+        },
101
+        {
102
+          "queryTask": "resolve",
103
+          "assignee": loginUserStore.loginUser.user.id,
104
+        },
105
+      ],
13 106
     }
107
+    
108
+    api_incident_count(postData).then(res => {
109
+      uni.hideLoading();
110
+      if(res.state == 200){
111
+        dataInfo.todo = res.data.todo;
112
+        dataInfo.doing = res.data.doing;
113
+        dataInfo.owns = res.data.owns;
114
+        dataInfo.resolve = res.data.resolve;
115
+      }else{
116
+        uni.showToast({
117
+          icon: 'none',
118
+          title: res.msg || '请求数据失败!'
119
+        });
120
+      }
121
+    })
14 122
   }
123
+  
124
+  // 新建事件
125
+  function toBuildIncident(){
126
+    uni.navigateTo({
127
+      url: '/pages/buildIncident/buildIncident'
128
+    })
129
+  }
130
+  
131
+  // 点击数量跳转
132
+  function toIncident(queryTask, statusId){
133
+    incidentNumStore.setIncidentNumData({
134
+      queryTask,
135
+      statusId,
136
+    })
137
+    uni.reLaunch({
138
+      url: '/pages/incidentList/incidentList'
139
+    })
140
+  }
141
+  
142
+  onLoad((option) => {
143
+    getCount();
144
+  })
15 145
 </script>
16 146
 
17
-<style lang="scss">
18
-
147
+<style lang="scss" scoped>
148
+page{
149
+  height: calc(100vh - 50px);
150
+  background-color: #EBEBEB;
151
+}
152
+.mine{
153
+  height: 100%;
154
+  display: flex;
155
+  flex-direction: column;
156
+  justify-content: space-between;
157
+  .phone-filled{
158
+    margin-right: 5rpx;
159
+  }
160
+  .newicon-xinjian2{
161
+    margin-right: 10rpx;
162
+  }
163
+  .body{
164
+    width: 714rpx;
165
+    height: 100%;
166
+    margin: 16rpx auto 50px auto;
167
+    box-sizing: border-box;
168
+    border-radius: 8rpx;
169
+    .top{
170
+      padding: 30rpx;
171
+      background-color: #fff;
172
+      .top_name{
173
+        font-size: 28rpx;
174
+        font-weight: bold;
175
+      }
176
+      .top_count{
177
+        margin-top: 45rpx;
178
+        display: flex;
179
+        align-items: center;
180
+        justify-content: space-between;
181
+        .top_count_item{
182
+          text-align: center;
183
+          .name{
184
+            color: #949494;
185
+            font-size: 22rpx;
186
+          }
187
+          .value{
188
+            font-size: 50rpx;
189
+            font-weight: bold;
190
+            margin-top: 15rpx;
191
+          }
192
+        }
193
+      }
194
+    }
195
+    
196
+    .bottom{
197
+      background-color: #fff;
198
+      margin-top: 15rpx;
199
+      .bottom_name{
200
+        font-size: 26rpx;
201
+        color: $uni-primary;
202
+        padding: 21rpx 24rpx;
203
+      }
204
+      .bottom_list{
205
+        .bottom_list_item{
206
+          border-top: 1rpx solid #DEDEDE;
207
+          padding: 30rpx 30rpx 30rpx 47rpx;
208
+          display: flex;
209
+          justify-content: space-between;
210
+          align-items: center;
211
+          font-size: 24rpx;
212
+          .value{
213
+            max-width: 380rpx;
214
+            color: #555555;
215
+            display: flex;
216
+            align-items: center;
217
+            text-align: justify;
218
+          }
219
+        }
220
+      }
221
+    }
222
+  }
223
+}
19 224
 </style>

+ 1 - 1
pages/synergeticAdd/synergeticAdd.vue

@@ -7,7 +7,7 @@
7 7
       <text class="newicon newicon-zanwu"></text>
8 8
     </view>
9 9
     <view class="foot_common_btns">
10
-      <button @click="goBack" type="default" class="primaryButton btn">返回</button>
10
+      <button @click="goBack" type="default" class="cancelButton btn">返回</button>
11 11
       <button @click="confirm" type="default" class="primaryButton btn">确认</button>
12 12
     </view>
13 13
   </view>

+ 1 - 0
stores/handler.js

@@ -15,6 +15,7 @@ export const useHandlerStore = defineStore(
15 15
     
16 16
     // 清空事件信息
17 17
     function clearHandlerData() {
18
+      console.log(handler.data)
18 19
       handler.data = null;
19 20
     }
20 21
 

+ 31 - 0
stores/incidentNum.js

@@ -0,0 +1,31 @@
1
+import { defineStore } from "pinia"
2
+import { reactive } from 'vue'
3
+
4
+export const useIncidentNumStore = defineStore(
5
+  "incidentNum",
6
+  () => {
7
+    const incidentNum = reactive({
8
+      data: null,
9
+    });
10
+
11
+    // 保存
12
+    function setIncidentNumData(data) {
13
+      incidentNum.data = data;
14
+    }
15
+    
16
+    // 清空
17
+    function clearIncidentNumData() {
18
+      console.log(incidentNum.data)
19
+      incidentNum.data = null;
20
+    }
21
+
22
+    return {
23
+      incidentNum,
24
+      setIncidentNumData,
25
+      clearIncidentNumData,
26
+    };
27
+  },
28
+  {
29
+    unistorage: true, // 开启后对 state 的数据读写都将持久化
30
+  },
31
+);