inl-ui 0.1.46 → 0.1.47
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 +339 -20
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +340 -21
- package/dist/iconfont.js +1 -1
- package/dist/index.cjs +340 -21
- package/dist/index.d.ts +3 -2
- package/dist/index.js +340 -21
- 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 +333 -13
- package/dist/video/index.d.ts +2 -1
- package/dist/video/index.js +335 -15
- package/package.json +1 -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
|
+
|
|
@@ -267,7 +267,7 @@ function useActiveMenu(menuList, extraPages, isNav = false, watchOnce = false, i
|
|
|
267
267
|
return menu;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
function _isSlot$
|
|
270
|
+
function _isSlot$d(s) {
|
|
271
271
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
272
272
|
}
|
|
273
273
|
const Header$1 = vue.defineComponent({
|
|
@@ -362,7 +362,7 @@ const Header$1 = vue.defineComponent({
|
|
|
362
362
|
"selectedKeys": acitveMenuKey.value,
|
|
363
363
|
"onUpdate:selectedKeys": $event => acitveMenuKey.value = $event,
|
|
364
364
|
"onSelect": handleMenuSelected
|
|
365
|
-
}, _isSlot$
|
|
365
|
+
}, _isSlot$d(_slot = props.menu.map(item => vue.createVNode(antDesignVue.MenuItem, {
|
|
366
366
|
"key": item.id,
|
|
367
367
|
"title": item.name
|
|
368
368
|
}, {
|
|
@@ -430,7 +430,7 @@ const Header$1 = vue.defineComponent({
|
|
|
430
430
|
}
|
|
431
431
|
});
|
|
432
432
|
|
|
433
|
-
function _isSlot$
|
|
433
|
+
function _isSlot$c(s) {
|
|
434
434
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
435
435
|
}
|
|
436
436
|
const renderMenuItem = item => {
|
|
@@ -512,7 +512,7 @@ const SideMenu$1 = vue.defineComponent({
|
|
|
512
512
|
"onUpdate:openKeys": $event => expandKeys.value = $event,
|
|
513
513
|
"selectedKeys": activeMenu.value,
|
|
514
514
|
"onSelect": handleMenuSelect
|
|
515
|
-
}, _isSlot$
|
|
515
|
+
}, _isSlot$c(_slot = props.menu.map(item => renderMenuItem(item))) ? _slot : {
|
|
516
516
|
default: () => [_slot]
|
|
517
517
|
});
|
|
518
518
|
};
|
|
@@ -8018,7 +8018,7 @@ const Header = vue.defineComponent({
|
|
|
8018
8018
|
});
|
|
8019
8019
|
var table = installComponent(Header, "layout-table");
|
|
8020
8020
|
|
|
8021
|
-
function _isSlot$
|
|
8021
|
+
function _isSlot$b(s) {
|
|
8022
8022
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
8023
8023
|
}
|
|
8024
8024
|
const SideMenu = vue.defineComponent({
|
|
@@ -8091,7 +8091,7 @@ const SideMenu = vue.defineComponent({
|
|
|
8091
8091
|
"icon": menu.icon && vue.createVNode(IconFont$1, {
|
|
8092
8092
|
"type": menu.icon
|
|
8093
8093
|
}, null)
|
|
8094
|
-
}, _isSlot$
|
|
8094
|
+
}, _isSlot$b(_slot = menu.subList.map(item => renderMenu(item))) ? _slot : {
|
|
8095
8095
|
default: () => [_slot]
|
|
8096
8096
|
});
|
|
8097
8097
|
}
|
|
@@ -8113,7 +8113,7 @@ const SideMenu = vue.defineComponent({
|
|
|
8113
8113
|
"mode": "inline",
|
|
8114
8114
|
"selectedKeys": activeMenu.value,
|
|
8115
8115
|
"onSelect": handleMenuSelect
|
|
8116
|
-
}, _isSlot$
|
|
8116
|
+
}, _isSlot$b(_slot2 = props.menuList.map(item => renderMenu(item))) ? _slot2 : {
|
|
8117
8117
|
default: () => [_slot2]
|
|
8118
8118
|
});
|
|
8119
8119
|
};
|
|
@@ -9162,6 +9162,293 @@ const VideoBox = vue.defineComponent({
|
|
|
9162
9162
|
});
|
|
9163
9163
|
var videoBox = installComponent(VideoBox, "video-box");
|
|
9164
9164
|
|
|
9165
|
+
function _isSlot$a(s) {
|
|
9166
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
9167
|
+
}
|
|
9168
|
+
let dataList = [];
|
|
9169
|
+
const generateList = (data, obj) => {
|
|
9170
|
+
for (let i = 0; i < data.length; i++) {
|
|
9171
|
+
const node = _.cloneDeep(data[i]);
|
|
9172
|
+
delete node.children;
|
|
9173
|
+
obj.push({
|
|
9174
|
+
...node
|
|
9175
|
+
});
|
|
9176
|
+
if (data[i].children) {
|
|
9177
|
+
generateList(data[i].children, obj);
|
|
9178
|
+
}
|
|
9179
|
+
}
|
|
9180
|
+
};
|
|
9181
|
+
const generateUniqueField = list => {
|
|
9182
|
+
list.forEach(item => {
|
|
9183
|
+
const parentUuid = item.parentUuid || 0;
|
|
9184
|
+
item.uniqueField = `${parentUuid}-${item.uuid}`;
|
|
9185
|
+
if (item.children?.length > 0) {
|
|
9186
|
+
generateUniqueField(item.children);
|
|
9187
|
+
}
|
|
9188
|
+
});
|
|
9189
|
+
return list;
|
|
9190
|
+
};
|
|
9191
|
+
var Tree = vue.defineComponent({
|
|
9192
|
+
components: {},
|
|
9193
|
+
props: {
|
|
9194
|
+
groupFix: {
|
|
9195
|
+
type: Number
|
|
9196
|
+
},
|
|
9197
|
+
checkable: {
|
|
9198
|
+
type: Boolean,
|
|
9199
|
+
default: () => false
|
|
9200
|
+
},
|
|
9201
|
+
showCameraIcon: {
|
|
9202
|
+
type: Boolean,
|
|
9203
|
+
default: () => false
|
|
9204
|
+
},
|
|
9205
|
+
selectedKeys: {
|
|
9206
|
+
type: Array,
|
|
9207
|
+
default: () => []
|
|
9208
|
+
},
|
|
9209
|
+
checkedKeys: {
|
|
9210
|
+
type: Array,
|
|
9211
|
+
default: () => []
|
|
9212
|
+
}
|
|
9213
|
+
},
|
|
9214
|
+
emits: ["selectHandle", "checkChange"],
|
|
9215
|
+
setup(props, context) {
|
|
9216
|
+
const selectedKeys = vue.ref(props.selectedKeys);
|
|
9217
|
+
const checkedKeys = vue.ref(props.checkedKeys);
|
|
9218
|
+
const expandedKeys = vue.ref([]);
|
|
9219
|
+
const searchValue = vue.ref("");
|
|
9220
|
+
const autoExpandParent = vue.ref(true);
|
|
9221
|
+
const gData = vue.ref();
|
|
9222
|
+
const treeRef = vue.ref();
|
|
9223
|
+
let treeDataRecord;
|
|
9224
|
+
let initDataPromise;
|
|
9225
|
+
const data = vue.reactive({
|
|
9226
|
+
titleType: props.groupFix || 0,
|
|
9227
|
+
list: []
|
|
9228
|
+
});
|
|
9229
|
+
const getQueryGroup = async params => {
|
|
9230
|
+
return new Promise(async resolve => {
|
|
9231
|
+
const res = await axios__default["default"].get("/api/vms/v1/cameraGroup/tree", {
|
|
9232
|
+
headers: {
|
|
9233
|
+
token: sessionStorage.getItem("token") || ""
|
|
9234
|
+
},
|
|
9235
|
+
params: {
|
|
9236
|
+
groupTypeUuid: params.uuid,
|
|
9237
|
+
cameraName: params.cameraName
|
|
9238
|
+
}
|
|
9239
|
+
});
|
|
9240
|
+
dataList = [];
|
|
9241
|
+
treeDataRecord = generateUniqueField(res.data.data);
|
|
9242
|
+
generateList(treeDataRecord, dataList);
|
|
9243
|
+
gData.value = filterTree(JSON.parse(JSON.stringify(treeDataRecord)), searchValue.value).arr;
|
|
9244
|
+
resolve(true);
|
|
9245
|
+
});
|
|
9246
|
+
};
|
|
9247
|
+
const getGroup = async () => {
|
|
9248
|
+
return new Promise(async resolve => {
|
|
9249
|
+
const res = await axios__default["default"].get("/api/vms/v1/cameraGroupType/findAll", {
|
|
9250
|
+
headers: {
|
|
9251
|
+
token: sessionStorage.getItem("token") || ""
|
|
9252
|
+
}
|
|
9253
|
+
});
|
|
9254
|
+
data.list = res.data.data;
|
|
9255
|
+
getQueryGroup(data.list[data.titleType]).then(() => {
|
|
9256
|
+
resolve(true);
|
|
9257
|
+
});
|
|
9258
|
+
});
|
|
9259
|
+
};
|
|
9260
|
+
const titleTypeChange = index => {
|
|
9261
|
+
gData.value = [];
|
|
9262
|
+
getQueryGroup(data.list[index]);
|
|
9263
|
+
return true;
|
|
9264
|
+
};
|
|
9265
|
+
const onExpand = keys => {
|
|
9266
|
+
expandedKeys.value = keys;
|
|
9267
|
+
autoExpandParent.value = false;
|
|
9268
|
+
};
|
|
9269
|
+
const onSelect = async (keys, info) => {
|
|
9270
|
+
if (info.node.nodeType === "C") {
|
|
9271
|
+
if (info.selected) {
|
|
9272
|
+
selectedKeys.value = keys;
|
|
9273
|
+
context.emit("selectHandle", info.node.dataRef);
|
|
9274
|
+
}
|
|
9275
|
+
}
|
|
9276
|
+
};
|
|
9277
|
+
const deleteBfromA = (arrA, arrB) => {
|
|
9278
|
+
const obj = {};
|
|
9279
|
+
arrA.forEach(key => {
|
|
9280
|
+
obj[key] = key;
|
|
9281
|
+
});
|
|
9282
|
+
arrB.forEach(key => {
|
|
9283
|
+
delete obj[key];
|
|
9284
|
+
});
|
|
9285
|
+
return Object.keys(obj);
|
|
9286
|
+
};
|
|
9287
|
+
const onCheck = async (keys, e) => {
|
|
9288
|
+
let checkedNodes = [];
|
|
9289
|
+
let checkedList = [];
|
|
9290
|
+
generateList([e.node.dataRef], checkedList);
|
|
9291
|
+
const checkedUuidArr = checkedList.filter(item => item.nodeType === "C").map(ele => ele.uuid);
|
|
9292
|
+
const checkedKeyArr = uuidToKey([...new Set(checkedUuidArr)]);
|
|
9293
|
+
if (e.checked) {
|
|
9294
|
+
checkedKeys.value = [... /* @__PURE__ */new Set([...checkedKeys.value, ...checkedKeyArr])];
|
|
9295
|
+
} else {
|
|
9296
|
+
checkedKeys.value = deleteBfromA(checkedKeys.value, checkedKeyArr);
|
|
9297
|
+
}
|
|
9298
|
+
const uuids = checkedKeys.value.map(item => item.split("-")[1]);
|
|
9299
|
+
const uuidRes = [...new Set(uuids)];
|
|
9300
|
+
const treeList = [];
|
|
9301
|
+
generateList(treeDataRecord, treeList);
|
|
9302
|
+
treeList.forEach(element => {
|
|
9303
|
+
if (uuidRes.indexOf(element.uuid) >= 0) {
|
|
9304
|
+
checkedNodes.push({
|
|
9305
|
+
uuid: element.uuid,
|
|
9306
|
+
name: element.title
|
|
9307
|
+
});
|
|
9308
|
+
}
|
|
9309
|
+
});
|
|
9310
|
+
context.emit("checkChange", checkedNodes);
|
|
9311
|
+
};
|
|
9312
|
+
const removeChecked = value => {
|
|
9313
|
+
const uniqueFieldList = uuidToKey([value]);
|
|
9314
|
+
checkedKeys.value = checkedKeys.value.filter(key => !uniqueFieldList.includes(key));
|
|
9315
|
+
};
|
|
9316
|
+
const clearChecked = () => {
|
|
9317
|
+
checkedKeys.value = [];
|
|
9318
|
+
context.emit("checkChange", []);
|
|
9319
|
+
};
|
|
9320
|
+
const setCheckedKeys = arr => {
|
|
9321
|
+
initDataPromise.then(() => {
|
|
9322
|
+
checkedKeys.value = uuidToKey(arr);
|
|
9323
|
+
});
|
|
9324
|
+
};
|
|
9325
|
+
const uuidToKey = arr => {
|
|
9326
|
+
let list = [];
|
|
9327
|
+
arr.forEach(uuid => {
|
|
9328
|
+
const nodes = dataList.filter(item => item.uuid === uuid);
|
|
9329
|
+
nodes.forEach(node => {
|
|
9330
|
+
const parentUuid = node.parentUuid || 0;
|
|
9331
|
+
list.push(`${parentUuid}-${node.uuid}`);
|
|
9332
|
+
});
|
|
9333
|
+
});
|
|
9334
|
+
return list;
|
|
9335
|
+
};
|
|
9336
|
+
vue.watch(() => props.groupFix, n => {
|
|
9337
|
+
data.titleType = n;
|
|
9338
|
+
getQueryGroup(data.list[n]);
|
|
9339
|
+
});
|
|
9340
|
+
context.expose({
|
|
9341
|
+
removeChecked,
|
|
9342
|
+
clearChecked,
|
|
9343
|
+
setCheckedKeys,
|
|
9344
|
+
refreshTree: () => getQueryGroup(data.list[data.titleType])
|
|
9345
|
+
});
|
|
9346
|
+
vue.onMounted(() => {
|
|
9347
|
+
initDataPromise = getGroup();
|
|
9348
|
+
});
|
|
9349
|
+
const filterTree = (arr, key) => {
|
|
9350
|
+
let expandKeys = [];
|
|
9351
|
+
let res = "noHave";
|
|
9352
|
+
for (let i = 0; i < arr.length; i++) {
|
|
9353
|
+
const obj = arr[i];
|
|
9354
|
+
let childHave = "noHave";
|
|
9355
|
+
if (obj.children && obj.children.length != 0) {
|
|
9356
|
+
const {
|
|
9357
|
+
res: resSub,
|
|
9358
|
+
expandKeys: expandKeysSub
|
|
9359
|
+
} = filterTree(obj.children, key);
|
|
9360
|
+
childHave = resSub;
|
|
9361
|
+
expandKeys = expandKeys.concat(expandKeysSub);
|
|
9362
|
+
}
|
|
9363
|
+
if (obj.title.indexOf(key) === -1 && childHave === "noHave") {
|
|
9364
|
+
arr.splice(i, 1);
|
|
9365
|
+
i--;
|
|
9366
|
+
continue;
|
|
9367
|
+
} else {
|
|
9368
|
+
res = "have";
|
|
9369
|
+
if (key.trim()) expandKeys.push(obj.uuid);
|
|
9370
|
+
}
|
|
9371
|
+
}
|
|
9372
|
+
return {
|
|
9373
|
+
arr,
|
|
9374
|
+
res,
|
|
9375
|
+
expandKeys
|
|
9376
|
+
};
|
|
9377
|
+
};
|
|
9378
|
+
vue.watch(() => searchValue.value, value => {
|
|
9379
|
+
const {
|
|
9380
|
+
arr,
|
|
9381
|
+
expandKeys
|
|
9382
|
+
} = filterTree(JSON.parse(JSON.stringify(treeDataRecord)), searchValue.value);
|
|
9383
|
+
gData.value = arr;
|
|
9384
|
+
expandedKeys.value = expandKeys;
|
|
9385
|
+
});
|
|
9386
|
+
return () => {
|
|
9387
|
+
let _slot;
|
|
9388
|
+
return vue.createVNode("div", {
|
|
9389
|
+
"class": "tree-camera"
|
|
9390
|
+
}, [vue.createVNode("div", {
|
|
9391
|
+
"class": "search-box"
|
|
9392
|
+
}, [typeof props.groupFix !== "number" && vue.createVNode(vue.resolveComponent("a-select"), {
|
|
9393
|
+
"style": "width:100%",
|
|
9394
|
+
"onChange": e => titleTypeChange(e),
|
|
9395
|
+
"value": data.titleType,
|
|
9396
|
+
"onUpdate:value": $event => data.titleType = $event
|
|
9397
|
+
}, _isSlot$a(_slot = data.list.map((item, index) => {
|
|
9398
|
+
return vue.createVNode(vue.resolveComponent("a-select-option"), {
|
|
9399
|
+
"value": index
|
|
9400
|
+
}, {
|
|
9401
|
+
default: () => [item.name]
|
|
9402
|
+
});
|
|
9403
|
+
})) ? _slot : {
|
|
9404
|
+
default: () => [_slot]
|
|
9405
|
+
}), vue.withDirectives(vue.createVNode(vue.resolveComponent("a-input"), {
|
|
9406
|
+
"placeholder": "\u8F93\u5165\u76F8\u673A\u540D\u79F0",
|
|
9407
|
+
"value": searchValue.value,
|
|
9408
|
+
"onUpdate:value": $event => searchValue.value = $event
|
|
9409
|
+
}, {
|
|
9410
|
+
suffix: () => {
|
|
9411
|
+
return vue.createVNode(iconsVue.SearchOutlined, {
|
|
9412
|
+
"style": "color: rgba(0, 0, 0, 0.45)"
|
|
9413
|
+
}, null);
|
|
9414
|
+
}
|
|
9415
|
+
}), [[vue.vShow, data.list && data.list.length > 0]])]), vue.createVNode("div", {
|
|
9416
|
+
"class": "tree-wrap"
|
|
9417
|
+
}, [vue.createVNode(vue.resolveComponent("a-tree"), {
|
|
9418
|
+
"ref": treeRef,
|
|
9419
|
+
"class": "tree-mins",
|
|
9420
|
+
"showLine": true,
|
|
9421
|
+
"onCheck": onCheck,
|
|
9422
|
+
"onSelect": onSelect,
|
|
9423
|
+
"selectedKeys": selectedKeys.value,
|
|
9424
|
+
"checkedKeys": checkedKeys.value,
|
|
9425
|
+
"expandedKeys": expandedKeys.value,
|
|
9426
|
+
"autoExpandParent": autoExpandParent.value,
|
|
9427
|
+
"tree-data": gData.value,
|
|
9428
|
+
"onExpand": onExpand,
|
|
9429
|
+
"checkable": props.checkable,
|
|
9430
|
+
"fieldNames": {
|
|
9431
|
+
key: "uniqueField"
|
|
9432
|
+
}
|
|
9433
|
+
}, {
|
|
9434
|
+
title: item => {
|
|
9435
|
+
return vue.createVNode("div", {
|
|
9436
|
+
"class": "tree-icons-min flex"
|
|
9437
|
+
}, [props.showCameraIcon && vue.createVNode("div", {
|
|
9438
|
+
"class": "icons-min"
|
|
9439
|
+
}, [vue.withDirectives(vue.createVNode("img", {
|
|
9440
|
+
"class": "active-r",
|
|
9441
|
+
"src": item.onlineStatus === "ONLINE" ? "/micro-assets/inl/video/operation/cameraOnline.svg" : "/micro-assets/inl/video/operation/cameraOffline.svg",
|
|
9442
|
+
"alt": "\u5728\u7EBF"
|
|
9443
|
+
}, null), [[vue.vShow, item.nodeType === "C"]])]), vue.createVNode("span", {
|
|
9444
|
+
"class": ["xj", item.nodeType === "G" ? "gactive" : "", item.onlineStatus === "ONLINE" ? "yactive" : ""]
|
|
9445
|
+
}, [item.title])]);
|
|
9446
|
+
}
|
|
9447
|
+
})])]);
|
|
9448
|
+
};
|
|
9449
|
+
}
|
|
9450
|
+
});
|
|
9451
|
+
|
|
9165
9452
|
const props$6 = {
|
|
9166
9453
|
// 视频信息|视频源uuid
|
|
9167
9454
|
camera: {
|
|
@@ -9179,7 +9466,7 @@ const props$6 = {
|
|
|
9179
9466
|
// },
|
|
9180
9467
|
btns: {
|
|
9181
9468
|
type: Array,
|
|
9182
|
-
default: ["fill", "look", "stream", "magnify", "direction", "fullScreen", "close"]
|
|
9469
|
+
default: ["change", "fill", "look", "stream", "magnify", "direction", "fullScreen", "close"]
|
|
9183
9470
|
},
|
|
9184
9471
|
alarm: {
|
|
9185
9472
|
default: false,
|
|
@@ -9195,7 +9482,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9195
9482
|
components: {
|
|
9196
9483
|
VideoPlayerV2
|
|
9197
9484
|
},
|
|
9198
|
-
emits: ["close"],
|
|
9485
|
+
emits: ["close", "change"],
|
|
9199
9486
|
setup(_prop, _context) {
|
|
9200
9487
|
const player = vue.ref();
|
|
9201
9488
|
const cameraConfig = vue.ref({});
|
|
@@ -9392,18 +9679,21 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9392
9679
|
document?.addEventListener("mouseup", mouseupFun);
|
|
9393
9680
|
};
|
|
9394
9681
|
const fill = vue.ref("fill");
|
|
9682
|
+
const setNewCamera = val => {
|
|
9683
|
+
if (magnifyBtn.value) {
|
|
9684
|
+
setZoom();
|
|
9685
|
+
}
|
|
9686
|
+
camera.value = void 0;
|
|
9687
|
+
getVideoParams(val);
|
|
9688
|
+
getVideoDetail(val);
|
|
9689
|
+
const fillVal = localStorage.getItem(val);
|
|
9690
|
+
if (fillVal) {
|
|
9691
|
+
fill.value = fillVal;
|
|
9692
|
+
}
|
|
9693
|
+
};
|
|
9395
9694
|
vue.watch(() => _prop.camera, val => {
|
|
9396
9695
|
if (val && Object.keys(val).length != 0) {
|
|
9397
|
-
|
|
9398
|
-
setZoom();
|
|
9399
|
-
}
|
|
9400
|
-
camera.value = void 0;
|
|
9401
|
-
getVideoParams(val);
|
|
9402
|
-
getVideoDetail(val);
|
|
9403
|
-
const fillVal = localStorage.getItem(val);
|
|
9404
|
-
if (fillVal) {
|
|
9405
|
-
fill.value = fillVal;
|
|
9406
|
-
}
|
|
9696
|
+
setNewCamera(val);
|
|
9407
9697
|
}
|
|
9408
9698
|
}, {
|
|
9409
9699
|
deep: true,
|
|
@@ -9421,6 +9711,27 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9421
9711
|
});
|
|
9422
9712
|
cameraConfig.value.webrtcTemplateMerged = res.data.data[0];
|
|
9423
9713
|
};
|
|
9714
|
+
const showChangeDialog = vue.ref(false);
|
|
9715
|
+
const checkChange = res => {
|
|
9716
|
+
showChangeDialog.value = false;
|
|
9717
|
+
setNewCamera(res[0].uuid);
|
|
9718
|
+
_context.emit("change", res[0].uuid);
|
|
9719
|
+
};
|
|
9720
|
+
const renderChangeCamera = () => {
|
|
9721
|
+
return vue.createVNode(vue.resolveComponent("a-modal"), {
|
|
9722
|
+
"title": "\u66F4\u6362\u6444\u50CF\u5934",
|
|
9723
|
+
"visible": showChangeDialog.value,
|
|
9724
|
+
"footer": null,
|
|
9725
|
+
"onCancel": () => {
|
|
9726
|
+
showChangeDialog.value = false;
|
|
9727
|
+
}
|
|
9728
|
+
}, {
|
|
9729
|
+
default: () => [showChangeDialog.value ? vue.createVNode(Tree, {
|
|
9730
|
+
"checkable": true,
|
|
9731
|
+
"onCheckChange": checkChange
|
|
9732
|
+
}, null) : ""]
|
|
9733
|
+
});
|
|
9734
|
+
};
|
|
9424
9735
|
return () => vue.createVNode("div", {
|
|
9425
9736
|
"id": "videoBox_" + uuid.value,
|
|
9426
9737
|
"class": ["videoBox", _prop.alarm ? "alarm" : ""]
|
|
@@ -9476,6 +9787,14 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9476
9787
|
}, [_prop.btns.map(btn => {
|
|
9477
9788
|
if (!(camera.value?.brandTypeCode === "MP4" && btn !== "close" && btn !== "fullScreen" && btn !== "look")) {
|
|
9478
9789
|
switch (btn) {
|
|
9790
|
+
case "change":
|
|
9791
|
+
return vue.createVNode("img", {
|
|
9792
|
+
"title": "\u66F4\u6362\u6444\u50CF\u5934",
|
|
9793
|
+
"onClick": e => {
|
|
9794
|
+
showChangeDialog.value = true;
|
|
9795
|
+
},
|
|
9796
|
+
"src": "/micro-assets/inl/video/controls/change.svg"
|
|
9797
|
+
}, null);
|
|
9479
9798
|
case "fill":
|
|
9480
9799
|
return vue.createVNode("img", {
|
|
9481
9800
|
"title": "\u62C9\u4F38/\u539F\u59CB\u5C3A\u5BF8",
|
|
@@ -9594,7 +9913,7 @@ const VideoBoxV2 = vue.defineComponent({
|
|
|
9594
9913
|
}, null);
|
|
9595
9914
|
}
|
|
9596
9915
|
}
|
|
9597
|
-
})])])]);
|
|
9916
|
+
})])]), renderChangeCamera()]);
|
|
9598
9917
|
}
|
|
9599
9918
|
});
|
|
9600
9919
|
var VideoBoxV2$1 = installComponent(VideoBoxV2, "video-box-v2");
|
|
@@ -650,7 +650,7 @@ declare const _default$7: vue.DefineComponent<{
|
|
|
650
650
|
type: BooleanConstructor;
|
|
651
651
|
default: boolean;
|
|
652
652
|
};
|
|
653
|
-
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "close"[], "close", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
653
|
+
}, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("change" | "close")[], "change" | "close", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
654
654
|
camera: {
|
|
655
655
|
require: boolean;
|
|
656
656
|
type: StringConstructor;
|
|
@@ -685,6 +685,7 @@ declare const _default$7: vue.DefineComponent<{
|
|
|
685
685
|
default: boolean;
|
|
686
686
|
};
|
|
687
687
|
}>> & {
|
|
688
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
688
689
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
689
690
|
}, {
|
|
690
691
|
intervalTime: number;
|