Ver código fonte

运维迁移

maotao 7 meses atrás
pai
commit
ac2ef865c8

+ 1 - 1
http/api.js

@@ -281,7 +281,7 @@ export function api_getCount(data){
281 281
  * 报修端-保存个人信息
282 282
  */
283 283
 export function api_userSave(data){
284
-  return post("/user/data/addData/user", data);
284
+  return post("/user/data/updData/user", data);
285 285
 }
286 286
 
287 287
 /**

+ 1 - 0
interceptor/routeInterceptor.js

@@ -5,6 +5,7 @@ let repaireRouterList = [
5 5
     "/pages/homePage/homePage", //登录页
6 6
     "/pages/initBind/initBind", //绑定工号
7 7
     "/pages/repairEntrance/repairEntrance", //报修入口页
8
+		"/pages/repository/repository", //报修入口页
8 9
   ]
9 10
   let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
10 11
   //用遍历的方式分别为uni.navigateTo,uni.redirectTo,uni.reLaunch,uni.switchTab这4个路由方法添加拦截器

+ 3 - 2
manifest.json

@@ -62,8 +62,9 @@
62 62
         "devServer" : {
63 63
             "proxy" : {
64 64
                 "/service" : {
65
-                    // "target" : "http://192.168.3.108", //请求的目标域名
66
-										"target" : "http://192.168.4.105", //宋程玉本地
65
+                    "target" : "http://192.168.3.108", //请求的目标域名
66
+										// "target" : "http://192.168.4.163", //宋程玉本地
67
+										// "target" : "http://192.168.4.105", //程肖本地
67 68
                     "changeOrigin" : true, //是否跨域
68 69
                     "secure" : false
69 70
                 },

+ 11 - 16
pages/repair/config.vue

@@ -100,12 +100,12 @@
100 100
   
101 101
   // 保存
102 102
   function addInfo(){
103
-    isSubmit.value = true
104 103
 		uni.showLoading({
105 104
 		  title: "加载中",
106 105
 		  mask: true,
107 106
 		});
108
-		userData.branch.id = dataForm.branch
107
+    isSubmit.value = true
108
+		userData.currentHospital.id = dataForm.branch
109 109
 		userData.commonDeptName = commonDeptName.value
110 110
 		userData.dept={
111 111
 			id:dataForm.dept
@@ -148,16 +148,11 @@
148 148
 	  });
149 149
 	  let postData = {
150 150
 			department: {
151
-			  branch: '',
151
+			  hospital: loginUserStore.loginUser.user.currentHospital.id,
152 152
 			},
153 153
 			idx:0,
154 154
 			sum:9999
155 155
 		}
156
-		if(loginUserStore.loginUser.user.duty){
157
-		  postData.department.branch = loginUserStore.loginUser.user.duty.id;
158
-		}else if(loginUserStore.loginUser.user.branch){
159
-		  postData.department.branch = loginUserStore.loginUser.user.branch.id;
160
-		}
161 156
 	  api_department(postData).then(res => {
162 157
 	    uni.hideLoading();
163 158
 			getBranch()
@@ -172,15 +167,15 @@
172 167
 	// 获取院区列表
173 168
 	function getBranch(){
174 169
 		let postData = {
175
-			branch:'',
170
+			// hosId:loginUserStore.loginUser.user.currentHospital.id,
176 171
 			idx:0,
177 172
 			sum:9999
178 173
 		}
179
-		if(loginUserStore.loginUser.user.duty){
180
-		  postData.branch = loginUserStore.loginUser.user.duty.id;
181
-		}else if(loginUserStore.loginUser.user.branch){
182
-		  postData.branch = loginUserStore.loginUser.user.branch.id;
183
-		}
174
+		// if(loginUserStore.loginUser.user.duty){
175
+		//   postData.branch = loginUserStore.loginUser.user.currentHospital.id;
176
+		// }else if(loginUserStore.loginUser.user.branch){
177
+		//   postData.branch = loginUserStore.loginUser.user.branch.id;
178
+		// }
184 179
 		api_branch(postData).then(res => {
185 180
 		  uni.hideLoading();
186 181
 		  res = res.list || [];
@@ -197,7 +192,7 @@
197 192
 		let data = commonDeptData.value ? 
198 193
 		commonDeptData.value : loginUserStore.loginUser.user.commonDept
199 194
 		if(!data){
200
-			data = null
195
+			data = 'none'
201 196
 		}
202 197
 		uni.navigateTo({
203 198
 		  url: '/pages/repair/deptSelect?data='+JSON.stringify(data)
@@ -220,7 +215,7 @@
220 215
 		}else{
221 216
 			let user = loginUserStore.loginUser.user
222 217
 			if(user){
223
-				dataForm.branch = user.branch.id
218
+				dataForm.branch = user.currentHospital.id
224 219
 				dataForm.dept = user.dept.id
225 220
 				if(user.commonDeptDTO){
226 221
 					let dept = user.commonDeptDTO.map(i=>{

+ 8 - 7
pages/repair/deptSelect.vue

@@ -78,16 +78,16 @@
78 78
 	  });
79 79
 	  let postData = {
80 80
 			department: {
81
-			  branch: '',
81
+			  hospital: loginUserStore.loginUser.user.currentHospital.id,
82 82
 			},
83 83
 			idx:0,
84 84
 			sum:9999
85 85
 		}
86
-		if(loginUserStore.loginUser.user.duty){
87
-		  postData.department.branch = loginUserStore.loginUser.user.duty.id;
88
-		}else if(loginUserStore.loginUser.user.branch){
89
-		  postData.department.branch = loginUserStore.loginUser.user.branch.id;
90
-		}
86
+		// if(loginUserStore.loginUser.user.duty){
87
+		//   postData.department.branch = loginUserStore.loginUser.user.duty.id;
88
+		// }else if(loginUserStore.loginUser.user.branch){
89
+		//   postData.department.branch = loginUserStore.loginUser.user.branch.id;
90
+		// }
91 91
 	  api_department(postData).then(res => {
92 92
 	    uni.hideLoading();
93 93
 	    res = res.list || [];
@@ -138,7 +138,8 @@
138 138
   }
139 139
   
140 140
   onLoad((option) => {
141
-		if(option.data!=null){
141
+		console.log(888,option)
142
+		if(option.data!='none'){
142 143
 			let data = JSON.parse(option.data).split(',')
143 144
 			optionData.value = data
144 145
 		}

+ 5 - 5
pages/repair/home.vue

@@ -22,18 +22,18 @@
22 22
 		  <view class="content">
23 23
 				<view>
24 24
 					<view class="con-title">处理中</view>
25
-					<view class="con-value">{{repairData.userCloseCount}}</view>
25
+					<view class="con-value">{{repairData.userHandlerCount}}</view>
26 26
 				</view>
27 27
 				<view>
28 28
 					<view class="con-title">待评价</view>
29
-					<view class="con-value">{{repairData.userHandlerCount}}</view>
29
+					<view class="con-value">{{repairData.userCloseCount}}</view>
30 30
 				</view>
31 31
 		  </view>
32 32
 		</view>
33
-		<view class="home_item">
33
+<!-- 		<view class="home_item">
34 34
 			<uni-notice-bar show-icon scrollable background-color="#ffffff" color="#000"
35 35
 			:text="noticeData" />
36
-		</view>
36
+		</view> -->
37 37
 		<view class="home_item home-disp">
38 38
 			<view class="bottom-left" @click="addRepairs">
39 39
 				<view class="bottom-left-box">
@@ -99,7 +99,7 @@
99 99
 			}
100 100
 		}).then(res=>{
101 101
 			uni.hideLoading();
102
-			getHtml(res.list[0])
102
+			// getHtml(res.list[0])
103 103
 		})
104 104
 	}
105 105
 	

+ 43 - 56
pages/repair/rapidRepNext.vue

@@ -93,7 +93,7 @@
93 93
   import NumberModal from '@/components/NumberModal.vue';
94 94
   import { onLoad } from '@dcloudio/uni-app'
95 95
   import { generateNumberArray } from '@/utils/index.js'
96
-  import { api_getDictionary, api_sj,api_request, api_place, api_getSolution, api_area, api_user, api_incidentTask, api_branch, api_dutyDepartment, api_department, api_querySummaryDoc, api_addSummaryDoc } from "@/http/api.js"
96
+  import { api_getDictionary, api_sj,api_request, getFetchDataList, api_place, api_getSolution, api_area, api_user, api_incidentTask, api_branch, api_dutyDepartment, api_department, api_querySummaryDoc, api_addSummaryDoc } from "@/http/api.js"
97 97
   import { defaultColor } from '@/static/js/theme.js'
98 98
   import { useSetTitle } from '@/share/useSetTitle.js'
99 99
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
@@ -260,7 +260,7 @@
260 260
 		
261 261
 		let user = loginUserStore.loginUser.user
262 262
 		if(user){
263
-			dataInfo.branch = user.branch.id
263
+			dataInfo.branch = user.currentHospital.id
264 264
 			dataInfo.contacts = user.name
265 265
 			dataInfo.contactsInformation = user.phone
266 266
 			dataInfo.department = user.dept.id
@@ -280,15 +280,9 @@
280 280
 	// 获取院区列表
281 281
 	function getBranch(){
282 282
 		let postData = {
283
-			branch:'',
284 283
 			idx:0,
285 284
 			sum:9999
286 285
 		}
287
-		if(loginUserStore.loginUser.user.duty){
288
-		  postData.branch = loginUserStore.loginUser.user.duty.id;
289
-		}else if(loginUserStore.loginUser.user.branch){
290
-		  postData.branch = loginUserStore.loginUser.user.branch.id;
291
-		}
292 286
 		api_branch(postData).then(res => {
293 287
 		  uni.hideLoading();
294 288
 		  res = res.list || [];
@@ -307,16 +301,11 @@
307 301
     });
308 302
     let postData = {
309 303
 			department: {
310
-			  branch: '',
304
+			  hospital: loginUserStore.loginUser.user.currentHospital.id,
311 305
 			},
312 306
 			idx:0,
313 307
 			sum:9999
314 308
 		}
315
-		if(loginUserStore.loginUser.user.duty){
316
-		  postData.department.branch = loginUserStore.loginUser.user.duty.id;
317
-		}else if(loginUserStore.loginUser.user.branch){
318
-		  postData.department.branch = loginUserStore.loginUser.user.branch.id;
319
-		}
320 309
     api_department(postData).then(res => {
321 310
       uni.hideLoading();
322 311
       res = res.list || [];
@@ -333,27 +322,22 @@
333 322
       title: "加载中",
334 323
       mask: true,
335 324
     });
336
-    let postData = {
337
-      idx: 0,
338
-      sum: 9999,
339
-      area: {
340
-        branch: '',
341
-      }
342
-    };
343
-		if(loginUserStore.loginUser.user.duty){
344
-		  postData.area.branch = loginUserStore.loginUser.user.duty.id;
345
-		}else if(loginUserStore.loginUser.user.branch){
346
-		  postData.area.branch = loginUserStore.loginUser.user.branch.id;
347
-		}
348
-    api_area(postData).then(res => {
349
-			// getPlaceList()
350
-			 uni.hideLoading();
351
-      res = res.list || [];
352
-      dataInfo.buildingTypeList = res.map(v => ({
353
-        text: v.area,
354
-        value: v.id
355
-      }));
356
-    })
325
+		let postData = {
326
+		  idx: 0,
327
+		  sum: 9999,
328
+			building:{
329
+				hosId: loginUserStore.loginUser.user.currentHospital.id,
330
+			}
331
+		};
332
+		getFetchDataList("simple/data", "building", postData)
333
+		  .then((res) => {
334
+				uni.hideLoading();
335
+		    res = res.list || [];
336
+		    dataInfo.buildingTypeList = res.map(v => ({
337
+		      text: v.buildingName,
338
+		      value: v.id
339
+		    }));
340
+		  });
357 341
   }
358 342
   
359 343
 	function areaChange(e){
@@ -365,22 +349,21 @@
365 349
 	  let postData = {
366 350
 	    idx: 0,
367 351
 	    sum: 9999,
368
-			place: {
369
-			  area: {id: e },
352
+			floor: {
353
+			  buildId:e,
354
+				hosId:loginUserStore.loginUser.user.currentHospital.id
370 355
 			}
371 356
 	  };
372
-		// if(loginUserStore.loginUser.user.duty){
373
-		//   postData.area.branch = loginUserStore.loginUser.user.duty.id;
374
-		// }else if(loginUserStore.loginUser.user.branch){
375
-		//   postData.area.branch = loginUserStore.loginUser.user.branch.id;
376
-		// }
377
-	  api_place(postData).then(res => {
378
-	    res = res.list || [];
379
-	    dataInfo.placeTypeList = res.map(v => ({
380
-	      text: v.place,
381
-	      value: v.id
382
-	    }));
383
-	  })
357
+		
358
+		getFetchDataList("simple/data", "floor", postData)
359
+		  .then((res) => {
360
+				uni.hideLoading();
361
+		    res = res.list || [];
362
+		    dataInfo.placeTypeList = res.map(v => ({
363
+		      text: v.floorName,
364
+		      value: v.id
365
+		    }));
366
+		  });
384 367
 	}
385 368
 	
386 369
   // 提交
@@ -410,20 +393,24 @@
410 393
 			delete postData.serverId 
411 394
 		}
412 395
     postData.incident.assetId = dataInfo.assetId;
413
-		postData.incident.address = dataInfo.address;
396
+		postData.incident.houseNumber = dataInfo.address;
414 397
 		postData.incident.contacts = dataInfo.contacts;
415 398
 		postData.incident.contactsInformation = dataInfo.contactsInformation;
416
-		postData.incident.branch = dataInfo.branch;
417
-		postData.incident.areaId = dataInfo.areaId; //areaId:楼栋   
418
-    postData.incident.placeId = dataInfo.placeId;//placeId:楼层
399
+		postData.incident.hosId = dataInfo.branch;
400
+		postData.incident.place = {}
401
+		postData.incident.place.id = dataInfo.placeId;
402
+		// postData.incident.buildId = dataInfo.areaId; //areaId:楼栋   
403
+  //   postData.incident.floorId = dataInfo.placeId;//placeId:楼层
404
+		// buildId
405
+		// floorId
419 406
 		api_getDictionary({
420 407
 			key: "incident_source",
421 408
 			type: "list"
422 409
 		}).then(res1=>{
423 410
 				let incidentSourceList = res1 || [];
424 411
 			  let im = incidentSourceList.find(v => v.value === 'im');
425
-				api_sj().then(res2=>{
426
-					postData.incident.incidentsign = res2.data;
412
+				// api_sj().then(res2=>{
413
+					// postData.incident.incidentsign = res2.data;
427 414
 					postData.incident.source = im;
428 415
 					postData.incident.fromWx = true;
429 416
 					postData.incident.requester = loginUserStore.loginUser.user;
@@ -484,7 +471,7 @@
484 471
 						  });
485 472
 						}
486 473
 					})
487
-				})
474
+				// })
488 475
 		})
489 476
 
490 477
   }

+ 2 - 2
pages/repair/repairsDetail.vue

@@ -55,7 +55,7 @@
55 55
           </view>
56 56
           <view class="deital_item">
57 57
             <text class="name">详细地址:</text>
58
-            <text class="value" v-if="dataInfo.incidentData.place || dataInfo.incidentData.houseNumber">{{dataInfo.incidentData.place ? (dataInfo.incidentData.place.area.area + dataInfo.incidentData.place.place) : ''}}{{dataInfo.incidentData.houseNumber || ''}}</text>
58
+            <text class="value" v-if="dataInfo.incidentData.place || dataInfo.incidentData.houseNumber">{{dataInfo.incidentData.place ? (dataInfo.incidentData.place.building.buildingName + dataInfo.incidentData.place.floorName) : ''}}{{dataInfo.incidentData.houseNumber || ''}}</text>
59 59
             <text class="value" v-else>无</text>
60 60
           </view>
61 61
           <view class="deital_item">
@@ -371,7 +371,7 @@
371 371
         dataInfo.callbackLogs = logs.filter(v => v.logType.value == 'callback').slice(0, 1);
372 372
 
373 373
         // 维修汇总单
374
-        if(dataInfo.incidentData.state.value == 'close' && dataInfo.incidentData.duty.addSummary == 1 && dataInfo.incidentData.summaryId){
374
+        if(dataInfo.incidentData.state.value == 'close' && dataInfo.incidentData.duty && dataInfo.incidentData.duty.addSummary == 1 && dataInfo.incidentData.summaryId){
375 375
           let flag = dataInfo.tabs.some(v => v.value === '2');
376 376
           !flag && dataInfo.tabs.splice(1, 0, {id: 2, name: '维修汇总单', value: '2', num: ''});
377 377
         }

+ 3 - 3
pages/repair/repairsList.vue

@@ -16,10 +16,10 @@
16 16
 
17 17
         <view class="body_item_content">
18 18
 					<view class="body_item_content_p" v-if="data.place || data.houseNumber">
19
-					  <text class="name ellipsis">详细地址:{{data.place ? data.place.area.area : ''}}{{data.place ? data.place.place : ''}}{{data.houseNumber}}</text>
19
+					  <text class="name ellipsis">详细地址:{{data.place ? data.place.building.buildingName : ''}}{{data.place ? data.place.floorName : ''}}{{data.houseNumber}}</text>
20 20
 					</view>
21
-          <view class="body_item_content_p" v-if="data.rsprice">
22
-            <text class="name ellipsis">维修总价:{{data.rsprice}}</text>
21
+          <view class="body_item_content_p" v-if="data.rsPrice">
22
+            <text class="name ellipsis">维修总价:{{data.rsPrice}}</text>
23 23
             <view class="status" :style="stateStyle(data.state)">{{data.state ? data.state.name : ''}}</view>
24 24
           </view>
25 25
           <view class="body_item_content_p">

+ 7 - 1
share/useWechatAuth.js

@@ -1,4 +1,4 @@
1
-import { api_wechatAuth } from "@/http/api.js"
1
+import { api_wechatAuth, api_systemConfiguration} from "@/http/api.js"
2 2
 import { useLoginSuccess } from '@/share/useLoginSuccess.js'
3 3
 const { loginSuccess } = useLoginSuccess()
4 4
 export function useWechatAuth() {
@@ -18,6 +18,12 @@ export function useWechatAuth() {
18 18
         window.location.href = res.url;
19 19
       } else {
20 20
         loginSuccess(res.user);
21
+				api_systemConfiguration({
22
+					idx: 0,
23
+					sum: 9999,
24
+				}).then(res2=>{
25
+					uni.setStorageSync('sysData',JSON.stringify(res2.list))
26
+				})
21 27
       }
22 28
     });
23 29
   }