zhouwx
2024-07-17 c1823a7f91775fd157d4e4683b597d7e426cd2ed
src/views/onlineEducation/classHourBatch/index.vue
@@ -26,8 +26,8 @@
      <el-table-column label="课程" prop="courseName" align="center"  />
      <el-table-column label="学习人数" prop="studentCount" align="center"  />
      <el-table-column label="总课时" prop="coursePeriodNum" align="center"  />
      <el-table-column label="已完成人数" prop="" align="center"  />
      <el-table-column label="完成率" prop="" align="center"  />
      <el-table-column label="已完成人数" prop="finishCount" align="center"  />
      <el-table-column label="完成率" prop="finishRate" align="center"  />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width"  width="180">
        <template #default="scope">
          <el-button link type="primary" @click="toStuChoose(scope.row)">学生数据</el-button>
@@ -74,7 +74,8 @@
  dataList: [],
  isAdmin: false,
  companyName: '',
  remainPeriod: null
  remainPeriod: null,
  companyId: null
});
@@ -89,6 +90,7 @@
    data.remainPeriod = userInfo.remainPeriod ? (userInfo.remainPeriod /60).toFixed(2).replace(/\.00$/, ''):''
    data.isAdmin = false;
    data.companyName = userInfo.companyName
    data.companyId = userInfo.companyId
  }
  await getList()
})
@@ -103,7 +105,8 @@
    data.dataList = res.data.list.map(item => {
      return {
        ...item,
        coursePeriodNum: item.coursePeriod ? (item.coursePeriod /60).toFixed(2).replace(/\.00$/, '') + '分钟':''
        coursePeriodNum: item.coursePeriod ? (item.coursePeriod /60).toFixed(2).replace(/\.00$/, '') + '分钟':'',
        finishRate: item.finishCount ?  item.finishCount ===0 && item.studentCount ===0  ? '0%': (item.finishCount / item.studentCount).toFixed(2) *100 + '%' : ''
      }
    })
    data.total = res.data.total
@@ -146,6 +149,6 @@
}
const openDetail = () => {
  classHourRef.value.openDialog()
  classHourRef.value.openDialog(data.companyId)
}
</script>