|
@@ -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
|
}
|