feat(Home):左侧行政区
Showing
9 changed files
with
72 additions
and
46 deletions
... | @@ -52,7 +52,7 @@ export function getDdicByMC(mc) { | ... | @@ -52,7 +52,7 @@ export function getDdicByMC(mc) { |
52 | /** | 52 | /** |
53 | * 根据宗地BSM获取左侧目录树 | 53 | * 根据宗地BSM获取左侧目录树 |
54 | */ | 54 | */ |
55 | export function getTree(bsm) { | 55 | export function getTree(zdbsm) { |
56 | return request({ | 56 | return request({ |
57 | url: 'system/xzq/getMenuTreeByZdbsm', | 57 | url: 'system/xzq/getMenuTreeByZdbsm', |
58 | method: 'get', | 58 | method: 'get', | ... | ... |
... | @@ -28,7 +28,7 @@ | ... | @@ -28,7 +28,7 @@ |
28 | reTree_expand_icon: !item.expand && item.children.length > 0, | 28 | reTree_expand_icon: !item.expand && item.children.length > 0, |
29 | }" | 29 | }" |
30 | ></div> | 30 | ></div> |
31 | <div class="layer_text nowrap">{{ item.label }}</div> | 31 | <div class="layer_text nowrap">{{ item.mc }}</div> |
32 | </div> | 32 | </div> |
33 | 33 | ||
34 | <lineItem | 34 | <lineItem | ... | ... |
... | @@ -44,19 +44,21 @@ | ... | @@ -44,19 +44,21 @@ |
44 | </el-dialog> | 44 | </el-dialog> |
45 | </el-header> | 45 | </el-header> |
46 | <el-main> | 46 | <el-main> |
47 | <router-view /> | 47 | <router-view/> |
48 | </el-main> | 48 | </el-main> |
49 | </el-container> | 49 | </el-container> |
50 | </el-container> | 50 | </el-container> |
51 | </div> | 51 | </div> |
52 | </template> | 52 | </template> |
53 | <script> | 53 | <script> |
54 | import util from "@/libs/util.js"; | 54 | import util from "@/libs/util.js"; |
55 | import Navigation from "../components/IvyElement/navigation"; | 55 | import Navigation from "../components/IvyElement/navigation"; |
56 | import Create from "./panel/create/index"; | 56 | import Create from "./panel/create/index"; |
57 | import LineTree from "../components/lineTree/lineTree"; | 57 | import LineTree from "../components/lineTree/lineTree"; |
58 | import { setTimeout } from "timers"; | 58 | import {setTimeout} from "timers"; |
59 | export default { | 59 | import {getTree} from "../api/common" |
60 | |||
61 | export default { | ||
60 | components: { | 62 | components: { |
61 | Navigation, | 63 | Navigation, |
62 | LineTree, | 64 | LineTree, |
... | @@ -125,28 +127,28 @@ export default { | ... | @@ -125,28 +127,28 @@ export default { |
125 | }, | 127 | }, |
126 | pd: [ | 128 | pd: [ |
127 | { | 129 | { |
128 | label: "行政区(1)", | 130 | mc: "行政区(1)", |
129 | children: [], | 131 | children: [], |
130 | }, | 132 | }, |
131 | { | 133 | { |
132 | label: "行政区(2)", | 134 | mc: "行政区(2)", |
133 | children: [ | 135 | children: [ |
134 | { | 136 | { |
135 | label: "地籍区1", | 137 | mc: "地籍区1", |
136 | children: [], | 138 | children: [], |
137 | }, | 139 | }, |
138 | { | 140 | { |
139 | label: "地籍区2", | 141 | mc: "地籍区2", |
140 | children: [ | 142 | children: [ |
141 | { | 143 | { |
142 | label: "国有", | 144 | mc: "国有", |
143 | children: [ | 145 | children: [ |
144 | { | 146 | { |
145 | label: "宗地代码1933", | 147 | mc: "宗地代码1933", |
146 | isZD: true, | 148 | isZD: true, |
147 | }, | 149 | }, |
148 | { | 150 | { |
149 | label: "自然幢2100", | 151 | mc: "自然幢2100", |
150 | isZD: false, | 152 | isZD: false, |
151 | }, | 153 | }, |
152 | ], | 154 | ], |
... | @@ -164,15 +166,15 @@ export default { | ... | @@ -164,15 +166,15 @@ export default { |
164 | ], | 166 | ], |
165 | }, | 167 | }, |
166 | { | 168 | { |
167 | label: "行政区(3)", | 169 | mc: "行政区(3)", |
168 | children: [], | 170 | children: [], |
169 | }, | 171 | }, |
170 | { | 172 | { |
171 | label: "行政区(4)", | 173 | mc: "行政区(4)", |
172 | children: [], | 174 | children: [], |
173 | }, | 175 | }, |
174 | { | 176 | { |
175 | label: "行政区(5)", | 177 | mc: "行政区(5)", |
176 | children: [], | 178 | children: [], |
177 | }, | 179 | }, |
178 | ], | 180 | ], |
... | @@ -185,7 +187,7 @@ export default { | ... | @@ -185,7 +187,7 @@ export default { |
185 | }, | 187 | }, |
186 | }, | 188 | }, |
187 | watch: { | 189 | watch: { |
188 | "$route.path": function(newPath) { | 190 | "$route.path": function (newPath) { |
189 | //监测路由变化,高亮顶部导航 | 191 | //监测路由变化,高亮顶部导航 |
190 | this.headTop.forEach((item, index) => { | 192 | this.headTop.forEach((item, index) => { |
191 | item.select = false; | 193 | item.select = false; |
... | @@ -194,6 +196,9 @@ export default { | ... | @@ -194,6 +196,9 @@ export default { |
194 | } | 196 | } |
195 | }); | 197 | }); |
196 | }, | 198 | }, |
199 | "$store.state.zdbsm": function (bsm) { | ||
200 | this.getRightTree(bsm) | ||
201 | } | ||
197 | }, | 202 | }, |
198 | created() { | 203 | created() { |
199 | if (this.$route.meta) { | 204 | if (this.$route.meta) { |
... | @@ -215,7 +220,7 @@ export default { | ... | @@ -215,7 +220,7 @@ export default { |
215 | icon: "fa fa-address-card-o", | 220 | icon: "fa fa-address-card-o", |
216 | path: "/add", | 221 | path: "/add", |
217 | }, | 222 | }, |
218 | { name: "更正", icon: "fa fa-address-card-o", path: "/modify" }, | 223 | {name: "更正", icon: "fa fa-address-card-o", path: "/modify"}, |
219 | { | 224 | { |
220 | name: "变更", | 225 | name: "变更", |
221 | icon: "fa fa-address-card-o", | 226 | icon: "fa fa-address-card-o", |
... | @@ -237,6 +242,15 @@ export default { | ... | @@ -237,6 +242,15 @@ export default { |
237 | // } | 242 | // } |
238 | }, | 243 | }, |
239 | methods: { | 244 | methods: { |
245 | getRightTree(bsm) { | ||
246 | getTree(bsm).then(res => { | ||
247 | console.log("=========================================") | ||
248 | console.log(res) | ||
249 | if (res.success) { | ||
250 | this.pd=res.result | ||
251 | } | ||
252 | }) | ||
253 | }, | ||
240 | sortNavigation(data, selectId) { | 254 | sortNavigation(data, selectId) { |
241 | let headTop = this.headTop; | 255 | let headTop = this.headTop; |
242 | data.forEach((item, index) => { | 256 | data.forEach((item, index) => { |
... | @@ -292,14 +306,14 @@ export default { | ... | @@ -292,14 +306,14 @@ export default { |
292 | console.log(data); | 306 | console.log(data); |
293 | }, | 307 | }, |
294 | //关闭新建子组件弹框 | 308 | //关闭新建子组件弹框 |
295 | closeDialog(){ | 309 | closeDialog() { |
296 | this.dialogVisible = false; | 310 | this.dialogVisible = false; |
297 | } | 311 | } |
298 | }, | 312 | }, |
299 | }; | 313 | }; |
300 | </script> | 314 | </script> |
301 | <style lang="less" scoped> | 315 | <style lang="less" scoped> |
302 | .home-box { | 316 | .home-box { |
303 | width: 100%; | 317 | width: 100%; |
304 | height: 100vh; | 318 | height: 100vh; |
305 | .el-container { | 319 | .el-container { |
... | @@ -404,5 +418,5 @@ export default { | ... | @@ -404,5 +418,5 @@ export default { |
404 | // line-height: 160px; | 418 | // line-height: 160px; |
405 | padding: 0; | 419 | padding: 0; |
406 | } | 420 | } |
407 | } | 421 | } |
408 | </style> | 422 | </style> | ... | ... |
... | @@ -234,7 +234,6 @@ export default { | ... | @@ -234,7 +234,6 @@ export default { |
234 | console.log(data); | 234 | console.log(data); |
235 | insertZrzjbxx(data) | 235 | insertZrzjbxx(data) |
236 | .then((res) => { | 236 | .then((res) => { |
237 | console.log(res.result); | ||
238 | if (res.code == "200") { | 237 | if (res.code == "200") { |
239 | this.$message({ | 238 | this.$message({ |
240 | message: "创建成功!", | 239 | message: "创建成功!", |
... | @@ -244,6 +243,9 @@ export default { | ... | @@ -244,6 +243,9 @@ export default { |
244 | this.close(); | 243 | this.close(); |
245 | this.$store.zdbsm=res.result.zdbsm; | 244 | this.$store.zdbsm=res.result.zdbsm; |
246 | this.$store.zrzbsm=res.result.bsm; | 245 | this.$store.zrzbsm=res.result.bsm; |
246 | debugger | ||
247 | console.log("=================================================") | ||
248 | console.log(this.$store.zdbsm) | ||
247 | this.$store.xmmc=res.result.xmmc; | 249 | this.$store.xmmc=res.result.xmmc; |
248 | this.$router.push({ | 250 | this.$router.push({ |
249 | path: '/zrz', query:{data: res.result} | 251 | path: '/zrz', query:{data: res.result} | ... | ... |
... | @@ -162,10 +162,6 @@ | ... | @@ -162,10 +162,6 @@ |
162 | 162 | ||
163 | }, | 163 | }, |
164 | mounted() { | 164 | mounted() { |
165 | // 该标识码继承过来 | ||
166 | let bsm = '401044005bad0557d5e3787239d8e18e'; | ||
167 | this.bsm=bsm; | ||
168 | this.getData(this.bsm) | ||
169 | }, | 165 | }, |
170 | methods: { | 166 | methods: { |
171 | getData(bsm) { | 167 | getData(bsm) { |
... | @@ -260,7 +256,11 @@ | ... | @@ -260,7 +256,11 @@ |
260 | } | 256 | } |
261 | }, | 257 | }, |
262 | computed: {}, | 258 | computed: {}, |
263 | watch: {}, | 259 | watch: { |
260 | "$store.state.zdbsm": function (bsm) { | ||
261 | this.getData(bsm) | ||
262 | } | ||
263 | }, | ||
264 | } | 264 | } |
265 | </script> | 265 | </script> |
266 | <style scoped lang="less"> | 266 | <style scoped lang="less"> | ... | ... |
... | @@ -228,10 +228,7 @@ | ... | @@ -228,10 +228,7 @@ |
228 | 228 | ||
229 | }, | 229 | }, |
230 | mounted() { | 230 | mounted() { |
231 | // 该标识码继承过来 | 231 | |
232 | let bsm = '044dc12648a1f41374679281da63e93b'; | ||
233 | this.bsm=bsm; | ||
234 | this.getData(this.bsm) | ||
235 | }, | 232 | }, |
236 | methods: { | 233 | methods: { |
237 | getData(bsm) { | 234 | getData(bsm) { |
... | @@ -325,7 +322,11 @@ | ... | @@ -325,7 +322,11 @@ |
325 | } | 322 | } |
326 | }, | 323 | }, |
327 | computed: {}, | 324 | computed: {}, |
328 | watch: {}, | 325 | watch: { |
326 | "$store.state.zdbsm": function (bsm) { | ||
327 | this.getData(bsm) | ||
328 | } | ||
329 | }, | ||
329 | } | 330 | } |
330 | </script> | 331 | </script> |
331 | <style scoped lang="less"> | 332 | <style scoped lang="less"> | ... | ... |
... | @@ -52,6 +52,7 @@ | ... | @@ -52,6 +52,7 @@ |
52 | <script> | 52 | <script> |
53 | import {savemjft} from '../../../api/zd' | 53 | import {savemjft} from '../../../api/zd' |
54 | import {Message} from 'element-ui' | 54 | import {Message} from 'element-ui' |
55 | |||
55 | export default { | 56 | export default { |
56 | name: "index", | 57 | name: "index", |
57 | data() { | 58 | data() { |
... | @@ -81,7 +82,7 @@ | ... | @@ -81,7 +82,7 @@ |
81 | methods: { | 82 | methods: { |
82 | save() { | 83 | save() { |
83 | console.log(this.mjftData); | 84 | console.log(this.mjftData); |
84 | for (let val of this.mjftData.addQjZdftdzwRequestList){ | 85 | for (let val of this.mjftData.addQjZdftdzwRequestList) { |
85 | if (val.dzwdm == '') { | 86 | if (val.dzwdm == '') { |
86 | Message.error("定着物代码不能为空") | 87 | Message.error("定着物代码不能为空") |
87 | return | 88 | return |
... | @@ -90,9 +91,9 @@ | ... | @@ -90,9 +91,9 @@ |
90 | 91 | ||
91 | savemjft(this.mjftData).then(res => { | 92 | savemjft(this.mjftData).then(res => { |
92 | console.log(res) | 93 | console.log(res) |
93 | if (res.success){ | 94 | if (res.success) { |
94 | Message.success("保存成功") | 95 | Message.success("保存成功") |
95 | }else { | 96 | } else { |
96 | Message.error(res.message) | 97 | Message.error(res.message) |
97 | } | 98 | } |
98 | }).catch(error => { | 99 | }).catch(error => { |
... | @@ -169,13 +170,21 @@ | ... | @@ -169,13 +170,21 @@ |
169 | console.log("create init...") | 170 | console.log("create init...") |
170 | }, | 171 | }, |
171 | mounted() { | 172 | mounted() { |
172 | // 暂时随机生成 后续从调查表继承过来 | ||
173 | this.mjftData.zdbsm = 'ZDDM' + parseInt(Math.random() * 100) | ||
174 | this.mjftData.zdmj = (Math.random() * 1000).toFixed(3) | ||
175 | let zl = ['西安', '咸阳', '雁塔区', '高新区', '未央区', '莲湖区', '临潼区'] | ||
176 | let i = parseInt(Math.random() * 7, 10); | ||
177 | this.mjftData.tdzl = zl[i] | ||
178 | console.log("mounted init...") | 173 | console.log("mounted init...") |
174 | }, | ||
175 | watch: { | ||
176 | "$store.state.zdbsm": function (bsm) { | ||
177 | alert("面积分摊表 宗地标识码"+bsm) | ||
178 | this.mjftData.zdbsm = bsm | ||
179 | }, | ||
180 | "$store.state.zdmj": function (zdmj) { | ||
181 | alert("面积分摊表 宗地面积"+zdmj) | ||
182 | this.mjftData.zdmj = zdmj | ||
183 | }, | ||
184 | "$store.state.zdzl": function (tdzl) { | ||
185 | alert("面积分摊表 土地坐落"+tdzl) | ||
186 | this.mjftData.tdzl = tdzl | ||
187 | }, | ||
179 | } | 188 | } |
180 | } | 189 | } |
181 | </script> | 190 | </script> | ... | ... |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment