6ab56ace by weimo934

feat(plc):批量层组件

1 parent 5f1196a8
import request from '@/plugin/axios'
/**
* 新增自然幢基本信息
*/
export function insertZrzjbxx (data) {
export function insertZrzjbxx(data) {
return request({
url: 'fw/qjZrz/insert',
method: 'post',
......@@ -13,13 +14,13 @@ export function insertZrzjbxx (data) {
/**
* 生成不动产单元号
*/
export function getBdcdyh (dpdm,dptype) {
export function getBdcdyh(dpdm, dptype) {
return request({
url: '/system/generator/getBdcdyh',
method: 'get',
params:{
dpdm:dpdm,
dptype:dptype
params: {
dpdm: dpdm,
dptype: dptype
}
})
}
......@@ -27,23 +28,23 @@ export function getBdcdyh (dpdm,dptype) {
/**
* 保存自然幢信息
*/
export function saveZrzInfo (data) {
export function saveZrzInfo(data) {
return request({
url: '/fw/qjZrz/updateQjZrz',
method: 'put',
data:data
data: data
})
}
/**
* 保存自然幢信息
*/
export function getZrzDetailByBsm (data) {
export function getZrzDetailByBsm(data) {
return request({
url: '/fw/qjZrz/getQjZrzDetailById',
method: 'get',
params:{
id:data
params: {
id: data
}
})
}
......@@ -73,11 +74,22 @@ export function queryYzgy(id) {
/**
* 新增逻辑幢信息接口
*/
export function insertCInfo (data) {
export function insertCInfo(data) {
return request({
url: '/system/qjC/insertQjC',
method: 'post',
data:data
data: data
})
}
/**
* 批量修改层
*/
export function updatePlc(data) {
return request({
url: '/system/qjC/batchPlc',
method: 'put',
data: data
})
}
......
<template>
<div>
<el-dialog
title="新增"
:visible.sync="isVisible"
width="50%"
@close="close"
:modal-append-to-body="false"
center>
<div>
<table border="1">
<tr>
<td>层建筑面积</td>
<td>
<input type="text" v-model="qlcData.cjzmj" class="inputtitle"/>
</td>
<td>
层套内建筑面积
</td>
<td>
<input text="text" v-model="qlcData.ctnjzmj" class="inputtitle"/>
</td>
</tr>
<tr>
<td>层阳台面积</td>
<td>
<input type="text" v-model="qlcData.cytmj" class="inputtitle"/>
</td>
<td>
层半墙面积
</td>
<td>
<input text="text" v-model="qlcData.cbqmj" class="inputtitle"/>
</td>
</tr>
<tr>
<td>层共有建筑面积(㎡)</td>
<td>
<input type="text" v-model="qlcData.cgyjzmj" class="inputtitle"/>
</td>
<td>
层分摊建筑面积(㎡)
</td>
<td>
<input text="text" v-model="qlcData.cftjzmj" class="inputtitle"/>
</td>
</tr>
<tr>
<td>层高</td>
<td>
<input type="text" v-model="qlcData.cg" class="inputtitle"/>
</td>
<td>
水平投影面积(㎡)
</td>
<td>
<input text="text" v-model="qlcData.sptymj" class="inputtitle"/>
</td>
</tr>
</table>
</div>
<div class="shop">
<el-button type="primary" @click="save">保存</el-button>
<el-button type="primary" @click="result">重置</el-button>
<el-button type="primary" @click="cancel">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {updatePlc} from './../../api/zrz'
import {Message} from 'element-ui'
export default {
name: "plC",
data() {
return {
isVisible: false,
qlcData: {
cbqmj: '', // 层半墙面积
cftjzmj: '', // 层分摊建筑面积
cg: '', // 层高
cgyjzmj: '', // 层共有建筑面积
cjzmj: '', // 层建筑面积
ctnjzmj: '', // 层套内建筑面积
cytmj: '', // 层阳台面积
sptymj: '' // 水平投影面积
}
}
},
props: {
bsms: {
type: Array,
},
plcVisible: {
type: Boolean,
default: function () {
return false
}
}
},
methods: {
save: function () {
this.qlcData['bsms'] = this.bsms
updatePlc(this.qlcData).then(res => {
console.log(res)
if (res.success) {
Message.success("保存成功")
this.close()
} else {
Message.error(res.message)
}
})
},
close: function () {
this.$emit('close')
this.isVisible = false
this.result()
},
cancel: function () {
this.$emit('close')
this.isVisible = false
},
result: function () {
this.qlcData = {
cbqmj: '', // 层半墙面积
cftjzmj: '', // 层分摊建筑面积
cg: '', // 层高
cgyjzmj: '', // 层共有建筑面积
cjzmj: '', // 层建筑面积
ctnjzmj: '', // 层套内建筑面积
cytmj: '', // 层阳台面积
sptymj: '' // 水平投影面积
}
}
},
watch: {
plcVisible(val) {
this.isVisible = val
}
}
}
</script>
<style scoped>
table {
margin-top: 10px;
background-color: #fff;
font-size: 14px;
width: 100%;
}
td {
text-align: center;
height: 36px;
min-width: 50px;
}
table:hover {
cursor: pointer;
}
.inputtitle {
line-height: 40px;
width: 95%;
border: none;
}
/* .inputtitle:focus {
outline: none;
}*/
.shop {
margin-top: 20px;
text-align: center;
}
</style>
......@@ -22,7 +22,7 @@
>
<el-button class="radioBtn" label="2" border>实预测转换</el-button>
<el-button class="radioBtn" label="3" border>批量户</el-button>
<el-button class="radioBtn" label="4" border>批量层</el-button>
<el-button class="radioBtn" label="4" border @click="plcVisible=true">批量层</el-button>
<el-button class="radioBtn" label="5" border>批量室号</el-button>
<el-button class="radioBtn" label="6" border>批量坐落</el-button>
<el-button class="radioBtn" label="7" border>批量单元号</el-button>
......@@ -106,22 +106,27 @@
>
</div>
</el-dialog>
<pl-c :plc-visible="plcVisible" :bsms="bsms" @close="plcClose"></pl-c>
</div>
</template>
<script>
import PlC from "./../../../../components/plc/plC"
import LineTree from "../../../../components/lineTree/lineTree";
import addLjz from "./ljz/index";
import addZdy from "./zdy/index";
import addCh from "./ch/index";
import lpbContent from "./lpbContent/index";
import { getLpbMenuTree } from "../../../../api/lpb";
export default {
name: "",
components: { LineTree, addLjz, addZdy, addCh, lpbContent },
components: { LineTree, addLjz, addZdy, addCh, lpbContent,PlC },
props: {},
data() {
return {
bsms:["123","321","231"],
plcVisible:false,
radio1: "",
radio2: "",
createFlag: false,
......@@ -210,6 +215,9 @@ export default {
}, 100);
},
methods: {
plcClose(){
this.plcVisible=false;
},
//获取高度计算lpb内容区高度
getHeight() {
this.lpbContentHight = window.innerHeight - 340;
......