|
@@ -75,8 +75,6 @@
|
|
<span class="primary-text-color">{{$t('schoolBaseInfo.dClass')}}</span>
|
|
<span class="primary-text-color">{{$t('schoolBaseInfo.dClass')}}</span>
|
|
</p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
- <!-- 刪除教室 -->
|
|
|
|
- <!--<Icon class="action-btn-icon" :class="curClassIndex == index ? '' : 'hide-icon'" size="19" type="md-trash"/>-->
|
|
|
|
</div>
|
|
</div>
|
|
<EmptyData v-if="classroomListShow.length == 0" style="padding-top:120px;"></EmptyData>
|
|
<EmptyData v-if="classroomListShow.length == 0" style="padding-top:120px;"></EmptyData>
|
|
</vuescroll>
|
|
</vuescroll>
|
|
@@ -101,8 +99,8 @@
|
|
<Button v-if="$access.can('admin.*|student-upd')" class="save-btn" :loading="isSaveLoading" icon="md-add" @click="addStuStatus = true" v-show="currentTabIndex == 2">
|
|
<Button v-if="$access.can('admin.*|student-upd')" class="save-btn" :loading="isSaveLoading" icon="md-add" @click="addStuStatus = true" v-show="currentTabIndex == 2">
|
|
{{$t('schoolBaseInfo.addStuBtn')}}
|
|
{{$t('schoolBaseInfo.addStuBtn')}}
|
|
</Button>
|
|
</Button>
|
|
- <!-- 删除学生 -->
|
|
|
|
- <Button v-if="$access.can('admin.*|student-upd')" class="save-btn" style="margin-right:10px;" :loading="isSaveLoading" icon="md-trash" @click="delStudent()" v-show="currentTabIndex == 2">
|
|
|
|
|
|
+ <!-- 移除学生 -->
|
|
|
|
+ <Button v-if="$access.can('admin.*|student-upd')" class="save-btn" style="margin-right:10px;" :loading="isSaveLoading" icon="md-remove-circle" @click="removeStudent(-1)" v-show="currentTabIndex == 2">
|
|
{{$t('schoolBaseInfo.delStuBtn')}}
|
|
{{$t('schoolBaseInfo.delStuBtn')}}
|
|
</Button>
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
@@ -261,16 +259,23 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!--学生名单-->
|
|
<!--学生名单-->
|
|
- <div id="sut-list-box" class="dark-iview-table" style="width:100%;height:100%;" v-show="currentTabIndex == 2">
|
|
|
|
|
|
+ <div id="sut-list-box" class="dark-iview-table dark-iview-input" style="width:100%;height:100%;" v-show="currentTabIndex == 2">
|
|
<vuescroll style="height:100%;" v-if="classroomListShow[curClassIndex] && classroomListShow[curClassIndex].openType == '1'">
|
|
<vuescroll style="height:100%;" v-if="classroomListShow[curClassIndex] && classroomListShow[curClassIndex].openType == '1'">
|
|
- <Table :columns="studentColumn" :data="students" @on-selection-change="(selections)=>{delSelection = selections}" :height="tableHeight" class="system-classroom-table" :loading="stuLoading" no-data-text="暂无学生">
|
|
|
|
|
|
+ <Table :columns="studentColumn" :data="students" @on-selection-change="(selections)=>{delSelections = selections}" :height="tableHeight" class="system-classroom-table" :loading="stuLoading" no-data-text="暂无学生">
|
|
<Loading slot="loading" bgColor="rgba(103, 103, 103, 0.27)"></Loading>
|
|
<Loading slot="loading" bgColor="rgba(103, 103, 103, 0.27)"></Loading>
|
|
<template slot-scope="{ row }" slot="picture">
|
|
<template slot-scope="{ row }" slot="picture">
|
|
<PersonalPhoto :name="row.name" :picture="row.picture" />
|
|
<PersonalPhoto :name="row.name" :picture="row.picture" />
|
|
</template>
|
|
</template>
|
|
|
|
+ <template slot-scope="{ row,index }" slot="no">
|
|
|
|
+ <span v-show="editIndex !== index">{{row.no}}</span>
|
|
|
|
+ <Input v-model="students[index].no" v-show="editIndex == index" style="width: 60px;" type="number" />
|
|
|
|
+ <Icon type="md-checkmark" v-show="editIndex == index" @click="confirmSetNo()" class="reset-no-btn" />
|
|
|
|
+ <Icon type="md-close" v-show="editIndex == index" @click="cancelSetNo()" class="reset-no-btn" />
|
|
|
|
+ </template>
|
|
<template slot-scope="{ row ,index}" slot="action">
|
|
<template slot-scope="{ row ,index}" slot="action">
|
|
<div class="item-tools" v-if="$access.can('admin.*|student-upd')">
|
|
<div class="item-tools" v-if="$access.can('admin.*|student-upd')">
|
|
- <Icon type="md-create" size="18" color="white" @click="editStudent(row)" :title="$t('schoolBaseInfo.editSeat')" />
|
|
|
|
|
|
+ <Icon type="md-create" size="18" color="white" @click="resetNo(index)" :title="$t('schoolBaseInfo.editSeat')" />
|
|
|
|
+ <Icon type="md-remove-circle" size="18" color="white" style="margin-left:10px" @click="removeStudent(index)" :title="$t('schoolBaseInfo.delStuBtn')" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<!-- <template slot-scope="{ row, index }" slot="groupId">
|
|
<!-- <template slot-scope="{ row, index }" slot="groupId">
|
|
@@ -316,7 +321,7 @@ import PersonalPhoto from "@/components/public/personalPhoto/Index.vue"
|
|
import StudentList from '@/components/coursemgt/StudentList.vue'
|
|
import StudentList from '@/components/coursemgt/StudentList.vue'
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
- PersonalPhoto,StudentList
|
|
|
|
|
|
+ PersonalPhoto, StudentList
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
// 验证只能是字母和数字
|
|
// 验证只能是字母和数字
|
|
@@ -333,12 +338,12 @@ export default {
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
studentColumn: [
|
|
studentColumn: [
|
|
- // {
|
|
|
|
- // title: ' ',
|
|
|
|
- // type: 'selection',
|
|
|
|
- // width: 60,
|
|
|
|
- // align: 'center'
|
|
|
|
- // },
|
|
|
|
|
|
+ {
|
|
|
|
+ title: ' ',
|
|
|
|
+ type: 'selection',
|
|
|
|
+ width: 60,
|
|
|
|
+ align: 'center'
|
|
|
|
+ },
|
|
{
|
|
{
|
|
title: ' ',
|
|
title: ' ',
|
|
slot: 'picture',
|
|
slot: 'picture',
|
|
@@ -358,7 +363,7 @@ export default {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: this.$t('courseManage.classroom.studentTableC1'),
|
|
title: this.$t('courseManage.classroom.studentTableC1'),
|
|
- key: 'no',
|
|
|
|
|
|
+ slot: 'no',
|
|
align: 'center',
|
|
align: 'center',
|
|
sortable: true
|
|
sortable: true
|
|
},
|
|
},
|
|
@@ -381,14 +386,17 @@ export default {
|
|
width: '150'
|
|
width: '150'
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ editIndex: -1,
|
|
|
|
+ resetNoBef: 0,
|
|
updHiteachLink: [],
|
|
updHiteachLink: [],
|
|
orgHiteachData: [],
|
|
orgHiteachData: [],
|
|
hiteachData: [],
|
|
hiteachData: [],
|
|
schoolBase: {
|
|
schoolBase: {
|
|
period: []
|
|
period: []
|
|
},
|
|
},
|
|
- selections:[],
|
|
|
|
- addStuStatus:false,
|
|
|
|
|
|
+ delSelections: [],//需要移除的学生
|
|
|
|
+ selections: [],//添加的学生
|
|
|
|
+ addStuStatus: false,
|
|
stuLoading: false,
|
|
stuLoading: false,
|
|
orderBy: 'id',
|
|
orderBy: 'id',
|
|
filterHiteachVer: 'ALL',
|
|
filterHiteachVer: 'ALL',
|
|
@@ -568,10 +576,55 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ resetNo(index) {
|
|
|
|
+ this.editIndex = index
|
|
|
|
+ this.resetNoBef = this.students[index].no
|
|
|
|
+ },
|
|
|
|
+ confirmSetNo() {
|
|
|
|
+ this.$api.stuAccount
|
|
|
|
+ saveAllStudent
|
|
|
|
+ },
|
|
|
|
+ cancelSetNo() {
|
|
|
|
+ this.students[this.editIndex].no = this.resetNoBef
|
|
|
|
+ this.editIndex = -1
|
|
|
|
+ },
|
|
|
|
+ //移除班级里面的学生
|
|
|
|
+ removeStudent(index) {
|
|
|
|
+ let requestParams = {
|
|
|
|
+ schoolId: this.$store.state.userInfo.schoolCode,
|
|
|
|
+ students: []
|
|
|
|
+ }
|
|
|
|
+ if (index > -1) {
|
|
|
|
+ requestParams.students.push(this.students[index])
|
|
|
|
+ } else if (this.delSelections.length > 0) {
|
|
|
|
+ requestParams.students = this.delSelections
|
|
|
|
+ }
|
|
|
|
+ if (requestParams.students.length) {
|
|
|
|
+ let names = requestParams.students.map(item => {
|
|
|
|
+ return item.name
|
|
|
|
+ })
|
|
|
|
+ this.$Modal.confirm({
|
|
|
|
+ title: this.$t('schoolBaseInfo.removeTile'),
|
|
|
|
+ content: `${this.$t('schoolBaseInfo.removeContent')}${names.join(', ')}?`,
|
|
|
|
+ onOk: () => {
|
|
|
|
+ this.$Message.warning('暂未对接API')
|
|
|
|
+ // this.$api.stuAccount.removeStudent(requestParams).then(
|
|
|
|
+ // res => {
|
|
|
|
+ // this.$Message.success(this.$t('schoolBaseInfo.removeOk'))
|
|
|
|
+ // },
|
|
|
|
+ // err => {
|
|
|
|
+ // this.$Message.error(this.$t('schoolBaseInfo.removeErr'))
|
|
|
|
+ // }
|
|
|
|
+ // )
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//确认添加学生
|
|
//确认添加学生
|
|
confirmAddStu() {
|
|
confirmAddStu() {
|
|
if (this.selections.length > 0) {
|
|
if (this.selections.length > 0) {
|
|
console.log(this.selections)
|
|
console.log(this.selections)
|
|
|
|
+ this.$Message.warning('暂未对接API')
|
|
//保存操作
|
|
//保存操作
|
|
// this.listLoading = true
|
|
// this.listLoading = true
|
|
// this.courseListP[this.curCusIndex].code = this.$store.state.userInfo.TEAMModelId
|
|
// this.courseListP[this.curCusIndex].code = this.$store.state.userInfo.TEAMModelId
|
|
@@ -597,6 +650,7 @@ export default {
|
|
// })
|
|
// })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
dropdownStates(flag) {
|
|
dropdownStates(flag) {
|
|
if (!flag) this.filterByPeriod()
|
|
if (!flag) this.filterByPeriod()
|
|
},
|
|
},
|
|
@@ -882,7 +936,6 @@ export default {
|
|
let image = new Image()
|
|
let image = new Image()
|
|
image.crossOrigin = 'anonymous'
|
|
image.crossOrigin = 'anonymous'
|
|
image.src = require('../../../assets/image/school_plan.jpg');
|
|
image.src = require('../../../assets/image/school_plan.jpg');
|
|
- //image.src = 'https://teammodelstorage.blob.core.chinacloudapi.cn/teammodelos/test/school_plan.jpg'
|
|
|
|
image.onload = function () {
|
|
image.onload = function () {
|
|
_this.schoolPlan.width = image.width
|
|
_this.schoolPlan.width = image.width
|
|
_this.schoolPlan.height = image.height
|
|
_this.schoolPlan.height = image.height
|
|
@@ -1005,14 +1058,11 @@ export default {
|
|
}
|
|
}
|
|
}, err => {
|
|
}, err => {
|
|
this.$Message.error(this.$t('schoolBaseInfo.bindingErr'))
|
|
this.$Message.error(this.$t('schoolBaseInfo.bindingErr'))
|
|
- }).finally(
|
|
|
|
- () => {
|
|
|
|
- this.isSaveLoading = false
|
|
|
|
- this.isListLoading = false
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ this.isSaveLoading = false
|
|
|
|
+ this.isListLoading = false
|
|
|
|
+ })
|
|
}
|
|
}
|
|
-
|
|
|
|
} else {
|
|
} else {
|
|
this.$Message.error('API error!')
|
|
this.$Message.error('API error!')
|
|
}
|
|
}
|
|
@@ -1020,13 +1070,10 @@ export default {
|
|
err => {
|
|
err => {
|
|
this.$Message.error('API error!')
|
|
this.$Message.error('API error!')
|
|
}
|
|
}
|
|
- )
|
|
|
|
- .finally(
|
|
|
|
- () => {
|
|
|
|
- this.isSaveLoading = false
|
|
|
|
- this.isListLoading = false
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
|
|
+ ).finally(() => {
|
|
|
|
+ this.isSaveLoading = false
|
|
|
|
+ this.isListLoading = false
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
@@ -1042,7 +1089,6 @@ export default {
|
|
this.updateBefore = JSON.stringify(this.classroomList[0])
|
|
this.updateBefore = JSON.stringify(this.classroomList[0])
|
|
}
|
|
}
|
|
this.filterClassname()
|
|
this.filterClassname()
|
|
-
|
|
|
|
// 預設搜尋給第一個
|
|
// 預設搜尋給第一個
|
|
// this.filterPeriod = res.school_base.period[0].id
|
|
// this.filterPeriod = res.school_base.period[0].id
|
|
if (this.periods) this.filterPeriod = this.periods[0].id
|
|
if (this.periods) this.filterPeriod = this.periods[0].id
|
|
@@ -1050,7 +1096,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
(err) => {
|
|
(err) => {
|
|
- console.log(err)
|
|
|
|
this.$Message.error('API error!')
|
|
this.$Message.error('API error!')
|
|
}
|
|
}
|
|
).finally(() => {
|
|
).finally(() => {
|
|
@@ -1094,17 +1139,14 @@ export default {
|
|
break
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
this.$api.schoolSetting.hiteachUnlinkByClassId({
|
|
this.$api.schoolSetting.hiteachUnlinkByClassId({
|
|
classId: this.classroomListShow[index].id,
|
|
classId: this.classroomListShow[index].id,
|
|
school_code: this.$store.state.userInfo.schoolCode
|
|
school_code: this.$store.state.userInfo.schoolCode
|
|
})
|
|
})
|
|
this.unlinkHiteach(this.classroomListShow[index].id) // 刪掉指定的classId
|
|
this.unlinkHiteach(this.classroomListShow[index].id) // 刪掉指定的classId
|
|
this.$store.dispatch('user/delSchoolClasses', this.classroomListShow[index].id);
|
|
this.$store.dispatch('user/delSchoolClasses', this.classroomListShow[index].id);
|
|
-
|
|
|
|
this.classroomList.splice(originIndex, 1)
|
|
this.classroomList.splice(originIndex, 1)
|
|
this.classroomListShow.splice(index, 1)
|
|
this.classroomListShow.splice(index, 1)
|
|
-
|
|
|
|
this.$Message.success(this.$t('schoolBaseInfo.csTips7'))
|
|
this.$Message.success(this.$t('schoolBaseInfo.csTips7'))
|
|
this.updated = false
|
|
this.updated = false
|
|
this.updHiteachLink = []
|
|
this.updHiteachLink = []
|
|
@@ -1163,13 +1205,8 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- isEmpty(obj) {
|
|
|
|
- if (typeof obj === 'undefined' || obj == null || obj == '') {
|
|
|
|
- return true
|
|
|
|
- } else {
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
|
|
+ // 这段代码应该是原来的hiteach序号相关代码,调整之后没用就可以删掉了, 我看没有调用这个方法了
|
|
chooseHiTeach(index) {
|
|
chooseHiTeach(index) {
|
|
if (this.editStatus) {
|
|
if (this.editStatus) {
|
|
this.$Message.warning('当前为不可编辑状态')
|
|
this.$Message.warning('当前为不可编辑状态')
|
|
@@ -1179,7 +1216,7 @@ export default {
|
|
if (this.hiTeachs[i].using > 0) {
|
|
if (this.hiTeachs[i].using > 0) {
|
|
this.$Message.warning(this.$t('schoolBaseInfo.csTips6'))
|
|
this.$Message.warning(this.$t('schoolBaseInfo.csTips6'))
|
|
} else {
|
|
} else {
|
|
- if (!this.isEmpty(this.classroomListShow[this.curClassIndex].sn)) {
|
|
|
|
|
|
+ if (this.classroomListShow[this.curClassIndex].sn) {
|
|
let showIndex = -1
|
|
let showIndex = -1
|
|
let allIndex = -1
|
|
let allIndex = -1
|
|
this.hiTeachsShow.forEach((v, i) => {
|
|
this.hiTeachsShow.forEach((v, i) => {
|
|
@@ -1404,7 +1441,6 @@ export default {
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.filterClassname()
|
|
this.filterClassname()
|
|
- // this.filterCode()
|
|
|
|
this.initData()
|
|
this.initData()
|
|
this.initHiteachData()
|
|
this.initHiteachData()
|
|
this.tableHeight = document.getElementById('class-list').clientHeight + 45
|
|
this.tableHeight = document.getElementById('class-list').clientHeight + 45
|
|
@@ -1427,8 +1463,6 @@ export default {
|
|
next()
|
|
next()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- watch: {
|
|
|
|
- },
|
|
|
|
created() {
|
|
created() {
|
|
this.initData()
|
|
this.initData()
|
|
if (this.$access.can('admin.*|classroom-upd')) this.editStatus = this.noStatus
|
|
if (this.$access.can('admin.*|classroom-upd')) this.editStatus = this.noStatus
|
|
@@ -1441,8 +1475,8 @@ export default {
|
|
@import "./ClassroomSetting.less";
|
|
@import "./ClassroomSetting.less";
|
|
</style>
|
|
</style>
|
|
<style>
|
|
<style>
|
|
-.class-mgt-container .ivu-table-row-hover .item-tools{
|
|
|
|
- display:inline-block ;
|
|
|
|
|
|
+.class-mgt-container .ivu-table-row-hover .item-tools {
|
|
|
|
+ display: inline-block;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
.class-info-content
|
|
.class-info-content
|