refactor: 更新字典树API参数和面包屑功能
This commit is contained in:
@ -85,6 +85,6 @@ export const tab2 = () => {
|
|||||||
/**
|
/**
|
||||||
* 获取具有上下级关系的当前的名称
|
* 获取具有上下级关系的当前的名称
|
||||||
*/
|
*/
|
||||||
export const getDictTree = (params: { dictType: string }) => {
|
export const getDictTree = (params: { type: number, id: number}) => {
|
||||||
return useDollarFetchRequest.get<IResponse<ProjectDictNodeVO[]>>('/prod-api/app-api/business/dict/level-by-id', { query: params })
|
return useDollarFetchRequest.get<IResponse<ProjectDictNodeVO[]>>('/prod-api/app-api/business/dict/level-by-id', { query: params })
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,6 +54,7 @@
|
|||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { parent } from '~/api/upnew/index'
|
import { parent } from '~/api/upnew/index'
|
||||||
import type { pageReq } from '~/api/upnew/types'
|
import type { pageReq } from '~/api/upnew/types'
|
||||||
|
import { getDictTree } from '~/api/home/index'
|
||||||
import { ArrowRight } from '@element-plus/icons-vue'
|
import { ArrowRight } from '@element-plus/icons-vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -120,6 +121,15 @@
|
|||||||
// }
|
// }
|
||||||
// getEditionsList()
|
// getEditionsList()
|
||||||
|
|
||||||
|
// 获取面包屑
|
||||||
|
const {data: breadList} = await useAsyncData(`breadList-${props.type}-${props.id}-${props.groundId}-${Date.now()}`, async () => {
|
||||||
|
const res = await getDictTree({ type: props.type, id: query.value.projectType })
|
||||||
|
return res.data
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log('breadList', breadList);
|
||||||
|
|
||||||
|
|
||||||
/** 是否是初始化 */
|
/** 是否是初始化 */
|
||||||
const queryType = ref('init')
|
const queryType = ref('init')
|
||||||
/**获取分类下拉框 */
|
/**获取分类下拉框 */
|
||||||
|
|||||||
Reference in New Issue
Block a user