|
|
@@ -8,7 +8,10 @@
|
|
|
<div class="top">
|
|
|
<div class="UserInfo" style="flex: 1;">
|
|
|
<div class="sInfo">
|
|
|
- <div class="userName">{{ studentInfo.name }}</div>
|
|
|
+ <van-dropdown-menu>
|
|
|
+ <van-dropdown-item @change="handleUpdateStudent" v-model="studentInfo.userid" :options="stuDetailList" />
|
|
|
+ </van-dropdown-menu>
|
|
|
+ <!-- <div class="userName">{{ studentInfo.userid }}</div> -->
|
|
|
</div>
|
|
|
<div class="cla">{{ studentInfo.cname }}</div>
|
|
|
<!-- <div class="shade"></div> -->
|
|
|
@@ -168,7 +171,7 @@ export default {
|
|
|
|
|
|
termId: '',
|
|
|
|
|
|
- activeItem: null,
|
|
|
+ // activeItem: null,
|
|
|
// 这个是本学期总条数,单独写一个是因为他不因为观察记录的选择而改变
|
|
|
conList: [],
|
|
|
// 筛选项
|
|
|
@@ -181,8 +184,10 @@ export default {
|
|
|
// 请求筛选条件
|
|
|
fil: [],
|
|
|
|
|
|
- // 班级学生列表
|
|
|
+ // 班级学生列表,左右切换用
|
|
|
stuList: [],
|
|
|
+ stuDetailList: [],
|
|
|
+
|
|
|
// 学生id
|
|
|
stuId: '',
|
|
|
classId: '',
|
|
|
@@ -216,7 +221,7 @@ export default {
|
|
|
|
|
|
selectStudentDetail(data).then(res => {
|
|
|
this.studentInfo = res[0][0]
|
|
|
- // console.log('获取学生信息', this.studentInfo)
|
|
|
+ console.log('获取学生信息', this.studentInfo)
|
|
|
})
|
|
|
|
|
|
// 获取所有学生记录总条数
|
|
|
@@ -246,12 +251,12 @@ export default {
|
|
|
// console.log('获取筛选项22222222', data3)
|
|
|
selectSTEType(data3).then(res => {
|
|
|
// this.filtrate = res[0]
|
|
|
- var ftype = res[0] //公共父级分类
|
|
|
- var stype = res[1] //公共子级分类
|
|
|
- var sctype = res[2] //该学校子级分类
|
|
|
- var fctype = res[3] //该学校父级分类
|
|
|
- var fotype = res[4] //组织父级分类
|
|
|
- var sotype = res[5] //组织子级分类
|
|
|
+ var ftype = res[0] // 公共父级分类
|
|
|
+ var stype = res[1] // 公共子级分类
|
|
|
+ var sctype = res[2] // 该学校子级分类
|
|
|
+ var fctype = res[3] // 该学校父级分类
|
|
|
+ var fotype = res[4] // 组织父级分类
|
|
|
+ var sotype = res[5] // 组织子级分类
|
|
|
var allfType = []
|
|
|
var allsType = []
|
|
|
if (fotype.length == 0 && sotype.length == 0) {
|
|
|
@@ -304,6 +309,13 @@ export default {
|
|
|
res[0].forEach(e => {
|
|
|
this.stuList.push(e.id)
|
|
|
})
|
|
|
+ console.log('学生列表', res[0])
|
|
|
+ res[0].forEach(e => {
|
|
|
+ let a = { value: '', text: '' }
|
|
|
+ a.value = e.id
|
|
|
+ a.text = e.name
|
|
|
+ this.stuDetailList.push(a)
|
|
|
+ })
|
|
|
// console.log('获取班学生列表', this.stuList)
|
|
|
// 查询学生在数组中的位置
|
|
|
this.num = this.stuList.indexOf(this.stuId)
|
|
|
@@ -338,7 +350,7 @@ export default {
|
|
|
upStu() {
|
|
|
this.filtrateData = ''
|
|
|
// 判断学生在数组中的位置,获取班学生列表有初始值
|
|
|
- this.activeItem = null
|
|
|
+ // this.activeItem = null
|
|
|
// 刷新学期
|
|
|
this.termData.splice(0, 1, this.termId)
|
|
|
|
|
|
@@ -359,7 +371,7 @@ export default {
|
|
|
nextStu() {
|
|
|
this.filtrateData = ''
|
|
|
|
|
|
- this.activeItem = null
|
|
|
+ // this.activeItem = null
|
|
|
// 刷新学期
|
|
|
this.termData.splice(0, 1, this.termId)
|
|
|
|
|
|
@@ -410,32 +422,32 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 筛选按钮
|
|
|
- addFil(e, index) {
|
|
|
- // 同一个点击第二次时取消选择
|
|
|
- if (this.activeItem === index) {
|
|
|
- this.activeItem = null
|
|
|
- e = ''
|
|
|
- } else {
|
|
|
- this.activeItem = index
|
|
|
- }
|
|
|
+ // addFil(e, index) {
|
|
|
+ // // 同一个点击第二次时取消选择
|
|
|
+ // if (this.activeItem === index) {
|
|
|
+ // this.activeItem = null
|
|
|
+ // e = ''
|
|
|
+ // } else {
|
|
|
+ // this.activeItem = index
|
|
|
+ // }
|
|
|
|
|
|
- const data4 = {
|
|
|
- uid: this.stuId,
|
|
|
- trm: this.termData[0],
|
|
|
- txt: e
|
|
|
- }
|
|
|
- // console.log(data4)
|
|
|
- selectRecord(data4).then(res => {
|
|
|
- // console.log('获取所有学生记录', res)
|
|
|
- this.TermRecord = res[0]
|
|
|
- })
|
|
|
- },
|
|
|
+ // const data4 = {
|
|
|
+ // uid: this.stuId,
|
|
|
+ // trm: this.termData[0],
|
|
|
+ // txt: e
|
|
|
+ // }
|
|
|
+ // // console.log(data4)
|
|
|
+ // selectRecord(data4).then(res => {
|
|
|
+ // // console.log('获取所有学生记录', res)
|
|
|
+ // this.TermRecord = res[0]
|
|
|
+ // })
|
|
|
+ // },
|
|
|
// 父组件调用子组件方法,选择学期后关闭select框
|
|
|
fuClick1() {
|
|
|
this.isSelectShow = false
|
|
|
- this.selectCordS()
|
|
|
+ // this.selectCordS()
|
|
|
this.$refs.claSel.close()
|
|
|
- this.$refs.weiSel.close()
|
|
|
+ // this.$refs.weiSel.close()
|
|
|
},
|
|
|
|
|
|
// 子组件调用父组件方法显示遮罩层
|
|
|
@@ -450,6 +462,29 @@ export default {
|
|
|
// 获取学期记录总条数
|
|
|
this.selectCordS()
|
|
|
},
|
|
|
+ handleUpdateStudent() {
|
|
|
+ console.log('切换学生')
|
|
|
+ this.filtrateData = ''
|
|
|
+
|
|
|
+ // this.activeItem = null
|
|
|
+ // 刷新学期
|
|
|
+ this.termData.splice(0, 1, this.termId)
|
|
|
+
|
|
|
+ // this.num = this.num + 1
|
|
|
+ // if (this.num <= this.stuList.length - 1) {
|
|
|
+ this.stuId = this.studentInfo.userid
|
|
|
+ // console.log(this.stuId)
|
|
|
+ localStorage.setItem('userId', this.studentInfo.userid)
|
|
|
+
|
|
|
+ this.getTermRecord()
|
|
|
+
|
|
|
+ selectStudentDetail({ uid: this.stuId }).then(res => {
|
|
|
+ this.studentInfo = res[0][0]
|
|
|
+ // console.log(this.studentInfo)
|
|
|
+ })
|
|
|
+ // }
|
|
|
+ this.selectCordS()
|
|
|
+ },
|
|
|
// 获取所有学生记录
|
|
|
getTermRecord() {
|
|
|
const data4 = {
|
|
|
@@ -558,6 +593,8 @@ export default {
|
|
|
/deep/.van-dropdown-menu__bar {
|
|
|
box-shadow: none;
|
|
|
padding-right: 20px;
|
|
|
+ background: none;
|
|
|
+ height: 1rem;
|
|
|
// margin-left: 30px !important;
|
|
|
}
|
|
|
|
|
|
@@ -567,13 +604,27 @@ export default {
|
|
|
|
|
|
/deep/ .van-ellipsis {
|
|
|
font-size: 14px;
|
|
|
+ color: black;
|
|
|
}
|
|
|
|
|
|
/deep/ .van-cell__title,
|
|
|
.van-cell__value {
|
|
|
font-weight: normal;
|
|
|
}
|
|
|
-
|
|
|
+// .van-ellipsis {
|
|
|
+// }
|
|
|
+/deep/ .van-dropdown-item__option--active .van-dropdown-item__icon {
|
|
|
+ color: #3b84fc;
|
|
|
+}
|
|
|
+/deep/ .van-dropdown-item__option--active {
|
|
|
+ color: #3b84fc;
|
|
|
+}
|
|
|
+/deep/ .van-dropdown-menu__title {
|
|
|
+ padding-left: 0;
|
|
|
+}
|
|
|
+/deep/ .van-dropdown-menu__title--active {
|
|
|
+ color: #3b84fc;
|
|
|
+}
|
|
|
.goods-card {
|
|
|
margin: 0;
|
|
|
background-color: #fff;
|
|
|
@@ -694,6 +745,10 @@ export default {
|
|
|
justify-content: space-between;
|
|
|
.sInfo {
|
|
|
display: flex;
|
|
|
+ /deep/.van-ellipsis {
|
|
|
+ color: #fff;
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
.userName {
|
|
|
width: 120px;
|
|
|
text-overflow: ellipsis;
|