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
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { defineComponent, onUnmounted, onMounted, watch, ref, computed, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, createElementBlock, toDisplayString, withModifiers } from 'vue';
|
|
2
|
+
import { reverseGeocodingApi } from '../../api/common.mjs';
|
|
3
|
+
import { ElMessage } from 'element-plus';
|
|
4
|
+
import '../../hooks/index.mjs';
|
|
5
|
+
import * as index from './locale/index.mjs';
|
|
6
|
+
import { registerComponentLocale, unregisterComponentLocale, $t } from '../../hooks/useLocale.mjs';
|
|
7
|
+
import { useMixins } from '../../hooks/useMixins.mjs';
|
|
8
|
+
|
|
9
|
+
const __default__ = defineComponent({
|
|
10
|
+
name: "HyDisplayQueryAddress"
|
|
11
|
+
});
|
|
12
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
props: {
|
|
15
|
+
linesNum: {
|
|
16
|
+
type: [Number, String],
|
|
17
|
+
default: () => {
|
|
18
|
+
return 1;
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
emptyClass: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: () => {
|
|
24
|
+
return "text-auxiliary";
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
emptyText: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: () => {
|
|
30
|
+
return "--";
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
sourceType: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: () => {
|
|
36
|
+
return "";
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
item: {
|
|
40
|
+
type: Object,
|
|
41
|
+
default: () => {
|
|
42
|
+
return {};
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
// 地址参数名称
|
|
46
|
+
addressName: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: () => {
|
|
49
|
+
return "address";
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
lngName: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: () => {
|
|
55
|
+
return "lng";
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
latName: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: () => {
|
|
61
|
+
return "lat";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
setup(__props) {
|
|
66
|
+
registerComponentLocale("HyDisplayQueryAddress", index);
|
|
67
|
+
onUnmounted(() => {
|
|
68
|
+
unregisterComponentLocale("HyDisplayQueryAddress");
|
|
69
|
+
});
|
|
70
|
+
const $t$1 = (key, option) => $t(`HyDisplayQueryAddress.${key}`, option);
|
|
71
|
+
const props = __props;
|
|
72
|
+
function useDisplayQueryAddress(hy) {
|
|
73
|
+
onMounted(() => {
|
|
74
|
+
watch(
|
|
75
|
+
() => props.item?.[props.addressName],
|
|
76
|
+
(newVal) => {
|
|
77
|
+
hy.address.value = newVal;
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
// deep: true,
|
|
81
|
+
immediate: true
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
});
|
|
85
|
+
const getAddressType2 = ref(false);
|
|
86
|
+
const address2 = ref(null);
|
|
87
|
+
const lng2 = computed(() => {
|
|
88
|
+
return props.item[`${props.lngName}`];
|
|
89
|
+
});
|
|
90
|
+
const lat2 = computed(() => {
|
|
91
|
+
return props.item[`${props.latName}`];
|
|
92
|
+
});
|
|
93
|
+
async function getAddress2() {
|
|
94
|
+
hy.getAddressType.value = true;
|
|
95
|
+
const res = await reverseGeocodingApi({
|
|
96
|
+
list: [
|
|
97
|
+
{
|
|
98
|
+
sourceType: props.sourceType,
|
|
99
|
+
createDtm: props.item.createDtm,
|
|
100
|
+
sourceId: props.item.id,
|
|
101
|
+
lng: hy.lng.value,
|
|
102
|
+
lat: hy.lat.value
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
});
|
|
106
|
+
if (res && res.code === 200) {
|
|
107
|
+
const dataList = res.data || [];
|
|
108
|
+
if (dataList.length) {
|
|
109
|
+
hy.address.value = dataList[0].address;
|
|
110
|
+
hy.getAddressType.value = false;
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
ElMessage.error($t$1("failedToGetAddress"));
|
|
114
|
+
hy.getAddressType.value = false;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
getAddressType: getAddressType2,
|
|
119
|
+
address: address2,
|
|
120
|
+
lng: lng2,
|
|
121
|
+
lat: lat2,
|
|
122
|
+
getAddress: getAddress2
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const {
|
|
126
|
+
address,
|
|
127
|
+
getAddress,
|
|
128
|
+
getAddressType,
|
|
129
|
+
lat,
|
|
130
|
+
lng
|
|
131
|
+
} = useMixins({}, [useDisplayQueryAddress]);
|
|
132
|
+
return (_ctx, _cache) => {
|
|
133
|
+
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
134
|
+
return openBlock(), createBlock(_component_el_tooltip, {
|
|
135
|
+
disabled: !unref(address),
|
|
136
|
+
content: unref(address),
|
|
137
|
+
"show-after": 500,
|
|
138
|
+
class: "text-xs"
|
|
139
|
+
}, {
|
|
140
|
+
default: withCtx(() => [
|
|
141
|
+
createElementVNode(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
class: normalizeClass([{
|
|
145
|
+
"overflow-ellipsis overflow-hidden whitespace-nowrap": Number(__props.linesNum) === 1,
|
|
146
|
+
over_two_line: Number(__props.linesNum) === 2
|
|
147
|
+
}, "w-full"])
|
|
148
|
+
},
|
|
149
|
+
[
|
|
150
|
+
unref(address) ? (openBlock(), createElementBlock(
|
|
151
|
+
"span",
|
|
152
|
+
{ key: 0 },
|
|
153
|
+
toDisplayString(unref(address)),
|
|
154
|
+
1
|
|
155
|
+
/* TEXT */
|
|
156
|
+
)) : unref(lng) && unref(lat) ? (openBlock(), createElementBlock("div", {
|
|
157
|
+
key: 1,
|
|
158
|
+
onClick: withModifiers(($event) => unref(getAddress)(), ["stop"]),
|
|
159
|
+
class: "w-full box-border text-center text-theme rounded border border-theme px-1 py-0.5 text-xs clickBox float-left"
|
|
160
|
+
}, toDisplayString(unref(getAddressType) ? $t$1("querying") : $t$1("queryAddress")), 9, ["onClick"])) : (openBlock(), createElementBlock(
|
|
161
|
+
"span",
|
|
162
|
+
{
|
|
163
|
+
key: 2,
|
|
164
|
+
class: normalizeClass(__props.emptyClass)
|
|
165
|
+
},
|
|
166
|
+
toDisplayString(__props.emptyText),
|
|
167
|
+
3
|
|
168
|
+
/* TEXT, CLASS */
|
|
169
|
+
))
|
|
170
|
+
],
|
|
171
|
+
2
|
|
172
|
+
/* CLASS */
|
|
173
|
+
)
|
|
174
|
+
]),
|
|
175
|
+
_: 1
|
|
176
|
+
/* STABLE */
|
|
177
|
+
}, 8, ["disabled", "content"]);
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './displayQueryAddress.vue.mjs';
|
|
2
|
+
import '../../utils/index.mjs';
|
|
3
|
+
import { withInstall } from '../../utils/handler.mjs';
|
|
4
|
+
import _sfc_main from './displayQueryAddress2.vue.mjs';
|
|
5
|
+
|
|
6
|
+
const HyDisplayQueryAddress = withInstall(_sfc_main);
|
|
7
|
+
|
|
8
|
+
export { HyDisplayQueryAddress, HyDisplayQueryAddress as default };
|
|
File without changes
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { defineComponent, onMounted, nextTick, useTemplateRef, ref, openBlock, createElementBlock, createElementVNode, createVNode, unref, withCtx, Fragment, renderList, createBlock, toDisplayString, createTextVNode, createCommentVNode } from 'vue';
|
|
2
|
+
import '../../../hooks/index.mjs';
|
|
3
|
+
import '../../../components/index.mjs';
|
|
4
|
+
import { ElRow, ElCol } from 'element-plus';
|
|
5
|
+
import { getPublicFileSize } from '../../../utils/input.mjs';
|
|
6
|
+
import { $t } from '../../../hooks/useLocale.mjs';
|
|
7
|
+
import { useBaseMainStore } from '../../../hooks/useBaseMainStore.mjs';
|
|
8
|
+
import { useMixins } from '../../../hooks/useMixins.mjs';
|
|
9
|
+
import { HyAudioPlayer } from '../../../components/hyAudioPlayer/index.mjs';
|
|
10
|
+
|
|
11
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "audioDetail",
|
|
13
|
+
props: {
|
|
14
|
+
item: {
|
|
15
|
+
type: Object,
|
|
16
|
+
required: true,
|
|
17
|
+
default: () => {
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
playList: {
|
|
21
|
+
type: Array,
|
|
22
|
+
required: true,
|
|
23
|
+
default: () => []
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
emits: ["playItemChange"],
|
|
27
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
28
|
+
const $t$1 = (key, option) => $t(`HyFilePlayback.${key}`, option);
|
|
29
|
+
const emit = __emit;
|
|
30
|
+
const props = __props;
|
|
31
|
+
function useAudioDetail(hy) {
|
|
32
|
+
const { baseMainStore } = useBaseMainStore();
|
|
33
|
+
onMounted(() => {
|
|
34
|
+
let newColorObject = baseMainStore.value.getters.colorObject || {};
|
|
35
|
+
const newColors = {
|
|
36
|
+
2: newColorObject.auxiliary,
|
|
37
|
+
3: newColorObject.warning,
|
|
38
|
+
4: newColorObject.success,
|
|
39
|
+
5: newColorObject.theme
|
|
40
|
+
};
|
|
41
|
+
nextTick(() => {
|
|
42
|
+
hy.playItem.value = {};
|
|
43
|
+
hy.playStart(null, hy.props.item);
|
|
44
|
+
hy.colors.value = newColors;
|
|
45
|
+
hy.colorObject.value = newColorObject;
|
|
46
|
+
nextTick(() => {
|
|
47
|
+
audioPlayerRef2.value?.playAudio(hy.playItem.value.filePath, hy.playItem.value);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
const fileScoreRef2 = useTemplateRef("fileScoreRef");
|
|
52
|
+
const audioPlayerRef2 = useTemplateRef("audioPlayerRef");
|
|
53
|
+
const paramsList2 = ref([
|
|
54
|
+
{ name: $t$1("fileNumber"), params: "fileUniqueId" },
|
|
55
|
+
{ name: $t$1("audioDuration"), params: "audioLength" },
|
|
56
|
+
{ name: $t$1("fileName"), params: "fileName" },
|
|
57
|
+
{ name: $t$1("fileSize"), params: "fileSize" },
|
|
58
|
+
{ name: $t$1("creationTime"), params: "uploadDateStr" },
|
|
59
|
+
{ name: $t$1("equipmentNumber"), params: "deviceId" },
|
|
60
|
+
{ name: $t$1("collectionTime"), params: "fileDtmStart" },
|
|
61
|
+
{ name: $t$1("deviceName"), params: "devName" },
|
|
62
|
+
{ name: $t$1("workNumber"), params: "jobNum" },
|
|
63
|
+
{ name: $t$1("userName-0"), params: "devUserName" },
|
|
64
|
+
{ name: $t$1("collectionStationIP"), params: "sip" },
|
|
65
|
+
{ name: $t$1("deviceCode"), params: "deviceCode" }
|
|
66
|
+
]);
|
|
67
|
+
const fileScoreLoading2 = ref(true);
|
|
68
|
+
const fileScore2 = ref(null);
|
|
69
|
+
const colors2 = ref({});
|
|
70
|
+
const colorObject2 = ref({});
|
|
71
|
+
const fileList2 = ref([]);
|
|
72
|
+
const playItem2 = ref({
|
|
73
|
+
id: ""
|
|
74
|
+
});
|
|
75
|
+
const audioTotalTime2 = ref(0);
|
|
76
|
+
const audioCurTime2 = ref(0);
|
|
77
|
+
function fileScoreShow2() {
|
|
78
|
+
fileScoreRef2.value?.show(hy.playItem.value.id, hy.fileScore.value).then(() => {
|
|
79
|
+
hy.playItem.value.fileScore = hy.fileScore.value;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function playEnd2() {
|
|
83
|
+
}
|
|
84
|
+
function playStart2(audioUrl, newItem = {}) {
|
|
85
|
+
const id = newItem.id;
|
|
86
|
+
if (hy.playItem.value.id !== id) {
|
|
87
|
+
hy.playItem.value = { ...newItem };
|
|
88
|
+
}
|
|
89
|
+
console.log("hy.playItem.value", hy.playItem.value);
|
|
90
|
+
emit("playItemChange", hy.playItem.value);
|
|
91
|
+
}
|
|
92
|
+
function canPlay2(totalTime) {
|
|
93
|
+
hy.audioTotalTime.value = totalTime;
|
|
94
|
+
}
|
|
95
|
+
function onTimeUpdate2(curTime) {
|
|
96
|
+
hy.audioCurTime.value = curTime;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
fileScoreRef: fileScoreRef2,
|
|
100
|
+
audioPlayerRef: audioPlayerRef2,
|
|
101
|
+
paramsList: paramsList2,
|
|
102
|
+
fileScoreLoading: fileScoreLoading2,
|
|
103
|
+
fileScore: fileScore2,
|
|
104
|
+
colors: colors2,
|
|
105
|
+
colorObject: colorObject2,
|
|
106
|
+
fileList: fileList2,
|
|
107
|
+
playItem: playItem2,
|
|
108
|
+
audioTotalTime: audioTotalTime2,
|
|
109
|
+
audioCurTime: audioCurTime2,
|
|
110
|
+
fileScoreShow: fileScoreShow2,
|
|
111
|
+
playEnd: playEnd2,
|
|
112
|
+
playStart: playStart2,
|
|
113
|
+
canPlay: canPlay2,
|
|
114
|
+
onTimeUpdate: onTimeUpdate2
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
onMounted(() => {
|
|
118
|
+
});
|
|
119
|
+
const {
|
|
120
|
+
audioCurTime,
|
|
121
|
+
audioPlayerRef,
|
|
122
|
+
audioTotalTime,
|
|
123
|
+
canPlay,
|
|
124
|
+
colorObject,
|
|
125
|
+
colors,
|
|
126
|
+
fileList,
|
|
127
|
+
fileScore,
|
|
128
|
+
fileScoreLoading,
|
|
129
|
+
fileScoreRef,
|
|
130
|
+
fileScoreShow,
|
|
131
|
+
onTimeUpdate,
|
|
132
|
+
paramsList,
|
|
133
|
+
playEnd,
|
|
134
|
+
playItem,
|
|
135
|
+
playStart
|
|
136
|
+
} = useMixins({ props }, [useAudioDetail]);
|
|
137
|
+
__expose({});
|
|
138
|
+
return (_ctx, _cache) => {
|
|
139
|
+
return openBlock(), createElementBlock("div", { class: "flex flex-col w-full h-full box-border border border-border items-center px-[15px] bg-background-2 rounded shadow-[0_0_10px_0_rgb(var(--hy-background), 1)]" }, [
|
|
140
|
+
createElementVNode("div", { class: "w-full flex mt-5" }, [
|
|
141
|
+
createVNode(unref(HyAudioPlayer), {
|
|
142
|
+
ref_key: "audioPlayerRef",
|
|
143
|
+
ref: audioPlayerRef,
|
|
144
|
+
"play-list": __props.playList,
|
|
145
|
+
onOnTimeUpdate: unref(onTimeUpdate),
|
|
146
|
+
onCanPlay: unref(canPlay),
|
|
147
|
+
onPlayEnd: unref(playEnd),
|
|
148
|
+
onPlayStart: unref(playStart)
|
|
149
|
+
}, null, 8, ["play-list", "onOnTimeUpdate", "onCanPlay", "onPlayEnd", "onPlayStart"])
|
|
150
|
+
]),
|
|
151
|
+
unref(playItem) && unref(playItem).id ? (openBlock(), createElementBlock("div", {
|
|
152
|
+
key: 0,
|
|
153
|
+
class: "w-full mb-[10px] flex-grow h-0 overflow-y-auto overflow-x-hidden mt-5"
|
|
154
|
+
}, [
|
|
155
|
+
createVNode(unref(ElRow), {
|
|
156
|
+
gutter: 20,
|
|
157
|
+
class: "text-xs text-auxiliary leading-5"
|
|
158
|
+
}, {
|
|
159
|
+
default: withCtx(() => [
|
|
160
|
+
(openBlock(true), createElementBlock(
|
|
161
|
+
Fragment,
|
|
162
|
+
null,
|
|
163
|
+
renderList(unref(paramsList), (paramsItem, paramsIndex) => {
|
|
164
|
+
return openBlock(), createBlock(unref(ElCol), {
|
|
165
|
+
key: paramsIndex + "_paramsList",
|
|
166
|
+
span: paramsItem.span || 12
|
|
167
|
+
}, {
|
|
168
|
+
default: withCtx(() => [
|
|
169
|
+
createElementVNode("div", { class: "flex mb-1.5" }, [
|
|
170
|
+
createElementVNode(
|
|
171
|
+
"span",
|
|
172
|
+
{
|
|
173
|
+
class: "w-[70px] shrink-0 mr-5",
|
|
174
|
+
style: { "text-align-last": "justify" }
|
|
175
|
+
},
|
|
176
|
+
toDisplayString(paramsItem.name) + ":",
|
|
177
|
+
1
|
|
178
|
+
/* TEXT */
|
|
179
|
+
),
|
|
180
|
+
createElementVNode("span", { class: "overflow-ellipsis overflow-hidden whitespace-nowrap text-main" }, [
|
|
181
|
+
!unref(playItem)[`${paramsItem.params}`] ? (openBlock(), createElementBlock("span", {
|
|
182
|
+
key: 0,
|
|
183
|
+
class: "text-auxiliary"
|
|
184
|
+
}, "- -")) : paramsItem.params === "audioLength" ? (openBlock(), createElementBlock(
|
|
185
|
+
"span",
|
|
186
|
+
{ key: 1 },
|
|
187
|
+
toDisplayString(unref(playItem).audioLength) + "s ",
|
|
188
|
+
1
|
|
189
|
+
/* TEXT */
|
|
190
|
+
)) : paramsItem.params === "fileSize" ? (openBlock(), createElementBlock(
|
|
191
|
+
"span",
|
|
192
|
+
{ key: 2 },
|
|
193
|
+
toDisplayString(unref(getPublicFileSize)(unref(playItem).fileSize)),
|
|
194
|
+
1
|
|
195
|
+
/* TEXT */
|
|
196
|
+
)) : paramsItem.params === "fileDtmStart" ? (openBlock(), createElementBlock("span", { key: 3 }, [
|
|
197
|
+
createTextVNode(
|
|
198
|
+
toDisplayString(unref(playItem).fileDtmStart) + " ",
|
|
199
|
+
1
|
|
200
|
+
/* TEXT */
|
|
201
|
+
),
|
|
202
|
+
createElementVNode("span", { class: "text-auxiliary" }, "-"),
|
|
203
|
+
createTextVNode(
|
|
204
|
+
" " + toDisplayString(unref(playItem).fileDtmEnd),
|
|
205
|
+
1
|
|
206
|
+
/* TEXT */
|
|
207
|
+
)
|
|
208
|
+
])) : paramsItem.params === "fileheight" ? (openBlock(), createElementBlock("span", { key: 4 }, [
|
|
209
|
+
createTextVNode(
|
|
210
|
+
toDisplayString(unref(playItem).filewidth) + " ",
|
|
211
|
+
1
|
|
212
|
+
/* TEXT */
|
|
213
|
+
),
|
|
214
|
+
createElementVNode("span", { class: "text-auxiliary" }, "*"),
|
|
215
|
+
createTextVNode(
|
|
216
|
+
" " + toDisplayString(unref(playItem).fileheight),
|
|
217
|
+
1
|
|
218
|
+
/* TEXT */
|
|
219
|
+
)
|
|
220
|
+
])) : (openBlock(), createElementBlock(
|
|
221
|
+
"span",
|
|
222
|
+
{ key: 5 },
|
|
223
|
+
toDisplayString(unref(playItem)[`${paramsItem.params}`]),
|
|
224
|
+
1
|
|
225
|
+
/* TEXT */
|
|
226
|
+
))
|
|
227
|
+
])
|
|
228
|
+
])
|
|
229
|
+
]),
|
|
230
|
+
_: 2
|
|
231
|
+
/* DYNAMIC */
|
|
232
|
+
}, 1032, ["span"]);
|
|
233
|
+
}),
|
|
234
|
+
128
|
|
235
|
+
/* KEYED_FRAGMENT */
|
|
236
|
+
))
|
|
237
|
+
]),
|
|
238
|
+
_: 1
|
|
239
|
+
/* STABLE */
|
|
240
|
+
})
|
|
241
|
+
])) : createCommentVNode("v-if", true)
|
|
242
|
+
]);
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
export { _sfc_main as default };
|