Pārlūkot izejas kodu

Merge branch 'master' of http://git.cc-lotus.info/new_train/train-student

wuhongyuq 5 gadi atpakaļ
vecāks
revīzija
e9175ed8cd

+ 3 - 1
src/layout/class/achieveList/peaceAchieve.vue

@@ -6,8 +6,10 @@
           <el-col :span="12" class="name">
             {{ item.name }}
           </el-col>
-          <el-col :span="12" class="score">
+          <el-col :span="8" class="score">
             <span>分数:{{ item.selfscore }}分</span>
+          </el-col>
+          <el-col :span="4" class="score">
             <el-button type="primary" size="mini" @click="showBtn(item.id)" round>选择</el-button>
           </el-col>
         </el-col>

+ 3 - 2
src/layout/class/groupList.vue

@@ -12,14 +12,14 @@
               </el-col>
               <el-col :span="1"></el-col>
               <el-col :span="4">
-                <el-button round type="danger" size="mini" @click="deleteGroup(item.id)">删除</el-button>
+                <el-button round type="danger" plain size="mini" @click="deleteGroup(item.id)">删除</el-button>
               </el-col>
               <el-col :span="1"></el-col>
               <el-col :span="4">
                 <el-button round type="success" size="mini" v-if="stuIdAndGroupId.groupId === '' && item.students.length <= 10" @click="joinGroup(item.id)"
                   >加入</el-button
                 >
-                <el-button round type="danger" size="mini" v-if="stuIdAndGroupId.groupId === item.id" @click="exitGroup(item.id)">退出</el-button>
+                <el-button round type="danger" size="mini" v-if="stuIdAndGroupId.groupId === item.id" plain @click="exitGroup(item.id)">退出</el-button>
               </el-col>
             </template>
             <el-col :span="24" class="list" v-for="(itemStrudent, indexStudent) in item.students" :key="indexStudent">
@@ -48,6 +48,7 @@ export default {
   data: () => ({}),
   created() {},
   computed: {
+    ...mapState(['user']),
     userid() {
       return this.user.userid;
     },

+ 7 - 0
src/layout/class/headStuList.vue

@@ -1,5 +1,12 @@
 <template>
   <div id="headStuList">
+    <el-row type="flex" justify="center" style="padding:10px 0">
+      <el-col :span="6">
+        <el-button type="primary" plain size="mini" @click.native="$router.push({ path: '/class/achieve', query: { classid: $attrs.classid } })">
+          查看平时成绩
+        </el-button>
+      </el-col>
+    </el-row>
     <el-row>
       <el-col :span="24" class="info">
         <el-col :span="6" class="list" v-for="(item, index) in headStuList" :key="index" @click.native="clickAssign(item.id)">

+ 8 - 1
src/layout/class/nameList/stuNameList.vue

@@ -1,8 +1,15 @@
 <template>
   <div id="stuNameList">
     <el-row>
+      <el-row type="flex" justify="center" style="padding:10px 0">
+        <el-col :span="6">
+          <el-button type="primary" plain size="mini" @click.native="$router.push({ path: '/class/achieve', query: { classid: $attrs.classid } })">
+            查看平时成绩
+          </el-button>
+        </el-col>
+      </el-row>
       <el-col :span="24" class="info">
-        <el-col :span="6" class="list" v-for="(item, index) in stuNameList" :key="index" @click.native="$router.push({ path: '/class/achieve' })">
+        <el-col :span="6" class="list" v-for="(item, index) in stuNameList" :key="index">
           <p class="name">{{ item.name }}</p>
           <p class="job" v-if="item.job">{{ item.job }}<i class="el-icon-circle-check"></i></p>
         </el-col>

+ 13 - 6
src/layout/user/stuleaveList.vue

@@ -16,13 +16,20 @@
       <div class="wrapper" @click="clickDown">
         <el-col :span="24" class="leaveInfo">
           <p class="jilu">请假记录</p>
-          <el-col :span="24" class="leavelist" v-for="(item, index) in leaveInfo" :key="index">
-            <el-col :span="14" class="date">
-              <p>开始时间:{{ item.starttime }}</p>
-              <p>结束时间:{{ item.endtime }}</p>
+          <template v-if="leaveInfo.length > 0">
+            <el-col :span="24" class="leavelist" v-for="(item, index) in leaveInfo" :key="index">
+              <el-col :span="14" class="date">
+                <p>开始时间:{{ item.starttime }}</p>
+                <p>结束时间:{{ item.endtime }}</p>
+              </el-col>
+              <el-col :span="10" class="status"> 审核结果:{{ item.status == 0 ? '审核中' : item.status == 1 ? '通过' : '未通过' }} </el-col>
             </el-col>
-            <el-col :span="10" class="status"> 审核结果:{{ item.status == 0 ? '审核中' : item.status == 1 ? '通过' : '未通过' }} </el-col>
-          </el-col>
+          </template>
+          <template>
+            <el-col :span="24" class="leavelist" style="text-align:center">
+              <p>暂无请假记录</p>
+            </el-col>
+          </template>
         </el-col>
       </div>
     </van-overlay>

+ 6 - 1
src/views/class/achieve.vue

@@ -75,6 +75,9 @@ export default {
   },
   computed: {
     ...mapState(['user']),
+    classid() {
+      return this.$route.query.classid;
+    },
   },
   mounted() {
     this.title = this.$route.meta.title;
@@ -94,7 +97,9 @@ export default {
     ...mapSubject({ subjectinfo: 'fetch', subjectlist: 'query' }),
     // 平时成绩学生名单查询+作业成绩学生名单查询
     async search() {
-      let classid = this.user.classid;
+      let classid;
+      if (this.user.type === '1') classid = this.classid;
+      else classid = this.user.classid;
       const res = await this.list({ classid });
       this.$set(this, `peaceAchieveList`, res.data);
     },

+ 1 - 0
src/views/class/classStuList.vue

@@ -15,6 +15,7 @@
             @outForm="outAssignShow"
             @onForm="onAssignShow"
             @handleClose="handleClose"
+            :classid="this.id"
           ></headStuList>
         </el-col>
       </el-col>

+ 1 - 0
src/views/class/index.vue

@@ -22,6 +22,7 @@
               @joinGroup="joinGroup"
               :stuIdAndGroupId="stuIdAndGroupId"
               :noGroupStudentNames="noGroupStudentNames"
+              :classid="this.user.classid"
             ></classList>
             <!-- :groupList="groupList"
               @saveGroup="saveGroup"