|
@@ -105,10 +105,6 @@
|
|
|
<Icon type="md-trash" size="16" />
|
|
|
<span>移除名单</span>
|
|
|
</span>
|
|
|
- <!-- <span v-show="curTab == 1">授课教室:</span>
|
|
|
- <Select v-show="curTab == 1" v-model="setCurClass" style="width:200px;margin-right:30px" size="small">
|
|
|
- <Option v-for="(item,index) in schdClassList" :value="item.classId" :key="index">{{ item.classInfo.name }}</Option>
|
|
|
- </Select> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 教师上课时段设置 -->
|
|
@@ -192,10 +188,6 @@
|
|
|
<!-- 添加名单UI -->
|
|
|
<div slot="right" class="class-setting dark-el-cascader dark-iview-select dark-iview-table" v-show="isAddStuList">
|
|
|
<div class="add-list-header">
|
|
|
- <!-- <span class="add-list-label">教师:</span>
|
|
|
- <Select ref="sltStuList" clearable label-in-value v-model="schedule.teacherId" style="width:200px;margin-right:30px" size="small" @on-change="setTeaName">
|
|
|
- <Option v-for="(item,index) in $store.state.teachers.teacherList" :value="item.id" :key="index">{{ item.name }}</Option>
|
|
|
- </Select> -->
|
|
|
<span class="add-list-label">教室:</span>
|
|
|
<el-cascader size="small" placeholder="请设置上课教室" :show-all-levels="false" clearable v-model="schedule.classId" :options="csOptions" :props="props" @change="setClassName($event,'insert')" style="width:180px;">
|
|
|
</el-cascader>
|
|
@@ -298,12 +290,14 @@
|
|
|
</FormItem>
|
|
|
</Form>
|
|
|
</Modal>
|
|
|
- <!-- 添加授课教师 -->
|
|
|
- <!-- <Modal v-model="addTeaStatus" title="添加教师" class-name="dark-iview-modal dark-iview-select" @on-ok="confirmAddTea">
|
|
|
- <Select ref="addTea" label-in-value multiple clearable :placeholder="$t('cusMgt.teacherHolder')" :max-tag-count="3" filterable @on-change="seltChange">
|
|
|
- <Option v-for="(item,index) in $store.state.teachers.teacherList" :value="item.id" :key="index">{{ item.name }}</Option>
|
|
|
- </Select>
|
|
|
- </Modal> -->
|
|
|
+ <!-- 创建名单stulist -->
|
|
|
+ <Modal v-model="addStuListStatus" title="创建自定义名单" width="1200" @on-ok="confirmAddStuList" class-name="dark-iview-modal" :loading="modalLoading">
|
|
|
+ <div class="dark-iview-input list-name-box">
|
|
|
+ <span>名称:</span>
|
|
|
+ <Input v-model="listName" placeholder="请输入名单名称..." style="width: 300px" />
|
|
|
+ </div>
|
|
|
+ <StudentList @getSelectInfo="(selction)=>{listSelections = selction}"></StudentList>
|
|
|
+ </Modal>
|
|
|
<!-- 时段设置 -->
|
|
|
<Drawer title="时段设置" class-name="dark-iview-drawer" :closable="false" v-model="showTime" :width="450">
|
|
|
<TimeSetting :periodId="filterPeriod"></TimeSetting>
|
|
@@ -333,6 +327,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
+ listName:'',
|
|
|
+ addStuListStatus: false,
|
|
|
+ modalLoading:false,
|
|
|
+ listSelections:[],
|
|
|
isUpd: false,
|
|
|
props: {
|
|
|
value: 'id',
|
|
@@ -494,8 +492,8 @@ export default {
|
|
|
id: '',
|
|
|
name: ''
|
|
|
},
|
|
|
- teacherId:'',
|
|
|
- teacherName:'',
|
|
|
+ teacherId: '',
|
|
|
+ teacherName: '',
|
|
|
stulist: '',
|
|
|
time: [],
|
|
|
notice: ''
|
|
@@ -503,6 +501,51 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ confirmAddStuList() {
|
|
|
+ if (!this.listName) {
|
|
|
+ this.$Message.warning('请输入名单名称')
|
|
|
+ this.modalLoading = false
|
|
|
+ setTimeout(() => {
|
|
|
+ this.modalLoading = true
|
|
|
+ }, 0)
|
|
|
+ } else {
|
|
|
+ let stuList = {
|
|
|
+ name: this.listName,
|
|
|
+ id: this.$tools.guid(),
|
|
|
+ code: this.$store.state.userInfo.schoolCode,
|
|
|
+ students: this.listSelections.map(item => { //这里没有学生名字, 需要先查看id集合再查学生信息?
|
|
|
+ return {
|
|
|
+ id: item.id,
|
|
|
+ code: item.code //学生所在学校的编码,这里先传当前学校编码,暂无未考虑跨校名单
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ tmids: [],
|
|
|
+ course: null
|
|
|
+ }
|
|
|
+ this.saveStuList(stuList)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 保存名单
|
|
|
+ saveStuList(stuList) {
|
|
|
+ let params = {
|
|
|
+ stuList,
|
|
|
+ scope: "school"
|
|
|
+ }
|
|
|
+ this.$api.courseMgmt.upsertStulist(params).then(
|
|
|
+ res => {
|
|
|
+ this.$Message.success('添加成功')
|
|
|
+ this.addStuStatus = false
|
|
|
+ this.stuList.unshift(params.stuList)
|
|
|
+ this.listName = ''
|
|
|
+ },
|
|
|
+ err => {
|
|
|
+ this.modalLoading = false
|
|
|
+ setTimeout(() => {
|
|
|
+ this.modalLoading = true
|
|
|
+ }, 0)
|
|
|
+ }
|
|
|
+ )
|
|
|
+ },
|
|
|
selectCus(index) {
|
|
|
this.selectClass(0)
|
|
|
this.selectTea(0)
|
|
@@ -728,8 +771,8 @@ export default {
|
|
|
id: '',
|
|
|
name: ''
|
|
|
},
|
|
|
- teacherId:'',
|
|
|
- teacherName:'',
|
|
|
+ teacherId: '',
|
|
|
+ teacherName: '',
|
|
|
stulist: '',
|
|
|
time: [],
|
|
|
notice: ''
|
|
@@ -782,7 +825,7 @@ export default {
|
|
|
removeStuList() {
|
|
|
this.$Modal.confirm({
|
|
|
title: '移除名单',
|
|
|
- content: `是否确认移除${this.schdList[this.curClassIndex].listName || this.schdList[this.curClassIndex].classInfo.name }?`,
|
|
|
+ content: `是否确认移除${this.schdList[this.curClassIndex].listName || this.schdList[this.curClassIndex].classInfo.name}?`,
|
|
|
onOk: () => {
|
|
|
for (let i in this.courseListShow[this.curCusIndex].schedule) {
|
|
|
let curSchd = this.schdList[this.curClassIndex]
|
|
@@ -816,9 +859,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
goMgtStuList() {
|
|
|
- this.$router.push({
|
|
|
- name: 'MgtStuList'
|
|
|
- })
|
|
|
+ //不用跳转页面进行操作
|
|
|
+ // this.$router.push({
|
|
|
+ // name: 'MgtStuList'
|
|
|
+ // })
|
|
|
+ // 在当前页面添加stulist
|
|
|
+ this.addStuListStatus = true
|
|
|
},
|
|
|
// 切换课表模式和课程模式
|
|
|
toggleView() {
|