|
|
@@ -1,380 +0,0 @@
|
|
1
|
|
-<template>
|
|
2
|
|
- <page-meta :root-font-size="getFontSizeValue"></page-meta>
|
|
3
|
|
- <view>
|
|
4
|
|
- <view class="uni-margin-wrap">
|
|
5
|
|
- <swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
|
|
6
|
|
- :duration="duration">
|
|
7
|
|
- <swiper-item v-for="item in bannnerData" :key="item.id">
|
|
8
|
|
- <image :src="item.imgPath" mode=""></image>
|
|
9
|
|
- </swiper-item>
|
|
10
|
|
- </swiper>
|
|
11
|
|
- </view>
|
|
12
|
|
-
|
|
13
|
|
- <view class="orderManage">
|
|
14
|
|
- <view class="orderTit" style="padding-left: 15px;color: rgb(126, 131, 125);">
|
|
15
|
|
- <text
|
|
16
|
|
- style="width: 4px;background-color: rgb(26, 188, 156);height: 20px;margin-top: 10px;margin-right: 5px;"></text>
|
|
17
|
|
- <text>工单模块</text>
|
|
18
|
|
- </view>
|
|
19
|
|
-
|
|
20
|
|
- <view class="orderCon">
|
|
21
|
|
- <view class="orderList" v-for="item in orderListData" :key="item.id" @click="workOrderListClick(item)">
|
|
22
|
|
- <image :style="{ background: item.imageBg }" :src="item.imagePath" mode=""></image>
|
|
23
|
|
- <text>{{ item.text }}</text>
|
|
24
|
|
- </view>
|
|
25
|
|
- </view>
|
|
26
|
|
-
|
|
27
|
|
- <view class="orderTit" @click="changeStore" v-if="noticState">
|
|
28
|
|
- <image style="background: #ff9600" src="/static/icon_noticefi.png"></image>
|
|
29
|
|
- <text>公告通知</text>
|
|
30
|
|
- </view>
|
|
31
|
|
-
|
|
32
|
|
- <view class="notification">
|
|
33
|
|
- <view class="notifiList" v-for="item in noticListData" :key="item.id">
|
|
34
|
|
- <image :style="{ background: item.imageBg }" :src="item.imagePath" mode=""></image>
|
|
35
|
|
- <view class="">
|
|
36
|
|
- <text>{{ item.textTit }}</text>
|
|
37
|
|
- <text>{{ item.textCon }}</text>
|
|
38
|
|
- </view>
|
|
39
|
|
- </view>
|
|
40
|
|
- </view>
|
|
41
|
|
- </view>
|
|
42
|
|
- </view>
|
|
43
|
|
-</template>
|
|
44
|
|
-<script>
|
|
45
|
|
- import {
|
|
46
|
|
- getCode
|
|
47
|
|
- } from '@/utils/dd'
|
|
48
|
|
- import {
|
|
49
|
|
- mapGetters
|
|
50
|
|
- } from "vuex"
|
|
51
|
|
- import store from '@/store';
|
|
52
|
|
- import {
|
|
53
|
|
- getToken
|
|
54
|
|
- } from '@/utils/auth'
|
|
55
|
|
- export default {
|
|
56
|
|
- data() {
|
|
57
|
|
- return {
|
|
58
|
|
- ddcode: '',
|
|
59
|
|
- indicatorDots: true,
|
|
60
|
|
- getFontSizeValue: '1rem',
|
|
61
|
|
- autoplay: true,
|
|
62
|
|
- interval: 2000,
|
|
63
|
|
- noticState: false,
|
|
64
|
|
- duration: 500,
|
|
65
|
|
- bannnerData: [],
|
|
66
|
|
- orderListData: [],
|
|
67
|
|
- noticListData: [],
|
|
68
|
|
- }
|
|
69
|
|
- },
|
|
70
|
|
- computed: {
|
|
71
|
|
- ...mapGetters(["State"]),
|
|
72
|
|
- },
|
|
73
|
|
- onLoad() {
|
|
74
|
|
- this.init()
|
|
75
|
|
- this.getFontSizeValue = uni.getStorageSync('fontSizeValue') + 'rem'
|
|
76
|
|
- // this.getFontSizeValue = '1.5rem'
|
|
77
|
|
- if (uni.getStorageSync("roleCode") === "APRY") {
|
|
78
|
|
- uni.hideTabBar()
|
|
79
|
|
- }
|
|
80
|
|
- // uni.hideTabBar()
|
|
81
|
|
- },
|
|
82
|
|
- methods: {
|
|
83
|
|
- init() {
|
|
84
|
|
- // 钉钉免登录
|
|
85
|
|
- getCode(code => {
|
|
86
|
|
- if (code !== 'fail' && code !== 'start') {
|
|
87
|
|
- this.$http.post("Home/Dinglogin", {
|
|
88
|
|
- code: code
|
|
89
|
|
- }).then((res) => {
|
|
90
|
|
- if (res.state.toLowerCase() == 'success') {
|
|
91
|
|
- uni.setStorageSync('token', res.data)
|
|
92
|
|
-
|
|
93
|
|
- } else {
|
|
94
|
|
- this.$mHelper.toast(res.message)
|
|
95
|
|
- return
|
|
96
|
|
- }
|
|
97
|
|
- this.$mStore.dispatch("GetInfo").then((e) => {
|
|
98
|
|
- if (e.state == 'notoken') {
|
|
99
|
|
- uni.reLaunch({
|
|
100
|
|
- url: '/pages/login/login'
|
|
101
|
|
- });
|
|
102
|
|
- return
|
|
103
|
|
- }
|
|
104
|
|
- uni.setStorageSync('roleCode', e.data.Role.F_RoleCode)
|
|
105
|
|
- uni.setStorageSync('userName', e.data.User.F_UserName)
|
|
106
|
|
- if (e.data.Dept) {
|
|
107
|
|
- uni.setStorageSync('deptId', e.data.Dept.F_DeptId)
|
|
108
|
|
- uni.setStorageSync('deptName', e.data.Dept.F_DeptName)
|
|
109
|
|
- }
|
|
110
|
|
- uni.setStorageSync('userCode', e.data.User.F_UserCode)
|
|
111
|
|
- this.getMenuPermissions()
|
|
112
|
|
- })
|
|
113
|
|
- })
|
|
114
|
|
- } else {
|
|
115
|
|
- this.$mStore.dispatch("GetInfo").then((e) => {
|
|
116
|
|
- if (e.state.toLowerCase() == 'notoken') {
|
|
117
|
|
- uni.reLaunch({
|
|
118
|
|
- url: '/pages/login/login'
|
|
119
|
|
- });
|
|
120
|
|
- } else {
|
|
121
|
|
- this.bannnerData = this.$mConstDataConfig.bannnerData
|
|
122
|
|
- this.getMenuPermissions() //获取用户权限
|
|
123
|
|
- }
|
|
124
|
|
- })
|
|
125
|
|
- }
|
|
126
|
|
- })
|
|
127
|
|
-
|
|
128
|
|
- // #ifdef APP-PLUS
|
|
129
|
|
- let timer
|
|
130
|
|
- timer = setInterval(() => {
|
|
131
|
|
- plus.push.getClientInfoAsync((info) => {
|
|
132
|
|
- let cid = info["clientid"];
|
|
133
|
|
- if (cid) {
|
|
134
|
|
- clearInterval(timer)
|
|
135
|
|
- this.clienGet(cid) //获取cid
|
|
136
|
|
- }
|
|
137
|
|
- });
|
|
138
|
|
- }, 5000)
|
|
139
|
|
-
|
|
140
|
|
- this.upData()
|
|
141
|
|
- // #endif
|
|
142
|
|
-
|
|
143
|
|
- },
|
|
144
|
|
-
|
|
145
|
|
- changeStore() {
|
|
146
|
|
- this.$mStore.dispatch("STATE", 3)
|
|
147
|
|
- },
|
|
148
|
|
- workOrderListClick(item) {
|
|
149
|
|
- uni.navigateTo({
|
|
150
|
|
- url: item.navigateToUrl,
|
|
151
|
|
- })
|
|
152
|
|
- },
|
|
153
|
|
- clienGet(cid) {
|
|
154
|
|
-
|
|
155
|
|
- let apptype
|
|
156
|
|
- if (plus.device.model.indexOf('iPhone') > -1) {
|
|
157
|
|
- apptype = 2;
|
|
158
|
|
- } else {
|
|
159
|
|
- apptype = 1;
|
|
160
|
|
- }
|
|
161
|
|
- const params = {
|
|
162
|
|
- apptype: apptype,
|
|
163
|
|
- clientid: cid,
|
|
164
|
|
- token: uni.getStorageSync("token"),
|
|
165
|
|
- }
|
|
166
|
|
- this.$http.get("PushMessage/PutAppClientIdAsync", params).then((response) => {
|
|
167
|
|
- if (response.state.toLowerCase() === "success") {
|
|
168
|
|
- let data = response.message
|
|
169
|
|
- }
|
|
170
|
|
-
|
|
171
|
|
- })
|
|
172
|
|
- .catch((e) => {
|
|
173
|
|
- console.log(e)
|
|
174
|
|
- })
|
|
175
|
|
-
|
|
176
|
|
- },
|
|
177
|
|
- upData() {
|
|
178
|
|
- plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
|
|
179
|
|
- uni.setStorageSync('versionCode', wgtinfo.version)
|
|
180
|
|
- });
|
|
181
|
|
- let typeUp = ''
|
|
182
|
|
- if (plus.device.model.indexOf('iPhone') > -1) {
|
|
183
|
|
- typeUp = 'ios';
|
|
184
|
|
- } else {
|
|
185
|
|
- typeUp = 'android';
|
|
186
|
|
- }
|
|
187
|
|
- const params = {
|
|
188
|
|
- versionName: typeUp,
|
|
189
|
|
- }
|
|
190
|
|
- this.$http.get('/ApplicationsRefresh/GetAllList', params).then((response) => {
|
|
191
|
|
- if (response.rows.length > 0) {
|
|
192
|
|
- let data = response.rows
|
|
193
|
|
- const nowVersionCode = uni.getStorageSync('versionCode')
|
|
194
|
|
- const serveVersionCode = data[0].F_VersionCode
|
|
195
|
|
- console.log(nowVersionCode + "---" + serveVersionCode)
|
|
196
|
|
- if (nowVersionCode !== serveVersionCode) {
|
|
197
|
|
- if (typeUp === 'android') {
|
|
198
|
|
- uni.showModal({
|
|
199
|
|
- title: '更新',
|
|
200
|
|
- content: '是否更新',
|
|
201
|
|
- success: function(res) {
|
|
202
|
|
- if (res.confirm) {
|
|
203
|
|
- plus.runtime.openURL(data[0].F_DownUrl);
|
|
204
|
|
- } else if (res.cancel) {
|
|
205
|
|
- this.$mHelper.toast("取消更新");
|
|
206
|
|
- }
|
|
207
|
|
- }
|
|
208
|
|
- });
|
|
209
|
|
- } else if (typeUp === 'ios') {
|
|
210
|
|
- plus.runtime.openURL(
|
|
211
|
|
- 'https://apps.apple.com/cn/app/%E9%83%91%E5%B7%9E%E4%BA%BA%E6%B0%91%E5%8C%BB%E9%99%A2%E7%BB%BC%E5%90%88%E6%9C%8D%E5%8A%A1%E4%BF%9D%E9%9A%9C%E8%B0%83%E5%BA%A6%E5%B9%B3%E5%8F%B0/id6444557705'
|
|
212
|
|
- );
|
|
213
|
|
- }
|
|
214
|
|
-
|
|
215
|
|
-
|
|
216
|
|
- }
|
|
217
|
|
-
|
|
218
|
|
- }
|
|
219
|
|
- }).catch((e) => {
|
|
220
|
|
- console.log(e);
|
|
221
|
|
- })
|
|
222
|
|
- },
|
|
223
|
|
-
|
|
224
|
|
- getMenuPermissions() {
|
|
225
|
|
- let code = uni.getStorageSync("roleCode")
|
|
226
|
|
- this.$http.get("InternalMessages/GetCount").then((response) => {
|
|
227
|
|
- if (response.state.toLowerCase() === "success") {
|
|
228
|
|
- if (response.IsRead == 1) {
|
|
229
|
|
- uni.showTabBarRedDot({
|
|
230
|
|
- index: 2
|
|
231
|
|
- })
|
|
232
|
|
- } else {
|
|
233
|
|
- uni.hideTabBarRedDot({
|
|
234
|
|
- index: 2
|
|
235
|
|
- })
|
|
236
|
|
- }
|
|
237
|
|
- }
|
|
238
|
|
-
|
|
239
|
|
- })
|
|
240
|
|
- .catch((e) => {
|
|
241
|
|
- console.log(e)
|
|
242
|
|
- })
|
|
243
|
|
- /*
|
|
244
|
|
- GLY:管理员
|
|
245
|
|
- */
|
|
246
|
|
- if (code === 'WXY' || code === 'WXBZZ') {
|
|
247
|
|
- this.orderListData = this.$mConstDataConfig.roleListData.UnitList
|
|
248
|
|
- } else if (code === "DDZX") {
|
|
249
|
|
- this.orderListData = this.$mConstDataConfig.roleListData.dispatchList
|
|
250
|
|
- } else if (code === "GQY") {
|
|
251
|
|
- this.orderListData = this.$mConstDataConfig.roleListData.AttendantList
|
|
252
|
|
- } else if (code === "SJ") {
|
|
253
|
|
- this.orderListData = this.$mConstDataConfig.roleListData.driverList
|
|
254
|
|
- } else if (code === 'jcgn') {
|
|
255
|
|
- this.orderListData = this.$mConstDataConfig.roleListData.applyRepairList
|
|
256
|
|
- } else if (code === 'APRY') {
|
|
257
|
|
- this.orderListData = this.$mConstDataConfig.roleListData.driverList
|
|
258
|
|
- } else if (code === 'BMXG') {
|
|
259
|
|
- this.orderListData = this.$mConstDataConfig.roleListData.applyRepairList
|
|
260
|
|
- } else if (code === 'GLY') {
|
|
261
|
|
- this.orderListData = this.$mConstDataConfig.roleListData.applyRepairList
|
|
262
|
|
- }
|
|
263
|
|
- },
|
|
264
|
|
- },
|
|
265
|
|
- }
|
|
266
|
|
-</script>
|
|
267
|
|
-
|
|
268
|
|
-<style lang="scss">
|
|
269
|
|
- .uni-margin-wrap {
|
|
270
|
|
- width: 690rpx;
|
|
271
|
|
- width: 100%;
|
|
272
|
|
- }
|
|
273
|
|
-
|
|
274
|
|
- .swiper {
|
|
275
|
|
- height: 225px;
|
|
276
|
|
-
|
|
277
|
|
- image {
|
|
278
|
|
- width: 100%;
|
|
279
|
|
- height: 100%;
|
|
280
|
|
- }
|
|
281
|
|
- }
|
|
282
|
|
-
|
|
283
|
|
- .orderManage {
|
|
284
|
|
- .orderTit {
|
|
285
|
|
- margin-top: 15rpx;
|
|
286
|
|
- width: 100%;
|
|
287
|
|
- height: 80rpx;
|
|
288
|
|
- line-height: 80rpx;
|
|
289
|
|
- background: #ffffff;
|
|
290
|
|
- display: flex;
|
|
291
|
|
- border-bottom: 1rpx solid #eeeeee;
|
|
292
|
|
-
|
|
293
|
|
- text {
|
|
294
|
|
- font-size: 1rem;
|
|
295
|
|
- }
|
|
296
|
|
-
|
|
297
|
|
- image {
|
|
298
|
|
- width: 24rpx;
|
|
299
|
|
- height: 24rpx;
|
|
300
|
|
- padding: 8rpx;
|
|
301
|
|
- border-radius: 12px;
|
|
302
|
|
- background: #1972c2;
|
|
303
|
|
- margin: 20rpx 10rpx 20rpx 26rpx;
|
|
304
|
|
- }
|
|
305
|
|
- }
|
|
306
|
|
-
|
|
307
|
|
- .orderCon {
|
|
308
|
|
- background: #ffffff;
|
|
309
|
|
- display: flex;
|
|
310
|
|
- flex-wrap: wrap;
|
|
311
|
|
-
|
|
312
|
|
- .orderList {
|
|
313
|
|
- width: 186rpx;
|
|
314
|
|
- height: 206rpx;
|
|
315
|
|
- text-align: center;
|
|
316
|
|
- border-right: 2rpx solid #eeeeee;
|
|
317
|
|
- border-bottom: 2rpx solid #eeeeee;
|
|
318
|
|
-
|
|
319
|
|
- image {
|
|
320
|
|
- width: 40rpx;
|
|
321
|
|
- height: 40rpx;
|
|
322
|
|
- margin: 0 auto;
|
|
323
|
|
- display: block;
|
|
324
|
|
- border-radius: 35rpx;
|
|
325
|
|
- padding: 15rpx;
|
|
326
|
|
- margin-top: 45rpx;
|
|
327
|
|
- }
|
|
328
|
|
-
|
|
329
|
|
- text {
|
|
330
|
|
- line-height: 60rpx;
|
|
331
|
|
- }
|
|
332
|
|
- }
|
|
333
|
|
-
|
|
334
|
|
- .orderList:nth-child(4n + 4) {
|
|
335
|
|
- border-right: none;
|
|
336
|
|
- }
|
|
337
|
|
-
|
|
338
|
|
- .orderList:last-child {
|
|
339
|
|
- border-right: none;
|
|
340
|
|
- }
|
|
341
|
|
- }
|
|
342
|
|
-
|
|
343
|
|
- .notification {
|
|
344
|
|
- background: #ffffff;
|
|
345
|
|
- margin-bottom: 100rpx;
|
|
346
|
|
- display: flex;
|
|
347
|
|
- flex-wrap: wrap;
|
|
348
|
|
- border-bottom: 1rpx solid #eeeeee;
|
|
349
|
|
-
|
|
350
|
|
- .notifiList {
|
|
351
|
|
- width: 375rpx;
|
|
352
|
|
- height: 172rpx;
|
|
353
|
|
- padding: 46rpx 30rpx 46rpx 30rpx;
|
|
354
|
|
- text-align: left;
|
|
355
|
|
- border-right: 1rpx solid #eeeeee;
|
|
356
|
|
- border-bottom: 1rpx solid #eeeeee;
|
|
357
|
|
- box-sizing: border-box;
|
|
358
|
|
- display: flex;
|
|
359
|
|
-
|
|
360
|
|
- image {
|
|
361
|
|
- width: 48rpx;
|
|
362
|
|
- height: 48rpx;
|
|
363
|
|
- box-sizing: border-box;
|
|
364
|
|
- border-radius: 24rpx;
|
|
365
|
|
- padding: 10rpx;
|
|
366
|
|
- margin: 19rpx;
|
|
367
|
|
- }
|
|
368
|
|
-
|
|
369
|
|
- text {
|
|
370
|
|
- font-size: 24rpx;
|
|
371
|
|
- line-height: 30rpx;
|
|
372
|
|
- }
|
|
373
|
|
- }
|
|
374
|
|
-
|
|
375
|
|
- .notifiList:nth-child(2n + 2) {
|
|
376
|
|
- border-right: none;
|
|
377
|
|
- }
|
|
378
|
|
- }
|
|
379
|
|
- }
|
|
380
|
|
-</style>
|