管理页面部分页面更新
This commit is contained in:
parent
7078ab5c9b
commit
e53b0d8f6b
|
@ -0,0 +1,153 @@
|
|||
<template>
|
||||
<div class="admin-content">
|
||||
<el-breadcrumb class="breadcrumb-admin" separator="/">
|
||||
<el-breadcrumb-item>后台管理</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>竞赛管理</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>竞赛详情</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<div class="card-admin" style="text-align: left">
|
||||
<div class="card-style">
|
||||
<div>
|
||||
<div>
|
||||
<h4>竞赛基本信息</h4>
|
||||
<div>
|
||||
<el-form label-position="right" label-width="80px" :model="compInfo" :rules="rules">
|
||||
<el-form-item label="竞赛ID" prop="compId">
|
||||
<el-input v-model="compInfo.compId"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="竞赛名称" prop="compName">
|
||||
<el-input v-model="compInfo.compName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Banner图" prop="compBanner">
|
||||
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
drag
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
multiple>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过2Mb</div>
|
||||
</el-upload>
|
||||
|
||||
<!-- <el-input v-model="compInfo.compBanner"></el-input>-->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否上线" prop="online">
|
||||
<el-switch v-model="compInfo.online"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" >保存</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-divider></el-divider>
|
||||
<div>
|
||||
<h4>主页信息</h4>
|
||||
<div>
|
||||
<el-form label-position="right" label-width="80px" :model="homeInfo" :rules="rules">
|
||||
|
||||
|
||||
<el-form-item label="首页视频" prop="compBanner">
|
||||
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
drag
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
multiple>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<!-- <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过2Mb</div>-->
|
||||
</el-upload>
|
||||
|
||||
<!-- <el-input v-model="compInfo.compBanner"></el-input>-->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否显示" prop="show">
|
||||
<el-switch v-model="homeInfo.show"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" >保存</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div>
|
||||
<h4>赛事指南信息</h4>
|
||||
<div>
|
||||
<el-form label-position="right" label-width="80px" :model="guideInfo" :rules="rules">
|
||||
|
||||
|
||||
|
||||
|
||||
<el-form-item label="是否显示" prop="show">
|
||||
<el-switch v-model="guideInfo.show"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" >保存</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "CompEdit",
|
||||
data(){
|
||||
return{
|
||||
rules: {
|
||||
compId: [
|
||||
{ required: true, message: '请输入竞赛ID', trigger: 'blur' },
|
||||
],
|
||||
compName: [
|
||||
{ required: true, message: '请输入竞赛名称', trigger: 'blur' }
|
||||
],
|
||||
|
||||
},
|
||||
compInfo:{
|
||||
compId:'',
|
||||
compName:"",
|
||||
compBanner:"",
|
||||
online:false
|
||||
},
|
||||
homeInfo:{
|
||||
compId:'',
|
||||
video:'',
|
||||
show:false
|
||||
},
|
||||
guideInfo:{
|
||||
content:'',
|
||||
contentMd:'',
|
||||
show: false
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
|
||||
},
|
||||
mounted() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style src="@/assets/css/common.css" scoped/>
|
||||
|
||||
<style scoped>
|
||||
.card-style{
|
||||
margin: 20px;
|
||||
}
|
||||
</style>
|
|
@ -5,6 +5,9 @@
|
|||
<el-breadcrumb-item>竞赛管理</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
|
||||
<div style="margin-bottom: 10px; text-align: right">
|
||||
<el-button plain @click="goToEdit">新增竞赛</el-button>
|
||||
</div>
|
||||
<div class="card-admin">
|
||||
<comp-table style="margin: 20px;">
|
||||
</comp-table>
|
||||
|
|
|
@ -168,6 +168,14 @@ let routes = [
|
|||
meta: {
|
||||
title: '红山开源社区'
|
||||
},
|
||||
},
|
||||
{
|
||||
// 竞赛管理
|
||||
path: "compEdit/:compId",
|
||||
component: () => import("@/pages/Admin/CompEdit"),
|
||||
meta: {
|
||||
title: '红山开源社区'
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue