|
@@ -139,11 +139,12 @@ ion-segment-button {
|
|
|
<script lang="ts">
|
|
|
import {defineComponent, reactive, ref} from 'vue';
|
|
|
import {getAllIndustryList} from "@/api/recommendmgt";
|
|
|
+import {onIonViewDidEnter} from "@ionic/vue";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: "industrySelection",
|
|
|
props: {
|
|
|
- CurIndustryID: {type: String, default: ''},
|
|
|
+ IndustryId: {type: String, default: ''},
|
|
|
},
|
|
|
setup(props, context) {
|
|
|
const selectType = {
|
|
@@ -170,27 +171,36 @@ export default defineComponent({
|
|
|
industryId: '',
|
|
|
industryList: [] as any
|
|
|
}]);
|
|
|
- const selectIndustryInfo = reactive({value: '', text: ''})
|
|
|
+ const selectIndustryInfo = reactive({value: '', text: ''});
|
|
|
const allIndustryList = ref();
|
|
|
|
|
|
const loadIndustryID = () => {
|
|
|
getAllIndustryList().then(data => {
|
|
|
allIndustryList.value = data;
|
|
|
- if (!props.CurIndustryID) {
|
|
|
- selectIndustryInfo.value = ""
|
|
|
- selectIndustryInfo.text = ""
|
|
|
+ if (!props.IndustryId) {
|
|
|
+ selectIndustryInfo.text='';
|
|
|
+ selectIndustryInfo.value='';
|
|
|
selectModelList[selectType.one].isSelect = true;
|
|
|
selectModelList[selectType.one].disabled = false;
|
|
|
- selectModelList[selectType.one].industryName = ''
|
|
|
- selectModelList[selectType.one].industryId = ''
|
|
|
+ selectModelList[selectType.one].industryName = '';
|
|
|
+ selectModelList[selectType.one].industryId = '';
|
|
|
selectModelList[selectType.one].industryList = allIndustryList.value.filter((x: any) => x.industryLevel == "1")
|
|
|
.map((x: any) => ({
|
|
|
...x,
|
|
|
isSelect: false
|
|
|
}));
|
|
|
+ selectModelList[selectType.two].isSelect = false;
|
|
|
+ selectModelList[selectType.two].disabled = false;
|
|
|
+ selectModelList[selectType.two].industryName = '';
|
|
|
+ selectModelList[selectType.two].industryId = '';
|
|
|
+ selectModelList[selectType.two].industryList = allIndustryList.value.filter((x: any) => x.industryLevel == "2")
|
|
|
+ .map((x: any) => ({
|
|
|
+ ...x,
|
|
|
+ isSelect: false
|
|
|
+ }));
|
|
|
}
|
|
|
else {
|
|
|
- const twoInfo = allIndustryList.value.find((x: any) => x.industryLevel == "2" && x.industryId == props.CurIndustryID);
|
|
|
+ const twoInfo = allIndustryList.value.find((x: any) => x.industryLevel == "2" && x.industryId == props.IndustryId);
|
|
|
const oneInfo = allIndustryList.value.find((x: any) => x.industryLevel == "1" && x.industryId == twoInfo.parentId);
|
|
|
|
|
|
selectModelList[selectType.one].isSelect = false;
|