From 5694090781fb8badc7ab31d9a4a38de1856d5eda Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 08 八月 2025 16:30:54 +0800
Subject: [PATCH] feat: 接口对接

---
 packages/components/src/AreaTreeSelect/PositionSelectView.vue |   41 +++++++++++++++++++++++++++++------------
 1 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/packages/components/src/AreaTreeSelect/PositionSelectView.vue b/packages/components/src/AreaTreeSelect/PositionSelectView.vue
index 86ba1cc..14431f9 100644
--- a/packages/components/src/AreaTreeSelect/PositionSelectView.vue
+++ b/packages/components/src/AreaTreeSelect/PositionSelectView.vue
@@ -1,16 +1,16 @@
 <template>
-  <Category :category="industryList" @change="change" class="position-select-view">
+  <Category :category="_industryList" @change="change" class="position-select-view">
     <CategoryPane :max="max" :categoryChild="categoryChild" :multiple="multiple" v-model="model">
     </CategoryPane>
   </Category>
 </template>
 
 <script setup lang="ts">
-import { useAllSearchSettingList, useSearchSettingType } from '@12333/hooks';
+import { useDictionaryDataSelect, useGetDictionaryCategorySelect } from '@12333/hooks';
 import Category from './Category.vue';
 import CategoryPane from './CategoryPane.vue';
 import { reactive, computed, watch } from 'vue';
-import { SearchType } from '@12333/constants';
+import { CategoryCode } from '@12333/constants';
 
 defineOptions({
   name: 'PositionSelectView',
@@ -28,27 +28,44 @@
 const model = defineModel<string[]>();
 
 const state = reactive({
-  provinceIndex: 0,
+  industryIndex: 0,
 });
 
-const { allSearchSettingList: positionList } = useAllSearchSettingList({
-  searchType: SearchType.Position,
+const { dictionaryDataList: industryList } = useDictionaryDataSelect({
+  categoryCode: CategoryCode.IndustryCategory,
 });
-const { searchSettingTypeList: industryList } = useSearchSettingType({
-  searchType: SearchType.IndustryCategory,
+
+const _industryList = computed(() =>
+  industryList.value.map((x) => ({
+    ...x,
+    name: x.label,
+    id: x.value,
+  }))
+);
+
+const { dictionaryDataList: positionList } = useDictionaryDataSelect({
+  categoryCode: CategoryCode.Position,
 });
+
+const _positionList = computed(() =>
+  positionList.value.map((x) => ({
+    ...x,
+    name: x.label,
+    id: x.value,
+  }))
+);
 
 const categoryChild = computed(() => {
-  if (!industryList.value.length) {
+  if (!_industryList.value.length) {
     return [];
   }
-  return positionList.value?.filter(
-    (x) => x.parentName === industryList.value[state.provinceIndex].name
+  return _positionList.value?.filter(
+    (x) => x.data.field1 === _industryList.value[state.industryIndex]?.code
   );
 });
 
 const change = (index: number) => {
-  state.provinceIndex = index;
+  state.industryIndex = index;
 };
 </script>
 

--
Gitblit v1.9.1