Browse Source

联调学生标签

wj 1 year ago
parent
commit
fbdcdf7818

+ 1 - 1
common/js/http.js

@@ -61,7 +61,7 @@ export default {
 			if(Config.isLocal==2){
 				Config.baseUrl='http://125.124.170.221:8000'
 			}else{
-				Config.baseUrl='http://zhxy.com'
+				Config.baseUrl='http://125.124.170.221:8000'
 			}
 		}
 		

+ 48 - 32
pages/studentRanked/components/mark-score-list.vue

@@ -1,42 +1,58 @@
 <template>
-    <el-drawer append-to-body title="点评记录" :visible.sync="show" size="400px" direction="ltr" style="backdrop-filter: blur(4px);">
-        <u-cell-group v-for="index in 20">
-            <u-cell class="ui-hover" clickable title="李杰">
-                <image slot="icon" class="ui-mr10" src="https://zhxy.obs.cn-hz1.ctyun.cn:443/static/student_icon/0.png" style="width: 40px;height: 40px;"></image>
-                <!-- <view slot="title" class="ui-flex-row ui-flex-align-center">
+	<el-drawer append-to-body title="点评记录" :visible.sync="show" size="400px" direction="ltr"
+		style="backdrop-filter: blur(4px);">
+		<u-cell-group v-for="(item,index) in list" :key="index">
+			<u-cell class="ui-hover" clickable :title="item.student.student_name">
+
+				<view slot="icon" class="ui-mr10">
+					<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">今天 23:52:12</text>
-                <el-tag slot="value" plain>优秀发言 +1</el-tag>
-                <!-- <u-badge slot="value" value="+1" plain size="mini" type="success"></u-badge> -->
-            </u-cell>
-            <u-cell class="ui-hover" clickable title="李杰">
-                <image slot="icon" class="ui-mr10" src="https://zhxy.obs.cn-hz1.ctyun.cn:443/static/student_icon/0.png" style="width: 40px;height: 40px;"></image>
-                <text slot="label" class="txt-muted">今天 23:52:12</text>
-                <!-- <u-badge slot="value" value="-1" plain size="mini" type="error"></u-badge> -->
-                <el-tag slot="value" plain type="danger">上课开小差 -1</el-tag>
-            </u-cell>
-        </u-cell-group>
-        <view>
-            <text class="text-center ui-m ui-p">加载更多</text>
-        </view>
-    </el-drawer>
+
+				<text slot="label" class="txt-muted">{{item.created_at}} </text>
+				<el-tag v-if="item.studentTab.type_text == '好评'" slot="value"
+					plain>{{item.studentTab.tab_name}}{{item.score}}</el-tag>
+				<el-tag slot="value" v-else plain type="danger">{{item.studentTab.tab_name}}{{item.score}}</el-tag>
+				<!-- <u-badge slot="value" value="+1" plain size="mini" type="success"></u-badge> -->
+			</u-cell>
+
+		</u-cell-group>
+		<view  @click="addTab" class="text-center ui-m ui-p" style="width: 100%;cursor: pointer;">
+			加载更多
+		</view>
+	</el-drawer>
 </template>
 
 <script>
-    export default {
-        data(){
-            return {
-                show : false,
-            }
-        },
-        methods : {
-            open(){
-                this.show = true
-            }
-        }
-    }
+	export default {
+		props: {
+			list: {
+				type: Array,
+				default: () => []
+			}
+		},
+		data() {
+			return {
+				show: false,
+			}
+		},
+		mounted() {
+
+		},
+		methods: {
+			open() {
+				this.show = true
+			},
+			addTab() {
+				this.$emit('add')
+			}
+		},
+
+	}
 </script>
 
 <style>

+ 240 - 245
pages/studentRanked/components/mark-score.vue

@@ -1,275 +1,270 @@
 <template>
-    <el-dialog :visible.sync="show" title="标记点评给 马东/徐策 等5人" custom-class="content"
-        style="background-color: #00142f63;backdrop-filter: blur(4px);" width="600px">
-        <view class="ui-flex-column">
-            <!-- <view class="ui-p" style="background: #022c5a80;border-bottom: 2px solid #051d37;">
+	<el-dialog :visible.sync="show" title="标记点评给 马东/徐策 等5人" custom-class="content"
+		style="background-color: #00142f63;backdrop-filter: blur(4px);" width="600px">
+		<view class="ui-flex-column">
+			<!-- <view class="ui-p" style="background: #022c5a80;border-bottom: 2px solid #051d37;">
                 <text class="txt-white"> </text>
             </view> -->
-            <view class="ui-flex-row">
-                <view class="ui-flex-1 ui-flex-align-center ui-flex-row">
-                    <view class="ui-pl20">
-                        <view class="ui-flex-row ui-border-radius-20" @click="showType=true"
-                            style="background-color: #1C63A8;padding: 4px 8px;">
-                            <text class="txt-white f26 ui-mr10">全部类型</text>
-                            <u-icon color="#fff" name="list-dot"></u-icon>
-                        </view>
-                    </view>
-                </view>
-                <view style="width: 220px;" class="ui-p">
-                    <u-subsection :list="['表扬', '需改进']" mode="button" bgColor="#1b63a8" inactiveColor="#aec3ee"
-                        :current="curIndex" @change="curIndex=$event"></u-subsection>
-                </view>
-                <view class="ui-flex-1"></view>
-            </view>
-            <view style="background: #0000003b;">
-                <u-tabs :list="list1" :scrollable="false" :activeStyle="{
+			<view class="ui-flex-row">
+				<view class="ui-flex-1 ui-flex-align-center ui-flex-row">
+					<view class="ui-pl20">
+						<view class="ui-flex-row ui-border-radius-20" @click="showType=true"
+							style="background-color: #1C63A8;padding: 4px 8px;">
+							<text class="txt-white f26 ui-mr10">全部类型</text>
+							<u-icon color="#fff" name="list-dot"></u-icon>
+						</view>
+					</view>
+				</view>
+				<view style="width: 220px;" class="ui-p">
+					<u-subsection :list="['表扬', '需改进']" mode="button" bgColor="#1b63a8" inactiveColor="#aec3ee"
+						:current="curIndex" @change="curIndex=$event"></u-subsection>
+				</view>
+				<view class="ui-flex-1"></view>
+			</view>
+			<view style="background: #0000003b;">
+				<u-tabs :list="list1" :scrollable="false" :activeStyle="{
                     color: '#fff',
                     fontWeight: 'bold',
                     transform: 'scale(1.2)'
-                }"
-                :inactiveStyle="{
+                }" :inactiveStyle="{
                     color: '#959595',
                     transform: 'scale(1)'
                 }"></u-tabs>
-            </view>
+			</view>
 
-            <scroll-view scroll-y style="height: 400px;" show-scrollbar>
-                <u-grid :col="6" :border="false" @click="toActive">
-                    <u-grid-item v-for="(item, index) in tagList" :key="index" class="ui-p"
-                        :class="{'no-select' : activeId >= 0 && activeId != index}">
-                        <u--image :src="'https://zhxy.obs.cn-hz1.ctyun.cn:443/static/tag_learn/' + tagIcons[index]"
-                            width="46px" height="46px"></u--image>
-                        <view class="ui-pt10">
-                            <text class="grid-text txt-white f28">{{item}}</text>
-                        </view>
-                        <u-badge v-if="activeId == index" absolute :offset="[0,10]" :value="score"></u-badge>
-                    </u-grid-item>
-                </u-grid>
-            </scroll-view>
+			<scroll-view scroll-y style="height: 400px;" show-scrollbar>
+				<u-grid :col="6" :border="false">
+					<u-grid-item @click="toActive(index,item)" v-for="(item, index) in list" :key="index" class="ui-p"
+						:class="{'no-select' : activeId >= 0 && activeId != index}">
+						<u--image :src="item.img" width="46px" height="46px"></u--image>
+						<view class="ui-pt10">
+							<text class="grid-text txt-white f28">{{item.tab_name}}</text>
+						</view>
+						<u-badge v-if="activeId == index" absolute :offset="[0,10]" :value="score"></u-badge>
+					</u-grid-item>
+				</u-grid>
+			</scroll-view>
 
-            <view class="ui-p ui-flex" style="background-color: #1b63a870;justify-content: end;">
-                <view class="ui-flex" style="width: 250px;">
-                    <u-button size="small" plain :text="score ? '取消选择' : '关闭点评'" @click="cancelAct"
-                        style="background-color: #0d4980;" class="ui-mr10"></u-button>
-                    <u-button size="small" :disabled="!score" type="primary" @click="submit" text="提交点评"></u-button>
-                </view>
-            </view>
-        </view>
+			<view class="ui-p ui-flex" style="background-color: #1b63a870;justify-content: end;">
+				<view class="ui-flex" style="width: 250px;">
+					<u-button size="small" plain :text="score ? '取消选择' : '关闭点评'" @click="cancelAct"
+						style="background-color: #0d4980;" class="ui-mr10"></u-button>
+					<u-button size="small" :disabled="!score" type="primary" @click="submit" text="提交点评"></u-button>
+				</view>
+			</view>
+		</view>
 
-        <el-drawer append-to-body :visible.sync="showType" direction="ltr">
-            <view class="ui-p" style="width: 400px;">
-                <text>这里展示学生标签记录、以及类型切换</text>
-            </view>
-            <u-cell-group>
-                <u-cell icon="setting-fill" isLink title="个人设置"></u-cell>
-                <u-cell icon="integral-fill" isLink title="会员等级" value="新版本"></u-cell>
-            </u-cell-group>
-        </el-drawer>
-    </el-dialog>
+		<el-drawer append-to-body :visible.sync="showType" direction="ltr">
+			<view class="ui-p" style="width: 400px;">
+				<text>这里展示学生标签记录、以及类型切换</text>
+			</view>
+			<u-cell-group>
+				<u-cell icon="setting-fill" isLink title="个人设置"></u-cell>
+				<u-cell icon="integral-fill" isLink title="会员等级" value="新版本"></u-cell>
+			</u-cell-group>
+		</el-drawer>
+	</el-dialog>
 </template>
 
 <script>
-	import { getStudentTabs } from "@/common/api/studentTab.js"
-    export default {
-        data() {
-            return {
-                show: false,
-                curIndex: 0,
-				type : 0,
-                score: 0, //加扣分分数
-                activeId: -1, //选中项
-
-                showType: false,
+	import {
+		getStudentTabs
+	} from "@/common/api/studentTab.js"
+	export default {
+		props: {
+			list: {
+				type: Array,
+				default: () => []
+			},
+			stuList: {
+				type: Array,
+				default: () => []
+			}
+		},
 
-                list1: [{
-                    name: '全部',
-                }, {
-                    name: '语文',
-                }, {
-                    name: '数学'
-                }, {
-                    name: '科技'
-                }, {
-                    name: '音乐'
-                }, {
-                    name: '美术'
-                }, {
-                    name: '体育'
-                }, {
-                    name: '思想'
-                }, {
-                    name: '劳动'
-                }],
+		data() {
+			return {
+				show: false,
+				curIndex: 0,
+				type: 0,
+				score: 0, //加扣分分数
+				activeId: -1, //选中项
+				itemTab: '',
+				showType: false,
 
-                tagList: [
-                    '小测优秀',
-                    '作业加分',
-                    '口算优秀',
-                    '班级贡献',
-                    '优秀发言',
-                    '阅读认真',
-                    '卫生干净',
-                    '值日认真',
-                    '勤奋学习',
-                    '课堂积极',
-                    '乐于助人',
-                    '团队合作',
-                    '诚实守信',
-                    '书写工整',
-                    '数学优秀',
-                    '语文优秀',
-                    '英语优秀',
-                    '美术优秀',
-                    '音乐优秀',
-                    '体育优秀',
-                    '科学优秀',
-                    '社会优秀',
-                    '历史优秀',
-                    '地理优秀',
-                    '政治优秀',
-                    '物理优秀',
-                    '化学优秀',
-                    '生物优秀',
-                    '作文优秀',
-                    '诗歌优秀',
-                    '故事优秀',
-                    '演讲优秀',
-                    '表演优秀',
-                    '手工优秀',
-                    '实验优秀',
-                    '研究优秀',
-                    '科研优秀',
-                    '表现优秀',
-                    '表现突出',
-                    '进步明显',
-                    '专注听讲',
-                    '课外阅读',
-                    // '体育锻炼',
-                    // '社会实践',
-                    // '志愿服务',
-                    // '爱护环境',
-                    // '安全文明',
-                    // '爱国爱校',
-                ],
-                // 老师配置标签的时候,需要选择图标
-                tagIcons: [
-                    'a-001-pencil.png',
-                    'a-010-astronomy.png',
-                    'a-017-protractor.png',
-                    'a-024-schoollocker.png',
-                    'a-031-mortarboard.png',
-                    'a-038-schoolbag.png',
-                    'a-045-liquidglue.png',
-                    'a-002-alarmclock.png',
-                    'a-011-maths.png',
-                    'a-018-squareruler.png',
-                    'a-025-idea.png',
-                    'a-032-certificate.png',
-                    'a-039-ask.png',
-                    'a-046-school.png',
-                    'a-003-book.png',
-                    'a-012-eraser.png',
-                    'a-019-abacus.png',
-                    'a-026-chemicals.png',
-                    'a-033-medal.png',
-                    'a-040-compass.png',
-                    'a-047-books.png',
-                    'a-004-notebook.png',
-                    'a-013-schoolbell.png',
-                    'a-020-physics.png',
-                    'a-027-maths.png',
-                    'a-034-diploma.png',
-                    'a-041-clipboard.png',
-                    'a-048-books.png',
-                    'a-007-calendar.png',
-                    'a-014-calculator.png',
-                    'a-021-dna.png',
-                    'a-028-paintpalette.png',
-                    'a-035-trophy.png',
-                    'a-042-computer.png',
-                    'a-049-books.png',
-                    'a-008-worldgrid.png',
-                    'a-015-squareruler.png',
-                    'a-022-schoollocker.png',
-                    'a-029-atom.png',
-                    'a-036-milkcarton.png',
-                    'a-043-laptop.png',
-                    'a-050-coffeemug.png',
-                    'a-009-molecule.png',
-                    'a-016-ruler.png',
-                    'a-023-sharpener.png',
-                    'a-030-eyeglasses.png',
-                    'a-037-pen.png',
-                    'a-044-microscope.png',
-                ]
-            }
-        },
+				list1: [{
+					name: '全部',
+				}, {
+					name: '语文',
+				}, {
+					name: '数学'
+				}, {
+					name: '科技'
+				}, {
+					name: '音乐'
+				}, {
+					name: '美术'
+				}, {
+					name: '体育'
+				}, {
+					name: '思想'
+				}, {
+					name: '劳动'
+				}],
+				// 老师配置标签的时候,需要选择图标
+				tagIcons: [
+					'a-001-pencil.png',
+					'a-010-astronomy.png',
+					'a-017-protractor.png',
+					'a-024-schoollocker.png',
+					'a-031-mortarboard.png',
+					'a-038-schoolbag.png',
+					'a-045-liquidglue.png',
+					'a-002-alarmclock.png',
+					'a-011-maths.png',
+					'a-018-squareruler.png',
+					'a-025-idea.png',
+					'a-032-certificate.png',
+					'a-039-ask.png',
+					'a-046-school.png',
+					'a-003-book.png',
+					'a-012-eraser.png',
+					'a-019-abacus.png',
+					'a-026-chemicals.png',
+					'a-033-medal.png',
+					'a-040-compass.png',
+					'a-047-books.png',
+					'a-004-notebook.png',
+					'a-013-schoolbell.png',
+					'a-020-physics.png',
+					'a-027-maths.png',
+					'a-034-diploma.png',
+					'a-041-clipboard.png',
+					'a-048-books.png',
+					'a-007-calendar.png',
+					'a-014-calculator.png',
+					'a-021-dna.png',
+					'a-028-paintpalette.png',
+					'a-035-trophy.png',
+					'a-042-computer.png',
+					'a-049-books.png',
+					'a-008-worldgrid.png',
+					'a-015-squareruler.png',
+					'a-022-schoollocker.png',
+					'a-029-atom.png',
+					'a-036-milkcarton.png',
+					'a-043-laptop.png',
+					'a-050-coffeemug.png',
+					'a-009-molecule.png',
+					'a-016-ruler.png',
+					'a-023-sharpener.png',
+					'a-030-eyeglasses.png',
+					'a-037-pen.png',
+					'a-044-microscope.png',
+				]
+			}
+		},
+		watch: {
+			show() {
+				if (!this.show) {
+					this.activeId = -1;
+					this.score = 0;
+					this.$emit('close')
+				}
+			}
+		},
 		mounted() {
-			
+
 		},
-        methods: {
-			getStudentTabs(){
+		methods: {
+			getStudentTabs() {
+				this.$api.sendRequest({
+					url: getStudentTabs,
+					method: "post",
+					data: {
+						type: this.type
+					},
+					success: res => {
+						console.log(res, "res");
+					}
+				})
+			},
+			// 外部访问使用
+			open(id) {
+				this.show = true;
+			},
+			toActive(index, item) {
+				// 是否旧的选中项
+				let always = this.activeId >= 0 && this.activeId == index;
+				this.activeId = index;
+				if (always) {
+					this.score++;
+				} else {
+					this.score = 1;
+				}
+				this.itemTab = item
+
+			},
+			cancelAct() {
+				if (this.score) {
+					this.activeId = -1;
+					this.score = 0;
+				} else {
+					this.show = false;
+					this.$emit('close')
+				}
+			},
+			submit() {
+				let obj = {
+					teacher_id: this.$store.state.teacher_id,
+					stu_school_ids: this.stuList,
+					tab_id: this.itemTab.tab_id,
+					score: this.score
+				}
 				this.$api.sendRequest({
-				    url: getStudentTabs,
-				    method: "post",
-				    data: {
-				        type : this.type
-				    },
-				    success: res => {
-				        console.log(res,"res");
-				    }
+					url: '/mobile/studentTab/geiXueshengTianjiaBiaoqian',
+					method: "post",
+					data: obj,
+					success: res => {
+						if (res.code == 200) {
+							uni.showToast({
+								title: res.msg,
+								'icon': 'none',
+							});
+							this.show = false;
+							this.activeId = -1;
+							this.score = 0;
+							this.$emit('close')
+						}
+					}
 				})
 			},
-            // 外部访问使用
-            open(id) {
-                this.show = true;
-            },
-            toActive(index) {
-                // 是否旧的选中项
-                let always = this.activeId >= 0 && this.activeId == index;
-                this.activeId = index;
-                if (always) {
-                    this.score++;
-                } else {
-                    this.score = 1;
-                }
-            },
-            cancelAct() {
-                if (this.score) {
-                    this.activeId = -1;
-                    this.score = 0;
-                } else {
-                    this.show = false;
-                }
-            },
-            submit() {
-                console.log('提交')
-            }
-        }
-    }
+
+		}
+	}
 </script>
 
 <style>
-    /deep/ .content {
-        background-image: url('https://zhxy.obs.cn-hz1.ctyun.cn:443/static/desk_bg/class_bj.jpg');
-        background-size: auto;
-        border: 1px solid #0d5396;
-    }
+	/deep/ .content {
+		background-image: url('https://zhxy.obs.cn-hz1.ctyun.cn:443/static/desk_bg/class_bj.jpg');
+		background-size: auto;
+		border: 1px solid #0d5396;
+	}
 
-    /deep/ .el-dialog__header {
-        background: #022c5a80;
-        border-bottom: 2px solid #051d37;
-    }
+	/deep/ .el-dialog__header {
+		background: #022c5a80;
+		border-bottom: 2px solid #051d37;
+	}
 
-    /deep/ .el-dialog__title {
-        color: #fff;
-    }
+	/deep/ .el-dialog__title {
+		color: #fff;
+	}
 
-    /deep/ .el-dialog__body {
-        padding: 0;
-    }
+	/deep/ .el-dialog__body {
+		padding: 0;
+	}
 
-    .no-select {
-        opacity: .5;
-    }
+	.no-select {
+		opacity: .5;
+	}
 </style>

+ 470 - 409
pages/studentRanked/studentRanked.vue

@@ -1,6 +1,6 @@
 <template>
-    <view class="page">
-        <!-- <u-popup :show="multiSelect" bgColor="#6e8fafde" mode="top" @close="multiSelect=false" :overlay="false">
+	<view class="page">
+		<!-- <u-popup :show="multiSelect" bgColor="#6e8fafde" mode="top" @close="multiSelect=false" :overlay="false">
             <view class="ui-p ui-flex ui-flex-align-center" style="justify-content: end;">
                 <view class="ui-mr30">
                     <text class="f32" style="#9ccbff">请点击选则学生批量点评</text>
@@ -16,423 +16,484 @@
             </view>
         </u-popup> -->
 
-        <view class="txt-white ui-flex-row ui-flex-align-center"
-            style="border-bottom: 4px solid #4472C4;padding-left: 40rpx;height: 54px;"
-            :style="{'background-color': multiSelect ? '#4472c4' : ''}">
-            <view class="ui-p ui-flex-row">
-                <text class="f40">{{chooseClassName}}</text>
-                <!-- <view class="ui-flex-row">
+		<view class="txt-white ui-flex-row ui-flex-align-center"
+			style="border-bottom: 4px solid #4472C4;padding-left: 40rpx;height: 54px;"
+			:style="{'background-color': multiSelect ? '#4472c4' : ''}">
+			<view class="ui-p ui-flex-row">
+				<text class="f40">{{chooseClassName}}</text>
+				<!-- <view class="ui-flex-row">
                     <text class="f40 ui-ml30 ui-mr10">李老师</text>
                     <u-icon name="arrow-down-fill" color="#fff"></u-icon>
                 </view> -->
-                <el-dropdown trigger="click">
-                    <span class="f40 txt-white ui-ml30" style="cursor:pointer;">
-                        李老师<i class="el-icon-arrow-down el-icon--right"></i>
-                    </span>
-                    <el-dropdown-menu slot="dropdown">
-                        <el-dropdown-item>周老师</el-dropdown-item>
-                        <el-dropdown-item>陈老师</el-dropdown-item>
-                        <el-dropdown-item>方老师</el-dropdown-item>
-                        <el-dropdown-item disabled>金老师</el-dropdown-item>
-                        <el-dropdown-item divided>退出登录</el-dropdown-item>
-                    </el-dropdown-menu>
-                </el-dropdown>
-
-            </view>
-
-            <view class="ui-p ui-flex ui-flex-1 ui-flex-align-center" style="justify-content: end;" v-if="multiSelect">
-                <view class="ui-mr30">
-                    <text class="f32" style="#9ccbff">请点击选则学生批量点评</text>
-                </view>
-                <view class="ui-flex" style="width: 250px;">
-                    <el-button @click="setMulti" plain text="取消选择" style="background-color: #0d4980;"
-                        class="ui-mr10">取消选择</el-button>
-                    <el-badge :value="activeList.length">
-                        <el-button type="primary" @click="commentMulti()">
-                            批量点评
-                        </el-button>
-                    </el-badge>
-                </view>
-            </view>
-        </view>
-
-        <view class="ui-flex-row ui-mt20 ui-flex-space-around">
-            <view v-for="(column, index) in list" :key="index" v-if="index%2 == 0" class="ui-flex-row">
-                <view v-for="index2 in 2" class="ui-flex-column" :class="{
+				<el-dropdown trigger="click">
+					<span class="f40 txt-white ui-ml30" style="cursor:pointer;">
+						李老师<i class="el-icon-arrow-down el-icon--right"></i>
+					</span>
+					<el-dropdown-menu slot="dropdown">
+						<el-dropdown-item>周老师</el-dropdown-item>
+						<el-dropdown-item>陈老师</el-dropdown-item>
+						<el-dropdown-item>方老师</el-dropdown-item>
+						<el-dropdown-item disabled>金老师</el-dropdown-item>
+						<el-dropdown-item divided>退出登录</el-dropdown-item>
+					</el-dropdown-menu>
+				</el-dropdown>
+
+			</view>
+
+			<view class="ui-p ui-flex ui-flex-1 ui-flex-align-center" style="justify-content: end;" v-if="multiSelect">
+				<view class="ui-mr30">
+					<text class="f32" style="#9ccbff">请点击选则学生批量点评</text>
+				</view>
+				<view class="ui-flex" style="width: 250px;">
+					<el-button @click="setMulti" plain text="取消选择" style="background-color: #0d4980;"
+						class="ui-mr10">取消选择</el-button>
+					<el-badge :value="activeList.length">
+						<el-button type="primary" @click="commentMulti()">
+							批量点评
+						</el-button>
+					</el-badge>
+				</view>
+			</view>
+		</view>
+
+		<view class="ui-flex-row ui-mt20 ui-flex-space-around">
+			<view v-for="(column, index) in list" :key="index" v-if="index%2 == 0" class="ui-flex-row">
+				<view v-for="index2 in 2" class="ui-flex-column" :class="{
                         'ui-mr10' : index2 == 1,
                         'ui-ml10' : index2 == 2
                     }">
-                    <view @click="Comment(item1)" v-for="(item1,index1) in list[index2+index-1].nodes" :key="item1.id"
-                        class="ui-flex-column ranked-item-tr ui-flex-align-center"
-                        :class="{active : activeList.includes(item1.id)}">
-                        <image style="width: 100rpx;height: 100rpx;"
-                            :src="'https://zhxy.obs.cn-hz1.ctyun.cn:443/static/student_icon/'+ (index1%7) +'.png'"
-                            mode=""></image>
-
-                        <view class="stu-tag text-center ui-flex-row ui-mt10">
-                            <view class="stu-tag-add ui-flex-1">72</view>
-                            <view class="stu-tag-sub ui-flex-1">-32</view>
-                        </view>
-
-                        <view class="txt-white f28 ui-pt10">
-                            {{item1.title}}
-                        </view>
-
-                        <u-badge absolute style="left: 10px;top: 10px;"
-                            :value="activeList.indexOf(item1.id) + 1"></u-badge>
-                    </view>
-                </view>
-            </view>
-        </view>
-
-        <view class="platform" v-if="chooseClassName">
-            <view class="ranked-radio"></view>
-            <view class="platform-text txt-white">讲台</view>
-        </view>
-
-        <!-- 切换班级 -->
-        <u-picker :show="show_classes" @confirm="doChooseClass" :columns="teachList" keyName="class_name"
-            @cancel="show_classes=false"></u-picker>
-
-        <!-- 点评 -->
-        <markScore ref="markScore"></markScore>
-        
-        <!-- 点评记录 -->
-        <markScoreList ref="markScoreList"></markScoreList>
-
-        <el-drawer title="排行榜" :visible.sync="showRankList" direction="rtl">
-            <span>我来啦!</span>
-        </el-drawer>
-
-        <view class="ui-pull-bottom ui-flex-row ui-p"
-            style="background-color: #0000006b;border-top: 1px solid #616161;">
-            <view class="ui-flex-1 ui-flex-row">
-                <view class="ui-flex-column text-center ui-p bottom-btn-item" @click="show_classes=true">
-                    <image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
-                    <view style="line-height: 1;">
-                        <text class="txt-white f24">评分记录</text>
-                    </view>
-                </view>
-                <view class="ui-flex-column text-center ui-p bottom-btn-item" @click="$refs.markScoreList.open()">
-                    <image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
-                    <view style="line-height: 1;">
-                        <text class="txt-white f24">点评记录</text>
-                    </view>
-                </view>
-                <view class="ui-flex-column text-center ui-p bottom-btn-item" @click="$pageTo('./studentRankedChange')">
-                    <image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
-                    <view style="line-height: 1;">
-                        <text class="txt-white f24">座位调整</text>
-                    </view>
-                </view>
-
-                <view class="ui-flex-column text-center ui-p bottom-btn-item" @click="setMulti">
-                    <image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
-                    <view style="line-height: 1;">
-                        <text class="txt-white f24" v-if="multiSelect">取消多选</text>
-                        <text class="txt-white f24" v-else>学生多选</text>
-                    </view>
-                </view>
-            </view>
-
-            <view class="ui-flex-row">
-                <view class="ui-flex-column text-center ui-p bottom-btn-item" @click="showRankList = true">
-                    <image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
-                    <view style="line-height: 1;">
-                        <text class="txt-white f24">排行榜</text>
-                    </view>
-                </view>
-                <view class="ui-flex-column text-center ui-p bottom-btn-item">
-                    <image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
-                    <view style="line-height: 1;">
-                        <text class="txt-white f24">切换老师</text>
-                    </view>
-                </view>
-                <view class="ui-flex-column text-center ui-p bottom-btn-item">
-                    <image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
-                    <view style="line-height: 1;">
-                        <text class="txt-white f24">退出登录</text>
-                    </view>
-                </view>
-            </view>
-        </view>
-    </view>
+					<view @click="Comment(item1)" v-for="(item1,index1) in list[index2+index-1].nodes" :key="item1.id"
+						class="ui-flex-column ranked-item-tr ui-flex-align-center"
+						:class="{active : activeList.includes(item1.id)}">
+						<image style="width: 100rpx;height: 100rpx;"
+							:src="'https://zhxy.obs.cn-hz1.ctyun.cn:443/static/student_icon/'+ (index1%7) +'.png'"
+							mode=""></image>
+						<view class="stu-tag text-center ui-flex-row ui-mt10">
+							<view class="stu-tag-add ui-flex-1">{{item1.plus_score_total}}</view>
+							<view class="stu-tag-sub ui-flex-1">-{{item1.minus}}</view>
+						</view>
+						<view class="txt-white f28 ui-pt10">
+							{{item1.title}}
+						</view>
+						<u-badge absolute style="left: 10px;top: 10px;"
+							:value="activeList.indexOf(item1.id) + 1"></u-badge>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="platform" v-if="chooseClassName">
+			<view class="ranked-radio"></view>
+			<view class="platform-text txt-white">讲台</view>
+		</view>
+
+		<!-- 切换班级 -->
+		<u-picker :show="show_classes" @confirm="doChooseClass" :columns="teachList" keyName="class_name"
+			@cancel="show_classes=false"></u-picker>
+
+		<!-- 点评 -->
+		<markScore @close='close' :stuList='activeList' :list='tabList' ref="markScore"></markScore>
+
+		<!-- 点评记录 -->
+		<markScoreList @add='addTab' :list='studentTab.data' ref="markScoreList"></markScoreList>
+
+		<el-drawer title="排行榜" :visible.sync="showRankList" direction="rtl">
+			<view style="text-align: center;" class="">
+				开发中....!
+			</view>
+		</el-drawer>
+
+		<view class="ui-pull-bottom ui-flex-row ui-p"
+			style="background-color: #0000006b;border-top: 1px solid #616161;">
+			<view class="ui-flex-1 ui-flex-row">
+				<view class="ui-flex-column text-center ui-p bottom-btn-item" @click="show_classes=true">
+					<image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
+					<view style="line-height: 1;">
+						<text class="txt-white f24">评分记录</text>
+					</view>
+				</view>
+				<view class="ui-flex-column text-center ui-p bottom-btn-item" @click="$refs.markScoreList.open()">
+					<image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
+					<view style="line-height: 1;">
+						<text class="txt-white f24">点评记录</text>
+					</view>
+				</view>
+				<view class="ui-flex-column text-center ui-p bottom-btn-item" @click="$pageTo('./studentRankedChange')">
+					<image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
+					<view style="line-height: 1;">
+						<text class="txt-white f24">座位调整</text>
+					</view>
+				</view>
+
+				<view class="ui-flex-column text-center ui-p bottom-btn-item" @click="setMulti">
+					<image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
+					<view style="line-height: 1;">
+						<text class="txt-white f24" v-if="multiSelect">取消多选</text>
+						<text class="txt-white f24" v-else>学生多选</text>
+					</view>
+				</view>
+			</view>
+
+			<view class="ui-flex-row">
+				<view class="ui-flex-column text-center ui-p bottom-btn-item" @click="showRankList = true">
+					<image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
+					<view style="line-height: 1;">
+						<text class="txt-white f24">排行榜</text>
+					</view>
+				</view>
+				<view class="ui-flex-column text-center ui-p bottom-btn-item">
+					<image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
+					<view style="line-height: 1;">
+						<text class="txt-white f24">切换老师</text>
+					</view>
+				</view>
+				<view class="ui-flex-column text-center ui-p bottom-btn-item">
+					<image src="../../static/uni.png" style="width: 30px;height: 30px;" mode=""></image>
+					<view style="line-height: 1;">
+						<text class="txt-white f24">退出登录</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
-    import markScore from './components/mark-score.vue'
-    import markScoreList from './components/mark-score-list.vue'
-
-    import {
-        getStuSchoolIdByStuClassId
-    } from "@/common/api/stu.js"
-    export default {
-        components: {
-            markScore,
-            markScoreList
-        },
-        data() {
-            return {
-                show_classes: false,
-                id: 1,
-                info: {},
-                list: [],
-                teachList: [],
-                chooseClassName: '',
-                chooseClassId: '',
-
-                activeList: [],
-                multiSelect: false,
-
-                // 排行榜
-                showRankList: false,
-            }
-        },
-        mounted() {
-            // this.id = this.$route.query.id
-            this.id = this.$store.state.teacherInfo.selfclass.id
-            // this.getStudent()
-            this.getClassroomList();
-
-            setTimeout(() => {
-                this.doChooseClass({
-                    value: [{
-                        class_name: "二年级2班",
-                        id: 2
-                    }]
-                })
-            }, 400)
-        },
-        methods: {
-            setMulti() {
-                this.multiSelect = !this.multiSelect;
-                this.activeList = [];
-            },
-            loginOut() {
-                uni.setStorageSync("token", '')
-                uni.navigateTo({
-                    url: "/pages/login/login"
-                })
-            },
-            doChooseClass(val) {
-                console.log(val, "val");
-                this.chooseClassId = val.value[0].id
-                this.chooseClassName = val.value[0].class_name
-                this.getStudent()
-                this.show_classes = false
-            },
-            getClassroomList() {
-                let teacher_id = this.$store.state.teacherInfo.id
-                this.$api.sendRequest({
-                    url: `/mobile/teacher/teachClasses`,
-                    method: "post",
-                    data: {
-                        teacher_id: teacher_id
-                    },
-                    success: res => {
-                        this.teachList.push(res.data)
-                        console.log(this.teachList);
-                    }
-                })
-
-            },
-            // 多选学生点评
-            commentMulti() {
-                this.$refs.markScore.open(1);
-            },
-            Comment(item) {
-                if (this.multiSelect) {
-                    let index = this.activeList.indexOf(item.id)
-                    if (index >= 0) {
-                        this.activeList.splice(index, 1);
-                    } else {
-                        this.activeList.push(item.id);
-                    }
-                    return;
-                }
-                console.log(item, "sgism");
-
-                this.$refs.markScore.open(1);
-                return;
-                //item的id是studentClass的id,需要转换成stu_school_id传到
-                this.$api.sendRequest({
-                    url: getStuSchoolIdByStuClassId,
-                    data: {
-                        stu_class_id: item.id
-                    },
-                    success: res => {
-                        console.log(res, "resrrrrr");
-                        let stu_school_id = res.data.stu_school_id
-                        uni.navigateTo({
-                            url: "/pages/studentTab/studentTab?stu_school_id=" + stu_school_id
-                        })
-                    }
-                })
-            },
-            getStudent() {
-                this.$api.sendRequest({
-                    url: `/mobile/getSeat?classroom_id=${this.chooseClassId}`,
-                    success: res => {
-                        this.list = res.data
-                    }
-                })
-            },
-            CommentOn(item, score) {
-                let info = {
-                    id: this.info.id,
-                    tab_id: item.tab_id,
-                    score: score
-                }
-                this.$api.sendRequest({
-                    url: `/mobile/student/eval`,
-                    data: info,
-                    success: res => {
-                        uni.showToast({
-                            title: `${this.info.title} ${item.tab_name} ${item.type == 1 ? '+':'-'} ${score}分`,
-                            icon: 'none'
-                        })
-
-                        this.$refs.CommentPopup.close()
-                    }
-                })
-            }
-        }
-    }
+	import markScore from './components/mark-score.vue'
+	import markScoreList from './components/mark-score-list.vue'
+	import {
+		getStuSchoolIdByStuClassId
+	} from "@/common/api/stu.js"
+	export default {
+		components: {
+			markScore,
+			markScoreList
+		},
+		data() {
+			return {
+				show_classes: false,
+				id: 1,
+				info: {},
+				list: [],
+				teachList: [],
+				chooseClassName: '',
+				chooseClassId: '',
+				activeList: [],
+				multiSelect: false,
+				// 排行榜
+				showRankList: false,
+				tabList: [],
+				studentTab: []
+			}
+		},
+		mounted() {
+
+			// this.id = this.$route.query.id
+			this.id = this.$store.state.teacherInfo.selfclass.id
+			this.getstudentTabLog()
+			// this.getStudent()
+			this.getClassroomList();
+
+			setTimeout(() => {
+				this.doChooseClass({
+					value: [{
+						class_name: "二年级2班",
+						id: 2
+					}]
+				})
+			}, 400)
+		},
+		methods: {
+			setMulti() {
+				this.multiSelect = !this.multiSelect;
+				this.activeList = [];
+			},
+			loginOut() {
+				uni.setStorageSync("token", '')
+				uni.navigateTo({
+					url: "/pages/login/login"
+				})
+			},
+			doChooseClass(val) {
+				this.chooseClassId = val.value[0].id
+				this.chooseClassName = val.value[0].class_name
+				this.getStudent()
+				this.show_classes = false
+			},
+			getClassroomList() {
+				let teacher_id = this.$store.state.teacherInfo.id
+				this.$api.sendRequest({
+					url: `/mobile/teacher/teachClasses`,
+					method: "post",
+					data: {
+						teacher_id: teacher_id
+					},
+					success: res => {
+						this.teachList.push(res.data)
+
+					}
+				})
+
+			},
+			// 多选学生点评
+			commentMulti() {
+				this.getTabs()
+				this.$refs.markScore.open(1);
+			},
+			Comment(item) {
+
+				if (this.multiSelect) {
+
+					let index = this.activeList.indexOf(item.id)
+					if (index >= 0) {
+						this.activeList.splice(index, 1);
+					} else {
+						this.activeList.push(item.id);
+					}
+					return;
+				} else {
+					this.activeList = [item.id]
+				}
+				this.getTabs()
+				this.$refs.markScore.open(1);
+				return;
+				//item的id是studentClass的id,需要转换成stu_school_id传到
+				this.$api.sendRequest({
+					url: getStuSchoolIdByStuClassId,
+					data: {
+						stu_class_id: item.id
+					},
+					success: res => {
+						let stu_school_id = res.data.stu_school_id
+						uni.navigateTo({
+							url: "/pages/studentTab/studentTab?stu_school_id=" + stu_school_id
+						})
+					}
+				})
+			},
+			getStudent() {
+				this.$api.sendRequest({
+					url: `/mobile/studentTab/seat`,
+					data:{
+						class_id:this.chooseClassId
+					},
+					success: res => {
+						this.list = res.data
+					}
+				})
+			},
+			getTabs() {
+				this.$api.sendRequest({
+					url: `/mobile/studentTab/getStudentTabs`,
+					method: "post",
+					data: {
+						teacher_id: this.$store.state.teacher_id
+					},
+					success: res => {
+						this.tabList = res.data
+					}
+				})
+			},
+			CommentOn(item, score) {
+				let info = {
+					id: this.info.id,
+					tab_id: item.tab_id,
+					score: score
+				}
+				this.$api.sendRequest({
+					url: `/mobile/student/eval`,
+					data: info,
+					success: res => {
+						uni.showToast({
+							title: `${this.info.title} ${item.tab_name} ${item.type == 1 ? '+':'-'} ${score}分`,
+							icon: 'none'
+						})
+
+						this.$refs.CommentPopup.close()
+					}
+				})
+			},
+			close() {
+				this.activeList = []
+				this.multiSelect = false
+				this.getStudent()
+				this.getstudentTabLog()
+			},
+			getstudentTabLog() {
+				this.$api.sendRequest({
+					url: `/mobile/studentTab/getstudentTabLog`,
+					data: {
+						class_id: 2
+					},
+					method: "post",
+					success: res => {
+						this.studentTab = res.data
+					}
+				})
+			},
+			addTab() {
+				if (this.studentTab.current_page == this.studentTab.last_page) {
+					uni.showToast({
+						title: '没有更多数据',
+						'icon': 'none',
+					});
+					return
+				}
+				this.$api.sendRequest({
+					url: `/mobile/studentTab/getstudentTabLog`,
+					method: "post",
+
+					data: {
+						page: this.studentTab.current_page + 1,
+						class_id: 2
+					},
+					success: res => {
+						let arr = [...this.studentTab.data, ...res.data.data]
+						this.studentTab = res.data
+						this.studentTab.data = arr
+
+					}
+				})
+			}
+
+		},
+
+	}
 </script>
 
 <style lang="scss" scoped>
-    .page {
-        background-image: url('https://zhxy.obs.cn-hz1.ctyun.cn:443/static/desk_bg/class_bj.jpg');
-        background-size: 100% 100%;
-        height: 100vh;
-        // width: 750rpx;
-    }
-
-    .platform {
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        position: relative;
-        height: 30rpx;
-        margin-top: 60rpx;
-
-        .platform-color {
-            position: absolute;
-            left: 0;
-            top: 0;
-            height: 60rpx;
-            background-color: rgba(5, 204, 161, 1);
-            width: 10rpx;
-        }
-
-        .platform-text {
-            text-align: center;
-            width: 60%;
-            margin-top: 40rpx;
-        }
-    }
-
-    .pop-title {
-        border-bottom: 1px solid #f2f2f2;
-        font-size: 36rpx;
-        padding-bottom: 20rpx;
-        display: flex;
-        align-items: center;
-    }
-
-    .popup-content {
-        border-radius: 10px;
-        box-sizing: border-box;
-        padding: 0 32rpx;
-    }
-
-    .btn-roll {
-        background-color: #fff;
-        border-radius: 25rpx;
-        width: 190rpx;
-        color: #666;
-        height: 60rpx;
-        line-height: 60rpx;
-        text-align: center;
-        margin-left: 32rpx;
-    }
-
-    .ranked {
-        width: 100%;
-
-        text-align: center;
-        font-size: 10px;
-        box-sizing: border-box;
-        display: flex;
-        padding-top: 80rpx;
-    }
-
-    .ranked-item-tr {
-        position: relative;
-        margin-bottom: 26rpx;
-        padding-top: 16rpx;
-        padding-bottom: 16rpx;
-        border-radius: 5px;
-        box-sizing: border-box;
-        width: 100%;
-        cursor: pointer;
-        transition: 100ms;
-
-        display: flex;
-        justify-content: center;
-    }
-
-    .active {
-        background: #ffffff85;
-    }
-
-    .ranked-radio {
-        width: 100px;
-        position: absolute;
-        left: 50%;
-        transform: translate(-50%);
-        top: 0rpx;
-
-        border-bottom: 3px solid rgba(5, 204, 161, 1);
-        border-radius: 50% 50% 0 0;
-    }
-
-    .visit-item {
-        display: flex;
-        align-items: center;
-
-        .visit-item-left {
-            width: 120rpx;
-            color: #666;
-        }
-    }
-
-    .stu-tag {
-        width: 90px;
-        border-radius: 15px;
-        overflow: hidden;
-    }
-
-    .stu-tag-add {
-        background-color: #ecf5ff;
-        color: #3c9cff;
-        border: 1px solid #fff;
-    }
-
-    .stu-tag-sub {
-        background-color: #fef0f0;
-        color: #f56c6c;
-        border: 1px solid #fff;
-        border-left: 0;
-    }
-
-    .bottom-btn-item {
-        position: relative;
-    }
-
-    .bottom-btn-item:hover {
-        cursor: pointer;
-        background-color: #ffffff3b;
-        border-radius: 8px;
-    }
+	.page {
+		background-image: url('https://zhxy.obs.cn-hz1.ctyun.cn:443/static/desk_bg/class_bj.jpg');
+		background-size: 100% 100%;
+		height: 100vh;
+		// width: 750rpx;
+	}
+
+	.platform {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		position: relative;
+		height: 30rpx;
+		margin-top: 60rpx;
+
+		.platform-color {
+			position: absolute;
+			left: 0;
+			top: 0;
+			height: 60rpx;
+			background-color: rgba(5, 204, 161, 1);
+			width: 10rpx;
+		}
+
+		.platform-text {
+			text-align: center;
+			width: 60%;
+			margin-top: 40rpx;
+		}
+	}
+
+	.pop-title {
+		border-bottom: 1px solid #f2f2f2;
+		font-size: 36rpx;
+		padding-bottom: 20rpx;
+		display: flex;
+		align-items: center;
+	}
+
+	.popup-content {
+		border-radius: 10px;
+		box-sizing: border-box;
+		padding: 0 32rpx;
+	}
+
+	.btn-roll {
+		background-color: #fff;
+		border-radius: 25rpx;
+		width: 190rpx;
+		color: #666;
+		height: 60rpx;
+		line-height: 60rpx;
+		text-align: center;
+		margin-left: 32rpx;
+	}
+
+	.ranked {
+		width: 100%;
+
+		text-align: center;
+		font-size: 10px;
+		box-sizing: border-box;
+		display: flex;
+		padding-top: 80rpx;
+	}
+
+	.ranked-item-tr {
+		position: relative;
+		margin-bottom: 26rpx;
+		padding-top: 16rpx;
+		padding-bottom: 16rpx;
+		border-radius: 5px;
+		box-sizing: border-box;
+		width: 100%;
+		cursor: pointer;
+		transition: 100ms;
+
+		display: flex;
+		justify-content: center;
+	}
+
+	.active {
+		background: #ffffff85;
+	}
+
+	.ranked-radio {
+		width: 100px;
+		position: absolute;
+		left: 50%;
+		transform: translate(-50%);
+		top: 0rpx;
+
+		border-bottom: 3px solid rgba(5, 204, 161, 1);
+		border-radius: 50% 50% 0 0;
+	}
+
+	.visit-item {
+		display: flex;
+		align-items: center;
+
+		.visit-item-left {
+			width: 120rpx;
+			color: #666;
+		}
+	}
+
+	.stu-tag {
+		width: 90px;
+		border-radius: 15px;
+		overflow: hidden;
+	}
+
+	.stu-tag-add {
+		background-color: #ecf5ff;
+		color: #3c9cff;
+		border: 1px solid #fff;
+	}
+
+	.stu-tag-sub {
+		background-color: #fef0f0;
+		color: #f56c6c;
+		border: 1px solid #fff;
+		border-left: 0;
+	}
+
+	.bottom-btn-item {
+		position: relative;
+	}
+
+	.bottom-btn-item:hover {
+		cursor: pointer;
+		background-color: #ffffff3b;
+		border-radius: 8px;
+	}
 </style>

+ 1 - 0
pages/studentRanked/studentRankedChange.vue

@@ -134,6 +134,7 @@
 		mounted() {
 			// this.id = this.$route.query.id
 			this.id=this.$store.state.teacherInfo.selfclass.id
+			
 			// this.getStudent()
 			this.getClassroomList()
 		},