Forráskód Böngészése

老师及一些修正提交

mingfu 1 hónapja
szülő
commit
7c8443ecba

+ 13 - 2
back-ui/src/views/dz/teacher/index.vue

@@ -85,7 +85,7 @@
       <el-table-column type="selection" width="55" align="center" />
       <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="deptName" />
       <el-table-column label="用户ID" align="center" prop="userId" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -142,6 +142,9 @@
               <el-form-item label="教师姓名" prop="name">
                   <el-input v-model="formTeacherClass.name" placeholder="请输入教师姓名" disabled/>
               </el-form-item>
+              <el-form-item label="学校校区" prop="name">
+                  <el-input v-model="formTeacherClass.schoolName" placeholder="请输入教师姓名" disabled/>
+              </el-form-item>
               <el-form-item label="关联班级" prop="classIds">
                   <el-select v-model="formTeacherClass.classIds" multiple placeholder="请选择班级" style="width: 100%">
                       <el-option
@@ -168,6 +171,7 @@ import { listTeacher, getTeacher, delTeacher, addTeacher, updateTeacher } from "
 import { listAllSchool } from "@/api/dz/school"
 import { listAllClass } from "@/api/dz/classes"
 import { batchBindTeacherClass,listAllTeacherClass } from "@/api/dz/teacherclass"
+import {getCampusSchoolList} from "@/api/dz/cards.js";
 
 const { proxy } = getCurrentInstance()
 
@@ -189,6 +193,7 @@ const data = reactive({
   form: {},
   formTeacherClass: {
       teacherId: null,
+      schoolName: null,
       name: null,
       classIds: []
   },
@@ -223,11 +228,15 @@ function getList() {
 
 /** 查询校区列表 */
 function getSchoolList() {
-  listAllSchool().then(response => {
+  getCampusSchoolList({
+    pageNum: 1,
+    pageSize: 9999,
+  }).then(response => {
     schoolOptions.value = response.data || []
   })
 }
 
+
 // function getClassListBySchool() {
 //     listAll().then(response => {
 //         classOptions.value = response.data || []
@@ -262,6 +271,7 @@ function cancelTeacherClass() {
 function resetTeacherClass() {
     formTeacherClass.value = {
         teacherId: null,
+        schoolName: null,
         classIds: [],
         name: null
     }
@@ -358,6 +368,7 @@ function handleUpdateTeacherClass(row) {
         // 然后设置数据
         formTeacherClass.value.teacherId = row.teacherId
         formTeacherClass.value.name = row.name
+        formTeacherClass.value.schoolName = row.schoolName
 
         listAllTeacherClass(submitData).then(response => {
             formTeacherClass.value.classIds = (response.data || []).map(item => item.classId)

+ 3 - 0
ie-admin/src/main/java/com/ruoyi/web/controller/dz/DzSchoolController.java

@@ -97,6 +97,9 @@ public class DzSchoolController extends BaseController
     @GetMapping("/getCampusSchoolList")
     public AjaxResult getCampusSchoolList(DzSchool dzSchool)
     {
+        if(null == dzSchool.getCampus() && !UserTypeEnum.isSys(SecurityUtils.getLoginUser().getUser().getUserType())) {
+            dzSchool.setCampus(true);
+        }
         List<DzSchool> list = dzSchoolService.selectDzSchoolList(dzSchool);
         return AjaxResult.success(list);
     }

+ 5 - 0
ie-admin/src/main/java/com/ruoyi/web/controller/dz/DzTeacherController.java

@@ -3,7 +3,9 @@ package com.ruoyi.web.controller.dz;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
+import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.dz.service.IDzTeacherClassService;
+import com.ruoyi.enums.UserTypeEnum;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -45,6 +47,9 @@ public class DzTeacherController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(DzTeacher dzTeacher)
     {
+        if(!UserTypeEnum.isSys(SecurityUtils.getLoginUser().getUser().getUserType())){
+            dzTeacher.setDeptId(SecurityUtils.getLoginUser().getUser().getDeptId());
+        }
         startPage();
         List<DzTeacher> list = dzTeacherService.selectDzTeacherList(dzTeacher);
         return getDataTable(list);

+ 2 - 0
ie-admin/src/main/java/com/ruoyi/web/controller/front/FrontSyVocationalController.java

@@ -49,6 +49,7 @@ public class FrontSyVocationalController extends BaseController {
 
     @GetMapping("getVocationalPosts")
     @ApiOperation("04 获取就业岗位")
+    @Anonymous
     public AjaxResult getVocationalPosts(@RequestParam(required = true) String code) {
         List<SyVocationalPost> vocationalPost = vocationalPostService.selectSyVocationalPostByVocationalCode(code);
         return AjaxResult.success(vocationalPost);
@@ -56,6 +57,7 @@ public class FrontSyVocationalController extends BaseController {
 
     @GetMapping("getVocationalOverview")
     @ApiOperation("03 获取职业概况")
+    @Anonymous
     public AjaxResult getVocationalOverview(@RequestParam String code) {
         SyVocationalOverview vocationalOverview = vocationalOverviewService.selectSyVocationalOverviewByCode(code);
         JSONArray marjorList = new JSONArray();

+ 0 - 2
ie-admin/src/main/java/com/ruoyi/web/controller/front/FrontUniversitiesController.java

@@ -60,7 +60,6 @@ public class FrontUniversitiesController extends BaseController {
 
     @GetMapping("filters")
     @ApiOperation("00 院校列表数据筛选项")
-    @Anonymous
     public AjaxResult filters() {
         String entranceType = ConstantUtil.getExamTypeData(VistorContextHolder.getExamType().title());
         JSONObject data = new JSONObject(true);
@@ -118,7 +117,6 @@ public class FrontUniversitiesController extends BaseController {
 
     @GetMapping("list")
     @ApiOperation("01 院校列表")
-    @Anonymous
     public TableDataInfo list(UniversitiesCondDTO cond, @ApiParam(value = "页数", example = "1") @RequestParam Integer pageNum,
                               @ApiParam(value = "页大小", example = "15") @RequestParam Integer pageSize) {
         String location = VistorContextHolder.getLocation();

+ 3 - 3
ie-system/src/main/resources/mapper/dz/DzTeacherMapper.xml

@@ -26,9 +26,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectDzTeacherVo"/>
         <where>
             <if test="userId != null "> and user_id = #{userId}</if>
-            <if test="deptId != null "> and dept_id = #{deptId}</if>
-            <if test="schoolId != null "> and school_id = #{schoolId}</if>
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="deptId != null "> and t1.dept_id = #{deptId}</if>
+            <if test="schoolId != null "> and t1.school_id = #{schoolId}</if>
+            <if test="name != null  and name != ''"> and t1.name like concat('%', #{name}, '%')</if>
         </where>
     </select>