天府星2.0搞定

This commit is contained in:
liuye
2022-11-04 16:18:10 +08:00
parent 8fa66aeed5
commit 85ae4d8036
4 changed files with 288 additions and 19 deletions

View File

@@ -3,12 +3,6 @@
<ai-list>
<ai-title slot="title" title="任务审核" isShowBottomBorder />
<template #content>
<!-- <ai-search-bar>
<template #right>
<el-input v-model="search.title" class="search-input" size="small" v-throttle="() => {(page.current = 1), getList()} " placeholder="请输入手机号" clearable @change="getList" @clear="page.current = 1, (search.title = ''), getList()" suffix-icon="iconfont iconSearch">
</el-input>
</template>
</ai-search-bar> -->
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" @getList="getList" :col-configs="colConfigs"
:dict="dict" @sort-change="sortChange">
<el-table-column slot="accessUrl" label="凭证内容" align="left">
@@ -17,9 +11,11 @@
</template>
</el-table-column>
<el-table-column slot="options" label="操作" fixed="right" align="center">
<template slot-scope="{ row }" v-if="row.status == 0">
<el-button type="text" @click="pass(row)">通过</el-button>
<el-button type="text" @click="refuse(row)">拒绝</el-button>
<template slot-scope="{ row }">
<el-button type="text" v-if="row.status == 0" @click="pass(row)">通过</el-button>
<el-button type="text" v-if="row.status == 0" @click="refuse(row)">拒绝</el-button>
<el-button type="text" v-if="row.status != 0 && row.openStatus != 1" @click="open(row)">展示</el-button>
<el-button type="text" v-if="row.status != 0 && row.openStatus == 1" @click="open(row)">取消展示</el-button>
</template>
</el-table-column>
</ai-table>
@@ -34,6 +30,7 @@
<el-form-item label="发放积分" prop="integral">
<el-input v-model.trim="form.integral" placeholder="请输入正数" size="small"></el-input>
</el-form-item>
<p><el-checkbox v-model="form.openStatus">同时将随手拍展示到文明广场</el-checkbox></p>
</el-form>
</ai-dialog>
</template>
@@ -51,9 +48,6 @@ export default {
},
data () {
return {
search: {
title: '',
},
page: {
current: 1,
size: 10,
@@ -101,7 +95,8 @@ export default {
onConfirm() {
this.$refs.form.validate((valid)=> {
if(valid) {
this.instance.post(`api/appwechatescalation/examine?id=${this.form.id}&pass=1&integral=${this.form.integral}`).then(res => {
var openStatus = this.form.openStatus ? 1 : 0
this.instance.post(`api/appwechatescalation/examine?id=${this.form.id}&pass=1&integral=${this.form.integral}&openStatus=${openStatus}`).then(res => {
if(res?.code == 0) {
this.dialog = false
this.$message.success('审核成功')
@@ -110,11 +105,19 @@ export default {
})
}
})
},
open(row) {
this.instance.post(`api//appwechatescalation/openShow?id=${row.id}`).then(res => {
if (res.code == 0) {
this.$message.success('操作成功')
this.getList()
}
})
},
pass(row) {
this.dialog = true
this.form = {...row}
this.form.openStatus = row.openStatus == 1 ? true : false
},
refuse(row) {
this.$confirm('确定拒绝该任务?').then(() => {
@@ -130,7 +133,6 @@ export default {
this.instance.post(`api/appwechatescalation/list`,null,{
params: {
...this.page,
...this.search,
}
}).then(res=> {
if(res?.data) {