Commit e0e2c2f5 by baihong

add:对接照片列表,照片审核

parent a3917a65
...@@ -108,6 +108,7 @@ export default { ...@@ -108,6 +108,7 @@ export default {
this.search(); this.search();
if (this.$route.query.id) { if (this.$route.query.id) {
adminsDe(this.$route.query.id).then(res => { adminsDe(this.$route.query.id).then(res => {
res.group_uuid=res.group_uuid
this.formValidate = Object.assign(this.formValidate, res); this.formValidate = Object.assign(this.formValidate, res);
}); });
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<Option :value="1">已通过</Option> <Option :value="1">已通过</Option>
<Option :value="2">已拒绝</Option> <Option :value="2">已拒绝</Option>
</Select> </Select>
<Button type="primary" @click="goDetail">查 询</Button> <Button type="primary" @click="search">查 询</Button>
<Button type="primary" ghost>重 置</Button> <Button type="primary" ghost>重 置</Button>
</div> </div>
<div class="right"> <div class="right">
...@@ -33,8 +33,11 @@ ...@@ -33,8 +33,11 @@
</div> </div>
<Row style="margin:-10px 0 20px 0"> <Row style="margin:-10px 0 20px 0">
<Col span="24" <Col span="24"
><Button type="primary" @click="goDetail">批量通过</Button ><Button type="primary" @click="confirm">批量通过</Button
><Button style="margin-left:20px" type="primary" @click="goDetail" ><Button
style="margin-left:20px"
type="primary"
@click="modal1 = true;"
>批量拒绝</Button >批量拒绝</Button
></Col ></Col
> >
...@@ -44,32 +47,44 @@ ...@@ -44,32 +47,44 @@
border border
ref="selection" ref="selection"
:columns="columns" :columns="columns"
@on-select="onSelect"
@on-select-all="onSelectAll"
:data="data" :data="data"
> >
<template slot-scope="{ row }" slot="name"> <template slot-scope="{ row }" slot="activity_date">
<span>{{ row.details.name }}</span> <span>{{ row.activity_date | format }}</span>
</template> </template>
<template slot-scope="{ row }" slot="title"> <template slot-scope="{ row }" slot="url">
<span>{{ row.details.title }}</span> <Avatar shape="square" :src="row.url" size="large" />
</template> </template>
<template slot-scope="{ row }" slot="created_at"> <template slot-scope="{ row }" slot="create_time">
<span>{{ row.created_at | format }}</span> <span>{{ row.create_time | format }}</span>
</template> </template>
<template slot-scope="{ row }" slot="enable"> <template slot-scope="{ row }" slot="check_status">
<i-switch {{
:value="row.is_enable === 1 ? true : false" row.check_status === 0
@on-change=" ? "待审核"
value => { : row.check_status === 1
change(value, row); ? "已通过"
} : "已拒绝"
" }}
/>
</template> </template>
<template slot-scope="{ row }" slot="action"> <template slot-scope="{ row }" slot="action">
<a @click="edit(row)">编辑</a> <a
</template> @click="
<template slot-scope="{ row }" slot="edit"> modal2 = true;
<a @click="goTheme(row)">编辑</a> id = row.id;
"
>通过</a
>
<a
style="margin-left:10px"
@click="
modal1 = true;
id = row.id;
"
>拒绝</a
>
</template> </template>
</Table> </Table>
<Pager <Pager
...@@ -77,10 +92,20 @@ ...@@ -77,10 +92,20 @@
:config="config" :config="config"
@on-change="handlePager" @on-change="handlePager"
></Pager> ></Pager>
<Modal v-model="modal1" title="拒绝" @on-ok="ok" @on-cancel="cancel"> <Modal
v-model="modal1"
title="拒绝"
@on-ok="checkActivity(2)"
@on-cancel="cancel"
>
<Input v-model="remark" type="textarea" placeholder="请输入退回原因" /> <Input v-model="remark" type="textarea" placeholder="请输入退回原因" />
</Modal> </Modal>
<Modal v-model="modal2" title="通过" @on-ok="ok" @on-cancel="cancel"> <Modal
v-model="modal2"
title="通过"
@on-ok="checkActivity(1)"
@on-cancel="modal2 = false"
>
<Form ref="formCustom" :label-width="70"> <Form ref="formCustom" :label-width="70">
<FormItem label="评论内容" prop="passwd"> <FormItem label="评论内容" prop="passwd">
<Input <Input
...@@ -103,49 +128,62 @@ import { ...@@ -103,49 +128,62 @@ import {
checkActivityFile checkActivityFile
} from "@/api/clock/activityClocks"; } from "@/api/clock/activityClocks";
import Pager from "@/view/common/Pager.vue"; import Pager from "@/view/common/Pager.vue";
import { formatDate } from "@/libs/util";
export default { export default {
name: "categories", name: "categories",
components: { components: {
Pager Pager
}, },
filters: {
format(value) {
return formatDate(value);
}
},
data() { data() {
return { return {
id: null,
selectList: [],
config: { total: 0, size: 10, current: 1 }, config: { total: 0, size: 10, current: 1 },
modal1: false, modal1: false,
modal2: true, modal2: false,
name: "", name: "",
date: [], date: [],
checkStatu: null, checkStatu: null,
award_amount:null, award_amount: null,
comment:'', comment: "",
remark:'', remark: "",
data: [], data: [],
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
columns: [ columns: [
{ {
type: "selection",
width: 60,
align: "center"
},
{
title: "活动日期", title: "活动日期",
key: "created_at" slot: "activity_date"
}, },
{ {
title: "姓名", title: "姓名",
slot: "name" key: "nick_name"
}, },
{ {
title: "手机号", title: "手机号",
slot: "title" key: "phone"
}, },
{ {
title: "图片", title: "图片",
key: "created_at" slot: "url"
}, },
{ {
title: "上传时间", title: "上传时间",
slot: "enable" slot: "create_time"
}, },
{ {
title: "审核状态", title: "审核状态",
slot: "enable" slot: "check_status"
}, },
{ {
title: "操作", title: "操作",
...@@ -155,6 +193,28 @@ export default { ...@@ -155,6 +193,28 @@ export default {
}; };
}, },
methods: { methods: {
onSelect(val) {
this.selectList = val.map(p => {
return p.id;
});
},
onSelectAll(val) {
this.selectList = val.map(p => {
return p.id;
});
},
confirm() {
this.$Modal.confirm({
title: "批量通过",
content: "您确认要批量通过吗?",
onOk: () => {
this.checkActivity(1)
},
onCancel: () => {
}
});
},
search() { search() {
let params = { let params = {
name: this.name, name: this.name,
...@@ -170,17 +230,23 @@ export default { ...@@ -170,17 +230,23 @@ export default {
this.data = res.data; this.data = res.data;
}); });
}, },
checkActivity() { checkActivity(status) {
if (!this.id && !this.selectList.length) {
this.$Message.error("至少选择一项");
return;
}
let params = { let params = {
award_amount: this.award_amount, award_amount: this.award_amount,
check_status: 1, check_status: status,
comment: this.comment, comment: this.comment,
ids:[], ids: this.id ? [this.id] : this.selectList,
object_type:1, object_type: 1,
remark:this.remark remark: this.remark
}; };
checkActivityFile(params).then(res => { checkActivityFile(params).then(res => {
console.log(res) console.log(res);
this.$Message.success("操作成功!");
this.search();
}); });
}, },
handlePager(pager) { handlePager(pager) {
...@@ -189,7 +255,9 @@ export default { ...@@ -189,7 +255,9 @@ export default {
this.search(); this.search();
} }
}, },
mounted() {} mounted() {
this.search();
}
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment