巴林闲侠 2 years ago
parent
commit
72e5f58391
  1. 8
      api/app/lib/controllers/overview/building.js
  2. 8
      weapp/src/packages/components/inputPickers/index.jsx
  3. 7
      weapp/src/packages/patrol/index.jsx
  4. 6
      web/client/src/sections/organization/containers/user.js
  5. 4
      web/client/src/sections/quanju/containers/footer/build/index.js

8
api/app/lib/controllers/overview/building.js

@ -36,6 +36,10 @@ async function roadState(ctx) {
const projectRoadRes = await models.Project.findAll({ const projectRoadRes = await models.Project.findAll({
type: 'road', type: 'road',
}) })
//在建工程
const buildingCount = await models.Project.count({
where: { done: true }
})
const bridgeRes = await models.Bridge.findAll({}) const bridgeRes = await models.Bridge.findAll({})
let constructionYear = [] let constructionYear = []
@ -45,8 +49,8 @@ async function roadState(ctx) {
constructionYear.reverse() constructionYear.reverse()
const roadState = { const roadState = {
//总数 //在建总数
projectAll: projectRoadRes.length, buildingCount: buildingCount,
// 在建数量 // 在建数量
buildingRoad: 0, buildingRoad: 0,
// 已建数量 // 已建数量

8
weapp/src/packages/components/inputPickers/index.jsx

@ -12,11 +12,11 @@ export default function InputPicker(props) {
useEffect(() => { useEffect(() => {
setCurSelector(selector) setCurSelector(selector)
}, []) }, [selector])
useEffect(()=>{ useEffect(() => {
handleInput({ detail: { value: value } }) handleInput({ detail: { value: value } })
},[value]) }, [value])
function handleInput({ detail: { value: v } }) { function handleInput({ detail: { value: v } }) {
onInput(v) onInput(v)
@ -34,7 +34,7 @@ export default function InputPicker(props) {
return ( return (
<View className='input-picker'> <View className='input-picker'>
<View className='input-box'> <View className='input-box'>
<View className='title'>{title}</View> <View className='title'>&nbsp;&nbsp;{title}</View>
<Input <Input
className='input' className='input'
type='text' type='text'

7
weapp/src/packages/patrol/index.jsx

@ -163,14 +163,12 @@ const Index = () => {
isHighAccuracy: true, isHighAccuracy: true,
highAccuracyExpireTime: 1000 * 6, highAccuracyExpireTime: 1000 * 6,
success: function (res) { success: function (res) {
console.log(res);
setLongitude(res.longitude) setLongitude(res.longitude)
setLatitude(res.latitude) setLatitude(res.latitude)
Taro.request({ Taro.request({
url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=${key}`, url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=${key}`,
success: function (res) { success: function (res) {
// res // res
console.log('地址信息:', res);
let addresscity = '' let addresscity = ''
addresscity = addresscity =
res.data.result.address_component.province res.data.result.address_component.province
@ -217,7 +215,9 @@ const Index = () => {
let projectList = [] let projectList = []
if (data.length) { if (data.length) {
data.forEach(e => { data.forEach(e => {
if (e.done == false) {
projectList.push(e.entryName) projectList.push(e.entryName)
}
}) })
} }
setProjdetList(projectList) setProjdetList(projectList)
@ -466,7 +466,6 @@ const Index = () => {
default: default:
break; break;
} }
console.log(files, '==============');
for (i; i < files.length; i++) { for (i; i < files.length; i++) {
const tempFilePaths = files[i].url const tempFilePaths = files[i].url
let token = getState('token') || Taro.getStorageSync('token') let token = getState('token') || Taro.getStorageSync('token')
@ -595,8 +594,6 @@ const Index = () => {
} }
}) })
} }
console.log(video, 'video');
console.log(scenePic, 'tupia');
return ( return (
<View className='patrol'> <View className='patrol'>
{/* { {/* {

6
web/client/src/sections/organization/containers/user.js

@ -25,7 +25,7 @@ const UserManage = (props) => {
const [depModalRecord, setDepModalRecord] = useState(); const [depModalRecord, setDepModalRecord] = useState();
const [selectedTree, setSelectedTree] = useState(); const [selectedTree, setSelectedTree] = useState();
const [depCrumbs, setDepCrumbs] = useState([]); const [depCrumbs, setDepCrumbs] = useState([]);
const [depUserCopy, setDepUserCopy] = useState([])//用于存放除了自己的管理的数组,即自己不能调整自己是否为管理员 const [depUserCopy, setDepUserCopy] = useState([])
const [uid, setuid] = useState() const [uid, setuid] = useState()
const [editAble, setEditAble] = useState(user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'USERMANAGE')?.isshow === "true" ? true : '')//控制操作(新增删除等操作,对应权限的'不可编辑')是否可操作 const [editAble, setEditAble] = useState(user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'USERMANAGE')?.isshow === "true" ? true : '')//控制操作(新增删除等操作,对应权限的'不可编辑')是否可操作
const [depMessagedata, setdepMessagedata] = useState(depMessage) const [depMessagedata, setdepMessagedata] = useState(depMessage)
@ -274,9 +274,9 @@ const UserManage = (props) => {
setDepModalVisible(true) setDepModalVisible(true)
setDepModalType('edit') setDepModalType('edit')
}} /> }} />
<Popconfirm title='是否确认删除?' onConfirm={() => { delDepartment(id) }}> {user?.username === 'SuperAdmin' ? <Popconfirm title='是否确认删除?' onConfirm={() => { delDepartment(id) }} >
<DeleteOutlined style={{ marginLeft: 5 }} /> <DeleteOutlined style={{ marginLeft: 5 }} />
</Popconfirm> </Popconfirm> : ''}
</> : null </> : null
} }
</div> </div>

4
web/client/src/sections/quanju/containers/footer/build/index.js

@ -97,7 +97,7 @@ const Build = (props) => {
}) })
//console.log('onlineproject', onlineproject) //console.log('onlineproject', onlineproject)
let sunonlineproject = onlineproject?.reduce((x, y) => x + y.total, 0) let sunonlineproject = onlineproject?.reduce((x, y) => x + y.total, 0)
let projectAll = buildingnumber?.projectAll let buildingCount = buildingnumber?.buildingCount
//console.log('projectAll', projectAll) //console.log('projectAll', projectAll)
//let projectAll= //let projectAll=
let safetyData = alldengji?.filter(item => item.name === '一级公路' || item.name === '二级公路' || item.name === '三级公路' || item.name === '四级公路' || item.name === '等外公路') let safetyData = alldengji?.filter(item => item.name === '一级公路' || item.name === '二级公路' || item.name === '三级公路' || item.name === '四级公路' || item.name === '等外公路')
@ -164,7 +164,7 @@ const Build = (props) => {
</div> */} </div> */}
<img src='/assets/images/quanju/yuanhuan.webp' className='build-left-top-center' /> <img src='/assets/images/quanju/yuanhuan.webp' className='build-left-top-center' />
<div className='build-left-top-item'> <div className='build-left-top-item'>
<div>{projectAll || 0}</div> <div>{buildingCount || 0}</div>
<div> <div>
{/* <i>&#9658;</i> */} {/* <i>&#9658;</i> */}
{/* <span /> */} {/* <span /> */}

Loading…
Cancel
Save