@ganwei-web/gw-base-components-plus 1.0.0
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/echartList/barEchart/dist/index.es.js +152 -0
- package/echartList/barEchart/dist/index.umd.js +1 -0
- package/echartList/barEchart/dist/style.css +1 -0
- package/echartList/curve/dist/index.es.js +217 -0
- package/echartList/curve/dist/index.umd.js +1 -0
- package/echartList/curve/dist/style.css +1 -0
- package/echartList/historyEchart/dist/index.es.js +292 -0
- package/echartList/historyEchart/dist/index.umd.js +10 -0
- package/echartList/historyEchart/dist/style.css +1 -0
- package/echartList/solid-bar/dist/index.es.js +290 -0
- package/echartList/solid-bar/dist/index.umd.js +1 -0
- package/echartList/solid-bar/dist/style.css +1 -0
- package/echartList/solid-circle/dist/index.es.js +332 -0
- package/echartList/solid-circle/dist/index.umd.js +6 -0
- package/echartList/solid-circle/dist/style.css +1 -0
- package/echartList/solid-pie/dist/index.es.js +336 -0
- package/echartList/solid-pie/dist/index.umd.js +6 -0
- package/echartList/solid-pie/dist/style.css +1 -0
- package/element-plus-adapter/dist/ElementPlusAdapter.cjs +902 -0
- package/element-plus-adapter/dist/ElementPlusAdapter.cjs.map +1 -0
- package/element-plus-adapter/dist/ElementPlusAdapter.css +789 -0
- package/element-plus-adapter/dist/ElementPlusAdapter.iife.js +903 -0
- package/element-plus-adapter/dist/ElementPlusAdapter.iife.js.map +1 -0
- package/element-plus-adapter/dist/ElementPlusAdapter.js +902 -0
- package/element-plus-adapter/dist/ElementPlusAdapter.js.map +1 -0
- package/equip-list-vue2/dist/index.es.js +1275 -0
- package/equip-list-vue2/dist/index.umd.js +1 -0
- package/equip-list-vue2/dist/style.css +1 -0
- package/equip-list-vue3/dist/index.es.js +1510 -0
- package/equip-list-vue3/dist/index.umd.js +1 -0
- package/equip-list-vue3/dist/style.css +1 -0
- package/equip-select-vue2/dist/index.es.js +231 -0
- package/equip-select-vue2/dist/index.umd.js +1 -0
- package/equip-select-vue2/dist/style.css +1 -0
- package/equip-select-vue3/dist/index.es.js +231 -0
- package/equip-select-vue3/dist/index.umd.js +1 -0
- package/equip-select-vue3/dist/style.css +1 -0
- package/equipProcessing/dist/index.es.js +203 -0
- package/equipProcessing/dist/index.umd.js +1 -0
- package/loadMore/dist/index.es.js +12 -0
- package/loadMore/dist/index.umd.js +1 -0
- package/loading/dist/index.es.js +25 -0
- package/loading/dist/index.umd.js +1 -0
- package/loading/dist/style.css +1 -0
- package/package.json +11 -0
- package/player/dist/index.es.js +1080 -0
- package/player/dist/index.umd.js +14 -0
- package/player/dist/style.css +1 -0
- package/selectV2/dist/index.es.js +190 -0
- package/selectV2/dist/index.umd.js +1 -0
- package/selectV2/dist/style.css +1 -0
- package/showPassword/dist/index.es.js +72 -0
- package/showPassword/dist/index.umd.js +1 -0
- package/table/dist/index.es.js +182 -0
- package/table/dist/index.umd.js +1 -0
- package/table/dist/style.css +1 -0
- package/widthSetting/dist/index.es.js +113 -0
- package/widthSetting/dist/index.umd.js +1 -0
- package/widthSetting/dist/style.css +1 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
(function(e, S){ typeof exports == "object" && typeof module < "u" ? module.exports = S(require("vue"), require("@aspnet/signalr"), require("element-plus")) : typeof define == "function" && define.amd ? define(["vue", "@aspnet/signalr", "element-plus"], S) : (e = typeof globalThis < "u" ? globalThis : e || self, e.index = S(e.Vue, e.SignalR, e.ElementPlus)) })(this, function(e, S, E){
|
|
2
|
+
"use strict";let kt = Object.defineProperty;let Ct = (e, S, E)=>S in e ? kt(e, S, {enumerable: !0, configurable: !0, writable: !0, value: E}) : e[S] = E;let p = (e, S, E)=>(Ct(e, typeof S != "symbol" ? S + "" : S, E), E);var U = (s=>(s[s.GB28181 = 10] = "GB28181", s))(U || {}), r = (s=>(s[s.StopPTZ = 0] = "StopPTZ", s[s.Up = 1] = "Up", s[s.UpRight = 2] = "UpRight", s[s.Right = 3] = "Right", s[s.RightDown = 4] = "RightDown", s[s.Down = 5] = "Down", s[s.DownLeft = 6] = "DownLeft", s[s.Left = 7] = "Left", s[s.LeftUp = 8] = "LeftUp", s[s.ZoomIn = 9] = "ZoomIn", s[s.ZoomOut = 10] = "ZoomOut", s[s.StopFI = 20] = "StopFI", s[s.FocusPlus = 21] = "FocusPlus", s[s.FocusMinus = 22] = "FocusMinus", s[s.IrisOn = 23] = "IrisOn", s[s.IrisOff = 24] = "IrisOff", s[s.SetPreset = 30] = "SetPreset", s[s.GetPreset = 31] = "GetPreset", s[s.RemovePreset = 32] = "RemovePreset", s[s.UnKnow = 100] = "UnKnow", s))(r || {});class Y{constructor(t, n = !0){ p(this, "signalR");p(this, "url", "");p(this, "connectionId", "");p(this, "autoCloseTimeout", -1);p(this, "autoTimeout", !0);p(this, "isStop", !1);p(this, "connectionResult", {connection: null, success: !1});this.autoTimeout = n, t && (this.url = t), this.signalR = new S.HubConnectionBuilder().withUrl(this.url).build(), this.signalR.serverTimeoutInMilliseconds = 5e8, this.signalR.keepAliveIntervalInMilliseconds = 5e8, this.onConnectionId() }start(){ this.connectionResult.connection = this.signalR.start(), this.connectionResult.connection.then(()=>{ this.connectionResult.success = !0 }).catch(t=>{ this.connectionResult.success = !1, console.log(t) }).finally(()=>{ this.autoTimeout && (this.autoCloseTimeout = window.setTimeout(()=>{ this.stop() }, 3e4)) }) }onConnectionId(){ this.signalR.on("ConnectionSucceeded", t=>{ this.connectionId = t.data }) }stop(){ this.isStop || (this.isStop = !0, console.log("stop", this.connectionId), this.connectionResult = {connection: null, success: !1}, this.signalR.state === 1 && this.signalR.stop()) }}class A{constructor(t, n = 2, i = 6e4, d){ p(this, "size", 2);p(this, "result", []);p(this, "failed", null);p(this, "canceled", !1);p(this, "promise");p(this, "resolve");p(this, "reject");p(this, "onMessage", ()=>{ console.log("task message") });this.id = t, this.size = n, d && (this.onMessage = d), this.promise = new Promise((y, a)=>{ const V = setTimeout(()=>{ this.reject("命令超时") }, i);this.resolve = C=>{ y(C), clearTimeout(V) }, this.reject = C=>{ a(C), clearTimeout(V) } }) }process(t){ return this.onMessage(t), !1 }cancel(){ this.canceled = !0, this.reject("--canceled--") }static isCanceled(t){ return typeof t == "string" && t === "--canceled--" }}class se{constructor(){ p(this, "suspenseTasks", []) }addSuspenseTask(t){ return this.suspenseTasks.push(t), t }processSuspenseTask(t){ t.id && (this.suspenseTasks = this.suspenseTasks.filter(n=>!n.process(t))) }dispose(){ for(const t of this.suspenseTasks){ t.cancel(); }this.suspenseTasks = [] }}class le extends A{process(t){ return!t.id || t.id != this.id ? !1 : (super.process(t), this.result.push(t), t.response ? this.result.length >= this.size ? (this.resolve({id: t.id, response: !0, responseData: null, responseMessage: ""}), !0) : !1 : (this.failed = t, this.reject(this.failed.responseMessage), !0)) }}class ie extends A{process(t){ return!t.id || t.id != this.id ? !1 : (super.process(t), this.result.push(t), t.response ? t.isCompleted ? (this.resolve(t.responseData), !0) : !1 : (this.failed = t, this.reject(this.failed.responseMessage), !0)) }}class re{constructor(t, n, i = 1e4){ p(this, "timeout", 1e4);p(this, "_id", 1);p(this, "asyncPTZSignalRController");p(this, "strategies", {[r.StopPTZ]: void 0, [r.Up]: void 0, [r.UpRight]: void 0, [r.Right]: void 0, [r.RightDown]: void 0, [r.Down]: void 0, [r.DownLeft]: void 0, [r.Left]: void 0, [r.LeftUp]: void 0, [r.ZoomIn]: void 0, [r.ZoomOut]: void 0, [r.FocusPlus]: void 0, [r.FocusMinus]: void 0, [r.IrisOn]: void 0, [r.IrisOff]: void 0, [r.SetPreset]: void 0, [r.GetPreset]: void 0, [r.RemovePreset]: void 0, [r.UnKnow]: void 0, [r.StopFI]: void 0});p(this, "suspenseTaskQueue");this.deviceId = t, this.nvrChannelId = n, this.timeout = i, this.suspenseTaskQueue = new se, this.asyncPTZSignalRController = new ce(this.suspenseTaskQueue.processSuspenseTask.bind(this.suspenseTaskQueue)), this.initStrategies() }generateId(){ return this._id++ }initStrategies(){ const t = new ae;for(const n in r){ const i = parseInt(n);isNaN(i) || i >= r.StopPTZ && i <= r.ZoomOut && (this.strategies[n] = t) } }addStrategies(t, n){ this.strategies[t] && console.warn(`PTZCommandEnum ${t} already has a strategy`), this.strategies[t] = n }doPTZControl(t, n, i){ let C;const d = this.generateId(), y = {command: t, speed: 0, ...n, id: d, deviceId: this.deviceId, nvrChannelId: this.nvrChannelId}, a = ((C = this.strategies[t]) == null ? void 0 : C.doPTZControl(t, y)) || y, V = new le(d, 2, this.timeout, i);return this.suspenseTaskQueue.addSuspenseTask(V), this.asyncPTZSignalRController.invokePTZControl(a), V.promise }doPresetQuery(){ const t = this.generateId(), n = {id: t, deviceId: this.deviceId, nvrChannelId: this.nvrChannelId}, i = new ie(t, 2, this.timeout);return this.suspenseTaskQueue.addSuspenseTask(i), this.asyncPTZSignalRController.invokeGetPresets(n), i.promise }dispose(){ this.asyncPTZSignalRController.stop(), this.suspenseTaskQueue.dispose(), this.strategies = {} }}class ae{doPTZControl(t, n){ return{...n, command: t} }}class ce extends Y{constructor(n){ super("/mediaPlatformPTZ", !1);p(this, "eventName", "ShowLog");p(this, "onShowLog", ()=>{ console.log("showLog") });n && (this.onShowLog = n), this.onShowLogMethod(), this.start() }invokePTZControl(n){ this.signalR.invoke("PTZControl", n) }invokeGetPresets(n){ let i;if(!this.connectionResult.connection){ throw new Error("connection is not ready"); }(i = this.connectionResult.connection) == null || i.then(()=>{ this.signalR.invoke("PresetQuery", n) }) }onShowLogMethod(){ this.signalR.on(this.eventName, n=>{ this.onShowLog(n, this.connectionId) }) }stop(){ this.signalR.off(this.eventName), this.onShowLog = ()=>{ console.log("showLog") }, super.stop() }}const de = {player: "glplayer0", width: 640, height: 360, token: "base64:QXV0aG9yOmNoYW5neWFubG9uZ3xudW1iZXJ3b2xmLEdpdGh1YjpodHRwczovL2dpdGh1Yi5jb20vbnVtYmVyd29sZixFbWFpbDpwb3JzY2hlZ3QyM0Bmb3htYWlsLmNvbSxRUTo1MzEzNjU4NzIsSG9tZVBhZ2U6aHR0cDovL3h2aWRlby52aWRlbyxEaXNjb3JkOm51bWJlcndvbGYjODY5NCx3ZWNoYXI6bnVtYmVyd29sZjExLEJlaWppbmcsV29ya0luOkJhaWR1", extInfo: {probeSize: 8192, ignoreAudio: 0, coreProbePart: .1, autoPlay: !0, cacheLength: 50, rawFps: 24}};class pe{constructor(t){ p(this, "config", {});p(this, "instance");p(this, "PTZControlService");p(this, "performance", -1);t && Object.assign(this.config, de, t) }eventsOn(t){ for(const n in t){ this.instance[n] = t[n]; }return this.instance.onReadyShowDone = this.onPerformance.bind(this), !0 }onPerformance(){ let t, n;this.performance = performance.now() - this.performance, (n = (t = this.instance) == null ? void 0 : t.onPerformance) == null || n.call(t, this.performance) }init(t){ this.performance = performance.now();const n = window.new265webjs ? window.new265webjs : window.top.new265webjs;this.instance = n(t, this.config) }start(){ this.instance.do() }play(){ this.instance.play() }destroy(){ let t;(t = this.PTZControlService) == null || t.dispose(), this.instance.release() }setVoice(t){ this.instance.setVoice(t) }pause(){ this.instance.pause() }fullScreen(){ this.instance.fullScreen() }snapshot(){ this.instance.snapshot() }enablePTZ(t, n, i){ if(i === U.GB28181){ this.PTZControlService = new re(t, n); }else { throw new Error("暂不支持该PTZ协议") } }ptzControl(t, n){ let i;if(this.PTZControlService){ return(i = this.PTZControlService) == null ? void 0 : i.doPTZControl(t, n); }throw new Error("PTZControlService is not initialized") }doPresetQuery(){ let t;if(this.PTZControlService){ return(t = this.PTZControlService) == null ? void 0 : t.doPresetQuery(); }throw new Error("PTZControlService is not initialized") }}var K = (s=>(s[s.H265WebPlayer = 0] = "H265WebPlayer", s))(K || {});const fe = {0: pe};function ue(s, t){ return new fe[s](t) }const he = Symbol("$message");function q(){ return e.inject(he) }const J = Symbol("PlayerContext");function me(){ return e.inject(J) }const ye = {class: "close-btn"}, _e = {class: "PTZ-operator-content"}, ge = {class: "direction ptz-left-up", title: "左上"}, ke = {class: "direction ptz-up", title: "上"}, Ce = {class: "direction ptz-right-up", title: "右上"}, we = {class: "direction ptz-left", title: "左"}, Se = {class: "direction ptz-right", title: "右"}, Ve = {class: "direction ptz-left-down", title: "左下"}, Ne = {class: "direction ptz-down", title: "下"}, Ie = {class: "direction ptz-right-down", title: "右下"}, Pe = {class: "ptz-slider"}, Be = {class: "zoom"}, be = {class: "zoomIn zoomButton", title: "变焦放大"}, Re = {class: "zoomOut zoomButton", title: "变焦缩小"}, He = {class: "preset-list"}, xe = {class: "index"}, Ee = {class: "name"}, ze = {class: "operation"}, $e = e.defineComponent({__name: "index", props: e.mergeModels({round: {type: Boolean, default: !1}, maxPresetCount: {default: 255}}, {modelValue: {type: Boolean, default: !0}, modelModifiers: {}}), emits: ["update:modelValue"], setup(s){ let P, z;const t = s, n = e.useModel(s, "modelValue"), i = e.ref(60), d = e.ref([]), y = q(), a = me();a && a.deviceId && a.ptzControl && ((P = a.player) == null || P.enablePTZ(a.deviceId, a.nvrChannelId, U.GB28181), (z = a == null ? void 0 : a.player) == null || z.doPresetQuery().then(g=>{ let l = g.rows || [];d.value = Array.from({length: t.maxPresetCount}, (w, I)=>{ const k = I + 1;let f = l.find(m=>m.presetId === k);return f ? {...f, enable: !0} : {presetId: k, presetName: "预置点" + k, enable: !1} }) }));const V = e.ref(), C = e.ref();E.useDraggable(V, C, e.computed(()=>!0));let _ = !1;function c(g, l = {}){ let w;g >= r.StopPTZ && g <= r.ZoomOut && (_ = !0), (w = a == null ? void 0 : a.player) == null || w.ptzControl(g, {speed: i.value, ...l}).then(I=>{ y.success("命令下发成功,请稍等"), g === r.SetPreset && (d.value.find(k=>k.presetId === l.speed).enable = !0), g === r.RemovePreset && (d.value.find(k=>k.presetId === l.speed).enable = !1) }).catch(I=>{ y.error(I) }) }function x(){ let g;_ && ((g = a == null ? void 0 : a.player) == null || g.ptzControl(r.StopPTZ, {speed: 0}), _ = !1) }return window.addEventListener("mouseup", x), e.onBeforeUnmount(()=>{ window.removeEventListener("mouseup", x) }), (g, l)=>{ const w = e.resolveComponent("el-col"), I = e.resolveComponent("el-slider"), k = e.resolveComponent("el-row"), f = e.resolveComponent("Location"), m = e.resolveComponent("el-icon"), b = e.resolveComponent("Setting"), j = e.resolveComponent("Delete");return n.value ? (e.openBlock(), e.createElementBlock("div", {key: 0, class: "PTZ-operator", ref_key: "container", ref: V}, [e.createElementVNode("div", {class: "PTZ-operator-header", ref_key: "drag", ref: C}, [e.createElementVNode("span", ye, [e.createElementVNode("i", {class: "iconfont icon-tubiao24_guanbi", onClick: l[0] || (l[0] = u=>n.value = !1)})])], 512), e.createElementVNode("div", _e, [e.createElementVNode("div", {class: e.normalizeClass(["PTZ-panel", {round: g.round}])}, [e.createElementVNode("div", ge, [e.createElementVNode("i", {class: "iconfont icon-_fangxiangjian", onMousedown: l[1] || (l[1] = u=>c(e.unref(r).LeftUp))}, null, 32)]), e.createElementVNode("div", ke, [e.createElementVNode("i", {class: "iconfont icon-_fangxiangjian", onMousedown: l[2] || (l[2] = u=>c(e.unref(r).Up))}, null, 32)]), e.createElementVNode("div", Ce, [e.createElementVNode("i", {class: "iconfont icon-_fangxiangjian", onMousedown: l[3] || (l[3] = u=>c(e.unref(r).UpRight))}, null, 32)]), e.createElementVNode("div", we, [e.createElementVNode("i", {class: "iconfont icon-_fangxiangjian", onMousedown: l[4] || (l[4] = u=>c(e.unref(r).Left))}, null, 32)]), l[12] || (l[12] = e.createElementVNode("div", {class: "direction ptz-auto"}, null, -1)), e.createElementVNode("div", Se, [e.createElementVNode("i", {class: "iconfont icon-_fangxiangjian", onMousedown: l[5] || (l[5] = u=>c(e.unref(r).Right))}, null, 32)]), e.createElementVNode("div", Ve, [e.createElementVNode("i", {class: "iconfont icon-_fangxiangjian", onMousedown: l[6] || (l[6] = u=>c(e.unref(r).DownLeft))}, null, 32)]), e.createElementVNode("div", Ne, [e.createElementVNode("i", {class: "iconfont icon-_fangxiangjian", onMousedown: l[7] || (l[7] = u=>c(e.unref(r).Down))}, null, 32)]), e.createElementVNode("div", Ie, [e.createElementVNode("i", {class: "iconfont icon-_fangxiangjian", onMousedown: l[8] || (l[8] = u=>c(e.unref(r).RightDown))}, null, 32)])], 2), e.createElementVNode("div", Pe, [e.createVNode(k, null, {default: e.withCtx(()=>[e.createVNode(w, {span: 6}, {default: e.withCtx(()=>l[13] || (l[13] = [e.createElementVNode("span", {class: "label"}, "速度:", -1)])), _: 1, __: [13]}), e.createVNode(w, {span: 18}, {default: e.withCtx(()=>[e.createVNode(I, {modelValue: i.value, "onUpdate:modelValue": l[9] || (l[9] = u=>i.value = u), min: 1, max: 254, "show-input": "", size: "small"}, null, 8, ["modelValue"])]), _: 1})]), _: 1})]), e.createElementVNode("div", Be, [e.createElementVNode("div", be, [e.createElementVNode("i", {class: "iconfont icon-_gongnengjian_fangda", onMousedown: l[10] || (l[10] = u=>c(e.unref(r).ZoomIn))}, null, 32)]), e.createElementVNode("div", Re, [e.createElementVNode("i", {class: "iconfont icon-_gongnengjian_suoxiao", onMousedown: l[11] || (l[11] = u=>c(e.unref(r).ZoomOut))}, null, 32)])]), e.createElementVNode("div", He, [(e.openBlock(!0), e.createElementBlock(e.Fragment, null, e.renderList(d.value, u=>(e.openBlock(), e.createElementBlock("div", {class: e.normalizeClass(["preset-item", {"is-disabled": !u.enable}]), key: u.presetId}, [e.createElementVNode("span", xe, e.toDisplayString(u.presetId), 1), e.createElementVNode("span", Ee, e.toDisplayString(u.presetName), 1), e.createElementVNode("span", ze, [u.enable ? (e.openBlock(), e.createBlock(m, {key: 0, title: "调用", onClick: $=>c(e.unref(r).GetPreset, {speed: u.presetId})}, {default: e.withCtx(()=>[e.createVNode(f)]), _: 2}, 1032, ["onClick"])) : e.createCommentVNode("", !0), e.createVNode(m, {title: "设置", onClick: $=>c(e.unref(r).SetPreset, {speed: u.presetId})}, {default: e.withCtx(()=>[e.createVNode(b)]), _: 2}, 1032, ["onClick"]), u.enable ? (e.openBlock(), e.createBlock(m, {key: 1, title: "删除", class: "danger", onClick: $=>c(e.unref(r).RemovePreset, {speed: u.presetId})}, {default: e.withCtx(()=>[e.createVNode(j)]), _: 2}, 1032, ["onClick"])) : e.createCommentVNode("", !0)])], 2))), 128))])])], 512)) : e.createCommentVNode("", !0) } }}), wt = "", M = (s, t)=>{ const n = s.__vccOpts || s;for(const[i, d]of t){ n[i] = d; }return n }, Te = M($e, [["__scopeId", "data-v-be749143"]]), Le = {class: "bottom-container"}, Me = {key: 0, class: "video-bottom"}, je = {class: "center"}, De = {key: 0}, Fe = {key: 1, class: "play-btn"}, Ue = {key: 2}, ve = {class: "right"}, Ze = {key: 1, class: "play-PTZ"}, Oe = {key: 2, class: "play-screenrecording"}, Ge = {key: 3, class: "play-screenshot"}, Qe = {key: 4, class: "volume-btn"}, We = {key: 5, class: "close-btn"}, Ye = {key: 6, class: "screen-btn"}, Ae = {class: "flow-control"}, Ke = e.defineComponent({__name: "videoControl", props: {isPlay: {type: Boolean, default: !1}, panelControl: {default: ()=>({})}}, emits: ["ptzControlHandler", "pauseHandler", "resumeHandler", "forwardHandler", "backwardHandler", "rewindHandler", "fullScreenHandler", "snapshotHandler", "closeHandler", "volumeHandler"], setup(s, {expose: t, emit: n}){ const i = e.ref(1), d = e.ref(!1), y = e.ref(!1), a = n;function V(){ d.value = !0, a("pauseHandler") }function C(){ d.value = !1, a("resumeHandler") }function _(){ i.value = Math.min(4, i.value * 2), a("forwardHandler", i.value) }function c(){ i.value = Math.max(.25, i.value / 2), a("rewindHandler", i.value) }function x(f){ a("rewindHandler", f) }const P = e.ref(0);function z(){ P.value = 1 - P.value, a("volumeHandler", P.value) }function g(f, m){ a("ptzControlHandler", f, m) }function l(){ a("fullScreenHandler") }function w(){ a("closeHandler") }function I(){ a("snapshotHandler") }function k(){ d.value = !1, y.value = !1, P.value = 0, i.value = 1 }return t({reset: k}), (f, m)=>{ let D, F, v, Z, O, G, H;const b = e.resolveComponent("el-option"), j = e.resolveComponent("el-select"), u = e.resolveComponent("SwitchButton"), $ = e.resolveComponent("el-icon");return e.openBlock(), e.createElementBlock("div", Le, [f.isPlay || d.value && ((D = f.panelControl) != null && D.panelControl) ? (e.openBlock(), e.createElementBlock("div", Me, [m[3] || (m[3] = e.createElementVNode("div", {class: "left"}, null, -1)), e.createElementVNode("div", je, [f.panelControl.playControl ? (e.openBlock(), e.createElementBlock("span", De, [e.createElementVNode("i", {title: "慢放", class: "iconfont icon-kuaitui", onClick: c})])) : e.createCommentVNode("", !0), f.panelControl.playControl ? (e.openBlock(), e.createElementBlock("span", Fe, [d.value ? (e.openBlock(), e.createElementBlock("i", {key: 1, title: "播放", class: "iconfont icon-bofangsanjiaoxing", onClick: C})) : (e.openBlock(), e.createElementBlock("i", {key: 0, title: "暂停", class: "iconfont icon-zantingtingzhi", onClick: V}))])) : e.createCommentVNode("", !0), f.panelControl.playControl ? (e.openBlock(), e.createElementBlock("span", Ue, [e.createElementVNode("i", {title: "快进", class: "iconfont icon-kuaijin", onClick: _})])) : e.createCommentVNode("", !0)]), e.createElementVNode("div", ve, [f.panelControl.playControl ? (e.openBlock(), e.createBlock(j, {key: 0, style: {width: "100px"}, title: "播放倍率", modelValue: i.value, "onUpdate:modelValue": m[0] || (m[0] = L=>i.value = L), onChange: x}, {default: e.withCtx(()=>[e.createVNode(b, {label: "0.25x", value: .25}), e.createVNode(b, {label: "0.5x", value: .5}), e.createVNode(b, {label: "1x", value: 1}), e.createVNode(b, {label: "2x", value: 2}), e.createVNode(b, {label: "4x", value: 4})]), _: 1}, 8, ["modelValue"])) : e.createCommentVNode("", !0), (F = f.panelControl) != null && F.ptzControl ? (e.openBlock(), e.createElementBlock("span", Ze, [e.createElementVNode("i", {class: "iconfont icon-_jiankongqiuji", onClick: m[1] || (m[1] = L=>y.value = !y.value), title: "云台控制"})])) : e.createCommentVNode("", !0), (v = f.panelControl) != null && v.record ? (e.openBlock(), e.createElementBlock("span", Oe, [e.createElementVNode("i", {class: "iconfont icon-_shishikuaizhao_daixuan", onClick: l, title: "录像"})])) : e.createCommentVNode("", !0), (Z = f.panelControl) != null && Z.capture ? (e.openBlock(), e.createElementBlock("span", Ge, [e.createElementVNode("i", {class: "iconfont icon-gw-icon-tab-tupian", onClick: I, title: "截图"})])) : e.createCommentVNode("", !0), (O = f.panelControl) != null && O.volume ? (e.openBlock(), e.createElementBlock("span", Qe, [P.value === 0 ? (e.openBlock(), e.createElementBlock("i", {key: 0, class: "iconfont icon-jingyin", onClick: z, title: "音量"})) : (e.openBlock(), e.createElementBlock("i", {key: 1, class: "iconfont icon-shengyin1", onClick: z, title: "音量"}))])) : e.createCommentVNode("", !0), (G = f.panelControl) != null && G.close ? (e.openBlock(), e.createElementBlock("span", We, [e.createVNode($, {onClick: w, title: "关闭"}, {default: e.withCtx(()=>[e.createVNode(u)]), _: 1})])) : e.createCommentVNode("", !0), (H = f.panelControl) != null && H.fullScreen ? (e.openBlock(), e.createElementBlock("span", Ye, [e.createElementVNode("i", {class: "iconfont icon-quanping", onClick: l, title: "全屏"})])) : e.createCommentVNode("", !0)])])) : e.createCommentVNode("", !0), e.createElementVNode("div", Ae, [e.createVNode(Te, {modelValue: y.value, "onUpdate:modelValue": m[2] || (m[2] = L=>y.value = L), round: "", onPtzControl: g}, null, 8, ["modelValue"])])]) } }}), St = "", qe = M(Ke, [["__scopeId", "data-v-fca36cac"]]), Je = {key: 0, class: "video-info"}, Xe = {class: "susscessed"}, et = e.defineComponent({__name: "videoPlayInfo", props: {playInfo: Array, isPlayInfo: Boolean}, setup(s){ const t = s;return(n, i)=>s.isPlayInfo ? (e.openBlock(), e.createElementBlock("div", Je, [(e.openBlock(!0), e.createElementBlock(e.Fragment, null, e.renderList(t.playInfo, (d, y)=>(e.openBlock(), e.createElementBlock("p", Xe, e.toDisplayString(d), 1))), 256))])) : e.createCommentVNode("", !0) }}), Vt = "", tt = M(et, [["__scopeId", "data-v-59ca949f"]]);class ot extends Y{constructor(n, i){ super("/mediaPlatformPlay");p(this, "eventName", "ShowLog");p(this, "invokePlayMethod", "Play");p(this, "onShowLog", ()=>{ console.log("showlog") });this.streamId = n, this.onConnectedSuccess(), this.onShowLogMethod(), this.onShowLog = i }inVokePlay(){ this.signalR.invoke(this.invokePlayMethod, this.streamId) }onShowLogMethod(){ this.signalR.on(this.eventName, n=>{ this.onShowLog(n, this.connectionId) }) }onConnectedSuccess(){ this.signalR.on("ConnectionSucceeded", n=>{ this.streamId && this.inVokePlay() }) }stop(){ this.signalR.off(this.eventName), this.onShowLog = ()=>{ console.log("showLog") }, super.stop() }}const nt = Symbol("MultiScreenPlayerControllerKey");function st(){ let s = e.inject(nt);return s === void 0 && (s = {addScreen(t, n){ return new ot(...n) }}), s }function lt(){ const s = e.ref([]);function t(n){ if(!n.length){ console.error("没有流信息");return }s.value = n }return{playStreamIdList: s, setPlayStreamIdList: t} }const it = {class: "context"}, rt = {key: 0, class: "title"}, at = {class: "title-text"}, ct = ["id"], dt = {class: "player-container"}, pt = ["id"], ft = ["id"], ut = 3e4, ht = e.defineComponent({__name: "index", props: {id: {default: 0}, selected: {default: 0}, panelControl: {default: ()=>({})}}, setup(s){
|
|
3
|
+
const t = e.ref(), n = s, i = q(), {proxy: d} = e.getCurrentInstance(), y = e.ref(!1), a = e.ref(!1), V = e.ref(!1), C = e.ref("播放时间较长,请重试!"), _ = e.reactive({id: "", protocol: "", playName: ""}), c = {deviceId: 0, nvrChannelId: 0, ptzControl: !1, player: null}, x = e.ref(!1);e.provide(J, c);const{playStreamIdList: P, setPlayStreamIdList: z} = lt(), g = st();let l = null;const w = e.ref([]), I = e.ref(!1);let k = 0, f = -1, m = -1;d.$bus.off("H265web" + (n == null ? void 0 : n.id)), d.$bus.on("H265web" + (n == null ? void 0 : n.id), o=>{ let h, N, R, T;if(Q(), L(), (h = t.value) == null || h.reset(), !o.length){ console.error("没有流信息");return }if(z(o), (N = o[0]) != null && N.tips){ H((R = o[0]) == null ? void 0 : R.tips);return }if((T = o[0]) != null && T.id){ _.playName = o[0].title, _.id = o[0].id, _.protocol = o[0].protocol, c.deviceId = o[0].deviceId, c.nvrChannelId = o[0].nvrChannelId, c.ptzControl = o[0].ptzControl === U.GB28181, W(), D(o[0].id); }else{ let B = o[0].url;B && b(B) } });function b(o){ console.log("播放流地址:" + o), G(), y.value = !0, performance.now(), console.log(n.id), c.player = ue(K.H265WebPlayer, {player: "glplayer" + n.id}), x.value = !0;try{ c.player.init(o), c.player.eventsOn(O()), c.player.start(), c.player.play() }catch(h){ console.log(h) } }function j(){ let o = _.id;o && $(o) }function u(o, h){ if(l){ if(l.connectionId === ""){ console.error("当前窗口未连接成功");return }if(l.connectionId !== h){ console.error("现在的ID: ", l.connectionId), console.error("接收到的ID: ", h);return }o && ((!o.result || o.playStatus == 80 || o.playStatus == 90) && l.stop(), (!o.result || o.playStatus == 90) && H("播放失败!"), k < o.duration && (k = o.duration), (o.playStatus == 60 && o.protocol == _.protocol || o.playStatus == 100) && (o.url ? b(o.url) : H("目标地址为空,播放失败!")), o.message && o.duration && (o.playStatus == 60 && o.protocol != _.protocol || w.value.push(o.message + "(" + o.duration + "ms)"))) } }function $(o){ o ? (Q(), W(), D(o)) : H("播放失败,流地址不存在!") }function D(o){ l = g.addScreen(n.id, [o, u]), l.start() }function F(o){ V.value = o }function v(){ H("") }function Z(){ m && clearTimeout(m), c.player && (console.log("关闭播放器"), c.player.destroy(), c.player = null, a.value = !1, x.value = !1) }function O(){
|
|
4
|
+
return{onPlayState: o=>{ a.value = o }, onPerformance: o=>{ y.value = !1, a.value = !0;const h = o;w.value.push("播放器加载完成时间: " + h.toFixed(4) + "ms"), w.value.push("播放总耗时: " + (k + h).toFixed(4) + "ms"), m && clearTimeout(m), f && clearTimeout(f), f = window.setTimeout(()=>{ I.value = !1, f = -1 }, 5e3) }, onLoadFinish: ()=>{
|
|
5
|
+
let N, R, T, B, ee, te, oe, ne;(N = c.player) == null || N.setVoice(0);let o = (R = c.player) == null ? void 0 : R.instance.mediaInfo(), h = "h265";((T = o == null ? void 0 : o.meta) == null ? void 0 : T.isHEVC) === !1 ? (console.log(`\r
|
|
6
|
+
onLoadFinish is Not HEVC/H.265`), h = "h264") : console.log(`\r
|
|
7
|
+
onLoadFinish is HEVC/H.265`), console.log(`\r
|
|
8
|
+
onLoadFinish media Codec:` + h), console.log(`\r
|
|
9
|
+
onLoadFinish media FPS:` + ((B = o == null ? void 0 : o.meta) == null ? void 0 : B.fps)), console.log(`\r
|
|
10
|
+
onLoadFinish media size:` + ((te = (ee = o == null ? void 0 : o.meta) == null ? void 0 : ee.size) == null ? void 0 : te.width) + "x" + ((ne = (oe = o == null ? void 0 : o.meta) == null ? void 0 : oe.size) == null ? void 0 : ne.height))
|
|
11
|
+
}}
|
|
12
|
+
}function G(){ m && clearTimeout(m), m = window.setTimeout(()=>{ a.value || H("播放超时!"), m = -1 }, ut) }function H(o){ F(!0), y.value = !1, C.value = o, Q() }function L(){ _.playName = "", _.id = "" }const X = {pauseHandler: function(){ let o, h, N;(h = (o = c.player) == null ? void 0 : o.instance) != null && h.isPlaying() && ((N = c.player) == null || N.pause()) }, resumeHandler: function(){ let o;(o = c.player) == null || o.play() }, volumeHandler: function(o){ let h;(h = c.player) == null || h.setVoice(o) }, fullScreenHandler: function(){ let o;(o = c.player) == null || o.fullScreen() }, snapshotHandler: function(){ let o;(o = c.player) == null || o.snapshot() }};function gt(o, h){ let N;(N = c.player) == null || N.ptzControl(o, h).then(R=>{ i.success("命令下发成功,请稍等") }).catch(R=>{ i.error(R) }) }function Q(){ Z(), l == null || l.stop(), l = null }function W(){ y.value = !0, k = 0, F(!1), w.value.length = 0, I.value = !0, a.value = !1 }return e.onUnmounted(()=>{ W(), Q() }), (o, h)=>{ const N = e.resolveComponent("el-option"), R = e.resolveComponent("el-select"), T = e.resolveDirective("loading");return e.openBlock(), e.createElementBlock("div", it, [n.panelControl.title ? (e.openBlock(), e.createElementBlock("div", rt, [e.createElementVNode("span", at, e.toDisplayString(_.playName), 1)])) : e.createCommentVNode("", !0), V.value && !a.value ? (e.openBlock(), e.createElementBlock("div", {key: 1, id: "replay" + o.id, class: "replayVideo"}, [e.createElementVNode("i", {class: "iconfont icon-_bofang", onClick: j}), e.createElementVNode("p", null, e.toDisplayString(C.value), 1)], 8, ct)) : e.createCommentVNode("", !0), e.withDirectives((e.openBlock(), e.createElementBlock("div", dt, [e.createElementVNode("div", {id: "glplayer" + o.id, class: e.normalizeClass(["glplayer", {transparent: a.value}])}, null, 10, pt)])), [[T, y.value]]), o.panelControl.streamList ? (e.openBlock(), e.createElementBlock("div", {key: 2, class: "stream-list", id: "stream-list" + o.id}, [e.unref(P).length > 0 ? (e.openBlock(), e.createBlock(R, {key: 0, modelValue: _.id, "onUpdate:modelValue": h[0] || (h[0] = B=>_.id = B), onChange: $, "append-to": "#stream-list" + o.id}, {prefix: e.withCtx(()=>h[1] || (h[1] = [e.createElementVNode("i", {class: "iconfont icon-gw-icon-diqiu"}, null, -1)])), default: e.withCtx(()=>[(e.openBlock(!0), e.createElementBlock(e.Fragment, null, e.renderList(e.unref(P), B=>(e.openBlock(), e.createBlock(N, {label: B.name, value: B.id, key: B.protocol}, null, 8, ["label", "value"]))), 128))]), _: 1}, 8, ["modelValue", "append-to"])) : e.createCommentVNode("", !0)], 8, ft)) : e.createCommentVNode("", !0), o.panelControl.panelControl && x.value ? (e.openBlock(), e.createBlock(qe, {key: 3, ref_key: "control", ref: t, isPlay: a.value, panelControl: o.panelControl, onFullScreenHandler: X.fullScreenHandler, onVolumeHandler: X.volumeHandler, onCloseHandler: v, onPtzControlHandler: gt}, null, 8, ["isPlay", "panelControl", "onFullScreenHandler", "onVolumeHandler"])) : e.createCommentVNode("", !0), o.panelControl.beforePlayInfo ? (e.openBlock(), e.createBlock(tt, {key: 4, playInfo: w.value, isPlayInfo: I.value}, null, 8, ["playInfo", "isPlayInfo"])) : e.createCommentVNode("", !0)]) }
|
|
13
|
+
}}), Nt = "", It = "", Pt = "", mt = M(ht, [["__scopeId", "data-v-c9e3aa55"]]), yt = {class: "container"}, _t = e.defineComponent({__name: "h265webContainer", props: {streamId: {}, url: {}, panelControl: {}}, setup(s){ const{proxy: t} = e.getCurrentInstance(), n = s;e.onMounted(()=>{ i() });function i(){ let d = [{id: -1, url: "", name: "mp4", value: "", title: ""}];n != null && n.streamId ? d[0].id = n.streamId : d[0].url = n == null ? void 0 : n.url, t.$bus.emit("H265web100", d) }return e.watch(()=>n == null ? void 0 : n.streamId, d=>{ d && i() }), e.watch(()=>n == null ? void 0 : n.url, d=>{ d && i() }), (d, y)=>(e.openBlock(), e.createElementBlock("div", yt, [e.createVNode(mt, {panelControl: n == null ? void 0 : n.panelControl, id: 100, selected: 100}, null, 8, ["panelControl"])])) }}), Bt = "";return M(_t, [["__scopeId", "data-v-44205cca"]])
|
|
14
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.PTZ-operator[data-v-be749143]{--button-size: 40px;--size: calc((var(--button-size) + 4px) * 3);--offset: calc(var(--button-size) * 1.5 - var(--size) / (2 * 1.414) );--n-offset: calc(-1 * var(--offset));width:300px;min-height:220px;display:flex;flex-direction:column;align-items:center;position:absolute;bottom:10%;background:var(--frame-main-background-2);border-radius:6px}.PTZ-operator-header[data-v-be749143]{height:40px;width:100%}.PTZ-operator-header .close-btn[data-v-be749143]{position:absolute;top:15px;right:15px}.PTZ-operator-content[data-v-be749143]{display:flex;flex-direction:column;align-items:center;width:100%;padding:0 20px}.PTZ-panel[data-v-be749143]{width:var(--size);height:var(--size);margin-bottom:20px;background:var(--frame-main-background);overflow:hidden}.PTZ-panel .direction[data-v-be749143]{width:var(--button-size);height:var(--button-size);margin:0 4px 4px 0;float:left;display:flex;align-items:center;justify-content:center}.PTZ-panel .direction[data-v-be749143]:active{color:var(--gw-color-primary)}.PTZ-panel .direction i[data-v-be749143]{font-size:calc(var(--button-size) / 2)}.PTZ-panel .direction[data-v-be749143]:not(.round){background:var(--frame-main-background)}.PTZ-panel .ptz-left-up i[data-v-be749143]{transform:rotate(-45deg)}.PTZ-panel .ptz-right-up i[data-v-be749143]{transform:rotate(45deg)}.PTZ-panel .ptz-left i[data-v-be749143]{transform:rotate(-90deg)}.PTZ-panel .ptz-right i[data-v-be749143]{transform:rotate(90deg)}.PTZ-panel .ptz-left-down i[data-v-be749143]{transform:rotate(-135deg)}.PTZ-panel .ptz-down i[data-v-be749143]{transform:rotate(180deg)}.PTZ-panel .ptz-right-down i[data-v-be749143]{transform:rotate(135deg)}.PTZ-panel.round[data-v-be749143]{border-radius:50%;border:10px solid var(--frame-main-background-3);box-sizing:content-box}.PTZ-panel.round i[data-v-be749143]{transform:none}.PTZ-panel.round .ptz-left-up[data-v-be749143]{transform:translate(var(--offset),var(--offset)) rotate(-45deg)}.PTZ-panel.round .ptz-right-up[data-v-be749143]{transform:translate(var(--n-offset),var(--offset)) rotate(45deg)}.PTZ-panel.round .ptz-left[data-v-be749143]{transform:rotate(-90deg)}.PTZ-panel.round .ptz-right[data-v-be749143]{transform:rotate(90deg)}.PTZ-panel.round .ptz-left-down[data-v-be749143]{transform:translate(var(--offset),var(--n-offset)) rotate(-135deg)}.PTZ-panel.round .ptz-down[data-v-be749143]{transform:rotate(180deg)}.PTZ-panel.round .ptz-right-down[data-v-be749143]{transform:translate(var(--n-offset),var(--n-offset)) rotate(135deg)}.ptz-slider[data-v-be749143]{padding-left:20px;width:100%;margin-bottom:20px}.ptz-slider .label[data-v-be749143]{font-size:12px}.ptz-slider[data-v-be749143] .el-slider .el-slider__runway.show-input{margin-right:20px}.ptz-slider[data-v-be749143] .el-slider .el-slider__input{width:40px}.ptz-slider[data-v-be749143] .el-slider .el-input-number .el-input-number__decrease,.ptz-slider[data-v-be749143] .el-slider .el-input-number .el-input-number__increase{display:none}.zoom[data-v-be749143]{margin-bottom:20px}.zoom .zoomButton[data-v-be749143]{display:inline-block;width:calc(var(--button-size) + 4px);height:var(--button-size);line-height:var(--button-size);text-align:center;border:1px solid var(--frame-main-border)}.zoom .zoomButton[data-v-be749143]:active{color:var(--gw-color-primary)}.zoom .zoomIn[data-v-be749143]{border-right:1px dashed var(--frame-main-border);border-radius:50% 0 0 50%}.zoom .zoomOut[data-v-be749143]{border-left:none;border-radius:0 50% 50% 0}.preset-list[data-v-be749143]{max-height:250px;overflow-y:auto;width:100%}.preset-list .preset-item[data-v-be749143]{font-size:14px;line-height:40px;height:38px;margin-bottom:8px;padding:0;display:flex;justify-content:space-between;align-items:center;border-radius:3px;background-color:var(--tree-node-background);border:1px solid var(--tree-node-border);color:var(--tree-node-color)}.preset-list .preset-item .index[data-v-be749143]{flex-shrink:0;width:36px;height:36px;text-align:center;background-color:var(--tree-list-index-background)}.preset-list .preset-item .name[data-v-be749143]{width:calc(100% - 38px);height:38px;flex:1;display:flex;justify-content:space-between;align-items:center;padding:0 10px;font-size:12px}.preset-list .preset-item .operation[data-v-be749143]{display:none;gap:5px;padding-right:10px;color:var(--gw-color-primary)}.preset-list .preset-item.is-disabled[data-v-be749143]{color:var(--frame-main-color-1)}.preset-list .preset-item:hover .operation[data-v-be749143]{display:flex}.preset-list .preset-item:hover .operation .danger[data-v-be749143]{color:var(--gw-color-danger)}.hide[data-v-fca36cac]{display:none!important}.bottom-container[data-v-fca36cac]{position:absolute;bottom:0;left:0;width:100%;height:100%}.video-bottom[data-v-fca36cac]{position:absolute;bottom:0;display:flex;align-items:center;justify-content:space-between;width:100%;height:44px;padding:0 20px;background:rgba(0,0,0,.3)}.video-bottom .left[data-v-fca36cac],.video-bottom .right[data-v-fca36cac],.video-bottom .center[data-v-fca36cac]{display:flex;align-items:center;gap:20px;flex:1}.video-bottom .center[data-v-fca36cac]{justify-content:center}.video-bottom .right[data-v-fca36cac]{justify-content:flex-end}.video-bottom span[data-v-fca36cac]{display:inline-block;opacity:.7}.video-bottom span i[data-v-fca36cac]{font-size:20px;display:inline-block;transition:all .3s ease-in-out;cursor:pointer}.video-bottom span i[data-v-fca36cac]:hover{opacity:1;transform:scale(1.2)}.video-bottom span.backward[data-v-fca36cac]{transform:rotate(180deg) scale(.8)}.flow-control[data-v-fca36cac]{height:calc(100% - 124px);width:100%;position:absolute;top:80px}.video-info[data-v-59ca949f]{position:absolute;left:10px;bottom:55px;z-index:2001}.video-info p[data-v-59ca949f]{opacity:.2;font-size:12px;padding:5px 0}.video-info .susscessed[data-v-59ca949f]{opacity:.5}i[data-v-c9e3aa55]:hover{transition:all .3s ease-in-out;opacity:1;transform:scale(1.2)}.context[data-v-c9e3aa55]{width:100%;height:100%;position:relative;overflow:hidden}.context .title[data-v-c9e3aa55]{position:absolute;right:10px;top:10px;z-index:2001}.context .player__button[data-v-c9e3aa55]{width:100%;display:flex;justify-content:space-between;position:absolute;bottom:0}.header-line[data-v-c9e3aa55]{height:30px}ul[data-v-c9e3aa55]{margin:0;padding:0}ul li[data-v-c9e3aa55]{list-style-type:none;padding:5px 0}ul li a[data-v-c9e3aa55]{text-decoration:none}.player-container[data-v-c9e3aa55]{width:100%;height:100%;position:relative}.player-container .glplayer[data-v-c9e3aa55]{width:100%!important;height:100%!important}.player-container .glplayer.transparent[data-v-c9e3aa55]{background-color:transparent!important}.replayVideo[data-v-c9e3aa55]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;position:absolute;z-index:2008}.replayVideo p[data-v-c9e3aa55]{text-align:center;color:orange;opacity:.6;margin-top:10px}.replayVideo i[data-v-c9e3aa55]{font-size:40px;background:rgba(255,255,255,.1);border-radius:50%;display:flex;width:60px;height:60px;align-items:center;justify-content:center}.player__button[data-v-c9e3aa55]{border:1px solid black;width:80px;border-radius:5px;text-align:center;margin:10px 0;cursor:pointer}.timeline__container[data-v-c9e3aa55]{margin:5px 0}.timeline__container span[data-v-c9e3aa55]:nth-child(2){margin-left:10px}.stream-list[data-v-c9e3aa55]{min-width:120px;position:absolute;right:10px;top:35px;display:flex;align-items:center;color:#fff;place-content:stretch;z-index:2009;opacity:0}.stream-list i[data-v-c9e3aa55]{font-size:24px;opacity:.6}.stream-list[data-v-c9e3aa55]:hover{opacity:1}.right-context-container .el-loading-mask{visibility:visible}video::-webkit-media-controls-panel{display:none}video::-webkit-media-controls-mute-button{display:none}video::-webkit-media-controls-timeline{display:none}video::-webkit-media-controls-time-remaining-display{display:none}video::-webkit-media-controls-volume-slider{display:none}.stream-list .el-select-dropdown__wrap .el-select-dropdown__list li{padding:0;span{padding-left: 10px;}}.player-container .glplayer video{width:100%!important;height:100%!important;object-fit:fill}.player-container .glplayer canvas{width:100%;height:100%;margin:0;display:none}.container[data-v-44205cca]{height:500px}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { createBlock as b, createCommentVNode as A, createElementBlock as p, createElementVNode as u, createVNode as f, mergeProps as T, openBlock as c, renderSlot as m, resolveComponent as d, resolveDirective as v, toDisplayString as L, toHandlers as k, withCtx as n, withDirectives as y } from "vue";
|
|
2
|
+
import _ from "vue-virtual-scroll-list";
|
|
3
|
+
|
|
4
|
+
import "./style.css";
|
|
5
|
+
const g = (t, l) => {
|
|
6
|
+
const e = t.__vccOpts || t;
|
|
7
|
+
for (const [i, a] of l) { e[i] = a; }
|
|
8
|
+
return e;
|
|
9
|
+
}, V = {
|
|
10
|
+
name: "item-component",
|
|
11
|
+
props: {
|
|
12
|
+
// index: {
|
|
13
|
+
// type: Number
|
|
14
|
+
// }, // 每一行的索引
|
|
15
|
+
source: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default() {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
// 每一行的内容
|
|
22
|
+
label: {
|
|
23
|
+
type: String
|
|
24
|
+
},
|
|
25
|
+
// 需要显示的名称
|
|
26
|
+
value: {
|
|
27
|
+
type: String
|
|
28
|
+
}
|
|
29
|
+
// 绑定的值
|
|
30
|
+
}
|
|
31
|
+
}, S = {
|
|
32
|
+
key: 0,
|
|
33
|
+
class: "el-option-loading"
|
|
34
|
+
}, w = {
|
|
35
|
+
"element-loading-spinner": "el-icon-loading",
|
|
36
|
+
"element-loading-background": "rgba(0, 0, 0, 0.8)"
|
|
37
|
+
};
|
|
38
|
+
function C(t, l, e, i, a, o) {
|
|
39
|
+
const r = d("el-option"), s = v("loading");
|
|
40
|
+
return c(), b(r, {
|
|
41
|
+
key: e.label + e.value,
|
|
42
|
+
label: e.source[e.label],
|
|
43
|
+
value: e.source[e.value]
|
|
44
|
+
}, {
|
|
45
|
+
default: n(() => [
|
|
46
|
+
e.source.loading ? (c(), p("div", S, [
|
|
47
|
+
y(u("i", w, null, 512), [
|
|
48
|
+
[s, e.source.loading]
|
|
49
|
+
])
|
|
50
|
+
])) : A("", !0),
|
|
51
|
+
u("span", null, L(e.source[e.label]), 1)
|
|
52
|
+
]),
|
|
53
|
+
_: 1
|
|
54
|
+
}, 8, ["label", "value"]);
|
|
55
|
+
}
|
|
56
|
+
const x = /* @__PURE__ */ g(V, [["render", C]]);
|
|
57
|
+
function h(t, l) {
|
|
58
|
+
let e;
|
|
59
|
+
return function() {
|
|
60
|
+
let i = this, a = arguments;
|
|
61
|
+
e && clearTimeout(e), e = setTimeout(() => {
|
|
62
|
+
e = null, t.call(i, a);
|
|
63
|
+
}, l);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
const B = {
|
|
67
|
+
components: {
|
|
68
|
+
"virtual-list": _
|
|
69
|
+
},
|
|
70
|
+
model: {
|
|
71
|
+
prop: "defaultValue",
|
|
72
|
+
event: "change"
|
|
73
|
+
},
|
|
74
|
+
props: {
|
|
75
|
+
popperAppendToBody: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: !1
|
|
78
|
+
},
|
|
79
|
+
defaultValue: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: ""
|
|
82
|
+
},
|
|
83
|
+
// 绑定的默认值
|
|
84
|
+
dataLabel: {
|
|
85
|
+
// 标签label
|
|
86
|
+
type: String,
|
|
87
|
+
default: "label"
|
|
88
|
+
},
|
|
89
|
+
dataValue: {
|
|
90
|
+
// 值value
|
|
91
|
+
type: String,
|
|
92
|
+
default: "value"
|
|
93
|
+
},
|
|
94
|
+
data: {
|
|
95
|
+
// 数据列表
|
|
96
|
+
type: Array,
|
|
97
|
+
default: () => []
|
|
98
|
+
},
|
|
99
|
+
clearable: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: !0
|
|
102
|
+
},
|
|
103
|
+
size: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: "small"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
mounted() {
|
|
109
|
+
this.init();
|
|
110
|
+
},
|
|
111
|
+
watch: {
|
|
112
|
+
data() {
|
|
113
|
+
this.init(), this.$forceUpdate();
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
data() {
|
|
117
|
+
return {
|
|
118
|
+
itemComponent: x,
|
|
119
|
+
selectArr: [],
|
|
120
|
+
keyword: "",
|
|
121
|
+
clearLoadingTime: null,
|
|
122
|
+
loadAll: !1
|
|
123
|
+
};
|
|
124
|
+
},
|
|
125
|
+
methods: {
|
|
126
|
+
init() {
|
|
127
|
+
this.selectArr = this.selectArr.filter((t) => !t.loading), this.selectArr = this.data, this.clearLoadingTime || (clearInterval(this.clearLoadingTime), this.clearLoadingTime = null), this.loadAll = !1;
|
|
128
|
+
},
|
|
129
|
+
// 搜索
|
|
130
|
+
filterMethod: h(function(l) {
|
|
131
|
+
this.keyword = l[0], this.$emit("remoteSearch", this.keyword);
|
|
132
|
+
}, 200),
|
|
133
|
+
visibleChange(t) {
|
|
134
|
+
this.$refs.virtualList.reset(), this.keyword = "", t && (this.addLoading(), this.$emit("remoteSearch", ""));
|
|
135
|
+
},
|
|
136
|
+
addLoading() {
|
|
137
|
+
this.loadAll || (this.selectArr = this.selectArr.filter((t) => !t.loading), this.selectArr.push({
|
|
138
|
+
loading: !0,
|
|
139
|
+
[this.dataLabel]: "",
|
|
140
|
+
[this.dataValue]: (/* @__PURE__ */ new Date()).getTime()
|
|
141
|
+
}), this.clearLoadingTime || (this.clearLoadingTime = setTimeout(() => {
|
|
142
|
+
this.selectArr = this.selectArr.filter((t) => !t.loading), clearInterval(this.clearLoadingTime), this.clearLoadingTime = null, this.loadAll = !0;
|
|
143
|
+
}, 2e3)));
|
|
144
|
+
},
|
|
145
|
+
loadmore: h(function() {
|
|
146
|
+
this.addLoading(), this.$emit("loadmore", this.keyword);
|
|
147
|
+
}, 100)
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
function z(t, l, e, i, a, o) {
|
|
151
|
+
const r = d("virtual-list"), s = d("el-select");
|
|
152
|
+
return c(), p("div", null, [
|
|
153
|
+
f(s, T({
|
|
154
|
+
size: e.size,
|
|
155
|
+
clearable: e.clearable,
|
|
156
|
+
value: e.defaultValue,
|
|
157
|
+
"popper-class": "virtualselect",
|
|
158
|
+
filterable: "",
|
|
159
|
+
"filter-method": o.filterMethod,
|
|
160
|
+
onVisibleChange: o.visibleChange
|
|
161
|
+
}, t.$attrs, k(t.$listeners), { "popper-append-to-body": e.popperAppendToBody }), {
|
|
162
|
+
prefix: n(() => [
|
|
163
|
+
m(t.$slots, "prefix", {}, void 0, !0)
|
|
164
|
+
]),
|
|
165
|
+
suffix: n(() => [
|
|
166
|
+
m(t.$slots, "suffix", {}, void 0, !0)
|
|
167
|
+
]),
|
|
168
|
+
default: n(() => [
|
|
169
|
+
f(r, {
|
|
170
|
+
ref: "virtualList",
|
|
171
|
+
onTobottom: o.loadmore,
|
|
172
|
+
class: "virtualselect-list",
|
|
173
|
+
"data-key": e.dataValue,
|
|
174
|
+
"data-sources": a.selectArr,
|
|
175
|
+
"data-component": a.itemComponent,
|
|
176
|
+
keeps: 20,
|
|
177
|
+
"extra-props": {
|
|
178
|
+
label: e.dataLabel,
|
|
179
|
+
value: e.dataValue
|
|
180
|
+
}
|
|
181
|
+
}, null, 8, ["onTobottom", "data-key", "data-sources", "data-component", "extra-props"])
|
|
182
|
+
]),
|
|
183
|
+
_: 3
|
|
184
|
+
}, 16, ["size", "clearable", "value", "filter-method", "onVisibleChange", "popper-append-to-body"])
|
|
185
|
+
]);
|
|
186
|
+
}
|
|
187
|
+
const E = /* @__PURE__ */ g(B, [["render", z], ["__scopeId", "data-v-53f2b209"]]);
|
|
188
|
+
export {
|
|
189
|
+
E as default
|
|
190
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(i, e){ typeof exports == "object" && typeof module < "u" ? module.exports = e(require("vue-virtual-scroll-list"), require("vue")) : typeof define == "function" && define.amd ? define(["vue-virtual-scroll-list", "vue"], e) : (i = typeof globalThis < "u" ? globalThis : i || self, i.index = e(i.virtualList, i.Vue)) })(this, function(i, e){ "use strict";const c = (l, a)=>{ const t = l.__vccOpts || l;for(const[n, o]of a){ t[n] = o; }return t }, f = {name: "item-component", props: {source: {type: Object, default(){ return{} }}, label: {type: String}, value: {type: String}}}, h = {key: 0, class: "el-option-loading"}, m = {"element-loading-spinner": "el-icon-loading", "element-loading-background": "rgba(0, 0, 0, 0.8)"};function p(l, a, t, n, o, r){ const s = e.resolveComponent("el-option"), d = e.resolveDirective("loading");return e.openBlock(), e.createBlock(s, {key: t.label + t.value, label: t.source[t.label], value: t.source[t.value]}, {default: e.withCtx(()=>[t.source.loading ? (e.openBlock(), e.createElementBlock("div", h, [e.withDirectives(e.createElementVNode("i", m, null, 512), [[d, t.source.loading]])])) : e.createCommentVNode("", !0), e.createElementVNode("span", null, e.toDisplayString(t.source[t.label]), 1)]), _: 1}, 8, ["label", "value"]) }const g = c(f, [["render", p]]), b = "";function u(l, a){ let t;return function(){ let n = this, o = arguments;t && clearTimeout(t), t = setTimeout(()=>{ t = null, l.call(n, o) }, a) } }const _ = {components: {"virtual-list": i}, model: {prop: "defaultValue", event: "change"}, props: {popperAppendToBody: {type: Boolean, default: !1}, defaultValue: {type: String, default: ""}, dataLabel: {type: String, default: "label"}, dataValue: {type: String, default: "value"}, data: {type: Array, default: ()=>[]}, clearable: {type: Boolean, default: !0}, size: {type: String, default: "small"}}, mounted(){ this.init() }, watch: {data(){ this.init(), this.$forceUpdate() }}, data(){ return{itemComponent: g, selectArr: [], keyword: "", clearLoadingTime: null, loadAll: !1} }, methods: {init(){ this.selectArr = this.selectArr.filter(l=>!l.loading), this.selectArr = this.data, this.clearLoadingTime || (clearInterval(this.clearLoadingTime), this.clearLoadingTime = null), this.loadAll = !1 }, filterMethod: u(function(a){ this.keyword = a[0], this.$emit("remoteSearch", this.keyword) }, 200), visibleChange(l){ this.$refs.virtualList.reset(), this.keyword = "", l && (this.addLoading(), this.$emit("remoteSearch", "")) }, addLoading(){ this.loadAll || (this.selectArr = this.selectArr.filter(l=>!l.loading), this.selectArr.push({loading: !0, [this.dataLabel]: "", [this.dataValue]: new Date().getTime()}), this.clearLoadingTime || (this.clearLoadingTime = setTimeout(()=>{ this.selectArr = this.selectArr.filter(l=>!l.loading), clearInterval(this.clearLoadingTime), this.clearLoadingTime = null, this.loadAll = !0 }, 2e3))) }, loadmore: u(function(){ this.addLoading(), this.$emit("loadmore", this.keyword) }, 100)}};function y(l, a, t, n, o, r){ const s = e.resolveComponent("virtual-list"), d = e.resolveComponent("el-select");return e.openBlock(), e.createElementBlock("div", null, [e.createVNode(d, e.mergeProps({size: t.size, clearable: t.clearable, value: t.defaultValue, "popper-class": "virtualselect", filterable: "", "filter-method": r.filterMethod, onVisibleChange: r.visibleChange}, l.$attrs, e.toHandlers(l.$listeners), {"popper-append-to-body": t.popperAppendToBody}), {prefix: e.withCtx(()=>[e.renderSlot(l.$slots, "prefix", {}, void 0, !0)]), suffix: e.withCtx(()=>[e.renderSlot(l.$slots, "suffix", {}, void 0, !0)]), default: e.withCtx(()=>[e.createVNode(s, {ref: "virtualList", onTobottom: r.loadmore, class: "virtualselect-list", "data-key": t.dataValue, "data-sources": o.selectArr, "data-component": o.itemComponent, keeps: 20, "extra-props": {label: t.dataLabel, value: t.dataValue}}, null, 8, ["onTobottom", "data-key", "data-sources", "data-component", "extra-props"])]), _: 3}, 16, ["size", "clearable", "value", "filter-method", "onVisibleChange", "popper-append-to-body"])]) }return c(_, [["render", y], ["__scopeId", "data-v-53f2b209"]]) });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[data-v-53f2b209] .el-select{position:relative}[data-v-53f2b209] .el-select .el-select-dropdown .el-option-loading{height:18px;display:flex;justify-content:center;align-items:center}[data-v-53f2b209] .el-select .el-select-dropdown .el-option-loading .el-icon-loading{font-size:18px}[data-v-53f2b209] .el-select .el-select-dropdown .el-select-dropdown__item{height:auto!important;white-space:normal!important;text-overflow:unset!important;overflow:visible!important;line-height:20px;margin-bottom:10px;padding:5px 20px}.virtualselect-list[data-v-53f2b209]{max-height:245px;overflow-y:auto}.virtualselect .el-scrollbar .el-scrollbar__bar.is-vertical[data-v-53f2b209]{width:0}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { createCommentVNode as i, createElementBlock as c, createElementVNode as r, openBlock as w } from "vue";
|
|
2
|
+
const u = (d, s) => {
|
|
3
|
+
const t = d.__vccOpts || d;
|
|
4
|
+
for (const [l, n] of s) { t[l] = n; }
|
|
5
|
+
return t;
|
|
6
|
+
}, a = {
|
|
7
|
+
props: {
|
|
8
|
+
userPwd: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: ""
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
data() {
|
|
14
|
+
return {
|
|
15
|
+
showPassword: !1
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
methods: {
|
|
19
|
+
// 显示密码
|
|
20
|
+
showPasswordFunction() {
|
|
21
|
+
this.$parent.ref.type = "text", this.showPassword = !0;
|
|
22
|
+
},
|
|
23
|
+
// 隐藏密码
|
|
24
|
+
hidePasswordFunction() {
|
|
25
|
+
this.$parent.ref.type = "password", this.showPassword = !1;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}, p = {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "el-icon el-input__icon el-input__password"
|
|
31
|
+
}, h = {
|
|
32
|
+
key: 1,
|
|
33
|
+
class: "el-icon el-input__icon el-input__password"
|
|
34
|
+
};
|
|
35
|
+
function P(d, s, t, l, n, o) {
|
|
36
|
+
return w(), c("span", {
|
|
37
|
+
onMousedown: s[0] || (s[0] = (...e) => o.showPasswordFunction && o.showPasswordFunction(...e)),
|
|
38
|
+
onMouseup: s[1] || (s[1] = (...e) => o.hidePasswordFunction && o.hidePasswordFunction(...e)),
|
|
39
|
+
onMouseleave: s[2] || (s[2] = (...e) => o.hidePasswordFunction && o.hidePasswordFunction(...e))
|
|
40
|
+
}, [
|
|
41
|
+
n.showPassword && t.userPwd ? (w(), c("i", p, s[3] || (s[3] = [
|
|
42
|
+
r("svg", {
|
|
43
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
44
|
+
viewBox: "0 0 1024 1024"
|
|
45
|
+
}, [
|
|
46
|
+
r("path", {
|
|
47
|
+
fill: "currentColor",
|
|
48
|
+
d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
|
|
49
|
+
})
|
|
50
|
+
], -1)
|
|
51
|
+
]))) : i("", !0),
|
|
52
|
+
!n.showPassword && t.userPwd ? (w(), c("i", h, s[4] || (s[4] = [
|
|
53
|
+
r("svg", {
|
|
54
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
55
|
+
viewBox: "0 0 1024 1024"
|
|
56
|
+
}, [
|
|
57
|
+
r("path", {
|
|
58
|
+
fill: "currentColor",
|
|
59
|
+
d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"
|
|
60
|
+
}),
|
|
61
|
+
r("path", {
|
|
62
|
+
fill: "currentColor",
|
|
63
|
+
d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"
|
|
64
|
+
})
|
|
65
|
+
], -1)
|
|
66
|
+
]))) : i("", !0)
|
|
67
|
+
], 32);
|
|
68
|
+
}
|
|
69
|
+
const m = /* @__PURE__ */ u(a, [["render", P]]);
|
|
70
|
+
export {
|
|
71
|
+
m as default
|
|
72
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e, s){ typeof exports == "object" && typeof module < "u" ? module.exports = s(require("vue")) : typeof define == "function" && define.amd ? define(["vue"], s) : (e = typeof globalThis < "u" ? globalThis : e || self, e.index = s(e.Vue)) })(this, function(e){ "use strict";const s = (c, t)=>{ const n = c.__vccOpts || c;for(const[i, d]of t){ n[i] = d; }return n }, l = {props: {userPwd: {type: String, default: ""}}, data(){ return{showPassword: !1} }, methods: {showPasswordFunction(){ this.$parent.ref.type = "text", this.showPassword = !0 }, hidePasswordFunction(){ this.$parent.ref.type = "password", this.showPassword = !1 }}}, w = {key: 0, class: "el-icon el-input__icon el-input__password"}, a = {key: 1, class: "el-icon el-input__icon el-input__password"};function u(c, t, n, i, d, o){ return e.openBlock(), e.createElementBlock("span", {onMousedown: t[0] || (t[0] = (...r)=>o.showPasswordFunction && o.showPasswordFunction(...r)), onMouseup: t[1] || (t[1] = (...r)=>o.hidePasswordFunction && o.hidePasswordFunction(...r)), onMouseleave: t[2] || (t[2] = (...r)=>o.hidePasswordFunction && o.hidePasswordFunction(...r))}, [d.showPassword && n.userPwd ? (e.openBlock(), e.createElementBlock("i", w, t[3] || (t[3] = [e.createElementVNode("svg", {xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024"}, [e.createElementVNode("path", {fill: "currentColor", d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})], -1)]))) : e.createCommentVNode("", !0), !d.showPassword && n.userPwd ? (e.openBlock(), e.createElementBlock("i", a, t[4] || (t[4] = [e.createElementVNode("svg", {xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024"}, [e.createElementVNode("path", {fill: "currentColor", d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}), e.createElementVNode("path", {fill: "currentColor", d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})], -1)]))) : e.createCommentVNode("", !0)], 32) }return s(l, [["render", u]]) });
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { createBlock as m, createCommentVNode as u, createElementBlock as r, createElementVNode as p, createTextVNode as c, createVNode as h, Fragment as g, normalizeClass as N, openBlock as o, renderList as $, renderSlot as n, resolveComponent as d, toDisplayString as v, withCtx as a, withKeys as S } from "vue";
|
|
2
|
+
|
|
3
|
+
import "./style.css";
|
|
4
|
+
const L = {
|
|
5
|
+
props: {
|
|
6
|
+
showHeader: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: !1
|
|
9
|
+
//是否需要展示顶部
|
|
10
|
+
},
|
|
11
|
+
headerOperate: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
// 是否展示顶部操作按钮
|
|
14
|
+
default: !0
|
|
15
|
+
},
|
|
16
|
+
inputPlaceHolder: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: !0
|
|
19
|
+
//input框placeHolder
|
|
20
|
+
},
|
|
21
|
+
list: {
|
|
22
|
+
type: Array,
|
|
23
|
+
required: !0
|
|
24
|
+
//需要展示的数组
|
|
25
|
+
},
|
|
26
|
+
setttingList: {
|
|
27
|
+
type: Array,
|
|
28
|
+
required: !0
|
|
29
|
+
//每一列中设置,包括列名、对应的属性名、宽度、最小宽度、是否hover显示全 example:[{label:'名字',property:'name',width:100,minWidth:100,showOverflowTooltip:true}]
|
|
30
|
+
},
|
|
31
|
+
multiple: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
// 是否多选
|
|
34
|
+
default: !0
|
|
35
|
+
},
|
|
36
|
+
noDataIconfont: {
|
|
37
|
+
// 当没有数据时展示的图标
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
data() {
|
|
43
|
+
return {
|
|
44
|
+
searchNameStr: "",
|
|
45
|
+
deleteList: []
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
watch: {
|
|
49
|
+
searchNameStr: function(e) {
|
|
50
|
+
e || this.getList();
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
mounted() {
|
|
54
|
+
Array.from(
|
|
55
|
+
document.getElementsByClassName("el-table__body-wrapper")
|
|
56
|
+
).forEach((t) => {
|
|
57
|
+
t.addEventListener("scroll", function() {
|
|
58
|
+
Array.from(
|
|
59
|
+
document.getElementsByClassName("el-tooltip__popper")
|
|
60
|
+
).forEach((i) => {
|
|
61
|
+
i.style.display = "none";
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
methods: {
|
|
67
|
+
handleSelectionChange(e) {
|
|
68
|
+
this.deleteList = [], e.length > 0 && e.forEach((t) => {
|
|
69
|
+
this.deleteList.push(t.id);
|
|
70
|
+
}), this.$emit("handleSelectionChange", e);
|
|
71
|
+
},
|
|
72
|
+
showNewDialog() {
|
|
73
|
+
this.$emit("add", {});
|
|
74
|
+
},
|
|
75
|
+
deleteModels() {
|
|
76
|
+
this.$emit("delete", this.deleteList);
|
|
77
|
+
},
|
|
78
|
+
getList() {
|
|
79
|
+
this.$emit("getList", this.searchNameStr);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const B = (e, t) => {
|
|
84
|
+
const s = e.__vccOpts || e;
|
|
85
|
+
for (const [i, f] of t) { s[i] = f; }
|
|
86
|
+
return s;
|
|
87
|
+
}, E = { class: "gwTable wh100" }, D = {
|
|
88
|
+
key: 0,
|
|
89
|
+
class: "flex-between"
|
|
90
|
+
}, V = { class: "search flex-start" }, A = { class: "buttons" }, O = { class: "noData wh100 flex-center" }, H = { key: 0 }, I = { key: 1 };
|
|
91
|
+
function T(e, t) {
|
|
92
|
+
const b = d("el-input"), y = d("el-button"), _ = d("el-table-column"), k = d("el-table");
|
|
93
|
+
return o(), r("div", E, [
|
|
94
|
+
n(e.$slots, "header", {}, () => [
|
|
95
|
+
e.showHeader ? (o(), r("header", D, [
|
|
96
|
+
p("div", V, [
|
|
97
|
+
n(e.$slots, "headerSearch", {}, () => [
|
|
98
|
+
h(b, {
|
|
99
|
+
"suffix-icon": "el-icon-search",
|
|
100
|
+
onKeyup: S(e.getList, ["enter", "native"]),
|
|
101
|
+
modelValue: e.searchNameStr,
|
|
102
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => e.searchNameStr = l),
|
|
103
|
+
placeholder: e.inputPlaceHolder
|
|
104
|
+
}, null, 8, ["onKeyup", "modelValue", "placeholder"])
|
|
105
|
+
], !0)
|
|
106
|
+
]),
|
|
107
|
+
p("div", A, [
|
|
108
|
+
n(e.$slots, "headerOperate", {}, () => [
|
|
109
|
+
e.headerOperate ? (o(), r(g, { key: 0 }, [
|
|
110
|
+
h(y, {
|
|
111
|
+
type: "primary",
|
|
112
|
+
onClick: e.showNewDialog
|
|
113
|
+
}, {
|
|
114
|
+
default: a(() => t[1] || (t[1] = [
|
|
115
|
+
c("新增", -1)
|
|
116
|
+
])),
|
|
117
|
+
_: 1,
|
|
118
|
+
__: [1]
|
|
119
|
+
}, 8, ["onClick"]),
|
|
120
|
+
e.multiple ? (o(), m(y, {
|
|
121
|
+
key: 0,
|
|
122
|
+
type: "danger",
|
|
123
|
+
onClick: e.deleteModels
|
|
124
|
+
}, {
|
|
125
|
+
default: a(() => t[2] || (t[2] = [
|
|
126
|
+
c("删除", -1)
|
|
127
|
+
])),
|
|
128
|
+
_: 1,
|
|
129
|
+
__: [2]
|
|
130
|
+
}, 8, ["onClick"])) : u("", !0)
|
|
131
|
+
], 64)) : u("", !0)
|
|
132
|
+
], !0)
|
|
133
|
+
])
|
|
134
|
+
])) : u("", !0)
|
|
135
|
+
], !0),
|
|
136
|
+
n(e.$slots, "table", {}, () => [
|
|
137
|
+
h(k, {
|
|
138
|
+
ref: "multipleTable",
|
|
139
|
+
data: e.list,
|
|
140
|
+
"tooltip-effect": "dark",
|
|
141
|
+
style: { width: "100%" },
|
|
142
|
+
onSelectionChange: e.handleSelectionChange
|
|
143
|
+
}, {
|
|
144
|
+
empty: a(() => [
|
|
145
|
+
p("div", O, [
|
|
146
|
+
e.noDataIconfont ? (o(), r("span", I, [
|
|
147
|
+
p("i", {
|
|
148
|
+
class: N(["icon iconfont", e.noDataIconfont])
|
|
149
|
+
}, null, 2)
|
|
150
|
+
])) : (o(), r("span", H, "暂无数据"))
|
|
151
|
+
])
|
|
152
|
+
]),
|
|
153
|
+
default: a(() => [
|
|
154
|
+
e.multiple ? (o(), m(_, {
|
|
155
|
+
key: 0,
|
|
156
|
+
type: "selection",
|
|
157
|
+
width: "55"
|
|
158
|
+
})) : u("", !0),
|
|
159
|
+
(o(!0), r(g, null, $(e.setttingList, (l, C) => (o(), m(_, {
|
|
160
|
+
width: l.width,
|
|
161
|
+
"min-width": l.minWidth,
|
|
162
|
+
"show-overflow-tooltip": l.showOverflowTooltip,
|
|
163
|
+
key: C,
|
|
164
|
+
property: l.property,
|
|
165
|
+
label: l.label
|
|
166
|
+
}, {
|
|
167
|
+
default: a((w) => [
|
|
168
|
+
c(v(w.row[w.column.property]), 1)
|
|
169
|
+
]),
|
|
170
|
+
_: 2
|
|
171
|
+
}, 1032, ["width", "min-width", "show-overflow-tooltip", "property", "label"]))), 128)),
|
|
172
|
+
n(e.$slots, "tableOparate", {}, void 0, !0)
|
|
173
|
+
]),
|
|
174
|
+
_: 3
|
|
175
|
+
}, 8, ["data", "onSelectionChange"])
|
|
176
|
+
], !0)
|
|
177
|
+
]);
|
|
178
|
+
}
|
|
179
|
+
const j = /* @__PURE__ */ B(L, [["render", T], ["__scopeId", "data-v-97e54462"]]);
|
|
180
|
+
export {
|
|
181
|
+
j as default
|
|
182
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e, l){ typeof exports == "object" && typeof module < "u" ? module.exports = l(require("vue")) : typeof define == "function" && define.amd ? define(["vue"], l) : (e = typeof globalThis < "u" ? globalThis : e || self, e.index = l(e.Vue)) })(this, function(e){ "use strict";const l = {props: {showHeader: {type: Boolean, default: !1}, headerOperate: {type: Boolean, default: !0}, inputPlaceHolder: {type: String, required: !0}, list: {type: Array, required: !0}, setttingList: {type: Array, required: !0}, multiple: {type: Boolean, default: !0}, noDataIconfont: {type: String, default: ""}}, data(){ return{searchNameStr: "", deleteList: []} }, watch: {searchNameStr: function(t){ t || this.getList() }}, mounted(){ Array.from(document.getElementsByClassName("el-table__body-wrapper")).forEach(o=>{ o.addEventListener("scroll", function(){ Array.from(document.getElementsByClassName("el-tooltip__popper")).forEach(a=>{ a.style.display = "none" }) }) }) }, methods: {handleSelectionChange(t){ this.deleteList = [], t.length > 0 && t.forEach(o=>{ this.deleteList.push(o.id) }), this.$emit("handleSelectionChange", t) }, showNewDialog(){ this.$emit("add", {}) }, deleteModels(){ this.$emit("delete", this.deleteList) }, getList(){ this.$emit("getList", this.searchNameStr) }}}, N = "", p = (t, o)=>{ const r = t.__vccOpts || t;for(const[a, s]of o){ r[a] = s; }return r }, h = {class: "gwTable wh100"}, m = {key: 0, class: "flex-between"}, f = {class: "search flex-start"}, y = {class: "buttons"}, _ = {class: "noData wh100 flex-center"}, w = {key: 0}, k = {key: 1};function u(t, o, r, a, s, S){ const C = e.resolveComponent("el-input"), i = e.resolveComponent("el-button"), d = e.resolveComponent("el-table-column"), g = e.resolveComponent("el-table");return e.openBlock(), e.createElementBlock("div", h, [e.renderSlot(t.$slots, "header", {}, ()=>[t.showHeader ? (e.openBlock(), e.createElementBlock("header", m, [e.createElementVNode("div", f, [e.renderSlot(t.$slots, "headerSearch", {}, ()=>[e.createVNode(C, {"suffix-icon": "el-icon-search", onKeyup: e.withKeys(t.getList, ["enter", "native"]), modelValue: t.searchNameStr, "onUpdate:modelValue": o[0] || (o[0] = n=>t.searchNameStr = n), placeholder: t.inputPlaceHolder}, null, 8, ["onKeyup", "modelValue", "placeholder"])], !0)]), e.createElementVNode("div", y, [e.renderSlot(t.$slots, "headerOperate", {}, ()=>[t.headerOperate ? (e.openBlock(), e.createElementBlock(e.Fragment, {key: 0}, [e.createVNode(i, {type: "primary", onClick: t.showNewDialog}, {default: e.withCtx(()=>o[1] || (o[1] = [e.createTextVNode("新增", -1)])), _: 1, __: [1]}, 8, ["onClick"]), t.multiple ? (e.openBlock(), e.createBlock(i, {key: 0, type: "danger", onClick: t.deleteModels}, {default: e.withCtx(()=>o[2] || (o[2] = [e.createTextVNode("删除", -1)])), _: 1, __: [2]}, 8, ["onClick"])) : e.createCommentVNode("", !0)], 64)) : e.createCommentVNode("", !0)], !0)])])) : e.createCommentVNode("", !0)], !0), e.renderSlot(t.$slots, "table", {}, ()=>[e.createVNode(g, {ref: "multipleTable", data: t.list, "tooltip-effect": "dark", style: {width: "100%"}, onSelectionChange: t.handleSelectionChange}, {empty: e.withCtx(()=>[e.createElementVNode("div", _, [t.noDataIconfont ? (e.openBlock(), e.createElementBlock("span", k, [e.createElementVNode("i", {class: e.normalizeClass(["icon iconfont", t.noDataIconfont])}, null, 2)])) : (e.openBlock(), e.createElementBlock("span", w, "暂无数据"))])]), default: e.withCtx(()=>[t.multiple ? (e.openBlock(), e.createBlock(d, {key: 0, type: "selection", width: "55"})) : e.createCommentVNode("", !0), (e.openBlock(!0), e.createElementBlock(e.Fragment, null, e.renderList(t.setttingList, (n, B)=>(e.openBlock(), e.createBlock(d, {width: n.width, "min-width": n.minWidth, "show-overflow-tooltip": n.showOverflowTooltip, key: B, property: n.property, label: n.label}, {default: e.withCtx(c=>[e.createTextVNode(e.toDisplayString(c.row[c.column.property]), 1)]), _: 2}, 1032, ["width", "min-width", "show-overflow-tooltip", "property", "label"]))), 128)), e.renderSlot(t.$slots, "tableOparate", {}, void 0, !0)]), _: 3}, 8, ["data", "onSelectionChange"])], !0)]) }return p(l, [["render", u], ["__scopeId", "data-v-97e54462"]]) });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.gwTable[data-v-97e54462]{overflow:hidden}.gwTable .flex[data-v-97e54462]{display:flex}.gwTable .flex-center[data-v-97e54462]{display:flex;justify-content:center;align-items:center}.gwTable .flex-end-center[data-v-97e54462]{display:flex;justify-content:flex-end;align-items:center}.gwTable .flex-start[data-v-97e54462]{display:flex;justify-content:flex-start;align-items:center}.gwTable .flex-between[data-v-97e54462]{display:flex;justify-content:space-between;align-items:center}.gwTable .w100[data-v-97e54462]{width:100%}.gwTable .wh100[data-v-97e54462]{width:100%;height:100%}.gwTable header[data-v-97e54462]{height:64px}.gwTable header .el-button[data-v-97e54462]{height:32px;padding:5px 16px;color:#f0f4ff!important}.gwTable header .search[data-v-97e54462]{margin-right:20px}.gwTable header .search .label[data-v-97e54462]{width:170px;font-size:14px}.gwTable header[data-v-97e54462] .el-input{height:32px}.gwTable header[data-v-97e54462] .el-input input{height:100%!important}.gwTable header[data-v-97e54462] .el-input .el-input__icon{display:flex;justify-content:center;align-items:center}.gwTable[data-v-97e54462] .el-table{height:calc(100% - 64px);background-color:transparent!important;overflow:hidden}.gwTable[data-v-97e54462] .el-table thead tr{height:48px}.gwTable[data-v-97e54462] .el-table thead tr th{border-right:1px solid #252833!important}.gwTable[data-v-97e54462] .el-table .service{text-align:left}.gwTable[data-v-97e54462] .el-table .el-table__empty-block{width:100%;height:100%}.gwTable[data-v-97e54462] .el-table .el-table__body-wrapper{width:100%;height:calc(100% - 41px);overflow-y:auto}.gwTable[data-v-97e54462] .el-table .el-table__fixed-body-wrapper{height:calc(100% - 48px);overflow:auto}.gwTable[data-v-97e54462] .el-table .el-table__body-wrapper tr td,.gwTable[data-v-97e54462] .el-table .el-table__fixed-body-wrapper tr td{border:0;cursor:pointer}
|