Commit 9f4ef61f authored by 涂茜's avatar 涂茜

fix: bug

parent 206e7c16
Pipeline #26336 failed with stages
in 15 seconds
......@@ -79,7 +79,7 @@ const Demo = () => {
};
return (
<div style={{ width: '300px', height: '400px', border: '1px solid #eee' }}>
<div style={{ width: '200px', height: '400px', border: '1px solid #eee' }}>
<PandaDeviceTree
onSearch={onSearch}
checkable
......
......@@ -12,6 +12,14 @@
margin: 6px 0 12px 0;
}
.ant-tree-checkbox {
margin: 4px 2px 0 0;
}
.ant-tree-title {
white-space: nowrap;
}
&-content {
flex: 1;
overflow-y: scroll;
......
......@@ -19,6 +19,16 @@ const Demo = () => {
.then(function (response) {
if (response.code == '0') {
let curData = response.data;
curData.forEach((item) => {
item.decimalBit = item.DecimalBit;
item.deviation = item.Deviation;
item.format = item.Format;
item.isShow = item.IsShow;
item.name = item.Name;
item.style = item.Style;
item.type = item.Type;
item.unit = item.Unit;
});
setQuotaList(curData);
}
})
......
......@@ -40,8 +40,8 @@ const QuotaSelect = ({
let data = dataSource.map((item) => ({
...item,
checked: false,
title: item.Name,
key: item.Name,
title: item.name,
key: item.name,
}));
setAllQuotaList(data);
}
......@@ -71,7 +71,7 @@ const QuotaSelect = ({
// 过滤重点指标
const filterEmphasisQuota = () => {
let newQuotaList = [...allQuotaList];
newQuotaList = newQuotaList.filter((item) => item.IsShow === '1');
newQuotaList = newQuotaList.filter((item) => item.isShow === '1');
setQuotaList(newQuotaList);
};
......@@ -111,7 +111,7 @@ const QuotaSelect = ({
if (e.target.value !== '') {
let newQuotaList = [];
quotaList.forEach((item) => {
if (item.Name.indexOf(e.target.value) > -1) newQuotaList.push(item);
if (item.name.indexOf(e.target.value) > -1) newQuotaList.push(item);
});
setQuotaList(newQuotaList);
} else {
......
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