alioss V2.3.0
yujialong 2 years ago
parent 4e745615fb
commit d543dbf308
  1. 445
      src/pages/account/login/index.vue
  2. 135
      src/pages/activity/list/index.vue
  3. 38
      src/pages/activity/manage/manage/index.vue
  4. 494
      src/pages/station/preview/index.vue

@ -4,46 +4,77 @@
<div class="form">
<h6 class="title">欢迎使用请登录</h6>
<ul class="tab">
<li v-for="(item,index) in tabList" :key="index" :class="{active: form.distinguish == item.id}" @click="typeClick(item)">{{item.label}}</li>
<li v-for="(item,index) in tabList"
:key="index"
:class="{active: form.distinguish == item.id}"
@click="typeClick(item)">{{item.label}}</li>
</ul>
<el-form :model="form" :rules="rules" ref="form" style="margin-top: 20px">
<el-form :model="form"
:rules="rules"
ref="form"
style="margin-top: 20px">
<!-- 学号工号 -->
<div v-show="!form.distinguish">
<el-form-item class="school-select" prop="schoolId">
<el-form-item class="school-select"
prop="schoolId">
<label class="label school"></label>
<el-select v-model="form.schoolId" clearable filterable placeholder="请选择学校">
<el-option v-for="(item, i) in schoolList" :key="i" :label="item.schoolName" :value="item.schoolId"></el-option>
<el-select v-model="form.schoolId"
clearable
filterable
placeholder="请选择学校">
<el-option v-for="(item, i) in schoolList"
:key="i"
:label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<div class="items">
<el-form-item prop="type" style="width: 35%;margin-right: 15px">
<el-form-item prop="type"
style="width: 35%;margin-right: 15px">
<label class="label workNumber"></label>
<el-select v-model="form.type" placeholder="请选择类型" @change="typeChange">
<el-option label="学生学号" :value="1"></el-option>
<el-option label="老师工号" :value="0"></el-option>
<el-select v-model="form.type"
placeholder="请选择类型"
@change="typeChange">
<el-option label="学生学号"
:value="1"></el-option>
<el-option label="老师工号"
:value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item class="flex-1" prop="workNumber">
<el-form-item class="flex-1"
prop="workNumber">
<label class="label account"></label>
<el-input v-model.trim="form.workNumber" :placeholder="'请输入' + (form.type ? '学生学号' : '老师工号')" @keyup.enter.native="submit"></el-input>
<el-input v-model.trim="form.workNumber"
:placeholder="'请输入' + (form.type ? '学生学号' : '老师工号')"
@keyup.enter.native="submit"></el-input>
</el-form-item>
</div>
</div>
<!-- 手机号登录 -->
<el-form-item v-show="form.distinguish === 1" prop="account">
<el-form-item v-show="form.distinguish === 1"
prop="account">
<label class="label account"></label>
<el-input v-model.trim="form.account" placeholder="请输入账号" @keyup.enter.native="submit"></el-input>
<el-input v-model.trim="form.account"
placeholder="请输入账号"
@keyup.enter.native="submit"></el-input>
</el-form-item>
<template v-if="form.distinguish === 2">
<el-form-item prop="account">
<label class="label account"></label>
<el-input v-model.trim="form.account" placeholder="请输入手机号/邮箱" @keyup.enter.native="submit"></el-input>
<el-input v-model.trim="form.account"
placeholder="请输入手机号/邮箱"
@keyup.enter.native="submit"></el-input>
</el-form-item>
<el-form-item prop="code">
<label class="label code"></label>
<div class="ver-code">
<el-input v-model="form.code" placeholder="请输入验证码" maxlength="6" @keyup.enter.native="submit"></el-input>
<el-button type="text" @click="sendPhoneCodeLogin" :disabled="phoneDisabledLogin">{{ phoneBtnTextLogin }}
<el-input v-model="form.code"
placeholder="请输入验证码"
maxlength="6"
@keyup.enter.native="submit"></el-input>
<el-button type="text"
@click="sendPhoneCodeLogin"
:disabled="phoneDisabledLogin">{{ phoneBtnTextLogin }}
</el-button>
</div>
</el-form-item>
@ -51,76 +82,116 @@
<template v-if="form.distinguish !== 2">
<el-form-item prop="password">
<label class="password label"></label>
<el-input
type="password"
<el-input type="password"
placeholder="请输入密码"
v-model.trim="form.password"
@keyup.enter.native="submit"
>
@keyup.enter.native="submit">
</el-input>
</el-form-item>
<el-form-item prop="code">
<label class="label code"></label>
<el-input
placeholder="请输入验证码"
<el-input placeholder="请输入验证码"
v-model.trim="form.code"
@keyup.enter.native="submit"
>
@keyup.enter.native="submit">
</el-input>
<img @click="getVerImg" :src="verificationIMG" class="ver-img" alt="">
<img @click="getVerImg"
:src="verificationIMG"
class="ver-img"
alt="">
</el-form-item>
</template>
<div class="bottom">
<el-link v-if="toMatch" :underline="false" type="primary" @click="toAccount">暂无账号点击申请</el-link>
<el-checkbox v-show="!form.distinguish" v-model="setDefault">设置为默认学校</el-checkbox>
<el-link v-if="toMatch"
:underline="false"
type="primary"
@click="toAccount">暂无账号点击申请</el-link>
<el-checkbox v-show="!form.distinguish"
v-model="setDefault">设置为默认学校</el-checkbox>
</div>
<el-button class="submit" type="primary" @click="submit">登录</el-button>
<el-button class="submit"
type="primary"
@click="submit">登录</el-button>
</el-form>
</div>
</div>
<el-dialog title="绑定手机号" :visible.sync="phoneVisible" :close-on-click-modal="false" width="30%">
<el-dialog title="绑定手机号"
:visible.sync="phoneVisible"
:close-on-click-modal="false"
width="30%">
<div style='padding: 0 13px 20px 13px;'>
依据国家政策法规需绑定手机号进行网络实名才可登录使用本平台
</div>
<el-form label-width="60px">
<el-form-item label="手机号">
<el-input style="width: 100%;" placeholder="请输入手机号" v-model="phone" maxlength="11" @change="phoneChange"></el-input>
<el-input style="width: 100%;"
placeholder="请输入手机号"
v-model="phone"
maxlength="11"
@change="phoneChange"></el-input>
</el-form-item>
<el-form-item label="验证码">
<div class="ver-code">
<el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input>
<el-button style="top: 1px" type="text" @click="sendPhoneCode(1)" :disabled="binding === '' || phoneDisabled">{{ phoneBtnText }}
<el-input v-model="phoneCode"
placeholder="请输入验证码"
maxlength="6"></el-input>
<el-button style="top: 1px"
type="text"
@click="sendPhoneCode(1)"
:disabled="binding === '' || phoneDisabled">{{ phoneBtnText }}
</el-button>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="phoneVisible = false"> </el-button>
<el-button size="small" type="primary" @click="phoneSubmit"> </el-button>
<span slot="footer"
class="dialog-footer">
<el-button size="small"
@click="phoneVisible = false"> </el-button>
<el-button size="small"
type="primary"
@click="phoneSubmit"> </el-button>
</span>
</el-dialog>
<el-dialog title="请选择" :visible.sync="selectVisible" :close-on-click-modal="false" custom-class="select-dia" width="643px">
<el-dialog title="请选择"
:visible.sync="selectVisible"
:close-on-click-modal="false"
custom-class="select-dia"
width="643px">
<ul class="port">
<li :class="{active: selectedRole === 1}" @click="selectRole(1)">
<img src="@/assets/img/login/male.png" alt="">
<li :class="{active: selectedRole === 1}"
@click="selectRole(1)">
<img src="@/assets/img/login/male.png"
alt="">
<p>学生端</p>
</li>
<li :class="{active: selectedRole === 2}" @click="selectRole(2)">
<img src="@/assets/img/login/female.png" alt="">
<li :class="{active: selectedRole === 2}"
@click="selectRole(2)">
<img src="@/assets/img/login/female.png"
alt="">
<p>教师管理端</p>
</li>
</ul>
</el-dialog>
<el-dialog title="请选择您要登录的用户" :visible.sync="userVisible" :close-on-click-modal="false" custom-class="user-dia" width="500px">
<el-dialog title="请选择您要登录的用户"
:visible.sync="userVisible"
:close-on-click-modal="false"
custom-class="user-dia"
width="500px">
<p class="tips">该手机号已绑定以下用户信息</p>
<ul class="users">
<li :class="{isEnable: !user.isEnable}" v-for="(user, i) in users" :key="i" @click="chooseUser(user)">
<li :class="{isEnable: !user.isEnable}"
v-for="(user, i) in users"
:key="i"
@click="chooseUser(user)">
<span>{{ user.schoolName }}{{ user.userName }}{{ user.workNumber }}{{ user.isEnable ? '' : '(已禁用)'}}</span>
<i class="el-icon-right"></i>
</li>
</ul>
</el-dialog>
<el-dialog :visible.sync="infoVisible" :close-on-click-modal="false" custom-class="info-dia" :show-close="false" width="400px">
<el-dialog :visible.sync="infoVisible"
:close-on-click-modal="false"
custom-class="info-dia"
:show-close="false"
width="400px">
<div class="info-header">
<i class="el-icon-warning"></i>
提示
@ -128,58 +199,115 @@
<div class="info-wrap">
<p class="tips">该手机号已与以下用户绑定</p>
<ul class="users">
<li v-for="(user, i) in infos" :key="i">
<li v-for="(user, i) in infos"
:key="i">
<span>{{ user.userName }}{{ user.schoolName }}</span>
</li>
</ul>
<div class="info-footer">
<el-button size="small" type="primary" @click="bindPhone">是本人继续绑定</el-button>
<el-button class="unbind" size="small" @click="unbindPhone">不是本人解绑以上用户并绑定新用户</el-button>
<el-button size="small"
type="primary"
@click="bindPhone">是本人继续绑定</el-button>
<el-button class="unbind"
size="small"
@click="unbindPhone">不是本人解绑以上用户并绑定新用户</el-button>
</div>
</div>
</el-dialog>
<!-- 购买弹框 -->
<el-dialog title="温馨提示" :visible.sync="buyVisible" width="400px" center :close-on-click-modal="false">
<el-dialog title="温馨提示"
:visible.sync="buyVisible"
width="400px"
center
:close-on-click-modal="false">
<div class="buy">
<p class="tips">您所选择的院校暂未在本平台开通组织账号请通知院校老师联系下方二维码客服咨询</p>
<img src="@/assets/img/wechat-code.jpeg" alt="">
<img src="@/assets/img/wechat-code.jpeg"
alt="">
</div>
</el-dialog>
<el-dialog title="账号申请" :visible.sync="accountVisible" :close-on-click-modal="false" width="500px" @close="accountClose">
<el-form class="dia-form" ref="accountForm" label-width="110px" :model="accountForm" :rules="accountRules">
<el-form-item prop="schoolId" label="所属院校">
<el-select class="w-100" v-model="accountForm.schoolId" filterable placeholder="请选择院校" @change="schoolChange">
<el-option v-for="(item, i) in schoolList" :key="i" :label="item.schoolName" :value="item.schoolId"></el-option>
<el-dialog title="账号申请"
:visible.sync="accountVisible"
:close-on-click-modal="false"
width="500px"
@close="accountClose">
<el-form class="dia-form"
ref="accountForm"
label-width="110px"
:model="accountForm"
:rules="accountRules">
<el-form-item prop="schoolId"
label="所属院校">
<el-select class="w-100"
v-model="accountForm.schoolId"
filterable
placeholder="请选择院校"
@change="schoolChange">
<el-option v-for="(item, i) in schoolList"
:key="i"
:label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="workNumber" label="学号">
<el-input placeholder="申请后无法修改,请确认填写正确" v-model="accountForm.workNumber" @change="workNumberChange"></el-input>
<el-form-item prop="workNumber"
label="学号">
<el-input placeholder="申请后无法修改,请确认填写正确"
v-model="accountForm.workNumber"
@change="workNumberChange"></el-input>
</el-form-item>
<el-form-item prop="userName" label="姓名">
<el-input placeholder="请输入姓名" v-model="accountForm.userName" :disabled="formEnable"></el-input>
<el-form-item prop="userName"
label="姓名">
<el-input placeholder="请输入姓名"
v-model="accountForm.userName"
:disabled="formEnable"></el-input>
</el-form-item>
<el-form-item prop="phone" label="手机号">
<el-input placeholder="请输入手机号" maxlength="11" v-model.trim="accountForm.phone" :disabled="formEnable"></el-input>
<el-form-item prop="phone"
label="手机号">
<el-input placeholder="请输入手机号"
maxlength="11"
v-model.trim="accountForm.phone"
:disabled="formEnable"></el-input>
</el-form-item>
<el-form-item prop="code" label="验证码">
<el-form-item prop="code"
label="验证码">
<div class="ver-code">
<el-input v-model="accountForm.code" placeholder="请输入验证码" maxlength="6" :disabled="formEnable"></el-input>
<el-button style="top: 1px" type="text" @click="sendCode" :disabled="phoneDisabled && formEnable">{{ phoneBtnText }}
<el-input v-model="accountForm.code"
placeholder="请输入验证码"
maxlength="6"
:disabled="formEnable"></el-input>
<el-button style="top: 1px"
type="text"
@click="sendCode"
:disabled="phoneDisabled && formEnable">{{ phoneBtnText }}
</el-button>
</div>
</el-form-item>
<el-form-item prop="password" label="登录密码">
<el-input placeholder="请输入登录密码" type="password" maxlength="6" v-model="accountForm.password" :disabled="formEnable"></el-input>
<el-form-item prop="password"
label="登录密码">
<el-input placeholder="请输入登录密码"
type="password"
maxlength="6"
v-model="accountForm.password"
:disabled="formEnable"></el-input>
</el-form-item>
<el-form-item prop="rePassword" label="确认登录密码">
<el-input placeholder="请再次输入登录密码" type="password" maxlength="6" v-model="accountForm.rePassword" :disabled="formEnable"></el-input>
<el-form-item prop="rePassword"
label="确认登录密码">
<el-input placeholder="请再次输入登录密码"
type="password"
maxlength="6"
v-model="accountForm.rePassword"
:disabled="formEnable"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button v-if="!formEnable" size="small" type="primary" @click="accountSubmit">申请</el-button>
<el-button size="small" @click="accountVisible = false">取消</el-button>
<span slot="footer"
class="dialog-footer">
<el-button v-if="!formEnable"
size="small"
type="primary"
@click="accountSubmit">申请</el-button>
<el-button size="small"
@click="accountVisible = false">取消</el-button>
</span>
</el-dialog>
<v-footer ref="footer"></v-footer>
@ -194,16 +322,16 @@ import Setting from "@/setting";
import axios from "axios"
import { Loading } from 'element-ui'
export default {
data: function() {
data: function () {
const workNumberPass = (rule, value, callback) => {
const val = this.accountForm.workNumber
if (val === '') {
callback(new Error('请输入学号'))
} else {
const pattern = /^[A-Za-z0-9]*$/
if(pattern.test(val)){
if (pattern.test(val)) {
callback()
}else{
} else {
callback(new Error('请输入正确学号格式'))
}
}
@ -214,9 +342,9 @@ export default {
callback(new Error('请输入手机号'))
} else {
const pattern = /^1[3456789]\d{9}$/
if(pattern.test(val)){
if (pattern.test(val)) {
callback()
}else{
} else {
callback(new Error('请输入正确手机号格式'))
}
}
@ -312,11 +440,11 @@ export default {
components: {
vFooter
},
mounted() {
mounted () {
this.getVerImg()
this.getSchool()
//
this.$once("hook:beforeDestroy", function() {
this.$once("hook:beforeDestroy", function () {
clearInterval(this.phoneTimer)
clearInterval(this.phoneTimerLogin)
this.phoneTimer = null
@ -334,27 +462,27 @@ export default {
'SET_SOURCE'
]),
// id
setSchool(list) {
setSchool (list) {
this.schoolList = list
// id
const schoolId = util.local.get('schoolId')
if (schoolId) this.form.schoolId = schoolId
},
//
getSchool() {
getSchool () {
this.$get(this.api.querySchool, {
provinceId: '',
cityId: ''
}).then(({ list }) => {
this.setSchool(list)
}).catch(res => {})
}).catch(res => { })
},
getVerImg() { //
getVerImg () { //
this.form.random = Math.floor(Math.random() * 999999999);
this.verificationIMG = this.api.verification + "?random=" + `${this.form.random}`;
},
//
typeClick(tab) {
typeClick (tab) {
const { id } = tab
const form = this.form
//
@ -380,25 +508,25 @@ export default {
'请输入手机号/邮箱'
},
//
typeChange(id) {
typeChange (id) {
this.rules.workNumber[0].message = id === 1 ?
'请输入学生学号' :
'请输入老师工号'
},
//
reloadIndex() {
reloadIndex () {
try {
window.opener && window.opener.location.reload()
} catch(e) {}
} catch (e) { }
},
//
chooseUser(user) {
chooseUser (user) {
user.isEnable && this.$post(`${this.api.getToken}?id=${user.id}`).then(({ data }) => {
this.queryClient(data.token)
}).catch(res => {})
}).catch(res => { })
},
//
queryClient(token) {
queryClient (token) {
this.token = token
axios.get(this.api.isClient, {
headers: {
@ -412,10 +540,10 @@ export default {
} else {
this.form.type ? this.setLogin() : this.toMang()
}
}).catch(res => {})
}).catch(res => { })
},
//
setLogin() {
setLogin () {
util.local.set(Setting.tokenKey, this.token, Setting.tokenExpires)
util.cookies.remove('serverLogin')
this.reloadIndex()
@ -429,7 +557,7 @@ export default {
'/station')
},
//
submit() {
submit () {
this.$refs.form.validate(valid => {
if (valid) {
const form = JSON.parse(JSON.stringify(this.form))
@ -469,7 +597,7 @@ export default {
});
},
//
toMang() {
toMang () {
const { token } = this
util.local.set('oc_server_token', token, Setting.tokenExpires)
// 使
@ -493,7 +621,7 @@ export default {
}).then(({ data }) => {
this.SET_CUSTOMERNAME(data.result.hrUserInfo.userName)
util.cookies.set('customerName', data.result.hrUserInfo.userName)
}).catch(err => {})
}).catch(err => { })
}
this.reloadIndex()
@ -507,10 +635,10 @@ export default {
`http://${location.hostname}:8081/#/redirect?auth=${btoa(this.token)}` :
`${location.origin}/admin/#/redirect?auth=${window.btoa(this.token)}`
// }
}).catch(res => {})
}).catch(res => { })
},
//
selectRole(val) {
selectRole (val) {
this.selectedRole = val
if (val === 1) {
this.setLogin()
@ -519,7 +647,7 @@ export default {
}
},
//
verifyPhone(phone) {
verifyPhone (phone) {
if (!phone) {
this.$message.error("请输入手机号")
return false
@ -532,11 +660,11 @@ export default {
},
//
toAccount() {
toAccount () {
this.accountVisible = true
},
//
workNumberChange() {
workNumberChange () {
const form = this.accountForm
form.schoolId && form.workNumber && this.$get(`${this.api.enquireAboutSchoolStudents}?schoolId=${form.schoolId}&workNumber=${form.workNumber}&applyFor=1`).then(({ account }) => {
if (account) this.form = account
@ -546,7 +674,7 @@ export default {
})
},
//
schoolChange(schoolId) {
schoolChange (schoolId) {
this.$get(this.api.getCustomerBySchoolId, {
schoolId
}).then(res => {
@ -554,10 +682,10 @@ export default {
this.accountVisible = false
this.buyVisible = true
}
}).catch(res => {})
}).catch(res => { })
},
//
sendCode() {
sendCode () {
const { phone } = this.accountForm
//
phone && this.$get(`${this.api.checkPhoneOrEmailExist}?phone=${phone}&type=1&email=`).then(res => {
@ -566,11 +694,11 @@ export default {
this.$post(`${this.api.sendPhoneVerificationCode}?phoneOrEmail=${phone}&loginOrBind=1&platform=${Setting.platformId}`).then(({ message }) => {
util.successMsg(message)
this.phoneCountdown()
}).catch(res => {})
}).catch(res => {})
}).catch(res => { })
}).catch(res => { })
},
//
accountSubmit() {
accountSubmit () {
this.$refs.accountForm.validate(valid => {
if (valid) {
const form = this.accountForm
@ -580,12 +708,12 @@ export default {
this.$post(this.api.studentAccountApplication, form).then(res => {
this.accountVisible = false
util.successMsg('账号申请已提交,需管理员审核,请10分钟后再登录')
}).catch(res => {})
}).catch(res => { })
}
})
},
//
accountClose() {
accountClose () {
this.accountForm = {
schoolId: '',
account: '',
@ -600,7 +728,7 @@ export default {
},
//
phoneCountdownLogin() {
phoneCountdownLogin () {
let count = 60
if (!this.phoneTimerLogin) {
this.phoneDisabledLogin = true
@ -618,28 +746,28 @@ export default {
}
},
//
sendPhoneCodeLogin() {
sendPhoneCodeLogin () {
const phone = this.form.account
if (!this.verifyPhone(phone)) return false
this.$post(`${this.api.sendPhoneVerificationCode}?phoneOrEmail=${phone}&loginOrBind=0&platform=${Setting.platformId}`).then(({ message }) => {
util.successMsg(message)
this.phoneCountdownLogin()
}).catch(res => {})
}).catch(res => { })
},
//
bindPhone() {
bindPhone () {
this.infoVisible = false
this.binding = true
this.sendPhoneCode(1)
},
//
unbindPhone() {
unbindPhone () {
this.infoVisible = false
this.binding = false
this.sendPhoneCode(0)
},
//
phoneChange() {
phoneChange () {
this.$post(`${this.api.getOtherAccountByPhone}?phone=${this.phone}&platform=${Setting.platformId}`).then(({ userAccounts }) => {
const list = userAccounts
if (list) {
@ -653,10 +781,10 @@ export default {
} else {
this.binding = true
}
}).catch(res => {})
}).catch(res => { })
},
//
phoneCountdown() {
phoneCountdown () {
let count = 60
if (!this.phoneTimer) {
this.phoneDisabled = true
@ -674,7 +802,7 @@ export default {
}
},
//
sendPhoneCode(bind) {
sendPhoneCode (bind) {
const { phone } = this
if (!this.verifyPhone(phone)) return false
//
@ -690,16 +818,16 @@ export default {
} else {
util.errorMsg(message)
}
}).catch(res => {})
}).catch(res => { })
} else {
this.$post(`${this.api.sendPhoneVerificationCode}?phoneOrEmail=${phone}&loginOrBind=1&platform=${Setting.platformId}`).then(({ message }) => {
util.successMsg(message)
this.phoneCountdown()
}).catch(res => {})
}).catch(res => { })
}
},
//
unbind() {
unbind () {
const { password, platform, schoolId, type, workNumber } = this.form
this.$post(this.api.unbindAccounts, {
accountIds: this.accountIds,
@ -713,10 +841,10 @@ export default {
}).then(({ data }) => {
this.token = data.token
this.setLogin()
}).catch(res => {})
}).catch(res => { })
},
//
phoneSubmit() {
phoneSubmit () {
const { phone, phoneCode } = this
if (!this.verifyPhone(phone)) return false
if (!phoneCode) return util.warningMsg('请输入验证码')
@ -734,7 +862,7 @@ export default {
}).then(({ token }) => {
this.token = token
this.setLogin()
}).catch(res => {})
}).catch(res => { })
} else {
this.unbind()
}
@ -746,7 +874,7 @@ export default {
<style scoped lang="scss">
.wrap {
min-height: 100%;
background-color: #F3F6FA;
background-color: #f3f6fa;
}
.ver-code {
position: relative;
@ -756,33 +884,33 @@ export default {
right: 10px;
}
}
.login{
.login {
min-height: calc(100vh - 43px);
padding-top: calc((100vh - 584px) / 2);
background: url(../../../assets/img/shapes/shape1.png) (0 123px)/auto no-repeat,
url(../../../assets/img/shapes/shape2.png) (35px 238px)/auto no-repeat,
url(../../../assets/img/shapes/shape3.png) (0 485px)/auto no-repeat,
url(../../../assets/img/shapes/shape4.png) (right 50%)/auto no-repeat,
url(../../../assets/img/shapes/shape5.png) (right 80%)/auto no-repeat,
url(../../../assets/img/shapes/shape6.png) (right bottom)/auto no-repeat;
.tab{
background: url(../../../assets/img/shapes/shape1.png) (0 123px) / auto no-repeat,
url(../../../assets/img/shapes/shape2.png) (35px 238px) / auto no-repeat,
url(../../../assets/img/shapes/shape3.png) (0 485px) / auto no-repeat,
url(../../../assets/img/shapes/shape4.png) (right 50%) / auto no-repeat,
url(../../../assets/img/shapes/shape5.png) (right 80%) / auto no-repeat,
url(../../../assets/img/shapes/shape6.png) (right bottom) / auto no-repeat;
.tab {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
border-bottom: 2px solid #E1E6F2;
li{
border-bottom: 2px solid #e1e6f2;
li {
padding: 18px 0;
margin-bottom: -1px;
font-size: 16px;
color: #555;
cursor: pointer;
border-bottom: 4px solid transparent;
&:last-child{
&:last-child {
margin-right: 0;
}
&.active{
color: $main-color;;
&.active {
color: $main-color;
border-bottom-color: $main-color;
}
}
@ -791,29 +919,29 @@ export default {
display: flex;
align-items: center;
}
.form{
.form {
width: 436px;
padding: 38px 38px 60px;
margin: 0 auto 0;
border-radius: 6px;
background-color: #fff;
.title{
.title {
margin-bottom: 25px;
font-size: 26px;
color: #0B1D30;
color: #0b1d30;
letter-spacing: 4px;
}
}
/deep/.el-form-item{
/deep/.el-form-item {
margin-bottom: 20px;
}
/deep/.el-input__inner{
/deep/.el-input__inner {
position: relative;
height: 52px;
padding: 0 20px 0 34px;
line-height: 50px;
background-color: #FBFBFB;
border: 1px solid #E1E6F2;
background-color: #fbfbfb;
border: 1px solid #e1e6f2;
border-radius: 4px !important;
}
.bottom {
@ -832,33 +960,33 @@ export default {
height: 18px;
background: url(../../../assets/img/login/account.png) 0 0/100% 100% no-repeat;
}
.school{
.school {
background-image: url(../../../assets/img/login/school.png);
}
.workNumber{
.workNumber {
width: 17px;
background-image: url(../../../assets/img/login/workNumber.png);
}
.password{
.password {
top: 18px;
background-image: url(../../../assets/img/login/password.png);
}
.code{
.code {
top: 18px;
background-image: url(../../../assets/img/login/code.png);
}
.ver-img{
.ver-img {
position: absolute;
top: 1px;
right: 1px;
}
/deep/.el-form-item__error{
/deep/.el-form-item__error {
top: 105%;
left: auto;
right: 0;
color: #FFA94E;
color: #ffa94e;
}
.submit{
.submit {
width: 100%;
height: 48px;
margin-top: 30px;
@ -870,16 +998,16 @@ export default {
border: 0;
}
}
.copyright{
.copyright {
padding: 18px 0;
font-size: 12px;
text-align: center;
background-color: #F3F6FA;
a{
color:#B1B4B8;
background-color: #f3f6fa;
a {
color: #b1b4b8;
font-size: 12px;
&:hover{
opacity: .8;
&:hover {
opacity: 0.8;
}
}
}
@ -894,9 +1022,10 @@ export default {
margin-right: 86px;
}
&:hover img {
opacity: .9;
opacity: 0.9;
}
&.active p, &:hover p {
&.active p,
&:hover p {
background-color: #9278ff;
}
}

@ -3,15 +3,22 @@
<div class="search">
<h6>创业活动</h6>
<div class="input">
<img src="@/assets/img/search.png" alt="">
<input type="text" placeholder="请输入关键词" v-model="keyword">
<img src="@/assets/img/search.png"
alt="">
<input type="text"
placeholder="请输入关键词"
v-model="keyword">
</div>
</div>
<div class="main">
<div class="center-wrap list-inner">
<ul v-if="token" class="nav">
<li :class="{ active: form.whetherToSignUp === item.id }" v-for="(item, index) in typeList" :key="index" @click="changeType(item.id)">{{ item.name }}
<ul v-if="token"
class="nav">
<li :class="{ active: form.whetherToSignUp === item.id }"
v-for="(item, index) in typeList"
:key="index"
@click="changeType(item.id)">{{ item.name }}
</li>
</ul>
<div class="list-wrap">
@ -20,19 +27,26 @@
<div>
<dl>
<dt>筛选排序</dt>
<dd v-for="(item, i) in sorts" :key="i" :class="{active: form.filterSort == item.id}" @click="changeSort(item.id)">{{ item.name }}</dd>
<dd v-for="(item, i) in sorts"
:key="i"
:class="{active: form.filterSort == item.id}"
@click="changeSort(item.id)">{{ item.name }}</dd>
</dl>
</div>
<el-button type="primary" @click="$router.push('manage')">我的项目</el-button>
<el-button type="primary"
@click="$router.push('manage')">我的项目</el-button>
</div>
<div class="list">
<template v-if="listData.length">
<ul>
<li v-for="(item,index) in listData" :key="index" @click="toDetail(item)">
<li v-for="(item,index) in listData"
:key="index"
@click="toDetail(item)">
<div class="left">
<div class="cover">
<img :src="item.coverUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20230515/jpg/1657937339328520192.jpg'" alt="">
<img :src="item.coverUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20230515/jpg/1657937339328520192.jpg'"
alt="">
</div>
<div class="info">
<div class="title">{{ item.projectName }}</div>
@ -54,16 +68,20 @@
</div>
<div class="right">
<p class="status"
:class="{wait: item.status == 0,signing: item.status == 2,signed: item.status == 1,playing: item.status == 4,finish: item.status == 3 || item.status == 4}" @click.stop="signup(item)">{{ statusList[item.status] }}</p>
<p class="end-text" v-if="item.end">
:class="{wait: item.status == 0,signing: item.status == 2,signed: item.status == 1,playing: item.status == 4,finish: item.status == 3 || item.status == 4}"
@click.stop="signup(item)">{{ statusList[item.status] }}</p>
<p class="end-text"
v-if="item.end">
距离{{ endList[item.status] }}还有
<em >{{ item.end }}</em>
<em>{{ item.end }}</em>
</p>
</div>
</li>
</ul>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals"
<el-pagination background
layout="total, prev, pager, next"
:total="totals"
@current-change="handleCurrentChange"
:current-page="page">
</el-pagination>
@ -72,7 +90,8 @@
<template v-else>
<div class="empty">
<div>
<img src="@/assets/img/none.png" alt="">
<img src="@/assets/img/none.png"
alt="">
<p>暂无赛事</p>
</div>
</div>
@ -82,15 +101,24 @@
</div>
</div>
<el-dialog title="报名" :visible.sync="signupVisible" :close-on-click-modal="false" width="300px">
<el-dialog title="报名"
:visible.sync="signupVisible"
:close-on-click-modal="false"
width="300px">
<el-form class="dia-form">
<el-form-item>
<el-input placeholder="请输入4位数大赛邀请码" maxlength="4" v-model="invitationCode"></el-input>
<el-input placeholder="请输入4位数大赛邀请码"
maxlength="4"
v-model="invitationCode"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="signupSubmit">报名</el-button>
<el-button size="small" @click="signupVisible = false">取消</el-button>
<span slot="footer"
class="dialog-footer">
<el-button size="small"
type="primary"
@click="signupSubmit">报名</el-button>
<el-button size="small"
@click="signupVisible = false">取消</el-button>
</span>
</el-dialog>
</div>
@ -102,7 +130,7 @@ import { Loading } from "element-ui";
import Setting from "@/setting"
import util from "@/libs/util"
export default {
data() {
data () {
return {
timer: null,
redisTimer: null,
@ -148,16 +176,16 @@ export default {
};
},
watch: {
keyword: function(val) {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
}
},
mounted() {
mounted () {
this.getData()
this.$once('hook:beforeDestroy', function() {
this.$once('hook:beforeDestroy', function () {
this.clearTimer()
clearInterval(this.redisTimer)
})
@ -166,7 +194,7 @@ export default {
...mapMutations('match', [
'SET_TYPE'
]),
getList() {
getList () {
this.clearTimer()
const data = {
pageNum: this.page,
@ -186,7 +214,7 @@ export default {
})
},
//
handleStatus() {
handleStatus () {
this.listData.map(item => {
if (item.signUpStartTime && item.signUpEndTime && item.playStartTime && item.playEndTime) {
let total = ''
@ -232,13 +260,13 @@ export default {
})
},
//
clearTimer() {
clearTimer () {
this.timerList.forEach(n => {
clearInterval(n)
})
this.timerList = []
},
getData() {
getData () {
// this.loadIns = Loading.service()
this.getList()
// if (!Setting.isDev) {
@ -246,20 +274,20 @@ export default {
this.redisTimer = setInterval(this.getRedis, 1000)
// }
},
initData() {
initData () {
this.page = 1
this.getData()
},
// redis
getRedis() {
getRedis () {
this.$post(this.api.getRedisCacheActivity).then(({ data }) => {
if (data) {
localStorage.getItem('activityTimestampClient') !== data && this.getList() // redis
localStorage.setItem('activityTimestampClient', data)
}
}).catch(res => {})
}).catch(res => { })
},
changeType(type) {
changeType (type) {
const { form } = this
form.competitionScope = 3
form.provinceId = ''
@ -269,20 +297,20 @@ export default {
this.initData()
},
//
changeSort(type) {
changeSort (type) {
this.form.filterSort = type
this.initData()
},
toDetail(item) {
toDetail (item) {
this.$router.push(`/activity/details?id=${item.id}`);
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.page = val;
this.getData();
},
//
signupSubmit() {
signupSubmit () {
this.$post(this.api.saveActivityApplicant, {
activityId: this.curRow.id,
registrationInvitationCode: this.invitationCode
@ -290,10 +318,10 @@ export default {
this.signupVisible = false
this.getData()
this.$message.success('报名成功')
}).catch(res => {})
}).catch(res => { })
},
//
signup(item) {
signup (item) {
const { status, id } = item
if (status == 2) { //
//
@ -307,7 +335,7 @@ export default {
}).then(res => {
this.getData()
this.$message.success('报名成功')
}).catch(res => {})
}).catch(res => { })
}
} else if (status == 1) {
//
@ -317,12 +345,12 @@ export default {
this.$post(`${this.api.delActivityApplicant}?id=${item.cancelId}`).then(res => {
this.getData()
this.$message.success('取消报名成功')
}).catch(res => {})
}).catch(() => {})
}).catch(res => { })
}).catch(() => { })
}
},
// python
toPython() {
toPython () {
const form = this.curItem.curStage
let token = util.local.get(Setting.tokenKey);
util.cookies.set('assessmentId', '', -1)
@ -348,7 +376,7 @@ export default {
`${location.origin}/pyTrials`
},
//
toSub() {
toSub () {
const form = this.curItem
const { systemId, projectId, cid, stageId } = form.curStage
const competitionId = form.id
@ -402,9 +430,9 @@ export default {
border-radius: 4px;
}
}
.main{
background: url(../../../assets/img/match-bg1.png) (0px 95px)/auto auto no-repeat,
url(../../../assets/img/match-bg2.png) (98% bottom)/auto auto no-repeat;
.main {
background: url(../../../assets/img/match-bg1.png) (0px 95px) / auto auto no-repeat,
url(../../../assets/img/match-bg2.png) (98% bottom) / auto auto no-repeat;
.center-wrap {
width: 1078px;
}
@ -455,9 +483,9 @@ export default {
.list-inner {
display: flex;
justify-content: center;
align-items:flex-start;
align-items: flex-start;
}
.nav{
.nav {
width: 156px;
text-align: right;
overflow: hidden;
@ -516,11 +544,11 @@ export default {
font-size: 14px;
color: #fff;
white-space: nowrap;
background-color: #52C41A;
background-color: #52c41a;
border-radius: 4px;
@include ellipsis();
&.wait {
background-color: #FAAD14;
background-color: #faad14;
}
&.signing {
@ -528,7 +556,7 @@ export default {
}
&.signed {
background-color: #52C41A;
background-color: #52c41a;
}
&.playing {
background-color: #f96d6d;
@ -547,7 +575,7 @@ export default {
cursor: pointer;
&:hover {
opacity: .9;
opacity: 0.9;
}
&.disabled {
@ -558,7 +586,7 @@ export default {
.end-text {
margin-top: 10px;
color: rgba(0, 0, 0, .65);
color: rgba(0, 0, 0, 0.65);
font-size: 12px;
white-space: nowrap;
@ -597,7 +625,7 @@ export default {
margin-bottom: 10px;
font-size: 20px;
font-weight: 500;
color: #0B1D30;
color: #0b1d30;
word-break: break-all;
@include mul-ellipsis(2);
}
@ -614,7 +642,8 @@ export default {
}
}
.label, .val {
.label,
.val {
font-size: 14px;
color: #666;
white-space: nowrap;

@ -1,15 +1,23 @@
<template>
<div>
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover"
class="m-b-20">
<div class="flex-between">
<el-page-header @back="back" :content="name + '/管理'"></el-page-header>
<el-page-header @back="back"
:content="name + '/管理'"></el-page-header>
</div>
</el-card>
<div class="page" style="margin-bottom: 24px">
<div class="page"
style="margin-bottom: 24px">
<div class="tabs">
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{ item }}</a>
<a class="item"
v-for="(item,index) in tabs"
:key="index"
:class="{active: index == active}"
@click="tabChange(index)">{{ item }}</a>
</div>
<MatchDetail v-if="active == 'tab1'" ref="detail" />
<MatchDetail v-if="active == 'tab1'"
ref="detail" />
<MatchProgress v-else-if="active == 'tab2'" />
<notice v-else-if="active == 'tab3'" />
<MatchSignup v-else-if="active == 'tab4'" />
@ -27,7 +35,7 @@ import MatchSignup from "./matchSignup";
import { mapState } from "vuex";
export default {
name: "matchManage",
data() {
data () {
return {
name: this.$route.query.name,
active: this.$route.query.tab || "tab1",
@ -45,7 +53,7 @@ export default {
notice,
MatchSignup
},
beforeRouteLeave(to, from, next) {
beforeRouteLeave (to, from, next) {
const detail = this.$refs.detail
if (detail && detail.updateTime) {
this.$confirm(`编辑的内容未保存,是否保存并且发布?`, '提示.......', {
@ -59,15 +67,15 @@ export default {
next()
}
},
mounted() {
mounted () {
},
methods: {
back() {
back () {
this.handleSave(0) && this.backPage()
},
// confirm
handleSave(i) {
handleSave (i) {
//
if (this.active === 'tab1') {
const detail = this.$refs.detail
@ -89,20 +97,20 @@ export default {
}
},
//
backPage(){
backPage () {
this.$router.push(`/activity/manage?page=${this.$store.state.activity.page}`)
},
// tab
tabSwitch(i) {
tabSwitch (i) {
this.active = i
this.$router.push(`manageDetail?id=${this.$route.query.id}&tab=${i}&name=${this.name}`)
},
// tab
backOrTab(i) {
backOrTab (i) {
i ? this.tabSwitch(i) : this.backPage()
},
// tab
tabChange(i) {
tabChange (i) {
this.handleSave(i) && this.tabSwitch(i)
}
}
@ -114,7 +122,7 @@ export default {
display: flex;
align-items: center;
padding: 0 24px;
border-bottom: 1px solid rgba(0, 0, 0, .06);
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
.item {
position: relative;
padding: 20px 0;

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save