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

保存

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