2019-07-31 15:35:23 +00:00
|
|
|
export default class NodeService {
|
2022-12-27 20:54:26 +00:00
|
|
|
constructor() {
|
|
|
|
const runtimeConfig = useRuntimeConfig();
|
2022-12-28 08:48:05 +00:00
|
|
|
|
2022-12-27 20:54:26 +00:00
|
|
|
this.contextPath = runtimeConfig.public.contextPath;
|
|
|
|
}
|
|
|
|
|
2019-07-31 15:35:23 +00:00
|
|
|
getTreeTableNodes() {
|
2022-12-27 20:54:26 +00:00
|
|
|
return fetch(this.contextPath + 'demo/data/treetablenodes.json')
|
2022-09-14 14:26:41 +00:00
|
|
|
.then((res) => res.json())
|
|
|
|
.then((d) => d.root);
|
2019-07-31 15:35:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
getTreeNodes() {
|
2022-12-27 20:54:26 +00:00
|
|
|
return fetch(this.contextPath + 'demo/data/treenodes.json')
|
2022-09-14 14:26:41 +00:00
|
|
|
.then((res) => res.json())
|
|
|
|
.then((d) => d.root);
|
2019-07-31 15:35:23 +00:00
|
|
|
}
|
2021-10-05 07:41:07 +00:00
|
|
|
}
|