职站首页、智信云首页自适应

dev_202412
yujialong 12 months ago
parent b5ce42dd75
commit 0a9fcf47f3
  1. 4
      public/index.html
  2. 55
      src/components/menuTree/index.vue
  3. 1
      src/layouts/footer/index.vue
  4. 110
      src/layouts/header/index.vue
  5. 190
      src/layouts/navbar/index.vue
  6. 29
      src/libs/resize/index.js
  7. 58
      src/pages/course/details/index.vue
  8. 65
      src/pages/index/list/index.vue
  9. 117
      src/pages/index/zxy/index.vue
  10. 34
      src/pages/match/details/index.vue
  11. 10
      src/pages/record/show/index.vue
  12. 2
      src/setting.js
  13. 11
      src/store/modules/layout.js
  14. 605
      src/styles/common.scss

@ -9,8 +9,8 @@
content="智信云是一家为高等院校提供实验课程数字化服务的国家级高新技术企业。以区块链、大数据、人工智能等前沿技术在行业领域的运用为支撑,将新技术与经济与管理人才培养深度融合,面向全国高等院校的经济、金融、大数据应用等相关专业提供科研创新、金课建设、实验实训教学软件、实践教学以及学生就业培训为一体的专业建设咨询与技术支持服务。" content="智信云是一家为高等院校提供实验课程数字化服务的国家级高新技术企业。以区块链、大数据、人工智能等前沿技术在行业领域的运用为支撑,将新技术与经济与管理人才培养深度融合,面向全国高等院校的经济、金融、大数据应用等相关专业提供科研创新、金课建设、实验实训教学软件、实践教学以及学生就业培训为一体的专业建设咨询与技术支持服务。"
/> />
<meta name="baidu-site-verification" content="code-TRfXe8xIkJ" /> <meta name="baidu-site-verification" content="code-TRfXe8xIkJ" />
<!-- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> --> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<meta name="viewport" content="width=device-width, user-scalable=yes, shrink-to-fit=no" /> <!-- <meta name="viewport" content="width=device-width, user-scalable=yes, shrink-to-fit=no" /> -->
<link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css" /> <link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css" />
<title>智信云</title> <title>智信云</title>
<script> <script>

@ -1,35 +1,38 @@
<template> <template>
<div> <div>
<template v-for="item in this.menuList"> <template v-for="(item, i) in this.menuList">
<el-submenu :key="item.id" :index="item.id" v-if="item.children && item.children.length"> <el-submenu :key="item.id"
<template slot="title"> :index="item.id"
<span slot="title">{{item.name}}</span> v-if="item.children && item.children.length">
</template> <template slot="title">
<menuTree :menuList="item.children"></menuTree> <span slot="title">{{item.name}}</span>
</el-submenu>
<el-menu-item :key="item.id" :index="item.id" v-else>
<span slot="title">{{item.name}}</span>
</el-menu-item>
</template> </template>
</div> <menuTree :menuList="item.children"></menuTree>
</el-submenu>
<el-menu-item :key="i"
:index="item.id"
v-else>
<span slot="title">{{item.name}}</span>
</el-menu-item>
</template>
</div>
</template> </template>
<script> <script>
export default { export default {
name: 'menuTree', name: 'menuTree',
props: { props: {
menuList: { menuList: {
type: Array, type: Array,
default: [] default: []
}
},
data () {
return {}
},
mounted () {},
methods: {}
} }
},
data () {
return {}
},
mounted () { },
methods: {}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

@ -96,7 +96,6 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.footer { .footer {
min-width: 1280px;
padding: 17px 0 9px; padding: 17px 0 9px;
text-align: center; text-align: center;
background-color: #0f1d2e; background-color: #0f1d2e;

@ -32,7 +32,16 @@
<span class="title">{{title}}</span> <span class="title">{{title}}</span>
</template> </template>
</a> </a>
<div class="inner"> <el-radio-group v-if="isDev && !$store.state.layout.isMobile"
class="ip"
v-model="ip"
@change="ipChange">
<el-radio :label="0">刘榕ip</el-radio>
<el-radio :label="1">陈赓ip</el-radio>
</el-radio-group>
<!-- pc端 -->
<div v-if="!$store.state.layout.isMobile"
class="inner">
<navbar class="nav-wrap" <navbar class="nav-wrap"
ref="nav"></navbar> ref="nav"></navbar>
@ -88,6 +97,20 @@
@click="toTrial">免费试用</el-button> @click="toTrial">免费试用</el-button>
</div> </div>
</div> </div>
<!-- 移动端 -->
<div v-else
class="mobile-inner">
<i class="login el-icon-user-solid"
@click="toLogin"></i>
<i class="menu-icon"
:class="mobileMenuStatus ? 'el-icon-s-fold': 'el-icon-s-unfold' "
@click.stop="toggleMobileMenu"></i>
<navbar v-show="mobileMenuStatus"
class="mobile-menu"
:isHome.sync="isHome"
@toggleMobileMenu="toggleMobileMenu" />
</div>
</div> </div>
</template> </template>
<script> <script>
@ -100,6 +123,7 @@ import Bus from '@/libs/bus'
export default { export default {
data () { data () {
return { return {
isDev: Setting.isDev,
isZj: location.host === '10.60.32.76', // isZj: location.host === '10.60.32.76', //
isSq: Setting.isSq, isSq: Setting.isSq,
token: util.local.get(Setting.tokenKey), // token token: util.local.get(Setting.tokenKey), // token
@ -108,7 +132,9 @@ export default {
isIndex: Setting.whiteList.find(e => e === this.$route.path), // isIndex: Setting.whiteList.find(e => e === this.$route.path), //
isZxy: Setting.isZxy, isZxy: Setting.isZxy,
notices: [], notices: [],
noticeTimer: null noticeTimer: null,
ip: localStorage.getItem('localIp') ? +localStorage.getItem('localIp') : 0,
mobileMenuStatus: false
}; };
}, },
components: { components: {
@ -129,6 +155,10 @@ export default {
this.$once('hook:beforeDestroy', function () { this.$once('hook:beforeDestroy', function () {
clearInterval(this.noticeTimer) clearInterval(this.noticeTimer)
}) })
document.body.addEventListener('click', e => {
e.stopPropagation()
this.mobileMenuStatus = false
})
}, },
methods: { methods: {
...mapMutations("user", [ ...mapMutations("user", [
@ -268,6 +298,19 @@ export default {
toTrial () { toTrial () {
window.open('https://www.wjx.top/vm/wFCPCFp.aspx') window.open('https://www.wjx.top/vm/wFCPCFp.aspx')
}, },
//
toLogin () {
this.$router.push(`/login`)
},
//
toggleMobileMenu () {
this.mobileMenuStatus = !this.mobileMenuStatus
},
ipChange (val) {
localStorage.setItem('localIp', val)
location.reload()
},
} }
}; };
</script> </script>
@ -279,7 +322,6 @@ $height: 64px;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
min-width: $min-width;
height: $height; height: $height;
background-color: #fff; background-color: #fff;
box-shadow: 0px 0px 6px 0px rgba(178, 178, 178, 0.32); box-shadow: 0px 0px 6px 0px rgba(178, 178, 178, 0.32);
@ -316,6 +358,19 @@ $height: 64px;
.right { .right {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
.login {
display: inline-flex;
align-items: center;
cursor: pointer;
&:hover {
opacity: 0.9;
}
span {
margin-left: 5px;
color: #666;
font-size: 14px;
}
}
} }
.msg { .msg {
margin-right: 30px; margin-right: 30px;
@ -346,19 +401,6 @@ $height: 64px;
color: #666; color: #666;
cursor: pointer; cursor: pointer;
} }
.login {
display: inline-flex;
align-items: center;
cursor: pointer;
&:hover {
opacity: 0.9;
}
span {
margin-left: 5px;
color: #666;
font-size: 14px;
}
}
.rounded { .rounded {
border-radius: 6px; border-radius: 6px;
} }
@ -369,6 +411,37 @@ $height: 64px;
border-color: #48cafd; border-color: #48cafd;
} }
} }
.mobile-inner {
position: absolute;
top: 0;
display: flex;
justify-content: flex-end;
align-items: center;
width: 100%;
height: $height;
.login {
font-size: 20px;
color: #c1c1c1;
cursor: pointer;
}
.menu-icon {
margin: 0 20px 0 10px;
font-size: 20px;
color: #c1c1c1;
cursor: pointer;
}
}
}
.mobile-menu {
z-index: 9999;
position: absolute;
top: $height;
left: 0;
width: 100%;
background-color: white;
max-height: 300px;
overflow-y: scroll;
} }
@media (max-width: 1870px) { @media (max-width: 1870px) {
.header { .header {
@ -389,4 +462,9 @@ $height: 64px;
} }
} }
} }
.ip {
position: fixed;
top: 25px;
left: 200px;
}
</style> </style>

@ -1,13 +1,15 @@
<template> <template>
<div> <div>
<ul class="nav"> <!-- pc端 -->
<ul v-if="!$store.state.layout.isMobile"
class="nav">
<li v-for="(item, i) in menus" <li v-for="(item, i) in menus"
:key="i" :key="i"
:class="{active: active == item.index}" :class="{active: active == item.id}"
@click="jump(item)"> @click="jump(item)">
{{item.title}} {{item.name}}
<ul :class="['children']" <ul :class="['children']"
v-if="item.index === '/preInfo/list' || item.index === '/info/list'"> v-if="item.id === '/preInfo/list' || item.id === '/info/list'">
<li v-for="(column, i) in columns" <li v-for="(column, i) in columns"
:key="i" :key="i"
:class="{active: columnActive === column.id}" :class="{active: columnActive === column.id}"
@ -15,14 +17,31 @@
</ul> </ul>
</li> </li>
</ul> </ul>
<!-- 移动端 -->
<el-menu v-else
ref="elMenu"
class="menu"
background-color="#fff"
text-color="#333"
active-text-color="#006eff"
@open="menuClick"
@select="menuClick"
:default-active="String(active)">
<menuTree :menuList="menus" />
</el-menu>
</div> </div>
</template> </template>
<script> <script>
import menuTree from '@/components/menuTree'
import Setting from "@/setting" import Setting from "@/setting"
import util from "@/libs/util" import util from "@/libs/util"
import { mapActions } from "vuex"; import { mapActions } from "vuex";
export default { export default {
components: {
menuTree,
},
data () { data () {
return { return {
token: util.local.get(Setting.tokenKey), token: util.local.get(Setting.tokenKey),
@ -31,75 +50,75 @@ export default {
// //
loginedMenu: [ loginedMenu: [
{ {
index: "/station/list", id: "/station/list",
title: "实验台" name: "实验台"
}, },
{ {
index: "/appraisal/list", id: "/appraisal/list",
title: "能力测评" name: "能力测评"
}, },
{ {
index: "/record/list", id: "/record/list",
title: "实验记录" name: "实验记录"
}, },
{ {
index: "/ass/list", id: "/ass/list",
title: "考核列表" name: "考核列表"
}, },
{ {
index: "/course/list", id: "/course/list",
title: "课程学习" name: "课程学习"
}, },
{ {
index: "/info/list", id: "/info/list",
title: "最新资讯" name: "最新资讯"
}, },
{ {
index: "/match/list", id: "/match/list",
title: "线上赛事" name: "线上赛事"
}, },
{ {
index: "/activity/list", id: "/activity/list",
title: "创业活动" name: "创业活动"
}, },
{ {
index: "/screen", id: "/screen",
title: "数据看板" name: "数据看板"
} }
], ],
// //
touristMenu: [ touristMenu: [
{ {
index: "/index/list", id: "/index/list",
title: "首页" name: "首页"
}, },
{ {
index: "/touristMatch/list", id: "/touristMatch/list",
title: "大赛资讯" name: "大赛资讯"
}, },
{ {
index: "/preCourse/list", id: "/preCourse/list",
title: "精品课程" name: "精品课程"
}, },
{ {
index: "/preInfo/list", id: "/preInfo/list",
title: "最新资讯" name: "最新资讯"
}, },
{ {
index: 'data', id: 'data',
title: "数据科研" name: "数据科研"
}, },
{ {
index: "/log/list", id: "/log/list",
title: "更新日志" name: "更新日志"
}, },
{ {
index: "/screen", id: "/screen",
title: "数据看板" name: "数据看板"
} }
// { // {
// index: "trial", // id: "trial",
// title: "" // name: ""
// } // }
], ],
menus: [], menus: [],
@ -109,7 +128,7 @@ export default {
name: '平台资讯' name: '平台资讯'
} }
], // ], //
columnActive: this.$route.query.parentId columnActive: this.$route.query.parentId,
}; };
}, },
watch: { watch: {
@ -131,10 +150,10 @@ export default {
// //
const menus = this.touristMenu const menus = this.touristMenu
if (Setting.isZxy) { if (Setting.isZxy) {
menus[0].index = '/index/zxy' menus[0].id = '/index/zxy'
menus.splice(1, 0, { menus.splice(1, 0, {
index: '/product', id: '/product',
title: '产品服务' name: '产品服务'
}) })
} }
this.menus = menus this.menus = menus
@ -149,34 +168,43 @@ export default {
]), ]),
// //
jump (item) { jump (item) {
const { index } = item const { id } = item
// //
if (index === 'data') { if (id === 'data') {
window.open(Setting.isDev window.open(Setting.isDev
? `http://192.168.31.125:8092/#/` ? `http://192.168.31.125:8092/#/`
: Setting.isTest : Setting.isTest
? location.origin ? location.origin
: `https://www.dataforward.cn`) : `https://www.dataforward.cn`)
} else if (index === 'trial') { } else if (id === 'trial') {
// //
// window.open('https://www.wjx.cn/vm/wB0RcMm.aspx') // window.open('https://www.wjx.cn/vm/wB0RcMm.aspx')
} else if (index === '/screen') { } else if (id === '/screen') {
// //
window.open(this.$router.resolve('/screen').href) window.open(this.$router.resolve('/screen').href)
} else { } else {
const token = util.local.get(Setting.tokenKey) const token = util.local.get(Setting.tokenKey)
// //
if (!token && this.loginedMenu.find(e => e.index === index)) { if (!token && this.loginedMenu.find(e => e.id === id)) {
location.reload() location.reload()
} else { } else {
this.active = index this.active = id
this.columnActive = '' this.columnActive = ''
this.setColumnId('') this.setColumnId('')
index === '/preInfo/list' || index === '/info/list' || this.$router.push(index).catch(err => { }) id === '/preInfo/list' || id === '/info/list' || this.$router.push(id).catch(err => { })
token !== this.token && location.reload() // tokentoken token !== this.token && location.reload() // tokentoken
} }
} }
}, },
//
menuClick (e) {
this.$emit('toggleMobileMenu')
if (e === 'data') {
location.href = `https://www.dataforward.cn`
} else {
this.$router.push(e)
}
},
// //
getColumns () { getColumns () {
this.$get(this.api.queryAllColumns).then(({ columnTree }) => { this.$get(this.api.queryAllColumns).then(({ columnTree }) => {
@ -260,6 +288,70 @@ export default {
} }
} }
} }
$height: 90px;
/deep/.menu.el-menu--horizontal {
display: flex;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
border: 0;
outline: none;
.el-menu-item,
.el-submenu__title {
height: $height;
line-height: $height;
span {
font-size: 1rem;
font-weight: 600;
}
&:hover {
background-color: transparent !important;
span {
color: #1583ff;
}
}
}
.el-submenu__title {
display: inline-flex;
justify-content: center;
align-items: center;
}
.menu-child {
display: flex;
}
.el-submenu__icon-arrow {
position: static;
margin: 0 0 0 5px;
color: inherit;
}
.is-active {
color: #333 !important;
}
.active,
.active .el-submenu__title {
color: #1583ff !important;
}
&.home {
.el-menu-item,
.el-submenu__title {
&:hover {
background-color: transparent !important;
span {
color: #fff;
}
}
}
.is-active {
color: #f9f9f9 !important;
}
.active,
.active .el-submenu__title {
color: #fff !important;
}
}
}
@media (max-width: 1870px) { @media (max-width: 1870px) {
.nav { .nav {
left: 55%; left: 55%;

@ -1,18 +1,39 @@
// rem等比适配配置文件
import store from '@/store'
// 基准大小 // 基准大小
const baseSize = 16; const baseSize = 16;
// 设置 rem 函数 // 设置 rem 函数
function setRem() { const setRem = () => {
// 当前页面宽度相对于 1920宽的缩放比例,可根据自己需要修改。 // 当前页面宽度相对于 1920宽的缩放比例,可根据自己需要修改。
const scale = document.documentElement.clientWidth / 1920; const scale = document.documentElement.clientWidth / 1920;
// 设置页面根节点字体大小(“Math.min(scale, 2)” 指最高放大比例为2,可根据实际业务需求调整) // 设置页面根节点字体大小(“Math.min(scale, 2)” 指最高放大比例为2,可根据实际业务需求调整)
document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + "px"; document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + "px";
} }
const throttle = (func, delay) => {
var prev = Date.now()
return function () {
var context = this;
var args = arguments;
var now = Date.now();
if (now - prev >= delay) {
func.apply(context, args);
prev = Date.now();
}
}
}
const isMobile = () => {
store.commit('layout/setMobile', /Mobi|Android|iPhone/i.test(navigator.userAgent) || window.innerWidth <= 640)
}
// 初始化 // 初始化
setRem(); setRem();
isMobile()
// 改变窗口大小时重新设置 rem // 改变窗口大小时重新设置 rem
window.onresize = function() { window.onresize = throttle(() => {
setRem(); setRem();
}; isMobile()
}, 500)

@ -57,6 +57,19 @@
<div class="video_wid" <div class="video_wid"
id="player"></div> id="player"></div>
</div> </div>
<div class="inner"
v-else-if="videoSrc">
<video class="video"
:key="videoSrc"
width="100%"
height="100%"
autoplay
controls>
<source :src="videoSrc"
type="video/mp4">
您的浏览器不支持 video 标签
</video>
</div>
</div> </div>
<div class="catalog"> <div class="catalog">
<div class="list"> <div class="list">
@ -235,28 +248,33 @@ export default {
this.isWord = false this.isWord = false
this.isExcel = false this.isExcel = false
if (this.transferType(row.fileType) == '视频') { if (this.transferType(row.fileType) == '视频') {
this.$get(`${this.api.getPlayAuthNakadai}/${row.fileId}`).then(res => { //
this.playAuth = res.playAuth if (row.fileId) {
// this.$get(`${this.api.getPlayAuthNakadai}/${row.fileId}`).then(res => {
if (this.player) { this.playAuth = res.playAuth
this.player.dispose() //
this.player = null
}
this.$nextTick(() => {
if (this.player) { if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth); this.player.dispose()
} else { this.player = null
this.player = new Aliplayer({
id: "player",
width: "100%",
autoplay: false,
vid: row.fileId,
playauth: this.playAuth,
encryptType: 1 //
});
} }
}); this.$nextTick(() => {
}).catch(res => { }) if (this.player) {
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth);
} else {
this.player = new Aliplayer({
id: "player",
width: "100%",
autoplay: false,
vid: row.fileId,
playauth: this.playAuth,
encryptType: 1 //
});
}
});
}).catch(res => { })
} else {
this.videoSrc = row.fileUrl
}
} else if (this.transferType(row.fileType) == '图片') { } else if (this.transferType(row.fileType) == '图片') {
this.coverUrl = row.fileUrl this.coverUrl = row.fileUrl
} else if (row.fileType == 'pdf') { } else if (row.fileType == 'pdf') {

@ -988,4 +988,69 @@ export default {
} }
} }
} }
@media (max-width: 640px) {
.wrap {
.inner {
width: 90% !important;
}
.intro {
flex-direction: column;
padding: 40px 20px;
li {
width: 100%;
margin: 0 0 20px 0;
}
}
.about {
.inner {
padding: 30px;
}
.desc {
padding: 0;
background: none;
}
}
.adv {
.i-title {
margin-bottom: 50px;
}
.list {
flex-direction: column;
li {
width: 100%;
margin: 0 0 20px 0;
}
}
}
.pics {
flex-direction: column;
.text {
width: 100%;
}
.pro-bg1 {
max-width: 100%;
.bg2,
.bg3 {
left: 0;
max-width: 100%;
}
.bg6 {
display: none;
}
}
.pro-bg2,
.pro-bg3,
.pro-bg4,
.pro-bg5 {
max-width: 100%;
.bg2,
.bg3 {
left: 0;
max-width: 100%;
}
}
}
}
}
</style> </style>

@ -99,13 +99,14 @@
</div> </div>
<img src="@/assets/img/zxy/about2.png" <img src="@/assets/img/zxy/about2.png"
alt="" alt=""
class="wow fadeInDown" class="pic wow fadeInDown"
data-wow-delay="0.6s"> data-wow-delay="0.6s">
</div> </div>
<div class="text-center"> <div class="text-center">
<img src="@/assets/img/zxy/about3.png" <img src="@/assets/img/zxy/about3.png"
alt="" alt=""
class="wow fadeInDown" class="wow fadeInDown"
style="max-width: 100%;"
data-wow-delay="0.9s"> data-wow-delay="0.9s">
</div> </div>
</div> </div>
@ -590,6 +591,9 @@ export default {
} }
} }
} }
.pic {
max-width: 100%;
}
} }
.inner { .inner {
position: relative; position: relative;
@ -615,6 +619,9 @@ export default {
font-size: 22px; font-size: 22px;
color: #666; color: #666;
} }
.bg {
max-width: 100%;
}
} }
.adv { .adv {
position: relative; position: relative;
@ -1055,4 +1062,112 @@ export default {
} }
} }
} }
@media (max-width: 1200px) {
.wrap {
.inner {
width: 90% !important;
}
.banner {
.slide {
padding: 0 60px;
justify-content: space-between;
}
.texts {
margin-right: 0;
}
}
.intro {
.intro-pic {
flex-direction: column;
}
.text {
width: auto;
margin-bottom: 20px;
}
}
.pics {
flex-direction: column;
.text {
width: 100%;
margin-bottom: 20px;
}
.pro-bg2 {
max-width: 100%;
}
.pro-bg1 {
max-width: 100%;
.bg3 {
top: 0;
left: 0;
max-width: 100%;
}
}
}
.adv {
.en {
top: 70px;
}
.list {
flex-direction: column;
li {
width: 100%;
margin: 0 0 20px 0;
}
}
}
}
}
@media (max-width: 640px) {
.wrap {
.pics {
.pro-bg1 {
.bg6 {
display: none;
}
}
.pro-bg2 {
.bg2,
.bg3 {
left: 0;
max-width: 100%;
}
}
.pro-bg3 {
max-width: 100%;
.bg3 {
left: 0;
max-width: 100%;
}
}
.pro-bg4 {
max-width: 100%;
height: 300px;
.bg2 {
bottom: 0;
}
.bg3 {
top: 0;
left: 0;
max-width: 100%;
}
.bg4 {
top: 110px;
left: 20px;
}
}
.pro-bg5 {
max-width: 100%;
.bg2 {
right: 0;
bottom: 0;
}
.bg3 {
left: 0;
max-width: 100%;
}
}
}
}
}
</style> </style>

@ -220,6 +220,7 @@
<th width="150">团队邀请码</th> <th width="150">团队邀请码</th>
<td> <td>
<el-input :disabled="!editing" <el-input :disabled="!editing"
maxlength="6"
v-model="info.team.invitationCode"></el-input> v-model="info.team.invitationCode"></el-input>
</td> </td>
</tr> </tr>
@ -372,15 +373,19 @@
@click="selectPar(item)"></i> @click="selectPar(item)"></i>
</td> </td>
</template> </template>
<!-- 积分赛才需要显示总分这个字段直接第一行合并表格填了成绩公布时间才显示分数不然为空 --> <!-- 积分赛才需要显示总分这个字段直接第一行合并表格 -->
<td v-if="form.rule === 0 && !i" <td v-if="form.rule === 0 && !i"
:rowspan="info.stages.length">{{ item.showDetail && item.resultAnnouncementTime >= 0 ? info.totalScore : '' }}</td> :rowspan="info.stages.length">{{ info.totalScore }}</td>
<td> <td>
<span v-if="item.score >= 0 && item.resultAnnouncementTime >= 0" <!-- 成绩公布时间到了后才显示下面的分数和查看详情按钮 -->
class="m-r-10">分数{{item.score}}</span> <template v-if="item.showDetail">
<el-button v-if="item.showDetail && item.resultAnnouncementTime >= 0 && item.resultsDetails === 0 && item.reportId" <span v-if="item.score >= 0"
type="text" class="m-r-10">分数{{item.score}}</span>
@click="show(item)">查看成绩详情</el-button> <!-- 团队赛 or 个人赛 并且 是否公布成绩详情勾选的是 并且 有reportId -->
<el-button v-if="form.completeCompetitionSetup.competitionType || (!form.completeCompetitionSetup.competitionType && item.resultsDetails === 0 && item.reportId)"
type="text"
@click="show(item)">查看成绩详情</el-button>
</template>
</td> </td>
</tr> </tr>
</template> </template>
@ -604,7 +609,8 @@
<td>{{ item.timeSum }}min</td> <td>{{ item.timeSum }}min</td>
<td>{{ item.score }}</td> <td>{{ item.score }}</td>
<td> <td>
<el-button :disabled="!item.reportId" <!-- 成绩公布时间到了后才显示该按钮 -->
<el-button v-if="curRow.resultsDetails === 0 && item.reportId"
type="text" type="text"
@click="toReport(item)">查看</el-button> @click="toReport(item)">查看</el-button>
</td> </td>
@ -1047,9 +1053,13 @@ export default {
// //
const now = await Util.getNow() const now = await Util.getNow()
this.form.competitionStage && this.form.competitionStage.map(e => { this.form.competitionStage && this.form.competitionStage.map(e => {
// // 00
if (!e.resultsDetails) { const time = e.resultAnnouncementTime
const endTime = new Date(e.endTime).getTime() + e.resultAnnouncementTime * 3600000 // + if (time === 0) {
info.stages.find(n => n.stageId == e.stageId).showDetail = 1
} else if (time) {
const endTime = new Date(e.endTime).getTime() + time * 3600000 // +
console.log("🚀 ~ this.$post ~ endTime:", time, endTime - now)
if (now > endTime) { // if (now > endTime) { //
info.stages.find(n => n.stageId == e.stageId).showDetail = 1 info.stages.find(n => n.stageId == e.stageId).showDetail = 1
} else if (endTime - now < 86400000) { // } else if (endTime - now < 86400000) { //
@ -1363,8 +1373,8 @@ export default {
show (row) { show (row) {
// //
if (this.form.completeCompetitionSetup.competitionType) { // if (this.form.completeCompetitionSetup.competitionType) { //
this.curRow = row
this.memberVisible = true this.memberVisible = true
this.curRow = row
const teamId = this.form.competitionRegistration.teamId const teamId = this.form.competitionRegistration.teamId
if (teamId) { if (teamId) {
this.$post(this.api.stageTeamScoreDetails, { this.$post(this.api.stageTeamScoreDetails, {

@ -27,10 +27,9 @@
@click="back">返回实验</span> @click="back">返回实验</span>
</div> </div>
<div class="content" <div class="content"
:class="{loading}" v-loading="loading"
id="pdfDom"> id="pdfDom">
<div class="text-right" <div class="text-right">
v-if="!loading">
<el-button @click="editReport"> <el-button @click="editReport">
{{ editing ? "保存" : "编辑" }} {{ editing ? "保存" : "编辑" }}
</el-button> </el-button>
@ -289,6 +288,7 @@ export default {
}, },
methods: { methods: {
getData () { // getData () { //
this.loading = true
const { reportId } = this const { reportId } = this
this.$get(`${this.api.reportDetail}?reportId=${reportId}`).then(({ report, userScores }) => { this.$get(`${this.api.reportDetail}?reportId=${reportId}`).then(({ report, userScores }) => {
this.form = report this.form = report
@ -359,6 +359,7 @@ export default {
}) })
} }
this.expData = list this.expData = list
this.loading = false
}, },
// //
back () { back () {
@ -496,9 +497,6 @@ samp {
.content { .content {
padding: 16px 40px; padding: 16px 40px;
background: #fff; background: #fff;
&.loading {
padding-top: 30px;
}
.r-title { .r-title {
margin-bottom: 40px; margin-bottom: 40px;
font-size: 24px; font-size: 24px;

@ -33,7 +33,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/` uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 测试服 host = "http://121.37.12.51/"; // 测试服
// host = 'https://www.occupationlab.com/' // 正式服 // host = 'https://www.occupationlab.com/' // 正式服
host = "http://192.168.31.217:9000/"; host = localStorage.getItem('localIp') == 1 ? 'http://192.168.31.51:9000/' : 'http://192.168.31.217:9000/'
} else if (isSq) { } else if (isSq) {
zcPath = `10.20.100.204:8883` zcPath = `10.20.100.204:8883`
} }

@ -2,20 +2,15 @@
* 布局管理 * 布局管理
* */ * */
// 是否IE
function isIE() {
if (!!window.ActiveXObject || "ActiveXObject" in window) return true;
return false;
}
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
isIE: isIE() isMobile: false,
}, },
mutations: { mutations: {
SET_IE: (state, val) => { setMobile: (state, val) => {
state.isIE = val; state.isMobile = val;
} }
}, },
actions: {} actions: {}

@ -1,395 +1,398 @@
@import "./default/index.scss"; @import './default/index.scss';
@import "./var.scss"; @import './var.scss';
@font-face { @font-face {
font-family: youshe; font-family: youshe;
src: url('font/YouSheBiaoTiHei.ttf'); src: url('font/YouSheBiaoTiHei.ttf');
} }
@font-face { @font-face {
font-family: din; font-family: din;
src: url('font/din.otf'); src: url('font/din.otf');
} }
@font-face { @font-face {
font-family: yjsz; font-family: yjsz;
src: url('font/yjsz.TTF'); src: url('font/yjsz.TTF');
} }
[v-cloak] { [v-cloak] {
display: none; display: none;
} }
.flex-between { .flex-between {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.l-title { .l-title {
margin-bottom: 0; margin-bottom: 0;
} }
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 8px; width: 8px;
height: 8px; height: 8px;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
width: 5px; width: 5px;
border-radius: 6px; border-radius: 6px;
background: #d7d7d7; background: #d7d7d7;
} }
.main { .main {
.view { .view {
min-width: $min-width; min-height: calc(100vh - 107px);
min-height: calc(100vh - 107px); padding: 12px 200px 20px;
padding: 12px 200px 20px; margin: 0 auto;
margin: 0 auto; background-color: #f3f6fa;
background-color: #F3F6FA; &.no-pd {
&.no-pd { padding-top: 0;
padding-top: 0; }
} &.pb {
&.pb { padding-bottom: 20px;
padding-bottom: 20px; }
} }
} .wrap-inner {
.wrap-inner { min-width: $min-width;
min-width: $min-width; width: 100%;
width: 100%; padding: 0 200px 20px;
padding: 0 200px 20px; margin: 0 auto;
margin: 0 auto; }
} .center-wrap {
.center-wrap { width: 1000px;
width: 1000px; padding-bottom: 20px;
padding-bottom: 20px; margin: 40px auto 0;
margin: 40px auto 0; }
}
} }
.l-title{ .l-title {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 12px; margin-bottom: 12px;
font-size: 14px; font-size: 14px;
color: #333; color: #333;
img{ img {
margin-right: 5px; margin-right: 5px;
} }
} }
.p-title { .p-title {
padding-left: 5px; padding-left: 5px;
margin-bottom: 24px; margin-bottom: 24px;
line-height: 1; line-height: 1;
font-size: 14px; font-size: 14px;
color: #585858; color: #585858;
border-left: 3px solid $--color-primary; border-left: 3px solid $--color-primary;
} }
.el-input { .el-input {
.el-input__inner { .el-input__inner {
border-color: rgba(0, 0, 0, 0.15); border-color: rgba(0, 0, 0, 0.15);
} }
} }
.filter { .filter {
width: 100vw; width: 100vw;
display: inline-flex;
align-items: center;
flex: 1;
li {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
margin-right: 30px; flex: 1;
label { li {
margin-right: 6px; display: inline-flex;
font-size: 14px; align-items: center;
line-height: 14px; margin-right: 30px;
color: rgba(0, 0, 0, .65);
white-space: nowrap;
}
.el-radio { label {
margin-right: 10px !important; margin-right: 6px;
font-size: 14px;
line-height: 14px;
color: rgba(0, 0, 0, 0.65);
white-space: nowrap;
}
.el-radio__input { .el-radio {
display: none !important; margin-right: 10px !important;
}
.el-radio__input {
display: none !important;
}
}
} }
}
} }
.page { .page {
position: relative; position: relative;
padding: 24px 16px; padding: 24px 16px;
background-color: #fff; background-color: #fff;
.tool { .tool {
display: flex;
justify-content: space-between;
margin-bottom: 24px;
.single-choice {
dl {
display: flex; display: flex;
line-height: 30px; justify-content: space-between;
margin-bottom: 24px;
dt {
color: rgba(0, 0, 0, .65); .single-choice {
font-size: 14px; dl {
white-space: nowrap; display: flex;
} line-height: 30px;
dd { dt {
display: inline-flex; color: rgba(0, 0, 0, 0.65);
align-items: center; font-size: 14px;
flex-wrap: wrap; white-space: nowrap;
}
span {
padding: 0 10px; dd {
margin: 0 10px; display: inline-flex;
color: #333; align-items: center;
font-size: 14px; flex-wrap: wrap;
line-height: 1.8;
white-space: nowrap; span {
padding: 0 10px;
cursor: pointer; margin: 0 10px;
color: #333;
&:hover { font-size: 14px;
color: $--color-primary; line-height: 1.8;
white-space: nowrap;
cursor: pointer;
&:hover {
color: $--color-primary;
}
&.active {
border-radius: 4px;
color: #fff;
background-color: $--color-primary;
}
}
}
} }
&.active {
border-radius: 4px;
color: #fff;
background-color: $--color-primary;
}
}
} }
}
} }
}
} }
.pagination { .pagination {
margin-top: 20px; margin-top: 20px;
text-align: center; text-align: center;
button,.number,.more,.el-input__inner{ button,
min-width: 32px !important; .number,
height: 32px !important; .more,
line-height: 32px; .el-input__inner {
color: #333 !important; min-width: 32px !important;
background-color: transparent !important; height: 32px !important;
border: 1px solid #ccc !important; line-height: 32px;
border-radius: 2px !important; color: #333 !important;
} background-color: transparent !important;
button i{ border: 1px solid #ccc !important;
color: #333; border-radius: 2px !important;
} }
.active{ button i {
color: #fff !important; color: #333;
background-color: $--color-primary !important; }
} .active {
color: #fff !important;
background-color: $--color-primary !important;
}
} }
.el-table{ .el-table {
border-radius: 4px; border-radius: 4px;
th{ th {
background: #E8F0FF !important; background: #e8f0ff !important;
.cell{ .cell {
color: #222326; color: #222326;
font-size: 12px; font-size: 12px;
font-weight: normal; font-weight: normal;
.el-checkbox{ .el-checkbox {
&:before{ &:before {
opacity: 1; opacity: 1;
} }
} }
} }
} }
th, td{ th,
padding: 10px 0; td {
border-bottom-color: #E1E6F2; padding: 10px 0;
} border-bottom-color: #e1e6f2;
&.el-table--striped .el-table__body tr.el-table__row--striped td{ }
background-color: #FAFBFF; &.el-table--striped .el-table__body tr.el-table__row--striped td {
} background-color: #fafbff;
.el-checkbox__inner{ }
border-radius: 4px; .el-checkbox__inner {
transition: none !important; border-radius: 4px;
} transition: none !important;
.el-checkbox__input.is-indeterminate .el-checkbox__inner{ }
background-color: #FFFFFF; .el-checkbox__input.is-indeterminate .el-checkbox__inner {
border-color: #DCDFE6; background-color: #ffffff;
} border-color: #dcdfe6;
.el-switch__core{ }
background-color: #bfbfbf; .el-switch__core {
} background-color: #bfbfbf;
.el-switch__label--right{ }
z-index: 2; .el-switch__label--right {
position: absolute; z-index: 2;
right: 8px; position: absolute;
margin-left: 0; right: 8px;
color: #fff !important; margin-left: 0;
} color: #fff !important;
.el-switch__label--right.is-active{ }
left: 8px; .el-switch__label--right.is-active {
right: auto; left: 8px;
} right: auto;
.el-switch__label--right span{ }
font-size: 12px; .el-switch__label--right span {
} font-size: 12px;
.el-button--text{ }
padding: 0; .el-button--text {
} padding: 0;
}
} }
.el-message { .el-message {
padding: 11px 20px; padding: 11px 20px;
.el-message__icon { .el-message__icon {
font-size: 16px; font-size: 16px;
} }
.el-message__content { .el-message__content {
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
.el-icon-close { .el-icon-close {
font-size: 14px; font-size: 14px;
color: #92998d; color: #92998d;
} }
.el-message--success { .el-message--success {
border: 1px solid #B7EB8F; border: 1px solid #b7eb8f;
background: #F6FFED; background: #f6ffed;
.el-message__icon { .el-message__icon {
color: #00c700; color: #00c700;
}
} }
}
.el-message--warning { .el-message--warning {
border: 1px solid #FFE58F; border: 1px solid #ffe58f;
background: #FFFBE6; background: #fffbe6;
.el-message__icon { .el-message__icon {
color: #ffa900; color: #ffa900;
}
} }
}
} }
.el-message-box { .el-message-box {
padding-bottom: 24px; padding-bottom: 24px;
.el-message-box__header { .el-message-box__header {
padding: 32px 32px 12px 50px; padding: 32px 32px 12px 50px;
span { span {
font-size: 16px; font-size: 16px;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
font-weight: 500; font-weight: 500;
}
} }
}
.el-message-box__status { .el-message-box__status {
top: -30px; top: -30px;
} }
.el-message-box__status + .el-message-box__message { .el-message-box__status + .el-message-box__message {
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
.el-message-box__btns { .el-message-box__btns {
padding-right: 32px; padding-right: 32px;
&.el-icon-warning { &.el-icon-warning {
color: #ffa900; color: #ffa900;
}
} }
}
&:not(.normal) { &:not(.normal) {
.el-button--primary { .el-button--primary {
color: #606266; color: #606266;
background: #fff; background: #fff;
border-color: #DCDFE6; border-color: #dcdfe6;
&:hover { &:hover {
color: $--color-primary; color: $--color-primary;
border-color: #efbdbb; border-color: #efbdbb;
background-color: #fae9e8; background-color: #fae9e8;
} }
}
} }
}
} }
.el-dialog__wrapper { .el-dialog__wrapper {
.el-dialog { .el-dialog {
border-radius: 4px; border-radius: 4px;
.el-dialog__header { .el-dialog__header {
border-bottom: 1px solid rgba(0, 0, 0, 0.06); border-bottom: 1px solid rgba(0, 0, 0, 0.06);
.el-dialog__title { .el-dialog__title {
font-size: 16px; font-size: 16px;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
} }
} }
.el-dialog__footer { .el-dialog__footer {
padding: 10px 16px; padding: 10px 16px;
border-top: 1px solid rgba(0, 0, 0, 0.06); border-top: 1px solid rgba(0, 0, 0, 0.06);
.el-button { .el-button {
font-size: 14px; font-size: 14px;
border-radius: 4px; border-radius: 4px;
border-color: rgba(0, 0, 0, 0.15); border-color: rgba(0, 0, 0, 0.15);
} }
}
} }
}
} }
.el-tooltip__popper { .el-tooltip__popper {
width: 300px; width: 300px;
} }
.el-tooltip__popper.is-dark { .el-tooltip__popper.is-dark {
padding: 18px 20px; padding: 18px 20px;
color: #606266; color: #606266;
line-height: 1.8; line-height: 1.8;
background-color: #fff; background-color: #fff;
border: .0625rem solid #ebeef5; border: 0.0625rem solid #ebeef5;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
border-radius: 4px; border-radius: 4px;
} }
.el-tooltip__popper[x-placement^="top"] { .el-tooltip__popper[x-placement^='top'] {
.popper__arrow { .popper__arrow {
border-top-color: #fff; border-top-color: #fff;
&:after { &:after {
border-top-color: #fff; border-top-color: #fff;
}
} }
}
} }
@media(max-width: 1600px) { @media (max-width: 1600px) {
.el-table { .el-table {
.el-switch__label--right.is-active { .el-switch__label--right.is-active {
left: 8px; left: 8px;
}
} }
}
} }
.empty{ .empty {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 50px 0; padding: 50px 0;
text-align: center; text-align: center;
img{ img {
width: 471px; width: 471px;
} }
p{ p {
margin-top: 40px; margin-top: 40px;
font-size: 18px; font-size: 18px;
color: rgba(0, 0, 0, 0.25); color: rgba(0, 0, 0, 0.25);
} }
} }

Loading…
Cancel
Save