Merge pull request '选择学生checkbox 大小修改' (#95) from lyc-dev into main

This commit is contained in:
lyc 2024-08-02 15:33:40 +08:00
commit 34b35d8beb
2 changed files with 21 additions and 9 deletions

View File

@ -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()

View File

@ -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,9 +200,9 @@ export default {
this.$refs[formName].validate(valid => {
if (valid) {
/**
* 分班
* studentList 为选中的所有学生 这些学生可能来自不同班级
*/
* 根据学生列表中的classId分班
* studentList 为选中的所有学生 这些学生可能来自不同班级
*/
let gradeObj = groupBy(this.studentList, 'classId')
//
let ary = []
@ -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>