Browse Source

[完善]PropertyValue处理

master
邵佳豪 1 year ago
parent
commit
730819bb9c
  1. 2
      proxy.config.json
  2. 14
      src/app/ui/collection-tools-building/collection-tools.component.ts
  3. 11
      src/app/ui/collection-tools/collection-tools.component.ts

2
proxy.config.json

@ -1,6 +1,6 @@
{ {
"/api": { "/api": {
"target": "http://121.36.37.70:8207/", "target": "http://183.194.244.232:8088/",
"测试": "http://121.36.37.70:8207/", "测试": "http://121.36.37.70:8207/",
"生产": "http://183.194.244.232:8088/", "生产": "http://183.194.244.232:8088/",
"secure": false, "secure": false,

14
src/app/ui/collection-tools-building/collection-tools.component.ts

@ -901,7 +901,21 @@ export class CollectionToolsComponent2 implements OnInit {
let SitePlanData = JSON.parse( let SitePlanData = JSON.parse(
JSON.stringify(this.canvasData.originaleveryStoreyData) JSON.stringify(this.canvasData.originaleveryStoreyData)
); );
for (const key in SitePlanData.data) {
if (Object.prototype.hasOwnProperty.call(SitePlanData.data, key)) {
const element = SitePlanData.data[key];
element.Width = Number(element.Width);
element.Height = Number(element.Height);
element.PropertyInfos.forEach((item) => {
item.PropertyType = Number(item.PropertyType);
item.PropertyValue = String(item.PropertyValue);
});
}
}
SitePlanData.data = JSON.stringify(SitePlanData.data); SitePlanData.data = JSON.stringify(SitePlanData.data);
let CompanyData = JSON.parse( let CompanyData = JSON.parse(
JSON.stringify(this.canvasData.originalcompanyBuildingData) JSON.stringify(this.canvasData.originalcompanyBuildingData)
); );

11
src/app/ui/collection-tools/collection-tools.component.ts

@ -898,6 +898,17 @@ export class CollectionToolsComponent implements OnInit {
let SitePlanData = JSON.parse( let SitePlanData = JSON.parse(
JSON.stringify(this.canvasData.originaleveryStoreyData) JSON.stringify(this.canvasData.originaleveryStoreyData)
); );
for (const key in SitePlanData.data) {
if (Object.prototype.hasOwnProperty.call(SitePlanData.data, key)) {
const element = SitePlanData.data[key];
element.Width = Number(element.Width);
element.Height = Number(element.Height);
element.PropertyInfos.forEach((item) => {
item.PropertyType = Number(item.PropertyType);
item.PropertyValue = String(item.PropertyValue);
});
}
}
SitePlanData.data = JSON.stringify(SitePlanData.data); SitePlanData.data = JSON.stringify(SitePlanData.data);
let CompanyData = JSON.parse( let CompanyData = JSON.parse(
JSON.stringify(this.canvasData.originalcompanyBuildingData) JSON.stringify(this.canvasData.originalcompanyBuildingData)

Loading…
Cancel
Save