465c4e8e by xukangle

fix: 分类分级查询

1 parent 23cc819c
......@@ -34,6 +34,8 @@ import { getLabelList } from "@/api/modules/dataLabel";
const currentPath = ref<string[]>([]);
const { proxy } = getCurrentInstance() as any;
const route = useRoute();
// 分级引用refGradeGuid
const refGradeGuid = ref('');
// 分级分类树形列表
const CgDirTreeList = ref();
const getCgDirTreeData = async () => {
......@@ -49,6 +51,7 @@ const getCgDirTreeData = async () => {
treeInfo.value.expandedKey.push(res.data[0].classifyDetailGuid);
treeInfo.value.currentNodeKey = res.data[0].classifyDetailGuid;
searchItemList.value[1].options = res.data;
refGradeGuid.value = res.data[0].refGradeGuid;
treeInfo.value.loading = false;
} else {
proxy.$ElMessage.error(res.msg);
......@@ -117,6 +120,7 @@ onMounted(async () => {
getDictionaryList();
getSearchTableList();
getLabelListData();
getGradeData(refGradeGuid.value);
})
......@@ -159,7 +163,7 @@ const searchItemList = ref([
options: [],
props: {
label: 'label',
value: 'label',
value: 'guid',
},
clearable: true,
filterable: true,
......@@ -176,7 +180,7 @@ const searchItemList = ref([
lazy: false,
props: {
label: "classifyName",
value: "classifyName",
value: "guid",
},
block: false,
filterable: false,
......@@ -192,7 +196,7 @@ const searchItemList = ref([
options: [],
props: {
label: 'name',
value: 'name',
value: 'guid',
},
clearable: true,
},
......@@ -216,7 +220,7 @@ const toSearch = (val: any, clear: boolean = false) => {
execGuid: execGuidInfo.value.execGuid,
classifyDetail: val.classifyName,
gradeDetailGuid: val.levelName,
label: val.labelName,
labelGuid: val.labelName,
databaseGuid: selectedA.value,
tableGuid: selectedB.value,
fieldGuid: selectedC.value,
......@@ -253,7 +257,7 @@ const toSearch = (val: any, clear: boolean = false) => {
const nodeClick = async (data: any) => {
console.log('nodeClick', data);
const { guid, classifyDetailGuid, refGradeGuid } = data
getGradeData(refGradeGuid);
// getGradeData(refGradeGuid);
searchItemList.value[1].default = data.classifyName;
await getCgDirFieldPage({
execGuid: execGuidInfo.value.execGuid,
......@@ -1264,7 +1268,7 @@ const exportDB = async () => {
// 分类选择
const treeSelectNodeChange = (node, item) => {
const { refGradeGuid } = node;
getGradeData(refGradeGuid);
// getGradeData(refGradeGuid);
}
// 这里应该是onActivated 钩子,路由从configure-路由从configure-rules跳转过来要重新请求数据、
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!