|
@@ -1055,6 +1055,14 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 格式化占用面积,当值为0.00时显示为0
|
|
|
+ formatAreaValue(value) {
|
|
|
+ const numValue = parseFloat(value);
|
|
|
+ if (numValue === 0) {
|
|
|
+ return "0";
|
|
|
+ }
|
|
|
+ return numValue.toFixed(2);
|
|
|
+ },
|
|
|
init() {
|
|
|
this.loading = true;
|
|
|
this.check();
|
|
@@ -1525,22 +1533,14 @@ export default {
|
|
|
.then((d) => {
|
|
|
if (d && d.data && d.data.data) {
|
|
|
let data = d.data.data;
|
|
|
- this.xzfxList[0].value = (data.sdIntersectArea * 0.0015).toFixed(2);
|
|
|
- this.xzfxList[1].value = (data.gdIntersectArea * 0.0015).toFixed(2);
|
|
|
- this.xzfxList[2].value = (data.zzydIntersectArea * 0.0015).toFixed(
|
|
|
- 2
|
|
|
- );
|
|
|
- this.xzfxList[3].value = (data.cdIntersectArea * 0.0015).toFixed(2);
|
|
|
- this.xzfxList[4].value = (data.ldIntersectArea * 0.0015).toFixed(2);
|
|
|
- this.xzfxList[5].value = (data.ssnydIntersectArea * 0.0015).toFixed(
|
|
|
- 2
|
|
|
- );
|
|
|
- this.xzfxList[6].value = (
|
|
|
- data.czcjjsydIntersectArea * 0.0015
|
|
|
- ).toFixed(2);
|
|
|
- this.xzfxList[7].value = (
|
|
|
- data.syjslssydIntersectArea * 0.0015
|
|
|
- ).toFixed(2);
|
|
|
+ this.xzfxList[0].value = this.formatAreaValue(data.sdIntersectArea * 0.0015);
|
|
|
+ this.xzfxList[1].value = this.formatAreaValue(data.gdIntersectArea * 0.0015);
|
|
|
+ this.xzfxList[2].value = this.formatAreaValue(data.zzydIntersectArea * 0.0015);
|
|
|
+ this.xzfxList[3].value = this.formatAreaValue(data.cdIntersectArea * 0.0015);
|
|
|
+ this.xzfxList[4].value = this.formatAreaValue(data.ldIntersectArea * 0.0015);
|
|
|
+ this.xzfxList[5].value = this.formatAreaValue(data.ssnydIntersectArea * 0.0015);
|
|
|
+ this.xzfxList[6].value = this.formatAreaValue(data.czcjjsydIntersectArea * 0.0015);
|
|
|
+ this.xzfxList[7].value = this.formatAreaValue(data.syjslssydIntersectArea * 0.0015);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -1562,7 +1562,7 @@ export default {
|
|
|
for (let k in map) {
|
|
|
this.ghfxList.push({
|
|
|
name: k,
|
|
|
- value: (map[k] * 0.0015).toFixed(2),
|
|
|
+ value: this.formatAreaValue(map[k] * 0.0015),
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -1578,13 +1578,13 @@ export default {
|
|
|
if (d && d.data && d.data.data) {
|
|
|
let data = d.data.data;
|
|
|
this.sqsxList[0].value = data.yjjbntIntersectArea
|
|
|
- ? (data.yjjbntIntersectArea * 0.0015).toFixed(2)
|
|
|
+ ? this.formatAreaValue(data.yjjbntIntersectArea * 0.0015)
|
|
|
: 0;
|
|
|
this.sqsxList[1].value = data.czkfbjIntersectArea
|
|
|
- ? (data.czkfbjIntersectArea * 0.0015).toFixed(2)
|
|
|
+ ? this.formatAreaValue(data.czkfbjIntersectArea * 0.0015)
|
|
|
: 0;
|
|
|
this.sqsxList[2].value = data.stbhhxIntersectArea
|
|
|
- ? (data.stbhhxIntersectArea * 0.0015).toFixed(2)
|
|
|
+ ? this.formatAreaValue(data.stbhhxIntersectArea * 0.0015)
|
|
|
: 0;
|
|
|
}
|
|
|
});
|
|
@@ -2089,6 +2089,12 @@ export default {
|
|
|
if (prop.key in this.item) {
|
|
|
if (prop.key == "pfmarea" && this.item[prop.key]) {
|
|
|
prop.value = (this.item[prop.key] * 0.0015).toFixed(2);
|
|
|
+ } else if (["rjlsx", "rjlxx", "jzmdsx", "jzmdxx", "jzgdsx", "jzgdxx", "ldlsx", "ldlxx"].includes(prop.key) && this.item[prop.key]) {
|
|
|
+ // 容积率、建筑密度、建筑高度、绿地率保留2位小数
|
|
|
+ prop.value = parseFloat(this.item[prop.key]).toFixed(2);
|
|
|
+ } else if (prop.key == "pfsj" && this.item[prop.key]) {
|
|
|
+ // 批复时间格式化,只保留日期部分
|
|
|
+ prop.value = this.item[prop.key].split('T')[0];
|
|
|
} else {
|
|
|
prop.value = this.item[prop.key];
|
|
|
}
|