feat: 添加分数更新功能

This commit is contained in:
2025-09-23 12:51:53 +08:00
parent 330ea3d2c6
commit abfdcbb07b
3 changed files with 57 additions and 22 deletions

View File

@@ -232,8 +232,16 @@
@click="auditStatus(2, record.id)"
type="link"
>拒绝
</a-button
>
</a-button>
<a-button
v-if="checkPer(permissions)"
:disabled="record.isLeader === '1'"
@click="handleUpdateScore(record.id, record)"
type="link"
class="mr-10"
info
>更新
</a-button>
<a-button
v-if="checkPer(permissions)"
:disabled="record.isLeader === '1'"
@@ -241,8 +249,7 @@
type="link"
danger
>删除
</a-button
>
</a-button>
</a-space>
</template>
</a-table>
@@ -392,7 +399,7 @@
</template>
<script setup lang="jsx">
import {computed, defineProps, onMounted, ref, watch} from "vue";
import {delStudentList, getStuPage, batchUpdateStatus, auditStudentBatch} from "@/api/index1";
import {delStudentList, getStuPage, batchUpdateStatus, auditStudentBatch, updateScore} from "@/api/index1";
import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue";
import CommonStudent from "@/components/student/CommonStudent";
import ChangeLevelModal from "./ChangeLevelModal.vue";
@@ -945,6 +952,24 @@ function startLoading() {
tableData.value.loading = true;
}
/**
* 更新分数详情
* @param id {string}
* @param record {Object|undefined}
*/
function handleUpdateScore(id,record = void 0){
const {studentId} = record
if (!studentId) return
const pid = props.id
// console.log(`pid`, pid,"studentId", studentId )
// console.log(props.columns)
tableData.value.loading = true
updateScore({pid, studentId}).then(response=>{
const {examinationScore} = response.data
record.examinationScore = examinationScore
tableData.value.loading = false
})
}
defineExpose({ getStuList, startLoading });
</script>
<style lang="scss">