Commit 75242ecc authored by hanfeng's avatar hanfeng

峰会后台页面

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