From 4f6cdee3d3a9967b6955aacc354bf557430c0643 Mon Sep 17 00:00:00 2001 From: zhouwx <1175765986@qq.com> Date: 星期一, 05 八月 2024 17:05:16 +0800 Subject: [PATCH] 批改 --- src/views/onlineEducation/classHourBatch/components/classHourChange.vue | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/views/onlineEducation/classHourBatch/components/classHourChange.vue b/src/views/onlineEducation/classHourBatch/components/classHourChange.vue index 51d6e63..37c0b64 100644 --- a/src/views/onlineEducation/classHourBatch/components/classHourChange.vue +++ b/src/views/onlineEducation/classHourBatch/components/classHourChange.vue @@ -5,12 +5,14 @@ :title="state.title" width="50%" :before-close="handleClose" + :close-on-press-escape="false" + :close-on-click-modal="false" > <el-table v-loading="state.loading" :data="state.dataList" :border="true"> <el-table-column label="创建时间" prop="createTime" align="center" width="180" /> <el-table-column label="变动来源" prop="origin" align="center" /> - <el-table-column label="变动情况" prop="modifyPeriod" align="center" /> - <el-table-column label="变动后剩余(分)" prop="remainPeriod" align="center" /> + <el-table-column label="变动情况" prop="modifyPeriodMin" align="center" /> + <el-table-column label="变动后剩余" prop="remainPeriodMin" align="center" /> <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">--> <!-- <template #default="scope">--> <!-- <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>--> @@ -54,7 +56,8 @@ dataList: [], queryParams: { pageNum: 1, - pageSize: 10 + pageSize: 10, + companyId: null }, total: 0, title: '' @@ -63,13 +66,20 @@ const openDialog = async (value) => { state.title = '课时余量变动明细' dialogVisible.value = true; + state.queryParams.companyId = value await getList() } const getList = async () => { state.loading = true const res = await getCompanyPeriod(state.queryParams) if(res.code == 200){ - state.dataList = res.data.list + state.dataList = res.data.list.map(item => { + return { + ...item, + modifyPeriodMin: item.modifyPeriod ? item.modifyPeriod >0 ?'新增 '+(item.modifyPeriod /60).toFixed(2).replace(/\.00$/, '')+'分钟':'减少 '+ (Math.abs(item.modifyPeriod /60)).toFixed(2).replace(/\.00$/, '')+'分钟' : '', + remainPeriodMin: item.remainPeriod ? (item.remainPeriod /60).toFixed(2).replace(/\.00$/, '')+'分钟' : '' + } + }) state.total = res.data.total }else{ ElMessage.warning(res.message) -- Gitblit v1.9.2