inl-ui 0.1.128 → 0.1.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -49
- package/dist/components/index.cjs +203 -9
- package/dist/components/index.js +202 -9
- package/dist/components/style.css +1 -1
- package/dist/index.cjs +204 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +203 -10
- package/dist/style.css +2 -2
- package/dist/theme/index.js +70 -70
- package/dist/theme/scripts/dark-vars.js +21 -21
- package/dist/theme/scripts/default-vars.js +25 -25
- package/dist/theme/scripts/light-vars.js +22 -22
- package/dist/theme/style/color/bezierEasing.less +110 -110
- package/dist/theme/style/color/colorPalette.less +81 -81
- package/dist/theme/style/color/colors.less +162 -162
- package/dist/theme/style/color/tinyColor.less +1184 -1184
- package/dist/theme/style/compact.less +4 -4
- package/dist/theme/style/dark.less +4 -4
- package/dist/theme/style/default.less +4 -4
- package/dist/theme/style/index.less +2 -2
- package/dist/theme/style/index.tsx +2 -2
- package/dist/theme/style/themes/compact.less +295 -295
- package/dist/theme/style/themes/dark.less +790 -790
- package/dist/theme/style/themes/default.less +1067 -1067
- package/dist/theme/style/themes/index.less +7 -7
- package/dist/theme/style/themes/var-dark.less +343 -343
- package/dist/theme/style/themes/var-default.less +184 -184
- package/dist/theme/style/themes/variable.less +1122 -1122
- package/dist/theme/style/variable.less +4 -4
- package/dist/video/index.cjs +203 -9
- package/dist/video/index.js +203 -10
- package/dist/video/style.css +1 -1
- package/dist/videoMobile/style.css +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
# 工业PC ui库
|
|
2
|
-
|
|
3
|
-
前端通用库,包括组件、hooks、utils等。
|
|
4
|
-
|
|
5
|
-
### 运行
|
|
6
|
-
|
|
7
|
-
+ 开发模式 yarn dev
|
|
8
|
-
+ 生产打包 yarn build
|
|
9
|
-
+ 生成文档 yarn build:docs
|
|
10
|
-
+ 打包图扑工具 yarn buildtp
|
|
11
|
-
|
|
12
|
-
### 使用方法
|
|
13
|
-
|
|
14
|
-
```javascript
|
|
15
|
-
import inl from 'inl-ui';
|
|
16
|
-
import 'inl-ui/dist/style.css';
|
|
17
|
-
|
|
18
|
-
vue.use(inl)
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### 激活主题
|
|
24
|
-
|
|
25
|
-
**vite.config.ts**
|
|
26
|
-
|
|
27
|
-
```javascript
|
|
28
|
-
const additionalData = require("inl-ui/dist/theme").default;
|
|
29
|
-
|
|
30
|
-
...
|
|
31
|
-
|
|
32
|
-
css: {
|
|
33
|
-
preprocessorOptions: {
|
|
34
|
-
less: {
|
|
35
|
-
javascriptEnabled: true,
|
|
36
|
-
additionalData,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### 文档链接
|
|
43
|
-
|
|
44
|
-
##### [组件文档](./src/components/README.md)
|
|
45
|
-
|
|
46
|
-
##### [hooks文档](./src/hooks/README.md)
|
|
47
|
-
|
|
48
|
-
##### [Utils文档](./src/utils/README.md)
|
|
49
|
-
|
|
1
|
+
# 工业PC ui库
|
|
2
|
+
|
|
3
|
+
前端通用库,包括组件、hooks、utils等。
|
|
4
|
+
|
|
5
|
+
### 运行
|
|
6
|
+
|
|
7
|
+
+ 开发模式 yarn dev
|
|
8
|
+
+ 生产打包 yarn build
|
|
9
|
+
+ 生成文档 yarn build:docs
|
|
10
|
+
+ 打包图扑工具 yarn buildtp
|
|
11
|
+
|
|
12
|
+
### 使用方法
|
|
13
|
+
|
|
14
|
+
```javascript
|
|
15
|
+
import inl from 'inl-ui';
|
|
16
|
+
import 'inl-ui/dist/style.css';
|
|
17
|
+
|
|
18
|
+
vue.use(inl)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### 激活主题
|
|
24
|
+
|
|
25
|
+
**vite.config.ts**
|
|
26
|
+
|
|
27
|
+
```javascript
|
|
28
|
+
const additionalData = require("inl-ui/dist/theme").default;
|
|
29
|
+
|
|
30
|
+
...
|
|
31
|
+
|
|
32
|
+
css: {
|
|
33
|
+
preprocessorOptions: {
|
|
34
|
+
less: {
|
|
35
|
+
javascriptEnabled: true,
|
|
36
|
+
additionalData,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 文档链接
|
|
43
|
+
|
|
44
|
+
##### [组件文档](./src/components/README.md)
|
|
45
|
+
|
|
46
|
+
##### [hooks文档](./src/hooks/README.md)
|
|
47
|
+
|
|
48
|
+
##### [Utils文档](./src/utils/README.md)
|
|
49
|
+
|
|
@@ -13,6 +13,7 @@ var qiankun = require('qiankun');
|
|
|
13
13
|
var dayjs = require('dayjs');
|
|
14
14
|
require('vite-plugin-qiankun');
|
|
15
15
|
var renderWithQiankun = require('vite-plugin-qiankun/dist/helper');
|
|
16
|
+
var mqtt = require('mqtt');
|
|
16
17
|
var mobile = require('@sszj-temp/mobile');
|
|
17
18
|
var marked = require('marked');
|
|
18
19
|
|
|
@@ -39,6 +40,7 @@ function _interopNamespace(e) {
|
|
|
39
40
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios$2);
|
|
40
41
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
41
42
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
43
|
+
var mqtt__default = /*#__PURE__*/_interopDefaultLegacy(mqtt);
|
|
42
44
|
|
|
43
45
|
const config = {
|
|
44
46
|
prefix: "inl",
|
|
@@ -9639,6 +9641,33 @@ var Tree = vue.defineComponent({
|
|
|
9639
9641
|
}
|
|
9640
9642
|
});
|
|
9641
9643
|
|
|
9644
|
+
let client = null;
|
|
9645
|
+
const ip = "10.255.9.121";
|
|
9646
|
+
let connectUrl = `ws://${ip}:8083/mqtt`;
|
|
9647
|
+
const useMqtt = async (options = {}) => {
|
|
9648
|
+
if (client) {
|
|
9649
|
+
return client;
|
|
9650
|
+
}
|
|
9651
|
+
return new Promise(async (resolve, reject) => {
|
|
9652
|
+
const mqttOptions = {
|
|
9653
|
+
url: connectUrl,
|
|
9654
|
+
clientId: `llm_${new Date().getTime()}`,
|
|
9655
|
+
username: "admin",
|
|
9656
|
+
password: "admin123",
|
|
9657
|
+
...options
|
|
9658
|
+
};
|
|
9659
|
+
client = mqtt__default["default"].connect(connectUrl, mqttOptions);
|
|
9660
|
+
client.on("connect", () => {
|
|
9661
|
+
console.log("\u8FDE\u63A5\u6210\u529F");
|
|
9662
|
+
resolve(client);
|
|
9663
|
+
});
|
|
9664
|
+
client.on("error", err => {
|
|
9665
|
+
console.log("\u8FDE\u63A5\u5931\u8D25", err);
|
|
9666
|
+
reject(err);
|
|
9667
|
+
});
|
|
9668
|
+
});
|
|
9669
|
+
};
|
|
9670
|
+
|
|
9642
9671
|
const props$6 = {
|
|
9643
9672
|
// 视频信息|视频源uuid
|
|
9644
9673
|
camera: {
|
|
@@ -9656,7 +9685,7 @@ const props$6 = {
|
|
|
9656
9685
|
// },
|
|
9657
9686
|
btns: {
|
|
9658
9687
|
type: Array,
|
|
9659
|
-
default: ["change", "fill", "look", "stream", "magnify", "direction", "fullScreen", "close"]
|
|
9688
|
+
default: ["vlm", "change", "fill", "look", "stream", "magnify", "direction", "fullScreen", "close"]
|
|
9660
9689
|
},
|
|
9661
9690
|
alarm: {
|
|
9662
9691
|
default: false,
|
|
@@ -9679,6 +9708,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9679
9708
|
const streamHistory = vue.ref("");
|
|
9680
9709
|
const streams = vue.ref([]);
|
|
9681
9710
|
const showInfo = vue.ref(true);
|
|
9711
|
+
const showVlmInfo = vue.ref(true);
|
|
9682
9712
|
const magnifyBtn = vue.ref(false);
|
|
9683
9713
|
const videoBtns = [[{
|
|
9684
9714
|
text: "lup",
|
|
@@ -9784,10 +9814,25 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9784
9814
|
});
|
|
9785
9815
|
camera.value = res.data.data;
|
|
9786
9816
|
streams.value = JSON.parse(camera.value?.brandTypePo?.streamTypeDict || "[]");
|
|
9817
|
+
console.log("vlmSwitchKey.value", vlmSwitchKey.value);
|
|
9818
|
+
console.log("localStorage.getItem(vlmSwitchKey.value)", localStorage.getItem(vlmSwitchKey.value));
|
|
9819
|
+
if (localStorage.getItem(vlmSwitchKey.value) !== "false") {
|
|
9820
|
+
showVlmInfo.value = true;
|
|
9821
|
+
if (camera.value?.ip && showVlmInfo.value) {
|
|
9822
|
+
initMqtt(camera.value?.ip);
|
|
9823
|
+
}
|
|
9824
|
+
} else {
|
|
9825
|
+
showVlmInfo.value = false;
|
|
9826
|
+
}
|
|
9787
9827
|
};
|
|
9788
9828
|
let timeout;
|
|
9789
9829
|
vue.ref(true);
|
|
9790
|
-
vue.onBeforeUnmount(() => {
|
|
9830
|
+
vue.onBeforeUnmount(() => {
|
|
9831
|
+
if (Mqtt) {
|
|
9832
|
+
Mqtt?.unsubscribe(topic.value);
|
|
9833
|
+
Mqtt = null;
|
|
9834
|
+
}
|
|
9835
|
+
});
|
|
9791
9836
|
const resetZoom = () => {
|
|
9792
9837
|
const chooseFieldDom = document.getElementById("chooseField_" + uuid.value);
|
|
9793
9838
|
chooseFieldDom?.remove();
|
|
@@ -9806,10 +9851,19 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9806
9851
|
};
|
|
9807
9852
|
let mousedownEvent;
|
|
9808
9853
|
let mousemoveEvent;
|
|
9854
|
+
const mousemoveFun2 = e => {
|
|
9855
|
+
mousemoveEvent = e.touches[0];
|
|
9856
|
+
const rect = playerDom.getBoundingClientRect();
|
|
9857
|
+
newDiv.style.width = Math.abs(mousemoveEvent.pageX - mousedownEvent.pageX) + "px";
|
|
9858
|
+
newDiv.style.height = Math.abs(mousemoveEvent.pageY - mousedownEvent.pageY) + "px";
|
|
9859
|
+
newDiv.style.left = Math.min(mousedownEvent.offsetX, mousemoveEvent.pageX - rect.left) + begin.left + "px";
|
|
9860
|
+
newDiv.style.top = Math.min(mousedownEvent.offsetY, mousemoveEvent.pageY - rect.top) + begin.top + "px";
|
|
9861
|
+
};
|
|
9809
9862
|
const mousemoveFun = e => {
|
|
9863
|
+
e.preventDefault();
|
|
9810
9864
|
mousemoveEvent = e;
|
|
9811
|
-
newDiv.style.width = Math.abs(mousemoveEvent.offsetX - mousedownEvent.offsetX)
|
|
9812
|
-
newDiv.style.height = Math.abs(mousemoveEvent.offsetY - mousedownEvent.offsetY)
|
|
9865
|
+
newDiv.style.width = Math.abs(mousemoveEvent.offsetX - mousedownEvent.offsetX) + "px";
|
|
9866
|
+
newDiv.style.height = Math.abs(mousemoveEvent.offsetY - mousedownEvent.offsetY) + "px";
|
|
9813
9867
|
newDiv.style.left = Math.min(mousedownEvent.offsetX, mousemoveEvent.offsetX) + begin.left + "px";
|
|
9814
9868
|
newDiv.style.top = Math.min(mousedownEvent.offsetY, mousemoveEvent.offsetY) + begin.top + "px";
|
|
9815
9869
|
};
|
|
@@ -9829,22 +9883,26 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9829
9883
|
const footerDom = document.getElementById("footer_" + uuid.value);
|
|
9830
9884
|
thumbnailDom.style.display = "none";
|
|
9831
9885
|
footerDom.style.display = "none";
|
|
9886
|
+
e.target.setPointerCapture(e.pointerId);
|
|
9832
9887
|
playerDom?.addEventListener("mousemove", mousemoveFun);
|
|
9888
|
+
playerDom?.addEventListener("touchmove", mousemoveFun2);
|
|
9833
9889
|
};
|
|
9834
9890
|
const mouseupFun = mouseupEvent => {
|
|
9835
9891
|
if (!mousedownEvent) {
|
|
9836
9892
|
return;
|
|
9837
9893
|
}
|
|
9838
9894
|
playerDom?.removeEventListener("mousemove", mousemoveFun);
|
|
9839
|
-
|
|
9895
|
+
playerDom?.removeEventListener("touchmove", mousemoveFun2);
|
|
9896
|
+
newDiv?.remove();
|
|
9840
9897
|
const thumbnailDom = document.getElementById("thumbnail_" + uuid.value);
|
|
9841
9898
|
const footerDom = document.getElementById("footer_" + uuid.value);
|
|
9842
9899
|
thumbnailDom.style.display = "inline";
|
|
9843
9900
|
footerDom.style.display = "flex";
|
|
9901
|
+
const rect = playerDom.getBoundingClientRect();
|
|
9844
9902
|
const scaleX = Math.abs(mousemoveEvent.pageX - mousedownEvent.pageX) / boxDom.offsetWidth;
|
|
9845
9903
|
const scaleY = Math.abs(mousemoveEvent.pageY - mousedownEvent.pageY) / boxDom.offsetHeight;
|
|
9846
|
-
const playerLeft = Math.min(mousedownEvent.offsetX, mousemoveEvent.
|
|
9847
|
-
const playerTop = Math.min(mousedownEvent.offsetY, mousemoveEvent.
|
|
9904
|
+
const playerLeft = Math.min(mousedownEvent.offsetX, mousemoveEvent.clientX - rect.left) * -1 / scaleX;
|
|
9905
|
+
const playerTop = Math.min(mousedownEvent.offsetY, mousemoveEvent.clientY - rect.top) * -1 / scaleY;
|
|
9848
9906
|
const playerWidth = playerDom.offsetWidth / scaleX;
|
|
9849
9907
|
const playerHeight = playerDom.offsetHeight / scaleY;
|
|
9850
9908
|
playerDom.style.left = playerLeft + "px";
|
|
@@ -9863,14 +9921,16 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9863
9921
|
playerDom = document.getElementById("videoPlayer_" + uuid.value);
|
|
9864
9922
|
if (magnifyBtn.value) {
|
|
9865
9923
|
magnifyBtn.value = !magnifyBtn.value;
|
|
9866
|
-
playerDom?.removeEventListener("
|
|
9924
|
+
playerDom?.removeEventListener("pointerdown", mousedownFun);
|
|
9867
9925
|
document?.removeEventListener("mouseup", mouseupFun);
|
|
9926
|
+
document?.removeEventListener("touchend", mouseupFun);
|
|
9868
9927
|
resetZoom();
|
|
9869
9928
|
return;
|
|
9870
9929
|
}
|
|
9871
9930
|
magnifyBtn.value = !magnifyBtn.value;
|
|
9872
|
-
playerDom?.addEventListener("
|
|
9931
|
+
playerDom?.addEventListener("pointerdown", mousedownFun);
|
|
9873
9932
|
document?.addEventListener("mouseup", mouseupFun);
|
|
9933
|
+
document?.addEventListener("touchend", mouseupFun);
|
|
9874
9934
|
};
|
|
9875
9935
|
const fill = vue.ref("fill");
|
|
9876
9936
|
const setNewCamera = val => {
|
|
@@ -9932,6 +9992,126 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9932
9992
|
}, null) : ""])]
|
|
9933
9993
|
});
|
|
9934
9994
|
};
|
|
9995
|
+
let Mqtt = null;
|
|
9996
|
+
const topic = vue.ref("");
|
|
9997
|
+
const initMqtt = async ip => {
|
|
9998
|
+
Mqtt = await useMqtt();
|
|
9999
|
+
topic.value = `vlm/${ip}`;
|
|
10000
|
+
Mqtt.subscribe(topic.value, {
|
|
10001
|
+
qos: 2
|
|
10002
|
+
}, err => {
|
|
10003
|
+
if (!err) {
|
|
10004
|
+
console.log(`\u8BA2\u9605\u6210\u529F\u4E3B\u9898:${topic.value}`);
|
|
10005
|
+
} else {
|
|
10006
|
+
console.log(`\u8BA2\u9605\u5931\u8D25:${err}`);
|
|
10007
|
+
}
|
|
10008
|
+
});
|
|
10009
|
+
Mqtt.on("message", onMtMessageFn);
|
|
10010
|
+
};
|
|
10011
|
+
const onMtMessageFn = (topic2, message2) => {
|
|
10012
|
+
const msg = new TextDecoder("utf-8").decode(message2);
|
|
10013
|
+
console.log("msg", JSON.parse(msg));
|
|
10014
|
+
drawFlog(JSON.parse(msg));
|
|
10015
|
+
};
|
|
10016
|
+
let canvasDom = null;
|
|
10017
|
+
let textBox = null;
|
|
10018
|
+
const createFlogCanvas = () => {
|
|
10019
|
+
const box = document.getElementById("videoBox_" + uuid.value);
|
|
10020
|
+
if (!canvasDom) {
|
|
10021
|
+
canvasDom = document.createElement("canvas");
|
|
10022
|
+
canvasDom.id = "canvas_" + uuid.value;
|
|
10023
|
+
canvasDom.width = box.offsetWidth;
|
|
10024
|
+
canvasDom.height = box.offsetHeight;
|
|
10025
|
+
canvasDom.style.position = "absolute";
|
|
10026
|
+
canvasDom.style.top = "0";
|
|
10027
|
+
canvasDom.style.left = "0";
|
|
10028
|
+
canvasDom.style.zIndex = "999";
|
|
10029
|
+
canvasDom.style.pointerEvents = "none";
|
|
10030
|
+
box.appendChild(canvasDom);
|
|
10031
|
+
}
|
|
10032
|
+
if (!textBox) {
|
|
10033
|
+
textBox = document.createElement("div");
|
|
10034
|
+
textBox.id = "textBox_" + uuid.value;
|
|
10035
|
+
textBox.style.position = "absolute";
|
|
10036
|
+
textBox.style.width = "100%";
|
|
10037
|
+
textBox.style.left = "0";
|
|
10038
|
+
textBox.style.zIndex = "999";
|
|
10039
|
+
textBox.style.pointerEvents = "none";
|
|
10040
|
+
box.appendChild(textBox);
|
|
10041
|
+
}
|
|
10042
|
+
return {
|
|
10043
|
+
canvasDom,
|
|
10044
|
+
textBox,
|
|
10045
|
+
width: box.offsetWidth,
|
|
10046
|
+
height: box.offsetHeight
|
|
10047
|
+
};
|
|
10048
|
+
};
|
|
10049
|
+
let drawCleanTimer = null;
|
|
10050
|
+
const drawFlog = data => {
|
|
10051
|
+
let {
|
|
10052
|
+
canvasDom: canvasDom2,
|
|
10053
|
+
width,
|
|
10054
|
+
height,
|
|
10055
|
+
textBox: textBox2
|
|
10056
|
+
} = createFlogCanvas();
|
|
10057
|
+
const ctx = canvasDom2.getContext("2d");
|
|
10058
|
+
if (drawCleanTimer) {
|
|
10059
|
+
clearTimeout(drawCleanTimer);
|
|
10060
|
+
ctx.clearRect(0, 0, canvasDom2.width, canvasDom2.height);
|
|
10061
|
+
}
|
|
10062
|
+
if (data.bboxes?.length > 0) {
|
|
10063
|
+
(data.bboxes || []).forEach(rect => {
|
|
10064
|
+
ctx.beginPath();
|
|
10065
|
+
ctx.lineWidth = 2;
|
|
10066
|
+
ctx.strokeStyle = rect.color || "red";
|
|
10067
|
+
ctx.fillStyle = rect.color || "red";
|
|
10068
|
+
ctx.rect(rect.xmin * width, rect.ymin * height, (rect.xmax - rect.xmin) * width, (rect.ymax - rect.ymin) * height);
|
|
10069
|
+
ctx.stroke();
|
|
10070
|
+
});
|
|
10071
|
+
}
|
|
10072
|
+
if (data.text) {
|
|
10073
|
+
const fontSize = 14;
|
|
10074
|
+
const margin = 10;
|
|
10075
|
+
const marginTop = height * 0.1 + margin;
|
|
10076
|
+
textBox2.innerHTML = data.text;
|
|
10077
|
+
textBox2.style.top = marginTop + "px";
|
|
10078
|
+
textBox2.style.backgroundColor = "rgba(255, 255, 255, 0.5)";
|
|
10079
|
+
textBox2.style.color = data.text_color || "red";
|
|
10080
|
+
textBox2.style.fontSize = `${fontSize}px`;
|
|
10081
|
+
textBox2.style.padding = `${margin}px`;
|
|
10082
|
+
} else {
|
|
10083
|
+
removeTxtBox();
|
|
10084
|
+
}
|
|
10085
|
+
drawCleanTimer = setTimeout(() => {
|
|
10086
|
+
ctx.clearRect(0, 0, canvasDom2.width, canvasDom2.height);
|
|
10087
|
+
removeTxtBox();
|
|
10088
|
+
}, data.seconds * 1e3);
|
|
10089
|
+
};
|
|
10090
|
+
const removeTxtBox = () => {
|
|
10091
|
+
textBox.innerHTML = "";
|
|
10092
|
+
textBox.remove();
|
|
10093
|
+
textBox = null;
|
|
10094
|
+
};
|
|
10095
|
+
const vlmSwitchKey = vue.computed(() => {
|
|
10096
|
+
return `showVlmInfo_${camera.value?.uuid}`;
|
|
10097
|
+
});
|
|
10098
|
+
vue.watchEffect(() => {
|
|
10099
|
+
if (showVlmInfo.value) {
|
|
10100
|
+
localStorage.removeItem(vlmSwitchKey.value);
|
|
10101
|
+
} else {
|
|
10102
|
+
localStorage.setItem(vlmSwitchKey.value, "false");
|
|
10103
|
+
let {
|
|
10104
|
+
canvasDom: canvasDom2,
|
|
10105
|
+
textBox: textBox2,
|
|
10106
|
+
width,
|
|
10107
|
+
height
|
|
10108
|
+
} = createFlogCanvas();
|
|
10109
|
+
const ctx = canvasDom2.getContext("2d");
|
|
10110
|
+
clearTimeout(drawCleanTimer);
|
|
10111
|
+
removeTxtBox();
|
|
10112
|
+
ctx.clearRect(0, 0, canvasDom2.width, canvasDom2.height);
|
|
10113
|
+
}
|
|
10114
|
+
});
|
|
9935
10115
|
return () => vue.createVNode("div", {
|
|
9936
10116
|
"id": "videoBox_" + uuid.value,
|
|
9937
10117
|
"class": ["videoBox", _prop.alarm ? "alarm" : ""]
|
|
@@ -9988,6 +10168,20 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9988
10168
|
}, [_prop.btns.map(btn => {
|
|
9989
10169
|
if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look" && btn !== "change")) {
|
|
9990
10170
|
switch (btn) {
|
|
10171
|
+
case "vlm":
|
|
10172
|
+
return vue.createVNode("img", {
|
|
10173
|
+
"title": "\u6253\u5F00/\u5173\u95ED\u591A\u6A21\u6001",
|
|
10174
|
+
"onClick": e => {
|
|
10175
|
+
showVlmInfo.value = !showVlmInfo.value;
|
|
10176
|
+
if (showVlmInfo.value) {
|
|
10177
|
+
initMqtt(camera.value?.ip);
|
|
10178
|
+
} else {
|
|
10179
|
+
Mqtt?.unsubscribe(topic.value);
|
|
10180
|
+
Mqtt = null;
|
|
10181
|
+
}
|
|
10182
|
+
},
|
|
10183
|
+
"src": showVlmInfo.value ? "/micro-assets/inl/video/controls/ai-show.svg" : "/micro-assets/inl/video/controls/ai-hide.svg"
|
|
10184
|
+
}, null);
|
|
9991
10185
|
case "change":
|
|
9992
10186
|
return vue.createVNode("img", {
|
|
9993
10187
|
"title": "\u66F4\u6362\u6444\u50CF\u5934",
|