From e8611fee244a4aba7146ff76ca13c3ecc27861a3 Mon Sep 17 00:00:00 2001 From: ww664853070 Date: Fri, 14 Jul 2023 10:09:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?(fixed)11750=20=E5=B0=8F=E7=A8=8B=E5=BA=8F-?= =?UTF-8?q?=E5=B7=B2=E5=8A=9E=E4=BA=8B=E9=A1=B9=E9=A1=B5=E9=9D=A2=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weapp/src/packages/components/inputPickers/index.jsx | 4 ++-- weapp/src/packages/patrol/index.jsx | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/weapp/src/packages/components/inputPickers/index.jsx b/weapp/src/packages/components/inputPickers/index.jsx index 94b865e1..cc24909e 100644 --- a/weapp/src/packages/components/inputPickers/index.jsx +++ b/weapp/src/packages/components/inputPickers/index.jsx @@ -12,7 +12,7 @@ export default function InputPicker(props) { useEffect(() => { setCurSelector(selector) - }, []) + }, [selector]) useEffect(()=>{ handleInput({ detail: { value: value } }) @@ -47,7 +47,7 @@ export default function InputPicker(props) { { !isView && - + } diff --git a/weapp/src/packages/patrol/index.jsx b/weapp/src/packages/patrol/index.jsx index 267e4e4f..56f96841 100644 --- a/weapp/src/packages/patrol/index.jsx +++ b/weapp/src/packages/patrol/index.jsx @@ -163,14 +163,12 @@ const Index = () => { isHighAccuracy: true, highAccuracyExpireTime: 1000 * 6, success: function (res) { - console.log(res); setLongitude(res.longitude) setLatitude(res.latitude) Taro.request({ url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=${key}`, success: function (res) { // 根据自己项目需求获取res内容 - console.log('地址信息:', res); let addresscity = '' addresscity = res.data.result.address_component.province @@ -217,6 +215,7 @@ const Index = () => { let projectList = [] if (data.length) { data.forEach(e => { + console.log(data,'=============='); projectList.push(e.entryName) }) } @@ -466,7 +465,6 @@ const Index = () => { default: break; } - console.log(files, '=============='); for (i; i < files.length; i++) { const tempFilePaths = files[i].url let token = getState('token') || Taro.getStorageSync('token') @@ -595,8 +593,6 @@ const Index = () => { } }) } - console.log(video, 'video'); - console.log(scenePic, 'tupia'); return ( {/* { From 31b4d943bb94790e9521873f36cd291f6f4541be Mon Sep 17 00:00:00 2001 From: zhaobing Date: Fri, 14 Jul 2023 10:16:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=E5=A4=A7=E5=B1=8F=E5=9C=A8=E5=BB=BA?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=95=B0=E5=AD=97=E6=94=B9=E5=8A=A8+?= =?UTF-8?q?=E4=B8=80=E8=88=AC=E7=AE=A1=E7=90=86=E4=B8=8D=E8=83=BD=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/overview/building.js | 8 ++++++-- web/client/src/sections/organization/containers/user.js | 6 +++--- .../src/sections/quanju/containers/footer/build/index.js | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/api/app/lib/controllers/overview/building.js b/api/app/lib/controllers/overview/building.js index 28e00a34..bdc0764a 100644 --- a/api/app/lib/controllers/overview/building.js +++ b/api/app/lib/controllers/overview/building.js @@ -36,6 +36,10 @@ async function roadState(ctx) { const projectRoadRes = await models.Project.findAll({ type: 'road', }) + //在建工程 + const buildingCount = await models.Project.count({ + where: { done: true } + }) const bridgeRes = await models.Bridge.findAll({}) let constructionYear = [] @@ -45,8 +49,8 @@ async function roadState(ctx) { constructionYear.reverse() const roadState = { - //总数 - projectAll: projectRoadRes.length, + //在建总数 + buildingCount: buildingCount, // 在建数量 buildingRoad: 0, // 已建数量 diff --git a/web/client/src/sections/organization/containers/user.js b/web/client/src/sections/organization/containers/user.js index 2d0bef0f..2a4de927 100644 --- a/web/client/src/sections/organization/containers/user.js +++ b/web/client/src/sections/organization/containers/user.js @@ -25,7 +25,7 @@ const UserManage = (props) => { const [depModalRecord, setDepModalRecord] = useState(); const [selectedTree, setSelectedTree] = useState(); const [depCrumbs, setDepCrumbs] = useState([]); - const [depUserCopy, setDepUserCopy] = useState([])//用于存放除了自己的管理的数组,即自己不能调整自己是否为管理员 + const [depUserCopy, setDepUserCopy] = useState([]) const [uid, setuid] = useState() const [editAble, setEditAble] = useState(user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'USERMANAGE')?.isshow === "true" ? true : '')//控制操作(新增删除等操作,对应权限的'不可编辑')是否可操作 const [depMessagedata, setdepMessagedata] = useState(depMessage) @@ -274,9 +274,9 @@ const UserManage = (props) => { setDepModalVisible(true) setDepModalType('edit') }} /> - { delDepartment(id) }}> + {user?.username === 'SuperAdmin' ? { delDepartment(id) }} > - + : ''} : null } 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 3573ab62..daa7bd5b 100644 --- a/web/client/src/sections/quanju/containers/footer/build/index.js +++ b/web/client/src/sections/quanju/containers/footer/build/index.js @@ -97,7 +97,7 @@ const Build = (props) => { }) //console.log('onlineproject', onlineproject) let sunonlineproject = onlineproject?.reduce((x, y) => x + y.total, 0) - let projectAll = buildingnumber?.projectAll + let buildingCount = buildingnumber?.buildingCount //console.log('projectAll', projectAll) //let projectAll= let safetyData = alldengji?.filter(item => item.name === '一级公路' || item.name === '二级公路' || item.name === '三级公路' || item.name === '四级公路' || item.name === '等外公路') @@ -164,7 +164,7 @@ const Build = (props) => { */}
-
{projectAll || 0}
+
{buildingCount || 0}
{/* */} {/* */} From 6a054b887f1c8cd52b5f514811eab189aa74419b Mon Sep 17 00:00:00 2001 From: ww664853070 Date: Fri, 14 Jul 2023 10:17:47 +0800 Subject: [PATCH 3/3] =?UTF-8?q?(fixed)11760=20=E5=B0=8F=E7=A8=8B=E5=BA=8F-?= =?UTF-8?q?=E5=85=BB=E6=8A=A4=E4=B8=8A=E6=8A=A5=E8=B7=AF=E7=BA=BF=E7=BC=96?= =?UTF-8?q?=E7=A0=81=E5=AF=B9=E9=BD=90=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weapp/src/packages/components/inputPickers/index.jsx | 8 ++++---- weapp/src/packages/patrol/index.jsx | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/weapp/src/packages/components/inputPickers/index.jsx b/weapp/src/packages/components/inputPickers/index.jsx index cc24909e..4273d82a 100644 --- a/weapp/src/packages/components/inputPickers/index.jsx +++ b/weapp/src/packages/components/inputPickers/index.jsx @@ -14,9 +14,9 @@ export default function InputPicker(props) { setCurSelector(selector) }, [selector]) - useEffect(()=>{ + useEffect(() => { handleInput({ detail: { value: value } }) - },[value]) + }, [value]) function handleInput({ detail: { value: v } }) { onInput(v) @@ -34,7 +34,7 @@ export default function InputPicker(props) { return ( - {title} +   {title} { !isView && - + } diff --git a/weapp/src/packages/patrol/index.jsx b/weapp/src/packages/patrol/index.jsx index d01ca262..31a4ff5a 100644 --- a/weapp/src/packages/patrol/index.jsx +++ b/weapp/src/packages/patrol/index.jsx @@ -175,7 +175,7 @@ const Index = () => { + res.data.result.address_component.city + res.data.result.address_component.district + res.data.result.address_component.street_number - // + res.data.result.address_component.street + // + res.data.result.address_component.street // addresscity = res.data.result.formatted_addresses.standard_address let street = res.data.result.address_component.street setRoad(street) @@ -215,8 +215,9 @@ const Index = () => { let projectList = [] if (data.length) { data.forEach(e => { - console.log(data,'=============='); - projectList.push(e.entryName) + if (e.done == false) { + projectList.push(e.entryName) + } }) } setProjdetList(projectList)