yuanyiming há 1 ano atrás
pai
commit
1df1d7a676

+ 0 - 0
src/assets/images/eva/Frame (3).png → src/assets/images/eva/lefttt.png


+ 0 - 0
src/assets/images/eva/Frame (2).png → src/assets/images/eva/rightttt.png


+ 6 - 5
src/views/eva/index.vue

@@ -99,7 +99,7 @@ export default {
       // e学生id,i班级id
       // return console.log(e, i)
       localStorage.setItem('userId', e)
-      this.$router.push(`/studentDetail?cid=${i.id}&cName=${i.name}`)
+      this.$router.push(`/studentDetail?cid=${i.id}`)
       // this.$router.push('/studentDetail')
     },
     // 搜索按钮跳转详情页
@@ -145,7 +145,7 @@ export default {
   background: #4a8efc;
 }
 /deep/ .van-tab__pane {
-  min-height: 300px;
+  height: calc(100vh - 150px);
 }
 .searchPage {
   width: 100%;
@@ -161,20 +161,21 @@ export default {
   // height: 54px;
 }
 .students {
-  width: 85%;
+  width: 95%;
   display: flex;
   // justify-content: space-between;
   flex-wrap: wrap;
   margin: 10px;
   .stuBlock {
+    min-width: 100px;
     margin-top: 10px;
     margin-right: 15px;
     display: flex;
     box-sizing: border-box;
-    padding: 4px 18px;
+    padding: 4px 5px;
     justify-content: center;
     align-items: center;
-    border-radius: 8px;
+    border-radius: 4px;
     background: #f6fafb;
     color: rgba(0, 0, 0, 0.9);
     font-family: Microsoft YaHei;

+ 19 - 19
src/views/eva/searchStudentEva.vue

@@ -233,13 +233,15 @@ export default {
         }
         console.log('获取班学生列表', data2)
         selectManyClassStudent(data2).then(res => {
-          res[0].forEach(e => {
-            if (e.id === this.$route.query.uid) {
-              this.stuName = e
-            } else {
-              this.studentList.push(e)
-            }
-          })
+          // res[0].forEach(e => {
+          //   if (e.id === this.$route.query.uid) {
+          //     this.stuName = e
+          //   } else {
+          //     this.studentList.push(e)
+          //   }
+          // })
+          this.studentList = res[0]
+
           console.log('this.studentList', this.studentList)
         })
       })
@@ -336,11 +338,13 @@ export default {
             type: 'success'
           })
           setTimeout(() => {
-            if (this.$route.query.ser || 0) {
-              this.$router.replace(`/searchstuDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
-            } else {
-              this.$router.replace(`/studentDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
-            }
+            this.$router.replace('/searchstuDetail')
+
+            // if (this.$route.query.ser || 0) {
+            //   this.$router.replace(`/searchstuDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
+            // } else {
+            //   this.$router.replace(`/searchstuDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
+            // }
           }, 1000)
         }
       })
@@ -370,11 +374,7 @@ export default {
             type: 'success'
           })
           setTimeout(() => {
-            if (this.$route.query.ser || 0) {
-              this.$router.replace(`/searchstuDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
-            } else {
-              this.$router.replace(`/studentDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
-            }
+            this.$router.replace('/searchstuDetail')
           }, 1000)
         }
       })
@@ -388,7 +388,7 @@ export default {
       selectRecordDetail(data).then(res => {
         console.log('获取单个学生记录详情', res[0][0])
         const allData = res[0][0]
-        if (allData.recordImg !== '' && !allData.contact) {
+        if (allData.contact !== '') {
           this.selectSData = allData.contact.split(',')
         }
         this.selectWData = allData.type.split(',')
@@ -397,7 +397,7 @@ export default {
         this.recordCon = allData.recordCon
         this.observeCon = allData.recordTit
         this.recordCon = allData.recordContent
-        if (allData.recordImg !== '' && !allData.recordImg) {
+        if (allData.recordImg !== '') {
           this.imgList = allData.recordImg.split(',')
         }
         this.termData = [allData.term]

+ 21 - 15
src/views/eva/searchstuDetail.vue

@@ -8,8 +8,9 @@
       <div class="UserInfo" style="flex: 1;">
         <div class="sInfo">
           <div class="userName">{{ studentInfo.name }}</div>
-          <div class="cla">{{ studentInfo.cname }}</div>
         </div>
+        <div class="cla">{{ studentInfo.cname }}</div>
+
         <selectStyle
           ref="claSel"
           @update-search="handleUpdateSearch"
@@ -21,12 +22,12 @@
         <div class="dataNum">本学期共计{{ TermRecord.length }} 条记录</div>
       </div>
 
-      <div class="rig">
+      <!-- <div class="rig">
         <div class="topBtnS">
           <div></div>
           <div></div>
         </div>
-      </div>
+      </div> -->
     </div>
     <!-- 顶部学生信息结束 -->
 
@@ -166,6 +167,7 @@ export default {
         uid: this.stuId,
         trm: this.termData[0]
       }
+      console.log(data)
       selectStudentDetail(data).then(res => {
         this.studentInfo = res[0][0]
         console.log('获取学生信息', this.studentInfo)
@@ -222,6 +224,7 @@ export default {
             type: 'success'
           })
           this.isShowMask = false
+          this.getTermRecord()
 
           setTimeout(() => {
             this.getData()
@@ -283,16 +286,20 @@ export default {
         console.log('获取所有学生记录', res[0])
         this.conList = res[0]
       })
+      this.getTermRecord()
     },
     // 添加记录按钮跳转
     addRecord() {
-      this.$router.push(`/searchStudentEva?shareShow=${0}&cid=${this.classInfo.cid}&CName=${this.classInfo.cName}`)
+      this.$router.push(`/searchStudentEva?shareShow=${0}&isSea=${0}`)
+
+      // this.$router.push(`/searchStudentEva?shareShow=${0}&cid=${this.classInfo.cid}&CName=${this.classInfo.cName}`)
     },
     // 已经写过的记录卡片点击跳转
     recordContinue(e) {
-      this.$router.push(
-        `/searchStudentEva?shareShow=${1}&cid=${this.classInfo.cid}&CName=${this.classInfo.cName}&rid=${e}`
-      )
+      this.$router.push(`/searchStudentEva?shareShow=${1}&rid=${e}&isSea=${0}`)
+      // this.$router.push(
+      //   `/searchStudentEva?shareShow=${1}&cid=${this.classInfo.cid}&CName=${this.classInfo.cName}&rid=${e}`
+      // )
     }
   },
   created() {
@@ -420,16 +427,15 @@ export default {
           text-align: left;
           font-family: PingFangSC-regular;
         }
-        .cla {
-          height: 20px;
-          line-height: 30px;
-          font-size: 10px;
-          color: #ffffff;
-        }
       }
-
+      .cla {
+        height: 20px;
+        line-height: 30px;
+        font-size: 10px;
+        color: #ffffff;
+      }
       .dataNum {
-        width: 150px;
+        // width: 150px;
         height: 20px;
         line-height: 20px;
         color: #fff;

+ 21 - 20
src/views/eva/studentDetail.vue

@@ -8,8 +8,9 @@
       <div class="UserInfo" style="flex: 1;">
         <div class="sInfo">
           <div class="userName">{{ studentInfo.name }}</div>
-          <div class="cla">{{ $route.query.cName }}</div>
         </div>
+        <div class="cla">{{ studentInfo.cname }}</div>
+
         <selectStyle
           ref="claSel"
           @update-search="handleUpdateSearch"
@@ -24,14 +25,14 @@
       <div class="rig">
         <div class="topBtnS">
           <div>
-            <img class="img" v-if="num" @click="upStu" src="../../assets/images/eva/Frame (3).png" alt="" />
+            <img class="img" v-if="num" @click="upStu" src="../../assets/images/eva/lefttt.png" alt="" />
           </div>
           <div>
             <img
               class="img"
               v-if="num != stuList.length - 1"
               @click="nextStu"
-              src="../../assets/images/eva/Frame (2).png"
+              src="../../assets/images/eva/rightttt.png"
               alt=""
             />
           </div>
@@ -183,6 +184,7 @@ export default {
         // 查询学生在数组中的位置
         this.num = this.stuList.indexOf(this.stuId)
       })
+
       // 获取学生信息
       const data = {
         uid: this.stuId
@@ -300,6 +302,7 @@ export default {
             type: 'success'
           })
           this.isShowMask = false
+          this.getTermRecord()
 
           setTimeout(() => {
             this.getData()
@@ -365,17 +368,11 @@ export default {
     },
     // 添加记录按钮跳转
     addRecord() {
-      this.$router.push(
-        `/studentEvaluate?shareShow=${0}&uid=${this.stuId}&cid=${this.classInfo.cid}&CName=${this.classInfo.cName}`
-      )
+      this.$router.push(`/studentEvaluate?shareShow=${0}&cid=${this.$route.query.cid}`)
     },
     // 已经写过的记录卡片点击跳转
     recordContinue(e) {
-      this.$router.push(
-        `/studentEvaluate?shareShow=${1}&uid=${this.stuId}&cid=${this.classInfo.cid}&CName=${
-          this.classInfo.cName
-        }&rid=${e}`
-      )
+      this.$router.push(`/studentEvaluate?shareShow=${1}&rid=${e}&cid=${this.$route.query.cid}`)
     }
   },
   created() {
@@ -384,7 +381,7 @@ export default {
     // console.log('localStorage', localStorage.getItem('userId'))
     this.selTerm()
 
-    // console.log(this.$route.query)
+    console.log('this.$route.query', this.$route.query)
     // console.log('state', this.$store.state)
     // console.log(this.$route.query.cid)
   }
@@ -509,16 +506,20 @@ export default {
           text-align: left;
           font-family: PingFangSC-regular;
         }
-        .cla {
-          height: 20px;
-          line-height: 30px;
-          font-size: 10px;
-          color: #ffffff;
-        }
       }
-
+      .cla {
+        overflow: hidden;
+        width: 100%;
+        // overflow-wrap: break-word;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+        height: 20px;
+        line-height: 30px;
+        font-size: 10px;
+        color: #ffffff;
+      }
       .dataNum {
-        width: 150px;
+        // width: 150px;
         height: 20px;
         line-height: 20px;
         color: #fff;

+ 63 - 27
src/views/eva/studentEvaluate.vue

@@ -14,11 +14,11 @@
     <div class="bigBlock" style="">
       <div class="claName">
         <div class="tit">学生</div>
-        <div class="studentName">{{ stuName.name }}</div>
+        <div class="studentName">{{ studentInfo.name }}</div>
       </div>
       <div class="claName">
         <div class="tit">班级</div>
-        <div class="studentName">{{ $route.query.CName }}</div>
+        <div class="studentName">{{ studentInfo.cname }}</div>
       </div>
 
       <div class="claName">
@@ -152,11 +152,13 @@ import imageComponent from './components/ImageComponent.vue'
 import pop from './components/pop.vue'
 
 import { insertRecord } from '@/api/eva'
-import { selectClassStudent } from '@/api/eva'
+// import { selectClassStudent } from '@/api/eva'
 import { selectVeiDoo } from '@/api/eva'
 import { selectRecordDetail } from '@/api/eva'
 import { updateRecordData } from '@/api/eva'
 import { selectTerm } from '@/api/eva'
+import { selectStudentDetail } from '@/api/eva'
+import { selectManyClassStudent } from '@/api/eva'
 
 import '@/utils/aws-sdk-2.235.1.min.js'
 
@@ -171,6 +173,8 @@ export default {
 
   data() {
     return {
+      studentInfo: {},
+
       // 学生信息
       stuName: {},
       // 关联选项
@@ -215,6 +219,34 @@ export default {
 
   methods: {
     getData() {
+      // 获取学生信息
+      const stuData = {
+        uid: localStorage.getItem('userId')
+      }
+
+      selectStudentDetail(stuData).then(res => {
+        this.studentInfo = res[0][0]
+        console.log('获取学生信息', this.studentInfo)
+
+        // 获取班学生列表
+        const data2 = {
+          cid: this.studentInfo.classid,
+          uid: localStorage.getItem('userId')
+        }
+        console.log('获取班学生列表', data2)
+        selectManyClassStudent(data2).then(res => {
+          // res[0].forEach(e => {
+          //   if (e.id === this.$route.query.uid) {
+          //     this.stuName = e
+          //   } else {
+          //     this.studentList.push(e)
+          //   }
+          // })
+          this.studentList = res[0]
+
+          console.log('this.studentList', this.studentList)
+        })
+      })
       // 获取纬度筛选框
       selectVeiDoo().then(res => {
         this.weiList = res[0]
@@ -234,19 +266,19 @@ export default {
       })
 
       // 获取班学生列表
-      const data2 = {
-        cid: this.$route.query.cid
-      }
-      selectClassStudent(data2).then(res => {
-        res[0].forEach(e => {
-          if (e.id === this.$route.query.uid) {
-            this.stuName = e
-          } else {
-            this.studentList.push(e)
-          }
-        })
-        console.log('this.studentList', this.studentList)
-      })
+      // const data2 = {
+      //   cid: this.$route.query.cid
+      // }
+      // selectClassStudent(data2).then(res => {
+      //   res[0].forEach(e => {
+      //     if (e.id === this.$route.query.uid) {
+      //       this.stuName = e
+      //     } else {
+      //       this.studentList.push(e)
+      //     }
+      //   })
+      //   console.log('this.studentList', this.studentList)
+      // })
     },
     // 调用子元素selects中的方法隐藏选项列表
     col() {
@@ -318,11 +350,13 @@ export default {
             type: 'success'
           })
           setTimeout(() => {
-            if (this.$route.query.ser || 0) {
-              this.$router.replace(`/searchstuDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
-            } else {
-              this.$router.replace(`/studentDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
-            }
+            this.$router.replace(`/studentDetail?cid=${this.$route.query.cid}`)
+
+            // if (this.$route.query.ser || 0) {
+            //   this.$router.replace(`/searchstuDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
+            // } else {
+            //   this.$router.replace(`/studentDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
+            // }
           }, 1000)
         }
       })
@@ -353,11 +387,13 @@ export default {
             type: 'success'
           })
           setTimeout(() => {
-            if (this.$route.query.ser || 0) {
-              this.$router.replace(`/searchstuDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
-            } else {
-              this.$router.replace(`/studentDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
-            }
+            this.$router.replace(`/studentDetail?cid=${this.$route.query.cid}`)
+
+            // if (this.$route.query.ser || 0) {
+            //   this.$router.replace(`/studentDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
+            // } else {
+            //   this.$router.replace(`/studentDetail?cid=${this.$route.query.cid}&cName=${this.$route.query.CName}`)
+            // }
           }, 1000)
         }
       })
@@ -371,7 +407,7 @@ export default {
       selectRecordDetail(data).then(res => {
         console.log('获取单个学生记录详情', res[0][0])
         const allData = res[0][0]
-        if (allData.recordImg !== '' && !allData.contact) {
+        if (allData.contact !== '') {
           this.selectSData = allData.contact.split(',')
         }
         this.selectWData = allData.type.split(',')