7f5fbad9 by weimo934

feat(Home):左侧行政区

1 parent c579ca83
......@@ -52,7 +52,7 @@ export function getDdicByMC(mc) {
/**
* 根据宗地BSM获取左侧目录树
*/
export function getTree(bsm) {
export function getTree(zdbsm) {
return request({
url: 'system/xzq/getMenuTreeByZdbsm',
method: 'get',
......
......@@ -39,7 +39,7 @@
active_color: item.expand,
}"
>
{{ item.label }}
{{ item.mc }}
</div>
</div>
<line-item
......
......@@ -28,7 +28,7 @@
reTree_expand_icon: !item.expand && item.children.length > 0,
}"
></div>
<div class="layer_text nowrap">{{ item.label }}</div>
<div class="layer_text nowrap">{{ item.mc }}</div>
</div>
<lineItem
......
......@@ -234,7 +234,6 @@ export default {
console.log(data);
insertZrzjbxx(data)
.then((res) => {
console.log(res.result);
if (res.code == "200") {
this.$message({
message: "创建成功!",
......@@ -244,6 +243,9 @@ export default {
this.close();
this.$store.zdbsm=res.result.zdbsm;
this.$store.zrzbsm=res.result.bsm;
debugger
console.log("=================================================")
console.log(this.$store.zdbsm)
this.$store.xmmc=res.result.xmmc;
this.$router.push({
path: '/zrz', query:{data: res.result}
......
......@@ -162,10 +162,6 @@
},
mounted() {
// 该标识码继承过来
let bsm = '401044005bad0557d5e3787239d8e18e';
this.bsm=bsm;
this.getData(this.bsm)
},
methods: {
getData(bsm) {
......@@ -260,7 +256,11 @@
}
},
computed: {},
watch: {},
watch: {
"$store.state.zdbsm": function (bsm) {
this.getData(bsm)
}
},
}
</script>
<style scoped lang="less">
......
......@@ -228,10 +228,7 @@
},
mounted() {
// 该标识码继承过来
let bsm = '044dc12648a1f41374679281da63e93b';
this.bsm=bsm;
this.getData(this.bsm)
},
methods: {
getData(bsm) {
......@@ -325,7 +322,11 @@
}
},
computed: {},
watch: {},
watch: {
"$store.state.zdbsm": function (bsm) {
this.getData(bsm)
}
},
}
</script>
<style scoped lang="less">
......
......@@ -52,6 +52,7 @@
<script>
import {savemjft} from '../../../api/zd'
import {Message} from 'element-ui'
export default {
name: "index",
data() {
......@@ -81,7 +82,7 @@
methods: {
save() {
console.log(this.mjftData);
for (let val of this.mjftData.addQjZdftdzwRequestList){
for (let val of this.mjftData.addQjZdftdzwRequestList) {
if (val.dzwdm == '') {
Message.error("定着物代码不能为空")
return
......@@ -90,9 +91,9 @@
savemjft(this.mjftData).then(res => {
console.log(res)
if (res.success){
if (res.success) {
Message.success("保存成功")
}else {
} else {
Message.error(res.message)
}
}).catch(error => {
......@@ -169,13 +170,21 @@
console.log("create init...")
},
mounted() {
// 暂时随机生成 后续从调查表继承过来
this.mjftData.zdbsm = 'ZDDM' + parseInt(Math.random() * 100)
this.mjftData.zdmj = (Math.random() * 1000).toFixed(3)
let zl = ['西安', '咸阳', '雁塔区', '高新区', '未央区', '莲湖区', '临潼区']
let i = parseInt(Math.random() * 7, 10);
this.mjftData.tdzl = zl[i]
console.log("mounted init...")
},
watch: {
"$store.state.zdbsm": function (bsm) {
alert("面积分摊表 宗地标识码"+bsm)
this.mjftData.zdbsm = bsm
},
"$store.state.zdmj": function (zdmj) {
alert("面积分摊表 宗地面积"+zdmj)
this.mjftData.zdmj = zdmj
},
"$store.state.zdzl": function (tdzl) {
alert("面积分摊表 土地坐落"+tdzl)
this.mjftData.tdzl = tdzl
},
}
}
</script>
......