|
|
|
@ -23,28 +23,36 @@
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div class="activity">
|
|
|
|
|
<div>{{ scope.row.content.split(' ')[0] }}</div>
|
|
|
|
|
<div>{{ scope.row.content.split(' ')[1] }}</div>
|
|
|
|
|
<div>{{ scope.row.name }}</div>
|
|
|
|
|
<div>{{ scope.row.content }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="person"
|
|
|
|
|
label="参与人员"
|
|
|
|
|
prop="publisher"
|
|
|
|
|
label="发布方"
|
|
|
|
|
show-overflow-tooltip
|
|
|
|
|
width="180"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="duration"
|
|
|
|
|
label="状态"
|
|
|
|
|
label="服务时长"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="time"
|
|
|
|
|
label="兑换时间"
|
|
|
|
|
prop="address"
|
|
|
|
|
label="参加地址"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="activityTime"
|
|
|
|
|
label="参加时间"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div>{{ scope.row.activityTime.split(' ')[0] }}</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="操作"
|
|
|
|
|
width="250"
|
|
|
|
@ -55,9 +63,9 @@
|
|
|
|
|
<img src="@/assets/images/look.png" alt="">
|
|
|
|
|
<span>查看</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="look" @click="look(scope.row)">
|
|
|
|
|
<img src="@/assets/images/look.png" alt="">
|
|
|
|
|
<span>参与</span>
|
|
|
|
|
<div class="look" @click="participation(scope.row)" v-if="scope.row.involveStaus == 2">
|
|
|
|
|
<!-- <img src="@/assets/images/look.png" alt=""> -->
|
|
|
|
|
<span>报名</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
@ -67,73 +75,83 @@
|
|
|
|
|
<div class="pagination">
|
|
|
|
|
<my-pagination :total="total" @pagesChange="pagesChange"></my-pagination>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <my-dialog ref="participation" title="参与">
|
|
|
|
|
<el-form ref="ruleForm" :model="form" label-width="100px" :rules="rules">
|
|
|
|
|
<el-form-item label="参与信息:" prop="info">
|
|
|
|
|
<el-input type="textarea" v-model="form.info" resize="none"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<div class="form-btns">
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" @click="onSubmit">参与</el-button>
|
|
|
|
|
<el-button @click="close">取消</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form>
|
|
|
|
|
</my-dialog> -->
|
|
|
|
|
<my-dialog ref="chakan" title="查看活动详情" width="45%">
|
|
|
|
|
<div class="mainsEvents" v-loading="loadingTwo">
|
|
|
|
|
<div class="itemE">
|
|
|
|
|
<div>活动名称:</div>
|
|
|
|
|
<div>{{ dialogContent.name }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="itemE">
|
|
|
|
|
<div>活动时间:</div>
|
|
|
|
|
<div>{{ dialogContent.activityTime.split(' ')[0] }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mainsEvents">
|
|
|
|
|
<div class="itemE">
|
|
|
|
|
<div>活动内容:</div>
|
|
|
|
|
<div>{{ dialogContent.content }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="itemE">
|
|
|
|
|
<div>活动地址:</div>
|
|
|
|
|
<div>{{ dialogContent.address }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mainsEvents">
|
|
|
|
|
<div class="itemE">
|
|
|
|
|
<div>活动举办方:</div>
|
|
|
|
|
<div>{{ dialogContent.publisher }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="itemE">
|
|
|
|
|
<div>活动标签:</div>
|
|
|
|
|
<div class="mainTag">
|
|
|
|
|
<div v-for="item in dialogContent.label">{{ item.name }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</my-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import myPagination from "@/views/components/myPagination/index.vue"
|
|
|
|
|
import myDialog from "@/views/components/dialog/index.vue"
|
|
|
|
|
import { mapState } from "vuex";
|
|
|
|
|
import { Loading } from "element-ui";
|
|
|
|
|
export default {
|
|
|
|
|
components:{myPagination},
|
|
|
|
|
components:{myPagination,myDialog},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
tableData: [
|
|
|
|
|
{
|
|
|
|
|
content:'志愿活动协助指挥交通 我参加的志愿者活动,指挥交通',
|
|
|
|
|
person:'吴加好',
|
|
|
|
|
duration:'10',
|
|
|
|
|
time:'2023-08-14'
|
|
|
|
|
},{
|
|
|
|
|
content:'志愿活动协助指挥交通 我参加的志愿者活动,指挥交通',
|
|
|
|
|
person:'吴加好',
|
|
|
|
|
duration:'10',
|
|
|
|
|
time:'2023-08-14'
|
|
|
|
|
},{
|
|
|
|
|
content:'志愿活动协助指挥交通 我参加的志愿者活动,指挥交通',
|
|
|
|
|
person:'吴加好',
|
|
|
|
|
duration:'10',
|
|
|
|
|
time:'2023-08-14'
|
|
|
|
|
},{
|
|
|
|
|
content:'志愿活动协助指挥交通 我参加的志愿者活动,指挥交通',
|
|
|
|
|
person:'吴加好',
|
|
|
|
|
duration:'10',
|
|
|
|
|
time:'2023-08-14'
|
|
|
|
|
},{
|
|
|
|
|
content:'志愿活动协助指挥交通 我参加的志愿者活动,指挥交通',
|
|
|
|
|
person:'吴加好',
|
|
|
|
|
duration:'10',
|
|
|
|
|
time:'2023-08-14'
|
|
|
|
|
},{
|
|
|
|
|
content:'志愿活动协助指挥交通 我参加的志愿者活动,指挥交通',
|
|
|
|
|
person:'吴加好',
|
|
|
|
|
duration:'10',
|
|
|
|
|
time:'2023-08-14'
|
|
|
|
|
},{
|
|
|
|
|
content:'志愿活动协助指挥交通 我参加的志愿者活动,指挥交通',
|
|
|
|
|
person:'吴加好',
|
|
|
|
|
duration:'10',
|
|
|
|
|
time:'2023-08-14'
|
|
|
|
|
},{
|
|
|
|
|
content:'志愿活动协助指挥交通 我参加的志愿者活动,指挥交通',
|
|
|
|
|
person:'吴加好',
|
|
|
|
|
duration:'10',
|
|
|
|
|
time:'2023-08-14'
|
|
|
|
|
},{
|
|
|
|
|
content:'志愿活动协助指挥交通 我参加的志愿者活动,指挥交通',
|
|
|
|
|
person:'吴加好',
|
|
|
|
|
duration:'10',
|
|
|
|
|
time:'2023-08-14'
|
|
|
|
|
},{
|
|
|
|
|
content:'志愿活动协助指挥交通 我参加的志愿者活动,指挥交通',
|
|
|
|
|
person:'吴加好',
|
|
|
|
|
duration:'10',
|
|
|
|
|
time:'2023-08-14'
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
tableData: [],
|
|
|
|
|
pages:{
|
|
|
|
|
pageSize:10,
|
|
|
|
|
pageNum:1
|
|
|
|
|
},
|
|
|
|
|
total:0,
|
|
|
|
|
loading:false,
|
|
|
|
|
input:{
|
|
|
|
|
name:""
|
|
|
|
|
},
|
|
|
|
|
loadingTwo:false,
|
|
|
|
|
dialogContent:{
|
|
|
|
|
name:'',
|
|
|
|
|
content:'',
|
|
|
|
|
publisher:'',
|
|
|
|
|
activityTime:'',
|
|
|
|
|
address:'',
|
|
|
|
|
label:[]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
props:{
|
|
|
|
@ -146,10 +164,35 @@ export default {
|
|
|
|
|
value:{
|
|
|
|
|
handler(newInput,oldInput) {
|
|
|
|
|
// 搜索值
|
|
|
|
|
this.input.name = newInput;
|
|
|
|
|
this.pages= {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
};
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
immediate:true,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
// 获取活动推荐列表
|
|
|
|
|
async getList(params){
|
|
|
|
|
this.loading = true;
|
|
|
|
|
if(params == '1') {
|
|
|
|
|
this.pages= {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
};
|
|
|
|
|
this.input.name = '';
|
|
|
|
|
}
|
|
|
|
|
let obj = { ...this.pages,...this.input }
|
|
|
|
|
let data = await this.$api.huodongtuijian.list(obj);
|
|
|
|
|
if(data.code == 200) {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.tableData = data.rows;
|
|
|
|
|
this.total = data.total;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 页码,当前页切换事件
|
|
|
|
|
pagesChange(pages){
|
|
|
|
|
// console.log(pages)
|
|
|
|
@ -170,7 +213,72 @@ export default {
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 查看详情
|
|
|
|
|
async look(row){
|
|
|
|
|
this.$refs.chakan.open();
|
|
|
|
|
this.loadingTwo = true;
|
|
|
|
|
let data = await this.$api.huodongtuijian.activity(row.id);
|
|
|
|
|
if(data.code == 200){
|
|
|
|
|
this.loadingTwo = false;
|
|
|
|
|
let {name,content,publisher,activityTime,address,ageRange,sexRange,politicalRange,educationRange,housingRange,industryRange,interestRange,professionalRange,schoolRange} = data.data;
|
|
|
|
|
let arr = [];
|
|
|
|
|
arr.push(ageRange,sexRange,politicalRange,educationRange,housingRange,industryRange,interestRange,professionalRange,schoolRange)
|
|
|
|
|
let arrtwo = []
|
|
|
|
|
arr.forEach((item)=>{
|
|
|
|
|
let obj = {}
|
|
|
|
|
if(item) {
|
|
|
|
|
obj['name'] = item
|
|
|
|
|
arrtwo.push(obj)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log(arrtwo)
|
|
|
|
|
this.dialogContent = {name,content,publisher,activityTime,address,label:arrtwo};
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 参与按钮
|
|
|
|
|
participation(row){
|
|
|
|
|
// this.$refs.participation.open();
|
|
|
|
|
this.$confirm('是否确定报名活动?', '确认信息', {
|
|
|
|
|
distinguishCancelAndClose: true,
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消'
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.action(row)
|
|
|
|
|
})
|
|
|
|
|
.catch(action => {
|
|
|
|
|
console.log(action)
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 确定参与活动按钮
|
|
|
|
|
async action(row){
|
|
|
|
|
let downloadLoadingInstance = Loading.service({
|
|
|
|
|
text: "正在申请报名活动,请稍后",
|
|
|
|
|
spinner: "el-icon-loading",
|
|
|
|
|
background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
});
|
|
|
|
|
let obj = {
|
|
|
|
|
activityId: row.id
|
|
|
|
|
}
|
|
|
|
|
let data = await this.$api.huodongtuijian.zyzreport(obj)
|
|
|
|
|
// alert('submit!');
|
|
|
|
|
if(data.code == 200) {
|
|
|
|
|
downloadLoadingInstance.close();
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "申请报名成功",
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 关闭
|
|
|
|
|
close(){
|
|
|
|
|
this.$refs.participation.Close();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@ -182,6 +290,7 @@ export default {
|
|
|
|
|
.activity {
|
|
|
|
|
div {
|
|
|
|
|
text-align: left;
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
&:nth-child(1) {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-family: 'Alibaba PuHuiTi';
|
|
|
|
@ -201,7 +310,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
td {
|
|
|
|
|
height: 57px;
|
|
|
|
|
height: 42px;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
// text-align: center;
|
|
|
|
|
font-size: 14px;
|
|
|
|
@ -211,7 +320,7 @@ export default {
|
|
|
|
|
padding: 2px 0;
|
|
|
|
|
}
|
|
|
|
|
th {
|
|
|
|
|
height: 57px;
|
|
|
|
|
height: 45px;
|
|
|
|
|
background-color: #F7F5F5;
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
font-family: 'Alibaba PuHuiTi';
|
|
|
|
@ -248,6 +357,46 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.pagination {
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
// margin-top: 10px;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-textarea__inner {
|
|
|
|
|
height: 80px !important;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .mainsEvents {
|
|
|
|
|
// height: 35px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-family: "Alibaba-PuHuiTi-Regular";
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
.itemE {
|
|
|
|
|
width: 50%;
|
|
|
|
|
display: flex;
|
|
|
|
|
& > div:nth-of-type(1) {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
color: #4c4949;
|
|
|
|
|
width: 26%;
|
|
|
|
|
}
|
|
|
|
|
& > div:nth-last-of-type(2) {
|
|
|
|
|
color: #807a7a;
|
|
|
|
|
}
|
|
|
|
|
.mainTag {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
flex: 1;
|
|
|
|
|
font-family: "Alibaba-PuHuiTi-Regular";
|
|
|
|
|
& > div {
|
|
|
|
|
margin-right: 5px;
|
|
|
|
|
margin-top: 5px;
|
|
|
|
|
background-color: rgba(248, 65, 77, 0.06);
|
|
|
|
|
padding: 3px 5px;
|
|
|
|
|
color: #e16a70;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.form-btns {
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|