Răsfoiți Sursa

靶向提升相关更新

dengshaobo 4 zile în urmă
părinte
comite
7597c90c40

+ 1 - 1
public/index.html

@@ -31,7 +31,7 @@
   </script>
   <script src="./math.js"></script>
 
-  <link rel="stylesheet" href="//at.alicdn.com/t/c/font_4939100_wnefpnxejys.css">
+  <link rel="stylesheet" href="//at.alicdn.com/t/c/font_4939100_4d2bva7l2pq.css">
 </head>
 
 <body>

+ 96 - 0
src/components/SideBarItem.vue

@@ -0,0 +1,96 @@
+<template>
+  <el-aside class="side_bar">
+    <div class="nav_menu">
+      <el-menu
+        :default-active="activeMenuName"
+      
+        text-color="#666"
+        :router="true"
+      >
+        <el-menu-item
+          v-for="(item, index) in menuList"
+          :key="index"
+          :index="item.externalLink" class="menu_one_item"
+        >
+          <div class="menu_one_title">
+              <i class="iconfont" :class="item.icon"></i><span>{{ item.menuName }}</span>
+          </div>
+        </el-menu-item>
+      </el-menu>
+    </div>
+  </el-aside>
+</template>
+<script>
+export default {
+  name: "SideBarItem",
+  props: {
+    menuList: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      activeMenuName: "",
+    };
+  },
+  watch: {
+    $route() {
+      this.activeMenu();
+    },
+  },
+  created() {
+    this.activeMenu();
+  },
+  mounted() {
+    this.activeMenu();
+  },
+  methods: {
+    activeMenu() {
+      const route = this.$route;
+      const { path } = route;
+
+      // if(path == '/userInfo'){
+      //   this.activeMenuName = "/userInfo/personInfo";
+      // }else if(path.includes('examMarking')){
+      // console.log("打印当前路由地址path",path);
+      // console.log("打印menuList",this.menuList);
+      if(path=='/examMarking/help/detail')
+      {
+        // console.log("进来了",);
+        this.activeMenuName = '/examMarking/help';
+      }
+      else
+      {
+          this.activeMenuName = path;
+      }
+      // console.log("打印当前选中菜单activeMenuName",this.activeMenuName);
+      // this.activeMenuName = path;
+      // }
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+
+.side_bar {
+    width: 170px !important;
+    border-radius: 10px;
+    position: fixed;
+    background-color: #fff;
+    border-radius: 10px;
+    padding-bottom: 12px;
+  }
+@media screen and (max-width: 1400px) {
+  .side_bar {
+    width: 150px !important;
+    border-radius: 10px;
+    position: fixed;
+    // background-color: #fff;
+    border-radius: 10px;
+    padding-bottom: 2px;
+  }
+}
+
+
+</style>

+ 25 - 0
src/router/index.js

@@ -28,7 +28,32 @@ let constantRoutes = [
         component: () => import("@/views/login/logins.vue"),
         meta: {
             title: "logins",
+        },//工作台登录
+    },
+    //靶向提升
+    {
+        path:'/targetImprove',
+        redirect: "/targetImprove/pracice",
+        component: () => import("@/views/targetImprove/index"),
+        meta: {
+            title: "靶向提升",
         },
+        children: [
+            {
+                path: "pracice",
+                component: () => import("@/views/targetImprove/practice/index.vue"),
+                meta: {
+                    title: "自主练习",
+                },
+            },
+            {
+                path: "consolidate",
+                component: () => import("@/views/targetImprove/practice/index.vue"),
+                meta: {
+                    title: "错题巩固",
+                },
+            },
+        ],
     },
     // 个人中心
     {

+ 127 - 0
src/styles/common.scss

@@ -19,6 +19,133 @@ li {
   }
 }
 
+//页面最高层容器 统一最底层背景色 #F0F4FB
+.container_layout {
+  width: 100%;
+  height: 100%;
+  background-color: #f0f4fb;
+
+  .layout_header {
+    width: 100%;
+    height: 60px;
+  }
+
+  .layout_main {
+    width: 100%;
+    height: calc(100% - 60px);
+  }
+
+
+  //页脚区域
+  .layout_footer {
+    width: 100%;
+    height: 60px;
+  }
+
+
+  //内容区布局
+  .user_main {
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+    display: flex;
+    justify-content: space-between;
+    padding: 20px;
+    box-sizing: border-box;
+
+    .user_main_left {
+      width: 170px;
+      height: 100%;
+      display: flex;
+      justify-content: center;
+    }
+
+    .user_main_right {
+      width: calc(100% - 190px);
+      height: 100%;
+      // background-color: #fff;
+      // padding: 20px;
+      box-sizing: border-box;
+      border-radius: 10px;
+      overflow-y: auto;
+
+      
+
+  
+    }
+  }
+
+  //屏幕小于1400px
+  @media screen and (max-width: 1400px) {
+    .user_main {
+      width: 100%;
+      height: 100%;
+      overflow: hidden;
+      display: flex;
+      justify-content: space-between;
+      padding: 10px;
+      box-sizing: border-box;
+
+      .user_main_left {
+        width: 150px;
+        height: 100%;
+        display: flex;
+        justify-content: center;
+      }
+
+      .user_main_right {
+        width: calc(100% - 160px);
+        height: 100%;
+        background-color: #fff;
+        padding: 10px;
+        box-sizing: border-box;
+        border-radius: 10px;
+        overflow-y: auto;
+      }
+    }
+  }
+
+
+}
+
+
+.page_target
+{
+
+  width: 100%;
+  height: auto;
+  .target_item
+  {
+    width: 100%;
+    height:auto;
+    box-sizing: border-box;
+    background-color: #fff;
+    border-radius: 10px;
+    margin-bottom: 10px;
+    padding: 10px;
+  }
+
+  .target_filter
+  {
+    padding: 5px 10px;
+  }
+
+  .target_module
+  {
+    width: 100%;
+    height:auto;
+    box-sizing: border-box;
+    background-color: #fff;
+    border-radius: 10px;
+    margin-bottom: 20px;
+    padding: 20px;
+  }
+}
+
+
+
+
+
 //页面最高层级  统一最底层背景色 #F0F4FB
 .layout {
   position: relative;

+ 9 - 12
src/views/layout/components/Header.vue

@@ -202,20 +202,17 @@ export default {
 
     //学生端默认 个人中心 和分析报告两个菜单
     this.menuList = [
-      // {
-      //   menuName: "分析报告",
-      //   externalLink: "/studentAnalysisReport/list",
-      //   versions:'8.0'
-      // },
       {
         menuName: "分析报告",
         externalLink: "/jointStudentAnalysisReport/list",
-        // versions:'8.1'
+      },
+      {
+        menuName: "靶向提升",
+        externalLink: "/targetImprove",
       },
       {
         menuName: "个人中心",
         externalLink: "/userInfo",
-        versions:''
       },
     ];
     
@@ -265,13 +262,13 @@ export default {
       const path = this.$route.path;
       sessionStorage.setItem('student_currentPath', path);//当前页面路由
       // 按优先级匹配
-      if (path === '/studentAnalysisReport/list') {
-        sessionStorage.setItem('schoolType', 1);//单校
-        this.activeMenuName = '/studentAnalysisReport/list';
-      } else if(path == '/jointStudentAnalysisReport/list'){
+      if(path == '/jointStudentAnalysisReport/list'){
         sessionStorage.setItem('schoolType', 2);//联校
         this.activeMenuName = '/jointStudentAnalysisReport/list';
-      } else if (path === '/userInfo' || path.startsWith('/userInfo/')) {
+      }else if(path == '/targetImprove' || path.startsWith('/targetImprove/')){
+        this.activeMenuName = '/targetImprove';
+      }
+       else if (path === '/userInfo' || path.startsWith('/userInfo/')) {
         this.activeMenuName = '/userInfo';
       } else {
         // 默认选中分析报告

+ 64 - 0
src/views/targetImprove/components/SideBar.vue

@@ -0,0 +1,64 @@
+<template>
+  <SideBarItem :menuList="menuList" />
+</template>
+<script>
+import SideBarItem from "@/components/SideBarItem.vue";
+import { mapGetters } from "vuex";
+export default {
+  components: {
+    SideBarItem,
+  },
+  computed: {
+    ...mapGetters("user", ["userInfoLogin"]),
+  },
+  data() {
+    return {
+      activeMenuName: "/targetImprove",
+      menuList: [
+        {
+          icon: "icon_nianjihuaxiang",
+          externalLink: "/targetImprove/pracice",
+          menuName: "自主练习",
+        },
+        {
+          icon: "icon_zhidianbuqiang",
+          externalLink: "/targetImprove/consolidate",
+          menuName: "错题巩固",
+        },
+      ],
+      allMenuList:[],//总菜单
+    };
+  },
+  watch: {
+    userInfo: {
+      handler(newValue, oldValue) {
+        console.log(newValue, oldValue);
+
+      },
+      deep: true, // 监听对象的深层变化
+    },
+  },
+  created() {
+    console.log("打印个人中心菜单this.userInfo",this.userInfo);
+  },
+  mounted() {
+
+
+
+
+
+
+    this.activeMenu();
+  },
+  methods: {
+    // activeMenu() {
+    //   const route = this.$route;
+    //   const { path } = route;
+    //   if (path == "/userInfo") {
+    //     this.activeMenuName = "/userInfo/personInfo";
+    //   }
+    // },
+  },
+};
+</script>
+<style lang="scss" scoped></style>

+ 35 - 0
src/views/targetImprove/components/UserMain.vue

@@ -0,0 +1,35 @@
+<template>
+  <div class="user_main">
+    <div class="user_main_left">
+      <SideBar/>
+    </div>
+    <div class="user_main_right">
+      <router-view></router-view>
+    </div>
+  </div>
+</template>
+<script>
+import SideBar from "./SideBar.vue"
+export default{
+  components:{
+    SideBar,
+  },
+  data() {
+    return {
+      mainHeight: 0,
+      
+    };
+  },
+  mounted(){
+      
+  },
+  beforeDestroy() {
+   
+  },
+  methods: {
+  }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 0 - 0
src/views/targetImprove/components/靶向提升公共组件文件夹.txt


+ 9 - 0
src/views/targetImprove/consolidate/index.vue

@@ -0,0 +1,9 @@
+<template>
+  <div class="">
+
+  </div>
+</template>
+<script>
+export default {
+};
+</script>

+ 0 - 0
src/views/targetImprove/consolidate/错题巩固文件.txt


+ 75 - 0
src/views/targetImprove/index.vue

@@ -0,0 +1,75 @@
+<template>
+  <div class="container_layout">
+    <!-- 顶部导航条区域 -->
+    <div class="layout_header">
+      <Header />
+    </div>
+    <!-- 主体区域 -->
+    <div class="layout_main">
+      
+      <UserMain />
+    </div>
+  </div>
+</template>
+<script>
+import UserMain from "./components/UserMain"//主页面
+
+import Header from "../layout/components/Header.vue"//头部
+
+export default {
+  components: {
+    UserMain,
+    FiltersItem,
+    Header
+  },
+  data() {
+    return {
+      userInfo: {},
+      filtersData:[
+        {
+          name:'科目名称',
+          value:'',
+          list:[
+            {
+              label:'语文',
+              value:"",
+            },
+            {
+              label:'数学',
+              value:"",
+            },
+            {
+              label:'英语',
+              value:"",
+            },
+            {
+              label:'物理',
+              value:"",
+            },
+            {
+              label:'化学',
+              value:"",
+            },
+            
+          ],
+        },
+      ]
+    }
+  },
+  computed:{},
+  mounted() {
+    
+     
+  },
+  methods: { 
+    // 筛选组件回调
+    ChangeFilters()
+    {
+
+    },
+  }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 69 - 0
src/views/targetImprove/practice/index.vue

@@ -0,0 +1,69 @@
+<template>
+  <div class="page_target">
+    <div class="target_item target_filter">
+      <FiltersItem :filtersData="filtersData"  @selectItem="ChangeFilters"/>
+    </div>
+    <div class="target_item">
+      选择练习知识点 
+    </div>
+  </div>
+</template>
+<script>
+import FiltersItem from "@/components/FiltersItem_ruoyan.vue"//筛选组件
+export default {
+  components: {
+    FiltersItem,
+  },
+  data() {
+    return {
+      userInfo: {},
+      filtersData:[
+        {
+          name:'科目名称',
+          value:'1',
+          list:[
+            {
+              label:'语文',
+              value:"1",
+            },
+            {
+              label:'数学',
+              value:"2",
+            },
+            {
+              label:'英语',
+              value:"3",
+            },
+            {
+              label:'物理',
+              value:"4",
+            },
+            {
+              label:'化学',
+              value:"5",
+            },
+            
+          ],
+        },
+      ]
+    }
+  },
+  computed:{
+
+  },
+  mounted() 
+  {
+
+  },
+  methods: { 
+    // 筛选组件回调
+    ChangeFilters(e)
+    {
+      this.filtersData[e.index].value = e.value;
+    },
+  }
+};
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 0 - 0
src/views/targetImprove/practice/自主练习.txt


+ 1 - 0
src/views/targetImprove/靶向提升文件夹.txt

@@ -0,0 +1 @@
+靶向提升模块

+ 1 - 1
src/views/userInfo/index.vue

@@ -17,7 +17,7 @@ export default {
 
     Footer,
     Header
-  },
+  }, 
   data() {
     return {
       userInfo: {}