Commit b32e0a32 authored by 程恺文's avatar 程恺文

修改

parent 56a7c085
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.12.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/alarmscrollassembly@1.12.0...@wisdom-components/alarmscrollassembly@1.12.1) (2023-05-16) ## [1.12.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/alarmscrollassembly@1.12.0...@wisdom-components/alarmscrollassembly@1.12.1) (2023-05-16)
**Note:** Version bump only for package @wisdom-components/alarmscrollassembly **Note:** Version bump only for package @wisdom-components/alarmscrollassembly
# [1.12.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/alarmscrollassembly@1.11.2...@wisdom-components/alarmscrollassembly@1.12.0) (2023-05-12) # [1.12.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/alarmscrollassembly@1.11.2...@wisdom-components/alarmscrollassembly@1.12.0) (2023-05-12)
### Features ### Features
......
...@@ -190,7 +190,7 @@ AlarmScrollAssembly.defaultProps = { ...@@ -190,7 +190,7 @@ AlarmScrollAssembly.defaultProps = {
prefix: '', prefix: '',
showTotal: true, showTotal: true,
interval: 5, interval: 5,
userAccess:false userAccess: false,
}; };
AlarmScrollAssembly.propTypes = { AlarmScrollAssembly.propTypes = {
deviceType: PropTypes.string, deviceType: PropTypes.string,
......
...@@ -129,9 +129,9 @@ ...@@ -129,9 +129,9 @@
width: 120px; width: 120px;
max-width: 120px; max-width: 120px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #333333; color: #333333;
white-space: nowrap;
text-overflow: ellipsis;
} }
.location { .location {
...@@ -158,11 +158,11 @@ ...@@ -158,11 +158,11 @@
display: inline-block; display: inline-block;
width: 120px; width: 120px;
max-width: 120px; max-width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-left: 10px; margin-left: 10px;
overflow: hidden;
color: #333333; color: #333333;
white-space: nowrap;
text-overflow: ellipsis;
} }
} }
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.5.7](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basicchart@1.5.6...@wisdom-components/basicchart@1.5.7) (2023-05-16) ## [1.5.7](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basicchart@1.5.6...@wisdom-components/basicchart@1.5.7) (2023-05-16)
**Note:** Version bump only for package @wisdom-components/basicchart **Note:** Version bump only for package @wisdom-components/basicchart
## [1.5.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basicchart@1.5.5...@wisdom-components/basicchart@1.5.6) (2023-05-12) ## [1.5.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basicchart@1.5.5...@wisdom-components/basicchart@1.5.6) (2023-05-12)
### Bug Fixes ### Bug Fixes
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/videoslidermodal@1.1.4...@wisdom-components/videoslidermodal@1.1.5) (2023-05-16) ## [1.1.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/videoslidermodal@1.1.4...@wisdom-components/videoslidermodal@1.1.5) (2023-05-16)
**Note:** Version bump only for package @wisdom-components/videoslidermodal **Note:** Version bump only for package @wisdom-components/videoslidermodal
## [1.1.4](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/videoslidermodal@1.1.3...@wisdom-components/videoslidermodal@1.1.4) (2023-05-16) ## [1.1.4](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/videoslidermodal@1.1.3...@wisdom-components/videoslidermodal@1.1.4) (2023-05-16)
**Note:** Version bump only for package @wisdom-components/videoslidermodal **Note:** Version bump only for package @wisdom-components/videoslidermodal
## [1.1.3](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/videoslidermodal@1.1.2...@wisdom-components/videoslidermodal@1.1.3) (2023-05-12) ## [1.1.3](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/videoslidermodal@1.1.2...@wisdom-components/videoslidermodal@1.1.3) (2023-05-12)
**Note:** Version bump only for package @wisdom-components/videoslidermodal **Note:** Version bump only for package @wisdom-components/videoslidermodal
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/VmsVideo@1.2.1...@wisdom-components/VmsVideo@1.2.2) (2023-05-16) ## [1.2.2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/VmsVideo@1.2.1...@wisdom-components/VmsVideo@1.2.2) (2023-05-16)
**Note:** Version bump only for package @wisdom-components/VmsVideo **Note:** Version bump only for package @wisdom-components/VmsVideo
## [1.2.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/VmsVideo@1.2.0...@wisdom-components/VmsVideo@1.2.1) (2023-05-16) ## [1.2.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/VmsVideo@1.2.0...@wisdom-components/VmsVideo@1.2.1) (2023-05-16)
**Note:** Version bump only for package @wisdom-components/VmsVideo **Note:** Version bump only for package @wisdom-components/VmsVideo
# [1.2.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/VmsVideo@1.1.13...@wisdom-components/VmsVideo@1.2.0) (2023-05-12) # [1.2.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/VmsVideo@1.1.13...@wisdom-components/VmsVideo@1.2.0) (2023-05-12)
### Features ### Features
......
...@@ -37,13 +37,13 @@ group: ...@@ -37,13 +37,13 @@ group:
| | record 是否显示录制按钮 | boolean | true | | | record 是否显示录制按钮 | boolean | true |
| VideoParam 参数 | --- | --- | --- | | VideoParam 参数 | --- | --- | --- |
| fullUrl | 完整 url,接入 flv 或者三方的链接 | string | "" | | fullUrl | 完整 url,接入 flv 或者三方的链接 | string | "" |
| username | 账号 | string | "6c44c8e92d1c4d75a9818756025df550" | | username | 账号 | string | "6c44c8e92d1c4d75a9818756025df550" |
| password | 密码 | string | "78b7dc88f9f4bf19c2b1aabfdd995244" | | password | 密码 | string | "78b7dc88f9f4bf19c2b1aabfdd995244" |
| address | 地址 | string | "123638446" | | address | 地址 | string | "123638446" |
| protocol | 协议类型 | string | "萤石 EZOPEN" | | protocol | 协议类型 | string | "萤石 EZOPEN" |
| gateway | 是否走网关 | boolean | false | | gateway | 是否走网关 | boolean | false |
| pandavmsHost | pandavms后端主机地址 eg | string | ws://172.16.19.19:8080/ | | pandavmsHost | pandavms 后端主机地址 eg | string | ws://172.16.19.19:8080/ |
| useFullUrl | 是否为完整 url,是,则取 fullUrl,否,则会用 pandavmsHostid 去拼接 | boolean | false | | useFullUrl | 是否为完整 url,是,则取 fullUrl,否,则会用 pandavmsHostid 去拼接 | boolean | false |
| id | 摄像头唯一标识,一串 GUID | string | "" | | id | 摄像头唯一标识,一串 GUID | string | "" |
| name | 摄像头名称 | string | "" | | name | 摄像头名称 | string | "" |
| dataRate | 码率,Main 为主码流,Sub 为辅码流,与消耗网络有关,主码流消耗最高,**由于拼接方式不定,改为是字符串传入** | string | 'Sub' | | dataRate | 码率,Main 为主码流,Sub 为辅码流,与消耗网络有关,主码流消耗最高,**由于拼接方式不定,改为是字符串传入** | string | 'Sub' |
......
...@@ -46,8 +46,8 @@ const Demo1 = (props) => { ...@@ -46,8 +46,8 @@ const Demo1 = (props) => {
dataRate: 'Sub', // Main 主码流 Sub 子码流 dataRate: 'Sub', // Main 主码流 Sub 子码流
pandavmsHost: `ws://192.168.8.27:9876/`, // pandavms后端主机地址 eg: ws://172.16.19.19:8080/ pandavmsHost: `ws://192.168.8.27:9876/`, // pandavms后端主机地址 eg: ws://172.16.19.19:8080/
address: '236644034', address: '236644034',
width:952, width: 952,
height:500, height: 500,
}; };
/* { /* {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 634665781 634665781@qq.com * @Author: 634665781 634665781@qq.com
* @Date: 2023-04-11 13:40:18 * @Date: 2023-04-11 13:40:18
* @LastEditors: 634665781 634665781@qq.com * @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2023-05-16 16:23:33 * @LastEditTime: 2023-05-17 09:45:01
* @FilePath: \wisdom-components\packages\base-components\VmsVideo\src\index.jsx * @FilePath: \wisdom-components\packages\base-components\VmsVideo\src\index.jsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -36,9 +36,9 @@ import style from './index.less'; ...@@ -36,9 +36,9 @@ import style from './index.less';
const Video = (props, ref) => { const Video = (props, ref) => {
const _video = useRef(null); const _video = useRef(null);
const Players = useRef(null); const Players = useRef(null);
const { VideoInfo, JessibucaObj,gateway } = props; const { VideoInfo, JessibucaObj, gateway } = props;
let baseUrl = `ws://${window.location.host}/jessica`; let baseUrl = `ws://${window.location.host}/jessica`;
let keyID =VideoInfo.id+'_'+new Date().getTime() let keyID = VideoInfo.id + '_' + new Date().getTime();
let _VideoInfo = { let _VideoInfo = {
title: '摄像头', title: '摄像头',
// dataRate: 1, // dataRate: 1,
...@@ -48,6 +48,7 @@ const Video = (props, ref) => { ...@@ -48,6 +48,7 @@ const Video = (props, ref) => {
}; };
const getToken = async () => { const getToken = async () => {
let PlayersA =''
axios axios
.post( .post(
`https://open.ys7.com/api/lapp/token/get?appKey=${VideoInfo.username}&appSecret=${VideoInfo.password}`, `https://open.ys7.com/api/lapp/token/get?appKey=${VideoInfo.username}&appSecret=${VideoInfo.password}`,
...@@ -61,14 +62,14 @@ const Video = (props, ref) => { ...@@ -61,14 +62,14 @@ const Video = (props, ref) => {
.then(function (response) { .then(function (response) {
let accessToken = response.data.data.accessToken; let accessToken = response.data.data.accessToken;
let PlayersA = new EZUIKit.EZUIKitPlayer({ PlayersA = new EZUIKit.EZUIKitPlayer({
id: keyID, // 视频容器ID id: keyID, // 视频容器ID
accessToken: accessToken, accessToken: accessToken,
url: `ezopen://open.ys7.com/${VideoInfo.address}/1.hd.live`, url: `ezopen://open.ys7.com/${VideoInfo.address}/1.hd.live`,
templete: 'simple', templete: 'simple',
footer: ['talk', 'broadcast', 'hd', 'fullScreen'], footer: ['talk', 'broadcast', 'hd', 'fullScreen'],
width:VideoInfo.width||952, width: VideoInfo.width || 952,
height:VideoInfo.height||500 height: VideoInfo.height || 500,
}); });
PlayersA.pause = PlayersA.stop; PlayersA.pause = PlayersA.stop;
...@@ -77,7 +78,7 @@ const Video = (props, ref) => { ...@@ -77,7 +78,7 @@ const Video = (props, ref) => {
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
PlayersA.stop() PlayersA.stop();
}); });
}; };
...@@ -89,7 +90,8 @@ const Video = (props, ref) => { ...@@ -89,7 +90,8 @@ const Video = (props, ref) => {
} else { } else {
getToken(); getToken();
} }
const CommonPath = (VideoInfo.gateway || window?.globalConfig?.hasGateWay) ? 'PandaCore/GateWay/Video/' : ''; // 配置了gateway或者pc端web配置中有gateway const CommonPath =
VideoInfo.gateway || window?.globalConfig?.hasGateWay ? 'PandaCore/GateWay/Video/' : ''; // 配置了gateway或者pc端web配置中有gateway
VideoInfo.url = VideoInfo.useFullUrl VideoInfo.url = VideoInfo.useFullUrl
? VideoInfo.fullUrl ? VideoInfo.fullUrl
: (VideoInfo.pandavmsHost || 'ws://' + location.host + '/') + : (VideoInfo.pandavmsHost || 'ws://' + location.host + '/') +
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.57](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_configurationview@1.4.56...@wisdom-components/ec_configurationview@1.4.57) (2023-05-16) ## [1.4.57](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_configurationview@1.4.56...@wisdom-components/ec_configurationview@1.4.57) (2023-05-16)
**Note:** Version bump only for package @wisdom-components/ec_configurationview **Note:** Version bump only for package @wisdom-components/ec_configurationview
## [1.4.56](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_configurationview@1.4.55...@wisdom-components/ec_configurationview@1.4.56) (2023-05-15) ## [1.4.56](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_configurationview@1.4.55...@wisdom-components/ec_configurationview@1.4.56) (2023-05-15)
### Bug Fixes ### Bug Fixes
......
...@@ -75,4 +75,4 @@ export function getVideoDetail(params) { ...@@ -75,4 +75,4 @@ export function getVideoDetail(params) {
method: REQUEST_METHOD_GET, method: REQUEST_METHOD_GET,
params, params,
}); });
} }
\ No newline at end of file
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.11.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyview@1.11.0...@wisdom-components/ec_historyview@1.11.1) (2023-05-16) ## [1.11.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyview@1.11.0...@wisdom-components/ec_historyview@1.11.1) (2023-05-16)
**Note:** Version bump only for package @wisdom-components/ec_historyview **Note:** Version bump only for package @wisdom-components/ec_historyview
# [1.11.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyview@1.10.0...@wisdom-components/ec_historyview@1.11.0) (2023-05-12) # [1.11.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyview@1.10.0...@wisdom-components/ec_historyview@1.11.0) (2023-05-12)
### Features ### Features
......
...@@ -15,7 +15,7 @@ const SimgleChart = memo((props) => { ...@@ -15,7 +15,7 @@ const SimgleChart = memo((props) => {
deviceAlarmSchemes, deviceAlarmSchemes,
chartType, chartType,
// justLine, // justLine,
showBoxOption showBoxOption,
} = props; } = props;
const chartRef = useRef(); const chartRef = useRef();
...@@ -29,7 +29,7 @@ const SimgleChart = memo((props) => { ...@@ -29,7 +29,7 @@ const SimgleChart = memo((props) => {
showPoint: true, showPoint: true,
chartType, chartType,
// justLine, // justLine,
showBoxOption showBoxOption,
}; };
return optionGenerator(dataSource, null, contrast, contrastOption, smooth, config); return optionGenerator(dataSource, null, contrast, contrastOption, smooth, config);
}, [dataSource, smooth, curveCenter]); }, [dataSource, smooth, curveCenter]);
...@@ -44,9 +44,9 @@ const SimgleChart = memo((props) => { ...@@ -44,9 +44,9 @@ const SimgleChart = memo((props) => {
const option = cloneDeep(chart.getOption()); const option = cloneDeep(chart.getOption());
const needMarkLine = count === 1; const needMarkLine = count === 1;
// 需求变更:设备离线改用“是否在线”的数据,离线的状态标记的数据用该部分的数据。 2023年4月25日09:36:55 // 需求变更:设备离线改用“是否在线”的数据,离线的状态标记的数据用该部分的数据。 2023年4月25日09:36:55
let _tempDataArray = dataSource.filter(item => item.sensorName === '是否在线'); let _tempDataArray = dataSource.filter((item) => item.sensorName === '是否在线');
option.series.forEach((item, index) => { option.series.forEach((item, index) => {
let _data = _tempDataArray.find(offline => offline.stationCode === item.stationCode); let _data = _tempDataArray.find((offline) => offline.stationCode === item.stationCode);
let offlineAreas = offlineArea(_data); let offlineAreas = offlineArea(_data);
if (offlineAreas.data?.length) { if (offlineAreas.data?.length) {
option.markArea = null; option.markArea = null;
......
...@@ -23,11 +23,7 @@ const deviceParams = [ ...@@ -23,11 +23,7 @@ const deviceParams = [
}, },
]; ];
const Demo = () => { const Demo = () => {
return ( return <div style={{ height: 700 }}>{/*<HistoryView deviceParams={deviceParams} grid />*/}</div>;
<div style={{ height: 700 }}>
{/*<HistoryView deviceParams={deviceParams} grid />*/}
</div>
);
}; };
export default Demo; export default Demo;
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.4](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.4.3...@wisdom-components/ec_quotaselect@1.4.4) (2023-05-16) ## [1.4.4](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.4.3...@wisdom-components/ec_quotaselect@1.4.4) (2023-05-16)
**Note:** Version bump only for package @wisdom-components/ec_quotaselect **Note:** Version bump only for package @wisdom-components/ec_quotaselect
## [1.4.3](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.4.2...@wisdom-components/ec_quotaselect@1.4.3) (2023-05-15) ## [1.4.3](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.4.2...@wisdom-components/ec_quotaselect@1.4.3) (2023-05-15)
### Bug Fixes ### Bug Fixes
......
...@@ -422,7 +422,8 @@ const QuotaSelect = ({ ...@@ -422,7 +422,8 @@ const QuotaSelect = ({
checked={item.checked} checked={item.checked}
disabled={ disabled={
((selectData.length > maximum || selectData.length === maximum) && ((selectData.length > maximum || selectData.length === maximum) &&
!item.checked)||disabledList.includes(item.title) !item.checked) ||
disabledList.includes(item.title)
} }
onChange={(e) => handleCheckboxChange(e, item)} onChange={(e) => handleCheckboxChange(e, item)}
> >
...@@ -481,7 +482,7 @@ QuotaSelect.defaultProps = { ...@@ -481,7 +482,7 @@ QuotaSelect.defaultProps = {
onModalOk: () => {}, onModalOk: () => {},
onModalClose: () => {}, onModalClose: () => {},
defaultSelect: 'emphasis', defaultSelect: 'emphasis',
disabledList:[], disabledList: [],
}; };
QuotaSelect.propTypes = { QuotaSelect.propTypes = {
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.6.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_realtimeinfo@1.6.0...@wisdom-components/ec_realtimeinfo@1.6.1) (2023-05-16) ## [1.6.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_realtimeinfo@1.6.0...@wisdom-components/ec_realtimeinfo@1.6.1) (2023-05-16)
**Note:** Version bump only for package @wisdom-components/ec_realtimeinfo **Note:** Version bump only for package @wisdom-components/ec_realtimeinfo
# [1.6.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_realtimeinfo@1.5.0...@wisdom-components/ec_realtimeinfo@1.6.0) (2023-05-11) # [1.6.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_realtimeinfo@1.5.0...@wisdom-components/ec_realtimeinfo@1.6.0) (2023-05-11)
### Features ### Features
......
...@@ -53,7 +53,8 @@ const RealTimeInfo = (props) => { ...@@ -53,7 +53,8 @@ const RealTimeInfo = (props) => {
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext); const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('realtime-info'); const prefixCls = getPrefixCls('realtime-info');
const { deviceParams, infoData, user, placeholder, defaultTargetValue, modalTitle, buttonText } = props; const { deviceParams, infoData, user, placeholder, defaultTargetValue, modalTitle, buttonText } =
props;
const [isModalVisible, setIsModalVisible] = useState(false); const [isModalVisible, setIsModalVisible] = useState(false);
const [targetValue, setTargetValue] = useState(defaultTargetValue); // 重点/全部 const [targetValue, setTargetValue] = useState(defaultTargetValue); // 重点/全部
...@@ -114,11 +115,13 @@ const RealTimeInfo = (props) => { ...@@ -114,11 +115,13 @@ const RealTimeInfo = (props) => {
if (infoData) { if (infoData) {
let devices = [infoData.aName]; let devices = [infoData.aName];
infoData.child?.forEach(function (val) { infoData.child?.forEach(function (val) {
let k = devices.find(function (a) { return a == val.aName }); let k = devices.find(function (a) {
return a == val.aName;
});
if (!k) { if (!k) {
devices.push(val.aName); devices.push(val.aName);
} }
}) });
deviceType = devices.join(','); deviceType = devices.join(',');
} else { } else {
deviceType = deviceType =
...@@ -127,7 +130,6 @@ const RealTimeInfo = (props) => { ...@@ -127,7 +130,6 @@ const RealTimeInfo = (props) => {
: '二供泵房,二供机组'; : '二供泵房,二供机组';
} }
const configReq = getMonitorConfig({ const configReq = getMonitorConfig({
params: { params: {
user, user,
...@@ -339,10 +341,10 @@ RealTimeInfo.defaultProps = { ...@@ -339,10 +341,10 @@ RealTimeInfo.defaultProps = {
user: null, user: null,
deviceParams: [], deviceParams: [],
deviceRealInfoParams: {}, deviceRealInfoParams: {},
deviceConfService: () => { }, deviceConfService: () => {},
pointAddressEntryService: () => { }, pointAddressEntryService: () => {},
sensorTypeService: () => { }, sensorTypeService: () => {},
deviceRealInfoService: () => { }, deviceRealInfoService: () => {},
}; };
RealTimeInfo.propTypes = { RealTimeInfo.propTypes = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment