村民圈
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<ai-list class="notice">
|
||||
<template slot="title">
|
||||
<ai-title title="村民圈" isShowBottomBorder isShowArea v-model="search.areaId" :instance="instance" @change="search.current = 1, getList()"></ai-title>
|
||||
</template>
|
||||
<ai-list class="notice" isTabs>
|
||||
<template slot="content">
|
||||
<ai-search-bar class="search-bar">
|
||||
<template #left>
|
||||
@@ -30,18 +27,10 @@
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="tags" label="标签">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-tags">
|
||||
<el-tag type="info" v-for="(item, index) in row.tags" size="small" :key="index">{{ item }}</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" title="详情" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" title="取消公示" @click="changeStatus(row)" :disabled="row.status !== '1'">结束公示</el-button>
|
||||
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -103,7 +92,7 @@
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appvillagediscuss/listUp`, null, {
|
||||
this.instance.post(`/app/appvillagercircleinfo/list`, null, {
|
||||
params: {
|
||||
type: 0,
|
||||
...this.search
|
||||
@@ -121,23 +110,9 @@
|
||||
})
|
||||
},
|
||||
|
||||
changeStatus (item) {
|
||||
this.$confirm('是否要结束公示', {type: 'warning'}).then(() => {
|
||||
this.instance.post('/app/appvillagediscuss/finishPublic', {
|
||||
status: '2',
|
||||
id: item.id
|
||||
}).then(res => {
|
||||
if (res && res.code == 0) {
|
||||
this.$message.success('结束公示成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appvillagediscuss/delete?ids=${id}`).then(res => {
|
||||
this.instance.post(`/app/appvillagercircleinfo/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
@@ -153,15 +128,6 @@
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toAdd(id) {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user