From 63b867f9bc9a178587974dcb7bcb129375cb7d32 Mon Sep 17 00:00:00 2001 From: wanyiwei Date: Thu, 28 Jul 2022 21:20:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?*=E5=A4=A7=E5=B1=8F=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E4=B8=BAnull=E5=88=A4=E6=96=AD=EF=BC=8C=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E9=80=BB=E8=BE=91=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../containers/footer/operation/left.js | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) 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 2966deaf..4faa15ba 100644 --- a/web/client/src/sections/quanju/containers/footer/operation/left.js +++ b/web/client/src/sections/quanju/containers/footer/operation/left.js @@ -5,8 +5,6 @@ import Module from '../../public/module' import { getBusTierList } from '../../../actions/example' import './style.less' - - const Left = (props) => { const [treeData, setTreeData] = useState([]) const [treeDataList, setTreeDataList] = useState([]) @@ -29,12 +27,12 @@ const Left = (props) => { const onChange = (e) => { const { value } = e.target; - let keys = [] - const newExpandedKeys = treeDataList.filter(e => e.key.match(value)) + let titles = [] + const newExpandedKeys = treeDataList.filter(e => e.title != null && e.title.match(value)) newExpandedKeys.forEach(e => { - keys.push(e.key) + titles.push(e.title) }) - setExpandedKeys(keys); + setExpandedKeys(titles); setSearchValue(value); setAutoExpandParent(true); }; @@ -78,51 +76,53 @@ const Left = (props) => { let busTierOpen = [] let dataList = [] 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, - } - }) - } - }) - } + // Math.ceil(Math.random() * 100); + // if (busTier && busTier.data && busTier.data.length > 0) { + // busTierNewList.push(busTier && busTier.data && busTier.data[0]) + // } + // if (busTierNewList.length > 0) { + // } + 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.name == '--' || i.name == null ? Math.ceil(Math.random() * 100) : i.name, + title: i.name, + children: i.child.map(x => { + return { + key: x.name == '--' || x.name == null ? Math.ceil(Math.random() * 100) : x.name, + title: x.name == null ? '--' : x.name, + } + }) + + } + }) + } - }) }) }) - busTierNewList.forEach(e => { - e.child.forEach(i => { - i.child.forEach(s => { - s.child.forEach(x => { - dataList.push({ - key: x.name, - title: x.name - }) + }) + busTier && busTier.data && busTier.data.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) From 3654c12808c07c6fdafcfd560b3c1549eda8f1c4 Mon Sep 17 00:00:00 2001 From: wanyiwei Date: Thu, 28 Jul 2022 21:26:06 +0800 Subject: [PATCH 2/4] =?UTF-8?q?*=E5=A4=A7=E5=B1=8F=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sections/quanju/containers/footer/operation/left.js | 2 +- .../sections/quanju/containers/footer/operation/right.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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 4faa15ba..6d870d0e 100644 --- a/web/client/src/sections/quanju/containers/footer/operation/left.js +++ b/web/client/src/sections/quanju/containers/footer/operation/left.js @@ -132,7 +132,7 @@ const Left = (props) => {
- + { dataLists.map((data, index) => (
- +

所属线路

{data.route}

@@ -49,15 +49,15 @@ const Right = () => {
+ }}>
+ }}>
+ }}>
)) From 837b438510f39c007d9b8754567612b460ed8ce4 Mon Sep 17 00:00:00 2001 From: wanyiwei Date: Thu, 28 Jul 2022 21:30:37 +0800 Subject: [PATCH 3/4] =?UTF-8?q?*=E5=A4=A7=E5=B1=8F=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=B1=82=E7=BA=A7=E4=B8=AD=E6=9C=89null=E5=80=BC=E7=9A=84key?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/quanju/containers/footer/operation/left.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6d870d0e..175efc1e 100644 --- a/web/client/src/sections/quanju/containers/footer/operation/left.js +++ b/web/client/src/sections/quanju/containers/footer/operation/left.js @@ -91,7 +91,7 @@ const Left = (props) => { title: e.name, children: e.child.map(s => { return { - key: s.name, + key: s.name == '--' || s.name == null ? Math.ceil(Math.random() * 100) : s.name, title: s.name, children: s.child.map(i => { return { From 73e3219c88ae001c6075a69b43698c907931c5c9 Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Thu, 28 Jul 2022 21:43:26 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BB=BA=E8=AE=BE?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=95=85=E9=9A=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/quanju/containers/footer/build/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/client/src/sections/quanju/containers/footer/build/index.js b/web/client/src/sections/quanju/containers/footer/build/index.js index 679eb3da..66f67e1b 100644 --- a/web/client/src/sections/quanju/containers/footer/build/index.js +++ b/web/client/src/sections/quanju/containers/footer/build/index.js @@ -121,6 +121,7 @@ const Build = (props) => { // } // ] console.log(localStorage.getItem("qndmn"),'七牛') + console.log(xuandata,"宣传") return (
@@ -200,7 +201,7 @@ const Build = (props) => { }} customize={true}>
{/* */} - +

全面建设好农村公路,切实发挥先行官作用