anytrek-front-public-component 1.13.13 → 1.13.14
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/README.md +12 -9
- package/anytrek-front-public-component.mjs +9267 -31797
- package/anytrek-front-public-component.umd.js +22 -256
- package/package.json +1 -1
- package/style.css +1 -1
package/README.md
CHANGED
|
@@ -786,16 +786,15 @@ const showImageDisplay = () => {
|
|
|
786
786
|
}
|
|
787
787
|
/* 2310图片轮播,triggerType为CargoHandling或者eventType为9且uuid,index相同归为一项,新增 imageList 字段存,按 takeTime 最新排序 */
|
|
788
788
|
// 2310视频,uuid一样,含有media字段
|
|
789
|
-
const groupCargoHandlingImages = (list: any[]): any[] => {
|
|
789
|
+
export const groupCargoHandlingImages = (list: any[]): any[] => {
|
|
790
790
|
const groupMap = new Map<string, any[]>();
|
|
791
|
-
const needMergeVideo = true;//
|
|
792
791
|
list.forEach((item: any) => {
|
|
793
792
|
if ((item.triggerType === 'CargoHandling' || item.eventType === 9) && item.uuid) {
|
|
794
793
|
const key = `picture-${item.uuid}-${item.index}`;
|
|
795
794
|
if (!groupMap.has(key)) groupMap.set(key, []);
|
|
796
795
|
groupMap.get(key)!.push(item);
|
|
797
796
|
}
|
|
798
|
-
if (item.media && item.uuid
|
|
797
|
+
if (item.media && item.uuid) {
|
|
799
798
|
const key = `media-${item.uuid}`;
|
|
800
799
|
if (!groupMap.has(key)) groupMap.set(key, []);
|
|
801
800
|
groupMap.get(key)!.push(item);
|
|
@@ -839,15 +838,19 @@ const groupCargoHandlingImages = (list: any[]): any[] => {
|
|
|
839
838
|
}
|
|
840
839
|
|
|
841
840
|
});
|
|
841
|
+
|
|
842
842
|
list.forEach((item: any) => {
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
const isNotMutiplePicture = item.triggerType !== 'CargoHandling' && item.eventType !== 9;
|
|
847
|
-
const isNotMedia = !needMergeVideo || !item.media;
|
|
848
|
-
if (isNotMutiplePicture && isNotMedia) {
|
|
843
|
+
const isNotMutiplePicture = !item.media && (!item.uuid || (item.triggerType !== 'CargoHandling' && item.eventType !== 9));
|
|
844
|
+
const isNotMergeMedia = item.media && !item.uuid;
|
|
845
|
+
if (isNotMutiplePicture) {
|
|
849
846
|
result.push(item);
|
|
850
847
|
}
|
|
848
|
+
if (isNotMergeMedia) {
|
|
849
|
+
let timeStampGap = 0;
|
|
850
|
+
timeStampGap = new Date(item.endTime).getTime() - new Date(item.startTime).getTime();
|
|
851
|
+
let timeGap = formatDuration(timeStampGap, { d: true, h: true, m: true, s: true });
|
|
852
|
+
result.push({ ...item, videoList: [item], timeGap });
|
|
853
|
+
}
|
|
851
854
|
});
|
|
852
855
|
result.sort((a, b) => new Date(b.takeTime).getTime() - new Date(a.takeTime).getTime());
|
|
853
856
|
return result;
|