<template>
...
<okpd-folder :folders="okpdList[foldersItem.okpd_code]"></okpd-folder>
...
</template>
<script>
export default {
name: "OkpdFolder",
props: {
folders: Object,
},
data: function() {
return {
okpdList: [],
}
},
methods: {
expand(codeID) {
axios.post('/searchokpd', {code_id: codeID}).then((response) => {
this.okpdList[codeID] = Object.assign({}, this.okpdList, response.data.okpd_list);
});
},
expand2(codeID) {
axios.post('/searchokpd', {code_id: codeID}).then((response) => {
return response.data.okpd_list;
});
},
},
};
</script>