|
|
@@ -7,6 +7,8 @@
|
|
|
</cu-custom> -->
|
|
|
|
|
|
<web-view :src="pdfUrl"></web-view>
|
|
|
+
|
|
|
+ <!-- <view style="position: fixed;top: 15rpx;right: 50rpx;z-index: 999;color: #ffffff;">55555</view> -->
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -21,29 +23,37 @@
|
|
|
type: '1'
|
|
|
}
|
|
|
},
|
|
|
+ created() {
|
|
|
+ let url = window.location.href
|
|
|
+ let urlOne = url.split('#')[1]
|
|
|
+ let urlTwo = urlOne.split('?')[1]
|
|
|
+ let urlThree = urlTwo.split('=')
|
|
|
+ if (urlThree[0] == 'url') {
|
|
|
+ this.pdfUrl = '/hybrid/html/web/viewer.html?file=' + decodeURIComponent(urlThree[1])
|
|
|
+ // this.pdfUrl = '/hybrid/html/web/viewer.html?file=' + encodeURIComponent(decodeURIComponent(urlThree[1]))
|
|
|
+ }
|
|
|
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ window.addEventListener('mousedown', this.handleonmousedown)
|
|
|
+ },
|
|
|
onLoad(option) {
|
|
|
-
|
|
|
- if (option.type) {
|
|
|
- this.type = option.type
|
|
|
- }
|
|
|
- if (this.type == 1) {
|
|
|
- this.getDe(option.id)
|
|
|
- } else {
|
|
|
- this.getDe2(option.id)
|
|
|
+ if (!option.url) {
|
|
|
+ if (option.type) {
|
|
|
+ this.type = option.type
|
|
|
+ }
|
|
|
+ if (this.type == 1) {
|
|
|
+ this.getDe(option.id)
|
|
|
+ } else {
|
|
|
+ this.getDe2(option.id)
|
|
|
+ }
|
|
|
}
|
|
|
- /**
|
|
|
- * 浏览情景
|
|
|
- */
|
|
|
-
|
|
|
- // 浏览情景1:浏览本地的pdf文件
|
|
|
- //this.pdfUrl = '/hybrid/html/web/viewer.html?file=./compressed.tracemonkey-pldi-09.pdf'
|
|
|
|
|
|
- // 浏览情景2:浏览在线的pdf文件
|
|
|
- // this.pdfUrl = '/hybrid/html/web/viewer.html?file=' + encodeURIComponent(
|
|
|
- // "https://www.mingjianlims.com/group1/M00/00/0C/rBKdLGHuElCAVpUEAAY6VxViWJE056.pdf")
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleonmousedown(e) {
|
|
|
+ console.log(e)
|
|
|
+ },
|
|
|
/**
|
|
|
* 根据报告的id查询没有盖章文档路径
|
|
|
*/
|
|
|
@@ -63,8 +73,8 @@
|
|
|
let dataItem = data[0]
|
|
|
let url =
|
|
|
http.apiHosp + dataItem.FILE_PATH_
|
|
|
- console.log(url)
|
|
|
- this.pdfUrl = '/hybrid/html/web/viewer.html?file=' + encodeURIComponent(url)
|
|
|
+ // this.pdfUrl = '/hybrid/html/web/viewer.html?file=' + encodeURIComponent(url)
|
|
|
+ this.pdfUrl = '/hybrid/html/web/viewer.html?file=' + url
|
|
|
}
|
|
|
|
|
|
}
|