|
|
@@ -17,10 +17,10 @@
|
|
|
@keyup.enter="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="所在校区" prop="schoolId">
|
|
|
+ <el-form-item label="所在学校" prop="schoolId">
|
|
|
<el-select
|
|
|
v-model="queryParams.schoolId"
|
|
|
- placeholder="请选择所在校区"
|
|
|
+ placeholder="请选择所在学校"
|
|
|
clearable
|
|
|
style="width: 240px"
|
|
|
@keyup.enter="handleQuery"
|
|
|
@@ -33,6 +33,22 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="培训校区" prop="campusId">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.campusId"
|
|
|
+ placeholder="请选择培训校区"
|
|
|
+ clearable
|
|
|
+ style="width: 240px"
|
|
|
+ @keyup.enter="handleQuery"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in campusOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
@@ -83,9 +99,10 @@
|
|
|
|
|
|
<el-table v-loading="loading" :data="teacherList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="ID" align="center" prop="teacherId" />
|
|
|
+ <el-table-column label="教师ID/账号" align="center" prop="teacherId" />
|
|
|
<el-table-column label="教师姓名" align="center" prop="name" />
|
|
|
- <el-table-column label="所在校区" align="center" prop="schoolName" />
|
|
|
+ <el-table-column label="所在学校" align="center" prop="schoolName" />
|
|
|
+ <el-table-column label="培训校区" align="center" prop="campusName" />
|
|
|
<el-table-column label="所在机构" align="center" prop="deptName" />
|
|
|
<el-table-column label="用户ID" align="center" prop="userId" />
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
@@ -114,8 +131,8 @@
|
|
|
<el-form-item label="教师姓名" prop="name">
|
|
|
<el-input v-model="form.name" placeholder="请输入教师姓名" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="所在校区" prop="schoolId">
|
|
|
- <el-select v-model="form.schoolId" placeholder="请选择所在校区" style="width: 100%">
|
|
|
+ <el-form-item label="所在学校" prop="schoolId">
|
|
|
+ <el-select v-model="form.schoolId" placeholder="请选择所在学校" style="width: 100%">
|
|
|
<el-option
|
|
|
v-for="item in schoolOptions"
|
|
|
:key="item.id"
|
|
|
@@ -124,6 +141,16 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="培训校区" prop="campusId">
|
|
|
+ <el-select v-model="form.campusId" placeholder="请选择培训校区" style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="item in campusOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
@@ -166,6 +193,7 @@
|
|
|
<script setup name="Teacher">
|
|
|
import { listTeacher, getTeacher, delTeacher, addTeacher, updateTeacher } from "@/api/dz/teacher"
|
|
|
import { listAllSchool } from "@/api/dz/school"
|
|
|
+import {listCampus} from "@/api/dz/campus"
|
|
|
import { listAllClass } from "@/api/dz/classes"
|
|
|
import { batchBindTeacherClass,listAllTeacherClass } from "@/api/dz/teacherclass"
|
|
|
|
|
|
@@ -173,6 +201,7 @@ const { proxy } = getCurrentInstance()
|
|
|
|
|
|
const teacherList = ref([])
|
|
|
const schoolOptions = ref([])
|
|
|
+const campusOptions = ref([])
|
|
|
const classOptions = ref([])
|
|
|
const open = ref(false)
|
|
|
const openTeacherClass = ref(false)
|
|
|
@@ -197,6 +226,7 @@ const data = reactive({
|
|
|
pageSize: 10,
|
|
|
userId: null,
|
|
|
schoolId: null,
|
|
|
+ campusId: null,
|
|
|
name: null
|
|
|
},
|
|
|
rules: {
|
|
|
@@ -227,6 +257,12 @@ function getSchoolList() {
|
|
|
schoolOptions.value = response.data || []
|
|
|
})
|
|
|
}
|
|
|
+/** 查询校区列表 */
|
|
|
+function getCampusList() {
|
|
|
+ listCampus().then(response => {
|
|
|
+ campusOptions.value = response.rows || []
|
|
|
+ })
|
|
|
+}
|
|
|
|
|
|
// function getClassListBySchool() {
|
|
|
// listAll().then(response => {
|
|
|
@@ -247,6 +283,7 @@ function reset() {
|
|
|
teacherId: null,
|
|
|
userId: null,
|
|
|
schoolId: null,
|
|
|
+ campusId: null,
|
|
|
name: null
|
|
|
}
|
|
|
proxy.resetForm("teacherRef")
|
|
|
@@ -394,6 +431,7 @@ function submitFormTeacherClass() {
|
|
|
|
|
|
onMounted(() => {
|
|
|
getSchoolList()
|
|
|
+ getCampusList()
|
|
|
getList()
|
|
|
// getClassListBySchool()
|
|
|
})
|