Commit 70703ce6 by 罗承锋

后端活动、活动积分提交

parent 85dfb431
...@@ -51,10 +51,8 @@ ...@@ -51,10 +51,8 @@
<!--列表--> <!--列表-->
<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">
<template slot="createTime" slot-scope="text">
<template slot="operation" slot-scope="text,record"> {{ text | dayjs}}
<a @click="modifyfunction(record)">审核</a>
</template> </template>
</s-table> </s-table>
...@@ -131,22 +129,15 @@ ...@@ -131,22 +129,15 @@
}, },
modifyvisible: false, modifyvisible: false,
columns: [ columns: [
{dataIndex: 'name', width: 200, title: '姓名', align: "center"}, {dataIndex: 'name', width: 60, title: '姓名', align: "center"},
{dataIndex: 'account', width: 200, title: '账号', align: "center"}, {dataIndex: 'account', width: 80, title: '账号', align: "center"},
{dataIndex: 'recordIntegral', width: 200, title: '所得积分', align: "center"}, {dataIndex: 'recordIntegral', width: 60, title: '所得积分', align: "center"},
{dataIndex: 'activityType', width: 200, title: '积分类型', align: "center"}, {dataIndex: 'activityType', width: 80, title: '积分类型', align: "center"},
{dataIndex: 'subclass', width: 200, title: '积分小类', align: "center"}, {dataIndex: 'subclass', width: 80, title: '积分大类', align: "center"},
{dataIndex: 'substName', width: 200, title: '县分', align: "center"}, {dataIndex: 'substName', width: 40, title: '县分', align: "center"},
{dataIndex: 'schoolName', width: 200, title: '学校', align: "center"}, {dataIndex: 'schoolName', width: 200, title: '学校', align: "center"},
{dataIndex: 'createTime', width: 200, title: '创建时间', align: "center"}, {dataIndex: 'createTime', width: 100, title: '创建时间', align: "center", scopedSlots: {customRender: 'createTime'},},
{ ]
dataIndex: 'operation',
width: 200,
title: '操作',
align: "center",
scopedSlots: {customRender: 'operation'},
fixed: "right"
}]
, ,
rowdata: parameter => { rowdata: parameter => {
let params = { let params = {
......
...@@ -45,6 +45,9 @@ ...@@ -45,6 +45,9 @@
<!--列表--> <!--列表-->
<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">
<template slot="createTime" slot-scope="text">
{{ text | dayjs}}
</template>
<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>
...@@ -174,15 +177,15 @@ ...@@ -174,15 +177,15 @@
modifyvisible: false, modifyvisible: false,
visiblepicture: false, visiblepicture: false,
columns: [ columns: [
{dataIndex: 'title', width: 200, title: '活动标题', align: "center"}, {dataIndex: 'title', width: 100, title: '活动标题', align: "center"},
{dataIndex: 'desc', width: 200, title: '活动详情', align: "center"}, {dataIndex: 'desc', width: 200, title: '活动详情', align: "center"},
{dataIndex: 'integral', width: 200, 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: 'activityType', width: 200, title: '活动类型', align: "center"}, {dataIndex: 'activityType', width: 80, title: '活动类型', align: "center"},
{dataIndex: 'subclass', width: 200, title: '活动小类', align: "center"}, {dataIndex: 'subclass', width: 80, title: '活动大类', align: "center"},
{dataIndex: 'sort', width: 200, title: '排序号', align: "center"}, {dataIndex: 'sort', width: 80, title: '排序号', align: "center"},
{dataIndex: 'creator', width: 200, title: '创建人', align: "center"}, {dataIndex: 'creator', width: 80, title: '创建人', align: "center"},
{dataIndex: 'createTime', width: 200, title: '创建时间', align: "center"}, {dataIndex: 'createTime', width: 200, title: '创建时间', align: "center", scopedSlots: {customRender: 'createTime'}},
{ {
dataIndex: 'operation', dataIndex: 'operation',
width: 200, width: 200,
......
...@@ -61,9 +61,20 @@ ...@@ -61,9 +61,20 @@
<!--列表--> <!--列表-->
<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">
<template slot="operation" slot-scope="text,record"> <template slot="createTime" slot-scope="text">
<a @click="modifyfunction(record)">审核</a> {{ text | dayjs}}
</template>
<template slot="imageUrl" slot-scope="text">
<img style="width: 20%" :src="apis + text" @click="imgClick(text)">
</template>
<template slot="status" slot-scope="text">
<span v-if="text == 1">未审核</span>
<span v-if="text == 2">审核通过</span>
<span v-if="text == 3">审核不通过</span>
</template>
<template slot="operation" slot-scope="text,record">
<a v-if="record.status == 1" @click="modifyfunction(record)">审核</a>
</template> </template>
</s-table> </s-table>
...@@ -88,6 +99,19 @@ ...@@ -88,6 +99,19 @@
</a-form> </a-form>
</a-modal> </a-modal>
<a-drawer
title="活动图片"
placement="right"
:closable="false"
@close="pictureOnClose"
:visible="visiblepicture"
width="30%"
>
<div >
<img class="bg-img" :src="imgInfo">
</div>
</a-drawer>
</div> </div>
</template> </template>
...@@ -105,9 +129,10 @@ ...@@ -105,9 +129,10 @@
emptyText: {emptyText: '暂无数据'}, emptyText: {emptyText: '暂无数据'},
previewVisible: false, previewVisible: false,
previewImage: '', previewImage: '',
visiblepicture: false,
fileList: [ fileList: [
], ],
apis: '',
fileid:{}, fileid:{},
// form // form
Formtable: this.$form.createForm(this, {name: 'Formtable'}), Formtable: this.$form.createForm(this, {name: 'Formtable'}),
...@@ -132,28 +157,33 @@ ...@@ -132,28 +157,33 @@
}, },
modifyvisible: false, modifyvisible: false,
columns: [ columns: [
{dataIndex: 'title', width: 200, title: '活动标题', align: "center"}, {dataIndex: 'title', width: 80, title: '活动标题', align: "center"},
{dataIndex: 'desc', width: 200, title: '活动详情', align: "center"}, {dataIndex: 'desc', width: 200, title: '活动详情', align: "center"},
{dataIndex: 'activityType', width: 200, title: '活动类型', align: "center"}, {dataIndex: 'activityType', width: 80, title: '活动类型', align: "center"},
{dataIndex: 'subclass', width: 200, title: '活动小类', align: "center"}, {dataIndex: 'subclass', width: 80, title: '活动大类', align: "center"},
{dataIndex: 'integral', width: 200, title: '活动积分', align: "center"}, {dataIndex: 'integral', width: 80, title: '活动积分', align: "center"},
{dataIndex: 'status', width: 200, title: '审核状态', align: "center"}, {dataIndex: 'status', width: 80, title: '审核状态', align: "center",
{dataIndex: 'remark', width: 200, title: '审核备注', align: "center"}, scopedSlots: {customRender: 'status'}},
{dataIndex: 'recordIntegral', width: 200, title: '所得积分', align: "center"}, {dataIndex: 'remark', width: 100, title: '审核备注', align: "center"},
{dataIndex: 'creator', width: 200, title: '参与者', align: "center"}, {dataIndex: 'recordIntegral', width: 80, title: '所得积分', align: "center"},
{dataIndex: 'creator', width: 100, title: '参与者', align: "center"},
{dataIndex: 'message', width: 200, title: '活动留言', align: "center"}, {dataIndex: 'message', width: 200, title: '活动留言', align: "center"},
{dataIndex: 'createTime', width: 200, title: '参与时间', align: "center"}, {dataIndex: 'imageUrl', width: 100, title: '参与图片', align: "center",scopedSlots: {customRender: 'imageUrl'}},
{dataIndex: 'isRepeal', width: 200, title: '是否重复参与', align: "center"}, {dataIndex: 'createTime', width: 100, title: '参与时间', align: "center",
scopedSlots: {customRender: 'createTime'}},
{dataIndex: 'isRepeal', width: 100, title: '是否重复参与', align: "center"},
{ {
dataIndex: 'operation', dataIndex: 'operation',
width: 200, width: 100,
title: '操作', title: '操作',
align: "center", align: "center",
scopedSlots: {customRender: 'operation'}, scopedSlots: {customRender: 'operation'},
fixed: "right" fixed: "right"
}] }],
,
rowdata: parameter => { rowdata: parameter => {
const env = process.env.NODE_ENV; //获取当前环境
let params = { let params = {
pageNo: parameter.pageNo, pageNo: parameter.pageNo,
pageSize: parameter.pageSize pageSize: parameter.pageSize
...@@ -175,6 +205,7 @@ ...@@ -175,6 +205,7 @@
if (res.data.records.length==0){ if (res.data.records.length==0){
return data return data
} }
data = { data = {
data: res.data.records, data: res.data.records,
pageSize: parameter.pageSize, pageSize: parameter.pageSize,
...@@ -197,16 +228,20 @@ ...@@ -197,16 +228,20 @@
modifyfunction(data){ modifyfunction(data){
//初始化 //初始化
this.titleName="审核" this.titleName="审核"
alert(data.id);
this.modifyForm.id = data.id this.modifyForm.id = data.id
this.modifyvisible=true; this.modifyvisible=true;
setTimeout(()=>{
this.Formtable.setFieldsValue({
integral: data.integral
})
},0)
}, },
//提交表单 //提交表单
createfunctionOk(){ createfunctionOk(){
this.Formtable.validateFields(['status', "integral","remark"], {force: true}, (err, values)=>{ this.Formtable.validateFields(['status', "integral","remark"], {force: true}, (err, values)=>{
if (!err){ if (!err){
this.modifyForm.status=values.status this.modifyForm.status=values.status
this.modifyForm.remark=values.remark this.modifyForm.remark=values.remark == undefined ? '' : values.remark;
this.modifyForm.integral=values.integral this.modifyForm.integral=values.integral
//修改数据 //修改数据
...@@ -230,7 +265,15 @@ ...@@ -230,7 +265,15 @@
}) })
this.modifyForm.id="" this.modifyForm.id=""
this.modifyvisible=false; this.modifyvisible=false;
} },
imgClick(res){
this.imgInfo=this.apis + res
this.visiblepicture=true
},
pictureOnClose() {
this.imgInfo=''
this.visiblepicture = false;
},
} }
} }
</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