提交 0312dfb3 编写于 作者: 刘英杰's avatar 刘英杰

保存

上级 1aa1b839
流水线 #31168 已失败
此差异已折叠。
......@@ -9,7 +9,6 @@
@onSubmit="search"
@onReset="reset"></SearchCondForm>
<Button disabled type="primary" class="ivu-ml-8"><Icon type="md-trash" />清空黑名单</Button>
<!-- 数据table -->
<CTable
......@@ -32,9 +31,11 @@
</template>
<template #action="{ row }">
<a @click="eltDetails(row)">评价</a>
<Poptip confirm transfer title="是否确认删除?" @on-ok="rowDelete(row)">
<Button type="error" size="small" style="margin-left: 8px">删除</Button>
<Poptip confirm transfer title="是否确认?" @on-ok="approval('no',row)">
<Button type="error" size="small" style="margin-left: 8px">不通过</Button>
</Poptip>
<Poptip confirm transfer title="是否确认?" @on-ok="approval('yes',row)">
<Button type="primary" size="small" style="margin-left: 8px">通过</Button>
</Poptip>
</template>
</CTable>
......@@ -118,30 +119,24 @@ export default {
return {
// 搜索项
searchCondList: [
{ id: 'card_name', name: '卡号或姓名', type: 'input', show: true, optList: [] },
{ id: 'begin_time', name: '开始时间', type: 'datetime', show: true, optList: [] },
{ id: 'end_time', name: '结束时间', type: 'datetime', show: true, optList: [] },
{ id: 'state', name: '状态', type: 'select', show: true, optList: [{value:"0",label:'过期'},{value:"1",label:'生效'},{value:"2",label:'强制取消'}] },
{ id: 'send_name', name: '姓名', type: 'input', show: true, optList: [] },
{ id: 'message', name: '留言内容', type: 'input', show: true, optList: [] },
],
// 搜索条件
params:{
page_index: 1,
page_size: 10,
card_name: "",
begin_time: "",
end_time: "",
state: "",
"send_name": "",
"message": "",
"page_index": 1,
"page_size": 10
},
tableColumns:[
{ type: 'index', title: '序号', align: 'center', width: 80, show: true, fixed: 'left' },
{ key: 'card', title: '卡号', align: 'center', minWidth: 120, show: true },
{ key: 'name', title: '姓名', align: 'center', minWidth: 150, show: true },
{ key: 'createtime', title: '开始时间', align: 'center', minWidth: 180, show: true },
{ key: 'end_time', title: '结束时间', align: 'center', minWidth: 180, show: true },
{ slot: 'state', title: '状态', align: 'center', minWidth: 150, show: true },
{ key: 'remark', title: '备注', align: 'center', minWidth: 200, show: true },
{ slot: 'action', title: '操作', align: 'center', minWidth: 120, show: true, fixed: 'right' },
{ key: 'send_card', title: '卡号', align: 'center', minWidth: 120, show: true },
{ key: 'send_name', title: '姓名', align: 'center', minWidth: 150, show: true },
{ key: 'message', title: '内容', align: 'center', minWidth: 180, show: true },
{ key: 'createtime', title: '留言时间', align: 'center', minWidth: 180, show: true },
{ slot: 'action', title: '操作', align: 'center', minWidth: 160, show: true, fixed: 'right' },
],
tableLoading: false,
......@@ -151,7 +146,10 @@ export default {
tableFullscreen: false,
dataCount: 0,
collapse: false,
defaultFormData: {
"comment_id": "",
"audit_status": 1,//-1 no 0await 1 yes
},
//#region 评价
// 评价Modal
eltModalShow: false,
......@@ -229,6 +227,35 @@ export default {
this.getData()
},
methods: {
approval(key,row){
///审核
const strategy = {
'yes':()=>{
this.hooks.myEncapsulationFunction(() => {
return this.asc.getApiCommunityCommentAudit({
comment_id:row.id,
audit_status:1
}).then(res => {
this.getData()
return res;
});
})
},
'no':()=>{
this.hooks.myEncapsulationFunction(() => {
return this.asc.getApiCommunityCommentAudit({
comment_id:row.id,
audit_status:'-1'
}).then(res => {
this.getData()
return res;
});
})
},
}
strategy[key]()
},
// 搜索
search(val) {
Object.keys(val).forEach(a => {
......@@ -250,7 +277,7 @@ export default {
// 查询列表
getData(){
this.tableLoading = true
this.asc.postApiEvaluateGetBlacklist(this.params).then(res => {
this.asc.postApiCommunityGetCommentAuditList(this.params).then(res => {
// console.log('查询数据', res)
this.tableData = res.response.data
this.dataCount = res.response.data_count
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或