vue3-components-plus 3.0.19 → 3.0.21
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/LICENSE +21 -21
- package/README.md +22 -176
- package/dist/ComponentDemo/DialogDemo.vue +2 -2
- package/dist/ComponentDemo/FormDemo.vue +133 -6
- package/dist/ComponentDemo/NsTableDemo/index.vue +29 -31
- package/dist/api/types.d.ts +116 -116
- package/dist/vue3-components-plus.css +1 -1
- package/dist/vue3-components-plus.d.ts +0 -2
- package/dist/vue3-components-plus.js +457 -2231
- package/dist/vue3-components-plus.umd.cjs +1 -1
- package/package.json +1 -1
- package/vue3-components-plus.d.ts +0 -2
- package/dist/ComponentDemo/DynamicFormCascadeAsyncDemo.vue +0 -337
- package/dist/ComponentDemo/DynamicFormCascadeDemo.vue +0 -263
- package/dist/ComponentDemo/DynamicFormPlusDemo.vue +0 -176
- package/dist/ComponentDemo/FormDemo copy.vue +0 -714
- package/dist/ComponentDemo/TestFormConfig.js +0 -129
- package/dist/ComponentDemo/VideoDemo.vue +0 -303
- package/dist/cdn/ezuikit/ezuikit.js +0 -27
- package/dist/cdn/ezuikit/ezuikit_static/PlayCtrlWasm/playCtrl1/HasSIMD/Decoder.js +0 -168
- package/dist/cdn/ezuikit/ezuikit_static/PlayCtrlWasm/playCtrl1/NoSIMD/Decoder.js +0 -168
- package/dist/cdn/ezuikit/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/HasSIMD/Decoder.js +0 -21
- package/dist/cdn/ezuikit/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/HasSIMD/Decoder.wasm +0 -0
- package/dist/cdn/ezuikit/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/HasSIMD/Decoder.worker.js +0 -1
- package/dist/cdn/ezuikit/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/NoSIMD/Decoder.js +0 -21
- package/dist/cdn/ezuikit/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/NoSIMD/Decoder.wasm +0 -0
- package/dist/cdn/ezuikit/ezuikit_static/PlayCtrlWasm/playCtrl3/hasWorker/NoSIMD/Decoder.worker.js +0 -1
- package/dist/cdn/ezuikit/ezuikit_static/PlayCtrlWasm/playCtrl3/noWorker/Decoder.js +0 -21
- package/dist/cdn/ezuikit/ezuikit_static/PlayCtrlWasm/playCtrl3/noWorker/Decoder.wasm +0 -0
- package/dist/cdn/ezuikit/ezuikit_static/css/component.css +0 -1257
- package/dist/cdn/ezuikit/ezuikit_static/css/inspectTheme.css +0 -354
- package/dist/cdn/ezuikit/ezuikit_static/css/theme copy.css +0 -126
- package/dist/cdn/ezuikit/ezuikit_static/css/theme.css +0 -140
- package/dist/cdn/ezuikit/ezuikit_static/imgs/bg.png +0 -0
- package/dist/cdn/ezuikit/ezuikit_static/imgs/bg.svg +0 -33
- package/dist/cdn/ezuikit/ezuikit_static/imgs/empty.png +0 -0
- package/dist/cdn/ezuikit/ezuikit_static/imgs/end.png +0 -0
- package/dist/cdn/ezuikit/ezuikit_static/imgs/fallback.svg +0 -52
- package/dist/cdn/ezuikit/ezuikit_static/imgs/start.png +0 -0
- package/dist/cdn/ezuikit/ezuikit_static/rec/datepicker.js +0 -1522
- package/dist/cdn/ezuikit/ezuikit_static/rec/datepicker.min.css +0 -36
- package/dist/cdn/ezuikit/ezuikit_static/rec/datepicker.zh-CN.js +0 -19
- package/dist/cdn/ezuikit/ezuikit_static/rec/jquery.min.js +0 -2
- package/dist/cdn/ezuikit/ezuikit_static/speed/speed.css +0 -145
- package/dist/cdn/ezuikit/ezuikit_static/talk/adapeter.js +0 -5497
- package/dist/cdn/ezuikit/ezuikit_static/talk/janus.js +0 -3507
- package/dist/cdn/ezuikit/ezuikit_static/talk/tts-v4.js +0 -343
- package/dist/cdn/ezuikit.js +0 -27
- package/dist/cdn/h5player/h5player.min.js +0 -313
- package/dist/cdn/h5player/playctrl1/DecodeWorker.js +0 -642
- package/dist/cdn/h5player/playctrl1/Decoder.js +0 -1
- package/dist/cdn/h5player/playctrl1simd/DecodeWorker.js +0 -642
- package/dist/cdn/h5player/playctrl1simd/Decoder.js +0 -1
- package/dist/cdn/h5player/playctrl2/Decoder.js +0 -21
- package/dist/cdn/h5player/playctrl2/Decoder.wasm +0 -0
- package/dist/cdn/h5player/playctrl2/Decoder.worker.js +0 -1
- package/dist/cdn/h5player/playctrl3/Decoder.js +0 -21
- package/dist/cdn/h5player/playctrl3/Decoder.wasm +0 -0
- package/dist/cdn/h5player/playctrl3/Decoder.worker.js +0 -1
- package/dist/cdn/h5player/talk/AudioInterCom.js +0 -21
- package/dist/cdn/h5player/talk/AudioInterCom.wasm +0 -0
- package/dist/cdn/h5player/talkW/AudioInterCom.js +0 -21
- package/dist/cdn/h5player/talkW/AudioInterCom.wasm +0 -0
- package/dist/cdn/h5player/talkW/AudioInterCom.worker.js +0 -1
- package/dist/cdn/h5player/transform/libSystemTransform.js +0 -6525
- package/dist/cdn/h5player/transform/libSystemTransform.wasm +0 -0
- package/dist/cdn/h5player/transform/systemTransform-worker.js +0 -120
- package/dist/cdn/md5.js +0 -254
- package/dist/js/EasyPlayer-decode.js +0 -1
- package/dist/js/EasyPlayer-lib.js +0 -1
- package/dist/js/EasyPlayer-pro.js +0 -1
- package/dist/js/EasyPlayer-pro.wasm +0 -0
- package/dist/js/EasyPlayer-snap.wasm +0 -0
|
@@ -2,12 +2,12 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
var _a2;
|
|
5
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode,
|
|
5
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, ref as ref$1, watch, normalizeClass, nextTick, useCssVars, computed, defineAsyncComponent, reactive, onMounted, onUnmounted, resolveComponent, createBlock, createSlots, withCtx, resolveDynamicComponent, mergeProps, toHandlers, Fragment, createTextVNode, toDisplayString, unref, createCommentVNode, createVNode, createApp, render, useAttrs, watchEffect, withDirectives, vShow, renderSlot, resolveDirective, renderList, normalizeStyle, getCurrentInstance, shallowRef, onBeforeUnmount, createStaticVNode, Transition, vModelText, withModifiers, normalizeProps, guardReactiveProps, onUpdated, h as h$2 } from "vue";
|
|
6
6
|
import { ElMessage, ElImage } from "element-plus";
|
|
7
7
|
import VuePdfApp from "vue3-pdf-app";
|
|
8
8
|
import axios from "axios";
|
|
9
9
|
/*! Element Plus Icons Vue v2.3.2 */
|
|
10
|
-
var _sfc_main$
|
|
10
|
+
var _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
11
11
|
name: "AddLocation",
|
|
12
12
|
__name: "add-location",
|
|
13
13
|
setup(__props) {
|
|
@@ -29,7 +29,7 @@ var _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
})
|
|
30
30
|
]));
|
|
31
31
|
}
|
|
32
|
-
}), add_location_default = _sfc_main$
|
|
32
|
+
}), add_location_default = _sfc_main$f;
|
|
33
33
|
var _sfc_main2 = /* @__PURE__ */ defineComponent({
|
|
34
34
|
name: "Aim",
|
|
35
35
|
__name: "aim",
|
|
@@ -5172,2109 +5172,6 @@ const ElementPlusIconsVue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
|
|
|
5172
5172
|
ZoomIn: zoom_in_default,
|
|
5173
5173
|
ZoomOut: zoom_out_default
|
|
5174
5174
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5175
|
-
const _hoisted_1$f = { class: "right-box-2" };
|
|
5176
|
-
const _hoisted_2$c = ["onClick"];
|
|
5177
|
-
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
5178
|
-
__name: "videoRightMenu",
|
|
5179
|
-
props: {
|
|
5180
|
-
rightMenus: {
|
|
5181
|
-
type: Array,
|
|
5182
|
-
default: () => []
|
|
5183
|
-
},
|
|
5184
|
-
sacle_x: {
|
|
5185
|
-
type: Number,
|
|
5186
|
-
default: 1
|
|
5187
|
-
},
|
|
5188
|
-
sacle_y: {
|
|
5189
|
-
type: Number,
|
|
5190
|
-
default: 1
|
|
5191
|
-
}
|
|
5192
|
-
},
|
|
5193
|
-
setup(__props, { expose: __expose }) {
|
|
5194
|
-
const props = __props;
|
|
5195
|
-
function rightHandler(rightAction) {
|
|
5196
|
-
var _a3;
|
|
5197
|
-
(_a3 = rightAction == null ? void 0 : rightAction.callback) == null ? void 0 : _a3.call(rightAction, state.rightTargetData);
|
|
5198
|
-
}
|
|
5199
|
-
const state = reactive({
|
|
5200
|
-
rightShow: false,
|
|
5201
|
-
// 右键菜单是否正在显示
|
|
5202
|
-
rightTargetData: null,
|
|
5203
|
-
// 右键菜单正在操作的 tab
|
|
5204
|
-
rightStyle: {
|
|
5205
|
-
// 右键菜单的 style 样式
|
|
5206
|
-
left: "0px",
|
|
5207
|
-
// 坐标x
|
|
5208
|
-
top: "0px",
|
|
5209
|
-
// 坐标y
|
|
5210
|
-
maxHeight: "0px"
|
|
5211
|
-
// 右键菜单的最高高度 (控制是否展开)
|
|
5212
|
-
}
|
|
5213
|
-
});
|
|
5214
|
-
const right_showMenu = function(tab, event) {
|
|
5215
|
-
state.rightTargetData = tab;
|
|
5216
|
-
const e6 = event || window.event;
|
|
5217
|
-
state.rightStyle.left = e6.clientX / props.sacle_x + 1 + "px";
|
|
5218
|
-
state.rightStyle.top = e6.clientY / props.sacle_y + "px";
|
|
5219
|
-
state.rightShow = true;
|
|
5220
|
-
nextTick(function() {
|
|
5221
|
-
var _a3, _b;
|
|
5222
|
-
const foxHeight = (_a3 = document.querySelector(".right-box-2")) == null ? void 0 : _a3.offsetHeight;
|
|
5223
|
-
state.rightStyle.maxHeight = foxHeight + "px";
|
|
5224
|
-
(_b = document.querySelector(".right-box")) == null ? void 0 : _b.focus();
|
|
5225
|
-
});
|
|
5226
|
-
};
|
|
5227
|
-
const right_closeMenu = function() {
|
|
5228
|
-
state.rightStyle.maxHeight = "0px";
|
|
5229
|
-
state.rightShow = false;
|
|
5230
|
-
};
|
|
5231
|
-
const right_closeMenu2 = function() {
|
|
5232
|
-
state.rightStyle.maxHeight = "0px";
|
|
5233
|
-
};
|
|
5234
|
-
__expose({ right_showMenu });
|
|
5235
|
-
return (_ctx, _cache) => {
|
|
5236
|
-
return withDirectives((openBlock(), createElementBlock("div", {
|
|
5237
|
-
class: "right-box",
|
|
5238
|
-
style: normalizeStyle(state.rightStyle),
|
|
5239
|
-
tabindex: "-1",
|
|
5240
|
-
onBlur: _cache[0] || (_cache[0] = ($event) => right_closeMenu2())
|
|
5241
|
-
}, [
|
|
5242
|
-
createElementVNode("div", _hoisted_1$f, [
|
|
5243
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.rightMenus, (item, index2) => {
|
|
5244
|
-
return openBlock(), createElementBlock("div", {
|
|
5245
|
-
key: index2,
|
|
5246
|
-
onClick: () => {
|
|
5247
|
-
right_closeMenu();
|
|
5248
|
-
rightHandler(item);
|
|
5249
|
-
}
|
|
5250
|
-
}, toDisplayString(item == null ? void 0 : item.name), 9, _hoisted_2$c);
|
|
5251
|
-
}), 128))
|
|
5252
|
-
])
|
|
5253
|
-
], 36)), [
|
|
5254
|
-
[vShow, state.rightShow]
|
|
5255
|
-
]);
|
|
5256
|
-
};
|
|
5257
|
-
}
|
|
5258
|
-
});
|
|
5259
|
-
const _export_sfc = (sfc, props) => {
|
|
5260
|
-
const target = sfc.__vccOpts || sfc;
|
|
5261
|
-
for (const [key, val] of props) {
|
|
5262
|
-
target[key] = val;
|
|
5263
|
-
}
|
|
5264
|
-
return target;
|
|
5265
|
-
};
|
|
5266
|
-
const ComRightMenu = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-644f5340"]]);
|
|
5267
|
-
const _hoisted_1$e = { class: "split-icon-container" };
|
|
5268
|
-
const _hoisted_2$b = ["onClick"];
|
|
5269
|
-
const _hoisted_3$9 = { class: "video-view-bg" };
|
|
5270
|
-
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
5271
|
-
__name: "SplitIcon",
|
|
5272
|
-
props: {
|
|
5273
|
-
type: {
|
|
5274
|
-
type: Number,
|
|
5275
|
-
default: 1
|
|
5276
|
-
},
|
|
5277
|
-
width: {
|
|
5278
|
-
type: String,
|
|
5279
|
-
default: "20px"
|
|
5280
|
-
},
|
|
5281
|
-
height: {
|
|
5282
|
-
type: String,
|
|
5283
|
-
default: "20px"
|
|
5284
|
-
},
|
|
5285
|
-
isVideo: {
|
|
5286
|
-
type: Boolean,
|
|
5287
|
-
default: false
|
|
5288
|
-
}
|
|
5289
|
-
},
|
|
5290
|
-
setup(__props) {
|
|
5291
|
-
useCssVars((_ctx) => ({
|
|
5292
|
-
"v5a2a7a44": unref(_w),
|
|
5293
|
-
"v5a2a7a62": unref(_h2),
|
|
5294
|
-
"v6f72a330": mixWidth.value,
|
|
5295
|
-
"v6ce9eb3a": heightComputed.value
|
|
5296
|
-
}));
|
|
5297
|
-
const props = __props;
|
|
5298
|
-
const videoUrlKey = inject("videoUrlKey");
|
|
5299
|
-
const activeIndex = inject("activeIndex");
|
|
5300
|
-
const fouceIndex = inject("fouceIndex");
|
|
5301
|
-
const videoInfos = inject("videoInfos");
|
|
5302
|
-
const checkFouceIndex = (index2) => {
|
|
5303
|
-
if (!props.isVideo) {
|
|
5304
|
-
return false;
|
|
5305
|
-
}
|
|
5306
|
-
return fouceIndex.value == index2;
|
|
5307
|
-
};
|
|
5308
|
-
const _w = props.width;
|
|
5309
|
-
const _h2 = props.height;
|
|
5310
|
-
const isFirst = ref$1(false);
|
|
5311
|
-
const onlyOne = ref$1(false);
|
|
5312
|
-
const mixWidth = ref$1("100%");
|
|
5313
|
-
const count = ref$1(1);
|
|
5314
|
-
const isActive = ref$1(false);
|
|
5315
|
-
function iconClick(index2) {
|
|
5316
|
-
if (!props.isVideo) {
|
|
5317
|
-
activeIndex.value = props.type;
|
|
5318
|
-
} else {
|
|
5319
|
-
fouceIndex.value = index2;
|
|
5320
|
-
}
|
|
5321
|
-
}
|
|
5322
|
-
const heightComputed = ref$1("100%");
|
|
5323
|
-
watch(
|
|
5324
|
-
() => activeIndex.value,
|
|
5325
|
-
() => {
|
|
5326
|
-
isActive.value = activeIndex.value == props.type;
|
|
5327
|
-
heightComputed.value = (100 / Number(activeIndex.value)).toFixed(2) + "%";
|
|
5328
|
-
},
|
|
5329
|
-
{ immediate: true }
|
|
5330
|
-
);
|
|
5331
|
-
watch(
|
|
5332
|
-
() => props.type,
|
|
5333
|
-
() => {
|
|
5334
|
-
if (props.type == 1) {
|
|
5335
|
-
isFirst.value = true;
|
|
5336
|
-
if (props.isVideo) {
|
|
5337
|
-
onlyOne.value = true;
|
|
5338
|
-
}
|
|
5339
|
-
} else {
|
|
5340
|
-
onlyOne.value = false;
|
|
5341
|
-
}
|
|
5342
|
-
count.value = Math.pow(props.type, 2);
|
|
5343
|
-
mixWidth.value = (100 / props.type).toFixed(2) + "%";
|
|
5344
|
-
const resetInfo = new Array(count.value).fill(null).map((_3, index2) => ({
|
|
5345
|
-
index: index2,
|
|
5346
|
-
[videoUrlKey]: ""
|
|
5347
|
-
}));
|
|
5348
|
-
fouceIndex.value = 0;
|
|
5349
|
-
videoInfos.value = resetInfo;
|
|
5350
|
-
},
|
|
5351
|
-
{ immediate: true }
|
|
5352
|
-
);
|
|
5353
|
-
onMounted(() => {
|
|
5354
|
-
if (props.isVideo) {
|
|
5355
|
-
console.log("video初始化");
|
|
5356
|
-
}
|
|
5357
|
-
});
|
|
5358
|
-
return (_ctx, _cache) => {
|
|
5359
|
-
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
5360
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.isVideo ? unref(videoInfos) : count.value, (videoInfo) => {
|
|
5361
|
-
return openBlock(), createElementBlock("div", {
|
|
5362
|
-
key: videoInfo,
|
|
5363
|
-
class: normalizeClass([
|
|
5364
|
-
"icon-item",
|
|
5365
|
-
isFirst.value ? "first" : "",
|
|
5366
|
-
isActive.value ? "active" : "",
|
|
5367
|
-
__props.isVideo ? "video" : "",
|
|
5368
|
-
onlyOne.value ? "only-one" : "",
|
|
5369
|
-
checkFouceIndex(videoInfo.index) ? "fouce" : ""
|
|
5370
|
-
]),
|
|
5371
|
-
onClick: ($event) => iconClick(videoInfo.index)
|
|
5372
|
-
}, [
|
|
5373
|
-
createElementVNode("div", _hoisted_3$9, [
|
|
5374
|
-
__props.isVideo ? renderSlot(_ctx.$slots, "video-view-slot", {
|
|
5375
|
-
key: 0,
|
|
5376
|
-
index: videoInfo.index,
|
|
5377
|
-
url: videoInfo[unref(videoUrlKey)],
|
|
5378
|
-
info: videoInfo == null ? void 0 : videoInfo.info
|
|
5379
|
-
}, void 0, true) : createCommentVNode("", true)
|
|
5380
|
-
])
|
|
5381
|
-
], 10, _hoisted_2$b);
|
|
5382
|
-
}), 128))
|
|
5383
|
-
]);
|
|
5384
|
-
};
|
|
5385
|
-
}
|
|
5386
|
-
});
|
|
5387
|
-
const SplitIcon = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-5efe1bd4"]]);
|
|
5388
|
-
const _hoisted_1$d = { class: "split-box" };
|
|
5389
|
-
const _hoisted_2$a = ["onClick"];
|
|
5390
|
-
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
5391
|
-
__name: "index",
|
|
5392
|
-
props: {
|
|
5393
|
-
videoSplitUseIcon: {
|
|
5394
|
-
type: Boolean,
|
|
5395
|
-
default: false
|
|
5396
|
-
}
|
|
5397
|
-
},
|
|
5398
|
-
setup(__props) {
|
|
5399
|
-
const getIconClass = (index2, activeIndex2) => {
|
|
5400
|
-
let iconClass = "";
|
|
5401
|
-
if (index2 == 0) {
|
|
5402
|
-
iconClass = "icon-yiping";
|
|
5403
|
-
} else if (index2 == 1) {
|
|
5404
|
-
iconClass = "icon-siping";
|
|
5405
|
-
} else if (index2 == 2) {
|
|
5406
|
-
iconClass = "icon-jiuping";
|
|
5407
|
-
}
|
|
5408
|
-
if (activeIndex2 != index2 + 1) {
|
|
5409
|
-
iconClass += "-moren";
|
|
5410
|
-
}
|
|
5411
|
-
return iconClass;
|
|
5412
|
-
};
|
|
5413
|
-
const splitIconCount = ref$1(3);
|
|
5414
|
-
const activeIndex = inject("activeIndex");
|
|
5415
|
-
return (_ctx, _cache) => {
|
|
5416
|
-
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
5417
|
-
_cache[1] || (_cache[1] = createElementVNode("span", { class: "split-text" }, "分屏:", -1)),
|
|
5418
|
-
!__props.videoSplitUseIcon ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(splitIconCount.value, (item) => {
|
|
5419
|
-
return openBlock(), createBlock(SplitIcon, {
|
|
5420
|
-
type: item,
|
|
5421
|
-
key: item,
|
|
5422
|
-
activeIndex: unref(activeIndex),
|
|
5423
|
-
"onUpdate:activeIndex": _cache[0] || (_cache[0] = ($event) => isRef(activeIndex) ? activeIndex.value = $event : null)
|
|
5424
|
-
}, null, 8, ["type", "activeIndex"]);
|
|
5425
|
-
}), 128)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, renderList(3, (_3, index2) => {
|
|
5426
|
-
return createElementVNode("i", {
|
|
5427
|
-
key: index2,
|
|
5428
|
-
class: normalizeClass(["martrix_iconfont", getIconClass(index2, unref(activeIndex))]),
|
|
5429
|
-
onClick: ($event) => activeIndex.value = index2 + 1
|
|
5430
|
-
}, null, 10, _hoisted_2$a);
|
|
5431
|
-
}), 64))
|
|
5432
|
-
]);
|
|
5433
|
-
};
|
|
5434
|
-
}
|
|
5435
|
-
});
|
|
5436
|
-
const SplitIconGroup = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-e9d24ad3"]]);
|
|
5437
|
-
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
5438
|
-
__name: "EasyPlay",
|
|
5439
|
-
props: {
|
|
5440
|
-
videoUrl: {
|
|
5441
|
-
type: String,
|
|
5442
|
-
default: ""
|
|
5443
|
-
},
|
|
5444
|
-
hasAudio: {
|
|
5445
|
-
type: Boolean,
|
|
5446
|
-
default: false
|
|
5447
|
-
},
|
|
5448
|
-
MSE: {
|
|
5449
|
-
type: Boolean,
|
|
5450
|
-
default: true
|
|
5451
|
-
},
|
|
5452
|
-
WCS: {
|
|
5453
|
-
type: Boolean,
|
|
5454
|
-
default: true
|
|
5455
|
-
},
|
|
5456
|
-
WASM: {
|
|
5457
|
-
type: Boolean,
|
|
5458
|
-
default: true
|
|
5459
|
-
},
|
|
5460
|
-
WASMSIMD: {
|
|
5461
|
-
type: Boolean,
|
|
5462
|
-
default: true
|
|
5463
|
-
},
|
|
5464
|
-
loadTimeReplay: {
|
|
5465
|
-
type: Number,
|
|
5466
|
-
default: 3
|
|
5467
|
-
},
|
|
5468
|
-
isLive: {
|
|
5469
|
-
type: Boolean,
|
|
5470
|
-
default: true
|
|
5471
|
-
},
|
|
5472
|
-
digitalZoom: {
|
|
5473
|
-
type: Boolean,
|
|
5474
|
-
default: true
|
|
5475
|
-
},
|
|
5476
|
-
stretch: {
|
|
5477
|
-
type: Boolean,
|
|
5478
|
-
default: true
|
|
5479
|
-
},
|
|
5480
|
-
watermark: {
|
|
5481
|
-
type: String,
|
|
5482
|
-
default: ""
|
|
5483
|
-
},
|
|
5484
|
-
playerIndex: {
|
|
5485
|
-
type: Number,
|
|
5486
|
-
default: -1
|
|
5487
|
-
}
|
|
5488
|
-
},
|
|
5489
|
-
emits: ["dblclick", "error", "urlError", "videoOriginalInfo"],
|
|
5490
|
-
setup(__props, { emit: __emit }) {
|
|
5491
|
-
const props = __props;
|
|
5492
|
-
console.info("----------初始化----------");
|
|
5493
|
-
const emits = __emit;
|
|
5494
|
-
const videoModel = inject("videoModel");
|
|
5495
|
-
console.warn("播放模式===>", videoModel);
|
|
5496
|
-
const easyRef = ref$1();
|
|
5497
|
-
const player = ref$1();
|
|
5498
|
-
const playerInfo = reactive({
|
|
5499
|
-
config: {
|
|
5500
|
-
hasAudio: true,
|
|
5501
|
-
isLive: true,
|
|
5502
|
-
MSE: false,
|
|
5503
|
-
WCS: false
|
|
5504
|
-
},
|
|
5505
|
-
isPlay: false
|
|
5506
|
-
});
|
|
5507
|
-
watch(
|
|
5508
|
-
() => props.videoUrl,
|
|
5509
|
-
async (nv) => {
|
|
5510
|
-
if (nv) {
|
|
5511
|
-
onReplay(nv);
|
|
5512
|
-
} else {
|
|
5513
|
-
await onDestroy();
|
|
5514
|
-
}
|
|
5515
|
-
},
|
|
5516
|
-
{ immediate: true }
|
|
5517
|
-
);
|
|
5518
|
-
function onPlayer(videoUrl) {
|
|
5519
|
-
playerInfo.isPlay = true;
|
|
5520
|
-
setTimeout(
|
|
5521
|
-
(url) => {
|
|
5522
|
-
if (player.value) {
|
|
5523
|
-
player.value.play(url).then(() => {
|
|
5524
|
-
}).catch((e6) => {
|
|
5525
|
-
console.warn("播放错误:", e6);
|
|
5526
|
-
emits("urlError");
|
|
5527
|
-
});
|
|
5528
|
-
}
|
|
5529
|
-
},
|
|
5530
|
-
200,
|
|
5531
|
-
videoUrl
|
|
5532
|
-
);
|
|
5533
|
-
}
|
|
5534
|
-
function onDestroy() {
|
|
5535
|
-
try {
|
|
5536
|
-
return new Promise((resolve2) => {
|
|
5537
|
-
try {
|
|
5538
|
-
if (player.value) {
|
|
5539
|
-
player.value.destroy();
|
|
5540
|
-
player.value = null;
|
|
5541
|
-
}
|
|
5542
|
-
} catch (error) {
|
|
5543
|
-
console.warn("销毁失败:", error);
|
|
5544
|
-
}
|
|
5545
|
-
setTimeout(() => {
|
|
5546
|
-
resolve2();
|
|
5547
|
-
}, 100);
|
|
5548
|
-
});
|
|
5549
|
-
} catch (error) {
|
|
5550
|
-
setTimeout(() => {
|
|
5551
|
-
console.error("888==>onDestroy失败:", error);
|
|
5552
|
-
resolve();
|
|
5553
|
-
}, 100);
|
|
5554
|
-
}
|
|
5555
|
-
}
|
|
5556
|
-
function onReplay(videoUrl) {
|
|
5557
|
-
onDestroy().then(() => {
|
|
5558
|
-
setTimeout(() => {
|
|
5559
|
-
try {
|
|
5560
|
-
playCreate(videoUrl);
|
|
5561
|
-
} catch (error) {
|
|
5562
|
-
console.warn("播放容器错误:", error);
|
|
5563
|
-
}
|
|
5564
|
-
}, 200);
|
|
5565
|
-
});
|
|
5566
|
-
}
|
|
5567
|
-
async function playCreate(videoUrl) {
|
|
5568
|
-
let container = easyRef.value;
|
|
5569
|
-
if (container) {
|
|
5570
|
-
createPlay(container);
|
|
5571
|
-
onPlayer(videoUrl);
|
|
5572
|
-
} else {
|
|
5573
|
-
setTimeout(async () => {
|
|
5574
|
-
container = easyRef.value;
|
|
5575
|
-
await nextTick();
|
|
5576
|
-
createPlay(container);
|
|
5577
|
-
onPlayer(videoUrl);
|
|
5578
|
-
}, 500);
|
|
5579
|
-
}
|
|
5580
|
-
}
|
|
5581
|
-
function createPlay(container) {
|
|
5582
|
-
player.value = new EasyPlayerPro(container, {
|
|
5583
|
-
stretch: !props.stretch,
|
|
5584
|
-
MSE: props.MSE,
|
|
5585
|
-
WCS: props.WCS,
|
|
5586
|
-
WASM: props.WASM,
|
|
5587
|
-
WASMSIMD: props.WASMSIMD,
|
|
5588
|
-
isLive: props.isLive,
|
|
5589
|
-
loadTimeReplay: -1,
|
|
5590
|
-
hasAudio: props.hasAudio,
|
|
5591
|
-
bufferTime: 3
|
|
5592
|
-
// 缓存时长
|
|
5593
|
-
});
|
|
5594
|
-
player.value.on("videoInfo", (videoOriginalInfo) => {
|
|
5595
|
-
try {
|
|
5596
|
-
console.log("视频原始信息:", videoOriginalInfo);
|
|
5597
|
-
emits("videoOriginalInfo", videoOriginalInfo);
|
|
5598
|
-
} catch (error) {
|
|
5599
|
-
console.warn("视频原始信息错误:", error);
|
|
5600
|
-
}
|
|
5601
|
-
});
|
|
5602
|
-
player.value.on("timeout", () => {
|
|
5603
|
-
console.error("播放器超时");
|
|
5604
|
-
appendLoading();
|
|
5605
|
-
});
|
|
5606
|
-
player.value.on("error", () => {
|
|
5607
|
-
console.error("播放器异常");
|
|
5608
|
-
appendLoading();
|
|
5609
|
-
});
|
|
5610
|
-
appendLoading();
|
|
5611
|
-
}
|
|
5612
|
-
function appendLoading() {
|
|
5613
|
-
setTimeout(async () => {
|
|
5614
|
-
const container = easyRef.value;
|
|
5615
|
-
await nextTick();
|
|
5616
|
-
if (container.querySelector(".easyplayer-loading-text")) {
|
|
5617
|
-
container.querySelector(".easyplayer-loading-text").innerHTML = "加载中...";
|
|
5618
|
-
}
|
|
5619
|
-
const rightMenus = container.querySelector(".easyplayer-controls-right");
|
|
5620
|
-
const fullBtn = rightMenus == null ? void 0 : rightMenus.querySelector(".easyplayer-controls-item-wrap:last-child");
|
|
5621
|
-
if (!!fullBtn) {
|
|
5622
|
-
const fullscreenBtn = document.createElement("span");
|
|
5623
|
-
fullscreenBtn.setAttribute("title", "全屏");
|
|
5624
|
-
fullscreenBtn.innerHTML = "全屏";
|
|
5625
|
-
fullscreenBtn.style.marginLeft = "8px";
|
|
5626
|
-
fullscreenBtn.style.fontSize = "14px";
|
|
5627
|
-
fullscreenBtn.style.zoom = "0.8";
|
|
5628
|
-
fullscreenBtn.style.position = "relative";
|
|
5629
|
-
fullscreenBtn.style.top = "-1px";
|
|
5630
|
-
fullscreenBtn.addEventListener("click", doEmits);
|
|
5631
|
-
fullBtn.replaceChildren(fullscreenBtn);
|
|
5632
|
-
}
|
|
5633
|
-
}, 200);
|
|
5634
|
-
}
|
|
5635
|
-
function doEmits() {
|
|
5636
|
-
emits("dblclick", props.playerIndex);
|
|
5637
|
-
}
|
|
5638
|
-
onUnmounted(() => {
|
|
5639
|
-
onDestroy();
|
|
5640
|
-
console.warn("卸载成功");
|
|
5641
|
-
});
|
|
5642
|
-
return (_ctx, _cache) => {
|
|
5643
|
-
return openBlock(), createElementBlock("div", {
|
|
5644
|
-
class: "easy-player-view",
|
|
5645
|
-
ref_key: "easyRef",
|
|
5646
|
-
ref: easyRef
|
|
5647
|
-
}, null, 512);
|
|
5648
|
-
};
|
|
5649
|
-
}
|
|
5650
|
-
});
|
|
5651
|
-
const EasyPlayView = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-1a2b8584"]]);
|
|
5652
|
-
class hkVideo {
|
|
5653
|
-
constructor(options) {
|
|
5654
|
-
__publicField(this, "hkVideoInfo");
|
|
5655
|
-
this.hkVideoInfo = reactive({
|
|
5656
|
-
open: false,
|
|
5657
|
-
player: null,
|
|
5658
|
-
splitNum: options.splitNum || 1,
|
|
5659
|
-
width: options.width || "500px",
|
|
5660
|
-
height: options.height || "500px",
|
|
5661
|
-
currentPlayUrl: "",
|
|
5662
|
-
mode: options.mode || 1
|
|
5663
|
-
// 0普通模式, 1高级模式
|
|
5664
|
-
});
|
|
5665
|
-
this.createPlayer(options);
|
|
5666
|
-
}
|
|
5667
|
-
// 创建视频容器
|
|
5668
|
-
createPlayer(options) {
|
|
5669
|
-
this.hkVideoInfo.player = new window.JSPlugin({
|
|
5670
|
-
szId: options.divId,
|
|
5671
|
-
szBasePath: options.szBasePath,
|
|
5672
|
-
//"/bigScreen/cdn/h5player",
|
|
5673
|
-
iMaxSplit: 1,
|
|
5674
|
-
iCurrentSplit: 1,
|
|
5675
|
-
openDebug: true,
|
|
5676
|
-
oStyle: {
|
|
5677
|
-
borderSelect: "none"
|
|
5678
|
-
}
|
|
5679
|
-
});
|
|
5680
|
-
window.addEventListener("resize", () => {
|
|
5681
|
-
this.hkVideoInfo.player.JS_Resize();
|
|
5682
|
-
});
|
|
5683
|
-
this.hkVideoInfo.player.JS_SetConnectTimeOut(this.hkVideoInfo.player.currentWindowIndex, 6e3).then(
|
|
5684
|
-
() => {
|
|
5685
|
-
},
|
|
5686
|
-
(err) => {
|
|
5687
|
-
console.error("播放6000秒超时");
|
|
5688
|
-
}
|
|
5689
|
-
);
|
|
5690
|
-
this.hkVideoInfo.player.JS_SetWindowControlCallback({
|
|
5691
|
-
windowEventSelect: function(iWndIndex) {
|
|
5692
|
-
console.log("windowSelect callback: ", iWndIndex);
|
|
5693
|
-
if (options.windowEventSelect) options.windowEventSelect(iWndIndex);
|
|
5694
|
-
},
|
|
5695
|
-
pluginErrorHandler: function(iWndIndex, iErrorCode, oError) {
|
|
5696
|
-
console.log("海康播放器-插件错误回调: ", iWndIndex, iErrorCode, oError);
|
|
5697
|
-
if (options.pluginErrorHandler) options.pluginErrorHandler(iWndIndex);
|
|
5698
|
-
},
|
|
5699
|
-
windowEventOver: function(iWndIndex) {
|
|
5700
|
-
},
|
|
5701
|
-
windowEventOut: function(iWndIndex) {
|
|
5702
|
-
},
|
|
5703
|
-
windowEventUp: function(iWndIndex) {
|
|
5704
|
-
},
|
|
5705
|
-
windowFullCcreenChange: function(bFull) {
|
|
5706
|
-
console.log("海康播放器-全屏切换回调: ", bFull);
|
|
5707
|
-
},
|
|
5708
|
-
firstFrameDisplay: function(iWndIndex, iWidth, iHeight) {
|
|
5709
|
-
console.log("海康播放器-首帧显示回调: ", iWndIndex, iWidth, iHeight);
|
|
5710
|
-
if (options.firstFrameDisplay) options.firstFrameDisplay(iWndIndex, iWidth, iHeight);
|
|
5711
|
-
},
|
|
5712
|
-
performanceLack: function() {
|
|
5713
|
-
console.log("海康播放器-性能不足回调");
|
|
5714
|
-
},
|
|
5715
|
-
InterruptStream: (iWndIndex, interruptTime) => {
|
|
5716
|
-
console.log("断流事件回调: " + iWndIndex + "interrupt time:" + interruptTime);
|
|
5717
|
-
if (this.hkVideoInfo.currentPlayUrl) {
|
|
5718
|
-
console.log("检测到断流,尝试重新播放:", this.hkVideoInfo.currentPlayUrl);
|
|
5719
|
-
this.realplay(this.hkVideoInfo.currentPlayUrl, iWndIndex);
|
|
5720
|
-
}
|
|
5721
|
-
}
|
|
5722
|
-
});
|
|
5723
|
-
console.log("海康播放器-视频初始化");
|
|
5724
|
-
}
|
|
5725
|
-
// 开始播放
|
|
5726
|
-
realplay(playURL, index2) {
|
|
5727
|
-
console.warn("视频播放地址:", playURL);
|
|
5728
|
-
this.hkVideoInfo.currentPlayUrl = playURL;
|
|
5729
|
-
this.hkVideoInfo.player.JS_Play(playURL, { playURL, mode: this.hkVideoInfo.mode }, index2).then(
|
|
5730
|
-
() => {
|
|
5731
|
-
console.log("开始播放");
|
|
5732
|
-
},
|
|
5733
|
-
(e6) => {
|
|
5734
|
-
console.error("海康播放器- error", e6);
|
|
5735
|
-
}
|
|
5736
|
-
);
|
|
5737
|
-
}
|
|
5738
|
-
// 停止预览
|
|
5739
|
-
stop(index2) {
|
|
5740
|
-
this.hkVideoInfo.player.JS_Stop(index2).then(
|
|
5741
|
-
() => {
|
|
5742
|
-
console.log("停止预览");
|
|
5743
|
-
},
|
|
5744
|
-
(e6) => {
|
|
5745
|
-
console.error(e6);
|
|
5746
|
-
}
|
|
5747
|
-
);
|
|
5748
|
-
}
|
|
5749
|
-
// 停止预览
|
|
5750
|
-
stopAll() {
|
|
5751
|
-
this.hkVideoInfo.player.JS_StopRealPlayAll().then(
|
|
5752
|
-
() => {
|
|
5753
|
-
console.log("停止预览");
|
|
5754
|
-
},
|
|
5755
|
-
(e6) => {
|
|
5756
|
-
console.error(e6);
|
|
5757
|
-
}
|
|
5758
|
-
);
|
|
5759
|
-
}
|
|
5760
|
-
// 切换分屏
|
|
5761
|
-
changeSplitNum(splitNum) {
|
|
5762
|
-
this.hkVideoInfo.player.JS_ArrangeWindow(splitNum).then(
|
|
5763
|
-
() => {
|
|
5764
|
-
console.log(`切换分屏 success`);
|
|
5765
|
-
},
|
|
5766
|
-
(e6) => {
|
|
5767
|
-
console.error(e6);
|
|
5768
|
-
}
|
|
5769
|
-
);
|
|
5770
|
-
}
|
|
5771
|
-
// 全屏
|
|
5772
|
-
wholeFullScreen() {
|
|
5773
|
-
this.hkVideoInfo.player.JS_FullScreenDisplay(true).then(
|
|
5774
|
-
() => {
|
|
5775
|
-
console.log(`wholeFullScreen success`);
|
|
5776
|
-
},
|
|
5777
|
-
(e6) => {
|
|
5778
|
-
console.error(e6);
|
|
5779
|
-
}
|
|
5780
|
-
);
|
|
5781
|
-
}
|
|
5782
|
-
// 设置播放容器的宽高并监听窗口大小变化
|
|
5783
|
-
reSize(width, height) {
|
|
5784
|
-
this.hkVideoInfo.player.JS_Resize(width, height);
|
|
5785
|
-
}
|
|
5786
|
-
}
|
|
5787
|
-
const _hoisted_1$c = ["id"];
|
|
5788
|
-
const _hoisted_2$9 = ["id"];
|
|
5789
|
-
const _hoisted_3$8 = {
|
|
5790
|
-
class: "video-mask",
|
|
5791
|
-
"element-loading-text": "加载中..."
|
|
5792
|
-
};
|
|
5793
|
-
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
5794
|
-
__name: "HKPlay",
|
|
5795
|
-
props: {
|
|
5796
|
-
// divId: {
|
|
5797
|
-
// type: String,
|
|
5798
|
-
// default: "video",
|
|
5799
|
-
// },
|
|
5800
|
-
hkPath: {
|
|
5801
|
-
type: Object,
|
|
5802
|
-
default: null
|
|
5803
|
-
},
|
|
5804
|
-
splitNum: {
|
|
5805
|
-
type: Number,
|
|
5806
|
-
default: 1
|
|
5807
|
-
},
|
|
5808
|
-
videoList: {
|
|
5809
|
-
type: Array
|
|
5810
|
-
},
|
|
5811
|
-
videoUrl: {
|
|
5812
|
-
type: String,
|
|
5813
|
-
default: ""
|
|
5814
|
-
},
|
|
5815
|
-
playerIndex: {
|
|
5816
|
-
type: Number,
|
|
5817
|
-
default: -1
|
|
5818
|
-
}
|
|
5819
|
-
},
|
|
5820
|
-
emits: ["dblclick", "error", "urlError", "videoOriginalInfo"],
|
|
5821
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
5822
|
-
const videoRandomId = parseInt(Math.random() * 999999999 + "");
|
|
5823
|
-
const hkPath = inject("hkPath");
|
|
5824
|
-
const videoModel = inject("videoModel");
|
|
5825
|
-
console.warn("播放模式===>", videoModel);
|
|
5826
|
-
const emits = __emit;
|
|
5827
|
-
const props = __props;
|
|
5828
|
-
const videoBtnRef = ref$1();
|
|
5829
|
-
ref$1();
|
|
5830
|
-
const splitNum = ref$1(1);
|
|
5831
|
-
const currentIndex = ref$1(-1);
|
|
5832
|
-
const hkVideoObj = ref$1();
|
|
5833
|
-
const ysyVideoObj = ref$1(null);
|
|
5834
|
-
const videoListNew = ref$1([]);
|
|
5835
|
-
const isNext = ref$1(true);
|
|
5836
|
-
ref$1("");
|
|
5837
|
-
ref$1("0");
|
|
5838
|
-
const showBtn = ref$1(false);
|
|
5839
|
-
const btnTime = ref$1();
|
|
5840
|
-
const videoLoading = ref$1(true);
|
|
5841
|
-
watch(
|
|
5842
|
-
() => props.videoUrl,
|
|
5843
|
-
(val) => {
|
|
5844
|
-
changeVideo(val);
|
|
5845
|
-
},
|
|
5846
|
-
{ immediate: true }
|
|
5847
|
-
);
|
|
5848
|
-
function mouseoverHandler() {
|
|
5849
|
-
showBtn.value = true;
|
|
5850
|
-
if (btnTime.value) {
|
|
5851
|
-
clearTimeout(btnTime.value);
|
|
5852
|
-
}
|
|
5853
|
-
}
|
|
5854
|
-
function mouseleaveHandler() {
|
|
5855
|
-
btnTime.value = setTimeout(() => {
|
|
5856
|
-
showBtn.value = false;
|
|
5857
|
-
}, 1e3);
|
|
5858
|
-
}
|
|
5859
|
-
function doEmits() {
|
|
5860
|
-
emits("dblclick", props.playerIndex);
|
|
5861
|
-
}
|
|
5862
|
-
onMounted(() => {
|
|
5863
|
-
currentIndex.value = -1;
|
|
5864
|
-
videoListNew.value = [];
|
|
5865
|
-
isNext.value = true;
|
|
5866
|
-
splitNum.value = props.splitNum;
|
|
5867
|
-
nextTick(() => {
|
|
5868
|
-
initVideo();
|
|
5869
|
-
});
|
|
5870
|
-
setTimeout(() => {
|
|
5871
|
-
videoLoading.value = false;
|
|
5872
|
-
}, 30 * 1e3);
|
|
5873
|
-
});
|
|
5874
|
-
onBeforeUnmount(() => {
|
|
5875
|
-
closeAllVideo();
|
|
5876
|
-
});
|
|
5877
|
-
const initVideo = async () => {
|
|
5878
|
-
const { divId, clientWidth, clientHeight } = getVideoDom();
|
|
5879
|
-
hkVideoObj.value = new hkVideo({
|
|
5880
|
-
divId,
|
|
5881
|
-
splitNum: 1,
|
|
5882
|
-
width: clientWidth,
|
|
5883
|
-
height: clientHeight,
|
|
5884
|
-
szBasePath: props.hkPath || hkPath,
|
|
5885
|
-
windowEventSelect: changeIndex,
|
|
5886
|
-
pluginErrorHandler,
|
|
5887
|
-
firstFrameDisplay
|
|
5888
|
-
});
|
|
5889
|
-
};
|
|
5890
|
-
function changeVideo(url) {
|
|
5891
|
-
nextTick(() => {
|
|
5892
|
-
if (!hkVideoObj.value) initVideo();
|
|
5893
|
-
console.log("海康视频信息");
|
|
5894
|
-
nextTick(() => {
|
|
5895
|
-
if (!hkVideoObj.value) {
|
|
5896
|
-
setTimeout(() => {
|
|
5897
|
-
hkVideoObj.value.realplay(url, 0);
|
|
5898
|
-
}, 200);
|
|
5899
|
-
} else {
|
|
5900
|
-
hkVideoObj.value.realplay(url, 0);
|
|
5901
|
-
}
|
|
5902
|
-
});
|
|
5903
|
-
});
|
|
5904
|
-
}
|
|
5905
|
-
const changeIndex = (index2) => {
|
|
5906
|
-
console.log(index2, "index");
|
|
5907
|
-
if (splitNum.value !== 1) {
|
|
5908
|
-
currentIndex.value = index2;
|
|
5909
|
-
isNext.value = false;
|
|
5910
|
-
}
|
|
5911
|
-
};
|
|
5912
|
-
const pluginErrorHandler = (index2) => {
|
|
5913
|
-
console.log("播放超时");
|
|
5914
|
-
videoLoading.value = false;
|
|
5915
|
-
};
|
|
5916
|
-
const firstFrameDisplay = (iWndIndex, iWidth, iHeight) => {
|
|
5917
|
-
console.log("海康开始播放");
|
|
5918
|
-
videoLoading.value = false;
|
|
5919
|
-
emits("videoOriginalInfo", {
|
|
5920
|
-
width: iWidth,
|
|
5921
|
-
height: iHeight
|
|
5922
|
-
});
|
|
5923
|
-
};
|
|
5924
|
-
const getVideoDom = () => {
|
|
5925
|
-
const dom = {
|
|
5926
|
-
divId: `hk-${videoRandomId}`,
|
|
5927
|
-
clientWidth: document.getElementById(`parent-hk-${videoRandomId}`).clientWidth,
|
|
5928
|
-
clientHeight: document.getElementById(`parent-hk-${videoRandomId}`).clientHeight
|
|
5929
|
-
};
|
|
5930
|
-
console.log("视频容器信息", dom);
|
|
5931
|
-
return dom;
|
|
5932
|
-
};
|
|
5933
|
-
const resize = () => {
|
|
5934
|
-
nextTick(() => {
|
|
5935
|
-
const dom = getVideoDom();
|
|
5936
|
-
if (hkVideoObj.value != null) hkVideoObj.value.reSize(dom.clientWidth, dom.clientHeight);
|
|
5937
|
-
if (ysyVideoObj.value != null) ysyVideoObj.value.reSize(dom.clientWidth, dom.clientHeight);
|
|
5938
|
-
});
|
|
5939
|
-
};
|
|
5940
|
-
const closeAllVideo = () => {
|
|
5941
|
-
stopHk();
|
|
5942
|
-
videoListNew.value = [];
|
|
5943
|
-
};
|
|
5944
|
-
const stopHk = () => {
|
|
5945
|
-
if (hkVideoObj.value) {
|
|
5946
|
-
hkVideoObj.value.stopAll();
|
|
5947
|
-
}
|
|
5948
|
-
hkVideoObj.value = null;
|
|
5949
|
-
};
|
|
5950
|
-
__expose({
|
|
5951
|
-
splitNum,
|
|
5952
|
-
closeAllVideo,
|
|
5953
|
-
resize,
|
|
5954
|
-
changeIndex
|
|
5955
|
-
});
|
|
5956
|
-
return (_ctx, _cache) => {
|
|
5957
|
-
const _directive_loading = resolveDirective("loading");
|
|
5958
|
-
return openBlock(), createElementBlock("div", {
|
|
5959
|
-
class: "rv-container",
|
|
5960
|
-
id: `parent-hk-${unref(videoRandomId)}`,
|
|
5961
|
-
onMouseover: mouseoverHandler,
|
|
5962
|
-
onMouseleave: mouseleaveHandler
|
|
5963
|
-
}, [
|
|
5964
|
-
createElementVNode("div", {
|
|
5965
|
-
class: "video-container",
|
|
5966
|
-
id: `hk-${unref(videoRandomId)}`
|
|
5967
|
-
}, null, 8, _hoisted_2$9),
|
|
5968
|
-
withDirectives(createElementVNode("div", _hoisted_3$8, null, 512), [
|
|
5969
|
-
[_directive_loading, videoLoading.value]
|
|
5970
|
-
]),
|
|
5971
|
-
withDirectives(createElementVNode("div", {
|
|
5972
|
-
ref_key: "videoBtnRef",
|
|
5973
|
-
ref: videoBtnRef,
|
|
5974
|
-
class: "video-button",
|
|
5975
|
-
style: { "position": "absolute", "bottom": "0", "left": "0", "width": "100%", "background": "rgba(255, 255, 255, 0.3)" }
|
|
5976
|
-
}, [
|
|
5977
|
-
createElementVNode("div", { style: { "display": "flex", "align-items": "center", "justify-content": "flex-end", "width": "100%", "height": "100%" } }, [
|
|
5978
|
-
createElementVNode("span", {
|
|
5979
|
-
title: "全屏",
|
|
5980
|
-
class: "full-title",
|
|
5981
|
-
onClick: doEmits
|
|
5982
|
-
}, "全屏")
|
|
5983
|
-
])
|
|
5984
|
-
], 512), [
|
|
5985
|
-
[vShow, showBtn.value]
|
|
5986
|
-
])
|
|
5987
|
-
], 40, _hoisted_1$c);
|
|
5988
|
-
};
|
|
5989
|
-
}
|
|
5990
|
-
});
|
|
5991
|
-
const HKPlayView = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-a962f649"]]);
|
|
5992
|
-
const _hoisted_1$b = { class: "split-box" };
|
|
5993
|
-
const _hoisted_2$8 = ["onMouseover", "onMouseleave"];
|
|
5994
|
-
const _hoisted_3$7 = {
|
|
5995
|
-
key: 0,
|
|
5996
|
-
class: "no-signal"
|
|
5997
|
-
};
|
|
5998
|
-
const _hoisted_4$4 = {
|
|
5999
|
-
key: 2,
|
|
6000
|
-
class: "ctrl-box"
|
|
6001
|
-
};
|
|
6002
|
-
const _hoisted_5$3 = { class: "ctrl-left" };
|
|
6003
|
-
const _hoisted_6 = { class: "ctrl-btn-speed" };
|
|
6004
|
-
const _hoisted_7 = { class: "ctrl-right" };
|
|
6005
|
-
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
6006
|
-
__name: "index",
|
|
6007
|
-
props: {
|
|
6008
|
-
videoErrorMaxCount: {
|
|
6009
|
-
type: Number,
|
|
6010
|
-
default: 3
|
|
6011
|
-
},
|
|
6012
|
-
videoConfig: {
|
|
6013
|
-
type: Object,
|
|
6014
|
-
default: () => {
|
|
6015
|
-
}
|
|
6016
|
-
}
|
|
6017
|
-
},
|
|
6018
|
-
emits: ["removeVideo", "errorVideo", "urlError", "videoOriginalInfo"],
|
|
6019
|
-
setup(__props, { emit: __emit }) {
|
|
6020
|
-
const injectedSlots = inject("slots");
|
|
6021
|
-
const videoModelsInfo = ref$1({
|
|
6022
|
-
easyplayer: {
|
|
6023
|
-
name: "easyplayer",
|
|
6024
|
-
player: EasyPlayView
|
|
6025
|
-
},
|
|
6026
|
-
hk: {
|
|
6027
|
-
name: "hk",
|
|
6028
|
-
player: HKPlayView
|
|
6029
|
-
}
|
|
6030
|
-
});
|
|
6031
|
-
const videoModel = inject("videoModel");
|
|
6032
|
-
const activeIndex = inject("activeIndex");
|
|
6033
|
-
const videoCtrlFun = inject("videoCtrlFun");
|
|
6034
|
-
const showVideoCtrls = inject("showVideoCtrls");
|
|
6035
|
-
const slidValue = inject("slidValue");
|
|
6036
|
-
const hasFullScreen = inject("hasFullScreen");
|
|
6037
|
-
const emits = __emit;
|
|
6038
|
-
const videoDivRefs = ref$1({});
|
|
6039
|
-
const videoPlayerRefs = ref$1({});
|
|
6040
|
-
const closeBtnStatusList = ref$1([]);
|
|
6041
|
-
const showClose = inject("showClose") + "" === "true";
|
|
6042
|
-
const isFullScreen = ref$1(false);
|
|
6043
|
-
function getVideoModel(info) {
|
|
6044
|
-
var _a3, _b, _c2, _d;
|
|
6045
|
-
if (!!(info == null ? void 0 : info.videoModel)) {
|
|
6046
|
-
return (_b = (_a3 = videoModelsInfo.value) == null ? void 0 : _a3[info.videoModel]) == null ? void 0 : _b.player;
|
|
6047
|
-
}
|
|
6048
|
-
return (_d = (_c2 = videoModelsInfo.value) == null ? void 0 : _c2[videoModel]) == null ? void 0 : _d.player;
|
|
6049
|
-
}
|
|
6050
|
-
function messageHandler(e6, index2) {
|
|
6051
|
-
emits("errorVideo", index2, false);
|
|
6052
|
-
}
|
|
6053
|
-
function urlErrorHandler(e6, index2) {
|
|
6054
|
-
emits("urlError", index2);
|
|
6055
|
-
}
|
|
6056
|
-
function videoOriginalInfoHandler(e6, index2) {
|
|
6057
|
-
emits("videoOriginalInfo", e6, index2);
|
|
6058
|
-
}
|
|
6059
|
-
function videoDivRefHandler(el2, index2) {
|
|
6060
|
-
if (el2) {
|
|
6061
|
-
videoDivRefs.value[index2] = el2;
|
|
6062
|
-
}
|
|
6063
|
-
}
|
|
6064
|
-
function videoPlayerRefHandler(el2, index2) {
|
|
6065
|
-
if (el2) {
|
|
6066
|
-
videoPlayerRefs.value[index2] = el2;
|
|
6067
|
-
}
|
|
6068
|
-
}
|
|
6069
|
-
function showCloseBtnHandler(index2) {
|
|
6070
|
-
closeBtnStatusList.value[index2] = true;
|
|
6071
|
-
}
|
|
6072
|
-
function hideCloseBtnHandler(index2) {
|
|
6073
|
-
closeBtnStatusList.value[index2] = false;
|
|
6074
|
-
}
|
|
6075
|
-
let clickCtrlStatus = false;
|
|
6076
|
-
const speakStatue = ref$1(false);
|
|
6077
|
-
const ctrlInfoByMousedown = ref$1();
|
|
6078
|
-
function ctrlHandler(type2, info) {
|
|
6079
|
-
var _a3, _b, _c2, _d, _e, _f, _g, _h2, _i, _j;
|
|
6080
|
-
clickCtrlStatus = true;
|
|
6081
|
-
ctrlInfoByMousedown.value = info;
|
|
6082
|
-
if (type2 === "left") {
|
|
6083
|
-
(_a3 = videoCtrlFun == null ? void 0 : videoCtrlFun.toLeft) == null ? void 0 : _a3.call(videoCtrlFun, info);
|
|
6084
|
-
} else if (type2 === "right") {
|
|
6085
|
-
(_b = videoCtrlFun == null ? void 0 : videoCtrlFun.toRight) == null ? void 0 : _b.call(videoCtrlFun, info);
|
|
6086
|
-
} else if (type2 === "top") {
|
|
6087
|
-
(_c2 = videoCtrlFun == null ? void 0 : videoCtrlFun.toTop) == null ? void 0 : _c2.call(videoCtrlFun, info);
|
|
6088
|
-
} else if (type2 === "bottom") {
|
|
6089
|
-
(_d = videoCtrlFun == null ? void 0 : videoCtrlFun.toBottom) == null ? void 0 : _d.call(videoCtrlFun, info);
|
|
6090
|
-
} else if (type2 === "zoom-in") {
|
|
6091
|
-
(_e = videoCtrlFun == null ? void 0 : videoCtrlFun.changeZoom) == null ? void 0 : _e.call(videoCtrlFun, info, 1, slidValue.value);
|
|
6092
|
-
} else if (type2 === "zoom-out") {
|
|
6093
|
-
(_f = videoCtrlFun == null ? void 0 : videoCtrlFun.changeZoom) == null ? void 0 : _f.call(videoCtrlFun, info, -1, slidValue.value);
|
|
6094
|
-
} else if (type2 === "speak") {
|
|
6095
|
-
speakStatue.value = true;
|
|
6096
|
-
(_g = videoCtrlFun == null ? void 0 : videoCtrlFun.toSpeak) == null ? void 0 : _g.call(videoCtrlFun, info);
|
|
6097
|
-
} else if (type2 === "scan") {
|
|
6098
|
-
(_h2 = videoCtrlFun == null ? void 0 : videoCtrlFun.toScan) == null ? void 0 : _h2.call(videoCtrlFun, info);
|
|
6099
|
-
} else if (type2 === "cruise") {
|
|
6100
|
-
(_i = videoCtrlFun == null ? void 0 : videoCtrlFun.toCruise) == null ? void 0 : _i.call(videoCtrlFun, info);
|
|
6101
|
-
} else if (type2 === "call") {
|
|
6102
|
-
(_j = videoCtrlFun == null ? void 0 : videoCtrlFun.toCall) == null ? void 0 : _j.call(videoCtrlFun, info);
|
|
6103
|
-
}
|
|
6104
|
-
}
|
|
6105
|
-
function stopHandler() {
|
|
6106
|
-
var _a3;
|
|
6107
|
-
if (clickCtrlStatus) {
|
|
6108
|
-
(_a3 = videoCtrlFun == null ? void 0 : videoCtrlFun.stop) == null ? void 0 : _a3.call(videoCtrlFun, ctrlInfoByMousedown.value);
|
|
6109
|
-
}
|
|
6110
|
-
clickCtrlStatus = false;
|
|
6111
|
-
speakStatue.value = false;
|
|
6112
|
-
ctrlInfoByMousedown.value = null;
|
|
6113
|
-
}
|
|
6114
|
-
function slidHandler(info) {
|
|
6115
|
-
var _a3;
|
|
6116
|
-
(_a3 = videoCtrlFun == null ? void 0 : videoCtrlFun.speed) == null ? void 0 : _a3.call(videoCtrlFun, info, slidValue.value);
|
|
6117
|
-
}
|
|
6118
|
-
function toggleFullScreen(index2) {
|
|
6119
|
-
var _a3, _b;
|
|
6120
|
-
try {
|
|
6121
|
-
if (hasFullScreen + "" === "false") {
|
|
6122
|
-
ElMessage.info("当前视频不支持全屏");
|
|
6123
|
-
return;
|
|
6124
|
-
}
|
|
6125
|
-
} catch (error) {
|
|
6126
|
-
console.error(`配置是否全屏失败:`, error);
|
|
6127
|
-
}
|
|
6128
|
-
let target = null;
|
|
6129
|
-
try {
|
|
6130
|
-
target = index2 == null ? void 0 : index2.currentTarget;
|
|
6131
|
-
} catch (error) {
|
|
6132
|
-
console.error(`全屏/退出失败,`, error);
|
|
6133
|
-
}
|
|
6134
|
-
if (!target) {
|
|
6135
|
-
target = (_a3 = videoDivRefs.value) == null ? void 0 : _a3[index2];
|
|
6136
|
-
}
|
|
6137
|
-
if (!document.fullscreenElement) {
|
|
6138
|
-
isFullScreen.value = true;
|
|
6139
|
-
if (target) {
|
|
6140
|
-
target.requestFullscreen();
|
|
6141
|
-
}
|
|
6142
|
-
} else {
|
|
6143
|
-
isFullScreen.value = false;
|
|
6144
|
-
(_b = document == null ? void 0 : document.exitFullscreen) == null ? void 0 : _b.call(document);
|
|
6145
|
-
}
|
|
6146
|
-
}
|
|
6147
|
-
function handleFullscreenChange() {
|
|
6148
|
-
if (!document.fullscreenElement) {
|
|
6149
|
-
isFullScreen.value = false;
|
|
6150
|
-
} else {
|
|
6151
|
-
isFullScreen.value = true;
|
|
6152
|
-
}
|
|
6153
|
-
nextTick(() => {
|
|
6154
|
-
const eles = document.querySelectorAll('[title="全屏"]');
|
|
6155
|
-
if (isFullScreen.value) {
|
|
6156
|
-
eles.forEach((ele) => {
|
|
6157
|
-
ele.innerHTML = "退出全屏";
|
|
6158
|
-
});
|
|
6159
|
-
} else {
|
|
6160
|
-
eles.forEach((ele) => {
|
|
6161
|
-
ele.innerHTML = "全屏";
|
|
6162
|
-
});
|
|
6163
|
-
}
|
|
6164
|
-
});
|
|
6165
|
-
}
|
|
6166
|
-
function closeVideoHandler(index2) {
|
|
6167
|
-
emits("removeVideo", index2, false);
|
|
6168
|
-
isFullScreen.value = false;
|
|
6169
|
-
}
|
|
6170
|
-
onMounted(() => {
|
|
6171
|
-
document.addEventListener("fullscreenchange", handleFullscreenChange);
|
|
6172
|
-
document.addEventListener("mouseup", stopHandler);
|
|
6173
|
-
});
|
|
6174
|
-
onUnmounted(() => {
|
|
6175
|
-
document.removeEventListener("fullscreenchange", handleFullscreenChange);
|
|
6176
|
-
document.removeEventListener("mouseup", stopHandler);
|
|
6177
|
-
});
|
|
6178
|
-
return (_ctx, _cache) => {
|
|
6179
|
-
const _component_el_button = resolveComponent("el-button");
|
|
6180
|
-
const _component_CaretLeft = resolveComponent("CaretLeft");
|
|
6181
|
-
const _component_el_icon = resolveComponent("el-icon");
|
|
6182
|
-
const _component_CaretTop = resolveComponent("CaretTop");
|
|
6183
|
-
const _component_CaretRight = resolveComponent("CaretRight");
|
|
6184
|
-
const _component_CaretBottom = resolveComponent("CaretBottom");
|
|
6185
|
-
const _component_Microphone = resolveComponent("Microphone");
|
|
6186
|
-
const _component_el_slider = resolveComponent("el-slider");
|
|
6187
|
-
const _component_ZoomIn = resolveComponent("ZoomIn");
|
|
6188
|
-
const _component_ZoomOut = resolveComponent("ZoomOut");
|
|
6189
|
-
const _component_Files = resolveComponent("Files");
|
|
6190
|
-
const _component_MapLocation = resolveComponent("MapLocation");
|
|
6191
|
-
const _component_VideoCamera = resolveComponent("VideoCamera");
|
|
6192
|
-
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
6193
|
-
createVNode(SplitIcon, {
|
|
6194
|
-
type: unref(activeIndex),
|
|
6195
|
-
activeIndex: unref(activeIndex),
|
|
6196
|
-
"onUpdate:activeIndex": _cache[1] || (_cache[1] = ($event) => isRef(activeIndex) ? activeIndex.value = $event : null),
|
|
6197
|
-
width: "100%",
|
|
6198
|
-
height: "100%",
|
|
6199
|
-
isVideo: true
|
|
6200
|
-
}, {
|
|
6201
|
-
"video-view-slot": withCtx(({ index: index2, url, info }) => {
|
|
6202
|
-
var _a3;
|
|
6203
|
-
return [
|
|
6204
|
-
createElementVNode("div", {
|
|
6205
|
-
class: "live-player-box",
|
|
6206
|
-
ref: (el2) => videoDivRefHandler(el2, index2),
|
|
6207
|
-
onDblclick: toggleFullScreen,
|
|
6208
|
-
onMouseover: ($event) => showCloseBtnHandler(index2),
|
|
6209
|
-
onMouseleave: ($event) => hideCloseBtnHandler(index2)
|
|
6210
|
-
}, [
|
|
6211
|
-
!url ? (openBlock(), createElementBlock("span", _hoisted_3$7, "无信号")) : (openBlock(), createBlock(resolveDynamicComponent(getVideoModel(info)), {
|
|
6212
|
-
key: 1,
|
|
6213
|
-
ref: (el2) => videoPlayerRefHandler(el2, index2),
|
|
6214
|
-
videoUrl: url,
|
|
6215
|
-
MSE: __props.videoConfig.MSE,
|
|
6216
|
-
WCS: __props.videoConfig.WCS,
|
|
6217
|
-
WASM: __props.videoConfig.WASM,
|
|
6218
|
-
WASMSIMD: __props.videoConfig.WASMSIMD,
|
|
6219
|
-
loadTimeReplay: __props.videoErrorMaxCount,
|
|
6220
|
-
stretch: __props.videoConfig.stretch,
|
|
6221
|
-
hasAudio: __props.videoConfig.hasAudio,
|
|
6222
|
-
isLive: __props.videoConfig.isLive,
|
|
6223
|
-
playerIndex: index2,
|
|
6224
|
-
hkPath: info == null ? void 0 : info.hkPath,
|
|
6225
|
-
onDblclick: toggleFullScreen,
|
|
6226
|
-
onError: ($event) => messageHandler($event, index2),
|
|
6227
|
-
onUrlError: ($event) => urlErrorHandler($event, index2),
|
|
6228
|
-
onVideoOriginalInfo: ($event) => videoOriginalInfoHandler($event, index2)
|
|
6229
|
-
}, null, 40, ["videoUrl", "MSE", "WCS", "WASM", "WASMSIMD", "loadTimeReplay", "stretch", "hasAudio", "isLive", "playerIndex", "hkPath", "onError", "onUrlError", "onVideoOriginalInfo"])),
|
|
6230
|
-
withDirectives(createVNode(_component_el_button, {
|
|
6231
|
-
onClick: ($event) => closeVideoHandler(index2),
|
|
6232
|
-
type: "info",
|
|
6233
|
-
class: "close-btn"
|
|
6234
|
-
}, {
|
|
6235
|
-
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
6236
|
-
createTextVNode("关闭", -1)
|
|
6237
|
-
])]),
|
|
6238
|
-
_: 1
|
|
6239
|
-
}, 8, ["onClick"]), [
|
|
6240
|
-
[vShow, closeBtnStatusList.value[index2] && !!url && showClose]
|
|
6241
|
-
]),
|
|
6242
|
-
unref(showVideoCtrls) ? withDirectives((openBlock(), createElementBlock("div", _hoisted_4$4, [
|
|
6243
|
-
createElementVNode("div", _hoisted_5$3, [
|
|
6244
|
-
createVNode(_component_el_icon, {
|
|
6245
|
-
class: "ctrl-btn left",
|
|
6246
|
-
onMousedown: ($event) => ctrlHandler("left", info)
|
|
6247
|
-
}, {
|
|
6248
|
-
default: withCtx(() => [
|
|
6249
|
-
createVNode(_component_CaretLeft)
|
|
6250
|
-
]),
|
|
6251
|
-
_: 1
|
|
6252
|
-
}, 8, ["onMousedown"]),
|
|
6253
|
-
createVNode(_component_el_icon, {
|
|
6254
|
-
class: "ctrl-btn top",
|
|
6255
|
-
onMousedown: ($event) => ctrlHandler("top", info)
|
|
6256
|
-
}, {
|
|
6257
|
-
default: withCtx(() => [
|
|
6258
|
-
createVNode(_component_CaretTop)
|
|
6259
|
-
]),
|
|
6260
|
-
_: 1
|
|
6261
|
-
}, 8, ["onMousedown"]),
|
|
6262
|
-
createVNode(_component_el_icon, {
|
|
6263
|
-
class: "ctrl-btn right",
|
|
6264
|
-
onMousedown: ($event) => ctrlHandler("right", info)
|
|
6265
|
-
}, {
|
|
6266
|
-
default: withCtx(() => [
|
|
6267
|
-
createVNode(_component_CaretRight)
|
|
6268
|
-
]),
|
|
6269
|
-
_: 1
|
|
6270
|
-
}, 8, ["onMousedown"]),
|
|
6271
|
-
createVNode(_component_el_icon, {
|
|
6272
|
-
class: "ctrl-btn bottom",
|
|
6273
|
-
onMousedown: ($event) => ctrlHandler("bottom", info)
|
|
6274
|
-
}, {
|
|
6275
|
-
default: withCtx(() => [
|
|
6276
|
-
createVNode(_component_CaretBottom)
|
|
6277
|
-
]),
|
|
6278
|
-
_: 1
|
|
6279
|
-
}, 8, ["onMousedown"]),
|
|
6280
|
-
createVNode(_component_el_icon, {
|
|
6281
|
-
class: normalizeClass(["ctrl-btn speak", [speakStatue.value ? "running" : ""]]),
|
|
6282
|
-
onMousedown: ($event) => ctrlHandler("speak", info)
|
|
6283
|
-
}, {
|
|
6284
|
-
default: withCtx(() => [
|
|
6285
|
-
createVNode(_component_Microphone)
|
|
6286
|
-
]),
|
|
6287
|
-
_: 1
|
|
6288
|
-
}, 8, ["class", "onMousedown"]),
|
|
6289
|
-
createElementVNode("div", _hoisted_6, [
|
|
6290
|
-
_cache[3] || (_cache[3] = createElementVNode("span", { class: "speed-title" }, "速度:", -1)),
|
|
6291
|
-
createVNode(_component_el_slider, {
|
|
6292
|
-
class: "slid-btn",
|
|
6293
|
-
modelValue: unref(slidValue),
|
|
6294
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(slidValue) ? slidValue.value = $event : null),
|
|
6295
|
-
step: 5,
|
|
6296
|
-
max: 255,
|
|
6297
|
-
"show-tooltip": false,
|
|
6298
|
-
onChange: ($event) => slidHandler(info)
|
|
6299
|
-
}, null, 8, ["modelValue", "onChange"])
|
|
6300
|
-
])
|
|
6301
|
-
]),
|
|
6302
|
-
createElementVNode("div", _hoisted_7, [
|
|
6303
|
-
createVNode(_component_el_icon, {
|
|
6304
|
-
class: "ctrl-btn zoom-in",
|
|
6305
|
-
onMousedown: ($event) => ctrlHandler("zoom-in", info)
|
|
6306
|
-
}, {
|
|
6307
|
-
default: withCtx(() => [
|
|
6308
|
-
createVNode(_component_ZoomIn)
|
|
6309
|
-
]),
|
|
6310
|
-
_: 1
|
|
6311
|
-
}, 8, ["onMousedown"]),
|
|
6312
|
-
createVNode(_component_el_icon, {
|
|
6313
|
-
class: "ctrl-btn zoom-out",
|
|
6314
|
-
onMousedown: ($event) => ctrlHandler("zoom-out", info)
|
|
6315
|
-
}, {
|
|
6316
|
-
default: withCtx(() => [
|
|
6317
|
-
createVNode(_component_ZoomOut)
|
|
6318
|
-
]),
|
|
6319
|
-
_: 1
|
|
6320
|
-
}, 8, ["onMousedown"]),
|
|
6321
|
-
createVNode(_component_el_icon, {
|
|
6322
|
-
class: "ctrl-btn scan",
|
|
6323
|
-
onMousedown: ($event) => ctrlHandler("scan", info)
|
|
6324
|
-
}, {
|
|
6325
|
-
default: withCtx(() => [
|
|
6326
|
-
createVNode(_component_Files)
|
|
6327
|
-
]),
|
|
6328
|
-
_: 1
|
|
6329
|
-
}, 8, ["onMousedown"]),
|
|
6330
|
-
createVNode(_component_el_icon, {
|
|
6331
|
-
class: "ctrl-btn cruise",
|
|
6332
|
-
onMousedown: ($event) => ctrlHandler("cruise", info)
|
|
6333
|
-
}, {
|
|
6334
|
-
default: withCtx(() => [
|
|
6335
|
-
createVNode(_component_MapLocation)
|
|
6336
|
-
]),
|
|
6337
|
-
_: 1
|
|
6338
|
-
}, 8, ["onMousedown"]),
|
|
6339
|
-
createVNode(_component_el_icon, {
|
|
6340
|
-
class: "ctrl-btn call",
|
|
6341
|
-
onMousedown: ($event) => ctrlHandler("call", info)
|
|
6342
|
-
}, {
|
|
6343
|
-
default: withCtx(() => [
|
|
6344
|
-
createVNode(_component_VideoCamera)
|
|
6345
|
-
]),
|
|
6346
|
-
_: 1
|
|
6347
|
-
}, 8, ["onMousedown"])
|
|
6348
|
-
])
|
|
6349
|
-
], 512)), [
|
|
6350
|
-
[vShow, (unref(activeIndex) == 1 || isFullScreen.value) && closeBtnStatusList.value[index2] && !!url]
|
|
6351
|
-
]) : createCommentVNode("", true),
|
|
6352
|
-
((_a3 = unref(injectedSlots)) == null ? void 0 : _a3["video-player-cover"]) ? (openBlock(), createBlock(resolveDynamicComponent(unref(injectedSlots)["video-player-cover"]), { key: 3 })) : createCommentVNode("", true)
|
|
6353
|
-
], 40, _hoisted_2$8)
|
|
6354
|
-
];
|
|
6355
|
-
}),
|
|
6356
|
-
_: 1
|
|
6357
|
-
}, 8, ["type", "activeIndex"])
|
|
6358
|
-
]);
|
|
6359
|
-
};
|
|
6360
|
-
}
|
|
6361
|
-
});
|
|
6362
|
-
const SplitVideoGroup = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-d238d0e7"]]);
|
|
6363
|
-
const ctrlApis = {
|
|
6364
|
-
fnUrl: "http://199.10.11.47:9091/videoTest/wvpFunction",
|
|
6365
|
-
commandUrl: "http://199.10.11.47:9091/videoTest/wvpMove",
|
|
6366
|
-
speakUrl: "http://199.10.11.47:19091/videoTest/wvpSpeak"
|
|
6367
|
-
};
|
|
6368
|
-
const _hoisted_1$a = { class: "video-player-view" };
|
|
6369
|
-
const _hoisted_2$7 = { class: "video-tree" };
|
|
6370
|
-
const _hoisted_3$6 = { class: "player-container" };
|
|
6371
|
-
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
6372
|
-
__name: "index",
|
|
6373
|
-
props: {
|
|
6374
|
-
// 视频类型, easyplayer / hk
|
|
6375
|
-
videoModel: {
|
|
6376
|
-
type: String,
|
|
6377
|
-
default: "easyplayer"
|
|
6378
|
-
},
|
|
6379
|
-
hkPath: {
|
|
6380
|
-
type: String,
|
|
6381
|
-
default: "/js/h5player"
|
|
6382
|
-
},
|
|
6383
|
-
// 显示视频关闭按钮
|
|
6384
|
-
showClose: {
|
|
6385
|
-
type: Boolean,
|
|
6386
|
-
default: true
|
|
6387
|
-
},
|
|
6388
|
-
// 是否支持全屏
|
|
6389
|
-
hasFullScreen: {
|
|
6390
|
-
type: Boolean,
|
|
6391
|
-
default: true
|
|
6392
|
-
},
|
|
6393
|
-
// 显示树
|
|
6394
|
-
showTree: {
|
|
6395
|
-
type: Boolean,
|
|
6396
|
-
default: true
|
|
6397
|
-
},
|
|
6398
|
-
// 树数据
|
|
6399
|
-
treeData: {
|
|
6400
|
-
type: Array,
|
|
6401
|
-
default: () => [],
|
|
6402
|
-
required: true
|
|
6403
|
-
},
|
|
6404
|
-
// !!!树节点key
|
|
6405
|
-
treeNodeKey: {
|
|
6406
|
-
type: String,
|
|
6407
|
-
default: "label"
|
|
6408
|
-
},
|
|
6409
|
-
// 树节点展开
|
|
6410
|
-
treeExpandedKeys: {
|
|
6411
|
-
type: Array,
|
|
6412
|
-
default: () => []
|
|
6413
|
-
},
|
|
6414
|
-
// 树节点属性 (videoUrlKey值要和treeData中的播放地址key一致, 默认为url)
|
|
6415
|
-
treeOptions: {
|
|
6416
|
-
type: Object,
|
|
6417
|
-
default: () => ({
|
|
6418
|
-
icontype: "icontype",
|
|
6419
|
-
background: "background",
|
|
6420
|
-
videoUrlKey: "url",
|
|
6421
|
-
children: "children",
|
|
6422
|
-
label: "label"
|
|
6423
|
-
})
|
|
6424
|
-
},
|
|
6425
|
-
// 显示分屏按钮
|
|
6426
|
-
showVideoSplit: {
|
|
6427
|
-
type: Boolean,
|
|
6428
|
-
default: true
|
|
6429
|
-
},
|
|
6430
|
-
// 分屏使用图标
|
|
6431
|
-
videoSplitUseIcon: {
|
|
6432
|
-
type: Boolean,
|
|
6433
|
-
default: true
|
|
6434
|
-
},
|
|
6435
|
-
// 显示方向控制按钮
|
|
6436
|
-
showVideoCtrls: {
|
|
6437
|
-
type: Boolean,
|
|
6438
|
-
default: false
|
|
6439
|
-
},
|
|
6440
|
-
// 禁止控制按钮默认请求行为(默认false,true则不使用组件的发送请求仅调用自定义回调函数)
|
|
6441
|
-
stopVideoCtrlMethods: {
|
|
6442
|
-
type: Boolean,
|
|
6443
|
-
default: false
|
|
6444
|
-
},
|
|
6445
|
-
// 分屏模式: 1: 单屏, 2: 四屏, 3: 九屏
|
|
6446
|
-
videoSplitType: {
|
|
6447
|
-
type: Number,
|
|
6448
|
-
default: 1
|
|
6449
|
-
},
|
|
6450
|
-
// 播放模式: 1: 单击,2: 双击
|
|
6451
|
-
videoPlayModel: {
|
|
6452
|
-
type: Number,
|
|
6453
|
-
default: 1
|
|
6454
|
-
},
|
|
6455
|
-
// 单个视频错误最大次数
|
|
6456
|
-
videoErrorMaxCount: {
|
|
6457
|
-
type: Number,
|
|
6458
|
-
default: 3
|
|
6459
|
-
},
|
|
6460
|
-
// easyplayer配置 (默认一般不修改)
|
|
6461
|
-
videoConfig: {
|
|
6462
|
-
type: Object,
|
|
6463
|
-
default: () => {
|
|
6464
|
-
return {
|
|
6465
|
-
MSE: true,
|
|
6466
|
-
WCS: true,
|
|
6467
|
-
WASM: true,
|
|
6468
|
-
WASMSIMD: true,
|
|
6469
|
-
isLive: true,
|
|
6470
|
-
hasAudio: false,
|
|
6471
|
-
stretch: false
|
|
6472
|
-
};
|
|
6473
|
-
}
|
|
6474
|
-
},
|
|
6475
|
-
// 获取、设置打开的播放视频信息
|
|
6476
|
-
videoInfos: {
|
|
6477
|
-
type: Array,
|
|
6478
|
-
default: () => [
|
|
6479
|
-
{
|
|
6480
|
-
index: 0
|
|
6481
|
-
}
|
|
6482
|
-
]
|
|
6483
|
-
},
|
|
6484
|
-
// !!! 单点播放
|
|
6485
|
-
videoSingleUrl: {
|
|
6486
|
-
type: Boolean,
|
|
6487
|
-
default: false
|
|
6488
|
-
},
|
|
6489
|
-
// !!! 已经在播放的是否关闭后再点击打开(需要单点播 videoSingleUrl:true)
|
|
6490
|
-
videoSingleClose: {
|
|
6491
|
-
type: Boolean,
|
|
6492
|
-
default: false
|
|
6493
|
-
},
|
|
6494
|
-
hasVideoRightMenu: {
|
|
6495
|
-
type: Boolean,
|
|
6496
|
-
default: false
|
|
6497
|
-
},
|
|
6498
|
-
// 回调函数后是否继续执行默认播放操作
|
|
6499
|
-
callbackContinueExecute: {
|
|
6500
|
-
type: Boolean,
|
|
6501
|
-
default: true
|
|
6502
|
-
},
|
|
6503
|
-
// 回调函数
|
|
6504
|
-
treeClick: {
|
|
6505
|
-
type: Function,
|
|
6506
|
-
default: null
|
|
6507
|
-
},
|
|
6508
|
-
treeDBClick: {
|
|
6509
|
-
type: Function,
|
|
6510
|
-
default: null
|
|
6511
|
-
},
|
|
6512
|
-
treeRightMenu: {
|
|
6513
|
-
type: Function,
|
|
6514
|
-
default: null
|
|
6515
|
-
},
|
|
6516
|
-
treeExpand: {
|
|
6517
|
-
type: Function,
|
|
6518
|
-
default: null
|
|
6519
|
-
},
|
|
6520
|
-
videoError: {
|
|
6521
|
-
type: Function,
|
|
6522
|
-
default: null
|
|
6523
|
-
}
|
|
6524
|
-
},
|
|
6525
|
-
emits: [
|
|
6526
|
-
"videoOriginalInfo",
|
|
6527
|
-
"up",
|
|
6528
|
-
"down",
|
|
6529
|
-
"left",
|
|
6530
|
-
"right",
|
|
6531
|
-
"zoomin",
|
|
6532
|
-
"zoomout",
|
|
6533
|
-
"stop",
|
|
6534
|
-
"speed",
|
|
6535
|
-
"speak",
|
|
6536
|
-
"scan",
|
|
6537
|
-
"cruise",
|
|
6538
|
-
"call",
|
|
6539
|
-
"changeSplit"
|
|
6540
|
-
],
|
|
6541
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
6542
|
-
const slots = useSlots();
|
|
6543
|
-
provide("slots", slots);
|
|
6544
|
-
const props = __props;
|
|
6545
|
-
const treeRef = ref$1();
|
|
6546
|
-
let videoErrorInfos = {};
|
|
6547
|
-
const emit = __emit;
|
|
6548
|
-
const getTreeNodeIcon = (iconType) => {
|
|
6549
|
-
if (iconType === "on") {
|
|
6550
|
-
return "online";
|
|
6551
|
-
} else if (iconType === "off") {
|
|
6552
|
-
return "offline";
|
|
6553
|
-
}
|
|
6554
|
-
return "";
|
|
6555
|
-
};
|
|
6556
|
-
const activeIndex = ref$1(props.videoSplitType);
|
|
6557
|
-
const fouceIndex = ref$1(0);
|
|
6558
|
-
const slidValue = ref$1(50);
|
|
6559
|
-
const videoCtrlFun = {
|
|
6560
|
-
speed: (info, slidValue2) => {
|
|
6561
|
-
console.log("speed: ", slidValue2);
|
|
6562
|
-
ctrlCommand("speed", info, slidValue2);
|
|
6563
|
-
},
|
|
6564
|
-
toTop: (info) => {
|
|
6565
|
-
console.log("up");
|
|
6566
|
-
ctrlCommand("up", info);
|
|
6567
|
-
},
|
|
6568
|
-
toBottom: (info) => {
|
|
6569
|
-
console.log("down");
|
|
6570
|
-
ctrlCommand("down", info);
|
|
6571
|
-
},
|
|
6572
|
-
toLeft: (info) => {
|
|
6573
|
-
console.log("left");
|
|
6574
|
-
ctrlCommand("left", info);
|
|
6575
|
-
},
|
|
6576
|
-
toRight: (info) => {
|
|
6577
|
-
console.log("right");
|
|
6578
|
-
ctrlCommand("right", info);
|
|
6579
|
-
},
|
|
6580
|
-
stop: (info) => {
|
|
6581
|
-
console.log("stop");
|
|
6582
|
-
ctrlCommand("stop", info);
|
|
6583
|
-
},
|
|
6584
|
-
changeZoom: (info, type2, speed) => {
|
|
6585
|
-
console.log("changeZoom: ", type2);
|
|
6586
|
-
if (type2 > 0) {
|
|
6587
|
-
ctrlCommand("zoomin", info, speed);
|
|
6588
|
-
} else if (type2 < 0) {
|
|
6589
|
-
ctrlCommand("zoomout", info, speed);
|
|
6590
|
-
}
|
|
6591
|
-
},
|
|
6592
|
-
toSpeak: (info) => {
|
|
6593
|
-
ctrlSpeak("speak", info);
|
|
6594
|
-
},
|
|
6595
|
-
toScan: (info) => {
|
|
6596
|
-
ctrlFunction("scan", info);
|
|
6597
|
-
},
|
|
6598
|
-
toCruise: (info) => {
|
|
6599
|
-
ctrlFunction("cruise", info);
|
|
6600
|
-
},
|
|
6601
|
-
toCall: (info) => {
|
|
6602
|
-
ctrlFunction("call", info);
|
|
6603
|
-
}
|
|
6604
|
-
};
|
|
6605
|
-
function ctrlSpeak(type2, info, value = null) {
|
|
6606
|
-
emit(type2, info, value);
|
|
6607
|
-
if (props.stopVideoCtrlMethods) {
|
|
6608
|
-
return;
|
|
6609
|
-
}
|
|
6610
|
-
const params = objectToString({
|
|
6611
|
-
url: " ",
|
|
6612
|
-
deviceId: (info == null ? void 0 : info.deviceId) ? info.deviceId : "",
|
|
6613
|
-
channelId: (info == null ? void 0 : info.channelId) ? info.channelId : ""
|
|
6614
|
-
});
|
|
6615
|
-
fetch(`${ctrlApis == null ? void 0 : ctrlApis.speakUrl}?${params}`);
|
|
6616
|
-
}
|
|
6617
|
-
function ctrlFunction(type2, info, value = null) {
|
|
6618
|
-
emit(type2, info, value);
|
|
6619
|
-
if (props.stopVideoCtrlMethods) {
|
|
6620
|
-
return;
|
|
6621
|
-
}
|
|
6622
|
-
const params = objectToString({
|
|
6623
|
-
url: " ",
|
|
6624
|
-
deviceId: (info == null ? void 0 : info.deviceId) ? info.deviceId : "",
|
|
6625
|
-
channelId: (info == null ? void 0 : info.channelId) ? info.channelId : "",
|
|
6626
|
-
functionType: type2
|
|
6627
|
-
});
|
|
6628
|
-
fetch(`${ctrlApis == null ? void 0 : ctrlApis.fnUrl}?${params}`);
|
|
6629
|
-
}
|
|
6630
|
-
function ctrlCommand(type2, info, value = null) {
|
|
6631
|
-
emit(type2, info, value);
|
|
6632
|
-
if (props.stopVideoCtrlMethods) {
|
|
6633
|
-
return;
|
|
6634
|
-
}
|
|
6635
|
-
const params = objectToString({
|
|
6636
|
-
url: " ",
|
|
6637
|
-
deviceId: (info == null ? void 0 : info.deviceId) ? info.deviceId : "",
|
|
6638
|
-
channelId: (info == null ? void 0 : info.channelId) ? info.channelId : "",
|
|
6639
|
-
command: type2,
|
|
6640
|
-
horizonSpeed: slidValue.value,
|
|
6641
|
-
verticalSpeed: slidValue.value,
|
|
6642
|
-
zoomSpeed: slidValue.value
|
|
6643
|
-
});
|
|
6644
|
-
fetch(`${ctrlApis == null ? void 0 : ctrlApis.commandUrl}?${params}`);
|
|
6645
|
-
}
|
|
6646
|
-
const videoInfos = ref$1([{ index: 0, [props.treeOptions.videoUrlKey]: "" }]);
|
|
6647
|
-
watch(
|
|
6648
|
-
() => props.videoInfos,
|
|
6649
|
-
(nv) => {
|
|
6650
|
-
console.log("传入的videoInfos----->", nv);
|
|
6651
|
-
nextTick(() => {
|
|
6652
|
-
const changeNv = checkVideoInfos(JSON.parse(JSON.stringify(nv)));
|
|
6653
|
-
videoInfos.value = changeNv;
|
|
6654
|
-
videoErrorInfos = {};
|
|
6655
|
-
});
|
|
6656
|
-
},
|
|
6657
|
-
{ immediate: true, deep: true }
|
|
6658
|
-
);
|
|
6659
|
-
watch(
|
|
6660
|
-
() => videoInfos.value,
|
|
6661
|
-
(nv) => {
|
|
6662
|
-
console.log("播放数据:", nv);
|
|
6663
|
-
},
|
|
6664
|
-
{ immediate: true, deep: true }
|
|
6665
|
-
);
|
|
6666
|
-
watch(
|
|
6667
|
-
() => props.videoSplitType,
|
|
6668
|
-
(nv) => {
|
|
6669
|
-
console.log("分屏方式:", nv);
|
|
6670
|
-
activeIndex.value = nv;
|
|
6671
|
-
videoErrorInfos = {};
|
|
6672
|
-
},
|
|
6673
|
-
{ immediate: true }
|
|
6674
|
-
);
|
|
6675
|
-
provide("videoModel", props.videoModel);
|
|
6676
|
-
provide("hkPath", props.hkPath);
|
|
6677
|
-
provide("videoUrlKey", props.treeOptions.videoUrlKey);
|
|
6678
|
-
provide("activeIndex", activeIndex);
|
|
6679
|
-
provide("fouceIndex", fouceIndex);
|
|
6680
|
-
provide("videoInfos", videoInfos);
|
|
6681
|
-
provide("videoCtrlFun", videoCtrlFun);
|
|
6682
|
-
provide("showVideoCtrls", props.showVideoCtrls);
|
|
6683
|
-
provide("slidValue", slidValue);
|
|
6684
|
-
provide("showClose", props.showClose);
|
|
6685
|
-
provide("hasFullScreen", props.hasFullScreen + "" === "false" ? false : true);
|
|
6686
|
-
watch(
|
|
6687
|
-
() => activeIndex.value,
|
|
6688
|
-
(nv) => {
|
|
6689
|
-
emit("changeSplit", nv);
|
|
6690
|
-
}
|
|
6691
|
-
);
|
|
6692
|
-
function objectToString(obj) {
|
|
6693
|
-
return Object.keys(obj).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join("&");
|
|
6694
|
-
}
|
|
6695
|
-
function checkVideoInfos(data) {
|
|
6696
|
-
const differenceCount = Math.pow(activeIndex.value, 2);
|
|
6697
|
-
data.sort((a, b3) => a.index - b3.index);
|
|
6698
|
-
data = data.filter((item) => item.index <= differenceCount - 1);
|
|
6699
|
-
for (let i3 = 0; i3 < differenceCount; i3++) {
|
|
6700
|
-
if (!data.some((item) => item.index === i3)) {
|
|
6701
|
-
data.push({ index: i3, [props.treeOptions.videoUrlKey]: "" });
|
|
6702
|
-
}
|
|
6703
|
-
}
|
|
6704
|
-
data.sort((a, b3) => a.index - b3.index);
|
|
6705
|
-
return data;
|
|
6706
|
-
}
|
|
6707
|
-
const comRightMenuRef = ref$1(null);
|
|
6708
|
-
const rightMenus = ref$1([
|
|
6709
|
-
{
|
|
6710
|
-
name: "打开监控",
|
|
6711
|
-
callback: openVideo
|
|
6712
|
-
}
|
|
6713
|
-
]);
|
|
6714
|
-
function openVideo(val) {
|
|
6715
|
-
if (val == null ? void 0 : val[props.treeOptions.videoUrlKey]) {
|
|
6716
|
-
setVideoUrl(val[props.treeOptions.videoUrlKey], true, fouceIndex.value, val);
|
|
6717
|
-
}
|
|
6718
|
-
}
|
|
6719
|
-
const treeExpand = computed(() => {
|
|
6720
|
-
return props.treeExpand || treeExpandHandler;
|
|
6721
|
-
});
|
|
6722
|
-
const treeRightMenu = (event, val) => {
|
|
6723
|
-
if (!props.hasVideoRightMenu) {
|
|
6724
|
-
return;
|
|
6725
|
-
}
|
|
6726
|
-
if (props.treeRightMenu) {
|
|
6727
|
-
props.treeRightMenu(event, val);
|
|
6728
|
-
if (props.callbackContinueExecute) {
|
|
6729
|
-
treeRightMenuHandler(event, val);
|
|
6730
|
-
}
|
|
6731
|
-
} else {
|
|
6732
|
-
treeRightMenuHandler(event, val);
|
|
6733
|
-
}
|
|
6734
|
-
};
|
|
6735
|
-
const dbClickInfo = {
|
|
6736
|
-
dbTime: 200,
|
|
6737
|
-
timeOut: null
|
|
6738
|
-
};
|
|
6739
|
-
function treeNodeAction(val) {
|
|
6740
|
-
if (!dbClickInfo.timeOut) {
|
|
6741
|
-
dbClickInfo.timeOut = setTimeout(() => {
|
|
6742
|
-
dbClickInfo.timeOut = null;
|
|
6743
|
-
if (props.treeClick) {
|
|
6744
|
-
props.treeClick(val);
|
|
6745
|
-
if (props.callbackContinueExecute) {
|
|
6746
|
-
treeNodeClickHandler(val);
|
|
6747
|
-
}
|
|
6748
|
-
} else {
|
|
6749
|
-
treeNodeClickHandler(val);
|
|
6750
|
-
}
|
|
6751
|
-
}, dbClickInfo.dbTime);
|
|
6752
|
-
} else {
|
|
6753
|
-
clearTimeout(dbClickInfo.timeOut);
|
|
6754
|
-
dbClickInfo.timeOut = null;
|
|
6755
|
-
if (props.treeDBClick) {
|
|
6756
|
-
props.treeDBClick(val);
|
|
6757
|
-
if (props.callbackContinueExecute) {
|
|
6758
|
-
treeNodeDBClickHandler(val);
|
|
6759
|
-
}
|
|
6760
|
-
} else {
|
|
6761
|
-
treeNodeDBClickHandler(val);
|
|
6762
|
-
}
|
|
6763
|
-
}
|
|
6764
|
-
}
|
|
6765
|
-
function treeNodeClickHandler(val) {
|
|
6766
|
-
console.log("单击");
|
|
6767
|
-
if (props.videoPlayModel == 1) {
|
|
6768
|
-
defalutPlay(val);
|
|
6769
|
-
}
|
|
6770
|
-
}
|
|
6771
|
-
function treeNodeDBClickHandler(val) {
|
|
6772
|
-
console.log("双击");
|
|
6773
|
-
defalutPlay(val);
|
|
6774
|
-
}
|
|
6775
|
-
function defalutPlay(val) {
|
|
6776
|
-
if (val == null ? void 0 : val[props.treeOptions.videoUrlKey]) {
|
|
6777
|
-
setVideoUrl(val == null ? void 0 : val[props.treeOptions.videoUrlKey], true, fouceIndex.value, val);
|
|
6778
|
-
}
|
|
6779
|
-
}
|
|
6780
|
-
function treeRightMenuHandler(event, val) {
|
|
6781
|
-
console.log("右键菜单");
|
|
6782
|
-
comRightMenuRef.value.right_showMenu(val, event);
|
|
6783
|
-
}
|
|
6784
|
-
function treeExpandHandler() {
|
|
6785
|
-
console.log("展开");
|
|
6786
|
-
}
|
|
6787
|
-
const getCurrentVideoUrl = ref$1({});
|
|
6788
|
-
function setVideoUrl(url, toNext = true, index2 = fouceIndex.value, treeNodeInfo = null) {
|
|
6789
|
-
var _a3, _b, _c2;
|
|
6790
|
-
getCurrentVideoUrl.value = {
|
|
6791
|
-
url,
|
|
6792
|
-
toNext,
|
|
6793
|
-
index: index2,
|
|
6794
|
-
treeNodeInfo
|
|
6795
|
-
};
|
|
6796
|
-
if (index2 == -1) {
|
|
6797
|
-
index2 = fouceIndex.value;
|
|
6798
|
-
}
|
|
6799
|
-
const currentVideoInfo = videoInfos.value.find((item) => item.index === index2);
|
|
6800
|
-
if (fouceIndex.value != index2) {
|
|
6801
|
-
fouceIndex.value = index2;
|
|
6802
|
-
}
|
|
6803
|
-
if (currentVideoInfo) {
|
|
6804
|
-
if (treeNodeInfo && props.videoSingleUrl) {
|
|
6805
|
-
const treeNodeInfoPlaying = (_a3 = videoInfos.value) == null ? void 0 : _a3.find(
|
|
6806
|
-
(item) => {
|
|
6807
|
-
var _a4;
|
|
6808
|
-
return ((_a4 = item.info) == null ? void 0 : _a4[props.treeNodeKey]) === (treeNodeInfo == null ? void 0 : treeNodeInfo[props.treeNodeKey]);
|
|
6809
|
-
}
|
|
6810
|
-
);
|
|
6811
|
-
if (treeNodeInfoPlaying) {
|
|
6812
|
-
treeNodeInfoPlaying[props.treeOptions.videoUrlKey] = "";
|
|
6813
|
-
delete treeNodeInfoPlaying.info;
|
|
6814
|
-
if (props.videoSingleClose) {
|
|
6815
|
-
return;
|
|
6816
|
-
}
|
|
6817
|
-
}
|
|
6818
|
-
}
|
|
6819
|
-
currentVideoInfo[props.treeOptions.videoUrlKey] = "";
|
|
6820
|
-
delete currentVideoInfo.info;
|
|
6821
|
-
setTimeout(() => {
|
|
6822
|
-
currentVideoInfo[props.treeOptions.videoUrlKey] = url;
|
|
6823
|
-
if (treeNodeInfo) {
|
|
6824
|
-
currentVideoInfo.info = treeNodeInfo;
|
|
6825
|
-
}
|
|
6826
|
-
}, 250);
|
|
6827
|
-
}
|
|
6828
|
-
const maxCount = ((_b = Object.values(videoInfos.value)[Object.values(videoInfos.value).length - 1]) == null ? void 0 : _b.index) > Math.pow(activeIndex.value, 2) ? Math.pow(activeIndex.value, 2) - 1 : (_c2 = Object.values(videoInfos.value)[Object.values(videoInfos.value).length - 1]) == null ? void 0 : _c2.index;
|
|
6829
|
-
if (maxCount > fouceIndex.value && toNext) {
|
|
6830
|
-
fouceIndex.value++;
|
|
6831
|
-
}
|
|
6832
|
-
}
|
|
6833
|
-
function removeVideo(index2, toNext = true) {
|
|
6834
|
-
setVideoUrl("", toNext, index2);
|
|
6835
|
-
try {
|
|
6836
|
-
delete videoOriginalInfos.value[index2];
|
|
6837
|
-
} catch (error) {
|
|
6838
|
-
console.warn("删除视频原始信息:", error);
|
|
6839
|
-
}
|
|
6840
|
-
}
|
|
6841
|
-
function errorVideo(index2, toNext = true) {
|
|
6842
|
-
var _a3, _b;
|
|
6843
|
-
console.warn("播放失败:", index2);
|
|
6844
|
-
if (props.videoErrorMaxCount <= 0) {
|
|
6845
|
-
removeVideo(index2, toNext);
|
|
6846
|
-
(_a3 = props.videoError) == null ? void 0 : _a3.call(props, index2);
|
|
6847
|
-
} else {
|
|
6848
|
-
if (videoErrorInfos[index2] == null || videoErrorInfos[index2] == void 0) {
|
|
6849
|
-
videoErrorInfos[index2] = { errors: 1 };
|
|
6850
|
-
} else {
|
|
6851
|
-
videoErrorInfos[index2] = { errors: videoErrorInfos[index2].errors + 1 };
|
|
6852
|
-
}
|
|
6853
|
-
console.warn("部分视频播放失败:", JSON.stringify(videoErrorInfos));
|
|
6854
|
-
for (const [k, v] of Object.entries(videoErrorInfos)) {
|
|
6855
|
-
if (v.errors >= props.videoErrorMaxCount) {
|
|
6856
|
-
v.errors = 0;
|
|
6857
|
-
removeVideo(index2, toNext);
|
|
6858
|
-
(_b = props.videoError) == null ? void 0 : _b.call(props, index2);
|
|
6859
|
-
console.info(`关闭失败视频:${k}, (失败次数: ${v.errors})`);
|
|
6860
|
-
}
|
|
6861
|
-
}
|
|
6862
|
-
}
|
|
6863
|
-
}
|
|
6864
|
-
function urlError(index2) {
|
|
6865
|
-
console.warn("【url错误】播放失败");
|
|
6866
|
-
removeVideo(index2);
|
|
6867
|
-
}
|
|
6868
|
-
const videoOriginalInfos = ref$1({});
|
|
6869
|
-
function videoOriginalInfo(originalInfo, index2) {
|
|
6870
|
-
videoOriginalInfos.value[index2] = originalInfo;
|
|
6871
|
-
emit("videoOriginalInfo", videoOriginalInfos.value);
|
|
6872
|
-
}
|
|
6873
|
-
function checkTreeNodeIsPlayHandler(data) {
|
|
6874
|
-
var _a3;
|
|
6875
|
-
let isPlay = false;
|
|
6876
|
-
for (let i3 = 0; i3 < videoInfos.value.length; i3++) {
|
|
6877
|
-
const selectTreeNode = videoInfos.value[i3];
|
|
6878
|
-
const nodeKey = data == null ? void 0 : data[props == null ? void 0 : props.treeNodeKey];
|
|
6879
|
-
if ((selectTreeNode == null ? void 0 : selectTreeNode.info) && nodeKey && nodeKey == ((_a3 = selectTreeNode.info) == null ? void 0 : _a3[props == null ? void 0 : props.treeNodeKey])) {
|
|
6880
|
-
isPlay = true;
|
|
6881
|
-
break;
|
|
6882
|
-
}
|
|
6883
|
-
}
|
|
6884
|
-
if (isPlay) {
|
|
6885
|
-
return "tree-node-playing";
|
|
6886
|
-
} else {
|
|
6887
|
-
return "";
|
|
6888
|
-
}
|
|
6889
|
-
}
|
|
6890
|
-
function getOriginalInfo() {
|
|
6891
|
-
return videoOriginalInfos.value;
|
|
6892
|
-
}
|
|
6893
|
-
__expose({ setVideoUrl, removeVideo, fouceIndex, videoInfos, treeRef, getOriginalInfo });
|
|
6894
|
-
return (_ctx, _cache) => {
|
|
6895
|
-
const _component_el_tree = resolveComponent("el-tree");
|
|
6896
|
-
const _directive_sline = resolveDirective("sline");
|
|
6897
|
-
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
6898
|
-
__props.showTree ? renderSlot(_ctx.$slots, "video-tree", { key: 0 }, () => [
|
|
6899
|
-
createElementVNode("div", _hoisted_2$7, [
|
|
6900
|
-
createVNode(_component_el_tree, {
|
|
6901
|
-
class: "tree-view",
|
|
6902
|
-
ref_key: "treeRef",
|
|
6903
|
-
ref: treeRef,
|
|
6904
|
-
"node-key": __props.treeNodeKey,
|
|
6905
|
-
data: __props.treeData,
|
|
6906
|
-
"expand-on-click-node": false,
|
|
6907
|
-
props: __props.treeOptions,
|
|
6908
|
-
"default-expanded-keys": __props.treeExpandedKeys,
|
|
6909
|
-
onNodeClick: treeNodeAction,
|
|
6910
|
-
onNodeContextmenu: treeRightMenu,
|
|
6911
|
-
onNodeExpand: treeExpand.value
|
|
6912
|
-
}, {
|
|
6913
|
-
default: withCtx(({ node, data }) => [
|
|
6914
|
-
createElementVNode("div", {
|
|
6915
|
-
class: "tree-node",
|
|
6916
|
-
style: normalizeStyle({
|
|
6917
|
-
background: (data == null ? void 0 : data[__props.treeOptions.background]) ? `url(${data[__props.treeOptions.background]}) no-repeat top left / 100% 100%` : ""
|
|
6918
|
-
})
|
|
6919
|
-
}, [
|
|
6920
|
-
createElementVNode("span", {
|
|
6921
|
-
class: normalizeClass(["tree-node-icon", getTreeNodeIcon(data == null ? void 0 : data[__props.treeOptions.icontype])])
|
|
6922
|
-
}, null, 2),
|
|
6923
|
-
withDirectives((openBlock(), createElementBlock("span", {
|
|
6924
|
-
class: normalizeClass(["tree-node-title", { "tree-node-playing": checkTreeNodeIsPlayHandler(data) }])
|
|
6925
|
-
}, [
|
|
6926
|
-
createTextVNode(toDisplayString(data[__props.treeOptions.label]), 1)
|
|
6927
|
-
], 2)), [
|
|
6928
|
-
[_directive_sline]
|
|
6929
|
-
])
|
|
6930
|
-
], 4)
|
|
6931
|
-
]),
|
|
6932
|
-
_: 1
|
|
6933
|
-
}, 8, ["node-key", "data", "props", "default-expanded-keys", "onNodeExpand"])
|
|
6934
|
-
])
|
|
6935
|
-
], true) : createCommentVNode("", true),
|
|
6936
|
-
createElementVNode("div", _hoisted_3$6, [
|
|
6937
|
-
__props.showVideoSplit ? renderSlot(_ctx.$slots, "video-player-head", { key: 0 }, () => [
|
|
6938
|
-
createVNode(SplitIconGroup, {
|
|
6939
|
-
class: "video-player-head",
|
|
6940
|
-
videoSplitUseIcon: __props.videoSplitUseIcon
|
|
6941
|
-
}, null, 8, ["videoSplitUseIcon"])
|
|
6942
|
-
], true) : createCommentVNode("", true),
|
|
6943
|
-
renderSlot(_ctx.$slots, "video-player-view", {
|
|
6944
|
-
videoConfig: __props.videoConfig,
|
|
6945
|
-
videoInfos: videoInfos.value,
|
|
6946
|
-
activeIndex: activeIndex.value,
|
|
6947
|
-
fouceIndex: fouceIndex.value,
|
|
6948
|
-
getCurrentVideoUrl: getCurrentVideoUrl.value
|
|
6949
|
-
}, () => [
|
|
6950
|
-
createVNode(SplitVideoGroup, {
|
|
6951
|
-
class: normalizeClass(["video-player-center", !__props.showTree ? "no-tree" : ""]),
|
|
6952
|
-
videoConfig: __props.videoConfig,
|
|
6953
|
-
videoErrorMaxCount: __props.videoErrorMaxCount,
|
|
6954
|
-
onRemoveVideo: removeVideo,
|
|
6955
|
-
onErrorVideo: errorVideo,
|
|
6956
|
-
onUrlError: urlError,
|
|
6957
|
-
onVideoOriginalInfo: videoOriginalInfo
|
|
6958
|
-
}, null, 8, ["class", "videoConfig", "videoErrorMaxCount"])
|
|
6959
|
-
], true),
|
|
6960
|
-
renderSlot(_ctx.$slots, "video-player-foot", {}, void 0, true)
|
|
6961
|
-
]),
|
|
6962
|
-
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
6963
|
-
createVNode(ComRightMenu, {
|
|
6964
|
-
ref_key: "comRightMenuRef",
|
|
6965
|
-
ref: comRightMenuRef,
|
|
6966
|
-
rightMenus: rightMenus.value
|
|
6967
|
-
}, null, 8, ["rightMenus"])
|
|
6968
|
-
]))
|
|
6969
|
-
]);
|
|
6970
|
-
};
|
|
6971
|
-
}
|
|
6972
|
-
});
|
|
6973
|
-
const NsVideo = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-7def3a14"]]);
|
|
6974
|
-
function registerDirective(app2) {
|
|
6975
|
-
app2.directive("sline", {
|
|
6976
|
-
mounted(el2) {
|
|
6977
|
-
el2.style.whiteSpace = "nowrap";
|
|
6978
|
-
el2.style.overflow = "hidden";
|
|
6979
|
-
el2.style.textOverflow = "ellipsis";
|
|
6980
|
-
el2.style.display = "inline-block";
|
|
6981
|
-
el2.style.maxWidth = "100%";
|
|
6982
|
-
}
|
|
6983
|
-
});
|
|
6984
|
-
app2.directive("permission", {
|
|
6985
|
-
mounted(el2, binding) {
|
|
6986
|
-
var _a3, _b, _c2, _d, _e, _f;
|
|
6987
|
-
let btnsPermission = [];
|
|
6988
|
-
try {
|
|
6989
|
-
if (sessionStorage.getItem("btnsPermission")) {
|
|
6990
|
-
Array.isArray(JSON.parse(sessionStorage.getItem("btnsPermission"))) ? btnsPermission = JSON.parse(sessionStorage.getItem("btnsPermission")) : null;
|
|
6991
|
-
} else if (localStorage.getItem("btnsPermission")) {
|
|
6992
|
-
Array.isArray(JSON.parse(localStorage.getItem("btnsPermission"))) ? btnsPermission = JSON.parse(localStorage.getItem("btnsPermission")) : null;
|
|
6993
|
-
}
|
|
6994
|
-
} catch (e6) {
|
|
6995
|
-
btnsPermission = [];
|
|
6996
|
-
}
|
|
6997
|
-
if (btnsPermission.length === 0) {
|
|
6998
|
-
if (app2.config.globalProperties.$btnsPermission) {
|
|
6999
|
-
btnsPermission = app2.config.globalProperties.$btnsPermission;
|
|
7000
|
-
} else if (binding.instance && binding.instance.$.appContext.app.config.globalProperties.$btnsPermission) {
|
|
7001
|
-
btnsPermission = binding.instance.$.appContext.app.config.globalProperties.$btnsPermission;
|
|
7002
|
-
} else if (binding.instance && ((_a3 = binding.instance.$.provides) == null ? void 0 : _a3.btnsPermission)) {
|
|
7003
|
-
btnsPermission = binding.instance.$.provides.btnsPermission;
|
|
7004
|
-
} else if (binding.instance && ((_c2 = (_b = binding.instance.$.parent) == null ? void 0 : _b.provides) == null ? void 0 : _c2.btnsPermission)) {
|
|
7005
|
-
btnsPermission = binding.instance.$.parent.provides.btnsPermission;
|
|
7006
|
-
}
|
|
7007
|
-
}
|
|
7008
|
-
const selector = ((_d = binding.modifiers) == null ? void 0 : _d["class"]) ? "class" : ((_e = binding.modifiers) == null ? void 0 : _e["id"]) ? "id" : "id";
|
|
7009
|
-
const isDisplayNone = (_f = binding.modifiers) == null ? void 0 : _f["display"];
|
|
7010
|
-
if (selector === "id") {
|
|
7011
|
-
if (!(btnsPermission == null ? void 0 : btnsPermission.includes(el2.getAttribute(selector)))) {
|
|
7012
|
-
if (isDisplayNone) {
|
|
7013
|
-
el2.style.display = "none";
|
|
7014
|
-
} else {
|
|
7015
|
-
el2.style.visibility = "hidden";
|
|
7016
|
-
el2.style.pointerEvents = "none";
|
|
7017
|
-
}
|
|
7018
|
-
} else {
|
|
7019
|
-
el2.style.pointerEvents = "auto";
|
|
7020
|
-
}
|
|
7021
|
-
} else if (selector === "class") {
|
|
7022
|
-
if ((btnsPermission == null ? void 0 : btnsPermission.filter((item) => Array.from(el2.classList).includes(item)).length) === 0) {
|
|
7023
|
-
if (isDisplayNone) {
|
|
7024
|
-
el2.style.display = "none";
|
|
7025
|
-
} else {
|
|
7026
|
-
el2.style.visibility = "hidden";
|
|
7027
|
-
el2.style.pointerEvents = "none";
|
|
7028
|
-
}
|
|
7029
|
-
} else {
|
|
7030
|
-
el2.style.pointerEvents = "auto";
|
|
7031
|
-
}
|
|
7032
|
-
}
|
|
7033
|
-
}
|
|
7034
|
-
});
|
|
7035
|
-
app2.directive("length", {
|
|
7036
|
-
mounted(el2, binding) {
|
|
7037
|
-
var _a3, _b, _c2;
|
|
7038
|
-
const config = parseBindingValue(binding);
|
|
7039
|
-
let isComposing = false;
|
|
7040
|
-
const getInputElement = () => {
|
|
7041
|
-
return el2.tagName === "INPUT" ? el2 : el2.querySelector("input");
|
|
7042
|
-
};
|
|
7043
|
-
const handleCompositionStart = () => {
|
|
7044
|
-
isComposing = true;
|
|
7045
|
-
};
|
|
7046
|
-
const handleCompositionEnd = (e6) => {
|
|
7047
|
-
var _a4, _b2, _c3;
|
|
7048
|
-
isComposing = false;
|
|
7049
|
-
if (((_a4 = binding.modifiers) == null ? void 0 : _a4.number) || ((_b2 = binding.modifiers) == null ? void 0 : _b2.range) || ((_c3 = binding.modifiers) == null ? void 0 : _c3.regex)) {
|
|
7050
|
-
handleInput(e6);
|
|
7051
|
-
}
|
|
7052
|
-
};
|
|
7053
|
-
const handleInput = (e6) => {
|
|
7054
|
-
var _a4, _b2, _c3;
|
|
7055
|
-
const inputEl2 = e6.target;
|
|
7056
|
-
if (isComposing) {
|
|
7057
|
-
return;
|
|
7058
|
-
}
|
|
7059
|
-
const oldValue = inputEl2.value;
|
|
7060
|
-
let newValue = oldValue;
|
|
7061
|
-
if ((_a4 = binding.modifiers) == null ? void 0 : _a4.range) {
|
|
7062
|
-
newValue = formatRangeInput(oldValue, config);
|
|
7063
|
-
} else if ((_b2 = binding.modifiers) == null ? void 0 : _b2.number) {
|
|
7064
|
-
newValue = formatNumberInput(oldValue, config.maxLength);
|
|
7065
|
-
} else if (((_c3 = binding.modifiers) == null ? void 0 : _c3.regex) && config.pattern) {
|
|
7066
|
-
newValue = formatRegexInput(oldValue, config.maxLength, config.pattern);
|
|
7067
|
-
} else {
|
|
7068
|
-
newValue = oldValue.slice(0, config.maxLength);
|
|
7069
|
-
}
|
|
7070
|
-
if (newValue !== oldValue) {
|
|
7071
|
-
inputEl2.value = newValue;
|
|
7072
|
-
const event = new Event("input", { bubbles: true });
|
|
7073
|
-
inputEl2.dispatchEvent(event);
|
|
7074
|
-
}
|
|
7075
|
-
};
|
|
7076
|
-
const inputEl = getInputElement();
|
|
7077
|
-
if (inputEl) {
|
|
7078
|
-
inputEl.addEventListener("compositionstart", handleCompositionStart);
|
|
7079
|
-
inputEl.addEventListener("compositionend", handleCompositionEnd);
|
|
7080
|
-
inputEl.addEventListener("input", handleInput);
|
|
7081
|
-
if (inputEl.value) {
|
|
7082
|
-
if ((_a3 = binding.modifiers) == null ? void 0 : _a3.range) {
|
|
7083
|
-
inputEl.value = formatRangeInput(inputEl.value, config);
|
|
7084
|
-
} else if ((_b = binding.modifiers) == null ? void 0 : _b.number) {
|
|
7085
|
-
inputEl.value = formatNumberInput(inputEl.value, config.maxLength);
|
|
7086
|
-
} else if (((_c2 = binding.modifiers) == null ? void 0 : _c2.regex) && config.pattern) {
|
|
7087
|
-
inputEl.value = formatRegexInput(inputEl.value, config.maxLength, config.pattern);
|
|
7088
|
-
} else {
|
|
7089
|
-
inputEl.value = inputEl.value.slice(0, config.maxLength);
|
|
7090
|
-
}
|
|
7091
|
-
}
|
|
7092
|
-
}
|
|
7093
|
-
el2._lengthDirectiveHandlers = {
|
|
7094
|
-
compositionstart: handleCompositionStart,
|
|
7095
|
-
compositionend: handleCompositionEnd,
|
|
7096
|
-
input: handleInput,
|
|
7097
|
-
inputElement: inputEl
|
|
7098
|
-
};
|
|
7099
|
-
},
|
|
7100
|
-
unmounted(el2) {
|
|
7101
|
-
const handlers = el2._lengthDirectiveHandlers;
|
|
7102
|
-
if (handlers && handlers.inputElement) {
|
|
7103
|
-
handlers.inputElement.removeEventListener("compositionstart", handlers.compositionstart);
|
|
7104
|
-
handlers.inputElement.removeEventListener("compositionend", handlers.compositionend);
|
|
7105
|
-
handlers.inputElement.removeEventListener("input", handlers.input);
|
|
7106
|
-
delete el2._lengthDirectiveHandlers;
|
|
7107
|
-
}
|
|
7108
|
-
},
|
|
7109
|
-
updated(el2, binding) {
|
|
7110
|
-
updatedCheck(el2, binding);
|
|
7111
|
-
}
|
|
7112
|
-
});
|
|
7113
|
-
app2.directive("event-unuse", {
|
|
7114
|
-
mounted(el2) {
|
|
7115
|
-
el2.style.pointerEvents = "none";
|
|
7116
|
-
}
|
|
7117
|
-
});
|
|
7118
|
-
app2.directive("event-use", {
|
|
7119
|
-
mounted(el2) {
|
|
7120
|
-
el2.style.pointerEvents = "auto";
|
|
7121
|
-
}
|
|
7122
|
-
});
|
|
7123
|
-
}
|
|
7124
|
-
function parseBindingValue(binding) {
|
|
7125
|
-
const defaultConfig = { maxLength: 50, pattern: null, min: null, max: null, int: false };
|
|
7126
|
-
if (!binding.value) {
|
|
7127
|
-
return defaultConfig;
|
|
7128
|
-
}
|
|
7129
|
-
if (typeof binding.value === "number") {
|
|
7130
|
-
return { ...defaultConfig, maxLength: binding.value };
|
|
7131
|
-
}
|
|
7132
|
-
if (typeof binding.value === "object") {
|
|
7133
|
-
return {
|
|
7134
|
-
maxLength: binding.value.maxLength || defaultConfig.maxLength,
|
|
7135
|
-
pattern: binding.value.pattern || null,
|
|
7136
|
-
min: binding.value.min || null,
|
|
7137
|
-
max: binding.value.max || null,
|
|
7138
|
-
int: binding.value.int || false
|
|
7139
|
-
};
|
|
7140
|
-
}
|
|
7141
|
-
return defaultConfig;
|
|
7142
|
-
}
|
|
7143
|
-
function formatRegexInput(value, maxLength, pattern) {
|
|
7144
|
-
let result = "";
|
|
7145
|
-
for (let i3 = 0; i3 < value.length && result.length < maxLength; i3++) {
|
|
7146
|
-
const char = value[i3];
|
|
7147
|
-
const testValue = result + char;
|
|
7148
|
-
if (pattern.test(testValue)) {
|
|
7149
|
-
result += char;
|
|
7150
|
-
}
|
|
7151
|
-
}
|
|
7152
|
-
return result;
|
|
7153
|
-
}
|
|
7154
|
-
function updatedCheck(el2, binding) {
|
|
7155
|
-
const config = parseBindingValue(binding);
|
|
7156
|
-
const els = el2.querySelectorAll("input, textarea");
|
|
7157
|
-
els.forEach((element) => {
|
|
7158
|
-
var _a3, _b, _c2;
|
|
7159
|
-
if (element == null ? void 0 : element.value) {
|
|
7160
|
-
if ((_a3 = binding.modifiers) == null ? void 0 : _a3.range) {
|
|
7161
|
-
element.value = formatRangeInput(element.value, config);
|
|
7162
|
-
element.dispatchEvent(new Event("input"));
|
|
7163
|
-
} else if ((_b = binding.modifiers) == null ? void 0 : _b.number) {
|
|
7164
|
-
element.value = formatNumberInput(element.value, config.maxLength);
|
|
7165
|
-
element.dispatchEvent(new Event("input"));
|
|
7166
|
-
} else if (((_c2 = binding.modifiers) == null ? void 0 : _c2.regex) && config.pattern) {
|
|
7167
|
-
element.value = formatRegexInput(element.value, config.maxLength, config.pattern);
|
|
7168
|
-
element.dispatchEvent(new Event("input"));
|
|
7169
|
-
} else {
|
|
7170
|
-
element.value = element.value.slice(0, config.maxLength);
|
|
7171
|
-
element.dispatchEvent(new Event("input"));
|
|
7172
|
-
}
|
|
7173
|
-
}
|
|
7174
|
-
});
|
|
7175
|
-
}
|
|
7176
|
-
function formatNumberInput(value, maxLength, allowNegative = true) {
|
|
7177
|
-
let result = "";
|
|
7178
|
-
let hasMinus = false;
|
|
7179
|
-
let hasDot = false;
|
|
7180
|
-
for (let i3 = 0; i3 < value.length; i3++) {
|
|
7181
|
-
const char = value[i3];
|
|
7182
|
-
if (char === "-") {
|
|
7183
|
-
if (allowNegative && i3 === 0 && !hasMinus) {
|
|
7184
|
-
result += char;
|
|
7185
|
-
hasMinus = true;
|
|
7186
|
-
}
|
|
7187
|
-
continue;
|
|
7188
|
-
}
|
|
7189
|
-
if (char === ".") {
|
|
7190
|
-
if (i3 !== 0 && !hasDot && (i3 === 0 || result[i3 - 1] !== "-")) {
|
|
7191
|
-
result += char;
|
|
7192
|
-
hasDot = true;
|
|
7193
|
-
}
|
|
7194
|
-
continue;
|
|
7195
|
-
}
|
|
7196
|
-
if (/^\d$/.test(char)) {
|
|
7197
|
-
const currentResult = hasMinus ? result.slice(1) : result;
|
|
7198
|
-
if (currentResult === "0" && char !== "0" && !hasDot) {
|
|
7199
|
-
result = hasMinus ? "-" : "";
|
|
7200
|
-
}
|
|
7201
|
-
result += char;
|
|
7202
|
-
}
|
|
7203
|
-
}
|
|
7204
|
-
return result.slice(0, maxLength);
|
|
7205
|
-
}
|
|
7206
|
-
function formatIntegerInput(value, maxLength, config) {
|
|
7207
|
-
let result = "";
|
|
7208
|
-
let hasMinus = false;
|
|
7209
|
-
const allowNegative = config.min !== null && config.min < 0;
|
|
7210
|
-
for (let i3 = 0; i3 < value.length; i3++) {
|
|
7211
|
-
const char = value[i3];
|
|
7212
|
-
if (char === "-") {
|
|
7213
|
-
if (allowNegative && i3 === 0 && !hasMinus) {
|
|
7214
|
-
result += char;
|
|
7215
|
-
hasMinus = true;
|
|
7216
|
-
}
|
|
7217
|
-
continue;
|
|
7218
|
-
}
|
|
7219
|
-
if (/^\d$/.test(char)) {
|
|
7220
|
-
const currentResult = hasMinus ? result.slice(1) : result;
|
|
7221
|
-
if (currentResult === "0" && char !== "0") {
|
|
7222
|
-
result = hasMinus ? "-" : "";
|
|
7223
|
-
}
|
|
7224
|
-
result += char;
|
|
7225
|
-
}
|
|
7226
|
-
}
|
|
7227
|
-
return result.slice(0, maxLength);
|
|
7228
|
-
}
|
|
7229
|
-
function formatRangeInput(value, config) {
|
|
7230
|
-
if (config.int) {
|
|
7231
|
-
let result2 = formatIntegerInput(value, config.maxLength || 50, config);
|
|
7232
|
-
if (config.min === null && config.max === null) {
|
|
7233
|
-
return result2;
|
|
7234
|
-
}
|
|
7235
|
-
if (result2 === "" || result2 === "-") {
|
|
7236
|
-
return result2;
|
|
7237
|
-
}
|
|
7238
|
-
const numValue2 = parseInt(result2, 10);
|
|
7239
|
-
if (isNaN(numValue2)) {
|
|
7240
|
-
return "";
|
|
7241
|
-
}
|
|
7242
|
-
if (config.min !== null && numValue2 < config.min) {
|
|
7243
|
-
return Math.ceil(config.min).toString();
|
|
7244
|
-
}
|
|
7245
|
-
if (config.max !== null && numValue2 > config.max) {
|
|
7246
|
-
return Math.floor(config.max).toString();
|
|
7247
|
-
}
|
|
7248
|
-
return result2;
|
|
7249
|
-
}
|
|
7250
|
-
const allowNegative = config.min !== null && config.min < 0;
|
|
7251
|
-
let result = formatNumberInput(value, config.maxLength || 50, allowNegative);
|
|
7252
|
-
if (config.min === null && config.max === null) {
|
|
7253
|
-
return result;
|
|
7254
|
-
}
|
|
7255
|
-
if (result === "" || result === "-" || result === ".") {
|
|
7256
|
-
return result;
|
|
7257
|
-
}
|
|
7258
|
-
const numValue = parseFloat(result);
|
|
7259
|
-
if (isNaN(numValue)) {
|
|
7260
|
-
return "";
|
|
7261
|
-
}
|
|
7262
|
-
if (config.min !== null && numValue < config.min) {
|
|
7263
|
-
return config.min.toString();
|
|
7264
|
-
}
|
|
7265
|
-
if (config.max !== null && numValue > config.max) {
|
|
7266
|
-
return config.max.toString();
|
|
7267
|
-
}
|
|
7268
|
-
return result;
|
|
7269
|
-
}
|
|
7270
|
-
NsVideo.install = (app2) => {
|
|
7271
|
-
app2.component(NsVideo.name, NsVideo);
|
|
7272
|
-
try {
|
|
7273
|
-
registerDirective(app2);
|
|
7274
|
-
} catch (error) {
|
|
7275
|
-
console.warn("组件库注册指令失败:", error);
|
|
7276
|
-
}
|
|
7277
|
-
};
|
|
7278
5175
|
let Element$1 = class Element2 {
|
|
7279
5176
|
constructor(tag, className = "") {
|
|
7280
5177
|
if (typeof tag === "string") {
|
|
@@ -46879,6 +44776,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
46879
44776
|
};
|
|
46880
44777
|
}
|
|
46881
44778
|
});
|
|
44779
|
+
const _export_sfc = (sfc, props) => {
|
|
44780
|
+
const target = sfc.__vccOpts || sfc;
|
|
44781
|
+
for (const [key, val] of props) {
|
|
44782
|
+
target[key] = val;
|
|
44783
|
+
}
|
|
44784
|
+
return target;
|
|
44785
|
+
};
|
|
46882
44786
|
const ExcelComp = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-1aba0d50"]]);
|
|
46883
44787
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
46884
44788
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
@@ -47597,7 +45501,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
47597
45501
|
title: props.dialogTitle,
|
|
47598
45502
|
// 任何组件添加 $emit('close') 时,会触发关闭弹出框事件
|
|
47599
45503
|
dom: ExcelComp,
|
|
47600
|
-
// 也可以通过异步方式:import("@/views/
|
|
45504
|
+
// 也可以通过异步方式:import("@/views/xx.vue") 和 () => import("@/views/xx.vue")
|
|
47601
45505
|
option: {
|
|
47602
45506
|
// dom对应的自定义组件props属性
|
|
47603
45507
|
...attrs,
|
|
@@ -50234,9 +48138,9 @@ function keyBy(array, by) {
|
|
|
50234
48138
|
}, {});
|
|
50235
48139
|
}
|
|
50236
48140
|
function blobToBase64(blob) {
|
|
50237
|
-
return new Promise((
|
|
48141
|
+
return new Promise((resolve, reject) => {
|
|
50238
48142
|
const reader = new FileReader();
|
|
50239
|
-
reader.onloadend = () =>
|
|
48143
|
+
reader.onloadend = () => resolve(reader.result);
|
|
50240
48144
|
reader.onerror = () => reject();
|
|
50241
48145
|
reader.readAsDataURL(blob);
|
|
50242
48146
|
});
|
|
@@ -55539,6 +53443,302 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
55539
53443
|
}
|
|
55540
53444
|
});
|
|
55541
53445
|
const NsFormTitle = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-a0ddcbf6"]]);
|
|
53446
|
+
function registerDirective(app2) {
|
|
53447
|
+
app2.directive("sline", {
|
|
53448
|
+
mounted(el2) {
|
|
53449
|
+
el2.style.whiteSpace = "nowrap";
|
|
53450
|
+
el2.style.overflow = "hidden";
|
|
53451
|
+
el2.style.textOverflow = "ellipsis";
|
|
53452
|
+
el2.style.display = "inline-block";
|
|
53453
|
+
el2.style.maxWidth = "100%";
|
|
53454
|
+
}
|
|
53455
|
+
});
|
|
53456
|
+
app2.directive("permission", {
|
|
53457
|
+
mounted(el2, binding) {
|
|
53458
|
+
var _a3, _b, _c2, _d, _e, _f;
|
|
53459
|
+
let btnsPermission = [];
|
|
53460
|
+
try {
|
|
53461
|
+
if (sessionStorage.getItem("btnsPermission")) {
|
|
53462
|
+
Array.isArray(JSON.parse(sessionStorage.getItem("btnsPermission"))) ? btnsPermission = JSON.parse(sessionStorage.getItem("btnsPermission")) : null;
|
|
53463
|
+
} else if (localStorage.getItem("btnsPermission")) {
|
|
53464
|
+
Array.isArray(JSON.parse(localStorage.getItem("btnsPermission"))) ? btnsPermission = JSON.parse(localStorage.getItem("btnsPermission")) : null;
|
|
53465
|
+
}
|
|
53466
|
+
} catch (e6) {
|
|
53467
|
+
btnsPermission = [];
|
|
53468
|
+
}
|
|
53469
|
+
if (btnsPermission.length === 0) {
|
|
53470
|
+
if (app2.config.globalProperties.$btnsPermission) {
|
|
53471
|
+
btnsPermission = app2.config.globalProperties.$btnsPermission;
|
|
53472
|
+
} else if (binding.instance && binding.instance.$.appContext.app.config.globalProperties.$btnsPermission) {
|
|
53473
|
+
btnsPermission = binding.instance.$.appContext.app.config.globalProperties.$btnsPermission;
|
|
53474
|
+
} else if (binding.instance && ((_a3 = binding.instance.$.provides) == null ? void 0 : _a3.btnsPermission)) {
|
|
53475
|
+
btnsPermission = binding.instance.$.provides.btnsPermission;
|
|
53476
|
+
} else if (binding.instance && ((_c2 = (_b = binding.instance.$.parent) == null ? void 0 : _b.provides) == null ? void 0 : _c2.btnsPermission)) {
|
|
53477
|
+
btnsPermission = binding.instance.$.parent.provides.btnsPermission;
|
|
53478
|
+
}
|
|
53479
|
+
}
|
|
53480
|
+
const selector = ((_d = binding.modifiers) == null ? void 0 : _d["class"]) ? "class" : ((_e = binding.modifiers) == null ? void 0 : _e["id"]) ? "id" : "id";
|
|
53481
|
+
const isDisplayNone = (_f = binding.modifiers) == null ? void 0 : _f["display"];
|
|
53482
|
+
if (selector === "id") {
|
|
53483
|
+
if (!(btnsPermission == null ? void 0 : btnsPermission.includes(el2.getAttribute(selector)))) {
|
|
53484
|
+
if (isDisplayNone) {
|
|
53485
|
+
el2.style.display = "none";
|
|
53486
|
+
} else {
|
|
53487
|
+
el2.style.visibility = "hidden";
|
|
53488
|
+
el2.style.pointerEvents = "none";
|
|
53489
|
+
}
|
|
53490
|
+
} else {
|
|
53491
|
+
el2.style.pointerEvents = "auto";
|
|
53492
|
+
}
|
|
53493
|
+
} else if (selector === "class") {
|
|
53494
|
+
if ((btnsPermission == null ? void 0 : btnsPermission.filter((item) => Array.from(el2.classList).includes(item)).length) === 0) {
|
|
53495
|
+
if (isDisplayNone) {
|
|
53496
|
+
el2.style.display = "none";
|
|
53497
|
+
} else {
|
|
53498
|
+
el2.style.visibility = "hidden";
|
|
53499
|
+
el2.style.pointerEvents = "none";
|
|
53500
|
+
}
|
|
53501
|
+
} else {
|
|
53502
|
+
el2.style.pointerEvents = "auto";
|
|
53503
|
+
}
|
|
53504
|
+
}
|
|
53505
|
+
}
|
|
53506
|
+
});
|
|
53507
|
+
app2.directive("length", {
|
|
53508
|
+
mounted(el2, binding) {
|
|
53509
|
+
var _a3, _b, _c2;
|
|
53510
|
+
const config = parseBindingValue(binding);
|
|
53511
|
+
let isComposing = false;
|
|
53512
|
+
const getInputElement = () => {
|
|
53513
|
+
return el2.tagName === "INPUT" ? el2 : el2.querySelector("input");
|
|
53514
|
+
};
|
|
53515
|
+
const handleCompositionStart = () => {
|
|
53516
|
+
isComposing = true;
|
|
53517
|
+
};
|
|
53518
|
+
const handleCompositionEnd = (e6) => {
|
|
53519
|
+
var _a4, _b2, _c3;
|
|
53520
|
+
isComposing = false;
|
|
53521
|
+
if (((_a4 = binding.modifiers) == null ? void 0 : _a4.number) || ((_b2 = binding.modifiers) == null ? void 0 : _b2.range) || ((_c3 = binding.modifiers) == null ? void 0 : _c3.regex)) {
|
|
53522
|
+
handleInput(e6);
|
|
53523
|
+
}
|
|
53524
|
+
};
|
|
53525
|
+
const handleInput = (e6) => {
|
|
53526
|
+
var _a4, _b2, _c3;
|
|
53527
|
+
const inputEl2 = e6.target;
|
|
53528
|
+
if (isComposing) {
|
|
53529
|
+
return;
|
|
53530
|
+
}
|
|
53531
|
+
const oldValue = inputEl2.value;
|
|
53532
|
+
let newValue = oldValue;
|
|
53533
|
+
if ((_a4 = binding.modifiers) == null ? void 0 : _a4.range) {
|
|
53534
|
+
newValue = formatRangeInput(oldValue, config);
|
|
53535
|
+
} else if ((_b2 = binding.modifiers) == null ? void 0 : _b2.number) {
|
|
53536
|
+
newValue = formatNumberInput(oldValue, config.maxLength);
|
|
53537
|
+
} else if (((_c3 = binding.modifiers) == null ? void 0 : _c3.regex) && config.pattern) {
|
|
53538
|
+
newValue = formatRegexInput(oldValue, config.maxLength, config.pattern);
|
|
53539
|
+
} else {
|
|
53540
|
+
newValue = oldValue.slice(0, config.maxLength);
|
|
53541
|
+
}
|
|
53542
|
+
if (newValue !== oldValue) {
|
|
53543
|
+
inputEl2.value = newValue;
|
|
53544
|
+
const event = new Event("input", { bubbles: true });
|
|
53545
|
+
inputEl2.dispatchEvent(event);
|
|
53546
|
+
}
|
|
53547
|
+
};
|
|
53548
|
+
const inputEl = getInputElement();
|
|
53549
|
+
if (inputEl) {
|
|
53550
|
+
inputEl.addEventListener("compositionstart", handleCompositionStart);
|
|
53551
|
+
inputEl.addEventListener("compositionend", handleCompositionEnd);
|
|
53552
|
+
inputEl.addEventListener("input", handleInput);
|
|
53553
|
+
if (inputEl.value) {
|
|
53554
|
+
if ((_a3 = binding.modifiers) == null ? void 0 : _a3.range) {
|
|
53555
|
+
inputEl.value = formatRangeInput(inputEl.value, config);
|
|
53556
|
+
} else if ((_b = binding.modifiers) == null ? void 0 : _b.number) {
|
|
53557
|
+
inputEl.value = formatNumberInput(inputEl.value, config.maxLength);
|
|
53558
|
+
} else if (((_c2 = binding.modifiers) == null ? void 0 : _c2.regex) && config.pattern) {
|
|
53559
|
+
inputEl.value = formatRegexInput(inputEl.value, config.maxLength, config.pattern);
|
|
53560
|
+
} else {
|
|
53561
|
+
inputEl.value = inputEl.value.slice(0, config.maxLength);
|
|
53562
|
+
}
|
|
53563
|
+
}
|
|
53564
|
+
}
|
|
53565
|
+
el2._lengthDirectiveHandlers = {
|
|
53566
|
+
compositionstart: handleCompositionStart,
|
|
53567
|
+
compositionend: handleCompositionEnd,
|
|
53568
|
+
input: handleInput,
|
|
53569
|
+
inputElement: inputEl
|
|
53570
|
+
};
|
|
53571
|
+
},
|
|
53572
|
+
unmounted(el2) {
|
|
53573
|
+
const handlers = el2._lengthDirectiveHandlers;
|
|
53574
|
+
if (handlers && handlers.inputElement) {
|
|
53575
|
+
handlers.inputElement.removeEventListener("compositionstart", handlers.compositionstart);
|
|
53576
|
+
handlers.inputElement.removeEventListener("compositionend", handlers.compositionend);
|
|
53577
|
+
handlers.inputElement.removeEventListener("input", handlers.input);
|
|
53578
|
+
delete el2._lengthDirectiveHandlers;
|
|
53579
|
+
}
|
|
53580
|
+
},
|
|
53581
|
+
updated(el2, binding) {
|
|
53582
|
+
updatedCheck(el2, binding);
|
|
53583
|
+
}
|
|
53584
|
+
});
|
|
53585
|
+
app2.directive("event-unuse", {
|
|
53586
|
+
mounted(el2) {
|
|
53587
|
+
el2.style.pointerEvents = "none";
|
|
53588
|
+
}
|
|
53589
|
+
});
|
|
53590
|
+
app2.directive("event-use", {
|
|
53591
|
+
mounted(el2) {
|
|
53592
|
+
el2.style.pointerEvents = "auto";
|
|
53593
|
+
}
|
|
53594
|
+
});
|
|
53595
|
+
}
|
|
53596
|
+
function parseBindingValue(binding) {
|
|
53597
|
+
const defaultConfig = { maxLength: 50, pattern: null, min: null, max: null, int: false };
|
|
53598
|
+
if (!binding.value) {
|
|
53599
|
+
return defaultConfig;
|
|
53600
|
+
}
|
|
53601
|
+
if (typeof binding.value === "number") {
|
|
53602
|
+
return { ...defaultConfig, maxLength: binding.value };
|
|
53603
|
+
}
|
|
53604
|
+
if (typeof binding.value === "object") {
|
|
53605
|
+
return {
|
|
53606
|
+
maxLength: binding.value.maxLength || defaultConfig.maxLength,
|
|
53607
|
+
pattern: binding.value.pattern || null,
|
|
53608
|
+
min: binding.value.min || null,
|
|
53609
|
+
max: binding.value.max || null,
|
|
53610
|
+
int: binding.value.int || false
|
|
53611
|
+
};
|
|
53612
|
+
}
|
|
53613
|
+
return defaultConfig;
|
|
53614
|
+
}
|
|
53615
|
+
function formatRegexInput(value, maxLength, pattern) {
|
|
53616
|
+
let result = "";
|
|
53617
|
+
for (let i3 = 0; i3 < value.length && result.length < maxLength; i3++) {
|
|
53618
|
+
const char = value[i3];
|
|
53619
|
+
const testValue = result + char;
|
|
53620
|
+
if (pattern.test(testValue)) {
|
|
53621
|
+
result += char;
|
|
53622
|
+
}
|
|
53623
|
+
}
|
|
53624
|
+
return result;
|
|
53625
|
+
}
|
|
53626
|
+
function updatedCheck(el2, binding) {
|
|
53627
|
+
const config = parseBindingValue(binding);
|
|
53628
|
+
const els = el2.querySelectorAll("input, textarea");
|
|
53629
|
+
els.forEach((element) => {
|
|
53630
|
+
var _a3, _b, _c2;
|
|
53631
|
+
if (element == null ? void 0 : element.value) {
|
|
53632
|
+
if ((_a3 = binding.modifiers) == null ? void 0 : _a3.range) {
|
|
53633
|
+
element.value = formatRangeInput(element.value, config);
|
|
53634
|
+
element.dispatchEvent(new Event("input"));
|
|
53635
|
+
} else if ((_b = binding.modifiers) == null ? void 0 : _b.number) {
|
|
53636
|
+
element.value = formatNumberInput(element.value, config.maxLength);
|
|
53637
|
+
element.dispatchEvent(new Event("input"));
|
|
53638
|
+
} else if (((_c2 = binding.modifiers) == null ? void 0 : _c2.regex) && config.pattern) {
|
|
53639
|
+
element.value = formatRegexInput(element.value, config.maxLength, config.pattern);
|
|
53640
|
+
element.dispatchEvent(new Event("input"));
|
|
53641
|
+
} else {
|
|
53642
|
+
element.value = element.value.slice(0, config.maxLength);
|
|
53643
|
+
element.dispatchEvent(new Event("input"));
|
|
53644
|
+
}
|
|
53645
|
+
}
|
|
53646
|
+
});
|
|
53647
|
+
}
|
|
53648
|
+
function formatNumberInput(value, maxLength, allowNegative = true) {
|
|
53649
|
+
let result = "";
|
|
53650
|
+
let hasMinus = false;
|
|
53651
|
+
let hasDot = false;
|
|
53652
|
+
for (let i3 = 0; i3 < value.length; i3++) {
|
|
53653
|
+
const char = value[i3];
|
|
53654
|
+
if (char === "-") {
|
|
53655
|
+
if (allowNegative && i3 === 0 && !hasMinus) {
|
|
53656
|
+
result += char;
|
|
53657
|
+
hasMinus = true;
|
|
53658
|
+
}
|
|
53659
|
+
continue;
|
|
53660
|
+
}
|
|
53661
|
+
if (char === ".") {
|
|
53662
|
+
if (i3 !== 0 && !hasDot && (i3 === 0 || result[i3 - 1] !== "-")) {
|
|
53663
|
+
result += char;
|
|
53664
|
+
hasDot = true;
|
|
53665
|
+
}
|
|
53666
|
+
continue;
|
|
53667
|
+
}
|
|
53668
|
+
if (/^\d$/.test(char)) {
|
|
53669
|
+
const currentResult = hasMinus ? result.slice(1) : result;
|
|
53670
|
+
if (currentResult === "0" && char !== "0" && !hasDot) {
|
|
53671
|
+
result = hasMinus ? "-" : "";
|
|
53672
|
+
}
|
|
53673
|
+
result += char;
|
|
53674
|
+
}
|
|
53675
|
+
}
|
|
53676
|
+
return result.slice(0, maxLength);
|
|
53677
|
+
}
|
|
53678
|
+
function formatIntegerInput(value, maxLength, config) {
|
|
53679
|
+
let result = "";
|
|
53680
|
+
let hasMinus = false;
|
|
53681
|
+
const allowNegative = config.min !== null && config.min < 0;
|
|
53682
|
+
for (let i3 = 0; i3 < value.length; i3++) {
|
|
53683
|
+
const char = value[i3];
|
|
53684
|
+
if (char === "-") {
|
|
53685
|
+
if (allowNegative && i3 === 0 && !hasMinus) {
|
|
53686
|
+
result += char;
|
|
53687
|
+
hasMinus = true;
|
|
53688
|
+
}
|
|
53689
|
+
continue;
|
|
53690
|
+
}
|
|
53691
|
+
if (/^\d$/.test(char)) {
|
|
53692
|
+
const currentResult = hasMinus ? result.slice(1) : result;
|
|
53693
|
+
if (currentResult === "0" && char !== "0") {
|
|
53694
|
+
result = hasMinus ? "-" : "";
|
|
53695
|
+
}
|
|
53696
|
+
result += char;
|
|
53697
|
+
}
|
|
53698
|
+
}
|
|
53699
|
+
return result.slice(0, maxLength);
|
|
53700
|
+
}
|
|
53701
|
+
function formatRangeInput(value, config) {
|
|
53702
|
+
if (config.int) {
|
|
53703
|
+
let result2 = formatIntegerInput(value, config.maxLength || 50, config);
|
|
53704
|
+
if (config.min === null && config.max === null) {
|
|
53705
|
+
return result2;
|
|
53706
|
+
}
|
|
53707
|
+
if (result2 === "" || result2 === "-") {
|
|
53708
|
+
return result2;
|
|
53709
|
+
}
|
|
53710
|
+
const numValue2 = parseInt(result2, 10);
|
|
53711
|
+
if (isNaN(numValue2)) {
|
|
53712
|
+
return "";
|
|
53713
|
+
}
|
|
53714
|
+
if (config.min !== null && numValue2 < config.min) {
|
|
53715
|
+
return Math.ceil(config.min).toString();
|
|
53716
|
+
}
|
|
53717
|
+
if (config.max !== null && numValue2 > config.max) {
|
|
53718
|
+
return Math.floor(config.max).toString();
|
|
53719
|
+
}
|
|
53720
|
+
return result2;
|
|
53721
|
+
}
|
|
53722
|
+
const allowNegative = config.min !== null && config.min < 0;
|
|
53723
|
+
let result = formatNumberInput(value, config.maxLength || 50, allowNegative);
|
|
53724
|
+
if (config.min === null && config.max === null) {
|
|
53725
|
+
return result;
|
|
53726
|
+
}
|
|
53727
|
+
if (result === "" || result === "-" || result === ".") {
|
|
53728
|
+
return result;
|
|
53729
|
+
}
|
|
53730
|
+
const numValue = parseFloat(result);
|
|
53731
|
+
if (isNaN(numValue)) {
|
|
53732
|
+
return "";
|
|
53733
|
+
}
|
|
53734
|
+
if (config.min !== null && numValue < config.min) {
|
|
53735
|
+
return config.min.toString();
|
|
53736
|
+
}
|
|
53737
|
+
if (config.max !== null && numValue > config.max) {
|
|
53738
|
+
return config.max.toString();
|
|
53739
|
+
}
|
|
53740
|
+
return result;
|
|
53741
|
+
}
|
|
55542
53742
|
var type;
|
|
55543
53743
|
var hasRequiredType;
|
|
55544
53744
|
function requireType() {
|
|
@@ -78956,102 +77156,104 @@ const _sfc_main$1 = {
|
|
|
78956
77156
|
const _component_el_pagination = resolveComponent("el-pagination");
|
|
78957
77157
|
const _directive_loading = resolveDirective("loading");
|
|
78958
77158
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
78959
|
-
|
|
78960
|
-
|
|
78961
|
-
|
|
78962
|
-
|
|
78963
|
-
|
|
78964
|
-
|
|
78965
|
-
|
|
77159
|
+
renderSlot(_ctx.$slots, "page-content", {}, () => [
|
|
77160
|
+
__props.showHeaderToolbar ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
77161
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
77162
|
+
renderSlot(_ctx.$slots, "header-left", {}, void 0, true)
|
|
77163
|
+
]),
|
|
77164
|
+
createElementVNode("div", _hoisted_4, [
|
|
77165
|
+
renderSlot(_ctx.$slots, "header-right", {}, () => [
|
|
77166
|
+
__props.showAddButton ? (openBlock(), createBlock(_component_el_button, {
|
|
77167
|
+
key: 0,
|
|
77168
|
+
type: "primary",
|
|
77169
|
+
icon: unref(plus_default),
|
|
77170
|
+
onClick: handleAdd
|
|
77171
|
+
}, {
|
|
77172
|
+
default: withCtx(() => [
|
|
77173
|
+
createTextVNode(toDisplayString(__props.addButtonText), 1)
|
|
77174
|
+
]),
|
|
77175
|
+
_: 1
|
|
77176
|
+
}, 8, ["icon"])) : createCommentVNode("", true)
|
|
77177
|
+
], true)
|
|
77178
|
+
])
|
|
77179
|
+
])) : createCommentVNode("", true),
|
|
77180
|
+
withDirectives((openBlock(), createBlock(_component_el_table, mergeProps({
|
|
77181
|
+
ref_key: "tableRef",
|
|
77182
|
+
ref: tableRef
|
|
77183
|
+
}, tableAttrs.value, {
|
|
77184
|
+
data: __props.tableData,
|
|
77185
|
+
border: __props.border,
|
|
77186
|
+
stripe: __props.stripe,
|
|
77187
|
+
height: __props.height,
|
|
77188
|
+
"max-height": __props.maxHeight,
|
|
77189
|
+
"row-key": __props.rowKey,
|
|
77190
|
+
"default-expand-all": __props.defaultExpandAll,
|
|
77191
|
+
"highlight-current-row": __props.highlightCurrentRow,
|
|
77192
|
+
onSelectionChange: handleSelectionChange,
|
|
77193
|
+
onSortChange: handleSortChange2,
|
|
77194
|
+
onRowClick: handleRowClick
|
|
77195
|
+
}), {
|
|
77196
|
+
empty: withCtx(() => [
|
|
77197
|
+
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
77198
|
+
createVNode(_component_el_empty, { description: "暂无数据" })
|
|
77199
|
+
], true)
|
|
77200
|
+
]),
|
|
77201
|
+
default: withCtx(() => [
|
|
77202
|
+
__props.showSelection ? (openBlock(), createBlock(_component_el_table_column, {
|
|
78966
77203
|
key: 0,
|
|
78967
|
-
type: "
|
|
78968
|
-
|
|
78969
|
-
|
|
78970
|
-
|
|
78971
|
-
|
|
78972
|
-
|
|
78973
|
-
|
|
78974
|
-
|
|
78975
|
-
|
|
78976
|
-
|
|
78977
|
-
|
|
78978
|
-
|
|
78979
|
-
|
|
78980
|
-
|
|
78981
|
-
|
|
78982
|
-
|
|
78983
|
-
|
|
78984
|
-
|
|
78985
|
-
|
|
78986
|
-
|
|
78987
|
-
|
|
78988
|
-
|
|
78989
|
-
|
|
78990
|
-
|
|
78991
|
-
|
|
78992
|
-
|
|
78993
|
-
|
|
78994
|
-
|
|
78995
|
-
|
|
78996
|
-
|
|
78997
|
-
|
|
78998
|
-
|
|
78999
|
-
|
|
79000
|
-
default: withCtx(() => [
|
|
79001
|
-
__props.showSelection ? (openBlock(), createBlock(_component_el_table_column, {
|
|
79002
|
-
key: 0,
|
|
79003
|
-
type: "selection",
|
|
79004
|
-
width: "55",
|
|
79005
|
-
align: "center",
|
|
79006
|
-
"reserve-selection": !!__props.rowKey
|
|
79007
|
-
}, null, 8, ["reserve-selection"])) : createCommentVNode("", true),
|
|
79008
|
-
__props.showIndex ? (openBlock(), createBlock(_component_el_table_column, {
|
|
79009
|
-
key: 1,
|
|
79010
|
-
type: "index",
|
|
79011
|
-
label: "序号",
|
|
79012
|
-
width: "60",
|
|
79013
|
-
index: getNumIndex,
|
|
79014
|
-
align: "center"
|
|
79015
|
-
})) : createCommentVNode("", true),
|
|
79016
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
|
|
79017
|
-
return openBlock(), createBlock(_sfc_main$2, {
|
|
79018
|
-
key: column.prop || column.type || column.label,
|
|
79019
|
-
column,
|
|
79020
|
-
onLinkClick: handleLinkClick
|
|
79021
|
-
}, createSlots({ _: 2 }, [
|
|
79022
|
-
renderList(_ctx.$slots, (_3, slotName) => {
|
|
79023
|
-
return {
|
|
79024
|
-
name: slotName,
|
|
79025
|
-
fn: withCtx((slotData) => [
|
|
79026
|
-
renderSlot(_ctx.$slots, slotName, mergeProps({ ref_for: true }, slotData), void 0, true)
|
|
79027
|
-
])
|
|
79028
|
-
};
|
|
79029
|
-
})
|
|
79030
|
-
]), 1032, ["column"]);
|
|
79031
|
-
}), 128))
|
|
77204
|
+
type: "selection",
|
|
77205
|
+
width: "55",
|
|
77206
|
+
align: "center",
|
|
77207
|
+
"reserve-selection": !!__props.rowKey
|
|
77208
|
+
}, null, 8, ["reserve-selection"])) : createCommentVNode("", true),
|
|
77209
|
+
__props.showIndex ? (openBlock(), createBlock(_component_el_table_column, {
|
|
77210
|
+
key: 1,
|
|
77211
|
+
type: "index",
|
|
77212
|
+
label: "序号",
|
|
77213
|
+
width: "60",
|
|
77214
|
+
index: getNumIndex,
|
|
77215
|
+
align: "center"
|
|
77216
|
+
})) : createCommentVNode("", true),
|
|
77217
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
|
|
77218
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
|
77219
|
+
key: column.prop || column.type || column.label,
|
|
77220
|
+
column,
|
|
77221
|
+
onLinkClick: handleLinkClick
|
|
77222
|
+
}, createSlots({ _: 2 }, [
|
|
77223
|
+
renderList(_ctx.$slots, (_3, slotName) => {
|
|
77224
|
+
return {
|
|
77225
|
+
name: slotName,
|
|
77226
|
+
fn: withCtx((slotData) => [
|
|
77227
|
+
renderSlot(_ctx.$slots, slotName, mergeProps({ ref_for: true }, slotData), void 0, true)
|
|
77228
|
+
])
|
|
77229
|
+
};
|
|
77230
|
+
})
|
|
77231
|
+
]), 1032, ["column"]);
|
|
77232
|
+
}), 128))
|
|
77233
|
+
]),
|
|
77234
|
+
_: 3
|
|
77235
|
+
}, 16, ["data", "border", "stripe", "height", "max-height", "row-key", "default-expand-all", "highlight-current-row"])), [
|
|
77236
|
+
[_directive_loading, __props.loading]
|
|
79032
77237
|
]),
|
|
79033
|
-
|
|
79034
|
-
|
|
79035
|
-
|
|
79036
|
-
|
|
79037
|
-
|
|
79038
|
-
|
|
79039
|
-
|
|
79040
|
-
|
|
79041
|
-
|
|
79042
|
-
|
|
79043
|
-
|
|
79044
|
-
|
|
79045
|
-
|
|
79046
|
-
|
|
79047
|
-
onCurrentChange: handleCurrentChange
|
|
79048
|
-
}, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout"])
|
|
79049
|
-
])) : createCommentVNode("", true)
|
|
77238
|
+
__props.showPagination ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
77239
|
+
createVNode(_component_el_pagination, {
|
|
77240
|
+
"current-page": currentPageModel.value,
|
|
77241
|
+
"onUpdate:currentPage": _cache[0] || (_cache[0] = ($event) => currentPageModel.value = $event),
|
|
77242
|
+
"page-size": pageSizeModel.value,
|
|
77243
|
+
"onUpdate:pageSize": _cache[1] || (_cache[1] = ($event) => pageSizeModel.value = $event),
|
|
77244
|
+
"page-sizes": __props.pageSizes,
|
|
77245
|
+
total: __props.total,
|
|
77246
|
+
layout: __props.paginationLayout,
|
|
77247
|
+
onSizeChange: handleSizeChange,
|
|
77248
|
+
onCurrentChange: handleCurrentChange
|
|
77249
|
+
}, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout"])
|
|
77250
|
+
])) : createCommentVNode("", true)
|
|
77251
|
+
], true)
|
|
79050
77252
|
]);
|
|
79051
77253
|
};
|
|
79052
77254
|
}
|
|
79053
77255
|
};
|
|
79054
|
-
const NsTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
77256
|
+
const NsTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-629ce96f"]]);
|
|
79055
77257
|
const _hoisted_1 = { class: "page-container" };
|
|
79056
77258
|
const _hoisted_2 = {
|
|
79057
77259
|
key: 0,
|
|
@@ -79287,10 +77489,12 @@ const _sfc_main = {
|
|
|
79287
77489
|
}
|
|
79288
77490
|
);
|
|
79289
77491
|
const initSearchAndLoad = () => {
|
|
79290
|
-
|
|
79291
|
-
|
|
79292
|
-
|
|
79293
|
-
|
|
77492
|
+
nextTick(() => {
|
|
77493
|
+
if (searchRef.value && props.showSearch) {
|
|
77494
|
+
const initialFormData = searchRef.value.getFormData();
|
|
77495
|
+
emit("search", initialFormData);
|
|
77496
|
+
}
|
|
77497
|
+
});
|
|
79294
77498
|
};
|
|
79295
77499
|
__expose({
|
|
79296
77500
|
searchRef,
|
|
@@ -79525,7 +77729,7 @@ const _sfc_main = {
|
|
|
79525
77729
|
};
|
|
79526
77730
|
}
|
|
79527
77731
|
};
|
|
79528
|
-
const NsTableContainer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
77732
|
+
const NsTableContainer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3f45ef27"]]);
|
|
79529
77733
|
NsTableContainer.install = (app2) => {
|
|
79530
77734
|
app2.component("NsTableContainer", NsTableContainer);
|
|
79531
77735
|
};
|
|
@@ -79542,7 +77746,7 @@ function detectBrowser() {
|
|
|
79542
77746
|
const glob = typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof WorkerGlobalScope !== "undefined" ? self : {};
|
|
79543
77747
|
const Konva$2 = {
|
|
79544
77748
|
_global: glob,
|
|
79545
|
-
version: "10.2.
|
|
77749
|
+
version: "10.2.3",
|
|
79546
77750
|
isBrowser: detectBrowser(),
|
|
79547
77751
|
isUnminified: /param/.test((function(param) {
|
|
79548
77752
|
}).toString()),
|
|
@@ -81141,6 +79345,9 @@ const DD = {
|
|
|
81141
79345
|
nodesToFireEvents.push(node);
|
|
81142
79346
|
});
|
|
81143
79347
|
nodesToFireEvents.forEach((node) => {
|
|
79348
|
+
if (!node.getStage()) {
|
|
79349
|
+
return;
|
|
79350
|
+
}
|
|
81144
79351
|
node.fire("dragmove", {
|
|
81145
79352
|
type: "dragmove",
|
|
81146
79353
|
target: node,
|
|
@@ -81769,12 +79976,15 @@ let Node$1 = class Node2 {
|
|
|
81769
79976
|
this._filterUpToDate = true;
|
|
81770
79977
|
return filterCanvas;
|
|
81771
79978
|
}
|
|
81772
|
-
on(
|
|
79979
|
+
on(...args) {
|
|
79980
|
+
const evtStr = args[0];
|
|
79981
|
+
const selectorOrHandler = args[1];
|
|
79982
|
+
args[2];
|
|
81773
79983
|
if (this._cache) {
|
|
81774
79984
|
this._cache.delete(ALL_LISTENERS);
|
|
81775
79985
|
}
|
|
81776
|
-
if (
|
|
81777
|
-
return this._delegate.apply(this,
|
|
79986
|
+
if (args.length === 3) {
|
|
79987
|
+
return this._delegate.apply(this, args);
|
|
81778
79988
|
}
|
|
81779
79989
|
const events = evtStr.split(SPACE$1);
|
|
81780
79990
|
for (let n = 0; n < events.length; n++) {
|
|
@@ -81785,7 +79995,7 @@ let Node$1 = class Node2 {
|
|
|
81785
79995
|
if (!this.eventListeners[baseEvent]) {
|
|
81786
79996
|
this.eventListeners[baseEvent] = [];
|
|
81787
79997
|
}
|
|
81788
|
-
this.eventListeners[baseEvent].push({ name, handler });
|
|
79998
|
+
this.eventListeners[baseEvent].push({ name, handler: selectorOrHandler });
|
|
81789
79999
|
}
|
|
81790
80000
|
return this;
|
|
81791
80001
|
}
|
|
@@ -81843,12 +80053,18 @@ let Node$1 = class Node2 {
|
|
|
81843
80053
|
handler.call(targets[i3], evt);
|
|
81844
80054
|
}
|
|
81845
80055
|
});
|
|
80056
|
+
return this;
|
|
81846
80057
|
}
|
|
81847
80058
|
remove() {
|
|
81848
80059
|
if (this.isDragging()) {
|
|
81849
80060
|
this.stopDrag();
|
|
81850
80061
|
}
|
|
81851
80062
|
DD._dragElements.delete(this._id);
|
|
80063
|
+
DD._dragElements.forEach((elem, key) => {
|
|
80064
|
+
if (this.isAncestorOf(elem.node)) {
|
|
80065
|
+
DD._dragElements.delete(key);
|
|
80066
|
+
}
|
|
80067
|
+
});
|
|
81852
80068
|
this._remove();
|
|
81853
80069
|
return this;
|
|
81854
80070
|
}
|
|
@@ -82470,13 +80686,13 @@ let Node$1 = class Node2 {
|
|
|
82470
80686
|
return url;
|
|
82471
80687
|
}
|
|
82472
80688
|
toImage(config) {
|
|
82473
|
-
return new Promise((
|
|
80689
|
+
return new Promise((resolve, reject) => {
|
|
82474
80690
|
try {
|
|
82475
80691
|
const callback = config === null || config === void 0 ? void 0 : config.callback;
|
|
82476
80692
|
if (callback)
|
|
82477
80693
|
delete config.callback;
|
|
82478
80694
|
Util._urlToImage(this.toDataURL(config), function(img) {
|
|
82479
|
-
|
|
80695
|
+
resolve(img);
|
|
82480
80696
|
callback === null || callback === void 0 ? void 0 : callback(img);
|
|
82481
80697
|
});
|
|
82482
80698
|
} catch (err) {
|
|
@@ -82485,13 +80701,13 @@ let Node$1 = class Node2 {
|
|
|
82485
80701
|
});
|
|
82486
80702
|
}
|
|
82487
80703
|
toBlob(config) {
|
|
82488
|
-
return new Promise((
|
|
80704
|
+
return new Promise((resolve, reject) => {
|
|
82489
80705
|
try {
|
|
82490
80706
|
const callback = config === null || config === void 0 ? void 0 : config.callback;
|
|
82491
80707
|
if (callback)
|
|
82492
80708
|
delete config.callback;
|
|
82493
80709
|
this.toCanvas(config).toBlob((blob) => {
|
|
82494
|
-
|
|
80710
|
+
resolve(blob);
|
|
82495
80711
|
callback === null || callback === void 0 ? void 0 : callback(blob);
|
|
82496
80712
|
}, config === null || config === void 0 ? void 0 : config.mimeType, config === null || config === void 0 ? void 0 : config.quality);
|
|
82497
80713
|
} catch (err) {
|
|
@@ -82696,7 +80912,8 @@ let Node$1 = class Node2 {
|
|
|
82696
80912
|
y: pos.y - ap.y
|
|
82697
80913
|
},
|
|
82698
80914
|
dragStatus: "ready",
|
|
82699
|
-
pointerId
|
|
80915
|
+
pointerId,
|
|
80916
|
+
startEvent: evt
|
|
82700
80917
|
});
|
|
82701
80918
|
}
|
|
82702
80919
|
startDrag(evt, bubbleEvent = true) {
|
|
@@ -82708,7 +80925,7 @@ let Node$1 = class Node2 {
|
|
|
82708
80925
|
this.fire("dragstart", {
|
|
82709
80926
|
type: "dragstart",
|
|
82710
80927
|
target: this,
|
|
82711
|
-
evt: evt && evt.evt
|
|
80928
|
+
evt: elem.startEvent && elem.startEvent.evt || evt && evt.evt
|
|
82712
80929
|
}, bubbleEvent);
|
|
82713
80930
|
}
|
|
82714
80931
|
_setDragPosition(evt, elem) {
|
|
@@ -82839,7 +81056,7 @@ Node$1.protoListenerMap = /* @__PURE__ */ new Map();
|
|
|
82839
81056
|
Node$1.prototype.nodeType = "Node";
|
|
82840
81057
|
Node$1.prototype._attrsAffectingSize = [];
|
|
82841
81058
|
Node$1.prototype.eventListeners = {};
|
|
82842
|
-
Node$1.prototype.on
|
|
81059
|
+
Node$1.prototype.on(TRANSFORM_CHANGE_STR$1, function() {
|
|
82843
81060
|
if (this._batchingTransformChange) {
|
|
82844
81061
|
this._needClearTransformCache = true;
|
|
82845
81062
|
return;
|
|
@@ -82847,13 +81064,13 @@ Node$1.prototype.on.call(Node$1.prototype, TRANSFORM_CHANGE_STR$1, function() {
|
|
|
82847
81064
|
this._clearCache(TRANSFORM);
|
|
82848
81065
|
this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);
|
|
82849
81066
|
});
|
|
82850
|
-
Node$1.prototype.on
|
|
81067
|
+
Node$1.prototype.on("visibleChange.konva", function() {
|
|
82851
81068
|
this._clearSelfAndDescendantCache(VISIBLE);
|
|
82852
81069
|
});
|
|
82853
|
-
Node$1.prototype.on
|
|
81070
|
+
Node$1.prototype.on("listeningChange.konva", function() {
|
|
82854
81071
|
this._clearSelfAndDescendantCache(LISTENING);
|
|
82855
81072
|
});
|
|
82856
|
-
Node$1.prototype.on
|
|
81073
|
+
Node$1.prototype.on("opacityChange.konva", function() {
|
|
82857
81074
|
this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);
|
|
82858
81075
|
});
|
|
82859
81076
|
const addGetterSetter = Factory.addGetterSetter;
|
|
@@ -84347,11 +82564,11 @@ Shape.prototype._centroid = false;
|
|
|
84347
82564
|
Shape.prototype.nodeType = "Shape";
|
|
84348
82565
|
_registerNode(Shape);
|
|
84349
82566
|
Shape.prototype.eventListeners = {};
|
|
84350
|
-
Shape.prototype.on
|
|
84351
|
-
Shape.prototype.on
|
|
84352
|
-
Shape.prototype.on
|
|
84353
|
-
Shape.prototype.on
|
|
84354
|
-
Shape.prototype.on
|
|
82567
|
+
Shape.prototype.on("shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva", _clearHasShadowCache);
|
|
82568
|
+
Shape.prototype.on("shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva", _clearGetShadowRGBACache);
|
|
82569
|
+
Shape.prototype.on("fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva", _clearFillPatternCache);
|
|
82570
|
+
Shape.prototype.on("fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva", _clearLinearGradientCache);
|
|
82571
|
+
Shape.prototype.on("fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva", _clearRadialGradientCache);
|
|
84355
82572
|
Factory.addGetterSetter(Shape, "stroke", void 0, getStringOrGradientValidator());
|
|
84356
82573
|
Factory.addGetterSetter(Shape, "strokeWidth", 2, getNumberValidator());
|
|
84357
82574
|
Factory.addGetterSetter(Shape, "fillAfterStrokeEnabled", false);
|
|
@@ -88291,7 +86508,7 @@ class TextPath extends Shape {
|
|
|
88291
86508
|
});
|
|
88292
86509
|
width += chars[i3].width;
|
|
88293
86510
|
}
|
|
88294
|
-
const { height } = this._getTextSize(this.attrs.text);
|
|
86511
|
+
const { width: fullTextWidth, height } = this._getTextSize(this.attrs.text);
|
|
88295
86512
|
this.textWidth = width;
|
|
88296
86513
|
this.textHeight = height;
|
|
88297
86514
|
this.glyphInfo = [];
|
|
@@ -88301,6 +86518,7 @@ class TextPath extends Shape {
|
|
|
88301
86518
|
const letterSpacing = this.letterSpacing();
|
|
88302
86519
|
const align = this.align();
|
|
88303
86520
|
const kerningFunc = this.kerningFunc();
|
|
86521
|
+
const kerningAdjustment = Math.max(0, width - fullTextWidth);
|
|
88304
86522
|
const textWidth = Math.max(this.textWidth + ((this.attrs.text || "").length - 1) * letterSpacing, 0);
|
|
88305
86523
|
let offset = 0;
|
|
88306
86524
|
if (align === "center") {
|
|
@@ -88320,7 +86538,8 @@ class TextPath extends Shape {
|
|
|
88320
86538
|
const numberOfSpaces = this.text().split(" ").length - 1;
|
|
88321
86539
|
glyphWidth += (this.pathLength - textWidth) / numberOfSpaces;
|
|
88322
86540
|
}
|
|
88323
|
-
const
|
|
86541
|
+
const charEndLength = offsetToGlyph + glyphWidth;
|
|
86542
|
+
const charEndPoint = this._getPointAtLength(charEndLength > this.pathLength && charEndLength - this.pathLength <= kerningAdjustment ? this.pathLength : charEndLength);
|
|
88324
86543
|
if (!charEndPoint) {
|
|
88325
86544
|
return;
|
|
88326
86545
|
}
|
|
@@ -88530,6 +86749,7 @@ class Transformer extends Group {
|
|
|
88530
86749
|
super(config);
|
|
88531
86750
|
this._movingAnchorName = null;
|
|
88532
86751
|
this._transforming = false;
|
|
86752
|
+
this._elementsCreated = false;
|
|
88533
86753
|
this._createElements();
|
|
88534
86754
|
this._handleMouseMove = this._handleMouseMove.bind(this);
|
|
88535
86755
|
this._handleMouseUp = this._handleMouseUp.bind(this);
|
|
@@ -88745,6 +86965,7 @@ class Transformer extends Group {
|
|
|
88745
86965
|
this._createAnchor(name);
|
|
88746
86966
|
});
|
|
88747
86967
|
this._createAnchor("rotater");
|
|
86968
|
+
this._elementsCreated = true;
|
|
88748
86969
|
}
|
|
88749
86970
|
_createAnchor(name) {
|
|
88750
86971
|
const anchor = new Rect({
|
|
@@ -89322,6 +87543,13 @@ class Transformer extends Group {
|
|
|
89322
87543
|
this._removeEvents();
|
|
89323
87544
|
return this;
|
|
89324
87545
|
}
|
|
87546
|
+
add(...children) {
|
|
87547
|
+
if (this._elementsCreated) {
|
|
87548
|
+
Util.error("You cannot add external nodes to the Transformer. Use tr.nodes([node]) instead.");
|
|
87549
|
+
return this;
|
|
87550
|
+
}
|
|
87551
|
+
return super.add(...children);
|
|
87552
|
+
}
|
|
89325
87553
|
toObject() {
|
|
89326
87554
|
return Node$1.prototype.toObject.call(this);
|
|
89327
87555
|
}
|
|
@@ -91194,7 +89422,7 @@ function debounce(fn2, delay) {
|
|
|
91194
89422
|
}
|
|
91195
89423
|
async function loadAccess(url, tag = null, isModel = false) {
|
|
91196
89424
|
const type2 = url.endsWith(".js") ? "js" : "css";
|
|
91197
|
-
return new Promise((
|
|
89425
|
+
return new Promise((resolve) => {
|
|
91198
89426
|
const htmlEle = document.createElement(type2 == "js" ? "script" : "link");
|
|
91199
89427
|
htmlEle.setAttribute("data-dynamic", "true");
|
|
91200
89428
|
if (tag) {
|
|
@@ -91213,11 +89441,11 @@ async function loadAccess(url, tag = null, isModel = false) {
|
|
|
91213
89441
|
htmlEle.rel = "stylesheet";
|
|
91214
89442
|
}
|
|
91215
89443
|
htmlEle.onload = () => {
|
|
91216
|
-
|
|
89444
|
+
resolve(true);
|
|
91217
89445
|
};
|
|
91218
89446
|
htmlEle.onerror = () => {
|
|
91219
89447
|
console.error(`加载失败: ${url}`);
|
|
91220
|
-
|
|
89448
|
+
resolve(false);
|
|
91221
89449
|
};
|
|
91222
89450
|
document.head.appendChild(htmlEle);
|
|
91223
89451
|
});
|
|
@@ -93997,7 +92225,6 @@ async function getEncryptSm2(publicKey, originalArr = [], isAdd04 = false, ciphe
|
|
|
93997
92225
|
return encryptArrs;
|
|
93998
92226
|
}
|
|
93999
92227
|
const components = {
|
|
94000
|
-
NsVideo,
|
|
94001
92228
|
NsExcel: _sfc_main$c,
|
|
94002
92229
|
NsPdf,
|
|
94003
92230
|
NsWord,
|
|
@@ -94067,7 +92294,6 @@ export {
|
|
|
94067
92294
|
NsSearch,
|
|
94068
92295
|
NsTable,
|
|
94069
92296
|
NsTableContainer,
|
|
94070
|
-
NsVideo,
|
|
94071
92297
|
NsWord,
|
|
94072
92298
|
autoScaleInit,
|
|
94073
92299
|
closeAllNsDialog,
|