|
@@ -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(',')
|