Merge pull request !17 from Sky_ID/zql
This commit is contained in:
Sky_ID 2022-06-19 23:58:43 +00:00 committed by Gitee
commit c828a5c160
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
24 changed files with 560 additions and 305 deletions

View File

@ -29,8 +29,6 @@ html, body, #app{
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
/*font-family: Helvetica, Arial, sans-serif;*/
color: #000000;
}

View File

@ -21,10 +21,9 @@
<script>
export default {
methods:{
//
backOsredm(){
window.location.href='https://www.osredm.com'
window.location.href='https://www.osredm.com';
}
}
@ -33,12 +32,10 @@ export default {
<style lang="scss">
.site-wrapper.site-page--not-found {
position: absolute;
top: 60px;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
@ -83,5 +80,4 @@ export default {
background: #7890ee;
border-color: #7890ee;
}
</style>

View File

@ -47,36 +47,36 @@ export default {
return {
osredmLogo: require("@/assets/logo/osredmLogo.svg"),
activeIndex: '1',
activeIndex2: '1'
activeIndex2: '1',
};
},
methods:{
// path
getPath(){
var path = this.$route.path
this.activeIndex = path.split("/")[2]
console.log(this.activeIndex)
var path = this.$route.path;
this.activeIndex = path.split("/")[2];
console.log(this.activeIndex);
},
// eslint-disable-next-line no-unused-vars
handleSelect(key, keyPath) {
switch (key){
case "userManage":
pageUtils.openPage(this.$router,"/admin/userManage")
pageUtils.openPage(this.$router,"/admin/userManage");
break;
case "compManage":
pageUtils.openPage(this.$router,"/admin/compManage")
pageUtils.openPage(this.$router,"/admin/compManage");
break;
}
},
backOsredm(){
window.location.href='https://www.osredm.com'
window.location.href='https://www.osredm.com';
}
},
mounted() {
this.getPath()
this.getPath();
}
}
@ -88,7 +88,6 @@ export default {
<style>
.el-menu-item {
margin: 10px 0;
font-size: 0.9rem !important;
}

View File

@ -30,9 +30,11 @@ export default {
name: "Footer",
data(){
return{
osredmLogo: require("@/assets/logo/osredmLogo-white.svg")
osredmLogo: require("@/assets/logo/osredmLogo-white.svg"),
}
},
}

View File

@ -65,7 +65,7 @@ export default {
userPass: "",
userAvatar: "", /* 用户头像 */
rankIf: true, /* 权限识别 */
isLogin: false //
isLogin: false, //
};
},
@ -75,37 +75,37 @@ export default {
handleSelect(key, keyPath) {
switch (key){
case "home":
pageUtils.openPage(this.$router,"/" + this.$route.params.compId + "/home")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId + "/home");
break;
case "chat":
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/chat")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/chat");
break;
case "guide":
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/guide")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/guide");
break;
case "apply":
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/apply")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/apply");
break;
case "submit":
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/submit")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/submit");
break;
case "chart":
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/chart")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/chart");
break;
case "contactUs":
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/contactUs")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/contactUs");
break;
case "applyList":
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/applyList")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/applyList");
break;
case "submitList":
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/submitList")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/submitList");
break;
case "notice":
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/notice")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/notice");
break;
case "rank":
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/rank")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/rank");
break;
}
// console.log(key)
@ -122,27 +122,27 @@ export default {
localStorage.removeItem("username");
localStorage.removeItem("userId");
localStorage.removeItem("role");
pageUtils.openPage(this.$router,"/" +this.$route.params.compId +"/login") //
pageUtils.openPage(this.$router,"/" +this.$route.params.compId +"/login"); //
})
.catch(() => {});
},
//
backOsredm(){
window.location.href='https://www.osredm.com'
window.location.href='https://www.osredm.com';
},
// path
getPath(){
var path = this.$route.path
this.activeIndex = path.split("/")[2]
var path = this.$route.path;
this.activeIndex = path.split("/")[2];
},
// banner
initPage(){
var compId = this.$route.params.compId
var compId = this.$route.params.compId;
var compInfo = {
compId
compId,
}
this.$api.getComp(compInfo).then((res)=>{
if (res.status === 0) {
@ -151,7 +151,7 @@ export default {
//线
//banner
this.banner = res.data.compBanner
this.banner = res.data.compBanner;
}else {
// 线404
Message.warning("该竞赛还未上线");
@ -177,41 +177,44 @@ export default {
* 1. 有信息 拿到token userId 去获取用户信息
* 2. 无信息 提示用户登录
*/
let token = localStorage.getItem("systemToken")
let userId = localStorage.getItem("userId")
let token = localStorage.getItem("systemToken");
let userId = localStorage.getItem("userId");
if (userId != null && token != null && userId !== '' && token !== '') {
//
var user = {
userId
userId,
}
this.$api.getUserDataByUserId(user).then((res) =>{
console.log(res)
console.log(res);
if (res.status == 0) {
//
this.userAvatar = res.data.userDetails.profilePhoto
this.userName = res.data.user.name
this.isLogin = true
this.userAvatar = res.data.userDetails.profilePhoto;
this.userName = res.data.user.name;
this.isLogin = true;
}else {
Message.warning("登录失败,请重新登录")
Message.warning("登录失败,请重新登录");
}
}).catch(function (res){
console.log(res)
console.log(res);
})
}
console.log(token)
console.log(userId)
console.log(token);
console.log(userId);
},
toLogin(){
pageUtils.openPage(this.$router,"/" +this.$route.params.compId +"/login")
toLogin(){
pageUtils.openPage(this.$router,"/" +this.$route.params.compId +"/login");
},
toRes(){
pageUtils.openPage(this.$router,"/" +this.$route.params.compId +"/register")
pageUtils.openPage(this.$router,"/" +this.$route.params.compId +"/register");
}
},
mounted(){
this.userStateCheck()
this.userStateCheck();
this.initPage();
//

View File

@ -13,7 +13,6 @@
class="login-container"
>
<img :src="logo" class="logo"/>
<!-- <h3 class="title"></h3>-->
<el-form-item prop="phone" class="a">
<el-input
type="text"
@ -31,7 +30,6 @@
></el-input>
</el-form-item>
<el-form-item style="width: 100%">
<el-button
type="primary"
@ -39,7 +37,6 @@
@click.native.prevent="reset()"
> </el-button
>
<!-- 主要按钮 -->
<el-button
type="primary"
style="width: 48%"
@ -60,9 +57,8 @@
<script>
import {Message} from "element-ui";
import pageUtils from "@/utils/pageUtils";
import { Message } from "element-ui";
export default {
name: "Login",
@ -75,18 +71,18 @@ export default {
loginForm:{
//
phone: "",
password: ""
password: "",
},
Rules: {
//
//
phone: [{ required: true, message: "请输入手机号", trigger: "blur" }],
password: [{ required: true, message: "请输入密码", trigger: "blur" }]
password: [{ required: true, message: "请输入密码", trigger: "blur" }],
},
};
},
methods:{
//
login(){
let adminInfo = {
phone: this.loginForm.phone,
@ -99,21 +95,20 @@ export default {
if (res.status === 10) {
Message.warning("用户名或密码错误")
}else {
localStorage.setItem("systemToken",res.token)
localStorage.setItem("systemToken",res.token);
localStorage.setItem("username", res.username);
localStorage.setItem("userId", res.userId);
localStorage.setItem("role", res.auth.authority);
pageUtils.openPage(this.$router,"/" +this.$route.params.compId +"/home") //
pageUtils.openPage(this.$router,"/" +this.$route.params.compId +"/home"); //
}
// Cookies.set("token", res.data.token); // tokenCookie
})
.catch(function (res) {
alert(res);
});
},
},
//
@ -169,7 +164,6 @@ a{
<style>
.loginWraper {
position: absolute;
left: 0;
@ -177,7 +171,6 @@ a{
bottom: 0;
right: 0;
/*background: url(../../assets/Pic/loginPic.jpg) no-repeat;*/
background-size: cover;
}
.login-container .el-input {
@ -200,5 +193,4 @@ a{
background: #7890ee;
border-color: #7890ee;
}
</style>

View File

@ -39,12 +39,9 @@
></el-input>
</el-form-item>
<Verify status="status" :successFun="verifySuccess" :errorFun="verifyError"></Verify>
<el-form-item style="width: 100%">
<!-- 主要按钮 -->
<el-button
type="primary"
style="width: 48%"
@ -61,14 +58,10 @@
</template>
<script>
import {Message} from "element-ui";
import pageUtils from "@/utils/pageUtils";
import { Message } from "element-ui";
import Verify from "@/components/Verify";
var checkStatus = (rule, value, callback) => {
console.log(value);
if (!value) {
@ -104,16 +97,16 @@ export default {
},
methods: {
verifySuccess(){
this.verifyStatus = true
this.verifyStatus = true;
},
verifyError(){
},
//
register() {
//
register() {
//
if (this.verifyStatus === true) {
let adminInfo = {
@ -126,28 +119,26 @@ export default {
.then((res) => {
console.log(res);
if (res.status === 4) {
Message.warning("该手机号已经注册")
Message.warning("该手机号已经注册");
}else if (res.status === 10) {
Message.warning("系统错误")
Message.warning("系统错误");
}else if (res.status === 0){
localStorage.setItem("systemToken",res.token)
pageUtils.openPage(this.$router,"/" +this.$route.params.compId +"/login") //
localStorage.setItem("systemToken",res.token);
pageUtils.openPage(this.$router,"/" +this.$route.params.compId +"/login"); //
}
})
.catch(function (res) {
alert(res);
});
}else {
Message.warning("请先进行人机校验")
Message.warning("请先进行人机校验");
}
},
//
reset() {
this.$refs.loginForm.resetFields();
@ -201,7 +192,6 @@ a{
<style>
.loginWraper {
position: absolute;
left: 0;
@ -231,5 +221,4 @@ a{
background: #7890ee;
border-color: #7890ee;
}
</style>

View File

@ -2,7 +2,7 @@
<div class="verify-comp">
<div class="verify" :class="rangeStatus?'success':''" >
<i @mousedown="rangeMove" :class="rangeStatus?successIcon:startIcon"></i>
{{rangeStatus?successText:startText}}
{{ rangeStatus?successText:startText }}
</div>
</div>
</template>
@ -47,7 +47,7 @@ export default {
data(){
return {
disX : 0,
rangeStatus: false
rangeStatus: false,
}
},
methods:{
@ -58,7 +58,7 @@ export default {
let eleWidth = ele.offsetWidth;
let parentWidth = ele.parentElement.offsetWidth;
let MaxX = parentWidth - eleWidth;
if(this.rangeStatus){//
if(this.rangeStatus){ //
return false;
}
document.onmousemove = (e) => {
@ -67,7 +67,7 @@ export default {
if(this.disX<=0){
this.disX = 0;
}
if(this.disX>=MaxX-eleWidth){//,
if(this.disX>=MaxX-eleWidth){ //,
this.disX = MaxX;
}
ele.style.transition = '.1s all';
@ -106,7 +106,6 @@ export default {
margin: 20px 0;
font-size: 14px;
.verify{
background-color: #e9e9e9;
position: relative;
transition: 1s all;

View File

@ -2,7 +2,7 @@
<div>
<el-table
:data="tableData.slice((currentPage-1)*PageSize,currentPage*PageSize)"
:row-style="{height:'100px'}"
:row-style="{ height:'100px' }"
style="height: auto"
>
<el-table-column
@ -65,11 +65,12 @@
</template>
<script>
import {Message} from "element-ui";
import PageUtils from "@/utils/pageUtils";
import { Message } from "element-ui";
export default {
name: "compTable",
data(){
return{
tableData:"",
@ -85,7 +86,7 @@ export default {
},
methods:{
goToDetails(compId){
PageUtils.openPage(this.$parent.$parent.$router,"/admin/compEdit/" + compId)
PageUtils.openPage(this.$parent.$parent.$router,"/admin/compEdit/" + compId);
},
filterTag(value, row) {
return row.online === value;
@ -102,12 +103,11 @@ export default {
this.$api.getAllComp().then((res)=>{
console.log(res)
if (res.status == 0) {
//
this.tableData = res.data
this.tableData = res.data;
}else if (res.status == 10){
Message.warning("系统查询错误")
Message.warning("系统查询错误");
}else {
Message.warning("权限不足或其他错误")
Message.warning("权限不足或其他错误");
}
})
},
@ -117,19 +117,22 @@ export default {
//
handleSizeChange(val) {
//
this.PageSize=val
this.PageSize = val;
//
this.currentPage=1
this.currentPage = 1;
},
//
handleCurrentChange(val) {
//
this.currentPage=val
this.currentPage = val;
},
},
mounted() {
this.initPage()
this.initPage();
}
}
</script>

View File

@ -67,11 +67,11 @@
:on-success="uploadSuccess"
multiple>
<el-button size="small" type="primary">点击上传</el-button>
<!-- <div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>-->
<!-- <div class="el-upload__tip" slot="tip">只能上传jpg/png文件且不超过2Mb</div>-->
<!--<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-input v-model="compInfo.compBanner"></el-input>-->
</el-form-item>
<el-form-item label="是否显示" prop="show">
@ -90,9 +90,6 @@
<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>
@ -109,7 +106,6 @@
<div>
<el-form label-position="right" label-width="80px" :model="guideInfo" :rules="rules">
<el-form-item label="是否显示" prop="show">
<el-switch disabled v-model="noticeInfo.show"></el-switch>
</el-form-item>
@ -123,8 +119,6 @@
<div>
<el-form label-position="right" label-width="80px" :model="applyInfo" :rules="rules">
<el-form-item label="是否显示" prop="show">
<el-switch disabled v-model="applyInfo.show"></el-switch>
</el-form-item>
@ -150,6 +144,7 @@
<el-form-item>
<el-button type="primary" @click="saveData('submit')">保存</el-button>
</el-form-item>
</el-form>
</div>
</div>
@ -190,9 +185,11 @@
<i class="el-icon-plus uploader-icon" v-else></i>
</el-upload>
</el-form-item>
<el-form-item label="选手交流链接" prop="urlOne" >
<el-input v-model="chatInfo.urlTwo"></el-input>
</el-form-item>
<el-form-item label="选手交流图" prop="logoTwo">
<el-upload
class="upload-icon "
@ -205,9 +202,11 @@
<i class="el-icon-plus uploader-icon" v-else></i>
</el-upload>
</el-form-item>
<el-form-item label="专家答疑链接" prop="urlOne" >
<el-input v-model="chatInfo.urlThree"></el-input>
</el-form-item>
<el-form-item label="专家答疑图" prop="logoThree">
<el-upload
class="upload-icon "
@ -229,9 +228,11 @@
<el-form-item>
<el-button type="primary" @click="saveData('chat')">保存</el-button>
</el-form-item>
</el-form>
</div>
</div>
<el-divider></el-divider>
<div>
<h4>联系我们信息</h4>
@ -249,9 +250,6 @@
</el-upload>
</el-form-item>
<el-form-item label="是否显示" prop="show">
<el-switch v-model="contactInfo.show"></el-switch>
</el-form-item>
@ -259,24 +257,26 @@
<el-form-item>
<el-button type="primary" @click="saveData('contact')">保存</el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {Message} from "element-ui";
import { Message } from "element-ui";
export default {
name: "CompEdit",
data(){
return{
chatIconData1:{
fileName : this.$route.params.compId + '-chatImg1-',
@ -312,136 +312,141 @@ export default {
},
compInfo:{
compId:'',
compName:"",
compBanner:"",
online:false,
rank:'',
chart:''
compId: "",
compName: "",
compBanner: "",
online: false,
rank: "",
chart: ""
},
homeInfo:{
compId:'',
video:'',
show:false
compId: "",
video: "",
show: false
},
guideInfo:{
compId:'',
content:'',
contentMd:'',
compId: "",
content: "",
contentMd: "",
show: false
},
noticeInfo:{
compId:'',
compId: "",
show: true,
},
applyInfo:{
compId:'',
compId: "",
show: true,
},
submitCust:{
compId:'',
compId: "",
show: true,
onlineScript: false,
onlineInter:'',
onlineInter: "",
},
chatInfo:{
compId:'',
compId: "",
show: true,
urlOne:"",
urlTwo:"",
urlThree:"",
logoOne:"",
logoTwo:"",
logoThree:"",
imgUrl:"",
urlOne: "",
urlTwo: "",
urlThree: "",
logoOne: "",
logoTwo: "",
logoThree: "",
imgUrl: "",
},
contactInfo:{
compId:'',
compId: "",
show: false,
}
}
},
methods:{
uploadSuccess(response){
if (response.status == 0) {
Message.success("上传成功")
switch (response.type){
case 'banner':
this.compInfo.compBanner = response.url
this.compInfo.compBanner = response.url;
break;
case 'video':
this.homeInfo.video = response.url
this.homeInfo.video = response.url;
break;
case 'chat':
this.chatInfo.imgUrl = response.url
this.chatInfo.imgUrl = response.url;
break;
case 'chat1':
this.chatInfo.logoOne = response.url
this.chatInfo.logoOne = response.url;
break;
case 'chat2':
this.chatInfo.logoTwo = response.url
this.chatInfo.logoTwo = response.url;
break;
case 'chat3':
this.chatInfo.logoThree = response.url
this.chatInfo.logoThree = response.url;
break;
}
}
},
saveData(type){
var compInfo = this.compInfo
var chatInfo = this.chatInfo
var guideInfo = this.guideInfo
var submitCust = this.submitCust
var contactInfo = this.contactInfo
var homeInfo = this.homeInfo
var compInfo = this.compInfo;
var chatInfo = this.chatInfo;
var guideInfo = this.guideInfo;
var submitCust = this.submitCust;
var contactInfo = this.contactInfo;
var homeInfo = this.homeInfo;
var updateDataVo ={
compInfo,
chatInfo,
guideInfo,
submitCust,
contactInfo,
homeInfo
}
homeInfo,
};
this.$api.updateData(type,updateDataVo).then((res) =>{
if (res.status == 0) {
Message.success("保存成功")
Message.success("保存成功");
}else if (res.status == 10){
Message.error("保存失败")
Message.error("保存失败");
}else {
Message.error("权限不足或其他错误")
Message.error("权限不足或其他错误");
}
})
},
initPage(){
var compId = this.$route.params.compId
var compId = this.$route.params.compId;
var compInfo = {
compId
compId,
}
this.$api.getCompById(compInfo).then((res) => {
if (res.status == 0) {
//
this.compInfo = res.compInfo
this.chatInfo = res.chatInfo
this.contactInfo = res.contactInfo
this.homeInfo = res.homeInfo
this.submitCust = res.submitCust
this.guideInfo = res.guideInfo
this.compInfo = res.compInfo;
this.chatInfo = res.chatInfo;
this.contactInfo = res.contactInfo;
this.homeInfo = res.homeInfo;
this.submitCust = res.submitCust;
this.guideInfo = res.guideInfo;
}else if (res.status == 10){
Message.error("系统错误")
Message.error("系统错误");
}else {
Message.error("权限不足或其他错误")
Message.error("权限不足或其他错误");
}
})
}
},
mounted() {
this.initPage()
this.initPage();
}
}
</script>
<style src="@/assets/css/common.css" scoped/>
<style lang="scss" scoped>
.card-style{
@ -456,7 +461,6 @@ export default {
justify-content: center !important; /* 垂直居中 */
}
.uploader-icon {
width: 800px;
height: 183px;
line-height: 183px;
@ -472,12 +476,12 @@ export default {
justify-content: center !important; /* 垂直居中 */
}
.uploader-icon {
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
}
}
</style>
</style>
<style src="@/assets/css/common.css" scoped/>

View File

@ -36,11 +36,12 @@
<script>
import CompTable from "@/components/compTable";
import {Message} from "element-ui";
import { Message } from "element-ui";
export default {
name: "CompManage",
components: {CompTable},
components: { CompTable },
data(){
return{
rules: {
@ -48,53 +49,53 @@ export default {
{ required: true, message: '请输入竞赛ID', trigger: 'blur' },
],
compName: [
{ required: true, message: '请输入竞赛名称', trigger: 'blur' }
{ required: true, message: '请输入竞赛名称', trigger: 'blur' },
],
},
dialogVisible: false,
compInfo:{
compId:'',
compName:"",
online:false
compId: "",
compName: "",
online: false,
},
}
},
methods:{
handleClose() {
this.dialogVisible = false
this.compInfo.compName = ''
this.compInfo.compId = ''
this.dialogVisible = false;
this.compInfo.compName = "";
this.compInfo.compId = "";
},
submitComp(){
//
if (this.compInfo.compId != '' && this.compInfo.compName != '') {
//
//
if (this.compInfo.compId != "" && this.compInfo.compName != "") {
//
this.$api.initComp(this.compInfo).then((res) =>{
console.log(res)
console.log(res);
if (res.status == 0) {
Message.success("新增竞赛成功")
this.dialogVisible = false
this.compInfo.compName = ''
this.compInfo.compId = ''
this.$refs.table.initPage()
Message.success("新增竞赛成功");
this.dialogVisible = false;
this.compInfo.compName = "";
this.compInfo.compId = "";
this.$refs.table.initPage();
}else if (res.status == 10){
Message.error("系统错误 新增失败")
Message.error("系统错误 新增失败");
}else {
Message.error("权限不足或其他错误")
Message.error("权限不足或其他错误");
}
})
}else {
Message.warning("请完善内容")
Message.warning("请完善内容");
}
}
}
}
</script>
<style src="@/assets/css/common.css" scoped/>
<style scoped>
</style>
</style>
<style src="@/assets/css/common.css" scoped/>

View File

@ -13,8 +13,6 @@
<div class="headersecond">
<!-- 输入框 双向绑定数据 自带清空 -->
<span style="font-size: 14px">手机号</span>
<el-input v-model="searchInfo.phone" suffix-icon="el-icon-edit" clearable placeholder="请输入手机号"></el-input>
@ -56,14 +54,13 @@
<el-table-column prop="role" label="用户权限" align="center" width="120"></el-table-column>
<el-table-column label="操作" width="50" align="center" >
<template slot-scope="scope"> <!-- 作用域插槽 -->
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">{{ ("handle.edit") }}</el-button>
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">{{ ("handle.edit") }}</el-button>
<el-button @click.native.prevent="deleteRow(scope.$index, scope.row);" type="danger" size="small">{{ ("handle.dele") }}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页底部 -->
<!-- 分页器 在每页数据的个数发生改变时触发 在页数发生改变时触发 绑定属性页数 页数导航布局 总数表格数据个数-->
<el-pagination
@ -74,7 +71,6 @@
:total="tableData.length">
</el-pagination>
<!-- 新增或编辑的弹窗 -->
<!-- 绑定属性title 控制组件显示和隐藏 点击空白弹窗是否关闭-->
<el-dialog :title = "title"
@ -102,17 +98,14 @@
</el-form>
<div slot="footer" class="dialog-footer" align="center">
<el-button icon="el-icon-circle-close" @click.native="handleCancel()">{{ ("handle.cancel") }}</el-button>
<el-button icon="el-icon-circle-close" @click.native="handleCancel()">{{ ("handle.cancel") }}</el-button>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<el-button icon="el-icon-circle-check" type="primary" @click.native="regRules()">{{ handle }}</el-button>
</div>
</el-dialog>
</div>
</div>
@ -123,6 +116,7 @@
<script>
export default {
name: "UserManage",
data(){
return{
//
@ -147,14 +141,14 @@ export default {
},
//
loading:"",
title:"",
handle:"",
loading: "",
title: "",
handle: "",
//dialog
editFormVisible: false,
multipleSelection:[],
ids:"",
ids: "",
currentPage: 1,
pagesize: 10,
@ -189,12 +183,11 @@ export default {
//
// },
//
handleAdd: function () {
this.title = "新增标准信息"
this.handle = "保存"
this.title = "新增标准信息";
this.handle = "保存";
this.editFormVisible = true; //dialog
this.editForm = {
@ -211,8 +204,8 @@ export default {
//
handleEdit: function (index, row) {
this.title = "编辑标准信息"
this.handle = "更新"
this.title = "编辑标准信息";
this.handle = "更新";
this.editFormVisible = true; //dialog
this.editForm = Object.assign({}, row); //dialog
@ -315,7 +308,7 @@ export default {
var params = {
"ids": row.standardNum,
}
this.deleteHandle(params)
this.deleteHandle(params);
},
@ -340,7 +333,7 @@ export default {
"ids": this.ids.substr(1), //
}
this.deleteHandle(params)
this.deleteHandle(params);
this.ids = "";
}
@ -390,7 +383,7 @@ export default {
}
}
</script>
<style src="@/assets/css/common.css" scoped/>
<style scoped>
.card-style{
margin-left: 20px;
@ -458,4 +451,6 @@ export default {
color: #466AFF;
font-size: 33px;
}
</style>
</style>
<style src="@/assets/css/common.css" scoped/>

View File

@ -9,7 +9,6 @@
<el-step title="审核通过" icon="el-icon-upload"></el-step>
<el-step title="报名成功" icon="el-icon-picture"></el-step>
</el-steps>
</div>
<!-- 提示信息 -->
<div class="apply-tip">
@ -301,7 +300,7 @@ export default {
//
onUpload(){
this.loading_text = "拼命导入中...请稍等"
this.loading_text = "拼命导入中...请稍等";
this.loading = true;
},

View File

@ -53,30 +53,32 @@ export default {
chat_link1: "/api/files/chat-icon.png",
chat_link2: "/api/files/chat-icon.png",
chat_link3: "/api/files/chat-icon.png",
urlOne:"",
urlTwo:"",
urlThree:"",
urlOne: "",
urlTwo: "",
urlThree: "",
contentLoading: true,
loadingBg: "#FFF",
content: '',
contentMd:''
content: "",
contentMd: "",
}
},
methods:{
goToForum(linkNum){
switch (linkNum){
case 1:
window.location.href= this.urlOne
window.location.href= this.urlOne;
break;
case 2:
window.location.href= this.urlTwo
window.location.href= this.urlTwo;
break;
case 3:
window.location.href= this.urlThree
window.location.href= this.urlThree;
break;
}
},
initPage(){
pageUtils.checkComp(this.$router,this.$route.params.compId,this.$api);
this.$api.getPageData(this.$route.params.compId,'chat').then((res) => {
@ -111,7 +113,7 @@ export default {
},
mounted() {
this.initPage()
this.initPage();
},
@ -150,7 +152,6 @@ export default {
</style>
<style src="@/assets/css/common.css" scoped/>
<style lang="scss">
.chat-content{
p{
@ -163,4 +164,6 @@ export default {
}
}
}
</style>
</style>
<style src="@/assets/css/common.css" scoped/>

View File

@ -1,5 +1,4 @@
<template>
<div class="edit-content">
<el-breadcrumb class="breadcrumb" separator="/">
<el-breadcrumb-item :to="{ path: '/' + this.$route.params.compId + '/chat' }">交流互动</el-breadcrumb-item>
@ -15,9 +14,8 @@
</template>
<script>
import {Message} from "element-ui";
import pageUtils from "@/utils/pageUtils";
import { Message } from "element-ui";
export default {
name: "ChatEdit",
@ -30,22 +28,22 @@ export default {
},
methods:{
cancel(){
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/chat")
},
change(value,render){
this.html = render;
},
initPage(){
pageUtils.checkComp(this.$router,this.$route.params.compId,this.$api);
this.$api.getPageData(this.$route.params.compId,'chat').then((res) => {
console.log(res);
//
if (res.data.show) {
this.data = res.data.contentMd;
}else {
Message.warning("该页面不存在");
this.$router.push({
@ -55,6 +53,7 @@ export default {
})
},
submit(){
console.log(this.data);
console.log(this.html);
@ -68,7 +67,7 @@ export default {
if (res.status === 0) {
Message.success("保存成功")
//
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/chat")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/chat");
}else if (res.status === 20){
Message.error("文件上传失败")
}else if (res.status === 10){
@ -79,13 +78,14 @@ export default {
})
.catch(function (res) {
alert(res);
});
}
},
mounted() {
this.initPage()
this.initPage();
}
}
</script>

View File

@ -127,25 +127,29 @@ export default {
}, 1000);
this.loading = true;
},
initPage(){
var compId = this.$route.params.compId
var compId = this.$route.params.compId;
var compInfo ={
compId
compId,
}
this.$api.getChartCount(compInfo).then((res)=>{
if (res.status == 0) {
this.apply_total_num = res.data.applyCount
this.submit_total_num = res.data.submitCount
this.apply_total_num = res.data.applyCount;
this.submit_total_num = res.data.submitCount;
}
})
}
},
mounted(){
this.initPage()
this.chart_title = "地方分赛区";
this.initPage();
this.chart_title = "地方分赛区";
this.makeEcharts();
},
}

View File

@ -1,16 +1,287 @@
<template>
<div class="content">
排行榜
<div class="white"></div>
<div class="card">
<div class="card-title">{{ comp_name }}排行榜单</div>
<!-- 表格界面显示 -->
<!-- 分页设置 表格条纹 保存勾选数据-->
<el-table v-loading="loading"
:element-loading-text="loading_text"
element-loading-spinner="el-icon-loading"
element-loading-custom-class="loading_style"
empty-text="没有记录哦~"
:data="tableData.slice((currentPage-1)*pagesize,currentPage*pagesize)"
stripe
class="applyList-table"
>
<el-table-column type="index" label="排名" align="center" :width="width1">
<template slot-scope="scope">
<span v-if="scope.$index + 1 == 1" class="rankLogo1"><img src="@/assets/logo/rank_one.png" /></span>
<span v-else-if="scope.$index + 1 == 2" class="rankLogo2"><img src="@/assets/logo/rank_two.png" /></span>
<span v-else-if="scope.$index + 1 == 3" class="rankLogo3"><img src="@/assets/logo/rank_three.png" /></span>
<span v-else>{{ scope.$index+1 }} </span>
</template>
</el-table-column>
<el-table-column prop="team_name" label="团队名称" align="center" :width="width2"></el-table-column>
<el-table-column prop="team_caption" label="队长" align="center" :width="width3"></el-table-column>
<el-table-column prop="company" label="所属单位" align="center" :width="width4"></el-table-column>
<el-table-column prop="kind" label="参赛领域" align="center" :width="width5"></el-table-column>
<el-table-column prop="division" label="参赛赛区" align="center" :width="width6"></el-table-column>
<el-table-column prop="score_one" label="得分一" align="center" :width="width7"></el-table-column>
<el-table-column prop="score_two" label="得分二" align="center" :width="width8" v-if="width8If"></el-table-column>
<el-table-column prop="score_three" label="得分三" align="center" :width="width9" v-if="width9If"></el-table-column>
</el-table>
<!-- 分页底部 -->
<!-- 分页器 在每页数据的个数发生改变时触发 在页数发生改变时触发 绑定属性页数 页数导航布局 总数表格数据个数-->
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-size="pagesize"
layout="total,prev,jumper,next"
:total="tableData.length">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name: "Rank"
name: "Rank",
data(){
return{
//
comp_name: "",
loading: "",
loading_text: "",
tableData:[],
currentPage: 1,
pagesize: 10,
width1: "",
width2: "",
width3: "",
width4: "",
width5: "",
width6: "",
width7: "",
width8: "",
width9: "",
width8If: "",
width9If: "",
}
},
methods:{
//
widthIf(){
let var1 = this.tableData[0].score_one;
let var2 = this.tableData[0].score_two;
let var3 = this.tableData[0].score_three;
console.log("111"+var1);
console.log("222"+var2);
console.log("333"+var3);
if ( var1 != null && var2 != null && var3 != null ){
this.width1 = "80";
this.width2 = "150";
this.width3 = "150";
this.width4 = "200";
this.width5 = "100";
this.width6 = "120";
this.width7 = "100";
this.width8 = "100";
this.width9 = "100";
this.width8If = true;
this.width9If = true;
}else if ( var1 != null && var2 != null && var3 == null ){
this.width1 = "100";
this.width2 = "160";
this.width3 = "160";
this.width4 = "220";
this.width5 = "110";
this.width6 = "130";
this.width7 = "110";
this.width8 = "110";
this.width8If = true;
this.width9If = false;
}else if ( var1 != null && var2 == null && var3 == null ){
this.width1 = "100";
this.width2 = "180";
this.width3 = "180";
this.width4 = "230";
this.width5 = "130";
this.width6 = "150";
this.width7 = "130";
this.width8If = false;
this.width9If = false;
}else {
this.$message({
showClose: true,
message: '得分数据格式有误',
type: 'error'
});
}
},
},
mounted() {
this.comp_name = "启智2022";
/* this.tableData = [{
team_name: "昨日明天",
team_caption: "一年一班上课啦",
company: '北京理工大学',
division: '地方分赛区',
kind: '战略方向',
score_one: "97",
score_two: "99",
score_three: "95",
},{
team_name: "经典咏流传",
team_caption: "忆黄山",
company: '北京海蝶集团',
division: '地方分赛区',
kind: '技术支持',
score_one: "95",
score_two: "98",
score_three: "91",
},{
team_name: "俺们屯子必胜",
team_caption: "亚特兰蒂斯王大拿",
company: '象牙山文化有限公司',
division: '地方分赛区',
kind: '政策法规',
score_one: "92",
score_two: "95",
score_three: "93",
},{
team_name: "就想进前三",
team_caption: "没有梦想的我",
company: '知足常乐社会研究所',
division: '地方分赛区',
kind: '思想教育',
score_one: "88",
score_two: "92",
score_three: "90",
},]; */
/* this.tableData = [{
team_name: "昨日明天",
team_caption: "一年一班上课啦",
company: '北京理工大学',
division: '地方分赛区',
kind: '战略方向',
score_one: "97",
score_two: "99",
score_three: null,
},{
team_name: "经典咏流传",
team_caption: "忆黄山",
company: '北京海蝶集团',
division: '地方分赛区',
kind: '技术支持',
score_one: "95",
score_two: "98",
score_three: null,
},{
team_name: "俺们屯子必胜",
team_caption: "亚特兰蒂斯王大拿",
company: '象牙山文化有限公司',
division: '地方分赛区',
kind: '政策法规',
score_one: "92",
score_two: "95",
score_three: null,
},{
team_name: "就想进前三",
team_caption: "没有梦想的我",
company: '知足常乐社会研究所',
division: '地方分赛区',
kind: '思想教育',
score_one: "88",
score_two: "92",
score_three: null,
},];
*/
this.tableData = [{
team_name: "昨日明天",
team_caption: "一年一班上课啦",
company: '北京理工大学',
division: '地方分赛区',
kind: '战略方向',
score_one: "97",
},{
team_name: "经典咏流传",
team_caption: "忆黄山",
company: '北京海蝶集团',
division: '地方分赛区',
kind: '技术支持',
score_one: "95",
},{
team_name: "俺们屯子必胜",
team_caption: "亚特兰蒂斯王大拿",
company: '象牙山文化有限公司',
division: '地方分赛区',
kind: '政策法规',
score_one: "92",
},{
team_name: "就想进前三",
team_caption: "没有梦想的我",
company: '知足常乐社会研究所',
division: '地方分赛区',
kind: '思想教育',
score_one: "88",
},];
this.widthIf();
},
}
</script>
<style scoped>
.white {
height: 66px;
}
.card-title {
border-bottom: 1px solid #eee;
padding: 1.2vw 2vw;
text-align: left;
font-size: 16px;
font-weight: 600;
}
.applyList-table {
width: 100%;
height: 700px;
}
.rankLogo1 img {
width: 3vw;
height: 3vw;
}
.rankLogo2 img {
width: 2.5vw;
height: 2.5vw;
}
.rankLogo3 img {
width: 2vw;
height: 2vw;
}
</style>
<style src="@/assets/css/common.css" scoped/>

View File

@ -24,12 +24,12 @@ export default {
data(){
return{
data: "",
html:"",
html: "",
xssOptions:{
whiteList: {
div: ['style'],
img:['src','width','height','style'],
a: ['href', 'title', 'target','style']
img: ['src','width','height','style'],
a: ['href', 'title', 'target','style'],
}
}
}
@ -43,62 +43,61 @@ export default {
console.log(value);
console.log(render);
},
cancel(){
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/guide")
cancel(){
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/guide");
},
change(value,render){
this.html = render;
},
initPage(){
pageUtils.checkComp(this.$router,this.$route.params.compId,this.$api);
this.$api.getPageData(this.$route.params.compId,'guide').then((res) => {
console.log(res);
//
if (res.data.show) {
this.data = res.data.contentMd;
}else {
Message.warning("该页面不存在");
this.$router.push({
path: '/404'
path: '/404',
});
}
})
},
submit(){
console.log(this.data);
console.log(this.html);
let guideInfo = {
content : this.html,
contentMd : this.data,
compId : this.$route.params.compId
compId : this.$route.params.compId,
}
this.$api.guideContentUpdate(guideInfo)
.then((res) =>{
if (res.status === 0) {
Message.success("保存成功")
Message.success("保存成功");
//
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/guide")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/guide");
}else if (res.status === 20){
Message.error("文件上传失败")
Message.error("文件上传失败");
}else if (res.status === 10){
Message.error("系统错误")
Message.error("系统错误");
}else {
Message.error("权限不足或其他错误")
Message.error("权限不足或其他错误");
}
})
.catch(function (res) {
alert(res);
});
}
},
mounted() {
this.initPage()
this.initPage();
}
}
</script>
@ -108,6 +107,7 @@ export default {
margin-top: 50px;
}
</style>
<style src="@/assets/css/common.css" scoped>
</style>

View File

@ -29,7 +29,7 @@
// import 'mavon-editor/dist/css/index.css'
import Video from "@/components/Video";
import pageUtils from "@/utils/pageUtils";
import {Message} from "element-ui";
import { Message } from "element-ui";
export default {
name: "Home",
@ -45,8 +45,8 @@ export default {
videoSrc: "",
videoWidth: "100%",
contentLoading: true,
content: '',
contentMd:''
content: "",
contentMd: ""
}
},
@ -55,13 +55,13 @@ export default {
goToEdit(){
pageUtils.openPage(this.$router,"/" + this.$route.params.compId + "/homeEdit");
},
checkComp(){
pageUtils.checkComp( this.$router,this.$route.params.compId,this.$api );
this.$api.getPageData(this.$route.params.compId,'home').then((res) => {
console.log(res);
//
if (res.data.show) {
this.content = res.data.content;
this.contentMd = res.data.contentMd;
this.videoSrc = res.data.video;
@ -69,7 +69,7 @@ export default {
}else {
Message.warning("该页面不存在");
this.$router.push({
path: '/404'
path: '/404',
});
}
@ -79,7 +79,7 @@ export default {
},
mounted() {
this.checkComp()
this.checkComp();
}
}
@ -87,11 +87,9 @@ export default {
<style scoped>
.video {
margin: 1vw;
}
</style>
<style src="@/assets/css/common.css" scoped/>

View File

@ -24,11 +24,11 @@ export default {
data(){
return{
data: "",
html:"",
html: "",
xssOptions:{
whiteList: {
div: ['style'],
img:['src','width','height','style'],
img: ['src','width','height','style'],
a: ['href', 'title', 'target','style']
}
}
@ -43,62 +43,62 @@ export default {
console.log(value);
console.log(render);
},
cancel(){
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/home")
cancel(){
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/home");
},
change(value,render){
this.html = render;
},
initPage(){
pageUtils.checkComp(this.$router,this.$route.params.compId,this.$api);
this.$api.getPageData(this.$route.params.compId,'home').then((res) => {
console.log(res);
//
if (res.data.show) {
this.data = res.data.contentMd;
}else {
Message.warning("该页面不存在");
this.$router.push({
path: '/404'
path: '/404',
});
}
})
},
submit(){
console.log(this.data);
console.log(this.html);
let homeInfo = {
content : this.html,
contentMd : this.data,
compId : this.$route.params.compId
compId : this.$route.params.compId,
}
this.$api.homeContentUpdate(homeInfo)
.then((res) =>{
if (res.status === 0) {
Message.success("保存成功")
Message.success("保存成功");
//
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/home")
pageUtils.openPage(this.$router,"/" + this.$route.params.compId +"/home");
}else if (res.status === 20){
Message.error("文件上传失败")
Message.error("文件上传失败");
}else if (res.status === 10){
Message.error("系统错误")
Message.error("系统错误");
}else {
Message.error("权限不足或其他错误")
Message.error("权限不足或其他错误");
}
})
.catch(function (res) {
alert(res);
});
}
},
mounted() {
this.initPage()
this.initPage();
}
}
</script>

View File

@ -137,9 +137,9 @@ export default {
//
searchInfo:{
keyWords:"",
division:"",
kind:"",
keyWords: "",
division: "",
kind: "",
},
// res []""

View File

@ -105,9 +105,9 @@ export default {
//
searchInfo:{
keyWords:"",
division:"",
kind:"",
keyWords: "",
division: "",
kind: "",
},
//res []""

View File

@ -103,6 +103,7 @@ export default {
},
mounted() {},
};
</script>

View File

@ -73,7 +73,7 @@ export default {
//
onUpload(){
this.loading_text = "拼命导入中...请稍等"
this.loading_text = "拼命导入中...请稍等";
this.loading = true;
},
@ -114,8 +114,6 @@ export default {
float: left;
padding: 3vw 6vw;
}
</style>
<style src="@/assets/css/common.css" scoped/>