提交 49787d8b 作者: 翁进城

Merge remote-tracking branch 'origin/caoyun'

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