소스 검색

报修添加首页

maotao 5 달 전
부모
커밋
851fb7c76a

+ 1 - 1
interceptor/routeInterceptor.js

@@ -25,7 +25,7 @@ let repaireRouterList = [
25 25
 							})
26 26
 						}else if(loginType==2){
27 27
 							uni.reLaunch({
28
-								url: "/pages/repair/home"
28
+								url: "/pages/repair/listHome"
29 29
 							})
30 30
 						}
31 31
 					return false

+ 16 - 0
pages.json

@@ -281,6 +281,15 @@
281 281
 	     },
282 282
 	     "enablePullDownRefresh": true
283 283
 	   }
284
+	 },
285
+	 {
286
+	   "path": "pages/repair/listHome",
287
+	   "style": {
288
+	     "h5": {
289
+	       "titleNView": false
290
+	     },
291
+	     "enablePullDownRefresh": true
292
+	   }
284 293
 	 }
285 294
   ],
286 295
   "globalStyle": {
@@ -316,6 +325,13 @@
316 325
 			"visible": false
317 326
 			},
318 327
 			{
328
+			"pagePath": "pages/repair/listHome",
329
+			"iconPath": "static/img/icon_index.png",
330
+			"selectedIconPath": "static/img/icon_index_active.png",
331
+			"text": "首页",
332
+			"visible": false
333
+			}, 
334
+			{
319 335
 			"pagePath": "pages/repair/home",
320 336
 			"iconPath": "static/img/icon_inspectionExecute.png",
321 337
 			"selectedIconPath": "static/img/icon_inspectionExecute_active.png",

+ 1 - 1
pages/incidentList/incidentList.vue

@@ -395,7 +395,7 @@
395 395
   }
396 396
 
397 397
   onLoad((option) => {
398
-    for(let i = 0; i<6; i++){
398
+    for(let i = 0; i<7; i++){
399 399
     	setTabbar(i)
400 400
     }
401 401
     onLoadFn();

+ 1 - 1
pages/inspection/inspectionExecute/inspectionExecute.vue

@@ -273,7 +273,7 @@
273 273
   }
274 274
 
275 275
   onLoad((option) => {
276
-    for(let i = 0; i<6; i++){
276
+    for(let i = 0; i<7; i++){
277 277
     	setTabbar(i)
278 278
     }
279 279
     onLoadFn();

+ 1 - 1
pages/my/my.vue

@@ -162,7 +162,7 @@
162 162
   }
163 163
   
164 164
   onLoad((option) => {
165
-    for(let i = 0; i<6; i++){
165
+    for(let i = 0; i<7; i++){
166 166
     	setTabbar(i)
167 167
     }
168 168
     onLoadFn();

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 742 - 76
pages/myRepair/myRepair.vue


+ 1 - 1
pages/newRepository/newRepository.vue

@@ -213,7 +213,7 @@
213 213
 	})
214 214
 	
215 215
   onLoad((option) => {
216
-		for(let i = 0; i<6; i++){
216
+		for(let i = 0; i<7; i++){
217 217
 			setTabbar(i)
218 218
 		}
219 219
     getDic()

+ 4 - 4
pages/repair/config.vue

@@ -366,7 +366,7 @@
366 366
 		if(dataInfo.num==0){
367 367
 			getUserInfo()
368 368
 		}
369
-		for(let i = 0; i<5; i++){
369
+		for(let i = 0; i<7; i++){
370 370
 			setTabbar(i)
371 371
 		}
372 372
 	})
@@ -375,8 +375,8 @@
375 375
 		userTypes.value = JSON.parse(uni.getStorageSync('groupData')) 
376 376
 		onLoadFn();
377 377
 		dataInfo.num = 1
378
-		if(option && option.type){
379
-			operationType.value = option.type
378
+		if(option && option.configType){
379
+			operationType.value = option.configType
380 380
 		}
381 381
 		if(option.data){
382 382
 			let data = JSON.parse(option.data)
@@ -396,7 +396,7 @@
396 396
 		}else{
397 397
 			getUserInfo()
398 398
 		}
399
-		for(let i = 0; i<5; i++){
399
+		for(let i = 0; i<7; i++){
400 400
 			setTabbar(i)
401 401
 		}
402 402
   })

+ 20 - 6
pages/repair/deptSelect.vue

@@ -55,6 +55,8 @@
55 55
   
56 56
 	const entranceType = ref(null)
57 57
 	
58
+	const loginType = ref(uni.getStorageSync('loginType')); //1:处理 2:报修
59
+	
58 60
 	// 上一步或者返回列表
59 61
 	function goBackOrToList(){
60 62
 		if(entranceType.value=='home'){
@@ -66,9 +68,15 @@
66 68
 				}
67 69
 				uni.setStorageSync('configData',JSON.stringify(parseData))
68 70
 			}
69
-			uni.reLaunch({
70
-			  url: '/pages/repair/config?type=selectDept'
71
-			})
71
+			if(loginType.value==1){
72
+				uni.navigateTo({
73
+				  url: '/pages/myRepair/myRepair?configType=selectDept&type=2'
74
+				})
75
+			}else{
76
+				uni.reLaunch({
77
+				  url: '/pages/repair/config?configType=selectDept'
78
+				})
79
+			}
72 80
 		}else{
73 81
 			goBack();
74 82
 		}
@@ -158,9 +166,15 @@
158 166
 				parseData.dataType = true
159 167
 				uni.setStorageSync('configData',JSON.stringify(parseData))
160 168
 			}
161
-			uni.reLaunch({
162
-			  url: '/pages/repair/config?data='+JSON.stringify(data)
163
-			})
169
+			if(loginType.value==1){
170
+				uni.navigateTo({
171
+				  url: `/pages/myRepair/myRepair?data=${JSON.stringify(data)}&type=2`
172
+				})
173
+			}else{
174
+				uni.reLaunch({
175
+				  url: '/pages/repair/config?data='+JSON.stringify(data)
176
+				})
177
+			}
164 178
 		}else{
165 179
 			uni.navigateTo({
166 180
 			  url: `/pages/myRepair/myRepair?data=${JSON.stringify(data)}&type=2`

+ 1 - 1
pages/repair/home.vue

@@ -184,7 +184,7 @@
184 184
 	
185 185
 	onLoad((option) => {
186 186
 		// 巡检tabbar
187
-		for(let i = 0; i<6; i++){
187
+		for(let i = 0; i<7; i++){
188 188
 			setTabbar(i)
189 189
 		}
190 190
 		getCount()

+ 684 - 0
pages/repair/listHome.vue

@@ -0,0 +1,684 @@
1
+<template>
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" @click.stop="toIncidentDetail(data)">
13
+        <view class="body_item_head ellipsis-multiline">
14
+          {{data.description}}
15
+        </view>
16
+
17
+        <view class="body_item_content">
18
+					<view class="body_item_content_p" v-if="data.place || data.houseNumber">
19
+					  <text class="name ellipsis">详细地址:{{data.place ? data.place.building.buildingName : ''}}{{data.place ? data.place.floorName : ''}}<text v-if="data.place && data.place.floorName">层</text> {{data.houseNumber}}</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.rsPrice">
23
+            <text class="name ellipsis">维修总价:{{data.rsPrice}}</text>
24
+          </view>
25
+          <view class="body_item_content_p">
26
+						 <view class="name ellipsis" @click.stop="makePhoneCall(data.contactsInformation)">维修人员电话:{{data.contactsInformation || '暂无'}}<uni-icons v-if="data.contactsInformation" type="phone-filled" class="phone-filled" :size="18" :color="primaryColor"></uni-icons></view>
27
+          </view>
28
+					<view class="body_item_content_p" v-if="data.currentLog && data.currentLog.logType.value=='overtime'">
29
+					  <text class="name ellipsis">维修说明:{{data.overtimeRemark}}</text>
30
+					</view>
31
+        </view>
32
+
33
+        <view class="body_item_foot">
34
+          <view class="foot_info">
35
+            <view class="name">维修人员:{{data.assigneeName || '暂无'}}</view>
36
+            <text class="date">{{formatDate(data.startDate, 'yyyy-MM-dd HH:mm')}}</text>
37
+          </view>
38
+          <view class="btns">
39
+            <button v-if="!data.wxdegree && (data.state.name=='待评价'|| data.state.name=='已关闭')" @click.stop="handler('changeUser', data)" type="default" class="primaryButton btn">评价</button>
40
+          </view>
41
+        </view>
42
+				<div class="sign-style" v-if="deptRepair && publicRepair">
43
+					<view class="img-box" v-if="data.repairIncidentType && data.repairIncidentType.name=='科室报修'">
44
+						<view class="img-url1"></view>
45
+						<view class="img-name">科</view>
46
+					</view>
47
+					<view class="img-box" v-if="data.repairIncidentType && data.repairIncidentType.name=='公共报修'">
48
+						<view class="img-url2"></view>
49
+						<view class="img-name">公</view>
50
+					</view>
51
+				</div>
52
+      </view>
53
+    </view>
54
+    <view class="zanwu" v-else>
55
+      <text class="newicon newicon-zanwu"></text>
56
+    </view>
57
+    <repairsFilter v-if="dataInfo.isFilter" @cancelEmit="cancelFilter" @confirmEmit="conformFilter" :evt="dataInfo.evtFilter"></repairsFilter>
58
+    <IncidentAttachment v-if="dataInfo.isAttachment" @knowEmit="knowAttachment" :incidentData="dataInfo.incidentData"></IncidentAttachment>
59
+		<uni-popup ref="popup" background-color="#fff" type="center" :before-close="true">
60
+			<view class="popup-content">
61
+				<view class="form_item column">
62
+					<view class="title"><text class="required newicon newicon-bitian"></text>星级:</view>
63
+					<uni-rate class="value" v-model="rate" />
64
+				</view>
65
+				<view class="form_item column">
66
+					<view class="title"><text class="required newicon newicon-bitian"></text>内容:</view>
67
+					<uni-easyinput class="value" type="textarea" v-model="wxdegreeremark" placeholder="请输入评价内容"/>
68
+				</view>
69
+			</view>
70
+			<view class="foot_common_btns">
71
+			  <button @click="closePop" type="default" class="cancelButton btn">取消</button>
72
+			  <button @click="submit" type="default" class="primaryButton btn">提交</button>
73
+			</view>
74
+		</uni-popup>
75
+	</view>
76
+</template>
77
+
78
+<script setup>
79
+  import repairsFilter from '@/components/repairsFilter.vue';
80
+  import IncidentAttachment from '@/components/IncidentAttachment.vue';
81
+  import { startOfDay, endOfDay, format, add } from 'date-fns'
82
+  import { ref, reactive, computed } from 'vue'
83
+  import { onLoad, onShow, onHide, onPullDownRefresh, onReachBottom, onTabItemTap } from '@dcloudio/uni-app'
84
+  import { api_getDictionary, api_incident, api_incident_count, api_systemConfiguration, api_incidentTask, api_taskresolve } from "@/http/api.js"
85
+  import { filterFormatDate } from '@/filters/filterFormatDate.js'
86
+  import { computedPriorityStyle } from '@/filters/computedPriorityStyle.js'
87
+  import { computedStateStyle } from '@/filters/computedStateStyle.js'
88
+  import { computedCurrentLogOverTime } from '@/filters/computedCurrentLogOverTime.js'
89
+  import { defaultColor } from '@/static/js/theme.js'
90
+  import { useSetTitle } from '@/share/useSetTitle.js'
91
+  import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
92
+  import { useLoginUserStore } from '@/stores/loginUser'
93
+  import { useIncidentNumStore } from '@/stores/incidentNum'
94
+  import { useIncidentListSearchStore } from '@/stores/incidentListSearch'
95
+	import { repositoryListSearchStore } from '@/stores/repositorySearch'
96
+	import { useSetTabbar } from '@/share/useSetTabbar.js'
97
+	
98
+  useSetTitle();
99
+	const repositorySearchStore = repositoryListSearchStore();
100
+  const loginUserStore = useLoginUserStore();
101
+  const incidentNumStore = useIncidentNumStore();
102
+  const incidentListSearchStore = useIncidentListSearchStore();
103
+  const { formatDate }  = filterFormatDate();
104
+  const { priorityStyle }  = computedPriorityStyle();
105
+  const { stateStyle }  = computedStateStyle();
106
+  const { currentLogOverTime }  = computedCurrentLogOverTime();
107
+  const { makePhoneCall }  = useMakePhoneCall();
108
+	
109
+	const { setTabbar }  = useSetTabbar();
110
+	
111
+  // 主题颜色
112
+  const primaryColor = ref(defaultColor)
113
+	const popup = ref(null);//弹框
114
+  const assignFlag = ref(false);//指派权限
115
+  const qiangdan = ref(false);//接单权限
116
+	const deptRepair = ref({});//科内报修
117
+	const publicRepair = ref({});//公共报修
118
+	
119
+	const degreeDictionary = ref(null); //星级字典
120
+	const rowData = ref(null); //选择的数据
121
+	const isSubmit = ref(false);
122
+	const rate = ref(3);//星级
123
+	const wxdegreeremark = ref(null);//评价内容
124
+	
125
+  // 判断是否显示接单按钮
126
+  const computedReceive = computed(() => (data) => {
127
+    let inUser = data.currentLog && data.currentLog.workerId == loginUserStore.loginUser.user.id;
128
+    let inGroup = false;
129
+    loginUserStore.loginUser.user.group.forEach(item => {
130
+        if(data.currentLog){
131
+            if (item.id == data.currentLog.groupId) {
132
+                inGroup = true;
133
+            }
134
+        }
135
+    })
136
+    return data.state.value === 'pending' && (inUser || inGroup) && qiangdan.value;
137
+  })
138
+
139
+  // 转换协同人
140
+  const computedSynergetic = computed(() => (synergetic) => {
141
+    return (synergetic && synergetic.length) ? synergetic.map(v => v.name).join(',') : ''
142
+  })
143
+	
144
+	const repairIncident = ref(null);
145
+	
146
+  // 数据
147
+  const dataInfo = reactive({
148
+    tabs: [{id: 0, name: '我的报修', value: 'all', num: ''},],
149
+    tabActiveId: 0,//当前选择的tab
150
+    list: [],//工单列表
151
+    idx: 0,//页码
152
+    hasMore: true,//是否有更多数据
153
+    isFilter: false,//筛选框开关
154
+    isAttachment: false,//图片和录音开关
155
+    incidentId: undefined,
156
+		stateValue:0,
157
+    evtFilter: {
158
+      hospital: {},
159
+      selected: 'todoingAll',
160
+      area: {id: 0, area: '全部'},
161
+      category: {id: 0, category: '全部'},
162
+      acceptDate: [],
163
+    },//筛选框数据
164
+  })
165
+
166
+  // 工单详情
167
+  function toIncidentDetail(data){
168
+    uni.navigateTo({
169
+      url: `/pages/repair/repairsDetail?incidentId=${data.id}`
170
+    })
171
+  }
172
+
173
+  // 获取tab选项
174
+  function getTabs(){
175
+    uni.showLoading({
176
+      title: "加载中",
177
+      mask: true,
178
+    });
179
+		let postData = {
180
+		  "key": 'repair_incident_type',
181
+		  "type": "list",
182
+		};
183
+		if(deptRepair.value.valueconfig==1){
184
+			api_getDictionary(postData).then(res => {
185
+			  res = res || [];
186
+			  repairIncident.value = res.find(i=>i.value=='dept')
187
+				getList(0);
188
+			})
189
+			 dataInfo.tabs = [
190
+				 {id: 0, name: '我的报修', value: 'all', num: ''},
191
+				 {id: 1, name: '科内报修', value: '2', num: ''}
192
+			 ]
193
+		}else{
194
+			getList(0);
195
+			dataInfo.tabs = [
196
+				{id: 0, name: '我的报修', value: 'all', num: ''},
197
+			]
198
+		}
199
+  }
200
+
201
+  // 点击tab
202
+  function clickTab(tabId){
203
+    dataInfo.tabActiveId = tabId;
204
+    getList(0);
205
+  }
206
+
207
+  // 点击筛选
208
+  function filterClick(){
209
+    dataInfo.isFilter = true;
210
+  }
211
+
212
+  // 确认筛选
213
+  function conformFilter(evtFilter){
214
+    dataInfo.stateValue = evtFilter.category;
215
+    dataInfo.isFilter = false;
216
+    getList(0);
217
+  }
218
+
219
+  // 关闭筛选
220
+  function cancelFilter(){
221
+    dataInfo.isFilter = false;
222
+  }
223
+
224
+  // 点击图片和录音
225
+  function attachmentClick(incidentData){
226
+    dataInfo.incidentData = incidentData;
227
+    dataInfo.isAttachment = true;
228
+  }
229
+
230
+  // 知道了图片和录音
231
+  function knowAttachment(){
232
+    dataInfo.isAttachment = false;
233
+  }
234
+
235
+  // 评价
236
+  function handler(type, data){
237
+		rowData.value = data
238
+		popup.value.open()
239
+		let postData = {
240
+		  key: "incident_degree",
241
+		  type: "list"
242
+		};
243
+		api_getDictionary(postData).then(res => {
244
+		  res = res || [];
245
+			degreeDictionary.value = res
246
+		})
247
+  }
248
+	
249
+	function closePop(){
250
+		rate.value = 3
251
+		wxdegreeremark.value = null
252
+		popup.value.close()
253
+	}
254
+	
255
+	function submit(){
256
+		if(!rate.value){
257
+			uni.showToast({
258
+				icon: 'none',
259
+			  title: '请选择星级'
260
+			});
261
+			return;
262
+		}
263
+		if(!wxdegreeremark.value){
264
+			uni.showToast({
265
+				icon: 'none',
266
+			  title: '请输入评价内容'
267
+			});
268
+			return;
269
+		}
270
+		let rateData = null
271
+		if(rate.value==0){
272
+		   rateData=degreeDictionary.value[0].id
273
+		}else if(rate.value==1){
274
+		   rateData=degreeDictionary.value[4].id
275
+		}else if(rate.value==2){
276
+		   rateData=degreeDictionary.value[3].id
277
+		}else if(rate.value==3){
278
+		   rateData=degreeDictionary.value[2].id
279
+		}else if(rate.value==4){
280
+		   rateData=degreeDictionary.value[1].id
281
+		}else if(rate.value==5){
282
+		   rateData=degreeDictionary.value[0].id
283
+		}
284
+		let postData = {
285
+			...rowData.value,
286
+			wxdegree: rateData==0?degreeDictionary.value[0]:{id: rateData},
287
+			wxdegreeremark: wxdegreeremark.value
288
+		}
289
+		api_taskresolve({incident:postData}).then(res => {
290
+		  uni.hideLoading();
291
+		  if(res.state == 200){
292
+		    getList(0);
293
+		    uni.showToast({
294
+		    	icon: 'none',
295
+		      title: '评价成功',
296
+		    });
297
+		  }else{
298
+		    uni.showToast({
299
+		      icon: 'none',
300
+		      title: res.msg || '请求数据失败!'
301
+		    });
302
+		  }
303
+		})
304
+		closePop()
305
+	}
306
+	
307
+
308
+  // 获取列表信息
309
+  function getList(idx){
310
+    uni.showLoading({
311
+      title: "加载中",
312
+      mask: true,
313
+    });
314
+    dataInfo.idx = idx === undefined ? dataInfo.idx : idx;
315
+    if(dataInfo.idx === 0){
316
+      dataInfo.list = [];
317
+    }
318
+    let postData = {
319
+			"idx": dataInfo.idx,
320
+			"sum": 20,
321
+			incident: {
322
+				requester: dataInfo.tabActiveId == 0 ? { id: loginUserStore.loginUser.user.id } : undefined,
323
+				department: dataInfo.tabActiveId == 1 ? { id: loginUserStore.loginUser.user.dept.id } : undefined,
324
+				statesValues: (dataInfo.stateValue === 'close0' || dataInfo.stateValue === 'close1') ? 'close' : (dataInfo.stateValue || undefined),
325
+				hasWxdegree: dataInfo.stateValue === 'close0' ? 0 : (dataInfo.stateValue === 'close1' ? 1 : undefined),
326
+				repairIncidentType:{
327
+					id:''
328
+				}
329
+			}
330
+    }
331
+		if(dataInfo.tabActiveId == 1){
332
+			postData.incident.repairIncidentType.id = repairIncident.value.id
333
+		}
334
+		if(JSON.stringify(postData.incident.statesValues) === '{}'){
335
+			delete postData.incident.statesValues
336
+		}
337
+    api_incident(postData).then(res => {
338
+      uni.hideLoading();
339
+      uni.stopPullDownRefresh();
340
+      if(res.status == 200){
341
+        let list = res.list || [];
342
+        if(list.length){
343
+          dataInfo.hasMore = true;
344
+          dataInfo.list = dataInfo.idx === 0 ? list : dataInfo.list.concat(list);
345
+        }else{
346
+          dataInfo.hasMore = false;
347
+        }
348
+      }else{
349
+        uni.showToast({
350
+          icon: 'none',
351
+          title: res.msg || '请求数据失败!'
352
+        });
353
+      }
354
+    })
355
+    // getCount(postData.incident);
356
+  }
357
+	
358
+  // 获取列表数量
359
+  function getCount(incident = {}){
360
+    let postData = {
361
+      wxCount: 'true',
362
+      incidentList: [],
363
+    }
364
+    dataInfo.tabs.forEach(v => {
365
+        postData.incidentList.push({...incident, ...{statusId: v.id || undefined}});
366
+    })
367
+
368
+    api_incident_count(postData).then(res => {
369
+      if(res.state == 200){
370
+        let myData = res.data || [];
371
+        dataInfo.tabs.forEach((v, i) => {
372
+            v.num = myData[i];
373
+        })
374
+      }else{
375
+        uni.showToast({
376
+          icon: 'none',
377
+          title: res.msg || '请求数据失败!'
378
+        });
379
+      }
380
+    })
381
+  }
382
+
383
+  // 初始化
384
+  function onLoadFn(){
385
+    getTabs();
386
+  }
387
+	
388
+	// 获取配置项
389
+	function getConfig(){
390
+		api_systemConfiguration({
391
+			idx: 0,
392
+			sum: 9999,
393
+		}).then(res=>{
394
+			let data = res.list
395
+			deptRepair.value = data.find(i=>i.keyconfig=='deptRepair')
396
+			publicRepair.value = data.find(i=>i.keyconfig=='publicRepair')
397
+			onLoadFn();
398
+		})
399
+	}
400
+	
401
+  onLoad((option) => {
402
+		dataInfo.stateValue = 0
403
+		repositorySearchStore.clearRepositoryListSearchData()
404
+		getConfig();
405
+		for(let i = 0; i<7; i++){
406
+			setTabbar(i)
407
+		}
408
+  })
409
+	
410
+	onShow((option) =>{
411
+		dataInfo.stateValue = 0
412
+		repositorySearchStore.clearRepositoryListSearchData()
413
+		onLoadFn();
414
+	})
415
+	
416
+	onHide(_=>{
417
+		repositorySearchStore.clearRepositoryListSearchData()
418
+	})
419
+	
420
+  onTabItemTap(e => {
421
+    // onLoadFn();
422
+  })
423
+
424
+  onPullDownRefresh(() => {
425
+    // getList(0)
426
+  })
427
+
428
+  onReachBottom(() => {
429
+    dataInfo.idx += 1;
430
+    if (dataInfo.hasMore) {
431
+      getList(); // 当触底时加载更多数据
432
+    }
433
+  })
434
+</script>
435
+
436
+<style scoped>
437
+	>>> .uni-popup__wrapper{
438
+		width: 80%;
439
+		padding: 40rpx;
440
+	}
441
+</style>
442
+<style lang="scss" scoped>
443
+page{
444
+  height: calc(100vh - var(--window-bottom));
445
+}
446
+.incidentList{
447
+  display: flex;
448
+  flex-direction: column;
449
+  justify-content: space-between;
450
+  .head{
451
+    height: 88rpx;
452
+    display: flex;
453
+    position: fixed;
454
+    z-index: 99;
455
+    width: 100%;
456
+    background-color: #fff;
457
+    font-size: 30rpx;
458
+    .tab{
459
+      flex: 1;
460
+      display: flex;
461
+      justify-content: center;
462
+      align-items: center;
463
+      border-bottom: 4rpx solid transparent;
464
+      &.active{
465
+        color: $uni-primary;
466
+        border-color: $uni-primary;
467
+      }
468
+    }
469
+    .filter{
470
+      width: 84rpx;
471
+      display: flex;
472
+      justify-content: center;
473
+      align-items: center;
474
+      .newicon-shaixuan{
475
+        font-size: 36rpx;
476
+        color: #2C2C2C;
477
+      }
478
+    }
479
+  }
480
+  .body{
481
+    margin-bottom: var(--window-bottom);
482
+    margin-top: 88rpx;
483
+    border-top: 6rpx solid #EBEBEB;
484
+    .body_item{
485
+      border-bottom: 8rpx solid #EBEBEB;
486
+			position: relative;
487
+			.sign-style{
488
+				position: absolute;
489
+				right: 0;
490
+				top: -25rpx;
491
+				.img-box{
492
+					position: relative;
493
+					.img-url1{
494
+						width: 70rpx;
495
+						height: 70rpx;
496
+						background-image: url('../../static/img/jiaobiao1.png');
497
+					}
498
+					.img-url2{
499
+						width: 70rpx;
500
+						height: 70rpx;
501
+						background-image: url('../../static/img/jiaobiao2.png');
502
+					}
503
+					.img-name{
504
+						position: absolute;
505
+						right: 8rpx;
506
+						top: 0;
507
+						color: #fff;
508
+						font-size: 24rpx;
509
+					}
510
+				}
511
+			}
512
+      .body_item_head{
513
+        word-break: break-all;
514
+        text-align: justify;
515
+        text-align: left;
516
+        margin: 24rpx;
517
+        font-size: 30rpx;
518
+      }
519
+      .body_item_content{
520
+        border-top: 1rpx solid #D8D8D8;
521
+        padding: 24rpx 24rpx 24rpx 48rpx;
522
+        .body_item_content_p{
523
+          color: #6A6A6A;
524
+          font-size: 26rpx;
525
+          display: flex;
526
+          justify-content: space-between;
527
+          align-items: center;
528
+          margin-bottom: 24rpx;
529
+          &:last-of-type{
530
+            margin-bottom: 0;
531
+          }
532
+          .name{
533
+            flex: 1;
534
+          }
535
+          .status{
536
+            padding: 4rpx 10rpx;
537
+            border-radius: 20rpx;
538
+            background-color: #DBE8FE;
539
+            font-size: 22rpx;
540
+            color: #006CF9;
541
+          }
542
+          .icon_all{
543
+            .mic-filled,
544
+            .image-filled
545
+            {
546
+              margin-left: 16rpx;
547
+            }
548
+          }
549
+        }
550
+      }
551
+      .body_item_foot{
552
+        border-top: 1rpx solid #D8D8D8;
553
+        font-size: 26rpx;
554
+        padding: 24rpx;
555
+        .foot_info{
556
+          display: flex;
557
+          justify-content: space-between;
558
+          align-items: center;
559
+          .phone-filled{
560
+            margin-left: 5rpx;
561
+          }
562
+        }
563
+      }
564
+    }
565
+  }
566
+  .zanwu{
567
+    box-sizing: border-box;
568
+    margin-bottom: var(--window-bottom);
569
+    margin-top: 88rpx;
570
+    border-top: 6rpx solid #EBEBEB;
571
+    height: calc(100vh - var(--window-bottom) - 88rpx);
572
+    display: flex;
573
+    justify-content: center;
574
+    background-color: #F7F7F7;
575
+    .newicon-zanwu{
576
+      font-size: 256rpx;
577
+      color: #D6D6D6;
578
+      margin-top: 140rpx;
579
+    }
580
+  }
581
+	.popup-content{
582
+		.form_item{
583
+		  display: flex;
584
+		  align-items: center;
585
+		  padding-top: 24rpx;
586
+		  min-height: 86rpx;
587
+			position: relative;
588
+			.chunk{
589
+				width: 100%;
590
+				height: 70rpx;
591
+				line-height: 70rpx;
592
+				text-align: center;
593
+				background: #F7F8FA;
594
+				box-shadow: 0px 3px 6px 1px rgba(0,0,0,0.16);
595
+				border-radius: 10rpx;
596
+			}
597
+		  &.column{
598
+		    height: auto;
599
+		    flex-direction: column;
600
+		    align-items: flex-start;
601
+				.import-rep{
602
+					padding: 5rpx 10rpx;
603
+					border-radius: 50rpx;
604
+					background: #d1fcd5;
605
+					color: #49b856;
606
+					font-size: 24rpx;
607
+				}
608
+		    .title{
609
+		      margin-right: 0;
610
+		    }
611
+				.title-width{
612
+					width: 100%;
613
+				}
614
+				.title-fl-sb{
615
+					display: flex;
616
+					justify-content: space-between;
617
+					width: 100%;
618
+				}
619
+		    .value{
620
+		      margin-top: 10rpx;
621
+		      // padding-left: 20rpx;
622
+		      box-sizing: border-box;
623
+		    }
624
+		    .tips{
625
+		      padding: 24rpx;
626
+		      text-align: center;
627
+		      font-size: 22rpx;
628
+		      color: #909399;
629
+		      width: 100%;
630
+		      box-sizing: border-box;
631
+		    }
632
+		  }
633
+		  .title{
634
+		    font-size: 26rpx;
635
+		    display: flex;
636
+		    align-items: center;
637
+		    margin-right: 12rpx;
638
+		    flex-shrink: 0;
639
+		    &.select{
640
+		      width: calc(5em + 20rpx);
641
+		    }
642
+		  }
643
+		  .value{
644
+		    width: 100%;
645
+		    &.category{
646
+		      width: 100%;
647
+		      display: flex;
648
+		      justify-content: space-between;
649
+		      align-items: center;
650
+		      .categoryName{
651
+		        font-size: 26rpx;
652
+		        color: #555;
653
+		        flex: 1;
654
+		      }
655
+		      .newicon-weibiaoti2010104{
656
+		        color: $uni-primary;
657
+		        margin-left: 24rpx;
658
+		      }
659
+		    }
660
+		    .imgTips{
661
+		      color: #909399;
662
+		      font-size: 22rpx;
663
+					margin-top: 10rpx;
664
+		    }
665
+		  }
666
+			.item-input{
667
+				border: 1px solid #DBDBDB;
668
+				height: 70rpx;
669
+				line-height: 70rpx;
670
+				padding: 0 10rpx;
671
+				border-radius: 4rpx;
672
+				width: 100%;
673
+				font-size: 14px;
674
+			}
675
+			.icon{
676
+				position: absolute;
677
+				right: 20rpx;
678
+				color: #49b856;
679
+			}
680
+		}
681
+	}
682
+	
683
+}
684
+</style>

+ 10 - 3
pages/repair/rapidRep.vue

@@ -156,10 +156,17 @@
156 156
 				
157 157
   // 上一步或者返回列表
158 158
   function goBackOrToList(){
159
+		let repairsType = uni.getStorageSync('repairsType')
159 160
 		uni.setStorageSync('repairData','')
160
-		uni.switchTab({
161
-		  url: `/pages/repair/home`
162
-		})
161
+		if(repairsType=='subpage'){
162
+			uni.navigateTo({
163
+			  url: `/pages/myRepair/myRepair?type=1`
164
+			})
165
+		}else{
166
+			uni.switchTab({
167
+			  url: `/pages/repair/home`
168
+			})
169
+		}
163 170
   }
164 171
 	
165 172
 	function itemCandidate(item){

+ 2 - 2
pages/repair/rapidRepNext.vue

@@ -564,7 +564,7 @@
564 564
 												})
565 565
 											}else{
566 566
 												uni.navigateTo({
567
-												  url: `/pages/myRepair/myRepair`
567
+												  url: `/pages/myRepair/myRepair?type=1`
568 568
 												})
569 569
 											}
570 570
 										}, 1500)
@@ -590,7 +590,7 @@
590 590
 										})
591 591
 									}else{
592 592
 										uni.navigateTo({
593
-										  url: `/pages/myRepair/myRepair`
593
+										  url: `/pages/myRepair/myRepair?type=1`
594 594
 										})
595 595
 									}
596 596
 								}, 1500)

+ 1 - 1
pages/repair/repairsList.vue

@@ -397,7 +397,7 @@
397 397
 		
398 398
 	})
399 399
 	
400
-	onHide(_=>{
400
+	onHide(()=>{
401 401
 		repositorySearchStore.clearRepositoryListSearchData()
402 402
 	})
403 403
 	

+ 1 - 1
pages/repairEntrance/repairEntrance.vue

@@ -20,7 +20,7 @@
20 20
    */
21 21
   function goToRepair() {
22 22
 		uni.reLaunch({
23
-		  url: '/pages/repair/home'
23
+		  url: '/pages/repair/listHome'
24 24
 		})
25 25
   }
26 26
 </script>

+ 21 - 7
pages/searchDept/searchDept.vue

@@ -55,7 +55,9 @@
55 55
   
56 56
   // 搜索
57 57
   const search = debounce(getList.bind(null, 0), 500);
58
-  
58
+	
59
+  const loginType = ref(uni.getStorageSync('loginType')); //1:处理 2:报修
60
+	
59 61
   // 获取列表信息
60 62
   function getList(idx){
61 63
     if(dataInfo.keyWord.trim() === ''){
@@ -121,9 +123,15 @@
121 123
 	function goBackPage(){
122 124
 		// goBack()
123 125
 		if(entranceType.value=='config'){
124
-			uni.reLaunch({
125
-			  url: `/pages/repair/config?type=selectDept`
126
-			})
126
+			if(loginType.value==1){
127
+				uni.navigateTo({
128
+				  url: '/pages/myRepair/myRepair?configType=selectDept&type=2'
129
+				})
130
+			}else{
131
+				uni.reLaunch({
132
+				  url: '/pages/repair/config?configType=selectDept'
133
+				})
134
+			}
127 135
 		}else{
128 136
 			goBack()
129 137
 		}
@@ -172,9 +180,15 @@
172 180
 					...query
173 181
 				}
174 182
 				uni.setStorageSync('configData',JSON.stringify(configData))
175
-				uni.reLaunch({
176
-				  url: `/pages/repair/config?type=selectDept`
177
-				})
183
+				if(loginType.value==1){
184
+					uni.navigateTo({
185
+					  url: '/pages/myRepair/myRepair?configType=selectDept&type=2'
186
+					})
187
+				}else{
188
+					uni.reLaunch({
189
+					  url: '/pages/repair/config?configType=selectDept'
190
+					})
191
+				}
178 192
 			}else{
179 193
 				query.dept = data.id//报修科室
180 194
 				query.departmentName = data.dept//报修科室

+ 2 - 2
share/useLoginSuccess.js

@@ -17,7 +17,7 @@ export function useLoginSuccess() {
17 17
 				})
18 18
 			}else if(loginType==2){
19 19
 				uni.reLaunch({
20
-				  url: "/pages/repair/home"
20
+				  url: "/pages/repair/listHome"
21 21
 				})
22 22
 			}
23 23
     } else {
@@ -27,7 +27,7 @@ export function useLoginSuccess() {
27 27
 				})
28 28
 			}else if(loginType==2){
29 29
 				uni.reLaunch({
30
-				  url: "/pages/repair/home"
30
+				  url: "/pages/repair/listHome"
31 31
 				})
32 32
 			}
33 33
     }

+ 14 - 2
share/useSetTabbar.js

@@ -43,6 +43,18 @@ export function useSetTabbar() {
43 43
 				}
44 44
 				break;
45 45
 			case 3:
46
+			  // 首页
47
+			  if(loginUserStore.loginUser.user.engineer == 0){
48
+			    flag = true;
49
+			  }else{
50
+			  	if(loginType==1){
51
+			  		flag = false;
52
+			  	}else{
53
+			  		flag = true;
54
+			  	}
55
+			  }
56
+			  break;	
57
+			case 4:
46 58
 			  // 我的报修
47 59
 			  if(loginUserStore.loginUser.user.engineer == 0){
48 60
 					flag = true;
@@ -54,7 +66,7 @@ export function useSetTabbar() {
54 66
 					}
55 67
 				}
56 68
 			  break;
57
-			case 4:
69
+			case 5:
58 70
 			  // 我的
59 71
 			  if(loginUserStore.loginUser.user.engineer == 1){
60 72
 					if(loginType==1){
@@ -66,7 +78,7 @@ export function useSetTabbar() {
66 78
 					flag = false;
67 79
 				}
68 80
 			  break;
69
-			case 5:
81
+			case 6:
70 82
 				// 设置
71 83
 				if(loginUserStore.loginUser.user.engineer == 0){
72 84
 				  flag = true;