ff5c535b by zhaoqian

多幢页面跳转,左侧目录树监听

1 parent 599df7a2
......@@ -91,12 +91,13 @@ export function getTree(zdbsm) {
/**
* 根据自然幢BSM获取左侧目录树
*/
export function getTreeByZrzbsm(zrzbsm) {
export function getTreeByBsm(zrzbsm,type) {
return request({
url: 'system/xzq/getMenuTreeByZrzbsm',
url: 'system/xzq/getMenuTreeByBsm',
method: 'get',
params: {
zrzbsm
bsm:zrzbsm,
type:type
}
})
}
......
......@@ -52,7 +52,7 @@ import Navigation from "../components/IvyElement/navigation";
import Create from "./panel/create/index";
import LineTree from "../components/lineTree/lineTree";
import { setTimeout } from "timers";
import { getTree,getDdicByMC,getTreeList,getTreeByZrzbsm } from "../api/common";
import { getTree,getDdicByMC,getTreeList,getTreeByBsm } from "../api/common";
export default {
components: {
......@@ -144,7 +144,9 @@ export default {
this.getRightTree(this.$store.state.zdbsm);
}else if (newPath == "/zrz") {
this.getRightTreeByZrzbsm(this.$store.state.zrzbsm);
}else {
}else if(newPath == "/dz"){
this.getRightTreeByDzbsm(this.$store.state.dzbsm);
} else {
this.getTreeList();
}
},
......@@ -241,12 +243,21 @@ export default {
},
getRightTreeByZrzbsm(bsm) {
getTreeByZrzbsm(bsm).then((res) => {
getTreeByBsm(bsm,"zrz").then((res) => {
if (res.success) {
this.pd = res.result;
}
});
},
getRightTreeByDzbsm(bsm) {
getTreeByBsm(bsm,"dz").then((res) => {
if (res.success) {
this.pd = res.result;
}
});
},
sortNavigation(data, selectId) {
let headTop = this.headTop;
data.forEach((item, index) => {
......