Skip to content

Commit

Permalink
fix(压测报告): 修复压测报告预览地址不正确
Browse files Browse the repository at this point in the history
  • Loading branch information
h7ml committed Jun 14, 2022
1 parent 90b121e commit 380ee2c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/views/CloudPressure/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<el-table-column
align="center"
:label="$translateTitle('pressure.生成时间')"
prop="timestamp"
prop="unixtimestamp"
show-overflow-tooltip
sortable
width="200"
Expand Down Expand Up @@ -418,10 +418,10 @@
<script>
import {
delDevice,
getDevice,
postDevice,
putDevice,
queryDevice,
getDevice,
} from '@/api/Device'
import { queryProduct } from '@/api/Product'
import { queryProductTemplet } from '@/api/ProductTemplet'
Expand Down Expand Up @@ -590,7 +590,7 @@
const res = await getDevice(info.objectId)
const _docxInfo = res?.basedata?.docxInfo ? res.basedata.docxInfo : []
_docxInfo.forEach((i) => {
i.timestamp = this.$moment
i.unixtimestamp = this.$moment
.unix(i.timestamp)
.format('YYYY-MM-DD HH:mm:ss')
})
Expand Down Expand Up @@ -621,11 +621,9 @@
},
async preview(fileurl) {
const encodeUrl = encodeURIComponent(Base64.encode(fileurl))
window.open(
//
`${location.hostname}:8012/onlinePreview?url=${encodeUrl}`
)
console.log('encodeUrl', encodeUrl, fileurl)
const previerUrl = `${location.protocol}//${location.hostname}/onlinePreview?url=${encodeUrl}`
console.log(fileurl, encodeUrl, previerUrl)
window.open(previerUrl, '_blank')
},
async download(row) {
window.location = row.docxUrl
Expand Down

0 comments on commit 380ee2c

Please sign in to comment.