|
@@ -0,0 +1,775 @@
|
|
1
|
+<template>
|
|
2
|
+ <view class="home">
|
|
3
|
+ <view v-if="tabsIndex1==1">
|
|
4
|
+ <view class="home_item" v-if="isDept.valueconfig==1">
|
|
5
|
+ <view class="title">科室报修</view>
|
|
6
|
+ <view class="content">
|
|
7
|
+ <view @click="repairsView(1,'pending,handler,reassign')">
|
|
8
|
+ <view class="con-title">处理中</view>
|
|
9
|
+ <view class="con-value">{{repairData.deptHandlerCount}}</view>
|
|
10
|
+ </view>
|
|
11
|
+ <view @click="repairsView(1,'close0')">
|
|
12
|
+ <view class="con-title">待评价</view>
|
|
13
|
+ <view class="con-value">{{repairData.deptCloseCount}}</view>
|
|
14
|
+ </view>
|
|
15
|
+ <view>
|
|
16
|
+ <view class="con-title">本月维修费用(元)</view>
|
|
17
|
+ <view class="con-value-gr">{{repairData.deptCurrentMonthPrice || 0}}</view>
|
|
18
|
+ </view>
|
|
19
|
+ </view>
|
|
20
|
+ </view>
|
|
21
|
+ <view class="home_item">
|
|
22
|
+ <view class="title">我的报修</view>
|
|
23
|
+ <view class="content">
|
|
24
|
+ <view @click="repairsView(0,'pending,handler,reassign')">
|
|
25
|
+ <view class="con-title">处理中</view>
|
|
26
|
+ <view class="con-value">{{repairData.userHandlerCount}}</view>
|
|
27
|
+ </view>
|
|
28
|
+ <view @click="repairsView(0,'close0')">
|
|
29
|
+ <view class="con-title">待评价</view>
|
|
30
|
+ <view class="con-value">{{repairData.userCloseCount}}</view>
|
|
31
|
+ </view>
|
|
32
|
+ </view>
|
|
33
|
+ </view>
|
|
34
|
+ <!-- <view class="home_item">
|
|
35
|
+ <uni-notice-bar show-icon scrollable background-color="#ffffff" color="#000"
|
|
36
|
+ :text="noticeData" />
|
|
37
|
+ </view> -->
|
|
38
|
+ <view class="home_item home-disp">
|
|
39
|
+ <view class="bottom-left" @click="addRepairs">
|
|
40
|
+ <view class="bottom-left-box">
|
|
41
|
+ <text class="newicon newicon-kuaisubaoxiu icon"></text>
|
|
42
|
+ <view>快速报修</view>
|
|
43
|
+ </view>
|
|
44
|
+ </view>
|
|
45
|
+ <view class="bottom-right mar-t-20">
|
|
46
|
+ <view class="bottom-right-item" v-if="isRepair.valueconfig==1" @click="scanCodes">
|
|
47
|
+ <text class="newicon newicon-saoma icon"></text>
|
|
48
|
+ <view class="name1">扫资产报修</view>
|
|
49
|
+ </view>
|
|
50
|
+ <view class="bottom-right-item" @click="repository">
|
|
51
|
+ <text class="newicon newicon-zhishiku1 icon"></text>
|
|
52
|
+ <view class="name2">知识库</view>
|
|
53
|
+ </view>
|
|
54
|
+ </view>
|
|
55
|
+ </view>
|
|
56
|
+ </view>
|
|
57
|
+ <view v-if="tabsIndex2==1" class="mine">
|
|
58
|
+ <view class="body">
|
|
59
|
+ <view class="bottom">
|
|
60
|
+ <view class="bottom_name">个人信息</view>
|
|
61
|
+ <view class="bottom_list">
|
|
62
|
+ <view class="bottom_list_item">
|
|
63
|
+ <view class="name"><text class="required newicon newicon-bitian"></text>工号</view>
|
|
64
|
+ <view class="value no-mar">{{loginUserStore.loginUser.user.account}}</view>
|
|
65
|
+ </view>
|
|
66
|
+ <view class="bottom_list_item">
|
|
67
|
+ <view class="name"><text class="required newicon newicon-bitian"></text>姓名</view>
|
|
68
|
+ <view class="value no-mar">{{loginUserStore.loginUser.user.name}}</view>
|
|
69
|
+ </view>
|
|
70
|
+ <view class="bottom_list_item">
|
|
71
|
+ <view class="name"><text class="required newicon newicon-bitian"></text>院区名称</view>
|
|
72
|
+ <uni-data-picker class="value" placeholder="请选择院区名称"
|
|
73
|
+ v-model="dataForm.branch" :localdata="branchData" @change="branchChange"
|
|
74
|
+ :clear-icon="false" :class="{formRed: isSubmit && !dataForm.branch}">
|
|
75
|
+ </uni-data-picker>
|
|
76
|
+ <text class="newicon newicon-youjiantou icon"></text>
|
|
77
|
+ </view>
|
|
78
|
+ <view class="bottom_list_item" v-if="deptRepair.valueconfig==1">
|
|
79
|
+ <view class="name"><text class="required newicon newicon-bitian"></text>科室名称</view>
|
|
80
|
+ <uni-data-picker class="value" placeholder="请选择报修科室"
|
|
81
|
+ v-model="dataForm.dept" :localdata="deptData"
|
|
82
|
+ :clear-icon="false" :class="{formRed: isSubmit && !dataForm.dept}">
|
|
83
|
+ </uni-data-picker>
|
|
84
|
+ <text class="newicon newicon-youjiantou icon"></text>
|
|
85
|
+ </view>
|
|
86
|
+ <view class="bottom_list_item" v-if="deptRepair.valueconfig==1" @click="deptSelect">
|
|
87
|
+ <view class="name">常用科室</view>
|
|
88
|
+ <view class="value">{{commonDeptName}}</view>
|
|
89
|
+ <text class="newicon newicon-youjiantou icon"></text>
|
|
90
|
+ </view>
|
|
91
|
+ <view class="bottom_list_item">
|
|
92
|
+ <view class="name"><text class="required newicon newicon-bitian"></text>联系电话</view>
|
|
93
|
+ <view class="value no-mar" @click="makePhoneCall(loginUserStore.loginUser.user.phone)">{{loginUserStore.loginUser.user.phone}}</view>
|
|
94
|
+ </view>
|
|
95
|
+ </view>
|
|
96
|
+ </view>
|
|
97
|
+ </view>
|
|
98
|
+ <view class="foot_common_btns fixed-btn">
|
|
99
|
+ <button @click="addInfo" type="default" class="primaryButton btn">保存</button>
|
|
100
|
+ </view>
|
|
101
|
+ </view>
|
|
102
|
+ <view class="bottom-tabs">
|
|
103
|
+ <view class="tabs-list" @click="tabsClick1">
|
|
104
|
+ <img src="/static/img/icon_incidentList.png" v-if="tabsIndex1==0" alt="">
|
|
105
|
+ <img src="/static/img/icon_incidentList_active.png" v-if="tabsIndex1==1" alt="">
|
|
106
|
+ <view class="tabs-title" :class="tabsIndex1==1?'active-class':''">我的报修</view>
|
|
107
|
+ </view>
|
|
108
|
+ <view class="tabs-list" @click="tabsClick2">
|
|
109
|
+ <img src="/static/img/icon_my.png" v-if="tabsIndex2==0" alt="">
|
|
110
|
+ <img src="/static/img/icon_my_active.png" v-if="tabsIndex2==1" alt="">
|
|
111
|
+ <view class="tabs-title" :class="tabsIndex2==1?'active-class':''">设置</view>
|
|
112
|
+ </view>
|
|
113
|
+ </view>
|
|
114
|
+ </view>
|
|
115
|
+</template>
|
|
116
|
+
|
|
117
|
+<script setup>
|
|
118
|
+ import { SM } from "@/http/http.js"
|
|
119
|
+ import { ref, reactive } from 'vue'
|
|
120
|
+ import { onLoad ,onShow, onHide, onPullDownRefresh} from '@dcloudio/uni-app'
|
|
121
|
+ import { api_systemConfiguration, api_userSave, api_user, api_department, api_repairScanCode, api_getNotice, api_getCount } from "@/http/api.js"
|
|
122
|
+ import { useSetTitle } from '@/share/useSetTitle.js'
|
|
123
|
+ import { repositoryListSearchStore } from '@/stores/repositorySearch'
|
|
124
|
+ import { useLoginUserStore } from '@/stores/loginUser'
|
|
125
|
+ import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
|
|
126
|
+ import { useIncidentNumStore } from '@/stores/incidentNum'
|
|
127
|
+ useSetTitle();
|
|
128
|
+
|
|
129
|
+ // 数据
|
|
130
|
+ const isDept = ref({})
|
|
131
|
+ const isRepair = ref({})
|
|
132
|
+ const isPublic = ref({})
|
|
133
|
+ const noticeData = ref('')
|
|
134
|
+ const repairData = ref({})
|
|
135
|
+ const tabsIndex1 = ref(1)
|
|
136
|
+ const tabsIndex2 = ref(0)
|
|
137
|
+ const repositorySearchStore = repositoryListSearchStore();
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+ const loginUserStore = useLoginUserStore();
|
|
141
|
+ const incidentNumStore = useIncidentNumStore();
|
|
142
|
+ const { makePhoneCall } = useMakePhoneCall();
|
|
143
|
+
|
|
144
|
+ const deptRepair = ref(null)
|
|
145
|
+
|
|
146
|
+ const deptData = ref([])
|
|
147
|
+
|
|
148
|
+ const branchData = ref([])
|
|
149
|
+
|
|
150
|
+ const commonDeptName = ref(null)
|
|
151
|
+
|
|
152
|
+ const commonDeptData = ref(null)
|
|
153
|
+
|
|
154
|
+ const dataForm = reactive({
|
|
155
|
+ dept: '',
|
|
156
|
+ branch:''
|
|
157
|
+ })
|
|
158
|
+
|
|
159
|
+ const userTypes = ref(null)
|
|
160
|
+
|
|
161
|
+ const userData = reactive(loginUserStore.loginUser.user)
|
|
162
|
+
|
|
163
|
+ const commonDeptDTO = ref([])
|
|
164
|
+
|
|
165
|
+ // 是否提交
|
|
166
|
+ const isSubmit = ref(false)
|
|
167
|
+
|
|
168
|
+ // 数据
|
|
169
|
+ const dataInfo = reactive({
|
|
170
|
+ num: 0,
|
|
171
|
+ })
|
|
172
|
+
|
|
173
|
+ function tabsClick1(){
|
|
174
|
+ tabsIndex1.value=1
|
|
175
|
+ tabsIndex2.value=0
|
|
176
|
+ getCount()
|
|
177
|
+ setTimeout(_=>{
|
|
178
|
+ let data = JSON.parse(uni.getStorageSync('sysData'))
|
|
179
|
+ isDept.value = data.find(i=>i.keyconfig=='deptRepair')
|
|
180
|
+ isRepair.value = data.find(i=>i.keyconfig=='cmdbRepair')
|
|
181
|
+ isPublic.value = data.find(i=>i.keyconfig=='publicRepair')
|
|
182
|
+ },0)
|
|
183
|
+ }
|
|
184
|
+
|
|
185
|
+ function tabsClick2(){
|
|
186
|
+ tabsIndex2.value=1
|
|
187
|
+ tabsIndex1.value=0
|
|
188
|
+ getUserInfo()
|
|
189
|
+ }
|
|
190
|
+
|
|
191
|
+ // 知识库
|
|
192
|
+ function repository(){
|
|
193
|
+ repositorySearchStore.clearRepositoryListSearchData()
|
|
194
|
+ uni.navigateTo({
|
|
195
|
+ url: `/pages/repository/repository?type=view&entranceType=repairs`
|
|
196
|
+ })
|
|
197
|
+ }
|
|
198
|
+
|
|
199
|
+ // 报修列表
|
|
200
|
+ function repairsView(type,value){
|
|
201
|
+ uni.navigateTo({
|
|
202
|
+ url: `/pages/repair/repairsList?type=${type}&value=${value}`
|
|
203
|
+ })
|
|
204
|
+ }
|
|
205
|
+
|
|
206
|
+ // 获取报修数量
|
|
207
|
+ function getCount(){
|
|
208
|
+ uni.showLoading({
|
|
209
|
+ title: "加载中",
|
|
210
|
+ mask: true,
|
|
211
|
+ });
|
|
212
|
+ api_getCount({}).then(res=>{
|
|
213
|
+ uni.hideLoading();
|
|
214
|
+ repairData.value = res.data
|
|
215
|
+ })
|
|
216
|
+ }
|
|
217
|
+
|
|
218
|
+ // 快速报修
|
|
219
|
+ function addRepairs(){
|
|
220
|
+ if(isDept.value.valueconfig==0 && isPublic.value.valueconfig==0){
|
|
221
|
+ uni.showToast({
|
|
222
|
+ icon: 'none',
|
|
223
|
+ title: '请先开启科室报修或公共报修'
|
|
224
|
+ });
|
|
225
|
+ return
|
|
226
|
+ }
|
|
227
|
+ uni.setStorageSync('repairsType','subpage')
|
|
228
|
+ uni.navigateTo({
|
|
229
|
+ url: '/pages/repair/rapidRep'
|
|
230
|
+ })
|
|
231
|
+ }
|
|
232
|
+
|
|
233
|
+ // 扫资产报修
|
|
234
|
+ function scanCodes(){
|
|
235
|
+ uni.showLoading({
|
|
236
|
+ title: "加载中",
|
|
237
|
+ mask: true,
|
|
238
|
+ });
|
|
239
|
+ SM().then((res) => {
|
|
240
|
+ api_repairScanCode({
|
|
241
|
+ code:res
|
|
242
|
+ }).then((res2) => {
|
|
243
|
+ uni.hideLoading();
|
|
244
|
+ if (res2.state == 200) {
|
|
245
|
+ uni.navigateTo({
|
|
246
|
+ url: `/pages/repair/rapidRep?property=${res2.data.name}&assetId=${res2.data.id}`
|
|
247
|
+ })
|
|
248
|
+ } else {
|
|
249
|
+ uni.showToast({
|
|
250
|
+ icon: 'none',
|
|
251
|
+ title: res2.msg || '请求数据失败!'
|
|
252
|
+ });
|
|
253
|
+ }
|
|
254
|
+ });
|
|
255
|
+ })
|
|
256
|
+ }
|
|
257
|
+
|
|
258
|
+ // 获取文本内容
|
|
259
|
+ function getHtml(data) {
|
|
260
|
+ const tempDiv = document.createElement('div');
|
|
261
|
+ tempDiv.innerHTML = data.content;
|
|
262
|
+ noticeData.value = tempDiv.textContent || tempDiv.innerText || '';
|
|
263
|
+ }
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+ // 保存
|
|
267
|
+ function addInfo(){
|
|
268
|
+ if(!dataForm.branch){
|
|
269
|
+ uni.showToast({
|
|
270
|
+ icon: 'none',
|
|
271
|
+ title: '院区不能为空'
|
|
272
|
+ });
|
|
273
|
+ return
|
|
274
|
+ }
|
|
275
|
+
|
|
276
|
+ if(!dataForm.dept){
|
|
277
|
+ uni.showToast({
|
|
278
|
+ icon: 'none',
|
|
279
|
+ title: '报修科室不能为空'
|
|
280
|
+ });
|
|
281
|
+ return
|
|
282
|
+ }
|
|
283
|
+
|
|
284
|
+ uni.showLoading({
|
|
285
|
+ title: "加载中",
|
|
286
|
+ mask: true,
|
|
287
|
+ });
|
|
288
|
+ isSubmit.value = true
|
|
289
|
+ userData.currentHospital.id = dataForm.branch
|
|
290
|
+ userData.commonDeptName = commonDeptName.value
|
|
291
|
+ userData.dept={
|
|
292
|
+ id:dataForm.dept
|
|
293
|
+ }
|
|
294
|
+ let arr = []
|
|
295
|
+ for(let i of commonDeptDTO.value){
|
|
296
|
+ arr.push({
|
|
297
|
+ dept:i
|
|
298
|
+ })
|
|
299
|
+ }
|
|
300
|
+ let postData = {
|
|
301
|
+ ...loginUserStore.loginUser.user,
|
|
302
|
+ // ...userData,
|
|
303
|
+ hospital:{
|
|
304
|
+ id:dataForm.branch
|
|
305
|
+ },
|
|
306
|
+ dept:{
|
|
307
|
+ id:dataForm.dept
|
|
308
|
+ },
|
|
309
|
+ commonDept:commonDeptData.value,
|
|
310
|
+ commonDeptDTO:arr
|
|
311
|
+ }
|
|
312
|
+ api_userSave({
|
|
313
|
+ user: postData,
|
|
314
|
+ }).then(res => {
|
|
315
|
+ uni.hideLoading();
|
|
316
|
+ if(res.status == 200){
|
|
317
|
+ loginUserStore.setLoginUser(postData);
|
|
318
|
+ uni.showToast({
|
|
319
|
+ icon: 'none',
|
|
320
|
+ title: '保存成功'
|
|
321
|
+ });
|
|
322
|
+ }else{
|
|
323
|
+ uni.showToast({
|
|
324
|
+ icon: 'none',
|
|
325
|
+ title: res.msg || '请求数据失败!'
|
|
326
|
+ });
|
|
327
|
+ }
|
|
328
|
+ })
|
|
329
|
+ }
|
|
330
|
+
|
|
331
|
+ // 选择院区
|
|
332
|
+ function branchChange(){
|
|
333
|
+ dataForm.dept = null
|
|
334
|
+ commonDeptName.value = null
|
|
335
|
+ commonDeptData.value = null
|
|
336
|
+ getRepairTypes()
|
|
337
|
+ }
|
|
338
|
+
|
|
339
|
+ // 获取科室列表
|
|
340
|
+ function getRepairTypes(){
|
|
341
|
+ uni.showLoading({
|
|
342
|
+ title: "加载中",
|
|
343
|
+ mask: true,
|
|
344
|
+ });
|
|
345
|
+ let postData = {
|
|
346
|
+ department: {
|
|
347
|
+ hospital: dataForm.branch?dataForm.branch:loginUserStore.loginUser.user.currentHospital.id,
|
|
348
|
+ },
|
|
349
|
+ idx:0,
|
|
350
|
+ sum:9999
|
|
351
|
+ }
|
|
352
|
+ api_department(postData).then(res => {
|
|
353
|
+ uni.hideLoading();
|
|
354
|
+ res = res.list || [];
|
|
355
|
+ deptData.value = res.map(v => ({
|
|
356
|
+ text: v.dept,
|
|
357
|
+ value: v.id,
|
|
358
|
+ }));
|
|
359
|
+ })
|
|
360
|
+ }
|
|
361
|
+
|
|
362
|
+ // 获取院区列表
|
|
363
|
+ function getBranch(){
|
|
364
|
+ let arr = loginUserStore.loginUser.hospital.filter(i=>i.parent==undefined)
|
|
365
|
+ branchData.value = arr.map(v => ({
|
|
366
|
+ text: v.hosName,
|
|
367
|
+ value: v.id,
|
|
368
|
+ }));
|
|
369
|
+ }
|
|
370
|
+
|
|
371
|
+ // 选择常用科室
|
|
372
|
+ function deptSelect(){
|
|
373
|
+ uni.setStorageSync('configData',JSON.stringify(dataForm))
|
|
374
|
+ let data = commonDeptData.value ?
|
|
375
|
+ commonDeptData.value : loginUserStore.loginUser.user.commonDept
|
|
376
|
+ if(!data){
|
|
377
|
+ data = 'none'
|
|
378
|
+ }
|
|
379
|
+ let deptId = dataForm.branch?dataForm.branch:loginUserStore.loginUser.user.currentHospital.id
|
|
380
|
+ uni.navigateTo({
|
|
381
|
+ url: `/pages/repair/deptSelect?data=${JSON.stringify(data)}&commonDeptName=${commonDeptName.value}&deptId=${deptId}&type=subpage`
|
|
382
|
+ })
|
|
383
|
+ }
|
|
384
|
+
|
|
385
|
+ // 初始化
|
|
386
|
+ function onLoadFn(){
|
|
387
|
+ let data = JSON.parse(uni.getStorageSync('sysData'))
|
|
388
|
+ deptRepair.value = data.find(i=>i.keyconfig=='deptRepair')
|
|
389
|
+ getBranch()
|
|
390
|
+ }
|
|
391
|
+
|
|
392
|
+ function getUserInfo(){
|
|
393
|
+ let user = loginUserStore.loginUser.user
|
|
394
|
+ let userId = null
|
|
395
|
+ if(user.currentHospital.parent){
|
|
396
|
+ userId = user.currentHospital.parent.id
|
|
397
|
+ }else{
|
|
398
|
+ userId = user.currentHospital.id
|
|
399
|
+ }
|
|
400
|
+ let postData = {
|
|
401
|
+ idx: 0,
|
|
402
|
+ sum: 999,
|
|
403
|
+ user: {
|
|
404
|
+ hospital:{
|
|
405
|
+ id:userId
|
|
406
|
+ },
|
|
407
|
+ name: user.name,
|
|
408
|
+ userTypeIds: String(userTypes.value.map(v => v.id))
|
|
409
|
+ }
|
|
410
|
+ }
|
|
411
|
+ api_user(postData).then(res => {
|
|
412
|
+ if(res.status == 200){
|
|
413
|
+ let item = res.list.find(i=>i.id==user.id)
|
|
414
|
+ if(item){
|
|
415
|
+ if(item.hospital.parent){
|
|
416
|
+ dataForm.branch = item.hospital.parent.id
|
|
417
|
+ }else{
|
|
418
|
+ dataForm.branch = item.hospital.id
|
|
419
|
+ }
|
|
420
|
+ if(item.dept){
|
|
421
|
+ dataForm.dept = item.dept.id
|
|
422
|
+ }
|
|
423
|
+ getRepairTypes()
|
|
424
|
+ let id = []
|
|
425
|
+ let name = []
|
|
426
|
+ if(item.commonDeptDTO){
|
|
427
|
+ for(let i of item.commonDeptDTO){
|
|
428
|
+ id.push(i.id)
|
|
429
|
+ name.push(i.dept)
|
|
430
|
+ }
|
|
431
|
+ commonDeptData.value = id.join(',')
|
|
432
|
+ commonDeptName.value = name.join('/')
|
|
433
|
+ }
|
|
434
|
+ }else{
|
|
435
|
+ // let data = uni.getStorageSync('configData')
|
|
436
|
+ // if(data){
|
|
437
|
+ // data = JSON.parse(data)
|
|
438
|
+ // dataForm.dept = data.dept
|
|
439
|
+ // dataForm.branch = data.branch
|
|
440
|
+ // }else{
|
|
441
|
+ if(user.currentHospital.parent){
|
|
442
|
+ dataForm.branch = user.currentHospital.parent.id
|
|
443
|
+ }else{
|
|
444
|
+ dataForm.branch = user.currentHospital.id
|
|
445
|
+ }
|
|
446
|
+ if(user.dept){
|
|
447
|
+ dataForm.dept = user.dept.id
|
|
448
|
+ }
|
|
449
|
+ // }
|
|
450
|
+ if(user.commonDeptDTO){
|
|
451
|
+ let name = []
|
|
452
|
+ for(let i of user.commonDeptDTO){
|
|
453
|
+ name.push(i.dept)
|
|
454
|
+ }
|
|
455
|
+ commonDeptData.value = user.commonDept
|
|
456
|
+ commonDeptName.value = name.join('/')
|
|
457
|
+ }
|
|
458
|
+ getRepairTypes()
|
|
459
|
+ }
|
|
460
|
+ }else{
|
|
461
|
+ uni.showToast({
|
|
462
|
+ icon: 'none',
|
|
463
|
+ title: res.msg || '请求数据失败!'
|
|
464
|
+ });
|
|
465
|
+ }
|
|
466
|
+ })
|
|
467
|
+ }
|
|
468
|
+
|
|
469
|
+ onHide(opt=>{
|
|
470
|
+ dataInfo.num = 0
|
|
471
|
+ dataForm.branch = null
|
|
472
|
+ })
|
|
473
|
+
|
|
474
|
+ onLoad((option) => {
|
|
475
|
+ userTypes.value = JSON.parse(uni.getStorageSync('groupData'))
|
|
476
|
+ onLoadFn();
|
|
477
|
+ dataInfo.num = 1
|
|
478
|
+ if(option.type==2){
|
|
479
|
+ if(option.data){
|
|
480
|
+ tabsIndex1.value = 0
|
|
481
|
+ tabsIndex2.value = 1
|
|
482
|
+ let data = JSON.parse(option.data)
|
|
483
|
+ commonDeptData.value = data.data.join(',')
|
|
484
|
+ commonDeptName.value = data.name.join('/')
|
|
485
|
+ commonDeptDTO.value = data.name
|
|
486
|
+ let data2 = uni.getStorageSync('configData')
|
|
487
|
+ if(data2){
|
|
488
|
+ data2 = JSON.parse(data2)
|
|
489
|
+ dataForm.dept = data2.dept
|
|
490
|
+ dataForm.branch = data2.branch
|
|
491
|
+ }
|
|
492
|
+ getRepairTypes()
|
|
493
|
+ }else{
|
|
494
|
+ getUserInfo()
|
|
495
|
+ }
|
|
496
|
+ }else{
|
|
497
|
+ tabsIndex1.value = 1
|
|
498
|
+ tabsIndex2.value = 0
|
|
499
|
+ getCount()
|
|
500
|
+ setTimeout(_=>{
|
|
501
|
+ let data = JSON.parse(uni.getStorageSync('sysData'))
|
|
502
|
+ isDept.value = data.find(i=>i.keyconfig=='deptRepair')
|
|
503
|
+ isRepair.value = data.find(i=>i.keyconfig=='cmdbRepair')
|
|
504
|
+ isPublic.value = data.find(i=>i.keyconfig=='publicRepair')
|
|
505
|
+ },0)
|
|
506
|
+ }
|
|
507
|
+
|
|
508
|
+ })
|
|
509
|
+
|
|
510
|
+ onPullDownRefresh(_=>{
|
|
511
|
+ uni.stopPullDownRefresh();
|
|
512
|
+ })
|
|
513
|
+
|
|
514
|
+ onShow((option) => {
|
|
515
|
+ userTypes.value = JSON.parse(uni.getStorageSync('groupData'))
|
|
516
|
+ onLoadFn()
|
|
517
|
+ if(dataInfo.num==0){
|
|
518
|
+ getUserInfo()
|
|
519
|
+ }
|
|
520
|
+ })
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+</script>
|
|
524
|
+
|
|
525
|
+<style scoped>
|
|
526
|
+ >>> .uni-data-tree-input{
|
|
527
|
+ width: 100% !important;
|
|
528
|
+ }
|
|
529
|
+ >>> .input-value-border{
|
|
530
|
+ border: none !important;
|
|
531
|
+ }
|
|
532
|
+ >>> .input-value{
|
|
533
|
+ padding:0 !important;
|
|
534
|
+ flex-direction: row-reverse !important;
|
|
535
|
+ }
|
|
536
|
+ >>> .selected-list{
|
|
537
|
+ flex-direction: row-reverse !important;
|
|
538
|
+ }
|
|
539
|
+ >>> .arrow-area{
|
|
540
|
+ display: none !important;
|
|
541
|
+ }
|
|
542
|
+ >>>.uni-data-tree-dialog{
|
|
543
|
+ z-index: 9999;
|
|
544
|
+ }
|
|
545
|
+</style>
|
|
546
|
+<style lang="scss" scoped>
|
|
547
|
+ .home{
|
|
548
|
+ // height: 100vh;
|
|
549
|
+ padding: 20rpx;
|
|
550
|
+ background: #fff;
|
|
551
|
+ .home_item{
|
|
552
|
+ padding: 20rpx;
|
|
553
|
+ box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.16);
|
|
554
|
+ border-radius: 10rpx;
|
|
555
|
+ margin-bottom: 30rpx;
|
|
556
|
+ .title{
|
|
557
|
+ font-size: 26rpx;
|
|
558
|
+ color: $uni-primary;
|
|
559
|
+ padding-left: 18rpx;
|
|
560
|
+ position: relative;
|
|
561
|
+ margin-bottom: 20rpx;
|
|
562
|
+ &:before{
|
|
563
|
+ content: '';
|
|
564
|
+ width: 8rpx;
|
|
565
|
+ height: 25rpx;
|
|
566
|
+ background-color: $uni-primary;
|
|
567
|
+ position: absolute;
|
|
568
|
+ left: 0;
|
|
569
|
+ top: 50%;
|
|
570
|
+ transform: translateY(-50%);
|
|
571
|
+ }
|
|
572
|
+ }
|
|
573
|
+ .content{
|
|
574
|
+ display: flex;
|
|
575
|
+ align-items: center;
|
|
576
|
+ justify-content: space-around;
|
|
577
|
+ text-align: center;
|
|
578
|
+ .con-title{
|
|
579
|
+ color: #949494;
|
|
580
|
+ font-size: 24rpx;
|
|
581
|
+ margin-bottom: 15rpx;
|
|
582
|
+ }
|
|
583
|
+ .con-value{
|
|
584
|
+ color: #000;
|
|
585
|
+ font-size: 50rpx;
|
|
586
|
+ }
|
|
587
|
+ .con-value-gr{
|
|
588
|
+ color: #49B856;
|
|
589
|
+ font-size: 50rpx;
|
|
590
|
+ }
|
|
591
|
+ }
|
|
592
|
+ .uni-noticebar{
|
|
593
|
+ margin: 0 !important;
|
|
594
|
+ padding: 0 !important;
|
|
595
|
+ }
|
|
596
|
+ }
|
|
597
|
+ .home-disp{
|
|
598
|
+ display: flex;
|
|
599
|
+ justify-content: space-around;
|
|
600
|
+ .bottom-left{
|
|
601
|
+ height: 380rpx;
|
|
602
|
+ background: linear-gradient( 269deg, #54B99C 0%, #7AC481 100%);
|
|
603
|
+ border-radius: 10rpx;
|
|
604
|
+ flex: 1.5;
|
|
605
|
+ margin-right: 20rpx;
|
|
606
|
+ display: flex;
|
|
607
|
+ align-items: center;
|
|
608
|
+ justify-content: center;
|
|
609
|
+ color: #FFFFFF;
|
|
610
|
+ margin-top: 20rpx;
|
|
611
|
+ .bottom-left-box{
|
|
612
|
+ text-align: center;
|
|
613
|
+ .icon{
|
|
614
|
+ font-size: 100rpx;
|
|
615
|
+ position: relative;
|
|
616
|
+ top: -20rpx;
|
|
617
|
+ }
|
|
618
|
+ }
|
|
619
|
+ }
|
|
620
|
+ .mar-t-20{
|
|
621
|
+ margin-top: 20rpx;
|
|
622
|
+ }
|
|
623
|
+ .bottom-right{
|
|
624
|
+ flex: 2;
|
|
625
|
+ .bottom-right-item{
|
|
626
|
+ height: 175rpx;
|
|
627
|
+ background: #FFFFFF;
|
|
628
|
+ border-radius: 10rpx;
|
|
629
|
+ border: 2rpx solid #6FC073;
|
|
630
|
+ margin-bottom: 20rpx;
|
|
631
|
+ display: flex;
|
|
632
|
+ align-items: center;
|
|
633
|
+ justify-content: center;
|
|
634
|
+ position: relative;
|
|
635
|
+ .icon{
|
|
636
|
+ font-size: 50rpx;
|
|
637
|
+ color: #6FC073;
|
|
638
|
+ position: absolute;
|
|
639
|
+ left: 60rpx;
|
|
640
|
+ }
|
|
641
|
+ .name1{
|
|
642
|
+ font-size: 32rpx;
|
|
643
|
+ position: absolute;
|
|
644
|
+ right: 50rpx;
|
|
645
|
+ }
|
|
646
|
+ .name2{
|
|
647
|
+ font-size: 32rpx;
|
|
648
|
+ position: absolute;
|
|
649
|
+ right: 80rpx;
|
|
650
|
+ }
|
|
651
|
+ }
|
|
652
|
+ }
|
|
653
|
+ }
|
|
654
|
+ .bottom-tabs{
|
|
655
|
+ border-top:1px solid rgba(0, 0, 0, 0.33);
|
|
656
|
+ background: #fff;
|
|
657
|
+ position: fixed;
|
|
658
|
+ width: 100%;
|
|
659
|
+ left: var(--window-left);
|
|
660
|
+ right: var(--window-right);
|
|
661
|
+ display: flex;
|
|
662
|
+ bottom: 0;
|
|
663
|
+ .tabs-list{
|
|
664
|
+ height: 90rpx;
|
|
665
|
+ display: flex;
|
|
666
|
+ justify-content: center;
|
|
667
|
+ align-items: center;
|
|
668
|
+ flex-direction: column;
|
|
669
|
+ flex: 1;
|
|
670
|
+ font-size: 0;
|
|
671
|
+ text-align: center;
|
|
672
|
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
673
|
+ img{
|
|
674
|
+ width: 48rpx;
|
|
675
|
+ height: 48rpx;
|
|
676
|
+ }
|
|
677
|
+ .tabs-title{
|
|
678
|
+ color: rgb(136, 136, 136);
|
|
679
|
+ font-size: 20rpx;
|
|
680
|
+ line-height: normal;
|
|
681
|
+ }
|
|
682
|
+ .active-class{
|
|
683
|
+ color: #49B856;
|
|
684
|
+ }
|
|
685
|
+ }
|
|
686
|
+ }
|
|
687
|
+ }
|
|
688
|
+ .mine{
|
|
689
|
+ height: 100%;
|
|
690
|
+ display: flex;
|
|
691
|
+ flex-direction: column;
|
|
692
|
+ justify-content: space-between;
|
|
693
|
+ .phone-filled{
|
|
694
|
+ margin-right: 5rpx;
|
|
695
|
+ }
|
|
696
|
+ .newicon-xinjian2,
|
|
697
|
+ .newicon-zhishiku{
|
|
698
|
+ margin-right: 10rpx;
|
|
699
|
+ }
|
|
700
|
+ .body{
|
|
701
|
+ width: 714rpx;
|
|
702
|
+ height: 100%;
|
|
703
|
+ margin: 16rpx auto var(--window-bottom) auto;
|
|
704
|
+ box-sizing: border-box;
|
|
705
|
+ border-radius: 8rpx;
|
|
706
|
+ .top{
|
|
707
|
+ padding: 30rpx;
|
|
708
|
+ background-color: #fff;
|
|
709
|
+ .top_name{
|
|
710
|
+ font-size: 28rpx;
|
|
711
|
+ font-weight: bold;
|
|
712
|
+ }
|
|
713
|
+ .top_count{
|
|
714
|
+ margin-top: 45rpx;
|
|
715
|
+ display: flex;
|
|
716
|
+ align-items: center;
|
|
717
|
+ justify-content: space-between;
|
|
718
|
+ .top_count_item{
|
|
719
|
+ text-align: center;
|
|
720
|
+ .name{
|
|
721
|
+ color: #949494;
|
|
722
|
+ font-size: 22rpx;
|
|
723
|
+ }
|
|
724
|
+ .value{
|
|
725
|
+ font-size: 50rpx;
|
|
726
|
+ font-weight: bold;
|
|
727
|
+ margin-top: 15rpx;
|
|
728
|
+ }
|
|
729
|
+ }
|
|
730
|
+ }
|
|
731
|
+ }
|
|
732
|
+
|
|
733
|
+ .bottom{
|
|
734
|
+ background-color: #fff;
|
|
735
|
+ margin-top: 15rpx;
|
|
736
|
+ .bottom_name{
|
|
737
|
+ font-size: 26rpx;
|
|
738
|
+ color: $uni-primary;
|
|
739
|
+ padding: 21rpx 24rpx;
|
|
740
|
+ }
|
|
741
|
+ .bottom_list{
|
|
742
|
+ .bottom_list_item{
|
|
743
|
+ border-top: 1rpx solid #DEDEDE;
|
|
744
|
+ padding: 30rpx 30rpx 30rpx 30rpx;
|
|
745
|
+ display: flex;
|
|
746
|
+ justify-content: space-between;
|
|
747
|
+ align-items: center;
|
|
748
|
+ font-size: 24rpx;
|
|
749
|
+ position: relative;
|
|
750
|
+ .value{
|
|
751
|
+ max-width: 380rpx;
|
|
752
|
+ color: #333;
|
|
753
|
+ display: flex;
|
|
754
|
+ align-items: center;
|
|
755
|
+ text-align: justify;
|
|
756
|
+ margin-right: 30rpx;
|
|
757
|
+ }
|
|
758
|
+ .no-mar{
|
|
759
|
+ margin-right:0 !important;
|
|
760
|
+ }
|
|
761
|
+ .icon{
|
|
762
|
+ position: absolute;
|
|
763
|
+ right: 20rpx;
|
|
764
|
+ }
|
|
765
|
+ }
|
|
766
|
+ }
|
|
767
|
+ }
|
|
768
|
+ }
|
|
769
|
+ .fixed-btn{
|
|
770
|
+ position: fixed;
|
|
771
|
+ bottom: 100rpx;
|
|
772
|
+ left: 0;
|
|
773
|
+ }
|
|
774
|
+ }
|
|
775
|
+</style>
|