ac783df5 by zhaoqian

自然幢目录树的更新查询接口联调

1 parent 04b57908
......@@ -71,3 +71,16 @@ export function getTree(zdbsm) {
}
})
}
/**
* 根据自然幢BSM获取左侧目录树
*/
export function getTreeByZrzbsm(zrzbsm) {
return request({
url: 'system/xzq/getMenuTreeByZrzbsm',
method: 'get',
params: {
zrzbsm
}
})
}
\ No newline at end of file
......
......@@ -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 } from "../api/common";
import { getTree,getDdicByMC,getTreeList,getTreeByZrzbsm } from "../api/common";
export default {
components: {
......@@ -194,14 +194,14 @@ export default {
if (newPath == "/zd") {
this.getRightTree(this.$store.state.zdbsm);
}else if (newPath == "/zrz") {
this.getRightTree(this.$store.state.zdbsm);
this.getRightTreeByZrzbsm(this.$store.state.zrzbsm);
}else {
this.getTreeList();
}
},
"$store.state.zdbsm": function(bsm) {
this.getRightTree(bsm);
},
// "$store.state.zdbsm": function(bsm) {
// this.getRightTree(bsm);
// },
},
created() {
if (this.$route.meta) {
......@@ -282,6 +282,14 @@ export default {
}
});
},
getRightTreeByZrzbsm(bsm) {
getTreeByZrzbsm(bsm).then((res) => {
if (res.success) {
this.pd = res.result;
}
});
},
sortNavigation(data, selectId) {
let headTop = this.headTop;
data.forEach((item, index) => {
......
......@@ -258,7 +258,7 @@ export default {
//todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm
this.$refs['ruleForm1'].validate((valid) => {
if (valid) {
insertDzjbxx(this.ruleForm1)
insertZrzjbxx(this.ruleForm1)
.then((res) => {
if (res.code == "200") {
this.$message({
......
......@@ -109,6 +109,7 @@
let path = "";
switch (row.dylx) {
case "zrz":
this.$store.state.zrzbsm = row.glbsm;
path = "/zrz";
break;
case "zd":
......