|
@@ -11,12 +11,14 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="ui-p ui-flex ui-flex-1 ui-flex-align-center" style="justify-content: end;width: 450px;" v-if="multiSelect">
|
|
|
|
|
|
+ <view class="ui-p ui-flex ui-flex-1 ui-flex-align-center" style="justify-content: end;width: 450px;"
|
|
|
|
+ v-if="multiSelect">
|
|
<view class="ui-mr30">
|
|
<view class="ui-mr30">
|
|
<text class="f32" style="#9ccbff">请点击选择学生批量点评</text>
|
|
<text class="f32" style="#9ccbff">请点击选择学生批量点评</text>
|
|
</view>
|
|
</view>
|
|
<view class="ui-flex" style="width: 250px;">
|
|
<view class="ui-flex" style="width: 250px;">
|
|
- <el-button @click="setMulti(false)" plain text="取消选择" style="background-color: #0d4980;" class="ui-mr10">取消选择</el-button>
|
|
|
|
|
|
+ <el-button @click="setMulti(false)" plain text="取消选择" style="background-color: #0d4980;"
|
|
|
|
+ class="ui-mr10">取消选择</el-button>
|
|
<el-badge :value="activeList.length">
|
|
<el-badge :value="activeList.length">
|
|
<el-button type="primary" @click="commentMulti()">
|
|
<el-button type="primary" @click="commentMulti()">
|
|
批量点评
|
|
批量点评
|
|
@@ -30,8 +32,9 @@
|
|
<view class="platform-text txt-white">讲台</view>
|
|
<view class="platform-text txt-white">讲台</view>
|
|
<view class="ranked-radio"></view>
|
|
<view class="ranked-radio"></view>
|
|
</view> -->
|
|
</view> -->
|
|
- <Draggable class="ui-flex-row ui-flex-space-around" :disabled="!seatMove" forceFallback style="padding:20rpx 0 200rpx 0;" group="ii"
|
|
|
|
- @end="onMoveColumnEnd" @choose="activeList = []" v-model="list" :delay="500" animation="300">
|
|
|
|
|
|
+ <Draggable class="ui-flex-row ui-flex-space-around" :disabled="!seatMove" forceFallback
|
|
|
|
+ style="padding:20rpx 0 200rpx 0;" group="ii" @end="onMoveColumnEnd" @choose="activeList = []" v-model="list"
|
|
|
|
+ :delay="500" animation="300">
|
|
<view v-for="(column, index) in list" :key="index" class="ui-flex-column" :class="{
|
|
<view v-for="(column, index) in list" :key="index" class="ui-flex-column" :class="{
|
|
'ui-mrr' : !!(index%2),
|
|
'ui-mrr' : !!(index%2),
|
|
'ui-mll' : !(index%2)
|
|
'ui-mll' : !(index%2)
|
|
@@ -40,23 +43,23 @@
|
|
'ui-mr10' : !!index%1,
|
|
'ui-mr10' : !!index%1,
|
|
'ui-ml10' : !!index%2
|
|
'ui-ml10' : !!index%2
|
|
}"> -->
|
|
}"> -->
|
|
- <view @click="toClickStu(stuItem)" v-for="stuItem in column.nodes" :key="stuItem.id"
|
|
|
|
- v-if="stuItem.id" class="ui-flex-column ranked-item-tr ui-flex-align-center"
|
|
|
|
- :class="{active : activeList.includes(stuItem.id)}">
|
|
|
|
- <image :src="getLevelIcon(stuItem)" style="width: 130rpx;height: 48rpx;">
|
|
|
|
- </image>
|
|
|
|
- <image style="width: 100rpx;height: 100rpx;margin-top: -20rpx;"
|
|
|
|
- :src="stuItem.student_cartoon_photo" mode=""></image>
|
|
|
|
- <view class="stu-tag text-center ui-flex-row ui-mt10">
|
|
|
|
- <view class="stu-tag-add ui-flex-1">{{stuItem.plus_score_total}}</view>
|
|
|
|
- <view class="stu-tag-sub ui-flex-1">{{stuItem.minus_score_total}}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="txt-white f28 ui-pt10">
|
|
|
|
- {{stuItem.title}}
|
|
|
|
- </view>
|
|
|
|
- <u-badge absolute style="left: 10px;top: 10px;"
|
|
|
|
- :value="activeList.indexOf(stuItem.id) + 1"></u-badge>
|
|
|
|
|
|
+ <view @click="toClickStu(stuItem)" v-for="stuItem in column.nodes" :key="stuItem.key"
|
|
|
|
+ class="ui-flex-column ranked-item-tr ui-flex-align-center" v-if="stuItem.id || seatMove"
|
|
|
|
+ :class="{active : activeList.includes(stuItem.id)}">
|
|
|
|
+ <image :src="getLevelIcon(stuItem)" style="width: 130rpx;height: 48rpx;">
|
|
|
|
+ </image>
|
|
|
|
+ <image style="width: 100rpx;height: 100rpx;margin-top: -20rpx;" :src="stuItem.student_cartoon_photo"
|
|
|
|
+ mode=""></image>
|
|
|
|
+ <view class="stu-tag text-center ui-flex-row ui-mt10">
|
|
|
|
+ <view class="stu-tag-add ui-flex-1">{{stuItem.plus_score_total}}</view>
|
|
|
|
+ <view class="stu-tag-sub ui-flex-1">{{stuItem.minus_score_total}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="txt-white f28 ui-pt10">
|
|
|
|
+ {{stuItem.title}}
|
|
|
|
+ </view>
|
|
|
|
+ <u-badge absolute style="left: 10px;top: 10px;"
|
|
|
|
+ :value="activeList.indexOf(stuItem.id) + 1"></u-badge>
|
|
|
|
+ </view>
|
|
<!-- </view> -->
|
|
<!-- </view> -->
|
|
</view>
|
|
</view>
|
|
</Draggable>
|
|
</Draggable>
|
|
@@ -76,10 +79,12 @@
|
|
|
|
|
|
<!-- 排行榜 -->
|
|
<!-- 排行榜 -->
|
|
<rankList ref="rankList" :chooseClassId="chooseClassId"></rankList>
|
|
<rankList ref="rankList" :chooseClassId="chooseClassId"></rankList>
|
|
-
|
|
|
|
- <view v-if="seatMove" class="ui-pull-bottom ui-p" style="background-color: #0000006b;backdrop-filter: blur(4px);border-top: 1px solid #616161;">
|
|
|
|
|
|
+
|
|
|
|
+ <view v-if="seatMove" class="ui-pull-bottom ui-p"
|
|
|
|
+ style="background-color: #0000006b;backdrop-filter: blur(4px);border-top: 1px solid #616161;">
|
|
<view class="ui-flex-row ui-flex-center txt-white ui-mt10 ui-mb30">
|
|
<view class="ui-flex-row ui-flex-center txt-white ui-mt10 ui-mb30">
|
|
- 长按拖动调整整列,单选2位学生互相交换
|
|
|
|
|
|
+ 长按拖动调整整列,单选2位学生互相交换,
|
|
|
|
+ <stuChangeExcel :stuList="list" @change="list = $event"></stuChangeExcel>
|
|
</view>
|
|
</view>
|
|
<view class="ui-flex-row ui-flex-center">
|
|
<view class="ui-flex-row ui-flex-center">
|
|
<el-button round type="primary" @click="updateStuChange">保存座位</el-button>
|
|
<el-button round type="primary" @click="updateStuChange">保存座位</el-button>
|
|
@@ -90,7 +95,7 @@
|
|
<view v-else class="ui-pull-bottom ui-flex-row ui-p"
|
|
<view v-else class="ui-pull-bottom ui-flex-row ui-p"
|
|
style="background-color: #0000006b;backdrop-filter: blur(4px);border-top: 1px solid #616161;">
|
|
style="background-color: #0000006b;backdrop-filter: blur(4px);border-top: 1px solid #616161;">
|
|
<view class="ui-flex-1 ui-flex-row">
|
|
<view class="ui-flex-1 ui-flex-row">
|
|
-
|
|
|
|
|
|
+
|
|
<el-dropdown trigger="click" @command="doChooseClass">
|
|
<el-dropdown trigger="click" @command="doChooseClass">
|
|
<view-btn-item title="选择班级" src="../../static/jyicon/shubao.png"></view-btn-item>
|
|
<view-btn-item title="选择班级" src="../../static/jyicon/shubao.png"></view-btn-item>
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-menu slot="dropdown">
|
|
@@ -134,9 +139,12 @@
|
|
import timerClock from './components/timer-clock.vue'
|
|
import timerClock from './components/timer-clock.vue'
|
|
import rankList from './components/rank-list.vue'
|
|
import rankList from './components/rank-list.vue'
|
|
import viewBtnItem from './components/view-button-item.vue'
|
|
import viewBtnItem from './components/view-button-item.vue'
|
|
|
|
+ import stuChangeExcel from './components/students-change-excel.vue'
|
|
import {
|
|
import {
|
|
getStuSchoolIdByStuClassId
|
|
getStuSchoolIdByStuClassId
|
|
} from "@/common/api/stu.js"
|
|
} from "@/common/api/stu.js"
|
|
|
|
+ // const ExcelJS = require('exceljs');
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
markScore,
|
|
markScore,
|
|
@@ -146,6 +154,7 @@
|
|
rankList,
|
|
rankList,
|
|
viewBtnItem,
|
|
viewBtnItem,
|
|
Draggable,
|
|
Draggable,
|
|
|
|
+ stuChangeExcel,
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -172,24 +181,24 @@
|
|
})
|
|
})
|
|
return list;
|
|
return list;
|
|
},
|
|
},
|
|
- teacher(){
|
|
|
|
|
|
+ teacher() {
|
|
return this.$store.state.teacherInfo || {}
|
|
return this.$store.state.teacherInfo || {}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onLoad(){
|
|
|
|
|
|
+ onLoad() {
|
|
this.getClassroomList();
|
|
this.getClassroomList();
|
|
-
|
|
|
|
|
|
+
|
|
let teacher_id = this.teacher.id;
|
|
let teacher_id = this.teacher.id;
|
|
this.$api.sendRequest({
|
|
this.$api.sendRequest({
|
|
url: `/mobile/teacher/draw`,
|
|
url: `/mobile/teacher/draw`,
|
|
method: "get",
|
|
method: "get",
|
|
data: {
|
|
data: {
|
|
teacher_id: teacher_id,
|
|
teacher_id: teacher_id,
|
|
- year : 2024
|
|
|
|
-
|
|
|
|
|
|
+ year: 2024
|
|
|
|
+
|
|
},
|
|
},
|
|
success: res => {
|
|
success: res => {
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -199,9 +208,9 @@
|
|
},
|
|
},
|
|
getLevelIcon(item) {
|
|
getLevelIcon(item) {
|
|
let url = '//zhxy.obs.cn-hz1.ctyun.cn:443/static/';
|
|
let url = '//zhxy.obs.cn-hz1.ctyun.cn:443/static/';
|
|
- if(item.score_total == 0){
|
|
|
|
|
|
+ if (item.score_total == 0) {
|
|
return url + 'tag_level/0.png'
|
|
return url + 'tag_level/0.png'
|
|
- }
|
|
|
|
|
|
+ }
|
|
let val = ~~((item.score_total) / 10);
|
|
let val = ~~((item.score_total) / 10);
|
|
val = (val <= 0 ? 1 : val);
|
|
val = (val <= 0 ? 1 : val);
|
|
val = (val >= 16 ? 16 : val);
|
|
val = (val >= 16 ? 16 : val);
|
|
@@ -248,10 +257,10 @@
|
|
data: {
|
|
data: {
|
|
teacher_id: teacher_id
|
|
teacher_id: teacher_id
|
|
},
|
|
},
|
|
- fali : res => {
|
|
|
|
|
|
+ fali: res => {
|
|
console.log(res);
|
|
console.log(res);
|
|
},
|
|
},
|
|
- success: res => {
|
|
|
|
|
|
+ success: res => {
|
|
this.classesList = res.data;
|
|
this.classesList = res.data;
|
|
if (res.data.length) {
|
|
if (res.data.length) {
|
|
let value = uni.getStorageSync('lastClasses')
|
|
let value = uni.getStorageSync('lastClasses')
|
|
@@ -284,44 +293,45 @@
|
|
this.$refs.markScore.open(title);
|
|
this.$refs.markScore.open(title);
|
|
},
|
|
},
|
|
setSeatMove(value) {
|
|
setSeatMove(value) {
|
|
- if(value){
|
|
|
|
|
|
+ if (value) {
|
|
this.setMulti(false);
|
|
this.setMulti(false);
|
|
this.listCopy = uni.$u.deepClone(this.list);
|
|
this.listCopy = uni.$u.deepClone(this.list);
|
|
- }else{
|
|
|
|
- this.list = uni.$u.deepClone(this.listCopy);
|
|
|
|
|
|
+ } else {
|
|
|
|
+ this.list = uni.$u.deepClone(this.listCopy);
|
|
}
|
|
}
|
|
this.seatMove = value;
|
|
this.seatMove = value;
|
|
this.activeList = [];
|
|
this.activeList = [];
|
|
},
|
|
},
|
|
// 两个学生交换位置
|
|
// 两个学生交换位置
|
|
- onMoveStuChange(id1, id2){
|
|
|
|
|
|
+ onMoveStuChange(id1, id2) {
|
|
this.list.forEach(item => {
|
|
this.list.forEach(item => {
|
|
item.nodes.forEach((el, index) => {
|
|
item.nodes.forEach((el, index) => {
|
|
- if(el == this.onMoveStuChange._move1){
|
|
|
|
|
|
+ if (el == this.onMoveStuChange._move1) {
|
|
// console.log(1,el);
|
|
// console.log(1,el);
|
|
this.$set(item.nodes, index, uni.$u.deepClone(this.onMoveStuChange._move2));
|
|
this.$set(item.nodes, index, uni.$u.deepClone(this.onMoveStuChange._move2));
|
|
}
|
|
}
|
|
- if(el == this.onMoveStuChange._move2){
|
|
|
|
|
|
+ if (el == this.onMoveStuChange._move2) {
|
|
this.$set(item.nodes, index, uni.$u.deepClone(this.onMoveStuChange._move1));
|
|
this.$set(item.nodes, index, uni.$u.deepClone(this.onMoveStuChange._move1));
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
this.activeList = [];
|
|
this.activeList = [];
|
|
},
|
|
},
|
|
- onMoveColumnEnd(list){ //自动处理,无需改变
|
|
|
|
|
|
+
|
|
|
|
+ onMoveColumnEnd(list) { //自动处理,无需改变
|
|
// console.log(list);
|
|
// console.log(list);
|
|
},
|
|
},
|
|
// 更新座位
|
|
// 更新座位
|
|
- updateStuChange(){
|
|
|
|
|
|
+ updateStuChange() {
|
|
let seat_list = this.list.map(item => {
|
|
let seat_list = this.list.map(item => {
|
|
return {
|
|
return {
|
|
- id : item.id,
|
|
|
|
- title : item.title,
|
|
|
|
- nodes : item.nodes.map(el => {
|
|
|
|
|
|
+ id: item.id,
|
|
|
|
+ title: item.title,
|
|
|
|
+ nodes: item.nodes.map(el => {
|
|
return {
|
|
return {
|
|
- id : el.id,
|
|
|
|
- key : el.key,
|
|
|
|
- title : el.title
|
|
|
|
|
|
+ id: el.id,
|
|
|
|
+ key: el.key,
|
|
|
|
+ title: el.title
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -331,8 +341,8 @@
|
|
url: `/mobile/saveSeat`,
|
|
url: `/mobile/saveSeat`,
|
|
method: "PUT",
|
|
method: "PUT",
|
|
data: {
|
|
data: {
|
|
- classroom_id : this.chooseClassId,
|
|
|
|
- seat_list : seat_list
|
|
|
|
|
|
+ classroom_id: this.chooseClassId,
|
|
|
|
+ seat_list: seat_list
|
|
},
|
|
},
|
|
success: res => {
|
|
success: res => {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -345,6 +355,11 @@
|
|
},
|
|
},
|
|
// 点击学生
|
|
// 点击学生
|
|
toClickStu(item) {
|
|
toClickStu(item) {
|
|
|
|
+ if(!item.id){
|
|
|
|
+ if(!this.seatMove){
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (this.seatMove) { //单个换位置
|
|
if (this.seatMove) { //单个换位置
|
|
if (this.activeList.length == 0) {
|
|
if (this.activeList.length == 0) {
|
|
this.activeList.push(item.id);
|
|
this.activeList.push(item.id);
|
|
@@ -550,19 +565,22 @@
|
|
border: 1px solid #fff;
|
|
border: 1px solid #fff;
|
|
border-left: 0;
|
|
border-left: 0;
|
|
}
|
|
}
|
|
-
|
|
|
|
- .ui-mrr{
|
|
|
|
|
|
+
|
|
|
|
+ .ui-mrr {
|
|
margin-right: 50rpx;
|
|
margin-right: 50rpx;
|
|
}
|
|
}
|
|
- .ui-mll{
|
|
|
|
|
|
+
|
|
|
|
+ .ui-mll {
|
|
margin-left: 50rpx;
|
|
margin-left: 50rpx;
|
|
}
|
|
}
|
|
- .sortable-chosen{
|
|
|
|
|
|
+
|
|
|
|
+ .sortable-chosen {
|
|
background-color: #fbfbfb66;
|
|
background-color: #fbfbfb66;
|
|
border-radius: 5px;
|
|
border-radius: 5px;
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
- .sortable-ghost{
|
|
|
|
|
|
+
|
|
|
|
+ .sortable-ghost {
|
|
// margin-left : 0 !important;
|
|
// margin-left : 0 !important;
|
|
// margin-right : 0 !important;
|
|
// margin-right : 0 !important;
|
|
background-color: #fbfbfb00;
|
|
background-color: #fbfbfb00;
|