修改上级部门(选择项排除本身和下级)

This commit is contained in:
RuoYi
2020-05-15 15:30:08 +08:00
parent dc6fe4c985
commit 59e2d4a2df
5 changed files with 62 additions and 4 deletions

View File

@ -113,11 +113,12 @@
/*部门管理-修改-选择部门树*/
function selectDeptTree() {
var deptId = $("#treeId").val();
var excludeId = $("input[name='deptId']").val();
if(deptId > 0) {
var options = {
title: '部门选择',
width: "380",
url: prefix + "/selectDeptTree/" + $("#treeId").val(),
url: prefix + "/selectDeptTree/" + $("#treeId").val() + "/" + excludeId,
callBack: doSubmit
};
$.modal.openOptions(options);

View File

@ -28,8 +28,11 @@
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
var prefix = ctx + "system/dept"
var deptId = [[${deptId}]];
var excludeId = [[${excludeId}]];
$(function() {
var url = ctx + "system/dept/treeData";
var url = $.common.isEmpty(excludeId) ? prefix + "/treeData": prefix + "/treeData/" + excludeId;
var options = {
url: url,
expandLevel: 2,