自然幢目录树的更新查询接口联调
Showing
4 changed files
with
28 additions
and
6 deletions
... | @@ -71,3 +71,16 @@ export function getTree(zdbsm) { | ... | @@ -71,3 +71,16 @@ export function getTree(zdbsm) { |
71 | } | 71 | } |
72 | }) | 72 | }) |
73 | } | 73 | } |
74 | |||
75 | /** | ||
76 | * 根据自然幢BSM获取左侧目录树 | ||
77 | */ | ||
78 | export function getTreeByZrzbsm(zrzbsm) { | ||
79 | return request({ | ||
80 | url: 'system/xzq/getMenuTreeByZrzbsm', | ||
81 | method: 'get', | ||
82 | params: { | ||
83 | zrzbsm | ||
84 | } | ||
85 | }) | ||
86 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -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 } from "../api/common"; | 55 | import { getTree,getDdicByMC,getTreeList,getTreeByZrzbsm } from "../api/common"; |
56 | 56 | ||
57 | export default { | 57 | export default { |
58 | components: { | 58 | components: { |
... | @@ -194,14 +194,14 @@ export default { | ... | @@ -194,14 +194,14 @@ export default { |
194 | if (newPath == "/zd") { | 194 | if (newPath == "/zd") { |
195 | this.getRightTree(this.$store.state.zdbsm); | 195 | this.getRightTree(this.$store.state.zdbsm); |
196 | }else if (newPath == "/zrz") { | 196 | }else if (newPath == "/zrz") { |
197 | this.getRightTree(this.$store.state.zdbsm); | 197 | this.getRightTreeByZrzbsm(this.$store.state.zrzbsm); |
198 | }else { | 198 | }else { |
199 | this.getTreeList(); | 199 | this.getTreeList(); |
200 | } | 200 | } |
201 | }, | 201 | }, |
202 | "$store.state.zdbsm": function(bsm) { | 202 | // "$store.state.zdbsm": function(bsm) { |
203 | this.getRightTree(bsm); | 203 | // this.getRightTree(bsm); |
204 | }, | 204 | // }, |
205 | }, | 205 | }, |
206 | created() { | 206 | created() { |
207 | if (this.$route.meta) { | 207 | if (this.$route.meta) { |
... | @@ -282,6 +282,14 @@ export default { | ... | @@ -282,6 +282,14 @@ export default { |
282 | } | 282 | } |
283 | }); | 283 | }); |
284 | }, | 284 | }, |
285 | |||
286 | getRightTreeByZrzbsm(bsm) { | ||
287 | getTreeByZrzbsm(bsm).then((res) => { | ||
288 | if (res.success) { | ||
289 | this.pd = res.result; | ||
290 | } | ||
291 | }); | ||
292 | }, | ||
285 | sortNavigation(data, selectId) { | 293 | sortNavigation(data, selectId) { |
286 | let headTop = this.headTop; | 294 | let headTop = this.headTop; |
287 | data.forEach((item, index) => { | 295 | data.forEach((item, index) => { | ... | ... |
... | @@ -258,7 +258,7 @@ export default { | ... | @@ -258,7 +258,7 @@ export default { |
258 | //todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm | 258 | //todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm |
259 | this.$refs['ruleForm1'].validate((valid) => { | 259 | this.$refs['ruleForm1'].validate((valid) => { |
260 | if (valid) { | 260 | if (valid) { |
261 | insertDzjbxx(this.ruleForm1) | 261 | insertZrzjbxx(this.ruleForm1) |
262 | .then((res) => { | 262 | .then((res) => { |
263 | if (res.code == "200") { | 263 | if (res.code == "200") { |
264 | this.$message({ | 264 | this.$message({ | ... | ... |
... | @@ -109,6 +109,7 @@ | ... | @@ -109,6 +109,7 @@ |
109 | let path = ""; | 109 | let path = ""; |
110 | switch (row.dylx) { | 110 | switch (row.dylx) { |
111 | case "zrz": | 111 | case "zrz": |
112 | this.$store.state.zrzbsm = row.glbsm; | ||
112 | path = "/zrz"; | 113 | path = "/zrz"; |
113 | break; | 114 | break; |
114 | case "zd": | 115 | case "zd": | ... | ... |
-
Please register or sign in to post a comment