ff5c535b by zhaoqian

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

1 parent 599df7a2
...@@ -91,12 +91,13 @@ export function getTree(zdbsm) { ...@@ -91,12 +91,13 @@ export function getTree(zdbsm) {
91 /** 91 /**
92 * 根据自然幢BSM获取左侧目录树 92 * 根据自然幢BSM获取左侧目录树
93 */ 93 */
94 export function getTreeByZrzbsm(zrzbsm) { 94 export function getTreeByBsm(zrzbsm,type) {
95 return request({ 95 return request({
96 url: 'system/xzq/getMenuTreeByZrzbsm', 96 url: 'system/xzq/getMenuTreeByBsm',
97 method: 'get', 97 method: 'get',
98 params: { 98 params: {
99 zrzbsm 99 bsm:zrzbsm,
100 type:type
100 } 101 }
101 }) 102 })
102 } 103 }
......
...@@ -52,7 +52,7 @@ import Navigation from "../components/IvyElement/navigation"; ...@@ -52,7 +52,7 @@ import Navigation from "../components/IvyElement/navigation";
52 import Create from "./panel/create/index"; 52 import Create from "./panel/create/index";
53 import LineTree from "../components/lineTree/lineTree"; 53 import LineTree from "../components/lineTree/lineTree";
54 import { setTimeout } from "timers"; 54 import { setTimeout } from "timers";
55 import { getTree,getDdicByMC,getTreeList,getTreeByZrzbsm } from "../api/common"; 55 import { getTree,getDdicByMC,getTreeList,getTreeByBsm } from "../api/common";
56 56
57 export default { 57 export default {
58 components: { 58 components: {
...@@ -144,7 +144,9 @@ export default { ...@@ -144,7 +144,9 @@ export default {
144 this.getRightTree(this.$store.state.zdbsm); 144 this.getRightTree(this.$store.state.zdbsm);
145 }else if (newPath == "/zrz") { 145 }else if (newPath == "/zrz") {
146 this.getRightTreeByZrzbsm(this.$store.state.zrzbsm); 146 this.getRightTreeByZrzbsm(this.$store.state.zrzbsm);
147 }else { 147 }else if(newPath == "/dz"){
148 this.getRightTreeByDzbsm(this.$store.state.dzbsm);
149 } else {
148 this.getTreeList(); 150 this.getTreeList();
149 } 151 }
150 }, 152 },
...@@ -241,12 +243,21 @@ export default { ...@@ -241,12 +243,21 @@ export default {
241 }, 243 },
242 244
243 getRightTreeByZrzbsm(bsm) { 245 getRightTreeByZrzbsm(bsm) {
244 getTreeByZrzbsm(bsm).then((res) => { 246 getTreeByBsm(bsm,"zrz").then((res) => {
247 if (res.success) {
248 this.pd = res.result;
249 }
250 });
251 },
252
253 getRightTreeByDzbsm(bsm) {
254 getTreeByBsm(bsm,"dz").then((res) => {
245 if (res.success) { 255 if (res.success) {
246 this.pd = res.result; 256 this.pd = res.result;
247 } 257 }
248 }); 258 });
249 }, 259 },
260
250 sortNavigation(data, selectId) { 261 sortNavigation(data, selectId) {
251 let headTop = this.headTop; 262 let headTop = this.headTop;
252 data.forEach((item, index) => { 263 data.forEach((item, index) => {
......