0aa8e66a by 杨威

修改获取楼盘表数据接口,实预测类型转换时改变楼盘表数据源

1 parent 537ea1cd
...@@ -44,13 +44,13 @@ export function insertChInfo (data) { ...@@ -44,13 +44,13 @@ export function insertChInfo (data) {
44 /** 44 /**
45 * 查询楼盘表数据 45 * 查询楼盘表数据
46 */ 46 */
47 export function getLpb (data) { 47 export function getLpb (data,lx) {
48 return request({ 48 return request({
49 url: 'fw/lpb/getLpb', 49 url: 'fw/lpb/getLpb',
50 method: 'get', 50 method: 'get',
51 params: { 51 params: {
52 zrzbsm:data, 52 zrzbsm:data,
53 syclx:0, 53 syclx:lx,
54 }, 54 },
55 }) 55 })
56 } 56 }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 <div class="tab-header"> 3 <div class="tab-header">
4 <el-row class="searchContent"> 4 <el-row class="searchContent">
5 <el-col :span="8"> 5 <el-col :span="8">
6 <el-radio-group v-model="tabPosition"> 6 <el-radio-group v-model="syclx">
7 <el-radio-button label="1">实测</el-radio-button> 7 <el-radio-button label="1">实测</el-radio-button>
8 <el-radio-button label="0">预测</el-radio-button> 8 <el-radio-button label="0">预测</el-radio-button>
9 </el-radio-group> 9 </el-radio-group>
...@@ -299,7 +299,7 @@ export default { ...@@ -299,7 +299,7 @@ export default {
299 plzlVisible: false, 299 plzlVisible: false,
300 hbjVisible: false, 300 hbjVisible: false,
301 hcxlzVisible:false, 301 hcxlzVisible:false,
302 tabPosition: "1", //1是实测 0是预测 302 syclx: "1", //1是实测 0是预测
303 radio1: "", 303 radio1: "",
304 radio2: "", 304 radio2: "",
305 createFlag: false, 305 createFlag: false,
...@@ -414,7 +414,7 @@ export default { ...@@ -414,7 +414,7 @@ export default {
414 }, 414 },
415 lodding(){ 415 lodding(){
416 let zrzbsm=this.$store.state.zrzbsm; 416 let zrzbsm=this.$store.state.zrzbsm;
417 this.$refs.lpbContent.getLpb(zrzbsm); 417 this.$refs.lpbContent.getLpb(zrzbsm,this.syclx);
418 }, 418 },
419 hcxlzClose() { 419 hcxlzClose() {
420 this.hcxlzVisible = false; 420 this.hcxlzVisible = false;
...@@ -534,7 +534,7 @@ export default { ...@@ -534,7 +534,7 @@ export default {
534 }, 534 },
535 //户保存 535 //户保存
536 hbjSaveInfo() { 536 hbjSaveInfo() {
537 this.$refs.hbj.onSave(this.bsms[this.bsms.length - 1], this.tabPosition); 537 this.$refs.hbj.onSave(this.bsms[this.bsms.length - 1], this.syclx);
538 }, 538 },
539 //户编辑表单重置 539 //户编辑表单重置
540 hbjResetInfo() { 540 hbjResetInfo() {
...@@ -542,7 +542,7 @@ export default { ...@@ -542,7 +542,7 @@ export default {
542 }, 542 },
543 //调用楼盘表信息查询接口 543 //调用楼盘表信息查询接口
544 getlpbData() { 544 getlpbData() {
545 this.$refs.lpbContent.getLpb(this.$store.state.zrzbsm); 545 this.$refs.lpbContent.getLpb(this.$store.state.zrzbsm,this.syclx);
546 //改变楼盘表子组件的key值,重新渲染 546 //改变楼盘表子组件的key值,重新渲染
547 this.time = new Date().getTime(); 547 this.time = new Date().getTime();
548 }, 548 },
......
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
132 }, 132 },
133 created() {}, 133 created() {},
134 mounted() { 134 mounted() {
135 this.getLpb(this.$store.state.zrzbsm); 135 this.getLpb(this.$store.state.zrzbsm,this.$parent.syclx);
136 setTimeout(() => { 136 setTimeout(() => {
137 //tab-content宽度 - 右侧图例宽度 - lp-overview滚动条宽度 - lpbContent的pandingRight 137 //tab-content宽度 - 右侧图例宽度 - lp-overview滚动条宽度 - lpbContent的pandingRight
138 this.lpbContentWidth = this.$store.state.contentWidth - 34 - 20; 138 this.lpbContentWidth = this.$store.state.contentWidth - 34 - 20;
...@@ -145,15 +145,15 @@ export default { ...@@ -145,15 +145,15 @@ export default {
145 }, 145 },
146 methods: { 146 methods: {
147 //获取楼盘表数据 147 //获取楼盘表数据
148 getLpb(zrzbsm) { 148 getLpb(zrzbsm,syclx) {
149 getLpb(zrzbsm).then((res) => { 149 getLpb(zrzbsm,syclx).then((res) => {
150 if (res.code == 200) { 150 if (res.code == 200) {
151 this.loading = false; 151 this.loading = false;
152 this.lpbData = res.result == null ? this.lpbData : res.result; 152 this.lpbData = res.result == null ? this.lpbData : res.result;
153 setTimeout(() => { 153 this.$nextTick(()=>{
154 //渲染楼盘表 154 //渲染楼盘表
155 this.dataChange(); 155 this.dataChange();
156 }, 200); 156 })
157 } else { 157 } else {
158 this.$message({ 158 this.$message({
159 message: res.message, 159 message: res.message,
...@@ -172,12 +172,13 @@ export default { ...@@ -172,12 +172,13 @@ export default {
172 //自然幢下元素高度宽度计算 172 //自然幢下元素高度宽度计算
173 dataChange() { 173 dataChange() {
174 //计算逻辑幢宽度 20为marginRight值 174 //计算逻辑幢宽度 20为marginRight值
175 this.ljzWidth -= 9980; 175 this.ljzWidth = 20;
176 if (this.$refs.ljz != undefined) { 176 if (this.$refs.ljz != undefined) {
177 this.$refs.ljz.forEach((item) => { 177 this.$refs.ljz.forEach((item) => {
178 this.ljzWidth += item.offsetWidth + 20; 178 this.ljzWidth += item.offsetWidth + 20;
179 }); 179 });
180 } else { 180 } else {
181
181 } 182 }
182 //计算独立幢单元和独立层户宽度 183 //计算独立幢单元和独立层户宽度
183 //考虑this.$refs.zdy的length为0的情况,即自然幢下没有独立幢单元 184 //考虑this.$refs.zdy的length为0的情况,即自然幢下没有独立幢单元
...@@ -186,7 +187,7 @@ export default { ...@@ -186,7 +187,7 @@ export default {
186 let higher = true; 187 let higher = true;
187 //记录最高的幢单元高度 默认为第一个幢单元高度 188 //记录最高的幢单元高度 默认为第一个幢单元高度
188 let highest = this.$refs.zdy[0].offsetHeight; 189 let highest = this.$refs.zdy[0].offsetHeight;
189 this.zdyWidth -= 980; 190 this.zdyWidth = 20;
190 this.$refs.zdy.forEach((item) => { 191 this.$refs.zdy.forEach((item) => {
191 this.zdyWidth += item.offsetWidth + 21; 192 this.zdyWidth += item.offsetWidth + 21;
192 this.cHeight = 193 this.cHeight =
...@@ -335,8 +336,14 @@ export default { ...@@ -335,8 +336,14 @@ export default {
335 legendToggleFlagChange() { 336 legendToggleFlagChange() {
336 return this.$parent.legendToggleFlag; 337 return this.$parent.legendToggleFlag;
337 }, 338 },
339 syclx(){
340 return this.$parent.syclx
341 }
338 }, 342 },
339 watch: { 343 watch: {
344 syclx(n){
345 this.getLpb(this.$store.state.zrzbsm,n)
346 },
340 createFlagChange: function(val) { 347 createFlagChange: function(val) {
341 setTimeout(() => { 348 setTimeout(() => {
342 this.lpbContentWidth = this.$refs.lpbContent.offsetWidth - 6; 349 this.lpbContentWidth = this.$refs.lpbContent.offsetWidth - 6;
......