command-center-v3-common 0.0.23 → 0.0.24
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/dist/command-center-v3-common.js +49873 -15
- package/dist/command-center-v3-common.umd.cjs +42 -42
- package/dist/index.d.ts +10 -10
- package/package.json +1 -1
- package/dist/command-center-v3-common-poB9858m.js +0 -49964
- package/dist/hy-test-Bd2z5K3s.js +0 -412
package/dist/hy-test-Bd2z5K3s.js
DELETED
@@ -1,412 +0,0 @@
|
|
1
|
-
import { ref as v, defineComponent as O, watch as Y, onMounted as P, resolveComponent as y, openBlock as n, createElementBlock as o, createElementVNode as s, createVNode as r, unref as t, isRef as $, withKeys as Q, withCtx as i, Fragment as N, renderList as T, createBlock as X, renderSlot as Z, toDisplayString as a, createCommentVNode as ee, withDirectives as te, vShow as se, normalizeClass as ne } from "vue";
|
2
|
-
import { o as oe, u as le, $ as c, t as ae, g as ie, h as L, _ as ce } from "./command-center-v3-common-poB9858m.js";
|
3
|
-
function re(f) {
|
4
|
-
const m = v(f.props), g = v(f.params.selectFilterType), l = v(""), d = v([]);
|
5
|
-
async function x() {
|
6
|
-
var u;
|
7
|
-
m.value.getData && ((u = m.value.getData()) == null || u.then(async (p) => {
|
8
|
-
if (!p)
|
9
|
-
return;
|
10
|
-
const _ = await oe(
|
11
|
-
l.value,
|
12
|
-
[...p],
|
13
|
-
{
|
14
|
-
hideDevice: m.value.hideDevice,
|
15
|
-
// 隐藏设备
|
16
|
-
hideOrgNoDevice: m.value.hideOrgNoDevice,
|
17
|
-
// 隐藏部门
|
18
|
-
selectFilterType: g.value
|
19
|
-
// 指定过滤
|
20
|
-
}
|
21
|
-
);
|
22
|
-
console.log("res", _), d.value = _.children, f.params.setViewDepartmentList(d.value);
|
23
|
-
}));
|
24
|
-
}
|
25
|
-
function h() {
|
26
|
-
l.value.length && x();
|
27
|
-
}
|
28
|
-
return {
|
29
|
-
getData: x,
|
30
|
-
query: l,
|
31
|
-
selectChange: h
|
32
|
-
};
|
33
|
-
}
|
34
|
-
const de = { class: "text-[#f00] flex flex-col h-full px-2" }, he = { class: "flex items-center" }, ue = { class: "!w-[114px]" }, pe = { class: "text-hy-text-main" }, fe = { class: "flex items-center w-full click-box" }, me = { class: "flex-grow w-0 flex items-center" }, _e = { class: "max-w-full overflow-ellipsis overflow-hidden whitespace-nowrap text-sm" }, xe = { class: "text-hy-text-main" }, ye = {
|
35
|
-
key: 0,
|
36
|
-
class: "flex-shrink-0 text-xs ml-1 text-hy-text-secondary"
|
37
|
-
}, ve = { class: "flex-shrink-0 ml-1 flex items-center justify-center" }, ge = { class: "flex-shrink-0" }, ke = { class: "flex-grow w-0 overflow-ellipsis overflow-hidden mx-1" }, be = { class: "deviceName" }, we = {
|
38
|
-
key: 0,
|
39
|
-
class: "flex-shrink-0"
|
40
|
-
}, De = {
|
41
|
-
key: 0,
|
42
|
-
class: "text-hy-danger text-sm font-bold relative flex-shrink-0"
|
43
|
-
}, Ce = {
|
44
|
-
key: 1,
|
45
|
-
class: "deviceType flex-shrink-0"
|
46
|
-
}, Se = {
|
47
|
-
key: 2,
|
48
|
-
class: "deviceType flex-shrink-0"
|
49
|
-
}, Be = {
|
50
|
-
key: 3,
|
51
|
-
class: "deviceType flex-shrink-0"
|
52
|
-
}, Ne = {
|
53
|
-
key: 4,
|
54
|
-
class: "deviceType flex-shrink-0"
|
55
|
-
}, Te = {
|
56
|
-
key: 5,
|
57
|
-
class: "deviceType flex-shrink-0"
|
58
|
-
}, $e = {
|
59
|
-
key: 6,
|
60
|
-
class: "deviceType flex-shrink-0"
|
61
|
-
}, Oe = {
|
62
|
-
key: 7,
|
63
|
-
class: "text-hy-success flex-shrink-0"
|
64
|
-
}, Le = {
|
65
|
-
key: 1,
|
66
|
-
class: "flex-shrink-0"
|
67
|
-
}, Re = /* @__PURE__ */ s("span", { class: "shrink-0" }, "离线", -1), Ve = [
|
68
|
-
Re
|
69
|
-
], ze = {
|
70
|
-
key: 1,
|
71
|
-
class: "w-full flex items-center"
|
72
|
-
}, Fe = { class: "max-w-full overflow-ellipsis overflow-hidden whitespace-nowrap text-sm" }, Ge = /* @__PURE__ */ O({
|
73
|
-
__name: "org-group-tree",
|
74
|
-
props: {
|
75
|
-
itemType: {},
|
76
|
-
itemSelectParam: {},
|
77
|
-
height: {},
|
78
|
-
itemSize: { default: 36 },
|
79
|
-
dataList: {},
|
80
|
-
defaultCheckedKeys: { default: () => [] },
|
81
|
-
highlightSelected: { type: Boolean, default: !1 },
|
82
|
-
checkStrictly: { type: Boolean, default: !1 },
|
83
|
-
showCheckbox: { type: Boolean, default: !1 },
|
84
|
-
parentCheckbox: { type: Boolean, default: !0 },
|
85
|
-
showRadio: { type: Boolean, default: !1 },
|
86
|
-
showRadioButton: { type: Boolean, default: !0 },
|
87
|
-
showCheckboxButton: { type: Boolean, default: !0 },
|
88
|
-
getData: { type: Function, default: Function },
|
89
|
-
hideDevice: { type: Boolean, default: !1 },
|
90
|
-
hideOrgNoDevice: { type: Boolean, default: !1 },
|
91
|
-
defaultGetData: { type: Boolean, default: !1 },
|
92
|
-
showOnlineOnly: { type: Boolean, default: !1 },
|
93
|
-
returnDisableDevice: { type: Boolean, default: !0 }
|
94
|
-
},
|
95
|
-
emits: ["onCurrentDepartment", "onCurrent", "onCurrentDelete", "onSelectedData"],
|
96
|
-
setup(f, { expose: m, emit: g }) {
|
97
|
-
const l = f, d = g, {
|
98
|
-
currentDepartment: x,
|
99
|
-
currentDevice: h,
|
100
|
-
currentDeviceDelete: u,
|
101
|
-
elementRef: p,
|
102
|
-
selectedData: _,
|
103
|
-
treeComponentHeight: R,
|
104
|
-
treeComponentRef: V,
|
105
|
-
viewDepartmentList: z,
|
106
|
-
watchTreeComponentHeight: F,
|
107
|
-
setChecked: G,
|
108
|
-
setCheckedKeys: q,
|
109
|
-
setSelectedList: K,
|
110
|
-
selectFilterList: w,
|
111
|
-
selectFilterType: k,
|
112
|
-
getInputPlaceholder: W,
|
113
|
-
setViewDepartmentList: A
|
114
|
-
} = le({
|
115
|
-
emit: d,
|
116
|
-
props: l
|
117
|
-
}), {
|
118
|
-
getData: b,
|
119
|
-
query: C,
|
120
|
-
selectChange: j
|
121
|
-
} = re({
|
122
|
-
emit: d,
|
123
|
-
props: l,
|
124
|
-
params: {
|
125
|
-
selectFilterType: k,
|
126
|
-
setViewDepartmentList: A
|
127
|
-
}
|
128
|
-
});
|
129
|
-
return Y(() => l.showOnlineOnly, () => {
|
130
|
-
b();
|
131
|
-
}), m({
|
132
|
-
setCheckedKeys: q,
|
133
|
-
setSelectedList: K,
|
134
|
-
setChecked: G
|
135
|
-
}), P(() => {
|
136
|
-
F(), w.value = [
|
137
|
-
{
|
138
|
-
label: c("department"),
|
139
|
-
value: 1,
|
140
|
-
placeholder: c("filterByDepartmentName")
|
141
|
-
}
|
142
|
-
], l.hideDevice || w.value.push({
|
143
|
-
label: c("equipment"),
|
144
|
-
value: 3,
|
145
|
-
placeholder: c("filterByDeviceNumberAndDeviceName")
|
146
|
-
}), k.value = w.value[0].value, l.defaultGetData || b();
|
147
|
-
}), (E, D) => {
|
148
|
-
const H = y("el-option"), I = y("el-select"), S = y("svg-icon"), J = y("el-button"), M = y("el-input"), B = y("el-tooltip");
|
149
|
-
return n(), o("div", de, [
|
150
|
-
s("div", he, [
|
151
|
-
r(M, {
|
152
|
-
modelValue: t(C),
|
153
|
-
"onUpdate:modelValue": D[1] || (D[1] = (e) => $(C) ? C.value = e : null),
|
154
|
-
placeholder: t(W),
|
155
|
-
class: "my-2",
|
156
|
-
clearable: "",
|
157
|
-
size: "small",
|
158
|
-
onClear: t(b),
|
159
|
-
onKeyup: Q(t(b), ["enter"])
|
160
|
-
}, {
|
161
|
-
prepend: i(() => [
|
162
|
-
s("div", ue, [
|
163
|
-
r(I, {
|
164
|
-
modelValue: t(k),
|
165
|
-
"onUpdate:modelValue": D[0] || (D[0] = (e) => $(k) ? k.value = e : null),
|
166
|
-
class: "!m-0",
|
167
|
-
size: "small",
|
168
|
-
onChange: t(j)
|
169
|
-
}, {
|
170
|
-
default: i(() => [
|
171
|
-
(n(!0), o(N, null, T(t(w), (e, U) => (n(), X(H, {
|
172
|
-
key: `${U}_selectFilterList`,
|
173
|
-
label: e.label,
|
174
|
-
value: e.value
|
175
|
-
}, null, 8, ["label", "value"]))), 128))
|
176
|
-
]),
|
177
|
-
_: 1
|
178
|
-
}, 8, ["modelValue", "onChange"])
|
179
|
-
])
|
180
|
-
]),
|
181
|
-
append: i(() => [
|
182
|
-
s("div", pe, [
|
183
|
-
r(J, {
|
184
|
-
class: "!m-0 h-[28px] w-[36px] !p-[6px_0px]",
|
185
|
-
onClick: t(b)
|
186
|
-
}, {
|
187
|
-
default: i(() => [
|
188
|
-
r(S, {
|
189
|
-
name: "base-search",
|
190
|
-
width: "14",
|
191
|
-
height: "14"
|
192
|
-
})
|
193
|
-
]),
|
194
|
-
_: 1
|
195
|
-
}, 8, ["onClick"])
|
196
|
-
])
|
197
|
-
]),
|
198
|
-
_: 1
|
199
|
-
}, 8, ["modelValue", "placeholder", "onClear", "onKeyup"])
|
200
|
-
]),
|
201
|
-
Z(E.$slots, "below-the-input"),
|
202
|
-
s("div", {
|
203
|
-
ref_key: "elementRef",
|
204
|
-
ref: p,
|
205
|
-
class: "w-full flex-grow h-0 box-border"
|
206
|
-
}, [
|
207
|
-
r(ae, {
|
208
|
-
ref_key: "treeComponentRef",
|
209
|
-
ref: V,
|
210
|
-
"item-type": 4,
|
211
|
-
"highlight-selected": l.highlightSelected,
|
212
|
-
"item-size": l.itemSize,
|
213
|
-
"data-list": t(z),
|
214
|
-
height: t(R),
|
215
|
-
"check-strictly": l.checkStrictly,
|
216
|
-
"show-checkbox": l.showCheckbox,
|
217
|
-
"parent-checkbox": l.parentCheckbox,
|
218
|
-
"show-radio": l.showRadio,
|
219
|
-
"show-radio-button": l.showRadioButton,
|
220
|
-
"show-checkbox-button": l.showCheckboxButton,
|
221
|
-
"default-checked-keys": l.defaultCheckedKeys,
|
222
|
-
onOnCurrentDepartment: t(x),
|
223
|
-
onOnCurrent: t(h),
|
224
|
-
onOnCurrentDelete: t(u),
|
225
|
-
onOnSelectedData: t(_)
|
226
|
-
}, {
|
227
|
-
"check-content": i(({ row: e }) => [
|
228
|
-
s("div", fe, [
|
229
|
-
s("div", me, [
|
230
|
-
s("div", _e, [
|
231
|
-
r(B, {
|
232
|
-
"show-after": 3e3,
|
233
|
-
class: "item",
|
234
|
-
effect: "dark",
|
235
|
-
placement: "bottom"
|
236
|
-
}, {
|
237
|
-
content: i(() => [
|
238
|
-
s("div", null, a(e.groupName), 1)
|
239
|
-
]),
|
240
|
-
default: i(() => [
|
241
|
-
s("span", xe, a(e.groupName), 1)
|
242
|
-
]),
|
243
|
-
_: 2
|
244
|
-
}, 1024)
|
245
|
-
]),
|
246
|
-
e.deviceList && e.deviceList.length ? (n(), o("span", ye, "(" + a(e.deviceList.length) + ")", 1)) : ee("", !0)
|
247
|
-
]),
|
248
|
-
te(s("div", ve, [
|
249
|
-
r(B, {
|
250
|
-
class: "item",
|
251
|
-
content: t(c)("addedIntercomRecordsToday"),
|
252
|
-
effect: "dark",
|
253
|
-
placement: "top",
|
254
|
-
"show-after": 3e3
|
255
|
-
}, {
|
256
|
-
default: i(() => [
|
257
|
-
r(S, {
|
258
|
-
name: "media-center-2-intercom-2",
|
259
|
-
class: "!w-[18px] !h-[18px]"
|
260
|
-
})
|
261
|
-
]),
|
262
|
-
_: 1
|
263
|
-
}, 8, ["content"])
|
264
|
-
], 512), [
|
265
|
-
[se, e.todayFile]
|
266
|
-
])
|
267
|
-
])
|
268
|
-
]),
|
269
|
-
"other-content": i(({ row: e }) => [
|
270
|
-
e.type === 3 ? (n(), o("div", {
|
271
|
-
key: 0,
|
272
|
-
class: ne([{ "text-hy-text-main": e.onlineState === 1 }, "w-full flex pr-[10px] border-box items-center"])
|
273
|
-
}, [
|
274
|
-
s("div", ge, [
|
275
|
-
r(S, {
|
276
|
-
name: t(ie)(
|
277
|
-
e.deviceType || e.type
|
278
|
-
),
|
279
|
-
width: "20",
|
280
|
-
height: "20",
|
281
|
-
class: "relative top-[2px]"
|
282
|
-
}, null, 8, ["name"])
|
283
|
-
]),
|
284
|
-
s("div", ke, [
|
285
|
-
s("span", be, a(e.devName), 1)
|
286
|
-
]),
|
287
|
-
e.onlineState === 1 ? (n(), o("div", we, [
|
288
|
-
e.sos === 1 ? (n(), o("span", De, "SOS")) : e.intercomGroupTem === 1 || e.intercomCall === 1 ? (n(), o("span", Ce, "音频中")) : e.monitor === 1 || e.beMonitor === 1 ? (n(), o("span", Se, "监控中")) : e.videoCall === 1 ? (n(), o("span", Be, "通话中")) : e.videoRecording === 1 ? (n(), o("span", Ne, "录像中")) : e.audioRecording === 1 ? (n(), o("span", Te, "录音中")) : e.broadcast === 1 ? (n(), o("span", $e, "广播中")) : (n(), o("span", Oe, "在线"))
|
289
|
-
])) : (n(), o("div", Le, Ve))
|
290
|
-
], 2)) : (n(), o("div", ze, [
|
291
|
-
s("div", Fe, [
|
292
|
-
r(B, {
|
293
|
-
"show-after": 3e3,
|
294
|
-
class: "item",
|
295
|
-
effect: "dark",
|
296
|
-
placement: "bottom"
|
297
|
-
}, {
|
298
|
-
content: i(() => [
|
299
|
-
s("div", null, a(e.companyName || e.orgName), 1)
|
300
|
-
]),
|
301
|
-
default: i(() => [
|
302
|
-
s("span", null, a(e.companyName || e.orgName), 1)
|
303
|
-
]),
|
304
|
-
_: 2
|
305
|
-
}, 1024)
|
306
|
-
])
|
307
|
-
]))
|
308
|
-
]),
|
309
|
-
_: 1
|
310
|
-
}, 8, ["highlight-selected", "item-size", "data-list", "height", "check-strictly", "show-checkbox", "parent-checkbox", "show-radio", "show-radio-button", "show-checkbox-button", "default-checked-keys", "onOnCurrentDepartment", "onOnCurrent", "onOnCurrentDelete", "onOnSelectedData"])
|
311
|
-
], 512)
|
312
|
-
]);
|
313
|
-
};
|
314
|
-
}
|
315
|
-
});
|
316
|
-
function qe(f) {
|
317
|
-
return L.post({
|
318
|
-
// /organization/orgTree
|
319
|
-
url: "/organization/orgTree",
|
320
|
-
data: f,
|
321
|
-
isJson: !0
|
322
|
-
});
|
323
|
-
}
|
324
|
-
function Ke(f) {
|
325
|
-
return L.post({
|
326
|
-
// /organization/orgTreeWithGroupAndDevice
|
327
|
-
url: "/organization/orgTreeWithGroupAndDevice",
|
328
|
-
data: f,
|
329
|
-
isJson: !0
|
330
|
-
});
|
331
|
-
}
|
332
|
-
const We = { class: "h-full overflow-auto" }, Ae = { class: "h-[500px]" }, je = { class: "box-border rounded h-[40px] w-full mb-1 box-hy-border-2 bg-hy-page-bg-3 text-hy-main text-xs flex items-center justify-center px-1" }, Ee = /* @__PURE__ */ s("s", { class: "flex-shrink-0 inline-block w-[10px] h-[10px] mr-1 rounded-full bg-hy-main" }, null, -1), He = { class: "max-w-full overflow-ellipsis overflow-hidden whitespace-nowrap text-center text-hy-hy-text-main" }, Ie = { key: 0 }, Je = { key: 1 }, Me = { class: "text-hy-main" }, Ue = { class: "h-[500px]" }, Ye = { class: "box-border rounded h-[40px] w-full mb-1 box-hy-border-2 bg-hy-page-bg-3 text-hy-main text-xs flex items-center justify-center px-1" }, Pe = /* @__PURE__ */ s("s", { class: "flex-shrink-0 inline-block w-[10px] h-[10px] mr-1 rounded-full bg-hy-main" }, null, -1), Qe = { class: "max-w-full overflow-ellipsis overflow-hidden whitespace-nowrap text-center text-hy-hy-text-main" }, Xe = { key: 0 }, Ze = { key: 1 }, et = { class: "text-hy-main" }, nt = /* @__PURE__ */ O({
|
333
|
-
__name: "hy-test",
|
334
|
-
setup(f) {
|
335
|
-
async function m(h) {
|
336
|
-
const u = await qe(h);
|
337
|
-
if (u.code === 200)
|
338
|
-
return u.data;
|
339
|
-
}
|
340
|
-
async function g(h) {
|
341
|
-
const u = await Ke(h);
|
342
|
-
if (u.code === 200)
|
343
|
-
return u.data;
|
344
|
-
}
|
345
|
-
const l = v(!1), d = v([]);
|
346
|
-
function x(h) {
|
347
|
-
d.value = h.selectedData || [], console.log(h.selectedData);
|
348
|
-
}
|
349
|
-
return (h, u) => (n(), o("div", We, [
|
350
|
-
s("div", Ae, [
|
351
|
-
r(Ge, {
|
352
|
-
"item-size": 36,
|
353
|
-
"get-data": g,
|
354
|
-
"highlight-selected": !0,
|
355
|
-
"show-radio": !0,
|
356
|
-
"hide-device": !0,
|
357
|
-
"show-radio-button": !1,
|
358
|
-
"parent-checkbox": !1,
|
359
|
-
onOnSelectedData: x
|
360
|
-
}, {
|
361
|
-
"below-the-input": i(() => [
|
362
|
-
s("div", null, [
|
363
|
-
s("div", je, [
|
364
|
-
Ee,
|
365
|
-
s("div", He, [
|
366
|
-
t(d).length === 0 ? (n(), o("span", Ie, a(t(c)("pleaseSelectWhatYouWantToViewBelow")) + a(t(l) ? t(c)("department") : t(c)("equipment")), 1)) : (n(), o("span", Je, [
|
367
|
-
s("span", Me, a(t(c)("currentlySelected")), 1),
|
368
|
-
(n(!0), o(N, null, T(t(d), (p, _) => (n(), o("span", {
|
369
|
-
key: `${_}_selectedDataList`,
|
370
|
-
class: "text-hy-text-main"
|
371
|
-
}, a(p.devName || p.groupName), 1))), 128))
|
372
|
-
]))
|
373
|
-
])
|
374
|
-
])
|
375
|
-
])
|
376
|
-
]),
|
377
|
-
_: 1
|
378
|
-
})
|
379
|
-
]),
|
380
|
-
s("div", Ue, [
|
381
|
-
r(ce, {
|
382
|
-
"item-size": 36,
|
383
|
-
"get-data": m,
|
384
|
-
"show-checkbox": !0,
|
385
|
-
"parent-checkbox": !1,
|
386
|
-
onOnSelectedData: x
|
387
|
-
}, {
|
388
|
-
"below-the-input": i(() => [
|
389
|
-
s("div", null, [
|
390
|
-
s("div", Ye, [
|
391
|
-
Pe,
|
392
|
-
s("div", Qe, [
|
393
|
-
t(d).length === 0 ? (n(), o("span", Xe, a(t(c)("pleaseSelectWhatYouWantToViewBelow")) + a(t(l) ? t(c)("department") : t(c)("equipment")), 1)) : (n(), o("span", Ze, [
|
394
|
-
s("span", et, a(t(c)("currentlySelected")), 1),
|
395
|
-
(n(!0), o(N, null, T(t(d), (p, _) => (n(), o("span", {
|
396
|
-
key: `${_}_selectedDataList`,
|
397
|
-
class: "text-hy-text-main"
|
398
|
-
}, a(p.devName || p.companyName || p.orgName), 1))), 128))
|
399
|
-
]))
|
400
|
-
])
|
401
|
-
])
|
402
|
-
])
|
403
|
-
]),
|
404
|
-
_: 1
|
405
|
-
})
|
406
|
-
])
|
407
|
-
]));
|
408
|
-
}
|
409
|
-
});
|
410
|
-
export {
|
411
|
-
nt as default
|
412
|
-
};
|