c0d9c30c by zhaoqian

Merge remote-tracking branch 'origin/master'

2 parents e5b0ff8a 8a077920
......@@ -50,7 +50,7 @@ export function getLpb (data,lx) {
method: 'get',
params: {
zrzbsm:data,
syclx:lx,
scyclx:lx,
},
})
}
......@@ -73,7 +73,7 @@ export function batchScYcChange (data) {
*/
export function getLpbTj (data) {
return request({
url: 'fw/lpb/getLpbTj?zrzbsm='+data.zrzbsm+'&syclx='+data.syclx,
url: 'fw/lpb/getLpbTj?zrzbsm='+data.zrzbsm+'&scyclx='+data.scyclx,
method: 'get',
data:data
})
......@@ -102,8 +102,46 @@ export function batchGeneratorBdcdyh (dpdm,zrzbsm) {
*/
export function getLpbFwytAndQlxz (data) {
return request({
url: 'fw/lpb/getLpbFwytAndQlxz?zrzbsm='+data.zrzbsm+'&syclx='+data.syclx,
url: 'fw/lpb/getLpbFwytAndQlxz?zrzbsm='+data.zrzbsm+'&scyclx='+data.scyclx,
method: 'get',
data:data
})
}
\ No newline at end of file
}
/**
* 楼盘表 添加层
// "cbsm": "63147d2d9766db01ead0cd53f23de908",//层标识码
// "hcount": 3,//添加户数
// "scyclx": "1",//实测预测类型
// "sjc": 4//当前的层的SJC ± 1
*/
export function insertUpDownC (data) {
return request({
url: 'fw/lpbright/insertUpDownC',
method: 'post',
data:data
})
}
/**
* 楼盘表 删除层
*"bsm": "c0818d9e4286b35b8ee9b96d90b522aa",
*"scyclx": "1"
*/
export function deleteCByBsm (data) {
return request({
url: '/fw/lpbright/deleteCByBsm',
method: 'delete',
data:data
})
}
/**
* 上下左右移动户
* @param data
*/
export function moveH(data) {
return request({
url:'fw/lpbright/insertMoveH',
method:'post',
data:data
})
}
......
<template>
<div>
<el-dialog
title="移动户"
:visible.sync="isVisible"
width="50%"
@close="close"
:modal-append-to-body="false"
center>
<div>
<div class="bottom-radio">
<el-radio-group v-model="moveHdata.sxzylx">
<el-radio label="up">向上</el-radio>
<el-radio label="down">向下</el-radio>
<el-radio label="left">向左</el-radio>
<el-radio label="right">向右</el-radio>
</el-radio-group>
</div>
<div class="bottom-buttom">
<el-button type="primary" @click="save">确认</el-button>
<el-button type="primary" @click="cacel">取消</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import {moveH} from './../../api/lpb'
import {Message} from 'element-ui'
export default {
name: "moveH",
data() {
return {
isVisible: false,
moveHdata: {
hbsm: "",
sxzylx: "",
type: ""
}
}
},
props: {
moveHvisible: {
type: Boolean,
default: false
},
hbsm: {
type: String
},
type: {
type: String
}
},
methods: {
loading: function () {
this.$emit('loading')
},
save() {
this.moveHdata.hbsm = this.hbsm
this.moveHdata.type = this.type
moveH(this.moveHdata).then(res => {
console.log(res)
if (res.success) {
this.loading();
this.close();
Message.success("移动成功")
} else {
Message.error(res.message)
}
})
},
cacel() {
this.close()
},
close() {
this.$emit('close');
}
},
watch: {
moveHvisible(val) {
this.isVisible = val
}
}
}
</script>
<style scoped lang="less">
.bottom-radio{
text-align: center;
}
.el-radio{
padding: 20px;
}
.bottom-buttom {
margin-top: 20px;
text-align: center;
}
</style>
......@@ -21,24 +21,20 @@
<tr>
<td colspan="2">行政区</td>
<td colspan="2">
<el-form :rules="rules" ref="ruleForm" :inline="true" >
<el-form-item >
<el-select
:disabled="formData.qszt!='0'"
class="formSelect"
v-model="formData.xzqbsm"
@change="changeXzq(formData.xzqbsm)"
>
<el-option
v-for="item in $store.state.xzqList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-select
:disabled="formData.qszt!='0'"
class="formSelect"
v-model="formData.xzqbsm"
@change="changeXzq(formData.xzqbsm)"
>
<el-option
v-for="item in $store.state.xzqList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
<td colspan="2">地籍区</td>
<td colspan="2">
......@@ -375,30 +371,30 @@ export default {
props: {},
data() {
return {
rules: {
hdmc: [
{ required: true, message: '请输入活动名称', trigger: 'blur' },
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
],
xzq: [
{ required: true, message: '请选择活行政区', trigger: 'change' }
],
date1: [
{ type: 'date', required: true, message: '请选择日期', trigger: 'change' }
],
date2: [
{ type: 'date', required: true, message: '请选择时间', trigger: 'change' }
],
type: [
{ type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }
],
resource: [
{ required: true, message: '请选择活动资源', trigger: 'change' }
],
desc: [
{ required: true, message: '请填写活动形式', trigger: 'blur' }
]
},
// rules: {
// hdmc: [
// { required: true, message: '请输入活动名称', trigger: 'blur' },
// { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
// ],
// xzq: [
// { required: true, message: '请选择活行政区', trigger: 'change' }
// ],
// date1: [
// { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
// ],
// date2: [
// { type: 'date', required: true, message: '请选择时间', trigger: 'change' }
// ],
// type: [
// { type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }
// ],
// resource: [
// { required: true, message: '请选择活动资源', trigger: 'change' }
// ],
// desc: [
// { required: true, message: '请填写活动形式', trigger: 'blur' }
// ]
// },
rjl:'',
jzmd:'',
jzxg:'',
......
......@@ -3,7 +3,7 @@
<div class="tab-header">
<el-row class="searchContent">
<el-col :span="8">
<el-radio-group v-model="syclx" @change="syclxChange">
<el-radio-group v-model="scyclx" @change="scyclxChange">
<el-radio-button label="1">实测</el-radio-button>
<el-radio-button label="0">预测</el-radio-button>
</el-radio-group>
......@@ -299,7 +299,7 @@ export default {
plzlVisible: false,
hbjVisible: false,
hcxlzVisible:false,
syclx: "1", //1是实测 0是预测
scyclx: "1", //1是实测 0是预测
radio1: "",
radio2: "",
createFlag: false,
......@@ -438,7 +438,7 @@ export default {
this.plShVisible = false;
},
//改变是预测数据类型
syclxChange(val){
scyclxChange(val){
//清空已选中层户
this.cbsmList = [];
this.bsms = [];
......@@ -602,7 +602,7 @@ export default {
getDyztBsmList() {
let data = {
zrzbsm: this.$store.state.zrzbsm,
syclx: "0",
scyclx: "0",
};
getLpbTj(data).then((res) => {
if (res.code === 200) {
......@@ -651,7 +651,7 @@ export default {
getLpbFwytAndQlxz(){
let data = {
zrzbsm: this.$store.state.zrzbsm,
syclx: "0",
scyclx: "0",
};
getLpbFwytAndQlxz(data).then((res) => {
if (res.code === 200) {
......
<template>
<div class="lpbContent-wrap" ref="lpbContentWrap">
<div class="lpbContent" ref="lpbContent" v-loading='loading'>
<div :class="lpbData.ljzs.length == 0 ? 'column-reverse lpbContent':'lpbContent'" ref="lpbContent" v-loading='loading'>
<div :class="(lpbData.cs.length == 0 && lpbData.zdys.length == 0) ? 'bottom40 ljz-wrap':'ljz-wrap'" :style="{'width':ljzWidth+'px'}" v-show="lpbData.ljzs.length>0">
<!-- 循环逻辑幢数据 -->
<div class="ljz" ref="ljz" v-for="(ljzs,ljzIndex) in lpbData.ljzs" :key="ljzIndex">
......@@ -90,20 +90,41 @@
<li v-show='rightClickFlag=="h"' @click="handleMoveH">移动</li>
<li v-show='rightClickFlag=="h"' @click="handleDeleteH">删除</li>
<li v-show='rightClickFlag=="h"' @click="handleSyczh">实预测转换</li>
<li v-show='rightClickFlag=="c"' @click="handleUpAddC">向上添加层</li>
<li v-show='rightClickFlag=="c"' @click="handleDownAddC">向下添加层</li>
<li v-show='rightClickFlag=="c"' @click="handleAddC('up')">向上添加层</li>
<li v-show='rightClickFlag=="c"' @click="handleAddC('down')">向下添加层</li>
<li v-show='rightClickFlag=="c"' @click="handleDeleteC">删除层</li>
</ul>
<!-- 层操作弹框 -->
<el-dialog :title="addCData.title" :visible.sync="addCVisible" width="50%" center>
<el-form :model="addCData">
<el-form-item label="层号" :label-width="formLabelWidth">
<el-input disabled v-model="addCData.sjc" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="实际层" :label-width="formLabelWidth">
<el-input disabled v-model="addCData.sjc" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="添加的户数" :label-width="formLabelWidth">
<el-input v-model="addCData.hcount" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div class="btnGroup">
<el-button type="primary" @click="saveAddC">保存</el-button>
<el-button type="primary" @click="addCVisible = false">取消</el-button>
</div>
</el-dialog>
<move-h :hbsm="chData.bsm" @close="moveHClose" :move-hvisible="moveHvisible" :type="scyclx" @loading="loadingData"></move-h>
</div>
</template>
<script>
import { getLpb } from "../../../../../api/lpb";
import moveH from "./../../../../../components/moveH/moveH"
import { getLpb,insertUpDownC,deleteCByBsm } from "../../../../../api/lpb";
export default {
name: "",
components: {},
components: {moveH},
props: {},
data() {
return {
moveHvisible:false,
lpbData: {
ljzs: [],
cs: [],
......@@ -128,12 +149,22 @@ export default {
lpbChTop:100,
//右键层户数据
chData:'',
rightClickFlag:""
rightClickFlag:"",
//层操作数据
addCVisible:false,
addCData:{
title:"",
cbsm:"",//层标识码
hcount:"",//添加户数
scyclx:"",//实测预测类型
sjc:"", //当前的层的SJC +1
},
formLabelWidth: '120px'
};
},
created() {},
mounted() {
this.getLpb(this.$store.state.zrzbsm,this.$parent.syclx);
this.getLpb(this.$store.state.zrzbsm,this.$parent.scyclx);
setTimeout(() => {
//tab-content宽度 - 右侧图例宽度 - lp-overview滚动条宽度 - lpbContent的pandingRight
this.lpbContentWidth = this.$store.state.contentWidth - 34 - 20;
......@@ -145,9 +176,12 @@ export default {
}, 200);
},
methods: {
loadingData(){
this.getLpb(this.$store.state.zrzbsm,this.$parent.scyclx);
},
//获取楼盘表数据
getLpb(zrzbsm,syclx) {
getLpb(zrzbsm,syclx).then((res) => {
getLpb(zrzbsm,scyclx) {
getLpb(zrzbsm,scyclx).then((res) => {
if (res.code == 200) {
this.loading = false;
this.lpbData = res.result == null ? this.lpbData : res.result;
......@@ -241,7 +275,7 @@ export default {
// this.zdyWidth = 124;
}
},
//户单击事件
handleTdClick(e, bsm) {
......@@ -321,7 +355,13 @@ export default {
},
handleMoveH(){
// 移动户
console.log(this.chData,"chData")
console.log(this.$parent.scyclx,"实预测类型")
this.moveHvisible=true;
},
moveHClose(){
this.moveHvisible=false;
},
handleDeleteH(){
......@@ -331,32 +371,61 @@ export default {
},
//end
// 层右键菜单 start
handleUpAddC(){
///fw/lpbright/insertUpDownC
//注:应该增加一个弹出窗口,输入新增户数
// {
// "cbsm": "63147d2d9766db01ead0cd53f23de908",//层标识码
// "hcount": 3,//添加户数
// "scyclx": "1",//实测预测类型
// "sjc": 4//当前的层的SJC +1
// }
},
handleDownAddC(){
///fw/lpbright/insertUpDownC
//注:应该增加一个弹出窗口,输入新增户数
// {
// "cbsm": "63147d2d9766db01ead0cd53f23de908",//层标识码
// "hcount": 3,//添加户数
// "scyclx": "1",//实测预测类型
// "sjc": 4//当前的层的SJC -1
// }
//添加
handleAddC(type){
this.addCData.title = type == "up" ? "向上添加层" : "向下添加层";
this.addCVisible = true;
this.addCData.sjc = type == "up" ? Number(this.chData.sjc) + 1 : Number(this.chData.sjc) - 1;
this.addCData.cbsm = this.chData.bsm;
this.addCData.scyclx = this.$parent.scyclx;
},
//删除
handleDeleteC(){
// 层右键菜单 /fw/lpbright/deleteCByBsm
// 删除层:{
// "bsm": "c0818d9e4286b35b8ee9b96d90b522aa",
// "scyclx": "1"
// }
let params = {
cbsm:this.chData.bsm,
scyclx:this.$parent.scyclx
}
this.$confirm('是否确认删除该层?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteCByBsm(params).then((res) => {
if (res.code == 200) {
this.$message({
message: "删除成功",
type: "success",
});
this.getLpb(this.$store.state.zrzbsm,this.$parent.scyclx);
}else{
this.$message({
message: res.message,
type: "warning",
});
}
});
}).catch(() => {
});
},
//确认添加
saveAddC(){
insertUpDownC(this.addCData).then((res) => {
if (res.code == 200) {
this.$message({
message: "添加成功",
type: "success",
});
this.getLpb(this.$store.state.zrzbsm,this.$parent.scyclx);
this.addCVisible = false;
}else{
this.$message({
message: res.message,
type: "warning",
});
}
});
},
//end
},
......@@ -367,12 +436,12 @@ export default {
legendToggleFlagChange() {
return this.$parent.legendToggleFlag;
},
syclx(){
return this.$parent.syclx
scyclx(){
return this.$parent.scyclx
}
},
watch: {
syclx(n){
scyclx(n){
this.getLpb(this.$store.state.zrzbsm,n)
},
createFlagChange: function(val) {
......@@ -550,6 +619,10 @@ export default {
}
// end
}
.column-reverse {
display: flex;
flex-direction: column-reverse;
}
.zrz {
height: 60px;
line-height: 60px;
......@@ -559,5 +632,10 @@ export default {
text-align: center;
transition: 0.5s;
}
.btnGroup {
margin: 20px auto 0;
width: 150px;
}
}
</style>
......
......@@ -44,6 +44,7 @@ export default {
height: 100%;
box-sizing: border-box;
padding:18px;
padding-bottom: 0;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
......