feat: 第一次打包可用版本上线
This commit is contained in:
parent
3cdb025883
commit
315d075c96
2
.npmrc
2
.npmrc
@ -1,4 +1,4 @@
|
||||
registry="https://registry.npm.taobao.org/"
|
||||
registry="https://registry.npmmirror.com"
|
||||
@zhst:registry="http://10.0.0.77:4874"
|
||||
strict-peer-dependencies=false
|
||||
ignore-workspace-root-check=true
|
||||
|
@ -146,7 +146,7 @@ lint 工具库,包含:eslint-config、eslint-plugin、commit-lint
|
||||
接口一键生成工具
|
||||
:::
|
||||
|
||||
:::info{title=@zhst/types}
|
||||
:::info{title=@types/zhst}
|
||||
类型定义库
|
||||
:::
|
||||
|
||||
|
1
global.d.ts
vendored
1
global.d.ts
vendored
@ -1,3 +1,4 @@
|
||||
declare module '@zhst/func';
|
||||
declare module '@zhst/hooks';
|
||||
declare module '@zhst/meta';
|
||||
declare module '@zhst/request';
|
||||
|
@ -1,5 +1,78 @@
|
||||
# @zhst/biz
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- feat: 初版发布
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/hooks@0.5.0
|
||||
- @zhst/func@0.5.0
|
||||
- @zhst/meta@0.6.0
|
||||
|
||||
## 0.4.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/meta@0.5.2
|
||||
|
||||
## 0.4.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- feat: 初始化
|
||||
- Updated dependencies
|
||||
- @zhst/hooks@0.4.1
|
||||
- @zhst/func@0.4.1
|
||||
- @zhst/meta@0.5.1
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- fix: 修改 pkg
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/hooks@0.4.0
|
||||
- @zhst/func@0.4.0
|
||||
- @zhst/meta@0.5.0
|
||||
|
||||
## 0.3.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/meta@0.4.4
|
||||
|
||||
## 0.3.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/meta@0.4.3
|
||||
|
||||
## 0.3.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/meta@0.4.2
|
||||
|
||||
## 0.3.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/func@0.3.1
|
||||
- @zhst/hooks@0.3.1
|
||||
- @zhst/meta@0.4.1
|
||||
|
||||
## 0.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
35
packages/biz/es/BigImageModal/BigImageModal.d.ts
vendored
35
packages/biz/es/BigImageModal/BigImageModal.d.ts
vendored
@ -1,23 +1,40 @@
|
||||
import React from 'react';
|
||||
import type { ModalProps, DescriptionsProps, TabsProps } from 'antd';
|
||||
import type { ModalProps, DescriptionsProps, TabsProps, VideoViewRef, ImgViewRef } from '@zhst/meta';
|
||||
import './index.less';
|
||||
export declare const componentPrefix = "zhst-image";
|
||||
export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'VIDEO';
|
||||
export type MODEL_TYPE = 'VIDEO' | 'IMAGE';
|
||||
export interface BigImageModalProps extends ModalProps {
|
||||
visible: boolean;
|
||||
descriptionConfig: {
|
||||
data: {
|
||||
title: string;
|
||||
children: Pick<DescriptionsProps, 'items'>;
|
||||
}[];
|
||||
activeTab?: TAB_TYPE;
|
||||
attributeList: {
|
||||
title: string;
|
||||
children: Pick<DescriptionsProps, 'items'>;
|
||||
};
|
||||
tabsConfig: {
|
||||
tabs: {
|
||||
data: Pick<TabsProps, 'items'> & {
|
||||
key: 'NORMAL' | 'COMPATER' | 'TRACK';
|
||||
key: TAB_TYPE;
|
||||
};
|
||||
};
|
||||
dataSource: any;
|
||||
imageData: any;
|
||||
relatedData: any;
|
||||
isRelated?: boolean;
|
||||
footer?: React.ReactNode;
|
||||
showCarousel?: boolean;
|
||||
onTabChange?: (newVal?: TAB_TYPE, oldVal?: TAB_TYPE) => void;
|
||||
onIndexChange?: (newVal?: number, oldVal?: number) => void;
|
||||
transformPropFunc: (data: any) => void;
|
||||
}
|
||||
declare const BigImageModal: React.FC<BigImageModalProps>;
|
||||
interface BigModalRef {
|
||||
tab: TAB_TYPE;
|
||||
setTab: (tab: TAB_TYPE) => void;
|
||||
modalRef: ModalProps;
|
||||
activeKey: string;
|
||||
setActiveKey: (val: string) => void;
|
||||
videoPlayerRef: VideoViewRef;
|
||||
combineImageRef: any;
|
||||
bigImagePreviewRef: ImgViewRef;
|
||||
}
|
||||
declare const BigImageModal: React.FC<BigImageModalProps, BigModalRef>;
|
||||
export default BigImageModal;
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,11 +3,14 @@
|
||||
box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
|
||||
}
|
||||
|
||||
.zhst-tabs .zhst-tabs-nav-wrap {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
|
||||
|
||||
&-view-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 532px;
|
||||
margin-bottom: 16px;
|
||||
|
||||
&__nav {
|
||||
@ -226,231 +229,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.zhst-image__header {
|
||||
width: 100%;
|
||||
// margin-top: 3px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&__pad0 {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&__pad66 {
|
||||
padding: 0 66px;
|
||||
}
|
||||
|
||||
&__bar {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
background: #f6f6f6;
|
||||
// box-shadow: 0px 0px 8px 0px rgba(172, 172, 172, 0.5);
|
||||
justify-content: center;
|
||||
// border-color: #f0f0f0;
|
||||
// border-bottom-width: 1px;
|
||||
// border-bottom-style: solid;
|
||||
}
|
||||
|
||||
&__barNoColor {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
border-color: #f0f0f0;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
&__item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: 40px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 15px;
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
line-height: 19px;
|
||||
transition: font-size 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
// font-size: 18px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
width: 0;
|
||||
border-bottom: 2px solid #09f;
|
||||
content: '';
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
&--active {
|
||||
background-color: transparent;
|
||||
color: #333;
|
||||
font-size: 18px;
|
||||
|
||||
// color: #0099ff;
|
||||
&::before {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.zhst-image__compater-view {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&>div:first-child {
|
||||
margin-right: 25px;
|
||||
}
|
||||
|
||||
&>div:last-child {
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
&__container {
|
||||
position: relative;
|
||||
width: 345px;
|
||||
height: 460px;
|
||||
box-sizing: content-box;
|
||||
border: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
&__view {
|
||||
width: 345px;
|
||||
height: 460px;
|
||||
}
|
||||
|
||||
&__label {
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
height: 34px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
// width: 48px;
|
||||
padding: 0 6px;
|
||||
background: #09f;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&__tool {
|
||||
display: flex;
|
||||
width: 345px;
|
||||
height: 40px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f9f9f9;
|
||||
|
||||
i,
|
||||
span {
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
i {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
&>*:not(:last-child) {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
&__scale {
|
||||
display: inline-block;
|
||||
width: 38px;
|
||||
height: 16px;
|
||||
|
||||
// margin-left: 15px;
|
||||
box-sizing: content-box;
|
||||
border: 1px solid rgb(77 77 77 / 100%);
|
||||
background: rgb(255 255 255 / 100%);
|
||||
border-radius: 2px;
|
||||
color: #4d4d4d;
|
||||
cursor: default;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&__line {
|
||||
width: 1px;
|
||||
height: 14px;
|
||||
background: #e6e6e6;
|
||||
}
|
||||
}
|
||||
|
||||
&__empty {
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f9f9f9;
|
||||
transform: translateY(-100%);
|
||||
|
||||
&>img {
|
||||
width: 140px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
&--text {
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
&__scoll-module {
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
left: 0%;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
pointer-events: none;
|
||||
|
||||
&__btn {
|
||||
display: flex;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 6px;
|
||||
border-radius: 50%;
|
||||
opacity: 0.5;
|
||||
pointer-events: all;
|
||||
|
||||
&>span {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
&__btn:hover {
|
||||
background-color: #09f !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zhst-image__trackmodel {
|
||||
&__panel {
|
||||
position: relative;
|
||||
@ -643,23 +421,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.zhst-image__null {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&__text {
|
||||
// margin-left: 105px;
|
||||
margin-top: 8px;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.zhst-image__attributePanel {
|
||||
margin: 0 66px;
|
||||
background: #f6f6f6;
|
||||
@ -713,23 +474,6 @@
|
||||
.relatedPics {
|
||||
width: 742px;
|
||||
height: 100px;
|
||||
// display: flex;
|
||||
// box-sizing: border-box;
|
||||
// background: #fafafa;
|
||||
// border-radius: 2px;
|
||||
// border: 1px solid #f0f0f0;
|
||||
// .LeftBtn,
|
||||
// .RighttBtn {
|
||||
// width: 34px;
|
||||
// height: 100%;
|
||||
// display: flex;
|
||||
// justify-content: center;
|
||||
// align-items: center;
|
||||
// }
|
||||
// .ListContent {
|
||||
// flex: 1;
|
||||
// height: 100%;
|
||||
// }
|
||||
}
|
||||
|
||||
.disabled {
|
||||
|
294
packages/biz/es/BigImageModal/mock.d.ts
vendored
294
packages/biz/es/BigImageModal/mock.d.ts
vendored
@ -1,294 +0,0 @@
|
||||
export declare const IMAGE_DATA: {
|
||||
enAbleDeleteFeature: boolean;
|
||||
tabsFilter: string[];
|
||||
dataSources: {
|
||||
objectId: string;
|
||||
condition: {
|
||||
featureInfo: null;
|
||||
featureData: string;
|
||||
imageData: string;
|
||||
alg: string;
|
||||
rect: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
objectImageUrl: string;
|
||||
srcImageUrl: string;
|
||||
};
|
||||
score: number;
|
||||
timestamp: number;
|
||||
deviceId: string;
|
||||
id: string;
|
||||
name: string;
|
||||
dirid: string;
|
||||
status: string;
|
||||
longitude: number;
|
||||
latitude: number;
|
||||
caseId: string;
|
||||
caseGroup: string;
|
||||
isDeleted: string;
|
||||
extendInfo: {
|
||||
vmsPlatformId: string;
|
||||
vmsChannel: string;
|
||||
vmsCameraDecoderTag: string;
|
||||
platformPluginType: string;
|
||||
deviceVender: string;
|
||||
type: string;
|
||||
ip: string;
|
||||
port: string;
|
||||
username: string;
|
||||
passwd: string;
|
||||
rtspAddress: string;
|
||||
facesnapChannel: string;
|
||||
edgeDeviceSn: string;
|
||||
platform1400Id: number;
|
||||
useRtspAddress: boolean;
|
||||
frameCheck: boolean;
|
||||
frameRectX: number;
|
||||
frameRectY: number;
|
||||
frameRectW: number;
|
||||
frameRectH: number;
|
||||
edgeNodeId: string;
|
||||
processStatus: string;
|
||||
};
|
||||
objectIndex: {
|
||||
objectId: string;
|
||||
solutionId: string;
|
||||
deviceId: string;
|
||||
fragmentId: string;
|
||||
};
|
||||
objectType: string;
|
||||
isObjectTrack: boolean;
|
||||
pathId: string;
|
||||
frameInfo: {
|
||||
frameId: string;
|
||||
frameTimestamp: string;
|
||||
width: number;
|
||||
height: number;
|
||||
originWidth: number;
|
||||
originHeight: number;
|
||||
offsetTime: string;
|
||||
skipNumber: string;
|
||||
};
|
||||
level: number;
|
||||
bboxInFrame: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
bboxExtInFrame: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
objectImageKey: string;
|
||||
objectExtImageKey: string;
|
||||
frameImageKey: string;
|
||||
confidence: number;
|
||||
sourceObjectId: string;
|
||||
storeTimestamp: string;
|
||||
gbNumber: string;
|
||||
qualityScore: number;
|
||||
subObjectCount: number;
|
||||
subObjectType: string[];
|
||||
subObjectIds: string[];
|
||||
cameraInfo: {
|
||||
id: string;
|
||||
name: string;
|
||||
dirid: string;
|
||||
status: string;
|
||||
longitude: number;
|
||||
latitude: number;
|
||||
caseId: string;
|
||||
caseGroup: string;
|
||||
isDeleted: string;
|
||||
extendInfo: {
|
||||
vmsPlatformId: string;
|
||||
vmsChannel: string;
|
||||
vmsCameraDecoderTag: string;
|
||||
platformPluginType: string;
|
||||
deviceVender: string;
|
||||
type: string;
|
||||
ip: string;
|
||||
port: string;
|
||||
username: string;
|
||||
passwd: string;
|
||||
rtspAddress: string;
|
||||
facesnapChannel: string;
|
||||
edgeDeviceSn: string;
|
||||
platform1400Id: number;
|
||||
useRtspAddress: boolean;
|
||||
frameCheck: boolean;
|
||||
frameRectX: number;
|
||||
frameRectY: number;
|
||||
frameRectW: number;
|
||||
frameRectH: number;
|
||||
edgeNodeId: string;
|
||||
processStatus: string;
|
||||
};
|
||||
};
|
||||
solutionId: string;
|
||||
fragmentId: string;
|
||||
contrastKey: string;
|
||||
compaterImages: string[];
|
||||
imgSummary: string;
|
||||
imageKey: string;
|
||||
srcImageUrl: string;
|
||||
algorithmVersion: string;
|
||||
cameraId: string;
|
||||
cameraName: string;
|
||||
}[];
|
||||
selectIndex: number;
|
||||
disableBtn: number[];
|
||||
dataSource: {
|
||||
objectId: string;
|
||||
condition: {
|
||||
featureInfo: null;
|
||||
featureData: string;
|
||||
imageData: string;
|
||||
alg: string;
|
||||
rect: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
objectImageUrl: string;
|
||||
srcImageUrl: string;
|
||||
};
|
||||
score: number;
|
||||
timestamp: number;
|
||||
deviceId: string;
|
||||
id: string;
|
||||
name: string;
|
||||
dirid: string;
|
||||
status: string;
|
||||
longitude: number;
|
||||
latitude: number;
|
||||
caseId: string;
|
||||
caseGroup: string;
|
||||
isDeleted: string;
|
||||
extendInfo: {
|
||||
vmsPlatformId: string;
|
||||
vmsChannel: string;
|
||||
vmsCameraDecoderTag: string;
|
||||
platformPluginType: string;
|
||||
deviceVender: string;
|
||||
type: string;
|
||||
ip: string;
|
||||
port: string;
|
||||
username: string;
|
||||
passwd: string;
|
||||
rtspAddress: string;
|
||||
facesnapChannel: string;
|
||||
edgeDeviceSn: string;
|
||||
platform1400Id: number;
|
||||
useRtspAddress: boolean;
|
||||
frameCheck: boolean;
|
||||
frameRectX: number;
|
||||
frameRectY: number;
|
||||
frameRectW: number;
|
||||
frameRectH: number;
|
||||
edgeNodeId: string;
|
||||
processStatus: string;
|
||||
};
|
||||
objectIndex: {
|
||||
objectId: string;
|
||||
solutionId: string;
|
||||
deviceId: string;
|
||||
fragmentId: string;
|
||||
};
|
||||
objectType: string;
|
||||
isObjectTrack: boolean;
|
||||
pathId: string;
|
||||
frameInfo: {
|
||||
frameId: string;
|
||||
frameTimestamp: string;
|
||||
width: number;
|
||||
height: number;
|
||||
originWidth: number;
|
||||
originHeight: number;
|
||||
offsetTime: string;
|
||||
skipNumber: string;
|
||||
};
|
||||
level: number;
|
||||
bboxInFrame: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
bboxExtInFrame: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
objectImageKey: string;
|
||||
objectExtImageKey: string;
|
||||
frameImageKey: string;
|
||||
confidence: number;
|
||||
sourceObjectId: string;
|
||||
storeTimestamp: string;
|
||||
gbNumber: string;
|
||||
qualityScore: number;
|
||||
subObjectCount: number;
|
||||
subObjectType: string[];
|
||||
subObjectIds: string[];
|
||||
cameraInfo: {
|
||||
id: string;
|
||||
name: string;
|
||||
dirid: string;
|
||||
status: string;
|
||||
longitude: number;
|
||||
latitude: number;
|
||||
caseId: string;
|
||||
caseGroup: string;
|
||||
isDeleted: string;
|
||||
extendInfo: {
|
||||
vmsPlatformId: string;
|
||||
vmsChannel: string;
|
||||
vmsCameraDecoderTag: string;
|
||||
platformPluginType: string;
|
||||
deviceVender: string;
|
||||
type: string;
|
||||
ip: string;
|
||||
port: string;
|
||||
username: string;
|
||||
passwd: string;
|
||||
rtspAddress: string;
|
||||
facesnapChannel: string;
|
||||
edgeDeviceSn: string;
|
||||
platform1400Id: number;
|
||||
useRtspAddress: boolean;
|
||||
frameCheck: boolean;
|
||||
frameRectX: number;
|
||||
frameRectY: number;
|
||||
frameRectW: number;
|
||||
frameRectH: number;
|
||||
edgeNodeId: string;
|
||||
processStatus: string;
|
||||
};
|
||||
};
|
||||
solutionId: string;
|
||||
fragmentId: string;
|
||||
contrastKey: string;
|
||||
compaterImages: string[];
|
||||
imgSummary: string;
|
||||
imageKey: string;
|
||||
srcImageUrl: string;
|
||||
algorithmVersion: string;
|
||||
cameraId: string;
|
||||
cameraName: string;
|
||||
}[];
|
||||
isArchiveDetail: boolean;
|
||||
ToolProps: {
|
||||
renderVideoBtn: boolean;
|
||||
disableVideo: boolean;
|
||||
};
|
||||
specialTitle: string;
|
||||
};
|
@ -1,427 +1,6 @@
|
||||
export var IMAGE_DATA = {
|
||||
"enAbleDeleteFeature": true,
|
||||
"tabsFilter": ["COMPATER", "NORMAL"],
|
||||
"dataSources": [{
|
||||
"objectId": "1742110565582518272",
|
||||
"condition": {
|
||||
"featureInfo": null,
|
||||
"featureData": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
||||
"imageData": "",
|
||||
"alg": "VERSION_REID_HEAD_ATTR",
|
||||
"rect": {
|
||||
"x": 0.271875,
|
||||
"y": 0.32222223,
|
||||
"w": 0.2859375,
|
||||
"h": 0.67777777
|
||||
},
|
||||
"objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg",
|
||||
"srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg"
|
||||
},
|
||||
"score": 0.7163062,
|
||||
"timestamp": 1704186491979,
|
||||
"deviceId": "129533",
|
||||
"id": "129533",
|
||||
"name": "4楼门口过道人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.125,
|
||||
"latitude": 30.280500411987305,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
},
|
||||
"objectIndex": {
|
||||
"objectId": "1742110565582518272",
|
||||
"solutionId": "1",
|
||||
"deviceId": "129533",
|
||||
"fragmentId": "0"
|
||||
},
|
||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||
"isObjectTrack": true,
|
||||
"pathId": "1742110532019697664",
|
||||
"frameInfo": {
|
||||
"frameId": "0",
|
||||
"frameTimestamp": "1704186491979",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"originWidth": 1920,
|
||||
"originHeight": 1080,
|
||||
"offsetTime": "24714687",
|
||||
"skipNumber": "0"
|
||||
},
|
||||
"level": 1,
|
||||
"bboxInFrame": {
|
||||
"x": 0.603125,
|
||||
"y": 0.3314815,
|
||||
"w": 0.0578125,
|
||||
"h": 0.2712963
|
||||
},
|
||||
"bboxExtInFrame": {
|
||||
"x": 0.546875,
|
||||
"y": 0.2638889,
|
||||
"w": 0.17135416,
|
||||
"h": 0.40648147
|
||||
},
|
||||
"objectImageKey": "",
|
||||
"objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565582518272.jpg",
|
||||
"frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565603489792.jpg",
|
||||
"confidence": 0.817271,
|
||||
"sourceObjectId": "1742110565603489792",
|
||||
"storeTimestamp": "0",
|
||||
"gbNumber": "",
|
||||
"qualityScore": 0,
|
||||
"subObjectCount": 1,
|
||||
"subObjectType": ["OBJECT_TYPE_FACE"],
|
||||
"subObjectIds": ["1742110532015503360"],
|
||||
"cameraInfo": {
|
||||
"id": "129533",
|
||||
"name": "4楼门口过道人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.125,
|
||||
"latitude": 30.280500411987305,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
}
|
||||
},
|
||||
"solutionId": "1",
|
||||
"fragmentId": "0",
|
||||
"contrastKey": "singer-20240102/1/129533/1742110565582518272.jpg",
|
||||
"compaterImages": ["http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"],
|
||||
"imgSummary": "singer-20240102/1/129533/1742110565582518272.jpg",
|
||||
"imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565582518272.jpg",
|
||||
"srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565603489792.jpg",
|
||||
"algorithmVersion": "VERSION_REID_HEAD_ATTR",
|
||||
"cameraId": "129533",
|
||||
"cameraName": "4楼门口过道人脸"
|
||||
}, {
|
||||
"objectId": "1742092780462684161",
|
||||
"condition": {
|
||||
"featureInfo": null,
|
||||
"featureData": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
||||
"imageData": "",
|
||||
"alg": "VERSION_REID_HEAD_ATTR",
|
||||
"rect": {
|
||||
"x": 0.271875,
|
||||
"y": 0.32222223,
|
||||
"w": 0.2859375,
|
||||
"h": 0.67777777
|
||||
},
|
||||
"objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg",
|
||||
"srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg"
|
||||
},
|
||||
"score": 0.70154816,
|
||||
"timestamp": 1704182251640,
|
||||
"deviceId": "129533",
|
||||
"id": "129533",
|
||||
"name": "4楼门口过道人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.125,
|
||||
"latitude": 30.280500411987305,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
},
|
||||
"objectIndex": {
|
||||
"objectId": "1742092780462684161",
|
||||
"solutionId": "1",
|
||||
"deviceId": "129533",
|
||||
"fragmentId": "0"
|
||||
},
|
||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||
"isObjectTrack": true,
|
||||
"pathId": "1742092746237163520",
|
||||
"frameInfo": {
|
||||
"frameId": "0",
|
||||
"frameTimestamp": "1704182251640",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"originWidth": 1920,
|
||||
"originHeight": 1080,
|
||||
"offsetTime": "20474348",
|
||||
"skipNumber": "0"
|
||||
},
|
||||
"level": 1,
|
||||
"bboxInFrame": {
|
||||
"x": 0.63177085,
|
||||
"y": 0.38333333,
|
||||
"w": 0.078125,
|
||||
"h": 0.3537037
|
||||
},
|
||||
"bboxExtInFrame": {
|
||||
"x": 0.55885416,
|
||||
"y": 0.29537037,
|
||||
"w": 0.22447917,
|
||||
"h": 0.5314815
|
||||
},
|
||||
"objectImageKey": "",
|
||||
"objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092780462684161.jpg",
|
||||
"frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092780768868352.jpg",
|
||||
"confidence": 0.888334,
|
||||
"sourceObjectId": "1742092780768868352",
|
||||
"storeTimestamp": "0",
|
||||
"gbNumber": "",
|
||||
"qualityScore": 0,
|
||||
"subObjectCount": 1,
|
||||
"subObjectType": ["OBJECT_TYPE_FACE"],
|
||||
"subObjectIds": ["1742092746232969217"],
|
||||
"cameraInfo": {
|
||||
"id": "129533",
|
||||
"name": "4楼门口过道人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.125,
|
||||
"latitude": 30.280500411987305,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
}
|
||||
},
|
||||
"solutionId": "1",
|
||||
"fragmentId": "0",
|
||||
"contrastKey": "singer-20240102/1/129533/1742092780462684161.jpg",
|
||||
"compaterImages": ["http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"],
|
||||
"imgSummary": "singer-20240102/1/129533/1742092780462684161.jpg",
|
||||
"imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092780462684161.jpg",
|
||||
"srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092780768868352.jpg",
|
||||
"algorithmVersion": "VERSION_REID_HEAD_ATTR",
|
||||
"cameraId": "129533",
|
||||
"cameraName": "4楼门口过道人脸"
|
||||
}, {
|
||||
"objectId": "1742092514409592832",
|
||||
"condition": {
|
||||
"featureInfo": null,
|
||||
"featureData": "AAAAAAAAAAAAAAA==",
|
||||
"imageData": "",
|
||||
"alg": "VERSION_REID_HEAD_ATTR",
|
||||
"rect": {
|
||||
"x": 0.271875,
|
||||
"y": 0.32222223,
|
||||
"w": 0.2859375,
|
||||
"h": 0.67777777
|
||||
},
|
||||
"objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg",
|
||||
"srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg"
|
||||
},
|
||||
"score": 0.703765,
|
||||
"timestamp": 1704182186451,
|
||||
"deviceId": "129529",
|
||||
"id": "129529",
|
||||
"name": "4入口人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.12100219726562,
|
||||
"latitude": 30.280099868774414,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "34",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
},
|
||||
"objectIndex": {
|
||||
"objectId": "1742092514409592832",
|
||||
"solutionId": "1",
|
||||
"deviceId": "129529",
|
||||
"fragmentId": "0"
|
||||
},
|
||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||
"isObjectTrack": true,
|
||||
"pathId": "1742092482440607744",
|
||||
"frameInfo": {
|
||||
"frameId": "0",
|
||||
"frameTimestamp": "1704182186451",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"originWidth": 2560,
|
||||
"originHeight": 1440,
|
||||
"offsetTime": "20409182",
|
||||
"skipNumber": "0"
|
||||
},
|
||||
"level": 1,
|
||||
"bboxInFrame": {
|
||||
"x": 0.6195313,
|
||||
"y": 0.24583334,
|
||||
"w": 0.09804688,
|
||||
"h": 0.41944444
|
||||
},
|
||||
"bboxExtInFrame": {
|
||||
"x": 0.53515625,
|
||||
"y": 0.14027777,
|
||||
"w": 0.26640624,
|
||||
"h": 0.63125
|
||||
},
|
||||
"objectImageKey": "",
|
||||
"objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092514409592832.jpg",
|
||||
"frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092515508500480.jpg",
|
||||
"confidence": 0.92494,
|
||||
"sourceObjectId": "1742092515508500480",
|
||||
"storeTimestamp": "0",
|
||||
"gbNumber": "",
|
||||
"qualityScore": 0,
|
||||
"subObjectCount": 1,
|
||||
"subObjectType": ["OBJECT_TYPE_FACE"],
|
||||
"subObjectIds": ["1742092482432219136"],
|
||||
"cameraInfo": {
|
||||
"id": "129529",
|
||||
"name": "4入口人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.12100219726562,
|
||||
"latitude": 30.280099868774414,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "34",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
}
|
||||
},
|
||||
"solutionId": "1",
|
||||
"fragmentId": "0",
|
||||
"contrastKey": "singer-20240102/1/129529/1742092514409592832.jpg",
|
||||
"compaterImages": ["http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"],
|
||||
"imgSummary": "singer-20240102/1/129529/1742092514409592832.jpg",
|
||||
"imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092514409592832.jpg",
|
||||
"srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092515508500480.jpg",
|
||||
"algorithmVersion": "VERSION_REID_HEAD_ATTR",
|
||||
"cameraId": "129529",
|
||||
"cameraName": "4入口人脸"
|
||||
}],
|
||||
"selectIndex": 4,
|
||||
"disableBtn": [0, 1, 4, 20],
|
||||
"dataSource": [{
|
||||
@ -452,30 +31,6 @@ export var IMAGE_DATA = {
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
},
|
||||
"objectIndex": {
|
||||
"objectId": "1742110565582518272",
|
||||
"solutionId": "1",
|
||||
@ -519,41 +74,6 @@ export var IMAGE_DATA = {
|
||||
"subObjectCount": 1,
|
||||
"subObjectType": ["OBJECT_TYPE_FACE"],
|
||||
"subObjectIds": ["1742110532015503360"],
|
||||
"cameraInfo": {
|
||||
"id": "129533",
|
||||
"name": "4楼门口过道人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.125,
|
||||
"latitude": 30.280500411987305,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
}
|
||||
},
|
||||
"solutionId": "1",
|
||||
"fragmentId": "0",
|
||||
"contrastKey": "singer-20240102/1/129533/1742110565582518272.jpg",
|
||||
@ -592,30 +112,6 @@ export var IMAGE_DATA = {
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
},
|
||||
"objectIndex": {
|
||||
"objectId": "1742092680994764802",
|
||||
"solutionId": "1",
|
||||
@ -659,41 +155,6 @@ export var IMAGE_DATA = {
|
||||
"subObjectCount": 0,
|
||||
"subObjectType": [],
|
||||
"subObjectIds": [],
|
||||
"cameraInfo": {
|
||||
"id": "129533",
|
||||
"name": "4楼门口过道人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.125,
|
||||
"latitude": 30.280500411987305,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
}
|
||||
},
|
||||
"solutionId": "1",
|
||||
"fragmentId": "0",
|
||||
"contrastKey": "singer-20240102/1/129533/1742092680994764802.jpg",
|
||||
@ -732,30 +193,6 @@ export var IMAGE_DATA = {
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "34",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
},
|
||||
"objectIndex": {
|
||||
"objectId": "1742092514409592832",
|
||||
"solutionId": "1",
|
||||
@ -799,41 +236,6 @@ export var IMAGE_DATA = {
|
||||
"subObjectCount": 1,
|
||||
"subObjectType": ["OBJECT_TYPE_FACE"],
|
||||
"subObjectIds": ["1742092482432219136"],
|
||||
"cameraInfo": {
|
||||
"id": "129529",
|
||||
"name": "4入口人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.12100219726562,
|
||||
"latitude": 30.280099868774414,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "34",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
}
|
||||
},
|
||||
"solutionId": "1",
|
||||
"fragmentId": "0",
|
||||
"contrastKey": "singer-20240102/1/129529/1742092514409592832.jpg",
|
||||
@ -851,4 +253,221 @@ export var IMAGE_DATA = {
|
||||
"disableVideo": false
|
||||
},
|
||||
"specialTitle": ""
|
||||
};
|
||||
};
|
||||
export var BIG_IMAGE_DATA = [{
|
||||
imageKey: 'http://10.0.0.120:30003/file/singer-20240110/1/5/1744894622934503424.jpg',
|
||||
imgSummary: "http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg",
|
||||
flvUrl: 'ws://10.0.0.120:9033/flv/Sip/34020000001310000301.flv?ip=10.0.0.120&stime=1704815972&etime=1704815992',
|
||||
compaterImages: ['http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg', "http://10.0.0.120:30003/file/public/public_20240117/file/dfdd3340-53c8-4dc4-9921-f13230aa0355.jpg"],
|
||||
odRect: {
|
||||
"x": 0.5445312,
|
||||
"y": 0.19166666,
|
||||
"w": 0.08671875,
|
||||
"h": 0.40138888
|
||||
},
|
||||
attachImg: [{
|
||||
"url": "http://10.0.0.120:30003/file/singer-20240110/1/5/1744894622695428096.jpg",
|
||||
"label": "形体"
|
||||
}, {
|
||||
"url": "http://10.0.0.120:30003/file/singer-20240110/1/5/1744894588427964418.jpg",
|
||||
"label": "人脸"
|
||||
}],
|
||||
score: '0.6',
|
||||
// 人脸质量分
|
||||
showScore: true,
|
||||
// 人脸质量分
|
||||
cameraPosition: 'string',
|
||||
// 摄像头位置
|
||||
time: '2022-01-01',
|
||||
// 摄像头拍摄时间
|
||||
objects: [{
|
||||
"objectIndex": {
|
||||
"objectId": "1746832189053474816",
|
||||
"solutionId": "0",
|
||||
"deviceId": "0",
|
||||
"fragmentId": "0"
|
||||
},
|
||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||
"sourceObjectId": "0",
|
||||
"level": 0,
|
||||
"confidence": 0.881164,
|
||||
"frameInfo": {
|
||||
"frameId": "0",
|
||||
"frameTimestamp": "1705312223057",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"originWidth": 0,
|
||||
"originHeight": 0,
|
||||
"offsetTime": "0",
|
||||
"skipNumber": "0"
|
||||
},
|
||||
"infoOnSource": {
|
||||
"bboxInFrame": {
|
||||
"bboxRatio": {
|
||||
"x": 0.61418945,
|
||||
"y": 0.34309354,
|
||||
"w": 0.067661405,
|
||||
"h": 0.34659258
|
||||
}
|
||||
},
|
||||
"countInSource": 0,
|
||||
"indexInSource": 0
|
||||
},
|
||||
"qualityScore": 0
|
||||
}]
|
||||
}, {
|
||||
imageKey: 'http://10.0.0.120:30003/file/singer-20240115/1/9/1746795581994436608.jpg',
|
||||
imgSummary: "http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg",
|
||||
odRect: {
|
||||
"x": 0.553125,
|
||||
"y": 0.29722223,
|
||||
"w": 0.048958335,
|
||||
"h": 0.2462963
|
||||
},
|
||||
attachImg: [{
|
||||
"url": "http://10.0.0.120:30003/file/singer-20240115/1/9/1746795581163964416.jpg",
|
||||
"label": "形体"
|
||||
}, {
|
||||
"url": "http://10.0.0.120:30003/file/singer-20240115/1/9/1746795546867140608.jpg",
|
||||
"label": "人脸"
|
||||
}],
|
||||
flvUrl: 'ws://10.0.0.120:9033/flv/HaikangNvr/34.flv?ip=10.0.2.103&stime=1705302394&etime=1705302414',
|
||||
score: 0.815207,
|
||||
// 人脸质量分
|
||||
showScore: true,
|
||||
// 人脸质量分
|
||||
cameraPosition: 'string',
|
||||
// 摄像头位置
|
||||
time: '2022-01-01',
|
||||
// 摄像头拍摄时间
|
||||
objects: [{
|
||||
"objectIndex": {
|
||||
"objectId": "1746816737430472704",
|
||||
"solutionId": "0",
|
||||
"deviceId": "0",
|
||||
"fragmentId": "0"
|
||||
},
|
||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||
"sourceObjectId": "0",
|
||||
"frameInfo": {
|
||||
"frameId": "0",
|
||||
"frameTimestamp": "1705308539109",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"originWidth": 0,
|
||||
"originHeight": 0,
|
||||
"offsetTime": "0",
|
||||
"skipNumber": "0"
|
||||
},
|
||||
"infoOnSource": {
|
||||
"bboxInFrame": {
|
||||
"bboxRatio": {
|
||||
"x": 0.5519352,
|
||||
"y": 0.2965385,
|
||||
"w": 0.05185461,
|
||||
"h": 0.24698898
|
||||
}
|
||||
},
|
||||
"countInSource": 0,
|
||||
"indexInSource": 0
|
||||
},
|
||||
"qualityScore": 0
|
||||
}, {
|
||||
"objectIndex": {
|
||||
"objectId": "1746816737430472705",
|
||||
"solutionId": "0",
|
||||
"deviceId": "0",
|
||||
"fragmentId": "0"
|
||||
},
|
||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||
"sourceObjectId": "0",
|
||||
"level": 0,
|
||||
"confidence": 0.9310699,
|
||||
"frameInfo": {
|
||||
"frameId": "0",
|
||||
"frameTimestamp": "1705308539109",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"originWidth": 0,
|
||||
"originHeight": 0,
|
||||
"offsetTime": "0",
|
||||
"skipNumber": "0"
|
||||
},
|
||||
"infoOnSource": {
|
||||
"bboxInFrame": {
|
||||
"bboxRatio": {
|
||||
"x": 0.58543766,
|
||||
"y": 0.3203356,
|
||||
"w": 0.052037954,
|
||||
"h": 0.2664015
|
||||
}
|
||||
},
|
||||
"countInSource": 0,
|
||||
"indexInSource": 0
|
||||
},
|
||||
"qualityScore": 0
|
||||
}]
|
||||
}];
|
||||
export var attributeList = [{
|
||||
title: '人员属性',
|
||||
children: [{
|
||||
key: '1',
|
||||
label: '性别',
|
||||
children: '男'
|
||||
}, {
|
||||
key: '2',
|
||||
label: '年龄',
|
||||
children: '成年'
|
||||
}, {
|
||||
key: '3',
|
||||
label: '帽子',
|
||||
children: '无'
|
||||
}, {
|
||||
key: '4',
|
||||
label: '上身颜色',
|
||||
children: '灰'
|
||||
}, {
|
||||
key: '5',
|
||||
label: '下身颜色',
|
||||
children: '蓝色'
|
||||
}, {
|
||||
key: '6',
|
||||
label: '附着物',
|
||||
children: '无'
|
||||
}, {
|
||||
key: '7',
|
||||
label: '骑行',
|
||||
children: '否'
|
||||
}]
|
||||
}, {
|
||||
title: '社区规范',
|
||||
children: [{
|
||||
key: '1',
|
||||
label: '性别',
|
||||
children: '男'
|
||||
}, {
|
||||
key: '2',
|
||||
label: '年龄',
|
||||
children: '成年'
|
||||
}, {
|
||||
key: '3',
|
||||
label: '帽子',
|
||||
children: '无'
|
||||
}, {
|
||||
key: '4',
|
||||
label: '上身颜色',
|
||||
children: '灰'
|
||||
}, {
|
||||
key: '5',
|
||||
label: '下身颜色',
|
||||
children: '蓝色'
|
||||
}, {
|
||||
key: '6',
|
||||
label: '附着物',
|
||||
children: '无'
|
||||
}, {
|
||||
key: '7',
|
||||
label: '骑行',
|
||||
children: '否'
|
||||
}]
|
||||
}];
|
@ -1,153 +0,0 @@
|
||||
/**
|
||||
* 适配老的大屏组件数据格式传入
|
||||
*/
|
||||
import React from 'react';
|
||||
import { AlgorithmVersionStr, HumanProperty, ObjectType, Rect, ViewOption, AlignType, IScreenshotButtonProp, ODRECT } from '@zhst/types';
|
||||
export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'TRACK';
|
||||
export type MODEL_TYPE = 'VIDEO' | 'IMAGE';
|
||||
export interface ImgViewProps extends React.HTMLAttributes<HTMLElement> {
|
||||
imageKey: string;
|
||||
odRect: ODRECT;
|
||||
attachImg?: Array<{
|
||||
label: string;
|
||||
url: string;
|
||||
}>;
|
||||
showAttachImgLabel: boolean;
|
||||
screenshotButtonAlign: AlignType;
|
||||
screenshotButtonRender: (screenshotButtonProp: IScreenshotButtonProp) => React.ReactElement;
|
||||
scale$?: number;
|
||||
showCrop$?: boolean;
|
||||
hideLeftTopBtn?: boolean;
|
||||
score?: number;
|
||||
viewOption?: ViewOption;
|
||||
}
|
||||
export interface VideoViewProps {
|
||||
flvUrl: string;
|
||||
maxDuration?: number;
|
||||
screenshotButtonAlign?: AlignType;
|
||||
screenshotButtonRender?: (screenshotButtonProp: IScreenshotButtonProp) => React.ReactElement;
|
||||
defautlNormalizationRect?: Rect;
|
||||
onCropChange?: (showCrop: boolean, normalizationRect: null | Rect) => void;
|
||||
showCrop$?: boolean;
|
||||
}
|
||||
export interface CarouselProps {
|
||||
hasPre?: boolean;
|
||||
hasNext?: boolean;
|
||||
selectIndex: number;
|
||||
setSelectIndex: React.Dispatch<React.SetStateAction<number>>;
|
||||
dataSource: Array<{
|
||||
key: string;
|
||||
url: string;
|
||||
}>;
|
||||
}
|
||||
export type ISelectItem = Partial<Omit<ImgViewProps, 'screenshotButtonRender'>> & Partial<Omit<VideoViewProps, 'screenshotButtonRender'>>;
|
||||
export interface HeaderProps {
|
||||
value: TAB_TYPE;
|
||||
onChange: (type: TAB_TYPE) => void;
|
||||
tabsFilter: TAB_TYPE[];
|
||||
}
|
||||
export interface ImgViewRef {
|
||||
imgInsRef: React.MutableRefObject<any>;
|
||||
setShowCrop: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
}
|
||||
export interface VideoViewRef {
|
||||
cropAble: boolean;
|
||||
setShowCrop: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
downloadVideoframe: () => void;
|
||||
}
|
||||
export interface ParamProps {
|
||||
tab: string;
|
||||
selectItem: ISelectItem;
|
||||
imgViewRef: React.MutableRefObject<ImgViewRef>;
|
||||
VideoViewRef: React.MutableRefObject<VideoViewRef>;
|
||||
model: MODEL_TYPE;
|
||||
setModel: React.Dispatch<React.SetStateAction<MODEL_TYPE>>;
|
||||
scale$: number;
|
||||
showCrop$: boolean;
|
||||
}
|
||||
export interface BigImageData {
|
||||
extendRectList: (Rect & {
|
||||
algorithmVersion: AlgorithmVersionStr;
|
||||
imageKey: string;
|
||||
})[];
|
||||
rectList: (Rect & {
|
||||
algorithmVersion: AlgorithmVersionStr;
|
||||
imageKey: string;
|
||||
})[];
|
||||
attachImg: {
|
||||
url: string;
|
||||
label: '形体' | '人脸';
|
||||
}[];
|
||||
odRect: Rect;
|
||||
imageKey: string;
|
||||
imgSummary: string;
|
||||
objectExtImageKey: string;
|
||||
attributeList: {
|
||||
label: string;
|
||||
list: any[];
|
||||
}[];
|
||||
archiveImages?: any;
|
||||
spaceName: string;
|
||||
objectType: ObjectType;
|
||||
objectId: string;
|
||||
bodyObjectId?: string;
|
||||
faceObjectId?: string;
|
||||
sourceObjectId?: string;
|
||||
cameraId: string;
|
||||
cameraName: string;
|
||||
selectIndex: number;
|
||||
humanProperty: HumanProperty;
|
||||
qualityScore?: number;
|
||||
score: number;
|
||||
timestamp: string;
|
||||
bodyImageUrl: string;
|
||||
faceImageUrl: string;
|
||||
algorithmVersion: AlgorithmVersionStr;
|
||||
bodySpaceName: string;
|
||||
faceSpaceName: string;
|
||||
solutionId?: string;
|
||||
[index: string]: any;
|
||||
}
|
||||
interface IOldImageData {
|
||||
visible?: boolean;
|
||||
defaultModel?: MODEL_TYPE;
|
||||
onClose?: () => void;
|
||||
isLoading?: boolean;
|
||||
hasPre?: boolean;
|
||||
hasNext?: boolean;
|
||||
selectIndex?: number;
|
||||
onSelectIndexChange?: (i: number) => void;
|
||||
dataSource: any[];
|
||||
dataSources: any[];
|
||||
relatedData?: any[];
|
||||
transformPropFunc: (item: any) => ISelectItem;
|
||||
transformVideoPropFunc: (item: ISelectItem) => Promise<Omit<VideoViewProps, 'screenshotButtonRender'>>;
|
||||
screenshotButtonRender?: (screenshotButtonProp: IScreenshotButtonProp) => React.ReactElement;
|
||||
showTool?: boolean;
|
||||
showCarousel?: boolean;
|
||||
imgViewProp?: Partial<ImgViewProps>;
|
||||
videoViewProp?: Partial<VideoViewProps>;
|
||||
ToolProps?: Partial<ToolProps>;
|
||||
nullDialogProp?: {
|
||||
emptyText?: string;
|
||||
};
|
||||
showHeader?: boolean;
|
||||
tabsFilter?: TAB_TYPE[];
|
||||
useVirtual?: boolean;
|
||||
loadNext?: (i: number) => Promise<void>;
|
||||
loadPre?: (i: number) => Promise<void>;
|
||||
children: React.ReactNode;
|
||||
title?: string;
|
||||
specialTitle?: string;
|
||||
isRelated?: boolean;
|
||||
carouselProp?: Partial<CarouselProps>;
|
||||
}
|
||||
export interface ToolProps {
|
||||
renderRight?: (props: ParamProps) => React.ReactNode;
|
||||
renderLeft?: (props: ParamProps) => React.ReactNode;
|
||||
renderVideoBtn?: boolean;
|
||||
param: ParamProps;
|
||||
disableVideo: boolean;
|
||||
}
|
||||
declare const _default: (data: IOldImageData) => IOldImageData;
|
||||
export default _default;
|
@ -1,8 +0,0 @@
|
||||
/**
|
||||
* 适配老的大屏组件数据格式传入
|
||||
*/
|
||||
|
||||
export default (function (data) {
|
||||
var newData = data;
|
||||
return newData;
|
||||
});
|
1
packages/biz/es/adapter/index.d.ts
vendored
1
packages/biz/es/adapter/index.d.ts
vendored
@ -1 +0,0 @@
|
||||
export { default as BigImageModalAdapter } from './BigImageModalAdapter';
|
@ -1 +0,0 @@
|
||||
export { default as BigImageModalAdapter } from "./BigImageModalAdapter";
|
1
packages/biz/es/index.d.ts
vendored
1
packages/biz/es/index.d.ts
vendored
@ -1,3 +1,2 @@
|
||||
export { default as Demo } from './Demo';
|
||||
export * from './adapter';
|
||||
export { default as BigImageModal } from './BigImageModal';
|
||||
|
@ -1,3 +1,2 @@
|
||||
export { default as Demo } from "./Demo";
|
||||
export * from "./adapter";
|
||||
export { default as BigImageModal } from "./BigImageModal";
|
26
packages/biz/es/useSocket/index.d.ts
vendored
26
packages/biz/es/useSocket/index.d.ts
vendored
@ -1,26 +0,0 @@
|
||||
export declare const SocketApi: {
|
||||
CameraTaskStatue: string;
|
||||
DeviceStatus: string;
|
||||
SubscribeSolutionDeploy: string;
|
||||
SubscribeTasksSummary: string;
|
||||
MonitorSubscribeResult: string;
|
||||
MonitorSubscribeStatus: string;
|
||||
SubscribeArchiveGroupUpload: string;
|
||||
SubscribeJointTask: string;
|
||||
SubscribeGroupFragment: string;
|
||||
SubscribeGroup: string;
|
||||
SubscribeStreamEvent: string;
|
||||
};
|
||||
type ApiKeys = keyof typeof SocketApi;
|
||||
declare const _default: (topic: ApiKeys, iterator?: any, opt?: {
|
||||
req?: {
|
||||
[key: string]: any;
|
||||
} | undefined;
|
||||
throttle?: number | undefined;
|
||||
parseData?: boolean | undefined;
|
||||
beforeLoopTmp?: Function | undefined;
|
||||
shouldBreak: boolean;
|
||||
forceRefresh: any;
|
||||
close?: boolean | undefined;
|
||||
} | undefined) => void;
|
||||
export default _default;
|
@ -2,15 +2,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
||||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
import { useMemo } from 'react';
|
||||
import { throttle as loadshThrottle } from '@zhst/func';
|
||||
import { throttle as loadshThrottle, noop } from '@zhst/func';
|
||||
import { useDeepEffect, useLatest } from '@zhst/hooks';
|
||||
import ws from "./ws";
|
||||
var noop = function noop(v) {
|
||||
return null;
|
||||
};
|
||||
var getSelf = function getSelf(v) {
|
||||
return v;
|
||||
};
|
||||
@ -29,7 +26,6 @@ export var SocketApi = {
|
||||
// 监听视频分组状态变化,列表变化也通知
|
||||
SubscribeStreamEvent: 'singer.MediaManagerService/SubscribeStreamEvent' // 监听视频分组状态变化,列表变化也通知
|
||||
};
|
||||
|
||||
export default (function (topic) {
|
||||
var iterator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
|
||||
var opt = arguments.length > 2 ? arguments[2] : undefined;
|
||||
@ -38,8 +34,6 @@ export default (function (topic) {
|
||||
req = _ref$req === void 0 ? {} : _ref$req,
|
||||
_ref$throttle = _ref.throttle,
|
||||
throttle = _ref$throttle === void 0 ? 0 : _ref$throttle,
|
||||
_ref$parseData = _ref.parseData,
|
||||
parseData = _ref$parseData === void 0 ? true : _ref$parseData,
|
||||
_ref$beforeLoopTmp = _ref.beforeLoopTmp,
|
||||
beforeLoopTmp = _ref$beforeLoopTmp === void 0 ? getSelf : _ref$beforeLoopTmp,
|
||||
_ref$shouldBreak = _ref.shouldBreak,
|
||||
|
5
packages/biz/es/useSocket/ws.d.ts
vendored
5
packages/biz/es/useSocket/ws.d.ts
vendored
@ -1,8 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
declare class Channel {
|
||||
/**
|
||||
* io 实例化对象
|
||||
|
@ -1,23 +1,40 @@
|
||||
import React from 'react';
|
||||
import type { ModalProps, DescriptionsProps, TabsProps } from 'antd';
|
||||
import type { ModalProps, DescriptionsProps, TabsProps, VideoViewRef, ImgViewRef } from '@zhst/meta';
|
||||
import './index.less';
|
||||
export declare const componentPrefix = "zhst-image";
|
||||
export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'VIDEO';
|
||||
export type MODEL_TYPE = 'VIDEO' | 'IMAGE';
|
||||
export interface BigImageModalProps extends ModalProps {
|
||||
visible: boolean;
|
||||
descriptionConfig: {
|
||||
data: {
|
||||
title: string;
|
||||
children: Pick<DescriptionsProps, 'items'>;
|
||||
}[];
|
||||
activeTab?: TAB_TYPE;
|
||||
attributeList: {
|
||||
title: string;
|
||||
children: Pick<DescriptionsProps, 'items'>;
|
||||
};
|
||||
tabsConfig: {
|
||||
tabs: {
|
||||
data: Pick<TabsProps, 'items'> & {
|
||||
key: 'NORMAL' | 'COMPATER' | 'TRACK';
|
||||
key: TAB_TYPE;
|
||||
};
|
||||
};
|
||||
dataSource: any;
|
||||
imageData: any;
|
||||
relatedData: any;
|
||||
isRelated?: boolean;
|
||||
footer?: React.ReactNode;
|
||||
showCarousel?: boolean;
|
||||
onTabChange?: (newVal?: TAB_TYPE, oldVal?: TAB_TYPE) => void;
|
||||
onIndexChange?: (newVal?: number, oldVal?: number) => void;
|
||||
transformPropFunc: (data: any) => void;
|
||||
}
|
||||
declare const BigImageModal: React.FC<BigImageModalProps>;
|
||||
interface BigModalRef {
|
||||
tab: TAB_TYPE;
|
||||
setTab: (tab: TAB_TYPE) => void;
|
||||
modalRef: ModalProps;
|
||||
activeKey: string;
|
||||
setActiveKey: (val: string) => void;
|
||||
videoPlayerRef: VideoViewRef;
|
||||
combineImageRef: any;
|
||||
bigImagePreviewRef: ImgViewRef;
|
||||
}
|
||||
declare const BigImageModal: React.FC<BigImageModalProps, BigModalRef>;
|
||||
export default BigImageModal;
|
||||
|
@ -34,134 +34,215 @@ __export(BigImageModal_exports, {
|
||||
});
|
||||
module.exports = __toCommonJS(BigImageModal_exports);
|
||||
var import_react = __toESM(require("react"));
|
||||
var import_antd = require("antd");
|
||||
var import_meta = require("@zhst/meta");
|
||||
var import_classnames = __toESM(require("classnames"));
|
||||
var import_func = require("@zhst/func");
|
||||
var import_index = require("./index.less");
|
||||
var import_navigation = __toESM(require("./components/navigation"));
|
||||
var DescriptionsItem = import_antd.Descriptions.Item;
|
||||
var import_CombineImage = __toESM(require("./components/CombineImage"));
|
||||
var DescriptionsItem = import_meta.Descriptions.Item;
|
||||
var componentPrefix = "zhst-image";
|
||||
var initialStyle = {
|
||||
fontSize: "12px"
|
||||
};
|
||||
var BigImageModal = (props) => {
|
||||
var BigImageModal = (0, import_react.forwardRef)((props, ref) => {
|
||||
var _a;
|
||||
const {
|
||||
// 配置
|
||||
title = "-",
|
||||
open,
|
||||
visible,
|
||||
children,
|
||||
descriptionConfig = {
|
||||
data: []
|
||||
},
|
||||
tabsConfig = {
|
||||
data: [
|
||||
{
|
||||
label: "对比图模式",
|
||||
key: "1",
|
||||
children: "对比图组件"
|
||||
},
|
||||
{
|
||||
label: "场景图模式",
|
||||
key: "2",
|
||||
children: "场景图组件"
|
||||
}
|
||||
]
|
||||
},
|
||||
activeTab,
|
||||
attributeList = [],
|
||||
isRelated = false,
|
||||
tabs = {},
|
||||
footer = null,
|
||||
showCarousel = true,
|
||||
// 数据
|
||||
dataSource = [],
|
||||
// 总数据源,只允许有一份
|
||||
imageData = [],
|
||||
relatedData = []
|
||||
relatedData = [],
|
||||
// 事件
|
||||
onIndexChange,
|
||||
onTabChange,
|
||||
transformPropFunc
|
||||
} = props;
|
||||
const showCropRef = (0, import_react.useRef)(false);
|
||||
const scaleRef = (0, import_react.useRef)(0);
|
||||
const [activeKey, setActiveKey] = (0, import_react.useState)((0, import_func.get)(tabsConfig, "data[0].key"));
|
||||
const [previewIndex, setPreviewIndex] = (0, import_react.useState)(0);
|
||||
const [isRelated, setIsRelated] = (0, import_react.useState)(false);
|
||||
const combineImageRef = (0, import_react.useRef)(null);
|
||||
const bigImagePreviewRef = (0, import_react.useRef)(null);
|
||||
const videoPlayerRef = (0, import_react.useRef)(null);
|
||||
const modalRef = (0, import_react.useRef)(null);
|
||||
const [tab, setTab] = (0, import_react.useState)(activeTab || (0, import_func.get)(tabsConfig, "data[0].key"));
|
||||
const [activeKey, setActiveKey] = (0, import_react.useState)("related");
|
||||
const [currentIndex, setCurrentIndex] = (0, import_react.useState)(0);
|
||||
const tabsConfig = !(0, import_func.isEmpty)(tabs) ? tabs : {
|
||||
data: [
|
||||
{
|
||||
label: "对比图模式",
|
||||
key: "COMPATER",
|
||||
children: /* @__PURE__ */ import_react.default.createElement(
|
||||
import_CombineImage.default,
|
||||
{
|
||||
ref: combineImageRef,
|
||||
data: dataSource[currentIndex] || {}
|
||||
}
|
||||
)
|
||||
},
|
||||
{
|
||||
label: "场景图模式",
|
||||
key: "NORMAL",
|
||||
children: /* @__PURE__ */ import_react.default.createElement(
|
||||
import_meta.BigImagePreview,
|
||||
{
|
||||
ref: bigImagePreviewRef,
|
||||
height: "500px",
|
||||
data: dataSource[currentIndex]
|
||||
}
|
||||
)
|
||||
}
|
||||
]
|
||||
};
|
||||
(0, import_react.useEffect)(() => {
|
||||
(async () => {
|
||||
let data = {};
|
||||
})();
|
||||
}, [currentIndex, dataSource, imageData, isRelated]);
|
||||
(0, import_react.useImperativeHandle)(ref, () => ({
|
||||
ref,
|
||||
tab,
|
||||
setTab,
|
||||
modalRef,
|
||||
activeKey,
|
||||
setActiveKey,
|
||||
videoPlayerRef,
|
||||
combineImageRef,
|
||||
bigImagePreviewRef
|
||||
}));
|
||||
return /* @__PURE__ */ import_react.default.createElement(
|
||||
import_antd.Modal,
|
||||
import_meta.Modal,
|
||||
{
|
||||
destroyOnClose: true,
|
||||
open: open || visible,
|
||||
footer: null,
|
||||
open,
|
||||
ref: modalRef,
|
||||
footer,
|
||||
className: componentPrefix,
|
||||
title,
|
||||
...props
|
||||
},
|
||||
descriptionConfig.data.map((descriptions) => {
|
||||
var _a;
|
||||
return /* @__PURE__ */ import_react.default.createElement(
|
||||
import_antd.Descriptions,
|
||||
{
|
||||
key: descriptions.title,
|
||||
title: /* @__PURE__ */ import_react.default.createElement("p", { style: { margin: "12px 0 0", fontSize: initialStyle.fontSize } }, descriptions.title),
|
||||
column: 8,
|
||||
style: { padding: "0 64px" }
|
||||
},
|
||||
(_a = descriptions == null ? void 0 : descriptions.children) == null ? void 0 : _a.map((item) => /* @__PURE__ */ import_react.default.createElement(
|
||||
DescriptionsItem,
|
||||
{
|
||||
key: item.key,
|
||||
label: item.label,
|
||||
span: 1,
|
||||
contentStyle: { fontSize: initialStyle.fontSize },
|
||||
labelStyle: { fontSize: initialStyle.fontSize }
|
||||
},
|
||||
item.children
|
||||
))
|
||||
);
|
||||
}),
|
||||
/* @__PURE__ */ import_react.default.createElement(
|
||||
import_antd.Tabs,
|
||||
{
|
||||
defaultActiveKey: activeKey,
|
||||
centered: true,
|
||||
tabBarStyle: { fontSize: "18px" },
|
||||
items: tabsConfig.data,
|
||||
...tabsConfig
|
||||
}
|
||||
),
|
||||
/* @__PURE__ */ import_react.default.createElement(
|
||||
"div",
|
||||
{
|
||||
className: (0, import_classnames.default)(`${componentPrefix}-view-container`),
|
||||
style: activeKey === "TRACK" ? {
|
||||
height: "718px",
|
||||
marginBottom: "0px"
|
||||
} : {}
|
||||
style: {
|
||||
marginTop: "16px"
|
||||
}
|
||||
},
|
||||
activeKey !== "TRACK" && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
||||
import_navigation.default,
|
||||
/* @__PURE__ */ import_react.default.createElement(
|
||||
import_meta.ConfigProvider,
|
||||
{
|
||||
className: (0, import_classnames.default)(
|
||||
`${componentPrefix}-view-container__nav`,
|
||||
previewIndex <= 0 && `${componentPrefix}-view-container__nav--disabled`,
|
||||
`${componentPrefix}-view-container__nav--left`
|
||||
),
|
||||
show: isRelated ? imageData.length > 1 : dataSource.length > 1,
|
||||
disabled: previewIndex <= 0,
|
||||
prev: true,
|
||||
onClick: () => {
|
||||
setPreviewIndex((pre) => pre - 1);
|
||||
theme: {
|
||||
token: {
|
||||
colorTextSecondary: "rgba(0,0,0,0.45)"
|
||||
},
|
||||
components: {
|
||||
Descriptions: {
|
||||
titleMarginBottom: "20px",
|
||||
viewBg: "#f6f6f6",
|
||||
titleColor: "rgba(0,0,0,0.45)",
|
||||
colorTextLabel: "rgba(0,0,0,0.45)",
|
||||
contentColor: "rgba(0,0,0,0.88)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
), /* @__PURE__ */ import_react.default.createElement(
|
||||
import_navigation.default,
|
||||
},
|
||||
attributeList.map((descriptions) => {
|
||||
var _a2;
|
||||
return /* @__PURE__ */ import_react.default.createElement(
|
||||
import_meta.Descriptions,
|
||||
{
|
||||
key: descriptions.title,
|
||||
title: /* @__PURE__ */ import_react.default.createElement("p", { style: { margin: "12px 0 0", fontSize: initialStyle.fontSize } }, descriptions.title),
|
||||
column: 8,
|
||||
style: { padding: "0 64px" }
|
||||
},
|
||||
(_a2 = descriptions == null ? void 0 : descriptions.children) == null ? void 0 : _a2.map((item) => /* @__PURE__ */ import_react.default.createElement(
|
||||
DescriptionsItem,
|
||||
{
|
||||
key: item.key,
|
||||
label: item.label,
|
||||
span: 1,
|
||||
contentStyle: { fontSize: initialStyle.fontSize },
|
||||
labelStyle: { fontSize: initialStyle.fontSize }
|
||||
},
|
||||
item.children
|
||||
))
|
||||
);
|
||||
})
|
||||
),
|
||||
/* @__PURE__ */ import_react.default.createElement(
|
||||
"div",
|
||||
{
|
||||
className: (0, import_classnames.default)(
|
||||
`${componentPrefix}-view-container__nav`,
|
||||
(previewIndex >= imageData.length - 1 || previewIndex >= dataSource.length - 1) && `${componentPrefix}-view-container__nav--disabled`,
|
||||
`${componentPrefix}-view-container__nav--right`
|
||||
),
|
||||
show: isRelated ? imageData.length > 1 : dataSource.length > 1,
|
||||
disabled: previewIndex >= imageData.length - 1 || previewIndex >= dataSource.length - 1,
|
||||
next: true,
|
||||
onClick: async (e) => {
|
||||
setPreviewIndex((pre) => pre + 1);
|
||||
className: (0, import_classnames.default)(`${componentPrefix}-view-container`)
|
||||
},
|
||||
/* @__PURE__ */ import_react.default.createElement(
|
||||
import_meta.Tabs,
|
||||
{
|
||||
activeKey: tab,
|
||||
centered: true,
|
||||
destroyInactiveTabPane: true,
|
||||
onChange: (v) => {
|
||||
setTab((pre) => {
|
||||
onTabChange == null ? void 0 : onTabChange(v, pre);
|
||||
return v;
|
||||
});
|
||||
},
|
||||
tabBarStyle: { fontSize: "18px", fontWeight: "bold" },
|
||||
items: tabsConfig.data,
|
||||
...tabsConfig
|
||||
}
|
||||
}
|
||||
))
|
||||
),
|
||||
tab === "VIDEO" && /* @__PURE__ */ import_react.default.createElement(import_meta.VideoPlayer, { ref: videoPlayerRef, url: (_a = dataSource[currentIndex]) == null ? void 0 : _a.flvUrl }),
|
||||
/* @__PURE__ */ import_react.default.createElement(
|
||||
import_navigation.default,
|
||||
{
|
||||
className: (0, import_classnames.default)(
|
||||
`${componentPrefix}-view-container__nav`,
|
||||
currentIndex <= 0 && `${componentPrefix}-view-container__nav--disabled`,
|
||||
`${componentPrefix}-view-container__nav--left`
|
||||
),
|
||||
show: isRelated ? imageData.length > 1 : dataSource.length > 1,
|
||||
disabled: currentIndex <= 0,
|
||||
prev: true,
|
||||
onClick: () => {
|
||||
setCurrentIndex((pre) => {
|
||||
onIndexChange == null ? void 0 : onIndexChange(pre - 1, pre);
|
||||
return pre - 1;
|
||||
});
|
||||
}
|
||||
}
|
||||
),
|
||||
/* @__PURE__ */ import_react.default.createElement(
|
||||
import_navigation.default,
|
||||
{
|
||||
className: (0, import_classnames.default)(
|
||||
`${componentPrefix}-view-container__nav`,
|
||||
(currentIndex >= imageData.length - 1 || currentIndex >= dataSource.length - 1) && `${componentPrefix}-view-container__nav--disabled`,
|
||||
`${componentPrefix}-view-container__nav--right`
|
||||
),
|
||||
show: isRelated ? imageData.length > 1 : dataSource.length > 1,
|
||||
disabled: currentIndex >= imageData.length - 1 || currentIndex >= dataSource.length - 1,
|
||||
next: true,
|
||||
onClick: async (e) => {
|
||||
setCurrentIndex((pre) => {
|
||||
onIndexChange == null ? void 0 : onIndexChange(pre + 1, pre);
|
||||
return pre + 1;
|
||||
});
|
||||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
});
|
||||
var BigImageModal_default = BigImageModal;
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
|
@ -3,11 +3,14 @@
|
||||
box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
|
||||
}
|
||||
|
||||
.zhst-tabs .zhst-tabs-nav-wrap {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
|
||||
|
||||
&-view-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 532px;
|
||||
margin-bottom: 16px;
|
||||
|
||||
&__nav {
|
||||
@ -226,231 +229,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.zhst-image__header {
|
||||
width: 100%;
|
||||
// margin-top: 3px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&__pad0 {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&__pad66 {
|
||||
padding: 0 66px;
|
||||
}
|
||||
|
||||
&__bar {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
background: #f6f6f6;
|
||||
// box-shadow: 0px 0px 8px 0px rgba(172, 172, 172, 0.5);
|
||||
justify-content: center;
|
||||
// border-color: #f0f0f0;
|
||||
// border-bottom-width: 1px;
|
||||
// border-bottom-style: solid;
|
||||
}
|
||||
|
||||
&__barNoColor {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
border-color: #f0f0f0;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
&__item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: 40px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 15px;
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
line-height: 19px;
|
||||
transition: font-size 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
// font-size: 18px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
width: 0;
|
||||
border-bottom: 2px solid #09f;
|
||||
content: '';
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
&--active {
|
||||
background-color: transparent;
|
||||
color: #333;
|
||||
font-size: 18px;
|
||||
|
||||
// color: #0099ff;
|
||||
&::before {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.zhst-image__compater-view {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&>div:first-child {
|
||||
margin-right: 25px;
|
||||
}
|
||||
|
||||
&>div:last-child {
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
&__container {
|
||||
position: relative;
|
||||
width: 345px;
|
||||
height: 460px;
|
||||
box-sizing: content-box;
|
||||
border: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
&__view {
|
||||
width: 345px;
|
||||
height: 460px;
|
||||
}
|
||||
|
||||
&__label {
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
height: 34px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
// width: 48px;
|
||||
padding: 0 6px;
|
||||
background: #09f;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&__tool {
|
||||
display: flex;
|
||||
width: 345px;
|
||||
height: 40px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f9f9f9;
|
||||
|
||||
i,
|
||||
span {
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
i {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
&>*:not(:last-child) {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
&__scale {
|
||||
display: inline-block;
|
||||
width: 38px;
|
||||
height: 16px;
|
||||
|
||||
// margin-left: 15px;
|
||||
box-sizing: content-box;
|
||||
border: 1px solid rgb(77 77 77 / 100%);
|
||||
background: rgb(255 255 255 / 100%);
|
||||
border-radius: 2px;
|
||||
color: #4d4d4d;
|
||||
cursor: default;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&__line {
|
||||
width: 1px;
|
||||
height: 14px;
|
||||
background: #e6e6e6;
|
||||
}
|
||||
}
|
||||
|
||||
&__empty {
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f9f9f9;
|
||||
transform: translateY(-100%);
|
||||
|
||||
&>img {
|
||||
width: 140px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
&--text {
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
&__scoll-module {
|
||||
position: absolute;
|
||||
top: 0%;
|
||||
left: 0%;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
pointer-events: none;
|
||||
|
||||
&__btn {
|
||||
display: flex;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 6px;
|
||||
border-radius: 50%;
|
||||
opacity: 0.5;
|
||||
pointer-events: all;
|
||||
|
||||
&>span {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
&__btn:hover {
|
||||
background-color: #09f !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.zhst-image__trackmodel {
|
||||
&__panel {
|
||||
position: relative;
|
||||
@ -643,23 +421,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.zhst-image__null {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&__text {
|
||||
// margin-left: 105px;
|
||||
margin-top: 8px;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.zhst-image__attributePanel {
|
||||
margin: 0 66px;
|
||||
background: #f6f6f6;
|
||||
@ -713,23 +474,6 @@
|
||||
.relatedPics {
|
||||
width: 742px;
|
||||
height: 100px;
|
||||
// display: flex;
|
||||
// box-sizing: border-box;
|
||||
// background: #fafafa;
|
||||
// border-radius: 2px;
|
||||
// border: 1px solid #f0f0f0;
|
||||
// .LeftBtn,
|
||||
// .RighttBtn {
|
||||
// width: 34px;
|
||||
// height: 100%;
|
||||
// display: flex;
|
||||
// justify-content: center;
|
||||
// align-items: center;
|
||||
// }
|
||||
// .ListContent {
|
||||
// flex: 1;
|
||||
// height: 100%;
|
||||
// }
|
||||
}
|
||||
|
||||
.disabled {
|
||||
|
294
packages/biz/lib/BigImageModal/mock.d.ts
vendored
294
packages/biz/lib/BigImageModal/mock.d.ts
vendored
@ -1,294 +0,0 @@
|
||||
export declare const IMAGE_DATA: {
|
||||
enAbleDeleteFeature: boolean;
|
||||
tabsFilter: string[];
|
||||
dataSources: {
|
||||
objectId: string;
|
||||
condition: {
|
||||
featureInfo: null;
|
||||
featureData: string;
|
||||
imageData: string;
|
||||
alg: string;
|
||||
rect: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
objectImageUrl: string;
|
||||
srcImageUrl: string;
|
||||
};
|
||||
score: number;
|
||||
timestamp: number;
|
||||
deviceId: string;
|
||||
id: string;
|
||||
name: string;
|
||||
dirid: string;
|
||||
status: string;
|
||||
longitude: number;
|
||||
latitude: number;
|
||||
caseId: string;
|
||||
caseGroup: string;
|
||||
isDeleted: string;
|
||||
extendInfo: {
|
||||
vmsPlatformId: string;
|
||||
vmsChannel: string;
|
||||
vmsCameraDecoderTag: string;
|
||||
platformPluginType: string;
|
||||
deviceVender: string;
|
||||
type: string;
|
||||
ip: string;
|
||||
port: string;
|
||||
username: string;
|
||||
passwd: string;
|
||||
rtspAddress: string;
|
||||
facesnapChannel: string;
|
||||
edgeDeviceSn: string;
|
||||
platform1400Id: number;
|
||||
useRtspAddress: boolean;
|
||||
frameCheck: boolean;
|
||||
frameRectX: number;
|
||||
frameRectY: number;
|
||||
frameRectW: number;
|
||||
frameRectH: number;
|
||||
edgeNodeId: string;
|
||||
processStatus: string;
|
||||
};
|
||||
objectIndex: {
|
||||
objectId: string;
|
||||
solutionId: string;
|
||||
deviceId: string;
|
||||
fragmentId: string;
|
||||
};
|
||||
objectType: string;
|
||||
isObjectTrack: boolean;
|
||||
pathId: string;
|
||||
frameInfo: {
|
||||
frameId: string;
|
||||
frameTimestamp: string;
|
||||
width: number;
|
||||
height: number;
|
||||
originWidth: number;
|
||||
originHeight: number;
|
||||
offsetTime: string;
|
||||
skipNumber: string;
|
||||
};
|
||||
level: number;
|
||||
bboxInFrame: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
bboxExtInFrame: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
objectImageKey: string;
|
||||
objectExtImageKey: string;
|
||||
frameImageKey: string;
|
||||
confidence: number;
|
||||
sourceObjectId: string;
|
||||
storeTimestamp: string;
|
||||
gbNumber: string;
|
||||
qualityScore: number;
|
||||
subObjectCount: number;
|
||||
subObjectType: string[];
|
||||
subObjectIds: string[];
|
||||
cameraInfo: {
|
||||
id: string;
|
||||
name: string;
|
||||
dirid: string;
|
||||
status: string;
|
||||
longitude: number;
|
||||
latitude: number;
|
||||
caseId: string;
|
||||
caseGroup: string;
|
||||
isDeleted: string;
|
||||
extendInfo: {
|
||||
vmsPlatformId: string;
|
||||
vmsChannel: string;
|
||||
vmsCameraDecoderTag: string;
|
||||
platformPluginType: string;
|
||||
deviceVender: string;
|
||||
type: string;
|
||||
ip: string;
|
||||
port: string;
|
||||
username: string;
|
||||
passwd: string;
|
||||
rtspAddress: string;
|
||||
facesnapChannel: string;
|
||||
edgeDeviceSn: string;
|
||||
platform1400Id: number;
|
||||
useRtspAddress: boolean;
|
||||
frameCheck: boolean;
|
||||
frameRectX: number;
|
||||
frameRectY: number;
|
||||
frameRectW: number;
|
||||
frameRectH: number;
|
||||
edgeNodeId: string;
|
||||
processStatus: string;
|
||||
};
|
||||
};
|
||||
solutionId: string;
|
||||
fragmentId: string;
|
||||
contrastKey: string;
|
||||
compaterImages: string[];
|
||||
imgSummary: string;
|
||||
imageKey: string;
|
||||
srcImageUrl: string;
|
||||
algorithmVersion: string;
|
||||
cameraId: string;
|
||||
cameraName: string;
|
||||
}[];
|
||||
selectIndex: number;
|
||||
disableBtn: number[];
|
||||
dataSource: {
|
||||
objectId: string;
|
||||
condition: {
|
||||
featureInfo: null;
|
||||
featureData: string;
|
||||
imageData: string;
|
||||
alg: string;
|
||||
rect: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
objectImageUrl: string;
|
||||
srcImageUrl: string;
|
||||
};
|
||||
score: number;
|
||||
timestamp: number;
|
||||
deviceId: string;
|
||||
id: string;
|
||||
name: string;
|
||||
dirid: string;
|
||||
status: string;
|
||||
longitude: number;
|
||||
latitude: number;
|
||||
caseId: string;
|
||||
caseGroup: string;
|
||||
isDeleted: string;
|
||||
extendInfo: {
|
||||
vmsPlatformId: string;
|
||||
vmsChannel: string;
|
||||
vmsCameraDecoderTag: string;
|
||||
platformPluginType: string;
|
||||
deviceVender: string;
|
||||
type: string;
|
||||
ip: string;
|
||||
port: string;
|
||||
username: string;
|
||||
passwd: string;
|
||||
rtspAddress: string;
|
||||
facesnapChannel: string;
|
||||
edgeDeviceSn: string;
|
||||
platform1400Id: number;
|
||||
useRtspAddress: boolean;
|
||||
frameCheck: boolean;
|
||||
frameRectX: number;
|
||||
frameRectY: number;
|
||||
frameRectW: number;
|
||||
frameRectH: number;
|
||||
edgeNodeId: string;
|
||||
processStatus: string;
|
||||
};
|
||||
objectIndex: {
|
||||
objectId: string;
|
||||
solutionId: string;
|
||||
deviceId: string;
|
||||
fragmentId: string;
|
||||
};
|
||||
objectType: string;
|
||||
isObjectTrack: boolean;
|
||||
pathId: string;
|
||||
frameInfo: {
|
||||
frameId: string;
|
||||
frameTimestamp: string;
|
||||
width: number;
|
||||
height: number;
|
||||
originWidth: number;
|
||||
originHeight: number;
|
||||
offsetTime: string;
|
||||
skipNumber: string;
|
||||
};
|
||||
level: number;
|
||||
bboxInFrame: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
bboxExtInFrame: {
|
||||
x: number;
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
};
|
||||
objectImageKey: string;
|
||||
objectExtImageKey: string;
|
||||
frameImageKey: string;
|
||||
confidence: number;
|
||||
sourceObjectId: string;
|
||||
storeTimestamp: string;
|
||||
gbNumber: string;
|
||||
qualityScore: number;
|
||||
subObjectCount: number;
|
||||
subObjectType: string[];
|
||||
subObjectIds: string[];
|
||||
cameraInfo: {
|
||||
id: string;
|
||||
name: string;
|
||||
dirid: string;
|
||||
status: string;
|
||||
longitude: number;
|
||||
latitude: number;
|
||||
caseId: string;
|
||||
caseGroup: string;
|
||||
isDeleted: string;
|
||||
extendInfo: {
|
||||
vmsPlatformId: string;
|
||||
vmsChannel: string;
|
||||
vmsCameraDecoderTag: string;
|
||||
platformPluginType: string;
|
||||
deviceVender: string;
|
||||
type: string;
|
||||
ip: string;
|
||||
port: string;
|
||||
username: string;
|
||||
passwd: string;
|
||||
rtspAddress: string;
|
||||
facesnapChannel: string;
|
||||
edgeDeviceSn: string;
|
||||
platform1400Id: number;
|
||||
useRtspAddress: boolean;
|
||||
frameCheck: boolean;
|
||||
frameRectX: number;
|
||||
frameRectY: number;
|
||||
frameRectW: number;
|
||||
frameRectH: number;
|
||||
edgeNodeId: string;
|
||||
processStatus: string;
|
||||
};
|
||||
};
|
||||
solutionId: string;
|
||||
fragmentId: string;
|
||||
contrastKey: string;
|
||||
compaterImages: string[];
|
||||
imgSummary: string;
|
||||
imageKey: string;
|
||||
srcImageUrl: string;
|
||||
algorithmVersion: string;
|
||||
cameraId: string;
|
||||
cameraName: string;
|
||||
}[];
|
||||
isArchiveDetail: boolean;
|
||||
ToolProps: {
|
||||
renderVideoBtn: boolean;
|
||||
disableVideo: boolean;
|
||||
};
|
||||
specialTitle: string;
|
||||
};
|
@ -19,7 +19,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
||||
// src/BigImageModal/mock.ts
|
||||
var mock_exports = {};
|
||||
__export(mock_exports, {
|
||||
IMAGE_DATA: () => IMAGE_DATA
|
||||
BIG_IMAGE_DATA: () => BIG_IMAGE_DATA,
|
||||
IMAGE_DATA: () => IMAGE_DATA,
|
||||
attributeList: () => attributeList
|
||||
});
|
||||
module.exports = __toCommonJS(mock_exports);
|
||||
var IMAGE_DATA = {
|
||||
@ -28,449 +30,6 @@ var IMAGE_DATA = {
|
||||
"COMPATER",
|
||||
"NORMAL"
|
||||
],
|
||||
"dataSources": [
|
||||
{
|
||||
"objectId": "1742110565582518272",
|
||||
"condition": {
|
||||
"featureInfo": null,
|
||||
"featureData": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
||||
"imageData": "",
|
||||
"alg": "VERSION_REID_HEAD_ATTR",
|
||||
"rect": {
|
||||
"x": 0.271875,
|
||||
"y": 0.32222223,
|
||||
"w": 0.2859375,
|
||||
"h": 0.67777777
|
||||
},
|
||||
"objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg",
|
||||
"srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg"
|
||||
},
|
||||
"score": 0.7163062,
|
||||
"timestamp": 1704186491979,
|
||||
"deviceId": "129533",
|
||||
"id": "129533",
|
||||
"name": "4楼门口过道人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.125,
|
||||
"latitude": 30.280500411987305,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
},
|
||||
"objectIndex": {
|
||||
"objectId": "1742110565582518272",
|
||||
"solutionId": "1",
|
||||
"deviceId": "129533",
|
||||
"fragmentId": "0"
|
||||
},
|
||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||
"isObjectTrack": true,
|
||||
"pathId": "1742110532019697664",
|
||||
"frameInfo": {
|
||||
"frameId": "0",
|
||||
"frameTimestamp": "1704186491979",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"originWidth": 1920,
|
||||
"originHeight": 1080,
|
||||
"offsetTime": "24714687",
|
||||
"skipNumber": "0"
|
||||
},
|
||||
"level": 1,
|
||||
"bboxInFrame": {
|
||||
"x": 0.603125,
|
||||
"y": 0.3314815,
|
||||
"w": 0.0578125,
|
||||
"h": 0.2712963
|
||||
},
|
||||
"bboxExtInFrame": {
|
||||
"x": 0.546875,
|
||||
"y": 0.2638889,
|
||||
"w": 0.17135416,
|
||||
"h": 0.40648147
|
||||
},
|
||||
"objectImageKey": "",
|
||||
"objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565582518272.jpg",
|
||||
"frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565603489792.jpg",
|
||||
"confidence": 0.817271,
|
||||
"sourceObjectId": "1742110565603489792",
|
||||
"storeTimestamp": "0",
|
||||
"gbNumber": "",
|
||||
"qualityScore": 0,
|
||||
"subObjectCount": 1,
|
||||
"subObjectType": [
|
||||
"OBJECT_TYPE_FACE"
|
||||
],
|
||||
"subObjectIds": [
|
||||
"1742110532015503360"
|
||||
],
|
||||
"cameraInfo": {
|
||||
"id": "129533",
|
||||
"name": "4楼门口过道人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.125,
|
||||
"latitude": 30.280500411987305,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
}
|
||||
},
|
||||
"solutionId": "1",
|
||||
"fragmentId": "0",
|
||||
"contrastKey": "singer-20240102/1/129533/1742110565582518272.jpg",
|
||||
"compaterImages": [
|
||||
"http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"
|
||||
],
|
||||
"imgSummary": "singer-20240102/1/129533/1742110565582518272.jpg",
|
||||
"imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565582518272.jpg",
|
||||
"srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565603489792.jpg",
|
||||
"algorithmVersion": "VERSION_REID_HEAD_ATTR",
|
||||
"cameraId": "129533",
|
||||
"cameraName": "4楼门口过道人脸"
|
||||
},
|
||||
{
|
||||
"objectId": "1742092780462684161",
|
||||
"condition": {
|
||||
"featureInfo": null,
|
||||
"featureData": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
||||
"imageData": "",
|
||||
"alg": "VERSION_REID_HEAD_ATTR",
|
||||
"rect": {
|
||||
"x": 0.271875,
|
||||
"y": 0.32222223,
|
||||
"w": 0.2859375,
|
||||
"h": 0.67777777
|
||||
},
|
||||
"objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg",
|
||||
"srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg"
|
||||
},
|
||||
"score": 0.70154816,
|
||||
"timestamp": 1704182251640,
|
||||
"deviceId": "129533",
|
||||
"id": "129533",
|
||||
"name": "4楼门口过道人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.125,
|
||||
"latitude": 30.280500411987305,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
},
|
||||
"objectIndex": {
|
||||
"objectId": "1742092780462684161",
|
||||
"solutionId": "1",
|
||||
"deviceId": "129533",
|
||||
"fragmentId": "0"
|
||||
},
|
||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||
"isObjectTrack": true,
|
||||
"pathId": "1742092746237163520",
|
||||
"frameInfo": {
|
||||
"frameId": "0",
|
||||
"frameTimestamp": "1704182251640",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"originWidth": 1920,
|
||||
"originHeight": 1080,
|
||||
"offsetTime": "20474348",
|
||||
"skipNumber": "0"
|
||||
},
|
||||
"level": 1,
|
||||
"bboxInFrame": {
|
||||
"x": 0.63177085,
|
||||
"y": 0.38333333,
|
||||
"w": 0.078125,
|
||||
"h": 0.3537037
|
||||
},
|
||||
"bboxExtInFrame": {
|
||||
"x": 0.55885416,
|
||||
"y": 0.29537037,
|
||||
"w": 0.22447917,
|
||||
"h": 0.5314815
|
||||
},
|
||||
"objectImageKey": "",
|
||||
"objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092780462684161.jpg",
|
||||
"frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092780768868352.jpg",
|
||||
"confidence": 0.888334,
|
||||
"sourceObjectId": "1742092780768868352",
|
||||
"storeTimestamp": "0",
|
||||
"gbNumber": "",
|
||||
"qualityScore": 0,
|
||||
"subObjectCount": 1,
|
||||
"subObjectType": [
|
||||
"OBJECT_TYPE_FACE"
|
||||
],
|
||||
"subObjectIds": [
|
||||
"1742092746232969217"
|
||||
],
|
||||
"cameraInfo": {
|
||||
"id": "129533",
|
||||
"name": "4楼门口过道人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.125,
|
||||
"latitude": 30.280500411987305,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
}
|
||||
},
|
||||
"solutionId": "1",
|
||||
"fragmentId": "0",
|
||||
"contrastKey": "singer-20240102/1/129533/1742092780462684161.jpg",
|
||||
"compaterImages": [
|
||||
"http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"
|
||||
],
|
||||
"imgSummary": "singer-20240102/1/129533/1742092780462684161.jpg",
|
||||
"imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092780462684161.jpg",
|
||||
"srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092780768868352.jpg",
|
||||
"algorithmVersion": "VERSION_REID_HEAD_ATTR",
|
||||
"cameraId": "129533",
|
||||
"cameraName": "4楼门口过道人脸"
|
||||
},
|
||||
{
|
||||
"objectId": "1742092514409592832",
|
||||
"condition": {
|
||||
"featureInfo": null,
|
||||
"featureData": "AAAAAAAAAAAAAAA==",
|
||||
"imageData": "",
|
||||
"alg": "VERSION_REID_HEAD_ATTR",
|
||||
"rect": {
|
||||
"x": 0.271875,
|
||||
"y": 0.32222223,
|
||||
"w": 0.2859375,
|
||||
"h": 0.67777777
|
||||
},
|
||||
"objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg",
|
||||
"srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg"
|
||||
},
|
||||
"score": 0.703765,
|
||||
"timestamp": 1704182186451,
|
||||
"deviceId": "129529",
|
||||
"id": "129529",
|
||||
"name": "4入口人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.12100219726562,
|
||||
"latitude": 30.280099868774414,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "34",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
},
|
||||
"objectIndex": {
|
||||
"objectId": "1742092514409592832",
|
||||
"solutionId": "1",
|
||||
"deviceId": "129529",
|
||||
"fragmentId": "0"
|
||||
},
|
||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||
"isObjectTrack": true,
|
||||
"pathId": "1742092482440607744",
|
||||
"frameInfo": {
|
||||
"frameId": "0",
|
||||
"frameTimestamp": "1704182186451",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"originWidth": 2560,
|
||||
"originHeight": 1440,
|
||||
"offsetTime": "20409182",
|
||||
"skipNumber": "0"
|
||||
},
|
||||
"level": 1,
|
||||
"bboxInFrame": {
|
||||
"x": 0.6195313,
|
||||
"y": 0.24583334,
|
||||
"w": 0.09804688,
|
||||
"h": 0.41944444
|
||||
},
|
||||
"bboxExtInFrame": {
|
||||
"x": 0.53515625,
|
||||
"y": 0.14027777,
|
||||
"w": 0.26640624,
|
||||
"h": 0.63125
|
||||
},
|
||||
"objectImageKey": "",
|
||||
"objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092514409592832.jpg",
|
||||
"frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092515508500480.jpg",
|
||||
"confidence": 0.92494,
|
||||
"sourceObjectId": "1742092515508500480",
|
||||
"storeTimestamp": "0",
|
||||
"gbNumber": "",
|
||||
"qualityScore": 0,
|
||||
"subObjectCount": 1,
|
||||
"subObjectType": [
|
||||
"OBJECT_TYPE_FACE"
|
||||
],
|
||||
"subObjectIds": [
|
||||
"1742092482432219136"
|
||||
],
|
||||
"cameraInfo": {
|
||||
"id": "129529",
|
||||
"name": "4入口人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.12100219726562,
|
||||
"latitude": 30.280099868774414,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "34",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
}
|
||||
},
|
||||
"solutionId": "1",
|
||||
"fragmentId": "0",
|
||||
"contrastKey": "singer-20240102/1/129529/1742092514409592832.jpg",
|
||||
"compaterImages": [
|
||||
"http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"
|
||||
],
|
||||
"imgSummary": "singer-20240102/1/129529/1742092514409592832.jpg",
|
||||
"imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092514409592832.jpg",
|
||||
"srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092515508500480.jpg",
|
||||
"algorithmVersion": "VERSION_REID_HEAD_ATTR",
|
||||
"cameraId": "129529",
|
||||
"cameraName": "4入口人脸"
|
||||
}
|
||||
],
|
||||
"selectIndex": 4,
|
||||
"disableBtn": [
|
||||
0,
|
||||
@ -507,30 +66,6 @@ var IMAGE_DATA = {
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
},
|
||||
"objectIndex": {
|
||||
"objectId": "1742110565582518272",
|
||||
"solutionId": "1",
|
||||
@ -578,41 +113,6 @@ var IMAGE_DATA = {
|
||||
"subObjectIds": [
|
||||
"1742110532015503360"
|
||||
],
|
||||
"cameraInfo": {
|
||||
"id": "129533",
|
||||
"name": "4楼门口过道人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.125,
|
||||
"latitude": 30.280500411987305,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
}
|
||||
},
|
||||
"solutionId": "1",
|
||||
"fragmentId": "0",
|
||||
"contrastKey": "singer-20240102/1/129533/1742110565582518272.jpg",
|
||||
@ -654,30 +154,6 @@ var IMAGE_DATA = {
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
},
|
||||
"objectIndex": {
|
||||
"objectId": "1742092680994764802",
|
||||
"solutionId": "1",
|
||||
@ -721,41 +197,6 @@ var IMAGE_DATA = {
|
||||
"subObjectCount": 0,
|
||||
"subObjectType": [],
|
||||
"subObjectIds": [],
|
||||
"cameraInfo": {
|
||||
"id": "129533",
|
||||
"name": "4楼门口过道人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.125,
|
||||
"latitude": 30.280500411987305,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "38",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
}
|
||||
},
|
||||
"solutionId": "1",
|
||||
"fragmentId": "0",
|
||||
"contrastKey": "singer-20240102/1/129533/1742092680994764802.jpg",
|
||||
@ -797,30 +238,6 @@ var IMAGE_DATA = {
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "34",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
},
|
||||
"objectIndex": {
|
||||
"objectId": "1742092514409592832",
|
||||
"solutionId": "1",
|
||||
@ -868,41 +285,6 @@ var IMAGE_DATA = {
|
||||
"subObjectIds": [
|
||||
"1742092482432219136"
|
||||
],
|
||||
"cameraInfo": {
|
||||
"id": "129529",
|
||||
"name": "4入口人脸",
|
||||
"dirid": "0",
|
||||
"status": "1",
|
||||
"longitude": 120.12100219726562,
|
||||
"latitude": 30.280099868774414,
|
||||
"caseId": "0",
|
||||
"caseGroup": "",
|
||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||
"extendInfo": {
|
||||
"vmsPlatformId": "29",
|
||||
"vmsChannel": "34",
|
||||
"vmsCameraDecoderTag": "hikvision",
|
||||
"platformPluginType": "PLATFORM_PLUGIN_TYPE_HAIKANG_NVR",
|
||||
"deviceVender": "0",
|
||||
"type": "DEVICEMANAGER_CAMERA_TYPE_NORMAL",
|
||||
"ip": "",
|
||||
"port": "0",
|
||||
"username": "",
|
||||
"passwd": "",
|
||||
"rtspAddress": "",
|
||||
"facesnapChannel": "",
|
||||
"edgeDeviceSn": "",
|
||||
"platform1400Id": 0,
|
||||
"useRtspAddress": false,
|
||||
"frameCheck": false,
|
||||
"frameRectX": 0,
|
||||
"frameRectY": 0,
|
||||
"frameRectW": 0,
|
||||
"frameRectH": 0,
|
||||
"edgeNodeId": "0",
|
||||
"processStatus": "FILTER_REALTIME_DEFAULT"
|
||||
}
|
||||
},
|
||||
"solutionId": "1",
|
||||
"fragmentId": "0",
|
||||
"contrastKey": "singer-20240102/1/129529/1742092514409592832.jpg",
|
||||
@ -924,7 +306,262 @@ var IMAGE_DATA = {
|
||||
},
|
||||
"specialTitle": ""
|
||||
};
|
||||
var BIG_IMAGE_DATA = [
|
||||
{
|
||||
imageKey: "http://10.0.0.120:30003/file/singer-20240110/1/5/1744894622934503424.jpg",
|
||||
imgSummary: "http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg",
|
||||
flvUrl: "ws://10.0.0.120:9033/flv/Sip/34020000001310000301.flv?ip=10.0.0.120&stime=1704815972&etime=1704815992",
|
||||
compaterImages: [
|
||||
"http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg",
|
||||
"http://10.0.0.120:30003/file/public/public_20240117/file/dfdd3340-53c8-4dc4-9921-f13230aa0355.jpg"
|
||||
],
|
||||
odRect: {
|
||||
"x": 0.5445312,
|
||||
"y": 0.19166666,
|
||||
"w": 0.08671875,
|
||||
"h": 0.40138888
|
||||
},
|
||||
attachImg: [
|
||||
{
|
||||
"url": "http://10.0.0.120:30003/file/singer-20240110/1/5/1744894622695428096.jpg",
|
||||
"label": "形体"
|
||||
},
|
||||
{
|
||||
"url": "http://10.0.0.120:30003/file/singer-20240110/1/5/1744894588427964418.jpg",
|
||||
"label": "人脸"
|
||||
}
|
||||
],
|
||||
score: "0.6",
|
||||
// 人脸质量分
|
||||
showScore: true,
|
||||
// 人脸质量分
|
||||
cameraPosition: "string",
|
||||
// 摄像头位置
|
||||
time: "2022-01-01",
|
||||
// 摄像头拍摄时间
|
||||
objects: [
|
||||
{
|
||||
"objectIndex": {
|
||||
"objectId": "1746832189053474816",
|
||||
"solutionId": "0",
|
||||
"deviceId": "0",
|
||||
"fragmentId": "0"
|
||||
},
|
||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||
"sourceObjectId": "0",
|
||||
"level": 0,
|
||||
"confidence": 0.881164,
|
||||
"frameInfo": {
|
||||
"frameId": "0",
|
||||
"frameTimestamp": "1705312223057",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"originWidth": 0,
|
||||
"originHeight": 0,
|
||||
"offsetTime": "0",
|
||||
"skipNumber": "0"
|
||||
},
|
||||
"infoOnSource": {
|
||||
"bboxInFrame": {
|
||||
"bboxRatio": {
|
||||
"x": 0.61418945,
|
||||
"y": 0.34309354,
|
||||
"w": 0.067661405,
|
||||
"h": 0.34659258
|
||||
}
|
||||
},
|
||||
"countInSource": 0,
|
||||
"indexInSource": 0
|
||||
},
|
||||
"qualityScore": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
imageKey: "http://10.0.0.120:30003/file/singer-20240115/1/9/1746795581994436608.jpg",
|
||||
imgSummary: "http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg",
|
||||
odRect: {
|
||||
"x": 0.553125,
|
||||
"y": 0.29722223,
|
||||
"w": 0.048958335,
|
||||
"h": 0.2462963
|
||||
},
|
||||
attachImg: [
|
||||
{
|
||||
"url": "http://10.0.0.120:30003/file/singer-20240115/1/9/1746795581163964416.jpg",
|
||||
"label": "形体"
|
||||
},
|
||||
{
|
||||
"url": "http://10.0.0.120:30003/file/singer-20240115/1/9/1746795546867140608.jpg",
|
||||
"label": "人脸"
|
||||
}
|
||||
],
|
||||
flvUrl: "ws://10.0.0.120:9033/flv/HaikangNvr/34.flv?ip=10.0.2.103&stime=1705302394&etime=1705302414",
|
||||
score: 0.815207,
|
||||
// 人脸质量分
|
||||
showScore: true,
|
||||
// 人脸质量分
|
||||
cameraPosition: "string",
|
||||
// 摄像头位置
|
||||
time: "2022-01-01",
|
||||
// 摄像头拍摄时间
|
||||
objects: [
|
||||
{
|
||||
"objectIndex": {
|
||||
"objectId": "1746816737430472704",
|
||||
"solutionId": "0",
|
||||
"deviceId": "0",
|
||||
"fragmentId": "0"
|
||||
},
|
||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||
"sourceObjectId": "0",
|
||||
"frameInfo": {
|
||||
"frameId": "0",
|
||||
"frameTimestamp": "1705308539109",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"originWidth": 0,
|
||||
"originHeight": 0,
|
||||
"offsetTime": "0",
|
||||
"skipNumber": "0"
|
||||
},
|
||||
"infoOnSource": {
|
||||
"bboxInFrame": {
|
||||
"bboxRatio": {
|
||||
"x": 0.5519352,
|
||||
"y": 0.2965385,
|
||||
"w": 0.05185461,
|
||||
"h": 0.24698898
|
||||
}
|
||||
},
|
||||
"countInSource": 0,
|
||||
"indexInSource": 0
|
||||
},
|
||||
"qualityScore": 0
|
||||
},
|
||||
{
|
||||
"objectIndex": {
|
||||
"objectId": "1746816737430472705",
|
||||
"solutionId": "0",
|
||||
"deviceId": "0",
|
||||
"fragmentId": "0"
|
||||
},
|
||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||
"sourceObjectId": "0",
|
||||
"level": 0,
|
||||
"confidence": 0.9310699,
|
||||
"frameInfo": {
|
||||
"frameId": "0",
|
||||
"frameTimestamp": "1705308539109",
|
||||
"width": 0,
|
||||
"height": 0,
|
||||
"originWidth": 0,
|
||||
"originHeight": 0,
|
||||
"offsetTime": "0",
|
||||
"skipNumber": "0"
|
||||
},
|
||||
"infoOnSource": {
|
||||
"bboxInFrame": {
|
||||
"bboxRatio": {
|
||||
"x": 0.58543766,
|
||||
"y": 0.3203356,
|
||||
"w": 0.052037954,
|
||||
"h": 0.2664015
|
||||
}
|
||||
},
|
||||
"countInSource": 0,
|
||||
"indexInSource": 0
|
||||
},
|
||||
"qualityScore": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
var attributeList = [
|
||||
{
|
||||
title: "人员属性",
|
||||
children: [
|
||||
{
|
||||
key: "1",
|
||||
label: "性别",
|
||||
children: "男"
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
label: "年龄",
|
||||
children: "成年"
|
||||
},
|
||||
{
|
||||
key: "3",
|
||||
label: "帽子",
|
||||
children: "无"
|
||||
},
|
||||
{
|
||||
key: "4",
|
||||
label: "上身颜色",
|
||||
children: "灰"
|
||||
},
|
||||
{
|
||||
key: "5",
|
||||
label: "下身颜色",
|
||||
children: "蓝色"
|
||||
},
|
||||
{
|
||||
key: "6",
|
||||
label: "附着物",
|
||||
children: "无"
|
||||
},
|
||||
{
|
||||
key: "7",
|
||||
label: "骑行",
|
||||
children: "否"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "社区规范",
|
||||
children: [
|
||||
{
|
||||
key: "1",
|
||||
label: "性别",
|
||||
children: "男"
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
label: "年龄",
|
||||
children: "成年"
|
||||
},
|
||||
{
|
||||
key: "3",
|
||||
label: "帽子",
|
||||
children: "无"
|
||||
},
|
||||
{
|
||||
key: "4",
|
||||
label: "上身颜色",
|
||||
children: "灰"
|
||||
},
|
||||
{
|
||||
key: "5",
|
||||
label: "下身颜色",
|
||||
children: "蓝色"
|
||||
},
|
||||
{
|
||||
key: "6",
|
||||
label: "附着物",
|
||||
children: "无"
|
||||
},
|
||||
{
|
||||
key: "7",
|
||||
label: "骑行",
|
||||
children: "否"
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
IMAGE_DATA
|
||||
BIG_IMAGE_DATA,
|
||||
IMAGE_DATA,
|
||||
attributeList
|
||||
});
|
||||
|
@ -1,153 +0,0 @@
|
||||
/**
|
||||
* 适配老的大屏组件数据格式传入
|
||||
*/
|
||||
import React from 'react';
|
||||
import { AlgorithmVersionStr, HumanProperty, ObjectType, Rect, ViewOption, AlignType, IScreenshotButtonProp, ODRECT } from '@zhst/types';
|
||||
export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'TRACK';
|
||||
export type MODEL_TYPE = 'VIDEO' | 'IMAGE';
|
||||
export interface ImgViewProps extends React.HTMLAttributes<HTMLElement> {
|
||||
imageKey: string;
|
||||
odRect: ODRECT;
|
||||
attachImg?: Array<{
|
||||
label: string;
|
||||
url: string;
|
||||
}>;
|
||||
showAttachImgLabel: boolean;
|
||||
screenshotButtonAlign: AlignType;
|
||||
screenshotButtonRender: (screenshotButtonProp: IScreenshotButtonProp) => React.ReactElement;
|
||||
scale$?: number;
|
||||
showCrop$?: boolean;
|
||||
hideLeftTopBtn?: boolean;
|
||||
score?: number;
|
||||
viewOption?: ViewOption;
|
||||
}
|
||||
export interface VideoViewProps {
|
||||
flvUrl: string;
|
||||
maxDuration?: number;
|
||||
screenshotButtonAlign?: AlignType;
|
||||
screenshotButtonRender?: (screenshotButtonProp: IScreenshotButtonProp) => React.ReactElement;
|
||||
defautlNormalizationRect?: Rect;
|
||||
onCropChange?: (showCrop: boolean, normalizationRect: null | Rect) => void;
|
||||
showCrop$?: boolean;
|
||||
}
|
||||
export interface CarouselProps {
|
||||
hasPre?: boolean;
|
||||
hasNext?: boolean;
|
||||
selectIndex: number;
|
||||
setSelectIndex: React.Dispatch<React.SetStateAction<number>>;
|
||||
dataSource: Array<{
|
||||
key: string;
|
||||
url: string;
|
||||
}>;
|
||||
}
|
||||
export type ISelectItem = Partial<Omit<ImgViewProps, 'screenshotButtonRender'>> & Partial<Omit<VideoViewProps, 'screenshotButtonRender'>>;
|
||||
export interface HeaderProps {
|
||||
value: TAB_TYPE;
|
||||
onChange: (type: TAB_TYPE) => void;
|
||||
tabsFilter: TAB_TYPE[];
|
||||
}
|
||||
export interface ImgViewRef {
|
||||
imgInsRef: React.MutableRefObject<any>;
|
||||
setShowCrop: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
}
|
||||
export interface VideoViewRef {
|
||||
cropAble: boolean;
|
||||
setShowCrop: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
downloadVideoframe: () => void;
|
||||
}
|
||||
export interface ParamProps {
|
||||
tab: string;
|
||||
selectItem: ISelectItem;
|
||||
imgViewRef: React.MutableRefObject<ImgViewRef>;
|
||||
VideoViewRef: React.MutableRefObject<VideoViewRef>;
|
||||
model: MODEL_TYPE;
|
||||
setModel: React.Dispatch<React.SetStateAction<MODEL_TYPE>>;
|
||||
scale$: number;
|
||||
showCrop$: boolean;
|
||||
}
|
||||
export interface BigImageData {
|
||||
extendRectList: (Rect & {
|
||||
algorithmVersion: AlgorithmVersionStr;
|
||||
imageKey: string;
|
||||
})[];
|
||||
rectList: (Rect & {
|
||||
algorithmVersion: AlgorithmVersionStr;
|
||||
imageKey: string;
|
||||
})[];
|
||||
attachImg: {
|
||||
url: string;
|
||||
label: '形体' | '人脸';
|
||||
}[];
|
||||
odRect: Rect;
|
||||
imageKey: string;
|
||||
imgSummary: string;
|
||||
objectExtImageKey: string;
|
||||
attributeList: {
|
||||
label: string;
|
||||
list: any[];
|
||||
}[];
|
||||
archiveImages?: any;
|
||||
spaceName: string;
|
||||
objectType: ObjectType;
|
||||
objectId: string;
|
||||
bodyObjectId?: string;
|
||||
faceObjectId?: string;
|
||||
sourceObjectId?: string;
|
||||
cameraId: string;
|
||||
cameraName: string;
|
||||
selectIndex: number;
|
||||
humanProperty: HumanProperty;
|
||||
qualityScore?: number;
|
||||
score: number;
|
||||
timestamp: string;
|
||||
bodyImageUrl: string;
|
||||
faceImageUrl: string;
|
||||
algorithmVersion: AlgorithmVersionStr;
|
||||
bodySpaceName: string;
|
||||
faceSpaceName: string;
|
||||
solutionId?: string;
|
||||
[index: string]: any;
|
||||
}
|
||||
interface IOldImageData {
|
||||
visible?: boolean;
|
||||
defaultModel?: MODEL_TYPE;
|
||||
onClose?: () => void;
|
||||
isLoading?: boolean;
|
||||
hasPre?: boolean;
|
||||
hasNext?: boolean;
|
||||
selectIndex?: number;
|
||||
onSelectIndexChange?: (i: number) => void;
|
||||
dataSource: any[];
|
||||
dataSources: any[];
|
||||
relatedData?: any[];
|
||||
transformPropFunc: (item: any) => ISelectItem;
|
||||
transformVideoPropFunc: (item: ISelectItem) => Promise<Omit<VideoViewProps, 'screenshotButtonRender'>>;
|
||||
screenshotButtonRender?: (screenshotButtonProp: IScreenshotButtonProp) => React.ReactElement;
|
||||
showTool?: boolean;
|
||||
showCarousel?: boolean;
|
||||
imgViewProp?: Partial<ImgViewProps>;
|
||||
videoViewProp?: Partial<VideoViewProps>;
|
||||
ToolProps?: Partial<ToolProps>;
|
||||
nullDialogProp?: {
|
||||
emptyText?: string;
|
||||
};
|
||||
showHeader?: boolean;
|
||||
tabsFilter?: TAB_TYPE[];
|
||||
useVirtual?: boolean;
|
||||
loadNext?: (i: number) => Promise<void>;
|
||||
loadPre?: (i: number) => Promise<void>;
|
||||
children: React.ReactNode;
|
||||
title?: string;
|
||||
specialTitle?: string;
|
||||
isRelated?: boolean;
|
||||
carouselProp?: Partial<CarouselProps>;
|
||||
}
|
||||
export interface ToolProps {
|
||||
renderRight?: (props: ParamProps) => React.ReactNode;
|
||||
renderLeft?: (props: ParamProps) => React.ReactNode;
|
||||
renderVideoBtn?: boolean;
|
||||
param: ParamProps;
|
||||
disableVideo: boolean;
|
||||
}
|
||||
declare const _default: (data: IOldImageData) => IOldImageData;
|
||||
export default _default;
|
@ -1,28 +0,0 @@
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/adapter/BigImageModalAdapter/index.tsx
|
||||
var BigImageModalAdapter_exports = {};
|
||||
__export(BigImageModalAdapter_exports, {
|
||||
default: () => BigImageModalAdapter_default
|
||||
});
|
||||
module.exports = __toCommonJS(BigImageModalAdapter_exports);
|
||||
var BigImageModalAdapter_default = (data) => {
|
||||
const newData = data;
|
||||
return newData;
|
||||
};
|
1
packages/biz/lib/adapter/index.d.ts
vendored
1
packages/biz/lib/adapter/index.d.ts
vendored
@ -1 +0,0 @@
|
||||
export { default as BigImageModalAdapter } from './BigImageModalAdapter';
|
@ -1,39 +0,0 @@
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/adapter/index.ts
|
||||
var adapter_exports = {};
|
||||
__export(adapter_exports, {
|
||||
BigImageModalAdapter: () => import_BigImageModalAdapter.default
|
||||
});
|
||||
module.exports = __toCommonJS(adapter_exports);
|
||||
var import_BigImageModalAdapter = __toESM(require("./BigImageModalAdapter"));
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
BigImageModalAdapter
|
||||
});
|
1
packages/biz/lib/index.d.ts
vendored
1
packages/biz/lib/index.d.ts
vendored
@ -1,3 +1,2 @@
|
||||
export { default as Demo } from './Demo';
|
||||
export * from './adapter';
|
||||
export { default as BigImageModal } from './BigImageModal';
|
||||
|
@ -16,7 +16,6 @@ var __copyProps = (to, from, except, desc) => {
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
@ -35,11 +34,9 @@ __export(src_exports, {
|
||||
});
|
||||
module.exports = __toCommonJS(src_exports);
|
||||
var import_Demo = __toESM(require("./Demo"));
|
||||
__reExport(src_exports, require("./adapter"), module.exports);
|
||||
var import_BigImageModal = __toESM(require("./BigImageModal"));
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
BigImageModal,
|
||||
Demo,
|
||||
...require("./adapter")
|
||||
Demo
|
||||
});
|
||||
|
26
packages/biz/lib/useSocket/index.d.ts
vendored
26
packages/biz/lib/useSocket/index.d.ts
vendored
@ -1,26 +0,0 @@
|
||||
export declare const SocketApi: {
|
||||
CameraTaskStatue: string;
|
||||
DeviceStatus: string;
|
||||
SubscribeSolutionDeploy: string;
|
||||
SubscribeTasksSummary: string;
|
||||
MonitorSubscribeResult: string;
|
||||
MonitorSubscribeStatus: string;
|
||||
SubscribeArchiveGroupUpload: string;
|
||||
SubscribeJointTask: string;
|
||||
SubscribeGroupFragment: string;
|
||||
SubscribeGroup: string;
|
||||
SubscribeStreamEvent: string;
|
||||
};
|
||||
type ApiKeys = keyof typeof SocketApi;
|
||||
declare const _default: (topic: ApiKeys, iterator?: any, opt?: {
|
||||
req?: {
|
||||
[key: string]: any;
|
||||
} | undefined;
|
||||
throttle?: number | undefined;
|
||||
parseData?: boolean | undefined;
|
||||
beforeLoopTmp?: Function | undefined;
|
||||
shouldBreak: boolean;
|
||||
forceRefresh: any;
|
||||
close?: boolean | undefined;
|
||||
} | undefined) => void;
|
||||
export default _default;
|
@ -37,7 +37,6 @@ var import_react = require("react");
|
||||
var import_func = require("@zhst/func");
|
||||
var import_hooks = require("@zhst/hooks");
|
||||
var import_ws = __toESM(require("./ws"));
|
||||
var noop = (v) => null;
|
||||
var getSelf = (v) => v;
|
||||
var SocketApi = {
|
||||
CameraTaskStatue: "singer.DeviceService/SubScribeCameraTaskStatus",
|
||||
@ -55,11 +54,10 @@ var SocketApi = {
|
||||
SubscribeStreamEvent: "singer.MediaManagerService/SubscribeStreamEvent"
|
||||
// 监听视频分组状态变化,列表变化也通知
|
||||
};
|
||||
var useSocket_default = (topic, iterator = noop, opt) => {
|
||||
var useSocket_default = (topic, iterator = import_func.noop, opt) => {
|
||||
const {
|
||||
req = {},
|
||||
throttle = 0,
|
||||
parseData = true,
|
||||
beforeLoopTmp = getSelf,
|
||||
shouldBreak = false,
|
||||
forceRefresh,
|
||||
|
5
packages/biz/lib/useSocket/ws.d.ts
vendored
5
packages/biz/lib/useSocket/ws.d.ts
vendored
@ -1,8 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
declare class Channel {
|
||||
/**
|
||||
* io 实例化对象
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@zhst/biz",
|
||||
"version": "0.3.2",
|
||||
"version": "0.5.0",
|
||||
"description": "业务库",
|
||||
"keywords": [
|
||||
"business",
|
||||
@ -35,7 +35,7 @@
|
||||
"registry": "http://10.0.0.77:4874"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@zhst/types": "workspace:^"
|
||||
"@types/zhst": "workspace:^"
|
||||
},
|
||||
"dependencies": {
|
||||
"@zhst/func": "workspace:^",
|
||||
|
@ -4,7 +4,8 @@ import { ConfigProvider, Descriptions, Modal, Tabs, Button, BigImagePreview, Vid
|
||||
import classNames from 'classnames'
|
||||
import type { ModalProps, DescriptionsProps, TabsProps, VideoViewRef, ImgViewRef } from '@zhst/meta'
|
||||
import { get, isEmpty } from '@zhst/func';
|
||||
import { MODEL_TYPE, TAB_TYPE } from '@zhst/types';
|
||||
|
||||
|
||||
import './index.less'
|
||||
import Navigation from './components/navigation';
|
||||
import CombineImage from './components/CombineImage'
|
||||
@ -14,6 +15,9 @@ const DescriptionsItem = Descriptions.Item
|
||||
|
||||
export const componentPrefix = 'zhst-image'
|
||||
|
||||
export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'VIDEO';
|
||||
export type MODEL_TYPE = 'VIDEO' | 'IMAGE';
|
||||
|
||||
export interface BigImageModalProps extends ModalProps {
|
||||
visible: boolean // 弹框显示隐藏
|
||||
activeTab?: TAB_TYPE // 当前 tab
|
||||
|
@ -1,7 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import classnames from 'classnames';
|
||||
import { Button } from 'antd';
|
||||
import { Icon } from '@zhst/meta';
|
||||
import { Icon, Button } from '@zhst/meta';
|
||||
import './index.less';
|
||||
|
||||
const componentName = `zhst-image__nav`;
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
// @ts-nocheck
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { BigImageModal } from '@zhst/biz'
|
||||
import { Button, Space } from '@zhst/meta'
|
||||
@ -6,7 +6,7 @@ import { BIG_IMAGE_DATA, attributeList } from '../mock'
|
||||
|
||||
|
||||
|
||||
const BigModal = (props) => {
|
||||
const BigModal = (props: any) => {
|
||||
const {
|
||||
} = props
|
||||
const [visible, setVisible] = useState(true)
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
// @ts-nocheck
|
||||
import React, { useState } from 'react';
|
||||
import { BigImageModal } from '@zhst/biz'
|
||||
import { Button, DescriptionsProps } from '@zhst/meta'
|
||||
|
@ -512,78 +512,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.relatedWrapper {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
padding: 0 30px;
|
||||
margin-bottom: 30px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.relatedTabs {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.relatedContent {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
|
||||
display: flex;
|
||||
|
||||
.relatedPics {
|
||||
width: 742px;
|
||||
height: 100px;
|
||||
// display: flex;
|
||||
// box-sizing: border-box;
|
||||
// background: #fafafa;
|
||||
// border-radius: 2px;
|
||||
// border: 1px solid #f0f0f0;
|
||||
// .LeftBtn,
|
||||
// .RighttBtn {
|
||||
// width: 34px;
|
||||
// height: 100%;
|
||||
// display: flex;
|
||||
// justify-content: center;
|
||||
// align-items: center;
|
||||
// }
|
||||
// .ListContent {
|
||||
// flex: 1;
|
||||
// height: 100%;
|
||||
// }
|
||||
}
|
||||
|
||||
.disabled {
|
||||
color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.relatedBtn {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #0099ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ant-tabs-left>.ant-tabs-content-holder>.ant-tabs-content>.ant-tabs-tabpane {
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
.ant-tabs-tab {
|
||||
padding: 8px 12px !important;
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.ant-tabs .ant-tabs-tab {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
import { DescriptionsProps } from "@zhst/meta";
|
||||
|
||||
export const IMAGE_DATA = {
|
||||
"enAbleDeleteFeature": true,
|
||||
"tabsFilter": [
|
||||
@ -441,7 +439,7 @@ export const BIG_IMAGE_DATA = [
|
||||
}
|
||||
]
|
||||
|
||||
export const attributeList: DescriptionsProps['items'] = [
|
||||
export const attributeList = [
|
||||
{
|
||||
title: '人员属性',
|
||||
children: [
|
||||
|
@ -1,10 +1,9 @@
|
||||
/**
|
||||
* 适配老的大屏组件数据格式传入
|
||||
*/
|
||||
import React, { FC } from 'react';
|
||||
import React, { } from 'react';
|
||||
import { AlgorithmVersionStr, HumanProperty, ObjectType, Rect, IScreenshotButtonProp } from '@zhst/types'
|
||||
import { VideoViewProps, ImgViewProps, VideoViewRef, ImgViewRef } from '@zhst/meta'
|
||||
import { IMAGE_DATA } from '../mock';
|
||||
|
||||
export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'TRACK';
|
||||
export type MODEL_TYPE = 'VIDEO' | 'IMAGE';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { Button } from 'antd'
|
||||
import { Button } from '@zhst/meta'
|
||||
import { useThrottleFn } from '@zhst/hooks'
|
||||
|
||||
export default () => {
|
||||
|
@ -4,7 +4,7 @@ import { getListTaskStatus, getCameraStatusFunc } from '../useTaskState';
|
||||
import Tree from '@common/components/CameraTree/Tree';
|
||||
import doRequest from '../../utils/request';
|
||||
import { Dayjs as Moment } from 'dayjs';
|
||||
import { message } from 'antd';
|
||||
import { message } from '@zhst/meta';
|
||||
import { SearchCamera } from '@common/components/CameraTree/utils';
|
||||
import { get, isEmpty } from '@zhst/func';
|
||||
import type { OperationType } from '../../interface'
|
||||
|
@ -1,9 +1,8 @@
|
||||
import { useMemo } from 'react';
|
||||
import { throttle as loadshThrottle } from '@zhst/func';
|
||||
import { throttle as loadshThrottle, noop } from '@zhst/func';
|
||||
import { useDeepEffect, useLatest } from '@zhst/hooks';
|
||||
import ws from './ws';
|
||||
|
||||
const noop = (v: any) => null;
|
||||
const getSelf = (v: any) => v;
|
||||
export const SocketApi = {
|
||||
CameraTaskStatue: 'singer.DeviceService/SubScribeCameraTaskStatus',
|
||||
@ -36,7 +35,6 @@ export default (
|
||||
const {
|
||||
req = {},
|
||||
throttle = 0,
|
||||
parseData = true,
|
||||
beforeLoopTmp = getSelf,
|
||||
shouldBreak = false,
|
||||
forceRefresh,
|
||||
|
@ -1,5 +1,59 @@
|
||||
# @zhst/biz
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- feat: 初版发布
|
||||
|
||||
## 0.4.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- feat: 初始化
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- fix: 修改 pkg
|
||||
|
||||
## 0.3.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix: 测试 hooks
|
||||
|
||||
## 0.3.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- feat: 测试 hooks 机器人
|
||||
|
||||
## 0.3.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- feat: 测试 hook 机器人
|
||||
|
||||
## 0.3.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix:测试机器人
|
||||
|
||||
## 0.3.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix: 修改变量
|
||||
|
||||
## 0.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix: 修改变量
|
||||
|
||||
## 0.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
@ -13,7 +13,7 @@ var __copyProps = (to, from, except, desc) => {
|
||||
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/index.tsx
|
||||
// src/index.ts
|
||||
var src_exports = {};
|
||||
module.exports = __toCommonJS(src_exports);
|
||||
__reExport(src_exports, require("./camera"), module.exports);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@zhst/constants",
|
||||
"version": "0.3.1",
|
||||
"version": "0.5.0",
|
||||
"description": "常量库",
|
||||
"keywords": [
|
||||
"constants",
|
||||
@ -16,12 +16,14 @@
|
||||
"lib/**/style/*",
|
||||
"*.less"
|
||||
],
|
||||
"main": "lib/index.tsx",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
"typings": "es/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./src/index.ts"
|
||||
"require": "./lib/index.js",
|
||||
"import": "./es/index.js",
|
||||
"default": "./es/index.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
|
@ -1,5 +1,41 @@
|
||||
# @zhst/utils
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- feat: 初版发布
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/request@0.5.0
|
||||
|
||||
## 0.4.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- feat: 初始化
|
||||
- Updated dependencies
|
||||
- @zhst/request@0.4.1
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- fix: 修改 pkg
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/request@0.4.0
|
||||
|
||||
## 0.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix: 修改 ignore
|
||||
|
||||
## 0.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
@ -7,5 +7,4 @@ export * from "./number";
|
||||
export * from "./time";
|
||||
export * from "./utils";
|
||||
export * from "./camera";
|
||||
export * from "./math";
|
||||
export * from "./upload";
|
||||
export * from "./math";
|
@ -1,4 +1,3 @@
|
||||
var _ALGORITHM_VERSION;
|
||||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
@ -9,8 +8,8 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
||||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
||||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
import { cloneDeep, get, isNull } from 'lodash-es';
|
||||
import { dataURLToBlob } from "../file";
|
||||
var proto = {
|
||||
@ -22,7 +21,7 @@ var proto = {
|
||||
}
|
||||
}
|
||||
};
|
||||
export var ALGORITHM_VERSION = (_ALGORITHM_VERSION = {}, _defineProperty(_ALGORITHM_VERSION, '7', '形体'), _defineProperty(_ALGORITHM_VERSION, '4', '人脸'), _defineProperty(_ALGORITHM_VERSION, '6', '非机动车'), _ALGORITHM_VERSION);
|
||||
export var ALGORITHM_VERSION = _defineProperty(_defineProperty(_defineProperty({}, '7', '形体'), '4', '人脸'), '6', '非机动车');
|
||||
export var algorithmVersions = _toConsumableArray(Object.keys(ALGORITHM_VERSION));
|
||||
export var getBikeExtendRect = function getBikeExtendRect(rect, maxW) {
|
||||
var newRect = _objectSpread({}, rect);
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@zhst/func",
|
||||
"version": "0.3.0",
|
||||
"version": "0.5.0",
|
||||
"description": "函数合集",
|
||||
"keywords": [
|
||||
"hooks"
|
||||
@ -18,7 +18,9 @@
|
||||
"typings": "es/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./src/index.ts"
|
||||
"require": "./lib/index.js",
|
||||
"import": "./es/index.js",
|
||||
"default": "./es/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
@ -48,6 +50,6 @@
|
||||
"@types/file-saver": "^2.0.7",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/uuid": "^9.0.7",
|
||||
"@zhst/types": "workspace:^"
|
||||
"@types/zhst": "workspace:^"
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,8 @@ import JSZip from 'jszip';
|
||||
import FileSaver from 'file-saver';
|
||||
import { matchS3Prefix } from '../utils'
|
||||
import { get, isString } from 'lodash-es';
|
||||
import { Rect } from '@zhst/types'
|
||||
|
||||
export type Rect = { x: number; y: number; w: number; h: number };
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -8,4 +8,3 @@ export * from './time'
|
||||
export * from './utils'
|
||||
export * from './camera'
|
||||
export * from './math'
|
||||
export * from './upload'
|
||||
|
@ -1,59 +0,0 @@
|
||||
import dayjs from "dayjs";
|
||||
import { getFileSuffix, getImageSuffixByFileType } from "../utils";
|
||||
import base64 from "base-64";
|
||||
import { v4 as uuidV4 } from 'uuid'
|
||||
import { get } from "lodash-es";
|
||||
import request from '@zhst/request'
|
||||
|
||||
//小文件上传走s3
|
||||
const defaultBucket = 'public';
|
||||
type uploadOption = {
|
||||
bucket?: string;
|
||||
dir?: string;
|
||||
withSuFuffix?: boolean;
|
||||
};
|
||||
|
||||
export const commonUpload = async (file: File, option: uploadOption = {}, type: string) => {
|
||||
const { bucket = defaultBucket, dir = 'file', withSuFuffix = false } = option;
|
||||
const prefix = `${dayjs().format('YYYYMMDD')}`;
|
||||
const fileSuffix = withSuFuffix ? getFileSuffix(get(file, 'name')) : '';
|
||||
const fileType = file['type'].split('/', 2);
|
||||
let imageSuffix = '';
|
||||
if (fileType['0'] === 'image') {
|
||||
imageSuffix = getImageSuffixByFileType(fileType['1']);
|
||||
}
|
||||
|
||||
const key = `${prefix}/${dir ? `${dir}/` : ''}${uuidV4()}${!fileSuffix ? '' : `.${fileSuffix}`}`;
|
||||
let imgKey = `${bucket}_${bucket}_${key}${imageSuffix}`; //后端约定 见https://docs.qq.com/doc/DUklodHNxUGl2U3NM》
|
||||
if (type === 'upload') {
|
||||
imgKey = `v1_${base64.encode(imgKey)}`;
|
||||
return new Promise((resolve) => {
|
||||
const reader = new FileReader();
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = async () => {
|
||||
if (reader.result) {
|
||||
await request({
|
||||
method: 'PUT',
|
||||
url: '/singer.FileServerService/PutObject',
|
||||
data: {
|
||||
version: 1,
|
||||
bucket: defaultBucket,
|
||||
objectName: `${bucket}_${key}${imageSuffix}`,
|
||||
// fileData: reader.result,
|
||||
putObjectOption: {
|
||||
contentType: file.type,
|
||||
},
|
||||
// @ts-ignore
|
||||
fileDataBase64: reader.result?.split(';base64,')[1],
|
||||
},
|
||||
});
|
||||
resolve(imgKey);
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const upload = async (file: File, option: uploadOption = {}) => {
|
||||
return await commonUpload(file, option, 'upload');
|
||||
};
|
@ -1,5 +1,42 @@
|
||||
# @zhst/hooks
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- feat: 初版发布
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/func@0.5.0
|
||||
|
||||
## 0.4.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- feat: 初始化
|
||||
- Updated dependencies
|
||||
- @zhst/func@0.4.1
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- fix: 修改 pkg
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/func@0.4.0
|
||||
|
||||
## 0.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/func@0.3.1
|
||||
|
||||
## 0.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
2
packages/hooks/es/useDeepMemo/index.d.ts
vendored
2
packages/hooks/es/useDeepMemo/index.d.ts
vendored
@ -1,2 +0,0 @@
|
||||
import { DependencyList } from 'react';
|
||||
export default function useDeepMemo<T>(factory: () => T, deps: DependencyList | undefined): T;
|
@ -8,6 +8,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
||||
import { useState, useMemo } from 'react';
|
||||
import useDeepEffect from "../useDeepEffect";
|
||||
export default function useDeepMemo(factory, deps) {
|
||||
// @ts-ignore
|
||||
var value = useMemo(factory, deps);
|
||||
var _useState = useState(value),
|
||||
_useState2 = _slicedToArray(_useState, 2),
|
||||
|
1
packages/hooks/es/useSocket/index.d.ts
vendored
1
packages/hooks/es/useSocket/index.d.ts
vendored
@ -1 +0,0 @@
|
||||
export {};
|
@ -1 +0,0 @@
|
||||
export {};
|
2
packages/hooks/lib/useDeepMemo/index.d.ts
vendored
2
packages/hooks/lib/useDeepMemo/index.d.ts
vendored
@ -1,2 +0,0 @@
|
||||
import { DependencyList } from 'react';
|
||||
export default function useDeepMemo<T>(factory: () => T, deps: DependencyList | undefined): T;
|
1
packages/hooks/lib/useSocket/index.d.ts
vendored
1
packages/hooks/lib/useSocket/index.d.ts
vendored
@ -1 +0,0 @@
|
||||
export {};
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@zhst/hooks",
|
||||
"version": "0.3.0",
|
||||
"version": "0.5.0",
|
||||
"description": "hooks合集",
|
||||
"keywords": [
|
||||
"hooks"
|
||||
@ -18,7 +18,9 @@
|
||||
"typings": "es/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./src/index.ts"
|
||||
"require": "./lib/index.js",
|
||||
"import": "./es/index.js",
|
||||
"default": "./es/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
@ -35,7 +37,7 @@
|
||||
"registry": "http://10.0.0.77:4874"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@zhst/types": "workspace:^"
|
||||
"@types/zhst": "workspace:^"
|
||||
},
|
||||
"dependencies": {
|
||||
"@zhst/func": "workspace:^",
|
||||
|
@ -3,6 +3,7 @@ import { useState, useMemo, DependencyList } from 'react';
|
||||
import useDeepEffect from '../useDeepEffect';
|
||||
|
||||
export default function useDeepMemo<T>(factory: () => T, deps: DependencyList | undefined) {
|
||||
// @ts-ignore
|
||||
const value = useMemo(factory, deps);
|
||||
const [state, setState] = useState(value);
|
||||
useDeepEffect(() => {
|
||||
|
@ -1,2 +1 @@
|
||||
import { useWebSocket } from 'ahooks'
|
||||
|
||||
|
@ -1,5 +1,86 @@
|
||||
# @zhst/biz
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- feat: 初版发布
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/hooks@0.5.0
|
||||
- @zhst/func@0.5.0
|
||||
- @zhst/meta@0.6.0
|
||||
- @zhst/biz@0.5.0
|
||||
|
||||
## 0.4.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/meta@0.5.2
|
||||
- @zhst/biz@0.4.2
|
||||
|
||||
## 0.4.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- feat: 初始化
|
||||
- Updated dependencies
|
||||
- @zhst/hooks@0.4.1
|
||||
- @zhst/func@0.4.1
|
||||
- @zhst/meta@0.5.1
|
||||
- @zhst/biz@0.4.1
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- fix: 修改 pkg
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/hooks@0.4.0
|
||||
- @zhst/func@0.4.0
|
||||
- @zhst/meta@0.5.0
|
||||
- @zhst/biz@0.4.0
|
||||
|
||||
## 0.3.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/meta@0.4.4
|
||||
- @zhst/biz@0.3.6
|
||||
|
||||
## 0.3.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/meta@0.4.3
|
||||
- @zhst/biz@0.3.5
|
||||
|
||||
## 0.3.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/meta@0.4.2
|
||||
- @zhst/biz@0.3.4
|
||||
|
||||
## 0.3.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/func@0.3.1
|
||||
- @zhst/biz@0.3.3
|
||||
- @zhst/hooks@0.3.1
|
||||
- @zhst/meta@0.4.1
|
||||
|
||||
## 0.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@zhst/material",
|
||||
"version": "0.3.2",
|
||||
"version": "0.5.0",
|
||||
"description": "物料库",
|
||||
"keywords": [
|
||||
"business",
|
||||
|
@ -2,6 +2,12 @@ import { defineConfig } from 'father';
|
||||
|
||||
export default defineConfig({
|
||||
// more father config: https://github.com/umijs/father/blob/master/docs/config.md
|
||||
esm: { output: 'es' },
|
||||
cjs: { output: 'lib' },
|
||||
esm: {
|
||||
output: 'es',
|
||||
ignores: ['**/demo/*', 'src/**/demo/*']
|
||||
},
|
||||
cjs: {
|
||||
output: 'lib',
|
||||
ignores: ['**/demo/*', 'src/**/demo/*']
|
||||
},
|
||||
});
|
||||
|
@ -1,5 +1,82 @@
|
||||
# @zhst/utils
|
||||
|
||||
## 0.6.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- feat: 初版发布
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/hooks@0.5.0
|
||||
- @zhst/func@0.5.0
|
||||
- @zhst/meta@0.6.0
|
||||
|
||||
## 0.5.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- feat: 修改引用
|
||||
- Updated dependencies
|
||||
- @zhst/meta@0.5.2
|
||||
|
||||
## 0.5.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- feat: 初始化
|
||||
- Updated dependencies
|
||||
- @zhst/hooks@0.4.1
|
||||
- @zhst/func@0.4.1
|
||||
- @zhst/meta@0.5.1
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- fix: 修改 pkg
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/hooks@0.4.0
|
||||
- @zhst/func@0.4.0
|
||||
- @zhst/meta@0.5.0
|
||||
|
||||
## 0.4.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix: 修改 pkg
|
||||
- Updated dependencies
|
||||
- @zhst/meta@0.4.4
|
||||
|
||||
## 0.4.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix: 修改 pkg
|
||||
- Updated dependencies
|
||||
- @zhst/meta@0.4.3
|
||||
|
||||
## 0.4.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- feat: 打包
|
||||
- Updated dependencies
|
||||
- @zhst/meta@0.4.2
|
||||
|
||||
## 0.4.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @zhst/func@0.3.1
|
||||
- @zhst/hooks@0.3.1
|
||||
- @zhst/meta@0.4.1
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
@ -5,8 +5,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
||||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
||||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||
@ -16,14 +16,21 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
||||
import React, { useEffect, useState, useCallback, useRef, useImperativeHandle } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { useLatest } from '@zhst/hooks';
|
||||
import { get, pick, isNull, generateImg, dataURLToBlob, getOdRect, getExtendRect, getTransformRect, getRotateImg, getTransforms, addEventListenerWrapper, upload, getFileByRect } from '@zhst/func';
|
||||
import { get, pick, isNull, generateImg, dataURLToBlob,
|
||||
// @ts-ignore
|
||||
getOdRect,
|
||||
// @ts-ignore
|
||||
getExtendRect,
|
||||
// @ts-ignore
|
||||
getTransformRect,
|
||||
// @ts-ignore
|
||||
getRotateImg, getTransforms, addEventListenerWrapper, getFileByRect } from '@zhst/func';
|
||||
import Align from 'rc-align';
|
||||
import { Button, Empty } from 'antd';
|
||||
import Icon from "../iconfont";
|
||||
import { Cropper, Viewer, EVENT_VIEWER_TRANSFORM_CHANGE, EVENT_VIEWER_READY, EVENT_CROP_START, EVENT_CROP_END } from "../ImageEditor";
|
||||
import BtnGroup from "./components/BtnGroup";
|
||||
import "./index.less";
|
||||
import getScreenshotButtonRender from "./components/ScreenhotButtons";
|
||||
import { defaultAlignOption, CROP_TYPE } from "../utils/constants";
|
||||
var componentName = "zhst-image__img-view";
|
||||
var cropBtnDataSource = [{
|
||||
@ -53,15 +60,11 @@ var operateBtnDataSource = [{
|
||||
title: '重置图片'
|
||||
}];
|
||||
export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
||||
var _dataSource$currentIn2, _dataSource$currentIn3;
|
||||
var _props$dataSource = props.dataSource,
|
||||
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
|
||||
width = props.width,
|
||||
var width = props.width,
|
||||
height = props.height,
|
||||
_props$showScore = props.showScore,
|
||||
showScore = _props$showScore === void 0 ? true : _props$showScore,
|
||||
_props$objects = props.objects,
|
||||
objects = _props$objects === void 0 ? [] : _props$objects,
|
||||
data = props.data,
|
||||
_props$showOpt = props.showOpt,
|
||||
showOpt = _props$showOpt === void 0 ? false : _props$showOpt,
|
||||
_props$showAttachImgL = props.showAttachImgLabel,
|
||||
@ -69,37 +72,39 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
_props$screenshotButt = props.screenshotButtonAlign,
|
||||
screenshotButtonAlign = _props$screenshotButt === void 0 ? defaultAlignOption : _props$screenshotButt,
|
||||
_props$screenshotButt2 = props.screenshotButtonRender,
|
||||
screenshotButtonRender = _props$screenshotButt2 === void 0 ? getScreenshotButtonRender({
|
||||
onBigImageActionClick: function onBigImageActionClick() {},
|
||||
disableBtn: []
|
||||
}) : _props$screenshotButt2,
|
||||
screenshotButtonRender = _props$screenshotButt2 === void 0 ? function () {
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
style: {
|
||||
color: '#fff'
|
||||
}
|
||||
}, "\u56DE\u8C03DOM");
|
||||
} : _props$screenshotButt2,
|
||||
_props$hideLeftTopBtn = props.hideLeftTopBtn,
|
||||
hideLeftTopBtn = _props$hideLeftTopBtn === void 0 ? true : _props$hideLeftTopBtn,
|
||||
_props$viewOption = props.viewOption,
|
||||
viewOption = _props$viewOption === void 0 ? {} : _props$viewOption;
|
||||
var imageKey = data.imageKey,
|
||||
attachImg = data.attachImg,
|
||||
odRect = data.odRect,
|
||||
score = data.score,
|
||||
_data$objects = data.objects,
|
||||
objects = _data$objects === void 0 ? [] : _data$objects;
|
||||
var imgContainerRef = React.useRef(null);
|
||||
var _useState = useState(false),
|
||||
_useState2 = _slicedToArray(_useState, 2),
|
||||
isReady = _useState2[0],
|
||||
setIsReady = _useState2[1];
|
||||
var _useState3 = useState(0),
|
||||
_useState4 = _slicedToArray(_useState3, 2),
|
||||
currentIndex = _useState4[0],
|
||||
setCurrentIndex = _useState4[1];
|
||||
console.log('props', props);
|
||||
var init = useCallback(function ($container) {
|
||||
imgContainerRef.current = $container;
|
||||
setIsReady(true);
|
||||
}, []);
|
||||
// ============================= viewer =========================
|
||||
var imgInsRef = useRef(null);
|
||||
var _useState5 = useState(false),
|
||||
_useState6 = _slicedToArray(_useState5, 2),
|
||||
isImgReady = _useState6[0],
|
||||
setIsImgReady = _useState6[1];
|
||||
var _useState3 = useState(false),
|
||||
_useState4 = _slicedToArray(_useState3, 2),
|
||||
isImgReady = _useState4[0],
|
||||
setIsImgReady = _useState4[1];
|
||||
useEffect(function () {
|
||||
var _dataSource$currentIn;
|
||||
console.log('123', 123);
|
||||
if (!isReady || !(imgContainerRef !== null && imgContainerRef !== void 0 && imgContainerRef.current)) return;
|
||||
var handleReady = addEventListenerWrapper(imgContainerRef.current, EVENT_VIEWER_READY, function () {
|
||||
setIsImgReady(true);
|
||||
@ -107,7 +112,7 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
var handleTransformChange = addEventListenerWrapper(imgContainerRef.current, EVENT_VIEWER_TRANSFORM_CHANGE, function () {});
|
||||
imgInsRef.current = new Viewer(imgContainerRef.current, _objectSpread(_objectSpread({}, viewOption), {}, {
|
||||
fitScaleAsMinScale: true,
|
||||
image: generateImg((_dataSource$currentIn = dataSource[currentIndex]) === null || _dataSource$currentIn === void 0 ? void 0 : _dataSource$currentIn.imageKey)
|
||||
image: generateImg(imageKey)
|
||||
}));
|
||||
return function () {
|
||||
var _imgInsRef$current, _imgInsRef$current$de;
|
||||
@ -116,7 +121,7 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current = imgInsRef.current) === null || _imgInsRef$current === void 0 || (_imgInsRef$current$de = _imgInsRef$current.destroy) === null || _imgInsRef$current$de === void 0 || _imgInsRef$current$de.call(_imgInsRef$current);
|
||||
imgInsRef.current = null;
|
||||
};
|
||||
}, [isReady, currentIndex]);
|
||||
}, [isReady, imageKey]);
|
||||
|
||||
// ============================= viewer操作按钮 =========================
|
||||
var handleOptClick = function handleOptClick(v) {
|
||||
@ -137,47 +142,47 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
// ============================= cropper =========================
|
||||
// 手动截图相关参数
|
||||
var cropInsRef = useRef(null);
|
||||
var _useState7 = useState(showOpt),
|
||||
var _useState5 = useState(showOpt),
|
||||
_useState6 = _slicedToArray(_useState5, 2),
|
||||
showCrop = _useState6[0],
|
||||
setShowCrop = _useState6[1];
|
||||
var _useState7 = useState(CROP_TYPE['AUTO']),
|
||||
_useState8 = _slicedToArray(_useState7, 2),
|
||||
showCrop = _useState8[0],
|
||||
setShowCrop = _useState8[1];
|
||||
var _useState9 = useState(CROP_TYPE['AUTO']),
|
||||
_useState10 = _slicedToArray(_useState9, 2),
|
||||
cropType = _useState10[0],
|
||||
setCropType = _useState10[1];
|
||||
cropType = _useState8[0],
|
||||
setCropType = _useState8[1];
|
||||
|
||||
// 自动截图相关参数
|
||||
var _useState9 = useState([]),
|
||||
_useState10 = _slicedToArray(_useState9, 2),
|
||||
odList = _useState10[0],
|
||||
setOdList = _useState10[1];
|
||||
var _useState11 = useState([]),
|
||||
_useState12 = _slicedToArray(_useState11, 2),
|
||||
odList = _useState12[0],
|
||||
setOdList = _useState12[1];
|
||||
var _useState13 = useState([]),
|
||||
extendOdList = _useState12[0],
|
||||
setExtendOdList = _useState12[1];
|
||||
var _useState13 = useState(null),
|
||||
_useState14 = _slicedToArray(_useState13, 2),
|
||||
extendOdList = _useState14[0],
|
||||
setExtendOdList = _useState14[1];
|
||||
var _useState15 = useState(null),
|
||||
_useState16 = _slicedToArray(_useState15, 2),
|
||||
selectRectId = _useState16[0],
|
||||
setSelectRectId = _useState16[1];
|
||||
selectRectId = _useState14[0],
|
||||
setSelectRectId = _useState14[1];
|
||||
|
||||
// 定位按钮相关参数
|
||||
var alginContainerRef = useRef(null);
|
||||
var alignRef = useRef(null);
|
||||
var _useState17 = useState(null),
|
||||
_useState18 = _slicedToArray(_useState17, 2),
|
||||
cropRect = _useState18[0],
|
||||
setCropRect = _useState18[1];
|
||||
var _useState15 = useState(null),
|
||||
_useState16 = _slicedToArray(_useState15, 2),
|
||||
cropRect = _useState16[0],
|
||||
setCropRect = _useState16[1];
|
||||
|
||||
// 选中的版本号
|
||||
var _useState19 = useState(null),
|
||||
_useState20 = _slicedToArray(_useState19, 2),
|
||||
selectAlgorithmVersion = _useState20[0],
|
||||
setSelectAlgorithmVersion = _useState20[1];
|
||||
var _useState17 = useState(null),
|
||||
_useState18 = _slicedToArray(_useState17, 2),
|
||||
selectAlgorithmVersion = _useState18[0],
|
||||
setSelectAlgorithmVersion = _useState18[1];
|
||||
var handlerCropStartRef = useRef(null);
|
||||
var handlerCropEndRef = useRef(null);
|
||||
var handleShapeSelectRef = useRef(null);
|
||||
useEffect(function () {
|
||||
initData(dataSource[currentIndex].objects || objects);
|
||||
initData(objects);
|
||||
return function () {
|
||||
var _imgInsRef$current5, _imgInsRef$current5$c, _handlerCropStartRef$, _handlerCropEndRef$cu, _handleShapeSelectRef, _cropInsRef$current, _cropInsRef$current$d;
|
||||
(_imgInsRef$current5 = imgInsRef.current) === null || _imgInsRef$current5 === void 0 || (_imgInsRef$current5$c = _imgInsRef$current5.clearShape) === null || _imgInsRef$current5$c === void 0 || _imgInsRef$current5$c.call(_imgInsRef$current5);
|
||||
@ -187,10 +192,10 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
cropInsRef === null || cropInsRef === void 0 || (_cropInsRef$current = cropInsRef.current) === null || _cropInsRef$current === void 0 || (_cropInsRef$current$d = _cropInsRef$current.destroy) === null || _cropInsRef$current$d === void 0 || _cropInsRef$current$d.call(_cropInsRef$current);
|
||||
cropInsRef.current = null;
|
||||
};
|
||||
}, [isImgReady, showCrop, cropType, currentIndex]);
|
||||
}, [isImgReady, showCrop, cropType, imageKey]);
|
||||
var initData = function initData(_objects) {
|
||||
var imgIns = imgInsRef.current;
|
||||
var _odRect = dataSource[currentIndex].odRect;
|
||||
var _odRect = odRect;
|
||||
//清理crop
|
||||
setCropRect(null);
|
||||
if (!isImgReady) return;
|
||||
@ -287,11 +292,10 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
|
||||
// 获取框选的截图框信息
|
||||
var latestCropType = useLatest(cropType);
|
||||
var latestImgKey = useLatest(dataSource[currentIndex].imageKey);
|
||||
var latestCropRect = useLatest(cropRect);
|
||||
var getCropInfo = /*#__PURE__*/function () {
|
||||
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
||||
var cropType, cropRect, imgIns, transform, newImgKey, rectList, extendRectList, selectIndex, shapes, shapeIds, newRect, data;
|
||||
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(cb) {
|
||||
var cropType, cropRect, imgIns, transform, newImgKey, rectList, extendRectList, selectIndex, shapes, shapeIds, newRect, _data;
|
||||
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
||||
while (1) switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
@ -299,7 +303,7 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
cropRect = latestCropRect.current;
|
||||
imgIns = imgInsRef.current;
|
||||
transform = imgIns.targetTransform;
|
||||
newImgKey = latestImgKey.current;
|
||||
newImgKey = imageKey;
|
||||
rectList = [];
|
||||
extendRectList = [];
|
||||
selectIndex = 0;
|
||||
@ -335,26 +339,20 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
selectIndex = rectList.findIndex(function (v) {
|
||||
return v['id'] === selectRectId;
|
||||
});
|
||||
return _context3.abrupt("break", 26);
|
||||
return _context3.abrupt("break", 22);
|
||||
case 17:
|
||||
//获取旋转过的坐标
|
||||
// @ts-ignore
|
||||
newRect = getTransformRect(imgIns.image, transform, cropRect); //判断是不是旋转过
|
||||
if (!(get(transform, 'rotate', 0) % 360 != 0)) {
|
||||
_context3.next = 23;
|
||||
break;
|
||||
if (get(transform, 'rotate', 0) % 360 != 0) {
|
||||
_data = getRotateImg(imgIns.image, get(transform, 'rotate', 0)); //在画布上画旋转后的图片
|
||||
newImgKey = _data;
|
||||
}
|
||||
data = getRotateImg(imgIns.image, get(transform, 'rotate', 0)); //在画布上画旋转后的图片
|
||||
_context3.next = 22;
|
||||
return upload(data);
|
||||
case 22:
|
||||
newImgKey = _context3.sent;
|
||||
case 23:
|
||||
rectList.push(newRect);
|
||||
extendRectList.push(newRect);
|
||||
return _context3.abrupt("break", 26);
|
||||
case 26:
|
||||
_context3.next = 28;
|
||||
return _context3.abrupt("break", 22);
|
||||
case 22:
|
||||
_context3.next = 24;
|
||||
return Promise.all(extendRectList.map( /*#__PURE__*/function () {
|
||||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(rect, index) {
|
||||
var file, imgKey;
|
||||
@ -365,25 +363,22 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
return getFileByRect(imgIns.image, rect);
|
||||
case 2:
|
||||
file = _context.sent;
|
||||
_context.next = 5;
|
||||
return upload(file);
|
||||
case 5:
|
||||
imgKey = _context.sent;
|
||||
imgKey = file;
|
||||
extendRectList[index] = _objectSpread(_objectSpread({}, rect), {}, {
|
||||
imgKey: imgKey
|
||||
});
|
||||
case 7:
|
||||
case 5:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function (_x, _x2) {
|
||||
return function (_x2, _x3) {
|
||||
return _ref2.apply(this, arguments);
|
||||
};
|
||||
}()));
|
||||
case 28:
|
||||
_context3.next = 30;
|
||||
case 24:
|
||||
_context3.next = 26;
|
||||
return Promise.all(rectList.map( /*#__PURE__*/function () {
|
||||
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(rect, index) {
|
||||
var faceCorrectImage, faceCorrectImageKey, base64, blobData, file, newRect;
|
||||
@ -391,47 +386,47 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
while (1) switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
faceCorrectImage = rect['faceCorrectImage'];
|
||||
if (!faceCorrectImage) {
|
||||
_context2.next = 8;
|
||||
break;
|
||||
if (faceCorrectImage) {
|
||||
base64 = "data:image/jpg;base64,".concat(faceCorrectImage);
|
||||
blobData = dataURLToBlob(base64);
|
||||
file = new window.File([blobData], "".concat(new Date().getTime()));
|
||||
faceCorrectImageKey = file;
|
||||
}
|
||||
base64 = "data:image/jpg;base64,".concat(faceCorrectImage);
|
||||
blobData = dataURLToBlob(base64);
|
||||
file = new window.File([blobData], "".concat(new Date().getTime()));
|
||||
_context2.next = 7;
|
||||
return upload(file);
|
||||
case 7:
|
||||
faceCorrectImageKey = _context2.sent;
|
||||
case 8:
|
||||
newRect = _objectSpread(_objectSpread({}, rect), faceCorrectImageKey ? {
|
||||
faceCorrectImageKey: faceCorrectImageKey
|
||||
} : {});
|
||||
delete newRect['faceCorrectImage'];
|
||||
rectList[index] = newRect;
|
||||
case 11:
|
||||
case 5:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}, _callee2);
|
||||
}));
|
||||
return function (_x3, _x4) {
|
||||
return function (_x4, _x5) {
|
||||
return _ref3.apply(this, arguments);
|
||||
};
|
||||
}()));
|
||||
case 30:
|
||||
case 26:
|
||||
cb === null || cb === void 0 || cb({
|
||||
rectList: rectList,
|
||||
extendRectList: extendRectList,
|
||||
selectIndex: selectIndex,
|
||||
imgKey: newImgKey
|
||||
});
|
||||
return _context3.abrupt("return", {
|
||||
rectList: rectList,
|
||||
extendRectList: extendRectList,
|
||||
selectIndex: selectIndex,
|
||||
imgKey: newImgKey
|
||||
});
|
||||
case 31:
|
||||
case 28:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
}
|
||||
}, _callee3);
|
||||
}));
|
||||
return function getCropInfo() {
|
||||
return function getCropInfo(_x) {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
@ -452,24 +447,22 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
};
|
||||
|
||||
// ============================= attact img =========================
|
||||
var _useState21 = useState(0),
|
||||
var _useState19 = useState(0),
|
||||
_useState20 = _slicedToArray(_useState19, 2),
|
||||
selectAttachImgIndex = _useState20[0],
|
||||
setSelectAttachImgIndex = _useState20[1];
|
||||
var _useState21 = useState(false),
|
||||
_useState22 = _slicedToArray(_useState21, 2),
|
||||
selectAttachImgIndex = _useState22[0],
|
||||
setSelectAttachImgIndex = _useState22[1];
|
||||
var _useState23 = useState(false),
|
||||
_useState24 = _slicedToArray(_useState23, 2),
|
||||
isZoomin = _useState24[0],
|
||||
setIsZoomin = _useState24[1];
|
||||
isZoomin = _useState22[0],
|
||||
setIsZoomin = _useState22[1];
|
||||
|
||||
/**
|
||||
* 修改当前图片预览下标
|
||||
* @param diff 跳转强度 正向后翻、负值向前翻
|
||||
*/
|
||||
var handleChangeIndex = function handleChangeIndex(diff) {
|
||||
var _dataSource$_index;
|
||||
var _index = currentIndex + diff;
|
||||
if (!(dataSource !== null && dataSource !== void 0 && (_dataSource$_index = dataSource[_index]) !== null && _dataSource$_index !== void 0 && _dataSource$_index.imageKey)) return;
|
||||
setCurrentIndex(_index);
|
||||
var handleChangeIndex = function handleChangeIndex(cb) {
|
||||
if (!imageKey) return;
|
||||
cb === null || cb === void 0 || cb();
|
||||
};
|
||||
|
||||
// ============================== Ref ===============================
|
||||
@ -488,7 +481,7 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
height: height,
|
||||
width: width
|
||||
}
|
||||
}, dataSource.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
||||
}, imageKey ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
||||
className: classNames("".concat(componentName, "-main"), cropType === CROP_TYPE['AUTO'] && "".concat(componentName, "-main--cursor")),
|
||||
ref: init
|
||||
}), !hideLeftTopBtn && /*#__PURE__*/React.createElement(BtnGroup, {
|
||||
@ -521,15 +514,16 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
}
|
||||
}, screenshotButtonRender({
|
||||
model: 'IMAGE',
|
||||
// @ts-ignore
|
||||
getCropInfo: getCropInfo,
|
||||
setShowCrop: setShowCrop,
|
||||
cropType: cropType,
|
||||
selectAlgorithmVersion: selectAlgorithmVersion
|
||||
}))), ((_dataSource$currentIn2 = dataSource[currentIndex].attachImg) === null || _dataSource$currentIn2 === void 0 ? void 0 : _dataSource$currentIn2.length) && !showCrop && /*#__PURE__*/React.createElement("div", {
|
||||
}))), (attachImg === null || attachImg === void 0 ? void 0 : attachImg.length) && !showCrop && /*#__PURE__*/React.createElement("div", {
|
||||
className: classNames("".concat(componentName, "-attach"), isZoomin && "".concat(componentName, "-attach--zoomin"), "".concat(componentName, "-attach--fixed"), isZoomin && "".concat(componentName, "-attach--zoomin--fixed"))
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: classNames("".concat(componentName, "-attach__tab"))
|
||||
}, showAttachImgLabel ? (_dataSource$currentIn3 = dataSource[currentIndex].attachImg) === null || _dataSource$currentIn3 === void 0 ? void 0 : _dataSource$currentIn3.map(function (_ref4, index) {
|
||||
}, showAttachImgLabel ? attachImg === null || attachImg === void 0 ? void 0 : attachImg.map(function (_ref4, index) {
|
||||
var label = _ref4.label;
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
key: index,
|
||||
@ -563,13 +557,13 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref)
|
||||
}))), /*#__PURE__*/React.createElement("img", {
|
||||
draggable: "false",
|
||||
className: classNames("".concat(componentName, "-attach__img"), "".concat(componentName, "-attach__img--fixed")),
|
||||
src: get(dataSource[currentIndex].attachImg, "".concat(selectAttachImgIndex, ".url"), '')
|
||||
src: get(attachImg, "".concat(selectAttachImgIndex, ".url"), '')
|
||||
})), showScore && /*#__PURE__*/React.createElement("div", {
|
||||
style: {
|
||||
bottom: 20
|
||||
},
|
||||
className: classNames("".concat(componentName, "__face-score"))
|
||||
}, "\u4EBA\u8138\u8D28\u91CF\u5206\uFF1A".concat(Number(dataSource[currentIndex].score).toFixed(2)))) : /*#__PURE__*/React.createElement(Empty, {
|
||||
}, "\u4EBA\u8138\u8D28\u91CF\u5206\uFF1A".concat(Number(score).toFixed(2)))) : /*#__PURE__*/React.createElement(Empty, {
|
||||
image: Empty.PRESENTED_IMAGE_SIMPLE,
|
||||
description: "\u6682\u65E0\u6570\u636E"
|
||||
}));
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,21 +0,0 @@
|
||||
.bigImageWrapper--v2__screenshot {
|
||||
min-width: 90px;
|
||||
background: rgb(0 0 0 / 50%);
|
||||
border-radius: 0;
|
||||
|
||||
&>button {
|
||||
width: 100%;
|
||||
color: #fff !important;
|
||||
font-family: 'Microsoft YaHei';
|
||||
font-size: 12px !important;
|
||||
border-radius: 0;
|
||||
|
||||
&>span {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #09f !important;
|
||||
}
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
||||
import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle } from 'react';
|
||||
import { generateImg, get, addEventListenerWrapper } from '@zhst/func';
|
||||
import { useUpdateEffect } from '@zhst/hooks';
|
||||
import { Button } from 'antd';
|
||||
import Button from "../button";
|
||||
import classNames from 'classnames';
|
||||
import Viewer from "../ImageEditor/viewer";
|
||||
import Icon from "../iconfont";
|
||||
@ -16,36 +16,37 @@ import "./index.less";
|
||||
var componentName = "zhst-image__compater-view";
|
||||
// 对比图组件
|
||||
var CompareImage = /*#__PURE__*/forwardRef(function (props, ref) {
|
||||
var label = props.label,
|
||||
var _props$label = props.label,
|
||||
label = _props$label === void 0 ? '标题' : _props$label,
|
||||
_props$openRoll = props.openRoll,
|
||||
openRoll = _props$openRoll === void 0 ? false : _props$openRoll,
|
||||
_props$dataSource = props.dataSource,
|
||||
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
|
||||
openRoll = _props$openRoll === void 0 ? true : _props$openRoll,
|
||||
_props$url = props.url,
|
||||
url = _props$url === void 0 ? '' : _props$url,
|
||||
_props$score = props.score,
|
||||
score = _props$score === void 0 ? 0 : _props$score,
|
||||
preDisable = props.preDisable,
|
||||
nextDisable = props.nextDisable,
|
||||
_props$showScore = props.showScore,
|
||||
showScore = _props$showScore === void 0 ? true : _props$showScore,
|
||||
_props$current = props.current,
|
||||
current = _props$current === void 0 ? 0 : _props$current;
|
||||
onNext = props.onNext,
|
||||
onPre = props.onPre;
|
||||
var imgContainerRef = useRef(null);
|
||||
var imgInsRef = useRef(null);
|
||||
var _useState = useState(0),
|
||||
_useState2 = _slicedToArray(_useState, 2),
|
||||
scale = _useState2[0],
|
||||
setScale = _useState2[1];
|
||||
//图片翻页机制
|
||||
var _useState3 = useState(current),
|
||||
_useState4 = _slicedToArray(_useState3, 2),
|
||||
currentIndex = _useState4[0],
|
||||
setCurrentIndex = _useState4[1];
|
||||
|
||||
// 初始化页面
|
||||
useEffect(function () {
|
||||
if (!url) return;
|
||||
var handleTransformChange = addEventListenerWrapper(imgContainerRef.current, 'viewer-transform-change', function (event) {
|
||||
var data = event.detail;
|
||||
setScale(get(data, 'scale', 0));
|
||||
});
|
||||
if (generateImg(dataSource[currentIndex].url)) {
|
||||
if (generateImg(url)) {
|
||||
imgInsRef.current = new Viewer(imgContainerRef.current, {
|
||||
image: generateImg(dataSource[currentIndex].url)
|
||||
image: generateImg(url)
|
||||
});
|
||||
}
|
||||
return function () {
|
||||
@ -61,49 +62,37 @@ var CompareImage = /*#__PURE__*/forwardRef(function (props, ref) {
|
||||
if (imgInsRef.current) {
|
||||
var _imgInsRef$current2;
|
||||
(_imgInsRef$current2 = imgInsRef.current) === null || _imgInsRef$current2 === void 0 || _imgInsRef$current2.refleshImage({
|
||||
image: generateImg(dataSource[currentIndex].url)
|
||||
image: generateImg(url)
|
||||
});
|
||||
}
|
||||
}, [currentIndex]);
|
||||
|
||||
// 翻页实践
|
||||
var handleIndexChange = function handleIndexChange(changeVal) {
|
||||
var _dataSource$_index, _imgInsRef$current3;
|
||||
var _index = currentIndex + changeVal;
|
||||
if (!(dataSource !== null && dataSource !== void 0 && (_dataSource$_index = dataSource[_index]) !== null && _dataSource$_index !== void 0 && _dataSource$_index.url)) return;
|
||||
(_imgInsRef$current3 = imgInsRef.current) === null || _imgInsRef$current3 === void 0 || _imgInsRef$current3.refleshImage({
|
||||
image: generateImg(dataSource[_index].url)
|
||||
});
|
||||
setCurrentIndex(_index);
|
||||
};
|
||||
}, [url]);
|
||||
useImperativeHandle(ref, function () {
|
||||
return {
|
||||
imgInsRef: imgInsRef,
|
||||
handleIndexChange: handleIndexChange
|
||||
imgInsRef: imgInsRef
|
||||
};
|
||||
});
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: classNames("".concat(componentName, "__container"))
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: classNames("".concat(componentName, "__label"))
|
||||
}, label), /*#__PURE__*/React.createElement("div", {
|
||||
ref: imgContainerRef,
|
||||
className: classNames("".concat(componentName, "__view"))
|
||||
}), !dataSource.length && /*#__PURE__*/React.createElement("div", {
|
||||
}, label), !url ? /*#__PURE__*/React.createElement("div", {
|
||||
className: classNames("".concat(componentName, "__empty"))
|
||||
}, /*#__PURE__*/React.createElement("img", {
|
||||
src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",
|
||||
title: "\u6682\u65E0\u6570\u636E"
|
||||
}), /*#__PURE__*/React.createElement("span", {
|
||||
className: classNames("".concat(componentName, "__empty--text"))
|
||||
}, "\u6682\u65E0\u5339\u914D\u6570\u636E")), !!dataSource.length && openRoll && /*#__PURE__*/React.createElement("div", {
|
||||
}, "\u6682\u65E0\u5339\u914D\u6570\u636E")) : /*#__PURE__*/React.createElement("div", {
|
||||
ref: imgContainerRef,
|
||||
className: classNames("".concat(componentName, "__view"))
|
||||
}), !!url && openRoll && /*#__PURE__*/React.createElement("div", {
|
||||
className: classNames("".concat(componentName, "__scoll-module"))
|
||||
}, /*#__PURE__*/React.createElement(Button, {
|
||||
type: 'default',
|
||||
className: classNames("".concat(componentName, "__scoll-module__btn")),
|
||||
disabled: currentIndex <= 0,
|
||||
disabled: preDisable,
|
||||
onClick: function onClick() {
|
||||
handleIndexChange(-1);
|
||||
onPre === null || onPre === void 0 || onPre();
|
||||
}
|
||||
}, /*#__PURE__*/React.createElement(Icon, {
|
||||
icon: "icon-qiehuanzuo",
|
||||
@ -111,22 +100,22 @@ var CompareImage = /*#__PURE__*/forwardRef(function (props, ref) {
|
||||
})), /*#__PURE__*/React.createElement(Button, {
|
||||
type: 'default',
|
||||
className: classNames("".concat(componentName, "__scoll-module__btn")),
|
||||
disabled: currentIndex >= dataSource.length - 1,
|
||||
disabled: nextDisable,
|
||||
onClick: function onClick() {
|
||||
handleIndexChange(1);
|
||||
onNext === null || onNext === void 0 || onNext();
|
||||
}
|
||||
}, /*#__PURE__*/React.createElement(Icon, {
|
||||
icon: "icon-qiehuanyou",
|
||||
size: 40
|
||||
}))), showScore && /*#__PURE__*/React.createElement(CornerScore, {
|
||||
scoreTxt: dataSource[currentIndex].score
|
||||
scoreTxt: score || 0
|
||||
}), /*#__PURE__*/React.createElement("div", {
|
||||
className: classNames("".concat(componentName, "__tool"))
|
||||
}, /*#__PURE__*/React.createElement(Button, {
|
||||
type: "text",
|
||||
onClick: function onClick() {
|
||||
var _imgInsRef$current4, _imgInsRef$current4$s;
|
||||
imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current4 = imgInsRef.current) === null || _imgInsRef$current4 === void 0 || (_imgInsRef$current4$s = _imgInsRef$current4.scaleTo) === null || _imgInsRef$current4$s === void 0 || _imgInsRef$current4$s.call(_imgInsRef$current4, 0.1);
|
||||
var _imgInsRef$current3, _imgInsRef$current3$s;
|
||||
imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current3 = imgInsRef.current) === null || _imgInsRef$current3 === void 0 || (_imgInsRef$current3$s = _imgInsRef$current3.scaleTo) === null || _imgInsRef$current3$s === void 0 || _imgInsRef$current3$s.call(_imgInsRef$current3, 0.1);
|
||||
}
|
||||
}, /*#__PURE__*/React.createElement(Icon, {
|
||||
size: 16,
|
||||
@ -134,8 +123,8 @@ var CompareImage = /*#__PURE__*/forwardRef(function (props, ref) {
|
||||
}), /*#__PURE__*/React.createElement("span", null, '放大')), /*#__PURE__*/React.createElement(Button, {
|
||||
type: "text",
|
||||
onClick: function onClick() {
|
||||
var _imgInsRef$current5, _imgInsRef$current5$s;
|
||||
imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current5 = imgInsRef.current) === null || _imgInsRef$current5 === void 0 || (_imgInsRef$current5$s = _imgInsRef$current5.scaleTo) === null || _imgInsRef$current5$s === void 0 || _imgInsRef$current5$s.call(_imgInsRef$current5, -0.1);
|
||||
var _imgInsRef$current4, _imgInsRef$current4$s;
|
||||
imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current4 = imgInsRef.current) === null || _imgInsRef$current4 === void 0 || (_imgInsRef$current4$s = _imgInsRef$current4.scaleTo) === null || _imgInsRef$current4$s === void 0 || _imgInsRef$current4$s.call(_imgInsRef$current4, -0.1);
|
||||
}
|
||||
}, /*#__PURE__*/React.createElement(Icon, {
|
||||
size: 16,
|
||||
@ -147,8 +136,8 @@ var CompareImage = /*#__PURE__*/forwardRef(function (props, ref) {
|
||||
}), /*#__PURE__*/React.createElement(Button, {
|
||||
type: "text",
|
||||
onClick: function onClick() {
|
||||
var _imgInsRef$current6, _imgInsRef$current6$r;
|
||||
imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current6 = imgInsRef.current) === null || _imgInsRef$current6 === void 0 || (_imgInsRef$current6$r = _imgInsRef$current6.reset) === null || _imgInsRef$current6$r === void 0 || _imgInsRef$current6$r.call(_imgInsRef$current6);
|
||||
var _imgInsRef$current5, _imgInsRef$current5$r;
|
||||
imgInsRef === null || imgInsRef === void 0 || (_imgInsRef$current5 = imgInsRef.current) === null || _imgInsRef$current5 === void 0 || (_imgInsRef$current5$r = _imgInsRef$current5.reset) === null || _imgInsRef$current5$r === void 0 || _imgInsRef$current5$r.call(_imgInsRef$current5);
|
||||
}
|
||||
}, /*#__PURE__*/React.createElement(Icon, {
|
||||
size: 16,
|
||||
|
@ -13,16 +13,15 @@
|
||||
}
|
||||
|
||||
&__container {
|
||||
font-size: 0;
|
||||
position: relative;
|
||||
width: 345px;
|
||||
height: 460px;
|
||||
box-sizing: content-box;
|
||||
border: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
&__view {
|
||||
width: 345px;
|
||||
height: 460px;
|
||||
min-width: 345px;
|
||||
min-height: 450px;
|
||||
}
|
||||
|
||||
&__label {
|
||||
@ -31,6 +30,7 @@
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
font-size: 16px;
|
||||
height: 34px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -43,7 +43,7 @@
|
||||
|
||||
&__tool {
|
||||
display: flex;
|
||||
width: 345px;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -99,6 +99,7 @@
|
||||
transform: translateY(-100%);
|
||||
|
||||
&>img {
|
||||
margin-bottom: 12px;
|
||||
width: 140px;
|
||||
height: 80px;
|
||||
}
|
||||
@ -125,6 +126,7 @@
|
||||
display: flex;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
bottom: 45px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 6px;
|
||||
|
@ -92,7 +92,6 @@ export default {
|
||||
this.cropping = false;
|
||||
// removeClass(this.dragBox, CLASS_MASK);
|
||||
}
|
||||
|
||||
var hasCrop = get(this, 'cropBoxData.width', 0) !== 0 && get(this, 'cropBoxData.height', 0) !== 0;
|
||||
dispatchEvent(this.element, EVENT_CROP_CHANGE, hasCrop ? this === null || this === void 0 ? void 0 : this.cropBoxData : null);
|
||||
hasCrop && dispatchEvent(this.element, EVENT_CROP_END, hasCrop ? this === null || this === void 0 ? void 0 : this.cropBoxData : null);
|
||||
|
@ -9,8 +9,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
||||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
//@ts-nocheck
|
||||
import { get, isPlainObject, isString, isNil } from '@zhst/func';
|
||||
import { addClass, removeClass } from 'rc-util/lib/Dom/class';
|
||||
|
@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
||||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
//@ts-nocheck
|
||||
import { isObject, isNumber, assign, isFunction } from '@zhst/func';
|
||||
import { hasClass, addClass, removeClass } from 'rc-util/lib/Dom/class';
|
||||
|
@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
||||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
//@ts-nocheck
|
||||
import { isNumber, get, addEventListenerWrapper } from '@zhst/func';
|
||||
import { addClass, removeClass } from 'rc-util/lib/Dom/class.js';
|
||||
|
@ -8,8 +8,8 @@ var _excluded = ["x", "y"],
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
||||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
||||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
||||
//@ts-nocheck
|
||||
|
@ -7,8 +7,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
||||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
//@ts-nocheck
|
||||
import { isPlainObject } from '@zhst/func';
|
||||
import { addClass } from 'rc-util/lib/Dom/class';
|
||||
|
@ -8,8 +8,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
||||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
// @ts-nocheck
|
||||
import { isNil, isArray, isFunction } from '@zhst/func';
|
||||
import * as turf from '@turf/turf';
|
||||
|
@ -1,7 +0,0 @@
|
||||
import React from 'react';
|
||||
import { Button } from 'antd';
|
||||
var ButtonDemo = function ButtonDemo(props) {
|
||||
var children = props.children;
|
||||
return /*#__PURE__*/React.createElement(Button, props, children);
|
||||
};
|
||||
export default ButtonDemo;
|
File diff suppressed because one or more lines are too long
@ -15,8 +15,8 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
||||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
import React, { Component } from 'react';
|
||||
import flvjs from 'flv.js';
|
||||
import { isEqual } from '@zhst/func';
|
||||
|
File diff suppressed because one or more lines are too long
@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
||||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import "./iconfont.css";
|
||||
|
@ -1,4 +1,3 @@
|
||||
export { default as doubleClick } from "./doubleClick";
|
||||
export { default as Icon } from "./iconfont";
|
||||
export { default as CompareImage } from "./CompareImage";
|
||||
export { default as BigImagePreview } from "./BigImagePreview";
|
||||
@ -8,6 +7,8 @@ export { default as Button } from "./button";
|
||||
export { default as Space } from "./space";
|
||||
export { default as Switch } from "./switch";
|
||||
export { default as Grid } from "./grid";
|
||||
export { default as Row } from "./row";
|
||||
export { default as Col } from "./col";
|
||||
export { default as TimePicker } from "./time-picker";
|
||||
export { default as DatePicker } from "./date-picker";
|
||||
export { default as Calender } from "./calendar";
|
||||
@ -24,4 +25,8 @@ export { default as Watermark } from "./watermark";
|
||||
export { default as Typography } from "./typography";
|
||||
export { default as InputNumber } from "./input-number";
|
||||
export { default as Modal } from "./modal";
|
||||
export { default as Divider } from "./divider";
|
||||
export { default as Divider } from "./divider";
|
||||
export { default as Descriptions } from "./descriptions";
|
||||
export { default as Flex } from "./flex";
|
||||
export { default as Score } from "./score";
|
||||
export { default as Progress } from "./progress";
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@zhst/meta",
|
||||
"version": "0.4.0",
|
||||
"version": "0.6.0",
|
||||
"description": "原子组件",
|
||||
"keywords": [
|
||||
"meta",
|
||||
@ -14,16 +14,20 @@
|
||||
"lib/**/style/*",
|
||||
"*.less"
|
||||
],
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.ts",
|
||||
"typings": "src/index.ts",
|
||||
"module": "es/index.js",
|
||||
"typings": "es/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./src/index.ts"
|
||||
"require": "./lib/index.js",
|
||||
"import": "./es/index.js",
|
||||
"default": "./es/index.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"es",
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "father build"
|
||||
@ -33,7 +37,43 @@
|
||||
"registry": "http://10.0.0.77:4874"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@zhst/types": "workspace:^"
|
||||
"@types/ali-oss": "^6.16.11",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/gtag.js": "^0.0.18",
|
||||
"@types/http-server": "^0.12.4",
|
||||
"@types/inquirer": "^9.0.7",
|
||||
"@types/isomorphic-fetch": "^0.0.39",
|
||||
"@types/jest": "^29.5.11",
|
||||
"@types/jest-axe": "^3.5.9",
|
||||
"@types/jest-environment-puppeteer": "^5.0.6",
|
||||
"@types/jest-image-snapshot": "^6.4.0",
|
||||
"@types/jquery": "^3.5.29",
|
||||
"@types/jsdom": "^21.1.6",
|
||||
"@types/lodash": "^4.14.202",
|
||||
"@types/minimist": "^1.2.5",
|
||||
"@types/node": "^20.10.6",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/pixelmatch": "^5.2.6",
|
||||
"@types/pngjs": "^6.0.4",
|
||||
"@types/prismjs": "^1.26.3",
|
||||
"@types/progress": "^2.0.7",
|
||||
"@types/qs": "^6.9.11",
|
||||
"@types/react": "^18.2.46",
|
||||
"@types/react-copy-to-clipboard": "^5.0.7",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
"@types/react-highlight-words": "^0.16.7",
|
||||
"@types/react-resizable": "^3.0.7",
|
||||
"@types/semver": "^7.5.6",
|
||||
"@types/tar": "^6.1.10",
|
||||
"@types/throttle-debounce": "^5.0.2",
|
||||
"@types/warning": "^3.0.3",
|
||||
"@types/zhst": "workspace:^",
|
||||
"@typescript-eslint/eslint-plugin": "^6.17.0",
|
||||
"@typescript-eslint/parser": "^6.17.0",
|
||||
"react": "^18.2.0",
|
||||
"react-copy-to-clipboard": "^5.1.0",
|
||||
"react-countup": "^6.5.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/colors": "^7.0.2",
|
||||
@ -49,6 +89,7 @@
|
||||
"@zhst/hooks": "workspace:^",
|
||||
"@zhst/meta": "workspace:^",
|
||||
"antd": "^5.12.5",
|
||||
"antd-img-crop": "^4.21.0",
|
||||
"antd-style": "^3.6.1",
|
||||
"classnames": "^2.5.1",
|
||||
"copy-to-clipboard": "^3.3.3",
|
||||
@ -56,24 +97,45 @@
|
||||
"downloadjs": "^1.4.7",
|
||||
"flv.js": "^1.6.2",
|
||||
"rc-align": "^4.0.15",
|
||||
"rc-checkbox": "^3.1.0",
|
||||
"rc-dialog": "^9.3.4",
|
||||
"rc-field-form": "^1.41.0",
|
||||
"rc-input": "^1.4.3",
|
||||
"rc-input-number": "^8.6.1",
|
||||
"rc-cascader": "~3.20.0",
|
||||
"rc-checkbox": "~3.1.0",
|
||||
"rc-collapse": "~3.7.2",
|
||||
"rc-dialog": "~9.3.4",
|
||||
"rc-drawer": "~6.5.2",
|
||||
"rc-dropdown": "~4.1.0",
|
||||
"rc-field-form": "~1.41.0",
|
||||
"rc-image": "~7.5.1",
|
||||
"rc-input": "~1.3.11",
|
||||
"rc-input-number": "~8.4.0",
|
||||
"rc-mentions": "~2.9.1",
|
||||
"rc-menu": "~9.12.4",
|
||||
"rc-motion": "^2.9.0",
|
||||
"rc-pagination": "^4.0.4",
|
||||
"rc-picker": "4.0.0-alpha.36",
|
||||
"rc-notification": "~5.3.0",
|
||||
"rc-pagination": "~4.0.4",
|
||||
"rc-picker": "~3.14.6",
|
||||
"rc-progress": "~3.5.1",
|
||||
"rc-rate": "~2.12.0",
|
||||
"rc-resize-observer": "^1.4.0",
|
||||
"rc-select": "^14.11.0",
|
||||
"rc-switch": "^4.1.0",
|
||||
"rc-tabs": "^14.0.0",
|
||||
"rc-textarea": "^1.6.3",
|
||||
"rc-tooltip": "^6.1.3",
|
||||
"rc-segmented": "~2.2.2",
|
||||
"rc-select": "~14.10.0",
|
||||
"rc-slider": "~10.5.0",
|
||||
"rc-steps": "~6.0.1",
|
||||
"rc-switch": "~4.1.0",
|
||||
"rc-table": "~7.36.1",
|
||||
"rc-tabs": "~12.14.1",
|
||||
"rc-textarea": "~1.5.3",
|
||||
"rc-tooltip": "~6.1.3",
|
||||
"rc-tree": "~5.8.2",
|
||||
"rc-tree-select": "~5.15.0",
|
||||
"rc-upload": "~4.5.2",
|
||||
"rc-util": "^5.38.1",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"react-draggable": "^4.4.6",
|
||||
"scroll-into-view-if-needed": "^3.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=16.9.0",
|
||||
"react-dom": ">=16.9.0"
|
||||
}
|
||||
}
|
||||
|
@ -7,18 +7,21 @@ import {
|
||||
isNull,
|
||||
generateImg,
|
||||
dataURLToBlob,
|
||||
// @ts-ignore
|
||||
getOdRect,
|
||||
// @ts-ignore
|
||||
getExtendRect,
|
||||
// @ts-ignore
|
||||
getTransformRect,
|
||||
// @ts-ignore
|
||||
getRotateImg,
|
||||
getTransforms,
|
||||
addEventListenerWrapper,
|
||||
upload,
|
||||
getFileByRect
|
||||
} from '@zhst/func';
|
||||
import Align from 'rc-align';
|
||||
import { Button, Empty } from 'antd';
|
||||
import { type Rect, type IScreenshotButtonProp, type ODRECT, type AlignType, type ViewOption, type IOdRectOrigin, AlgorithmVersion } from '@zhst/types'
|
||||
import { type Rect, type IScreenshotButtonProp, type AlignType, type IOdRectOrigin } from '@zhst/types'
|
||||
import Icon from '../iconfont';
|
||||
import {
|
||||
Cropper,
|
||||
@ -30,11 +33,37 @@ import {
|
||||
} from '../ImageEditor';
|
||||
import BtnGroup from './components/BtnGroup';
|
||||
import './index.less'
|
||||
import getScreenshotButtonRender from './components/ScreenhotButtons';
|
||||
import { defaultAlignOption, CROP_TYPE } from '../utils/constants'
|
||||
|
||||
const componentName = `zhst-image__img-view`;
|
||||
|
||||
|
||||
export interface ViewOption {
|
||||
/* 图片url */
|
||||
image?: string | HTMLImageElement;
|
||||
|
||||
/* 缩放灵敏度(0,1],default: 0.1 */
|
||||
wheelZoomRatio?: number;
|
||||
|
||||
/*
|
||||
* 是否允许缩放
|
||||
* @default: true
|
||||
*/
|
||||
scaleAble?: boolean;
|
||||
|
||||
/*
|
||||
* 是否允许拖拽
|
||||
* @default: true
|
||||
*/
|
||||
dragAble?: boolean;
|
||||
|
||||
/*
|
||||
* fit scale 作为 最小缩放
|
||||
* @default: false
|
||||
*/
|
||||
fitScaleAsMinScale?: boolean;
|
||||
}
|
||||
|
||||
export interface ImgViewProps extends React.HTMLAttributes<HTMLElement> {
|
||||
data: {
|
||||
url?: string
|
||||
@ -107,10 +136,7 @@ export const BigImagePreview = React.forwardRef<ImgViewRef, ImgViewProps>((props
|
||||
showOpt = false,
|
||||
showAttachImgLabel = true,
|
||||
screenshotButtonAlign = defaultAlignOption,
|
||||
screenshotButtonRender = getScreenshotButtonRender({
|
||||
onBigImageActionClick: () => {},
|
||||
disableBtn: [],
|
||||
}),
|
||||
screenshotButtonRender = () => <div style={{ color: '#fff' }}>回调DOM</div>,
|
||||
hideLeftTopBtn = true,
|
||||
viewOption = {}
|
||||
} = props;
|
||||
@ -473,6 +499,7 @@ export const BigImagePreview = React.forwardRef<ImgViewRef, ImgViewProps>((props
|
||||
>
|
||||
{screenshotButtonRender({
|
||||
model: 'IMAGE',
|
||||
// @ts-ignore
|
||||
getCropInfo,
|
||||
setShowCrop,
|
||||
cropType,
|
||||
|
@ -1,21 +0,0 @@
|
||||
.bigImageWrapper--v2__screenshot {
|
||||
min-width: 90px;
|
||||
background: rgb(0 0 0 / 50%);
|
||||
border-radius: 0;
|
||||
|
||||
&>button {
|
||||
width: 100%;
|
||||
color: #fff !important;
|
||||
font-family: 'Microsoft YaHei';
|
||||
font-size: 12px !important;
|
||||
border-radius: 0;
|
||||
|
||||
&>span {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #09f !important;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,106 +0,0 @@
|
||||
import React from'react'
|
||||
import { Button } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import type { AlgorithmVersion } from '@zhst/types'
|
||||
import { IBigImageOpt } from '@zhst/types/BigImageModal'
|
||||
import './index.less';
|
||||
|
||||
const componentName = 'bigImageWrapper--v2';
|
||||
|
||||
interface IScreenShotButton {
|
||||
getCropInfo: () => void
|
||||
setShowCrop: any
|
||||
cropType: string
|
||||
selectAlgorithmVersion?: AlgorithmVersion | null
|
||||
}
|
||||
|
||||
const getScreenshotButtonRender = (arg: {
|
||||
disableBtn: number[];
|
||||
onBigImageActionClick: (type: number, item: any) => void;
|
||||
}) => {
|
||||
const { disableBtn = [], onBigImageActionClick } = arg;
|
||||
return (param: IScreenShotButton) => {
|
||||
const { getCropInfo, setShowCrop, cropType, selectAlgorithmVersion } = param;
|
||||
let isAuto = cropType === 'AUTO';
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(`${componentName}__screenshot`)}
|
||||
style={{
|
||||
zIndex: 100,
|
||||
position: 'absolute',
|
||||
width: '86px',
|
||||
}}
|
||||
>
|
||||
{!disableBtn.includes(IBigImageOpt['ADD_HISTORY_WITH_CROP']) && isAuto && (
|
||||
<Button
|
||||
type={'text'}
|
||||
onClick={async (e) => {
|
||||
e.stopPropagation();
|
||||
const image = await getCropInfo();
|
||||
setShowCrop(false);
|
||||
onBigImageActionClick(IBigImageOpt['ADD_HISTORY_WITH_CROP'], image);
|
||||
}}
|
||||
>
|
||||
目标检索
|
||||
</Button>
|
||||
)}
|
||||
{!disableBtn.includes(IBigImageOpt['ADD_HISTORY_WITH_CROP_BODY']) && !isAuto && (
|
||||
<Button
|
||||
type={'text'}
|
||||
onClick={async (e) => {
|
||||
e.stopPropagation();
|
||||
const image = await getCropInfo();
|
||||
setShowCrop(false);
|
||||
onBigImageActionClick(IBigImageOpt['ADD_HISTORY_WITH_CROP_BODY'], image);
|
||||
}}
|
||||
>
|
||||
搜形体
|
||||
</Button>
|
||||
)}
|
||||
{!disableBtn.includes(IBigImageOpt['ADD_HISTORY_WITH_CROP_VEHICLE']) && !isAuto && (
|
||||
<Button
|
||||
type={'text'}
|
||||
onClick={async (e) => {
|
||||
e.stopPropagation();
|
||||
const image = await getCropInfo();
|
||||
setShowCrop(false);
|
||||
onBigImageActionClick(IBigImageOpt['ADD_HISTORY_WITH_CROP_VEHICLE'], image);
|
||||
}}
|
||||
>
|
||||
搜非机动车
|
||||
</Button>
|
||||
)}
|
||||
{!disableBtn.includes(IBigImageOpt['ADD_HISTORY_WITH_CROP_ARCHIVE']) &&
|
||||
selectAlgorithmVersion !== 0 && (
|
||||
<Button
|
||||
type={'text'}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
let image: any = getCropInfo();
|
||||
setShowCrop(false);
|
||||
// if (!image.rectList?.[0].algorithmVersion) {
|
||||
// image.rectList[0].algorithmVersion = 0;
|
||||
// image.extendRectList[0].algorithmVersion = 0;
|
||||
// }
|
||||
onBigImageActionClick(IBigImageOpt['ADD_HISTORY_WITH_CROP_ARCHIVE'], image);
|
||||
}}
|
||||
>
|
||||
档案检索
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
type={'text'}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
setShowCrop(false);
|
||||
}}
|
||||
>
|
||||
退出框选
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
export default getScreenshotButtonRender;
|
@ -1,7 +1,7 @@
|
||||
import React, { useRef, useState, FC, useEffect, forwardRef, useImperativeHandle } from 'react'
|
||||
import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle } from 'react'
|
||||
import { generateImg, get, addEventListenerWrapper } from '@zhst/func';
|
||||
import { useUpdateEffect } from '@zhst/hooks';
|
||||
import { Button } from 'antd';
|
||||
import Button from '../button';
|
||||
import classNames from 'classnames'
|
||||
import Viewer from '../ImageEditor/viewer';
|
||||
import Icon from '../iconfont'
|
||||
|
@ -1,17 +0,0 @@
|
||||
import React, { FC } from 'react'
|
||||
import { Button } from 'antd'
|
||||
import type { ButtonProps } from 'antd/lib/button'
|
||||
|
||||
interface IButtonDemo extends ButtonProps {
|
||||
|
||||
}
|
||||
|
||||
const ButtonDemo: FC<IButtonDemo> = (props) => {
|
||||
const { children } = props
|
||||
|
||||
return (
|
||||
<Button {...props} >{children}</Button>
|
||||
)
|
||||
}
|
||||
|
||||
export default ButtonDemo
|
@ -1,4 +1,4 @@
|
||||
import React, { Dispatch, ReactElement, SetStateAction, forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
||||
import React, { Dispatch, ReactElement, SetStateAction, forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
||||
import {
|
||||
noop,
|
||||
get,
|
||||
@ -24,7 +24,6 @@ import {
|
||||
import FlvPlayer, { FLV_EVENT } from './components/FlvPlayer';
|
||||
import Range from './components/Progress';
|
||||
import Loading from './components/Loading';
|
||||
import getScreenshotButtonRender from '../BigImagePreview/components/ScreenhotButtons';
|
||||
import { CROP_TYPE } from '../utils/constants';
|
||||
import { getShowStatus } from './videoPlayerHelper'
|
||||
import './index.less'
|
||||
@ -64,14 +63,10 @@ const VideoPlayer = forwardRef<VideoViewRef, VideoViewProps>((props, ref) => {
|
||||
adjustY: true,
|
||||
},
|
||||
},
|
||||
screenshotButtonRender = getScreenshotButtonRender({
|
||||
onBigImageActionClick: () => {},
|
||||
disableBtn: [],
|
||||
}),
|
||||
screenshotButtonRender = () => <div style={{ color: '#fff' }}>回调DOM</div>,
|
||||
onCropChange,
|
||||
defautlNormalizationRect: defaultNormalizationRect,
|
||||
} = props;
|
||||
const videoType = useMemo(() => (url && url.startsWith('http') ? 'mp4' : 'flv'), [url]);
|
||||
// ========================== 播放 =========================
|
||||
//实例参数
|
||||
const containerRef: any = useRef(null); //容器ref
|
||||
@ -161,37 +156,30 @@ const VideoPlayer = forwardRef<VideoViewRef, VideoViewProps>((props, ref) => {
|
||||
checkIsErr();
|
||||
console.error('视频出错了', e, video.currentTime);
|
||||
};
|
||||
let waitingListener = (e: any) => {
|
||||
let waitingListener = () => {
|
||||
setIsLoadingVideoWrapper(true);
|
||||
console.debug('视频加载等待', e, video.currentTime);
|
||||
// console.debug('视频加载等待', e, video.currentTime);
|
||||
};
|
||||
let playingListener = (e: any) => {
|
||||
let playingListener = () => {
|
||||
setIsLoadingVideoWrapper(false);
|
||||
setIsError(false)
|
||||
console.debug('视频从等待中播放', e, video.currentTime);
|
||||
// console.debug('视频从等待中播放', e, video.currentTime);
|
||||
};
|
||||
let playLister = (e: any) => {
|
||||
let playLister = () => {
|
||||
setIsPlay(true);
|
||||
setIsError(false)
|
||||
console.debug('提示该视频正在播放中', e, video.currentTime);
|
||||
// console.debug('提示该视频正在播放中', e, video.currentTime);
|
||||
};
|
||||
let pauseListener = (e: any) => {
|
||||
let pauseListener = () => {
|
||||
setIsPlay(false);
|
||||
console.debug('暂停播放', e, video.currentTime);
|
||||
// console.debug('暂停播放', e, video.currentTime);
|
||||
};
|
||||
let endedListner = (e: any) => {
|
||||
let endedListner = () => {
|
||||
setIsEnd(true);
|
||||
setIsVideoLoadFinish(true);
|
||||
console.debug('视频播放完了', e, video.currentTime);
|
||||
// console.debug('视频播放完了', e, video.currentTime);
|
||||
};
|
||||
let timeupdateListner = (e: any) => {
|
||||
console.debug(
|
||||
'视频播放时间更新',
|
||||
e,
|
||||
video.currentTime,
|
||||
videoRef.current?.duration,
|
||||
maxDuration
|
||||
);
|
||||
let timeupdateListner = () => {
|
||||
let nowTime = video.currentTime;
|
||||
if (nowTime >= maxDuration) {
|
||||
setIsEnd(true);
|
||||
@ -545,7 +533,7 @@ const VideoPlayer = forwardRef<VideoViewRef, VideoViewProps>((props, ref) => {
|
||||
playId={playSeq}
|
||||
autoPlay={true}
|
||||
className={classNames(`${componentName}-flv`)}
|
||||
type={videoType}
|
||||
type={url.startsWith('http') ? 'mp4' : 'flv'}
|
||||
url={url}
|
||||
config={{
|
||||
enableStashBuffer: true,
|
||||
@ -566,7 +554,7 @@ const VideoPlayer = forwardRef<VideoViewRef, VideoViewProps>((props, ref) => {
|
||||
>
|
||||
{/* <div ref={corpRef}></div> */}
|
||||
</div>
|
||||
{showCrop && cropRect && screenshotButtonRender && (
|
||||
{showCrop && cropRect && (
|
||||
<>
|
||||
<div
|
||||
ref={alginContainerRef}
|
||||
@ -605,7 +593,7 @@ const VideoPlayer = forwardRef<VideoViewRef, VideoViewProps>((props, ref) => {
|
||||
<div>
|
||||
<Button
|
||||
type="text"
|
||||
onClick={(e) => {
|
||||
onClick={() => {
|
||||
if (!isPlay) {
|
||||
//播放中暂停
|
||||
videoInsRef?.current?.play();
|
||||
|
32
packages/meta/src/VideoPlayer/demo/multiple.tsx
Normal file
32
packages/meta/src/VideoPlayer/demo/multiple.tsx
Normal file
@ -0,0 +1,32 @@
|
||||
import React, { useRef, useState } from 'react';
|
||||
import { VideoPlayer, Space, Button, Row, Col, InputNumber } from '@zhst/meta'
|
||||
|
||||
export default () => {
|
||||
const [urls, setUrls] = useState<string[]>([])
|
||||
const [num, setNum] = useState(2)
|
||||
|
||||
const handlePlay = () => {
|
||||
let arr = []
|
||||
for (let i = 0; i < num; i++) {
|
||||
arr.push(`ws://10.0.0.7:9033/flv/File/test/test_h264_${Math.floor(Math.random() * 6) + 1}.mp4.flv?ip=127.0.0.1`)
|
||||
}
|
||||
setUrls(arr)
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Space>
|
||||
<InputNumber value={num} onChange={(_num: React.SetStateAction<number>) => setNum(_num)} />
|
||||
<Button onClick={() => handlePlay()}>播放</Button>
|
||||
<Button onClick={() => setUrls([])}>停止</Button>
|
||||
</Space>
|
||||
<Row gutter={[16,16]}>
|
||||
{urls.map((url, idx) => (
|
||||
<Col span={8}>
|
||||
<VideoPlayer key={url} url={url} />
|
||||
</Col>
|
||||
))}
|
||||
</Row>
|
||||
</div>
|
||||
)
|
||||
}
|
@ -3,6 +3,8 @@ group: 通用
|
||||
category: Components
|
||||
subtitle: 视频播放
|
||||
title: VideoPlayer 视频播放
|
||||
demo:
|
||||
cols: 2
|
||||
---
|
||||
|
||||
# VideoPlayer 视频播放
|
||||
@ -17,12 +19,12 @@ import { VideoPlayer, Space, Button } from '@zhst/meta'
|
||||
|
||||
export default () => {
|
||||
const videoRef = useRef(null)
|
||||
const [url, setUrl] = useState('ws://10.0.0.120:9033/flv/Sip/34020000001310000301.flv?ip=10.0.0.120&stime=1704815972&etime=1704815992')
|
||||
const [url, setUrl] = useState(null)
|
||||
|
||||
return (
|
||||
<Space>
|
||||
<Button type="primary" onClick={() => videoRef.current?.setShowCrop(true)}>截图</Button>
|
||||
<Button onClick={() => setUrl('ws://10.0.0.120:9033/flv/HaikangNvr/34.flv?ip=10.0.2.103&stime=1705302394&etime=1705302414')}>下一个</Button>
|
||||
<Button onClick={() => setUrl('ws://10.0.0.7:9033/flv/File/test/test_h264_1.mp4.flv?ip=127.0.0.1')}>播放</Button>
|
||||
<Button onClick={() => videoRef.current?.setShowCrop(true)}>截图</Button>
|
||||
<Button onClick={() => videoRef.current?.setShowCrop(false)}>取消</Button>
|
||||
<VideoPlayer ref={videoRef} url={url} />
|
||||
</Space>
|
||||
@ -30,6 +32,8 @@ export default () => {
|
||||
}
|
||||
```
|
||||
|
||||
<code src="./demo/multiple.tsx">测试视频播放压力</code>
|
||||
|
||||
## API
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||
|
@ -95,6 +95,7 @@ export default function useResponsiveObserver() {
|
||||
if (!subscribers.size) this.unregister();
|
||||
},
|
||||
unregister() {
|
||||
// @ts-ignore
|
||||
Object.keys(responsiveMap).forEach((screen: Breakpoint) => {
|
||||
const matchMediaQuery = responsiveMap[screen];
|
||||
const handler = this.matchHandlers[matchMediaQuery];
|
||||
@ -103,6 +104,7 @@ export default function useResponsiveObserver() {
|
||||
subscribers.clear();
|
||||
},
|
||||
register() {
|
||||
// @ts-ignore
|
||||
Object.keys(responsiveMap).forEach((screen: Breakpoint) => {
|
||||
const matchMediaQuery = responsiveMap[screen];
|
||||
const listener = ({ matches }: { matches: boolean }) => {
|
||||
|
72
packages/meta/src/badge/Ribbon.tsx
Normal file
72
packages/meta/src/badge/Ribbon.tsx
Normal file
@ -0,0 +1,72 @@
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import type { PresetColorType } from '../_util/colors';
|
||||
import { isPresetColor } from '../_util/colors';
|
||||
import type { LiteralUnion } from '../_util/type';
|
||||
import { ConfigContext } from '../config-provider';
|
||||
import useStyle from './style/ribbon';
|
||||
|
||||
type RibbonPlacement = 'start' | 'end';
|
||||
|
||||
export interface RibbonProps {
|
||||
className?: string;
|
||||
prefixCls?: string;
|
||||
style?: React.CSSProperties; // style of ribbon element, not the wrapper
|
||||
text?: React.ReactNode;
|
||||
color?: LiteralUnion<PresetColorType>;
|
||||
children?: React.ReactNode;
|
||||
placement?: RibbonPlacement;
|
||||
rootClassName?: string;
|
||||
}
|
||||
|
||||
const Ribbon: React.FC<RibbonProps> = (props) => {
|
||||
const {
|
||||
className,
|
||||
prefixCls: customizePrefixCls,
|
||||
style,
|
||||
color,
|
||||
children,
|
||||
text,
|
||||
placement = 'end',
|
||||
rootClassName,
|
||||
} = props;
|
||||
const { getPrefixCls, direction } = React.useContext(ConfigContext);
|
||||
const prefixCls = getPrefixCls('ribbon', customizePrefixCls);
|
||||
|
||||
const wrapperCls = `${prefixCls}-wrapper`;
|
||||
const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, wrapperCls);
|
||||
|
||||
const colorInPreset = isPresetColor(color, false);
|
||||
const ribbonCls = classNames(
|
||||
prefixCls,
|
||||
`${prefixCls}-placement-${placement}`,
|
||||
{
|
||||
[`${prefixCls}-rtl`]: direction === 'rtl',
|
||||
[`${prefixCls}-color-${color}`]: colorInPreset,
|
||||
},
|
||||
className,
|
||||
);
|
||||
|
||||
const colorStyle: React.CSSProperties = {};
|
||||
const cornerColorStyle: React.CSSProperties = {};
|
||||
if (color && !colorInPreset) {
|
||||
colorStyle.background = color;
|
||||
cornerColorStyle.color = color;
|
||||
}
|
||||
return wrapCSSVar(
|
||||
<div className={classNames(wrapperCls, rootClassName, hashId, cssVarCls)}>
|
||||
{children}
|
||||
<div className={classNames(ribbonCls, hashId)} style={{ ...colorStyle, ...style }}>
|
||||
<span className={`${prefixCls}-text`}>{text}</span>
|
||||
<div className={`${prefixCls}-corner`} style={cornerColorStyle} />
|
||||
</div>
|
||||
</div>,
|
||||
);
|
||||
};
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
Ribbon.displayName = 'Ribbon';
|
||||
}
|
||||
|
||||
export default Ribbon;
|
91
packages/meta/src/badge/ScrollNumber.tsx
Normal file
91
packages/meta/src/badge/ScrollNumber.tsx
Normal file
@ -0,0 +1,91 @@
|
||||
import classNames from 'classnames';
|
||||
import * as React from 'react';
|
||||
import { cloneElement } from '../_util/reactNode';
|
||||
import { ConfigContext } from '../config-provider';
|
||||
import SingleNumber from './SingleNumber';
|
||||
|
||||
export interface ScrollNumberProps {
|
||||
prefixCls?: string;
|
||||
className?: string;
|
||||
motionClassName?: string;
|
||||
count?: string | number | null;
|
||||
children?: React.ReactElement<HTMLElement>;
|
||||
component?: React.ComponentType<any>;
|
||||
style?: React.CSSProperties;
|
||||
title?: string | number | null;
|
||||
show: boolean;
|
||||
}
|
||||
|
||||
export interface ScrollNumberState {
|
||||
animateStarted?: boolean;
|
||||
count?: string | number | null;
|
||||
}
|
||||
|
||||
const ScrollNumber = React.forwardRef<HTMLElement, ScrollNumberProps>((props, ref) => {
|
||||
const {
|
||||
prefixCls: customizePrefixCls,
|
||||
count,
|
||||
className,
|
||||
motionClassName,
|
||||
style,
|
||||
title,
|
||||
show,
|
||||
component: Component = 'sup',
|
||||
children,
|
||||
...restProps
|
||||
} = props;
|
||||
const { getPrefixCls } = React.useContext(ConfigContext);
|
||||
const prefixCls = getPrefixCls('scroll-number', customizePrefixCls);
|
||||
|
||||
// ============================ Render ============================
|
||||
const newProps = {
|
||||
...restProps,
|
||||
'data-show': show,
|
||||
style,
|
||||
className: classNames(prefixCls, className, motionClassName),
|
||||
title: title as string,
|
||||
};
|
||||
|
||||
// Only integer need motion
|
||||
let numberNodes: React.ReactNode = count;
|
||||
if (count && Number(count) % 1 === 0) {
|
||||
const numberList = String(count).split('');
|
||||
|
||||
numberNodes = (
|
||||
<bdi>
|
||||
{numberList.map((num, i) => (
|
||||
<SingleNumber
|
||||
prefixCls={prefixCls}
|
||||
count={Number(count)}
|
||||
value={num}
|
||||
// eslint-disable-next-line react/no-array-index-key
|
||||
key={numberList.length - i}
|
||||
/>
|
||||
))}
|
||||
</bdi>
|
||||
);
|
||||
}
|
||||
|
||||
// allow specify the border
|
||||
// mock border-color by box-shadow for compatible with old usage:
|
||||
// <Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />
|
||||
if (style && style.borderColor) {
|
||||
newProps.style = {
|
||||
...style,
|
||||
boxShadow: `0 0 0 1px ${style.borderColor} inset`,
|
||||
};
|
||||
}
|
||||
if (children) {
|
||||
return cloneElement(children, (oriProps) => ({
|
||||
className: classNames(`${prefixCls}-custom-component`, oriProps?.className, motionClassName),
|
||||
}));
|
||||
}
|
||||
|
||||
return (
|
||||
<Component {...newProps} ref={ref}>
|
||||
{numberNodes}
|
||||
</Component>
|
||||
);
|
||||
});
|
||||
|
||||
export default ScrollNumber;
|
124
packages/meta/src/badge/SingleNumber.tsx
Normal file
124
packages/meta/src/badge/SingleNumber.tsx
Normal file
@ -0,0 +1,124 @@
|
||||
import classNames from 'classnames';
|
||||
import * as React from 'react';
|
||||
|
||||
export interface UnitNumberProps {
|
||||
prefixCls: string;
|
||||
value: string | number;
|
||||
offset?: number;
|
||||
current?: boolean;
|
||||
}
|
||||
|
||||
function UnitNumber({ prefixCls, value, current, offset = 0 }: UnitNumberProps) {
|
||||
let style: React.CSSProperties | undefined;
|
||||
|
||||
if (offset) {
|
||||
style = {
|
||||
position: 'absolute',
|
||||
top: `${offset}00%`,
|
||||
left: 0,
|
||||
};
|
||||
}
|
||||
|
||||
return (
|
||||
<span
|
||||
style={style}
|
||||
className={classNames(`${prefixCls}-only-unit`, {
|
||||
current,
|
||||
})}
|
||||
>
|
||||
{value}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
export interface SingleNumberProps {
|
||||
prefixCls: string;
|
||||
value: string;
|
||||
count: number;
|
||||
}
|
||||
|
||||
function getOffset(start: number, end: number, unit: -1 | 1) {
|
||||
let index = start;
|
||||
let offset = 0;
|
||||
|
||||
while ((index + 10) % 10 !== end) {
|
||||
index += unit;
|
||||
offset += unit;
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
export default function SingleNumber(props: SingleNumberProps) {
|
||||
const { prefixCls, count: originCount, value: originValue } = props;
|
||||
const value = Number(originValue);
|
||||
const count = Math.abs(originCount);
|
||||
const [prevValue, setPrevValue] = React.useState(value);
|
||||
const [prevCount, setPrevCount] = React.useState(count);
|
||||
|
||||
// ============================= Events =============================
|
||||
const onTransitionEnd = () => {
|
||||
setPrevValue(value);
|
||||
setPrevCount(count);
|
||||
};
|
||||
|
||||
// Fallback if transition events are not supported
|
||||
React.useEffect(() => {
|
||||
const timeout = setTimeout(() => {
|
||||
onTransitionEnd();
|
||||
}, 1000);
|
||||
|
||||
return () => {
|
||||
clearTimeout(timeout);
|
||||
};
|
||||
}, [value]);
|
||||
|
||||
// ============================= Render =============================
|
||||
// Render unit list
|
||||
let unitNodes: React.ReactElement[];
|
||||
let offsetStyle: React.CSSProperties | undefined;
|
||||
|
||||
if (prevValue === value || Number.isNaN(value) || Number.isNaN(prevValue)) {
|
||||
// Nothing to change
|
||||
unitNodes = [<UnitNumber {...props} key={value} current />];
|
||||
offsetStyle = {
|
||||
transition: 'none',
|
||||
};
|
||||
} else {
|
||||
unitNodes = [];
|
||||
|
||||
// Fill basic number units
|
||||
const end = value + 10;
|
||||
const unitNumberList: number[] = [];
|
||||
for (let index = value; index <= end; index += 1) {
|
||||
unitNumberList.push(index);
|
||||
}
|
||||
|
||||
// Fill with number unit nodes
|
||||
const prevIndex = unitNumberList.findIndex((n) => n % 10 === prevValue);
|
||||
unitNodes = unitNumberList.map((n, index) => {
|
||||
const singleUnit = n % 10;
|
||||
return (
|
||||
<UnitNumber
|
||||
{...props}
|
||||
key={n}
|
||||
value={singleUnit}
|
||||
offset={index - prevIndex}
|
||||
current={index === prevIndex}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
// Calculate container offset value
|
||||
const unit = prevCount < count ? 1 : -1;
|
||||
offsetStyle = {
|
||||
transform: `translateY(${-getOffset(prevValue, value, unit)}00%)`,
|
||||
};
|
||||
}
|
||||
|
||||
return (
|
||||
<span className={`${prefixCls}-only`} style={offsetStyle} onTransitionEnd={onTransitionEnd}>
|
||||
{unitNodes}
|
||||
</span>
|
||||
);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user