3e745cf5 by 杨威

代码优化

1 parent 540baeaa
......@@ -95,7 +95,7 @@
<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>
<el-button type="primary" @click="close">取消</el-button>
</div>
</el-dialog>
</div>
......
<template>
<div class="h content-form">
<el-form ref="form" :model="form" label-width="160px">
<Qlr ref="qlrxxModule"></Qlr>
<Qlr ref="qlrxxModule" :bsm='bsm'></Qlr>
<table border="1" width="100%" cellspacing="0" cellpadding="0" class="hTable">
<tbody>
<tr height="30">
......@@ -382,6 +382,9 @@
Qlr,
Qlxz,
},
props:{
bsm:String //户标识码
},
data () {
return {
form:{
......@@ -512,6 +515,7 @@
},
//根据户bsm查询户信息
getHInfo(hbsm){
this.bsm = hbsm;
console.log(hbsm);
},
//保存户信息
......
......@@ -16,15 +16,6 @@
class="searchInput"
placeholder="输入不动产单元号"
><i slot="suffix" class="el-input__icon el-icon-search" @click="inputChange"></i></el-input>
<!-- <el-autocomplete
v-model="bdcdyh"
:style="{'width':inputWidth+'px'}"
placeholder="输入不动产单元号">
<i
class="el-icon-search el-input__icon"
slot="suffix">
</i>
</el-autocomplete> -->
</el-col>
<el-col :span="16">
<div class="fr">
......@@ -125,7 +116,7 @@
<pl-sh :plShVisible="plShVisible" :bsms="bsms" @close="plshClose"></pl-sh>
<!-- 双击户的弹出框 -->
<el-dialog title="户编辑" :visible.sync="hbjVisible" width="50%" center>
<hbj ref="hbj"></hbj>
<hbj ref="hbj" :bsm='hbsm'></hbj>
<div class="btnGroup">
<el-button type="primary" @click="hbjSaveInfo">保存</el-button>
<el-button type="primary" @click="hbjResetInfo">重置</el-button>
......@@ -155,6 +146,7 @@ export default {
data() {
return {
bsms:["123","321","231"],
hbsm:'',
dialogVisible: false,
plcVisible:false,
plhVisible:false,
......@@ -330,16 +322,18 @@ export default {
this.bsms = data;
if(type){
// 双击
this.hbsm = this.bsms[this.bsms.length-1];
this.hbjVisible = true;
setTimeout(() => {
this.$refs.hbj.getHInfo(this.bsms[this.bsms.length-1]);
this.$refs.hbj.getHInfo(this.hbsm);
}, 0);
}else{
//单击
console.log('单击了');
//单击 TO DO
}
console.log(this.bsms);
},
//不动产单元号输入框事件
inputFocus(){
this.inputWidth = 200
},
......@@ -353,7 +347,6 @@ export default {
},
//户保存
hbjSaveInfo(){
console.log(this.$refs.hbj,'this.$refs');
this.$refs.hbj.onSave(this.bsms[this.bsms.length-1],this.tabPosition);
},
//户编辑表单重置
......