|
|
@@ -41,7 +41,7 @@
|
|
|
|
|
|
import { getMaterialList, getTaskListById } from '@/api/materialPlan/index';
|
|
|
import ProductSearch from './product-search.vue'
|
|
|
-import { getTreeByPid } from '@/api/classifyManage';
|
|
|
+import { getTreeByGroup } from '@/api/classifyManage';
|
|
|
export default {
|
|
|
components: {
|
|
|
ProductSearch
|
|
|
@@ -154,7 +154,7 @@ export default {
|
|
|
|
|
|
pageNum: page,
|
|
|
size: limit,
|
|
|
- categoryLevelId: 1,
|
|
|
+ categoryLevelId: this.categoryLevelId,
|
|
|
dimension: 1
|
|
|
});
|
|
|
return res;
|
|
|
@@ -176,7 +176,7 @@ export default {
|
|
|
try {
|
|
|
this.treeLoading = true;
|
|
|
|
|
|
- const res = await getTreeByPid(1);
|
|
|
+ const res = await getTreeByGroup({ type: 3 });
|
|
|
this.treeLoading = false;
|
|
|
if (res?.code === '0') {
|
|
|
this.treeList = res.data;
|
|
|
@@ -185,6 +185,7 @@ export default {
|
|
|
// 默认高亮第一级树节点
|
|
|
if (this.treeList[0]) {
|
|
|
this.rootTreeId = this.treeList[0].id
|
|
|
+ this.categoryLevelId = this.treeList[0].id
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.treeRef.setCurrentKey(this.treeList[0].id);
|
|
|
});
|
|
|
@@ -206,6 +207,7 @@ export default {
|
|
|
|
|
|
|
|
|
handleNodeClick(data) {
|
|
|
+
|
|
|
this.categoryLevelId = data.id;
|
|
|
this.$refs.table.reload({ pageNum: 1, where: {} });
|
|
|
|