hy-dispatch-ui-v3 0.2.77 → 0.2.79
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/tailwind.css +95 -12
- package/es/api/common.mjs +28 -0
- package/es/bussiness/hyDepartmentTypeOperation/departmentTypeOperation2.vue.mjs +5 -8
- package/es/bussiness/hyDepartmentTypeOperation/departmentTypeOperation_tiantong2.vue.mjs +108 -125
- package/es/bussiness/hyDepartmentTypeOperation/locale/en_US.mjs +7 -7
- package/es/bussiness/hyDepartmentTypeOperation/locale/zh_CN.mjs +6 -6
- package/es/bussiness/hyDisplayQueryAddress/displayQueryAddress.vue.mjs +5 -0
- package/es/bussiness/hyDisplayQueryAddress/displayQueryAddress2.install.mjs +6 -0
- package/es/bussiness/hyDisplayQueryAddress/displayQueryAddress2.vue.mjs +182 -0
- package/es/bussiness/hyDisplayQueryAddress/index.mjs +8 -0
- package/es/bussiness/hyDisplayQueryAddress/locale/en_US.mjs +7 -0
- package/es/bussiness/hyDisplayQueryAddress/locale/index.mjs +2 -0
- package/es/bussiness/hyDisplayQueryAddress/locale/zh_CN.mjs +7 -0
- package/es/bussiness/hyDisplayQueryAddress/style/dialog.scss +0 -0
- package/es/bussiness/hyFilePlayback/cpns/audioDetail.vue.mjs +5 -0
- package/es/bussiness/hyFilePlayback/cpns/audioDetail2.install.mjs +6 -0
- package/es/bussiness/hyFilePlayback/cpns/audioDetail2.vue.mjs +247 -0
- package/es/bussiness/hyFilePlayback/cpns/picDetail.vue.mjs +5 -0
- package/es/bussiness/hyFilePlayback/cpns/picDetail2.install.mjs +6 -0
- package/es/bussiness/hyFilePlayback/cpns/picDetail2.vue.mjs +206 -0
- package/es/bussiness/hyFilePlayback/cpns/videoDetail.vue.mjs +5 -0
- package/es/bussiness/hyFilePlayback/cpns/videoDetail2.install.mjs +6 -0
- package/es/bussiness/hyFilePlayback/cpns/videoDetail2.vue.mjs +238 -0
- package/es/bussiness/hyFilePlayback/filePlayback.vue.mjs +5 -0
- package/es/bussiness/hyFilePlayback/filePlayback2.install.mjs +6 -0
- package/es/bussiness/hyFilePlayback/filePlayback2.vue.mjs +166 -0
- package/es/bussiness/hyFilePlayback/index.mjs +8 -0
- package/es/bussiness/hyFilePlayback/locale/en_US.mjs +22 -0
- package/es/bussiness/hyFilePlayback/locale/index.mjs +2 -0
- package/es/bussiness/hyFilePlayback/locale/zh_CN.mjs +22 -0
- package/es/bussiness/hyFilePlayback/style/filePlayback.scss +2 -0
- package/es/bussiness/index.mjs +2 -0
- package/es/components/hyCutter/cutter.vue.mjs +2 -2
- package/es/components/hyDatePicker/datePicker.vue.mjs +34 -4
- package/es/components/hyForm/cpns/arrayItem.vue.mjs +2 -2
- package/es/components/hyForm/cpns/formItem.vue.mjs +73 -63
- package/es/components/hyForm/js/index.mjs +2 -8
- package/es/components/hyForm/js/useAppForm.mjs +2 -1
- package/es/components/hySearch/cpns/searchItem.vue.mjs +57 -67
- package/es/components/hySearch/js/index.mjs +1 -35
- package/es/components/hySearch/js/useAppSearch.mjs +2 -29
- package/es/components/hySearch/style/search.scss +1 -0
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +5 -5
- package/es/components/hyTable/js/index.mjs +44 -4
- package/es/components/hyTable/js/search.mjs +1 -7
- package/es/components/hyTable/table.vue.mjs +47 -30
- package/es/components/hyTooltip/tooltip.vue.mjs +39 -21
- package/es/components/hyUserAvatar/userAvatar.vue.mjs +1 -1
- package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +3 -3
- package/es/components-map.mjs +2 -0
- package/es/hooks/useBaseMainStore.mjs +16 -5
- package/es/hooks/useCurrentBus.mjs +5 -4
- package/es/hooks/useDialog.mjs +2 -2
- package/es/hooks/useGlobalConfig.mjs +19 -18
- package/es/index.mjs +5 -2
- package/es/locale/en_US.mjs +1 -0
- package/es/locale/zh_CN.mjs +1 -0
- package/es/style/index.scss +2 -2
- package/es/utils/file.mjs +1 -2
- package/es/utils/form.mjs +84 -5
- package/es/utils/index.mjs +3 -2
- package/es/utils/is.mjs +1 -1
- package/es/utils/map/hook/leafletjs.mjs +4 -0
- package/es/utils/map/index.mjs +4 -0
- package/es/utils/permission.mjs +3 -1
- package/es/utils/timeUtils.mjs +95 -0
- package/es/version.mjs +1 -1
- package/lib/api/common.js +33 -0
- package/lib/bussiness/hyDepartmentTypeOperation/departmentTypeOperation2.vue.js +3 -6
- package/lib/bussiness/hyDepartmentTypeOperation/departmentTypeOperation_tiantong2.vue.js +107 -124
- package/lib/bussiness/hyDepartmentTypeOperation/locale/en_US.js +7 -7
- package/lib/bussiness/hyDepartmentTypeOperation/locale/zh_CN.js +6 -6
- package/lib/bussiness/hyDisplayQueryAddress/displayQueryAddress.install.js +6 -0
- package/lib/bussiness/hyDisplayQueryAddress/displayQueryAddress.vue.js +9 -0
- package/lib/bussiness/hyDisplayQueryAddress/displayQueryAddress2.install.js +6 -0
- package/lib/bussiness/hyDisplayQueryAddress/displayQueryAddress2.vue.js +186 -0
- package/lib/bussiness/hyDisplayQueryAddress/index.js +13 -0
- package/lib/bussiness/hyDisplayQueryAddress/locale/en_US.js +11 -0
- package/lib/bussiness/hyDisplayQueryAddress/locale/index.js +9 -0
- package/lib/bussiness/hyDisplayQueryAddress/locale/zh_CN.js +11 -0
- package/lib/bussiness/hyDisplayQueryAddress/style/dialog.scss +0 -0
- package/lib/bussiness/hyFilePlayback/cpns/audioDetail.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/audioDetail.vue.js +9 -0
- package/lib/bussiness/hyFilePlayback/cpns/audioDetail2.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/audioDetail2.vue.js +251 -0
- package/lib/bussiness/hyFilePlayback/cpns/picDetail.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/picDetail.vue.js +9 -0
- package/lib/bussiness/hyFilePlayback/cpns/picDetail2.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/picDetail2.vue.js +210 -0
- package/lib/bussiness/hyFilePlayback/cpns/videoDetail.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/videoDetail.vue.js +9 -0
- package/lib/bussiness/hyFilePlayback/cpns/videoDetail2.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/cpns/videoDetail2.vue.js +242 -0
- package/lib/bussiness/hyFilePlayback/filePlayback.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/filePlayback.vue.js +9 -0
- package/lib/bussiness/hyFilePlayback/filePlayback2.install.js +6 -0
- package/lib/bussiness/hyFilePlayback/filePlayback2.vue.js +170 -0
- package/lib/bussiness/hyFilePlayback/index.js +13 -0
- package/lib/bussiness/hyFilePlayback/locale/en_US.js +26 -0
- package/lib/bussiness/hyFilePlayback/locale/index.js +9 -0
- package/lib/bussiness/hyFilePlayback/locale/zh_CN.js +26 -0
- package/lib/bussiness/hyFilePlayback/style/filePlayback.scss +2 -0
- package/lib/bussiness/index.js +18 -14
- package/lib/components/hyCutter/cutter.vue.js +2 -2
- package/lib/components/hyDatePicker/datePicker.vue.js +32 -2
- package/lib/components/hyForm/cpns/arrayItem.vue.js +2 -2
- package/lib/components/hyForm/cpns/formItem.vue.js +71 -61
- package/lib/components/hyForm/js/index.js +0 -7
- package/lib/components/hyForm/js/useAppForm.js +1 -0
- package/lib/components/hySearch/cpns/searchItem.vue.js +64 -74
- package/lib/components/hySearch/js/index.js +0 -36
- package/lib/components/hySearch/js/useAppSearch.js +1 -28
- package/lib/components/hySearch/style/search.scss +1 -0
- package/lib/components/hyTable/cpns/virtualTable.vue.js +4 -4
- package/lib/components/hyTable/js/index.js +45 -3
- package/lib/components/hyTable/js/search.js +1 -7
- package/lib/components/hyTable/table.vue.js +46 -29
- package/lib/components/hyTooltip/tooltip.vue.js +38 -20
- package/lib/components/hyUserAvatar/userAvatar.vue.js +1 -1
- package/lib/components/hyVideoPlayer/videoPlayer.vue.js +3 -3
- package/lib/components-map.js +2 -0
- package/lib/hooks/useBaseMainStore.js +15 -4
- package/lib/hooks/useCurrentBus.js +4 -3
- package/lib/hooks/useDialog.js +2 -2
- package/lib/hooks/useGlobalConfig.js +18 -17
- package/lib/index.js +71 -55
- package/lib/locale/en_US.js +1 -0
- package/lib/locale/zh_CN.js +1 -0
- package/lib/style/index.scss +2 -2
- package/lib/utils/file.js +1 -2
- package/lib/utils/form.js +87 -4
- package/lib/utils/index.js +13 -1
- package/lib/utils/is.js +1 -1
- package/lib/utils/map/hook/leafletjs.js +4 -0
- package/lib/utils/map/index.js +4 -0
- package/lib/utils/permission.js +3 -1
- package/lib/utils/timeUtils.js +105 -0
- package/lib/version.js +1 -1
- package/package.json +14 -1
|
@@ -4,7 +4,7 @@ import { MoreFilled } from '@element-plus/icons-vue';
|
|
|
4
4
|
import '../../index.mjs';
|
|
5
5
|
import '../../../hooks/index.mjs';
|
|
6
6
|
import '../../../utils/index.mjs';
|
|
7
|
-
import { operatorFilterHandler, operatorClickHandler, operatorDisabledHandler, operatorIsDotHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler } from '../js/index.mjs';
|
|
7
|
+
import { operatorFilterHandler, operatorDescHandler, operatorClickHandler, operatorDisabledHandler, operatorLabelHandler, operatorIsDotHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler } from '../js/index.mjs';
|
|
8
8
|
import _sfc_main$1 from './headerItem.vue.mjs';
|
|
9
9
|
import { isNumber, isString, isFunction, isArray, isBoolean, isEmpty } from '../../../utils/is.mjs';
|
|
10
10
|
import { HyIcon } from '../../hyIcon/index.mjs';
|
|
@@ -435,7 +435,7 @@ const _sfc_main = {
|
|
|
435
435
|
key: cindex,
|
|
436
436
|
"is-always": "",
|
|
437
437
|
overLine: 1,
|
|
438
|
-
content: citem
|
|
438
|
+
content: unref(operatorDescHandler)(citem, { column, row, $index, cellIndex })
|
|
439
439
|
}, {
|
|
440
440
|
default: withCtx(() => [
|
|
441
441
|
createElementVNode("div", {
|
|
@@ -454,13 +454,13 @@ const _sfc_main = {
|
|
|
454
454
|
"svg-name": citem.svgName,
|
|
455
455
|
"class-name": "!w-4 !h-4"
|
|
456
456
|
}, null, 8, ["svg-name"]),
|
|
457
|
-
citem
|
|
457
|
+
unref(operatorLabelHandler)(citem, { column, row, $index, cellIndex }) ? (openBlock(), createElementBlock(
|
|
458
458
|
"div",
|
|
459
459
|
{
|
|
460
460
|
key: 0,
|
|
461
461
|
class: "mt-1 whitespace-nowrap"
|
|
462
462
|
},
|
|
463
|
-
toDisplayString(citem
|
|
463
|
+
toDisplayString(unref(operatorLabelHandler)(citem, { column, row, $index, cellIndex })),
|
|
464
464
|
1
|
|
465
465
|
/* TEXT */
|
|
466
466
|
)) : (openBlock(), createElementBlock("div", {
|
|
@@ -523,7 +523,7 @@ const _sfc_main = {
|
|
|
523
523
|
createElementVNode(
|
|
524
524
|
"span",
|
|
525
525
|
{ class: "pr-1" },
|
|
526
|
-
toDisplayString(citem
|
|
526
|
+
toDisplayString(unref(operatorLabelHandler)(citem, { column, row, $index, cellIndex })),
|
|
527
527
|
1
|
|
528
528
|
/* TEXT */
|
|
529
529
|
),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { debounce } from 'lodash-es';
|
|
1
2
|
import { unref, ref, computed, watch, nextTick, watchEffect } from 'vue';
|
|
2
3
|
import '../../../hooks/index.mjs';
|
|
3
4
|
import '../../../utils/index.mjs';
|
|
@@ -83,6 +84,16 @@ function operatorShowHandler(operator, scope) {
|
|
|
83
84
|
if (isFunction(show)) return show(scope);
|
|
84
85
|
return true;
|
|
85
86
|
}
|
|
87
|
+
function operatorLabelHandler(operator, scope) {
|
|
88
|
+
const label = unref(operator.label);
|
|
89
|
+
if (isFunction(label)) return label(scope);
|
|
90
|
+
return label || "";
|
|
91
|
+
}
|
|
92
|
+
function operatorDescHandler(operator, scope) {
|
|
93
|
+
const desc = unref(operator.desc);
|
|
94
|
+
if (isFunction(desc)) return desc(scope);
|
|
95
|
+
return desc || "";
|
|
96
|
+
}
|
|
86
97
|
function operatorDisabledHandler(operator, scope) {
|
|
87
98
|
const { disabled } = operator;
|
|
88
99
|
if (isBoolean(disabled)) return disabled;
|
|
@@ -148,7 +159,23 @@ const useAppTableWrapper = (hy) => {
|
|
|
148
159
|
const tableColumns = ref([]);
|
|
149
160
|
const tableColumnsEditablele = ref({});
|
|
150
161
|
const tableColumnsList = computed(() => {
|
|
151
|
-
|
|
162
|
+
let columnContentLength = 0;
|
|
163
|
+
const columns = tableColumns.value.filter((column) => {
|
|
164
|
+
const flag = tableColumnShowHandler(column);
|
|
165
|
+
if (flag && column.type === "default" && tableColumnsEditablele.value[column.prop]?.checked) {
|
|
166
|
+
columnContentLength++;
|
|
167
|
+
}
|
|
168
|
+
return flag;
|
|
169
|
+
});
|
|
170
|
+
if (columnContentLength <= 1) {
|
|
171
|
+
return columns.map(({ width, ...column }) => {
|
|
172
|
+
return {
|
|
173
|
+
...column,
|
|
174
|
+
width: column.type === "default" && tableColumnsEditablele.value[column.prop]?.checked ? void 0 : width
|
|
175
|
+
};
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
return columns;
|
|
152
179
|
});
|
|
153
180
|
const searchPlaceholder = computed(() => {
|
|
154
181
|
const searchLabelSet = tableColumnsList.value.reduce((searchLabelSet2, column) => {
|
|
@@ -410,9 +437,22 @@ const useAppTableWrapper = (hy) => {
|
|
|
410
437
|
tableRef.value.setScrollLeft(left);
|
|
411
438
|
}
|
|
412
439
|
}
|
|
413
|
-
|
|
440
|
+
const onScrollHandler = debounce((params) => {
|
|
441
|
+
const { scrollTop } = params || {};
|
|
442
|
+
let clientHeight, scrollHeight;
|
|
443
|
+
if (props.type === "virtual") {
|
|
444
|
+
const wrapperEl = tableRef.value?.$el.querySelector(".hy-el-vl__wrapper");
|
|
445
|
+
clientHeight = wrapperEl?.clientHeight;
|
|
446
|
+
scrollHeight = wrapperEl?.firstChild.firstChild.scrollHeight;
|
|
447
|
+
} else {
|
|
448
|
+
clientHeight = tableRef.value?.$refs.bodyWrapper.clientHeight;
|
|
449
|
+
scrollHeight = tableRef.value?.$refs.tableBody.scrollHeight;
|
|
450
|
+
}
|
|
414
451
|
emits("scroll", params);
|
|
415
|
-
|
|
452
|
+
if (clientHeight && scrollHeight && scrollTop && clientHeight + Math.round(scrollTop) + 1 >= scrollHeight) {
|
|
453
|
+
emits("scrollBottom", params);
|
|
454
|
+
}
|
|
455
|
+
}, 250);
|
|
416
456
|
window.scrollToTop = scrollToTop;
|
|
417
457
|
watchEffect(() => {
|
|
418
458
|
const { columnsList, columnsEditablele, searchText } = tableColumnHandler(props.tableColumns, CACHE_COLUMNS_KEY);
|
|
@@ -454,4 +494,4 @@ const useAppTableWrapper = (hy) => {
|
|
|
454
494
|
};
|
|
455
495
|
};
|
|
456
496
|
|
|
457
|
-
export { operatorClickHandler, operatorDisableTextdHandler, operatorDisabledHandler, operatorFilterHandler, operatorIsDotHandler, renderContentHandler, renderHeaderHandler, tableColumnHandler, tableColumnShowHandler, useAppTableWrapper };
|
|
497
|
+
export { operatorClickHandler, operatorDescHandler, operatorDisableTextdHandler, operatorDisabledHandler, operatorFilterHandler, operatorIsDotHandler, operatorLabelHandler, renderContentHandler, renderHeaderHandler, tableColumnHandler, tableColumnShowHandler, useAppTableWrapper };
|
|
@@ -8,10 +8,6 @@ function useAppTableSearch(hy) {
|
|
|
8
8
|
const { props, emits, appSearchRef, tableDataSource, clearSelection } = hy;
|
|
9
9
|
const { api } = useApi();
|
|
10
10
|
const totalElements = ref(0);
|
|
11
|
-
const showFilter = ref(true);
|
|
12
|
-
function switchShowFilter() {
|
|
13
|
-
showFilter.value = !showFilter.value;
|
|
14
|
-
}
|
|
15
11
|
async function getData(page = null) {
|
|
16
12
|
await nextTick();
|
|
17
13
|
hy.loading.value = true;
|
|
@@ -50,7 +46,7 @@ function useAppTableSearch(hy) {
|
|
|
50
46
|
} else {
|
|
51
47
|
tableDataSource.value = data;
|
|
52
48
|
}
|
|
53
|
-
totalElements.value = res.data.totalElements;
|
|
49
|
+
totalElements.value = res.data.totalElements || data.length || 0;
|
|
54
50
|
hy.expandRowKeys.value = [];
|
|
55
51
|
emits("reqSuccess", tableDataSource.value);
|
|
56
52
|
}
|
|
@@ -123,12 +119,10 @@ function useAppTableSearch(hy) {
|
|
|
123
119
|
}
|
|
124
120
|
return {
|
|
125
121
|
totalElements,
|
|
126
|
-
showFilter,
|
|
127
122
|
getData,
|
|
128
123
|
setData,
|
|
129
124
|
resetFields,
|
|
130
125
|
resetFn,
|
|
131
|
-
switchShowFilter,
|
|
132
126
|
getTotalElements,
|
|
133
127
|
getTableDataSource,
|
|
134
128
|
onSizeChangeHandler,
|
|
@@ -4,7 +4,7 @@ import { MoreFilled } from '@element-plus/icons-vue';
|
|
|
4
4
|
import '../index.mjs';
|
|
5
5
|
import '../../hooks/index.mjs';
|
|
6
6
|
import '../../utils/index.mjs';
|
|
7
|
-
import { useAppTableWrapper, operatorFilterHandler, operatorClickHandler, operatorDisabledHandler, operatorIsDotHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler } from './js/index.mjs';
|
|
7
|
+
import { useAppTableWrapper, operatorFilterHandler, operatorDescHandler, operatorClickHandler, operatorDisabledHandler, operatorLabelHandler, operatorIsDotHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler } from './js/index.mjs';
|
|
8
8
|
import { useAppTableSearch } from './js/search.mjs';
|
|
9
9
|
import _sfc_main$2 from './cpns/headerItem.vue.mjs';
|
|
10
10
|
import _sfc_main$1 from './cpns/columnSelect.vue.mjs';
|
|
@@ -191,7 +191,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
191
191
|
}
|
|
192
192
|
}, {
|
|
193
193
|
"loading": { type: Boolean, default: false },
|
|
194
|
-
"loadingModifiers": {}
|
|
194
|
+
"loadingModifiers": {},
|
|
195
|
+
"showFilter": { type: Boolean, default: true },
|
|
196
|
+
"showFilterModifiers": {}
|
|
195
197
|
}),
|
|
196
198
|
emits: /* @__PURE__ */ mergeModels([
|
|
197
199
|
"row-click",
|
|
@@ -200,17 +202,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
200
202
|
"on-select-checkbox",
|
|
201
203
|
"reqSuccess",
|
|
202
204
|
"search-data",
|
|
203
|
-
"scroll"
|
|
204
|
-
|
|
205
|
+
"scroll",
|
|
206
|
+
"scrollBottom"
|
|
207
|
+
], ["update:loading", "update:showFilter"]),
|
|
205
208
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
206
209
|
const props = __props;
|
|
207
210
|
const emits = __emit;
|
|
208
211
|
const loading = useModel(__props, "loading");
|
|
212
|
+
const showFilterModel = useModel(__props, "showFilter");
|
|
209
213
|
const containerRef = useTemplateRef("containerRef");
|
|
210
214
|
const tableRef = useTemplateRef("tableRef");
|
|
211
215
|
const appSearchRef = useTemplateRef("appSearchRef");
|
|
212
216
|
const tableDropdownRef = useTemplateRef("tableDropdownRef");
|
|
213
217
|
const operatorDropdownRef = useTemplateRef("operatorDropdownRef");
|
|
218
|
+
function switchShowFilter() {
|
|
219
|
+
showFilterModel.value = !showFilterModel.value;
|
|
220
|
+
}
|
|
214
221
|
const {
|
|
215
222
|
// useAppTableWrapper
|
|
216
223
|
// 表格配置项
|
|
@@ -242,13 +249,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
242
249
|
// useAppTableSearch
|
|
243
250
|
// 表单查询
|
|
244
251
|
totalElements,
|
|
245
|
-
showFilter,
|
|
246
252
|
selectedList,
|
|
247
253
|
getData,
|
|
248
254
|
setData,
|
|
249
255
|
resetFields,
|
|
250
256
|
resetFn,
|
|
251
|
-
switchShowFilter,
|
|
252
257
|
getTotalElements,
|
|
253
258
|
getTableDataSource,
|
|
254
259
|
onSizeChangeHandler,
|
|
@@ -324,7 +329,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
324
329
|
__props.filterColumns.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
325
330
|
key: 1,
|
|
326
331
|
class: "h-[32px] flex items-center gap-[10px] clickBox px-3 select-none rounded hover:bg-background-2 box-border",
|
|
327
|
-
onClick:
|
|
332
|
+
onClick: switchShowFilter
|
|
328
333
|
}, [
|
|
329
334
|
createVNode(unref(HyIcon), {
|
|
330
335
|
"svg-name": "ops-button-screen",
|
|
@@ -333,11 +338,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
333
338
|
createElementVNode(
|
|
334
339
|
"span",
|
|
335
340
|
null,
|
|
336
|
-
toDisplayString(
|
|
341
|
+
toDisplayString(showFilterModel.value ? unref($t)("table.hideFilter") : unref($t)("table.displayFilter")),
|
|
337
342
|
1
|
|
338
343
|
/* TEXT */
|
|
339
344
|
)
|
|
340
|
-
]
|
|
345
|
+
])) : createCommentVNode("v-if", true),
|
|
341
346
|
unref(searchPlaceholder) ? (openBlock(), createBlock(unref(HyTooltip), {
|
|
342
347
|
key: 2,
|
|
343
348
|
"is-always": "",
|
|
@@ -389,8 +394,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
389
394
|
ref: appSearchRef,
|
|
390
395
|
model: __props.filterModel,
|
|
391
396
|
columns: __props.filterColumns,
|
|
392
|
-
hidden: !
|
|
393
|
-
class: normalizeClass({ "mb-4":
|
|
397
|
+
hidden: !showFilterModel.value,
|
|
398
|
+
class: normalizeClass({ "mb-4": showFilterModel.value }),
|
|
394
399
|
onSearch: ($event) => unref(getData)(1),
|
|
395
400
|
onOptionsStatus: _ctx.$attrs.onOptionsStatus
|
|
396
401
|
}, createSlots({
|
|
@@ -434,13 +439,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
434
439
|
}), {
|
|
435
440
|
empty: withCtx(() => [
|
|
436
441
|
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
437
|
-
createElementVNode(
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
createElementVNode("div", { class: "flex flex-col items-center gap-2" }, [
|
|
443
|
+
createVNode(unref(HyIcon), {
|
|
444
|
+
"svg-name": "ops-Empty-alarm-not-data",
|
|
445
|
+
class: "!w-[80px] !h-[80px]"
|
|
446
|
+
}),
|
|
447
|
+
createElementVNode(
|
|
448
|
+
"span",
|
|
449
|
+
{ class: "text-sm text-auxiliary" },
|
|
450
|
+
toDisplayString(__props.emptyText || unref($t)("hy.noData")),
|
|
451
|
+
1
|
|
452
|
+
/* TEXT */
|
|
453
|
+
)
|
|
454
|
+
])
|
|
444
455
|
])
|
|
445
456
|
]),
|
|
446
457
|
default: withCtx(() => [
|
|
@@ -495,7 +506,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
495
506
|
key: cindex,
|
|
496
507
|
"is-always": "",
|
|
497
508
|
overLine: 1,
|
|
498
|
-
content: citem
|
|
509
|
+
content: unref(operatorDescHandler)(citem, scope)
|
|
499
510
|
}, {
|
|
500
511
|
default: withCtx(() => [
|
|
501
512
|
createElementVNode("div", {
|
|
@@ -511,13 +522,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
511
522
|
"svg-name": citem.svgName,
|
|
512
523
|
"class-name": "!w-4 !h-4"
|
|
513
524
|
}, null, 8, ["svg-name"]),
|
|
514
|
-
citem
|
|
525
|
+
unref(operatorLabelHandler)(citem, scope) ? (openBlock(), createElementBlock(
|
|
515
526
|
"div",
|
|
516
527
|
{
|
|
517
528
|
key: 0,
|
|
518
529
|
class: "mt-1 whitespace-nowrap w-full text-center over_one_line"
|
|
519
530
|
},
|
|
520
|
-
toDisplayString(citem
|
|
531
|
+
toDisplayString(unref(operatorLabelHandler)(citem, scope)),
|
|
521
532
|
1
|
|
522
533
|
/* TEXT */
|
|
523
534
|
)) : (openBlock(), createElementBlock("div", {
|
|
@@ -567,7 +578,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
567
578
|
createElementVNode(
|
|
568
579
|
"span",
|
|
569
580
|
{ class: "pr-1" },
|
|
570
|
-
toDisplayString(citem
|
|
581
|
+
toDisplayString(unref(operatorLabelHandler)(citem, scope)),
|
|
571
582
|
1
|
|
572
583
|
/* TEXT */
|
|
573
584
|
),
|
|
@@ -728,13 +739,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
728
739
|
empty: withCtx(() => [
|
|
729
740
|
createElementVNode("div", { class: "w-full h-full flex items-center justify-center border-b border-border" }, [
|
|
730
741
|
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
731
|
-
createElementVNode(
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
742
|
+
createElementVNode("div", { class: "flex flex-col items-center gap-2" }, [
|
|
743
|
+
createVNode(unref(HyIcon), {
|
|
744
|
+
"svg-name": "ops-Empty-alarm-not-data",
|
|
745
|
+
class: "!w-[80px] !h-[80px]"
|
|
746
|
+
}),
|
|
747
|
+
createElementVNode(
|
|
748
|
+
"span",
|
|
749
|
+
{ class: "text-sm text-auxiliary" },
|
|
750
|
+
toDisplayString(__props.emptyText || unref($t)("hy.noData")),
|
|
751
|
+
1
|
|
752
|
+
/* TEXT */
|
|
753
|
+
)
|
|
754
|
+
])
|
|
738
755
|
])
|
|
739
756
|
])
|
|
740
757
|
]),
|
|
@@ -846,7 +863,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
846
863
|
createElementVNode(
|
|
847
864
|
"span",
|
|
848
865
|
{ class: "pr-1" },
|
|
849
|
-
toDisplayString(citem.
|
|
866
|
+
toDisplayString(unref(operatorLabelHandler)(citem, unref(tableTriggerRef).scope)),
|
|
850
867
|
1
|
|
851
868
|
/* TEXT */
|
|
852
869
|
),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, openBlock, createBlock, unref, mergeProps,
|
|
1
|
+
import { defineComponent, useModel, ref, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, createElementBlock, normalizeStyle, normalizeClass, createElementVNode, mergeModels } from 'vue';
|
|
2
2
|
import { ElTooltip } from 'element-plus';
|
|
3
3
|
import '../../utils/index.mjs';
|
|
4
4
|
import '../../hooks/index.mjs';
|
|
@@ -11,7 +11,7 @@ const __default__ = defineComponent({
|
|
|
11
11
|
name: "HyTooltip"
|
|
12
12
|
});
|
|
13
13
|
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
14
|
-
props: {
|
|
14
|
+
props: /* @__PURE__ */ mergeModels({
|
|
15
15
|
isAlways: {
|
|
16
16
|
type: Boolean,
|
|
17
17
|
default: () => {
|
|
@@ -37,10 +37,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
37
37
|
},
|
|
38
38
|
content: {
|
|
39
39
|
type: [String, Number]
|
|
40
|
+
},
|
|
41
|
+
maxWidth: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "300px"
|
|
44
|
+
},
|
|
45
|
+
maxHeight: {
|
|
46
|
+
type: String
|
|
40
47
|
}
|
|
41
|
-
},
|
|
48
|
+
}, {
|
|
49
|
+
"modelValue": { type: Boolean, default: false },
|
|
50
|
+
"modelModifiers": {}
|
|
51
|
+
}),
|
|
52
|
+
emits: ["update:modelValue"],
|
|
42
53
|
setup(__props) {
|
|
43
54
|
const props = __props;
|
|
55
|
+
const visible = useModel(__props, "modelValue");
|
|
44
56
|
const isShow = ref(false);
|
|
45
57
|
const isDisabled = computed(() => {
|
|
46
58
|
if (props.disabled || props.isAlways) {
|
|
@@ -61,15 +73,28 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
61
73
|
}
|
|
62
74
|
return (_ctx, _cache) => {
|
|
63
75
|
return openBlock(), createBlock(unref(ElTooltip), mergeProps({
|
|
76
|
+
visible: visible.value,
|
|
77
|
+
"onUpdate:visible": ($event) => visible.value = $event,
|
|
64
78
|
"show-after": 500,
|
|
65
79
|
class: "item",
|
|
66
80
|
effect: "dark",
|
|
67
81
|
placement: "top",
|
|
68
|
-
"popper-class": "
|
|
69
|
-
}, _ctx.$attrs, {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
82
|
+
"popper-class": _ctx.$slots.content ? "" : "pr-0"
|
|
83
|
+
}, _ctx.$attrs, { disabled: isDisabled.value }), {
|
|
84
|
+
content: withCtx(() => [
|
|
85
|
+
renderSlot(_ctx.$slots, "content", {}, () => [
|
|
86
|
+
createElementVNode(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
class: "scroll-body break-all overflow-y-auto pr-1",
|
|
90
|
+
style: normalizeStyle({ maxWidth: __props.maxWidth, maxHeight: __props.maxHeight })
|
|
91
|
+
},
|
|
92
|
+
toDisplayString(unref(isNumber)(__props.content) ? `${__props.content}` : __props.content),
|
|
93
|
+
5
|
|
94
|
+
/* TEXT, STYLE */
|
|
95
|
+
)
|
|
96
|
+
])
|
|
97
|
+
]),
|
|
73
98
|
default: withCtx(() => [
|
|
74
99
|
__props.isAlways ? renderSlot(_ctx.$slots, "default", {}, () => [
|
|
75
100
|
createTextVNode(
|
|
@@ -82,6 +107,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
82
107
|
{
|
|
83
108
|
key: 1,
|
|
84
109
|
class: normalizeClass(appClass.value),
|
|
110
|
+
style: normalizeStyle({ "--line-clamp": __props.overLine || 2 }),
|
|
85
111
|
onMouseenter: onMouseenterHandler
|
|
86
112
|
},
|
|
87
113
|
[
|
|
@@ -93,21 +119,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
93
119
|
)
|
|
94
120
|
])
|
|
95
121
|
],
|
|
96
|
-
|
|
97
|
-
/* CLASS, NEED_HYDRATION */
|
|
122
|
+
38
|
|
123
|
+
/* CLASS, STYLE, NEED_HYDRATION */
|
|
98
124
|
))
|
|
99
125
|
]),
|
|
100
|
-
_:
|
|
101
|
-
/*
|
|
102
|
-
}, [
|
|
103
|
-
_ctx.$slots.content ? {
|
|
104
|
-
name: "content",
|
|
105
|
-
fn: withCtx(() => [
|
|
106
|
-
renderSlot(_ctx.$slots, "content")
|
|
107
|
-
]),
|
|
108
|
-
key: "0"
|
|
109
|
-
} : void 0
|
|
110
|
-
]), 1040, ["disabled", "content"]);
|
|
126
|
+
_: 3
|
|
127
|
+
/* FORWARDED */
|
|
128
|
+
}, 16, ["visible", "onUpdate:visible", "popper-class", "disabled"]);
|
|
111
129
|
};
|
|
112
130
|
}
|
|
113
131
|
});
|
|
@@ -62,7 +62,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
62
62
|
() => props.device?.gbDevice === 1 && (props.device?.deviceType || props.device?.type) !== 13
|
|
63
63
|
);
|
|
64
64
|
const headImg = computed(() => {
|
|
65
|
-
return props.device && unref(userAvatarMap)?.get(props.device.deviceId);
|
|
65
|
+
return props.device && (unref(userAvatarMap)?.get(props.device.deviceId) || props.device.headImg);
|
|
66
66
|
});
|
|
67
67
|
function parseRem(res) {
|
|
68
68
|
let px = res;
|
|
@@ -257,15 +257,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
257
257
|
createCommentVNode(" \u666E\u901A\u6587\u4EF6 "),
|
|
258
258
|
createElementVNode("div", { class: "flex items-center justify-center text-auxiliary" }, [
|
|
259
259
|
createVNode(unref(HyIcon), {
|
|
260
|
-
"svg-name": "
|
|
260
|
+
"svg-name": "ops-audio-center-right-ripple",
|
|
261
261
|
className: "!w-[12px] !h-[12px]"
|
|
262
262
|
}),
|
|
263
263
|
createVNode(unref(HyIcon), {
|
|
264
|
-
"svg-name": "
|
|
264
|
+
"svg-name": "ops-audio-media-center-video3",
|
|
265
265
|
className: "!w-[40px] !h-[40px] mx-1"
|
|
266
266
|
}),
|
|
267
267
|
createVNode(unref(HyIcon), {
|
|
268
|
-
"svg-name": "
|
|
268
|
+
"svg-name": "ops-audio-media-center-left-rippleV2",
|
|
269
269
|
className: "!w-[12px] !h-[12px]"
|
|
270
270
|
})
|
|
271
271
|
]),
|
package/es/components-map.mjs
CHANGED
|
@@ -3,10 +3,12 @@ export default {
|
|
|
3
3
|
HyDepartmentTypeOperation: () => import('hy-dispatch-ui-v3/es/bussiness/hyDepartmentTypeOperation/departmentTypeOperation'),
|
|
4
4
|
HyDepartmentTypeOperationTiantong: () => import('hy-dispatch-ui-v3/es/bussiness/hyDepartmentTypeOperation/departmentTypeOperationTiantong'),
|
|
5
5
|
HyDeviceTree: () => import('hy-dispatch-ui-v3/es/bussiness/hyDeviceTree/deviceTree'),
|
|
6
|
+
HyDisplayQueryAddress: () => import('hy-dispatch-ui-v3/es/bussiness/hyDisplayQueryAddress/displayQueryAddress'),
|
|
6
7
|
HyElectronicFence: () => import('hy-dispatch-ui-v3/es/bussiness/hyElectronicFence/electronicFence'),
|
|
7
8
|
HyAddElectronicFenceDialog: () => import('hy-dispatch-ui-v3/es/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog'),
|
|
8
9
|
HyElectronicFenceAssociatedUsersDialog: () => import('hy-dispatch-ui-v3/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog'),
|
|
9
10
|
HyBatchSetElectronicFenceUserDialog: () => import('hy-dispatch-ui-v3/es/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog'),
|
|
11
|
+
HyFilePlayback: () => import('hy-dispatch-ui-v3/es/bussiness/hyFilePlayback/filePlayback'),
|
|
10
12
|
HyMapAearchPlace: () => import('hy-dispatch-ui-v3/es/bussiness/hyMapAearchPlace/mapAearchPlace'),
|
|
11
13
|
HyOrgGroupTree: () => import('hy-dispatch-ui-v3/es/bussiness/hyOrgGroupTree/orgGroupTree'),
|
|
12
14
|
HyPlanGroupDeviceTree: () => import('hy-dispatch-ui-v3/es/bussiness/hyPlanGroupDeviceTree/planGroupDeviceTree'),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentInstance, inject,
|
|
1
|
+
import { getCurrentInstance, inject, computed, unref } from 'vue';
|
|
2
2
|
import { useGlobalConfig } from './useGlobalConfig.mjs';
|
|
3
3
|
|
|
4
4
|
const localBaseMainStoreKey = /* @__PURE__ */ Symbol("baseMainStore");
|
|
@@ -14,14 +14,25 @@ const defaultBaseMainStore = () => ({
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
const useBaseMainStore = () => {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const instance = getCurrentInstance();
|
|
18
|
+
if (instance) {
|
|
19
|
+
const injectedStore = inject(localBaseMainStoreKey, void 0);
|
|
19
20
|
return {
|
|
20
|
-
baseMainStore:
|
|
21
|
+
baseMainStore: computed(() => {
|
|
22
|
+
const storeOrFactory = unref(injectedStore);
|
|
23
|
+
if (storeOrFactory) {
|
|
24
|
+
return typeof storeOrFactory === "function" ? storeOrFactory() : storeOrFactory;
|
|
25
|
+
}
|
|
26
|
+
const globalStore = unref(useGlobalConfig()).baseMainStore;
|
|
27
|
+
return globalStore ? typeof globalStore === "function" ? globalStore() : globalStore : defaultBaseMainStore();
|
|
28
|
+
})
|
|
21
29
|
};
|
|
22
30
|
} else {
|
|
23
31
|
return {
|
|
24
|
-
baseMainStore: (
|
|
32
|
+
baseMainStore: computed(() => {
|
|
33
|
+
const globalStore = unref(useGlobalConfig()).baseMainStore;
|
|
34
|
+
return globalStore ? typeof globalStore === "function" ? globalStore() : globalStore : defaultBaseMainStore();
|
|
35
|
+
})
|
|
25
36
|
};
|
|
26
37
|
}
|
|
27
38
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { getCurrentInstance, inject,
|
|
1
|
+
import { getCurrentInstance, inject, computed, unref } from 'vue';
|
|
2
2
|
import { useGlobalConfig } from './useGlobalConfig.mjs';
|
|
3
3
|
import { bus } from './useSubscribe.mjs';
|
|
4
4
|
|
|
5
5
|
const localCurrentBusKey = /* @__PURE__ */ Symbol("currentBus");
|
|
6
6
|
const defaultCurrentBus = bus;
|
|
7
7
|
const useCurrentBus = () => {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const instance = getCurrentInstance();
|
|
9
|
+
if (instance) {
|
|
10
|
+
const injectedBus = inject(localCurrentBusKey, void 0);
|
|
10
11
|
return {
|
|
11
|
-
currentBus:
|
|
12
|
+
currentBus: computed(() => unref(injectedBus) || defaultCurrentBus)
|
|
12
13
|
};
|
|
13
14
|
} else {
|
|
14
15
|
return {
|
package/es/hooks/useDialog.mjs
CHANGED
|
@@ -13,9 +13,9 @@ function useDialog(hy) {
|
|
|
13
13
|
const minimizedTitle = ref("");
|
|
14
14
|
function setDragLevelIndex(dialogComponents) {
|
|
15
15
|
const { baseMainStore } = useBaseMainStore();
|
|
16
|
-
const dragLevel = baseMainStore.getters.dragLevel;
|
|
16
|
+
const dragLevel = baseMainStore.value.getters.dragLevel;
|
|
17
17
|
hy[`${dialogComponents}`].value.setDragLevelIndex(dragLevel);
|
|
18
|
-
baseMainStore.commit("setDragLevel");
|
|
18
|
+
baseMainStore.value.commit("setDragLevel");
|
|
19
19
|
}
|
|
20
20
|
function onMinimized(params) {
|
|
21
21
|
hy.minimized.value = params.type;
|