{"title":"上传文件","inframe":false,"hidden":false,"roles":{"default":1},"pageLink":"","children":[{"configs":{"loginRequired":"false","itemId":"module"},"events":{"initialize":"Ext.apply(app, {\n  /**\n   * 打开文件上传模态对话框。点击确定按钮时将触发上传操作，可以通过beforeUpload事件进行拦截。\n   * 上传完成后如果在参数中定义了success方法，那么该方法将被回调。\n   * @param {String} url 上传的url路径。\n   * @param {Object} [params] 上传的参数。\n   * @param {Function} [beforeUpload] 上传前执行的方法，返回false将取消操作。\n   * @param {Function} [success] 上传成功执行的回调事件。\n   * @param {Boolean} [showProgress] 是否显示上传进度条，默认为true。\n   * @param {String} [title] 窗口标题。\n   * @param {String} [iconCls] 窗口图标。\n   */\n  upload: function(params) {\n    Ext.apply(app, params);\n    if (params.title)\n      app.win.title = params.title;\n    if (params.iconCls)\n      app.win.iconCls = params.iconCls;\n    //采用动态创建的方式，win的createInstance属性为false\n    app.win = new Ext.window.Window(app.win);\n    app.win.show();\n  }\n});"},"children":[{"configs":{"title":"@Str.fileUpload","height":"128","width":"424","layout":"fit","defaultFocus":"file1","dialog":"true","itemId":"win","iconCls":"file_default_icon","createInstance":"false"},"events":{"ok":"if (app.beforeUpload && app.beforeUpload() === false)\n  return;\nWb.upload({\n  form: app.form1,\n  url: app.url,\n  params: app.params,\n  showProgress: app.showProgress !== false,\n  success: function() {\n    app.win.close();\n    if (app.success)\n      app.success();\n  }\n});"},"children":[{"configs":{"height":"72","width":"400","layout":"absolute","flat":"true","itemId":"form1"},"children":[{"configs":{"labelWidth":"80","height":"22","allowBlank":"false","width":"352","labelAlign":"right","itemId":"file","fieldLabel":"@Str.file","y":"24","x":"8"},"children":[],"type":"file","expanded":false}],"type":"form","expanded":true}],"type":"window","expanded":true}],"type":"module","expanded":true}],"iconCls":""}