|
@@ -180,29 +180,37 @@ export default {
|
|
|
const _this = this
|
|
|
_this.loading = true
|
|
|
_this.AllData = []
|
|
|
- const postData = {
|
|
|
- customerManagementId: val.customerManagementId
|
|
|
- }
|
|
|
- // let postData
|
|
|
- // if (val.roomSelectionInfoId) {
|
|
|
- // postData = {
|
|
|
- // id: val.roomSelectionInfoId
|
|
|
- // }
|
|
|
- // } else if (val.customerManagementId) {
|
|
|
- // postData = {
|
|
|
- // customerManagementId: val.customerManagementId
|
|
|
- // }
|
|
|
+ // const postData = {
|
|
|
+ // customerManagementId: val.customerManagementId
|
|
|
// }
|
|
|
- this.baseRequest('listAll', postData).then((res) => {
|
|
|
- if (res.data) {
|
|
|
- res.data.forEach(function(item) {
|
|
|
- const json = _this.getItemJson(item)
|
|
|
+ let postData
|
|
|
+ if (val.houseId) {
|
|
|
+ postData = {
|
|
|
+ id: val.houseId
|
|
|
+ }
|
|
|
+ this.baseRoomRequest('getById', postData).then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ const json = _this.getItemJson(res.data)
|
|
|
_this.AllData.push(json)
|
|
|
- })
|
|
|
+ }
|
|
|
+ _this.loading = false
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ postData = {
|
|
|
+ customerManagementId: val.customerManagementId
|
|
|
}
|
|
|
- _this.loading = false
|
|
|
- }).catch(() => {
|
|
|
- })
|
|
|
+ this.baseRequest('listAll', postData).then((res) => {
|
|
|
+ if (res.data) {
|
|
|
+ res.data.forEach(function(item) {
|
|
|
+ const json = _this.getItemJson(item)
|
|
|
+ _this.AllData.push(json)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ _this.loading = false
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
getItemJson: function(item) {
|
|
|
item.decorationSituationStr = this.dc_map.DECORATION_SITUATION[item.decorationSituation]
|
|
@@ -303,6 +311,9 @@ export default {
|
|
|
},
|
|
|
baseCustomerRequest(opUrl, postData) {
|
|
|
return this.$channel.globeRequest('CustomerManagementController', opUrl, postData, 'project')
|
|
|
+ },
|
|
|
+ baseRoomRequest(opUrl, postData) {
|
|
|
+ return this.$channel.globeRequest('ParkRoomController', opUrl, postData, 'project')
|
|
|
}
|
|
|
|
|
|
}
|