Commit 75242ecc authored by hanfeng's avatar hanfeng

峰会后台页面

parent 1ff8db13
......@@ -2,7 +2,7 @@ import fetch from 'utils/fetch';
export function page(query) {
return fetch({
url: '/api/summit/activity/list',
url: '/api/summit/activity/app/unauth/list',
method: 'post',
data: query
})
......
......@@ -2,7 +2,7 @@ import fetch from 'utils/fetch';
export function page(query) {
return fetch({
url: '/api/summit/front/activityBm/list',
url: '/api/summit/activityBm/list',
method: 'post',
data: query
})
......
......@@ -28,11 +28,11 @@ function hasPermission(menus, route) {
function filterAsyncRouter(asyncRouterMap, menus, menuDatas) {
const accessedRouters = asyncRouterMap.filter(route => {
if (hasPermission(menus, route)) {
route.name = menuDatas[route.authority].title;
route.icon = menuDatas[route.authority].icon;
if (route.children && route.children.length) {
route.children = filterAsyncRouter(route.children, menus, menuDatas);
}
// route.name = menuDatas[route.authority].title;
// route.icon = menuDatas[route.authority].icon;
// if (route.children && route.children.length) {
// route.children = filterAsyncRouter(route.children, menus, menuDatas);
// }
return true
}
return false
......
......@@ -79,8 +79,8 @@
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div>
<summitPopup v-if="popupShow" :popupRow="popupRow" :titleNme="titleNme" v-on:summitDialogEvent="summitDialogEvent"/>
<enrollDataPopup v-if="enrollShow" :enrollRow="enrollRow" v-on:enrollDialogEvent="enrollDialogEvent" />
<reviewPopup v-if="reviewShow" :enrollRow="reviewRow" v-on:reviewDialogEvent="reviewDialogEvent" />
<enrollDataPopup v-if="enrollShow" :enrollRow="enrollRow" v-on:enrollDialogEvent="enrollDialogEvent"/>
<reviewPopup v-if="reviewShow" :reviewRow="reviewRow" v-on:reviewDialogEvent="reviewDialogEvent"/>
</div>
</template>
<script>
......@@ -97,6 +97,7 @@
import reviewPopup from 'src/views/summit/model/reviewPopup'
import {getToken} from 'src/utils/auth';
export default {
name: "summitList",
components: {
......@@ -112,7 +113,8 @@
limit: 10,
title: '',
startTime: '',
status: undefined
status: undefined,
type:1
},
tableKey: 0,
list: [],
......@@ -126,12 +128,12 @@
total: 0,
inline: true,
popupShow: false,
titleNme:'创建峰会',
popupRow:undefined,
enrollRow:undefined,
enrollShow:false,
reviewRow:undefined,
reviewShow:false,
titleNme: '创建峰会',
popupRow: undefined,
enrollRow: undefined,
enrollShow: false,
reviewRow: undefined,
reviewShow: false,
statusNameList: {
1: '默认',
......@@ -163,6 +165,7 @@
})
},
handleFilter() {
this.query.startTime=Date.now(this.query.startTime)
this.getList();
},
viewDetails(row) {
......@@ -193,23 +196,23 @@
return timestamp2Date(timeStamp)
},
enrollData(row) {
this.enrollRow=row;
this.enrollShow=true;
this.enrollRow = row;
this.enrollShow = true;
},
edit(row) {
debugger
this.popupRow=row;
this.titleNme='编辑峰会';
this.popupShow=true;
this.popupRow = row;
this.titleNme = '编辑峰会';
this.popupShow = true;
},
createSummit() {
this.popupRow={};
this.titleNme='创建峰会';
this.popupShow=true;
this.popupRow = {};
this.titleNme = '创建峰会';
this.popupShow = true;
},
review(){
this.reviewRow={};
this.reviewShow=true;
review(row) {
this.reviewRow = row;
this.reviewShow = true;
},
deleteSummit() {
......@@ -218,17 +221,17 @@
getStatusName(status) {
return (status + 1) ? this.statusNameList[status + 1] : ''
},
summitDialogEvent(e){
this.popupShow=false
if (e){
summitDialogEvent(e) {
this.popupShow = false
if (e) {
this.getList()
}
},
enrollDialogEvent(e){
this.enrollShow=false
enrollDialogEvent(e) {
this.enrollShow = false
},
reviewDialogEvent(e){
this.reviewShow=false
reviewDialogEvent(e) {
this.reviewShow = false
}
}
}
......
......@@ -25,44 +25,34 @@
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="封面图:">
<el-form-item label="峰会图片:">
<el-upload
class="upload-demo"
:headers="getHeaderWithToken"
:action="BASE_API+'/api/universal/file/app/unauth/admin/upload'"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:on-progress="uploadProcess"
list-type="picture">
<el-progress v-show="imgFlag == true" type="circle" :percentage="percent"
style="margin-top: 20px"></el-progress>
<img v-if="$utils.isString(form.banner) && !$utils.isEmpty(form.banner) && !imgFlag"
:src="form.banner"
style="width:300px;max-height:300px;">
<i v-else-if="!imgFlag" class="el-icon-plus avatar-uploader-icon"
style="lineHeight:100px;width:300px;height: 100px;border: 1px dashed #ccc;"></i>
list-type="picture-card"
:file-list="list"
:on-success="handlePictureCardPreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
<!-- <img width="100%" :src="form.picturePath" alt="">-->
</el-form-item>
</el-col>
</el-row>
<el-col :span="8">
<el-form-item label="封面图:">
<el-form-item label="峰会视频:">
<el-upload
class="upload-demo"
:headers="getHeaderWithToken"
:action="BASE_API+'/api/universal/file/app/unauth/admin/upload'"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:on-progress="uploadProcess"
list-type="picture">
<el-progress v-show="imgFlag == true" type="circle" :percentage="percent"
style="margin-top: 20px"></el-progress>
<img v-if="$utils.isString(form.banner) && !$utils.isEmpty(form.banner) && !imgFlag"
:src="form.banner"
style="width:300px;max-height:300px;">
list-type="picture-card"
:headers="getHeaderWithToken"
:on-preview="handlePreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
<video v-if="$utils.isString(form.videoPath) && !$utils.isEmpty(form.videoPath) && !imgFlag"
:src="form.videoPath"
style="width:300px;max-height:300px;"/>
<i v-else-if="!imgFlag" class="el-icon-plus avatar-uploader-icon"
style="lineHeight:100px;width:300px;height: 100px;border: 1px dashed #ccc;"></i>
</el-upload>
</el-form-item>
</el-col>
</el-form>
......@@ -84,6 +74,7 @@
one,
save
} from 'src/api/summit/activityShow';
export default {
props: ["reviewRow"],
name: 'reviewPopup',
......@@ -95,10 +86,22 @@
},
data() {
return {
imgDialogVisible: false,
dialogVisible: false,
dialogImageUrl:undefined,
result: false,
form:{
banner:undefined
imgFlag: false,
BASE_API: process.env.BASE_API,
percent: 0,//上传进度
imgFlag: false,
list:[],
form: {
id: undefined,
banner: undefined,
activityId: undefined,
banner: undefined,
videoPath: undefined,
picturePath: undefined,
}
}
},
......@@ -121,25 +124,28 @@
watch: {
dialogVisible(newValue, oldValue) {
if (!newValue) {
this.$emit("summitDialogEvent",this.result);
this.$emit("summitDialogEvent", this.result);
}
},
},
mounted() {
this.getOrderInfo();
},
methods: {
methods:{
getOrderInfo() {
one().then(res=>{
one(this.reviewRow.id).then(res => {
this.form=res.data
this.dialogVisible=true
this.imgDialogVisible=true;
})
},
cre() {
save().then(res => {
console.log(this.form.picturePath)
save(this.form).then(res => {
this.responseResult(res)
})
},
responseResult(res) {
if (res.status === 200) {
......@@ -170,7 +176,47 @@
this.cleanForm();
this.result = e
this.dialogVisible = false
},
/**
* 封面图上传
* **/
handleAvatarSuccess(res, file) {
this.percent = 0;
this.imgFlag = false;
this.form.banner = res.data;
},
/**
* 封面图上传进度
* */
uploadProcess(event, file, fileList) {
this.imgFlag = true;
this.percent = Math.floor(event.percent);
},
handlePreview(file) {
this.form.videoPath=file.data
this.imgDialogVisible = true;
},
handleRemove(file, fileList) {
// console.log(file)
console.log(file, fileList);
},
handlePictureCardPreview(res,file) {
this.list.push({url: res.data})
// this.imgDialogVisible = true;
},
cleanForm(){
this.form= {
id: undefined,
banner: undefined,
activityId: undefined,
banner: undefined,
videoPath: undefined,
picturePath: undefined
}
}
}
}
</script>
......
......@@ -188,6 +188,7 @@
vehicleName: undefined,//房车名称
vehicleType: undefined,//房车型号
takeALieTheNumber: undefined,//乘卧数量
pathType:1
},
inline: true,
vehicleInfo_btn_apply: false,
......
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