|
@@ -157,124 +157,124 @@ export default {
|
|
|
this.page.pageNumber = 1
|
|
|
this.getData()
|
|
|
},
|
|
|
- getData(){
|
|
|
- this.loading = true
|
|
|
- let params = {
|
|
|
- ZoneType: this.zoneCode,
|
|
|
- PageNumber: 1,
|
|
|
- PageSize: 50,
|
|
|
- Orders: "createTime desc, RoomID asc"
|
|
|
- }
|
|
|
- if (this.buildFloorSelectd.length === 1) {
|
|
|
- switch (this.buildFloorSelectd[0]) {
|
|
|
- case 'noKnow':
|
|
|
- params.BuildingId = 'isnull';
|
|
|
- break;
|
|
|
- case 'all':
|
|
|
- // params.BuildingId = '';
|
|
|
- break
|
|
|
- }
|
|
|
- } else if (this.buildFloorSelectd.length === 2) {
|
|
|
- switch (this.buildFloorSelectd[1]) {
|
|
|
- case 'noKnow':
|
|
|
- params.BuildingId = this.buildFloorSelectd[0];
|
|
|
- params.FloorId = 'isnull';
|
|
|
- break;
|
|
|
- case 'all' :
|
|
|
- params.BuildingId = this.buildFloorSelectd[0];
|
|
|
- // params.FloorId = '';
|
|
|
- break;
|
|
|
- default:
|
|
|
- params.BuildingId = this.buildFloorSelectd[0];
|
|
|
- params.FloorId = this.buildFloorSelectd[1]
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- searchZoneQuery(params, res => {
|
|
|
- this.page.total = res.Total
|
|
|
- this.main = res.Content && res.Content.length && res.Content.map(item=> {
|
|
|
- if (item.hasOwnProperty("BuildingId") && item.hasOwnProperty("FloorId")) {
|
|
|
- item.flowBuild = item.BuildingId + "-" + item.FloorId
|
|
|
- } else if(item.hasOwnProperty("BuildingId") && !item.hasOwnProperty("FloorId")) {
|
|
|
- item.flowBuild = item.BuildingId
|
|
|
- }
|
|
|
- return item
|
|
|
- })
|
|
|
- if (this.main && this.main.length && this.main[0].RoomID) {
|
|
|
- this.copyMain = tools.deepCopy(this.main);
|
|
|
- if (this.onlyRead) {
|
|
|
- this.getBatch(this.main)
|
|
|
- }
|
|
|
- }
|
|
|
- this.isLoading = false
|
|
|
- this.getMain()
|
|
|
- this.getOtherType();
|
|
|
- })
|
|
|
- },
|
|
|
- // getData() {
|
|
|
- // if (this.zoneCode != 'OtherZone') {
|
|
|
- // this.isLoading = true
|
|
|
- // let params = {
|
|
|
- // zone: this.zoneCode,
|
|
|
- // data: {
|
|
|
- // Filters: ``,
|
|
|
- // Orders: "createTime desc, RoomID asc",
|
|
|
- // PageNumber: this.page.pageNumber,
|
|
|
- // PageSize: this.page.pageSize
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (this.buildFloorSelectd[0] == "noKnow") {
|
|
|
- // params.data.Filters += `buildingId isNull`
|
|
|
- // } else if (this.buildFloorSelectd[0] && this.buildFloorSelectd[0] != "all") {
|
|
|
- // params.data.Filters += `buildingId='${this.buildFloorSelectd[0]}'`
|
|
|
- // }
|
|
|
- // if (this.buildFloorSelectd.length > 1) {
|
|
|
- // if (this.buildFloorSelectd[1] == "noKnow") {
|
|
|
- // params.data.Filters += `;floorId isNull`
|
|
|
- // } else if (this.buildFloorSelectd[1] && this.buildFloorSelectd[1] != "all") {
|
|
|
- // params.data.Filters += `;floorId='${this.buildFloorSelectd[1]}'`
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (this.zoneItemID) {
|
|
|
- // params.data.Filters += `;RoomID='${this.zoneItemID}'`
|
|
|
- // }
|
|
|
- // if (!params.data.Filters) {
|
|
|
- // delete params.data.Filters
|
|
|
+ // getData(){
|
|
|
+ // this.loading = true
|
|
|
+ // let params = {
|
|
|
+ // ZoneType: this.zoneCode,
|
|
|
+ // PageNumber: 1,
|
|
|
+ // PageSize: 50,
|
|
|
+ // Orders: "createTime desc, RoomID asc"
|
|
|
+ // }
|
|
|
+ // if (this.buildFloorSelectd.length === 1) {
|
|
|
+ // switch (this.buildFloorSelectd[0]) {
|
|
|
+ // case 'noKnow':
|
|
|
+ // params.BuildingId = 'isnull';
|
|
|
+ // break;
|
|
|
+ // case 'all':
|
|
|
+ // // params.BuildingId = '';
|
|
|
+ // break
|
|
|
// }
|
|
|
- // // if (this.buildFloorSelectd.length && this.buildFloorSelectd[0] && this.buildFloorSelectd[1]) {
|
|
|
- // // params.data.Filters = `BuildingId='${this.buildFloorSelectd[0]}';FloorId='${this.buildFloorSelectd[1]}'`
|
|
|
- // // }
|
|
|
- // // else if (buildFloorSelectd.length && buildFloorSelectd[0] && !buildFloorSelectd[1]) {
|
|
|
- // // params.data.Filters = `BuildingId='${buildFloorSelectd[0]}'`
|
|
|
- // // } else {
|
|
|
- // // params.data.Filters = `BuildingId='';FloorId=''`
|
|
|
- // // }
|
|
|
+ // } else if (this.buildFloorSelectd.length === 2) {
|
|
|
+ // switch (this.buildFloorSelectd[1]) {
|
|
|
+ // case 'noKnow':
|
|
|
+ // params.BuildingId = this.buildFloorSelectd[0];
|
|
|
+ // params.FloorId = 'isnull';
|
|
|
+ // break;
|
|
|
+ // case 'all' :
|
|
|
+ // params.BuildingId = this.buildFloorSelectd[0];
|
|
|
+ // // params.FloorId = '';
|
|
|
+ // break;
|
|
|
+ // default:
|
|
|
+ // params.BuildingId = this.buildFloorSelectd[0];
|
|
|
+ // params.FloorId = this.buildFloorSelectd[1]
|
|
|
//
|
|
|
- // queryZone(params, res => {
|
|
|
- // this.page.total = res.Total
|
|
|
- // this.main = res.Content.map((item) => {
|
|
|
- // if (item.hasOwnProperty("BuildingId") && item.hasOwnProperty("FloorId")) {
|
|
|
- // item.flowBuild = item.BuildingId + "-" + item.FloorId
|
|
|
- // } else if (item.hasOwnProperty("BuildingId") && !item.hasOwnProperty("FloorId")) {
|
|
|
- // item.flowBuild = item.BuildingId
|
|
|
- // }
|
|
|
- // return item
|
|
|
- // });
|
|
|
- // if (this.main && this.main.length && this.main[0].RoomID) {
|
|
|
- // this.copyMain = tools.deepCopy(this.main);
|
|
|
- // if (this.onlyRead) {
|
|
|
- // this.getBatch(this.main)
|
|
|
- // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // searchZoneQuery(params, res => {
|
|
|
+ // this.page.total = res.Total
|
|
|
+ // this.main = res.Content && res.Content.length && res.Content.map(item=> {
|
|
|
+ // if (item.hasOwnProperty("BuildingId") && item.hasOwnProperty("FloorId")) {
|
|
|
+ // item.flowBuild = item.BuildingId + "-" + item.FloorId
|
|
|
+ // } else if(item.hasOwnProperty("BuildingId") && !item.hasOwnProperty("FloorId")) {
|
|
|
+ // item.flowBuild = item.BuildingId
|
|
|
// }
|
|
|
- // this.isLoading = false
|
|
|
- // this.getMain()
|
|
|
+ // return item
|
|
|
// })
|
|
|
- // } else {
|
|
|
- // // 其他分区类型查询表数据接口
|
|
|
+ // if (this.main && this.main.length && this.main[0].RoomID) {
|
|
|
+ // this.copyMain = tools.deepCopy(this.main);
|
|
|
+ // if (this.onlyRead) {
|
|
|
+ // this.getBatch(this.main)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
// this.isLoading = false
|
|
|
+ // this.getMain()
|
|
|
// this.getOtherType();
|
|
|
- // }
|
|
|
+ // })
|
|
|
// },
|
|
|
+ getData() {
|
|
|
+ if (this.zoneCode != 'OtherZone') {
|
|
|
+ this.isLoading = true
|
|
|
+ let params = {
|
|
|
+ zone: this.zoneCode,
|
|
|
+ data: {
|
|
|
+ Filters: ``,
|
|
|
+ Orders: "createTime desc, RoomID asc",
|
|
|
+ PageNumber: this.page.pageNumber,
|
|
|
+ PageSize: this.page.pageSize
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.buildFloorSelectd[0] == "noKnow") {
|
|
|
+ params.data.Filters += `buildingId isNull`
|
|
|
+ } else if (this.buildFloorSelectd[0] && this.buildFloorSelectd[0] != "all") {
|
|
|
+ params.data.Filters += `buildingId='${this.buildFloorSelectd[0]}'`
|
|
|
+ }
|
|
|
+ if (this.buildFloorSelectd.length > 1) {
|
|
|
+ if (this.buildFloorSelectd[1] == "noKnow") {
|
|
|
+ params.data.Filters += `;floorId isNull`
|
|
|
+ } else if (this.buildFloorSelectd[1] && this.buildFloorSelectd[1] != "all") {
|
|
|
+ params.data.Filters += `;floorId='${this.buildFloorSelectd[1]}'`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.zoneItemID) {
|
|
|
+ params.data.Filters += `;RoomID='${this.zoneItemID}'`
|
|
|
+ }
|
|
|
+ if (!params.data.Filters) {
|
|
|
+ delete params.data.Filters
|
|
|
+ }
|
|
|
+ // if (this.buildFloorSelectd.length && this.buildFloorSelectd[0] && this.buildFloorSelectd[1]) {
|
|
|
+ // params.data.Filters = `BuildingId='${this.buildFloorSelectd[0]}';FloorId='${this.buildFloorSelectd[1]}'`
|
|
|
+ // }
|
|
|
+ // else if (buildFloorSelectd.length && buildFloorSelectd[0] && !buildFloorSelectd[1]) {
|
|
|
+ // params.data.Filters = `BuildingId='${buildFloorSelectd[0]}'`
|
|
|
+ // } else {
|
|
|
+ // params.data.Filters = `BuildingId='';FloorId=''`
|
|
|
+ // }
|
|
|
+
|
|
|
+ queryZone(params, res => {
|
|
|
+ this.page.total = res.Total
|
|
|
+ this.main = res.Content.map((item) => {
|
|
|
+ if (item.hasOwnProperty("BuildingId") && item.hasOwnProperty("FloorId")) {
|
|
|
+ item.flowBuild = item.BuildingId + "-" + item.FloorId
|
|
|
+ } else if (item.hasOwnProperty("BuildingId") && !item.hasOwnProperty("FloorId")) {
|
|
|
+ item.flowBuild = item.BuildingId
|
|
|
+ }
|
|
|
+ return item
|
|
|
+ });
|
|
|
+ if (this.main && this.main.length && this.main[0].RoomID) {
|
|
|
+ this.copyMain = tools.deepCopy(this.main);
|
|
|
+ if (this.onlyRead) {
|
|
|
+ this.getBatch(this.main)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.isLoading = false
|
|
|
+ this.getMain()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // 其他分区类型查询表数据接口
|
|
|
+ this.isLoading = false
|
|
|
+ this.getOtherType();
|
|
|
+ }
|
|
|
+ },
|
|
|
//获取表格主体内容
|
|
|
getMain() {
|
|
|
if (!!this.hot) {
|