Browse Source

更新教师评分

wuhongyuq 5 years ago
parent
commit
e43c9b14b6
3 changed files with 22 additions and 6 deletions
  1. 3 1
      src/layout/index/mainData.vue
  2. 1 0
      src/views/index.vue
  3. 18 5
      src/views/teacherscore/index.vue

+ 3 - 1
src/layout/index/mainData.vue

@@ -14,7 +14,9 @@
             </el-col>
             <el-col :span="6" class="date"
               ><el-col :span="24" class="info">
-                <el-button type="primary" @click="$router.push({ path: 'teacherscore/index', query: { id: item.teaid } })">教师评分</el-button></el-col
+                <el-button type="primary" @click="$router.push({ path: 'teacherscore/index', query: { id: item.teaid, subid: item.lessonid } })"
+                  >教师评分</el-button
+                ></el-col
               >
             </el-col>
           </el-col>

+ 1 - 0
src/views/index.vue

@@ -83,6 +83,7 @@ export default {
         for (const aqq of aff) {
           var aee = aff.filter(item => item.date === '2020-01-04');
           this.$set(this.lessionclassInfo, `lessons`, aee);
+          console.log(aee);
         }
       }
     },

+ 18 - 5
src/views/teacherscore/index.vue

@@ -3,7 +3,8 @@
     <el-row>
       <el-col :span="24" class="style">
         <el-col :span="24" class="top">
-          <topInfo></topInfo>
+          <!-- <topInfo></topInfo> -->
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
           <mainData :teacherinfo="teacherinfo" :form="form" @onsave="onsave"></mainData>
@@ -17,7 +18,7 @@
 </template>
 
 <script>
-import topInfo from '@/layout/teacherscore/topInfo.vue';
+import NavBar from '@/layout/teacherscore/topInfo.vue';
 import footInfo from '@/layout/common/footInfo.vue';
 import mainData from '@/layout/teacherscore/mainData.vue';
 const { mapActions: teacher } = createNamespacedHelpers('teacher');
@@ -28,13 +29,17 @@ export default {
   name: 'index',
   props: {},
   components: {
-    topInfo, //头部导航
+    NavBar, //头部导航
     footInfo, //底部导航
     mainData, //课程安排主体
   },
   data: () => ({
     teacherinfo: {},
     form: {},
+    title: '',
+    isleftarrow: '',
+    transitionName: 'fade',
+    navShow: true,
   }),
   created() {
     this.searchInfo();
@@ -44,8 +49,16 @@ export default {
       return this.$route.query.id;
     },
   },
-  mounted() {},
-  watch: {},
+  mounted() {
+    this.title = this.$route.meta.title;
+    this.isleftarrow = this.$route.meta.isleftarrow;
+  },
+  watch: {
+    $route(to, from) {
+      this.title = to.meta.title;
+      this.isleftarrow = to.meta.isleftarrow;
+    },
+  },
   methods: {
     ...teacher({ columnList: 'query', teacherInfo: 'fetch' }),
     ...mapScore(['fetch', 'create', 'update']),