实验台等修复

UI_2022-02-10
yujialong 3 years ago
parent 4e6fca85ad
commit 998289be40
  1. 3
      src/components/breadcrumb/index.vue
  2. 10
      src/layouts/navbar/index.vue
  3. 8
      src/pages/ass/list/index.vue
  4. 33
      src/pages/station/list/index.vue
  5. 12
      src/plugins/requests/index.js

@ -1,7 +1,7 @@
<template> <template>
<div class="breadcrumb"> <div class="breadcrumb">
<el-breadcrumb separator=">"> <el-breadcrumb separator=">">
<el-breadcrumb-item v-for="(item, index) in pages" :key="index" :to="{ path: index == pages.length - 1 ? curRoute : route }">{{item}}</el-breadcrumb-item> <el-breadcrumb-item v-for="(item, index) in pages" :key="index" :to="{ path: index == pages.length - 1 ? '.' : route }">{{item}}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
</template> </template>
@ -26,7 +26,6 @@ export default {
}, },
methods: { methods: {
update(data){ update(data){
console.log(2222,data)
this.pages = data.split('/') this.pages = data.split('/')
} }
} }

@ -64,12 +64,16 @@ export default {
}; };
}, },
mounted() { mounted() {
this.menus = this.token ? this.loginedMenu : this.touristMenu this.menus = util.local.get(Setting.tokenKey) ? this.loginedMenu : this.touristMenu
}, },
methods: { methods: {
jump(item) { jump(item) {
this.active = item.index if (!util.local.get(Setting.tokenKey) && this.loginedMenu.find(e => e.index === item.index)) {
this.$router.push(item.index).catch(err => {}) location.reload()
} else {
this.active = item.index
this.$router.push(item.index).catch(err => {})
}
} }
} }
}; };

@ -71,17 +71,17 @@
<el-table-column prop="sysName" label="课程名称" align="center" show-overflow-tooltip></el-table-column> <el-table-column prop="sysName" label="课程名称" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="experimentalName" label="考核名称" align="center" show-overflow-tooltip></el-table-column> <el-table-column prop="experimentalName" label="考核名称" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="className" label="实验班级" align="center"></el-table-column> <el-table-column prop="className" label="实验班级" align="center"></el-table-column>
<el-table-column prop="experimentalNum" label="实验人数" align="center"></el-table-column> <el-table-column prop="experimentalNum" width="90" label="实验人数" align="center"></el-table-column>
<el-table-column prop="experimentDuration" label="考试时长" align="center"></el-table-column> <el-table-column prop="experimentDuration" width="90" label="考试时长" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="startTime" label="起始时间" align="center"></el-table-column> <el-table-column prop="startTime" label="起始时间" align="center"></el-table-column>
<el-table-column prop="stopTime" label="结束时间" align="center"></el-table-column> <el-table-column prop="stopTime" label="结束时间" align="center"></el-table-column>
<el-table-column label="倒计时" align="center"> <el-table-column label="倒计时" width="90" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ timeFilter(scope.row) }}</span> <span>{{ timeFilter(scope.row) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="考核状态" align="center"> <el-table-column label="考核状态" width="90" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="ellipsis">{{ status[scope.row.status] }}</span> <span class="ellipsis">{{ status[scope.row.status] }}</span>
</template> </template>

@ -1,6 +1,6 @@
<template> <template>
<!-- 实验台 --> <!-- 实验台 -->
<div class="box index"> <div class="wrap index">
<div class="search"> <div class="search">
<h6>创新实验智能教学</h6> <h6>创新实验智能教学</h6>
<div class="input"> <div class="input">
@ -8,11 +8,10 @@
<input type="text" placeholder="请输入关键词" v-model="keyword"> <input type="text" placeholder="请输入关键词" v-model="keyword">
</div> </div>
</div> </div>
<div class="wrap"> <div class="station">
<template v-for="(item,index) in curriculumList"> <template v-for="(item,index) in curriculumList">
<a class="item" @click="goPreview(item)" :key="index" v-if="!keyword || item.curriculumName.includes(keyword)"> <a class="item" @click="goPreview(item)" :key="index" v-if="!keyword || item.curriculumName.includes(keyword)">
<img :src="item.coverUrl" alt=""> <img :src="item.coverUrl" alt="">
<p class="text" v-html="item.curriculumName"></p>
</a> </a>
</template> </template>
</div> </div>
@ -79,34 +78,24 @@ export default {
} }
} }
.wrap { .station {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
width: 70%; width: 1072px;
margin: 0 auto;
min-height: calc(100vh - 520px); min-height: calc(100vh - 520px);
box-sizing: border-box; padding: 30px 0;
margin: 0 auto;
.item { .item {
width: 16%; width: 256px;
margin: 20px; height: 195px;
text-align: center; margin: 0 6px 4px;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
opacity: .9; opacity: .9;
} }
img { img {
width: 100px; width: 100%;
height: 100px; height: 100%;
margin: 0 auto 6px;
}
.text {
font-size: 14px;
text-align: center;
color: #333;
} }
} }
} }

@ -21,7 +21,7 @@ service.interceptors.request.use(config => {
util.errorMsg({ util.errorMsg({
message: "退出登陆", message: "退出登陆",
onClose: function() { onClose: function() {
router.push({ name: "/login" }); router.push({ name: "/index" });
} }
}); });
return Promise.reject(err); return Promise.reject(err);
@ -54,10 +54,7 @@ service.interceptors.response.use(
util.errorMsg("登录过期,请重新登录"); util.errorMsg("登录过期,请重新登录");
setTimeout(() => { setTimeout(() => {
router.replace({ router.replace({
path: "/login", path: "/index"
query: {
redirect: router.currentRoute.fullPath
}
}); });
}, 1000); }, 1000);
break; break;
@ -77,10 +74,7 @@ service.interceptors.response.use(
// 跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面 // 跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面
setTimeout(() => { setTimeout(() => {
router.replace({ router.replace({
path: "/login", path: "/index"
query: {
redirect: router.currentRoute.fullPath
}
}); });
}, 1000); }, 1000);
break; break;

Loading…
Cancel
Save