|
@@ -23,7 +23,9 @@
|
|
|
:data="tableData2"
|
|
|
:columns="listConfig"
|
|
|
:current-page="currentPage"
|
|
|
- :page-size="-1"
|
|
|
+ :page-size="pageSize"
|
|
|
+ :total-records="totalRecords"
|
|
|
+ @currentChange="pageHandle"
|
|
|
:operationsDefaultLength="4"
|
|
|
/>
|
|
|
<div class="xl-form">
|
|
@@ -58,7 +60,7 @@ export default {
|
|
|
inject: ['parentData'],
|
|
|
data() {
|
|
|
return {
|
|
|
- apiStr: 'house.admpricelist',
|
|
|
+ apiStr: 'house.admestatelotterypricelist',
|
|
|
searchForm: {},
|
|
|
noCreated: true,
|
|
|
isLEShow: false,
|
|
@@ -73,6 +75,7 @@ export default {
|
|
|
tableData2() {
|
|
|
const arr = [...this.tableData]
|
|
|
arr.map(item => {
|
|
|
+ if (item.house_img) item.houseImg = item.house_img + '_adm0'
|
|
|
if (this.type === 'add') item.noCan = true
|
|
|
})
|
|
|
return arr
|
|
@@ -106,7 +109,15 @@ export default {
|
|
|
isShow: function(val) {
|
|
|
if (val) {
|
|
|
if (this.type === 'edit') {
|
|
|
- this.getData()
|
|
|
+ this.searchForm = {
|
|
|
+ estate_id: this.curObj.estate_id,
|
|
|
+ lottery_id: this.curObj.id,
|
|
|
+ }
|
|
|
+ this.fetchData()
|
|
|
+ } else {
|
|
|
+ this.totalRecords = 1
|
|
|
+ this.currentPage = 1
|
|
|
+ this.tableData = []
|
|
|
}
|
|
|
this.getDef()
|
|
|
this.$api.house.admestatehousearealist({estate_id: this.curObj.estate_id}).then(res => {
|
|
@@ -132,11 +143,14 @@ export default {
|
|
|
closeREPopup(obj) {
|
|
|
this.isREShow = false
|
|
|
if (obj) {
|
|
|
- this.getData()
|
|
|
+ this.fetchData()
|
|
|
}
|
|
|
},
|
|
|
getData () {
|
|
|
- this.$api.house.admestatelotterypricelist({estate_id: this.curObj.estate_id}).then(res => {
|
|
|
+ this.$api.house.admestatelotterypricelist({
|
|
|
+ estate_id: this.curObj.estate_id,
|
|
|
+ lottery_id: this.curObj.id,
|
|
|
+ }).then(res => {
|
|
|
let list = res.list || []
|
|
|
list.map(item => {
|
|
|
item.houseImg = item.house_img + '_adm0'
|
|
@@ -146,7 +160,7 @@ export default {
|
|
|
},
|
|
|
saveHandle (row) {
|
|
|
this.$api.house.admestatelotterypriceedit(row).then(res => {
|
|
|
- this.getData()
|
|
|
+ this.fetchData()
|
|
|
this.$msgs('更新成功~')
|
|
|
})
|
|
|
},
|