-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
080b685
commit 960718d
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* 元素自定义属性 | ||
*/ | ||
var Attribute = { | ||
initUI: function() { | ||
/* | ||
* 给单选挑选人员组件统一添加点击方法 | ||
*/ | ||
$('body').on("click", "*[onPickUser]", function (event) { | ||
var sourceTarget = this; | ||
var functionName = $(this).attr("onPickUser"); | ||
if ($.trim(functionName) == "" || typeof(eval(functionName)) != "function") { | ||
weui.topTips("提供的回调方法不存在,请修改!"); | ||
} else { | ||
layer.open({ | ||
id: 'selectUserDialog', | ||
type: 1, | ||
content: '', | ||
anim: 'up', | ||
style: 'position: absolute; left: 10px; top:10px; bottom:10px; right: 10px; border: none; border-radius: 4px; -webkit-animation-duration: .5s; animation-duration: .5s;', | ||
success: function() { | ||
$('.layui-m-layercont').load("/wfPage/preSelectPerson?singleFlag=true&callbackMethod=" + functionName, function() { | ||
acceptSourceTargetForPickUser(sourceTarget); | ||
}); | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
} |