update:运动馆

This commit is contained in:
ltx 2026-04-28 13:31:48 +08:00
parent de386c2fce
commit 8892ddf0b3
4 changed files with 23 additions and 9 deletions

View File

@ -16,3 +16,8 @@ export function getSportsHallStudentsTestPageList(params) {
export function scorePush(params) { export function scorePush(params) {
return http.post('/api/SportsHall/ScorePush', params) return http.post('/api/SportsHall/ScorePush', params)
} }
// 成绩修正
export function correctScore(params) {
return http.post('/api/SportsHall/ScoreUpdate', params)
}

View File

@ -37,7 +37,7 @@
</div> </div>
</div> </div>
<div class="cont"> <div class="cont">
<el-table :data="data.tableNeed.tableData" style="width: calc(100% - 40px) ;height: calc(100vh - 210px); margin:0 20px ;" <el-table :data="data.tableNeed.tableData" style="width: calc(100% - 40px) ;height: 580px; margin:0 20px ;margin-bottom: 20px;"
fit="true" fit="true"
:header-cell-style="{ 'text-align': 'center', 'font-size': '12px', 'color': '#3F404A', padding: '3px', background: '#F8F8FA', height: '50px' }" :header-cell-style="{ 'text-align': 'center', 'font-size': '12px', 'color': '#3F404A', padding: '3px', background: '#F8F8FA', height: '50px' }"
:cell-style="getCellStyles" :row-style="{ height: '0px' }"> :cell-style="getCellStyles" :row-style="{ height: '0px' }">

View File

@ -1,6 +1,5 @@
<template> <template>
<div class="sport-hall-report"> <div class="sport-hall-report">
<!-- 搜索区域 --> <!-- 搜索区域 -->
<div class="search-card"> <div class="search-card">
<div class="search-row"> <div class="search-row">
@ -124,11 +123,11 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="操作" width="100" align="center" fixed="right"> <el-table-column label="操作" width="100" align="center" fixed="right">
<template #default="{ row }" width="100"> <template #default="{ row }" width="100">
<el-button type="primary" link @click="handleEdit(row)">成绩修正</el-button> <el-button type="primary" link :disabled="row.isDisplay" @click="handleEdit(row)">成绩修正</el-button>
</template> </template>
</el-table-column> --> </el-table-column>
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
@ -222,7 +221,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, onMounted } from 'vue' import { ref, reactive, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { importSportsHallStudentsTestData, getSportsHallStudentsTestPageList, scorePush as scorePushApi } from '@/api/sportsHall' import { importSportsHallStudentsTestData, getSportsHallStudentsTestPageList, scorePush as scorePushApi, correctScore } from '@/api/sportsHall'
import { GetGradeNames } from '@/api/grade' import { GetGradeNames } from '@/api/grade'
// ===================== 查询参数 ===================== // ===================== 查询参数 =====================
@ -415,6 +414,7 @@ const editDialog = reactive({ visible: false })
const editFormRef = ref() const editFormRef = ref()
const editForm = reactive({ const editForm = reactive({
id: null as any, id: null as any,
studentNo: '' as any,
studentName: '', studentName: '',
bmi: '' as any, bmi: '' as any,
lungCapacity: '' as any, lungCapacity: '' as any,
@ -427,6 +427,7 @@ const editForm = reactive({
const handleEdit = (row: any) => { const handleEdit = (row: any) => {
Object.assign(editForm, { Object.assign(editForm, {
id: row.id, id: row.id,
studentNo: row.studentNo,
studentName: row.studentName, studentName: row.studentName,
bmi: row.bmiValue ?? '', bmi: row.bmiValue ?? '',
lungCapacity: row.vitalCapacityValue ?? '', lungCapacity: row.vitalCapacityValue ?? '',
@ -440,8 +441,16 @@ const handleEdit = (row: any) => {
const handleEditConfirm = async () => { const handleEditConfirm = async () => {
try { try {
// TODO: 调用成绩修正接口 const params: any = {
// await updateSportHallScore(editForm) studentNo: editForm.studentNo
}
if (editForm.bmi !== '' && editForm.bmi !== null) params.bmiValue = Number(editForm.bmi)
if (editForm.lungCapacity !== '' && editForm.lungCapacity !== null) params.vitalCapacityValue = Number(editForm.lungCapacity)
if (editForm.sitAndReach !== '' && editForm.sitAndReach !== null) params.sit_And_ReachValue = Number(editForm.sitAndReach)
if (editForm.ropeSkipping !== '' && editForm.ropeSkipping !== null) params.oneMinuteJumpRopeValue = Number(editForm.ropeSkipping)
if (editForm.sitUp !== '' && editForm.sitUp !== null) params.one_Minute_Sit_UpValue = Number(editForm.sitUp)
if (editForm.standingLongJump !== '' && editForm.standingLongJump !== null) params.standingLongJumpValue = Number(editForm.standingLongJump)
await correctScore(params)
ElMessage.success('修正成功') ElMessage.success('修正成功')
editDialog.visible = false editDialog.visible = false
fetchList() fetchList()

View File

@ -15,7 +15,7 @@ export default ({ mode }: ConfigEnv) => {
console.log(`ENV:`, ENV) console.log(`ENV:`, ENV)
return defineConfig({ return defineConfig({
base: 'https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/web/samart-static/202604241737/', base: 'https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/web/samart-static/202604271325/',
server: { server: {
host: '0.0.0.0', host: '0.0.0.0',
// https: false, // https: false,