main
徐景良 5 days ago
parent 9b378813e4
commit e2ec5da7b2

@ -7,12 +7,23 @@ import cloneDeep from 'lodash/cloneDeep'
export const option = {
textSize: 14,
colors: ['#0C2411','#00611A','#FFFFFF'],
text: '添加途经点'
text: '添加途经点',
list: [
'关闭线索','应急响应'
],
selectButton: '',
}
export default class Config extends PublicConfigClass implements CreateComponentType {
public key = TaskAssignConfig.key
public attr = { ...chartInitConfig, w: 1139, h: 249, zIndex: 1 }
public chartConfig = cloneDeep(TaskAssignConfig)
public option = cloneDeep(option)
constructor(){
super();
this.attr = { ...chartInitConfig, w: 1139, h: 249, zIndex: 1 }
this.isChildEvent = true
this.events.interactConfigEvents = {}
}
}

@ -6,13 +6,13 @@
<div class="clue-information-containers">
<!-- 左侧列表 -->
<div class="left-container">
<div class="left-container" ref="container">
<!-- item 1 -->
<div class="clue-item" v-for="(item,index) in listItem" :key="index">
<!-- 项目 -->
<div class="clue-item" v-for="(item,index) in listItem" :key="index" @click="handlerShowInfo($event,item)">
<!-- 内容 -->
<div class="clue-item-information" @click="handlerShowInfo(item)">
<div class="clue-item-information" >
<div class="icon">
<img v-if="item.state == 1" :src="'/public/components/Task/taskassign/'+item.icon+'-active.png'" alt="">
<img v-else :src="'/public/components/Task/taskassign/'+item.icon+'.png'" alt="">
@ -25,7 +25,7 @@
<!-- 时间线 -->
<div class="item-liner">
<div class="left-line" v-if="index > 0"></div>
<div class="point" @click="handlerShowInfo(item)"></div>
<div class="point" ></div>
<div class="right-line" v-if="index < listItem.length-1"></div>
</div>
@ -35,55 +35,58 @@
{{item.time}}
</span>
</div>
<!-- 点击弹窗 -->
<div class="verify-container" v-if="item.checked"
:style="{'background-image': item.state == 1 ? 'url(/public/components/Task/taskassign/detail-bg-active.png)' : 'url(/public/components/Task/taskassign/detail-bg.png)'}"
</div>
<!-- 点击弹窗 -->
<div class="verify-container" v-if="currentTimeNode.checked"
:style="{
'background-image': currentTimeNode.state == 1 ? 'url(/public/components/Task/taskassign/detail-bg-active.png)' : 'url(/public/components/Task/taskassign/detail-bg.png)',
'left': (clickX-212)+'px'
}"
>
<div class="title"
:style="{
'background': currentTimeNode.state == 1 ? 'linear-gradient( 270deg, #271410 0%, #740B09 47%, #CC0101 100%)' : 'linear-gradient( 270deg, #0A261E 0%, #15AF3F 47%, #17B241 100%)',
'border-left': currentTimeNode.state == 1 ? '3px solid #F02626' : '3px solid #20C24D'
}"
>
<div class="title"
:style="{
'background': item.state == 1 ? 'linear-gradient( 270deg, #271410 0%, #740B09 47%, #CC0101 100%)' : 'linear-gradient( 270deg, #0A261E 0%, #15AF3F 47%, #17B241 100%)',
'border-left':item.state == 1 ? '3px solid #F02626' : '3px solid #20C24D'
}"
>
{{item.name}}
<div class="close-button" @click="handlerCloseInfo(item)">
<img v-if="item.state == 1" src="/public/components/Task/taskassign/close-active.png" alt="">
<img v-else src="/public/components/Task/taskassign/close.png" alt="">
</div>
</div>
{{currentTimeNode.name}}
<div class="close-button" @click="handlerCloseInfo(currentTimeNode)">
<img v-if="currentTimeNode.state == 1" src="/public/components/Task/taskassign/close-active.png" alt="">
<img v-else src="/public/components/Task/taskassign/close.png" alt="">
</div>
</div>
<!-- 图片 -->
<div class="image-container"
:style="{'border': item.state == 1 ? '2px solid rgba(240, 38, 38, 1)' : '2px solid #20C24D'}"
>
<a-carousel autoplay dots-class="slick-dots slick-thumb" preview-disabled v-if="imageLoading" style="height:100px;">
<div v-for="item in handlerAfterImageList" style="height:100px;">
<a-image :src="item" style="height:210px;" />
</div>
</a-carousel>
</div>
<!-- 内容 -->
<div class="description-container">
<div class="description-item" v-for="(item,index) in detailInfo" :key="index">
<div class="label">{{item.label}}</div>
<div class="value">{{item.value}}</div>
</div>
<!-- 图片 -->
<div class="image-container"
:style="{'border': currentTimeNode.state == 1 ? '2px solid rgba(240, 38, 38, 1)' : '2px solid #20C24D'}"
>
<a-carousel autoplay dots-class="slick-dots slick-thumb" preview-disabled v-if="imageLoading" style="height:100px;">
<div v-for="currentTimeNode in handlerAfterImageList" style="height:100px;">
<a-image :src="currentTimeNode" style="height:210px;" />
</div>
</a-carousel>
</div>
<!-- 内容 -->
<div class="description-container">
<div class="description-item" v-for="(item,index) in detailInfo" :key="index">
<div class="label">{{item.label}}</div>
<div class="value">{{item.value}}</div>
</div>
</div>
</div>
</div>
<!-- 右侧添加项目 -->
<div class="right-container">
<div class="add-item-container" @click="methodsShow = true;"></div>
<div class="add-item-container" @click="methodsShow = !methodsShow;"></div>
<div class="add-item-text">操作</div>
<div class="methods-container" v-if="methodsShow">
<div class="methods-item" v-for="(item,index) in methods" :key="index" @click="item.icon == 'response' ? clickBtn(item) : selectMethods(item);">
<div class="methods-item" v-for="(item,index) in methods" :key="index" @click="selectMethods(item)">
<div class="icon">
<img :src="'/public/components/Task/taskassign/methods-'+item.icon+'.png'" alt="">
</div>
@ -361,28 +364,20 @@
</div>
<!-- 视频监控 -->
<div class="hkversion-video-container" v-drag v-if="hikversionShow">
<div class="hkversion-video-container" v-if="hikversionShow">
<div class="title">视频监控
<div class="close-button" @click="hikversionShow = false">
<img src="/public/components/Task/taskassign/close.png" alt="" />
</div>
</div>
<div class="ai-control">
<div class="no-picture" v-if="true">
<!-- <div class="no-picture" v-if="true">
<img src="@/assets/images/chart/uav/no-picture.png" alt="" />
<span>暂无画面 请您耐心等待</span>
<span>......</span>
</div>
<div class="player" style="height: 200px" v-else>
<video
id="player-container-id-live"
height="200"
preload="auto"
playsinline
webkit-playsinline
>
</video>
</div> -->
<div class="player" style="height: 200px" v-if="hikversionShow">
<HKMonitor :videourl="playerUrl" :index="1" :width="360" :height="240" :timestamp="1" :nowFullScreenVideo="false"></HKMonitor>
</div>
</div>
</div>
@ -412,7 +407,9 @@
import TCPlayer from 'tcplayer.js';
import 'tcplayer.js/dist/tcplayer.min.css'; //
import { listDronePort, saveHandFlyTask, endHandFlyTask, endAiInspection } from '@/api/situation';
import drag from './drag.ts'
import drag from './drag.ts';
import HKMonitor from './video/HKMonitor.vue';
var { VITE_GLOB_API_URL } = getAppEnvConfig();
@ -524,7 +521,42 @@
})
}
// 线
function handlerTimeLineScroll(){
const el = container.value
let isDown = false
let startX
let scrollLeft
el.addEventListener('mousedown', (e) => {
isDown = true
el.classList.add('active')
startX = e.pageX - el.offsetLeft
scrollLeft = el.scrollLeft
})
el.addEventListener('mouseleave', () => {
isDown = false
el.classList.remove('active')
})
el.addEventListener('mouseup', () => {
isDown = false
el.classList.remove('active')
})
el.addEventListener('mousemove', (e) => {
if (!isDown) return
e.preventDefault()
const x = e.pageX - el.offsetLeft
const walk = (x - startX) * 1.5 //
el.scrollLeft = scrollLeft - walk
})
}
onMounted(() => {
// 线
handlerTimeLineScroll();
//
// console.log("bindEvents333",props.chartConfig.id + 'dataupdate')
@ -664,6 +696,11 @@
});
onUnmounted(()=>{
monitorGraphicLayer ? monitorGraphicLayer.clear() : null;
userGraphicLayer ? userGraphicLayer.clear() : null;
})
onUnmounted(() => {
window.clearInterval(timer);
destroySeizeConnection();
@ -704,7 +741,6 @@
])
const selectMethods = (item) => {
switch(item.icon){
case "monitor":
handlerGetNearByMonitor(item);
@ -727,7 +763,7 @@
break;
case "response":
clickBtn(item);
changeButton("应急响应")
break;
}
@ -738,22 +774,30 @@
}
// 线
const handlerShowInfo = (item) => {
const container = ref(null);
const currentTimeNode = ref({})
const clickX = ref(0);
const handlerShowInfo = (event,item) => {
detailInfo.value = item.showInfo;
const parentRect = container.value.getBoundingClientRect() //
clickX.value = event.clientX - parentRect.left // X
listItem.value.forEach((item,index)=>{
item.checked = false;
})
switch(item.icon){
case 'monitor':
break;
case 'verify':
break;
}
item.checked = true;
currentTimeNode.value = item;
}
//
@ -791,17 +835,6 @@
let data = res.data.result[0];
clueInfo.value = data;
let timeLineInfo = {
name:"初始线索",
icon:"monitor",
checked:false,
time:clueInfo.value.reportTime,
state:1,
info:clueInfo.value
}
listItem.value.push(timeLineInfo);
//
handlerGetTaskList();
@ -826,6 +859,18 @@
}
]
let timeLineInfo = {
name:"初始线索",
icon:"monitor",
checked:false,
time:clueInfo.value.reportTime,
state:1,
info:clueInfo.value,
showInfo:detailInfo.value,
}
listItem.value.push(timeLineInfo);
let imageList = [];
if(data.image.match(",")){
@ -908,7 +953,9 @@
//
const handlerGetTaskList = () => {
let sql = `
SELECT "Id","Content","Lng","Lat","Address","State","TaskTime","Image","ActOn" from fm_firecluetask where "Fireclueid" = '${clueInfo.value.id}' ORDER BY "TaskTime"
SELECT "Id","Content","Lng","Lat","Address","State","TaskTime","Image","ActOn"
from fm_firecluetask where "Fireclueid" = '${clueInfo.value.id}' AND "State" IN (2,3)
ORDER BY "TaskTime"
`;
axios.post(VITE_GLOB_API_URL+'/api/FireResources/GetDataBySql',{
sql:sql
@ -918,13 +965,35 @@
data.forEach((item,index)=>{
let method = getMethodsInfo(item.actOn);
let showInfo = [
{
label:"线索描述",
key:"Content",
value:item.content,
},{
label:"线索位置",
key:"Address",
value:item.address,
},{
label:"线索来源",
key:"sourceType",
value:item.sourceType,
},{
label:"上报时间",
key:"reportTime",
value:item.reportTime,
}
]
let timeLineInfo = {
name:method?.name,
icon:method?.icon,
checked:false,
time:item.taskTime,
state:item.state,
info:item
info:item,
showInfo:showInfo
}
listItem.value.push(timeLineInfo)
@ -968,7 +1037,13 @@
//
const hikversionShow = ref(false);
const playerUrl = ref(null);
let monitorGraphicLayer:mars3d.layer.GraphicLayer;
function handlerGetNearByMonitor(item){
axios({
method: "get",
url: VITE_GLOB_API_URL + '/api/Camera/ListCameraWithInRange',
@ -991,6 +1066,14 @@
})
return null;
}
if(monitorGraphicLayer){
monitorGraphicLayer.clear();
}else{
monitorGraphicLayer = new mars3d.layer.GraphicLayer({ id: 10086 });
window.globalMap.addLayer(monitorGraphicLayer);
}
data.forEach((item,index)=>{
let graphic = new mars3d.graphic.BillboardEntity({
@ -1024,19 +1107,11 @@
graphic.on(mars3d.EventType.click, function (event: any) {
var data = event.graphic.options.attr;
playerUrl.value = data.SerialNumber;
hikversionShow.value = true;
//
// let bindEvents = props.chartConfig.events.interactConfigEvents;
// for (let i = 0; i < bindEvents.length; i++) {
// for (let j = 0; j < bindEvents[i].movementList.length; j++) {
// EventBus.emit(bindEvents[i].movementList[j].elementId[j] + 'graphic', data);
// }
// }
});
window.globalMap.graphicLayer.addGraphic(graphic);
monitorGraphicLayer.addGraphic(graphic);
})
}
})
@ -1051,85 +1126,91 @@
function handlerUavVerify(item){
clueInfo.value.lng = 118.295196;
clueInfo.value.lat = 35.13456;
//
pointData.value = {
_lng:parseFloat(clueInfo.value.lng),
_lat:parseFloat(clueInfo.value.lat),
_alt:window.globalMap.getHeight([parseFloat(clueInfo.value.lng),parseFloat(clueInfo.value.lat)])+100
}
// listDronePort({
// lng: clueInfo.value.lng,
// lat: clueInfo.value.lat
// }).then((res) => {
// airPortStoreVal.setAirPort('sn', res[0].droneportsn);
// airPortStoreVal.setUAV('sn', res[0].Sn);
// airPortStoreVal.setGateway(res[0].GateWay);
// applyDroneControl({ dronePortSn: res[0].droneportsn }).then((res) => {
// droneData.value = res;
// });
// setTimeout(() => {
// try{
// //
// execute();
// ElMessage({
// message:"",
// type: 'success',
// })
// }catch(e){
// ElMessage({
// message: "",
// type: 'error',
// })
// }
// createConnection();
// setTimeout(() => {
// //
// getClient().on('message', (topic, message) => {
// const rs = JSON.parse(message);
// console.log('', rs);
// if (rs.method === 'takeoff_to_point' && rs.bid == bid) {
// if (rs.data.result == 0) {
// createMessage.success('');
// //
// saveHandFlyTask({
// flightId: airPortStoreVal.getFlightId,
// workspaceId: airPortStoreVal.getProject,
// }).then((res) => {
// if (res) {
// setTimeout(() => {
// airPortStoreVal.setTaskId(res.taskId);
// }, 1000);
// }
// });
// } else {
// createMessage.error('' + errorName(rs.data.result));
// }
// }
// //
// if (rs.method == 'fly_to_point' && rs.bid == bid) {
// if (rs.data.result == 0) {
// createMessage.success('');
// } else {
// createMessage.error('' + errorName(rs.data.result));
// }
// }
// });
// }, 1000);
// }, 500);
// });
//
pointData.value = {
_lng:parseFloat(clueInfo.value.lng),
_lat:parseFloat(clueInfo.value.lat),
_alt:window.globalMap.getHeight([parseFloat(clueInfo.value.lng),parseFloat(clueInfo.value.lat)])+100
}
alert(JSON.stringify(pointData.value));
//
// handlerTask(3);
listDronePort({
lng: clueInfo.value.lng,
lat: clueInfo.value.lat
}).then((res) => {
airPortStoreVal.setAirPort('sn', res[0].droneportsn);
airPortStoreVal.setUAV('sn', res[0].Sn);
airPortStoreVal.setGateway(res[0].GateWay);
console.log("res",res);
debugger;
applyDroneControl({ dronePortSn: res[0].droneportsn }).then((res) => {
droneData.value = res;
});
setTimeout(() => {
try{
//
execute();
ElMessage({
message:"操作成功!",
type: 'success',
})
}catch(e){
ElMessage({
message: "操作失败!",
type: 'error',
})
}
createConnection();
setTimeout(() => {
//
getClient().on('message', (topic, message) => {
const rs = JSON.parse(message);
console.log('接收消息', rs);
if (rs.method === 'takeoff_to_point' && rs.bid == bid) {
if (rs.data.result == 0) {
createMessage.success('一键起飞成功');
//
saveHandFlyTask({
flightId: airPortStoreVal.getFlightId,
workspaceId: airPortStoreVal.getProject,
}).then((res) => {
if (res) {
setTimeout(() => {
airPortStoreVal.setTaskId(res.taskId);
}, 1000);
}
});
} else {
createMessage.error('一键起飞失败,' + errorName(rs.data.result));
}
}
//
if (rs.method == 'fly_to_point' && rs.bid == bid) {
if (rs.data.result == 0) {
createMessage.success('指点飞行成功');
} else {
createMessage.error('指点飞行失败,' + errorName(rs.data.result));
}
}
});
}, 1000);
}, 500);
});
//
// handlerTask(3);
let graphic = new mars3d.graphic.BillboardEntity({
position: [118.29662,35.134548],
@ -1163,10 +1244,19 @@
}
//
let userGraphicLayer:mars3d.layer.GraphicLayer;
function handlerUserVerify(item){
handlerTask(1);
if(userGraphicLayer){
userGraphicLayer.clear();
}else{
userGraphicLayer = new mars3d.layer.GraphicLayer({ id: 10086 });
window.globalMap.addLayer(userGraphicLayer);
}
let graphic = new mars3d.graphic.BillboardEntity({
position: [118.034137,35.424721],
attr: item,
@ -1188,7 +1278,7 @@
console.log('点击了人员', data);
});
window.globalMap.graphicLayer.addGraphic(graphic);
userGraphicLayer.addGraphic(graphic);
}
//
@ -1238,18 +1328,11 @@
// 线
function handlerCloseClue(item){
console.log(chartEditStore.getComponentList,
props.chartConfig.events.interactConfigEvents,)
changeButton("关闭线索")
debugger;
eventHandlerHook(
chartEditStore.getComponentList,
props.chartConfig.events.interactConfigEvents,
'click',
item,
);
monitorGraphicLayer ? monitorGraphicLayer.clear() : null;
userGraphicLayer ? userGraphicLayer.clear() : null;
return null;
let submitForm = {
@ -1284,6 +1367,15 @@
})
}
const changeButton = (type) => {
eventHandlerHook(
chartEditStore.getComponentList,
props.chartConfig.events.interactConfigEvents[type],
'click',
type,
);
}
/////////////////////////////////
const airPortStoreVal = airPortStore();
@ -1428,7 +1520,7 @@
{
latitude: Number(pointData.value._lat),
longitude: Number(pointData.value._lng),
height: Number(pointData.value._alt) + 100,
height: Number(pointData.value._alt),
},
],
};
@ -1771,6 +1863,10 @@
justify-content: center;
font-size: 14px;
cursor: pointer;
position: relative;
transform: translateZ(0);
img {
width: 16px;
}
@ -1793,8 +1889,12 @@
.left-container{
flex:auto;
display:flex;
justify-content: center; /* 水平居中 */
padding:20px;
overflow-x:auto;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
.clue-item{
flex:1;
flex: 0 0 calc(30% - 40px);
@ -1916,8 +2016,8 @@
.methods-container{
position:absolute;
padding:30px 4px 10px 10px;
bottom:88px;
right:-136px;
bottom: 114px;
right: -160px;
width:160px;
height:300px;
background-image:url(@/assets/images/chart/tasks/taskassign/methods-container-bg.png);

@ -0,0 +1,358 @@
<template>
<div :id="'camera-box-' + props.index" class="camera-box">
<!-- 视口区域 -->
<div :id="'playWnd-' + props.index + '-' + props.timestamp" class="playWnd"></div>
</div>
</template>
<script setup lang="ts">
import { onMounted, onUnmounted, watch, ref, nextTick } from 'vue';
import { JSEncrypt } from 'jsencrypt';
const props = defineProps([
'videourl',
'index',
'width',
'height',
'timestamp',
'nowFullScreenVideo',
]);
const emit = defineEmits(['changeNowFullScreenVideo']);
//
let initCount = 0;
let pubKey = '';
let oWebControl: any = null;
//
const initPlugin = () => {
oWebControl = new window.WebControl({
szPluginContainer: 'playWnd-' + props.index + '-' + props.timestamp, // id
iServicePortStart: 15900, // 使
iServicePortEnd: 15909,
szClassId: '23BF3B0A-2C56-4D97-9C03-0CB103AA8F11', // IE10使ActiveXclsid
cbConnectSuccess: function () {
// WebControl
oWebControl.JS_StartService('window', {
// WebControlVideoPluginPlugin.exe
dllPath: './VideoPluginConnect.dll', // "./VideoPluginConnect.dll"
}).then(
function () {
//
oWebControl.JS_SetWindowControlCallback({
//
cbIntegrationCallBack: cbIntegrationCallBack,
});
//
let width = props.width;
let height = props.height;
const divElement = document.getElementById('camera-box-' + props.index);
if (divElement) {
const rect = divElement.getBoundingClientRect();
const rectWidth = rect.width;
const rectHeight = rect.height;
if (rectWidth < width) {
width = rectWidth;
}
if (rectHeight < height) {
height = rectHeight;
}
}
oWebControl.JS_CreateWnd('playWnd-' + props.index + '-' + props.timestamp, width, height)
.then(function () {
init(); //
debugger;
});
},
function () {
//
console.log('创建播放实例失败!!!');
},
);
},
cbConnectError: function () {
// WebControl
oWebControl = null;
let d = document.getElementById('playWnd-' + props.index + '-' + props.timestamp);
if (d) {
d.innerHTML = '插件未启动,正在尝试启动,请稍候...';
}
window.WebControl.JS_WakeUp('VideoWebPlugin://'); // errorwakeup
initCount++;
if (initCount < 3) {
setTimeout(function () {
initPlugin();
}, 3000);
} else {
let d = document.getElementById('playWnd-' + props.index + '-' + props.timestamp);
if (d) {
d.innerHTML = '插件启动失败,请检查插件是否安装!';
}
}
},
cbConnectClose: function (bNormalClose) {
// bNormalClose = false
// JS_DisconnectbNormalClose = true
oWebControl = null;
},
});
};
//
function init() {
getPubKey(function () {
let appkey = '23604396'; //appkey
let ip = '221.2.83.54'; //IP
let port = 1443;
let appSecret = 'NZJ8L3bxCOOV6rtTFjsx';
let secret = setEncrypt(appSecret); //secret
let layerOut = '1x1';
let playMode = 0; //0-1-
let snapDir = 'D:\\SnapDir'; //
let videoDir = 'D:\\VideoDir'; //
let layout = layerOut; //playMode 1*1
let enableHTTPS = 1; //HTTPS1
let encryptedFields = 'secret'; //secret
let showToolbar = 0; //0-0-
let showSmart = 1; //线0-0-
let buttonIDs = '0'; //
oWebControl.JS_RequestInterface({
funcName: 'init',
argument: JSON.stringify({
appkey: appkey, //APIappkey
secret: secret, //APIsecret
ip: ip, //APIIP
playMode: playMode, //
port: port, //
snapDir: snapDir, //
videoDir: videoDir, //
layout: layout, //
enableHTTPS: enableHTTPS, //HTTPS
encryptedFields: encryptedFields, //
showToolbar: showToolbar, //
showSmart: showSmart, //
buttonIDs: buttonIDs, //
}),
})
.then(function (oData) {
//
reSizeVideo();
// -
oWebControl.JS_SetWindowControlCallback({
cbIntegrationCallBack: function (oData) {
// oData web
if (oData.responseMsg.type == '7') {
setFullScreen();
}
},
});
});
//
oWebControl.JS_RequestInterface({
funcName: 'startPreview',
argument: {
cameraIndexCode: props.videourl,
streamMode: 0,
transMode: 1,
gpuMode: 0,
wndId: 1,
},
});
});
}
//
function closeHkVideo() {
if (oWebControl != null) {
//
oWebControl.JS_HideWnd();
//
oWebControl.JS_RequestInterface({ funcName: 'destroyWnd' });
//
oWebControl.JS_Disconnect();
}
}
//
function showHkVideo() {
if (oWebControl != null) {
oWebControl.JS_ShowWnd();
}
}
//
function hideHkVideo() {
if (oWebControl != null) {
oWebControl.JS_HideWnd();
}
}
//
function reSizeVideo() {
if (oWebControl != null) {
//
let width = props.width;
let height = props.height;
const divElement = document.getElementById('camera-box-' + props.index);
if (divElement) {
const rect = divElement.getBoundingClientRect();
const rectWidth = rect.width;
const rectHeight = rect.height;
if (rectWidth < width) {
width = rectWidth;
}
if (rectHeight < height) {
height = rectHeight;
}
}
oWebControl.JS_Resize(width, height); // resizefirefoxDIV
}
}
//
function setFullScreen() {
oWebControl.JS_RequestInterface({
funcName: 'setFullScreen',
});
emit('changeNowFullScreenVideo', '海康' + props.index);
}
watch(
() => props.videourl,
() => {
//
init();
},
);
watch(
() => props.width,
() => {
nextTick(() => {
//
reSizeVideo();
});
},
);
//
function getPubKey(callback) {
oWebControl.JS_RequestInterface({
funcName: 'getRSAPubKey',
argument: JSON.stringify({
keyLength: 1024,
}),
}).then(function (oData) {
if (oData.responseMsg.data) {
pubKey = oData.responseMsg.data;
callback();
}
});
}
// RSA
function setEncrypt(value) {
let encrypt = new JSEncrypt();
encrypt.setPublicKey(pubKey);
return encrypt.encrypt(value);
}
//
function cbIntegrationCallBack(oData) {
// showCBInfo(JSON.stringify(oData.responseMsg));
}
onMounted(() => {
//
initPlugin();
//
const elements = document.querySelectorAll('.HuoQingDetailTimeLine');
if (elements.length > 0) {
// scroll
elements.forEach((element) => {
element.addEventListener('scroll', reSizeVideo);
});
}
});
onUnmounted(() => {
//
closeHkVideo();
//
const elements = document.querySelectorAll('.HuoQingDetailTimeLine');
if (elements.length > 0) {
// scroll
elements.forEach((element) => {
element.removeEventListener('scroll', reSizeVideo);
});
}
});
defineExpose({
initPlugin,
init,
closeHkVideo,
showHkVideo,
hideHkVideo,
});
</script>
<style scoped>
.camera-box-0 {
width: v-bind('`${props.width}px`');
height: v-bind('`${props.height}px`');
border-radius: 5px;
position: relative;
z-index: 10 !important;
position: fixed;
left: 50%;
top: 50%;
z-index: 10;
transform: translate(-105%, -135%);
padding: 0px;
}
.camera-box-1 {
width: v-bind('`${props.width}px`');
height: v-bind('`${props.height}px`');
border-radius: 5px;
position: relative;
z-index: 10 !important;
position: fixed;
left: 50%;
top: 50%;
z-index: 10;
transform: translate(-105%, -135%);
padding: 0px;
}
.camera-box-2 {
width: v-bind('`${props.width}px`');
height: v-bind('`${props.height}px`');
border-radius: 5px;
position: relative;
z-index: 10 !important;
position: fixed;
left: 50%;
top: 50%;
z-index: 10;
transform: translate(-105%, -135%);
padding: 0px;
}
.camera-box-3 {
width: v-bind('`${props.width}px`');
height: v-bind('`${props.height}px`');
border-radius: 5px;
position: relative;
z-index: 10 !important;
position: fixed;
left: 50%;
top: 50%;
z-index: 10;
transform: translate(-105%, -135%);
padding: 0px;
}
.playWnd {
width: v-bind('`${props.width}px`');
height: v-bind('`${props.height}px`');
}
</style>

@ -33,12 +33,10 @@
szClassId: '23BF3B0A-2C56-4D97-9C03-0CB103AA8F11', // IE10使ActiveXclsid
cbConnectSuccess: function () {
// WebControl
oWebControl
.JS_StartService('window', {
oWebControl.JS_StartService('window', {
// WebControlVideoPluginPlugin.exe
dllPath: './VideoPluginConnect.dll', // "./VideoPluginConnect.dll"
})
.then(
}).then(
function () {
//
oWebControl.JS_SetWindowControlCallback({
@ -61,8 +59,7 @@
height = rectHeight;
}
}
oWebControl
.JS_CreateWnd('playWnd-' + props.index + '-' + props.timestamp, width, height)
oWebControl.JS_CreateWnd('playWnd-' + props.index + '-' + props.timestamp, width, height)
.then(function () {
init(); //
});
@ -121,8 +118,7 @@
let showSmart = 1; //线0-0-
let buttonIDs = '0'; //
oWebControl
.JS_RequestInterface({
oWebControl.JS_RequestInterface({
funcName: 'init',
argument: JSON.stringify({
appkey: appkey, //APIappkey
@ -242,14 +238,12 @@
//
function getPubKey(callback) {
oWebControl
.JS_RequestInterface({
oWebControl.JS_RequestInterface({
funcName: 'getRSAPubKey',
argument: JSON.stringify({
keyLength: 1024,
}),
})
.then(function (oData) {
}).then(function (oData) {
if (oData.responseMsg.data) {
pubKey = oData.responseMsg.data;
callback();

@ -34,7 +34,9 @@ export const errorName = (code) => {
}
};
export const servicesTopic = (data) => {
console.log(data);
console.log(airPortStoreVal.getGateway);
debugger
// 发送消息
clientPublish('thing/product/' + airPortStoreVal.getGateway + '/services', data);
};

@ -0,0 +1,73 @@
// vite.config.ts
import { defineApplicationConfig } from "file:///E:/projects/%E6%9E%97%E4%B8%9A%E9%98%B2%E7%81%AB/LinYeFangHuoVersion1.0/LinYeFangHuo/internal/vite-config/dist/index.mjs";
import { mars3dPlugin } from "file:///E:/projects/%E6%9E%97%E4%B8%9A%E9%98%B2%E7%81%AB/LinYeFangHuoVersion1.0/LinYeFangHuo/node_modules/.pnpm/vite-plugin-mars3d@3.1.3_rollup@3.29.5/node_modules/vite-plugin-mars3d/dist/index.js";
var vite_config_default = defineApplicationConfig({
overrides: {
optimizeDeps: {
include: [
"echarts/core",
"echarts/charts",
"echarts/components",
"echarts/renderers",
"qrcode",
"@iconify/iconify",
"ant-design-vue/es/locale/zh_CN",
"ant-design-vue/es/locale/en_US",
"@/../lib/vform/designer.umd.js"
]
},
build: {
/* 其他build生产打包配置省略 */
//...
target: "esnext",
commonjsOptions: {
include: [
/node_modules|lib/,
/node_modules|packages/
]
//这里记得把lib目录加进来否则生产打包会报错
}
},
server: {
proxy: {
"/basic-api": {
target: "http://localhost:3000",
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(new RegExp(`^/basic-api`), "")
// only https
// secure: false
},
"/upload": {
target: "http://localhost:3300/upload",
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(new RegExp(`^/upload`), "")
}
},
warmup: {
clientFiles: ["./index.html", "./src/{views,components}/*"]
}
},
define: {
"process.env": {
BASE_URL: "/"
}
},
css: {
preprocessorOptions: {
scss: {
javascriptEnabled: true,
additionalData: `@import "src/styles/common/style.scss";`
}
}
},
plugins: [
mars3dPlugin()
]
}
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJFOlxcXFxwcm9qZWN0c1xcXFxcdTY3OTdcdTRFMUFcdTk2MzJcdTcwNkJcXFxcTGluWWVGYW5nSHVvVmVyc2lvbjEuMFxcXFxMaW5ZZUZhbmdIdW9cIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkU6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