lrf402788946 5 years ago
parent
commit
e8c4554986
2 changed files with 9 additions and 3 deletions
  1. 1 1
      src/layout/common/writeStu.vue
  2. 8 2
      src/layout/index/mainData.vue

+ 1 - 1
src/layout/common/writeStu.vue

@@ -14,7 +14,7 @@
           <van-field v-model="form.mobile" name="手机号" label="手机号" placeholder="手机号" :rules="[{ required: true, message: '请填写手机号' }]" />
           <div style="margin: 16px;">
             <van-button round block type="info" native-type="submit">
-              
+              
             </van-button>
           </div>
         </van-form>

+ 8 - 2
src/layout/index/mainData.vue

@@ -19,7 +19,10 @@
             </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: { teaid: lesson.teaid, lessonid: lesson._id } })"
+                <el-button
+                  v-if="user.type != '1'"
+                  type="primary"
+                  @click="$router.push({ path: 'teacherscore/index', query: { teaid: lesson.teaid, lessonid: lesson._id } })"
                   >教师评分</el-button
                 >
               </el-col>
@@ -68,6 +71,7 @@
 </template>
 
 <script>
+import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
 export default {
   name: 'mainData',
   props: {
@@ -78,7 +82,9 @@ export default {
   components: {},
   data: () => ({}),
   created() {},
-  computed: {},
+  computed: {
+    ...mapState(['user']),
+  },
   methods: {
     changeLesson(date) {
       this.$emit('getLesson', date);