zhouwx
2024-07-19 e3bfce922c47cf8706be6eada6f5edbd38f39316
src/views/onlineEducation/classHourBatch/index.vue
@@ -1,12 +1,41 @@
<template>
  <div class="app-container">
    <div style="margin-bottom: 10px;display: flex;align-items: center;justify-content: space-between">
      <el-button
          type="primary"
          plain
          icon="Plus"
          @click="openDialog('add',{})"
      >新增批次</el-button>
    <div style="display: flex;justify-content: space-between">
      <el-form :inline="true" style="display: flex;align-items: center;flex-wrap: wrap;" >
        <el-form-item>
          <el-button
              type="primary"
              plain
              icon="Plus"
              @click="openDialog('add',{})"
          >新增批次</el-button>
        </el-form-item>
        <el-form-item label="批次名称:" >
          <el-input v-model="data.queryParams.name" placeholder="请输入批次名称"></el-input>
        </el-form-item>
        <el-form-item label="批次级别:" >
          <el-select
              v-model="data.queryParams.level"
              class="w100"
              style="max-width: 180px"
              clearable
              size="default"
          >
            <el-option v-for="item in data.levelList" :key="item.id" :label="item.name" :value="item.id"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item >
          <el-button
              type="primary"
              @click="getList"
          >查询</el-button>
          <el-button
              type="primary"
              plain
              @click="reset"
          >重置</el-button>
        </el-form-item>
      </el-form>
      <span v-if="!data.isAdmin" style="font-size: 19px;font-weight: 600;margin-right: 20px">
        {{data.companyName}},您的企业当前系统可用课时总计
        <span style="font-size: 19px;font-weight: 600;color: #1ab394">{{data.remainPeriod}}</span> 分钟。<span @click="openDetail" style="cursor: pointer; font-size: 19px;font-weight: 600;color: #1890ff">[明细]</span>
@@ -67,6 +96,8 @@
const classHourRef = ref();
const data = reactive({
  queryParams: {
    name: '',
    level: null,
    pageNum: 1,
    pageSize: 10,
  },
@@ -75,7 +106,25 @@
  isAdmin: false,
  companyName: '',
  remainPeriod: null,
  companyId: null
  companyId: null,
  levelList: [
    {
      id: 1,
      name: '公司级 '
    },
    {
      id: 2,
      name: '部门级'
    },
    {
      id: 3,
      name: '车间级'
    },
    {
      id: 4,
      name: '其他'
    },
  ],
});
@@ -122,7 +171,13 @@
/** 重置新增的表单以及其他数据  */
function reset() {
  proxy.resetForm("roleRef");
  data.queryParams = {
    name: '',
    level: null,
    pageNum: 1,
    pageSize: 10,
  }
  getList()
}
const handleDelete = (val) => {
  ElMessageBox.confirm(