选择学生checkbox 大小修改

This commit is contained in:
lyc 2024-08-02 15:08:36 +08:00
parent 9ef553f8eb
commit 921ce6ecb0
2 changed files with 21 additions and 9 deletions

View File

@ -169,8 +169,8 @@ const getTreeData = () => {
let upData = transData(volumeOne.value) let upData = transData(volumeOne.value)
let downData = transData(volumeTwo.value) let downData = transData(volumeTwo.value)
treeData.value = upData.length ? upData : downData treeData.value = upData.length ? upData : downData
defaultExpandedKeys.value = [treeData.value[0].id]
nextTick(() => { nextTick(() => {
defaultExpandedKeys.value = [treeData.value[0].id]
currentNodeId.value = getLastLevelData(treeData.value)[0].id currentNodeId.value = getLastLevelData(treeData.value)[0].id
currentNodeName.value = getLastLevelData(treeData.value)[0].label currentNodeName.value = getLastLevelData(treeData.value)[0].label
emitChangeBook() emitChangeBook()

View File

@ -7,7 +7,7 @@
<i class="iconfont icon-guanbi" @click="cloneDialog"></i> <i class="iconfont icon-guanbi" @click="cloneDialog"></i>
</div> </div>
</template> </template>
<div> <div v-loading="setLoading">
<el-form :model="form" label-width="80px" ref="ruleForm" :rules="rules"> <el-form :model="form" label-width="80px" ref="ruleForm" :rules="rules">
<el-form-item label="班级" prop="grade"> <el-form-item label="班级" prop="grade">
<el-scrollbar max-height="200px" style="width: 100%;"> <el-scrollbar max-height="200px" style="width: 100%;">
@ -31,7 +31,7 @@
</el-form-item> </el-form-item>
<el-form-item label="截止时间" prop="deaddate"> <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" <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>
<el-form-item label="推荐用时" prop="timelength"> <el-form-item label="推荐用时" prop="timelength">
<el-input-number v-model="form.timelength" :min="1" :max="500" /> <el-input-number v-model="form.timelength" :min="1" :max="500" />
@ -79,7 +79,7 @@ export default {
label: 'label', label: 'label',
isLeaf: 'leaf', isLeaf: 'leaf',
}, },
treeData: [], setLoading: false,
// //
userInfo: null, userInfo: null,
// //
@ -111,10 +111,8 @@ export default {
// //
this.form.deaddate = this.getCurrentDate() + ' ' + '10:00:00' this.form.deaddate = this.getCurrentDate() + ' ' + '10:00:00'
this.userInfo = useUserStore().user this.userInfo = useUserStore().user
}, },
methods: { methods: {
// //
getGradeList() { getGradeList() {
listClassmain({ classuserid: this.userInfo.userId, pageSize: 100, status: 'open' }).then(res => { listClassmain({ classuserid: this.userInfo.userId, pageSize: 100, status: 'open' }).then(res => {
@ -202,7 +200,7 @@ export default {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
/** /**
* 分班 * 根据学生列表中的classId分班
* studentList 为选中的所有学生 这些学生可能来自不同班级 * studentList 为选中的所有学生 这些学生可能来自不同班级
*/ */
let gradeObj = groupBy(this.studentList, 'classId') let gradeObj = groupBy(this.studentList, 'classId')
@ -234,11 +232,15 @@ export default {
} }
ary.push(obj) ary.push(obj)
} }
this.setLoading = true
saveByClassWorkArray({ saveByClassWorkArray({
classworkarray: JSON.stringify(ary) classworkarray: JSON.stringify(ary)
}).then(() => { }).then(() => {
this.setLoading = false
ElMessage.success('操作成功') ElMessage.success('操作成功')
this.cloneDialog() this.cloneDialog()
}).catch(()=>{
this.setLoading = false
}) })
} else { } else {
return false return false
@ -305,4 +307,14 @@ export default {
margin-right: 10px; margin-right: 10px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.dialog-footer{
padding-bottom: 10px
}
:deep(.el-checkbox){
transform : scale(1.3)
}
:deep(.el-icon){
transform : scale(1.3)
}
</style> </style>