幼儿园新增部门管理
This commit is contained in:
parent
16f4cc0d9a
commit
fb937034a7
@ -57,6 +57,7 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.parentId != 200"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@ -64,6 +65,7 @@
|
||||
v-hasPermi="['system:dept:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.deptId < 200"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
@ -71,7 +73,7 @@
|
||||
v-hasPermi="['system:dept:add']"
|
||||
>新增</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.parentId != 0"
|
||||
v-if="scope.row.parentId != 0 && scope.row.parentId != 200"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@ -158,6 +160,7 @@ export default {
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
sh: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 表格树数据
|
||||
|
@ -147,6 +147,29 @@ public class BySchoolController extends BaseController
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
//遍历ids
|
||||
for (int i=0;i<ids.length;i++)
|
||||
{
|
||||
//循环找出school表的id
|
||||
Long bySchId = ids[i];
|
||||
//用school表ID获取xxdm的值
|
||||
//将值赋给dept中的schoolID
|
||||
SysDept dept = new SysDept();
|
||||
dept.setSchoolId(bySchoolService.selectBySchoolById(bySchId).getXxdm());
|
||||
//通过dept表的schoolID来找出dept的List
|
||||
deptService.deleteDeptById(deptService.selectDeptList(dept).get(0).getDeptId());
|
||||
}
|
||||
return toAjax(bySchoolService.deleteBySchoolByIds(ids));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -40,6 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="schoolId != null and schoolId != ''">
|
||||
AND school_id = #{schoolId}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${dataScope}
|
||||
order by d.parent_id, d.order_num
|
||||
@ -152,4 +155,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
update sys_dept set del_flag = '2' where dept_id = #{deptId}
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user