|
@@ -282,19 +282,19 @@ const ListContent = (props) => {
|
|
|
UnityAction.sendMsg('ProcessAnalysisDetail', JSON.stringify(msg));
|
|
|
};
|
|
|
|
|
|
- const activeKeys = useMemo(() => {
|
|
|
- if (!data) return [];
|
|
|
- return current.filter((deviceCode) =>
|
|
|
- data.some((item) => item.device_code == deviceCode),
|
|
|
- );
|
|
|
- }, [data, current]);
|
|
|
+ // const activeKeys = useMemo(() => {
|
|
|
+ // if (!data) return [];
|
|
|
+ // return current.filter((deviceCode) =>
|
|
|
+ // data.some((item) => item.device_code == deviceCode),
|
|
|
+ // );
|
|
|
+ // }, [data, current]);
|
|
|
|
|
|
const handleClick = (keys) => {
|
|
|
// 判断是开启还是关闭
|
|
|
// 设置当前选中行
|
|
|
if (keys.length > current.length) {
|
|
|
const code = keys[keys.length - 1];
|
|
|
- UnityAction.sendMsg('SynDev', code);
|
|
|
+ UnityAction.sendMsg('SynDev', code.split("&&")[1]);
|
|
|
setSelected(code);
|
|
|
} else if (current.length > 0) {
|
|
|
const item = current.find(
|
|
@@ -328,7 +328,7 @@ const ListContent = (props) => {
|
|
|
<Panel
|
|
|
style={getStyle(item.device_code)}
|
|
|
header={`${item.device_name}(${item.device_code})`}
|
|
|
- key={`${active}_${item.device_code}`}
|
|
|
+ key={`${active}&&${item.device_code}`}
|
|
|
extra={getExtra(item.device_code)}
|
|
|
>
|
|
|
<ChartContent
|