Commit 2659d1b9 by 陈浩建

活动审核

parent fc8c09bf
...@@ -19,6 +19,9 @@ let uploadImg = (params) => postAction(prefix + "/activity/uploadImg" , params); ...@@ -19,6 +19,9 @@ let uploadImg = (params) => postAction(prefix + "/activity/uploadImg" , params);
//审核 //审核
let auditActivity = (params) => postAction(prefix + "/activity/auditActivity" , params); let auditActivity = (params) => postAction(prefix + "/activity/auditActivity" , params);
//审核
let auditActivityNew = (params) => postAction(prefix + "/activity/auditActivityNew" , params);
export { export {
getList,addActivity,updateActivity,deleteActivity,uploadImg,auditActivity getList,addActivity,updateActivity,deleteActivity,uploadImg,auditActivity,auditActivityNew
} }
...@@ -35,8 +35,12 @@ ...@@ -35,8 +35,12 @@
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;"> <span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button> <a-button @click="search()" type="primary">查询</a-button>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a-button @click="add()" type="primary">添加</a-button> <a-button @click="add()" type="primary">添加</a-button>
<a-divider type="vertical"/>
<a-button @click="start()"type="primary" :disabled="hasSelected" :loading="loading">
审核
</a-button>
</a-col> </a-col>
</span> </span>
</a-row> </a-row>
...@@ -44,17 +48,24 @@ ...@@ -44,17 +48,24 @@
</div> </div>
<!--列表--> <!--列表-->
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"> <s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
<template slot="imageUrl" slot-scope="text"> <template slot="imageUrl" slot-scope="text">
<img style="width: 20%" :src="apis + text" @click="imgClick(text)"> <img style="width: 20%" :src="apis + text" @click="imgClick(text)">
</template> </template>
<!--拦截器-->
<template slot="createTime" slot-scope="text">{{ text | dayjs}}</template>
<template slot="operation" slot-scope="text,record"> <template slot="operation" slot-scope="text,record">
<a @click="modifyfunction(record)">编辑</a> <a @click="modifyfunctionExamine(record.id)">审核</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a-popconfirm title="是否要删除此行?" @confirm="deleteActivity(record.id)"> <a @click="modifyfunction(record)">编辑</a>
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a-popconfirm title="是否要删除此行?" @confirm="deleteActivity(record.id)"><a>删除</a></a-popconfirm>
</template>
<template slot="status" slot-scope="text">
<span v-if="text == 0">未审核</span>
<span v-if="text == 1">审核通过</span>
<span v-if="text == 2">审核不通过</span>
</template> </template>
</s-table> </s-table>
...@@ -108,7 +119,17 @@ ...@@ -108,7 +119,17 @@
</a-form> </a-form>
</a-modal> </a-modal>
<!--编辑----弹框-->
<a-modal :title="titleName" :visible="modifyExamine" @ok="createOk" @cancel="createCancel" html-type="submit" width="840px">
<a-form :form="Form">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="审核状态">
<a-radio-group v-decorator="['status', {rules: [{ required: true, message: '审核状态不能为空!'}]} ]">
<a-radio value="1">通过</a-radio>
<a-radio value="2">不通过</a-radio>
</a-radio-group>
</a-form-item>
</a-form>
</a-modal>
<!----弹框--> <!----弹框-->
<a-drawer <a-drawer
title="活动图片" title="活动图片"
...@@ -127,9 +148,10 @@ ...@@ -127,9 +148,10 @@
<script> <script>
import STable from '@/components/table'; import STable from '@/components/table';
import {getList,addActivity,updateActivity,deleteActivity,uploadImg} from "../../../api/school-center/activity/activityAPI" import {getList,addActivity,updateActivity,deleteActivity,uploadImg,auditActivityNew} from "../../../api/school-center/activity/activityAPI"
import {cloneObject} from '@/utils/util'; import {cloneObject} from '@/utils/util';
import { initSubstName} from "../../../api/school-center/userManager/newUserAPI"; import { initSubstName} from "../../../api/school-center/userManager/newUserAPI";
import {audit} from "../../../api/school-center/activityRecordAPI";
export default { export default {
name: "activity", name: "activity",
components: { components: {
...@@ -160,6 +182,16 @@ ...@@ -160,6 +182,16 @@
range: '', range: '',
sort: '', sort: '',
}, },
modifyFormExamine: {
id: '',
status: '',
},
Form: this.$form.createForm(this, {name: 'Form'}),
modifyExamine:false,
imgInfo:"",
selectedRowKeys: [],
hasSelected: true,
loading:false,
subNameList: [], subNameList: [],
packageName:[], packageName:[],
chosePages:[], chosePages:[],
...@@ -178,6 +210,8 @@ ...@@ -178,6 +210,8 @@
{dataIndex: 'desc', width: 200, title: '活动详情', align: "center"}, {dataIndex: 'desc', width: 200, title: '活动详情', align: "center"},
{dataIndex: 'integral', width: 80, title: '活动积分', align: "center"}, {dataIndex: 'integral', width: 80, title: '活动积分', align: "center"},
{dataIndex: 'imageUrl', title: '图片 ', scopedSlots: {customRender: 'imageUrl'},align: 'center'}, {dataIndex: 'imageUrl', title: '图片 ', scopedSlots: {customRender: 'imageUrl'},align: 'center'},
{dataIndex: 'status', width: 80, title: '审核状态', align: "center",
scopedSlots: {customRender: 'status'}},
{dataIndex: 'activityType', width: 80, title: '活动类型', align: "center"}, {dataIndex: 'activityType', width: 80, title: '活动类型', align: "center"},
{dataIndex: 'subclass', width: 80, title: '活动大类', align: "center"}, {dataIndex: 'subclass', width: 80, title: '活动大类', align: "center"},
{dataIndex: 'sort', width: 80, title: '排序号', align: "center"}, {dataIndex: 'sort', width: 80, title: '排序号', align: "center"},
...@@ -299,7 +333,7 @@ ...@@ -299,7 +333,7 @@
subclass: '', subclass: '',
imageUrl: '', imageUrl: '',
range: '', range: '',
sort: '666', sort: '',
}) })
},0) },0)
this.modifyvisible=true; this.modifyvisible=true;
...@@ -308,7 +342,6 @@ ...@@ -308,7 +342,6 @@
//初始化 //初始化
this.titleName="编辑" this.titleName="编辑"
this.modifyForm.id = data.id this.modifyForm.id = data.id
setTimeout(()=>{ setTimeout(()=>{
this.Formtable.setFieldsValue({ this.Formtable.setFieldsValue({
title: data.title, title: data.title,
...@@ -322,7 +355,6 @@ ...@@ -322,7 +355,6 @@
}) })
},0) },0)
this.modifyForm.range = data.range; this.modifyForm.range = data.range;
this.customimg="./img/custom"+data.serviceQrcode this.customimg="./img/custom"+data.serviceQrcode
this.modifyvisible=true; this.modifyvisible=true;
}, },
...@@ -460,6 +492,68 @@ ...@@ -460,6 +492,68 @@
this.imgInfo='' this.imgInfo=''
this.visiblepicture = false; this.visiblepicture = false;
}, },
modifyfunctionExamine(data){
//初始化
this.titleName="活动审核"
this.modifyFormExamine.id = data,
this.modifyExamine=true;
},
//提交表单
createOk(){
this.Form.validateFields(['status'], {force: true}, (err, values)=>{
if (!err){
let params = {
ids: this.selectedRowKeys
}
this.modifyFormExamine.status=values.status
let obj = cloneObject(this.modifyFormExamine)
//修改数据
auditActivityNew(Object.assign(params, obj)).then(res=>{
if (res.state=="success") {
setTimeout(() => {
this.loading = false;
this.selectedRowKeys = [];
}, 1000);
this.hasSelected = true;
this.modifyExamine=false
this.$message.success(res.data ? res.data : '审核成功!', 5);
this.search();
return null;
}
this.$message.error(res.data ? res.data : res.msg, 5);
})
}
})
},
createCancel(){
this.Form.setFieldsValue({
status: '',
})
this.modifyFormExamine.id="";
this.modifyExamine=false;
},
start() {
this.modifyFormExamine.id="";
this.Form.setFieldsValue({
status: '',
});
if(this.selectedRowKeys.length == 0){
this.$message.error("请勾选审核项!!!", 5);
return;
}
//初始化
this.titleName="审核"
this.modifyExamine=true;
},
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
if(this.selectedRowKeys.length > 0){
this.hasSelected = false;
}else{
this.hasSelected = true;
}
},
} }
} }
</script> </script>
......
...@@ -213,6 +213,7 @@ ...@@ -213,6 +213,7 @@
}, },
selectedRowKeys: [], selectedRowKeys: [],
hasSelected: true, hasSelected: true,
loading:false,
} }
}, },
methods:{ methods:{
......
<template>
<a>6666666666666666666666666666666666666666666666666666666666666666666</a>
</template>
<script>
export default {
name: "addActivity"
}
</script>
<style scoped>
</style>
<template>
</template>
<script>
export default {
name: "KpiScore"
}
</script>
<style scoped>
</style>
<template>
</template>
<script>
export default {
name: "salesAlert"
}
</script>
<style scoped>
</style>
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