Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
d6f144d2
Commit
d6f144d2
authored
Apr 28, 2017
by
fsn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复被影响的dept_info.js代码
parent
14893ac8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
24 deletions
+27
-24
src/main/webapp/static/modular/system/dept/dept_info.js
+27
-24
No files found.
src/main/webapp/static/modular/system/dept/dept_info.js
View file @
d6f144d2
/**
* 初始化
字典
详情对话框
* 初始化
部门
详情对话框
*/
var
D
ic
tInfoDlg
=
{
dic
tInfoData
:
{}
var
D
ep
tInfoDlg
=
{
dep
tInfoData
:
{}
};
/**
* 清除数据
*/
D
ic
tInfoDlg
.
clearData
=
function
()
{
this
.
dic
tInfoData
=
{};
D
ep
tInfoDlg
.
clearData
=
function
()
{
this
.
dep
tInfoData
=
{};
}
/**
...
...
@@ -18,8 +18,8 @@ DictInfoDlg.clearData = function() {
* @param key 数据的名称
* @param val 数据的具体值
*/
D
ic
tInfoDlg
.
set
=
function
(
key
,
val
)
{
this
.
dic
tInfoData
[
key
]
=
(
typeof
value
==
"undefined"
)
?
$
(
"#"
+
key
).
val
()
:
value
;
D
ep
tInfoDlg
.
set
=
function
(
key
,
val
)
{
this
.
dep
tInfoData
[
key
]
=
(
typeof
value
==
"undefined"
)
?
$
(
"#"
+
key
).
val
()
:
value
;
return
this
;
}
...
...
@@ -29,15 +29,15 @@ DictInfoDlg.set = function(key, val) {
* @param key 数据的名称
* @param val 数据的具体值
*/
D
ic
tInfoDlg
.
get
=
function
(
key
)
{
D
ep
tInfoDlg
.
get
=
function
(
key
)
{
return
$
(
"#"
+
key
).
val
();
}
/**
* 关闭此对话框
*/
D
ic
tInfoDlg
.
close
=
function
()
{
parent
.
layer
.
close
(
window
.
parent
.
Dic
t
.
layerIndex
);
D
ep
tInfoDlg
.
close
=
function
()
{
parent
.
layer
.
close
(
window
.
parent
.
Dep
t
.
layerIndex
);
}
/**
...
...
@@ -48,7 +48,7 @@ DictInfoDlg.close = function() {
* @param treeNode
* @returns
*/
D
ic
tInfoDlg
.
onClickDept
=
function
(
e
,
treeId
,
treeNode
)
{
D
ep
tInfoDlg
.
onClickDept
=
function
(
e
,
treeId
,
treeNode
)
{
$
(
"#pName"
).
attr
(
"value"
,
instance
.
getSelectedVal
());
$
(
"#pid"
).
attr
(
"value"
,
treeNode
.
id
);
}
...
...
@@ -58,7 +58,7 @@ DictInfoDlg.onClickDept = function(e, treeId, treeNode) {
*
* @returns
*/
D
ic
tInfoDlg
.
showDeptSelectTree
=
function
()
{
D
ep
tInfoDlg
.
showDeptSelectTree
=
function
()
{
var
pName
=
$
(
"#pName"
);
var
pNameOffset
=
$
(
"#pName"
).
offset
();
$
(
"#parentDeptMenu"
).
css
({
...
...
@@ -72,7 +72,7 @@ DictInfoDlg.showDeptSelectTree = function() {
/**
* 隐藏部门选择的树
*/
D
ic
tInfoDlg
.
hideDeptSelectTree
=
function
()
{
D
ep
tInfoDlg
.
hideDeptSelectTree
=
function
()
{
$
(
"#parentDeptMenu"
).
fadeOut
(
"fast"
);
$
(
"body"
).
unbind
(
"mousedown"
,
onBodyDown
);
// mousedown当鼠标按下就可以触发,不用弹起
}
...
...
@@ -80,57 +80,60 @@ DictInfoDlg.hideDeptSelectTree = function() {
/**
* 收集数据
*/
D
ic
tInfoDlg
.
collectData
=
function
()
{
D
ep
tInfoDlg
.
collectData
=
function
()
{
this
.
set
(
'id'
).
set
(
'simplename'
).
set
(
'fullname'
).
set
(
'tips'
).
set
(
'num'
).
set
(
'pid'
);
}
/**
* 提交添加部门
*/
D
ic
tInfoDlg
.
addSubmit
=
function
()
{
D
ep
tInfoDlg
.
addSubmit
=
function
()
{
this
.
clearData
();
this
.
collectData
();
//提交信息
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/dic
t/add"
,
function
(
data
){
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/dep
t/add"
,
function
(
data
){
Feng
.
success
(
"添加成功!"
);
window
.
parent
.
Dept
.
table
.
refresh
();
Dic
tInfoDlg
.
close
();
Dep
tInfoDlg
.
close
();
},
function
(
data
){
Feng
.
error
(
"添加失败!"
+
data
.
responseJSON
.
message
+
"!"
);
});
ajax
.
set
(
this
.
dic
tInfoData
);
ajax
.
set
(
this
.
dep
tInfoData
);
ajax
.
start
();
}
/**
* 提交修改
*/
D
ic
tInfoDlg
.
editSubmit
=
function
()
{
D
ep
tInfoDlg
.
editSubmit
=
function
()
{
this
.
clearData
();
this
.
collectData
();
//提交信息
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/dic
t/update"
,
function
(
data
){
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/dep
t/update"
,
function
(
data
){
Feng
.
success
(
"修改成功!"
);
window
.
parent
.
Dept
.
table
.
refresh
();
Dic
tInfoDlg
.
close
();
Dep
tInfoDlg
.
close
();
},
function
(
data
){
Feng
.
error
(
"修改失败!"
+
data
.
responseJSON
.
message
+
"!"
);
});
ajax
.
set
(
this
.
dic
tInfoData
);
ajax
.
set
(
this
.
dep
tInfoData
);
ajax
.
start
();
}
function
onBodyDown
(
event
)
{
if
(
!
(
event
.
target
.
id
==
"menuBtn"
||
event
.
target
.
id
==
"parentDeptMenu"
||
$
(
event
.
target
).
parents
(
"#parentDeptMenu"
).
length
>
0
))
{
Dic
tInfoDlg
.
hideDeptSelectTree
();
Dep
tInfoDlg
.
hideDeptSelectTree
();
}
}
$
(
function
()
{
var
ztree
=
new
$ZTree
(
"parentDeptMenuTree"
,
"/dept/tree"
);
ztree
.
bindOnClick
(
DeptInfoDlg
.
onClickDept
);
ztree
.
init
();
instance
=
ztree
;
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment