From ff46cc24356b2cd2f23ab3cd7892e61b682d2b8c Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: Mon, 11 May 2026 10:03:42 +0800
Subject: [PATCH] 主线提交
---
src/views/onlineEducation/classHourBatch/index.vue | 94 +++++++++++++++++++++++++++++++++++++++++------
1 files changed, 82 insertions(+), 12 deletions(-)
diff --git a/src/views/onlineEducation/classHourBatch/index.vue b/src/views/onlineEducation/classHourBatch/index.vue
index 71bcabd..d264e80 100644
--- a/src/views/onlineEducation/classHourBatch/index.vue
+++ b/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>
@@ -55,11 +84,11 @@
import batchDialog from './components/batchDialog.vue'
import classHourChange from './components/classHourChange.vue'
import Cookies from "js-cookie";
-import {useRouter} from 'vue-router'
+import {useRoute, useRouter} from 'vue-router'
const router = useRouter()
import {delQuestionBank, getQuestionBank} from "@/api/onlineEducation/questionBank";
import {delBatch, getBatch} from "@/api/onlineEducation/batch";
-
+const route = useRoute()
const { proxy } = getCurrentInstance();
const loading = ref(false);
@@ -67,6 +96,8 @@
const classHourRef = ref();
const data = reactive({
queryParams: {
+ name: '',
+ level: null,
pageNum: 1,
pageSize: 10,
},
@@ -75,13 +106,39 @@
isAdmin: false,
companyName: '',
remainPeriod: null,
- companyId: null
+ companyId: null,
+ levelList: [
+ {
+ id: 1,
+ name: '公司级 '
+ },
+ {
+ id: 2,
+ name: '部门级'
+ },
+ {
+ id: 3,
+ name: '车间级'
+ },
+ {
+ id: 4,
+ name: '其他'
+ },
+ ],
});
const { queryParams, total, dataList } = toRefs(data);
onMounted(async ()=>{
+ if(route.query.val){
+ const val = JSON.parse(route.query.val)
+ if(val){
+ data.queryParams.pageNum = val.pageNum;
+ data.queryParams.pageSize = val.pageSize;
+ }
+ }
+
const userInfo = JSON.parse(Cookies.get('userInfo'))
console.log("userInfo",userInfo)
if(userInfo.userType === 0){
@@ -122,7 +179,13 @@
/** 重置新增的表单以及其他数据 */
function reset() {
- proxy.resetForm("roleRef");
+ data.queryParams = {
+ name: '',
+ level: null,
+ pageNum: 1,
+ pageSize: 10,
+ }
+ getList()
}
const handleDelete = (val) => {
ElMessageBox.confirm(
@@ -144,7 +207,14 @@
})
}
const toStuChoose = (val) => {
- const v = JSON.stringify(val)
+ const obj = {
+ pageNum: data.queryParams.pageNum,
+ pageSize: data.queryParams.pageSize,
+ id: val.id
+ }
+ // val.pageNum = data.queryParams.pageNum;
+ // val.pageSize = data.queryParams.pageSize
+ const v = JSON.stringify(obj)
router.push({ path: "/chooseStu", query: { val: v } });
}
--
Gitblit v1.9.2