This commit is contained in:
wangshiming
2022-02-17 16:19:27 +08:00
parent e40e1de488
commit dd93822325
5 changed files with 134 additions and 135 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-18 09:51:21 * @Date : 2022-01-18 09:51:21
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-01-26 17:45:55 * @LastEditTime : 2022-02-17 15:57:11
* @FilePath : \\tms-obc-web\\proxy.conf.js * @FilePath : \\tms-obc-web\\proxy.conf.js
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -20,7 +20,7 @@ module.exports = {
// } // }
'//api': { '//api': {
target: { target: {
host: 'tms-api-dev.eascs.com', host: 'tms-api-test.eascs.com',
protocol: 'https:', protocol: 'https:',
port: 443 port: 443
}, },

View File

@ -32,17 +32,17 @@ export class CarAddDriverComponent implements OnInit {
userPracticeSeniorityDTO: {} userPracticeSeniorityDTO: {}
}; };
companyData: any = {}; companyData: any = {};
mobile = '' mobile = '';
constructor( constructor(
private modal: NzModalRef, private modal: NzModalRef,
public service: SupplyManagementService, public service: SupplyManagementService,
private envSrv: EAEnvironmentService, private envSrv: EAEnvironmentService,
private eaCacheSrv: EACacheService, private eaCacheSrv: EACacheService
) { } ) {}
ngOnInit(): void { ngOnInit(): void {
this.companyData = this.eaCacheSrv.get(cacheConf.env) this.companyData = this.eaCacheSrv.get(cacheConf.env);
this.initSF() this.initSF();
} }
initSF() { initSF() {
this.schema = { this.schema = {
@ -51,7 +51,7 @@ export class CarAddDriverComponent implements OnInit {
title: '司机信息(必填)', title: '司机信息(必填)',
type: 'string', type: 'string',
ui: { ui: {
widget: 'text', widget: 'text'
}, },
default: '照片上传后会自动识别文字并填充下列内容栏' default: '照片上传后会自动识别文字并填充下列内容栏'
}, },
@ -61,7 +61,7 @@ export class CarAddDriverComponent implements OnInit {
format: 'email', format: 'email',
maxLength: 11, maxLength: 11,
ui: { ui: {
widget: 'text', widget: 'text'
}, },
default: this.mobile default: this.mobile
}, },
@ -70,17 +70,17 @@ export class CarAddDriverComponent implements OnInit {
type: 'string', type: 'string',
ui: { ui: {
widget: 'text', widget: 'text',
showRequired: true, showRequired: true
}, },
default: '请上传身份证原件的高清照片,若上传复印件,则需加盖公司印章及法人签字;上传后系统会自动识别并填写', default: '请上传身份证原件的高清照片,若上传复印件,则需加盖公司印章及法人签字;上传后系统会自动识别并填写'
}, },
tipsA: { tipsA: {
title: '', title: '',
type: 'string', type: 'string',
ui: { ui: {
widget: 'custom', widget: 'custom',
offsetControl: 6, offsetControl: 6
}, }
}, },
certificatePhotoFrontWatermark: { certificatePhotoFrontWatermark: {
type: 'string', type: 'string',
@ -96,14 +96,14 @@ export class CarAddDriverComponent implements OnInit {
widget: 'upload', widget: 'upload',
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过2M', descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过2M',
data: { data: {
appId: this.envSrv.env.appId, appId: this.envSrv.env.appId
}, },
name: 'multipartFile', name: 'multipartFile',
multiple: false, multiple: false,
listType: 'picture-card', listType: 'picture-card',
change: (args) => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath;
this.checkIdCard(args.file.response.data.fullFilePath, 'front', 0); this.checkIdCard(args.file.response.data.fullFilePath, 'front', 0);
} }
}, },
@ -118,16 +118,16 @@ export class CarAddDriverComponent implements OnInit {
observer.next(isLt2M); observer.next(isLt2M);
observer.complete(); observer.complete();
}); });
}, }
} as SFUploadWidgetSchema, } as SFUploadWidgetSchema
}, },
tipsB: { tipsB: {
title: '', title: '',
type: 'string', type: 'string',
ui: { ui: {
widget: 'custom', widget: 'custom',
offsetControl: 6, offsetControl: 6
}, }
}, },
certificatePhotoBackWatermark: { certificatePhotoBackWatermark: {
type: 'string', type: 'string',
@ -143,14 +143,14 @@ export class CarAddDriverComponent implements OnInit {
widget: 'upload', widget: 'upload',
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过2M', descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过2M',
data: { data: {
appId: this.envSrv.env.appId, appId: this.envSrv.env.appId
}, },
name: 'multipartFile', name: 'multipartFile',
multiple: false, multiple: false,
listType: 'picture-card', listType: 'picture-card',
change: (args) => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath;
this.checkIdCard(args.file.response.data.fullFilePath, 'back', 0); this.checkIdCard(args.file.response.data.fullFilePath, 'back', 0);
} }
}, },
@ -165,8 +165,8 @@ export class CarAddDriverComponent implements OnInit {
observer.next(isLt2M); observer.next(isLt2M);
observer.complete(); observer.complete();
}); });
}, }
} as SFUploadWidgetSchema, } as SFUploadWidgetSchema
}, },
name: { name: {
title: '姓名', title: '姓名',
@ -174,8 +174,8 @@ export class CarAddDriverComponent implements OnInit {
maxLength: 32, maxLength: 32,
ui: { ui: {
widget: '', widget: '',
placeholder: '请输入姓名', placeholder: '请输入姓名'
}, }
}, },
certificateNumber: { certificateNumber: {
title: '身份证号', title: '身份证号',
@ -187,17 +187,12 @@ export class CarAddDriverComponent implements OnInit {
widget: '', widget: '',
placeholder: '请输入法定代表人证件号', placeholder: '请输入法定代表人证件号',
errors: { errors: {
required: '请输入18位身份证号码', required: '请输入18位身份证号码'
}, }
}, }
}, }
}, },
required: [ required: ['certificatePhotoFrontWatermark', 'certificatePhotoBackWatermark', 'name', 'certificateNumber']
'certificatePhotoFrontWatermark',
'certificatePhotoBackWatermark',
'name',
'certificateNumber'
],
}; };
this.schema1 = { this.schema1 = {
properties: { properties: {
@ -205,7 +200,7 @@ export class CarAddDriverComponent implements OnInit {
title: '驾驶证信息(必填)', title: '驾驶证信息(必填)',
type: 'string', type: 'string',
ui: { ui: {
widget: 'text', widget: 'text'
}, },
default: '照片上传后会自动识别文字并填充下列内容栏' default: '照片上传后会自动识别文字并填充下列内容栏'
}, },
@ -222,14 +217,14 @@ export class CarAddDriverComponent implements OnInit {
widget: 'upload', widget: 'upload',
descriptionI18n: '请上传驾驶证照片支持JPG、PNG格式文件小于5M。照片信息缺失、拼凑、过度PS、模糊不清都不会通过审核。', descriptionI18n: '请上传驾驶证照片支持JPG、PNG格式文件小于5M。照片信息缺失、拼凑、过度PS、模糊不清都不会通过审核。',
data: { data: {
appId: this.envSrv.env.appId, appId: this.envSrv.env.appId
}, },
name: 'multipartFile', name: 'multipartFile',
multiple: false, multiple: false,
listType: 'picture-card', listType: 'picture-card',
change: (args) => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.detailData.userDriverLicenseDTO.certificatePhoto = args.file.response.data.fullFilePath this.detailData.userDriverLicenseDTO.certificatePhoto = args.file.response.data.fullFilePath;
this.checkDriverCard(args.file.response.data.fullFilePath, 'front', 0); this.checkDriverCard(args.file.response.data.fullFilePath, 'front', 0);
} }
}, },
@ -244,29 +239,29 @@ export class CarAddDriverComponent implements OnInit {
observer.next(isLt4M); observer.next(isLt4M);
observer.complete(); observer.complete();
}); });
}, }
} as SFUploadWidgetSchema, } as SFUploadWidgetSchema
}, },
licenseNo: { licenseNo: {
title: '驾驶证号', title: '驾驶证号',
type: 'string', type: 'string',
ui: { ui: {
// widget: 'text', // widget: 'text',
placeholder: '请输入', placeholder: '请输入'
}, }
// default: this.ar.snapshot.queryParams.licenseNo // default: this.ar.snapshot.queryParams.licenseNo
}, },
driverModel: { driverModel: {
title: '准驾车型', title: '准驾车型',
type: 'string', type: 'string',
enum: [ enum: [
{label: 'A1', value: 0}, { label: 'A1', value: 0 },
{label: 'B1', value: 1}, { label: 'B1', value: 1 }
], ],
ui: { ui: {
// widget: this.detailData.commitFlag !== 0 ? 'text' : '', // widget: this.detailData.commitFlag !== 0 ? 'text' : '',
placeholder: '请输入', placeholder: '请输入'
}, }
}, },
validStartTime: { validStartTime: {
title: '法人证件有效开始日期', title: '法人证件有效开始日期',
@ -276,10 +271,10 @@ export class CarAddDriverComponent implements OnInit {
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
placeholder: '请选择', placeholder: '请选择',
errors: { errors: {
required: '请选择起始日期', required: '请选择起始日期'
}, },
change: (i) => { }, change: i => {}
} as SFDateWidgetSchema, } as SFDateWidgetSchema
}, },
validEndTime: { validEndTime: {
title: '法人证件有效开始日期', title: '法人证件有效开始日期',
@ -289,10 +284,10 @@ export class CarAddDriverComponent implements OnInit {
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
placeholder: '请选择', placeholder: '请选择',
errors: { errors: {
required: '请选择起始日期', required: '请选择起始日期'
}, },
change: (i) => { }, change: i => {}
} as SFDateWidgetSchema, } as SFDateWidgetSchema
}, },
signingOrganization: { signingOrganization: {
title: '签发机关', title: '签发机关',
@ -300,17 +295,11 @@ export class CarAddDriverComponent implements OnInit {
maxLength: 30, maxLength: 30,
ui: { ui: {
// widget: this.detailData.commitFlag !== 0 ? 'text' : '', // widget: this.detailData.commitFlag !== 0 ? 'text' : '',
placeholder: '请输入', placeholder: '请输入'
}, }
}, }
}, },
required: [ required: ['certificatePhotoWatermark', 'licenseNo', 'driverModel', 'validStartTime', 'validEndTime']
'certificatePhotoWatermark',
'licenseNo',
'driverModel',
'validStartTime',
'validEndTime',
],
}; };
this.schema2 = { this.schema2 = {
properties: { properties: {
@ -318,9 +307,9 @@ export class CarAddDriverComponent implements OnInit {
title: '从业资格证(选填)', title: '从业资格证(选填)',
type: 'string', type: 'string',
ui: { ui: {
widget: 'text', widget: 'text'
}, },
default: '照片上传后会自动识别文字并填充下列内容栏', default: '照片上传后会自动识别文字并填充下列内容栏'
}, },
certificatePhotoWatermark: { certificatePhotoWatermark: {
type: 'string', type: 'string',
@ -336,14 +325,14 @@ export class CarAddDriverComponent implements OnInit {
widget: 'upload', widget: 'upload',
descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M', descriptionI18n: '图片支持jpg、jpeg、png、gif格式大小不超过5M',
data: { data: {
appId: this.envSrv.env.appId, appId: this.envSrv.env.appId
}, },
name: 'multipartFile', name: 'multipartFile',
multiple: false, multiple: false,
listType: 'picture-card', listType: 'picture-card',
change: (args) => { change: args => {
if (args.type === 'success') { if (args.type === 'success') {
this.detailData.userPracticeSeniorityDTO.certificatePhoto = args.file.response.data.fullFilePath this.detailData.userPracticeSeniorityDTO.certificatePhoto = args.file.response.data.fullFilePath;
//this.checkIdCard(args.file.response.data.fullFile, 0, 0); //this.checkIdCard(args.file.response.data.fullFile, 0, 0);
} }
}, },
@ -358,8 +347,8 @@ export class CarAddDriverComponent implements OnInit {
observer.next(isLt2M); observer.next(isLt2M);
observer.complete(); observer.complete();
}); });
}, }
} as SFUploadWidgetSchema, } as SFUploadWidgetSchema
}, },
licenseNo: { licenseNo: {
title: '从业资格证号', title: '从业资格证号',
@ -367,8 +356,8 @@ export class CarAddDriverComponent implements OnInit {
maxLength: 30, maxLength: 30,
ui: { ui: {
// widget: this.detailData.commitFlag !== 0 ? 'text' : '', // widget: this.detailData.commitFlag !== 0 ? 'text' : '',
placeholder: '请输入', placeholder: '请输入'
}, }
}, },
regionCode: { regionCode: {
title: '签发省份', title: '签发省份',
@ -376,8 +365,8 @@ export class CarAddDriverComponent implements OnInit {
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
asyncData: () => this.getProvinceData(), asyncData: () => this.getProvinceData()
} as SFDateWidgetSchema, } as SFDateWidgetSchema
}, },
validStartTime: { validStartTime: {
title: '发证日期', title: '发证日期',
@ -387,10 +376,10 @@ export class CarAddDriverComponent implements OnInit {
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
placeholder: '请选择', placeholder: '请选择',
errors: { errors: {
required: '请选择起始日期', required: '请选择起始日期'
}, },
change: (i) => { }, change: i => {}
} as SFDateWidgetSchema, } as SFDateWidgetSchema
}, },
validEndTime: { validEndTime: {
title: '有效期止', title: '有效期止',
@ -400,69 +389,67 @@ export class CarAddDriverComponent implements OnInit {
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
placeholder: '请选择', placeholder: '请选择',
errors: { errors: {
required: '请选择起始日期', required: '请选择起始日期'
}, },
change: (i) => { }, change: i => {}
} as SFDateWidgetSchema, } as SFDateWidgetSchema
}, }
}, },
required: [ required: []
],
}; };
this.ui = { this.ui = {
'*': { '*': {
spanLabelFixed: 180, spanLabelFixed: 180,
grid: { span: 24 }, grid: { span: 24 },
width: 700, width: 700
}, },
$title1: { $title1: {
spanLabelFixed: 0, spanLabelFixed: 0
}, },
$title2: { $title2: {
spanLabelFixed: 0, spanLabelFixed: 0
}, },
$title3: { $title3: {
spanLabelFixed: 0, spanLabelFixed: 0
}, },
$title4: { $title4: {
spanLabelFixed: 0, spanLabelFixed: 0
}, },
$enterpriseRegistrationTime: { $enterpriseRegistrationTime: {
width: 680, width: 680
}, },
$operatingEndTime: { $operatingEndTime: {
grid: { span: 9 }, grid: { span: 9 }
}, },
$dateType: { $dateType: {
grid: { span: 4 }, grid: { span: 4 }
}, },
$validEndTime: { $validEndTime: {
grid: { span: 9 }, grid: { span: 9 }
}, },
$dateType01: { $dateType01: {
grid: { span: 4 }, grid: { span: 4 }
}, },
$registrationCapital: { $registrationCapital: {
grid: { span: 12 }, grid: { span: 12 }
}, },
$unit: { $unit: {
spanLabelFixed: 20, spanLabelFixed: 20,
grid: { span: 3 }, grid: { span: 3 }
}, }
}; };
} }
getProvinceData() { getProvinceData() {
return this.service.request(this.service.$api_getRegionByCode, { regionCode: '' }).pipe( return this.service.request(this.service.$api_getRegionByCode, { regionCode: '' }).pipe(
map((res: any) => { map((res: any) => {
const result: any = [] const result: any = [];
if (res) { if (res) {
res.map((m: any) => { res.map((m: any) => {
const item = { label: m.name, value: m.regionCode } const item = { label: m.name, value: m.regionCode };
result.push(item) result.push(item);
}); });
} }
return result return result;
}) })
); );
} }
@ -470,7 +457,7 @@ export class CarAddDriverComponent implements OnInit {
// 识别身份证 参数side0-正面、1-背面type0-申请人身份证1-法定代表人身份证 // 识别身份证 参数side0-正面、1-背面type0-申请人身份证1-法定代表人身份证
const params = { const params = {
idCardUrl: imgurl, idCardUrl: imgurl,
side, side
}; };
this.service.request(this.service.$api_checkIdCard, params).subscribe((res: any) => { this.service.request(this.service.$api_checkIdCard, params).subscribe((res: any) => {
if (res) { if (res) {
@ -489,7 +476,7 @@ export class CarAddDriverComponent implements OnInit {
// 识别身份证 参数side0-正面、1-背面type0-申请人身份证1-法定代表人身份证 // 识别身份证 参数side0-正面、1-背面type0-申请人身份证1-法定代表人身份证
const params = { const params = {
driverLicenseUrl: imgurl, driverLicenseUrl: imgurl,
side, side
}; };
this.service.request(this.service.$api_recognizeDriverLicense, params).subscribe((res: any) => { this.service.request(this.service.$api_recognizeDriverLicense, params).subscribe((res: any) => {
if (res) { if (res) {
@ -510,47 +497,59 @@ export class CarAddDriverComponent implements OnInit {
close(): void { close(): void {
this.modal.destroy(); this.modal.destroy();
} }
showExample(){ showExample() {
this.showCardFlag = !this.showCardFlag this.showCardFlag = !this.showCardFlag;
} }
showJopExample(){ showJopExample() {
this.showJopFlag = !this.showJopFlag this.showJopFlag = !this.showJopFlag;
} }
submitForm(){ submitForm() {
const params:any = { const params: any = {
enterpriseId: this.companyData.enterpriseId, enterpriseId: this.companyData.enterpriseId,
enterpriseProjectId: this.companyData.projectId, enterpriseProjectId: this.companyData.projectId,
source: 1, source: 1,
mobile: this.mobile, mobile: this.mobile,
identityInfoDTO:{ identityInfoDTO: {
...this.sf.value, ...this.sf.value,
certificatePhotoFront: this.detailData.certificatePhotoFront, certificatePhotoFront: this.detailData.certificatePhotoFront,
certificatePhotoBack: this.detailData.certificatePhotoBack, certificatePhotoBack: this.detailData.certificatePhotoBack
}, },
userDriverLicenseDTO: { userDriverLicenseDTO: {
...this.sf1.value, ...this.sf1.value,
certificatePhoto: this.detailData.userDriverLicenseDTO.certificatePhoto, certificatePhoto: this.detailData.userDriverLicenseDTO.certificatePhoto
}, },
userPracticeSeniorityDTO: { userPracticeSeniorityDTO: {
...this.sf2.value, ...this.sf2.value,
certificatePhoto: this.detailData.userPracticeSeniorityDTO.certificatePhoto, certificatePhoto: this.detailData.userPracticeSeniorityDTO.certificatePhoto
}, }
}; };
params.identityInfoDTO.certificatePhotoFrontWatermark = this.sf?.value.certificatePhotoFrontWatermark Object.assign(params, {
params.identityInfoDTO.certificatePhotoBackWatermark = this.sf?.value.certificatePhotoBackWatermark identityInfoDTO: {
params.userDriverLicenseDTO.certificatePhotoWatermark = this.sf1?.value.certificatePhotoWatermark certificatePhotoFrontWatermark: this.sf?.value.certificatePhotoFrontWatermark,
params.userPracticeSeniorityDTO.certificatePhotoWatermark = this.sf2?.value.certificatePhotoWatermark certificatePhotoBackWatermark: this.sf?.value.certificatePhotoBackWatermark
},
userDriverLicenseDTO: {
certificatePhotoWatermark: this.sf?.value.certificatePhotoWatermark
},
userPracticeSeniorityDTO: {
certificatePhotoWatermark: this.sf?.value.certificatePhotoWatermark
}
});
// params.identityInfoDTO.certificatePhotoFrontWatermark = this.sf?.value.certificatePhotoFrontWatermark;
// params.identityInfoDTO.certificatePhotoBackWatermark = this.sf?.value.certificatePhotoBackWatermark;
// params.userDriverLicenseDTO.certificatePhotoWatermark = this.sf1?.value.certificatePhotoWatermark;
// params.userPracticeSeniorityDTO.certificatePhotoWatermark = this.sf2?.value.certificatePhotoWatermark;
delete params.identityInfoDTO.titleA; delete params.identityInfoDTO.titleA;
delete params.identityInfoDTO.titleB; delete params.identityInfoDTO.titleB;
delete params.identityInfoDTO.titleC; delete params.identityInfoDTO.titleC;
delete params.userDriverLicenseDTO.tipsA; delete params.userDriverLicenseDTO.tipsA;
delete params.userPracticeSeniorityDTO.tipsC; delete params.userPracticeSeniorityDTO.tipsC;
delete params.showName delete params.showName;
this.service.request(this.service.$api_enterpriseVehicleSave, params).subscribe((res: any) => { this.service.request(this.service.$api_enterpriseVehicleSave, params).subscribe((res: any) => {
if(res){ if (res) {
this.service.msgSrv.success('添加成功') this.service.msgSrv.success('添加成功');
this.modal.close(true) this.modal.close(true);
} }
}) });
} }
} }

View File

@ -303,7 +303,7 @@ export class SupplyManagementBulkComponent implements OnInit {
{ {
text: '货源审核', text: '货源审核',
click: (_record) => this.audit(_record, 1), click: (_record) => this.audit(_record, 1),
iif: item => item.resourceStatus == 1, iif: item => item.auditStatus === '1'
}, },
{ {
text: '二维码 ', text: '二维码 ',

View File

@ -539,7 +539,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
{ {
text: '货源审核', text: '货源审核',
click: _record => this.audit(_record, 1), click: _record => this.audit(_record, 1),
iif: item => item.resourceStatus === '1' iif: item => item.auditStatus === '1'
}, },
{ {
text: '修改货源', text: '修改货源',

View File

@ -9,7 +9,7 @@ import { EACacheService } from '..';
}) })
export class ShipperBaseService extends BaseService { export class ShipperBaseService extends BaseService {
$api_get_carless_carrier = ``; // 获取承运人 $api_get_carless_carrier = ``; // 获取承运人
$api_get_enterprise_project = `/api/mdc/cuc/enterpriseProject/getEnterpriseProjectList `; // 所属项目列表 $api_get_enterprise_project = `/api/mdc/cuc/enterpriseProject/getEnterpriseProjectList`; // 所属项目列表
$api_get_staff_list = `/api/mdc/cuc/userApp/getStaffList`; //查询企业项目员工列表(录单员) $api_get_staff_list = `/api/mdc/cuc/userApp/getStaffList`; //查询企业项目员工列表(录单员)
$api_get_network_freight_forwarder_list = `/api/mdc/cuc/networkTransporter/findAll`; // 获取网络货运人 $api_get_network_freight_forwarder_list = `/api/mdc/cuc/networkTransporter/findAll`; // 获取网络货运人
$api_get_settlement_customer_list = `/api/mdc/cuc/settlementCustomer/findAll`; // 查找所有结算客户信息(下拉) $api_get_settlement_customer_list = `/api/mdc/cuc/settlementCustomer/findAll`; // 查找所有结算客户信息(下拉)
@ -44,22 +44,22 @@ export class ShipperBaseService extends BaseService {
* 获取所属项目 * 获取所属项目
* @returns * @returns
*/ */
getEnterpriseProject(params = {}) { getEnterpriseProject(params = {}) {
return this.request(this.$api_get_enterprise_project, params).pipe( return this.request(this.$api_get_enterprise_project, params).pipe(
map((res: any) => { map((res: any) => {
if (!res) { if (!res) {
return []; return [];
} }
const list = res.map((item: any) => { const list = res.map(((item: any) => {
return { return {
label: item.projectName, label: item.projectName,
value: item.enterpriseId value: item.id
}; }
}); }))
const obj = [{ value: '', label: '全部' }]; const obj = [{ value: '', label: '全部' }];
return [...obj, ...list]; return [...obj, ...list];
}) })
); )
} }
/** /**