提交 b129fd10 作者: 18928357778

改-飞手培训-考证筛选数据

添-首页-无人机培训-考证筛选数据
上级 d52a3900
......@@ -49,6 +49,9 @@ export default {
region: (): Promise<Response<Array<RegionResp>>> => {
return request('/pms/webDevice/getSecondDistrictInfo');
},
PilotLicense: (): Promise<Response<Array<RegionResp>>> => {
return request('/release/curriculum/getDronePilotLicense');
},
IndustryFlightSkills: (): Promise<Response<Array<SkillsType>>> => {
return request('/release/curriculum/getIndustryFlightSkills');
},
......
......@@ -27,6 +27,9 @@ export default function FlyingHandService() {
const [secondDistrictInfo, setSecondDistrictInfo] = useState(
Array<RegionResp>
);
const [skills, setSkills] = useState(
Array<RegionResp>
);
const [flightSkillsList, setFlightSkillsList] = useState(Array<SkillsType>);
const leftDom = (item: Flying) => {
......@@ -156,7 +159,9 @@ export default function FlyingHandService() {
api.region().then((res) => {
setSecondDistrictInfo(res.result || []);
});
api.PilotLicense().then((res) => {
setSkills(res.result || []);
});
api.IndustryFlightSkills().then((res) => {
setFlightSkillsList(res.result || []);
});
......@@ -213,20 +218,31 @@ export default function FlyingHandService() {
onChange={onChange}
changeOnSelect
/>
<Select
<Cascader
allowClear
placeholder="考证"
bordered={false}
className="selectItem"
size="large"
fieldNames={{
label: "licenseType",
value: "id",
children: "childLicenses",
}}
options={skills}
onChange={onChange}
changeOnSelect
/>
{/* <Select
className="selectItem"
bordered={false}
popupMatchSelectWidth={false}
placeholder="考证"
size="large"
onChange={(value) => onProvinceChange(value, "考证")}
options={[
{ value: "1", label: "视距内驾驶员" },
{ value: "2", label: "视距外驾驶员" },
{ value: "3", label: "教员" },
]}
options={skills}
allowClear
/>
/> */}
<Select
className="selectItem"
bordered={false}
......
......@@ -85,12 +85,18 @@ export const jobServicesApi = {
};
export const mallApi = {
listAllBrand: (): Promise<Response<Array<FilterOptionResp>>> => {
return request("/pms/webDevice/brand");
},
listAllCategory: (): Promise<Response<Array<FilterOptionResp>>> => {
return request("/pms/webProductMall/category");
},
listAllParts: (): Promise<Response<Array<FilterOptionResp>>> => {
return request("/pms/webProductMall/parts");
},
listAllModel: (): Promise<Response<Array<FilterOptionResp>>> => {
return request("/pms/webDevice/model");
},
listAllQuality: (): Promise<Response<Array<FilterOptionResp>>> => {
return request("/pms/webProductMall/quality");
},
......@@ -101,12 +107,16 @@ export interface SkillsType {
type: string;
id: number;
skillsName: string;
licenseType:string
}
export const flightSkillsApi = {
IndustryFlightSkills: (): Promise<Response<Array<SkillsType>>> => {
return request("/release/curriculum/getIndustryFlightSkills");
},
InDronePilotLicense: (): Promise<Response<Array<SkillsType>>> => {
return request("/release/curriculum/getDronePilotLicense");
},
};
export interface NewsPageType {
......
......@@ -110,7 +110,7 @@ export default function WaterfallFlowBody() {
const { deviceCategory, deviceBrand, deviceModel } = equipmentLeasingApi;
const eqApiTypeList = ["categoryId", "brandId", "modelId"];
const { listAllCategory, listAllParts, listAllQuality } = mallApi;
const { listAllModel , listAllBrand , listAllCategory, listAllParts, listAllQuality } = mallApi;
const mallApiTypeList = [
"brandId",
"productCategoryId",
......@@ -118,7 +118,7 @@ export default function WaterfallFlowBody() {
"modelId",
"qualityId",
];
const { IndustryFlightSkills } = flightSkillsApi;
const { IndustryFlightSkills , InDronePilotLicense} = flightSkillsApi;
const flightApiTypeList = ["licenseId", "flightSkillsId"];
const { listAllIndustry, listAllAppType } = jobServicesApi;
......@@ -129,6 +129,8 @@ export default function WaterfallFlowBody() {
index: number,
option: []
) => {
console.log("跳转",value,index,option);
const [item] = option.filter((item: any) => item.name === value.value);
routerPath(index, item);
};
......@@ -141,11 +143,13 @@ export default function WaterfallFlowBody() {
deviceModel(),
]);
let res2 = await Promise.all([
listAllBrand(),
listAllCategory(),
listAllParts(),
listAllModel(),
listAllQuality(),
]);
let res3 = await Promise.all([IndustryFlightSkills()]);
let res3 = await Promise.all([IndustryFlightSkills(),InDronePilotLicense()]);
let res4 = await Promise.all([listAllIndustry(), listAllAppType()]);
// let res4 = await Promise.all([deviceCategory(),deviceBrand(),deviceModel()])
// let res6 = await Promise.all([deviceCategory(),deviceBrand(),deviceModel()])
......@@ -170,7 +174,7 @@ export default function WaterfallFlowBody() {
.map((item, index) => {
return item.result?.map((it) => {
it.type = flightApiTypeList[index];
it.name = it.name || it.skillsName;
it.name = it.name || it.skillsName || it.licenseType;
return it;
});
})
......
......@@ -102,7 +102,6 @@ export const Box = styled.div`
}
}
.right-item {
background: url("./assets/xwbg.png") no-repeat #fff;
border-radius: 6px;
.title {
display: flex;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论