巡检报告导出接口联调

This commit is contained in:
2026-01-05 15:26:15 +08:00
parent a8b781d48a
commit b6bfb92c6e
19 changed files with 550 additions and 131 deletions

View File

@@ -3,7 +3,7 @@
<div class="tab">
<div v-for="(item,index) in tabs"
:key="index"
:class="['tab-item',active === index ? 'active' : '']"
:class="['tab-item']"
@click="handle(index)">{{item}}</div>
</div>
<div class="resize" :style="{ resize: 'both', overflow: 'auto' }"></div>
@@ -23,20 +23,13 @@ const videoData = computed(() => mapStore.locate.data)
const tabs = [
'锁定轮询', '重新轮询', '巡检报告'
]
const active = ref(null)
const data = ref([])
const lock = ref(false)
let timer = null
let monitorIndex = 0
const videoUrl = ref('')
const arr = [ 'https://sl-shandong-stud-166141.chinatowercom.cn:10263/live/37021200001327000138_1_0_be18783a8d444023becb4e96c1c37ffc.flv',
'https://sl-shandong-stud-166141.chinatowercom.cn:10343/live/37021100001327000007_0_0_9626ad56bd3340cc9554c30454a66f2d.flv',
'https://sl-shandong-stud-022093.chinatowercom.cn:10073/live/37100200001327000003_0_0_e83bd475262b448b9d06c2d8085a7a9c.flv',
'http://198.16.74.214:80/Channels0001/Channels0001.live.flv?originTypeStr=pull&audioCodec=G711A&videoCodec=H264' ]
const handle = (index) => {
active.value = index
if(index === 0) {
lock.value = true
ElMessage.success('锁定成功')
@@ -44,10 +37,10 @@ const handle = (index) => {
lock.value = false
ElMessage.success('成功轮询')
}else if(index === 2) { // 巡检报告下载
console.log(videoData.value, 'value')
// window.open(item.url, '_blank')
cctvExport({}).then(res => {
console.log(res, 'resssss')
const blob = new Blob([ res ], { type: 'application/pdf' })
const pdfUrl = URL.createObjectURL(blob)
window.open(pdfUrl, '_blank')
})
}
}