|
@@ -176,6 +176,7 @@ export default defineComponent({
|
|
|
const loadOccupationalID = () => {
|
|
|
getOccupationCategoryList().then(data => {
|
|
|
occupationalCategoryList.value = data;
|
|
|
+ debugger;
|
|
|
if (!props.OccupationalID) {
|
|
|
selectModelList[selectType.one].isSelect = true;
|
|
|
selectModelList[selectType.one].disabled = false;
|
|
@@ -188,11 +189,10 @@ export default defineComponent({
|
|
|
}));
|
|
|
}
|
|
|
else {
|
|
|
+ const twoInfo = occupationalCategoryList.value.find((x: any) => x.occupationalLevel == "2" && x.occupationalID == props.OccupationalID);
|
|
|
+ const oneInfo = occupationalCategoryList.value.find((x: any) => x.occupationalLevel == "1" && x.occupationalID == twoInfo.parentOccupationalID);
|
|
|
|
|
|
- console.log("当前OccupationalID2",props.OccupationalID);
|
|
|
- const twoInfo = occupationalCategoryList.value.find((x: any) => x.professionLevel == "2" && x.occupationalID == props.OccupationalID);
|
|
|
- const oneInfo = occupationalCategoryList.value.find((x: any) => x.professionLevel == "1" && x.occupationalID == twoInfo.parentOccupationalID);
|
|
|
-
|
|
|
+ selectModelList[selectType.one].isSelect = false;
|
|
|
selectModelList[selectType.one].disabled = false;
|
|
|
selectModelList[selectType.one].occupationalName = oneInfo.occupationalName;
|
|
|
selectModelList[selectType.one].occupationalID = oneInfo.occupationalID;
|
|
@@ -207,7 +207,7 @@ export default defineComponent({
|
|
|
selectModelList[selectType.two].disabled = false;
|
|
|
selectModelList[selectType.two].occupationalName = twoInfo.occupationalName;
|
|
|
selectModelList[selectType.two].occupationalID = twoInfo.occupationalID;
|
|
|
- selectModelList[selectType.two].occupationList = occupationalCategoryList.value.filter((x: any) => x.professionLevel == "2"
|
|
|
+ selectModelList[selectType.two].occupationList = occupationalCategoryList.value.filter((x: any) => x.occupationalLevel == "2"
|
|
|
&& x.parentOccupationalID == oneInfo.occupationalID).map((x: any) => ({
|
|
|
...x,
|
|
|
isSelect: false
|