zone.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //通用弹出式文件上传
  2. function commonUpload(callback){
  3. $.dialog({
  4. content: "url:systemController.do?commonUpload",
  5. lock : true,
  6. title:"文件上传",
  7. zIndex:2100,
  8. width:700,
  9. height: 200,
  10. parent:windowapi,
  11. cache:false,
  12. ok: function(){
  13. var iframe = this.iframe.contentWindow;
  14. iframe.uploadCallback(callback);
  15. return true;
  16. },
  17. cancelVal: '关闭',
  18. cancel: function(){
  19. }
  20. });
  21. }
  22. function browseImages(inputId, Img) {// 图片管理器,可多个上传共用
  23. }
  24. function browseFiles(inputId, file) {// 文件管理器,可多个上传共用
  25. }
  26. function decode(value, id) {//value传入值,id接受值
  27. var last = value.lastIndexOf("/");
  28. var filename = value.substring(last + 1, value.length);
  29. $("#" + id).text(decodeURIComponent(filename));
  30. }
  31. //选择人员
  32. function openUserSelect() {
  33. //$.dialog.setting.zIndex = getzIndex();
  34. var height = document.body.clientHeight;
  35. var userIds = $("#leader").val();
  36. /* var orgCode = $("#orgCode").val();*/
  37. $.dialog({
  38. content: 'url:publicpageController.do?userSelect&ids='+userIds, zIndex: getzIndex(), title: '人员列表', lock: true, width: '1000px', height: '600px', opacity: 0.4, button: [
  39. {name: '确定', callback: function (){
  40. var iframe = this.iframe.contentWindow;
  41. if(iframe.getReason().length>0){
  42. var strData=eval(iframe.getReason());
  43. for(var key in strData[0]){
  44. if(key=="strId"){
  45. $("#leader").val(strData[0][key]);
  46. }else if(key=="strName"){
  47. $("#leadername").val(strData[0][key]);
  48. }
  49. }
  50. }
  51. }, focus: true},
  52. {name: '取消', callback: function (){}}
  53. ]}).zindex();
  54. }
  55. function callbackCleanUser(){
  56. $('#leadername').val('');
  57. $('#leader').val('');
  58. }