-
)
}
function mapStateToProps(state) {
-
// const { auth } = state;
return {
diff --git a/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js b/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
index 73b69818..29d39de1 100644
--- a/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
+++ b/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
@@ -37,7 +37,7 @@ const LeftBottom = (props) => {
total={totalData?.toFixed(3) || 0}
colorList={colorList}
textLeft={'20%'}
- numLeft={'16%'}
+ numLeft={'14.5%'}
underColorList={underColorList}
/>
diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
index f3f15c41..44f52f73 100644
--- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
+++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
@@ -62,7 +62,7 @@ const RightBottom = (props) => {
height='100%'
text='养护总数'
textLeft={'21%'}
- numLeft={'23%'}
+ numLeft={'22%'}
total={totalData || 0}
colorList={colorList}
underColorList={underColorList}
diff --git a/web/client/src/sections/quanju/containers/footer/operation/left.js b/web/client/src/sections/quanju/containers/footer/operation/left.js
index 7e7e9f81..2966deaf 100644
--- a/web/client/src/sections/quanju/containers/footer/operation/left.js
+++ b/web/client/src/sections/quanju/containers/footer/operation/left.js
@@ -6,6 +6,7 @@ import { getBusTierList } from '../../../actions/example'
import './style.less'
+
const Left = (props) => {
const [treeData, setTreeData] = useState([])
const [treeDataList, setTreeDataList] = useState([])
@@ -39,9 +40,10 @@ const Left = (props) => {
};
const loop = (treeData) =>
treeData.map((item) => {
- const index = item.title.indexOf(searchValue);
- const beforeStr = item.title.substr(0, index);
- const afterStr = item.title.substr(index + searchValue.length);
+ // console.log(item,'===> item -----');
+ const index = item.title != null && item.title.indexOf(searchValue);
+ const beforeStr = item.title != null && item.title.substr(0, index);
+ const afterStr = item.title != null && item.title.substr(index + searchValue.length);
const title =
index > -1 ? (
@@ -75,47 +77,52 @@ const Left = (props) => {
let busTierList = []
let busTierOpen = []
let dataList = []
-
- busTier && busTier.data && busTier.data.forEach((e, index) => {
- if (index == 0) {
- busTierOpen.push(e.name)
- }
- busTierList.push({
- key: e.name,
- title: e.name,
- children: e.child.map(s => {
- return {
- key: s.name,
- title: s.name,
- children: s.child.map(i => {
- return {
- key: i.vehicleLicensePlateNumber,
- title: i.vehicleLicensePlateNumber,
- }
- })
- }
+ let busTierNewList = []
+ if (busTier && busTier.data && busTier.data.length > 0) {
+ busTierNewList.push(busTier && busTier.data && busTier.data[0])
+ }
+ if (busTierNewList.length > 0) {
+ busTierNewList.forEach((e, index) => {
+ if (index == 0) {
+ busTierOpen.push(e.name)
+ }
+ busTierList.push({
+ key: e.name,
+ title: e.name,
+ children: e.child.map(s => {
+ return {
+ key: s.name,
+ title: s.name,
+ children: s.child.map(i => {
+ return {
+ key: i.name,
+ title: i.name,
+ children: i.child.map(x => {
+ return {
+ key: x.name,
+ title: x.name,
+ }
+ })
+ }
+ })
+ }
+ })
})
})
- })
- busTier && busTier.data && busTier.data.forEach(e => {
- dataList.push({
- key: e.name,
- title: e.name,
- })
- e.child.forEach(i => {
- dataList.push({
- key: i.name,
- title: i.name,
- })
- i.child.forEach(s => {
- dataList.push({
- key: s.vehicleLicensePlateNumber,
- title: s.vehicleLicensePlateNumber,
+ busTierNewList.forEach(e => {
+ e.child.forEach(i => {
+ i.child.forEach(s => {
+ s.child.forEach(x => {
+ dataList.push({
+ key: x.name,
+ title: x.name
+ })
+ })
})
})
})
- })
+ }
setTreeData(busTierList)
setExpandedKeys(busTierOpen)
setTreeDataList(dataList)