|
@@ -1147,17 +1147,17 @@ export class HushijiandanComponent implements OnInit {
|
1147
|
1147
|
contacts: [this.loginUser.name, [Validators.required]],
|
1148
|
1148
|
contactsInformation: [this.loginUser.phone, [Validators.required]],
|
1149
|
1149
|
});
|
1150
|
|
- this.getDeptByCode(this.currentDept.pcode);
|
|
1150
|
+ this.getDeptById(this.currentDept.id);
|
1151
|
1151
|
}
|
1152
|
|
- // 根据科室Code获取详情
|
|
1152
|
+ // 根据科室ID获取详情
|
1153
|
1153
|
deptDto:any = {};
|
1154
|
|
- getDeptByCode(code){
|
|
1154
|
+ getDeptById(id){
|
1155
|
1155
|
this.mainService
|
1156
|
|
- .fetchListBx("department", {
|
|
1156
|
+ .getFetchDataList("simple/data", "department", {
|
1157
|
1157
|
idx: 0,
|
1158
|
1158
|
sum: 1,
|
1159
|
1159
|
department: {
|
1160
|
|
- eqCode: code,
|
|
1160
|
+ id,
|
1161
|
1161
|
}
|
1162
|
1162
|
})
|
1163
|
1163
|
.subscribe((data:any) => {
|
|
@@ -1166,13 +1166,13 @@ export class HushijiandanComponent implements OnInit {
|
1166
|
1166
|
console.log(this.deptDto);
|
1167
|
1167
|
this.changeHosp();
|
1168
|
1168
|
// 回显楼栋
|
1169
|
|
- if(this.deptDto.place){
|
1170
|
|
- this.validateBxForm.controls.building.setValue(this.deptDto.place.area.id);
|
|
1169
|
+ if(this.deptDto.building){
|
|
1170
|
+ this.validateBxForm.controls.building.setValue(this.deptDto.building.id);
|
1171
|
1171
|
}
|
1172
|
1172
|
|
1173
|
1173
|
// 回显楼层
|
1174
|
|
- if(this.deptDto.place){
|
1175
|
|
- this.validateBxForm.controls.floor.setValue(this.deptDto.place.id);
|
|
1174
|
+ if(this.deptDto.floor){
|
|
1175
|
+ this.validateBxForm.controls.floor.setValue(this.deptDto.floor.id);
|
1176
|
1176
|
}
|
1177
|
1177
|
});
|
1178
|
1178
|
}
|
|
@@ -1184,12 +1184,12 @@ export class HushijiandanComponent implements OnInit {
|
1184
|
1184
|
let data = {
|
1185
|
1185
|
idx: 0,
|
1186
|
1186
|
sum: 9999,
|
1187
|
|
- area: {
|
1188
|
|
- branch: this.deptDto.branch,
|
|
1187
|
+ building: {
|
|
1188
|
+ hosId: this.deptDto.hospital.id,
|
1189
|
1189
|
}
|
1190
|
1190
|
};
|
1191
|
1191
|
this.mainService
|
1192
|
|
- .fetchListBx("area", data)
|
|
1192
|
+ .getFetchDataList("simple/data", "building", data)
|
1193
|
1193
|
.subscribe((data:any) => {
|
1194
|
1194
|
this.buildings = data.list || [];
|
1195
|
1195
|
this.floors = [];
|
|
@@ -1212,13 +1212,13 @@ export class HushijiandanComponent implements OnInit {
|
1212
|
1212
|
let data = {
|
1213
|
1213
|
idx: 0,
|
1214
|
1214
|
sum: 9999,
|
1215
|
|
- place: {
|
1216
|
|
- area: { id: buildingId },
|
|
1215
|
+ floor: {
|
|
1216
|
+ buildId: buildingId,
|
1217
|
1217
|
}
|
1218
|
1218
|
};
|
1219
|
1219
|
this.floorLoading = true;
|
1220
|
1220
|
this.mainService
|
1221
|
|
- .fetchListBx("place", data)
|
|
1221
|
+ .getFetchDataList("simple/data", "floor", data)
|
1222
|
1222
|
.subscribe((data:any) => {
|
1223
|
1223
|
this.floorLoading = false;
|
1224
|
1224
|
this.message.remove(this.maskFlag);
|
|
@@ -1268,11 +1268,9 @@ export class HushijiandanComponent implements OnInit {
|
1268
|
1268
|
}).messageId;
|
1269
|
1269
|
if(type == 1){
|
1270
|
1270
|
this.btnLoading = true;
|
1271
|
|
- let loginUser:any = {
|
1272
|
|
- account: this.loginUser.account,
|
1273
|
|
- };
|
1274
|
|
- if(this.deptDto.branch){
|
1275
|
|
- loginUser.branch = { id: this.deptDto.branch };
|
|
1271
|
+ let loginUser:any = cloneDeep(this.loginUser);
|
|
1272
|
+ if(this.deptDto.hospital){
|
|
1273
|
+ loginUser.hospital = { id: this.deptDto.hospital.id };
|
1276
|
1274
|
}
|
1277
|
1275
|
if(this.deptDto){
|
1278
|
1276
|
loginUser.dept = {id: this.deptDto.id};
|
|
@@ -1280,18 +1278,18 @@ export class HushijiandanComponent implements OnInit {
|
1280
|
1278
|
if(this.validateBxForm.value.contacts){
|
1281
|
1279
|
loginUser.name = this.validateBxForm.value.contacts;
|
1282
|
1280
|
}
|
1283
|
|
- if(this.validateBxForm.value.floor){
|
1284
|
|
- loginUser.place = {id: this.validateBxForm.value.floor, area: { id: this.validateBxForm.value.building }};
|
1285
|
|
- }
|
1286
|
|
- if(this.validateBxForm.value.officeAddress){
|
1287
|
|
- loginUser.houseNumber = this.validateBxForm.value.officeAddress;
|
1288
|
|
- }
|
|
1281
|
+ // if(this.validateBxForm.value.floor){
|
|
1282
|
+ // loginUser.place = {id: this.validateBxForm.value.floor, area: { id: this.validateBxForm.value.building }};
|
|
1283
|
+ // }
|
|
1284
|
+ // if(this.validateBxForm.value.officeAddress){
|
|
1285
|
+ // loginUser.houseNumber = this.validateBxForm.value.officeAddress;
|
|
1286
|
+ // }
|
1289
|
1287
|
if(this.validateBxForm.value.contactsInformation){
|
1290
|
1288
|
loginUser.phone = this.validateBxForm.value.contactsInformation;
|
1291
|
1289
|
}
|
1292
|
|
- let result:any = await this.mainService.saveUser({loginUser}).toPromise();
|
|
1290
|
+ let result:any = await this.mainService.coopData("updData", "user", { user: loginUser }).toPromise();
|
1293
|
1291
|
console.log(result);
|
1294
|
|
- if(result.state != 200){
|
|
1292
|
+ if(result.status != 200){
|
1295
|
1293
|
this.hideReqModal();
|
1296
|
1294
|
this.btnLoading = false;
|
1297
|
1295
|
this.message.remove(this.maskFlag);
|
|
@@ -1302,38 +1300,34 @@ export class HushijiandanComponent implements OnInit {
|
1302
|
1300
|
}else{
|
1303
|
1301
|
this.cancenlLoading = true;
|
1304
|
1302
|
}
|
1305
|
|
- this.mainService.getDictionaryByITSM({key: "incident_source", type: "list"}).subscribe((source:any) => {
|
1306
|
|
- let incidentSourceList = source.data || [];
|
|
1303
|
+ this.mainService.getDictionary("list", "incident_source").subscribe((source:any) => {
|
|
1304
|
+ let incidentSourceList = source || [];
|
1307
|
1305
|
let im = incidentSourceList.find(v => v.value === 'im');
|
1308
|
|
- this.mainService.wxbx({}).subscribe((result) => {
|
1309
|
|
- if ((result as any).status == 200) {
|
1310
|
|
- let bxcode = (result as any).data; //生成微信报修号
|
|
1306
|
+ this.mainService.getDictionary("list", "repair_incident_type").subscribe((result) => {
|
|
1307
|
+ let repairIncidentTypeList = result || [];
|
|
1308
|
+ let repairIncidentType = repairIncidentTypeList.find(v => v.value === 'dept');
|
|
1309
|
+ if (repairIncidentType) {
|
1311
|
1310
|
let postData: any = {
|
1312
|
1311
|
incident: {
|
1313
|
|
- "incidentsign": bxcode,
|
1314
|
|
- "deleteFlag": 0,
|
1315
|
|
- "department": { id: this.deptDto.id },
|
1316
|
|
- "contactsInformation": this.validateBxForm.value.contactsInformation,
|
1317
|
|
- "contacts": this.validateBxForm.value.contacts,
|
1318
|
|
- "branch": this.deptDto.branch,
|
1319
|
|
- "area": { id: this.validateBxForm.value.building },
|
1320
|
|
- "place": { id: this.validateBxForm.value.floor },
|
1321
|
|
- "houseNumber": this.validateBxForm.value.officeAddress,
|
1322
|
|
- "source": im,
|
1323
|
|
- "description": this.validateBxForm.value.description,
|
1324
|
|
- "repairType": 2,
|
1325
|
|
- "requester": this.loginUser,
|
1326
|
|
- "acceptUser": this.loginUser,
|
|
1312
|
+ repairIncidentType,
|
|
1313
|
+ place: { id: this.deptDto.floor.id },
|
|
1314
|
+ department: { id: this.deptDto.id},
|
|
1315
|
+ description: this.validateBxForm.value.description,
|
|
1316
|
+ houseNumber: this.validateBxForm.value.officeAddress,
|
|
1317
|
+ contacts: this.validateBxForm.value.contacts,
|
|
1318
|
+ contactsInformation: this.validateBxForm.value.contactsInformation,
|
|
1319
|
+ hosId: this.deptDto.hospital.id,
|
|
1320
|
+ source: im,
|
|
1321
|
+ fromWx: true,
|
|
1322
|
+ requester: this.loginUser,
|
|
1323
|
+ acceptUser: this.loginUser,
|
|
1324
|
+ deleteFlag: 0,
|
1327
|
1325
|
},
|
1328
|
|
- loginUser: {
|
1329
|
|
- account: this.loginUser.account,
|
1330
|
|
- id: this.loginUser.id,
|
1331
|
|
- }
|
1332
|
1326
|
};
|
1333
|
1327
|
if (this.coopBx.category) {
|
1334
|
1328
|
postData.incident.category = this.coopBx.category;
|
1335
|
1329
|
}
|
1336
|
|
- this.mainService.addWxIncident(postData).subscribe((res) => {
|
|
1330
|
+ this.mainService.flowPost("incident/task/request", postData).subscribe((res) => {
|
1337
|
1331
|
this.btnLoading = false;
|
1338
|
1332
|
this.cancenlLoading = false;
|
1339
|
1333
|
this.message.remove(this.maskFlag);
|
|
@@ -1349,7 +1343,7 @@ export class HushijiandanComponent implements OnInit {
|
1349
|
1343
|
});
|
1350
|
1344
|
} else {
|
1351
|
1345
|
this.btnLoading = false;
|
1352
|
|
- this.showPromptModal("提交", false, "");
|
|
1346
|
+ this.showPromptModal("提交", false, "缺少【科室内报修】数据字典");
|
1353
|
1347
|
}
|
1354
|
1348
|
});
|
1355
|
1349
|
})
|
|
@@ -1358,13 +1352,10 @@ export class HushijiandanComponent implements OnInit {
|
1358
|
1352
|
// 获取星级
|
1359
|
1353
|
degrees = [];
|
1360
|
1354
|
getDegrees() {
|
1361
|
|
- let postData = { type: "list", key: "incident_degree" };
|
1362
|
1355
|
this.iLoading = true;
|
1363
|
|
- this.mainService.getDictionaryByITSM(postData).subscribe((data: any) => {
|
|
1356
|
+ this.mainService.getDictionary("list", "incident_degree").subscribe((data: any) => {
|
1364
|
1357
|
this.iLoading = false;
|
1365
|
|
- if (data.status == 200) {
|
1366
|
|
- this.degrees = data.data || [];
|
1367
|
|
- }
|
|
1358
|
+ this.degrees = data || [];
|
1368
|
1359
|
});
|
1369
|
1360
|
}
|
1370
|
1361
|
iLoading = false;
|
|
@@ -3842,7 +3833,15 @@ export class HushijiandanComponent implements OnInit {
|
3842
|
3833
|
}
|
3843
|
3834
|
// 获取事件状态
|
3844
|
3835
|
incidentStateId = undefined;
|
3845
|
|
- incidentStateList = [];
|
|
3836
|
+ incidentStateList = [
|
|
3837
|
+ {name: '全部', value: 0},
|
|
3838
|
+ {name: '待受理', value: 'accept,storage'},
|
|
3839
|
+ {name: '处理中', value: 'pending,handler,reassign'},
|
|
3840
|
+ {name: '待评价', value: 'close0', hasWxdegree: 0},
|
|
3841
|
+ {name: '已关闭', value: 'close1', hasWxdegree: 1},
|
|
3842
|
+ {name: '不受理', value: 'reject'},
|
|
3843
|
+ {name: '撤销', value: 'cancel'},
|
|
3844
|
+ ];
|
3846
|
3845
|
// getIncidentState() {
|
3847
|
3846
|
// let postData = { type: "list", key: "wxincident_state" };
|
3848
|
3847
|
// this.iLoading = true;
|
|
@@ -3862,45 +3861,41 @@ export class HushijiandanComponent implements OnInit {
|
3862
|
3861
|
bxlbParentSearchInp: string = ""; //患者信息搜索
|
3863
|
3862
|
processing: number = 0; //处理中的数量
|
3864
|
3863
|
bxlbLoading = false;
|
|
3864
|
+ repairIncidentTypeList = [];//科室报修或公共报修
|
3865
|
3865
|
getBxlb(idx, isInitState = false) {
|
3866
|
3866
|
// 获取事件状态
|
3867
|
|
- let postData = { type: "list", key: "incident_status" };
|
3868
|
3867
|
this.iLoading = true;
|
3869
|
3868
|
this.bxlbLoading = true;
|
3870
|
|
- this.mainService.getDictionaryByITSM(postData).subscribe((data: any) => {
|
|
3869
|
+ this.mainService.getDictionary('list', 'repair_incident_type').subscribe((data: any) => {
|
3871
|
3870
|
this.iLoading = false;
|
3872
|
|
- if (data.status == 200) {
|
3873
|
|
- let incidentStateList = data.data || [];
|
3874
|
|
- incidentStateList.unshift({id: 0, name: '全部', value: 0});
|
3875
|
|
- this.incidentStateList = incidentStateList;
|
3876
|
|
- if(isInitState){
|
3877
|
|
- let valueObj2 = this.incidentStateList.find(v => v.value == 0);
|
3878
|
|
- this.incidentStateId = valueObj2 ? valueObj2.id : undefined;
|
3879
|
|
- }
|
|
3871
|
+ this.repairIncidentTypeList = data || [];
|
|
3872
|
+ if(isInitState){
|
|
3873
|
+ let valueObj2 = this.incidentStateList.find(v => v.value == 0);
|
|
3874
|
+ this.incidentStateId = valueObj2 ? valueObj2.value : undefined;
|
|
3875
|
+ }
|
3880
|
3876
|
|
3881
|
|
- // 报修列表查询表格数据
|
3882
|
|
- if (idx) {
|
3883
|
|
- this.bxlbPageIndex = 1;
|
3884
|
|
- }
|
3885
|
|
- let current = JSON.parse(localStorage.getItem("user"));
|
3886
|
|
- this.mainService
|
3887
|
|
- .listWxIncident({
|
3888
|
|
- idx: this.bxlbPageIndex - 1,
|
3889
|
|
- sum: this.bxlbPageSize,
|
3890
|
|
- incident: {
|
3891
|
|
- // assignee: current.user.account,
|
3892
|
|
- statusId: this.incidentStateId || undefined,
|
3893
|
|
- department: { pcode: current.user.dept.pcode },
|
3894
|
|
- }
|
3895
|
|
- })
|
3896
|
|
- .subscribe((data: any) => {
|
3897
|
|
- this.bxlbLoading = false;
|
3898
|
|
- this.bxlbList = data.list || [];
|
3899
|
|
- this.bxlbListLength = data.totalNum || 0;
|
3900
|
|
- this.processing = data.totalNum || 0;
|
3901
|
|
- });
|
|
3877
|
+ // 报修列表查询表格数据
|
|
3878
|
+ if (idx) {
|
|
3879
|
+ this.bxlbPageIndex = 1;
|
3902
|
3880
|
}
|
3903
|
|
- });
|
|
3881
|
+ let current = JSON.parse(localStorage.getItem("user"));
|
|
3882
|
+ this.mainService
|
|
3883
|
+ .getFetchDataList("simple/data", "incident", {
|
|
3884
|
+ idx: this.bxlbPageIndex - 1,
|
|
3885
|
+ sum: this.bxlbPageSize,
|
|
3886
|
+ incident: {
|
|
3887
|
+ repairIncidentType: { id: this.repairIncidentTypeList.find(v => v.value === 'dept').id },
|
|
3888
|
+ statesValues: this.incidentStateId || undefined,
|
|
3889
|
+ department: { id: current.user.dept.id },
|
|
3890
|
+ }
|
|
3891
|
+ })
|
|
3892
|
+ .subscribe((data: any) => {
|
|
3893
|
+ this.bxlbLoading = false;
|
|
3894
|
+ this.bxlbList = data.list || [];
|
|
3895
|
+ this.bxlbListLength = data.totalNum || 0;
|
|
3896
|
+ this.processing = data.totalNum || 0;
|
|
3897
|
+ });
|
|
3898
|
+ })
|
3904
|
3899
|
}
|
3905
|
3900
|
|
3906
|
3901
|
//快速报修列表
|
|
@@ -4065,7 +4060,7 @@ export class HushijiandanComponent implements OnInit {
|
4065
|
4060
|
reqModal: boolean = false;
|
4066
|
4061
|
extraData:any = {};
|
4067
|
4062
|
showReqModal() {
|
4068
|
|
- this.extraData.place = this.floors.find(v => v.id == this.validateBxForm.value.floor);
|
|
4063
|
+ this.extraData.floor = this.floors.find(v => v.id == this.validateBxForm.value.floor);
|
4069
|
4064
|
// this.reqModal = true;
|
4070
|
4065
|
this.confirmBxNext(0);
|
4071
|
4066
|
}
|
|
@@ -4279,9 +4274,9 @@ export class HushijiandanComponent implements OnInit {
|
4279
|
4274
|
appraiseModalBx: boolean = false;
|
4280
|
4275
|
starNumBx: number = 5; //评价星
|
4281
|
4276
|
appraiseContentBx: string = ""; //评级
|
4282
|
|
- appraiseIdBx: number;
|
4283
|
|
- showAppraiseBx(id) {
|
4284
|
|
- this.appraiseIdBx = id;
|
|
4277
|
+ appraiseDataBx: any;
|
|
4278
|
+ showAppraiseBx(data) {
|
|
4279
|
+ this.appraiseDataBx = data;
|
4285
|
4280
|
this.appraiseModalBx = true;
|
4286
|
4281
|
this.starNumBx = 5;
|
4287
|
4282
|
this.appraiseContentBx = "";
|
|
@@ -4293,12 +4288,14 @@ export class HushijiandanComponent implements OnInit {
|
4293
|
4288
|
this.btnLoading = true;
|
4294
|
4289
|
let id = this.degrees.find(v=>v.value == this.starNumBx).id;
|
4295
|
4290
|
let postData = {
|
4296
|
|
- degree: id,
|
4297
|
|
- degreeRemark: this.appraiseContentBx,
|
4298
|
|
- id: this.appraiseIdBx,
|
|
4291
|
+ incident: {
|
|
4292
|
+ ...this.appraiseDataBx,
|
|
4293
|
+ wxdegree: { id },
|
|
4294
|
+ wxdegreeremark: this.appraiseContentBx,
|
|
4295
|
+ }
|
4299
|
4296
|
};
|
4300
|
4297
|
this.mainService
|
4301
|
|
- .degree(postData)
|
|
4298
|
+ .flowPost("incident/task/resolve", postData)
|
4302
|
4299
|
.subscribe((data:any) => {
|
4303
|
4300
|
this.hideAppraiseBx();
|
4304
|
4301
|
if (data.state == 200) {
|