Merge branch 'master-mj' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-mj
Showing
1 changed file
with
12 additions
and
1 deletions
@@ -258,7 +258,18 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -258,7 +258,18 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
258 | url: domainName + '/api-web/inspectiontask/getPdfPath?batchNo=' + batchNo | 258 | url: domainName + '/api-web/inspectiontask/getPdfPath?batchNo=' + batchNo |
259 | }).done(function (response) { | 259 | }).done(function (response) { |
260 | if ("success" == response.msg) { | 260 | if ("success" == response.msg) { |
261 | - window.open("/src/lib/extend/pdfjs/web/viewer.html?test=" + encodeURIComponent(response.pdfPath)); | 261 | + let win = window.top; |
262 | + if (win) { | ||
263 | + window.top.postMessage({ | ||
264 | + type: "previewFile", | ||
265 | + message: { | ||
266 | + params: { | ||
267 | + url: response.pdfPath | ||
268 | + } | ||
269 | + } | ||
270 | + }, '*') | ||
271 | + } | ||
272 | + // window.open("/src/lib/extend/pdfjs/web/viewer.html?test=" + encodeURIComponent(response.pdfPath)); | ||
262 | } | 273 | } |
263 | }) | 274 | }) |
264 | } | 275 | } |
-
Please register or login to post a comment