|
|
@@ -17,7 +17,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { getTreeByPid } from '@/api/classifyManage';
|
|
|
+ import { getTreeByPid, getPcTreeByPids } from '@/api/classifyManage';
|
|
|
// let originId = '';
|
|
|
// let originType = '';
|
|
|
export default {
|
|
|
@@ -55,6 +55,10 @@
|
|
|
nodeKey: {
|
|
|
type: String,
|
|
|
default: 'id'
|
|
|
+ },
|
|
|
+ ids: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
}
|
|
|
// appendRoot: {
|
|
|
// type: Boolean,
|
|
|
@@ -83,8 +87,8 @@
|
|
|
async getTreeData() {
|
|
|
try {
|
|
|
this.treeLoading = true;
|
|
|
-
|
|
|
- const res = await getTreeByPid(this.id);
|
|
|
+
|
|
|
+ const res =await (this.ids ? getPcTreeByPids(this.ids): getTreeByPid(this.id));
|
|
|
this.treeLoading = false;
|
|
|
if (res?.code === '0') {
|
|
|
this.treeList = res.data;
|
|
|
@@ -108,7 +112,6 @@
|
|
|
this.treeLoading = false;
|
|
|
},
|
|
|
|
|
|
-
|
|
|
handleNodeClick(data, node) {
|
|
|
this.$emit('handleNodeClick', data, node);
|
|
|
},
|