Compare commits
2 Commits
1be862a0f2
...
34b35d8beb
Author | SHA1 | Date |
---|---|---|
lyc | 34b35d8beb | |
lyc | 921ce6ecb0 |
|
@ -169,8 +169,8 @@ const getTreeData = () => {
|
|||
let upData = transData(volumeOne.value)
|
||||
let downData = transData(volumeTwo.value)
|
||||
treeData.value = upData.length ? upData : downData
|
||||
defaultExpandedKeys.value = [treeData.value[0].id]
|
||||
nextTick(() => {
|
||||
defaultExpandedKeys.value = [treeData.value[0].id]
|
||||
currentNodeId.value = getLastLevelData(treeData.value)[0].id
|
||||
currentNodeName.value = getLastLevelData(treeData.value)[0].label
|
||||
emitChangeBook()
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<i class="iconfont icon-guanbi" @click="cloneDialog"></i>
|
||||
</div>
|
||||
</template>
|
||||
<div>
|
||||
<div v-loading="setLoading">
|
||||
<el-form :model="form" label-width="80px" ref="ruleForm" :rules="rules">
|
||||
<el-form-item label="班级" prop="grade">
|
||||
<el-scrollbar max-height="200px" style="width: 100%;">
|
||||
|
@ -31,7 +31,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="截止时间" prop="deaddate">
|
||||
<el-date-picker v-model="form.deaddate" value-format="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm"
|
||||
time-format="HH:mm" type="datetime" placeholder="请选择截止时间" />
|
||||
time-format="HH:mm" type="datetime" :clearable="false" placeholder="请选择截止时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="推荐用时" prop="timelength">
|
||||
<el-input-number v-model="form.timelength" :min="1" :max="500" />
|
||||
|
@ -79,7 +79,7 @@ export default {
|
|||
label: 'label',
|
||||
isLeaf: 'leaf',
|
||||
},
|
||||
treeData: [],
|
||||
setLoading: false,
|
||||
// 用户信息
|
||||
userInfo: null,
|
||||
// 班级列表
|
||||
|
@ -111,10 +111,8 @@ export default {
|
|||
//截至时间默认值
|
||||
this.form.deaddate = this.getCurrentDate() + ' ' + '10:00:00'
|
||||
this.userInfo = useUserStore().user
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 获取班级列表
|
||||
getGradeList() {
|
||||
listClassmain({ classuserid: this.userInfo.userId, pageSize: 100, status: 'open' }).then(res => {
|
||||
|
@ -202,7 +200,7 @@ export default {
|
|||
this.$refs[formName].validate(valid => {
|
||||
if (valid) {
|
||||
/**
|
||||
* 分班
|
||||
* 根据学生列表中的classId分班
|
||||
* studentList 为选中的所有学生 这些学生可能来自不同班级
|
||||
*/
|
||||
let gradeObj = groupBy(this.studentList, 'classId')
|
||||
|
@ -234,11 +232,15 @@ export default {
|
|||
}
|
||||
ary.push(obj)
|
||||
}
|
||||
this.setLoading = true
|
||||
saveByClassWorkArray({
|
||||
classworkarray: JSON.stringify(ary)
|
||||
}).then(() => {
|
||||
this.setLoading = false
|
||||
ElMessage.success('操作成功')
|
||||
this.cloneDialog()
|
||||
}).catch(()=>{
|
||||
this.setLoading = false
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
@ -305,4 +307,14 @@ export default {
|
|||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.dialog-footer{
|
||||
padding-bottom: 10px
|
||||
}
|
||||
|
||||
:deep(.el-checkbox){
|
||||
transform : scale(1.3)
|
||||
}
|
||||
:deep(.el-icon){
|
||||
transform : scale(1.3)
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue