|
@@ -683,6 +683,7 @@ import RSAnalysis from "@/views/ConstructionApplication3D/RSAnalysis/RSAnalysis.
|
|
|
import BuildingStretchingAnalysis from "@/views/ConstructionApplication3D/BuildingStretchingAnalysis/BuildingStretchingAnalysis.vue";
|
|
|
import parkResult from "@/views/ConstructionApplication3D/parkCheck/parkResult.vue";
|
|
|
import ghqk from "./ghqk.js";
|
|
|
+import CheckParkAnalyse from "./CheckParkAnalyse.js";
|
|
|
import {
|
|
|
listProjectinformation,
|
|
|
delConstructionmodel,
|
|
@@ -2550,7 +2551,10 @@ export default {
|
|
|
}
|
|
|
tableDataList.push({ Minfo, KG_Data, FA_Data, TJFA_Data });
|
|
|
}
|
|
|
- var result = await this.buidAreaAndParksComputer(Minfo, false);
|
|
|
+ var result = await CheckParkAnalyse.buidAreaAndParksComputer(
|
|
|
+ Minfo,
|
|
|
+ false
|
|
|
+ );
|
|
|
if (result != null) {
|
|
|
for (var i = 0; i < tableDataList.length; i++) {
|
|
|
var item = tableDataList[i];
|
|
@@ -2614,7 +2618,10 @@ export default {
|
|
|
*/
|
|
|
async CheckPark(Minfo, isJSPark) {
|
|
|
var that = this;
|
|
|
- var result = await that.buidAreaAndParksComputer(Minfo, isJSPark);
|
|
|
+ var result = await CheckParkAnalyse.buidAreaAndParksComputer(
|
|
|
+ Minfo,
|
|
|
+ isJSPark
|
|
|
+ );
|
|
|
if (that.skylineAnalysislayerid) {
|
|
|
that.$layer.close(that.skylineAnalysislayerid);
|
|
|
}
|
|
@@ -2644,710 +2651,7 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
- /**
|
|
|
- * 计算计容面积及车位
|
|
|
- * @param {Object} Minfo
|
|
|
- * @param {Boolean} isJSPark
|
|
|
- */
|
|
|
- async buidAreaAndParksComputer(Minfo, isJSPark) {
|
|
|
- var that = this;
|
|
|
- var datasourcename = Minfo.datasourcename; //模型数据集
|
|
|
- var dataurl = Minfo.dataurl; //报建项目服务地址
|
|
|
- var tcwLayerName = window.CarPark.tcwLayer; //停车位图层
|
|
|
- var floorLayerName = window.CarPark.floorLayer; //分层矢量图层
|
|
|
- var JSResult = {
|
|
|
- id: "",
|
|
|
- projectinformationid: "",
|
|
|
- modelname: "",
|
|
|
- parks: [],
|
|
|
- buildings: [],
|
|
|
- };
|
|
|
-
|
|
|
- var dataSources = [];
|
|
|
- dataSources.push(datasourcename + ":" + tcwLayerName);
|
|
|
- dataSources.push(datasourcename + ":" + floorLayerName);
|
|
|
- //获取停车位及分层数据
|
|
|
- var result;
|
|
|
- var queryByGeometryParameters = {
|
|
|
- getFeatureMode: "SQL",
|
|
|
- datasetNames: dataSources,
|
|
|
- queryParameter: {
|
|
|
- attributeFilter: "SMID!=''",
|
|
|
- },
|
|
|
- // hasGeometry: "true",
|
|
|
- maxFeatures: 10000,
|
|
|
- };
|
|
|
- result = await mapQuery(
|
|
|
- Minfo.dataurl + "/featureResults.json?returnContent=true",
|
|
|
- queryByGeometryParameters
|
|
|
- );
|
|
|
- if (result && result.totalCount == 0) {
|
|
|
- this.$message("未查询到停车位和报建分层数据数据,请重新尝试");
|
|
|
- return;
|
|
|
- }
|
|
|
- /**
|
|
|
- * 总建筑面积
|
|
|
- */
|
|
|
- var totalMJ = 0.0;
|
|
|
- /**
|
|
|
- * 总计容建筑面积
|
|
|
- */
|
|
|
- var totalJRArea = 0.0;
|
|
|
- var jrFldIndex = -1;
|
|
|
- var datasetInfos = result.datasetInfos;
|
|
|
- if (datasetInfos == null || datasetInfos.length == 0) {
|
|
|
- that.$message("未查询到停车位和报建分层数据数据,请重新尝试");
|
|
|
- return;
|
|
|
- }
|
|
|
- var layerName = "";
|
|
|
- var start = 0;
|
|
|
- var end = 0;
|
|
|
- var curFreatures = [];
|
|
|
- for (var i = 0; i < datasetInfos.length; i++) {
|
|
|
- start = datasetInfos[i].featureRange.start;
|
|
|
- end = datasetInfos[i].featureRange.end;
|
|
|
- curFreatures = result.features.filter((item, index) => {
|
|
|
- return index >= start && index <= end;
|
|
|
- });
|
|
|
- if (datasetInfos[i].datasetName.indexOf(tcwLayerName) > -1) {
|
|
|
- layerName = tcwLayerName;
|
|
|
- JSResult.parks = that.statisticscCarpark(
|
|
|
- datasetInfos[i].fieldInfos,
|
|
|
- curFreatures
|
|
|
- );
|
|
|
- } else if (datasetInfos[i].datasetName.indexOf(floorLayerName) > -1) {
|
|
|
- layerName = floorLayerName;
|
|
|
- JSResult.buildings = that.jsJRAreaAndParks(
|
|
|
- datasetInfos[i].fieldInfos,
|
|
|
- curFreatures,
|
|
|
- isJSPark
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- return JSResult;
|
|
|
- },
|
|
|
- /**
|
|
|
- * 统计报建数据停车位数量
|
|
|
- */
|
|
|
- statisticscCarpark(fieldInfos, features) {
|
|
|
- var that = this;
|
|
|
- var CWTypeFld = window.CarPark.CWTypeFld; //机动车 非机动车
|
|
|
- var CWTypeFldIndex = that.getfldIndex(fieldInfos, CWTypeFld);
|
|
|
- var CWTypeFldVal = "";
|
|
|
- var LandNoFld = window.CarPark.LandNoFld;
|
|
|
- var LandNoFldIndex = that.getfldIndex(fieldInfos, LandNoFld);
|
|
|
- var LandNoFldVal = "";
|
|
|
-
|
|
|
- var FloorFld = window.CarPark.FloorFld;
|
|
|
- var FloorFldIndex = that.getfldIndex(fieldInfos, FloorFld); //当前楼层字段
|
|
|
- var FloorFldVal = "";
|
|
|
- var parks = [
|
|
|
- // {
|
|
|
- // landNo: '',
|
|
|
- // totalCount: 0,
|
|
|
- // jdcCount: 0,
|
|
|
- // fjdcCount: 0,
|
|
|
- // floors: [
|
|
|
- // {
|
|
|
- // layer: '',
|
|
|
- // layerTotal: 0,
|
|
|
- // jdcCount: 0,
|
|
|
- // fjdcCount: 0,
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // }
|
|
|
- ];
|
|
|
- var curFeature;
|
|
|
-
|
|
|
- var tcwList = [
|
|
|
- // {
|
|
|
- // landNo: '',
|
|
|
- // floor: '',
|
|
|
- // CWType: ''
|
|
|
- // }
|
|
|
- ];
|
|
|
- var landList = [];
|
|
|
- for (var i = 0; i < features.length; i++) {
|
|
|
- //地块
|
|
|
- curFeature = features[i];
|
|
|
- if (LandNoFldIndex > -1) {
|
|
|
- LandNoFldVal = curFeature.fieldValues[LandNoFldIndex];
|
|
|
- }
|
|
|
- if (LandNoFldVal == "") LandNoFldVal = "无";
|
|
|
- // var landItemIndex = parks.findIndex((item, index) => {
|
|
|
- // return item.landNo.toup() == LandNoFldVal.toUpperCase()
|
|
|
- // })
|
|
|
-
|
|
|
- if (landList.indexOf(LandNoFldVal) == -1) landList.push(LandNoFldVal);
|
|
|
- if (CWTypeFldIndex > -1)
|
|
|
- CWTypeFldVal = curFeature.fieldValues[CWTypeFldIndex];
|
|
|
- else CWTypeFldVal = "机动车";
|
|
|
- if (FloorFldIndex > -1)
|
|
|
- FloorFldVal = curFeature.fieldValues[FloorFldIndex];
|
|
|
- else FloorFldVal = "1";
|
|
|
- tcwList.push({
|
|
|
- landNo: LandNoFldVal,
|
|
|
- floor: FloorFldVal,
|
|
|
- CWType: CWTypeFldVal,
|
|
|
- });
|
|
|
- }
|
|
|
- var floors = [];
|
|
|
- var landItems = [];
|
|
|
- for (var j = 0; j < landList.length; j++) {
|
|
|
- var landText = landList[j];
|
|
|
- landItems = tcwList.filter((t) => t.landNo == landText);
|
|
|
- var jdcCount = 0;
|
|
|
- var fjdcCount = 0;
|
|
|
- //地块
|
|
|
- for (var i = 0; i < landItems.length; i++) {
|
|
|
- if (landItems[i].CWType == "机动车") {
|
|
|
- jdcCount++;
|
|
|
- } else if (landItems[i].CWType == "非机动车") {
|
|
|
- fjdcCount++;
|
|
|
- }
|
|
|
- if (floors.indexOf(landItems[i].floor) == -1) {
|
|
|
- floors.push(landItems[i].floor);
|
|
|
- }
|
|
|
- }
|
|
|
- //楼层
|
|
|
- var floorParks = [];
|
|
|
- for (var index = 0; index < floors.length; index++) {
|
|
|
- var floorItems = landItems.filter((t) => t.floor == floors[index]);
|
|
|
- var jdcItems = landItems.filter(
|
|
|
- (t) => t.floor == floors[index] && t.CWType == "机动车"
|
|
|
- );
|
|
|
- var fjdcItems = landItems.filter(
|
|
|
- (t) => t.floor == floors[index] && t.CWType == "非机动车"
|
|
|
- );
|
|
|
- floorParks.push({
|
|
|
- layer: floors[index],
|
|
|
- tcwCount: floorItems.length,
|
|
|
- jdcCount: jdcItems.length,
|
|
|
- fjdcCount: fjdcItems.length,
|
|
|
- });
|
|
|
- }
|
|
|
- parks.push({
|
|
|
- landNo: landText,
|
|
|
- totalCount: landItems.length,
|
|
|
- jdcCount: jdcCount,
|
|
|
- fjdcCount: fjdcCount,
|
|
|
- floors: floorParks,
|
|
|
- });
|
|
|
- }
|
|
|
- return parks;
|
|
|
- },
|
|
|
- /**
|
|
|
- * 查询字段索引
|
|
|
- */
|
|
|
- getfldIndex(fieldInfos, fldName) {
|
|
|
- var fldIndex = -1;
|
|
|
- if (fieldInfos == null || fldName == null) return fldIndex;
|
|
|
- fieldInfos.forEach((fld, index) => {
|
|
|
- if (fld.name.toUpperCase() == fldName.toUpperCase()) {
|
|
|
- fldIndex = index;
|
|
|
- }
|
|
|
- });
|
|
|
- return fldIndex;
|
|
|
- },
|
|
|
- /***
|
|
|
- * 计算计容面积及必要停车位数量
|
|
|
- * @param {Array}fieldInfos iserver 查询服务 字段信息
|
|
|
- * @param {Array}features iserver 查询服务 要素集合
|
|
|
- * @param {boolean}isJSPark 是否计算规定的车位数量 true/false
|
|
|
- */
|
|
|
- jsJRAreaAndParks(fieldInfos, features, isJSPark) {
|
|
|
- var that = this;
|
|
|
|
|
|
- var ClassFld = window.CarPark.ClassFld; // ClassFld: 'YT',//建筑类型:居住、办公商业 商业 酒店
|
|
|
- var ClassFldIndex = that.getfldIndex(fieldInfos, ClassFld);
|
|
|
- var ClassFldVal = "";
|
|
|
- var LandNoFld = window.CarPark.LandNoFld;
|
|
|
- var LandNoFldIndex = that.getfldIndex(fieldInfos, LandNoFld);
|
|
|
- var LandNoFldVal = "";
|
|
|
- //楼号
|
|
|
- var BuidNoFld = window.CarPark.BuidNoFld;
|
|
|
- var BuidNoFldIndex = that.getfldIndex(fieldInfos, BuidNoFld);
|
|
|
- var BuidNoFldVal = "";
|
|
|
-
|
|
|
- var FloorFld = window.CarPark.FloorFld;
|
|
|
- var FloorFldIndex = that.getfldIndex(fieldInfos, FloorFld); //当前楼层字段
|
|
|
- var FloorFldVal = "";
|
|
|
-
|
|
|
- var JRAreaFld = window.CarPark.JRAreaFld; //当前楼层字段 //计容面积
|
|
|
- var JRAreaFldIndex = that.getfldIndex(fieldInfos, JRAreaFld);
|
|
|
- var JRAreaFldVal = 0.0;
|
|
|
-
|
|
|
- var JRRationFld = window.CarPark.JRRationFld; // 计容率
|
|
|
- var JRRationFldIndex = that.getfldIndex(fieldInfos, JRRationFld);
|
|
|
- var JRRationFldVal = 0.0;
|
|
|
-
|
|
|
- var smareaFld = "SMAREA";
|
|
|
- var smareaFldIndex = that.getfldIndex(fieldInfos, smareaFld);
|
|
|
- var smareaFldVal = 0.0;
|
|
|
- //居住 楼层户数
|
|
|
- var houseFld = window.CarPark.HouseFld;
|
|
|
- var houseFldIndex = that.getfldIndex(fieldInfos, houseFld); //用途居民建筑类 楼层户数
|
|
|
- var houseFldVal = 0;
|
|
|
-
|
|
|
- var B144Fld = window.CarPark.B144Fld; //楼层中144平以上户数
|
|
|
- var B144FldIndex = that.getfldIndex(fieldInfos, B144Fld); //当前楼层住户144平米以上住户数量字段
|
|
|
- var B144FldVal = 0;
|
|
|
-
|
|
|
- var RoomFld = window.CarPark.RoomFld; //酒店类型 客房数
|
|
|
- var RoomFldIndex = that.getfldIndex(fieldInfos, RoomFld); //酒店类型 当前层 客房数
|
|
|
- var RoomFldVal = 0;
|
|
|
-
|
|
|
- var FTeacherFld = window.CarPark.FTeacherFld; //教育用地 教职工人数字段
|
|
|
- var FTeacherFldIndex = that.getfldIndex(fieldInfos, FTeacherFld);
|
|
|
- var FTeacherFldVal = 0.0;
|
|
|
-
|
|
|
- var SeatNumberFld = window.CarPark.SeatNumberFld; //体育馆 音乐厅、影剧院、音乐厅 体育场馆 楼层座位数量
|
|
|
- var SeatNumberFldIndex = that.getfldIndex(fieldInfos, SeatNumberFld);
|
|
|
- var SeatNumberFldVal = 0.0;
|
|
|
- var VisitorFld = window.CarPark.VisitorFld; //设计游客容量 旅游(游览)码头
|
|
|
- var VisitorFldIndex = that.getfldIndex(fieldInfos, VisitorFld);
|
|
|
- var VisitorFldVal = 0.0;
|
|
|
-
|
|
|
- var FAAreaFld = window.CarPark.FAAreaFld; //方案建筑面积
|
|
|
- var FAAreaFldIndex = that.getfldIndex(fieldInfos, FAAreaFld);
|
|
|
- var FAAreaFldVal = 0.0;
|
|
|
- var FAJRAreaFld = window.CarPark.FAJRAreaFld; //方案计容建筑面积
|
|
|
- var FAJRAreaFldIndex = that.getfldIndex(fieldInfos, FAJRAreaFld);
|
|
|
- var FAJRAreaFldVal = 0.0;
|
|
|
-
|
|
|
- var landList = [
|
|
|
- // //地块
|
|
|
- // {
|
|
|
- // landNo: '',
|
|
|
- // buildNum: 0,
|
|
|
- // mj: 0.00,
|
|
|
- // jrmj: 0.00,
|
|
|
- // builds: [
|
|
|
- // {
|
|
|
- // //一栋
|
|
|
- // buildNo: '',
|
|
|
- // mj: 0,
|
|
|
- // jrmj: 0,
|
|
|
- // floorCount: 0,
|
|
|
- // floors: [
|
|
|
- // //单层
|
|
|
- // {
|
|
|
- // layer: '',
|
|
|
- // yt: '',
|
|
|
- // house: 0,
|
|
|
- // B144: 0,
|
|
|
- // rooms: '',
|
|
|
- // mj: 0.00,
|
|
|
- // jrmj: 0.00,
|
|
|
- // needTcW: 0,
|
|
|
- // classes: [
|
|
|
- // {
|
|
|
- // yt: '',
|
|
|
- // house: 0,
|
|
|
- // B144: 0,
|
|
|
- // rooms: '',
|
|
|
- // mj: 0.00,
|
|
|
- // jrmj: 0.00,
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // }
|
|
|
- ];
|
|
|
- var allItems = [];
|
|
|
- var landTextList = [];
|
|
|
- var curFeature;
|
|
|
- for (var i = 0; i < features.length; i++) {
|
|
|
- curFeature = features[i];
|
|
|
- //地块
|
|
|
- if (LandNoFldIndex > -1)
|
|
|
- LandNoFldVal = curFeature.fieldValues[LandNoFldIndex];
|
|
|
- else LandNoFldVal = "无";
|
|
|
- if (landTextList.indexOf(LandNoFldVal) == -1)
|
|
|
- landTextList.push(LandNoFldVal);
|
|
|
- //楼号
|
|
|
- if (BuidNoFldIndex > -1)
|
|
|
- BuidNoFldVal = curFeature.fieldValues[BuidNoFldIndex];
|
|
|
- //用途
|
|
|
- if (ClassFldIndex > -1)
|
|
|
- ClassFldVal = curFeature.fieldValues[ClassFldIndex];
|
|
|
- //楼层
|
|
|
- if (FloorFldIndex > -1)
|
|
|
- FloorFldVal = curFeature.fieldValues[FloorFldIndex];
|
|
|
- //面积
|
|
|
- if (smareaFldIndex > -1)
|
|
|
- smareaFldVal = parseFloat(curFeature.fieldValues[smareaFldIndex]);
|
|
|
-
|
|
|
- //方案面积 新增 20240717
|
|
|
- if (FAAreaFldIndex > -1)
|
|
|
- FAAreaFldVal = parseFloat(curFeature.fieldValues[FAAreaFldIndex]);
|
|
|
- //方案计容面积
|
|
|
- if (FAJRAreaFldIndex > -1)
|
|
|
- FAJRAreaFldVal = parseFloat(curFeature.fieldValues[FAJRAreaFldIndex]);
|
|
|
-
|
|
|
- //计容率
|
|
|
- if (JRRationFldIndex > -1)
|
|
|
- JRRationFldVal = parseFloat(curFeature.fieldValues[JRRationFldIndex]);
|
|
|
- else JRRationFldVal = 0;
|
|
|
- //计容面积
|
|
|
- if (JRAreaFldIndex > -1)
|
|
|
- JRAreaFldVal = parseFloat(curFeature.fieldValues[JRAreaFldIndex]);
|
|
|
- else {
|
|
|
- if (JRRationFldVal != null)
|
|
|
- JRAreaFldVal = smareaFldVal * JRRationFldVal;
|
|
|
- else JRAreaFldVal = smareaFldVal;
|
|
|
- }
|
|
|
- //楼层户数
|
|
|
- if (houseFldIndex > -1)
|
|
|
- houseFldVal = parseInt(curFeature.fieldValues[houseFldIndex]);
|
|
|
- else houseFldVal = 0;
|
|
|
- //当前楼层住户144平米以上住户数量字段
|
|
|
- if (B144FldIndex > -1)
|
|
|
- B144FldVal = parseInt(curFeature.fieldValues[B144FldIndex]);
|
|
|
- else B144FldVal = 0;
|
|
|
- //酒店类型 客房数
|
|
|
- if (RoomFldIndex > -1)
|
|
|
- RoomFldVal = parseInt(curFeature.fieldValues[RoomFldIndex]);
|
|
|
- else RoomFldVal = 0;
|
|
|
- //酒店类型 客房数
|
|
|
- if (FTeacherFldIndex > -1)
|
|
|
- FTeacherFldVal = parseInt(curFeature.fieldValues[FTeacherFldIndex]);
|
|
|
- else FTeacherFldVal = 0;
|
|
|
- //体育馆 音乐厅座位数量
|
|
|
- if (SeatNumberFldIndex > -1)
|
|
|
- SeatNumberFldVal = parseInt(
|
|
|
- curFeature.fieldValues[SeatNumberFldIndex]
|
|
|
- );
|
|
|
- else SeatNumberFldVal = 0;
|
|
|
- //游览码头设计游客容量
|
|
|
- if (VisitorFldIndex > -1)
|
|
|
- VisitorFldVal = parseInt(curFeature.fieldValues[VisitorFldIndex]);
|
|
|
- else VisitorFldVal = 0;
|
|
|
-
|
|
|
- if (BuidNoFldVal == "无" || BuidNoFldVal == "") {
|
|
|
- BuidNoFldVal = "地下";
|
|
|
- }
|
|
|
- allItems.push({
|
|
|
- landNo: LandNoFldVal,
|
|
|
- buildNo: BuidNoFldVal,
|
|
|
- yt: ClassFldVal,
|
|
|
- floor: FloorFldVal,
|
|
|
- area: smareaFldVal,
|
|
|
- jrRation: JRRationFldVal,
|
|
|
- jrArea: JRAreaFldVal,
|
|
|
- faArea: FAAreaFldVal,
|
|
|
- faJRArea: FAJRAreaFldVal,
|
|
|
- house: houseFldVal,
|
|
|
- b144: B144FldVal,
|
|
|
- rooms: RoomFldVal,
|
|
|
- teachers: FTeacherFldVal,
|
|
|
- seats: SeatNumberFldVal,
|
|
|
- visitor: VisitorFldVal,
|
|
|
- jdcCount: 0,
|
|
|
- fjdcCount: 0,
|
|
|
- });
|
|
|
- }
|
|
|
- /** 是否计算车位 */
|
|
|
- if (isJSPark != null && isJSPark == true)
|
|
|
- allItems = that.jrCarNormal(allItems);
|
|
|
- //遍历所有地块
|
|
|
- for (var i = 0; i < landTextList.length; i++) {
|
|
|
- var landNo = landTextList[i];
|
|
|
- var landGroup = allItems.filter((t) => t.landNo == landNo);
|
|
|
- var buidNoList = [];
|
|
|
- var landjdcCount = 0;
|
|
|
- var landfjdcCount = 0;
|
|
|
- var fadxjzmj = 0.0;
|
|
|
- var dxjzmj = 0.0;
|
|
|
- for (var j = 0; j < landGroup.length; j++) {
|
|
|
- var buildNo = landGroup[j].buildNo;
|
|
|
- if (
|
|
|
- landGroup[j].floor.toUpperCase().indexOf("B") > -1 ||
|
|
|
- landGroup[j].floor.toUpperCase().indexOf("地下") > 1 ||
|
|
|
- landGroup[j].yt.toUpperCase().indexOf("停车") > -1
|
|
|
- ) {
|
|
|
- fadxjzmj += landGroup[j].faArea;
|
|
|
- dxjzmj += landGroup[j].area;
|
|
|
- }
|
|
|
- if (buidNoList.indexOf(buildNo) == -1) buidNoList.push(buildNo);
|
|
|
- if (isJSPark != null && isJSPark == true) {
|
|
|
- landjdcCount += landGroup[j].jdcCount;
|
|
|
- landfjdcCount += landGroup[j].fjdcCount;
|
|
|
- }
|
|
|
- }
|
|
|
- //地块的建筑面积和计容面积
|
|
|
- var landMJ = 0.0;
|
|
|
- var landJRMJ = 0.0;
|
|
|
- ///方案面积 新增 20240717
|
|
|
- var landFAMJ = 0.0;
|
|
|
- var landFAJRMJ = 0.0;
|
|
|
- //当前地块所有建筑
|
|
|
- var curLandBuilds = [];
|
|
|
- // {
|
|
|
- // //一栋
|
|
|
- // buildNo: '',
|
|
|
- // mj: 0,
|
|
|
- // jrmj: 0,
|
|
|
- // famj:0, 20240717 新增
|
|
|
- // floorCount: 0,
|
|
|
- // floors: [
|
|
|
- // //单层
|
|
|
- // {
|
|
|
- // layer: '',
|
|
|
- // house: 0,
|
|
|
- // B144: 0,
|
|
|
- // rooms: '',
|
|
|
- // mj: 0.00,
|
|
|
- // jrmj: 0.00,
|
|
|
- // famj: 0.00, 20240717 新增
|
|
|
- // }
|
|
|
- // ]
|
|
|
- // }
|
|
|
- for (var k = 0; k < buidNoList.length; k++) {
|
|
|
- //当前建筑
|
|
|
- var curBuildNo = buidNoList[k];
|
|
|
- var buildMJ = 0.0;
|
|
|
- var buildJRMJ = 0.0;
|
|
|
- var buildFAMJ = 0.0; //20240717 新增
|
|
|
- var buildFAJRMJ = 0.0;
|
|
|
- var floorList = [];
|
|
|
- var ytList = [];
|
|
|
- var buildItemList = landGroup.filter((t) => t.buildNo == curBuildNo);
|
|
|
- for (var m = 0; m < buildItemList.length; m++) {
|
|
|
- var curFloor = buildItemList[m].floor;
|
|
|
- var yt = buildItemList[m].yt;
|
|
|
- if (floorList.indexOf(curFloor) == -1) floorList.push(curFloor);
|
|
|
- if (ytList.indexOf(yt) == -1) ytList.push(yt);
|
|
|
- landMJ += buildItemList[m].area;
|
|
|
- landJRMJ += buildItemList[m].jrArea;
|
|
|
- landFAMJ += buildItemList[m].faArea;
|
|
|
- landFAJRMJ += buildItemList[m].faJRArea;
|
|
|
- }
|
|
|
- var curfloors = [];
|
|
|
- var singleBuild = {};
|
|
|
- var floors = [];
|
|
|
- var singleBuild = {};
|
|
|
- var floors = [];
|
|
|
- //当前建筑所有楼层
|
|
|
- for (var n = 0; n < floorList.length; n++) {
|
|
|
- var floorText = floorList[n];
|
|
|
- var curFloors = landGroup.filter((t) => t.floor == floorText);
|
|
|
- //当前楼层的面积、计容面积、房间数等
|
|
|
- var mj = 0.0;
|
|
|
- var jrmj = 0.0;
|
|
|
- var famj = 0.0; //20240717 新增
|
|
|
- var fajrmj = 0.0;
|
|
|
- var rooms = 0;
|
|
|
- // var layer = floorText;
|
|
|
- var house = 0;
|
|
|
- var B144 = 0;
|
|
|
- curFloors.forEach((item, index) => {
|
|
|
- mj += item.area;
|
|
|
- jrmj += item.jrArea;
|
|
|
- famj += item.faArea; //20240717 新增
|
|
|
- fajrmj += item.faJRArea;
|
|
|
- house += item.house;
|
|
|
- B144 += item.b144;
|
|
|
- });
|
|
|
- var floorClass = [];
|
|
|
- // classes: [{yt: '', house: 0,B144: 0,rooms: '',mj: 0.00,jrmj: 0.00,}]
|
|
|
- // 用途-----start
|
|
|
- for (var t = 0; t < ytList.length; t++) {
|
|
|
- var curyt = ytList[t];
|
|
|
- var ytHouse = 0;
|
|
|
- var ytB144 = 0;
|
|
|
- var ytrooms = 0;
|
|
|
- var ytytmj = 0.0;
|
|
|
- var ytjrmj = 0.0;
|
|
|
- var ytfamj = 0.0; //20240717
|
|
|
- var ytfajrmj = 0.0;
|
|
|
- var teachers = 0.0;
|
|
|
- var seats = 0.0;
|
|
|
- var visitor = 0.0;
|
|
|
- var floorYTItems = curFloors.filter((t) => t.yt == curyt);
|
|
|
- if (floorYTItems.length == 0) continue;
|
|
|
- floorYTItems.forEach((tt, iindex) => {
|
|
|
- ytB144 += tt.b144;
|
|
|
- ytrooms += tt.rooms;
|
|
|
- ytytmj += tt.area;
|
|
|
- ytjrmj += tt.jrArea;
|
|
|
- ytfamj += tt.faArea;
|
|
|
- ytfajrmj += tt.faJRArea;
|
|
|
- ytHouse += tt.house;
|
|
|
- teachers += tt.teachers;
|
|
|
- seats += tt.seats;
|
|
|
- visitor += tt.visitor;
|
|
|
- });
|
|
|
- floorClass.push({
|
|
|
- yt: curyt,
|
|
|
- house: ytHouse,
|
|
|
- B144: ytB144,
|
|
|
- rooms: ytrooms,
|
|
|
- mj: ytytmj,
|
|
|
- jrmj: ytjrmj,
|
|
|
- famj: ytfamj,
|
|
|
- fajrmj: ytfajrmj,
|
|
|
- teachers: teachers,
|
|
|
- seats: seats,
|
|
|
- visitor: visitor,
|
|
|
- });
|
|
|
- }
|
|
|
- // 用途-----end
|
|
|
- floors.push({
|
|
|
- layer: floorText,
|
|
|
- // class: yt,
|
|
|
- house: house,
|
|
|
- B144: B144,
|
|
|
- rooms: rooms,
|
|
|
- mj: mj,
|
|
|
- jrmj: jrmj,
|
|
|
- famj: famj,
|
|
|
- fajrmj: fajrmj,
|
|
|
- classes: floorClass,
|
|
|
- });
|
|
|
- buildMJ += mj;
|
|
|
- buildJRMJ += jrmj;
|
|
|
- buildFAMJ += famj;
|
|
|
- buildFAJRMJ += fajrmj;
|
|
|
- }
|
|
|
- singleBuild = {
|
|
|
- buildNo: curBuildNo,
|
|
|
- mj: buildMJ,
|
|
|
- jrmj: buildJRMJ,
|
|
|
- famj: buildFAMJ,
|
|
|
- fajrmj: buildFAJRMJ,
|
|
|
- floorCount: floorList.length,
|
|
|
- floors: floors,
|
|
|
- };
|
|
|
- curLandBuilds.push(singleBuild);
|
|
|
- }
|
|
|
- landList.push({
|
|
|
- landNo: landNo,
|
|
|
- buildNum: buidNoList.length,
|
|
|
- mj: landMJ,
|
|
|
- jrmj: landJRMJ,
|
|
|
- famj: landFAMJ,
|
|
|
- fadxjzmj: fadxjzmj,
|
|
|
- dxjzmj: dxjzmj,
|
|
|
- fajrmj: landFAJRMJ,
|
|
|
- jdcCount: landjdcCount,
|
|
|
- fjdcCount: landfjdcCount,
|
|
|
- builds: curLandBuilds,
|
|
|
- });
|
|
|
- }
|
|
|
- allItems = [];
|
|
|
- landTextList = [];
|
|
|
- return landList;
|
|
|
- },
|
|
|
- /**根据用途计算车位数量
|
|
|
- * @param{Array} list:[
|
|
|
- * { landNo:'',
|
|
|
- * buildNo:'' ,
|
|
|
- * class: '',
|
|
|
- * floor: '',
|
|
|
- * area:'' ,
|
|
|
- * jrRation:0.00 ,
|
|
|
- * jrArea: 0.00,
|
|
|
- * house:0 ,
|
|
|
- * b144: 0,
|
|
|
- * rooms: 0,
|
|
|
- * jdcCount:0.00,
|
|
|
- * fjdcCount:0.00}
|
|
|
- * ]
|
|
|
- */
|
|
|
- jrCarNormal(list) {
|
|
|
- var normClasses = window.CarPark.classes;
|
|
|
- if (list == null) return null;
|
|
|
- var ytIndex = -1;
|
|
|
- var b144 = 0;
|
|
|
- var area = 0.0;
|
|
|
- var house = 0;
|
|
|
- var rooms = 0;
|
|
|
- var needTCW = 0;
|
|
|
- for (var i = 0; i < list.length; i++) {
|
|
|
- var item = list[i];
|
|
|
- var yt = item.yt;
|
|
|
- var jdcCount = 0.0;
|
|
|
- var fjdcCount = 0.0;
|
|
|
- var curClass = normClasses.find((t) => t.Name.indexOf(yt) > -1);
|
|
|
- if (curClass == null) {
|
|
|
- list[i].jdcCount = jdcCount;
|
|
|
- list[i].fjdcCount = fjdcCount;
|
|
|
- continue;
|
|
|
- }
|
|
|
- var MotorRatio = 1;
|
|
|
- var NoMotorRatio = 1;
|
|
|
- var MotorRatio144 = 1;
|
|
|
- var NoMotorRatio144 = 1;
|
|
|
- var subClass = curClass.Children.find((t) => t.Name.indexOf(yt) > -1);
|
|
|
- if (subClass != null) {
|
|
|
- MotorRatio = subClass.MotorRatio;
|
|
|
- NoMotorRatio = subClass.NoMotorRatio;
|
|
|
- NoMotorRatio144 = subClass.NoMotorRatio44;
|
|
|
- MotorRatio144 = subClass.MotorRatio144;
|
|
|
- } else {
|
|
|
- console.log(
|
|
|
- "车位计算未找到建筑类型:" +
|
|
|
- yt +
|
|
|
- "相关的配置信息,请检查数据是否正确"
|
|
|
- );
|
|
|
- MotorRatio = curClass.MotorRatio;
|
|
|
- NoMotorRatio = curClass.NoMotorRatio;
|
|
|
- NoMotorRatio144 = curClass.MotorRatio;
|
|
|
- MotorRatio144 = curClass.NoMotorRatio;
|
|
|
- }
|
|
|
- if (curClass.Name.indexOf("居住") > -1) {
|
|
|
- if (subClass.Name.indexOf("城镇社区服务设施") > -1) {
|
|
|
- jdcCount = (item.jrArea / 100) * MotorRatio;
|
|
|
- fjdcCount = (item.jrArea / 100) * NoMotorRatio;
|
|
|
- } else {
|
|
|
- jdcCount =
|
|
|
- item.b144 * MotorRatio144 +
|
|
|
- (item.house - house.b144) * MotorRatio;
|
|
|
- fjdcCount =
|
|
|
- item.b144 * NoMotorRatio144 +
|
|
|
- (item.house - house.b144) * NoMotorRatio;
|
|
|
- }
|
|
|
- } else if (curClass.Name.indexOf("商业") > -1) {
|
|
|
- if (subClass.Name.indexOf("酒店") > -1) {
|
|
|
- jdcCount = item.rooms * MotorRatio;
|
|
|
- fjdcCount = item.rooms * NoMotorRatio;
|
|
|
- } else {
|
|
|
- jdcCount = (item.jrArea / 100) * MotorRatio;
|
|
|
- fjdcCount = (item.jrArea / 100) * NoMotorRatio;
|
|
|
- }
|
|
|
- } else if (curClass.Name.indexOf("文化体育") > -1) {
|
|
|
- if (
|
|
|
- subClass.Name.indexOf("体育场馆") > -1 ||
|
|
|
- subClass.Name.indexOf("音乐厅") > -1 ||
|
|
|
- subClass.Name.indexOf("影剧院") > -1
|
|
|
- ) {
|
|
|
- jdcCount = (item.seats / 100) * MotorRatio;
|
|
|
- fjdcCount = (item.seats / 100) * NoMotorRatio;
|
|
|
- } else {
|
|
|
- jdcCount = (item.jrArea / 100) * MotorRatio;
|
|
|
- fjdcCount = (item.jrArea / 100) * NoMotorRatio;
|
|
|
- }
|
|
|
- } else if (curClass.Name.indexOf("景区") > -1) {
|
|
|
- if (yt.indexOf("码头") > -1) {
|
|
|
- jdcCount = (item.visitor * MotorRatio) / 1000;
|
|
|
- fjdcCount = (item.visitor * NoMotorRatio) / 1000;
|
|
|
- visitor;
|
|
|
- } else {
|
|
|
- jdcCount = (item.jrArea * MotorRatio) / 10000;
|
|
|
- fjdcCount = (item.jrArea * NoMotorRatio) / 10000;
|
|
|
- }
|
|
|
- } else {
|
|
|
- jdcCount = (item.jrArea / 100) * MotorRatio;
|
|
|
- fjdcCount = (item.jrArea / 100) * NoMotorRatio;
|
|
|
- }
|
|
|
- list[i].jdcCount = jdcCount;
|
|
|
- list[i].fjdcCount = fjdcCount;
|
|
|
- }
|
|
|
- return list;
|
|
|
- },
|
|
|
/**
|
|
|
* 楼体拉伸
|
|
|
*/
|