feat(biz,meta,material): biz:新增 od 弹框、预警图片 od;meta:新增人脸碰撞模型组件、扫描组件、termial 组件;material:新增中心连接物料
This commit is contained in:
parent
91315d4a9f
commit
26ba0f7922
@ -51,10 +51,7 @@
|
|||||||
"prettier --parser=typescript --write"
|
"prettier --parser=typescript --write"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {},
|
||||||
"xterm": "^5.3.0",
|
|
||||||
"xterm-addon-fit": "^0.8.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@changesets/cli": "^2.27.1",
|
"@changesets/cli": "^2.27.1",
|
||||||
"@commitlint/cli": "^17.1.2",
|
"@commitlint/cli": "^17.1.2",
|
||||||
|
@ -1,5 +1,18 @@
|
|||||||
# @zhst/biz
|
# @zhst/biz
|
||||||
|
|
||||||
|
## 0.14.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- biz:新增 od 弹框、预警图片 od;meta:新增人脸碰撞模型组件、扫描组件、termial 组件;material:新增中心连接物料
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies
|
||||||
|
- @zhst/meta@0.13.0
|
||||||
|
- @zhst/hooks@0.9.1
|
||||||
|
- @zhst/func@0.10.1
|
||||||
|
|
||||||
## 0.13.0
|
## 0.13.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@zhst/biz",
|
"name": "@zhst/biz",
|
||||||
"version": "0.13.0",
|
"version": "0.14.0",
|
||||||
"description": "业务库",
|
"description": "业务库",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"business",
|
"business",
|
||||||
|
@ -1,26 +1,47 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
import React, { forwardRef, useImperativeHandle, useRef, useState, useEffect } from 'react'
|
import React, { forwardRef, useImperativeHandle, useRef, useState, useEffect } from 'react'
|
||||||
import { ConfigProvider, Descriptions, Modal, Tabs, Button, BigImagePreview, VideoPlayer } from '@zhst/meta';
|
import {
|
||||||
|
ConfigProvider,
|
||||||
|
Descriptions,
|
||||||
|
Modal,
|
||||||
|
Tabs,
|
||||||
|
Button,
|
||||||
|
CropperImage,
|
||||||
|
AttachImage,
|
||||||
|
VideoPlayer,
|
||||||
|
BtnGroup,
|
||||||
|
RelatedImage
|
||||||
|
} from '@zhst/meta';
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
import type { ModalProps, DescriptionsProps, TabsProps, VideoViewRef, ImgViewRef } from '@zhst/meta'
|
import type {
|
||||||
import { get, isEmpty } from '@zhst/func';
|
ModalProps,
|
||||||
|
DescriptionsProps,
|
||||||
|
TabsProps,
|
||||||
import './index.less'
|
VideoViewRef,
|
||||||
|
ImgViewRef,
|
||||||
|
CompareImageProps,
|
||||||
|
CropperImageProps,
|
||||||
|
AttachImageProps,
|
||||||
|
BtnGroupProps,
|
||||||
|
ThemeConfig,
|
||||||
|
RelatedImageProps
|
||||||
|
} from '@zhst/meta'
|
||||||
|
import { get, isEmpty, pick } from '@zhst/func';
|
||||||
import Navigation from './components/navigation';
|
import Navigation from './components/navigation';
|
||||||
import CombineImage from './components/CombineImage'
|
import CombineImage from './components/CombineImage'
|
||||||
import { BIG_IMAGE_DATA } from './mock'
|
import './index.less'
|
||||||
|
|
||||||
const DescriptionsItem = Descriptions.Item
|
const DescriptionsItem = Descriptions.Item
|
||||||
|
|
||||||
export const componentPrefix = 'zhst-image'
|
export const componentPrefix = 'zhst-image'
|
||||||
|
|
||||||
export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'VIDEO';
|
export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'VIDEO'; // 对比图模式、场景图模式、视频模式
|
||||||
export type MODEL_TYPE = 'VIDEO' | 'IMAGE';
|
export type MODEL_TYPE = 'VIDEO' | 'IMAGE';
|
||||||
|
|
||||||
export interface BigImageModalProps extends ModalProps {
|
export interface BigImageModalProps {
|
||||||
visible: boolean // 弹框显示隐藏
|
visible: boolean // 弹框显示隐藏
|
||||||
activeTab?: TAB_TYPE // 当前 tab
|
activeTab?: TAB_TYPE // 当前 tab
|
||||||
|
width?: number | string
|
||||||
attributeList: {
|
attributeList: {
|
||||||
title: string;
|
title: string;
|
||||||
children: Pick<DescriptionsProps, 'items'>
|
children: Pick<DescriptionsProps, 'items'>
|
||||||
@ -30,18 +51,33 @@ export interface BigImageModalProps extends ModalProps {
|
|||||||
key: TAB_TYPE // !! TRACK 模式已废弃、新增:VIDEO 模式
|
key: TAB_TYPE // !! TRACK 模式已废弃、新增:VIDEO 模式
|
||||||
} // 导航栏列表
|
} // 导航栏列表
|
||||||
}
|
}
|
||||||
|
tabsProps?: TabsProps // tab菜单的透传
|
||||||
dataSource: any
|
dataSource: any
|
||||||
imageData: any
|
onCancel?: () => void
|
||||||
|
|
||||||
relatedData: any
|
isRelated?: boolean // 人脸碰撞功能打开
|
||||||
isRelated?: boolean
|
|
||||||
|
|
||||||
footer?: React.ReactNode
|
footer?: React.ReactNode
|
||||||
showCarousel?: boolean
|
|
||||||
|
|
||||||
onTabChange?: (newVal?: TAB_TYPE, oldVal?: TAB_TYPE) => void
|
onTabChange?: (newVal?: TAB_TYPE, oldVal?: TAB_TYPE) => void
|
||||||
onIndexChange?: (newVal?: number, oldVal?: number) => void
|
|
||||||
transformPropFunc: (data: any) => void // 格式化数据方法
|
compareImageProps?: CompareImageProps
|
||||||
|
modalProps?: ModalProps
|
||||||
|
cropperImageProps?: CropperImageProps & {
|
||||||
|
showEditTools?: boolean
|
||||||
|
}
|
||||||
|
showNavigation?: boolean // 是否展示箭头
|
||||||
|
prevButtonProps?: any;
|
||||||
|
onPrevButtonClick?: () => void;
|
||||||
|
nextButtonProps?: any
|
||||||
|
onNextButtonClick?: () => void;
|
||||||
|
btnGroupProps?: BtnGroupProps;
|
||||||
|
|
||||||
|
descriptionsProps?: DescriptionsProps
|
||||||
|
relatedImageProps?: RelatedImageProps
|
||||||
|
|
||||||
|
theme?: ThemeConfig
|
||||||
|
children?: React.ReactNode
|
||||||
}
|
}
|
||||||
|
|
||||||
interface BigModalRef {
|
interface BigModalRef {
|
||||||
@ -52,7 +88,6 @@ interface BigModalRef {
|
|||||||
setActiveKey: (val: string) => void
|
setActiveKey: (val: string) => void
|
||||||
videoPlayerRef: VideoViewRef
|
videoPlayerRef: VideoViewRef
|
||||||
combineImageRef: any
|
combineImageRef: any
|
||||||
bigImagePreviewRef: ImgViewRef
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const initialStyle ={
|
const initialStyle ={
|
||||||
@ -63,79 +98,135 @@ const BigImageModal: React.FC<BigImageModalProps, BigModalRef> = forwardRef((pro
|
|||||||
const {
|
const {
|
||||||
// 配置
|
// 配置
|
||||||
title = '-',
|
title = '-',
|
||||||
|
width,
|
||||||
open,
|
open,
|
||||||
children,
|
children,
|
||||||
|
onCancel,
|
||||||
activeTab,
|
activeTab,
|
||||||
attributeList = [],
|
attributeList = [],
|
||||||
isRelated = false,
|
isRelated = false,
|
||||||
tabs = {},
|
tabs = {},
|
||||||
footer = null,
|
footer = null,
|
||||||
showCarousel = true,
|
|
||||||
// 数据
|
// 数据
|
||||||
dataSource = [], // 总数据源,只允许有一份
|
dataSource = {}, // 总数据源,只允许有一份
|
||||||
imageData = [],
|
|
||||||
relatedData = [],
|
|
||||||
// 事件
|
// 事件
|
||||||
onIndexChange,
|
|
||||||
onTabChange,
|
onTabChange,
|
||||||
transformPropFunc
|
compareImageProps,
|
||||||
|
showNavigation,
|
||||||
|
modalProps,
|
||||||
|
cropperImageProps,
|
||||||
|
prevButtonProps,
|
||||||
|
onPrevButtonClick,
|
||||||
|
onNextButtonClick,
|
||||||
|
nextButtonProps,
|
||||||
|
tabsProps,
|
||||||
|
btnGroupProps,
|
||||||
|
descriptionsProps,
|
||||||
|
relatedImageProps,
|
||||||
|
theme,
|
||||||
} = props
|
} = props
|
||||||
|
|
||||||
const combineImageRef = useRef(null)
|
const combineImageRef = useRef(null)
|
||||||
const bigImagePreviewRef = useRef(null)
|
|
||||||
const videoPlayerRef = useRef(null)
|
const videoPlayerRef = useRef(null)
|
||||||
const modalRef = useRef(null)
|
const modalRef = useRef(null)
|
||||||
|
|
||||||
// ========================== 头切换 =========================
|
// ========================== 头切换 =========================
|
||||||
const [tab, setTab] = useState<TAB_TYPE>(activeTab || get(tabsConfig, 'data[0].key'));
|
const [tab, setTab] = useState<TAB_TYPE>(activeTab || get(tabsProps, 'data[0].key'));
|
||||||
const [activeKey, setActiveKey] = useState<string>('related');
|
const [activeKey, setActiveKey] = useState<string>('related');
|
||||||
|
|
||||||
// ========================= 预览切换下标 =========================
|
// ========================= 预览切换下标 =========================
|
||||||
const [currentIndex, setCurrentIndex] = useState<number>(0)
|
const [cropType, setCropType] = useState<'auto' | 'custom' | 'close'>('auto')
|
||||||
|
const cropBtnDataSource = [
|
||||||
|
{
|
||||||
|
key: 'close',
|
||||||
|
icon: 'icon-danchuangguanbi',
|
||||||
|
title: '退出',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'auto',
|
||||||
|
icon: 'icon-zidong',
|
||||||
|
title: '智能框选',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'custom',
|
||||||
|
icon: 'icon-shoudong',
|
||||||
|
title: '手动框选',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
const tabsConfig = !isEmpty(tabs) ? tabs : {
|
const handleCropBtnClick = (v: string) => {
|
||||||
data: [
|
setCropType(v)
|
||||||
{
|
}
|
||||||
label: '对比图模式',
|
|
||||||
key: 'COMPATER',
|
const defaultTabsProps: TabsProps = !isEmpty(tabs) ? tabs : {
|
||||||
children: (
|
items: [
|
||||||
<CombineImage
|
{
|
||||||
ref={combineImageRef}
|
label: '对比图模式',
|
||||||
data={dataSource[currentIndex] || {}}
|
key: 'COMPATER',
|
||||||
/>
|
children: (
|
||||||
)
|
<CombineImage
|
||||||
},
|
ref={combineImageRef}
|
||||||
{
|
data={pick(dataSource, 'compaterImage', 'imgSummary', 'imageKey', 'score')}
|
||||||
label: '场景图模式',
|
{...compareImageProps}
|
||||||
key: 'NORMAL',
|
/>
|
||||||
children: (
|
)
|
||||||
<BigImagePreview
|
},
|
||||||
ref={bigImagePreviewRef}
|
{
|
||||||
height={'500px'}
|
label: '场景图模式',
|
||||||
data={dataSource[currentIndex]}
|
key: 'NORMAL',
|
||||||
/>
|
children: (
|
||||||
)
|
<div style={{ display: 'flex', justifyContent: 'center', width: '100%' }}>
|
||||||
}
|
<div style={{ width: '85%', height: '500px' }}>
|
||||||
]
|
<CropperImage
|
||||||
|
type='rect'
|
||||||
|
odList={get(dataSource, 'odRect', [])}
|
||||||
|
{...cropperImageProps}
|
||||||
|
>
|
||||||
|
{!cropperImageProps?.editAble && (
|
||||||
|
<>
|
||||||
|
<AttachImage
|
||||||
|
data={[
|
||||||
|
{ label: '测试', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' }
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
right: '24px',
|
||||||
|
bottom: '24px',
|
||||||
|
fontSize: '18px',
|
||||||
|
color: 'red',
|
||||||
|
cursor: 'default'
|
||||||
|
}}
|
||||||
|
>{`人脸质量分:${(Number(cropperImageProps?.score) as number).toFixed(2)}`}</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{cropperImageProps?.showEditTools && (
|
||||||
|
<BtnGroup
|
||||||
|
circle
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
top: 0,
|
||||||
|
right: 0
|
||||||
|
}}
|
||||||
|
dataSource={cropBtnDataSource}
|
||||||
|
onClick={handleCropBtnClick}
|
||||||
|
selectKey={cropType}
|
||||||
|
{...btnGroupProps}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</CropperImage>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: 页面初始化
|
// TODO: 页面初始化
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
(async () => {
|
}, [dataSource]);
|
||||||
let data: any = {};
|
|
||||||
// if (isRelated) {
|
|
||||||
// data = await transformPropFunc(imageData[currentIndex]);
|
|
||||||
// } else {
|
|
||||||
// data = await transformPropFunc(dataSource[currentIndex]);
|
|
||||||
// }
|
|
||||||
// setAttributeList(get(data, 'attributeList', []));
|
|
||||||
//防背推
|
|
||||||
// if (currentIndex === latestSelectIndex.current) {
|
|
||||||
// setSelectItem(data);
|
|
||||||
// }
|
|
||||||
})();
|
|
||||||
}, [currentIndex, dataSource, imageData, isRelated]);
|
|
||||||
|
|
||||||
// 暴露 ref 实例
|
// 暴露 ref 实例
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
@ -147,18 +238,19 @@ const BigImageModal: React.FC<BigImageModalProps, BigModalRef> = forwardRef((pro
|
|||||||
setActiveKey,
|
setActiveKey,
|
||||||
videoPlayerRef,
|
videoPlayerRef,
|
||||||
combineImageRef,
|
combineImageRef,
|
||||||
bigImagePreviewRef,
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
|
width={width}
|
||||||
open={open}
|
open={open}
|
||||||
ref={modalRef}
|
ref={modalRef}
|
||||||
footer={footer}
|
footer={footer}
|
||||||
className={componentPrefix}
|
className={componentPrefix}
|
||||||
title={title}
|
title={title}
|
||||||
{...props}
|
onCancel={onCancel}
|
||||||
|
{...modalProps}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@ -179,6 +271,7 @@ const BigImageModal: React.FC<BigImageModalProps, BigModalRef> = forwardRef((pro
|
|||||||
contentColor: 'rgba(0,0,0,0.88)',
|
contentColor: 'rgba(0,0,0,0.88)',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
...theme
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{attributeList.map(descriptions => (
|
{attributeList.map(descriptions => (
|
||||||
@ -191,6 +284,7 @@ const BigImageModal: React.FC<BigImageModalProps, BigModalRef> = forwardRef((pro
|
|||||||
}
|
}
|
||||||
column={8}
|
column={8}
|
||||||
style={{ padding: '0 64px' }}
|
style={{ padding: '0 64px' }}
|
||||||
|
{...descriptionsProps}
|
||||||
>
|
>
|
||||||
{descriptions?.children?.map(item => (
|
{descriptions?.children?.map(item => (
|
||||||
<DescriptionsItem
|
<DescriptionsItem
|
||||||
@ -218,70 +312,49 @@ const BigImageModal: React.FC<BigImageModalProps, BigModalRef> = forwardRef((pro
|
|||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
tabBarStyle={{ fontSize: '18px', fontWeight:'bold' }}
|
tabBarStyle={{ fontSize: '18px', fontWeight:'bold' }}
|
||||||
items={tabsConfig.data}
|
{...defaultTabsProps}
|
||||||
{...tabsConfig}
|
{...tabsProps}
|
||||||
/>
|
/>
|
||||||
{/* --------------------------------- 视频播放模式 --------------------------------- */}
|
{/* --------------------------------- 视频播放模式 --------------------------------- */}
|
||||||
{tab === 'VIDEO' && (
|
{tab === 'VIDEO' && (
|
||||||
<VideoPlayer ref={videoPlayerRef} url={dataSource[currentIndex]?.flvUrl} />
|
<VideoPlayer ref={videoPlayerRef} url={dataSource?.flvUrl} />
|
||||||
)}
|
)}
|
||||||
{/* 切换按钮组件 */}
|
{/* 切换按钮组件 */}
|
||||||
{/* ----------------------------------- 上一张按钮 ---------------------------------- */}
|
{/* ----------------------------------- 上一张按钮 ---------------------------------- */}
|
||||||
<Navigation
|
<Navigation
|
||||||
className={classNames(
|
className={classNames(
|
||||||
`${componentPrefix}-view-container__nav`,
|
`${componentPrefix}-view-container__nav`,
|
||||||
currentIndex <= 0 && `${componentPrefix}-view-container__nav--disabled`,
|
prevButtonProps?.disabled && `${componentPrefix}-view-container__nav--disabled`,
|
||||||
`${componentPrefix}-view-container__nav--left`
|
`${componentPrefix}-view-container__nav--left`
|
||||||
)}
|
)}
|
||||||
show={isRelated ? (imageData.length > 1) : (dataSource.length > 1)}
|
|
||||||
disabled={currentIndex <= 0}
|
|
||||||
prev
|
prev
|
||||||
onClick={() => {
|
show={showNavigation}
|
||||||
setCurrentIndex((pre) => {
|
onClick={onPrevButtonClick}
|
||||||
onIndexChange?.(pre - 1, pre)
|
{...prevButtonProps}
|
||||||
return pre - 1
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
{/* ----------------------------------- 下一张按钮 ---------------------------------- */}
|
{/* ----------------------------------- 下一张按钮 ---------------------------------- */}
|
||||||
<Navigation
|
<Navigation
|
||||||
className={classNames(
|
className={classNames(
|
||||||
`${componentPrefix}-view-container__nav`,
|
`${componentPrefix}-view-container__nav`,
|
||||||
((currentIndex >= imageData.length - 1) || (currentIndex >= dataSource.length - 1)) && `${componentPrefix}-view-container__nav--disabled`,
|
nextButtonProps?.disabled && `${componentPrefix}-view-container__nav--disabled`,
|
||||||
`${componentPrefix}-view-container__nav--right`
|
`${componentPrefix}-view-container__nav--right`
|
||||||
)}
|
)}
|
||||||
show={isRelated ? (imageData.length > 1) : (dataSource.length > 1)}
|
|
||||||
disabled={((currentIndex >= imageData.length - 1) || (currentIndex >= dataSource.length - 1))}
|
|
||||||
next
|
next
|
||||||
onClick={async (e) => {
|
show={showNavigation}
|
||||||
setCurrentIndex((pre) => {
|
onClick={onNextButtonClick}
|
||||||
onIndexChange?.(pre + 1, pre)
|
{...nextButtonProps}
|
||||||
return pre + 1
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
{/* --------------------------------- 模型碰撞组件 --------------------------------- */}
|
{/* ----------------------------------- 人脸碰撞组件 ---------------------------------- */}
|
||||||
{/* {isRelated && (
|
{isRelated && (
|
||||||
<div className="relatedWrapper">
|
<div style={{ margin: '24px 0' }}>
|
||||||
<Tabs
|
<RelatedImage
|
||||||
className="relatedTabs"
|
{...relatedImageProps}
|
||||||
tabPosition={'left'}
|
|
||||||
activeKey={activeKey}
|
|
||||||
onChange={(key: string) => {
|
|
||||||
setActiveKey(key);
|
|
||||||
}}
|
|
||||||
items={tabList.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item.label,
|
|
||||||
key: item.key,
|
|
||||||
children: item.children,
|
|
||||||
};
|
|
||||||
})}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)} */}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{children}
|
||||||
</Modal>
|
</Modal>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
@ -1,22 +1,33 @@
|
|||||||
|
|
||||||
import React, { FC, useRef, forwardRef, useImperativeHandle, useState } from 'react';
|
import React, { FC, useRef, forwardRef, useImperativeHandle } from 'react';
|
||||||
import { CompareImage, Flex, Score } from '@zhst/meta'
|
import { CompareImage, Flex, Score } from '@zhst/meta'
|
||||||
|
|
||||||
interface ComBineImageProps {
|
interface ComBineImageProps {
|
||||||
data: {
|
data: {
|
||||||
imgSummary: string;
|
imgSummary: string;
|
||||||
compaterImages: string[];
|
compaterImage: string;
|
||||||
imageKey: string;
|
imageKey: string;
|
||||||
score: number;
|
score: number;
|
||||||
}
|
}
|
||||||
|
prevDisable?: boolean;
|
||||||
|
nextDisable?: boolean;
|
||||||
|
onPre?: () => void;
|
||||||
|
onNext?: () => void;
|
||||||
|
openRoll?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const ComBineImage: FC<ComBineImageProps> = forwardRef((props, ref) => {
|
const ComBineImage: FC<ComBineImageProps> = forwardRef((props, ref) => {
|
||||||
const { data } = props
|
const {
|
||||||
const { imgSummary, compaterImages = [] } = data
|
data,
|
||||||
|
prevDisable,
|
||||||
|
nextDisable,
|
||||||
|
onNext,
|
||||||
|
onPre,
|
||||||
|
openRoll
|
||||||
|
} = props
|
||||||
|
const { imgSummary, compaterImage, score } = data
|
||||||
const targetImageRef = useRef(null)
|
const targetImageRef = useRef(null)
|
||||||
const compareImageRef = useRef(null)
|
const compareImageRef = useRef(null)
|
||||||
const [targetIndex, setTargetIndex] = useState(compaterImages.findIndex(_url => imgSummary === _url) || 0)
|
|
||||||
|
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
compareImageRef,
|
compareImageRef,
|
||||||
@ -27,21 +38,21 @@ const ComBineImage: FC<ComBineImageProps> = forwardRef((props, ref) => {
|
|||||||
<Flex justify='space-evenly' align='center' style={{ padding:'0 32px' }}>
|
<Flex justify='space-evenly' align='center' style={{ padding:'0 32px' }}>
|
||||||
<CompareImage
|
<CompareImage
|
||||||
ref={targetImageRef}
|
ref={targetImageRef}
|
||||||
preDisable={targetIndex === 0}
|
preDisable={prevDisable}
|
||||||
nextDisable={targetIndex >= compaterImages.length - 1}
|
nextDisable={nextDisable}
|
||||||
onNext={() => setTargetIndex(targetIndex + 1)}
|
onNext={onNext}
|
||||||
onPre={() => setTargetIndex(targetIndex - 1)}
|
onPre={onPre}
|
||||||
showScore={false}
|
showScore={false}
|
||||||
openRoll={!!compaterImages.length}
|
openRoll={openRoll}
|
||||||
url={compaterImages[targetIndex] || imgSummary}
|
url={imgSummary}
|
||||||
label="目标图"
|
label="目标图"
|
||||||
/>
|
/>
|
||||||
<Score score={data.score} />
|
<Score score={score} />
|
||||||
<CompareImage
|
<CompareImage
|
||||||
ref={compareImageRef}
|
ref={compareImageRef}
|
||||||
url={data.imageKey}
|
url={compaterImage}
|
||||||
openRoll={false}
|
openRoll={false}
|
||||||
score={data.score}
|
score={score}
|
||||||
label="对比图"
|
label="对比图"
|
||||||
/>
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -35,10 +35,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-prev {
|
&-prev {
|
||||||
left: 20px;
|
left: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-next {
|
&-next {
|
||||||
right: 20px;
|
right: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,8 @@ const BigModal = (props: any) => {
|
|||||||
} = props
|
} = props
|
||||||
const [visible, setVisible] = useState(true)
|
const [visible, setVisible] = useState(true)
|
||||||
const [dataSource, setDataSource] = useState(BIG_IMAGE_DATA)
|
const [dataSource, setDataSource] = useState(BIG_IMAGE_DATA)
|
||||||
|
const [selectedItemKey, setSelectedItemKey] = useState()
|
||||||
|
const [editAble, setEditAble] = useState(false)
|
||||||
const modalRef = useRef(null)
|
const modalRef = useRef(null)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -29,19 +31,30 @@ const BigModal = (props: any) => {
|
|||||||
footer={(
|
footer={(
|
||||||
<Space>
|
<Space>
|
||||||
<Button onClick={() => modalRef.current?.setTab('VIDEO')} >查看视频</Button>
|
<Button onClick={() => modalRef.current?.setTab('VIDEO')} >查看视频</Button>
|
||||||
<Button onClick={() => modalRef.current?.bigImagePreviewRef.current.setShowCrop(true)} >编辑模式</Button>
|
<Button onClick={() => modalRef.current?.setTab('COMPATER')} >对比图模式</Button>
|
||||||
<Button onClick={() => modalRef.current?.bigImagePreviewRef.current.setShowCrop(false)} >取消编辑</Button>
|
|
||||||
</Space>
|
</Space>
|
||||||
)}
|
)}
|
||||||
|
showNavigation
|
||||||
open={visible}
|
open={visible}
|
||||||
ref={modalRef}
|
ref={modalRef}
|
||||||
onCancel={() => setVisible(false)}
|
onCancel={() => setVisible(false)}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
imageData={dataSource}
|
onTabChange={(newVal, oldVal) => console.log(oldVal, newVal)}
|
||||||
onIndexChange={(oldVal, newVal) => console.log(oldVal, newVal)}
|
|
||||||
onTabChange={(oldVal, newVal) => console.log(oldVal, newVal)}
|
|
||||||
width={1098}
|
width={1098}
|
||||||
attributeList={attributeList}
|
attributeList={attributeList}
|
||||||
|
cropperImageProps={{
|
||||||
|
editAble,
|
||||||
|
url: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
|
||||||
|
score: 50,
|
||||||
|
showEditTools: true
|
||||||
|
}}
|
||||||
|
btnGroupProps={{
|
||||||
|
onClick: v => {
|
||||||
|
v === 'custom' && setEditAble(true)
|
||||||
|
v === 'close' && setEditAble(false)
|
||||||
|
v === 'auto' && console.log('自动补点')
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
</BigImageModal>
|
</BigImageModal>
|
||||||
</div>
|
</div>
|
||||||
|
57
packages/biz/src/BigImageModal/demo/noDescription.tsx
Normal file
57
packages/biz/src/BigImageModal/demo/noDescription.tsx
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
|
import { BigImageModal } from '@zhst/biz'
|
||||||
|
import { Button, Space } from '@zhst/meta'
|
||||||
|
import { BIG_IMAGE_DATA, attributeList } from '../mock'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const BigModal = (props: any) => {
|
||||||
|
const {
|
||||||
|
} = props
|
||||||
|
const [visible, setVisible] = useState(false)
|
||||||
|
const [dataSource, setDataSource] = useState(BIG_IMAGE_DATA)
|
||||||
|
const [selectedItemKey, setSelectedItemKey] = useState()
|
||||||
|
const [editAble, setEditAble] = useState(false)
|
||||||
|
const modalRef = useRef(null)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
console.log(modalRef.current)
|
||||||
|
}, [modalRef.current?.currentIndex])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
console.log(modalRef.current)
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Button onClick={() => setVisible(true)} >查看大图</Button>
|
||||||
|
<BigImageModal
|
||||||
|
title="查看大图"
|
||||||
|
showNavigation
|
||||||
|
open={visible}
|
||||||
|
ref={modalRef}
|
||||||
|
onCancel={() => setVisible(false)}
|
||||||
|
dataSource={dataSource}
|
||||||
|
onTabChange={(newVal, oldVal) => console.log(oldVal, newVal)}
|
||||||
|
width={1098}
|
||||||
|
cropperImageProps={{
|
||||||
|
editAble,
|
||||||
|
url: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
|
||||||
|
score: 50,
|
||||||
|
showEditTools: true
|
||||||
|
}}
|
||||||
|
btnGroupProps={{
|
||||||
|
onClick: v => {
|
||||||
|
v === 'custom' && setEditAble(true)
|
||||||
|
v === 'close' && setEditAble(false)
|
||||||
|
v === 'auto' && console.log('自动补点')
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
</BigImageModal>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default BigModal
|
59
packages/biz/src/BigImageModal/demo/withRelatedImage.tsx
Normal file
59
packages/biz/src/BigImageModal/demo/withRelatedImage.tsx
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
|
import { BigImageModal } from '@zhst/biz'
|
||||||
|
import { Button, Space } from '@zhst/meta'
|
||||||
|
import { BIG_IMAGE_DATA, attributeList, RELATED_IMAGES } from '../mock'
|
||||||
|
|
||||||
|
const BigModal = (props: any) => {
|
||||||
|
const {
|
||||||
|
} = props
|
||||||
|
const [visible, setVisible] = useState(false)
|
||||||
|
const [dataSource, setDataSource] = useState(BIG_IMAGE_DATA)
|
||||||
|
const [selectedItemKey, setSelectedItemKey] = useState()
|
||||||
|
const [editAble, setEditAble] = useState(false)
|
||||||
|
const modalRef = useRef(null)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Button onClick={() => setVisible(true)} >查看大图</Button>
|
||||||
|
<BigImageModal
|
||||||
|
title="查看大图"
|
||||||
|
showNavigation
|
||||||
|
open={visible}
|
||||||
|
ref={modalRef}
|
||||||
|
onCancel={() => setVisible(false)}
|
||||||
|
dataSource={dataSource}
|
||||||
|
onTabChange={(newVal, oldVal) => console.log(oldVal, newVal)}
|
||||||
|
width={1098}
|
||||||
|
attributeList={attributeList}
|
||||||
|
cropperImageProps={{
|
||||||
|
editAble,
|
||||||
|
url: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
|
||||||
|
score: 50,
|
||||||
|
showEditTools: true
|
||||||
|
}}
|
||||||
|
btnGroupProps={{
|
||||||
|
onClick: v => {
|
||||||
|
v === 'custom' && setEditAble(true)
|
||||||
|
v === 'close' && setEditAble(false)
|
||||||
|
v === 'auto' && console.log('自动补点')
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
isRelated
|
||||||
|
relatedImageProps={{
|
||||||
|
carouselWidth: '900px',
|
||||||
|
activeTab: 'related',
|
||||||
|
selectedItemKey,
|
||||||
|
data: RELATED_IMAGES,
|
||||||
|
onCancel: () => console.log('取消关联'),
|
||||||
|
onConnect: () => console.log('关联'),
|
||||||
|
onTabChange: (newVal, oldVal) => console.log('tab切换', newVal, oldVal),
|
||||||
|
onItemSelecteditem: (item) => setSelectedItemKey(item.key)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
</BigImageModal>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default BigModal
|
@ -160,75 +160,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.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 {
|
.zhst-image__trackmodel {
|
||||||
&__panel {
|
&__panel {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -454,61 +385,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.relatedWrapper {
|
|
||||||
width: 100%;
|
|
||||||
height: 100px;
|
|
||||||
padding: 0 30px;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.relatedTabs {
|
|
||||||
width: 100%;
|
|
||||||
height: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.relatedContent {
|
|
||||||
width: 100%;
|
|
||||||
height: 100px;
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.relatedPics {
|
|
||||||
width: 742px;
|
|
||||||
height: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -8,9 +8,87 @@ demo:
|
|||||||
cols: 2
|
cols: 2
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 大图弹框
|
||||||
# 大图弹框
|
|
||||||
|
|
||||||
<code src="./demo/index.tsx">基本</code>
|
<code src="./demo/index.tsx">基本</code>
|
||||||
<code src="./demo/oldData.tsx">老数据版本</code>
|
<code src="./demo/withRelatedImage.tsx">人脸碰撞模型</code>
|
||||||
|
<code src="./demo/noDescription.tsx">不要描述</code>
|
||||||
|
|
||||||
|
### API
|
||||||
|
|
||||||
|
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| dataSource | 数据源 | DataProps | - | |
|
||||||
|
| visible | 弹框显示隐藏 | boolean | - | |
|
||||||
|
| activeTab | 模式 | 'COMPATER' 'NORMAL' 'VIDEO' | - | 对比图模式、场景图模式、视频模式 |
|
||||||
|
| width | 宽度 | string number | - | |
|
||||||
|
| attributeList | 图片列表 | IAttributeList | - | |
|
||||||
|
| tabs | 图片列表 | DataProps | - | |
|
||||||
|
| tabsProps | tab菜单的透传,参考 antd-tabs | TabsProps | - | |
|
||||||
|
| onTabChange | tab切换 | (newVal?: TAB_TYPE, oldVal?: TAB_TYPE) => void | - | |
|
||||||
|
| isRelated | 人脸碰撞功能 | boolean | - | |
|
||||||
|
| footer | 底部dom | React.ReactNode | - | |
|
||||||
|
| onCancel | 关闭弹框 | () => void | - | |
|
||||||
|
| compareImageProps | 参考@zhst/meta-CompareImage | CompareImageProps | - | |
|
||||||
|
| modalProps | 参考antd-Modal | ModalProps | - | |
|
||||||
|
| cropperImageProps | 参考@zhst/meta-cropperImage | cropperImageProps | - | |
|
||||||
|
| prevButtonProps | 上一页透传 | any | - | |
|
||||||
|
| onPrevButtonClick | 上一页 | () => void | - | |
|
||||||
|
| nextButtonProps | 下一页透传 | any | - | |
|
||||||
|
| onNextButtonClick | 下一页 | () => void | - | |
|
||||||
|
| btnGroupProps | 参考@zhst/meta-btnGroup | ModalProps | - | |
|
||||||
|
| descriptionsProps | 参考antd-descriptions | ModalProps | - | |
|
||||||
|
| relatedImageProps | 参考@zhst/meta-relatedImage | RelatedImageProps | - | |
|
||||||
|
| theme | 参考antd-themeConfig | ThemeConfig | - | |
|
||||||
|
| children | 参考antd-Modal | React.ReactNode | - | |
|
||||||
|
|
||||||
|
### IBigImageModalData
|
||||||
|
|
||||||
|
```js
|
||||||
|
export interface IBigImageModalData {
|
||||||
|
imageKey?: string // 目标图
|
||||||
|
imgSummary?: string // 大图
|
||||||
|
flvUrl?: string // 视频链接
|
||||||
|
compaterImage?: string // 对比图
|
||||||
|
odRect?: { // od 框数据
|
||||||
|
"x": number
|
||||||
|
"y": number
|
||||||
|
"w": number
|
||||||
|
"h": number
|
||||||
|
[key: string]: string | number; // 拓展参数
|
||||||
|
}[],
|
||||||
|
attachImg?: { // 小图,只有在场景图模式生效(人脸、形体)
|
||||||
|
"url": string
|
||||||
|
"label": string
|
||||||
|
[key: string]: string
|
||||||
|
}[],
|
||||||
|
score?: number | string // 人脸质量分
|
||||||
|
showScore?: boolean // 人脸质量分
|
||||||
|
cameraPosition?: string // 摄像头位置
|
||||||
|
time?: string // 摄像头拍摄时间
|
||||||
|
objects: { // 拓展参数、可以自由支配
|
||||||
|
objectIndex: {
|
||||||
|
[key: string]: any
|
||||||
|
},
|
||||||
|
objectType: string
|
||||||
|
sourceObjectId: string
|
||||||
|
level: number
|
||||||
|
confidence: number
|
||||||
|
infoOnSource: {
|
||||||
|
[key: string]: any
|
||||||
|
},
|
||||||
|
qualityScore: number
|
||||||
|
[key: string]: any
|
||||||
|
}[]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### IAttributeList
|
||||||
|
|
||||||
|
```js
|
||||||
|
type IAttributeList {
|
||||||
|
title: string;
|
||||||
|
children: Pick<DescriptionsProps, 'items'>
|
||||||
|
}[]
|
||||||
|
```
|
||||||
|
|
||||||
|
@ -11,268 +11,94 @@ export const IMAGE_DATA = {
|
|||||||
4,
|
4,
|
||||||
20
|
20
|
||||||
],
|
],
|
||||||
"dataSource": [
|
"dataSource": {
|
||||||
{
|
"objectId": "1742110565582518272",
|
||||||
"objectId": "1742110565582518272",
|
"condition": {
|
||||||
"condition": {
|
"featureInfo": null,
|
||||||
"featureInfo": null,
|
"featureData": "AAAAAAAAAAAAAAAAAAAAAAA==",
|
||||||
"featureData": "AAAAAAAAAAAAAAAAAAAAAAA==",
|
"imageData": "",
|
||||||
"imageData": "",
|
"alg": "VERSION_REID_HEAD_ATTR",
|
||||||
"alg": "VERSION_REID_HEAD_ATTR",
|
"rect": {
|
||||||
"rect": {
|
"x": 0.271875,
|
||||||
"x": 0.271875,
|
"y": 0.32222223,
|
||||||
"y": 0.32222223,
|
"w": 0.2859375,
|
||||||
"w": 0.2859375,
|
"h": 0.67777777
|
||||||
"h": 0.67777777
|
},
|
||||||
},
|
"objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg",
|
||||||
"objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg",
|
"srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg"
|
||||||
"srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg"
|
},
|
||||||
},
|
"score": 0.7163062,
|
||||||
"score": 0.7163062,
|
"timestamp": 1704186491979,
|
||||||
"timestamp": 1704186491979,
|
"deviceId": "129533",
|
||||||
"deviceId": "129533",
|
"id": "129533",
|
||||||
"id": "129533",
|
"name": "4楼门口过道人脸",
|
||||||
"name": "4楼门口过道人脸",
|
"dirid": "0",
|
||||||
"dirid": "0",
|
"status": "1",
|
||||||
"status": "1",
|
"longitude": 120.125,
|
||||||
"longitude": 120.125,
|
"latitude": 30.280500411987305,
|
||||||
"latitude": 30.280500411987305,
|
"caseId": "0",
|
||||||
"caseId": "0",
|
"caseGroup": "",
|
||||||
"caseGroup": "",
|
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
||||||
"isDeleted": "DEVICEMANAGER_BOOL_DEFAULT",
|
"objectIndex": {
|
||||||
"objectIndex": {
|
"objectId": "1742110565582518272",
|
||||||
"objectId": "1742110565582518272",
|
"solutionId": "1",
|
||||||
"solutionId": "1",
|
"deviceId": "129533",
|
||||||
"deviceId": "129533",
|
"fragmentId": "0"
|
||||||
"fragmentId": "0"
|
},
|
||||||
},
|
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
||||||
"objectType": "OBJECT_TYPE_PEDESTRAIN",
|
"isObjectTrack": true,
|
||||||
"isObjectTrack": true,
|
"pathId": "1742110532019697664",
|
||||||
"pathId": "1742110532019697664",
|
"frameInfo": {
|
||||||
"frameInfo": {
|
"frameId": "0",
|
||||||
"frameId": "0",
|
"frameTimestamp": "1704186491979",
|
||||||
"frameTimestamp": "1704186491979",
|
"width": 0,
|
||||||
"width": 0,
|
"height": 0,
|
||||||
"height": 0,
|
"originWidth": 1920,
|
||||||
"originWidth": 1920,
|
"originHeight": 1080,
|
||||||
"originHeight": 1080,
|
"offsetTime": "24714687",
|
||||||
"offsetTime": "24714687",
|
"skipNumber": "0"
|
||||||
"skipNumber": "0"
|
},
|
||||||
},
|
"level": 1,
|
||||||
"level": 1,
|
"bboxInFrame": {
|
||||||
"bboxInFrame": {
|
"x": 0.603125,
|
||||||
"x": 0.603125,
|
"y": 0.3314815,
|
||||||
"y": 0.3314815,
|
"w": 0.0578125,
|
||||||
"w": 0.0578125,
|
"h": 0.2712963
|
||||||
"h": 0.2712963
|
},
|
||||||
},
|
"bboxExtInFrame": {
|
||||||
"bboxExtInFrame": {
|
"x": 0.546875,
|
||||||
"x": 0.546875,
|
"y": 0.2638889,
|
||||||
"y": 0.2638889,
|
"w": 0.17135416,
|
||||||
"w": 0.17135416,
|
"h": 0.40648147
|
||||||
"h": 0.40648147
|
},
|
||||||
},
|
"objectImageKey": "",
|
||||||
"objectImageKey": "",
|
"objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565582518272.jpg",
|
||||||
"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",
|
||||||
"frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565603489792.jpg",
|
"confidence": 0.817271,
|
||||||
"confidence": 0.817271,
|
"sourceObjectId": "1742110565603489792",
|
||||||
"sourceObjectId": "1742110565603489792",
|
"storeTimestamp": "0",
|
||||||
"storeTimestamp": "0",
|
"gbNumber": "",
|
||||||
"gbNumber": "",
|
"qualityScore": 0,
|
||||||
"qualityScore": 0,
|
"subObjectCount": 1,
|
||||||
"subObjectCount": 1,
|
"subObjectType": [
|
||||||
"subObjectType": [
|
"OBJECT_TYPE_FACE"
|
||||||
"OBJECT_TYPE_FACE"
|
],
|
||||||
],
|
"subObjectIds": [
|
||||||
"subObjectIds": [
|
"1742110532015503360"
|
||||||
"1742110532015503360"
|
],
|
||||||
],
|
"solutionId": "1",
|
||||||
"solutionId": "1",
|
"fragmentId": "0",
|
||||||
"fragmentId": "0",
|
"contrastKey": "singer-20240102/1/129533/1742110565582518272.jpg",
|
||||||
"contrastKey": "singer-20240102/1/129533/1742110565582518272.jpg",
|
"compaterImages": [
|
||||||
"compaterImages": [
|
"http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"
|
||||||
"http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"
|
],
|
||||||
],
|
"imgSummary": "singer-20240102/1/129533/1742110565582518272.jpg",
|
||||||
"imgSummary": "singer-20240102/1/129533/1742110565582518272.jpg",
|
"imageKey": "http://10.0.0.7:30003/file/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",
|
||||||
"srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565603489792.jpg",
|
"algorithmVersion": "VERSION_REID_HEAD_ATTR",
|
||||||
"algorithmVersion": "VERSION_REID_HEAD_ATTR",
|
"cameraId": "129533",
|
||||||
"cameraId": "129533",
|
"cameraName": "4楼门口过道人脸"
|
||||||
"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,
|
"isArchiveDetail": false,
|
||||||
"ToolProps": {
|
"ToolProps": {
|
||||||
"renderVideoBtn": true,
|
"renderVideoBtn": true,
|
||||||
@ -281,163 +107,104 @@ export const IMAGE_DATA = {
|
|||||||
"specialTitle": ""
|
"specialTitle": ""
|
||||||
}
|
}
|
||||||
|
|
||||||
export const BIG_IMAGE_DATA = [
|
export const RELATED_IMAGES = [
|
||||||
|
{ key: '123', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '22', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '22122333', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '2212243', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '224523433', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '224235453', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '245423', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '224233543', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '22452343', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '22323243', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '2236456', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '224563', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '24565423', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '245645623', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '2456435623', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' },
|
||||||
|
{ key: '2323', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' }
|
||||||
|
]
|
||||||
|
|
||||||
|
export const BIG_IMAGE_DATA = {
|
||||||
|
imageKey: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
|
||||||
|
imgSummary: "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
|
||||||
|
flvUrl: 'ws://10.0.0.120:9033/flv/HaikangNvr/45.flv?ip=10.0.2.103&stime=1712539148&etime=1712539168',
|
||||||
|
compaterImage: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
|
||||||
|
odRect: [
|
||||||
{
|
{
|
||||||
imageKey: 'http://10.0.0.120:30003/file/singer-20240110/1/5/1744894622934503424.jpg',
|
id: '123',
|
||||||
imgSummary: "http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg",
|
"x":0.5445312,
|
||||||
flvUrl: 'ws://10.0.0.120:9033/flv/Sip/34020000001310000301.flv?ip=10.0.0.120&stime=1704815972&etime=1704815992',
|
"y":0.19166666,
|
||||||
compaterImages: [
|
"w":0.08671875,
|
||||||
'http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg',
|
"h":0.40138888
|
||||||
"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',
|
"id": "123",
|
||||||
imgSummary: "http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg",
|
"x": 0.5519352,
|
||||||
odRect:{
|
"y": 0.2965385,
|
||||||
"x":0.553125,"y":0.29722223,"w":0.048958335,"h":0.2462963
|
"w": 0.05185461,
|
||||||
},
|
"h": 0.24698898,
|
||||||
attachImg: [
|
},
|
||||||
{
|
{
|
||||||
"url": "http://10.0.0.120:30003/file/singer-20240115/1/9/1746795581163964416.jpg","label": "形体"
|
"id": "456",
|
||||||
},{
|
"x": 0.58543766,
|
||||||
"url": "http://10.0.0.120:30003/file/singer-20240115/1/9/1746795546867140608.jpg",
|
"y": 0.3203356,
|
||||||
"label": "人脸"
|
"w": 0.052037954,
|
||||||
}
|
"h": 0.2664015
|
||||||
],
|
|
||||||
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,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
attachImg: [
|
||||||
|
{
|
||||||
|
"url": "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
|
||||||
|
"label": "形体"
|
||||||
|
},{
|
||||||
|
"url": "https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
|
||||||
|
"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,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
export const attributeList = [
|
export const attributeList = [
|
||||||
{
|
{
|
||||||
|
36
packages/biz/src/BigImageModal/util/interface.ts
Normal file
36
packages/biz/src/BigImageModal/util/interface.ts
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
export interface IBigImageModalData {
|
||||||
|
imageKey?: string // 目标图
|
||||||
|
imgSummary?: string // 大图
|
||||||
|
flvUrl?: string // 视频链接
|
||||||
|
compaterImages?: string[] // 对比图
|
||||||
|
odRect?: { // od 框数据
|
||||||
|
"x": number
|
||||||
|
"y": number
|
||||||
|
"w": number
|
||||||
|
"h": number
|
||||||
|
[key: string]: string | number; // 拓展参数
|
||||||
|
}[],
|
||||||
|
attachImg?: { // 小图,只有在场景图模式生效(人脸、形体)
|
||||||
|
"url": string
|
||||||
|
"label": string
|
||||||
|
[key: string]: string
|
||||||
|
}[],
|
||||||
|
score?: number | string // 人脸质量分
|
||||||
|
showScore?: boolean // 人脸质量分
|
||||||
|
cameraPosition?: string // 摄像头位置
|
||||||
|
time?: string // 摄像头拍摄时间
|
||||||
|
objects: { // 拓展参数、可以自由支配
|
||||||
|
objectIndex: {
|
||||||
|
[key: string]: any
|
||||||
|
},
|
||||||
|
objectType: string
|
||||||
|
sourceObjectId: string
|
||||||
|
level: number
|
||||||
|
confidence: number
|
||||||
|
infoOnSource: {
|
||||||
|
[key: string]: any
|
||||||
|
},
|
||||||
|
qualityScore: number
|
||||||
|
[key: string]: any
|
||||||
|
}[]
|
||||||
|
}
|
@ -25,7 +25,7 @@ export const VideoPlayerCard: React.FC<VideoPlayerCardProps> = (props) => {
|
|||||||
|
|
||||||
const { ConfigContext } = ConfigProvider;
|
const { ConfigContext } = ConfigProvider;
|
||||||
const { getPrefixCls } = useContext(ConfigContext);
|
const { getPrefixCls } = useContext(ConfigContext);
|
||||||
const { prefixCls: customizePrefixCls, showType, imgSrc, videoSrc, cardProps, isWindowLoading, errorReasonText, size, title, handleCloseButtonClick, handleWindowClick, windowKey, selectedWindowKey = '' } = props;
|
const { prefixCls: customizePrefixCls, showType, imageKey, videoSrc, cardProps, isWindowLoading, errorReasonText, size, title, handleCloseButtonClick, handleWindowClick, windowKey, selectedWindowKey = '' } = props;
|
||||||
const componentName = getPrefixCls('biz-video-player-card', customizePrefixCls);
|
const componentName = getPrefixCls('biz-video-player-card', customizePrefixCls);
|
||||||
const [cardContent, setCardContent] = useState<JSX.Element | null>(null);
|
const [cardContent, setCardContent] = useState<JSX.Element | null>(null);
|
||||||
const { useToken } = theme
|
const { useToken } = theme
|
||||||
|
@ -2,7 +2,6 @@ import React, { useState } from 'react';
|
|||||||
import { BoxSelectTree } from '@zhst/biz';
|
import { BoxSelectTree } from '@zhst/biz';
|
||||||
import { treeData, boxDataSource } from './mock'
|
import { treeData, boxDataSource } from './mock'
|
||||||
import { Select, TreeProps, Modal, Checkbox } from 'antd';
|
import { Select, TreeProps, Modal, Checkbox } from 'antd';
|
||||||
import { BOX_TYPE_LIST } from '../../utils/constants';
|
|
||||||
|
|
||||||
const { Option } = Select
|
const { Option } = Select
|
||||||
|
|
||||||
@ -63,7 +62,10 @@ const demo = () => {
|
|||||||
}}
|
}}
|
||||||
style={{ width: '72px' }}
|
style={{ width: '72px' }}
|
||||||
>
|
>
|
||||||
{BOX_TYPE_LIST.map(item => (
|
{[
|
||||||
|
{ value: '1', label: '盒子' },
|
||||||
|
{ value: '2', label: '盒子组' }
|
||||||
|
].map(item => (
|
||||||
<Option value={item.value}>{item.label}</Option>
|
<Option value={item.value}>{item.label}</Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
|
@ -2,7 +2,6 @@ import React, { useState } from 'react';
|
|||||||
import { BoxSelectTree } from '@zhst/biz';
|
import { BoxSelectTree } from '@zhst/biz';
|
||||||
import { Button, Select, TreeProps } from 'antd';
|
import { Button, Select, TreeProps } from 'antd';
|
||||||
import { FilterOutlined } from '@ant-design/icons';
|
import { FilterOutlined } from '@ant-design/icons';
|
||||||
import { BOX_TYPE_LIST } from '../../utils/constants';
|
|
||||||
import { treeData, boxDataSource } from './mock'
|
import { treeData, boxDataSource } from './mock'
|
||||||
|
|
||||||
const { Option } = Select
|
const { Option } = Select
|
||||||
@ -42,7 +41,10 @@ const demo = () => {
|
|||||||
}}
|
}}
|
||||||
style={{ width: '72px' }}
|
style={{ width: '72px' }}
|
||||||
>
|
>
|
||||||
{BOX_TYPE_LIST.map(item => (
|
{[
|
||||||
|
{ value: '1', label: '盒子' },
|
||||||
|
{ value: '2', label: '盒子组' }
|
||||||
|
].map(item => (
|
||||||
<Option value={item.value}>{item.label}</Option>
|
<Option value={item.value}>{item.label}</Option>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//@ts-nocheck
|
//@ts-nocheck
|
||||||
|
// !! 不允许使用,只是拿来参考!!!!!
|
||||||
import * as turf from '@turf/turf';
|
import * as turf from '@turf/turf';
|
||||||
import { getListTaskStatus, getCameraStatusFunc } from '../useTaskState';
|
import { getListTaskStatus, getCameraStatusFunc } from '../useTaskState';
|
||||||
import Tree from '@common/components/CameraTree/Tree';
|
import Tree from '@common/components/CameraTree/Tree';
|
||||||
|
@ -10,6 +10,8 @@ export { default as TreeTransferModal } from './treeTransferModal'
|
|||||||
export type { TreeTransferModalProps } from './treeTransferModal'
|
export type { TreeTransferModalProps } from './treeTransferModal'
|
||||||
export { default as WarningRecordCard } from './WarningRecordCard'
|
export { default as WarningRecordCard } from './WarningRecordCard'
|
||||||
export type { IRecord, WarningRecordCardProps } from './WarningRecordCard'
|
export type { IRecord, WarningRecordCardProps } from './WarningRecordCard'
|
||||||
|
export { default as OdModal } from './odModal'
|
||||||
|
export type { ODModalProps } from './odModal'
|
||||||
export type { ViewLargerImageModalRef, ViewLargerImageModalProps } from './ViewLargerImageModal'
|
export type { ViewLargerImageModalRef, ViewLargerImageModalProps } from './ViewLargerImageModal'
|
||||||
export { default as ViewLargerImageModal, useViewLargerImageModal } from './ViewLargerImageModal'
|
export { default as ViewLargerImageModal, useViewLargerImageModal } from './ViewLargerImageModal'
|
||||||
export type { VideoPlayerCardProps } from './VideoPlayerCard'
|
export type { VideoPlayerCardProps } from './VideoPlayerCard'
|
||||||
|
140
packages/biz/src/odModal/OdModal.tsx
Normal file
140
packages/biz/src/odModal/OdModal.tsx
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
import React, { forwardRef, useContext, useImperativeHandle, useRef } from 'react';
|
||||||
|
import { Button, Modal, ModalProps, Select, SelectProps, Space, theme } from 'antd';
|
||||||
|
import { ConfigProvider, CropperImage, Scanner, CropperImageProps, CropperImageRefProps } from '@zhst/meta'
|
||||||
|
import { IconFont } from '@zhst/icon'
|
||||||
|
|
||||||
|
export interface ODModalProps extends ModalProps {
|
||||||
|
prefixCls?: string;
|
||||||
|
open?: boolean; // 弹框显示
|
||||||
|
editAble?: boolean;
|
||||||
|
odWidth?: string;
|
||||||
|
odHeight?: string;
|
||||||
|
scanning?: boolean;
|
||||||
|
url?: string;
|
||||||
|
odList?: CropperImageProps['odList']
|
||||||
|
|
||||||
|
onTypeSelect?: SelectProps['onSelect'];
|
||||||
|
selectOptions?: SelectProps['options']
|
||||||
|
selectDefaultValue?: string | number;
|
||||||
|
selectedType?: string | number;
|
||||||
|
onHandSelect?: () => void;
|
||||||
|
onAutoSelect?: () => void;
|
||||||
|
onReset?: () => void;
|
||||||
|
onOdSelect?: CropperImageProps['onShapeSelected']
|
||||||
|
onCropEnd?: CropperImageProps['onCropEnd']
|
||||||
|
onRotate?: () => void;
|
||||||
|
handSelectDisable?: boolean;
|
||||||
|
autoSelectDisable?: boolean;
|
||||||
|
resetDisable?: boolean;
|
||||||
|
selectTypeDisable?: boolean;
|
||||||
|
showRotateButton?: boolean;
|
||||||
|
|
||||||
|
customButtons?: React.ReactNode
|
||||||
|
modalProps?: ModalProps
|
||||||
|
cropperImageProps?: CropperImageProps
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ODModalRefProps {
|
||||||
|
rotateTo?: (val: number) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { ConfigContext } = ConfigProvider
|
||||||
|
const { useToken } = theme
|
||||||
|
|
||||||
|
const ODModal = forwardRef<ODModalRefProps, ODModalProps>((props, ref) => {
|
||||||
|
const {
|
||||||
|
prefixCls: customizePrefixCls,
|
||||||
|
open,
|
||||||
|
title,
|
||||||
|
editAble,
|
||||||
|
scanning,
|
||||||
|
okText,
|
||||||
|
cancelText,
|
||||||
|
url,
|
||||||
|
odList,
|
||||||
|
selectDefaultValue = 1,
|
||||||
|
selectedType,
|
||||||
|
selectOptions,
|
||||||
|
odWidth = '470px',
|
||||||
|
odHeight = '388px',
|
||||||
|
onCancel,
|
||||||
|
onOk,
|
||||||
|
onAutoSelect,
|
||||||
|
onHandSelect,
|
||||||
|
onReset,
|
||||||
|
onTypeSelect,
|
||||||
|
onOdSelect,
|
||||||
|
onCropEnd,
|
||||||
|
onRotate,
|
||||||
|
resetDisable,
|
||||||
|
autoSelectDisable,
|
||||||
|
handSelectDisable,
|
||||||
|
selectTypeDisable,
|
||||||
|
showRotateButton,
|
||||||
|
customButtons,
|
||||||
|
modalProps,
|
||||||
|
cropperImageProps
|
||||||
|
} = props
|
||||||
|
const { getPrefixCls } = useContext(ConfigContext);
|
||||||
|
const { token } = useToken()
|
||||||
|
const cropperImageRef = useRef<CropperImageRefProps>(null)
|
||||||
|
const componentName = getPrefixCls('od-modal', customizePrefixCls);
|
||||||
|
|
||||||
|
useImperativeHandle(ref, () => ({
|
||||||
|
rotateTo: (val = 90) => {
|
||||||
|
cropperImageRef.current?.rotateTo?.(val)
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
title={title}
|
||||||
|
open={open}
|
||||||
|
cancelText={cancelText || "取消"}
|
||||||
|
okText={okText || '确认'}
|
||||||
|
onCancel={onCancel}
|
||||||
|
onOk={onOk}
|
||||||
|
{...modalProps}
|
||||||
|
className={componentName}
|
||||||
|
>
|
||||||
|
<Space size={12} direction='vertical' align='center' style={{ textAlign: 'center' }}>
|
||||||
|
<Scanner style={{ width: odWidth, height: odHeight }} visible={scanning}>
|
||||||
|
<CropperImage
|
||||||
|
type='rect'
|
||||||
|
odList={odList}
|
||||||
|
editAble={editAble}
|
||||||
|
url={url}
|
||||||
|
onShapeSelected={onOdSelect}
|
||||||
|
onCropEnd={onCropEnd}
|
||||||
|
showToast={editAble}
|
||||||
|
ref={cropperImageRef}
|
||||||
|
{...cropperImageProps}
|
||||||
|
/>
|
||||||
|
</Scanner>
|
||||||
|
{customButtons ? (
|
||||||
|
customButtons
|
||||||
|
): (
|
||||||
|
<Space size={1} align='center' style={{ textAlign: 'center' }}>
|
||||||
|
<div>
|
||||||
|
选中类型:
|
||||||
|
<Select
|
||||||
|
style={{ width: '90px' }}
|
||||||
|
defaultValue={selectDefaultValue}
|
||||||
|
value={selectedType}
|
||||||
|
options={selectOptions}
|
||||||
|
disabled={selectTypeDisable}
|
||||||
|
onSelect={onTypeSelect}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<Button disabled={handSelectDisable} size='small' type="link" onClick={onHandSelect}><IconFont icon="icon-shoudongkuangxuan" /> 手动框选</Button>
|
||||||
|
<Button disabled={autoSelectDisable} size='small' type="link" onClick={onAutoSelect}><IconFont icon="icon-zidong" /> 自动框选</Button>
|
||||||
|
<Button disabled={resetDisable} size='small' type="link" onClick={onReset}><IconFont icon="icon-zhongzhi3" /> 重置</Button>
|
||||||
|
{showRotateButton && <IconFont onIconClick={onRotate} styles={{ marginLeft: '6px' }} color={token.colorPrimary} icon="icon-xuanzhuan1" />}
|
||||||
|
</Space>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
export default ODModal;
|
84
packages/biz/src/odModal/demo/basic.tsx
Normal file
84
packages/biz/src/odModal/demo/basic.tsx
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
import React, { useState, useRef } from 'react';
|
||||||
|
import { OdModal } from '@zhst/biz';
|
||||||
|
import { CropperImageProps } from '@zhst/meta';
|
||||||
|
import { Button } from 'antd';
|
||||||
|
|
||||||
|
const options = [
|
||||||
|
{ value: 1, label: '形体' },
|
||||||
|
{ value: 2, label: '非机动车' },
|
||||||
|
]
|
||||||
|
|
||||||
|
const initialODList = [
|
||||||
|
{
|
||||||
|
"id": "123",
|
||||||
|
"x": 0.5519352,
|
||||||
|
"y": 0.2965385,
|
||||||
|
"w": 0.05185461,
|
||||||
|
"h": 0.24698898,
|
||||||
|
selectAble: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "456",
|
||||||
|
"x": 0.58543766,
|
||||||
|
"y": 0.3203356,
|
||||||
|
"w": 0.052037954,
|
||||||
|
"h": 0.2664015
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
const demo = () => {
|
||||||
|
const odModalRef = useRef(null)
|
||||||
|
const [open, setOpen] = useState(true)
|
||||||
|
const [scanning, setScanning] = useState(false)
|
||||||
|
const [editAble, setEditable] = useState(false)
|
||||||
|
const [paintType, setPaintType] = useState<'hand' | 'auto'>('auto')
|
||||||
|
const [selectedType, setSelectedType] = useState(1)
|
||||||
|
const [odList, setOdList] = useState<CropperImageProps['odList']>(initialODList)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{ width: '320px' }}>
|
||||||
|
<Button onClick={() => setOpen(true)} >打开弹框</Button>
|
||||||
|
<OdModal
|
||||||
|
ref={odModalRef}
|
||||||
|
open={open}
|
||||||
|
scanning={scanning}
|
||||||
|
title="请选择目标"
|
||||||
|
url={'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'}
|
||||||
|
odList={odList}
|
||||||
|
okText={scanning ? '关闭扫描' : '扫描'}
|
||||||
|
onCancel={() => setOpen(false)}
|
||||||
|
onOk={() => {
|
||||||
|
setScanning(pre => !pre)
|
||||||
|
}}
|
||||||
|
editAble={editAble}
|
||||||
|
selectOptions={options}
|
||||||
|
selectedType={selectedType}
|
||||||
|
onOdSelect={(id, _shapeData) => console.log('od', id, _shapeData)}
|
||||||
|
onAutoSelect={() => {
|
||||||
|
setEditable(false)
|
||||||
|
setOdList(initialODList)
|
||||||
|
setPaintType('auto')
|
||||||
|
}}
|
||||||
|
onHandSelect={() => {
|
||||||
|
setEditable(true)
|
||||||
|
setPaintType('hand')
|
||||||
|
}}
|
||||||
|
showRotateButton={paintType === 'hand'}
|
||||||
|
selectTypeDisable={paintType === 'auto'}
|
||||||
|
handSelectDisable={paintType === 'hand'}
|
||||||
|
autoSelectDisable={paintType === 'auto'}
|
||||||
|
onCropEnd={_cropData => console.log('结束绘制:', _cropData)}
|
||||||
|
onReset={() => console.log('重置')}
|
||||||
|
onRotate={() => console.log('旋转', odModalRef.current.rotateTo(90))}
|
||||||
|
onTypeSelect={(val) => {
|
||||||
|
if (val === 1) {
|
||||||
|
|
||||||
|
}
|
||||||
|
setSelectedType(val)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default demo;
|
19
packages/biz/src/odModal/index.md
Normal file
19
packages/biz/src/odModal/index.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
category: Components
|
||||||
|
title: OD 识别弹框
|
||||||
|
toc: content
|
||||||
|
demo:
|
||||||
|
cols: 4
|
||||||
|
group:
|
||||||
|
title: 数据展示
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
## 代码演示
|
||||||
|
|
||||||
|
<code src="./demo/basic.tsx">基本用法</code>
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||||
|
| --- | --- | --- | --- | --- |
|
6
packages/biz/src/odModal/index.tsx
Normal file
6
packages/biz/src/odModal/index.tsx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import OdModal from './OdModal';
|
||||||
|
|
||||||
|
|
||||||
|
export type { ODModalProps } from './OdModal'
|
||||||
|
|
||||||
|
export default OdModal;
|
@ -1,7 +1,6 @@
|
|||||||
import React, { FC, useState } from 'react';
|
import React, { FC, useState } from 'react';
|
||||||
import { Modal, ModalProps, Radio, RadioGroupProps, Select, SelectProps, TransferProps, TreeDataNode, TreeProps } from 'antd';
|
import { Modal, ModalProps, Radio, RadioGroupProps, Select, SelectProps, TransferProps, TreeDataNode, TreeProps } from 'antd';
|
||||||
import TreeTransfer from '../treeTransfer';
|
import TreeTransfer from '../treeTransfer';
|
||||||
import { ALL_LIST, BOX_TYPE_LIST } from '../utils/constants';
|
|
||||||
|
|
||||||
export interface TreeTransferModalProps {
|
export interface TreeTransferModalProps {
|
||||||
dataSource: TreeDataNode[]
|
dataSource: TreeDataNode[]
|
||||||
@ -62,13 +61,18 @@ const TreeTransferModal: FC<TreeTransferModalProps> = (props) => {
|
|||||||
}}
|
}}
|
||||||
style={{ marginLeft: '24px', padding: '20px 0' }}
|
style={{ marginLeft: '24px', padding: '20px 0' }}
|
||||||
value={type}
|
value={type}
|
||||||
options={BOX_TYPE_LIST}
|
options={[
|
||||||
|
{ value: '1', label: '盒子' },
|
||||||
|
{ value: '2', label: '盒子组' }
|
||||||
|
]}
|
||||||
{...radioProps}
|
{...radioProps}
|
||||||
/>
|
/>
|
||||||
<Select
|
<Select
|
||||||
defaultValue={''}
|
defaultValue={''}
|
||||||
style={{ marginLeft: 200, width: 150 }}
|
style={{ marginLeft: 200, width: 150 }}
|
||||||
options={ALL_LIST}
|
options={[
|
||||||
|
{ value: '', label: '全部' }
|
||||||
|
]}
|
||||||
onSelect={onSelect}
|
onSelect={onSelect}
|
||||||
{...selectProps}
|
{...selectProps}
|
||||||
/>
|
/>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// !! 参考文件,后续会删除
|
||||||
|
|
||||||
export const OBJECT_GRNER_THRESHOLD = 0.8; //目标图判断性别阈值
|
export const OBJECT_GRNER_THRESHOLD = 0.8; //目标图判断性别阈值
|
||||||
export const OBJECT_AGE_TYPE_THRESHOLD = 0.5; //目标图判断年龄段阈值
|
export const OBJECT_AGE_TYPE_THRESHOLD = 0.5; //目标图判断年龄段阈值
|
||||||
export const MODE_KEY = 'test_mode';
|
export const MODE_KEY = 'test_mode';
|
||||||
@ -13,25 +15,3 @@ export const GLOBAL_IS_BOX_VMS_SHOW = true; //是否展示盒子vms
|
|||||||
|
|
||||||
export const BODY_SEARCH_THRESHOID = 0.45; //形体检索阈值
|
export const BODY_SEARCH_THRESHOID = 0.45; //形体检索阈值
|
||||||
export const RECORD_VERSION = '3.0.0'; //保存记录的版本号
|
export const RECORD_VERSION = '3.0.0'; //保存记录的版本号
|
||||||
|
|
||||||
export const 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 const BOX_TYPE_LIST = [
|
|
||||||
{ value: '1', label: '盒子' },
|
|
||||||
{ value: '2', label: '盒子组' }
|
|
||||||
]
|
|
||||||
|
|
||||||
export const ALL_LIST = [
|
|
||||||
{ value: '', label: '全部' }
|
|
||||||
]
|
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
# @zhst/utils
|
# @zhst/utils
|
||||||
|
|
||||||
|
## 0.10.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- biz:新增 od 弹框、预警图片 od;meta:新增人脸碰撞模型组件、扫描组件、termial 组件;material:新增中心连接物料
|
||||||
|
- Updated dependencies
|
||||||
|
- @zhst/request@0.10.1
|
||||||
|
|
||||||
## 0.10.0
|
## 0.10.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@zhst/func",
|
"name": "@zhst/func",
|
||||||
"version": "0.10.0",
|
"version": "0.10.1",
|
||||||
"description": "函数合集",
|
"description": "函数合集",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"hooks"
|
"hooks"
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
# @zhst/hooks
|
# @zhst/hooks
|
||||||
|
|
||||||
|
## 0.9.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- biz:新增 od 弹框、预警图片 od;meta:新增人脸碰撞模型组件、扫描组件、termial 组件;material:新增中心连接物料
|
||||||
|
- Updated dependencies
|
||||||
|
- @zhst/func@0.10.1
|
||||||
|
|
||||||
## 0.9.0
|
## 0.9.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@zhst/hooks",
|
"name": "@zhst/hooks",
|
||||||
"version": "0.9.0",
|
"version": "0.9.1",
|
||||||
"description": "hooks合集",
|
"description": "hooks合集",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"hooks"
|
"hooks"
|
||||||
|
@ -1,5 +1,19 @@
|
|||||||
# @zhst/material
|
# @zhst/material
|
||||||
|
|
||||||
|
## 0.10.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- biz:新增 od 弹框、预警图片 od;meta:新增人脸碰撞模型组件、扫描组件、termial 组件;material:新增中心连接物料
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies
|
||||||
|
- @zhst/meta@0.13.0
|
||||||
|
- @zhst/biz@0.14.0
|
||||||
|
- @zhst/hooks@0.9.1
|
||||||
|
- @zhst/func@0.10.1
|
||||||
|
|
||||||
## 0.9.0
|
## 0.9.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
@ -1,129 +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, { forwardRef } from 'react';
|
|
||||||
import { Flex, Image } from "antd";
|
|
||||||
import theme from 'antd/es/theme';
|
|
||||||
import { CropperImage } from '@zhst/meta';
|
|
||||||
import { AlgorithmConfigImg, ErrorImage } from "../utils/base64Images";
|
|
||||||
import AlgorithmTable from "./components/algorithmTable";
|
|
||||||
import TimeTemplateTable from "./components/timeTemplateTable";
|
|
||||||
var useToken = theme.useToken;
|
|
||||||
var Title = function Title(props) {
|
|
||||||
return /*#__PURE__*/React.createElement("h2", {
|
|
||||||
style: {
|
|
||||||
margin: '18px 16px',
|
|
||||||
fontSize: '14px',
|
|
||||||
color: 'rgba(0, 0, 0, 0.88)'
|
|
||||||
}
|
|
||||||
}, props.children);
|
|
||||||
};
|
|
||||||
var AlgorithmConfig = /*#__PURE__*/forwardRef(function (props) {
|
|
||||||
var _props$algorithmTable = props.algorithmTableDataSource,
|
|
||||||
algorithmTableDataSource = _props$algorithmTable === void 0 ? [] : _props$algorithmTable,
|
|
||||||
_props$timeTemplateDa = props.timeTemplateDataSource,
|
|
||||||
timeTemplateDataSource = _props$timeTemplateDa === void 0 ? [] : _props$timeTemplateDa,
|
|
||||||
_props$boxList = props.boxList,
|
|
||||||
boxList = _props$boxList === void 0 ? [] : _props$boxList,
|
|
||||||
drawListener = props.drawListener,
|
|
||||||
_props$cropperImagePr = props.cropperImageProps,
|
|
||||||
cropperImageProps = _props$cropperImagePr === void 0 ? {} : _props$cropperImagePr,
|
|
||||||
algorithmTableProps = props.algorithmTableProps,
|
|
||||||
timeTemplateTableProps = props.timeTemplateTableProps,
|
|
||||||
selectedKey = props.selectedKey,
|
|
||||||
_props$type = props.type,
|
|
||||||
type = _props$type === void 0 ? 'multiple' : _props$type,
|
|
||||||
_props$rowKey = props.rowKey,
|
|
||||||
rowKey = _props$rowKey === void 0 ? 'id' : _props$rowKey,
|
|
||||||
onSelect = props.onSelect,
|
|
||||||
_props$title = props.title,
|
|
||||||
title = _props$title === void 0 ? '盒子名称' : _props$title;
|
|
||||||
var _useToken = useToken(),
|
|
||||||
token = _useToken.token;
|
|
||||||
// @ts-ignore
|
|
||||||
var cropType = cropperImageProps.type;
|
|
||||||
|
|
||||||
// useImperativeHandle(ref, () => ({
|
|
||||||
// }))
|
|
||||||
|
|
||||||
return /*#__PURE__*/React.createElement(Flex, {
|
|
||||||
style: {
|
|
||||||
border: "1px solid ".concat(token.colorBorder),
|
|
||||||
backgroundColor: token.colorBgBase
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement("div", {
|
|
||||||
title: title,
|
|
||||||
style: {
|
|
||||||
width: '13.9%'
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement(Title, null, title), /*#__PURE__*/React.createElement("div", {
|
|
||||||
style: {
|
|
||||||
borderTop: "1px solid ".concat(token.colorBorder)
|
|
||||||
}
|
|
||||||
}, boxList.map(function (item) {
|
|
||||||
return /*#__PURE__*/React.createElement("p", {
|
|
||||||
key: item.id,
|
|
||||||
onClick: function onClick() {
|
|
||||||
return onSelect === null || onSelect === void 0 ? void 0 : onSelect(item.id, item);
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
margin: 0,
|
|
||||||
padding: "".concat(token.paddingXXS, "px ").concat(token.paddingLG, "px"),
|
|
||||||
cursor: 'pointer',
|
|
||||||
// @ts-ignore
|
|
||||||
color: selectedKey === item[rowKey] ? token.colorPrimary : token.colorText,
|
|
||||||
// @ts-ignore
|
|
||||||
backgroundColor: selectedKey === item[rowKey] ? token.blue1 : token.colorBgBase,
|
|
||||||
transition: '0cancelDraw.2s ease'
|
|
||||||
}
|
|
||||||
}, item.name);
|
|
||||||
}))), /*#__PURE__*/React.createElement("div", {
|
|
||||||
style: {
|
|
||||||
boxSizing: 'border-box',
|
|
||||||
width: '46.3%',
|
|
||||||
textAlign: 'center',
|
|
||||||
borderLeft: "1px solid ".concat(token.colorBorder),
|
|
||||||
borderRight: "1px solid ".concat(token.colorBorder)
|
|
||||||
}
|
|
||||||
}, type === 'single' ? /*#__PURE__*/React.createElement(CropperImage, _extends({
|
|
||||||
type: "line",
|
|
||||||
onCropEnd: drawListener
|
|
||||||
}, cropperImageProps)) : /*#__PURE__*/React.createElement("div", {
|
|
||||||
style: {
|
|
||||||
padding: '84px'
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement(Image, {
|
|
||||||
width: '62.5%',
|
|
||||||
src: AlgorithmConfigImg,
|
|
||||||
preview: false,
|
|
||||||
fallback: ErrorImage
|
|
||||||
}), /*#__PURE__*/React.createElement("h2", null, "\u8BF7\u8FDB\u884C\u6279\u91CF\u914D\u7F6E"), /*#__PURE__*/React.createElement("ul", {
|
|
||||||
style: {
|
|
||||||
display: 'inline-block',
|
|
||||||
paddingLeft: 0,
|
|
||||||
width: '51.8%',
|
|
||||||
listStyle: 'none',
|
|
||||||
textAlign: 'left',
|
|
||||||
color: token.colorTextLabel
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement("li", null, "\xB7 \u76D2\u5B50\u6279\u91CF\u914D\u7F6E\u4EC5\u652F\u6301\u540C\u578B\u53F7\u76D2\u5B50\uFF1B"), /*#__PURE__*/React.createElement("li", null, "\xB7 \u91C7\u53D6\u8986\u76D6\u5F0F\u66F4\u65B0\uFF0C\u4E0D\u4FDD\u7559\u539F\u6709\u914D\u7F6E\uFF0C\u4E14\u9884\u8B66\u68C0\u6D4B\u6846\u9ED8\u8BA4\u5168\u5C4F\u8303\u56F4\uFF1B"), /*#__PURE__*/React.createElement("li", null, "\xB7 \u4EBA\u6D41\u91CF\u7EDF\u8BA1\u9ED8\u8BA4\u68C0\u6D4B\u7EBF\u4E3A\u5C4F\u5E55\u4E2D\u592E\u6A2A\u5411\u7EBF\u6761\uFF0C\u4E14\u7BAD\u5934\u6307\u5411\u4E0B\u65B9\uFF1B"), /*#__PURE__*/React.createElement("li", null, "\xB7 \u4F18\u5148\u9009\u62E9\u62C9\u6D41\u6B63\u5E38\u7684\u6444\u50CF\u5934\u3002")))), /*#__PURE__*/React.createElement("div", {
|
|
||||||
style: {
|
|
||||||
width: '39.8%'
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Title, null, "\u65F6\u95F4\u6A21\u677F"), /*#__PURE__*/React.createElement("div", {
|
|
||||||
style: {
|
|
||||||
padding: "".concat(token.paddingMD, "px ").concat(token.paddingSM, "px"),
|
|
||||||
borderTop: "1px solid ".concat(token.colorBorder),
|
|
||||||
borderBottom: "1px solid ".concat(token.colorBorder)
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement(TimeTemplateTable, _extends({
|
|
||||||
dataSource: timeTemplateDataSource
|
|
||||||
}, timeTemplateTableProps)))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Title, null, "\u7B97\u6CD5\u5E94\u7528"), /*#__PURE__*/React.createElement("div", {
|
|
||||||
style: {
|
|
||||||
padding: "".concat(token.paddingMD, "px ").concat(token.paddingSM, "px"),
|
|
||||||
borderTop: "1px solid ".concat(token.colorBorder)
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement(AlgorithmTable, _extends({
|
|
||||||
dataSource: algorithmTableDataSource,
|
|
||||||
tableType: type
|
|
||||||
}, algorithmTableProps))))));
|
|
||||||
});
|
|
||||||
export default AlgorithmConfig;
|
|
File diff suppressed because one or more lines are too long
@ -1,3 +0,0 @@
|
|||||||
import AlgorithmTable from './AlgorithmTable';
|
|
||||||
export type { AlgorithmTableProps } from './AlgorithmTable';
|
|
||||||
export default AlgorithmTable;
|
|
@ -1,2 +0,0 @@
|
|||||||
import AlgorithmTable from "./AlgorithmTable";
|
|
||||||
export default AlgorithmTable;
|
|
@ -1,2 +0,0 @@
|
|||||||
import SchemaFormModal from "./schemaFormModal";
|
|
||||||
export default SchemaFormModal;
|
|
@ -1,8 +0,0 @@
|
|||||||
import { FC } from 'react';
|
|
||||||
import type { ModalFormProps } from '@ant-design/pro-components';
|
|
||||||
export interface SchemaFormModalProps extends ModalFormProps {
|
|
||||||
type: 'fire' | 'smoke' | 'traffic' | 'face' | 'destroy' | 'wander' | 'gather' | 'cameraBlock';
|
|
||||||
}
|
|
||||||
export declare const SCHEME_TYPE_LIST: Map<string, string>;
|
|
||||||
declare const SchemaFormModal: FC<SchemaFormModalProps>;
|
|
||||||
export default SchemaFormModal;
|
|
@ -1,128 +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 { BetaSchemaForm } from '@ant-design/pro-components';
|
|
||||||
import { Input, Space } from 'antd';
|
|
||||||
export var SCHEME_TYPE_LIST = new Map([['fire', '火焰识别'], ['smoke', '烟雾识别'], ['traffic', '人流量统计'], ['face', '面部遮挡识别'], ['destroy', '人员破坏识别'], ['wander', '人员徘徊识别'], ['gather', '人员聚集识别'], ['cameraBlock', '摄像头遮挡识别']]);
|
|
||||||
var SchemaFormModal = function SchemaFormModal(props) {
|
|
||||||
var _props$type = props.type,
|
|
||||||
type = _props$type === void 0 ? 'fire' : _props$type,
|
|
||||||
onFinish = props.onFinish;
|
|
||||||
var getColumnsByType = function getColumnsByType(type) {
|
|
||||||
if (!type) return [];
|
|
||||||
var arr = [];
|
|
||||||
if (type === 'gather') {
|
|
||||||
arr.push({
|
|
||||||
title: '预警人数:',
|
|
||||||
dataIndex: 'alarmMember',
|
|
||||||
formItemProps: {
|
|
||||||
rules: [{
|
|
||||||
required: true,
|
|
||||||
message: '此项为必填项'
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
renderFormItem: function renderFormItem() {
|
|
||||||
return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, null), "\u4EBA\uFF083~10\uFF09");
|
|
||||||
},
|
|
||||||
width: 'm'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (type === 'cameraBlock') {
|
|
||||||
arr.push({
|
|
||||||
title: '遮挡百分比:',
|
|
||||||
dataIndex: 'blockPercent',
|
|
||||||
formItemProps: {
|
|
||||||
rules: [{
|
|
||||||
required: true,
|
|
||||||
message: '此项为必填项'
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
renderFormItem: function renderFormItem() {
|
|
||||||
return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, null), "%\uFF0830~80\uFF09");
|
|
||||||
},
|
|
||||||
width: 'm'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (type !== 'traffic') {
|
|
||||||
arr.push({
|
|
||||||
title: '最短持续时间:',
|
|
||||||
dataIndex: 'minTime',
|
|
||||||
formItemProps: {
|
|
||||||
rules: [{
|
|
||||||
required: true,
|
|
||||||
message: '此项为必填项'
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
renderFormItem: function renderFormItem() {
|
|
||||||
return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, null), "\u79D2\uFF082~10\uFF09");
|
|
||||||
},
|
|
||||||
width: 'm'
|
|
||||||
});
|
|
||||||
arr.push({
|
|
||||||
title: '报警间隔时间:',
|
|
||||||
dataIndex: 'alarmTime',
|
|
||||||
formItemProps: {
|
|
||||||
rules: [{
|
|
||||||
required: true,
|
|
||||||
message: '此项为必填项'
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
renderFormItem: function renderFormItem() {
|
|
||||||
return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, null), "\u79D2\uFF0810~600\uFF09");
|
|
||||||
},
|
|
||||||
width: 'm'
|
|
||||||
});
|
|
||||||
} else if (type === 'traffic') {
|
|
||||||
arr.push({
|
|
||||||
title: '灵敏度:',
|
|
||||||
dataIndex: 'sensitivity',
|
|
||||||
formItemProps: {
|
|
||||||
rules: [{
|
|
||||||
required: true,
|
|
||||||
message: '此项为必填项'
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
renderFormItem: function renderFormItem() {
|
|
||||||
return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, null), "\uFF080~100\uFF09");
|
|
||||||
},
|
|
||||||
width: 'm'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
arr.push({
|
|
||||||
title: '灵敏度:',
|
|
||||||
dataIndex: 'sensitivity',
|
|
||||||
formItemProps: {
|
|
||||||
rules: [{
|
|
||||||
required: true,
|
|
||||||
message: '此项为必填项'
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
renderFormItem: function renderFormItem() {
|
|
||||||
return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, null), "\uFF080~100\uFF09");
|
|
||||||
},
|
|
||||||
width: 'm'
|
|
||||||
});
|
|
||||||
return arr;
|
|
||||||
};
|
|
||||||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BetaSchemaForm, _extends({
|
|
||||||
width: 600
|
|
||||||
// @ts-ignore
|
|
||||||
,
|
|
||||||
title: SCHEME_TYPE_LIST.get(type),
|
|
||||||
shouldUpdate: false,
|
|
||||||
layoutType: "ModalForm",
|
|
||||||
layout: "horizontal",
|
|
||||||
labelCol: {
|
|
||||||
span: 6
|
|
||||||
},
|
|
||||||
wrapperCol: {
|
|
||||||
span: 18
|
|
||||||
},
|
|
||||||
preserve: false,
|
|
||||||
modalProps: {
|
|
||||||
destroyOnClose: true
|
|
||||||
},
|
|
||||||
onFinish: onFinish,
|
|
||||||
columns: getColumnsByType(type)
|
|
||||||
}, props)));
|
|
||||||
};
|
|
||||||
export default SchemaFormModal;
|
|
@ -1,8 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import type { ParamsType, ProTableProps } from '@ant-design/pro-components';
|
|
||||||
import { AnyObject } from 'antd/es/_util/type';
|
|
||||||
export interface TimeTemplateTableProps<DataSource, Params extends ParamsType = ParamsType, ValueType = "text"> extends ProTableProps<DataSource, Params, ValueType> {
|
|
||||||
onItemBlur?: (value?: number | string, id?: any, record?: any) => void;
|
|
||||||
}
|
|
||||||
declare const TimeTemplateTable: <DataSource extends AnyObject = AnyObject>(props: TimeTemplateTableProps<DataSource, ParamsType, "text">) => React.JSX.Element;
|
|
||||||
export default TimeTemplateTable;
|
|
@ -1,47 +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 { ProTable } from '@ant-design/pro-components';
|
|
||||||
import { InputNumber } from 'antd';
|
|
||||||
var TimeTemplateTable = function TimeTemplateTable(props) {
|
|
||||||
var onItemBlur = props.onItemBlur;
|
|
||||||
var columns = [{
|
|
||||||
title: '模板名称',
|
|
||||||
dataIndex: 'templateName'
|
|
||||||
}, {
|
|
||||||
title: '运行周期',
|
|
||||||
dataIndex: 'runCycle'
|
|
||||||
}, {
|
|
||||||
title: '布控星期',
|
|
||||||
dataIndex: 'arrangeDay'
|
|
||||||
}, {
|
|
||||||
title: '算力占用',
|
|
||||||
dataIndex: 'powerOccupy'
|
|
||||||
}, {
|
|
||||||
title: '配置路数',
|
|
||||||
key: 'option',
|
|
||||||
valueType: 'option',
|
|
||||||
render: function render(_, record) {
|
|
||||||
return /*#__PURE__*/React.createElement(InputNumber, {
|
|
||||||
value: record.lineNum,
|
|
||||||
onBlur: function onBlur(e) {
|
|
||||||
return onItemBlur === null || onItemBlur === void 0 ? void 0 : onItemBlur(e.target.value, record.id, record);
|
|
||||||
},
|
|
||||||
min: 0
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
return /*#__PURE__*/React.createElement(ProTable, _extends({
|
|
||||||
columns: columns,
|
|
||||||
bordered: true,
|
|
||||||
scroll: {
|
|
||||||
y: 95
|
|
||||||
},
|
|
||||||
toolbar: undefined,
|
|
||||||
rowKey: "id",
|
|
||||||
search: false,
|
|
||||||
options: false,
|
|
||||||
pagination: false,
|
|
||||||
dataSource: []
|
|
||||||
}, props));
|
|
||||||
};
|
|
||||||
export default TimeTemplateTable;
|
|
@ -1,3 +0,0 @@
|
|||||||
import TimeTemplateTable from './TimeTemplateTable';
|
|
||||||
export type { TimeTemplateTableProps } from './TimeTemplateTable';
|
|
||||||
export default TimeTemplateTable;
|
|
@ -1,2 +0,0 @@
|
|||||||
import TimeTemplateTable from "./TimeTemplateTable";
|
|
||||||
export default TimeTemplateTable;
|
|
@ -1,5 +0,0 @@
|
|||||||
import AlgorithmConfig from './algorithmConfig';
|
|
||||||
export type { AlgorithmConfigProps, AlgorithmConfigRef } from './algorithmConfig';
|
|
||||||
export type { AlgorithmTableProps } from './components/algorithmTable';
|
|
||||||
export type { TimeTemplateTableProps } from './components/timeTemplateTable';
|
|
||||||
export default AlgorithmConfig;
|
|
@ -1,2 +0,0 @@
|
|||||||
import AlgorithmConfig from "./algorithmConfig";
|
|
||||||
export default AlgorithmConfig;
|
|
@ -1,8 +0,0 @@
|
|||||||
import { FC } from 'react';
|
|
||||||
import { ModalProps } from "antd";
|
|
||||||
import { AlgorithmConfigProps } from '../algorithmConfig/algorithmConfig';
|
|
||||||
export interface AlgorithmConfigModalProps extends ModalProps {
|
|
||||||
algorithmConfigProps: AlgorithmConfigProps;
|
|
||||||
}
|
|
||||||
declare const AlgorithmConfigModal: FC<AlgorithmConfigModalProps>;
|
|
||||||
export default AlgorithmConfigModal;
|
|
@ -1,22 +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 { ConfigProvider, Modal } from "antd";
|
|
||||||
import AlgorithmConfig from "../algorithmConfig/algorithmConfig";
|
|
||||||
var AlgorithmConfigModal = function AlgorithmConfigModal(props) {
|
|
||||||
var algorithmConfigProps = props.algorithmConfigProps;
|
|
||||||
return /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
||||||
theme: {
|
|
||||||
components: {
|
|
||||||
Modal: {
|
|
||||||
headerBg: '#EFF2F4',
|
|
||||||
footerBg: '#EFF2F4',
|
|
||||||
contentBg: '#EFF2F4'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement(Modal, _extends({
|
|
||||||
okText: "\u786E\u5B9A",
|
|
||||||
cancelText: "\u53D6\u6D88"
|
|
||||||
}, props), /*#__PURE__*/React.createElement(AlgorithmConfig, algorithmConfigProps)));
|
|
||||||
};
|
|
||||||
export default AlgorithmConfigModal;
|
|
@ -1,2 +0,0 @@
|
|||||||
import AlgorithmConfigModal from './algorithmConfigModal';
|
|
||||||
export default AlgorithmConfigModal;
|
|
@ -1,2 +0,0 @@
|
|||||||
import AlgorithmConfigModal from "./algorithmConfigModal";
|
|
||||||
export default AlgorithmConfigModal;
|
|
@ -1,7 +0,0 @@
|
|||||||
export { default as AlgorithmConfigModal } from "./algorithmConfigModal";
|
|
||||||
export { default as AlgorithmConfig } from "./algorithmConfig";
|
|
||||||
export { default as Login } from "./login";
|
|
||||||
export { default as Password } from "./password";
|
|
||||||
export { default as CenterLink } from "./centerLink";
|
|
||||||
export { default as SchemaFormModal } from "./algorithmConfig/components/schemaFormModal";
|
|
||||||
export * from 'rc-util';
|
|
@ -1,125 +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; }
|
|
||||||
/**
|
|
||||||
* Created by jiangzhixiong on 2024/03/18
|
|
||||||
*/
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import { Button, Checkbox, Flex, Form, Image, Input, theme } from 'antd';
|
|
||||||
import { HomeOutlined } from '@ant-design/icons';
|
|
||||||
import { isNumber } from '@zhst/func';
|
|
||||||
import "./index.less";
|
|
||||||
var materialName = 'zhst-material-login';
|
|
||||||
var useToken = theme.useToken;
|
|
||||||
var Login = function Login(props) {
|
|
||||||
var title = props.title,
|
|
||||||
onIconClick = props.onIconClick,
|
|
||||||
_props$rememberPasswo = props.rememberPassword,
|
|
||||||
rememberPassword = _props$rememberPasswo === void 0 ? true : _props$rememberPasswo,
|
|
||||||
imageUrl = props.imageUrl,
|
|
||||||
width = props.width,
|
|
||||||
height = props.height,
|
|
||||||
onFinish = props.onFinish;
|
|
||||||
var _Form$useForm = Form.useForm(),
|
|
||||||
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
||||||
form = _Form$useForm2[0];
|
|
||||||
var _useToken = useToken(),
|
|
||||||
token = _useToken.token;
|
|
||||||
console.log('width', width);
|
|
||||||
return /*#__PURE__*/React.createElement(Flex, {
|
|
||||||
className: materialName,
|
|
||||||
style: {
|
|
||||||
width: isNumber(width) ? "".concat(width, "px") : width,
|
|
||||||
height: isNumber(height) ? "".concat(height, "px") : height
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement(Flex, {
|
|
||||||
align: "center",
|
|
||||||
justify: "center",
|
|
||||||
style: {
|
|
||||||
position: 'relative',
|
|
||||||
width: '40%',
|
|
||||||
padding: "30px"
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement(HomeOutlined, {
|
|
||||||
onClick: onIconClick,
|
|
||||||
style: {
|
|
||||||
position: 'absolute',
|
|
||||||
top: '30px',
|
|
||||||
left: '30px',
|
|
||||||
fontSize: "".concat(token.sizeLG, "px"),
|
|
||||||
cursor: 'pointer'
|
|
||||||
}
|
|
||||||
}), /*#__PURE__*/React.createElement("div", {
|
|
||||||
style: {
|
|
||||||
width: '56%'
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement("h2", {
|
|
||||||
style: {
|
|
||||||
margin: '30px 0',
|
|
||||||
fontSize: '30px'
|
|
||||||
}
|
|
||||||
}, title), /*#__PURE__*/React.createElement(Form, {
|
|
||||||
layout: "vertical",
|
|
||||||
form: form,
|
|
||||||
onFinish: onFinish
|
|
||||||
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
||||||
name: "account",
|
|
||||||
label: "\u8D26\u53F7",
|
|
||||||
rules: [{
|
|
||||||
required: true,
|
|
||||||
message: '请输入账号!'
|
|
||||||
}]
|
|
||||||
}, /*#__PURE__*/React.createElement(Input, {
|
|
||||||
placeholder: "\u8BF7\u8F93\u5165\u8D26\u53F7",
|
|
||||||
variant: "borderless",
|
|
||||||
style: {
|
|
||||||
border: 'none',
|
|
||||||
borderBottom: '1px solid rgba(0, 0, 0, 0.06)'
|
|
||||||
}
|
|
||||||
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
||||||
name: "password",
|
|
||||||
label: "\u5BC6\u7801",
|
|
||||||
rules: [{
|
|
||||||
required: true,
|
|
||||||
message: '请输入密码!'
|
|
||||||
}]
|
|
||||||
}, /*#__PURE__*/React.createElement(Input.Password, {
|
|
||||||
placeholder: "\u8BF7\u8F93\u5165\u5BC6\u7801",
|
|
||||||
variant: "borderless",
|
|
||||||
style: {
|
|
||||||
border: 'none',
|
|
||||||
borderBottom: '1px solid rgba(0, 0, 0, 0.06)'
|
|
||||||
}
|
|
||||||
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
||||||
style: {
|
|
||||||
display: rememberPassword ? 'block' : 'none'
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
||||||
name: "remember",
|
|
||||||
valuePropName: "checked",
|
|
||||||
noStyle: true
|
|
||||||
}, /*#__PURE__*/React.createElement(Checkbox, null, "\u8BB0\u4F4F\u5BC6\u7801"))), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
|
|
||||||
block: true,
|
|
||||||
type: "primary",
|
|
||||||
htmlType: "submit"
|
|
||||||
}, "\u767B\u5F55"))))), /*#__PURE__*/React.createElement("div", {
|
|
||||||
style: {
|
|
||||||
width: '60%',
|
|
||||||
height: '100%'
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement(Image, {
|
|
||||||
style: {
|
|
||||||
width: '100%'
|
|
||||||
},
|
|
||||||
src: imageUrl,
|
|
||||||
width: '100%',
|
|
||||||
height: '100%',
|
|
||||||
preview: false,
|
|
||||||
fallback: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="
|
|
||||||
})));
|
|
||||||
};
|
|
||||||
export default Login;
|
|
Binary file not shown.
Before Width: | Height: | Size: 1024 KiB |
Binary file not shown.
Before Width: | Height: | Size: 921 KiB |
Binary file not shown.
Before Width: | Height: | Size: 845 KiB |
2
packages/material/es/login/index.d.ts
vendored
2
packages/material/es/login/index.d.ts
vendored
@ -1,2 +0,0 @@
|
|||||||
import Login from './Login';
|
|
||||||
export default Login;
|
|
@ -1,2 +0,0 @@
|
|||||||
import Login from "./Login";
|
|
||||||
export default Login;
|
|
11
packages/material/es/password/Password.d.ts
vendored
11
packages/material/es/password/Password.d.ts
vendored
@ -1,11 +0,0 @@
|
|||||||
/**
|
|
||||||
* Created by jiangzhixiong on 2024/03/18
|
|
||||||
*/
|
|
||||||
import { FC } from 'react';
|
|
||||||
import { FormProps } from 'antd';
|
|
||||||
interface PasswordProps {
|
|
||||||
onFinish: FormProps['onFinish'];
|
|
||||||
onCancel: () => void;
|
|
||||||
}
|
|
||||||
declare const Password: FC<PasswordProps>;
|
|
||||||
export default Password;
|
|
@ -1,101 +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; }
|
|
||||||
/**
|
|
||||||
* Created by jiangzhixiong on 2024/03/18
|
|
||||||
*/
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import { Button, Form, Input, Space } from 'antd';
|
|
||||||
var Password = function Password(props) {
|
|
||||||
var onFinish = props.onFinish,
|
|
||||||
onCancel = props.onCancel;
|
|
||||||
var _Form$useForm = Form.useForm(),
|
|
||||||
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
||||||
form = _Form$useForm2[0];
|
|
||||||
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h2", {
|
|
||||||
style: {
|
|
||||||
marginTop: '0',
|
|
||||||
fontSize: '20px'
|
|
||||||
}
|
|
||||||
}, "\u4FEE\u6539\u5BC6\u7801"), /*#__PURE__*/React.createElement(Form, {
|
|
||||||
labelCol: {
|
|
||||||
span: 4
|
|
||||||
},
|
|
||||||
wrapperCol: {
|
|
||||||
span: 20
|
|
||||||
},
|
|
||||||
form: form,
|
|
||||||
onFinish: onFinish
|
|
||||||
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
||||||
name: "password",
|
|
||||||
label: "\u539F\u5BC6\u7801",
|
|
||||||
rules: [{
|
|
||||||
required: true,
|
|
||||||
message: '请输入密码!'
|
|
||||||
}]
|
|
||||||
}, /*#__PURE__*/React.createElement(Input.Password, {
|
|
||||||
variant: "borderless",
|
|
||||||
style: {
|
|
||||||
border: 'none',
|
|
||||||
borderBottom: '1px solid rgba(0, 0, 0, 0.06)'
|
|
||||||
}
|
|
||||||
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
||||||
name: "newPassword",
|
|
||||||
label: "\u65B0\u5BC6\u7801",
|
|
||||||
rules: [{
|
|
||||||
required: true,
|
|
||||||
message: '请输入新密码!'
|
|
||||||
}]
|
|
||||||
}, /*#__PURE__*/React.createElement(Input.Password, {
|
|
||||||
variant: "borderless",
|
|
||||||
style: {
|
|
||||||
border: 'none',
|
|
||||||
borderBottom: '1px solid rgba(0, 0, 0, 0.06)'
|
|
||||||
}
|
|
||||||
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
||||||
name: "rePassword",
|
|
||||||
label: "\u786E\u8BA4\u5BC6\u7801",
|
|
||||||
dependencies: ['password'],
|
|
||||||
rules: [{
|
|
||||||
required: true,
|
|
||||||
message: '请再次输入密码!'
|
|
||||||
}, function (_ref) {
|
|
||||||
var getFieldValue = _ref.getFieldValue;
|
|
||||||
return {
|
|
||||||
validator: function validator(_, value) {
|
|
||||||
if (!value || getFieldValue('password') === value) {
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error('两次输入的密码不一致!'));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}]
|
|
||||||
}, /*#__PURE__*/React.createElement(Input.Password, {
|
|
||||||
variant: "borderless",
|
|
||||||
style: {
|
|
||||||
border: 'none',
|
|
||||||
borderBottom: '1px solid rgba(0, 0, 0, 0.06)'
|
|
||||||
}
|
|
||||||
})), /*#__PURE__*/React.createElement("div", {
|
|
||||||
style: {
|
|
||||||
textAlign: 'right'
|
|
||||||
}
|
|
||||||
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
||||||
htmlType: "reset",
|
|
||||||
onClick: onCancel,
|
|
||||||
style: {
|
|
||||||
width: '100px'
|
|
||||||
}
|
|
||||||
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
||||||
type: "primary",
|
|
||||||
htmlType: "submit",
|
|
||||||
style: {
|
|
||||||
width: '100px'
|
|
||||||
}
|
|
||||||
}, "\u786E\u8BA4")))));
|
|
||||||
};
|
|
||||||
export default Password;
|
|
2
packages/material/es/password/index.d.ts
vendored
2
packages/material/es/password/index.d.ts
vendored
@ -1,2 +0,0 @@
|
|||||||
import Password from './Password';
|
|
||||||
export default Password;
|
|
@ -1,2 +0,0 @@
|
|||||||
import Password from "./Password";
|
|
||||||
export default Password;
|
|
2
packages/material/es/utils/base64Images.d.ts
vendored
2
packages/material/es/utils/base64Images.d.ts
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
packages/material/es/utils/index.d.ts
vendored
1
packages/material/es/utils/index.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
export declare const createAElement: (url: string, isBlank: boolean) => void;
|
|
@ -1,14 +0,0 @@
|
|||||||
// 可应用于页面跳转以及文件下载
|
|
||||||
// 第一个参数:文件的下载路径/要跳转页面的路径(可携带参数)
|
|
||||||
// 第二个参数:是否新打开一个页面,true为新开一个页面,false是在当前页面进行操作;
|
|
||||||
export var createAElement = function createAElement(url, isBlank) {
|
|
||||||
var newLink = document.createElement('a');
|
|
||||||
newLink.className = 'create-link';
|
|
||||||
newLink.href = url;
|
|
||||||
if (isBlank) {
|
|
||||||
newLink.target = '_blank';
|
|
||||||
}
|
|
||||||
document.body.appendChild(newLink);
|
|
||||||
newLink.click();
|
|
||||||
document.body.removeChild(newLink);
|
|
||||||
};
|
|
1
packages/material/es/utils/types.d.ts
vendored
1
packages/material/es/utils/types.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
export type AnyObject = Record<PropertyKey, any>;
|
|
@ -1 +0,0 @@
|
|||||||
export {};
|
|
@ -1,110 +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/algorithmConfig/algorithmConfig.tsx
|
|
||||||
var algorithmConfig_exports = {};
|
|
||||||
__export(algorithmConfig_exports, {
|
|
||||||
default: () => algorithmConfig_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(algorithmConfig_exports);
|
|
||||||
var import_react = __toESM(require("react"));
|
|
||||||
var import_antd = require("antd");
|
|
||||||
var import_theme = __toESM(require("antd/es/theme"));
|
|
||||||
var import_meta = require("@zhst/meta");
|
|
||||||
var import_base64Images = require("../utils/base64Images");
|
|
||||||
var import_algorithmTable = __toESM(require("./components/algorithmTable"));
|
|
||||||
var import_timeTemplateTable = __toESM(require("./components/timeTemplateTable"));
|
|
||||||
var { useToken } = import_theme.default;
|
|
||||||
var Title = (props) => /* @__PURE__ */ import_react.default.createElement("h2", { style: { margin: "18px 16px", fontSize: "14px", color: "rgba(0, 0, 0, 0.88)" } }, props.children);
|
|
||||||
var AlgorithmConfig = (0, import_react.forwardRef)((props) => {
|
|
||||||
const {
|
|
||||||
algorithmTableDataSource = [],
|
|
||||||
timeTemplateDataSource = [],
|
|
||||||
boxList = [],
|
|
||||||
drawListener,
|
|
||||||
cropperImageProps = {},
|
|
||||||
algorithmTableProps,
|
|
||||||
timeTemplateTableProps,
|
|
||||||
selectedKey,
|
|
||||||
type = "multiple",
|
|
||||||
rowKey = "id",
|
|
||||||
onSelect,
|
|
||||||
title = "盒子名称"
|
|
||||||
} = props;
|
|
||||||
const { token } = useToken();
|
|
||||||
const { type: cropType } = cropperImageProps;
|
|
||||||
return /* @__PURE__ */ import_react.default.createElement(import_antd.Flex, { style: { border: `1px solid ${token.colorBorder}`, backgroundColor: token.colorBgBase } }, /* @__PURE__ */ import_react.default.createElement("div", { title, style: { width: "13.9%" } }, /* @__PURE__ */ import_react.default.createElement(Title, null, title), /* @__PURE__ */ import_react.default.createElement("div", { style: { borderTop: `1px solid ${token.colorBorder}` } }, boxList.map((item) => {
|
|
||||||
return /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
"p",
|
|
||||||
{
|
|
||||||
key: item.id,
|
|
||||||
onClick: () => onSelect == null ? void 0 : onSelect(item.id, item),
|
|
||||||
style: {
|
|
||||||
margin: 0,
|
|
||||||
padding: `${token.paddingXXS}px ${token.paddingLG}px`,
|
|
||||||
cursor: "pointer",
|
|
||||||
// @ts-ignore
|
|
||||||
color: selectedKey === item[rowKey] ? token.colorPrimary : token.colorText,
|
|
||||||
// @ts-ignore
|
|
||||||
backgroundColor: selectedKey === item[rowKey] ? token.blue1 : token.colorBgBase,
|
|
||||||
transition: "0cancelDraw.2s ease"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
item.name
|
|
||||||
);
|
|
||||||
}))), /* @__PURE__ */ import_react.default.createElement("div", { style: { boxSizing: "border-box", width: "46.3%", textAlign: "center", borderLeft: `1px solid ${token.colorBorder}`, borderRight: `1px solid ${token.colorBorder}` } }, type === "single" ? /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_meta.CropperImage,
|
|
||||||
{
|
|
||||||
type: "line",
|
|
||||||
onCropEnd: drawListener,
|
|
||||||
...cropperImageProps
|
|
||||||
}
|
|
||||||
) : /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: "84px" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.Image,
|
|
||||||
{
|
|
||||||
width: "62.5%",
|
|
||||||
src: import_base64Images.AlgorithmConfigImg,
|
|
||||||
preview: false,
|
|
||||||
fallback: import_base64Images.ErrorImage
|
|
||||||
}
|
|
||||||
), /* @__PURE__ */ import_react.default.createElement("h2", null, "请进行批量配置"), /* @__PURE__ */ import_react.default.createElement("ul", { style: { display: "inline-block", paddingLeft: 0, width: "51.8%", listStyle: "none", textAlign: "left", color: token.colorTextLabel } }, /* @__PURE__ */ import_react.default.createElement("li", null, "· 盒子批量配置仅支持同型号盒子;"), /* @__PURE__ */ import_react.default.createElement("li", null, "· 采取覆盖式更新,不保留原有配置,且预警检测框默认全屏范围;"), /* @__PURE__ */ import_react.default.createElement("li", null, "· 人流量统计默认检测线为屏幕中央横向线条,且箭头指向下方;"), /* @__PURE__ */ import_react.default.createElement("li", null, "· 优先选择拉流正常的摄像头。")))), /* @__PURE__ */ import_react.default.createElement("div", { style: { width: "39.8%" } }, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(Title, null, "时间模板"), /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: `${token.paddingMD}px ${token.paddingSM}px`, borderTop: `1px solid ${token.colorBorder}`, borderBottom: `1px solid ${token.colorBorder}` } }, /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_timeTemplateTable.default,
|
|
||||||
{
|
|
||||||
dataSource: timeTemplateDataSource,
|
|
||||||
...timeTemplateTableProps
|
|
||||||
}
|
|
||||||
))), /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(Title, null, "算法应用"), /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: `${token.paddingMD}px ${token.paddingSM}px`, borderTop: `1px solid ${token.colorBorder}` } }, /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_algorithmTable.default,
|
|
||||||
{
|
|
||||||
dataSource: algorithmTableDataSource,
|
|
||||||
tableType: type,
|
|
||||||
...algorithmTableProps
|
|
||||||
}
|
|
||||||
)))));
|
|
||||||
});
|
|
||||||
var algorithmConfig_default = AlgorithmConfig;
|
|
@ -1,126 +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/algorithmConfig/components/algorithmTable/AlgorithmTable.tsx
|
|
||||||
var AlgorithmTable_exports = {};
|
|
||||||
__export(AlgorithmTable_exports, {
|
|
||||||
default: () => AlgorithmTable_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(AlgorithmTable_exports);
|
|
||||||
var import_react = __toESM(require("react"));
|
|
||||||
var import_icons = require("@ant-design/icons");
|
|
||||||
var import_pro_components = require("@ant-design/pro-components");
|
|
||||||
var import_antd = require("antd");
|
|
||||||
var import_theme = __toESM(require("antd/es/theme"));
|
|
||||||
var import_schemaFormModal = __toESM(require("../schemaFormModal"));
|
|
||||||
var { useToken } = import_theme.default;
|
|
||||||
var AlgorithmTable = (props) => {
|
|
||||||
const {
|
|
||||||
onAddAlgorithm,
|
|
||||||
onItemSwitch,
|
|
||||||
onItemEdit,
|
|
||||||
onItemDelete,
|
|
||||||
onSortSelect,
|
|
||||||
selectedKey,
|
|
||||||
onDraw,
|
|
||||||
tableType = "multiple",
|
|
||||||
sortList = []
|
|
||||||
} = props;
|
|
||||||
const { token } = useToken();
|
|
||||||
const columns = [
|
|
||||||
{
|
|
||||||
title: "算法名称",
|
|
||||||
dataIndex: "templateName"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "运行周期",
|
|
||||||
dataIndex: "runCycle",
|
|
||||||
valueType: "select",
|
|
||||||
width: 80,
|
|
||||||
valueEnum: {
|
|
||||||
1: { text: "黑夜" },
|
|
||||||
0: { text: "白天" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "算力占用",
|
|
||||||
dataIndex: "powerOccupy"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "操作",
|
|
||||||
key: "option",
|
|
||||||
valueType: "option",
|
|
||||||
fixed: true,
|
|
||||||
render: (_DOM, record) => [
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(import_antd.Switch, { value: record.status, onChange: (_status) => onItemSwitch == null ? void 0 : onItemSwitch(_status, record.id, record) }),
|
|
||||||
/* @__PURE__ */ import_react.default.createElement("a", { onClick: () => onDraw == null ? void 0 : onDraw(record.id, record), style: { display: tableType === "single" ? "block" : "none" }, href: "#" }, /* @__PURE__ */ import_react.default.createElement(import_icons.ImportOutlined, null)),
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_schemaFormModal.default,
|
|
||||||
{
|
|
||||||
type: record.templateType,
|
|
||||||
onFinish: async (values) => onItemEdit == null ? void 0 : onItemEdit(values, record),
|
|
||||||
trigger: /* @__PURE__ */ import_react.default.createElement("a", { href: "#" }, /* @__PURE__ */ import_react.default.createElement(import_icons.EditFilled, null))
|
|
||||||
}
|
|
||||||
),
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.Popconfirm,
|
|
||||||
{
|
|
||||||
title: "确定删除吗?",
|
|
||||||
onConfirm: () => onItemDelete == null ? void 0 : onItemDelete(record.id, record)
|
|
||||||
},
|
|
||||||
/* @__PURE__ */ import_react.default.createElement("a", { href: "#" }, /* @__PURE__ */ import_react.default.createElement(import_icons.DeleteFilled, null))
|
|
||||||
)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
];
|
|
||||||
return /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_pro_components.ProTable,
|
|
||||||
{
|
|
||||||
columns,
|
|
||||||
bordered: true,
|
|
||||||
scroll: { y: 240 },
|
|
||||||
dataSource: [],
|
|
||||||
headerTitle: /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 16 }, /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.Select,
|
|
||||||
{
|
|
||||||
value: selectedKey,
|
|
||||||
style: { width: 320 },
|
|
||||||
onChange: onSortSelect,
|
|
||||||
options: sortList
|
|
||||||
}
|
|
||||||
), /* @__PURE__ */ import_react.default.createElement(import_icons.PlusCircleFilled, { onClick: () => onAddAlgorithm == null ? void 0 : onAddAlgorithm(), style: { fontSize: "24px", color: token.colorPrimary, cursor: "pointer" } })),
|
|
||||||
toolbar: void 0,
|
|
||||||
rowKey: "id",
|
|
||||||
search: false,
|
|
||||||
options: false,
|
|
||||||
pagination: false,
|
|
||||||
...props
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
var AlgorithmTable_default = AlgorithmTable;
|
|
@ -1,3 +0,0 @@
|
|||||||
import AlgorithmTable from './AlgorithmTable';
|
|
||||||
export type { AlgorithmTableProps } from './AlgorithmTable';
|
|
||||||
export default AlgorithmTable;
|
|
@ -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/algorithmConfig/components/algorithmTable/index.tsx
|
|
||||||
var algorithmTable_exports = {};
|
|
||||||
__export(algorithmTable_exports, {
|
|
||||||
default: () => algorithmTable_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(algorithmTable_exports);
|
|
||||||
var import_AlgorithmTable = __toESM(require("./AlgorithmTable"));
|
|
||||||
var algorithmTable_default = import_AlgorithmTable.default;
|
|
@ -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/algorithmConfig/components/schemaFormModal/index.tsx
|
|
||||||
var schemaFormModal_exports = {};
|
|
||||||
__export(schemaFormModal_exports, {
|
|
||||||
default: () => schemaFormModal_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(schemaFormModal_exports);
|
|
||||||
var import_schemaFormModal = __toESM(require("./schemaFormModal"));
|
|
||||||
var schemaFormModal_default = import_schemaFormModal.default;
|
|
@ -1,8 +0,0 @@
|
|||||||
import { FC } from 'react';
|
|
||||||
import type { ModalFormProps } from '@ant-design/pro-components';
|
|
||||||
export interface SchemaFormModalProps extends ModalFormProps {
|
|
||||||
type: 'fire' | 'smoke' | 'traffic' | 'face' | 'destroy' | 'wander' | 'gather' | 'cameraBlock';
|
|
||||||
}
|
|
||||||
export declare const SCHEME_TYPE_LIST: Map<string, string>;
|
|
||||||
declare const SchemaFormModal: FC<SchemaFormModalProps>;
|
|
||||||
export default SchemaFormModal;
|
|
@ -1,173 +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/algorithmConfig/components/schemaFormModal/schemaFormModal.tsx
|
|
||||||
var schemaFormModal_exports = {};
|
|
||||||
__export(schemaFormModal_exports, {
|
|
||||||
SCHEME_TYPE_LIST: () => SCHEME_TYPE_LIST,
|
|
||||||
default: () => schemaFormModal_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(schemaFormModal_exports);
|
|
||||||
var import_react = __toESM(require("react"));
|
|
||||||
var import_pro_components = require("@ant-design/pro-components");
|
|
||||||
var import_antd = require("antd");
|
|
||||||
var SCHEME_TYPE_LIST = /* @__PURE__ */ new Map([
|
|
||||||
["fire", "火焰识别"],
|
|
||||||
["smoke", "烟雾识别"],
|
|
||||||
["traffic", "人流量统计"],
|
|
||||||
["face", "面部遮挡识别"],
|
|
||||||
["destroy", "人员破坏识别"],
|
|
||||||
["wander", "人员徘徊识别"],
|
|
||||||
["gather", "人员聚集识别"],
|
|
||||||
["cameraBlock", "摄像头遮挡识别"]
|
|
||||||
]);
|
|
||||||
var SchemaFormModal = (props) => {
|
|
||||||
const {
|
|
||||||
type = "fire",
|
|
||||||
onFinish
|
|
||||||
} = props;
|
|
||||||
const getColumnsByType = (type2) => {
|
|
||||||
if (!type2)
|
|
||||||
return [];
|
|
||||||
let arr = [];
|
|
||||||
if (type2 === "gather") {
|
|
||||||
arr.push({
|
|
||||||
title: "预警人数:",
|
|
||||||
dataIndex: "alarmMember",
|
|
||||||
formItemProps: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "此项为必填项"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
renderFormItem: () => /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null), "人(3~10)"),
|
|
||||||
width: "m"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (type2 === "cameraBlock") {
|
|
||||||
arr.push({
|
|
||||||
title: "遮挡百分比:",
|
|
||||||
dataIndex: "blockPercent",
|
|
||||||
formItemProps: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "此项为必填项"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
renderFormItem: () => /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null), "%(30~80)"),
|
|
||||||
width: "m"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (type2 !== "traffic") {
|
|
||||||
arr.push({
|
|
||||||
title: "最短持续时间:",
|
|
||||||
dataIndex: "minTime",
|
|
||||||
formItemProps: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "此项为必填项"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
renderFormItem: () => /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null), "秒(2~10)"),
|
|
||||||
width: "m"
|
|
||||||
});
|
|
||||||
arr.push({
|
|
||||||
title: "报警间隔时间:",
|
|
||||||
dataIndex: "alarmTime",
|
|
||||||
formItemProps: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "此项为必填项"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
renderFormItem: () => /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null), "秒(10~600)"),
|
|
||||||
width: "m"
|
|
||||||
});
|
|
||||||
} else if (type2 === "traffic") {
|
|
||||||
arr.push({
|
|
||||||
title: "灵敏度:",
|
|
||||||
dataIndex: "sensitivity",
|
|
||||||
formItemProps: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "此项为必填项"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
renderFormItem: () => /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null), "(0~100)"),
|
|
||||||
width: "m"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
arr.push({
|
|
||||||
title: "灵敏度:",
|
|
||||||
dataIndex: "sensitivity",
|
|
||||||
formItemProps: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "此项为必填项"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
renderFormItem: () => /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null), "(0~100)"),
|
|
||||||
width: "m"
|
|
||||||
});
|
|
||||||
return arr;
|
|
||||||
};
|
|
||||||
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_pro_components.BetaSchemaForm,
|
|
||||||
{
|
|
||||||
width: 600,
|
|
||||||
title: SCHEME_TYPE_LIST.get(type),
|
|
||||||
shouldUpdate: false,
|
|
||||||
layoutType: "ModalForm",
|
|
||||||
layout: "horizontal",
|
|
||||||
labelCol: { span: 6 },
|
|
||||||
wrapperCol: { span: 18 },
|
|
||||||
preserve: false,
|
|
||||||
modalProps: { destroyOnClose: true },
|
|
||||||
onFinish,
|
|
||||||
columns: getColumnsByType(type),
|
|
||||||
...props
|
|
||||||
}
|
|
||||||
));
|
|
||||||
};
|
|
||||||
var schemaFormModal_default = SchemaFormModal;
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
SCHEME_TYPE_LIST
|
|
||||||
});
|
|
@ -1,8 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import type { ParamsType, ProTableProps } from '@ant-design/pro-components';
|
|
||||||
import { AnyObject } from 'antd/es/_util/type';
|
|
||||||
export interface TimeTemplateTableProps<DataSource, Params extends ParamsType = ParamsType, ValueType = "text"> extends ProTableProps<DataSource, Params, ValueType> {
|
|
||||||
onItemBlur?: (value?: number | string, id?: any, record?: any) => void;
|
|
||||||
}
|
|
||||||
declare const TimeTemplateTable: <DataSource extends AnyObject = AnyObject>(props: TimeTemplateTableProps<DataSource, ParamsType, "text">) => React.JSX.Element;
|
|
||||||
export default TimeTemplateTable;
|
|
@ -1,82 +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/algorithmConfig/components/timeTemplateTable/TimeTemplateTable.tsx
|
|
||||||
var TimeTemplateTable_exports = {};
|
|
||||||
__export(TimeTemplateTable_exports, {
|
|
||||||
default: () => TimeTemplateTable_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(TimeTemplateTable_exports);
|
|
||||||
var import_react = __toESM(require("react"));
|
|
||||||
var import_pro_components = require("@ant-design/pro-components");
|
|
||||||
var import_antd = require("antd");
|
|
||||||
var TimeTemplateTable = (props) => {
|
|
||||||
const {
|
|
||||||
onItemBlur
|
|
||||||
} = props;
|
|
||||||
const columns = [
|
|
||||||
{
|
|
||||||
title: "模板名称",
|
|
||||||
dataIndex: "templateName"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "运行周期",
|
|
||||||
dataIndex: "runCycle"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "布控星期",
|
|
||||||
dataIndex: "arrangeDay"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "算力占用",
|
|
||||||
dataIndex: "powerOccupy"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "配置路数",
|
|
||||||
key: "option",
|
|
||||||
valueType: "option",
|
|
||||||
render: (_, record) => /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, { value: record.lineNum, onBlur: (e) => onItemBlur == null ? void 0 : onItemBlur(e.target.value, record.id, record), min: 0 })
|
|
||||||
}
|
|
||||||
];
|
|
||||||
return /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_pro_components.ProTable,
|
|
||||||
{
|
|
||||||
columns,
|
|
||||||
bordered: true,
|
|
||||||
scroll: { y: 95 },
|
|
||||||
toolbar: void 0,
|
|
||||||
rowKey: "id",
|
|
||||||
search: false,
|
|
||||||
options: false,
|
|
||||||
pagination: false,
|
|
||||||
dataSource: [],
|
|
||||||
...props
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
var TimeTemplateTable_default = TimeTemplateTable;
|
|
@ -1,3 +0,0 @@
|
|||||||
import TimeTemplateTable from './TimeTemplateTable';
|
|
||||||
export type { TimeTemplateTableProps } from './TimeTemplateTable';
|
|
||||||
export default TimeTemplateTable;
|
|
@ -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/algorithmConfig/components/timeTemplateTable/index.tsx
|
|
||||||
var timeTemplateTable_exports = {};
|
|
||||||
__export(timeTemplateTable_exports, {
|
|
||||||
default: () => timeTemplateTable_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(timeTemplateTable_exports);
|
|
||||||
var import_TimeTemplateTable = __toESM(require("./TimeTemplateTable"));
|
|
||||||
var timeTemplateTable_default = import_TimeTemplateTable.default;
|
|
@ -1,5 +0,0 @@
|
|||||||
import AlgorithmConfig from './algorithmConfig';
|
|
||||||
export type { AlgorithmConfigProps, AlgorithmConfigRef } from './algorithmConfig';
|
|
||||||
export type { AlgorithmTableProps } from './components/algorithmTable';
|
|
||||||
export type { TimeTemplateTableProps } from './components/timeTemplateTable';
|
|
||||||
export default AlgorithmConfig;
|
|
@ -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/algorithmConfig/index.tsx
|
|
||||||
var algorithmConfig_exports = {};
|
|
||||||
__export(algorithmConfig_exports, {
|
|
||||||
default: () => algorithmConfig_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(algorithmConfig_exports);
|
|
||||||
var import_algorithmConfig = __toESM(require("./algorithmConfig"));
|
|
||||||
var algorithmConfig_default = import_algorithmConfig.default;
|
|
@ -1,8 +0,0 @@
|
|||||||
import { FC } from 'react';
|
|
||||||
import { ModalProps } from "antd";
|
|
||||||
import { AlgorithmConfigProps } from '../algorithmConfig/algorithmConfig';
|
|
||||||
export interface AlgorithmConfigModalProps extends ModalProps {
|
|
||||||
algorithmConfigProps: AlgorithmConfigProps;
|
|
||||||
}
|
|
||||||
declare const AlgorithmConfigModal: FC<AlgorithmConfigModalProps>;
|
|
||||||
export default AlgorithmConfigModal;
|
|
@ -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/algorithmConfigModal/algorithmConfigModal.tsx
|
|
||||||
var algorithmConfigModal_exports = {};
|
|
||||||
__export(algorithmConfigModal_exports, {
|
|
||||||
default: () => algorithmConfigModal_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(algorithmConfigModal_exports);
|
|
||||||
var import_react = __toESM(require("react"));
|
|
||||||
var import_antd = require("antd");
|
|
||||||
var import_algorithmConfig = __toESM(require("../algorithmConfig/algorithmConfig"));
|
|
||||||
var AlgorithmConfigModal = (props) => {
|
|
||||||
const {
|
|
||||||
algorithmConfigProps
|
|
||||||
} = props;
|
|
||||||
return /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.ConfigProvider,
|
|
||||||
{
|
|
||||||
theme: {
|
|
||||||
components: {
|
|
||||||
Modal: {
|
|
||||||
headerBg: "#EFF2F4",
|
|
||||||
footerBg: "#EFF2F4",
|
|
||||||
contentBg: "#EFF2F4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.Modal,
|
|
||||||
{
|
|
||||||
okText: "确定",
|
|
||||||
cancelText: "取消",
|
|
||||||
...props
|
|
||||||
},
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_algorithmConfig.default,
|
|
||||||
{
|
|
||||||
...algorithmConfigProps
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
var algorithmConfigModal_default = AlgorithmConfigModal;
|
|
@ -1,2 +0,0 @@
|
|||||||
import AlgorithmConfigModal from './algorithmConfigModal';
|
|
||||||
export default AlgorithmConfigModal;
|
|
@ -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/algorithmConfigModal/index.tsx
|
|
||||||
var algorithmConfigModal_exports = {};
|
|
||||||
__export(algorithmConfigModal_exports, {
|
|
||||||
default: () => algorithmConfigModal_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(algorithmConfigModal_exports);
|
|
||||||
var import_algorithmConfigModal = __toESM(require("./algorithmConfigModal"));
|
|
||||||
var algorithmConfigModal_default = import_algorithmConfigModal.default;
|
|
@ -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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
||||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
||||||
// If the importer is in node compatibility mode or this is not an ESM
|
|
||||||
// file that has been converted to a CommonJS file using a Babel-
|
|
||||||
// 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/index.tsx
|
|
||||||
var src_exports = {};
|
|
||||||
__export(src_exports, {
|
|
||||||
AlgorithmConfig: () => import_algorithmConfig.default,
|
|
||||||
AlgorithmConfigModal: () => import_algorithmConfigModal.default,
|
|
||||||
CenterLink: () => import_centerLink.default,
|
|
||||||
Login: () => import_login.default,
|
|
||||||
Password: () => import_password.default,
|
|
||||||
SchemaFormModal: () => import_schemaFormModal.default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(src_exports);
|
|
||||||
var import_algorithmConfigModal = __toESM(require("./algorithmConfigModal"));
|
|
||||||
var import_algorithmConfig = __toESM(require("./algorithmConfig"));
|
|
||||||
var import_login = __toESM(require("./login"));
|
|
||||||
var import_password = __toESM(require("./password"));
|
|
||||||
var import_centerLink = __toESM(require("./centerLink"));
|
|
||||||
var import_schemaFormModal = __toESM(require("./algorithmConfig/components/schemaFormModal"));
|
|
||||||
__reExport(src_exports, require("rc-util"), module.exports);
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
AlgorithmConfig,
|
|
||||||
AlgorithmConfigModal,
|
|
||||||
CenterLink,
|
|
||||||
Login,
|
|
||||||
Password,
|
|
||||||
SchemaFormModal,
|
|
||||||
...require("rc-util")
|
|
||||||
});
|
|
@ -1,110 +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/login/Login.tsx
|
|
||||||
var Login_exports = {};
|
|
||||||
__export(Login_exports, {
|
|
||||||
default: () => Login_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(Login_exports);
|
|
||||||
var import_react = __toESM(require("react"));
|
|
||||||
var import_antd = require("antd");
|
|
||||||
var import_icons = require("@ant-design/icons");
|
|
||||||
var import_func = require("@zhst/func");
|
|
||||||
var import_index = require("./index.less");
|
|
||||||
var materialName = "zhst-material-login";
|
|
||||||
var { useToken } = import_antd.theme;
|
|
||||||
var Login = (props) => {
|
|
||||||
const {
|
|
||||||
title,
|
|
||||||
onIconClick,
|
|
||||||
rememberPassword = true,
|
|
||||||
imageUrl,
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
onFinish
|
|
||||||
} = props;
|
|
||||||
const [form] = import_antd.Form.useForm();
|
|
||||||
const { token } = useToken();
|
|
||||||
console.log("width", width);
|
|
||||||
return /* @__PURE__ */ import_react.default.createElement(import_antd.Flex, { className: materialName, style: { width: (0, import_func.isNumber)(width) ? `${width}px` : width, height: (0, import_func.isNumber)(height) ? `${height}px` : height } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Flex, { align: "center", justify: "center", style: { position: "relative", width: "40%", padding: `30px` } }, /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_icons.HomeOutlined,
|
|
||||||
{
|
|
||||||
onClick: onIconClick,
|
|
||||||
style: {
|
|
||||||
position: "absolute",
|
|
||||||
top: "30px",
|
|
||||||
left: "30px",
|
|
||||||
fontSize: `${token.sizeLG}px`,
|
|
||||||
cursor: "pointer"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
), /* @__PURE__ */ import_react.default.createElement("div", { style: { width: "56%" } }, /* @__PURE__ */ import_react.default.createElement("h2", { style: { margin: "30px 0", fontSize: "30px" } }, title), /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.Form,
|
|
||||||
{
|
|
||||||
layout: "vertical",
|
|
||||||
form,
|
|
||||||
onFinish
|
|
||||||
},
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.Form.Item,
|
|
||||||
{
|
|
||||||
name: "account",
|
|
||||||
label: "账号",
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: "请输入账号!" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(import_antd.Input, { placeholder: "请输入账号", variant: "borderless", style: { border: "none", borderBottom: "1px solid rgba(0, 0, 0, 0.06)" } })
|
|
||||||
),
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.Form.Item,
|
|
||||||
{
|
|
||||||
name: "password",
|
|
||||||
label: "密码",
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: "请输入密码!" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(import_antd.Input.Password, { placeholder: "请输入密码", variant: "borderless", style: { border: "none", borderBottom: "1px solid rgba(0, 0, 0, 0.06)" } })
|
|
||||||
),
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { style: { display: rememberPassword ? "block" : "none" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "remember", valuePropName: "checked", noStyle: true }, /* @__PURE__ */ import_react.default.createElement(import_antd.Checkbox, null, "记住密码"))),
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { block: true, type: "primary", htmlType: "submit" }, "登录"))
|
|
||||||
))), /* @__PURE__ */ import_react.default.createElement("div", { style: { width: "60%", height: "100%" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.Image,
|
|
||||||
{
|
|
||||||
style: { width: "100%" },
|
|
||||||
src: imageUrl,
|
|
||||||
width: "100%",
|
|
||||||
height: "100%",
|
|
||||||
preview: false,
|
|
||||||
fallback: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="
|
|
||||||
}
|
|
||||||
)));
|
|
||||||
};
|
|
||||||
var Login_default = Login;
|
|
Binary file not shown.
Before Width: | Height: | Size: 1024 KiB |
Binary file not shown.
Before Width: | Height: | Size: 921 KiB |
Binary file not shown.
Before Width: | Height: | Size: 845 KiB |
2
packages/material/lib/login/index.d.ts
vendored
2
packages/material/lib/login/index.d.ts
vendored
@ -1,2 +0,0 @@
|
|||||||
import Login from './Login';
|
|
||||||
export default Login;
|
|
@ -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/login/index.tsx
|
|
||||||
var login_exports = {};
|
|
||||||
__export(login_exports, {
|
|
||||||
default: () => login_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(login_exports);
|
|
||||||
var import_Login = __toESM(require("./Login"));
|
|
||||||
var login_default = import_Login.default;
|
|
11
packages/material/lib/password/Password.d.ts
vendored
11
packages/material/lib/password/Password.d.ts
vendored
@ -1,11 +0,0 @@
|
|||||||
/**
|
|
||||||
* Created by jiangzhixiong on 2024/03/18
|
|
||||||
*/
|
|
||||||
import { FC } from 'react';
|
|
||||||
import { FormProps } from 'antd';
|
|
||||||
interface PasswordProps {
|
|
||||||
onFinish: FormProps['onFinish'];
|
|
||||||
onCancel: () => void;
|
|
||||||
}
|
|
||||||
declare const Password: FC<PasswordProps>;
|
|
||||||
export default Password;
|
|
@ -1,96 +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/password/Password.tsx
|
|
||||||
var Password_exports = {};
|
|
||||||
__export(Password_exports, {
|
|
||||||
default: () => Password_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(Password_exports);
|
|
||||||
var import_react = __toESM(require("react"));
|
|
||||||
var import_antd = require("antd");
|
|
||||||
var Password = (props) => {
|
|
||||||
const {
|
|
||||||
onFinish,
|
|
||||||
onCancel
|
|
||||||
} = props;
|
|
||||||
const [form] = import_antd.Form.useForm();
|
|
||||||
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("h2", { style: { marginTop: "0", fontSize: "20px" } }, "修改密码"), /* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.Form,
|
|
||||||
{
|
|
||||||
labelCol: { span: 4 },
|
|
||||||
wrapperCol: { span: 20 },
|
|
||||||
form,
|
|
||||||
onFinish
|
|
||||||
},
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.Form.Item,
|
|
||||||
{
|
|
||||||
name: "password",
|
|
||||||
label: "原密码",
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: "请输入密码!" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(import_antd.Input.Password, { variant: "borderless", style: { border: "none", borderBottom: "1px solid rgba(0, 0, 0, 0.06)" } })
|
|
||||||
),
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.Form.Item,
|
|
||||||
{
|
|
||||||
name: "newPassword",
|
|
||||||
label: "新密码",
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: "请输入新密码!" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(import_antd.Input.Password, { variant: "borderless", style: { border: "none", borderBottom: "1px solid rgba(0, 0, 0, 0.06)" } })
|
|
||||||
),
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(
|
|
||||||
import_antd.Form.Item,
|
|
||||||
{
|
|
||||||
name: "rePassword",
|
|
||||||
label: "确认密码",
|
|
||||||
dependencies: ["password"],
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: "请再次输入密码!" },
|
|
||||||
({ getFieldValue }) => ({
|
|
||||||
validator(_, value) {
|
|
||||||
if (!value || getFieldValue("password") === value) {
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error("两次输入的密码不一致!"));
|
|
||||||
}
|
|
||||||
})
|
|
||||||
]
|
|
||||||
},
|
|
||||||
/* @__PURE__ */ import_react.default.createElement(import_antd.Input.Password, { variant: "borderless", style: { border: "none", borderBottom: "1px solid rgba(0, 0, 0, 0.06)" } })
|
|
||||||
),
|
|
||||||
/* @__PURE__ */ import_react.default.createElement("div", { style: { textAlign: "right" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { htmlType: "reset", onClick: onCancel, style: { width: "100px" } }, "取消"), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "primary", htmlType: "submit", style: { width: "100px" } }, "确认")))
|
|
||||||
));
|
|
||||||
};
|
|
||||||
var Password_default = Password;
|
|
2
packages/material/lib/password/index.d.ts
vendored
2
packages/material/lib/password/index.d.ts
vendored
@ -1,2 +0,0 @@
|
|||||||
import Password from './Password';
|
|
||||||
export default Password;
|
|
@ -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/password/index.tsx
|
|
||||||
var password_exports = {};
|
|
||||||
__export(password_exports, {
|
|
||||||
default: () => password_default
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(password_exports);
|
|
||||||
var import_Password = __toESM(require("./Password"));
|
|
||||||
var password_default = import_Password.default;
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
packages/material/lib/utils/index.d.ts
vendored
1
packages/material/lib/utils/index.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
export declare const createAElement: (url: string, isBlank: boolean) => void;
|
|
@ -1,39 +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/utils/index.ts
|
|
||||||
var utils_exports = {};
|
|
||||||
__export(utils_exports, {
|
|
||||||
createAElement: () => createAElement
|
|
||||||
});
|
|
||||||
module.exports = __toCommonJS(utils_exports);
|
|
||||||
var createAElement = (url, isBlank) => {
|
|
||||||
var newLink = document.createElement("a");
|
|
||||||
newLink.className = "create-link";
|
|
||||||
newLink.href = url;
|
|
||||||
if (isBlank) {
|
|
||||||
newLink.target = "_blank";
|
|
||||||
}
|
|
||||||
document.body.appendChild(newLink);
|
|
||||||
newLink.click();
|
|
||||||
document.body.removeChild(newLink);
|
|
||||||
};
|
|
||||||
// Annotate the CommonJS export names for ESM import in node:
|
|
||||||
0 && (module.exports = {
|
|
||||||
createAElement
|
|
||||||
});
|
|
1
packages/material/lib/utils/types.d.ts
vendored
1
packages/material/lib/utils/types.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
export type AnyObject = Record<PropertyKey, any>;
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user