822b416e by 杨威
2 parents c5dd9b95 5e282b4d
VUE_APP_api = 'http://192.168.2.108:8000'
VUE_APP_api1 = 'http://192.168.2.76:8000'
VUE_APP_api2 = 'http://192.168.2.108:8006'
VUE_APP_api = 'http://192.168.2.48:8006'
VUE_APP_api1 = 'http://127.0.0.1:8006'
VUE_APP_api2 = 'http://192.168.2.9:8006'
VUE_APP_name = '开发环境'
NODE_ENV="development"
VUE_APP_VERSION = 'psh'
\ No newline at end of file
......
......@@ -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
......
......@@ -141,4 +141,15 @@ export function jzxsbatchModify(data) {
})
}
/**x
*根据宗地Bsm删除宗地信息
*/
export function deleteZdInfoByBsm(data){
return request({
url: '/zd/qjZdjbxx/deleteZdjbxxByBsm',
method: 'delete',
data: data
})
}
......
......@@ -98,6 +98,7 @@ export default {
this.$emit("changeTop", y);
this.$emit("changeLeft", x);
this.$emit("changeVisible", true);
this.$emit("changeZdData",item);
} else if (item.zrzbsm) {
var x = e.pageX;
var y = e.pageY;
......
......@@ -35,6 +35,7 @@
v-if="item.expand && item.children.length > 0"
v-on="$listeners"
@changeTop="changeTop"
@changeZdData="changeZdData"
@changeLeft="changeLeft"
@changeVisible="changeVisible"
@changeIsZD="changeIsZD"
......@@ -56,11 +57,13 @@
<li v-show="!isZD">导入楼盘</li>
<li>重叠分析</li>
<li v-show="isZD">添加定着物</li>
<li @click="deleteByBsm()">删除</li>
</ul>
</div>
</template>
<script>
import lineItem from "./lineItem.vue";
import {deleteZdInfoByBsm} from "../../api/zd";
export default {
inheritAttrs: false,
props: {
......@@ -80,6 +83,7 @@ export default {
top: 0,
left: 0,
isZD: true,
zdData:{}
};
},
watch: {
......@@ -99,6 +103,9 @@ export default {
changeVisible(data) {
this.visible = data;
},
changeZdData(data) {
this.zdData = data
},
changeTop(data) {
this.top = data;
},
......@@ -151,6 +158,26 @@ export default {
this.selectedDetail = data;
this.$emit("detailDoubleClick", data);
},
deleteByBsm(){
var zdBsm = this.zdData.zdbsm;
console.log(zdBsm);
deleteZdInfoByBsm(zdBsm)
.then((res) => {
if(res.code=200){
this.$message({
message: res.message,
type: "success",
});
} else {
this.$message({
message: res.message,
type: "warning",
});
}
})
.catch((error) => {});
},
},
};
</script>
......
......@@ -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) => {
......
......@@ -247,7 +247,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":
......
......@@ -44,12 +44,13 @@ module.exports = {
},
devServer: {
host: "127.0.0.1",
port: 8006,
port: 8008,
https: false,
hotOnly: false,
proxy: {
"/api": {
target: process.env.VUE_APP_api2,
//target: process.env.VUE_APP_api, //巍巍
target: process.env.VUE_APP_api1, //本地
changeOrigin: true,
pathRewrite: {
"^/api": "/",
......