lansir 1 rok temu
rodzic
commit
6f78e36b4d

+ 120 - 110
pages/studentRanked/components/mark-score-list.vue

@@ -1,124 +1,134 @@
 <template>
-	<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">
-			<view class="">
-				<u-cell  class="ui-hover ui-flex-1" clickable :title="item.student.student_name">
+    <el-drawer append-to-body title="点评记录" :visible.sync="show" size="400px" direction="ltr"
+        style="backdrop-filter: blur(4px);">
+        <u-swipe-action>
+            <u-swipe-action-item v-for="(item,index) in list" :key="item.id" class="ui-hover ui-flex-1"
+                :options="options1" @click="itemClick(item,index)">
+                <u-cell :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>{{}}</view> -->
 
-					<view slot="icon" class="ui-mr10">
-						<image :src="item.stuSchool.student_photo" style="width: 40px;height: 40px;border-radius: 20px;">
-						</image>
-					</view>
+                    <text slot="label" class="txt-muted">{{item.created_at}} </text>
+                    <el-tag slot="value" plain :type="item.studentTab.type_text == '好评' ? '' : 'danger'">{{item.studentTab.tab_name}} {{item.score}}</el-tag>
+                    <!-- <u-badge slot="value" value="+1" plain size="mini" type="success"></u-badge> -->
+                    <!-- <view class="" slot="right-icon">
+                        <i class="el-icon-delete ui-ml30 " style="font-size: 20px;" @click="itemClick(item,index)"></i>
+                    </view> -->
+                </u-cell>
+            </u-swipe-action-item>
+        </u-swipe-action>
+        <view @click="getList" class="text-center ui-m ui-p" style="width: 100%;cursor: pointer;">
+            {{ showTitle }}
+        </view>
 
-					<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> -->
-					<view class="" slot="right-icon">
-						<i class="el-icon-delete ui-ml30 " style="font-size: 20px;" @click="itemClick(item,index)"></i>
-					</view>
-				</u-cell>
-			</view>
-		</u-cell-group>
-		<view  @click="addTab" class="text-center ui-m ui-p" style="width: 100%;cursor: pointer;">
-			{{ showTitle }}
-		</view>
-
-		<uni-popup ref="alertDialog" type="dialog">
-			<uni-popup-dialog type="center" cancelText="关闭" confirmText="确认" title="确认撤销?" content="您确认撤销该条点评记录?"
-				@confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
-		</uni-popup>
-	</el-drawer>
+        <uni-popup ref="alertDialog" type="dialog">
+            <uni-popup-dialog type="center" cancelText="关闭" confirmText="确认" title="确认撤销?" content="您确认撤销该条点评记录?"
+                @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
+        </uni-popup>
+    </el-drawer>
 </template>
 
 <script>
-	export default {
-		props: {
-			chooseClassId :{
-				type : Number|String,
-				default : ""
-			},
-		},
-		data() {
-			return {
-				show: false,
+    export default {
+        props: {
+            chooseClassId: {
+                type: Number | String,
+                default: ""
+            },
+        },
+        data() {
+            return {
+                show: false,
+
+                current_page: 1,
+                list: [],
+                options1: [{
+                    text: '撤销',
+                    style: {
+                        backgroundColor: '#FF0C0C',
+                    }
+                }],
+                last_page: 10,
+
+                msgType: 'center',
+                itemInfo: {},
+                index: 0
+            }
+        },
+        computed: {
+            showTitle() {
+                if (this.current_page > this.last_page) {
+                    return '没有更多数据了。。。'
+                } else {
+                    return '加载更多'
+                }
+            },
+        },
+        mounted() {
+
+        },
+        methods: {
+            open() {
+                this.show = true;
+                
+                this.list = []
+                this.current_page = 1
+                this.getList()
+            },
+            getList() {
+                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.last_page = res.data.last_page
+                        this.list = [...this.list, ...res.data.data]
 
-				current_page : 1,
-				list : [],
-				last_page : 10,
-				
-				msgType: 'center',
-				itemInfo: {},
-				index:0
-			}
-		},
-		computed : {
-			showTitle(){
-				if (this.current_page > this.last_page) {
-					return '没有更多数据了。。。'
-				}else{
-					return '加载更多'
-				}
-			},
-		},
-		mounted() {
+                    }
+                })
+            },
+            itemClick(item, index) {
+                this.index = index
+                this.itemInfo = item
+                this.$refs.alertDialog.open('center')
+            },
+            dialogConfirm() {
+                this.$api.sendRequest({
+                    url: `/mobile/studentTab/delstudentTabLog`,
+                    method: "post",
+                    data: {
+                        tab_log_id: this.itemInfo.id
+                    },
+                    success: res => {
+                        console.log("aaaaaaaaaaa");
+                        this.show = false
+                        this.$emit('delSuccess')
+                    },
+                    complete: res => {
+                        console.log(res, "resss");
+                    }
+                })
 
-		},
-		methods: {
-			open() {
-				this.show = true
-			},
-			addTab() {
-				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.last_page=res.data.last_page
-						this.list =[...this.list,...res.data.data] 
-						
-					}
-				})
-			},
-			itemClick(item,index) {
-				this.index = index
-				this.itemInfo = item
-				this.$refs.alertDialog.open('center')
-			},
-			dialogConfirm() {
-				this.$api.sendRequest({
-					url: `/mobile/studentTab/delstudentTabLog`,
-					method: "post",
-					data: {
-						tab_log_id: this.itemInfo.id
-					},
-					success: res => {
-						console.log("aaaaaaaaaaa");
-						this.show=false
-						this.$emit('delSuccess')
-					},
-					complete : res=>{
-						console.log(res,"resss");
-					}
-				})
+            },
+            dialogClose() {
 
-			},
-			dialogClose() {
-				
-			}
+            }
 
-		},
+        },
 
-	}
+    }
 </script>
 
 <style>

+ 29 - 17
pages/studentRanked/components/mark-score.vue

@@ -67,35 +67,31 @@
 </template>
 
 <script>
+    // 标签缓存
+    let tabList = {};
+    
 	import {
 		getStudentTabs
 	} from "@/common/api/studentTab.js"
 	export default {
 		props: {
-			list: {
-				type: Array,
-				default: () => []
-			},
 			stuList: {
 				type: Array,
 				default: () => []
 			},
-			title:{
-				type: String,
-				default: () => ''
-			},
 		},
 
 		data() {
 			return {
+                title : '',
 				show: false,
+                list : [],
 				curIndex: 0,
 				type: 0,
 				score: 0, //加扣分分数
 				activeId: -1, //选中项
 				itemTab: '',
 				showType: false,
-                stuName:'',
 				list1: [{
 					name: '全部',
 				}, {
@@ -125,15 +121,30 @@
 					this.$emit('close')
 				}
 			}
-		},
-		mounted() {
-
 		},
 		methods: {
 			change(e){
 				this.curIndex = e
-			  this.$emit('change',e)
+                this.getTipList();
 			},
+            getTipList() {
+                if(tabList[this.curIndex]){
+                    this.list = tabList[this.curIndex];
+                    return;
+                }
+                this.$api.sendRequest({
+                    url: `/mobile/studentTab/getStudentTabs`,
+                    method: "post",
+                    data: {
+                        teacher_id: this.$store.state.teacher_id,
+                        type: this.curIndex
+                    },
+                    success: res => {
+                        tabList[this.curIndex] = res.data;
+                        this.list = res.data
+                    }
+                })
+            },
 			getStudentTabs() {
 				this.$api.sendRequest({
 					url: getStudentTabs,
@@ -147,8 +158,10 @@
 				})
 			},
 			// 外部访问使用
-			open(id) {
+			open(title) {
+                this.title = title;
 				this.show = true;
+                this.getTipList();
 			},
 			toActive(index, item) {
 				// 是否旧的选中项
@@ -160,7 +173,6 @@
 					this.score = 1;
 				}
 				this.itemTab = item
-
 			},
 			cancelAct() {
 				if (this.score) {
@@ -168,7 +180,7 @@
 					this.score = 0;
 				} else {
 					this.show = false;
-					this.$emit('close')
+					this.$emit('close', false)
 				}
 			},
 			submit() {
@@ -191,7 +203,7 @@
 							this.show = false;
 							this.activeId = -1;
 							this.score = 0;
-							this.$emit('close')
+							this.$emit('close', res.data.batch_id)
 						}
 					}
 				})

+ 108 - 0
pages/studentRanked/components/random-roll-call.vue

@@ -0,0 +1,108 @@
+<template>
+    <el-dialog :visible.sync="show" title="随机点名" custom-class="content" center :close-on-click-modal="false"
+        style="background-color: #00142f63;backdrop-filter: blur(4px);" width="640px">
+
+        <view style="min-height: 250px;" class="ui-flex-center ui-flex-row">
+            <view class="text-center user-item" v-for="(item, index) in viewList" :key="item.id">
+                <el-avatar :size="70" :src="item.student_cartoon_photo"></el-avatar>
+                <view class="f34 text-center txt-white">{{item.title}}</view>
+            </view>
+        </view>
+
+        <view class="text-center ui-mt40">
+            <el-input-number v-model="num" :min="1" label="确认人数"></el-input-number>
+            <el-button class="ui-ml20" type="" @click="makeRandom">确认人数</el-button>
+            <el-button class="ui-ml20" type="primary" @click="$emit('comment', checkList)">批量点评</el-button>
+        </view>
+    </el-dialog>
+</template>
+
+<script>
+    export default {
+        props: {
+            list: {},
+        },
+        data() {
+            return {
+                show: false,
+                num: 3,
+                checkList: []
+            }
+        },
+        computed: {
+            viewList() {
+                let list = [];
+                for (var i = 0; i < this.num; i++) {
+                    if (this.checkList[i]) {
+                        list.push(this.checkList[i])
+                    } else {
+                        list.push({
+                            id: i,
+                            student_cartoon_photo: 'https://zhxy.obs.cn-hz1.ctyun.cn/static/student_icon/B6.png',
+                            title: '匿名'
+                        })
+                    }
+                }
+                return list;
+            }
+        },
+        methods: {
+            open() {
+                this.show = true;
+            },
+            makeRandom() {
+                let max = this.list.length - 1;
+                let numList = this.generateUniqueRandomNumbers(this.num, 0, max);
+                this.checkList = [];
+                this.viewList.forEach((item, index) => {
+                    setTimeout(() => {
+                        this.checkList.push(this.list[numList[index]])
+                    }, 40 * index);
+                })
+            },
+            // 生成随机数
+            makeRandomNum(max) {
+                let min = 1;
+                return Math.floor(Math.random() * (max - min + 1)) + min;
+            },
+            // 生成不同数值的随机数
+            generateUniqueRandomNumbers(count, min, max) {
+                let result = [];
+                while (result.length < count) {
+                    let randomNum = Math.floor(Math.random() * (max - min + 1)) + min;
+                    if (result.indexOf(randomNum) === -1) {
+                        result.push(randomNum);
+                    }
+                }
+                return result;
+            },
+            
+        }
+    }
+</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/ .el-dialog__header {
+        background: #022c5a80;
+        border-bottom: 2px solid #051d37;
+    }
+
+    /deep/ .el-dialog__title {
+        color: #fff;
+    }
+
+    /deep/ .el-dialog__body {
+        background-color: rgba(255, 255, 255, .12);
+    }
+
+    .user-item {
+        /* float: left; */
+        margin: 20px;
+    }
+</style>

+ 108 - 0
pages/studentRanked/components/timer-clock.vue

@@ -0,0 +1,108 @@
+<template>
+    <el-dialog :visible.sync="show" title="计时器" custom-class="content" center :close-on-click-modal="false"
+        style="background-color: #00142f63;backdrop-filter: blur(4px);" width="640px">
+
+        <view style="min-height: 250px;" class="ui-flex-center ui-flex-row">
+            <view class="text-center user-item" v-for="(item, index) in viewList" :key="item.id">
+                <el-avatar :size="70" :src="item.student_cartoon_photo"></el-avatar>
+                <view class="f34 text-center txt-white">{{item.title}}</view>
+            </view>
+        </view>
+
+        <view class="text-center ui-mt40">
+            <el-input-number v-model="num" :min="1" label="确认人数"></el-input-number>
+            <el-button class="ui-ml20" type="" @click="makeRandom">确认人数</el-button>
+            <el-button class="ui-ml20" type="primary" @click="$emit('comment', checkList)">批量点评</el-button>
+        </view>
+    </el-dialog>
+</template>
+
+<script>
+    export default {
+        props: {
+            list: {},
+        },
+        data() {
+            return {
+                show: false,
+                num: 3,
+                checkList: []
+            }
+        },
+        computed: {
+            viewList() {
+                let list = [];
+                for (var i = 0; i < this.num; i++) {
+                    if (this.checkList[i]) {
+                        list.push(this.checkList[i])
+                    } else {
+                        list.push({
+                            id: i,
+                            student_cartoon_photo: 'https://zhxy.obs.cn-hz1.ctyun.cn/static/student_icon/B6.png',
+                            title: '匿名'
+                        })
+                    }
+                }
+                return list;
+            }
+        },
+        methods: {
+            open() {
+                this.show = true;
+            },
+            makeRandom() {
+                let max = this.list.length - 1;
+                let numList = this.generateUniqueRandomNumbers(this.num, 0, max);
+                this.checkList = [];
+                this.viewList.forEach((item, index) => {
+                    setTimeout(() => {
+                        this.checkList.push(this.list[numList[index]])
+                    }, 40 * index);
+                })
+            },
+            // 生成随机数
+            makeRandomNum(max) {
+                let min = 1;
+                return Math.floor(Math.random() * (max - min + 1)) + min;
+            },
+            // 生成不同数值的随机数
+            generateUniqueRandomNumbers(count, min, max) {
+                let result = [];
+                while (result.length < count) {
+                    let randomNum = Math.floor(Math.random() * (max - min + 1)) + min;
+                    if (result.indexOf(randomNum) === -1) {
+                        result.push(randomNum);
+                    }
+                }
+                return result;
+            },
+            
+        }
+    }
+</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/ .el-dialog__header {
+        background: #022c5a80;
+        border-bottom: 2px solid #051d37;
+    }
+
+    /deep/ .el-dialog__title {
+        color: #fff;
+    }
+
+    /deep/ .el-dialog__body {
+        background-color: rgba(255, 255, 255, .12);
+    }
+
+    .user-item {
+        /* float: left; */
+        margin: 20px;
+    }
+</style>

+ 484 - 442
pages/studentRanked/studentRanked.vue

@@ -1,459 +1,501 @@
 <template>
-	<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="page">
+        <view class="txt-white ui-flex-row ui-flex-align-center" style="border-bottom: 4px solid #4472C4;padding-left: 40rpx;height: 54px;position: fixed;top:0;width: 750rpx;z-index: 10;backdrop-filter: blur(4px);"
+            :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>
+            </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;">
-                    <u-button size="small" @click="setMulti" plain text="取消选择" style="background-color: #0d4980;"
-                        class="ui-mr10"></u-button>
-                    <u-button size="small" type="primary" @click="commentMulti()">
-                        <text class="ui-mr10">批量点评</text>
-                        <u-badge :value="activeList.length"></u-badge>
-                    </u-button>
+                    <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>
-        </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">
-                    <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="{
+        </view>
+
+        <!-- <view class="platform" v-if="chooseClassName">
+            <view class="platform-text txt-white">讲台</view>
+            <view class="ranked-radio"></view>
+        </view> -->
+
+        <view class="ui-flex-row ui-flex-space-around" style="padding:140rpx 0 200rpx 0;">
+            <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="item1.student_cartoon_photo" 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_score_total}}</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 :title='stuName' @change='change' @close='close' :stuList='activeList' :list='tabList'
-			ref="markScore"></markScore>
-
-		<!-- 点评记录 -->
-		<markScoreList :chooseClassId="chooseClassId" ref="markScoreList" @delSuccess="delSuccess"></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="getLog">
-					<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="goSeatChange">
-					<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" @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>
-					</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="item1.student_cartoon_photo" 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_score_total}}</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>
+
+        <!-- 切换班级 -->
+        <!-- <u-picker :show="show_classes" @confirm="doChooseClass" :columns="classesList" keyName="class_name"
+			@cancel="show_classes=false"></u-picker> -->
+            <!-- <u-grid :border="false" >
+                <u-grid-item v-for="(item,baseListIndex) in classesList" :key="item.id">
+                    <text class="grid-text">{{item.class_name}}</text>
+                </u-grid-item>
+            </u-grid> -->
+
+        <!-- 点评 -->
+        <markScore @change='change' @close='onScoreClose' :stuList='activeList' ref="markScore"></markScore>
+
+        <!-- 点评记录 -->
+        <markScoreList ref="markScoreList"></markScoreList>
+        
+        <!-- 随机点名 -->
+        <randomRollCall ref="randomRollCall" :list="studentList" @comment="randomRollComment"></randomRollCall>
+
+        <!-- 计时器 -->
+        <timerClock ref="timerClock"></timerClock>
+
+        <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;backdrop-filter: blur(4px);border-top: 1px solid #616161;">
+            <view class="ui-flex-1 ui-flex-row">
+                <!--   -->
+                <el-dropdown trigger="click" @command="doChooseClass">
+                    <view class="ui-flex-column text-center ui-p bottom-btn-item">
+                        <image src="../../static/jyicon/shubao.png" style="width: 40px;height: 40px;" mode=""></image>
+                        <view style="line-height: 1;">
+                            <text class="txt-white f24">选择班级</text>
+                        </view>
+                    </view>
+                    <el-dropdown-menu slot="dropdown">
+                        <el-dropdown-item v-for="(item) in classesList" :key="item.id" :command="item">
+                            <text class="ui-mr10">{{item.class_name}}</text>
+                            <text v-if="item.id == chooseClassId" class="el-icon-check"></text>
+                        </el-dropdown-item>
+                    </el-dropdown-menu>
+                </el-dropdown>
+                    
+                <view class="ui-flex-column text-center ui-p bottom-btn-item" @click="$refs.markScoreList.open()">
+                    <image src="../../static/jyicon/kedan.png" style="width: 40px;height: 40px;" 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/jyicon/xuewei.png" style="width: 40px;height: 40px;" 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/jyicon/gerenzhongxin.png" style="width: 40px;height: 40px;" 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 class="ui-flex-column text-center ui-p bottom-btn-item" @click="$refs.randomRollCall.open()">
+                    <image src="../../static/jyicon/fangfa.png" style="width: 40px;height: 40px;" 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.timerClock.open()">
+                    <image src="../../static/jyicon/shalou.png" style="width: 40px;height: 40px;" mode=""></image>
+                    <view style="line-height: 1;">
+                        <text class="txt-white f24">计时器</text>
+                    </view>
+                </view>
+
+                <view class="ui-flex-column text-center ui-p" :class="[lastTipBatchId ? 'bottom-btn-item' : 'bottom-btn-item-disabled']" @click="repealScore()">
+                    <image src="../../static/jyicon/naozhong.png" style="width: 40px;height: 40px;" mode=""></image>
+                    <view style="line-height: 1;">
+                        <text class="txt-white f24">撤销点评</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/jyicon/jiangpai.png" style="width: 40px;height: 40px;" 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: 40px;height: 40px;" 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="loginOut()">
+                    <image src="../../static/jyicon/xiaoxi.png" style="width: 40px;height: 40px;" 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,
-				tabList: [],
-				studentTab: [],
-				type: 1,
-				stuNameList: [],
-				stuName: '',
-				course_id : '',
-			}
-		},
-		mounted() {
-			this.id = this.$store.state.teacherInfo.selfclass.id
-			this.getClassroomList();
-			
-		},
-		methods: {
-			goSeatChange(){
-				uni.navigateTo({
-					url: "./studentRankedChange"
-				})
-			},
-			delSuccess(){
-				this.getStudent()
-			},
-			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.
-				sdfsdfsdfsdf()
-			},
-			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)
-						if(this.chooseClassId=="" && this.teachList[0]){
-							console.log(this.teachList[0][0].id,"this.teachList[0].id");
-							this.chooseClassId=this.teachList[0][0].id
-							this.getStudent()
-						}
-					}
-				})
-			},
-			// 多选学生点评
-			commentMulti() {
-				this.stuName = this.stuNameList.toString()
-				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);
-						this.stuNameList.splice(index, 1);
-					} else {
-						this.activeList.push(item.id);
-						this.stuNameList.push(item.title);
-					}
-					return;
-				} else {
-					this.activeList = [item.id]
-				}
-				this.stuName = item.title
-				this.getTabs()
-				this.$refs.markScore.open(1);
-			},
-			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,
-						type: this.type,
-						course_id : this.course_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'
-						})
-					}
-				})
-			},
-			close() {
-				this.activeList = []
-				this.multiSelect = false
-				this.getStudent()
-				
-			},
-		},
-
-	}
+    import markScore from './components/mark-score.vue'
+    import markScoreList from './components/mark-score-list.vue'
+    import randomRollCall from './components/random-roll-call.vue'
+    import timerClock from './components/timer-clock.vue'
+    import {
+        getStuSchoolIdByStuClassId
+    } from "@/common/api/stu.js"
+    export default {
+        components: {
+            markScore,
+            markScoreList,
+            randomRollCall,
+            timerClock,
+        },
+        data() {
+            return {
+                // show_classes: false,
+                id: 1,
+                list: [],
+                classesList: [],
+                chooseClassName: '',
+                chooseClassId: '',
+                activeList: [],
+                multiSelect: false,
+                // 排行榜
+                showRankList: false,
+                // tabList: [],
+                // studentTab: [],
+                // type: 1,
+                lastTipBatchId : ''
+            }
+        },
+        computed : {
+            studentList(){
+                let list = [];
+                this.list.forEach(item => {
+                    item.nodes.forEach(el => {
+                        if (el.id) {
+                            list.push(el)
+                        }
+                    })
+                })
+                return list;
+            }
+        },
+        mounted() {
+            console.log(this.$store.state.teacherInfo)
+            this.id = this.$store.state.teacherInfo.selfclass.id
+            this.getClassroomList();
+        },
+        methods: {
+            // change(e) {
+            //     this.type = e == 0 ? 1 : 2
+            //     this.getTabs()
+            // },
+            setMulti() {
+                this.multiSelect = !this.multiSelect;
+                this.activeList = [];
+            },
+            loginOut() {
+                uni.setStorageSync("token", '')
+                uni.navigateTo({
+                    url: "/pages/login/login"
+                })
+            },
+            doChooseClass(val) {
+                // console.log(val);
+                uni.setStorage({
+                    key: 'lastClasses',
+                    data: val,
+                    success(e) {
+                        console.log(e)
+                    }
+                });
+
+                this.chooseClassId = val.id
+                this.chooseClassName = val.class_name
+                this.getStudent()
+                // this.show_classes = false
+            },
+            // DelectSuccess(index) {
+            //     console.log(index);
+            //     this.getStudent()
+            //     this.getstudentTabLog()
+            // },
+            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.classesList = res.data;
+                        if (res.data.length) {
+                            let value = uni.getStorageSync('lastClasses')
+                            this.$nextTick(() => {
+                                this.doChooseClass(value || res.data[0])
+                            })
+                        }
+                    }
+                })
+            },
+            // 随机点名后批量评价
+            randomRollComment(checkList){
+                this.activeList = checkList.map(item => {
+                    return item.id
+                });
+                this.commentMulti();
+            },
+            // 多选学生点评
+            commentMulti() {
+                // this.stuName = this.stuNameList.toString()
+                let title = this.activeList.map(stuId => {
+                    return this.studentList.find(el => {
+                        return el.id == stuId;
+                    }).title;
+                }).join( );
+                
+                // this.getTabs()
+                this.$refs.markScore.open(title);
+            },
+            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;
+                }
+                
+                this.activeList = [item.id];
+                this.commentMulti();
+            },
+            // 获取学生列表
+            getStudent() {
+                this.$api.sendRequest({
+                    url: `/mobile/studentTab/seat`,
+                    data: {
+                        class_id: this.chooseClassId
+                    },
+                    success: res => {
+                        this.list = res.data.reverse().map(item => {
+                            item.nodes = item.nodes.reverse().filter(el => {
+                                return !!el.id;
+                            })
+                            return item;
+                        })
+                    }
+                })
+            },
+            // getTabs() {
+            //     this.$api.sendRequest({
+            //         url: `/mobile/studentTab/getStudentTabs`,
+            //         method: "post",
+            //         data: {
+            //             teacher_id: this.$store.state.teacher_id,
+            //             type: this.type
+            //         },
+            //         success: res => {
+            //             this.tabList = res.data
+            //         }
+            //     })
+            // },
+            onScoreClose(lastTipBatchId = false) {
+                if(lastTipBatchId){
+                    this.activeList = []
+                    this.multiSelect = false
+                    this.getStudent();
+                    this.lastTipBatchId = lastTipBatchId;
+                }
+                // this.getstudentTabLog()
+            },
+            repealScore(){
+                this.$api.sendRequest({
+                    url: `/mobile/studentTab/multiDelStudentTabLog`,
+                    method: "post",
+                    data: {
+                        batch_id : this.lastTipBatchId
+                    },
+                    success: res => {
+                        this.lastTipBatchId = null;
+                    }
+                })
+            }
+        },
+    }
 </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: auto;
-		// 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: auto;
+        // 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-bottom: 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%);
+        bottom: 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,
+    .bottom-btn-item-disabled{
+        position: relative;
+    }
+    .bottom-btn-item-disabled{
+        opacity: 0.5;
+    }
+
+    .bottom-btn-item:hover {
+        cursor: pointer;
+        background-color: #ffffff3b;
+        border-radius: 8px;
+    }
 </style>

BIN
static/jyicon/chengchang.png


BIN
static/jyicon/diantai.png


BIN
static/jyicon/dingyue.png


BIN
static/jyicon/fangfa.png


BIN
static/jyicon/gerenzhongxin.png


BIN
static/jyicon/heiban.png


BIN
static/jyicon/huaxue.png


BIN
static/jyicon/huihua.png


BIN
static/jyicon/jiangpai.png


BIN
static/jyicon/jisuanqi.png


BIN
static/jyicon/kedan.png


BIN
static/jyicon/naozhong.png


BIN
static/jyicon/rili.png


BIN
static/jyicon/shalou.png


BIN
static/jyicon/shequ.png


BIN
static/jyicon/shoucang.png


BIN
static/jyicon/shubao.png


BIN
static/jyicon/shufa.png


BIN
static/jyicon/shuji.png


BIN
static/jyicon/wangluokecheng.png


BIN
static/jyicon/wenjianjia.png


BIN
static/jyicon/xiaoxi.png


BIN
static/jyicon/xuewei.png


BIN
static/jyicon/xuexiao.png


BIN
static/jyicon/yingyu.png


BIN
static/jyicon/youxi.png


BIN
static/jyicon/yundong.png


BIN
static/jyicon/zhengjian.png


BIN
static/jyicon/zhengshu.png


BIN
static/jyicon/zhibo.png