Commit 670d962b authored by anxixi's avatar anxixi

活动、专题及视频功能开发

parent 40272723
......@@ -65,6 +65,7 @@
:limit="1"
:headers="publicFun.getHeadersFunc()"
:file-list="fileListvideo"
:on-exceed="exceedmax"
:on-success="uploadComplete"
:before-upload="handleBeforeFile"
:on-remove="handleRemove">
......@@ -72,6 +73,9 @@
</el-upload>
<span class="errorTextproject" style="top: 175px;" v-if="isShowErrorText">{{$t("workPlace.sendRequireForm.uploadingAccessory")}}</span>
</div>
<div class="whole" style="margin-top: 30px;" v-if="imagesIf">
<video :src="formData.videoUrl" controls="controls" style="width: 500px;height: 280px;"></video>
</div>
</el-form-item>
<el-form-item label="上传封面:" style="width: 100%;">
<p class="imgTitle">建议尺寸750*420px;仅支持PNG,JPG,最大不超过2M</p>
......@@ -423,11 +427,38 @@
if ( !isMp4 ) {
this.$message.error('上传文件只能是mp4格式');
}else if(!isLt200M){
this.$message.error('上传文件大小不能超过 200MB');
// this.$message.error('上传文件大小不能超过 200MB');
this.$confirm('您上传的视频到大小超出了限制范围,您的视频通过可以压缩工具来压缩后再上传!', {
cancelButtonText: '取消',
confirmButtonText: '下载',
type: '',
customClass: 'deleteConfirm'
}).then(() => {
api.selectBasicParams().then(response => {
if(response.code == 0) {
const elink = document.createElement('a');
elink.href = response.result.ossPrefix+'/public/FormatFactory_setup.exe';
document.body.appendChild(elink);
elink.click();
document.body.removeChild(elink);
} else {
this.$message.error(response.msg);
}
})
.catch(error => {
console.log("提交出错");
return false;
});
}).catch(() => {
});
}
this.isflag = 1;
return ( isMp4) && isLt200M;
},
exceedmax(){
this.$message.error('请删除后再次尝试上传');
},
//删除上传文件
handleRemove(){
this.fileList = [];
......
......@@ -47,4 +47,7 @@ export default {
uploadPicture (params){
return api.fetchPostImg('/base/upload/uploadOriginalImg',params);
},
exportRecord( params ) {
return api.fetchLoadingPostex( '/base/activity/exportApplyList', params);
},
}
\ No newline at end of file
......@@ -13,6 +13,7 @@
<p>活动名称:{{channelTitle}}</p>
</el-form-item>
<el-form-item class="formcontentnk">
<el-button type="primary" plain style="width: 90px;margin-right: 30px;" @click="getexportRecord">导出</el-button>
<el-input placeholder="请输入活动名称关键字" v-model="search.searchContent" class="input-with-select" style="width: 290px">
<el-button slot="append" icon="el-icon-search" @click="searchchannel"></el-button>
</el-input>
......@@ -51,8 +52,8 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
background
:page-sizes="[5, 20, 30, 40, 50]"
:page-size="5"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="10"
:current-page="cur_page"
layout=" total, prev, pager, next"
:total="totalListResult">
......@@ -71,7 +72,7 @@
return {
cur_page: 1, //页数
totalListResult: 0,
numberData: 5, //设置个数
numberData: 10, //设置个数
publishActivitydata:[],
search:{
channelId:this.$route.query.channelId
......@@ -109,6 +110,30 @@
searchchannel(){
this.getpublishActivityList();
},
getexportRecord(){
let params = this.search;
api.exportRecord(params).then(response => {
// if(response.code == 0) {
let blob = new Blob([response], {
type: "application/vnd.ms-excel" //word文档为msword,pdf文档为pdf
});
console.log(blob)
let objectUrl = URL.createObjectURL(blob);
let link = document.createElement("a");
let fname = `报名列表.xls`; //下载文件的名字
link.href = objectUrl;
link.setAttribute("download", fname);
document.body.appendChild(link);
link.click();
// } else {
// this.$message.error(response.msgCode);
// }
})
.catch(error => {
console.log("提交出错");
return false;
});
},
getpublishActivityList(){
let params = {
pagination: {
......
......@@ -10,7 +10,7 @@
<div class="projectTabadd" style="margin-top: 10px;position: relative;border-radius: 3px;min-height: 700px">
<el-tabs v-model="activeName">
<el-tab-pane label="选择活动模板" name="first">
<el-row :gutter="20">
<el-row>
<el-col :span="6">
<div class="templatecss">
<img src="../../assets/img/activity01.png" alt="">
......@@ -25,6 +25,13 @@
<el-button type="primary" @click="soutClk(3)" style="width: 90px;">选择</el-button>
</div>
</el-col>
<el-col :span="6">
<div class="templatecss">
<img src="../../assets/img/activity04.png" alt="">
<p>线上活动</p>
<el-button type="primary" @click="soutClk(4)" style="width: 90px;">选择</el-button>
</div>
</el-col>
<el-col :span="6">
<div class="templatecss">
<img src="../../assets/img/activity03.png" alt="">
......@@ -65,7 +72,7 @@
<style scoped lang="scss">
.templatecss{
text-align: center;
padding: 30px 0 0 25px;
padding: 30px 0 0 0;
>img{
width: 255px;
height: 150px;
......
......@@ -60,7 +60,7 @@
<el-button v-if="!tagIf" @click="tagIf=!tagIf" type="primary" plain size="small" style="font-size: 14px;height: 34px !important;font-weight:normal;line-height: 14px"><i class="iconfont icon-jiahao"></i>添加关键字</el-button>
</el-row>
</el-form-item>
<el-form-item label="所属区域:" prop="channelProvince">
<el-form-item label="所属区域:" :prop="$route.query.type == '4'?'':'channelProvince'">
<el-select style="width:170px;" v-model="formData.channelProvince" :placeholder="$t('releasejson.plprovince')" @change="provinceChang(formData.channelProvince)">
<el-option v-for="item in provinceData" :key="item.geoId" :label="item.name" :value="item.geoId">
</el-option>
......@@ -72,7 +72,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item v-if="$route.query.type == '3'" label="活动地址:" prop="channelAddress" style="width: 100%;">
<el-form-item v-if="$route.query.type == '3'||$route.query.type == '4'" label="活动地址:" prop="channelAddress" style="width: 100%;">
<el-input v-model="formData.channelAddress" maxlength="36" placeholder="请输入活动地址" style="width: 450px;height: 40px"></el-input>
</el-form-item>
<el-form-item label="最大报名人数:" prop="personMax" style="width: 100%;">
......@@ -89,10 +89,22 @@
<i class="iconfont icon-cuowu" style="position: absolute;right: 0;top: 0;cursor: pointer;" @click="guestlist.splice(index,1)"></i>
</div>
</div>
<el-form-item v-if="$route.query.type == '4'" label="报名成功文案:" style="width: 100%;">
<el-input v-model="formData.signSuccessContent" type="textarea" :rows="3" maxlength="200" placeholder=" 请输入报名成功后的提示内容,最多可输入200个字;" style="width: 450px;"></el-input>
</el-form-item>
<el-form-item v-if="$route.query.type == '4'" label=" " style="width: 100%;">
<p class="imgTitle">请上传成功报名后显示的二维码,JPG、JPEJ、PNG格式,图片小于200K</p>
<div class="uploadImg" style="display: flex">
<up-img :actionUrl="'/base/upload/uploadOriginalImg'" @dataEvent="signimg" :channelPic="formData.signSuccessPic" :upmax="0.2"></up-img>
<el-button type="text" @click="mobilevisible = true" style="margin-left: 40px;">
预览
</el-button>
</div>
</el-form-item>
</el-form>
</div>
</div>
<div class="btodiv">
<div class="btodiv" v-if="!$route.query.edit">
<p>活动设置</p>
<div style="margin-top: 20px">
<el-form :inline="true" label-width="210px" :model="formData" class="contnetform300">
......@@ -102,7 +114,7 @@
</el-form>
</div>
</div>
<div v-if="$route.query.type == '2'" class="btodiv">
<div v-if="$route.query.type == '2'&&!$route.query.edit" class="btodiv">
<p>填报模块</p>
<div style="margin-top: 20px" v-for="(item,index) in newmoduledata">
<el-form :inline="true" label-width="210px" :model="item" class="contnetform300">
......@@ -189,6 +201,19 @@
</el-row>
</el-dialog>
<el-dialog
:visible.sync="mobilevisible"
width="350px"
:close-on-click-moda="false"
center>
<div class="centerQrCode" style="position: relative">
<img src="../../assets/img/mobilesuccess.jpg" alt="" style="width: 325px;">
<p style="position: absolute;left: 0px;top: 200px;">{{formData.signSuccessContent}}</p>
<img :src="formData.signSuccessPic" alt="" style="width: 100px;height: 100px;position: absolute;left: calc(50% - 50px);bottom: 140px;border-radius: 3px;">
</div>
</el-dialog>
<el-dialog
:visible.sync="vueQrVisible"
......@@ -255,6 +280,7 @@
contactsform:{
fieldType:2
},
mobilevisible:false,
valuelist:[],
isCheck:true,
activeName:'first',
......@@ -343,6 +369,9 @@
this.formData.channelPic = url;
this.$refs.formimg.clearValidate();
},
signimg(url){
this.formData.signSuccessPic = url;
},
//删除小标签
handleClose(tag) {
this.formData.channelLabelList.splice(this.formData.channelLabelList.indexOf(tag), 1);
......@@ -723,9 +752,17 @@
var userFielddata = {};
response.result.channelCity = parseInt(response.result.channelCity);
response.result.channelProvince = parseInt(response.result.channelProvince);
if(response.result.channelProvince){
this.getProvinceList(response.result.channelProvince);
}
this.provinceIf = true;
this.formData = response.result;
if(!response.result.channelProvince){
this.formData.channelProvince = '';
}
if(!response.result.channelCity){
this.formData.channelCity = '';
}
if(response.result.guestList){
this.guestlist = response.result.guestList;
}
......
......@@ -30,7 +30,7 @@
</el-table-column>
<el-table-column prop="channelType" label="活动类型" align="center">
<template slot-scope="scope">
{{scope.row.channelType == '2' ? '项目收集': scope.row.channelType == '3' ? '线下沙龙' : ''}}
{{scope.row.channelType == '2' ? '项目收集': scope.row.channelType == '3' ? '线下沙龙': scope.row.channelType == '4' ? '线上活动' : ''}}
</template>
</el-table-column>
<el-table-column prop="channelState" label="活动状态" align="center">
......@@ -51,7 +51,7 @@
<el-button type="text" @click="urlclk(scope.row)">
查看
</el-button>
<el-button v-if="scope.row.channelState == 1||scope.row.channelState == 2" type="text" @click="$router.push({path:'/addproactivity',query:{channelId:scope.row.channelId,type:scope.row.channelType,edit:true}})">
<el-button v-if="scope.row.channelState == 1||scope.row.channelState == 2||scope.row.channelState == 3" type="text" @click="$router.push({path:'/addproactivity',query:{channelId:scope.row.channelId,type:scope.row.channelType,edit:true}})">
编辑
</el-button>
<el-button v-if="scope.row.channelState == 3||scope.row.channelState == 4" type="text" @click="$router.push({path:'/applyactivity',query:{channelTitle:scope.row.channelTitle,type:scope.row.channelType,channelId:scope.row.channelId}})">
......@@ -67,7 +67,7 @@
<p class="datap">{{$t('listjson.notfoundyet')}}</p>
</template>
</el-table>
<div class="pagination">
<div class="pagination" style="text-align: center;margin-top: 20px;">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -42,17 +42,15 @@
const isJpg = nameArr[nameArr.length - 1] === 'jpg';
const isPNG = nameArr[nameArr.length - 1] === 'PNG';
const isJPG = nameArr[nameArr.length - 1] === 'JPG';
const isJpeg = nameArr[nameArr.length - 1] === 'jpeg';
const isJPEG = nameArr[nameArr.length - 1] === 'JPEG';
const isLt2M = file.size / 1024 / 1024 <= this.upmax;
if (!isPNG && !isJPG && !isPng && !isJpg ) {
if (!isPNG && !isJPG && !isPng && !isJpg && !isJpeg && !isJPEG ) {
this.$message.error(this.$t('releasejson.compantype'));
}else if(!isLt2M){
if(this.upmax == 5){
this.$message.error('上传图片大小不能超过 5MB')
}else{
this.$message.error(this.$t('releasejson.compansize'));
this.$message.error('上传图片大小不能超过 '+this.upmax+'MB')
}
}
return (isPNG || isJPG || isPng || isJpg) && isLt2M;
return (isPNG || isJPG || isPng || isJpg || isJpeg || isJPEG) && isLt2M;
},
//删除上传文件
handleRemove(){
......
This diff is collapsed.
......@@ -24,7 +24,7 @@ export default {
},
//获取专题信息
getSubjectProject( params ) {
return api.fetchGet( '/base/subject/getSubjectProject?subjectId=' + params );
return api.fetchGet( '/base/subject/getPublishSubject?subjectId=' + params );
},
//专题活动统计
subjectStatistics (params){
......@@ -64,5 +64,15 @@ export default {
return api.fetchPost( '/base/tools/selectBasicParams');
},
//置顶
topPublishSubject(params){
return api.fetchPost('/base/subject/topPublishSubject',Qs.stringify(params))
},
//获取小b一级
selectSmallBusinessLevelOne( ) {
return api.fetchGet( '/business/industry/selectSmallBusinessLevelOne' );
},
}
\ No newline at end of file
<template>
<div class="projectTabadd" style="margin-top: 10px;position: relative;border-radius: 3px;min-height: 700px">
<div class="btodiv">
<p>专题界面信息设置</p>
<div style="margin-top: 20px">
<el-form :inline="true" label-width="260px" :model="formData" :rules="rulesInfo" ref="formData" class="contnetform300s">
<el-form-item label="项目评选头图背景:" prop="subjectVotedBackground" ref="subjectVotedimg" style="width: 100%;">
<p class="imgTitle">建议尺寸750*320px;仅支持PNG,JPG,JPEG最大不超过2M。</p>
<div class="uploadImg">
<up-img :actionUrl="'/base/upload/uploadOriginalImg'" @dataEvent="subjectVoted" :channelPic="formData.subjectVotedBackground" :upmax="2"></up-img>
</div>
</el-form-item>
<el-form-item label="嘉宾列表介绍文案:" prop="professorDescription" style="width: 100%;">
<el-input v-model="formData.professorDescription" type="textarea" :rows="3" maxlength="120" placeholder="请输入嘉宾列表介绍文案" style="width: 450px;"></el-input>
</el-form-item>
<el-form-item label="项目首页分享到朋友圈海报:" prop="shareIndexPoster" ref="shareIndeximg" style="width: 100%;">
<p class="imgTitle">建议尺寸650*900px;仅支持PNG,JPG,JPEG最大不超过200K。</p>
<div class="uploadImg">
<up-img :actionUrl="'/base/upload/uploadOriginalImg'" @dataEvent="shareIndex" :channelPic="formData.shareIndexPoster" :upmax="0.2"></up-img>
</div>
</el-form-item>
<el-form-item label="项目首页分享到朋友的文案:" prop="shareProjectDescription" style="width: 100%;">
<el-input v-model="formData.shareProjectDescription" type="textarea" :rows="3" maxlength="120" placeholder="请输入项目首页分享到朋友的文案" style="width: 450px;"></el-input>
</el-form-item>
<el-form-item label="项目详情页分享到朋友圈海报背景:" prop="shareProjectPoster" ref="shareProjectimg" style="width: 100%;">
<p class="imgTitle">建议尺寸650*900px;仅支持PNG,JPG,JPEG最大不超过200K。</p>
<div class="uploadImg">
<up-img :actionUrl="'/base/upload/uploadOriginalImg'" @dataEvent="shareProject" :channelPic="formData.shareProjectPoster" :upmax="0.2"></up-img>
</div>
</el-form-item>
</el-form>
</div>
<div style="margin: 40px 0;text-align: center">
<el-button type="primary" @click="subsubject(false)" style="width: 130px">{{$route.query.edit?'发布':'发布'}}</el-button>
<!-- <el-button v-if="!$route.query.edit" type="primary" @click="getviewsubject" style="width: 130px">预览</el-button>-->
<el-button @click="backd" style="width: 130px">上一步</el-button>
</div>
</div>
</div>
</template>
<script>
import api from './api/api'
import upImg from '../publishactivity/upimg';
export default {
props:[
'formData'
],
name : "setspecialtwo",
data() {
return {
rulesInfo:{
subjectVotedBackground: [{required: true,message: '请上传项目评选头图背景',trigger: 'blur'}],
professorDescription: [{required: true,message: '请输入嘉宾列表介绍文案',trigger: 'blur'}],
shareIndexPoster: [{required: true,message: '请上传项目首页分享到朋友圈海报',trigger: 'blur'}],
shareProjectDescription: [{required: true,message: '请输入项目首页分享到朋友的文案',trigger: 'blur'}],
shareProjectPoster: [{required: true,message: '请上传项目详情页分享到朋友圈海报背景',trigger: 'blur'}],
},
}
},
components:{
upImg
},
methods:{
subjectVoted(url){
this.formData.subjectVotedBackground = url;
this.$refs.subjectVotedimg.clearValidate();
},
shareIndex(url){
this.formData.shareIndexPoster = url;
this.$refs.shareIndeximg.clearValidate();
},
shareProject(url){
this.formData.shareProjectPoster = url;
this.$refs.shareProjectimg.clearValidate();
},
backd(){
this.$emit('dataEvent',true);
},
subsubject(param){
this.$refs.formData.validate((valid) => {
if(valid) {
var isEditurl = '';
if(param){
isEditurl = '/base/subject/viewSubject';
}else{
isEditurl = this.$route.query.edit?'/base/subject/editPublishSubject':'/base/subject/publishSubject';
}
api.addSubject(isEditurl,this.formData).then(response => {
if(response.code == 0) {
if(param){
// api.selectBasicParams().then(res => {
// if(res.code == 0) {
// this.vueQrVisible = true;
// this.urltext = res.result.websitePrefix+'#/secondStage?id='+response.result.subjectId+'&stage='+0;
// } else {
// this.$message.error(res.msgCode);
// }
// })
// .catch(error => {
// console.log("提交出错");
// return false;
// });
}else{
this.$message.success(this.$route.query.edit?'修改成功':'发布成功');
this.$router.push({path:'/specialsummary'});
}
} else {
this.$message.error(response.msg);
}
})
.catch(error => {
console.log("提交出错");
return false;
});
}
});
},
},
mounted() {
}
}
</script>
<style scoped lang="scss">
.btodiv{
padding: 30px 0;
border-bottom: 1px dashed rgba(228,230,242,1);
>p{
padding-left: 20px;
border-left: 3px solid #5D78FF ;
font-size: 16px;
margin-left: 30px;
}
}
</style>
\ No newline at end of file
......@@ -9,10 +9,11 @@
<div class="contentPadding">
<el-form :inline="true">
<el-form-item>
<el-button type="primary" @click="soutClk">发布专题</el-button>
<el-button size="medium" type="primary" @click="soutClk">发布专题</el-button>
<el-button size="medium" type="primary" @click="explainvisible = true">专题设计物料说明</el-button>
</el-form-item>
<el-form-item class="formcontentnk">
<el-input placeholder="请输入专题名称关键字" v-model="search.subjectTitle" class="input-with-select" style="width: 290px">
<el-input placeholder="请输入专题名称关键字" v-model="search.subjectTitle" @change="searchchannel" class="input-with-select" style="width: 290px">
<el-button slot="append" icon="el-icon-search" @click="searchchannel"></el-button>
</el-input>
</el-form-item>
......@@ -21,6 +22,11 @@
<el-row>
<el-table :data="publishActivitydata" tooltip-effect="dark" class="projectTable2">
<el-table-column label="序号" type="index" align="center" width="50">
<template slot-scope="scope">
<span>{{(cur_page - 1) * numberData + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="专题名称" align="center" width="400">
<template slot-scope="scope">
<el-row :gutter="20" style="margin: 0 30px">
......@@ -35,6 +41,8 @@
</el-table-column>
<el-table-column prop="pushTime" label="发布时间" align="center">
</el-table-column>
<el-table-column prop="pushUser" label="专题创建人" align="center">
</el-table-column>
<el-table-column prop="subjectState" label="当前状态" align="center">
<template slot-scope="scope">
{{scope.row.subjectState == 0 ? '未开始' : scope.row.subjectState == 1 ? '进行中' : scope.row.subjectState == 2 ? '已结束' : '- -'}}
......@@ -49,13 +57,16 @@
<el-button v-if="scope.row.subjectState != 2" type="text" @click="$router.push({path:'/addspecial',query:{subjectId:scope.row.subjectId,subjectState:scope.row.subjectState,edit:true}})">
编辑
</el-button>
<el-button v-if="scope.row.subjectState != 2" type="text" @click="toppub(scope.row)">
{{scope.row.isTop == 0 ?'置顶':'取消置顶'}}
</el-button>
<el-button type="text" @click="$router.push({path:'/subjectstatistics',query:{subjectId:scope.row.subjectId}})">
统计
</el-button>
<el-button v-if="scope.row.subjectState != 2" type="text" @click="$router.push({path:'/entrycolumn',query:{subjectId:scope.row.subjectId}})">
<el-button v-if="scope.row.subjectState != 0" type="text" @click="$router.push({path:'/entrycolumn',query:{subjectId:scope.row.subjectId}})">
报名列表
</el-button>
<el-button type="text" @click="execute(scope.row)">
<el-button v-if="scope.row.subjectState == 2" type="text" @click="execute(scope.row)">
生成结果页
</el-button>
</template>
......@@ -71,7 +82,7 @@
@current-change="handleCurrentChange"
background
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="10"
:page-size="numberData"
:current-page="cur_page"
layout=" total, prev, pager, next"
:total="totalListResult">
......@@ -80,7 +91,27 @@
</el-row>
</div>
<el-dialog title="" :visible.sync="explainvisible">
<div style="width: 80%;margin: 0 auto;">
<p style="margin-left: -20px;">一、由设计部设计图片要求:</p>
<p>单位:像素px</p>
<p>格式:jpg、png、jpeg</p>
<p>质量大小:2M以内(保持图片清晰)</p>
<p style="margin-left: -20px;">二、图片尺寸标准:</p>
<p>1、评选聚合页图片(即和小程序首页轮播图一样):750x280</p>
<p>2、专题活动介绍界面,专题介绍(上传设计的效果图)由运营提供专题活动介绍文字等说明</p>
<p>3、专题封面:750x500px</p>
<p>4、项目评选头图背景(banner):750x320px</p>
<p>5、项目首页分享到朋友圈海报背景图:650x900px</p>
<p>6、项目详情页分享到朋友圈海报背景:650x900px</p>
<p style="margin-left: -20px;">三、入口图片尺寸标准:</p>
<p>1、H5首页banne尺寸:750x280</p>
<p>2、开机报(三种情况,任选一种):</p>
<p>不规则:620*750</p>
<p>规则:560*750</p>
<p>全屏自适应(不同手机不同图片)</p>
</div>
</el-dialog>
<el-dialog
:visible.sync="vueQrVisible"
......@@ -111,12 +142,33 @@
search:{},
vueQrVisible:false,
urltext:'',
explainvisible:false,
}
},
components: {
VueQRCodeComponent
},
methods: {
//置顶
toppub(row){
let params = {
subjectId:row.subjectId,
topType:row.isTop==0?1:0,
};
api.topPublishSubject(params).then(response => {
if(response.code == 0) {
this.cur_page = 1;
this.getpublishActivityList();
this.$message.success(row.isTop==0?'已置顶':'已取消置顶');
} else {
this.$message.error(response.msgCode);
}
})
.catch(error => {
console.log("提交出错");
return false;
});
},
getviewsubject(val){
api.selectBasicParams().then(response => {
if(response.code == 0) {
......
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