类型:开发

描述:
This commit is contained in:
2025-04-02 23:51:18 +08:00
parent 16b9d8e3c7
commit 9eed78e2cf
2 changed files with 19 additions and 4 deletions

View File

@@ -184,6 +184,7 @@
</div> </div>
</template> </template>
</div> </div>
<video-dialog v-model="videoShow" :src="src" :cameraIndexCode="cameraIndexCode" />
</template> </template>
<script setup> <script setup>
@@ -194,6 +195,7 @@
import { useWebSocket } from '@/hooks/socket' import { useWebSocket } from '@/hooks/socket'
import { mode, socketBaseUrl, proSocketBaseUrl } from '@/utils/config' import { mode, socketBaseUrl, proSocketBaseUrl } from '@/utils/config'
import {getPreviewUrlApi} from "@/api/home.js";
const { isConnected, dataRes, sendMessage } = useWebSocket( const { isConnected, dataRes, sendMessage } = useWebSocket(
`${mode == 'dev' ? socketBaseUrl : proSocketBaseUrl}/ws/monitor` `${mode == 'dev' ? socketBaseUrl : proSocketBaseUrl}/ws/monitor`
@@ -235,7 +237,20 @@
allAbnormalAlarm: 0, // 安全告警总数 allAbnormalAlarm: 0, // 安全告警总数
handled: 0 // 已处理告警数 handled: 0 // 已处理告警数
}) })
let src = ref('')
let cameraIndexCode = ref('')
let videoShow = ref(false)
window.addEventListener("message", async(e) => {
let {code,data} = await getPreviewUrlApi({
type: 'hls',
cameraIndexCode:e.data.cameraIndexCode
})
if(code===200){
src.value = data.url
cameraIndexCode.value = e.data.cameraIndexCode
videoShow.value = true
}
});
// 异常告警 // 异常告警
let abnormalAlarm = computed(() => { let abnormalAlarm = computed(() => {
return [{ data: abnormalData.value.abnormalAlarm.map((item) => item.value) }] return [{ data: abnormalData.value.abnormalAlarm.map((item) => item.value) }]

View File

@@ -113,7 +113,7 @@
<div class="null-box" v-else> <div class="null-box" v-else>
暂无数据 暂无数据
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -284,14 +284,14 @@
<div class="label">运营船只</div> <div class="label">运营船只</div>
<div class="value flex"> <div class="value flex">
<countup :end-val="scenicStore.carShipData.ship.count?.drivingCount" /> <countup :end-val="scenicStore.carShipData.ship.count?.drivingCount" />
<span class="suffix"></span> <span class="suffix"></span>
</div> </div>
</div> </div>
<div class="car-item"> <div class="car-item">
<div class="label">空闲船只</div> <div class="label">空闲船只</div>
<div class="value flex"> <div class="value flex">
<countup :end-val="scenicStore.carShipData.ship.count?.nonDrivingCount" /> <countup :end-val="scenicStore.carShipData.ship.count?.nonDrivingCount" />
<span class="suffix"></span> <span class="suffix"></span>
</div> </div>
</div> </div>
</div> </div>