aaaade4b by jiaozeping@pashanhoo.com

1

1 parent 8e8e2533
......@@ -125,7 +125,7 @@ import editCinfo from "./c/index";
import lpbContent from "./lpbContent/index";
export default {
name: "bjlp",
name: "lpb",
props: {
formData: {
type: Object,
......@@ -133,7 +133,6 @@ export default {
}
},
components: {
// LineTree,
addLjz,
addZdy,
addCh,
......@@ -145,9 +144,6 @@ export default {
bsms: [],
dialogVisible: false,
scyclx: "0", //1是实测 0是预测
radio1: "",
radio2: "",
createFlag: false,
bdcdyh: "",
islpb: true,
pd: [], //创建楼盘的树结构数据
......@@ -219,7 +215,6 @@ export default {
lpbContentwidth: "",
time: "",
dyztBsmList: {}, //单元状态bsmList
cbsmList: [], // 层bsmlist
bjztFlag: true,
taskTitle: '添加',
curBsm: '',
......@@ -236,8 +231,6 @@ export default {
this.getHeight();
},
mounted () {
//获取楼盘表树结构
// this.getLpbMenuTree(formData.zrzbsm);
//获取各项单元状态的户bsm
// this.getDyztBsmList();
//获取房屋用途统计数据
......@@ -248,62 +241,11 @@ export default {
}, 100);
},
methods: {
//批量提交
batchCommit () {
if (this.bsms.length <= 0) {
Message.warning("请选择操作户")
return
} else {
if (this.qsztList.indexOf('1') > -1) {
Message.warning("已提交的户无法继续操作")
} else {
batchCommit(this.bsms).then(res => {
if (res.code === 200) {
Message.success("提交成功");
this.getlpbData();
} else {
this.$message.error(res.message);
}
})
}
}
},
//批量删除
batchDelete () {
if (this.bsms.length <= 0) {
Message.warning("请选择操作户")
return
} else {
if (this.qsztList.indexOf('1') > -1) {
Message.warning("已提交的户无法继续操作")
} else {
batchDelete(this.bsms).then(res => {
if (res.code === 200) {
Message.success("删除成功");
this.getlpbData();
} else {
this.$message.error(res.message);
}
})
}
}
},
//批量上传 start
batchUpload () {
if (this.bsms.length < 1) {
Message.warning("请选择操作户")
return
} else {
this.uploadVisible = true
}
},
//取消选中
batchCancelChoosed () {
this.cbsmList = [];
this.bsms = [];
this.qsztList = [];
this.$refs.lpbContent.hbsmList = [];
this.$refs.lpbContent.cbsmList = [];
this.$refs.lpbContent.choosedList = [];
this.$refs.lpbContent.$refs.hBsm.forEach((item) => {
item.style.border = '';
......@@ -314,32 +256,6 @@ export default {
item.className = "";
});
},
uploadError (err, file, fileList) {
Message.error("上传文件失败")
console.log("上传文件失败", err)
},
uploadProgress () {
vm.loadingShow('正在上传中')
},
uploadSuccess (res, file, fileList) {
vm.loadingHide();
Message.success("上传成功")
this.uploadVisible = false;
},
handleRemove (file, fileList) {
console.log(file, fileList);
},
handlePreview (file) {
console.log(file);
},
handleExceed (files, fileList) {
// this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
this.$message.warning("上传失败")
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`);
},
//批量上传 end
loading () {
this.getLpbMenuTree(this.$store.state.zrzbsm);
......@@ -347,68 +263,12 @@ export default {
lodding () {
this.getlpbData();
},
//改变编辑或详细信息状态
bjztChange () {
this.bjztFlag = !this.bjztFlag;
},
//改变实预测数据类型
scyclxChange (val) {
//清空已选中层户
this.cbsmList = [];
this.bsms = [];
this.qsztList = [];
this.$refs.lpbContent.hbsmList = [];
this.$nextTick(() => {
//户
if (this.$refs.lpbContent.$refs.hBsm) {
this.$refs.lpbContent.$refs.hBsm.forEach(item => {
item.style.borderColor = 'rgb(230, 230, 230)';
if (item.className == "tdSelect") {
item.className = "";
}
});
}
//层
if (this.$refs.lpbContent.$refs.cBsm) {
this.$refs.lpbContent.$refs.cBsm.forEach(item => {
console.log(item.className, 'item.className');
item.className = "floor";
});
}
})
//获取图例数据
this.getDyztBsmList();
this.getLpbFwytAndQlxz();
//重新渲染楼盘表
this.$refs.lpbContent.dataChange();
},
//获取高度计算lpb内容区高度
getHeight () {
this.lpbContentHight = window.innerHeight - 190;
},
//创建楼盘
create () {
this.createFlag = true;
},
//获取自然幢树结构数据
getLpbMenuTree (zrzbsm) {
getLpbMenuTree(zrzbsm)
.then((res) => {
this.pd = res.result;
})
.catch((error) => { });
},
//打开新建楼盘树结构右键菜单唤起的弹框
openLpbDialog (data, type) {
this.treeData = data;
this.menuType = type;
this.$nextTick(() => {
this.resetInfo();
});
this.dialogVisible = true;
this.taskTitle = '添加';
this.curBsm = '';
},
//弹框中的保存按钮,根据不同菜单点击类型调用不同子组件的保存方法
saveInfo () {
switch (this.menuType) {
......@@ -466,20 +326,6 @@ export default {
this.bsms = data;
}
},
//获取选中户信息
getQsztList (data, type) {
if (type) {
// 双击
} else {
//单击 TO DO
this.qsztList = data;
}
},
//获取选中层bsmlist
getCbsm (data) {
this.cbsmList = data;
},
inputChange () {
console.log(this.bdcdyh, 'this.bdcdyh');
if (this.bdcdyh != "") {
......@@ -500,22 +346,6 @@ export default {
//改变楼盘表子组件的key值,重新渲染
// this.time = new Date().getTime();
},
//实预测装换
plScYcChange () {
let data = {
zrzbsm: this.$store.state.zrzbsm,
scyclx: this.scyclx,
};
batchScYcChange(data).then((res) => {
if (res.code === 200) {
this.$message.success("实预测转换成功");
this.$refs.lpbContent.loadingData(this.$store.state.zrzbsm, '1');
this.$refs.lpbContent.loadingData(this.$store.state.zrzbsm, '0');
} else if (res.code === 500) {
this.$message.warning(res.message);
}
});
},
//切换房屋状态
handleChoosedH (bsms, color) {
//每次切换房屋状态,将之前高亮的户边框颜色重置为默认
......@@ -533,30 +363,6 @@ export default {
this.$refs.lpbContent.borderColor = color;
})
},
//批量添加不动产单元号
addBdcdyh () {
if (this.qsztList.indexOf('1') > -1) {
Message.warning("已提交的户无法继续操作")
} else {
batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm, 0).then(
(res) => {
if (res.code === 200) {
this.$message.success("生成完成!");
} else if (res.code === 206) {
let hasGenerateCount = res.result.hasGenerateCount;
let unGenerateCount = res.result.unGenerateCount;
if (+unGenerateCount === 0) {
this.$message.warning("不存在未生成不动产单元号的户,无需生成不动产单元号!")
return
}
this.open(hasGenerateCount, unGenerateCount);
} else {
this.$message.warning(res.message)
}
}
);
}
},
open (hasGenerateCount, unGenerateCount) {
......@@ -707,13 +513,6 @@ export default {
this.lpbContentwidth += 204;
}
},
createFlag (n) {
if (n) {
this.lpbContentwidth -= 260;
} else {
this.lpbContentwidth += 260;
}
},
selectedZt (n) {
this.legendToggleFlag = true;
},
......@@ -728,7 +527,6 @@ export default {
.edit {
height: 100%;
background-color: #F4F9FF;
.tab-header {
border: 1px solid #dedede;
box-sizing: border-box;
......@@ -736,19 +534,16 @@ export default {
background-color: #ffffff;
margin-bottom: 10px;
position: relative;
.searchContent {
margin-left: 62px;
box-sizing: border-box;
padding: 0 20px;
.searchInput {
transition: 0.5s;
margin-left: 20px;
display: inline-block;
}
}
.change {
position: absolute;
left: 0;
......@@ -756,7 +551,6 @@ export default {
height: 100%;
width: 80px;
border-right: 1px solid #dedede;
i {
cursor: pointer;
color: #0090FF;
......@@ -771,12 +565,10 @@ export default {
margin-left: 10px;
padding: 12px 10px;
border: 0;
i {
font-size: 13px;
padding-right: 4px;
}
/deep/.el-radio-button__inner {
border: 1px solid #dcdfe6;
border-radius: 4px;
......@@ -789,12 +581,10 @@ export default {
border: 1px solid #dedede;
background-color: #ffffff;
display: flex;
.lp-tree {
height: 100%;
overflow: hidden;
transition: 0.5s;
.treeData {
margin-top: 20px;
margin-left: 26px;
......
......@@ -182,56 +182,6 @@
<el-checkbox v-model="zrzChecked" @change='lpbSelectAll'>{{ lpbData.xmmc }}</el-checkbox>
</div>
</div>
<ul v-show="lpbChVisible" :style="{ left: lpbChLeft + 'px', top: lpbChTop + 'px' }" class="contextmenu">
<li v-show="rightClickFlag == 'h'" @click="handleAddH">添加</li>
<li v-show="rightClickFlag == 'h'" @click="handleSyczh">实预测转换</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>
<!-- 合并 -->
<li v-show="rightClickFlag == 'hb'" :class="canHb != 'zyhb' ? 'cantHb' : ''" @click="handleHb('zyhb')">左右合并</li>
<li v-show="rightClickFlag == 'hb'" :class="canHb != 'sxhb' ? 'cantHb' : ''" @click="handleHb('sxhb')">上下合并</li>
<!-- 分割 -->
<li v-show="rightClickFlag == 'fg'" @click="handleFg">户分割</li>
<!-- 范围属性变更 -->
<li v-show="rightClickFlag == 'fwsxbg'" @click="handleFwsxbg">变更信息</li>
</ul>
<!-- 层操作弹框 -->
<el-dialog :close-on-click-modal="false" :title="addCData.title" :visible.sync="addCVisible" width="50%">
<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>
<!-- 户分割弹框 -->
<el-dialog :close-on-click-modal="false" title="户分割" :visible.sync="hfgDialogVisible" width="800px">
<el-form :model="fgData">
<el-form-item label="分割户数" required="" :label-width="formLabelWidth">
<el-input :disabled="fgData.fgfx != 0" v-model="fgData.fghs" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div class="btnGroup">
<el-button type="primary" @click="savefgData">保存</el-button>
<el-button type="primary" @click="hfgDialogVisible = false">取消</el-button>
</div>
</el-dialog>
<!-- 双击户的弹出框 -->
<el-dialog :close-on-click-modal="false" title="户编辑" class="hbjDialog" :visible.sync="hbjVisible" width="80%">
<hbj ref="hbj" :bsm="hbsm" :scyclx="scyclx" :lpbParent="lpbParent"></hbj>
......@@ -660,169 +610,7 @@ export default {
closeMenu () {
this.lpbChVisible = false;
},
//户右键菜单 start
handleAddH () { },
handleDeleteH () { },
handleSyczh () { },
//end
// 层右键菜单 start
//添加
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 () {
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"
})
}
})
},
//户合并
handleHb (type) {
let olbBsms = '';
this.hbsmList.forEach((item, index) => {
olbBsms += index < this.hbsmList.length - 1 ? item + ',' : item
})
if (type == this.canHb) {
this.$confirm("是否确认合并选中户?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
//确定合并 调用合并接口 this.hbsmList为选中户bsm数组 TO DO
let params = {
"newuserbsm": "",
"oldBsms": olbBsms,
"scyclx": this.$parent.scyclx,
"ljzbsm": this.fghbChoosedList[0].ljzbsm,
"zdybsm": this.fghbChoosedList[0].zdybsm,
"zrzbsm": this.fghbChoosedList[0].zrzbsm
}
// hhb(params).then((res) => {
// vm.loadingHide();
// if (res.code == 200) {
// Message.success('合并成功');
// // 清除选中户
// this.clearChoosedH();
// this.fghbChoosedList = [];
// // 更新楼盘表
// this.getLpb(this.zrzbsm, this.$parent.scyclx);
// } else {
// Message.error(res.message);
// }
// })
// .catch((error) => {
// vm.loadingHide();
// console.log(error);
// });
})
.catch(() => { });
} else {
}
},
//户分割
handleFg () {
this.hfgDialogVisible = true;
},
//户分割保存
savefgData () {
// hfg(this.fgData).then((res) => {
// vm.loadingHide();
// if (res.code == 200) {
// Message.success('分割成功');
// // 清除选中户
// this.hfgDialogVisible = false
// this.clearChoosedH();
// this.fghbChoosedList = [];
// // 更新楼盘表
// this.getLpb(this.zrzbsm, this.$parent.scyclx);
// } else {
// Message.error(res.message);
// }
// })
// .catch((error) => {
// vm.loadingHide();
// console.log(error);
// });
},
//范围属性变更
handleFwsxbg () {
let params = { bsm: this.chData.bsm, type: 'h' };
this.$confirm('是否确定范围属性变更?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// fwsxbgbl(params)
// .then((res) => {
// if (res.code == 200) {
// this.$message({
// message: '变更成功',
// type: "success",
// });
// this.getLpb(this.zrzbsm, this.scyclx);
// } else {
// this.$message({
// message: res.message,
// type: "warning",
// })
// }
// }).catch((error) => {
// });
}).catch(() => {
});
},
//楼盘表户全选
lpbSelectAll (val) {
if (val) {
......
......@@ -100,7 +100,7 @@ export default {
width: '90%',
height: "92%",
formData: {
bsm: ''
bsm: scope.row.bsm
}
})
// getLpb({ zrzbsm: zrzbsm })
......