feat(meta,material): 修改物料库算法编辑新增箭头选择,元组件新增图片标记组件

This commit is contained in:
NICE CODE BY DEV 2024-04-16 17:37:36 +08:00
parent d6fab922a9
commit 8866db8058
221 changed files with 907 additions and 12853 deletions

View File

@ -1,5 +1,26 @@
# @zhst/biz
## 0.12.1
### Patch Changes
- 修改物料库算法编辑新增箭头选择,元组件新增图片标记组件
- Updated dependencies
- @zhst/meta@0.11.0
- @zhst/func@0.9.2
- @zhst/hooks@0.8.11
## 0.12.0
### Minor Changes
- 优化 meta 预览图组件
### Patch Changes
- Updated dependencies
- @zhst/meta@0.10.0
## 0.11.3
### Patch Changes

View File

@ -1,40 +0,0 @@
import React from 'react';
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;
activeTab?: TAB_TYPE;
attributeList: {
title: string;
children: Pick<DescriptionsProps, 'items'>;
};
tabs: {
data: Pick<TabsProps, 'items'> & {
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;
}
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;

View File

@ -1,11 +0,0 @@
import { FC } from 'react';
interface ComBineImageProps {
data: {
imgSummary: string;
compaterImages: string[];
imageKey: string;
score: number;
};
}
declare const ComBineImage: FC<ComBineImageProps>;
export default ComBineImage;

View File

@ -1,58 +0,0 @@
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); }
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 _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
import React, { useRef, forwardRef, useImperativeHandle, useState } from 'react';
import { CompareImage, Flex, Score } from '@zhst/meta';
var ComBineImage = /*#__PURE__*/forwardRef(function (props, ref) {
var data = props.data;
var imgSummary = data.imgSummary,
_data$compaterImages = data.compaterImages,
compaterImages = _data$compaterImages === void 0 ? [] : _data$compaterImages;
var targetImageRef = useRef(null);
var compareImageRef = useRef(null);
var _useState = useState(compaterImages.findIndex(function (_url) {
return imgSummary === _url;
}) || 0),
_useState2 = _slicedToArray(_useState, 2),
targetIndex = _useState2[0],
setTargetIndex = _useState2[1];
useImperativeHandle(ref, function () {
return {
compareImageRef: compareImageRef,
targetImageRef: targetImageRef
};
});
return /*#__PURE__*/React.createElement(Flex, {
justify: "space-evenly",
align: "center",
style: {
padding: '0 32px'
}
}, /*#__PURE__*/React.createElement(CompareImage, {
ref: targetImageRef,
preDisable: targetIndex === 0,
nextDisable: targetIndex >= compaterImages.length - 1,
onNext: function onNext() {
return setTargetIndex(targetIndex + 1);
},
onPre: function onPre() {
return setTargetIndex(targetIndex - 1);
},
showScore: false,
openRoll: !!compaterImages.length,
url: compaterImages[targetIndex] || imgSummary,
label: "\u76EE\u6807\u56FE"
}), /*#__PURE__*/React.createElement(Score, {
score: data.score
}), /*#__PURE__*/React.createElement(CompareImage, {
ref: compareImageRef,
url: data.imageKey,
openRoll: false,
score: data.score,
label: "\u5BF9\u6BD4\u56FE"
}));
});
export default ComBineImage;

View File

@ -1,13 +0,0 @@
import * as React from 'react';
import './index.less';
declare const Navigation: React.FC<{
show?: boolean;
onClick?: React.MouseEventHandler<HTMLElement>;
prev?: boolean;
next?: boolean;
disabled?: boolean;
className?: string;
color?: string;
hoverColor?: string;
}>;
export default Navigation;

View File

@ -1,26 +0,0 @@
import * as React from 'react';
import classnames from 'classnames';
import { Icon, Button } from '@zhst/meta';
import "./index.less";
var componentName = "zhst-image__nav";
var Navigation = function Navigation(props) {
var show = props.show,
prev = props.prev,
next = props.next,
disabled = props.disabled,
onClick = props.onClick,
className = props.className,
color = props.color;
return /*#__PURE__*/React.createElement("div", {
className: classnames("".concat(componentName), prev && "".concat(componentName, "-prev"), next && "".concat(componentName, "-next"), disabled && "".concat(componentName, "--disable"), !show && "".concat(componentName, "--hide"), className)
}, /*#__PURE__*/React.createElement(Button, {
type: "text",
disabled: disabled,
onClick: onClick
}, /*#__PURE__*/React.createElement(Icon, {
size: 28,
color: color,
icon: prev ? 'icon-qiehuanzuo' : 'icon-qiehuanyou'
})));
};
export default Navigation;

View File

@ -1,44 +0,0 @@
.zhst-image__nav {
position: absolute;
display: flex;
width: 48px;
height: 100%;
flex-shrink: 0;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 0;
&>button {
& span {
display: flex;
}
}
:global {
i:hover {
color: #f0f0f0 !important;
}
}
&--disable {
:global {
i {
color: #f0f0f0;
cursor: not-allowed !important;
}
}
}
&--hide {
display: none;
}
&-prev {
left: 20px;
}
&-next {
right: 20px;
}
}

View File

@ -1,3 +0,0 @@
import BigImageModal from "./BigImageModal";
export type { BigImageModalProps } from './BigImageModal';
export default BigImageModal;

View File

@ -1,2 +0,0 @@
import BigImageModal from "./BigImageModal";
export default BigImageModal;

View File

@ -1,514 +0,0 @@
.zhst-image {
.zhst-dialog-content {
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%;
margin-bottom: 16px;
&__nav {
position: absolute;
z-index: 99;
top: 50%;
width: 40px !important;
height: 40px !important;
background: #d9d9d9;
border-radius: 100%;
cursor: pointer;
transform: translateY(-50%);
&>button {
display: flex;
align-items: center;
color: #fff !important;
}
&--disabled {
opacity: 0.3;
&>button {
color: #fff !important;
}
}
}
&__nav:hover {
background: #09f;
color: #fff !important;
}
}
&-tool-container {
width: 100%;
height: 40px;
margin-bottom: 16px;
}
&__face-score {
position: absolute;
right: 90px;
bottom: 80px;
color: red;
font-family: 'Microsoft YaHei';
font-size: 19px;
font-weight: bold;
}
&-carousel-container {
position: relative;
width: 100%;
height: 100px;
margin-top: 16px;
margin-bottom: 24px;
}
}
.zhst-image__tool {
display: flex;
width: 100%;
align-items: center;
font-size: 14px;
&-split {
width: 0;
height: 14px;
&::before {
display: block;
height: 100%;
border-left: 1px solid #e6e7eb;
content: '';
}
}
&-zoom {
display: inline-flex;
align-items: center;
&> :not(:last-child) {
margin-right: 14px;
}
&__scale {
display: inline-block;
width: 38px;
height: 14px;
// margin-left: 15px;
box-sizing: content-box;
border: 1px solid rgb(77 77 77 / 100%);
margin-top: 2px; //对齐
background: rgb(255 255 255 / 100%);
border-radius: 2px;
color: #4d4d4d;
cursor: default;
font-size: 12px;
line-height: 14px;
text-align: center;
}
}
&-switch {
display: flex;
width: 30px;
flex-shrink: 0;
align-items: center;
justify-content: center;
margin: 0 26px;
}
&-left {
display: flex;
flex: 1;
align-items: center;
justify-content: flex-end;
&> :not(:last-child) {
margin-right: 14px;
}
}
&-right {
display: flex;
flex: 1;
align-items: center;
justify-content: flex-start;
&> :not(:first-child) {
margin-left: 20px;
}
}
&-icon-container {
font-size: 14px;
&--active {
color: #5584ff !important;
}
&> :first-child {
margin-right: 2px;
}
}
}
.zhst-image__carousel {
position: relative;
display: flex;
width: 742px;
height: 100px;
align-items: center;
justify-content: center;
border: 1px solid #f0f0f0;
margin: 0 auto;
background: #fafafa;
border-radius: 2px;
user-select: none;
&-container {
width: (58px + 8px) * 10;
}
&-item {
display: flex;
width: 58px + 8px;
align-items: center;
justify-content: center;
}
&-item-img {
/* 尝试消除transform 副作用 */
position: relative;
z-index: 99;
// width: 58px;
// height: 76px;
display: flex;
width: 66px;
height: 84px;
box-sizing: border-box;
align-items: center;
justify-content: center;
background: #fafafa;
cursor: pointer;
/* 尝试消除transform 副作用 end */
&--active {
border: 2px solid #09f;
border-radius: 1px;
}
&>div {
/* 尝试消除transform 副作用 */
position: relative;
z-index: 99;
overflow: hidden;
width: 58px;
height: 76px;
/* 尝试消除transform 副作用 end */
&>img {
width: 58px;
height: 76px;
object-fit: contain;
transition: all 0.2s;
&:hover {
transform: scale(1.5);
}
}
}
}
}
.zhst-image__trackmodel {
&__panel {
position: relative;
z-index: 99;
top: 0;
right: 0;
width: 320px;
height: 100%;
background-color: #fff;
&--head {
width: 100%;
height: 40px;
padding: 0 16px;
border-bottom: 1px solid #f0f0f0;
color: #333;
font-size: 14px;
font-weight: bold;
line-height: 40px;
text-align: left;
}
&--track {
height: calc(100% - 40px);
}
&-date {
padding: 10px 6px;
// position: absolute;
}
}
&--bigImage {
position: absolute;
z-index: 100;
top: 0;
left: 0;
display: flex;
width: 100%;
height: 100%;
justify-content: center;
padding-top: 59px;
background: rgb(0 0 0 / 40%);
&--image {
width: 946px;
height: 532px;
&>img {
width: 946px;
height: 532px;
object-fit: contain;
}
}
&--close {
margin-left: 16px;
color: #fff;
}
}
&__flooter {
position: absolute;
z-index: 999;
bottom: -124px;
left: 0;
width: calc(100% - 320px - 10px);
height: 144px;
background: #fff;
box-shadow: 0 0 8px 0 rgb(172 172 172 / 50%);
&--head {
display: flex;
height: 20px;
align-items: center;
justify-content: center;
background: #f6f6f6;
color: #999;
line-height: 16px;
}
&--body {
display: flex;
height: calc(100% - 20px);
padding-left: 50px;
&__title {
color: #333;
font-size: 12px;
font-weight: bold;
line-height: 16px;
}
&__text {
overflow: hidden;
color: #333;
font-size: 12px;
line-height: 16px;
text-overflow: ellipsis;
white-space: nowrap;
}
&--left {
display: flex;
width: 75px;
height: 100;
align-items: center;
&>img {
width: 75px;
height: 100px;
object-fit: contain;
}
}
&--middle {
display: grid;
width: 331px;
justify-content: flex-start;
padding: 8px 20px;
border-right: 1px solid #f0f0f0;
&>div {
display: flex;
}
}
&--right {
display: grid;
width: calc(100% - 331px - 75px);
padding: 8px 20px;
&>div {
display: flex;
}
&__button-list {
display: flex;
align-items: center;
&>button {
margin-right: 20px;
&>span {
color: #09f !important;
}
&:hover {
&>span {
color: #247fdb !important;
}
}
}
}
}
}
@keyframes close {
from {
bottom: 0;
}
to {
bottom: -124px;
}
}
@keyframes open {
from {
bottom: -124px;
}
to {
bottom: 0;
}
}
&--close {
bottom: -124px;
animation-duration: 1s;
animation-name: close;
}
&--open {
bottom: 0;
animation-duration: 1s;
animation-name: open;
}
}
}
.zhst-image__attributePanel {
margin: 0 66px;
background: #f6f6f6;
margin-top: 20px;
padding-top: 16px;
display: flex;
justify-content: center;
&>div:first-child {
width: fit-content;
display: flex;
flex-direction: column;
}
&-title {
color: rgb(0 0 0 / 88%);
font-weight: bold;
padding-bottom: 12px;
}
&-item {
display: flex;
}
&-label {
color: rgb(0 0 0 / 45%);
}
&-value {
color: rgb(0 0 0 / 88%);
}
}
.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;
}
.disabled {
color: rgba(0, 0, 0, 25%);
}
.relatedBtn {
flex: 1;
font-size: 14px;
color: #333;
display: flex;
align-items: flex-end;
cursor: pointer;
&:hover {
color: #09f;
}
}
}
:global {
.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;
}
}
}

View File

@ -1,245 +0,0 @@
export declare const IMAGE_DATA: {
enAbleDeleteFeature: boolean;
tabsFilter: 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;
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[];
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;
};
export declare const BIG_IMAGE_DATA: ({
imageKey: string;
imgSummary: string;
flvUrl: string;
compaterImages: string[];
odRect: {
x: number;
y: number;
w: number;
h: number;
};
attachImg: {
url: string;
label: string;
}[];
score: string;
showScore: boolean;
cameraPosition: string;
time: string;
objects: {
objectIndex: {
objectId: string;
solutionId: string;
deviceId: string;
fragmentId: string;
};
objectType: string;
sourceObjectId: string;
level: number;
confidence: number;
frameInfo: {
frameId: string;
frameTimestamp: string;
width: number;
height: number;
originWidth: number;
originHeight: number;
offsetTime: string;
skipNumber: string;
};
infoOnSource: {
bboxInFrame: {
bboxRatio: {
x: number;
y: number;
w: number;
h: number;
};
};
countInSource: number;
indexInSource: number;
};
qualityScore: number;
}[];
} | {
imageKey: string;
imgSummary: string;
odRect: {
x: number;
y: number;
w: number;
h: number;
};
attachImg: {
url: string;
label: string;
}[];
flvUrl: string;
score: number;
showScore: boolean;
cameraPosition: string;
time: string;
objects: ({
objectIndex: {
objectId: string;
solutionId: string;
deviceId: string;
fragmentId: string;
};
objectType: string;
sourceObjectId: string;
frameInfo: {
frameId: string;
frameTimestamp: string;
width: number;
height: number;
originWidth: number;
originHeight: number;
offsetTime: string;
skipNumber: string;
};
infoOnSource: {
bboxInFrame: {
bboxRatio: {
x: number;
y: number;
w: number;
h: number;
};
};
countInSource: number;
indexInSource: number;
};
qualityScore: number;
level?: undefined;
confidence?: undefined;
} | {
objectIndex: {
objectId: string;
solutionId: string;
deviceId: string;
fragmentId: string;
};
objectType: string;
sourceObjectId: string;
level: number;
confidence: number;
frameInfo: {
frameId: string;
frameTimestamp: string;
width: number;
height: number;
originWidth: number;
originHeight: number;
offsetTime: string;
skipNumber: string;
};
infoOnSource: {
bboxInFrame: {
bboxRatio: {
x: number;
y: number;
w: number;
h: number;
};
};
countInSource: number;
indexInSource: number;
};
qualityScore: number;
})[];
compaterImages?: undefined;
})[];
export declare const attributeList: {
title: string;
children: {
key: string;
label: string;
children: string;
}[];
}[];

View File

@ -1,473 +0,0 @@
export var IMAGE_DATA = {
"enAbleDeleteFeature": true,
"tabsFilter": ["COMPATER", "NORMAL"],
"selectIndex": 4,
"disableBtn": [0, 1, 4, 20],
"dataSource": [{
"objectId": "1742110565582518272",
"condition": {
"featureInfo": null,
"featureData": "AAAAAAAAAAAAAAAAAAAAAAA==",
"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",
"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"],
"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": "1742092680994764802",
"condition": {
"featureInfo": null,
"featureData": "AAAAAAAAAAAAAAAAAAAAAAAAA==",
"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.7007122,
"timestamp": 1704182225679,
"deviceId": "129533",
"id": "129533",
"name": "4楼门口过道人脸",
"dirid": "0",
"status": "1",
"longitude": 120.125,
"latitude": 30.280500411987305,
"caseId": "0",
"caseGroup": "",
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
"objectIndex": {
"objectId": "1742092680994764802",
"solutionId": "1",
"deviceId": "129533",
"fragmentId": "0"
},
"objectType": "OBJECT_TYPE_PEDESTRAIN",
"isObjectTrack": true,
"pathId": "1742092646219790337",
"frameInfo": {
"frameId": "0",
"frameTimestamp": "1704182225679",
"width": 0,
"height": 0,
"originWidth": 1920,
"originHeight": 1080,
"offsetTime": "20448387",
"skipNumber": "0"
},
"level": 1,
"bboxInFrame": {
"x": 0.5265625,
"y": 0.49537036,
"w": 0.104166664,
"h": 0.35833332
},
"bboxExtInFrame": {
"x": 0.465625,
"y": 0.40648147,
"w": 0.22708334,
"h": 0.537963
},
"objectImageKey": "",
"objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092680994764802.jpg",
"frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092681720379392.jpg",
"confidence": 0.769764,
"sourceObjectId": "1742092681720379392",
"storeTimestamp": "0",
"gbNumber": "",
"qualityScore": 0,
"subObjectCount": 0,
"subObjectType": [],
"subObjectIds": [],
"solutionId": "1",
"fragmentId": "0",
"contrastKey": "singer-20240102/1/129533/1742092680994764802.jpg",
"compaterImages": ["http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"],
"imgSummary": "singer-20240102/1/129533/1742092680994764802.jpg",
"imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092680994764802.jpg",
"srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092681720379392.jpg",
"algorithmVersion": "VERSION_REID_HEAD_ATTR",
"cameraId": "129533",
"cameraName": "4楼门口过道人脸"
}, {
"objectId": "1742092514409592832",
"condition": {
"featureInfo": null,
"featureData": "AAAAAAAAAAAAAAAAAAAAAAAA==",
"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",
"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"],
"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入口人脸"
}],
"isArchiveDetail": false,
"ToolProps": {
"renderVideoBtn": true,
"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: '否'
}]
}];

View File

@ -1,118 +0,0 @@
/**
*
*/
import React from 'react';
import { AlgorithmVersionStr, HumanProperty, ObjectType, Rect } from '@zhst/types';
import { VideoViewProps, ImgViewProps, VideoViewRef, ImgViewRef } from '@zhst/meta';
export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'TRACK';
export type MODEL_TYPE = 'VIDEO' | 'IMAGE';
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'>>;
/**
* description
*/
export interface HeaderProps {
value: TAB_TYPE;
onChange: (type: TAB_TYPE) => void;
tabsFilter: TAB_TYPE[];
}
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 ToolProps {
renderRight?: (props: ParamProps) => React.ReactNode;
renderLeft?: (props: ParamProps) => React.ReactNode;
renderVideoBtn?: boolean;
param: ParamProps;
disableVideo: boolean;
}
export interface BigImageData {
extendRectList: (Rect & {
algorithmVersion: AlgorithmVersionStr;
imageKey: string;
})[];
rectList: (Rect & {
algorithmVersion: AlgorithmVersionStr;
imageKey: string;
})[];
attachImg: {
url: string;
label: '形体' | '人脸';
}[];
odRect: Rect;
compaterImages: string[];
constractKey: string;
frameImageKey: string;
imageKey?: string;
imgSummary: string;
objectExtImageKey: string;
attributeList: {
label: string;
list: any[];
}[];
archiveImages?: any;
spaceName: string;
objectIndex?: {
deviceId: string;
fragmentId: string;
objectId: string;
solutionId: 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;
position: {
lat: number;
lng: number;
};
solutionId?: string;
[index: string]: any;
}
export interface ImageModalDataProps {
targetData: BigImageData[];
compactData: BigImageData[];
}
export interface ModalAdapterConfigProps {
oldMode?: boolean;
}
/**
*
* @param Cmp
* @param config
* @returns
*/
declare const adapter: (Cmp: any, config: ModalAdapterConfigProps) => any;
export default adapter;

View File

@ -1,50 +0,0 @@
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; }
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(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';
/**
* 描述列表 description
*/
/**
* 工具栏
*/
/**
* 兼容老数据格式
* @param _data 老数据格式
* @returns newData
*/
var translateOldImageData = function translateOldImageData(_data) {
return _objectSpread(_objectSpread({}, _data), {}, {
open: _data.visible,
onCancel: _data.onClose
});
};
/**
* 大图组件适配器兼容老接口
* @param Cmp 大图组件
* @param config 额外配置
* @returns 大图组件
*/
var adapter = function adapter(Cmp, config) {
var _config$oldMode = config.oldMode,
oldMode = _config$oldMode === void 0 ? false : _config$oldMode;
return function (props) {
var newProps = oldMode ? translateOldImageData(props) : props;
console.log('adapter----适配数据', props, newProps);
// 该属性已经废弃
delete newProps.visible;
return /*#__PURE__*/React.createElement(Cmp, newProps);
};
};
export default adapter;

View File

@ -1,3 +0,0 @@
import React from 'react';
declare const _default: () => React.JSX.Element;
export default _default;

View File

@ -1,14 +0,0 @@
import React from 'react';
import { Button } from '@zhst/meta';
import { useThrottleFn } from '@zhst/hooks';
export default (function () {
var _useThrottleFn = useThrottleFn(function () {
return console.log('123');
}),
run = _useThrottleFn.run;
return /*#__PURE__*/React.createElement(Button, {
onClick: function onClick() {
return run();
}
}, "\u6D4B\u8BD5");
});

View File

@ -1,21 +0,0 @@
import React from 'react';
import { IRecord, VideoPlayerCardProps, ViewLargerImageModalRef } from '@zhst/biz';
interface RealTimeMonitorProps {
videoDataSource?: VideoPlayerCardProps[];
handleWindowClick?: (key?: string) => void;
handleCloseButtonClick?: (key?: string) => void;
selectedWindowKey?: string;
warningDataSource?: IRecord[];
viewLargerImageModalRef?: React.RefObject<ViewLargerImageModalRef>;
handleDownloadImg?: (imgSrc?: string) => void;
onRecordClick?: (record?: IRecord) => void;
selectedRecordId?: string;
isRecordListLoading?: boolean;
recordListTitle?: string;
style?: React.CSSProperties;
cardStyle?: React.CSSProperties;
imgStyle?: React.CSSProperties;
largeImageTitle?: string;
}
export declare const RealTimeMonitor: React.FC<RealTimeMonitorProps>;
export default RealTimeMonitor;

View File

@ -1,35 +0,0 @@
import React from 'react';
import WindowToggle from "./components/WindowToggle";
import WarningRecordList from "./components/WarningRecordList";
export var RealTimeMonitor = function RealTimeMonitor(props) {
var videoDataSource = props.videoDataSource,
handleWindowClick = props.handleWindowClick,
handleCloseButtonClick = props.handleCloseButtonClick,
selectedWindowKey = props.selectedWindowKey,
warningDataSource = props.warningDataSource,
viewLargerImageModalRef = props.viewLargerImageModalRef,
handleDownloadImg = props.handleDownloadImg,
onRecordClick = props.onRecordClick,
selectedRecordId = props.selectedRecordId,
isRecordListLoading = props.isRecordListLoading;
return /*#__PURE__*/React.createElement("div", {
className: "zhst-biz-real-time-monitor",
style: {
display: 'flex'
}
}, /*#__PURE__*/React.createElement(WindowToggle, {
selectedWindowKey: selectedWindowKey,
dataSource: videoDataSource,
handleWindowClick: handleWindowClick,
handleCloseButtonClick: handleCloseButtonClick
}), /*#__PURE__*/React.createElement(WarningRecordList, {
dataSource: warningDataSource,
handleDownloadImg: handleDownloadImg,
onRecordClick: onRecordClick,
selectedRecordId: selectedRecordId,
viewLargerImageModalRef: viewLargerImageModalRef,
isRecordListLoading: isRecordListLoading,
recordListTitle: "\u76D1\u63A7\u9884\u8B66\u8BB0\u5F55"
}));
};
export default RealTimeMonitor;

View File

@ -1,18 +0,0 @@
import React from 'react';
import { IRecord, ViewLargerImageModalRef } from '@zhst/biz';
import "./index.less";
interface WarningRecordListProps {
dataSource?: IRecord[];
viewLargerImageModalRef?: React.RefObject<ViewLargerImageModalRef>;
handleDownloadImg?: (imgSrc?: string) => void;
onRecordClick?: (record?: IRecord) => void;
selectedRecordId?: string;
isRecordListLoading?: boolean;
recordListTitle?: string;
style?: React.CSSProperties;
cardStyle?: React.CSSProperties;
imgStyle?: React.CSSProperties;
largeImageTitle?: string;
}
declare const WarningRecordList: React.FC<WarningRecordListProps>;
export default WarningRecordList;

View File

@ -1,81 +0,0 @@
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; }
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(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 { ViewLargerImageModal, WarningRecordCard } from '@zhst/biz';
import { Empty, Space, Spin } from 'antd';
import "./index.less";
import { LoadingOutlined } from '@ant-design/icons';
var WarningRecordList = function WarningRecordList(props) {
var _props$dataSource = props.dataSource,
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
viewLargerImageModalRef = props.viewLargerImageModalRef,
selectedRecordId = props.selectedRecordId,
handleDownloadImg = props.handleDownloadImg,
_onRecordClick = props.onRecordClick,
isRecordListLoading = props.isRecordListLoading,
recordListTitle = props.recordListTitle,
style = props.style,
cardStyle = props.cardStyle,
imgStyle = props.imgStyle,
largeImageTitle = props.largeImageTitle;
return /*#__PURE__*/React.createElement("div", {
className: "zhst-biz-warning-record-list",
style: style
}, /*#__PURE__*/React.createElement("div", {
className: "header"
}, recordListTitle), /*#__PURE__*/React.createElement("div", {
className: "body"
}, isRecordListLoading ? /*#__PURE__*/React.createElement("div", {
style: {
height: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center'
}
}, /*#__PURE__*/React.createElement(Spin, {
indicator: /*#__PURE__*/React.createElement(LoadingOutlined, {
style: {
fontSize: 24
}
})
})) : (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > 0 ? /*#__PURE__*/React.createElement(Space, {
direction: "vertical",
size: 10
}, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (record, index) {
if (index > 2) return;
return /*#__PURE__*/React.createElement(WarningRecordCard, {
key: record === null || record === void 0 ? void 0 : record.id,
record: record,
onRecordClick: function onRecordClick(record) {
_onRecordClick === null || _onRecordClick === void 0 || _onRecordClick(record);
},
selectedRecordId: selectedRecordId,
cardStyle: _objectSpread({
width: 300,
height: 264
}, cardStyle),
imgStyle: _objectSpread({
width: 280,
height: 169
}, imgStyle)
});
})) : /*#__PURE__*/React.createElement("div", {
style: {
height: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center'
}
}, /*#__PURE__*/React.createElement(Empty, {
description: "\u6682\u65E0\u6570\u636E"
}))), /*#__PURE__*/React.createElement(ViewLargerImageModal, {
ref: viewLargerImageModalRef,
downloadImg: handleDownloadImg,
title: largeImageTitle
}));
};
export default WarningRecordList;

View File

@ -1,2 +0,0 @@
import WarningRecordList from './WarningRecordList';
export default WarningRecordList;

View File

@ -1,2 +0,0 @@
import WarningRecordList from "./WarningRecordList";
export default WarningRecordList;

View File

@ -1,20 +0,0 @@
.zhst-biz-warning-record-list {
display: flex;
flex-direction: column;
border-left: solid 1px #00000026;
width: 320px;
.header {
width: 100%;
height: 48px;
background-color: #EFF2F4;
padding: 10px 20px;
box-sizing: border-box;
}
.body {
padding: 10px;
overflow: hidden;
flex: 1;
}
}

View File

@ -1,11 +0,0 @@
import React from 'react';
import { VideoPlayerCardProps } from '@zhst/biz';
import './index.less';
interface WindowToggleProps {
dataSource?: VideoPlayerCardProps[];
handleWindowClick?: (key?: string) => void;
handleCloseButtonClick?: (key?: string) => void;
selectedWindowKey?: string;
}
export declare const WindowToggle: React.FC<WindowToggleProps>;
export default WindowToggle;

View File

@ -1,81 +0,0 @@
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
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(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); }
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 _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
import React, { useState } from 'react';
import { Segmented } from 'antd';
import { AppstoreOutlined, BarsOutlined } from '@ant-design/icons';
import { VideoPlayerCard } from '@zhst/biz';
import "./index.less";
import { theme } from 'antd/lib';
export var WindowToggle = function WindowToggle(props) {
var _props$dataSource = props.dataSource,
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
handleWindowClick = props.handleWindowClick,
handleCloseButtonClick = props.handleCloseButtonClick,
selectedWindowKey = props.selectedWindowKey;
var _useState = useState("large"),
_useState2 = _slicedToArray(_useState, 2),
size = _useState2[0],
setSize = _useState2[1];
var useToken = theme.useToken;
var _useToken = useToken(),
token = _useToken.token;
var getLabelStyle = function getLabelStyle(isSelected) {
return _objectSpread({
padding: "0 11px",
background: "#fff"
}, isSelected ? {
background: token.colorPrimary,
color: '#fff'
} : {});
};
return /*#__PURE__*/React.createElement("div", {
className: "zhst-biz-window-toggle"
}, /*#__PURE__*/React.createElement("div", {
className: "header"
}, /*#__PURE__*/React.createElement(Segmented, {
defaultValue: "large",
options: [{
value: 'large',
label: /*#__PURE__*/React.createElement("div", {
style: getLabelStyle(size === 'large')
}, /*#__PURE__*/React.createElement(BarsOutlined, null))
}, {
value: 'small',
label: /*#__PURE__*/React.createElement("div", {
style: getLabelStyle(size === 'small')
}, /*#__PURE__*/React.createElement(AppstoreOutlined, null))
}],
onChange: function onChange(value) {
// 当一个窗口时 默认 selectedkey 第一条数据的 windowkey
if (value === 'large' && dataSource.length > 0) {
var windowKey = dataSource[0].windowKey;
handleWindowClick === null || handleWindowClick === void 0 || handleWindowClick(windowKey);
}
setSize(value);
}
})), /*#__PURE__*/React.createElement("div", {
className: "body"
}, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item, index) {
if (size === "large" && index > 0) return;
return /*#__PURE__*/React.createElement(VideoPlayerCard, _extends({
key: item.windowKey,
selectedWindowKey: selectedWindowKey,
size: size
}, item, {
handleWindowClick: handleWindowClick,
handleCloseButtonClick: handleCloseButtonClick
}));
})));
};
export default WindowToggle;

View File

@ -1,2 +0,0 @@
import WindowToggle from './WindowToggle';
export default WindowToggle;

View File

@ -1,2 +0,0 @@
import WindowToggle from "./WindowToggle";
export default WindowToggle;

View File

@ -1,45 +0,0 @@
.zhst-biz-window-toggle {
display: flex;
flex-direction: column;
flex: 1;
.header {
width: 100%;
height: 48px;
background-color: #EFF2F4;
padding: 10px 20px;
box-sizing: border-box;
.ant-segmented {
padding: 0;
.ant-segmented-group {
border-radius: 4px;
overflow: hidden;
.ant-segmented-item {
border-radius: 0;
.ant-segmented-item-label {
padding: 0;
}
}
}
}
}
.body {
flex: 1;
width: 100%;
background-color: #E5EAEC;
padding: 10px;
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
>div {
margin: 10px;
}
}
}

View File

@ -1,2 +0,0 @@
import RealTimeMonitor from './RealTimeMonitor';
export default RealTimeMonitor;

View File

@ -1,2 +0,0 @@
import RealTimeMonitor from "./RealTimeMonitor";
export default RealTimeMonitor;

View File

@ -1,19 +0,0 @@
import { CardProps } from 'antd';
import React, { ReactNode } from 'react';
import './index.less';
export interface VideoPlayerCardProps {
windowKey?: string;
selectedWindowKey?: string;
showType?: 'video' | "image";
imgSrc?: string;
videoSrc?: string;
cardProps?: CardProps;
errorReasonText?: string;
isWindowLoading?: boolean;
size?: 'large' | 'small';
title?: string | ReactNode;
handleCloseButtonClick?: (key?: string) => void;
handleWindowClick?: (key?: string) => void;
}
export declare const VideoPlayerCard: React.FC<VideoPlayerCardProps>;
export default VideoPlayerCard;

View File

@ -1,140 +0,0 @@
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
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(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); }
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 _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
import { Card, Space, Spin, Button } from 'antd';
import { theme } from 'antd/lib';
import { VideoPlayer } from '@zhst/meta';
import React, { useState, useEffect, useRef } from 'react';
import { CloseOutlined, LoadingOutlined } from '@ant-design/icons';
import "./index.less";
export var VideoPlayerCard = function VideoPlayerCard(props) {
var componentName = "zhst-biz-video-player-card";
var showType = props.showType,
imgSrc = props.imgSrc,
videoSrc = props.videoSrc,
cardProps = props.cardProps,
isWindowLoading = props.isWindowLoading,
errorReasonText = props.errorReasonText,
size = props.size,
title = props.title,
handleCloseButtonClick = props.handleCloseButtonClick,
handleWindowClick = props.handleWindowClick,
windowKey = props.windowKey,
_props$selectedWindow = props.selectedWindowKey,
selectedWindowKey = _props$selectedWindow === void 0 ? '' : _props$selectedWindow;
var _useState = useState(null),
_useState2 = _slicedToArray(_useState, 2),
cardContent = _useState2[0],
setCardContent = _useState2[1];
var useToken = theme.useToken;
var _useToken = useToken(),
token = _useToken.token;
var videoRef = useRef(null);
var selectedBorderStyle = {
border: "2px solid ".concat(token.colorPrimary),
boxShadow: " 0px 2px 9px 0px rgba(0,0,0,0.16)"
};
var cardStyle = _objectSpread(_objectSpread({}, size === 'large' ? {
height: 931
} : {
height: 456,
cursor: 'pointer'
}), size === 'small' && selectedWindowKey === windowKey ? selectedBorderStyle : {});
var videoPlayerCardStyle = size === 'small' ? {
width: "calc(50% - 20px)"
} : {
flex: 1
};
useEffect(function () {
if (!isWindowLoading && (videoSrc || imgSrc)) {
var contentElement = null;
if (videoSrc) {
var _videoRef$current;
contentElement = /*#__PURE__*/React.createElement(VideoPlayer, {
ref: videoRef,
url: videoSrc
});
(_videoRef$current = videoRef.current) === null || _videoRef$current === void 0 || _videoRef$current.setShowCrop(true);
} else if (imgSrc) {
contentElement = /*#__PURE__*/React.createElement("img", {
alt: "\u9996\u5E27\u56FE",
src: imgSrc,
style: {
width: "100%",
height: "100%",
display: 'block'
}
});
}
setCardContent(contentElement);
} else {
setCardContent(null);
}
}, [showType, imgSrc, videoSrc, isWindowLoading]);
return /*#__PURE__*/React.createElement("div", {
className: componentName,
onClick: function onClick() {
handleWindowClick === null || handleWindowClick === void 0 || handleWindowClick(windowKey);
},
style: videoPlayerCardStyle
}, /*#__PURE__*/React.createElement(Card, _extends({
title: /*#__PURE__*/React.createElement(Space, {
style: {
width: "100%",
justifyContent: "space-between"
}
}, /*#__PURE__*/React.createElement("div", null, title), /*#__PURE__*/React.createElement("div", {
className: "card-close-button"
}, /*#__PURE__*/React.createElement(Button, {
type: "text",
onClick: function onClick() {
handleCloseButtonClick === null || handleCloseButtonClick === void 0 || handleCloseButtonClick(windowKey);
}
}, /*#__PURE__*/React.createElement(CloseOutlined, null)))),
style: _objectSpread({
display: "flex",
flexDirection: "column",
borderRadius: 4,
overflow: "hidden"
}, cardStyle),
bodyStyle: {
flex: 1
}
}, cardProps), cardContent ? /*#__PURE__*/React.createElement(React.Fragment, null, cardContent) : /*#__PURE__*/React.createElement("div", {
style: {
backgroundColor: '#000',
height: '100%',
display: 'flex',
padding: '20px',
boxSizing: 'border-box'
}
}, isWindowLoading ? /*#__PURE__*/React.createElement("div", {
style: {
flex: 1,
display: 'flex',
justifyContent: 'center',
alignItems: 'center'
}
}, /*#__PURE__*/React.createElement(Spin, {
indicator: /*#__PURE__*/React.createElement(LoadingOutlined, {
style: {
fontSize: 24
}
})
})) : !!errorReasonText && /*#__PURE__*/React.createElement("span", {
style: {
color: token.colorError
}
}, errorReasonText))));
};
export default VideoPlayerCard;

View File

@ -1,3 +0,0 @@
import VideoPlayerCard from './VideoPlayerCard';
export type { VideoPlayerCardProps } from './VideoPlayerCard';
export default VideoPlayerCard;

View File

@ -1,2 +0,0 @@
import VideoPlayerCard from "./VideoPlayerCard";
export default VideoPlayerCard;

View File

@ -1,30 +0,0 @@
.zhst-biz-video-player-card {
.ant-card-head {
padding: 0 20px;
}
.ant-card-body {
padding: 0;
overflow: hidden;
border-radius: 0;
.zhst-image__video-view {
height: 100%;
}
}
.card-close-button {
.ant-btn {
padding: 0 3px;
height: 22px;
color: #00000073;
}
.ant-btn:hover {
padding: 0 3px;
height: 22px;
color: #000000e0;
}
}
}

View File

@ -1,25 +0,0 @@
import React from 'react';
import { ModalProps, SpaceProps } from 'antd';
import './index.less';
type ViewLargerImageModalParams = {
imgSrc?: string;
warningData?: {
label?: string;
value?: string;
}[];
};
export interface ViewLargerImageModalRef {
show: (params?: ViewLargerImageModalParams) => void;
handleCancel: () => void;
}
export interface ViewLargerImageModalProps {
imgStyle?: React.CSSProperties;
downloadImg?: (imgSrc?: string) => void;
title?: string;
downloadText?: string;
modalProps?: ModalProps;
spaceProps?: SpaceProps;
}
export declare const ViewLargerImageModal: React.ForwardRefExoticComponent<ViewLargerImageModalProps & React.RefAttributes<ViewLargerImageModalRef>>;
export default ViewLargerImageModal;
export declare const useViewLargerImageModal: () => React.RefObject<ViewLargerImageModalRef>;

View File

@ -1,106 +0,0 @@
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
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(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); }
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 _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
import React, { useImperativeHandle, useRef, useState, forwardRef } from 'react';
import { Modal, Space } from 'antd';
import theme from 'antd/lib/theme';
import { DownloadOutlined } from '@ant-design/icons';
import "./index.less";
export var ViewLargerImageModal = /*#__PURE__*/forwardRef(function (props, ref) {
var modalProps = props.modalProps,
downloadImg = props.downloadImg,
imgStyle = props.imgStyle,
_props$title = props.title,
title = _props$title === void 0 ? '预警大图' : _props$title,
_props$downloadText = props.downloadText,
downloadText = _props$downloadText === void 0 ? '下载大图' : _props$downloadText,
spaceProps = props.spaceProps;
var useToken = theme.useToken;
var _useToken = useToken(),
token = _useToken.token;
var _useState = useState(false),
_useState2 = _slicedToArray(_useState, 2),
open = _useState2[0],
setOpen = _useState2[1];
var _useState3 = useState(),
_useState4 = _slicedToArray(_useState3, 2),
imgSrc = _useState4[0],
setImgSrc = _useState4[1];
var _useState5 = useState(),
_useState6 = _slicedToArray(_useState5, 2),
warningData = _useState6[0],
setWarningData = _useState6[1];
var handleCancel = function handleCancel() {
setOpen(false);
};
useImperativeHandle(ref, function () {
return {
show: function show(_params) {
setOpen(true);
setImgSrc(_params === null || _params === void 0 ? void 0 : _params.imgSrc);
setWarningData(_params === null || _params === void 0 ? void 0 : _params.warningData);
},
handleCancel: handleCancel
};
});
return /*#__PURE__*/React.createElement(Modal, _extends({
className: "zhst-biz-view-warning-larger-image-modal",
open: open,
destroyOnClose: true,
title: title,
width: "1029px",
footer: null,
onCancel: handleCancel
}, modalProps), /*#__PURE__*/React.createElement(Space, _extends({
size: 0,
styles: {
item: {
backgroundColor: '#F6F9FAFF'
}
}
}, spaceProps), /*#__PURE__*/React.createElement("img", {
alt: title,
src: imgSrc,
style: _objectSpread({
width: 789,
height: 444,
display: 'block'
}, imgStyle)
}), /*#__PURE__*/React.createElement("div", {
className: "right-context"
}, warningData === null || warningData === void 0 ? void 0 : warningData.map(function (_ref) {
var label = _ref.label,
value = _ref.value;
return /*#__PURE__*/React.createElement("div", {
key: label
}, /*#__PURE__*/React.createElement("span", {
className: "context-key"
}, "".concat(label, ": ")), value);
}), imgSrc && downloadImg && /*#__PURE__*/React.createElement("div", {
className: "img-download",
style: {
color: token.colorPrimary
},
onClick: function onClick() {
return downloadImg === null || downloadImg === void 0 ? void 0 : downloadImg(imgSrc);
}
}, /*#__PURE__*/React.createElement(DownloadOutlined, null), /*#__PURE__*/React.createElement("span", {
style: {
paddingLeft: 3
}
}, downloadText)))));
});
export default ViewLargerImageModal;
export var useViewLargerImageModal = function useViewLargerImageModal() {
return useRef(null);
};

View File

@ -1,4 +0,0 @@
import ViewLargerImageModal, { useViewLargerImageModal } from './ViewLargerImageModal';
export type { ViewLargerImageModalRef, ViewLargerImageModalProps } from './ViewLargerImageModal';
export default ViewLargerImageModal;
export { useViewLargerImageModal };

View File

@ -1,3 +0,0 @@
import ViewLargerImageModal, { useViewLargerImageModal } from "./ViewLargerImageModal";
export default ViewLargerImageModal;
export { useViewLargerImageModal };

View File

@ -1,62 +0,0 @@
.zhst-biz-view-warning-larger-image-modal {
font-family: MicrosoftYaHei;
.ant-modal-content {
padding: 0;
height: 492px;
border-radius: 6px;
overflow: hidden;
.ant-modal-close {
top: 14px;
right: 16px;
}
.ant-modal-header {
height: 48px;
line-height: 48px;
margin-bottom: 0;
.ant-modal-title {
height: 100%;
line-height: 48px;
font-weight: bold;
padding-left: 20px;
}
}
.ant-modal-body {
height: 444px;
>div {
width: 100%;
height: 100%;
align-items: flex-start;
>div:nth-child(2) {
position: relative;
flex: 1;
box-sizing: border-box;
height: 100%;
padding: 30px 16px;
.right-context>div {
margin-bottom: 20px;
}
.right-context .context-key {
font-weight: bold;
}
.img-download {
position: absolute;
bottom: 0;
cursor: pointer;
}
}
}
}
}
}

View File

@ -1,30 +0,0 @@
import { CardProps } from 'antd';
import React from 'react';
import './index.less';
export interface IRecord {
imgSrc?: string;
id?: string;
/**
*
*/
warningType?: string;
warningInfo?: string[];
boxId: string;
position: string;
cabietId?: string;
cabietText?: string;
warningTime?: string;
warningTimestamp?: string | number;
warningTimeFormat?: string;
}
export interface WarningRecordCardProps {
record?: IRecord;
onRecordClick?: (record?: IRecord) => void;
style?: React.CSSProperties;
cardProps?: CardProps;
selectedRecordId?: string;
cardStyle?: React.CSSProperties;
imgStyle?: React.CSSProperties;
}
export declare const WarningRecordCard: React.FC<WarningRecordCardProps>;
export default WarningRecordCard;

View File

@ -1,89 +0,0 @@
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
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(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 { Card, Space, Divider } from 'antd';
import { theme } from 'antd/lib';
import React from 'react';
import dayjs from 'dayjs';
import "./index.less";
;
;
export var WarningRecordCard = function WarningRecordCard(props) {
var componentName = "zhst-biz-warning-record-card";
var record = props.record,
onRecordClick = props.onRecordClick,
style = props.style,
cardProps = props.cardProps,
selectedRecordId = props.selectedRecordId,
cardStyle = props.cardStyle,
imgStyle = props.imgStyle;
var _ref = record || {},
imgSrc = _ref.imgSrc,
id = _ref.id,
warningType = _ref.warningType,
_ref$warningInfo = _ref.warningInfo,
warningInfo = _ref$warningInfo === void 0 ? [] : _ref$warningInfo,
cabietText = _ref.cabietText,
warningTime = _ref.warningTime,
warningTimestamp = _ref.warningTimestamp,
_ref$warningTimeForma = _ref.warningTimeFormat,
warningTimeFormat = _ref$warningTimeForma === void 0 ? 'YYYY-MM-DD HH:mm:ss' : _ref$warningTimeForma;
var formattedDate = warningTimestamp ? dayjs(warningTimestamp).format(warningTimeFormat) : '';
var warningTimeShow = warningTime ? warningTime : formattedDate;
var useToken = theme.useToken;
var _useToken = useToken(),
token = _useToken.token;
var selectedBorderStyle = {
border: "2px solid ".concat(token.colorPrimary),
boxShadow: " 0px 2px 9px 0px rgba(0,0,0,0.16)"
};
var selectedCardStyle = _objectSpread({}, selectedRecordId === (record === null || record === void 0 ? void 0 : record.id) ? selectedBorderStyle : {});
var handleClick = function handleClick() {
onRecordClick === null || onRecordClick === void 0 || onRecordClick(record);
};
return /*#__PURE__*/React.createElement("div", {
className: componentName,
key: id,
onClick: handleClick,
style: style
}, /*#__PURE__*/React.createElement(Card, _extends({
cover: /*#__PURE__*/React.createElement("img", {
alt: "\u9884\u8B66\u56FE",
src: imgSrc,
style: _objectSpread({
width: 336,
height: 203,
borderRadius: 0
}, imgStyle)
}),
style: _objectSpread(_objectSpread({
width: 356,
height: 302,
padding: 10,
borderRadius: 4
}, selectedCardStyle), cardStyle)
}, cardProps), /*#__PURE__*/React.createElement("div", {
className: "left-context"
}, /*#__PURE__*/React.createElement("div", {
className: "warning-type"
}, warningType), /*#__PURE__*/React.createElement(Space, {
size: 0,
split: /*#__PURE__*/React.createElement(Divider, {
type: "vertical"
})
}, warningInfo === null || warningInfo === void 0 ? void 0 : warningInfo.map(function (item, index) {
return /*#__PURE__*/React.createElement("div", {
key: index,
className: "info-item"
}, item);
})), /*#__PURE__*/React.createElement("div", {
className: "warning-time"
}, warningTimeShow)), /*#__PURE__*/React.createElement("div", {
className: "cabietInfo"
}, cabietText)));
};
export default WarningRecordCard;

View File

@ -1,3 +0,0 @@
import WarningRecordCard from './WarningRecordCard';
export type { IRecord, WarningRecordCardProps } from './WarningRecordCard';
export default WarningRecordCard;

View File

@ -1,2 +0,0 @@
import WarningRecordCard from "./WarningRecordCard";
export default WarningRecordCard;

View File

@ -1,27 +0,0 @@
.zhst-biz-warning-record-card {
cursor: pointer;
.ant-card-body {
padding: 0;
font-family: MicrosoftYaHei;
line-height: 19px;
display: flex;
margin-top: 10px;
.left-context {
flex: 1;
>div {
margin-top: 6px;
}
>div:nth-child(1) {
margin-top: 0;
}
}
.warning-type {
font-weight: bold;
}
}
}

View File

@ -1,9 +0,0 @@
import { FC } from 'react';
import { TabsProps } from 'antd';
import type { BoxPanelProps } from './components/boxPanel';
export interface BoxSelectTreeProps extends BoxPanelProps {
onTabChange?: (e: any) => void;
tabsProps?: TabsProps;
}
declare const BoxSelectTree: FC<BoxSelectTreeProps>;
export default BoxSelectTree;

View File

@ -1,92 +0,0 @@
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React from 'react';
import { Tabs } from 'antd';
import BoxPanel from "./components/boxPanel";
var BoxSelectTree = function BoxSelectTree(props) {
var data = props.data,
_props$boxDataSource = props.boxDataSource,
boxDataSource = _props$boxDataSource === void 0 ? [] : _props$boxDataSource,
onTabChange = props.onTabChange,
onSearch = props.onSearch,
onItemCheck = props.onItemCheck,
onItemSelect = props.onItemSelect,
onBoxBatchDelete = props.onBoxBatchDelete,
onBoxDelete = props.onBoxDelete,
onCreateSubmit = props.onCreateSubmit,
onClockClick = props.onClockClick,
onImport = props.onImport,
onCreate = props.onCreate,
tabsProps = props.tabsProps,
searchInputProps = props.searchInputProps,
treeProps = props.treeProps,
customImport = props.customImport,
showOptions = props.showOptions,
extraBtns = props.extraBtns;
var items = [{
key: '1',
label: /*#__PURE__*/React.createElement("div", {
style: {
textAlign: 'center',
width: '160px'
}
}, "\u76D2\u5B50\u7EC4"),
children: /*#__PURE__*/React.createElement(BoxPanel, {
searchInputProps: searchInputProps,
boxDataSource: boxDataSource,
treeProps: treeProps,
data: data,
onCreate: onCreate,
onCreateSubmit: onCreateSubmit,
onBoxBatchDelete: onBoxBatchDelete,
onBoxDelete: onBoxDelete,
onSearch: onSearch,
onItemCheck: onItemCheck,
onItemSelect: onItemSelect,
showOptions: showOptions,
customImport: customImport,
extraBtns: extraBtns,
onClockClick: onClockClick,
onImport: onImport
})
}, {
key: '2',
label: /*#__PURE__*/React.createElement("div", {
style: {
textAlign: 'center',
width: '160px'
}
}, "\u76D2\u5B50"),
children: /*#__PURE__*/React.createElement(BoxPanel, {
boxDataSource: boxDataSource,
searchInputProps: searchInputProps,
treeProps: treeProps,
data: data,
onCreate: onCreate,
onBoxBatchDelete: onBoxBatchDelete,
onCreateSubmit: onCreateSubmit,
onBoxDelete: onBoxDelete,
onSearch: onSearch,
onItemCheck: onItemCheck,
onItemSelect: onItemSelect,
showOptions: showOptions,
customImport: customImport,
extraBtns: extraBtns,
onClockClick: onClockClick,
onImport: onImport
})
}];
return /*#__PURE__*/React.createElement(Tabs, _extends({
defaultActiveKey: "1",
centered: true,
items: items,
onChange: onTabChange,
tabBarGutter: 0,
indicator: {
size: function size(origin) {
return origin;
},
align: 'center'
}
}, tabsProps));
};
export default BoxSelectTree;

File diff suppressed because one or more lines are too long

View File

@ -1,3 +0,0 @@
import BoxSelectTree from './boxSelectTree';
export type { BoxSelectTreeProps } from './boxSelectTree';
export default BoxSelectTree;

View File

@ -1,2 +0,0 @@
import BoxSelectTree from "./boxSelectTree";
export default BoxSelectTree;

View File

@ -1,2 +0,0 @@
import { TreeDataNode } from "antd";
export declare const treeData: TreeDataNode[];

View File

@ -1,22 +0,0 @@
export var treeData = [{
title: '全部盒子',
key: '0-0',
children: [{
title: '盒子组1',
key: '0-0-0',
children: [{
title: '摄像头1',
key: '0-0-0-0'
}, {
title: '摄像头2',
key: '0-0-0-1'
}]
}, {
title: '盒子组2',
key: '0-0-1',
children: [{
title: '摄像头4',
key: '0-0-1-0'
}]
}]
}];

View File

@ -1,45 +0,0 @@
import { Dayjs as Moment } from 'dayjs';
export declare const getDefaultRadius: () => number;
export declare const setDefaultRadius: (radius: number) => void;
export declare const setSearchIntervalDuration: (duration: number) => void;
export declare const getSearchIntervalDuration: (time: number) => number;
export declare const operateTrackById: (smartTrackId: number, operationType: OperationType) => Promise<void>;
export declare const deleteTrackById: (smartTrackId: number) => Promise<void>;
export declare const modifyTrackImgs: (smartTrackId: number, images: Array<Object>) => Promise<void>;
export declare const modifyTrackConf: (conf: any, smartTrackId: number) => Promise<void>;
export declare const getTrackTaskById: (smartTrackId?: number) => Promise<any>;
export declare const getTackDetailInfo: (smartTrackId?: number) => Promise<any>;
export declare const getTaskCameraByCenterAndPower: (value: {
taskPower: {
facePower: number;
bodyPower: number;
};
cameraInfos: Array<Object>;
center: [number, number];
}) => Promise<Object[]>;
/**创建追踪任务 */
export declare const createIntelligentTrack: (value: {
images: Array<Object>;
deviceIds: Array<string>;
circleCenter: [number, number];
model: number;
circleRadius: number;
facePower?: number;
bodyPower?: number;
historyTime?: [Moment, Moment];
topping?: boolean;
}) => Promise<any>;
export declare const emitHeartbeat: (smartTrackId: number) => Promise<void>;
export declare const ModifyTrackCameras: (value: {
smartTrackId: number;
deviceIds: Array<number>;
centerPoint: [number, number];
}) => Promise<void>;
export declare const setIntelligentTrackCircleInfo: (smartTrackId: number, circleCenter: [number, number]) => Promise<void>;
export declare const getTackCameraInfo: (value: {
circleCenter: [Moment, Moment];
radius: number;
zoom: number;
}) => Promise<any>;
export declare const getCameraInfoByCircle: (circleCenter: any, radius: any, zoom?: number) => Promise<any>;
export declare const taskInfoToSearchItem: (taskInfo: any) => any[];

File diff suppressed because one or more lines are too long

View File

@ -1,17 +0,0 @@
export { default as BigImageModal } from './BigImageModal';
export type { BigImageModalProps } from './BigImageModal';
export { default as BoxSelectTree } from './boxSelectTree';
export type { BoxSelectTreeProps } from './boxSelectTree';
export { default as Tree } from './tree';
export type { BoxTreeProps, TreeData } from './tree';
export { default as TreeTransfer } from './treeTransfer';
export type { TreeTransferProps } from './treeTransfer';
export { default as TreeTransferModal } from './treeTransferModal';
export type { TreeTransferModalProps } from './treeTransferModal';
export { default as WarningRecordCard } from './WarningRecordCard';
export type { IRecord, WarningRecordCardProps } from './WarningRecordCard';
export type { ViewLargerImageModalRef, ViewLargerImageModalProps } from './ViewLargerImageModal';
export { default as ViewLargerImageModal, useViewLargerImageModal } from './ViewLargerImageModal';
export type { VideoPlayerCardProps } from './VideoPlayerCard';
export { default as VideoPlayerCard } from './VideoPlayerCard';
export { default as RealTimeMonitor } from './RealTimeMonitor';

View File

@ -1,9 +0,0 @@
export { default as BigImageModal } from "./BigImageModal";
export { default as BoxSelectTree } from "./boxSelectTree";
export { default as Tree } from "./tree";
export { default as TreeTransfer } from "./treeTransfer";
export { default as TreeTransferModal } from "./treeTransferModal";
export { default as WarningRecordCard } from "./WarningRecordCard";
export { default as ViewLargerImageModal, useViewLargerImageModal } from "./ViewLargerImageModal";
export { default as VideoPlayerCard } from "./VideoPlayerCard";
export { default as RealTimeMonitor } from "./RealTimeMonitor";

View File

@ -1,17 +0,0 @@
import { FC } from 'react';
import { TreeDataNode, TreeProps } from 'antd';
import './index.less';
export interface BoxTreeProps extends TreeProps {
data: TreeDataNode[];
treeCheckable?: boolean;
showItemOption?: boolean;
customOptions?: any;
onItemCheck?: TreeProps['onCheck'];
onItemSelect?: TreeProps['onSelect'];
onItemSetting?: (_data: any) => void;
onItemDelete?: (_data: any) => void;
onItemRename?: (_nodeData: any) => void;
onItemRenameFinish?: (_data: any, _nodeData: any) => Promise<any>;
}
declare const boxTree: FC<BoxTreeProps>;
export default boxTree;

File diff suppressed because one or more lines are too long

View File

@ -1,13 +0,0 @@
import { TreeDataNode } from 'antd';
import BoxTree from './boxTree';
export interface TreeData extends TreeDataNode {
children?: TreeDataNode['children'] & {
isCamera?: boolean;
/**
* 0- 1- 2- 3-
*/
status?: '0' | '1' | '2' | '3';
}[];
}
export type { BoxTreeProps } from './boxTree';
export default BoxTree;

View File

@ -1,2 +0,0 @@
import BoxTree from "./boxTree";
export default BoxTree;

View File

@ -1,9 +0,0 @@
.zhst-biz-tree-item-render {
&_right {
display: none;
}
&:hover &_right {
display: inline-flex;
}
}

View File

@ -1,22 +0,0 @@
import React from 'react';
import { InputProps } from 'antd';
import { TransferProps, TreeDataNode, TreeProps } from 'antd';
import './index.less';
export interface TreeTransferProps {
dataSource: TreeDataNode[];
treeProps?: TreeProps;
searchInputProps?: InputProps;
targetItems: TreeDataNode[];
checkedKeys: string[];
onTreeSelect?: TreeProps['onSelect'];
onTreeCheck?: TreeProps['onCheck'];
onItemDelete?: (key: string, info?: {
root: TreeDataNode[];
keys: string[];
}) => void;
onChange?: TransferProps['onChange'];
onOk?: (data: any) => void;
onReset?: () => void;
}
declare const TreeTransfer: React.FC<TreeTransferProps>;
export default TreeTransfer;

View File

@ -1,143 +0,0 @@
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
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); }
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 _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
import React, { useState } from 'react';
import { Button, Card, Flex, Input, Tree } from 'antd';
import theme from 'antd/es/theme';
import "./index.less";
import { DeleteOutlined, DoubleRightOutlined, SearchOutlined } from '@ant-design/icons';
import { getAllRootKeyById } from "./treeTransferHelper";
var componentName = 'zhst-biz-treeTransfer';
var useToken = theme.useToken;
var TreeTransfer = function TreeTransfer(_ref) {
var dataSource = _ref.dataSource,
treeProps = _ref.treeProps,
searchInputProps = _ref.searchInputProps,
_ref$targetItems = _ref.targetItems,
targetItems = _ref$targetItems === void 0 ? [] : _ref$targetItems,
_ref$checkedKeys = _ref.checkedKeys,
checkedKeys = _ref$checkedKeys === void 0 ? [] : _ref$checkedKeys,
onTreeCheck = _ref.onTreeCheck,
onTreeSelect = _ref.onTreeSelect,
onItemDelete = _ref.onItemDelete,
onOk = _ref.onOk,
onReset = _ref.onReset;
var _useToken = useToken(),
token = _useToken.token;
var _useState = useState(''),
_useState2 = _slicedToArray(_useState, 2),
keyWords = _useState2[0],
setKeyWords = _useState2[1];
function findNodesWithKeyword(_keyWords, _treeData) {
// @ts-ignore
function dfs(node) {
return node.filter(function (item) {
return item.title.includes(_keyWords);
});
}
var data = dfs(_treeData);
return data || [];
}
return /*#__PURE__*/React.createElement(Flex, {
gap: 20,
className: componentName,
align: "center",
justify: "center"
}, /*#__PURE__*/React.createElement("div", {
className: "".concat(componentName, "-left")
}, /*#__PURE__*/React.createElement(Card, {
className: "".concat(componentName, "-left_card"),
title: /*#__PURE__*/React.createElement("div", {
style: {
textAlign: 'center'
}
}, "\u53EF\u9009\u62E9\u7684\u8303\u56F4"),
bodyStyle: {
padding: 12
}
}, /*#__PURE__*/React.createElement(Input, _extends({
prefix: /*#__PURE__*/React.createElement(SearchOutlined, null),
onChange: function onChange(e) {
return setKeyWords(e.target.value);
},
placeholder: "\u8BF7\u8F93\u5165\u8BBE\u5907\u540D\u79F0"
}, searchInputProps)), /*#__PURE__*/React.createElement(Tree, _extends({
style: {
marginTop: '6px'
},
height: 420,
blockNode: true,
checkable: true,
checkedKeys: checkedKeys,
treeData: findNodesWithKeyword(keyWords, dataSource),
onCheck: function onCheck(keys, info) {
return onTreeCheck === null || onTreeCheck === void 0 ? void 0 : onTreeCheck(keys, info);
},
onSelect: function onSelect(keys, info) {
return onTreeSelect === null || onTreeSelect === void 0 ? void 0 : onTreeSelect(keys, info);
}
}, treeProps)))), /*#__PURE__*/React.createElement(DoubleRightOutlined, null), /*#__PURE__*/React.createElement("div", {
className: "".concat(componentName, "-right")
}, /*#__PURE__*/React.createElement(Card, {
className: "".concat(componentName, "-right_card"),
title: /*#__PURE__*/React.createElement("div", {
style: {
textAlign: 'center'
}
}, "\u5DF2\u9009\u62E9\u7684\u8303\u56F4"),
bodyStyle: {
padding: 0
}
}, /*#__PURE__*/React.createElement("div", {
className: "".concat(componentName, "-right_card__items")
}, targetItems.map(function (item) {
return /*#__PURE__*/React.createElement("div", {
className: "".concat(componentName, "-right_card__items___item"),
key: item.key,
onMouseEnter: function onMouseEnter(e) {
e.target.style.backgroundColor = token.colorPrimaryBg;
e.target.style.color = token.colorPrimary;
},
onMouseLeave: function onMouseLeave(e) {
e.target.style.color = token.colorText;
e.target.style.backgroundColor = null;
}
}, item.title, /*#__PURE__*/React.createElement("div", {
style: {
float: 'right'
}
}, /*#__PURE__*/React.createElement(DeleteOutlined, {
onClick: function onClick() {
var _getAllRootKeyById = getAllRootKeyById(item.key, dataSource),
root = _getAllRootKeyById.root,
keys = _getAllRootKeyById.keys;
onItemDelete === null || onItemDelete === void 0 || onItemDelete(item.key, {
root: root,
keys: keys
});
}
})));
})), /*#__PURE__*/React.createElement(Flex, {
className: "".concat(componentName, "-right_card__btns")
}, /*#__PURE__*/React.createElement(Button, {
style: {
marginRight: 8,
width: '50%'
},
disabled: targetItems.length <= 0,
onClick: onReset
}, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(Button, {
style: {
width: '50%'
},
type: "primary",
onClick: function onClick() {
return onOk === null || onOk === void 0 ? void 0 : onOk(targetItems);
}
}, "\u786E\u5B9A")))));
};
export default TreeTransfer;

View File

@ -1,4 +0,0 @@
import TreeTransfer from "./TreeTransfer";
export type { TreeTransferProps } from './TreeTransfer';
export * from './treeTransferHelper';
export default TreeTransfer;

View File

@ -1,3 +0,0 @@
import TreeTransfer from "./TreeTransfer";
export * from "./treeTransferHelper";
export default TreeTransfer;

View File

@ -1,43 +0,0 @@
.zhst-biz-treeTransfer {
&-left {
&_card {
width: 500px;
height: 522px;
background-color: #FCFCFC;
}
}
&-right {
&_card {
width: 300px;
height: 522px;
background-color: #FCFCFC;
&__items {
padding: 8px 4px;
overflow: scroll;
&::-webkit-scrollbar {
display: none;
}
&___item {
margin: 0;
padding: 4px 12px;
cursor: pointer;
}
}
&__btns {
width: 100%;
padding: 8px;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
box-sizing: border-box;
border-top: 1px solid #f0f0f0;
}
}
}
}

View File

@ -1,12 +0,0 @@
export declare const isChecked: (selectedKeys: React.Key[], eventKey: React.Key) => boolean;
/**
*
* @param objects
* @param element
* @returns
*/
export declare const findParentByChild: (objects: any[], propertyValue: string | number, propertyKey?: string) => any;
export declare const getAllRootKeyById: (val: string | number, list: any[], key?: string) => {
root: any;
keys: any[];
};

View File

@ -1,57 +0,0 @@
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); }
export var isChecked = function isChecked(selectedKeys, eventKey) {
return selectedKeys.includes(eventKey);
};
function isObject(value) {
return value !== null && _typeof(value) === 'object' && !Array.isArray(value);
}
/**
* 通过子元素找到父级节点
* @param objects
* @param element
* @returns
*/
export var findParentByChild = function findParentByChild(objects, propertyValue) {
var propertyKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'key';
for (var i = 0; i < objects.length; i++) {
var obj = objects[i];
if (obj[propertyKey] === propertyValue) {
return obj;
} else if (_typeof(obj) === 'object') {
var found = findParentByChild(Object.values(obj), propertyValue);
if (found) {
return obj;
}
}
}
return null; // 如果找不到包含具有指定属性的子对象的父对象,返回 null
};
export var getAllRootKeyById = function getAllRootKeyById(val, list) {
var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'key';
var keys = [];
var findParentByChild = function findParentByChild(propertyValue, objects, propertyKey) {
for (var i = 0; i < objects.length; i++) {
var obj = objects[i];
if (obj[propertyKey] === propertyValue) {
console.log('obj', obj);
return obj;
} else if (_typeof(obj) === 'object') {
var found = findParentByChild(propertyValue, Object.values(obj), propertyKey);
if (found) {
if (isObject(found)) {
keys.push(found.key);
}
return obj;
}
}
}
return null; // 如果找不到包含具有指定属性的子对象的父对象,返回 null
};
var data = findParentByChild(val, list, key);
data.key && keys.push(data.key);
return {
root: data,
keys: keys
};
};

View File

@ -1,26 +0,0 @@
import { FC } from 'react';
import { ModalProps, RadioGroupProps, SelectProps, TransferProps, TreeDataNode, TreeProps } from 'antd';
export interface TreeTransferModalProps {
dataSource: TreeDataNode[];
treeProps?: TreeProps;
targetItems: TreeDataNode[];
checkedKeys: string[];
onTreeSelect?: TreeProps['onSelect'];
onTreeCheck?: TreeProps['onCheck'];
onItemDelete?: (key: string, info?: {
root: TreeDataNode[];
keys: string[];
}) => void;
onChange?: TransferProps['onChange'];
onOk?: (data: any) => void;
onReset?: () => void;
open?: boolean;
onCancel?: ModalProps['onCancel'];
onRadioChange?: RadioGroupProps['onChange'];
onSelect?: SelectProps['onSelect'];
modalProps?: ModalProps;
radioProps?: RadioGroupProps;
selectProps?: SelectProps;
}
declare const TreeTransferModal: FC<TreeTransferModalProps>;
export default TreeTransferModal;

View File

@ -1,80 +0,0 @@
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
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); }
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 _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
import React, { useState } from 'react';
import { Modal, Radio, Select } from 'antd';
import TreeTransfer from "../treeTransfer";
import { ALL_LIST, BOX_TYPE_LIST } from "../utils/constants";
var TreeTransferModal = function TreeTransferModal(props) {
var open = props.open,
_props$dataSource = props.dataSource,
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
checkedKeys = props.checkedKeys,
onItemDelete = props.onItemDelete,
onOk = props.onOk,
onCancel = props.onCancel,
onReset = props.onReset,
onRadioChange = props.onRadioChange,
onTreeCheck = props.onTreeCheck,
onSelect = props.onSelect,
targetItems = props.targetItems,
modalProps = props.modalProps,
radioProps = props.radioProps,
selectProps = props.selectProps;
var _useState = useState('1'),
_useState2 = _slicedToArray(_useState, 2),
type = _useState2[0],
setType = _useState2[1];
return /*#__PURE__*/React.createElement(Modal, _extends({
open: open,
destroyOnClose: true,
title: "\u7EDF\u8BA1\u70B9\u4F4D",
width: "948px",
footer: null,
onCancel: onCancel
}, modalProps), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Radio.Group, _extends({
onChange: function onChange(e) {
setType(e.target.value);
onRadioChange === null || onRadioChange === void 0 || onRadioChange(e);
},
style: {
marginLeft: '24px',
padding: '20px 0'
},
value: type,
options: BOX_TYPE_LIST
}, radioProps)), /*#__PURE__*/React.createElement(Select, _extends({
defaultValue: '',
style: {
marginLeft: 200,
width: 150
},
options: ALL_LIST,
onSelect: onSelect
}, selectProps))), type === 'box' ? /*#__PURE__*/React.createElement(TreeTransfer, {
dataSource: dataSource,
targetItems: targetItems,
checkedKeys: checkedKeys,
onTreeCheck: onTreeCheck,
onItemDelete: onItemDelete,
onOk: onOk,
onReset: onReset
}) : /*#__PURE__*/React.createElement(TreeTransfer, {
dataSource: dataSource,
targetItems: targetItems,
checkedKeys: checkedKeys,
onTreeCheck: onTreeCheck,
onItemDelete: onItemDelete,
onOk: onOk,
onReset: onReset
}), /*#__PURE__*/React.createElement("p", {
style: {
textAlign: 'right'
}
}, "\u5DF2\u9009\u4E2D", targetItems.length, "\u4E2A\u70B9\u4F4D")));
};
export default TreeTransferModal;

View File

@ -1,3 +0,0 @@
import TreeTransferModal from './TreeTransferModal';
export type { TreeTransferModalProps } from './TreeTransferModal';
export default TreeTransferModal;

View File

@ -1,2 +0,0 @@
import TreeTransferModal from "./TreeTransferModal";
export default TreeTransferModal;

View File

@ -1,43 +0,0 @@
export var OBJECT_GRNER_THRESHOLD = 0.8; //目标图判断性别阈值
export var OBJECT_AGE_TYPE_THRESHOLD = 0.5; //目标图判断年龄段阈值
export var MODE_KEY = 'test_mode';
//业务约定
export var SEARCH_IMG_COUNT = 10; //检索图片的最大个数
export var GLOBAL_IS_ITEM_NUMBER_SHOW = false; //是否展示索引
export var publicPath = 'hummingbird';
export var ENTER_CIRCLE = 'MONITORTYPE_ENTER_CIRCLE';
export var OUT_CIRCLE = 'MONITORTYPE_OUT_CIRCLE';
export var TEMP = 'MONITORTYPE_TEMP';
export var GLOBAL_IS_BOX_VMS_SHOW = true; //是否展示盒子vms
export var BODY_SEARCH_THRESHOID = 0.45; //形体检索阈值
export var RECORD_VERSION = '3.0.0'; //保存记录的版本号
export var DeviceTab = {
EMPTY: 0,
REAL_CAMERA: 1,
PREPROCESS_CAMERA: 2,
//摄像头列表
TAG_CAMERA: 3,
//预案列表
HISTORY_VIDEO_GROUP: 4,
//录像回放
VIRTUAL_CAMERA: 5,
//离线视频
REAL_CAMERA_NOFACE: 6,
REAL_CAMERA_ONLYFACE: 7,
REAL_CAMERA_NOFACE_NOBOX_NODIRECONNECT: 8 // 只有普通摄像头,没有人脸、没有盒子、直连
};
// 盒子 Tab 切换
export var BOX_TYPE_LIST = [{
value: '1',
label: '盒子'
}, {
value: '2',
label: '盒子组'
}];
export var ALL_LIST = [{
value: '',
label: '全部'
}];

View File

View File

@ -1,40 +0,0 @@
import React from 'react';
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;
activeTab?: TAB_TYPE;
attributeList: {
title: string;
children: Pick<DescriptionsProps, 'items'>;
};
tabs: {
data: Pick<TabsProps, 'items'> & {
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;
}
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;

View File

@ -1,250 +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/BigImageModal/BigImageModal.tsx
var BigImageModal_exports = {};
__export(BigImageModal_exports, {
componentPrefix: () => componentPrefix,
default: () => BigImageModal_default
});
module.exports = __toCommonJS(BigImageModal_exports);
var import_react = __toESM(require("react"));
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 import_CombineImage = __toESM(require("./components/CombineImage"));
var DescriptionsItem = import_meta.Descriptions.Item;
var componentPrefix = "zhst-image";
var initialStyle = {
fontSize: "12px"
};
var BigImageModal = (0, import_react.forwardRef)((props, ref) => {
var _a;
const {
// 配置
title = "-",
open,
children,
activeTab,
attributeList = [],
isRelated = false,
tabs = {},
footer = null,
showCarousel = true,
// 数据
dataSource = [],
// 总数据源,只允许有一份
imageData = [],
relatedData = [],
// 事件
onIndexChange,
onTabChange,
transformPropFunc
} = props;
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_meta.Modal,
{
destroyOnClose: true,
open,
ref: modalRef,
footer,
className: componentPrefix,
title,
...props
},
/* @__PURE__ */ import_react.default.createElement(
"div",
{
style: {
marginTop: "16px"
}
},
/* @__PURE__ */ import_react.default.createElement(
import_meta.ConfigProvider,
{
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)"
}
}
}
},
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`)
},
/* @__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 = {
componentPrefix
});

View File

@ -1,11 +0,0 @@
import { FC } from 'react';
interface ComBineImageProps {
data: {
imgSummary: string;
compaterImages: string[];
imageKey: string;
score: number;
};
}
declare const ComBineImage: FC<ComBineImageProps>;
export default ComBineImage;

View File

@ -1,71 +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/BigImageModal/components/CombineImage/index.tsx
var CombineImage_exports = {};
__export(CombineImage_exports, {
default: () => CombineImage_default
});
module.exports = __toCommonJS(CombineImage_exports);
var import_react = __toESM(require("react"));
var import_meta = require("@zhst/meta");
var ComBineImage = (0, import_react.forwardRef)((props, ref) => {
const { data } = props;
const { imgSummary, compaterImages = [] } = data;
const targetImageRef = (0, import_react.useRef)(null);
const compareImageRef = (0, import_react.useRef)(null);
const [targetIndex, setTargetIndex] = (0, import_react.useState)(compaterImages.findIndex((_url) => imgSummary === _url) || 0);
(0, import_react.useImperativeHandle)(ref, () => ({
compareImageRef,
targetImageRef
}));
return /* @__PURE__ */ import_react.default.createElement(import_meta.Flex, { justify: "space-evenly", align: "center", style: { padding: "0 32px" } }, /* @__PURE__ */ import_react.default.createElement(
import_meta.CompareImage,
{
ref: targetImageRef,
preDisable: targetIndex === 0,
nextDisable: targetIndex >= compaterImages.length - 1,
onNext: () => setTargetIndex(targetIndex + 1),
onPre: () => setTargetIndex(targetIndex - 1),
showScore: false,
openRoll: !!compaterImages.length,
url: compaterImages[targetIndex] || imgSummary,
label: "目标图"
}
), /* @__PURE__ */ import_react.default.createElement(import_meta.Score, { score: data.score }), /* @__PURE__ */ import_react.default.createElement(
import_meta.CompareImage,
{
ref: compareImageRef,
url: data.imageKey,
openRoll: false,
score: data.score,
label: "对比图"
}
));
});
var CombineImage_default = ComBineImage;

View File

@ -1,13 +0,0 @@
import * as React from 'react';
import './index.less';
declare const Navigation: React.FC<{
show?: boolean;
onClick?: React.MouseEventHandler<HTMLElement>;
prev?: boolean;
next?: boolean;
disabled?: boolean;
className?: string;
color?: string;
hoverColor?: string;
}>;
export default Navigation;

View File

@ -1,57 +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/BigImageModal/components/navigation/index.tsx
var navigation_exports = {};
__export(navigation_exports, {
default: () => navigation_default
});
module.exports = __toCommonJS(navigation_exports);
var React = __toESM(require("react"));
var import_classnames = __toESM(require("classnames"));
var import_meta = require("@zhst/meta");
var import_index = require("./index.less");
var componentName = `zhst-image__nav`;
var Navigation = (props) => {
const { show, prev, next, disabled, onClick, className, color } = props;
return /* @__PURE__ */ React.createElement(
"div",
{
className: (0, import_classnames.default)(
`${componentName}`,
prev && `${componentName}-prev`,
next && `${componentName}-next`,
disabled && `${componentName}--disable`,
!show && `${componentName}--hide`,
className
)
},
/* @__PURE__ */ React.createElement(import_meta.Button, { type: "text", disabled, onClick }, /* @__PURE__ */ React.createElement(import_meta.Icon, { size: 28, color, icon: prev ? "icon-qiehuanzuo" : "icon-qiehuanyou" }))
);
};
var navigation_default = Navigation;

View File

@ -1,44 +0,0 @@
.zhst-image__nav {
position: absolute;
display: flex;
width: 48px;
height: 100%;
flex-shrink: 0;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 0;
&>button {
& span {
display: flex;
}
}
:global {
i:hover {
color: #f0f0f0 !important;
}
}
&--disable {
:global {
i {
color: #f0f0f0;
cursor: not-allowed !important;
}
}
}
&--hide {
display: none;
}
&-prev {
left: 20px;
}
&-next {
right: 20px;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 B

View File

@ -1,3 +0,0 @@
import BigImageModal from "./BigImageModal";
export type { BigImageModalProps } from './BigImageModal';
export default BigImageModal;

View File

@ -1,36 +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/BigImageModal/index.tsx
var BigImageModal_exports = {};
__export(BigImageModal_exports, {
default: () => BigImageModal_default
});
module.exports = __toCommonJS(BigImageModal_exports);
var import_BigImageModal = __toESM(require("./BigImageModal"));
var BigImageModal_default = import_BigImageModal.default;

View File

@ -1,514 +0,0 @@
.zhst-image {
.zhst-dialog-content {
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%;
margin-bottom: 16px;
&__nav {
position: absolute;
z-index: 99;
top: 50%;
width: 40px !important;
height: 40px !important;
background: #d9d9d9;
border-radius: 100%;
cursor: pointer;
transform: translateY(-50%);
&>button {
display: flex;
align-items: center;
color: #fff !important;
}
&--disabled {
opacity: 0.3;
&>button {
color: #fff !important;
}
}
}
&__nav:hover {
background: #09f;
color: #fff !important;
}
}
&-tool-container {
width: 100%;
height: 40px;
margin-bottom: 16px;
}
&__face-score {
position: absolute;
right: 90px;
bottom: 80px;
color: red;
font-family: 'Microsoft YaHei';
font-size: 19px;
font-weight: bold;
}
&-carousel-container {
position: relative;
width: 100%;
height: 100px;
margin-top: 16px;
margin-bottom: 24px;
}
}
.zhst-image__tool {
display: flex;
width: 100%;
align-items: center;
font-size: 14px;
&-split {
width: 0;
height: 14px;
&::before {
display: block;
height: 100%;
border-left: 1px solid #e6e7eb;
content: '';
}
}
&-zoom {
display: inline-flex;
align-items: center;
&> :not(:last-child) {
margin-right: 14px;
}
&__scale {
display: inline-block;
width: 38px;
height: 14px;
// margin-left: 15px;
box-sizing: content-box;
border: 1px solid rgb(77 77 77 / 100%);
margin-top: 2px; //对齐
background: rgb(255 255 255 / 100%);
border-radius: 2px;
color: #4d4d4d;
cursor: default;
font-size: 12px;
line-height: 14px;
text-align: center;
}
}
&-switch {
display: flex;
width: 30px;
flex-shrink: 0;
align-items: center;
justify-content: center;
margin: 0 26px;
}
&-left {
display: flex;
flex: 1;
align-items: center;
justify-content: flex-end;
&> :not(:last-child) {
margin-right: 14px;
}
}
&-right {
display: flex;
flex: 1;
align-items: center;
justify-content: flex-start;
&> :not(:first-child) {
margin-left: 20px;
}
}
&-icon-container {
font-size: 14px;
&--active {
color: #5584ff !important;
}
&> :first-child {
margin-right: 2px;
}
}
}
.zhst-image__carousel {
position: relative;
display: flex;
width: 742px;
height: 100px;
align-items: center;
justify-content: center;
border: 1px solid #f0f0f0;
margin: 0 auto;
background: #fafafa;
border-radius: 2px;
user-select: none;
&-container {
width: (58px + 8px) * 10;
}
&-item {
display: flex;
width: 58px + 8px;
align-items: center;
justify-content: center;
}
&-item-img {
/* 尝试消除transform 副作用 */
position: relative;
z-index: 99;
// width: 58px;
// height: 76px;
display: flex;
width: 66px;
height: 84px;
box-sizing: border-box;
align-items: center;
justify-content: center;
background: #fafafa;
cursor: pointer;
/* 尝试消除transform 副作用 end */
&--active {
border: 2px solid #09f;
border-radius: 1px;
}
&>div {
/* 尝试消除transform 副作用 */
position: relative;
z-index: 99;
overflow: hidden;
width: 58px;
height: 76px;
/* 尝试消除transform 副作用 end */
&>img {
width: 58px;
height: 76px;
object-fit: contain;
transition: all 0.2s;
&:hover {
transform: scale(1.5);
}
}
}
}
}
.zhst-image__trackmodel {
&__panel {
position: relative;
z-index: 99;
top: 0;
right: 0;
width: 320px;
height: 100%;
background-color: #fff;
&--head {
width: 100%;
height: 40px;
padding: 0 16px;
border-bottom: 1px solid #f0f0f0;
color: #333;
font-size: 14px;
font-weight: bold;
line-height: 40px;
text-align: left;
}
&--track {
height: calc(100% - 40px);
}
&-date {
padding: 10px 6px;
// position: absolute;
}
}
&--bigImage {
position: absolute;
z-index: 100;
top: 0;
left: 0;
display: flex;
width: 100%;
height: 100%;
justify-content: center;
padding-top: 59px;
background: rgb(0 0 0 / 40%);
&--image {
width: 946px;
height: 532px;
&>img {
width: 946px;
height: 532px;
object-fit: contain;
}
}
&--close {
margin-left: 16px;
color: #fff;
}
}
&__flooter {
position: absolute;
z-index: 999;
bottom: -124px;
left: 0;
width: calc(100% - 320px - 10px);
height: 144px;
background: #fff;
box-shadow: 0 0 8px 0 rgb(172 172 172 / 50%);
&--head {
display: flex;
height: 20px;
align-items: center;
justify-content: center;
background: #f6f6f6;
color: #999;
line-height: 16px;
}
&--body {
display: flex;
height: calc(100% - 20px);
padding-left: 50px;
&__title {
color: #333;
font-size: 12px;
font-weight: bold;
line-height: 16px;
}
&__text {
overflow: hidden;
color: #333;
font-size: 12px;
line-height: 16px;
text-overflow: ellipsis;
white-space: nowrap;
}
&--left {
display: flex;
width: 75px;
height: 100;
align-items: center;
&>img {
width: 75px;
height: 100px;
object-fit: contain;
}
}
&--middle {
display: grid;
width: 331px;
justify-content: flex-start;
padding: 8px 20px;
border-right: 1px solid #f0f0f0;
&>div {
display: flex;
}
}
&--right {
display: grid;
width: calc(100% - 331px - 75px);
padding: 8px 20px;
&>div {
display: flex;
}
&__button-list {
display: flex;
align-items: center;
&>button {
margin-right: 20px;
&>span {
color: #09f !important;
}
&:hover {
&>span {
color: #247fdb !important;
}
}
}
}
}
}
@keyframes close {
from {
bottom: 0;
}
to {
bottom: -124px;
}
}
@keyframes open {
from {
bottom: -124px;
}
to {
bottom: 0;
}
}
&--close {
bottom: -124px;
animation-duration: 1s;
animation-name: close;
}
&--open {
bottom: 0;
animation-duration: 1s;
animation-name: open;
}
}
}
.zhst-image__attributePanel {
margin: 0 66px;
background: #f6f6f6;
margin-top: 20px;
padding-top: 16px;
display: flex;
justify-content: center;
&>div:first-child {
width: fit-content;
display: flex;
flex-direction: column;
}
&-title {
color: rgb(0 0 0 / 88%);
font-weight: bold;
padding-bottom: 12px;
}
&-item {
display: flex;
}
&-label {
color: rgb(0 0 0 / 45%);
}
&-value {
color: rgb(0 0 0 / 88%);
}
}
.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;
}
.disabled {
color: rgba(0, 0, 0, 25%);
}
.relatedBtn {
flex: 1;
font-size: 14px;
color: #333;
display: flex;
align-items: flex-end;
cursor: pointer;
&:hover {
color: #09f;
}
}
}
:global {
.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;
}
}
}

View File

@ -1,245 +0,0 @@
export declare const IMAGE_DATA: {
enAbleDeleteFeature: boolean;
tabsFilter: 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;
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[];
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;
};
export declare const BIG_IMAGE_DATA: ({
imageKey: string;
imgSummary: string;
flvUrl: string;
compaterImages: string[];
odRect: {
x: number;
y: number;
w: number;
h: number;
};
attachImg: {
url: string;
label: string;
}[];
score: string;
showScore: boolean;
cameraPosition: string;
time: string;
objects: {
objectIndex: {
objectId: string;
solutionId: string;
deviceId: string;
fragmentId: string;
};
objectType: string;
sourceObjectId: string;
level: number;
confidence: number;
frameInfo: {
frameId: string;
frameTimestamp: string;
width: number;
height: number;
originWidth: number;
originHeight: number;
offsetTime: string;
skipNumber: string;
};
infoOnSource: {
bboxInFrame: {
bboxRatio: {
x: number;
y: number;
w: number;
h: number;
};
};
countInSource: number;
indexInSource: number;
};
qualityScore: number;
}[];
} | {
imageKey: string;
imgSummary: string;
odRect: {
x: number;
y: number;
w: number;
h: number;
};
attachImg: {
url: string;
label: string;
}[];
flvUrl: string;
score: number;
showScore: boolean;
cameraPosition: string;
time: string;
objects: ({
objectIndex: {
objectId: string;
solutionId: string;
deviceId: string;
fragmentId: string;
};
objectType: string;
sourceObjectId: string;
frameInfo: {
frameId: string;
frameTimestamp: string;
width: number;
height: number;
originWidth: number;
originHeight: number;
offsetTime: string;
skipNumber: string;
};
infoOnSource: {
bboxInFrame: {
bboxRatio: {
x: number;
y: number;
w: number;
h: number;
};
};
countInSource: number;
indexInSource: number;
};
qualityScore: number;
level?: undefined;
confidence?: undefined;
} | {
objectIndex: {
objectId: string;
solutionId: string;
deviceId: string;
fragmentId: string;
};
objectType: string;
sourceObjectId: string;
level: number;
confidence: number;
frameInfo: {
frameId: string;
frameTimestamp: string;
width: number;
height: number;
originWidth: number;
originHeight: number;
offsetTime: string;
skipNumber: string;
};
infoOnSource: {
bboxInFrame: {
bboxRatio: {
x: number;
y: number;
w: number;
h: number;
};
};
countInSource: number;
indexInSource: number;
};
qualityScore: number;
})[];
compaterImages?: undefined;
})[];
export declare const attributeList: {
title: string;
children: {
key: string;
label: string;
children: string;
}[];
}[];

View File

@ -1,567 +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/BigImageModal/mock.ts
var mock_exports = {};
__export(mock_exports, {
BIG_IMAGE_DATA: () => BIG_IMAGE_DATA,
IMAGE_DATA: () => IMAGE_DATA,
attributeList: () => attributeList
});
module.exports = __toCommonJS(mock_exports);
var IMAGE_DATA = {
"enAbleDeleteFeature": true,
"tabsFilter": [
"COMPATER",
"NORMAL"
],
"selectIndex": 4,
"disableBtn": [
0,
1,
4,
20
],
"dataSource": [
{
"objectId": "1742110565582518272",
"condition": {
"featureInfo": null,
"featureData": "AAAAAAAAAAAAAAAAAAAAAAA==",
"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",
"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"
],
"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": "1742092680994764802",
"condition": {
"featureInfo": null,
"featureData": "AAAAAAAAAAAAAAAAAAAAAAAAA==",
"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.7007122,
"timestamp": 1704182225679,
"deviceId": "129533",
"id": "129533",
"name": "4楼门口过道人脸",
"dirid": "0",
"status": "1",
"longitude": 120.125,
"latitude": 30.280500411987305,
"caseId": "0",
"caseGroup": "",
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
"objectIndex": {
"objectId": "1742092680994764802",
"solutionId": "1",
"deviceId": "129533",
"fragmentId": "0"
},
"objectType": "OBJECT_TYPE_PEDESTRAIN",
"isObjectTrack": true,
"pathId": "1742092646219790337",
"frameInfo": {
"frameId": "0",
"frameTimestamp": "1704182225679",
"width": 0,
"height": 0,
"originWidth": 1920,
"originHeight": 1080,
"offsetTime": "20448387",
"skipNumber": "0"
},
"level": 1,
"bboxInFrame": {
"x": 0.5265625,
"y": 0.49537036,
"w": 0.104166664,
"h": 0.35833332
},
"bboxExtInFrame": {
"x": 0.465625,
"y": 0.40648147,
"w": 0.22708334,
"h": 0.537963
},
"objectImageKey": "",
"objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092680994764802.jpg",
"frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092681720379392.jpg",
"confidence": 0.769764,
"sourceObjectId": "1742092681720379392",
"storeTimestamp": "0",
"gbNumber": "",
"qualityScore": 0,
"subObjectCount": 0,
"subObjectType": [],
"subObjectIds": [],
"solutionId": "1",
"fragmentId": "0",
"contrastKey": "singer-20240102/1/129533/1742092680994764802.jpg",
"compaterImages": [
"http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"
],
"imgSummary": "singer-20240102/1/129533/1742092680994764802.jpg",
"imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092680994764802.jpg",
"srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092681720379392.jpg",
"algorithmVersion": "VERSION_REID_HEAD_ATTR",
"cameraId": "129533",
"cameraName": "4楼门口过道人脸"
},
{
"objectId": "1742092514409592832",
"condition": {
"featureInfo": null,
"featureData": "AAAAAAAAAAAAAAAAAAAAAAAA==",
"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",
"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"
],
"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入口人脸"
}
],
"isArchiveDetail": false,
"ToolProps": {
"renderVideoBtn": true,
"disableVideo": false
},
"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 = {
BIG_IMAGE_DATA,
IMAGE_DATA,
attributeList
});

View File

@ -1,118 +0,0 @@
/**
*
*/
import React from 'react';
import { AlgorithmVersionStr, HumanProperty, ObjectType, Rect } from '@zhst/types';
import { VideoViewProps, ImgViewProps, VideoViewRef, ImgViewRef } from '@zhst/meta';
export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'TRACK';
export type MODEL_TYPE = 'VIDEO' | 'IMAGE';
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'>>;
/**
* description
*/
export interface HeaderProps {
value: TAB_TYPE;
onChange: (type: TAB_TYPE) => void;
tabsFilter: TAB_TYPE[];
}
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 ToolProps {
renderRight?: (props: ParamProps) => React.ReactNode;
renderLeft?: (props: ParamProps) => React.ReactNode;
renderVideoBtn?: boolean;
param: ParamProps;
disableVideo: boolean;
}
export interface BigImageData {
extendRectList: (Rect & {
algorithmVersion: AlgorithmVersionStr;
imageKey: string;
})[];
rectList: (Rect & {
algorithmVersion: AlgorithmVersionStr;
imageKey: string;
})[];
attachImg: {
url: string;
label: '形体' | '人脸';
}[];
odRect: Rect;
compaterImages: string[];
constractKey: string;
frameImageKey: string;
imageKey?: string;
imgSummary: string;
objectExtImageKey: string;
attributeList: {
label: string;
list: any[];
}[];
archiveImages?: any;
spaceName: string;
objectIndex?: {
deviceId: string;
fragmentId: string;
objectId: string;
solutionId: 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;
position: {
lat: number;
lng: number;
};
solutionId?: string;
[index: string]: any;
}
export interface ImageModalDataProps {
targetData: BigImageData[];
compactData: BigImageData[];
}
export interface ModalAdapterConfigProps {
oldMode?: boolean;
}
/**
*
* @param Cmp
* @param config
* @returns
*/
declare const adapter: (Cmp: any, config: ModalAdapterConfigProps) => any;
export default adapter;

View File

@ -1,57 +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/BigImageModal/util/bigImageModalAdapter.tsx
var bigImageModalAdapter_exports = {};
__export(bigImageModalAdapter_exports, {
default: () => bigImageModalAdapter_default
});
module.exports = __toCommonJS(bigImageModalAdapter_exports);
var import_react = __toESM(require("react"));
var translateOldImageData = (_data) => {
return {
..._data,
open: _data.visible,
onCancel: _data.onClose
};
};
var adapter = (Cmp, config) => {
const { oldMode = false } = config;
return (props) => {
const newProps = oldMode ? translateOldImageData(props) : props;
console.log("adapter----适配数据", props, newProps);
delete newProps.visible;
return /* @__PURE__ */ import_react.default.createElement(
Cmp,
{
...newProps
}
);
};
};
var bigImageModalAdapter_default = adapter;

View File

@ -1,3 +0,0 @@
import React from 'react';
declare const _default: () => React.JSX.Element;
export default _default;

View File

@ -1,41 +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/Demo/index.tsx
var Demo_exports = {};
__export(Demo_exports, {
default: () => Demo_default
});
module.exports = __toCommonJS(Demo_exports);
var import_react = __toESM(require("react"));
var import_meta = require("@zhst/meta");
var import_hooks = require("@zhst/hooks");
var Demo_default = () => {
const { run } = (0, import_hooks.useThrottleFn)(() => console.log("123"));
return /* @__PURE__ */ import_react.default.createElement(import_meta.Button, { onClick: () => run() }, "测试");
};

View File

@ -1,21 +0,0 @@
import React from 'react';
import { IRecord, VideoPlayerCardProps, ViewLargerImageModalRef } from '@zhst/biz';
interface RealTimeMonitorProps {
videoDataSource?: VideoPlayerCardProps[];
handleWindowClick?: (key?: string) => void;
handleCloseButtonClick?: (key?: string) => void;
selectedWindowKey?: string;
warningDataSource?: IRecord[];
viewLargerImageModalRef?: React.RefObject<ViewLargerImageModalRef>;
handleDownloadImg?: (imgSrc?: string) => void;
onRecordClick?: (record?: IRecord) => void;
selectedRecordId?: string;
isRecordListLoading?: boolean;
recordListTitle?: string;
style?: React.CSSProperties;
cardStyle?: React.CSSProperties;
imgStyle?: React.CSSProperties;
largeImageTitle?: string;
}
export declare const RealTimeMonitor: React.FC<RealTimeMonitorProps>;
export default RealTimeMonitor;

View File

@ -1,77 +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/RealTimeMonitor/RealTimeMonitor.tsx
var RealTimeMonitor_exports = {};
__export(RealTimeMonitor_exports, {
RealTimeMonitor: () => RealTimeMonitor,
default: () => RealTimeMonitor_default
});
module.exports = __toCommonJS(RealTimeMonitor_exports);
var import_react = __toESM(require("react"));
var import_WindowToggle = __toESM(require("./components/WindowToggle"));
var import_WarningRecordList = __toESM(require("./components/WarningRecordList"));
var RealTimeMonitor = (props) => {
const {
videoDataSource,
handleWindowClick,
handleCloseButtonClick,
selectedWindowKey,
warningDataSource,
viewLargerImageModalRef,
handleDownloadImg,
onRecordClick,
selectedRecordId,
isRecordListLoading
} = props;
return /* @__PURE__ */ import_react.default.createElement("div", { className: "zhst-biz-real-time-monitor", style: { display: "flex" } }, /* @__PURE__ */ import_react.default.createElement(
import_WindowToggle.default,
{
selectedWindowKey,
dataSource: videoDataSource,
handleWindowClick,
handleCloseButtonClick
}
), /* @__PURE__ */ import_react.default.createElement(
import_WarningRecordList.default,
{
dataSource: warningDataSource,
handleDownloadImg,
onRecordClick,
selectedRecordId,
viewLargerImageModalRef,
isRecordListLoading,
recordListTitle: "监控预警记录"
}
));
};
var RealTimeMonitor_default = RealTimeMonitor;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
RealTimeMonitor
});

View File

@ -1,18 +0,0 @@
import React from 'react';
import { IRecord, ViewLargerImageModalRef } from '@zhst/biz';
import "./index.less";
interface WarningRecordListProps {
dataSource?: IRecord[];
viewLargerImageModalRef?: React.RefObject<ViewLargerImageModalRef>;
handleDownloadImg?: (imgSrc?: string) => void;
onRecordClick?: (record?: IRecord) => void;
selectedRecordId?: string;
isRecordListLoading?: boolean;
recordListTitle?: string;
style?: React.CSSProperties;
cardStyle?: React.CSSProperties;
imgStyle?: React.CSSProperties;
largeImageTitle?: string;
}
declare const WarningRecordList: React.FC<WarningRecordListProps>;
export default WarningRecordList;

View File

@ -1,74 +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/RealTimeMonitor/components/WarningRecordList/WarningRecordList.tsx
var WarningRecordList_exports = {};
__export(WarningRecordList_exports, {
default: () => WarningRecordList_default
});
module.exports = __toCommonJS(WarningRecordList_exports);
var import_react = __toESM(require("react"));
var import_biz = require("@zhst/biz");
var import_antd = require("antd");
var import_index = require("./index.less");
var import_icons = require("@ant-design/icons");
var WarningRecordList = (props) => {
const {
dataSource = [],
viewLargerImageModalRef,
selectedRecordId,
handleDownloadImg,
onRecordClick,
isRecordListLoading,
recordListTitle,
style,
cardStyle,
imgStyle,
largeImageTitle
} = props;
return /* @__PURE__ */ import_react.default.createElement("div", { className: "zhst-biz-warning-record-list", style }, /* @__PURE__ */ import_react.default.createElement("div", { className: "header" }, recordListTitle), /* @__PURE__ */ import_react.default.createElement("div", { className: "body" }, isRecordListLoading ? /* @__PURE__ */ import_react.default.createElement("div", { style: { height: "100%", display: "flex", justifyContent: "center", alignItems: "center" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { indicator: /* @__PURE__ */ import_react.default.createElement(import_icons.LoadingOutlined, { style: { fontSize: 24 } }) })) : (dataSource == null ? void 0 : dataSource.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { direction: "vertical", size: 10 }, dataSource == null ? void 0 : dataSource.map(
(record, index) => {
if (index > 2)
return;
return /* @__PURE__ */ import_react.default.createElement(
import_biz.WarningRecordCard,
{
key: record == null ? void 0 : record.id,
record,
onRecordClick: (record2) => {
onRecordClick == null ? void 0 : onRecordClick(record2);
},
selectedRecordId,
cardStyle: { width: 300, height: 264, ...cardStyle },
imgStyle: { width: 280, height: 169, ...imgStyle }
}
);
}
)) : /* @__PURE__ */ import_react.default.createElement("div", { style: { height: "100%", display: "flex", justifyContent: "center", alignItems: "center" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Empty, { description: "暂无数据" }))), /* @__PURE__ */ import_react.default.createElement(import_biz.ViewLargerImageModal, { ref: viewLargerImageModalRef, downloadImg: handleDownloadImg, title: largeImageTitle }));
};
var WarningRecordList_default = WarningRecordList;

View File

@ -1,2 +0,0 @@
import WarningRecordList from './WarningRecordList';
export default WarningRecordList;

View File

@ -1,36 +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/RealTimeMonitor/components/WarningRecordList/index.tsx
var WarningRecordList_exports = {};
__export(WarningRecordList_exports, {
default: () => WarningRecordList_default
});
module.exports = __toCommonJS(WarningRecordList_exports);
var import_WarningRecordList = __toESM(require("./WarningRecordList"));
var WarningRecordList_default = import_WarningRecordList.default;

View File

@ -1,20 +0,0 @@
.zhst-biz-warning-record-list {
display: flex;
flex-direction: column;
border-left: solid 1px #00000026;
width: 320px;
.header {
width: 100%;
height: 48px;
background-color: #EFF2F4;
padding: 10px 20px;
box-sizing: border-box;
}
.body {
padding: 10px;
overflow: hidden;
flex: 1;
}
}

Some files were not shown because too many files have changed in this diff Show More