From 3ecba532bb369ec1b946b0a5cb3f3984559e301d Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 13 Jul 2023 17:29:50 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=B0=8F=E7=A8=8B=E5=BA=8F-=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E5=8F=8D=E9=A6=88=E9=A1=B5=E9=9D=A2=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=81=93=E8=B7=AF=E7=B1=BB=E5=9E=8B=E5=90=8E=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/components/inputPicker/index.jsx | 1 - weapp/src/packages/patrol/index.jsx | 25 +++++++++++-------- .../footer/conserve/right/right-center.js | 15 +++++++++-- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/weapp/src/packages/components/inputPicker/index.jsx b/weapp/src/packages/components/inputPicker/index.jsx index f367bd4d..e430c967 100644 --- a/weapp/src/packages/components/inputPicker/index.jsx +++ b/weapp/src/packages/components/inputPicker/index.jsx @@ -30,7 +30,6 @@ export default function InputPicker (props) { const handlePickerChange = (e) => { onInput(curSelector[e.detail.value]) } - return ( diff --git a/weapp/src/packages/patrol/index.jsx b/weapp/src/packages/patrol/index.jsx index afefeb99..30b8767a 100644 --- a/weapp/src/packages/patrol/index.jsx +++ b/weapp/src/packages/patrol/index.jsx @@ -241,7 +241,7 @@ const Index = () => { ]) }, [reportType]) - function report() { + function report () { if (!canReport) { return } if ( (isPatrol && (!projectType || !road)) @@ -317,7 +317,7 @@ const Index = () => { }) } - function deleteReport() { + function deleteReport () { Taro.showModal({ title: '提示', content: '确定删除吗?', @@ -344,7 +344,7 @@ const Index = () => { }) } - function handleInput({ detail: { value } }, type) { + function handleInput ({ detail: { value } }, type) { switch (type) { case 'roadSectionStart': setRoadSectionStart(value) @@ -379,15 +379,15 @@ const Index = () => { } } - function handleTypeChange(e) { + function handleTypeChange (e) { setReportType(e.detail.value) } - function handleImgChange(files, operationType, index, type) { + function handleImgChange (files, operationType, index, type) { if (operationType === 'remove') { setImg(false) } - function setImg(isAdd, url) { + function setImg (isAdd, url) { switch (type) { case 'scenePic': let nextImg = sceneImg @@ -484,19 +484,19 @@ const Index = () => { } } - function handleImgClick(index, file) { + function handleImgClick (index, file) { Taro.previewImage({ urls: [file.url] // 需要预览的图片http链接列表 }) } - function handleImgClicks(index, file) { + function handleImgClicks (index, file) { Taro.previewImage({ urls: [file] // 需要预览的图片http链接列表 }) } useEffect(() => { if (!isView) { - let newRoadList = roadList.filter(e => e.routeName.match(road)) + let newRoadList = roadList.filter(e => e?.routeName?.match(road)) let codeRoadSel = [] if (newRoadList.length && road != '') { newRoadList.forEach((e, index) => { @@ -511,7 +511,7 @@ const Index = () => { } } }, [road]) - function handleOk() { + function handleOk () { if (!canReport) { return } let str = handleCenter.trim() if (!str) { @@ -600,6 +600,7 @@ const Index = () => { onInput={setProjectType} selector={prjTypeSelector} isView={isView} + onlySelect={true} /> : '' } @@ -609,7 +610,9 @@ const Index = () => { title='反馈类型:' placeholder='请选择反馈类型' value={projectType} - onInput={setProjectType} + onInput={(v) => { + setProjectType(v) + }} selector={prjTypeSelector} isView={isView} onlySelect={true} diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js index ebcbef5f..5f7398de 100644 --- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js +++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js @@ -13,6 +13,10 @@ const icon = [ 'assets/images/quanju/lupai.png', 'assets/images/quanju/zerenpai.png' ] + +import { unitList } from '../../../../../fillion/containers/assess' + +const fuckoff = true const RightCenter = (props) => { const { highwaysData, dispatch } = props @@ -77,7 +81,7 @@ const RightCenter = (props) => { option={{ xAxis: { type: 'category', - data: data.map(d => d.unit), + data: fuckoff ? data.map(d => d.unit) : unitList, axisTick: { show: false } @@ -93,7 +97,14 @@ const RightCenter = (props) => { }, series: [ { - data: data.map(d => d.totalPoints), + data: fuckoff ? data.map(d => d.totalPoints) : unitList.map(u => { + let corPoint = data.find(d => d.unit === u) + if (corPoint) { + return corPoint.totalPoints + } else { + return 0 + } + }), type: 'bar', showBackground: true, backgroundStyle: {