|
@@ -17,6 +17,7 @@
|
|
|
:current-page="currentPage"
|
|
|
:page-size="pageSize"
|
|
|
:total-records="totalRecords"
|
|
|
+ :operationsDefaultLength="3"
|
|
|
@currentChange="pageHandle"
|
|
|
:isAdd="true"
|
|
|
@add="openLEPopup"
|
|
@@ -35,6 +36,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { arrToObj } from '@/utils'
|
|
|
import baseTable from '_m/baseTable.js'
|
|
|
import LotteryEdit from './LotteryEdit'
|
|
|
export default {
|
|
@@ -60,6 +62,8 @@ export default {
|
|
|
tableData2() {
|
|
|
const arr = [...this.tableData]
|
|
|
arr.map(item => {
|
|
|
+ if (Number(item.push_state) !== 1) item.noYFYJ = true
|
|
|
+ if (Number(item.push_state) !== 2) item.noResult = true
|
|
|
})
|
|
|
return arr
|
|
|
}
|
|
@@ -72,9 +76,12 @@ export default {
|
|
|
{ label: '摇号中标题', prop: 'under_way'},
|
|
|
{ label: '摇号时间', prop: 'lottery_time'},
|
|
|
{ label: '摇号结果标题', prop: 'lottery_res'},
|
|
|
- { label: '操作', width: 120, type: 'handle2', operations:
|
|
|
+ { label: '推送状态', prop: 'push_state', type: 'flag', flags: arrToObj(this.$dictData.push_state) },
|
|
|
+ { label: '操作', width: 180, type: 'handle2', operations:
|
|
|
[
|
|
|
{ label: '编辑', func: this.openLEPopup, btnType: 'primary' },
|
|
|
+ { label: '推一房一价', func: this.pushYFYJ, btnType: 'warning', hide: 'noYFYJ' },
|
|
|
+ { label: '推结果', func: this.pushResult, btnType: 'warning', hide: 'noResult' },
|
|
|
// { label: '删除', func: this.delHandle, btnType: 'danger' },
|
|
|
]
|
|
|
}
|
|
@@ -95,6 +102,26 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ pushYFYJ (row) {
|
|
|
+ this.$msg(`您确定要推送一房一价给关注的用户吗?`, 'confirm', () => {
|
|
|
+ this.$api.user.admestatelottery2pushprice({
|
|
|
+ id: row.id
|
|
|
+ }).then(() => {
|
|
|
+ this.$msgs('推送成功~')
|
|
|
+ this.fetchData()
|
|
|
+ })
|
|
|
+ }, null, true)
|
|
|
+ },
|
|
|
+ pushResult (row) {
|
|
|
+ this.$msg(`您确定要推送摇号结果给关注的用户吗?`, 'confirm', () => {
|
|
|
+ this.$api.user.admestatelottery2pushres({
|
|
|
+ id: row.id
|
|
|
+ }).then(() => {
|
|
|
+ this.$msgs('推送成功~')
|
|
|
+ this.fetchData()
|
|
|
+ })
|
|
|
+ }, null, true)
|
|
|
+ },
|
|
|
delHandle(row) {
|
|
|
this.$msg(`您确定要删除该楼盘吗?`, 'confirm', () => {
|
|
|
this.$api.house.admestatelottery2del({
|