3258bdc0 by jiaozeping@pashanhoo.com

1

1 parent 457e9f87
<template>
<div class="h content-form">
<el-form ref="form" :model="form" label-width="160px">
<table border="1" width="100%" cellspacing="0" cellpadding="0" class="hTable">
<tbody>
<tr height="30">
<td colspan="12" align="center">
<font size="4">层基本信息</font>
</td>
</tr>
<tr height="30">
<td colspan="2" align="center" class="tdright">层号</td>
<td colspan="4">
<el-input v-model="form.ch"></el-input>
</td>
<td colspan="2" align="center" class="tdright">自然幢号</td>
<td colspan="4">
<el-input v-model="form.zrzh"></el-input>
</td>
</tr>
<tr height="30">
<td colspan="2" align="center" class="tdright">实际层</td>
<td colspan="4">
<el-input v-model="form.sjc"></el-input>
</td>
<td colspan="2" align="center" class="tdright">名义层</td>
<td colspan="4">
<el-input v-model="form.myc"></el-input>
</td>
</tr>
<tr height="30">
<td colspan="2" align="center" class="tdright">层建筑面积(㎡)</td>
<td colspan="4">
<el-input v-model="form.cjzmj"></el-input>
</td>
<td colspan="2" align="center" class="tdright">层套内建筑面积(㎡)</td>
<td colspan="4">
<el-input v-model="form.ctnjzmj"></el-input>
</td>
</tr>
<tr height="30">
<td colspan="2" align="center" class="tdright">层阳台面积(㎡)</td>
<td colspan="4">
<el-input v-model="form.cytmj"></el-input>
</td>
<td colspan="2" align="center" class="tdright">层半墙面积(㎡)</td>
<td colspan="4">
<el-input v-model="form.cbqmj"></el-input>
</td>
</tr>
<tr height="30">
<td colspan="2" align="center" class="tdright">层共有建筑面积(㎡)</td>
<td colspan="4">
<el-input v-model="form.cgyjzmj"></el-input>
</td>
<td colspan="2" align="center" class="tdright">层分摊建筑面积(㎡)</td>
<td colspan="4">
<el-input v-model="form.cftjzmj"></el-input>
</td>
</tr>
<tr height="30">
<td colspan="2" align="center" class="tdright">层高</td>
<td colspan="4">
<el-input v-model="form.cg"></el-input>
</td>
<td colspan="2" align="center" class="tdright">水平投影面积</td>
<td colspan="4">
<el-input v-model="form.sptymj"></el-input>
</td>
</tr>
<tr height="30">
</tr>
</tbody>
</table>
</el-form>
</div>
</template>
<script>
// import { getQjCDetailById, updateQjC } from "@api/c";
export default {
name: 'c',
components: {},
props: {
cbsm: {
type: String,
default: '',
}
},
data () {
return {
form: {
zrzbsm: '',
ch: '', //层号
zrzh: '', //自然幢号
sjc: '', //实际层
myc: '', //名义层
cjzmj: '', //层建筑面积
ctnjzmj: '', //层套内建筑面积
cytmj: '', //层阳台面积
cbqmj: '', //层半墙面积
cgyjzmj: '', //层共有建筑面积
cftjzmj: '', //层分摊建筑面积
cg: '', //层高
sptymj: '', //水平投影面积
},
value: '',
}
},
methods: {
onSave () {
this.form.zrzbsm = this.$route.query.bsm;
//编辑层信息接口调用 TODO
// updateQjC(this.form).then((res) => {
// if (res.code === 200) {
// this.$message.success("保存成功")
// }
// })
},
getCinfo (bsm) {
this.reset();
//获取层信息接口调用 TODO
// getQjCDetailById(bsm).then((res) => {
// if (res.code === 200) {
// this.form = res.result;
// this.form.zrzh = this.$store.state.zrzh;
// }
// })
},
reset () {
this.form = {
zrzbsm: '',
ch: '', //层号
zrzh: '', //自然幢号
sjc: '', //实际层
myc: '', //名义层
cjzmj: '', //层建筑面积
ctnjzmj: '', //层套内建筑面积
cytmj: '', //层阳台面积
cbqmj: '', //层半墙面积
cgyjzmj: '', //层共有建筑面积
cftjzmj: '', //层分摊建筑面积
cg: '', //层高
sptymj: '', //水平投影面积
}
}
},
mounted () {
this.getCinfo(this.cbsm);
},
watch: {
cbsm: {
handler: function (item) {
console.log(item, "item")
console.log(this.$parent.$parent.menuType, "this.$parent.$parent.menuType")
if (item != '' && this.$parent.$parent.menuType == 'c') {
this.getCinfo(item)
}
},
immediate: true
},
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.h {
min-height: 200px;
width: 100%;
margin: 0 auto;
/deep/.el-input__inner {
width: 100%;
border: 0;
}
/deep/textarea {
width: 100%;
border: 0;
}
.el-form-item {
font-weight: bold;
font-size: xx-large
}
table {
background: #fff;
table-layout: fixed;
}
td {
//bgcolor:#F1F4FC;
bgcolor: #fff;
width: 8.33%
}
.el-select {
display: block;
}
}
table {
font-size: 14px;
}
.hTable {
margin-top: 10px;
}
</style>
\ No newline at end of file
<template>
<div class="addCh">
<el-table class="addChTable" :data="tableData" style="width: 100%" border>
<el-table-column prop="cz" width="60" align="center">
<template slot-scope="scope">
<span class="cp" @click="handleRowClick(scope.row, scope.$index)">
<i class="iconfont iconicon-test1" style="color:#FA6400;font-size:30px" @click="deleteYtInfo(index)"
v-if="scope.row.cz == '+'"></i>
<i class="iconfont iconicon-test" style="color:#FA6400;font-size:30px" @click="deleteYtInfo(index)"
v-if="scope.row.cz == '-'"></i>
</span>
</template>
</el-table-column>
<el-table-column prop="zrzmc" label="自然幢" align="center">
</el-table-column>
<el-table-column prop="ljzmc" label="逻辑幢" align="center">
</el-table-column>
<el-table-column prop="zdymc" label="幢单元" align="center">
</el-table-column>
<el-table-column prop="qsc" label="起始层" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.qsc" type="number"></el-input>
</template>
</el-table-column>
<el-table-column prop="jsc" label="结束层" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.jsc" type="number"></el-input>
</template>
</el-table-column>
<el-table-column prop="hs" label="每层户数" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.hs" type="number"></el-input>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
// import { insertChInfo } from "@api/lpb";
export default {
name: "",
components: {},
props: {
treeData: {},
dialogVisible: {
type: Boolean,
default: false,
},
scyclx: {
type: String,
default: "1",
},
},
data () {
return {
ljzBsm: null,
zdyBsm: null,
zrzBsm: null,
tableData: [],
formData: {
cz: "+",
ljzbsm: "",
ljzmc: "",
zdymc: "",
zdybsm: "",
zrzbsm: "",
scyclx: "1",
qsc: "",
jsc: "",
hs: "",
},
};
},
created () { },
mounted () {
console.log(this.treeData, "treeData");
},
methods: {
//行操作
handleRowClick (row, index) {
if (row.cz == "+") {
let temp = JSON.parse(JSON.stringify(this.formData));
temp.qsc = '';
temp.jsc = '';
temp.hs = '';
temp.cz = "-";
this.tableData.push(temp);
} else {
this.tableData.splice(index, 1);
}
},
onSave (bsm) {
console.log(this.tableData)
let totalHs = 0;
for (let k = 0; k < this.tableData.length; k++) {
if (this.tableData[k].qsc === "" || this.tableData[k].jsc === "" || this.tableData[k].hs === "") {
this.$message.warning("表单不完整,请填写完整")
return false
}
if (this.tableData[k].qsc - this.tableData[k].jsc > 0) {
this.$message.warning("存在结束层大于起始层,请重写填写")
return false
}
totalHs = totalHs + (this.tableData[k].jsc - this.tableData[k].qsc + 1) * this.tableData[k].hs;
}
if (totalHs >= 5000) {
this.$message.warning("单次添加户数累积超过5000户,请分次添加!")
return false
}
// insertChInfo(this.tableData).then((res) => {
// if (res.code === 200) {
// this.$message.success("保存成功");
// //更新树结构数据
// console.log(this);
// this.$parent.$parent.getLpbMenuTree(bsm);
// this.$parent.$parent.getlpbData();
// //关闭弹框
// this.$parent.$parent.closeDaialog();
// } else {
// this.$message({
// message: res.message,
// type: "warning",
// })
// }
// });
},
//重置数据
reset () {
this.tableData[0].qsc = "";
this.tableData[0].jsc = "";
this.tableData[0].hs = "";
},
},
computed: {},
watch: {
treeData: {
handler (n) {
this.formData = {
cz: "+",
ljzbsm: "",
zdybsm: "",
zrzbsm: "",
scyclx: this.scyclx,
qsc: "",
jsc: "",
hs: "",
};
//给自然幢,逻辑幢,幢单元的bsm和mc赋值
switch (n.type) {
case "zrz":
this.formData.zrzbsm = n.bsm;
this.formData.zrzmc = n.mc;
break;
case "ljz":
this.formData.zrzbsm = n.zrzbsm;
this.formData.ljzbsm = n.bsm;
this.formData.zrzmc = n.zrzmc;
this.formData.ljzmc = n.mc;
break;
case "zdy":
this.formData.zrzbsm = n.zrzbsm;
this.formData.ljzbsm = n.ljzbsm;
this.formData.zdybsm = n.bsm;
this.formData.zrzmc = n.zrzmc;
this.formData.ljzmc = n.ljzmc;
this.formData.zdymc = n.mc;
break;
default:
break;
}
this.tableData = [];
this.tableData.push(this.formData);
},
//深度监听,第一次接收到父组件传值就触发事件
immediate: true,
deep: true,
},
scyclx: {
handler (n) {
this.$nextTick(() => {
this.formData.scyclx = this.scyclx;
})
}
}
},
};
</script>
<style lang="scss">
.addCh {
.addChTable {
.el-input__inner {
height: 20px;
margin: 0;
line-height: 20px;
outline: none;
border: none;
color: #606764;
overflow: visible;
cursor: text;
text-align: center;
}
}
.cp {
cursor: pointer;
position: relative;
top: 4px;
}
.el-table .cell {
line-height: 34px;
}
.el-table .cell,
.el-table--border td:first-child .cell,
.el-table--border th:first-child .cell {
padding-left: 5px;
}
.el-table td,
.el-table th {
padding: 4px 0;
}
}
</style>
......@@ -7,7 +7,7 @@
<el-radio-button label="0">预测</el-radio-button>
<el-radio-button label="1">实测</el-radio-button>
</el-radio-group>
<el-input maxlength="28" v-model="bdcdyh" :style="{ width: inputWidth + 'px' }" class="searchInput"
<el-input maxlength="28" v-model="" :style="{ width: inputWidth + 'px' }" class="searchInput"
placeholder="输入不动产单元号或室号"><i slot="suffix" class="el-input__icon el-icon-search" @click="inputChange"></i>
</el-input>
</el-col>
......@@ -118,10 +118,6 @@
<script>
import { Message } from "element-ui"
import addLjz from "./ljz/index";
import addZdy from "./zdy/index";
import addCh from "./ch/index";
import editCinfo from "./c/index";
import lpbContent from "./lpbContent/index";
export default {
......@@ -133,19 +129,13 @@ export default {
}
},
components: {
addLjz,
addZdy,
addCh,
lpbContent,
editCinfo
lpbContent
},
data () {
return {
bsms: [],
dialogVisible: false,
scyclx: "0", //1是实测 0是预测
bdcdyh: "",
islpb: true,
pd: [], //创建楼盘的树结构数据
menuType: "",
treeData: {},
......@@ -216,14 +206,7 @@ export default {
time: "",
dyztBsmList: {}, //单元状态bsmList
bjztFlag: true,
taskTitle: '添加',
curBsm: '',
qsztList: [],
uploadVisible: false, //批量上传弹框
fileData: {
glbsmList: [],
dylx: 'h'
}
};
},
created () {
......@@ -326,18 +309,6 @@ export default {
this.bsms = data;
}
},
inputChange () {
console.log(this.bdcdyh, 'this.bdcdyh');
if (this.bdcdyh != "") {
// console.log("查询" + this.bdcdyh);
this.$refs.lpbContent.lpbDataMap(this.bdcdyh);
} else {
this.$message({
message: "请输入内容后查询",
type: "warning",
});
}
},
//调用楼盘表信息查询和图例统计接口
getlpbData () {
this.$refs.lpbContent.loadingData(this.$store.state.zrzbsm, this.scyclx);
......@@ -364,32 +335,6 @@ export default {
})
},
open (hasGenerateCount, unGenerateCount) {
this.$confirm('未生成单元号有' + unGenerateCount + '户,已经生成单元号有' + hasGenerateCount + '户,是否覆盖全部重新生成?', '确认信息', {
distinguishCancelAndClose: true,
confirmButtonText: '覆盖全部生成',
cancelButtonText: '跳过已生成单元号户'
})
.then(() => {
batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm, 2).then(
(res) => {
if (res.code === 200) {
this.$message.success("生成完成!");
}
});
})
.catch(action => {
if (action === 'cancel') {
batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm, 1).then(
(res) => {
if (res.code === 200) {
this.$message.success("生成完成!");
}
});
}
});
},
//获取各项单元状态统计数据
getDyztBsmList () {
......@@ -516,10 +461,6 @@ export default {
selectedZt (n) {
this.legendToggleFlag = true;
},
bsms (n) {
this.fileData.glbsmList = n;
console.log(this.fileData, 'filedata');
}
},
};
</script>
......
......@@ -286,19 +286,6 @@ export default {
.sort(this.compare("place"))
.reverse();
this.lpbData = res.result == null ? this.lpbData : res.result;
//给实预测楼盘表对象赋值,默认加载预测楼盘表数据
// if (scyclx == 0) {
// this.yclpbData = res.result == null ? this.yclpbData : res.result;
// this.lpbData = this.yclpbData;
// } else {
// this.sclpbData = res.result == null ? this.sclpbData : res.result;
// }
// if (actual) {
// this.lpbData = res.result == null ? this.yclpbData : res.result;
// }
// if (this.lpbParent == 'isFwsxbg') {
// this.lpbData = this.$parent.scyclx == '0' ? this.yclpbData : this.sclpbData;
// }
this.$nextTick(() => {
//渲染楼盘表
this.dataChange();
......@@ -482,12 +469,6 @@ export default {
this.$nextTick(function () {
this.$refs.hbj.$refs.hbj.getHInfo(this.hbsm);
});
// if (this.isHbfg) {
// }else{
// this.hbsmList.push(bsm); // 将户bsm放进hbsmList
// this.$parent.getHbsm(bsm, true);
// }
},
//删除多重数组中的某一项
deleteArrOption (arr, item) {
......
<template>
<div class="zdy-content">
<el-form :model="form" :rules="rules" ref="form" label-width="110px" size="small">
<table border="1" width="100%" cellspacing="0" cellpadding="0" class="hTable">
<tbody>
<tr height="30">
<td colspan="12" align="center">
<font size="4">幢单元基本信息</font>
</td>
</tr>
<tr height="30">
<td colspan="2" align="center" class="tdright">幢单元号</td>
<td colspan="4">
<el-input v-model="form.zdyh"></el-input>
</td>
<td colspan="2" align="center" class="tdright"><i class="requisite">*</i>幢单元名称</td>
<td colspan="4">
<el-input v-model="form.zdymc" ref="zdymc"></el-input>
</td>
</tr>
<tr height="30">
<td colspan="2" align="center" class="tdright">地上层数</td>
<td colspan="4">
<el-input v-model="form.dscs"></el-input>
</td>
<td colspan="2" align="center" class="tdright">地下层数</td>
<td colspan="4">
<el-input v-model="form.dxcs"></el-input>
</td>
</tr>
<tr height="30">
<td colspan="2" align="center" class="tdright">总层数</td>
<td colspan="4">
<el-input v-model="form.zcs"></el-input>
</td>
<td colspan="2" align="center" class="tdright">备注</td>
<td colspan="4">
<el-input v-model="form.bz"></el-input>
</td>
</tr>
</tbody>
</table>
</el-form>
</div>
</template>
<script>
// import { insertZdyInfo } from "@api/lpb"
// import { getQjZdyDetailById, updateQjZdy } from "@api/zdy"
export default {
name: "index",
components: {},
props: {
zdybsm: {
type: String,
default: '',
}
},
data () {
return {
form: {
zdyh: '',
zdymc: '',
dscs: '',
dxcs: '',
zcs: '',
bz: '',
},
rules: {
zdyh: [
{ required: true, message: '幢单元号不能为空', trigger: 'blur' },
{ min: 5, max: 50, message: '长度最少 5 个字符', trigger: 'blur' }
],
zdymc: [
{ required: true, message: '名称不能为空', trigger: 'change' }
],
dscs: [
{ required: true, message: '地上层数不能为空', trigger: 'blur' },
{ type: 'number', message: '必须是数字', trigger: 'blur' }
],
dxcs: [
{ required: true, message: '地下层数不能为空', trigger: 'blur' },
{ type: 'number', message: '必须是数字' }
],
zcs: [
{ required: true, message: '名称不能为空', trigger: 'change' }
]
}
}
},
methods: {
//在自然幢节点上添加幢单元只需传zrzbsm,ljzbsm为'';在逻辑幢上添加幢单元时需要同时传入zrzbsm和ljzbsm
submitForm (formName, zrzbsm, ljzbsm) {
this.form.zrzbsm = zrzbsm;
this.form.ljzbsm = zrzbsm == ljzbsm ? '' : ljzbsm;
if (this.form.zdymc == '') {
this.$message.warning("请完善表单后再继续操作");
this.$refs.zdymc.$el.style.border = '1px solid red';
} else {
//判断zdybsm是否为空,不为空的时候是编辑,为空的时候是新增
if (this.zdybsm == '') {
this.$refs[formName].validate((valid) => {
if (valid) {
// insertZdyInfo(this.form).then((res) => {
// if (res.code === 200) {
// this.$message.success("保存成功!")
// //更新树结构数据
// this.$parent.$parent.getLpbMenuTree(zrzbsm);
// //关闭弹框
// this.$parent.$parent.closeDaialog()
// }
// return true;
// })
} else {
console.log('error submit!!');
return false;
}
});
} else {
//编辑幢单元接口
updateQjZdy(this.form).then((res) => {
if (res.code === 200) {
this.$message.success("保存成功")
}
})
}
}
},
getZdyInfo (bsm) {
//查询幢单元信息接口
getQjZdyDetailById(bsm).then((res) => {
if (res.code === 200) {
this.form = res.result;
}
})
},
reset () {
this.form = {
zdyh: '',
zdymc: '',
dscs: '',
dxcs: '',
zcs: '',
bz: '',
}
}
},
watch: {
zdybsm: {
handler: function (item) {
if (item != '' && this.$parent.$parent.menuType == 'zdy') {
this.getZdyInfo(item)
}
},
immediate: true
},
"form.zdymc": {
handler: function (item) {
if (item != '') {
this.$refs.zdymc.$el.style.border = '';
}
},
immediate: true
},
}
}
</script>
<style scoped lang="scss">
/deep/.el-input__inner {
width: 100%;
border: 0;
}
table {
background: #fff;
table-layout: fixed;
}
</style>
\ No newline at end of file