From 6f84f85bc4de0c10c3eb932ab5da83501743fd21 Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Tue, 8 Aug 2023 10:51:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F1.1.2=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../packages/components/inputPicker/index.jsx | 2 +- weapp/src/packages/patrol/index.jsx | 28 +++++++++++-------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/weapp/src/packages/components/inputPicker/index.jsx b/weapp/src/packages/components/inputPicker/index.jsx index 5bb539df..9c238369 100644 --- a/weapp/src/packages/components/inputPicker/index.jsx +++ b/weapp/src/packages/components/inputPicker/index.jsx @@ -12,7 +12,7 @@ export default function InputPicker(props) { useEffect(() => { setCurSelector(selector) - }, []) + }, [selector]) useEffect(() => { handleInput({ detail: { value: value } }) diff --git a/weapp/src/packages/patrol/index.jsx b/weapp/src/packages/patrol/index.jsx index 088de738..106b271e 100644 --- a/weapp/src/packages/patrol/index.jsx +++ b/weapp/src/packages/patrol/index.jsx @@ -419,7 +419,7 @@ const Index = () => { }) request.get(getUsers()).then(res => { if (res.statusCode === 200) { - const users = res.data.filter(u => u.phone !== 'SuperAdmin' && u.isAdmin) + const users = res.data.filter(u => u.phone !== 'SuperAdmin') setUserList(users) } }) @@ -451,7 +451,9 @@ const Index = () => { || Object.values(patrolContent).some(c => c.label !== '巡查结果无异常' && c.selected && c.value === ''))) || (kind === 'conserve' && (Object.values(conserveInfo).every(c => c.value === '') - || (Object.values(conserveContent).every(c => c.value === '') && !otherDescription))) + || (Object.values(conserveContent).every(c => c.value === '') && !otherDescription) + || !conserveBeforeImg.length || !conserveUnderwayImg.length || !conserveAfterImg.length)) + || ((kind === 'patrol' || kind === 'road' || kind === 'anomaly') && !sceneImg.length) ) { Taro.showToast({ title: '请完善必填信息', icon: 'none' }) return @@ -861,6 +863,10 @@ const Index = () => { Taro.showToast({ title: '内容字数不能超过50', icon: 'none' }) return } + if (!handlePicPn.length) { + Taro.showToast({ title: '请上传处理图片', icon: 'none' }) + return + } } else { if (isAppoint && appointUser === null) { Taro.showToast({ title: '请选择责任人', icon: 'none' }) @@ -1087,14 +1093,14 @@ const Index = () => { } */} { isRoad ? - : '' } @@ -1290,7 +1296,7 @@ const Index = () => { { reportType === 'patrol' || isRoad || isAnomaly ? - 现场图片: + 现场图片: { isView ? @@ -1347,10 +1353,10 @@ const Index = () => { */} : - 养护图片: + 养护图片: - 养护前 + 养护前 { isView ? @@ -1371,7 +1377,7 @@ const Index = () => { - 养护中 + 养护中 { isView ? @@ -1392,7 +1398,7 @@ const Index = () => { - 养护后 + 养护后 { isView ? @@ -1518,7 +1524,7 @@ const Index = () => { maxLength={50} /> - 处理图片: + 处理图片: { handle == 'handle' || handleState == '已处理' ?