Merge branch 'master-mj-joke' into 'master-mj'
chore:巡检结果查看优化 chore:巡检结果查看优化 See merge request !1202
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