Browse Source

事件列表

seimin 11 months ago
parent
commit
faa805747b

+ 398 - 0
components/IncidentListFilter.vue

@@ -0,0 +1,398 @@
1
+<template>
2
+  <view class="container" @touchstart.stop v-if="pageData.pageRouter === 'default'">
3
+    <view class="container_form">
4
+      <view class="hospital">
5
+        <text class="name">院区</text>
6
+        <text class="value ellipsis">{{searchData.hospital ? searchData.hospital.hosName : ''}}</text>
7
+      </view>
8
+      
9
+      <view class="tabs">
10
+        <view class="tab" :class="{active: tab.value === searchData.selected}" v-for="tab in tabs" :key="tab.value" @click="clickTab(tab)">{{tab.name}}<text class="newicon newicon-xuanzejiaobiao"></text></view>
11
+      </view>
12
+      
13
+      <view class="area" @click="clickPageRouter('area')">
14
+        <text class="name">楼栋</text>
15
+        <text class="value ellipsis">{{searchData.area ? searchData.area.area : ''}}</text>
16
+      </view>
17
+      
18
+      <view class="category" @click="clickPageRouter('category')">
19
+        <text class="name">故障现象</text>
20
+        <text class="value ellipsis">{{searchData.category ? searchData.category.category : ''}}</text>
21
+      </view>
22
+    </view>
23
+    <view class="container_foot">
24
+      <view class="clear" @click="clear">清除选项</view>
25
+      <view class="foot_btns">
26
+        <view class="cancel" @click="cancel">取消</view>
27
+        <view class="confirm" @click="confirm">确认</view>
28
+      </view>
29
+    </view>
30
+  </view>
31
+  <view class="container" @touchstart.stop v-else-if="pageData.pageRouter === 'area'">
32
+    <view class="container_form">
33
+      <view class="hospital">
34
+        <text class="name">楼栋</text>
35
+      </view>
36
+      
37
+      <scroll-view scroll-y class="areas">
38
+        <view class="areas_item" v-for="area in pageData.areaList" :key="area.id" @click="clickArea(area)">{{area.area}}</view>
39
+      </scroll-view>
40
+    </view>
41
+    <view class="container_foot">
42
+      <view class="foot_btns">
43
+        <view class="cancel" @click="clickPageRouter('default')">取消</view>
44
+      </view>
45
+    </view>
46
+  </view>
47
+  <view class="container" @touchstart.stop v-else-if="pageData.pageRouter === 'category'">
48
+    <view class="container_form">
49
+      <view class="hospital">
50
+        <text class="name">故障现象</text>
51
+      </view>
52
+      
53
+      <scroll-view scroll-y class="categorys">
54
+        <view class="categorys_item" v-for="category in pageData.categoryList" :key="category.id" @click="clickCategory(category)">{{category.category}}</view>
55
+      </scroll-view>
56
+    </view>
57
+    <view class="container_foot">
58
+      <view class="foot_btns">
59
+        <view class="cancel" @click="clickPageRouter('default')">取消</view>
60
+      </view>
61
+    </view>
62
+  </view>
63
+  <view class="mask" @touchstart.stop></view>
64
+  <view class="line" @touchstart.stop></view>
65
+</template>
66
+
67
+<script setup>
68
+  import { defineEmits, ref, reactive, defineProps } from 'vue'
69
+  import { onLoad } from '@dcloudio/uni-app'
70
+  import { useLoginUserStore } from '@/stores/loginUser'
71
+  import { api_area, api_incidentcategory } from "@/http/api.js"
72
+  
73
+  const emit = defineEmits(['cancelEmit', 'confirmEmit']);
74
+  const { evt } = defineProps({
75
+    evt: {
76
+      type: Object,
77
+      required: true,
78
+    },
79
+  });
80
+  const loginUserStore = useLoginUserStore();
81
+  
82
+  const tabs = reactive([
83
+    { name: '全部事件', value: 'all' },
84
+    { name: '待我处理', value: 'todoingAll' },
85
+    { name: '与我关联', value: 'owns' },
86
+    { name: '由我解决', value: 'resolve' },
87
+  ])
88
+  
89
+  // 页面数据
90
+  const pageData = reactive({
91
+    pageRouter: 'default',
92
+    areaList: [],
93
+    categoryList: [],
94
+  });
95
+  
96
+  const searchData = reactive({
97
+    hospital: {},
98
+    selected: 'todoingAll',
99
+    area: {id: 0, area: '全部'},
100
+    category: {id: 0, category: '全部'},
101
+  })
102
+  
103
+  // 点击tab
104
+  function clickTab(tab){
105
+    searchData.selected = tab.value;
106
+  }
107
+  
108
+  // 点击区域
109
+  function clickArea(area){
110
+    pageData.pageRouter = 'default';
111
+    searchData.area = area;
112
+  }
113
+  
114
+  // 点击故障现象
115
+  function clickCategory(category){
116
+    pageData.pageRouter = 'default';
117
+    searchData.category = category;
118
+  }
119
+  
120
+  // 清空
121
+  function clear(){
122
+    setHospital();
123
+    searchData.selected = 'todoingAll';
124
+    searchData.area = {id: 0, area: '全部'};
125
+    searchData.category = {id: 0, category: '全部'};
126
+  }
127
+  
128
+  // 取消
129
+  function cancel(){
130
+    emit('cancelEmit')
131
+  }
132
+  
133
+  // 确认
134
+  function confirm(){
135
+    emit('confirmEmit', searchData);
136
+  }
137
+  
138
+  // 设置院区
139
+  function setHospital(){
140
+    if (loginUserStore.loginUser.user.duty) {
141
+      // 当前的所属责任科室
142
+      searchData.hospital = {
143
+        id: loginUserStore.loginUser.user.duty.branch,
144
+        hosName: loginUserStore.loginUser.user.duty.branchName
145
+      };
146
+    } else if (loginUserStore.loginUser.user.branch) {
147
+      // 当前的所属院区
148
+      searchData.hospital = {
149
+        id: loginUserStore.loginUser.user.branch.id,
150
+        hosName: loginUserStore.loginUser.user.branch.hosName
151
+      };
152
+    }
153
+  }
154
+  
155
+  // 获取楼栋列表
156
+  function getAreaList(){
157
+    uni.showLoading({
158
+      title: "加载中",
159
+      mask: true,
160
+    });
161
+    
162
+    let postData = {
163
+      idx: 0,
164
+      sum: 9999,
165
+      area: {
166
+        branch: searchData.hospital.id,
167
+      },
168
+    }
169
+    api_area(postData).then(res => {
170
+      uni.hideLoading();
171
+      if(res.status == 200){
172
+        let list = res.list || [];
173
+        pageData.areaList = [{ id: 0, area: '全部' }, ...list];
174
+      }else{
175
+        uni.showToast({
176
+          icon: 'none',
177
+          title: res.msg || '请求数据失败!'
178
+        });
179
+      }
180
+    })
181
+  }
182
+  
183
+  // 获取故障现象列表
184
+  function getCategoryList(){
185
+    uni.showLoading({
186
+      title: "加载中",
187
+      mask: true,
188
+    });
189
+    
190
+    let postData = {
191
+      idx: 0,
192
+      sum: 9999,
193
+      incidentcategory: {},
194
+    }
195
+    if(loginUserStore.loginUser.user.duty){
196
+      postData.incidentcategory.dutyToCategory = loginUserStore.loginUser.user.duty.id;
197
+    }else if(loginUserStore.loginUser.user.branch){
198
+      postData.incidentcategory.selectType = 'one';
199
+    }
200
+    
201
+    api_incidentcategory(postData).then(res => {
202
+      uni.hideLoading();
203
+      if(res.status == 200){
204
+        let list = res.list || [];
205
+        pageData.categoryList = [{ id:0, category: '全部' }, ...list];
206
+      }else{
207
+        uni.showToast({
208
+          icon: 'none',
209
+          title: res.msg || '请求数据失败!'
210
+        });
211
+      }
212
+    })
213
+  }
214
+  
215
+  // 页面路由跳转
216
+  function clickPageRouter(type){
217
+    pageData.pageRouter = type;
218
+    switch(type){
219
+      case 'area':
220
+        getAreaList();
221
+      break;
222
+      case 'category':
223
+        getCategoryList();
224
+      break;
225
+    }
226
+  }
227
+  
228
+  onLoad(async (option) => {
229
+    searchData.hospital = evt.hospital;
230
+    searchData.selected = evt.selected;
231
+    searchData.area = evt.area;
232
+    searchData.category = evt.category;
233
+  })
234
+</script>
235
+
236
+<style lang="scss" scoped>
237
+.mask{
238
+  position: fixed;
239
+  left: 0;
240
+  top: 0;
241
+  right: 0;
242
+  bottom: 0;
243
+  background-color: rgba(0, 0, 0, 0.4);
244
+  z-index: 999;
245
+}
246
+.line{
247
+  content: '';
248
+  position: fixed;
249
+  top: 0;
250
+  left: 0;
251
+  z-index: 9999;
252
+  height: 8rpx;
253
+  width: 100%;
254
+  background-color: #EBEBEB;
255
+}
256
+.container{
257
+  position: fixed;
258
+  left: 150rpx;
259
+  top: 0;
260
+  right: 0;
261
+  bottom: 0;
262
+  z-index: 9999;
263
+  background-color: #F7F7F7;
264
+  display: flex;
265
+  flex-direction: column;
266
+  justify-content: space-between;
267
+  
268
+  .container_form{
269
+    height: 100%;
270
+    display: flex;
271
+    flex-direction: column;
272
+    flex: 1;
273
+    min-height: 0;
274
+  }
275
+  
276
+  .hospital{
277
+    display: flex;
278
+    justify-content: space-between;
279
+    align-items: center;
280
+    padding: 32rpx 24rpx 24rpx;
281
+    background-color: #fff;
282
+    .name{
283
+      font-size: 30rpx;
284
+      flex-shrink: 0;
285
+      margin-right: 24rpx;
286
+    }
287
+    .value{
288
+      font-size: 26rpx;
289
+      color: #5DAAB6;
290
+    }
291
+  }
292
+  
293
+  .areas{
294
+    flex: 1;
295
+    min-height: 0;
296
+    margin-top: 16rpx;
297
+    background-color: #fff;
298
+    .areas_item{
299
+      padding: 24rpx;
300
+      border-bottom: 1rpx solid #DEDEDE;
301
+    }
302
+  }
303
+  
304
+  .categorys{
305
+    flex: 1;
306
+    min-height: 0;
307
+    margin-top: 16rpx;
308
+    background-color: #fff;
309
+    .categorys_item{
310
+      padding: 24rpx;
311
+      border-bottom: 1rpx solid #DEDEDE;
312
+    }
313
+  }
314
+  
315
+  .tabs{
316
+    margin-top: 16rpx;
317
+    background-color: #FBFBFB;
318
+    display: flex;
319
+    flex-wrap: wrap;
320
+    justify-content: space-between;
321
+    gap: 16rpx 0;
322
+    padding: 24rpx 16rpx;
323
+    .tab{
324
+      width: 180rpx;
325
+      height: 60rpx;
326
+      display: flex;
327
+      justify-content: center;
328
+      align-items: center;
329
+      background-color: #F7F7F7;
330
+      font-size: 28rpx;
331
+      position: relative;
332
+      .newicon-xuanzejiaobiao{
333
+        opacity: 0;
334
+        position: absolute;
335
+        right: 0;
336
+        bottom: 0;
337
+        font-size: 38rpx;
338
+        color: #53B9BB;
339
+      }
340
+      &.active{
341
+        background-color: rgba(149, 220, 231, 0.30);
342
+        .newicon-xuanzejiaobiao{
343
+          opacity: 1;
344
+        }
345
+      }
346
+    }
347
+  }
348
+  
349
+  .area,
350
+  .category{
351
+    display: flex;
352
+    justify-content: space-between;
353
+    align-items: center;
354
+    padding: 24rpx;
355
+    background-color: #fff;
356
+    margin-top: 24rpx;
357
+    .name{
358
+      font-size: 28rpx;
359
+      flex-shrink: 0;
360
+      margin-right: 24rpx;
361
+    }
362
+  }
363
+  
364
+  .container_foot{
365
+    .clear{
366
+      padding: 24rpx;
367
+      font-size: 28rpx;
368
+      background-color: #fff;
369
+      margin: 0 16rpx;
370
+      display: flex;
371
+      align-items: center;
372
+      justify-content: center;
373
+    }
374
+    .foot_btns{
375
+      margin-top: 24rpx;
376
+      display: flex;
377
+      border-top: 1rpx solid #BFBFBF;
378
+      .cancel{
379
+        flex: 1;
380
+        background-color: #fff;
381
+        font-size: 32rpx;
382
+        padding: 24rpx;
383
+        display: flex;
384
+        justify-content: center;
385
+      }
386
+      .confirm{
387
+        flex: 1;
388
+        font-size: 32rpx;
389
+        padding: 24rpx;
390
+        background-color: $uni-primary;
391
+        display: flex;
392
+        justify-content: center;
393
+        color: #fff;
394
+      }
395
+    }
396
+  }
397
+}
398
+</style>

+ 16 - 0
filters/computedCurrentLogOverTime.js

@@ -0,0 +1,16 @@
1
+import { computed } from "vue"
2
+import { format, addDays } from 'date-fns';
3
+export function computedCurrentLogOverTime() {
4
+  /**
5
+   * 延期处理-展示
6
+   */
7
+  const currentLogOverTime = computed(() => {
8
+    return function(currentLog){
9
+      return currentLog.extra1DTO.name + format(addDays(new Date(currentLog.startTime), +currentLog.extra2), 'MM月dd日前完成');
10
+    }
11
+  })
12
+
13
+  return {
14
+    currentLogOverTime
15
+  };
16
+}

+ 27 - 0
filters/computedPriorityStyle.js

@@ -0,0 +1,27 @@
1
+import { computed } from "vue"
2
+export function computedPriorityStyle() {
3
+  /**
4
+   * 紧急度颜色回显
5
+   */
6
+  const priorityStyle = computed(() => {
7
+    return function(priority){
8
+      if(priority){
9
+        if(priority.value === 'L4' || priority.value === 'L5'){
10
+          return { color: '#49B856' };
11
+        } else if (priority.value === 'L2' || priority.value === 'L3'){
12
+          return { color: '#F3A73F' };
13
+        } else if (priority.value === 'L1'){
14
+          return { color: '#FF0000' };
15
+        } else {
16
+          return {}
17
+        }
18
+      }else{
19
+        return {};
20
+      }
21
+    }
22
+  })
23
+
24
+  return {
25
+    priorityStyle
26
+  };
27
+}

+ 27 - 0
filters/computedStateStyle.js

@@ -0,0 +1,27 @@
1
+import { computed } from "vue"
2
+export function computedStateStyle() {
3
+  /**
4
+   * 状态颜色回显
5
+   */
6
+  const stateStyle = computed(() => {
7
+    return function(state){
8
+      if(state){
9
+        if(state.value === 'pending'){
10
+          return { color: 'rgba(243, 167, 63, 1)', backgroundColor: 'rgba(243, 167, 63, 0.16)' };
11
+        } else if (state.value === 'handler'){
12
+          return { color: 'rgba(0, 108, 249, 1)', backgroundColor: 'rgba(0, 108, 249, 0.16)' };
13
+        } else if (state.value === 'close'){
14
+          return { color: 'rgba(73, 184, 86, 1)', backgroundColor: 'rgba(73, 184, 86, 0.16)' };
15
+        } else {
16
+          return {}
17
+        }
18
+      }else{
19
+        return {};
20
+      }
21
+    }
22
+  })
23
+
24
+  return {
25
+    stateStyle
26
+  };
27
+}

+ 21 - 0
filters/filterFormatDate.js

@@ -0,0 +1,21 @@
1
+import { computed } from "vue"
2
+import { isDate, format } from 'date-fns';
3
+import { isTimestamp } from '@/utils/isTimestamp.js'
4
+export function filterFormatDate() {
5
+  /**
6
+   * 日期格式化
7
+   */
8
+  const formatDate = computed(() => {
9
+    return function(date, formatStr){
10
+      if(isDate(date) || isTimestamp(date)){
11
+        return format(date, formatStr);
12
+      }else{
13
+        return '';
14
+      }
15
+    }
16
+  })
17
+
18
+  return {
19
+    formatDate
20
+  };
21
+}

+ 64 - 0
http/api.js

@@ -0,0 +1,64 @@
1
+import { get, post } from "@/http/http.js"
2
+
3
+/**
4
+ * 微信登录
5
+ */
6
+export function api_wechatLoginEncrypt(data){
7
+  return post("/auth/wechatLoginEncrypt", data);
8
+}
9
+
10
+/**
11
+ * 微信登录2
12
+ */
13
+export function api_wechatAuth(data){
14
+  return post("/auth/wechatAuth", data);
15
+}
16
+
17
+/**
18
+ * 绑定工号
19
+ */
20
+export function api_bindAccount(data){
21
+  return post("/auth/bindAccount", data);
22
+}
23
+
24
+/**
25
+ * 获取系统名称
26
+ */
27
+export function api_getSysNameAndLogo(data){
28
+  return get("/auth/getSysNameAndLogo");
29
+}
30
+
31
+/**
32
+ * 获取字典列表
33
+ */
34
+export function api_getDictionary(data){
35
+  return post("/common/common/getDictionary", data);
36
+}
37
+
38
+/**
39
+ * 获取事件列表
40
+ */
41
+export function api_incident(data){
42
+  return post("/user/data/fetchDataList/incident", data);
43
+}
44
+
45
+/**
46
+ * 获取事件列表-数量
47
+ */
48
+export function api_incident_count(data){
49
+  return post("/flow/incident/list/count", data);
50
+}
51
+
52
+/**
53
+ * 获取楼栋列表
54
+ */
55
+export function api_area(data){
56
+  return post("/user/data/fetchDataList/area", data);
57
+}
58
+
59
+/**
60
+ * 获取故障现象列表
61
+ */
62
+export function api_incidentcategory(data){
63
+  return post("/bpm/data/fetchDataList/incidentcategory", data);
64
+}

+ 1 - 1
index.html

@@ -1,5 +1,5 @@
1 1
 <!DOCTYPE html>
2
-<html lang="en">
2
+<html lang="zh-CN">
3 3
   <head>
4 4
     <meta charset="UTF-8" />
5 5
     <script>

+ 1 - 1
manifest.json

@@ -67,7 +67,7 @@
67 67
                     "secure" : false
68 68
                 }
69 69
             },
70
-            "port" : 8080 //当前项目的端口号
70
+            "port" : 8081 //当前项目的端口号
71 71
         },
72 72
         "router" : {
73 73
             "base" : "/user/"

+ 9 - 0
node_modules/.package-lock.json

@@ -3,6 +3,15 @@
3 3
   "lockfileVersion": 3,
4 4
   "requires": true,
5 5
   "packages": {
6
+    "node_modules/date-fns": {
7
+      "version": "3.6.0",
8
+      "resolved": "https://registry.npmmirror.com/date-fns/-/date-fns-3.6.0.tgz",
9
+      "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==",
10
+      "funding": {
11
+        "type": "github",
12
+        "url": "https://github.com/sponsors/kossnocorp"
13
+      }
14
+    },
6 15
     "node_modules/weixin-jsapi": {
7 16
       "version": "1.1.0",
8 17
       "resolved": "https://registry.npmmirror.com/weixin-jsapi/-/weixin-jsapi-1.1.0.tgz",

+ 10 - 0
package-lock.json

@@ -5,9 +5,19 @@
5 5
   "packages": {
6 6
     "": {
7 7
       "dependencies": {
8
+        "date-fns": "^3.6.0",
8 9
         "weixin-jsapi": "^1.1.0"
9 10
       }
10 11
     },
12
+    "node_modules/date-fns": {
13
+      "version": "3.6.0",
14
+      "resolved": "https://registry.npmmirror.com/date-fns/-/date-fns-3.6.0.tgz",
15
+      "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==",
16
+      "funding": {
17
+        "type": "github",
18
+        "url": "https://github.com/sponsors/kossnocorp"
19
+      }
20
+    },
11 21
     "node_modules/weixin-jsapi": {
12 22
       "version": "1.1.0",
13 23
       "resolved": "https://registry.npmmirror.com/weixin-jsapi/-/weixin-jsapi-1.1.0.tgz",

+ 1 - 0
package.json

@@ -1,5 +1,6 @@
1 1
 {
2 2
   "dependencies": {
3
+    "date-fns": "^3.6.0",
3 4
     "weixin-jsapi": "^1.1.0"
4 5
   }
5 6
 }

+ 42 - 0
pages.json

@@ -28,6 +28,31 @@
28 28
       "style": {
29 29
         "h5": {
30 30
           "titleNView": false
31
+        },
32
+        "enablePullDownRefresh": true
33
+      }
34
+    },
35
+    {
36
+      "path": "pages/index/index",
37
+      "style": {
38
+        "h5": {
39
+          "titleNView": false
40
+        }
41
+      }
42
+    },
43
+    {
44
+      "path": "pages/repairList/repairList",
45
+      "style": {
46
+        "h5": {
47
+          "titleNView": false
48
+        }
49
+      }
50
+    },
51
+    {
52
+      "path": "pages/my/my",
53
+      "style": {
54
+        "h5": {
55
+          "titleNView": false
31 56
         }
32 57
       }
33 58
     }
@@ -36,5 +61,22 @@
36 61
     "navigationBarTextStyle": "black",
37 62
     "navigationBarBackgroundColor": "#F8F8F8",
38 63
     "backgroundColor": "#F8F8F8"
64
+  },
65
+  "tabBar": {
66
+    "color": "#888",
67
+    "selectedColor": "#49B856",
68
+    "borderStyle": "black",
69
+    "backgroundColor": "#ffffff",
70
+    "list": [{
71
+      "pagePath": "pages/incidentList/incidentList",
72
+      "iconPath": "static/img/icon_incidentList.png",
73
+      "selectedIconPath": "static/img/icon_incidentList_active.png",
74
+      "text": "故障"
75
+    }, {
76
+      "pagePath": "pages/my/my",
77
+      "iconPath": "static/img/icon_my.png",
78
+      "selectedIconPath": "static/img/icon_my_active.png",
79
+      "text": "我的"
80
+    }]
39 81
   }
40 82
 }

+ 5 - 8
pages/homePage/homePage.vue

@@ -9,7 +9,7 @@
9 9
   import '@/interceptor/routeInterceptor.js'
10 10
   import { onLoad } from '@dcloudio/uni-app'
11 11
   import { defaultColor } from '@/static/js/theme.js'
12
-  import { post } from "@/http/http.js"
12
+  import { api_wechatLoginEncrypt } from "@/http/api.js"
13 13
   import { useWechatAuth } from '@/share/useWechatAuth.js'
14 14
   import { useLoginSuccess } from '@/share/useLoginSuccess.js'
15 15
   import { useSetTitle } from '@/share/useSetTitle.js'
@@ -34,7 +34,7 @@
34 34
         title: "登录中",
35 35
         mask: true,
36 36
       });
37
-      post("/auth/wechatLoginEncrypt", code).then(res => {
37
+      api_wechatLoginEncrypt(code).then(res => {
38 38
         uni.hideLoading();
39 39
         if (res.state == 200) {
40 40
           loginSuccess(res.user);
@@ -51,12 +51,9 @@
51 51
             url: `/pages/initBind/initBind?wechat=${res.wechat}`
52 52
           })
53 53
         } else {
54
-          uni.showModal({
55
-            title: '提示',
56
-            content: res.remarks || '请求数据失败!',
57
-            showCancel: false,
58
-            confirmColor: defaultColor,
59
-            confirmText: '取消',
54
+          uni.showToast({
55
+            icon: 'none',
56
+            title: res.remarks || '请求数据失败!'
60 57
           });
61 58
         }
62 59
       });

+ 391 - 4
pages/incidentList/incidentList.vue

@@ -1,14 +1,401 @@
1 1
 <template>
2
-  <view>
3
-    事件列表页
2
+  <view class="incidentList">
3
+    <view class="head">
4
+      <view class="tab" :class="{active: tab.id === dataInfo.tabActiveId}" v-for="tab in dataInfo.tabs" :key="tab.id" @click="clickTab(tab.id)">
5
+        {{tab.name}}<text v-if="tab.num !== ''">({{tab.num}})</text>
6
+      </view>
7
+      <view class="filter" @click="filterClick">
8
+        <text class="newicon newicon-shaixuan"></text>
9
+      </view>
10
+    </view>
11
+    <view class="body" v-if="dataInfo.list.length">
12
+      <view class="body_item" v-for="data in dataInfo.list" :key="data.id">
13
+        <view class="body_item_head ellipsis-multiline">
14
+          <text :style="priorityStyle(data.priority)">{{data.priority ? data.priority.name + ' ' : ''}}</text>{{data.description}}
15
+        </view>
16
+        
17
+        <view class="body_item_content">
18
+          <view class="body_item_content_p" v-if="data.department">
19
+            <text class="name ellipsis">报修科室:{{data.department.dept}}</text>
20
+            <view class="status" :style="stateStyle(data.state)">{{data.state ? data.state.name : ''}}</view>
21
+          </view>
22
+          <view class="body_item_content_p" v-if="data.place || data.houseNumber">
23
+            <text class="name ellipsis">详细地址:{{data.place ? data.place.area.area : ''}}{{data.place ? data.place.place : ''}}{{data.houseNumber}}</text>
24
+          </view>
25
+          <view class="body_item_content_p" v-if="data.currentLog && data.currentLog.extra1DTO && data.currentLog.extra2 && data.currentLog.startTime">
26
+            <text class="name ellipsis">延期处理:{{currentLogOverTime(data.currentLog)}}</text>
27
+          </view>
28
+          <view class="body_item_content_p" v-if="data.assigneeName">
29
+            <text class="name">处理人:{{data.assigneeName}}</text>
30
+            <view class="icon_all">
31
+              <uni-icons type="mic-filled" class="mic-filled" :size="22" color="#949494"></uni-icons>
32
+              <uni-icons type="image-filled" class="image-filled" :size="22" color="#949494"></uni-icons>
33
+            </view>
34
+          </view>
35
+          <view class="body_item_content_p" v-if="data.candidateGroupsName">
36
+            <text class="name">处理组:{{data.candidateGroupsName}}</text>
37
+            <view class="icon_all">
38
+              <uni-icons type="mic-filled" class="mic-filled" :size="22" color="#949494"></uni-icons>
39
+              <uni-icons type="image-filled" class="image-filled" :size="22" color="#949494"></uni-icons>
40
+            </view>
41
+          </view>
42
+        </view>
43
+        
44
+        <view class="body_item_foot">
45
+          <view class="foot_info">
46
+            <view class="name" @click="makePhoneCall(data.contactsInformation)">联系电话:{{data.contactsInformation}}<uni-icons type="phone-filled" class="phone-filled" :size="18" :color="primaryColor"></uni-icons></view>
47
+            <text class="date">{{formatDate(data.startDate, 'MM-dd HH:mm')}}</text>
48
+          </view>
49
+          <view class="btns" v-if="data.state.value === 'pending' || data.state.value === 'handler'">
50
+            <button @click="handler('changeUser')" type="default" class="primaryButton btn">换人处理</button>
51
+            <button @click="handler('handler')" type="default" class="primaryButton btn" v-if="data.state.value === 'handler'">处理</button>
52
+            <button @click="handler('receive')" type="default" class="primaryButton btn" v-if="data.state.value === 'pending'">接单</button>
53
+          </view>
54
+        </view>
55
+      </view>
56
+    </view>
57
+    <view class="zanwu" v-else>
58
+      <text class="newicon newicon-zanwu"></text>
59
+    </view>
4 60
   </view>
61
+  <incidentListFilter v-if="dataInfo.isFilter" @cancelEmit="cancelFilter" @confirmEmit="conformFilter" :evt="dataInfo.evt"></incidentListFilter>
5 62
 </template>
6 63
 
7 64
 <script setup>
65
+  import IncidentListFilter from '@/components/IncidentListFilter.vue';
66
+  import { ref, reactive } from 'vue'
67
+  import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
68
+  import { api_getDictionary, api_incident, api_incident_count } from "@/http/api.js"
69
+  import { filterFormatDate } from '@/filters/filterFormatDate.js'
70
+  import { computedPriorityStyle } from '@/filters/computedPriorityStyle.js'
71
+  import { computedStateStyle } from '@/filters/computedStateStyle.js'
72
+  import { computedCurrentLogOverTime } from '@/filters/computedCurrentLogOverTime.js'
73
+  import { defaultColor } from '@/static/js/theme.js'
8 74
   import { useSetTitle } from '@/share/useSetTitle.js'
9
-  useSetTitle()
75
+  import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
76
+  import { useLoginUserStore } from '@/stores/loginUser'
77
+  
78
+  useSetTitle();
79
+  const loginUserStore = useLoginUserStore();
80
+  const { formatDate }  = filterFormatDate();
81
+  const { priorityStyle }  = computedPriorityStyle();
82
+  const { stateStyle }  = computedStateStyle();
83
+  const { currentLogOverTime }  = computedCurrentLogOverTime();
84
+  const { makePhoneCall }  = useMakePhoneCall();
85
+  
86
+  // 主题颜色
87
+  const primaryColor = ref(defaultColor)
88
+  
89
+  // 数据
90
+  const dataInfo = reactive({
91
+    tabs: [{id: 0, name: '全部', value: 'all', num: ''}],
92
+    tabActiveId: 0,//当前选择的tab
93
+    list: [],//事件列表
94
+    idx: 0,//页码
95
+    hasMore: true,//是否有更多数据
96
+    isFilter: false,//筛选框开关
97
+    evt: {
98
+      hospital: {},
99
+      selected: 'todoingAll',
100
+      area: {id: 0, area: '全部'},
101
+      category: {id: 0, category: '全部'},
102
+    },//筛选框数据
103
+  })
104
+  
105
+  // 获取tab选项
106
+  function getTabs(){
107
+    uni.showLoading({
108
+      title: "加载中",
109
+      mask: true,
110
+    });
111
+    api_getDictionary({
112
+      "type": "list",
113
+      "key": "incident_status"
114
+    }).then(res => {
115
+      uni.hideLoading();
116
+      let incidentStatusList = res || [];
117
+      let pending = incidentStatusList.find(v => v.value === 'pending');
118
+      let handler = incidentStatusList.find(v => v.value === 'handler');
119
+      dataInfo.tabs = [{id: 0, name: '全部', value: 'all', num: ''}];
120
+      pending && dataInfo.tabs.push({...pending, ...{num: ''}});
121
+      handler && dataInfo.tabs.push({...handler, ...{num: ''}});
122
+      getList(0);
123
+    })
124
+  }
125
+  
126
+  // 点击tab
127
+  function clickTab(tabId){
128
+    dataInfo.tabActiveId = tabId;
129
+    getList(0);
130
+  }
131
+  
132
+  // 点击筛选
133
+  function filterClick(){
134
+    dataInfo.isFilter = true;
135
+  }
136
+  
137
+  // 确认筛选
138
+  function conformFilter(evt){
139
+    console.log(evt)
140
+    dataInfo.evt = evt;
141
+    dataInfo.isFilter = false;
142
+    getList(0);
143
+  }
144
+  
145
+  // 关闭筛选
146
+  function cancelFilter(){
147
+    dataInfo.isFilter = false;
148
+  }
149
+  
150
+  // 处理按钮
151
+  function handler(type){
152
+    uni.navigateTo({
153
+      url: `/pages/${type}/${type}`
154
+    })
155
+  }
156
+  
157
+  // 获取列表信息
158
+  function getList(idx){
159
+    dataInfo.idx = idx === undefined ? dataInfo.idx : idx;
160
+    if(dataInfo.idx === 0){
161
+      dataInfo.list = [];
162
+    }
163
+    uni.showLoading({
164
+      title: "加载中",
165
+      mask: true,
166
+    });
167
+    let postData = {
168
+        "idx": dataInfo.idx,
169
+        "sum": 10,
170
+        "incident": {
171
+            "queryTask": dataInfo.evt.selected || undefined,
172
+            "assignee": loginUserStore.loginUser.user.id,
173
+            "statusId": dataInfo.tabActiveId || undefined,
174
+        }
175
+    }
176
+    
177
+    if(loginUserStore.loginUser.user.duty){
178
+      // 当前的所属责任科室
179
+      postData.incident.duty = loginUserStore.loginUser.user.duty;
180
+    }else if(loginUserStore.loginUser.user.branch){
181
+      // 当前的所属院区
182
+      postData.incident.branch = loginUserStore.loginUser.user.branch.id;
183
+    }
184
+    
185
+    if(dataInfo.evt && dataInfo.evt.category && dataInfo.evt.category.id){
186
+      postData.incident.levelCategory = dataInfo.evt.category;
187
+    }
188
+    if(dataInfo.evt && dataInfo.evt.area && dataInfo.evt.area.id){
189
+      postData.incident.area = dataInfo.evt.area;
190
+    }
191
+    
192
+    api_incident(postData).then(res => {
193
+      uni.hideLoading();
194
+      uni.stopPullDownRefresh();
195
+      if(res.status == 200){
196
+        let list = res.list || [];
197
+        if(list.length){
198
+          dataInfo.hasMore = true;
199
+          dataInfo.list = dataInfo.idx === 0 ? list : dataInfo.list.concat(list);
200
+        }else{
201
+          dataInfo.hasMore = false;
202
+        }
203
+      }else{
204
+        uni.showToast({
205
+          icon: 'none',
206
+          title: res.msg || '请求数据失败!'
207
+        });
208
+      }
209
+    })
210
+    
211
+    getCount(postData.incident);
212
+  }
213
+  
214
+  // 获取列表数量
215
+  function getCount(incident = {}){
216
+    let postData = {
217
+      wxCount: 'true',
218
+      incidentList: [],
219
+    }
220
+    dataInfo.tabs.forEach(v => {
221
+        postData.incidentList.push({...incident, ...{statusId: v.id || undefined}});
222
+    })
223
+    
224
+    postData.incidentList.forEach(incident => {
225
+        // 请求参数调整
226
+        if(!incident){
227
+            incident = {};
228
+        }
229
+        
230
+        if(incident.queryTask === 'all' || incident.queryTask === 'callback'){
231
+            if(loginUserStore.loginUser.user.duty){
232
+                // 当前的所属责任科室
233
+                incident.duty = loginUserStore.loginUser.user.duty;
234
+            }else if(loginUserStore.loginUser.user.branch){
235
+                // 当前的所属院区
236
+                incident.branch = loginUserStore.loginUser.user.branch.id;
237
+            }
238
+        }else{
239
+            delete incident.duty;
240
+            delete incident.branch;
241
+        }
242
+        
243
+        incident.assignee = loginUserStore.loginUser.user.id;
244
+        
245
+        if(incident.queryTask === 'todo' || incident.queryTask === 'owns'){
246
+            incident.candidateGroups = loginUserStore.loginUser.user.group.map(v => v.id).toString();
247
+        }else{
248
+            delete incident.candidateGroups;
249
+        }
250
+        
251
+        if(dataInfo.evt && dataInfo.evt.category && dataInfo.evt.category.id){
252
+          incident.levelCategory = dataInfo.evt.category;
253
+        }
254
+        
255
+        if(dataInfo.evt && dataInfo.evt.area && dataInfo.evt.area.id){
256
+          incident.place = {
257
+            area: dataInfo.evt.area
258
+          }
259
+        }
260
+    })
261
+    api_incident_count(postData).then(res => {
262
+      if(res.state == 200){
263
+        let myData = res.data || [];
264
+        dataInfo.tabs.forEach((v, i) => {
265
+            v.num = myData[i];
266
+        })
267
+      }else{
268
+        uni.showToast({
269
+          icon: 'none',
270
+          title: res.msg || '请求数据失败!'
271
+        });
272
+      }
273
+    })
274
+  }
275
+  
276
+  onLoad((option) => {
277
+    getTabs();
278
+  })
279
+  
280
+  onPullDownRefresh(() => {
281
+    getList(0)
282
+  })
283
+  
284
+  onReachBottom(() => {
285
+    dataInfo.idx += 1;
286
+    if (dataInfo.hasMore) {
287
+      getList(); // 当触底时加载更多数据
288
+    }
289
+  })
10 290
 </script>
11 291
 
12 292
 <style lang="scss" scoped>
13
-
293
+.incidentList{
294
+  display: flex;
295
+  flex-direction: column;
296
+  justify-content: space-between;
297
+  .head{
298
+    height: 88rpx;
299
+    display: flex;
300
+    position: fixed;
301
+    z-index: 99;
302
+    width: 100%;
303
+    background-color: #fff;
304
+    .tab{
305
+      flex: 1;
306
+      display: flex;
307
+      justify-content: center;
308
+      align-items: center;
309
+      border-bottom: 4rpx solid transparent;
310
+      &.active{
311
+        color: $uni-primary;
312
+        border-color: $uni-primary;
313
+      }
314
+    }
315
+    .filter{
316
+      width: 84rpx;
317
+      display: flex;
318
+      justify-content: center;
319
+      align-items: center;
320
+      .newicon-shaixuan{
321
+        font-size: 36rpx;
322
+        color: #2C2C2C;
323
+      }
324
+    }
325
+  }
326
+  .body{
327
+    margin-bottom: 50px;
328
+    margin-top: 88rpx;
329
+    border-top: 6rpx solid #EBEBEB;
330
+    .body_item{
331
+      border-bottom: 8rpx solid #EBEBEB;
332
+      .body_item_head{
333
+        word-break: break-all;
334
+        text-align: justify;
335
+        text-align: left;
336
+        margin: 24rpx;
337
+      }
338
+      .body_item_content{
339
+        border-top: 1rpx solid #D8D8D8;
340
+        padding: 24rpx 24rpx 24rpx 48rpx;
341
+        .body_item_content_p{
342
+          color: #6A6A6A;
343
+          font-size: 26rpx;
344
+          display: flex;
345
+          justify-content: space-between;
346
+          align-items: center;
347
+          margin-bottom: 24rpx;
348
+          &:last-of-type{
349
+            margin-bottom: 0;
350
+          }
351
+          .name{
352
+            flex: 1;
353
+          }
354
+          .status{
355
+            padding: 4rpx 10rpx;
356
+            border-radius: 20rpx;
357
+            background-color: #DBE8FE;
358
+            font-size: 22rpx;
359
+            color: #006CF9;
360
+          }
361
+          .icon_all{
362
+            .mic-filled,
363
+            .image-filled
364
+            {
365
+              margin-left: 16rpx;
366
+            }
367
+          }
368
+        }
369
+      }
370
+      .body_item_foot{
371
+        border-top: 1rpx solid #D8D8D8;
372
+        font-size: 26rpx;
373
+        padding: 24rpx;
374
+        .foot_info{
375
+          display: flex;
376
+          justify-content: space-between;
377
+          align-items: center;
378
+          .phone-filled{
379
+            margin-left: 5rpx;
380
+          }
381
+        }
382
+      }
383
+    }
384
+  }
385
+  .zanwu{
386
+    box-sizing: border-box;
387
+    margin-bottom: 50px;
388
+    margin-top: 88rpx;
389
+    border-top: 6rpx solid #EBEBEB;
390
+    height: calc(100vh - 50px - 88rpx);
391
+    display: flex;
392
+    justify-content: center;
393
+    background-color: #F7F7F7;
394
+    .newicon-zanwu{
395
+      font-size: 256rpx;
396
+      color: #D6D6D6;
397
+      margin-top: 140rpx;
398
+    }
399
+  }
400
+}
14 401
 </style>

+ 19 - 0
pages/index/index.vue

@@ -0,0 +1,19 @@
1
+<template>
2
+  <view>
3
+    首页
4
+  </view>
5
+</template>
6
+
7
+<script>
8
+  export default {
9
+    data() {
10
+      return {
11
+        
12
+      };
13
+    }
14
+  }
15
+</script>
16
+
17
+<style lang="scss">
18
+
19
+</style>

+ 6 - 9
pages/initBind/initBind.vue

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <view class="repairEntrance">
2
+  <view class="repairEntrance page_padding">
3 3
     <view class="info">
4 4
       <view class="info_text">
5 5
         <view class="text_left text_justify">您还没有绑定工号,请填写您的工号进行绑定。</view>
@@ -18,7 +18,7 @@
18 18
 
19 19
 <script setup>
20 20
   import { onLoad } from '@dcloudio/uni-app'
21
-  import { post } from "@/http/http.js"
21
+  import { api_bindAccount } from "@/http/api.js"
22 22
   import { defaultColor } from '@/static/js/theme.js'
23 23
   import { reactive, ref } from 'vue'
24 24
   import { useWechatAuth } from '@/share/useWechatAuth.js'
@@ -70,7 +70,7 @@
70 70
       title: "加载中",
71 71
       mask: true,
72 72
     });
73
-    post("/auth/bindAccount", {
73
+    api_bindAccount({
74 74
       account: postData.account,
75 75
       wechat: options.wechat,
76 76
       type: type || undefined,
@@ -113,12 +113,9 @@
113 113
           confirmText: '取消',
114 114
         });
115 115
       } else {
116
-        uni.showModal({
117
-          title: '提示',
118
-          content: res.msg || '请求数据失败!',
119
-          showCancel: false,
120
-          confirmColor: defaultColor,
121
-          confirmText: '取消',
116
+        uni.showToast({
117
+          icon: 'none',
118
+          title: res.msg || '请求数据失败!'
122 119
         });
123 120
       }
124 121
     })

+ 19 - 0
pages/my/my.vue

@@ -0,0 +1,19 @@
1
+<template>
2
+  <view>
3
+    我的
4
+  </view>
5
+</template>
6
+
7
+<script>
8
+  export default {
9
+    data() {
10
+      return {
11
+        
12
+      };
13
+    }
14
+  }
15
+</script>
16
+
17
+<style lang="scss">
18
+
19
+</style>

+ 1 - 1
pages/repairEntrance/repairEntrance.vue

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <view class="repairEntrance">
2
+  <view class="repairEntrance page_padding">
3 3
     <view class="info">
4 4
       <view class="info_text">
5 5
         <view class="text_left text_justify">您没有报修处理权限,如需要请联系管理员。</view>

+ 19 - 0
pages/repairList/repairList.vue

@@ -0,0 +1,19 @@
1
+<template>
2
+  <view>
3
+    我的报修
4
+  </view>
5
+</template>
6
+
7
+<script>
8
+  export default {
9
+    data() {
10
+      return {
11
+        
12
+      };
13
+    }
14
+  }
15
+</script>
16
+
17
+<style lang="scss">
18
+
19
+</style>

+ 9 - 0
readme.md

@@ -0,0 +1,9 @@
1
+# ITSM微信端
2
+# 目录说明-seimin(2024年4月15日)
3
+- http         存放请求处理方法
4
+- share        存放可复用的方法
5
+- interceptor  存放路由拦截器
6
+- pages        存放页面视图
7
+- static       存放资源文件
8
+- stores       存放状态管理
9
+- filters      存放过滤器

+ 1 - 1
share/useLoginSuccess.js

@@ -4,7 +4,7 @@ export function useLoginSuccess() {
4 4
   /**
5 5
    * 登录成功后的操作
6 6
    */
7
-  function loginSuccess(user) {
7
+  const loginSuccess = (user) => {
8 8
     loginUserStore.setLoginUser(user.user);
9 9
     loginUserStore.setLoginUserMenu(user.menu);
10 10
     // 判断用户标识是否为处理人

+ 14 - 0
share/useMakePhoneCall.js

@@ -0,0 +1,14 @@
1
+export function useMakePhoneCall() {
2
+  /**
3
+   * 拨打电话
4
+   */
5
+  const makePhoneCall = (phoneNumber) => {
6
+    uni.makePhoneCall({
7
+    	phoneNumber,
8
+    });
9
+  }
10
+
11
+  return {
12
+    makePhoneCall
13
+  };
14
+}

+ 3 - 4
share/useSetTitle.js

@@ -1,5 +1,5 @@
1 1
 import { onLoad } from '@dcloudio/uni-app'
2
-import { get } from "@/http/http.js"
2
+import { api_getSysNameAndLogo } from "@/http/api.js"
3 3
 import { useLoginUserStore } from '@/stores/loginUser'
4 4
 const loginUserStore = useLoginUserStore()
5 5
 
@@ -7,14 +7,13 @@ export function useSetTitle() {
7 7
   /**
8 8
    * 设置标题
9 9
    */
10
-  function setTitle(){
11
-    console.log(loginUserStore.loginUser.sysName)
10
+  const setTitle = () => {
12 11
     if(loginUserStore.loginUser.sysName){
13 12
       uni.setNavigationBarTitle({
14 13
         title: loginUserStore.loginUser.sysName //页面标题为页面顶部显示的文字
15 14
       });
16 15
     }else{
17
-      get("/auth/getSysNameAndLogo").then(res => {
16
+      api_getSysNameAndLogo().then(res => {
18 17
         let sysName = res.sysName || '';
19 18
         loginUserStore.setLoginUserTitle(sysName)
20 19
         uni.setNavigationBarTitle({

+ 5 - 12
share/useWechatAuth.js

@@ -1,23 +1,16 @@
1
-import {
2
-  get,
3
-  post,
4
-} from "@/http/http.js"
5
-import {
6
-  useLoginSuccess
7
-} from '@/share/useLoginSuccess.js'
8
-const {
9
-  loginSuccess
10
-} = useLoginSuccess()
1
+import { api_wechatAuth } from "@/http/api.js"
2
+import { useLoginSuccess } from '@/share/useLoginSuccess.js'
3
+const { loginSuccess } = useLoginSuccess()
11 4
 export function useWechatAuth() {
12 5
   /**
13 6
    * 微信登录2
14 7
    */
15
-  function wechatAuth() {
8
+  const wechatAuth = () => {
16 9
     uni.showLoading({
17 10
       title: "登录中",
18 11
       mask: true,
19 12
     });
20
-    post("/auth/wechatAuth", {
13
+    api_wechatAuth({
21 14
       redirectUrl: location.origin + location.pathname
22 15
     }).then(res => {
23 16
       uni.hideLoading();

+ 72 - 26
static/font/demo_index.html

@@ -55,6 +55,24 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
+              <span class="icon newicon">&#xe6cf;</span>
59
+                <div class="name">暂无</div>
60
+                <div class="code-name">&amp;#xe6cf;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
64
+              <span class="icon newicon">&#xe717;</span>
65
+                <div class="name">选择角标</div>
66
+                <div class="code-name">&amp;#xe717;</div>
67
+              </li>
68
+          
69
+            <li class="dib">
70
+              <span class="icon newicon">&#xe6da;</span>
71
+                <div class="name">公告</div>
72
+                <div class="code-name">&amp;#xe6da;</div>
73
+              </li>
74
+          
75
+            <li class="dib">
58 76
               <span class="icon newicon">&#xe655;</span>
59 77
                 <div class="name">bitian</div>
60 78
                 <div class="code-name">&amp;#xe655;</div>
@@ -115,12 +133,6 @@
115 133
               </li>
116 134
           
117 135
             <li class="dib">
118
-              <span class="icon newicon">&#xe604;</span>
119
-                <div class="name">报修</div>
120
-                <div class="code-name">&amp;#xe604;</div>
121
-              </li>
122
-          
123
-            <li class="dib">
124 136
               <span class="icon newicon">&#xe638;</span>
125 137
                 <div class="name">消息管理</div>
126 138
                 <div class="code-name">&amp;#xe638;</div>
@@ -162,9 +174,9 @@
162 174
 <pre><code class="language-css"
163 175
 >@font-face {
164 176
   font-family: 'newicon';
165
-  src: url('iconfont.woff2?t=1712989645345') format('woff2'),
166
-       url('iconfont.woff?t=1712989645345') format('woff'),
167
-       url('iconfont.ttf?t=1712989645345') format('truetype');
177
+  src: url('iconfont.woff2?t=1713330377145') format('woff2'),
178
+       url('iconfont.woff?t=1713330377145') format('woff'),
179
+       url('iconfont.ttf?t=1713330377145') format('truetype');
168 180
 }
169 181
 </code></pre>
170 182
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -191,6 +203,33 @@
191 203
         <ul class="icon_lists dib-box">
192 204
           
193 205
           <li class="dib">
206
+            <span class="icon newicon newicon-zanwu"></span>
207
+            <div class="name">
208
+              暂无
209
+            </div>
210
+            <div class="code-name">.newicon-zanwu
211
+            </div>
212
+          </li>
213
+          
214
+          <li class="dib">
215
+            <span class="icon newicon newicon-xuanzejiaobiao"></span>
216
+            <div class="name">
217
+              选择角标
218
+            </div>
219
+            <div class="code-name">.newicon-xuanzejiaobiao
220
+            </div>
221
+          </li>
222
+          
223
+          <li class="dib">
224
+            <span class="icon newicon newicon-gonggao"></span>
225
+            <div class="name">
226
+              公告
227
+            </div>
228
+            <div class="code-name">.newicon-gonggao
229
+            </div>
230
+          </li>
231
+          
232
+          <li class="dib">
194 233
             <span class="icon newicon newicon-bitian"></span>
195 234
             <div class="name">
196 235
               bitian
@@ -281,15 +320,6 @@
281 320
           </li>
282 321
           
283 322
           <li class="dib">
284
-            <span class="icon newicon newicon-baoxiu"></span>
285
-            <div class="name">
286
-              报修
287
-            </div>
288
-            <div class="code-name">.newicon-baoxiu
289
-            </div>
290
-          </li>
291
-          
292
-          <li class="dib">
293 323
             <span class="icon newicon newicon-xiaoxiguanli"></span>
294 324
             <div class="name">
295 325
               消息管理
@@ -354,6 +384,30 @@
354 384
           
355 385
             <li class="dib">
356 386
                 <svg class="icon svg-icon" aria-hidden="true">
387
+                  <use xlink:href="#newicon-zanwu"></use>
388
+                </svg>
389
+                <div class="name">暂无</div>
390
+                <div class="code-name">#newicon-zanwu</div>
391
+            </li>
392
+          
393
+            <li class="dib">
394
+                <svg class="icon svg-icon" aria-hidden="true">
395
+                  <use xlink:href="#newicon-xuanzejiaobiao"></use>
396
+                </svg>
397
+                <div class="name">选择角标</div>
398
+                <div class="code-name">#newicon-xuanzejiaobiao</div>
399
+            </li>
400
+          
401
+            <li class="dib">
402
+                <svg class="icon svg-icon" aria-hidden="true">
403
+                  <use xlink:href="#newicon-gonggao"></use>
404
+                </svg>
405
+                <div class="name">公告</div>
406
+                <div class="code-name">#newicon-gonggao</div>
407
+            </li>
408
+          
409
+            <li class="dib">
410
+                <svg class="icon svg-icon" aria-hidden="true">
357 411
                   <use xlink:href="#newicon-bitian"></use>
358 412
                 </svg>
359 413
                 <div class="name">bitian</div>
@@ -434,14 +488,6 @@
434 488
           
435 489
             <li class="dib">
436 490
                 <svg class="icon svg-icon" aria-hidden="true">
437
-                  <use xlink:href="#newicon-baoxiu"></use>
438
-                </svg>
439
-                <div class="name">报修</div>
440
-                <div class="code-name">#newicon-baoxiu</div>
441
-            </li>
442
-          
443
-            <li class="dib">
444
-                <svg class="icon svg-icon" aria-hidden="true">
445 491
                   <use xlink:href="#newicon-xiaoxiguanli"></use>
446 492
                 </svg>
447 493
                 <div class="name">消息管理</div>

+ 15 - 7
static/font/iconfont.css

@@ -1,8 +1,8 @@
1 1
 @font-face {
2 2
   font-family: "newicon"; /* Project id 4304860 */
3
-  src: url('iconfont.woff2?t=1712989645345') format('woff2'),
4
-       url('iconfont.woff?t=1712989645345') format('woff'),
5
-       url('iconfont.ttf?t=1712989645345') format('truetype');
3
+  src: url('iconfont.woff2?t=1713330377145') format('woff2'),
4
+       url('iconfont.woff?t=1713330377145') format('woff'),
5
+       url('iconfont.ttf?t=1713330377145') format('truetype');
6 6
 }
7 7
 
8 8
 .newicon {
@@ -13,6 +13,18 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.newicon-zanwu:before {
17
+  content: "\e6cf";
18
+}
19
+
20
+.newicon-xuanzejiaobiao:before {
21
+  content: "\e717";
22
+}
23
+
24
+.newicon-gonggao:before {
25
+  content: "\e6da";
26
+}
27
+
16 28
 .newicon-bitian:before {
17 29
   content: "\e655";
18 30
 }
@@ -53,10 +65,6 @@
53 65
   content: "\e65c";
54 66
 }
55 67
 
56
-.newicon-baoxiu:before {
57
-  content: "\e604";
58
-}
59
-
60 68
 .newicon-xiaoxiguanli:before {
61 69
   content: "\e638";
62 70
 }

File diff suppressed because it is too large
+ 1 - 1
static/font/iconfont.js


+ 21 - 7
static/font/iconfont.json

@@ -6,6 +6,27 @@
6 6
   "description": "",
7 7
   "glyphs": [
8 8
     {
9
+      "icon_id": "20043806",
10
+      "name": "暂无",
11
+      "font_class": "zanwu",
12
+      "unicode": "e6cf",
13
+      "unicode_decimal": 59087
14
+    },
15
+    {
16
+      "icon_id": "733991",
17
+      "name": "选择角标",
18
+      "font_class": "xuanzejiaobiao",
19
+      "unicode": "e717",
20
+      "unicode_decimal": 59159
21
+    },
22
+    {
23
+      "icon_id": "20266187",
24
+      "name": "公告",
25
+      "font_class": "gonggao",
26
+      "unicode": "e6da",
27
+      "unicode_decimal": 59098
28
+    },
29
+    {
9 30
       "icon_id": "5933281",
10 31
       "name": "bitian",
11 32
       "font_class": "bitian",
@@ -76,13 +97,6 @@
76 97
       "unicode_decimal": 58972
77 98
     },
78 99
     {
79
-      "icon_id": "5796777",
80
-      "name": "报修",
81
-      "font_class": "baoxiu",
82
-      "unicode": "e604",
83
-      "unicode_decimal": 58884
84
-    },
85
-    {
86 100
       "icon_id": "5223836",
87 101
       "name": "消息管理",
88 102
       "font_class": "xiaoxiguanli",

BIN
static/font/iconfont.ttf


BIN
static/font/iconfont.woff


BIN
static/font/iconfont.woff2


BIN
static/img/icon_incidentList.png


BIN
static/img/icon_incidentList_active.png


BIN
static/img/icon_index.png


BIN
static/img/icon_index_active.png


BIN
static/img/icon_my.png


BIN
static/img/icon_my_active.png


BIN
static/img/icon_repairList.png


BIN
static/img/icon_repairList_active.png


+ 41 - 2
static/scss/common.scss

@@ -2,8 +2,16 @@
2 2
 page{
3 3
   background-color: #fff;
4 4
   color: #000;
5
-  padding: 0 24rpx;
6
-  height: 100vh;
5
+  height: calc(100vh - 50px);
6
+}
7
+
8
+uni-toast{
9
+  z-index: 99999;
10
+}
11
+
12
+.page_padding{
13
+  padding-left: 24rpx;
14
+  padding-right: 24rpx;
7 15
 }
8 16
 
9 17
 // 居中
@@ -56,3 +64,34 @@ page{
56 64
 .uni-modal__bd{
57 65
   text-align: justify;
58 66
 }
67
+
68
+// 按钮组
69
+.btns{
70
+  display: flex;
71
+  justify-content: space-between;
72
+  align-items: center;
73
+  padding-top: 24rpx;
74
+  .btn{
75
+    flex: 1;
76
+    margin-right: 24rpx;
77
+    &:last-of-type{
78
+      margin-right: 0;
79
+    }
80
+  }
81
+}
82
+
83
+// 单行省略
84
+.ellipsis {
85
+  white-space: nowrap; /* 确保文本在一行内显示 */
86
+  overflow: hidden; /* 隐藏超出容器的文本 */
87
+  text-overflow: ellipsis; /* 使用省略符号表示文本被截断 */
88
+}
89
+
90
+// 两行省略
91
+.ellipsis-multiline {
92
+  display: -webkit-box;
93
+  -webkit-box-orient: vertical;
94
+  -webkit-line-clamp: 2; /* 定义显示的行数 */
95
+  overflow: hidden;
96
+  text-overflow: ellipsis;
97
+}

+ 15 - 0
utils/isTimestamp.js

@@ -0,0 +1,15 @@
1
+import { isDate } from 'date-fns';
2
+
3
+/**
4
+ * 判断是否是时间戳
5
+ */
6
+export const isTimestamp = (value) => {
7
+  // 判断是否为数字
8
+  if (typeof value !== 'number') return false;
9
+  // 判断是否为合理的时间戳(大于0)
10
+  if (value <= 0) return false;
11
+  // 判断是否为Math.floor(value),即是否为整数
12
+  if (value !== Math.floor(value)) return false;
13
+  // 判断是否为日期对象
14
+  return isDate(new Date(value));
15
+}