Merge branch 'stat' into third

This commit is contained in:
daihh
2022-12-13 16:52:21 +08:00
6 changed files with 62 additions and 18 deletions

View File

@@ -259,7 +259,7 @@
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input> <el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="受众"><!--:disabled="item.disabled"--> <el-form-item label="受众"><!--:disabled="item.disabled"-->
<el-select value-key="id" style="width: 100%;" v-model="courseCrowds" filterable multiple placeholder="请选择"> <el-select value-key="id" style="width: 100%;" v-model="courseCrowds" filterable multiple :clearable="false" @remove-tag="removeCrowd" placeholder="请选择">
<el-option v-for="item in userGroupList" :key="item.id" :label="item.name" :value="item"></el-option> <el-option v-for="item in userGroupList" :key="item.id" :label="item.name" :value="item"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>

View File

@@ -162,13 +162,13 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
setCurIdentity(iden){ setCurIdentity(iden){
this.$store.dispatch('SetCurIdentity',iden); this.$store.dispatch('SetCurIdentity',iden);
if(this.isTest){
//this.$router.push('/manage/learningpath');
location.href=process.env.BASE_URL+'manage/learningpath';
}else{
this.$router.push('/manager/index'); this.$router.push('/manager/index');
} // if(this.isTest){
// //this.$router.push('/manage/learningpath');
// location.href='/manage/learningpath';
// }else{
// this.$router.push('/manager/index');
// }
}, },
jumrank(){ jumrank(){
this.$router.push('/user/ranking'); this.$router.push('/user/ranking');

View File

@@ -99,12 +99,12 @@
<span><a href="/resource/index.html" target="_blank" style="color:#303133;">旧版管理员界面</a></span> <span><a href="/resource/index.html" target="_blank" style="color:#303133;">旧版管理员界面</a></span>
</template> </template>
</el-menu-item> </el-menu-item>
<!-- <el-menu-item v-show="curIdentity == 3"> <el-menu-item v-show="curIdentity == 3 && isTest">
<template slot="title"> <template slot="title">
<svg-icon icon-class="administrator" style="font-size:17px"></svg-icon> <svg-icon icon-class="administrator" style="font-size:17px"></svg-icon>
<span><a href="/manage/learningpath" target="_blank" style="color:#303133;">新版管理员界面</a></span> <span><a href="/manage/learningpath" target="_blank" style="color:#303133;">新版管理员界面</a></span>
</template> </template>
</el-menu-item> --> </el-menu-item>
<el-menu-item v-show="curIdentity == 3"> <el-menu-item v-show="curIdentity == 3">
<template slot="title"> <template slot="title">
<svg-icon icon-class="management" style="font-size:16px"></svg-icon> <svg-icon icon-class="management" style="font-size:16px"></svg-icon>
@@ -252,9 +252,12 @@
</el-menu-item> </el-menu-item>
<el-menu-item index="/exam/mytask"> <el-menu-item index="/exam/mytask">
<!-- <i class="el-icon-menu"></i> --> <!-- <i class="el-icon-menu"></i> -->
<!-- <span slot="title" class="textl">自主学习</span> -->
<span slot="title" class="textl">我的考试</span> <span slot="title" class="textl">我的考试</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="/uc/study/path" v-show="isTest">
<!-- <i class="el-icon-menu"></i> -->
<span slot="title" class="textl">学习路径图</span>
</el-menu-item>
<!-- <el-menu-item index="/uc/study/history"> --> <!-- <el-menu-item index="/uc/study/history"> -->
<!-- <i class="el-icon-menu"></i> --> <!-- <i class="el-icon-menu"></i> -->
<!-- <span slot="title" class="textl">历史记录</span> <!-- <span slot="title" class="textl">历史记录</span>
@@ -372,13 +375,14 @@ import { mapGetters } from 'vuex';
import apiCourse from '../../api/modules/course.js'; import apiCourse from '../../api/modules/course.js';
import apicourseStudy from "../../api/modules/courseStudy.js" import apicourseStudy from "../../api/modules/courseStudy.js"
import courseImage from "@/components/Course/courseImage.vue" import courseImage from "@/components/Course/courseImage.vue"
import testUser from '@/utils/testUsers.js'
export default { export default {
name: 'UcMenu', name: 'UcMenu',
components: { components: {
courseImage, courseImage,
}, },
computed: { computed: {
...mapGetters(['curIdentity', 'messagesBeReviewed', 'studyTaskCount']), ...mapGetters(['curIdentity', 'messagesBeReviewed', 'studyTaskCount','userInfo']),
activeMenu() { activeMenu() {
const route = this.$route; const route = this.$route;
const { meta, path } = route; const { meta, path } = route;
@@ -393,6 +397,7 @@ export default {
}, },
data() { data() {
return { return {
isTest:false,
badge: 0, badge: 0,
isCollapse: false, isCollapse: false,
lastStudy:{}, lastStudy:{},
@@ -404,6 +409,12 @@ export default {
this.$store.dispatch('refrashStudyTaskCount'); this.$store.dispatch('refrashStudyTaskCount');
this.getLastStudy(); this.getLastStudy();
}, },
mounted() {
console.log(this.userInfo.loginName,'this.userInfo.loginName')
if(testUser.isTest(this.userInfo.loginName)){
this.isTest=true;
}
},
methods: { methods: {
toCourseDetail(item){ toCourseDetail(item){
if(isNaN(item.courseType)){ if(isNaN(item.courseType)){

View File

@@ -66,7 +66,8 @@ export const pages=[
{title:'学习',path:'/uc/study',hidden:false,children:[ {title:'学习',path:'/uc/study',hidden:false,children:[
{title:'学习任务',path:'task',component:'study/TaskList',hidden:false}, {title:'学习任务',path:'task',component:'study/TaskList',hidden:false},
{title:'正在学习',path:'courses',component:'study/Courses',hidden:false}, {title:'正在学习',path:'courses',component:'study/Courses',hidden:false},
{title:'历史记录',path:'history',component:'study/FinishCourses',hidden:false} {title:'历史记录',path:'history',component:'study/FinishCourses',hidden:false},
{title:'学习路径图',path:'path',component:'study/StudyPath',hidden:false}
]}, ]},
{title:'个人中心',path:'/uc',hidden:false,children:[ {title:'个人中心',path:'/uc',hidden:false,children:[
{title:'首页',path:'index',component:'StudyIndex',hidden:false} {title:'首页',path:'index',component:'StudyIndex',hidden:false}
@@ -88,7 +89,8 @@ export const pages=[
{title:'我的U币',path:'ucurrency',component:'ucurrency/Index',hidden:true}, {title:'我的U币',path:'ucurrency',component:'ucurrency/Index',hidden:true},
{title:'我的勋章',path:'medal',component:'medal/Index',hidden:true}, {title:'我的勋章',path:'medal',component:'medal/Index',hidden:true},
{title:'勋章规则',path:'urules',component:'medal/urules',hidden:true}, {title:'勋章规则',path:'urules',component:'medal/urules',hidden:true},
{title:'排行榜',path:'ranking',component:'user/ranking',hidden:true} {title:'排行榜',path:'ranking',component:'user/ranking',hidden:true},
]}, ]},
{title:'消息中心',path:'/message/center',hidden:false,children:[ {title:'消息中心',path:'/message/center',hidden:false,children:[
{title:'消息中心',path:'index',component:'portal/user/Message',hidden:false} {title:'消息中心',path:'index',component:'portal/user/Message',hidden:false}

View File

@@ -1,11 +1,17 @@
/**测试人员名单*/ /**测试人员名单*/
const userCodes=[ const userCodes=[
'00004409' '12345601',
'12345603',
'00004409',
'boeutest',
'10181457'
] ]
const userCodesPro=[ const userCodesPro=[
'00004409' '00004409',
'boeutest',
'10181457'
] ]
/**是否是测试人员*/ /**是否是测试人员*/
@@ -13,7 +19,7 @@ const isTest=function(code){
var testUser=false; var testUser=false;
var mode=process.env.NODE_ENV; var mode=process.env.NODE_ENV;
if(mode=='testing'){ if(mode=='testing' || mode=='development'){
userCodes.some(item=>{ userCodes.some(item=>{
if(item===code){ if(item===code){
testUser=true; testUser=true;

View File

@@ -0,0 +1,25 @@
<template>
<!--学习路径图-->
<div class="box">
<iframe id="studyPathFrame" src="/fe-student/learnpath" style="width: 100%;height: 100%;" frameborder="0"></iframe>
</div>
</template>
<script>
export default{
mounted() {
const oIframe = document.getElementById('studyPathFrame');
//const deviceWidth = document.documentElement.clientWidth;
const deviceHeight = document.documentElement.clientHeight;
//oIframe.style.width = (Number(deviceWidth)-220) + 'px'; //数字是页面布局宽度差值
//oIframe.style.height = (Number(deviceHeight)-300) + 'px'; //数字是页面布局高度差
}
}
</script>
<style lang="scss">
.box{
// width: 100%;
height: 100%;
}
</style>