|
楼主 |
发表于 2017-5-19 16:35:20
|
显示全部楼层
本帖最后由 qweasdzxc 于 2017-5-19 17:05 编辑
第3步,下载压缩后的文件 参考不使用附件组件下载文件。http://bbs.wex5.com/forum.php?mo ... 44354&pid=164983232。前台报错,tomca控制台没报错。
- <div class="x-error-message" style="box-sizing: border-box; -webkit-user-select: auto; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", "Segoe UI", "Lucida Grande", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><span class="x-error-message-body" style="box-sizing: border-box; -webkit-user-select: auto; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; word-wrap: break-word; word-break: break-all;">Cannot read property 'convertURL' of undefined</span></div><div style="box-sizing: border-box; -webkit-user-select: auto; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", "Segoe UI", "Lucida Grande", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><a class="x-error-show-detail x-error-show" style="box-sizing: border-box; -webkit-user-select: auto; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; background-color: transparent; color: rgb(51, 122, 183); text-decoration: none; cursor: pointer;">隐藏详细</a></div><div class="x-error-stack" style="box-sizing: border-box; -webkit-user-select: auto; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", "Segoe UI", "Lucida Grande", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); word-wrap: break-word; display: block;">TypeError: Cannot read property 'convertURL' of undefined at Object.callback (http://localhost:8080/x5/UI2/v_9a7d2fb1689044a1ac979eec40632e2dl_zh_CNs_desktopd_pc/SAM/assetManage/process/assetout/listActivity.js:110:50) at Object.h (http://localhost:8080/x5/UI2/v_ee8d2d757b664ef1bb6ee6f45c3624c0l_zh_CNs_desktopd_pc/system/biz.common.min.js:12:12580) at f (http://localhost:8080/x5/UI2/v_19a159a4c66742ec95161cdca3d03a18l_zh_CNs_desktopd_pc/system/core.min.js:65:42352) at Object.add (http://localhost:8080/x5/UI2/v_19a159a4c66742ec95161cdca3d03a18l_zh_CNs_desktopd_pc/system/core.min.js:65:42666) at _sendRequest (http://localhost:8080/x5/UI2/v_ee8d2d757b664ef1bb6ee6f45c3624c0l_zh_CNs_desktopd_pc/system/biz.common.min.js:12:12934) at Object.Request.sendRequest (http://localhost:8080/x5/UI2/v_ee8d2d757b664ef1bb6ee6f45c3624c0l_zh_CNs_desktopd_pc/system/biz.common.min.js:12:13283) at Object.$var._sendBizRequest (eval at __actionFinish (http://localhost:8080/x5/UI2/v_ee8d2d757b664ef1bb6ee6f45c3624c0l_zh_CNs_desktopd_pc/system/biz.common.min.js:12:16366), <anonymous>:1:577) at Object.Request.sendBizRequest (http://localhost:8080/x5/UI2/v_ee8d2d757b664ef1bb6ee6f45c3624c0l_zh_CNs_desktopd_pc/system/biz.common.min.js:12:15521) at constructor.Model.downloadAllClick (http://localhost:8080/x5/UI2/v_9a7d2fb1689044a1ac979eec40632e2dl_zh_CNs_desktopd_pc/SAM/assetManage/process/assetout/listActivity.js:97:15) at constructor.fire (http://localhost:8080/x5/UI2/v_19a159a4c66742ec95161cdca3d03a18l_zh_CNs_desktopd_pc/system/core.min.js:65:234367)</div>
复制代码
listActivity.js:110 Uncaught TypeError: Cannot read property 'convertURL' of undefinedcallback @ listActivity.js:110h @ biz.common.min.js:12f @ core.min.js:65add @ core.min.js:65_sendRequest @ biz.common.min.js:12Request.sendRequest @ biz.common.min.js:12$var._sendBizRequest @ VM62557:1Request.sendBizRequest @ biz.common.min.js:12Model.downloadAllClick @ listActivity.js:97fire @ core.min.js:65fireEvent @ core.min.js:65callParent @ core.min.js:65fireEvent @ common.min.js:7_doClick @ comp.min.js:144i @ core.min.js:65dispatch @ core.min.js:65g.handle @ core.min.js:65
我的代码:
- Model.prototype.downloadAllClick = function(event){
- debugger
- var _this=this;
- var detailData=this.comp("detailData");
- var fAssetAccessory=detailData.getValue("fAssetAccessory");
- var params = new biz.Request.ActionParam();
- params.setString("fAssetAccessory", fAssetAccessory);
- biz.Request.sendBizRequest({
- "context" : this.getContext(),
- "action" : "downloadAllAction",
- "parameters" : params,
- "directExecute" : true,
- "callback" : function(data) {
- if(data.state){
- if(data.response != null){
- var fileName=data.response;
- var rows = new Array(); // 定义一数组
- rows = fileName.split("/");
- var downloadFilename = rows[rows.length-1];
- var url = justep.Request.convertURL("/UI/system/components/excel/export/download.j"+"?action=downloadAllAction2&fileName=" + encodeURI(fileName)+ '&$downloadFilename=' + encodeURI(downloadFilename));
- url = justep.Request.setBizParams(url);
- $("#downloadiframe").attr("src",url);
- }
- }
- }
- });
- };
-
复制代码
我.w中的110行代码就是上面的第20行
|
|