代码优化
Showing
3 changed files
with
15 additions
and
18 deletions
... | @@ -95,7 +95,7 @@ | ... | @@ -95,7 +95,7 @@ |
95 | <div class="shop"> | 95 | <div class="shop"> |
96 | <el-button type="primary" @click="save">保存</el-button> | 96 | <el-button type="primary" @click="save">保存</el-button> |
97 | <el-button type="primary" @click="result">重置</el-button> | 97 | <el-button type="primary" @click="result">重置</el-button> |
98 | <el-button type="primary" @click="cancel">取消</el-button> | 98 | <el-button type="primary" @click="close">取消</el-button> |
99 | </div> | 99 | </div> |
100 | </el-dialog> | 100 | </el-dialog> |
101 | </div> | 101 | </div> | ... | ... |
1 | <template> | 1 | <template> |
2 | <div class="h content-form"> | 2 | <div class="h content-form"> |
3 | <el-form ref="form" :model="form" label-width="160px"> | 3 | <el-form ref="form" :model="form" label-width="160px"> |
4 | <Qlr ref="qlrxxModule"></Qlr> | 4 | <Qlr ref="qlrxxModule" :bsm='bsm'></Qlr> |
5 | <table border="1" width="100%" cellspacing="0" cellpadding="0" class="hTable"> | 5 | <table border="1" width="100%" cellspacing="0" cellpadding="0" class="hTable"> |
6 | <tbody> | 6 | <tbody> |
7 | <tr height="30"> | 7 | <tr height="30"> |
... | @@ -382,6 +382,9 @@ | ... | @@ -382,6 +382,9 @@ |
382 | Qlr, | 382 | Qlr, |
383 | Qlxz, | 383 | Qlxz, |
384 | }, | 384 | }, |
385 | props:{ | ||
386 | bsm:String //户标识码 | ||
387 | }, | ||
385 | data () { | 388 | data () { |
386 | return { | 389 | return { |
387 | form:{ | 390 | form:{ |
... | @@ -512,6 +515,7 @@ | ... | @@ -512,6 +515,7 @@ |
512 | }, | 515 | }, |
513 | //根据户bsm查询户信息 | 516 | //根据户bsm查询户信息 |
514 | getHInfo(hbsm){ | 517 | getHInfo(hbsm){ |
518 | this.bsm = hbsm; | ||
515 | console.log(hbsm); | 519 | console.log(hbsm); |
516 | }, | 520 | }, |
517 | //保存户信息 | 521 | //保存户信息 | ... | ... |
... | @@ -16,15 +16,6 @@ | ... | @@ -16,15 +16,6 @@ |
16 | class="searchInput" | 16 | class="searchInput" |
17 | placeholder="输入不动产单元号" | 17 | placeholder="输入不动产单元号" |
18 | ><i slot="suffix" class="el-input__icon el-icon-search" @click="inputChange"></i></el-input> | 18 | ><i slot="suffix" class="el-input__icon el-icon-search" @click="inputChange"></i></el-input> |
19 | <!-- <el-autocomplete | ||
20 | v-model="bdcdyh" | ||
21 | :style="{'width':inputWidth+'px'}" | ||
22 | placeholder="输入不动产单元号"> | ||
23 | <i | ||
24 | class="el-icon-search el-input__icon" | ||
25 | slot="suffix"> | ||
26 | </i> | ||
27 | </el-autocomplete> --> | ||
28 | </el-col> | 19 | </el-col> |
29 | <el-col :span="16"> | 20 | <el-col :span="16"> |
30 | <div class="fr"> | 21 | <div class="fr"> |
... | @@ -125,7 +116,7 @@ | ... | @@ -125,7 +116,7 @@ |
125 | <pl-sh :plShVisible="plShVisible" :bsms="bsms" @close="plshClose"></pl-sh> | 116 | <pl-sh :plShVisible="plShVisible" :bsms="bsms" @close="plshClose"></pl-sh> |
126 | <!-- 双击户的弹出框 --> | 117 | <!-- 双击户的弹出框 --> |
127 | <el-dialog title="户编辑" :visible.sync="hbjVisible" width="50%" center> | 118 | <el-dialog title="户编辑" :visible.sync="hbjVisible" width="50%" center> |
128 | <hbj ref="hbj"></hbj> | 119 | <hbj ref="hbj" :bsm='hbsm'></hbj> |
129 | <div class="btnGroup"> | 120 | <div class="btnGroup"> |
130 | <el-button type="primary" @click="hbjSaveInfo">保存</el-button> | 121 | <el-button type="primary" @click="hbjSaveInfo">保存</el-button> |
131 | <el-button type="primary" @click="hbjResetInfo">重置</el-button> | 122 | <el-button type="primary" @click="hbjResetInfo">重置</el-button> |
... | @@ -154,7 +145,8 @@ export default { | ... | @@ -154,7 +145,8 @@ export default { |
154 | props: {}, | 145 | props: {}, |
155 | data() { | 146 | data() { |
156 | return { | 147 | return { |
157 | bsms:["123","321","231"], | 148 | bsms:["123","321","231"], |
149 | hbsm:'', | ||
158 | dialogVisible: false, | 150 | dialogVisible: false, |
159 | plcVisible:false, | 151 | plcVisible:false, |
160 | plhVisible:false, | 152 | plhVisible:false, |
... | @@ -260,7 +252,7 @@ export default { | ... | @@ -260,7 +252,7 @@ export default { |
260 | this.plhVisible=false; | 252 | this.plhVisible=false; |
261 | }, | 253 | }, |
262 | plshClose(){ | 254 | plshClose(){ |
263 | this.plShVisible=false | 255 | this.plShVisible=false |
264 | }, | 256 | }, |
265 | //获取高度计算lpb内容区高度 | 257 | //获取高度计算lpb内容区高度 |
266 | getHeight() { | 258 | getHeight() { |
... | @@ -330,16 +322,18 @@ export default { | ... | @@ -330,16 +322,18 @@ export default { |
330 | this.bsms = data; | 322 | this.bsms = data; |
331 | if(type){ | 323 | if(type){ |
332 | // 双击 | 324 | // 双击 |
325 | this.hbsm = this.bsms[this.bsms.length-1]; | ||
333 | this.hbjVisible = true; | 326 | this.hbjVisible = true; |
334 | setTimeout(() => { | 327 | setTimeout(() => { |
335 | this.$refs.hbj.getHInfo(this.bsms[this.bsms.length-1]); | 328 | this.$refs.hbj.getHInfo(this.hbsm); |
336 | }, 0); | 329 | }, 0); |
337 | }else{ | 330 | }else{ |
338 | //单击 | 331 | //单击 TO DO |
339 | console.log('单击了'); | 332 | |
340 | } | 333 | } |
341 | console.log(this.bsms); | 334 | console.log(this.bsms); |
342 | }, | 335 | }, |
336 | //不动产单元号输入框事件 | ||
343 | inputFocus(){ | 337 | inputFocus(){ |
344 | this.inputWidth = 200 | 338 | this.inputWidth = 200 |
345 | }, | 339 | }, |
... | @@ -353,7 +347,6 @@ export default { | ... | @@ -353,7 +347,6 @@ export default { |
353 | }, | 347 | }, |
354 | //户保存 | 348 | //户保存 |
355 | hbjSaveInfo(){ | 349 | hbjSaveInfo(){ |
356 | console.log(this.$refs.hbj,'this.$refs'); | ||
357 | this.$refs.hbj.onSave(this.bsms[this.bsms.length-1],this.tabPosition); | 350 | this.$refs.hbj.onSave(this.bsms[this.bsms.length-1],this.tabPosition); |
358 | }, | 351 | }, |
359 | //户编辑表单重置 | 352 | //户编辑表单重置 | ... | ... |
-
Please register or sign in to post a comment