diff --git a/src/views/data/ComplaintCollection.vue b/src/views/data/ComplaintCollection.vue index df560c7..2840443 100644 --- a/src/views/data/ComplaintCollection.vue +++ b/src/views/data/ComplaintCollection.vue @@ -5,18 +5,16 @@ - - - - - - + filterable + show-all-levels + placeholder="请选择来源(一级/二级)" + style="width: 100%" + /> @@ -412,10 +410,35 @@ const show = ref(false); // region 列表 + + + const query = ref({ size: 10, current: 1, + sourcePath: [], + sourceTableList: [], + sourceTableSubOneList: [], }); +watch( + () => query.value.sourcePath, + (paths = []) => { + const tableSet = new Set() + const subSet = new Set() + + paths.forEach(path => { + if (!Array.isArray(path)) return + if (path[0]) tableSet.add(path[0]) + if (path[1]) subSet.add(path[1]) + }) + + query.value.sourceTableList = Array.from(tableSet) + query.value.sourceTableSubOneList = Array.from(subSet) + }, + { deep: true } +) + + const list = ref([]); const total = ref(0); const loading = ref(false) @@ -423,7 +446,13 @@ const getList = async () => { console.log("===============xxx==================") console.log(dict.value.sfssSourceTable) loading.value = true; - let res = await getComplaintCollectionPage(query.value); + + const params = { + ...query.value, + } + delete params.sourcePath + + let res = await getComplaintCollectionPage(params); console.log(res.complaintCollectionPageDTOS); list.value = res.complaintCollectionPageDTOS; total.value = res.total;