2 次代码提交 0d8c02ba5c ... e8f6b469fb

作者 SHA1 备注 提交日期
  lijie e8f6b469fb Merge branch 'master' of 121.40.237.253:lijie/zhxy-desk 1 年之前
  lijie e07b8aa859 学生标签6 1 年之前
共有 3 个文件被更改,包括 50 次插入32 次删除
  1. 2 1
      pages/login/login.vue
  2. 34 12
      pages/studentRanked/components/mark-score-list.vue
  3. 14 19
      pages/studentRanked/studentRanked.vue

+ 2 - 1
pages/login/login.vue

@@ -19,7 +19,8 @@
 			}
 		},
 		mounted(){
-			this.school_id=this.getUrlParam("school_id")
+			// this.school_id=this.getUrlParam("school_id")
+			this.school_id=1
 			
 			if(!this.school_id){
 				this.school_id=uni.getStorageSync("school_id")

+ 34 - 12
pages/studentRanked/components/mark-score-list.vue

@@ -8,10 +8,6 @@
 					<image :src="item.stuSchool.student_photo" style="width: 40px;height: 40px;border-radius: 20px;">
 					</image>
 				</view>
-				<!-- <view slot="title" class="ui-flex-row ui-flex-align-center">
-                    <u-tag plain size="mini" text="优秀发言"></u-tag>
-                    <text>李杰</text>
-                </view> -->
 
 				<text slot="label" class="txt-muted">{{item.created_at}} </text>
 				<el-tag v-if="item.studentTab.type_text == '好评'" slot="value"
@@ -21,8 +17,8 @@
 			</u-cell>
 
 		</u-cell-group>
-		<view @click="addTab" class="text-center ui-m ui-p" style="width: 100%;cursor: pointer;">
-			加载更多
+		<view  @click="addTab" class="text-center ui-m ui-p" style="width: 100%;cursor: pointer;">
+			{{ showTitle }}
 		</view>
 
 		<uni-popup ref="alertDialog" type="dialog">
@@ -35,14 +31,19 @@
 <script>
 	export default {
 		props: {
-			list: {
-				type: Array,
-				default: () => []
-			}
+			chooseClassId :{
+				type : Number|String,
+				default : ""
+			},
 		},
 		data() {
 			return {
 				show: false,
+
+				current_page : 1,
+				list : [],
+				last_page : 10,
+				showTitle : '加载更多',
 				msgType: 'center',
 				itemInfo: {},
 				index:0
@@ -56,7 +57,25 @@
 				this.show = true
 			},
 			addTab() {
-				this.$emit('add')
+				if(this.showTitle=="没有更多数据了。。。"){
+					return
+				}
+				this.$api.sendRequest({
+					url: `/mobile/studentTab/getstudentTabLog`,
+					method: "post",
+					data: {
+						page: this.current_page,
+						class_id: this.chooseClassId
+					},
+					success: res => {
+						let arr = [...this.list, ...res.data.data]
+						this.current_page++
+						this.list =[...this.list,...res.data.data] 
+						if (this.current_page >= res.data.last_page) {
+							this.showTitle='没有更多数据了。。。'
+						}
+					}
+				})
 			},
 			itemClick(item,index) {
 				this.index = index
@@ -81,7 +100,10 @@
 				})
 
 			},
-			dialogClose() {}
+			dialogClose() {
+				
+			}
+
 		},
 
 	}

+ 14 - 19
pages/studentRanked/studentRanked.vue

@@ -94,8 +94,12 @@
 			ref="markScore"></markScore>
 
 		<!-- 点评记录 -->
+<<<<<<< HEAD
+		<markScoreList :chooseClassId="chooseClassId" ref="markScoreList"></markScoreList>
+=======
 		<markScoreList @success='DelectSuccess' @add='addTab' :list='studentTab.data' ref="markScoreList">
 		</markScoreList>
+>>>>>>> 0d8c02ba5c71fa1c8a3b7acdb1044e14d1156fc2
 
 		<el-drawer title="排行榜" :visible.sync="showRankList" direction="rtl">
 			<view style="text-align: center;" class="">
@@ -112,7 +116,7 @@
 						<text class="txt-white f24">选择班级</text>
 					</view>
 				</view>
-				<view class="ui-flex-column text-center ui-p bottom-btn-item" @click="$refs.markScoreList.open()">
+				<view class="ui-flex-column text-center ui-p bottom-btn-item" @click="getLog">
 					<image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
 					<view style="line-height: 1;">
 						<text class="txt-white f24">点评记录</text>
@@ -147,7 +151,7 @@
 						<text class="txt-white f24">切换老师</text>
 					</view>
 				</view>
-				<view class="ui-flex-column text-center ui-p bottom-btn-item">
+				<view class="ui-flex-column text-center ui-p bottom-btn-item" @click="loginOut()">
 					<image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
 					<view style="line-height: 1;">
 						<text class="txt-white f24">退出登录</text>
@@ -191,24 +195,17 @@
 			}
 		},
 		mounted() {
-
-			// this.id = this.$route.query.id
-
-			this.id = this.$store.state.teacherInfo.selfclass.id 
-			this.getstudentTabLog()
+			this.id = this.$store.state.teacherInfo.selfclass.id
 			// this.getStudent()
 			this.getClassroomList();
-
-			setTimeout(() => {
-				this.doChooseClass({
-					value: [{
-						class_name: "二年级2班",
-						id: 2
-					}]
-				})
-			}, 400)
 		},
 		methods: {
+			getLog(){
+				this.$refs.markScoreList.open()
+				this.$refs.markScoreList.list=[]
+				this.$refs.markScoreList.current_page=1
+				this.$refs.markScoreList.addTab()
+			},
 			change(e) {
 				this.type = e == 0 ? 1 : 2
 				this.getTabs()
@@ -245,7 +242,6 @@
 					},
 					success: res => {
 						this.teachList.push(res.data)
-
 					}
 				})
 
@@ -303,7 +299,6 @@
 			getTabs() {
 				this.$api.sendRequest({
 					url: `/mobile/studentTab/getStudentTabs`,
-
 					method: "post",
 					data: {
 						teacher_id: this.$store.state.teacher_id,
@@ -385,7 +380,7 @@
 	.page {
 		background-image: url('https://zhxy.obs.cn-hz1.ctyun.cn:443/static/desk_bg/class_bj.jpg');
 		background-size: 100% 100%;
-		height: 100vh;
+		height: auto;
 		// width: 750rpx;
 	}