@@ -216,14 +217,14 @@ const DetailList = (props) => {
key: 'projectType',
dataIndex: 'projectType',
align: 'center',
- render: (text, record) => {
- return record.projectType?.length > 0 ? reportTypeText(text) : (record.codeRoad && record.codeRoad.length > 0)
- ? record.codeRoad[0] === 'X'
- ? '县道'
- : record.codeRoad[0] === 'Y'
- ? '乡道'
- : '村道'
- : ''
+ render: (text, record) => {
+ return record.projectType?.length > 0 ? reportTypeText(text) : (record.codeRoad && record.codeRoad.length > 0)
+ ? record.codeRoad[0] === 'X'
+ ? '县道'
+ : record.codeRoad[0] === 'Y'
+ ? '乡道'
+ : '村道'
+ : ''
}
}, {
title: '所属道路',
@@ -648,7 +649,7 @@ const MaintenanceTable = (props) => {
);
};
-function mapStateToProps (state) {
+function mapStateToProps(state) {
const { auth, depMessage, userList, reportList, reportDetail, depUser, global, allDepUsers } = state;
const pakData = (dep) => {
return dep.map((d) => {
diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js
index 69cd3670..efbb9d50 100644
--- a/web/client/src/sections/fillion/components/patrolTable.js
+++ b/web/client/src/sections/fillion/components/patrolTable.js
@@ -45,7 +45,7 @@ const DetailForm = (props) => {
const keyList = [
// { key: '编号', name: 'id' },
// isPatrol ?'巡查管理详情' :isRoad ? '建设上报详情' : '异常反馈详情'
- { key: '工程类型', name: 'projectType', skip: isPatrol },
+ { key: '工程类型', name: 'projectType', skip: !isPatrol },
{ key: '反馈类型', name: 'projectType', skip: !isAnomaly },
{ key: '工程名称', name: 'projectName', skip: !isRoad },
{ key: '所在路段', name: 'road', skip: isPatrol },
@@ -53,6 +53,7 @@ const DetailForm = (props) => {
{ key: '巡查内容', name: 'content', skip: isPatrol },
{ key: '路线代码', name: 'codeRoad', skip: !isAnomaly && isPatrol },
{ key: '现场照片', name: 'scenePic', skip: isPatrol },
+ { key: '处理意见', name: 'handleOpinions', skip: !isAnomaly },
{ key: '处理详情', name: 'handleContent', skip: !isAnomaly },
{ key: '处理图片', name: 'handlePic', skip: !isAnomaly },
{ key: '处理人', name: 'performerName', skip: !isAnomaly },
@@ -89,13 +90,13 @@ const DetailForm = (props) => {
{ key: '巡查内容', name: 'content' },
{ key: '路线代码', name: 'codeRoad', skip: !isAnomaly && !isPatrol },
{ key: '现场照片', name: 'scenePic' },
+ { key: '处理意见', name: 'handleOpinions', skip: !isAnomaly },
{ key: '处理详情', name: 'handleContent', skip: !isAnomaly },
{ key: '处理图片', name: 'handlePic', skip: !isAnomaly },
{ key: '处理人', name: 'performerName', skip: !isAnomaly }
];
const changeBoolean = (bool) => {
- //console.log('bool', bool)
return bool ? '无异常' : '有异常'
}
const renderContent = (data) => {
@@ -113,7 +114,7 @@ const DetailForm = (props) => {
{obj.key}
{
- obj.name != 'scenePic' && obj.name != 'roadSectionStart' && obj.name != 'videoUrl' && obj.name.indexOf('conserve') == -1 ?
+ obj.name != 'handlePic' && obj.name != 'scenePic' && obj.name != 'roadSectionStart' && obj.name != 'videoUrl' && obj.name.indexOf('conserve') == -1 ?
{
}
}
- // console.log('selectedKeys', selectedKeys, selected, selectedNodes, node)
};
@@ -713,6 +713,7 @@ const PatrolTable = (props) => {
const isPatrol = !isRoad && !isAnomaly
const reportType = isRoad ? 'road' : isAnomaly ? 'anomaly' : 'patrol';
const [isModalOpen, setIsModalOpen] = useState(false);
+ const [phoneList, setPhoneList] = useState([]);
const [form] = Form.useForm();
useEffect(() => {
queryData();
@@ -815,14 +816,13 @@ const PatrolTable = (props) => {
}
}
useEffect(() => {
- console.log(anspectionNotificationPhoneList, '数据');
let phoneList = []
if (anspectionNotificationPhoneList && anspectionNotificationPhoneList.length) {
phoneList = anspectionNotificationPhoneList.map(e => {
return e.phone
})
}
- console.log(phoneList, '789789789789');
+ setPhoneList(phoneList)
}, [anspectionNotificationPhoneList])
const showModal = () => {
@@ -832,7 +832,6 @@ const PatrolTable = (props) => {
const handleOk = () => {
// setIsModalOpen(false);
form.validateFields().then(values => {
- console.log(values, '----------');
dispatch(addAnspectionNotificationPhone(values)).then(res => {
if (res.success) {
setIsModalOpen(false);
@@ -862,7 +861,10 @@ const PatrolTable = (props) => {
sm: { span: 20, offset: 4 },
},
};
+ let routerUrl = window.location.href
+ routerUrl = routerUrl.substring(routerUrl.length - 14)
+ console.log(routerUrl, '=========');
return (
@@ -908,7 +910,10 @@ const PatrolTable = (props) => {
: ''
}
-
+ {
+ routerUrl == 'patrol_anomaly' ? : ''
+ }
+
{/* */}
: ''
@@ -926,15 +931,7 @@ const PatrolTable = (props) => {
{
- // if (!names || names.length < 1) {
- // return Promise.reject(new Error('At least 2 passengers'));
- // }
- // },
- // },
- // ]}
+ initialValue={phoneList}
>
{(fields, { add, remove }, { errors }) => (
<>
diff --git a/web/client/src/sections/fillion/components/project/project.js b/web/client/src/sections/fillion/components/project/project.js
index c6caac02..34fa4e80 100644
--- a/web/client/src/sections/fillion/components/project/project.js
+++ b/web/client/src/sections/fillion/components/project/project.js
@@ -15,7 +15,8 @@ const data = {
"designUnit": "设计单位",
"constructionControlUnit": "监理单位",
//"startTime": "开工时间",
- //"remark": "备注"
+ //"remark": "备注",
+ "roadCodeStart": "起点路段编码",
}
const ProjectModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd, setDelet, getData } = props
@@ -214,7 +215,7 @@ const ProjectModal = (props) => {
)
}
-function mapStateToProps(state) {
+function mapStateToProps (state) {
const { depMessage } = state;
const pakData = (dep) => {
return dep.map((d) => {
diff --git a/web/client/src/sections/fillion/components/transportationTable.js b/web/client/src/sections/fillion/components/transportationTable.js
index d4d4264d..99e35d15 100644
--- a/web/client/src/sections/fillion/components/transportationTable.js
+++ b/web/client/src/sections/fillion/components/transportationTable.js
@@ -24,6 +24,7 @@ const TransporTationTable = (props) => {
const [differentiate, setDifferentiate] = useState('road')
const [grade, setGrade] = useState('县')
const [departmentInfo, setDepartment] = useState('')
+ const [roadData, setRoadData] = useState([])//道路数据
const [editAble, setEditAble] = useState(user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'ROADMANAGE')[0].isshow === "true" ? true : '')
const ref = useRef()
useEffect(() => { ref.current.reload() }, [whichofits, delet])
@@ -3761,6 +3762,7 @@ const TransporTationTable = (props) => {
setWhichofits('县')
setDifferentiate('road')
setGrade('县')
+ setRoadData([])
}}>县道{activeKey === 'tab1'},
},
{
@@ -3769,6 +3771,7 @@ const TransporTationTable = (props) => {
setWhichofits('乡')
setGrade('乡')
setDifferentiate('road')
+ setRoadData([])
}}>乡道{activeKey === 'tab2'},
},
@@ -3778,6 +3781,7 @@ const TransporTationTable = (props) => {
setWhichofits('村')
setDifferentiate('road')
setGrade('村')
+ setRoadData([])
}}>村道{activeKey === 'tab3'},
},
@@ -3819,8 +3823,8 @@ const TransporTationTable = (props) => {
}
setRowSelected([]);
const res = await dispatch(getRoadway(query));
- // console.log(res)
-
+ const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))];
+ setRoadData(uniqueArray)
setCounts(departmentInfo ? res.payload.data.filter((item) => {
return item.townshipCode === departmentInfo.areaCode
}) : res.payload.data)
@@ -3836,6 +3840,8 @@ const TransporTationTable = (props) => {
}
setRowSelected([]);
const res = await dispatch(getRoadway(query));
+ const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))];
+ setRoadData(uniqueArray)
setCounts(departmentInfo ? res.payload.data.filter((item) => {
return item.townshipCode === departmentInfo.areaCode
}) : res.payload.data)
@@ -3849,7 +3855,9 @@ const TransporTationTable = (props) => {
road: sitename
}
setRowSelected([]);
- const res = await dispatch(getRoadway(query));
+ const res = await dispatch(getRoadway(query))
+ const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))];
+ setRoadData(uniqueArray)
setCounts(departmentInfo ? res.payload.data.filter((item) => {
return item.townshipCode === departmentInfo.areaCode
}) : res.payload.data)
@@ -3864,8 +3872,8 @@ const TransporTationTable = (props) => {
entryName: sitename
}
setRowSelected([]);
- const res = await dispatch(getProject(query));
- setCounts(res.payload.data)
+ const res = await dispatch(getProject(query))
+ console.log('56666666', res)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
@@ -3875,6 +3883,7 @@ const TransporTationTable = (props) => {
search={{
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
+ {`共有${whichofits}道:${roadData.length || 0}条`},
...dom.reverse(),
{ props.exports(rowSelected, grade, differentiate) }}
disabled={user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'ROADMANAGE')[0].isshow === "true" ? true : ''}
@@ -3884,7 +3893,7 @@ const TransporTationTable = (props) => {
>
导出
-
+ ,
],
}}
>
diff --git a/web/client/src/sections/fillion/components/uploads.js b/web/client/src/sections/fillion/components/uploads.js
new file mode 100644
index 00000000..782fc311
--- /dev/null
+++ b/web/client/src/sections/fillion/components/uploads.js
@@ -0,0 +1,326 @@
+'use strict';
+
+import React, { Component } from 'react';
+import { connect } from 'react-redux';
+import { Spin, Upload, message, Modal, Card, Button } from 'antd';
+import moment from 'moment';
+import { PlusOutlined, UploadOutlined, CloseOutlined } from '@ant-design/icons';
+
+class Uploads extends Component {
+ constructor(props) {
+ super(props);
+ this.ApiRoot = localStorage.getItem('tyApiRoot')
+ this.state = {
+ fileUploading: false,
+ fileList: [],
+ curPreviewPic: '',
+ delPicIng: false,
+ removeFilesList: []
+ };
+ }
+
+ dealName = (uploaded) => {
+ console.log(uploaded)
+ let realName = uploaded.split('/')[2]
+ let x1 = realName.split('.')
+ let x2 = x1[0].split('_')
+ let showName = `${x2[0]}.${x1[1]}`
+ return showName
+ }
+
+ setFileList = (value) => {
+ let defaultFileList = [];
+ defaultFileList = value.map((u, index) => {
+ let fileUrl = `${u.url}`;
+ return {
+ uid: -index - 1,
+ name: this.dealName(u.url),
+ status: 'done',
+ storageUrl: u.url,
+ url: fileUrl
+ };
+ });
+ // onChange(defaultFileList)
+ this.setState({
+ fileList: defaultFileList
+ });
+ };
+
+ componentDidMount () {
+ const { value } = this.props;
+ if (value) {
+ this.setFileList(value);
+ }
+ }
+
+ componentWillReceiveProps (np) {
+ const { dispatch, value: thisEditData, onChange } = this.props;
+ const { value: nextEditData, clearFileList } = np;
+
+ const setFileList = () => {
+ let defaultFileList = [];
+ defaultFileList = nextEditData.map((u, index) => {
+ let fileUrl = `${this.ApiRoot}/${u.storageUrl}`;
+ return {
+ uid: -index - 1,
+ name: this.dealName(u.storageUrl),
+ status: 'done',
+ storageUrl: u.storageUrl,
+ url: fileUrl,
+ size: u.size || -1
+ };
+ });
+ this.setState({
+ fileList: defaultFileList
+ });
+ };
+
+ if (nextEditData && nextEditData.length) {
+ if (!thisEditData || !this.state.fileList.length) {
+ setFileList();
+ } else if (nextEditData.length != thisEditData.length) {
+ setFileList();
+ } else {
+ let repeat = true;
+ for (let i = 0; i < thisEditData.length; i++) {
+ if (thisEditData[i] != nextEditData[i]) {
+ repeat = false;
+ break;
+ }
+ }
+ if (!repeat) {
+ setFileList();
+ }
+ }
+ }
+
+
+ if (clearFileList) {
+ this.setState({
+ fileList: []
+ });
+ }
+
+
+ // else{
+ // this.setState({
+ // fileList:[],
+ // })
+ // }
+ }
+
+ render () {
+ const UploadPath = {
+ project: ['txt', 'dwg', 'doc', 'docx', 'xls', 'xlsx', 'pdf', 'png', 'jpg', 'rar', 'zip'],
+ report: ['doc', 'docx', 'xls', 'xlsx', 'pdf'],
+ data: ['txt', 'xls', 'xlsx'],
+ image: ['png', 'jpg', 'svg', 'jpeg'],
+ three: ['js'],
+ video: ['mp4']
+ };
+ /**
+ * uploadType 【string】 主要区别文件上传路径 以及类型 以 web/routes/attachment/index.js 中 UploadPath 的 key 值为准;默认 project;
+ * disabled 【boolean】 上传是否可用
+ * maxFilesNum 【number】 最大上传数量
+ * fileTypes 【array[string]】 可允许上传的文件类型;
+ * maxFileSize 【number】 单个文件最大大小 M
+ * listType 【antd】 upload 组件的属性
+ * onChange 【function】 文件数量变化时候回调 返回文件
+ * value 【array[obj]】 编辑数据 [{url:'xxx', [size:999]}]
+ * onStateChange 【function】 文件状态改变回调函数 上传中 return { uploading:true/false }
+ */
+ const {
+ uploadType,
+ disabled,
+ maxFilesNum,
+ fileTypes,
+ maxFileSize,
+ listType,
+ onChange,
+ value,
+ showUploadList,
+ onStateChange
+ } = this.props;
+ const { fileList, curPreviewPic, delPicIng, removeFilesList } = this.state;
+ const that = this;
+ let uploadType_ = uploadType || 'project';
+ let maxFilesNum_ = maxFilesNum || 1;
+ let defaultFileTypes = fileTypes || UploadPath[uploadType_];
+ const uploadProps = {
+ name: 'checkFile_',
+ multiple: false,
+ showUploadList: showUploadList || true,
+ action: `${this.ApiRoot}/attachments/${uploadType_}`,
+ listType: listType || 'text',
+ disabled: disabled,
+ beforeUpload: (file) => {
+ if (fileList.length >= maxFilesNum_) {
+ message.warning(`最多选择${maxFilesNum_}个文件上传`);
+ return false;
+ }
+ if (file.name.length > 60) {
+ message.warning(`文件名过长(大于60字符),请修改后上传`);
+ return false;
+ }
+ const extNames = file.name.split('.');
+ var reg = /^[\.\s\u4e00-\u9fa5a-zA-Z0-9_-]{0,}$/;
+ if (!reg.exec(file.name)) {
+ message.warning(`文件名包含除字母、汉字、数字、中划线、下划线之外的字符,请修改后上传`);
+ return false;
+ }
+ let isDAE = false;
+ if (extNames.length > 0) {
+ let fileType = extNames[extNames.length - 1].toLowerCase();
+ isDAE = defaultFileTypes.some((f) => f == fileType);
+ }
+ if (!isDAE) {
+ message.error(`只能上传 ${defaultFileTypes.join()} 格式的文件!`);
+ return false;
+ }
+ const isLt = file.size / 1024 / 1024 < (maxFileSize || 3);
+ if (!isLt) {
+ message.error(`文件必须小于${maxFileSize || 3}MB!`);
+ return false;
+ }
+ this.setState({
+ fileUploading: true
+ });
+ if (onStateChange) {
+ onStateChange({ uploading: true });
+ }
+ },
+ onChange (info) {
+ const status = info.file.status;
+ if (status === 'uploading') {
+ that.setState({
+ fileList: info.fileList
+ });
+ }
+ if (status === 'done') {
+ let { uploaded, url } = info.file.response;
+ let size = info.file.size;
+ let nextFileList = fileList;
+ nextFileList[nextFileList.length - 1] = {
+ uid: -moment().unix(),
+ name: that.dealName(uploaded),
+ status: 'done',
+ storageUrl: uploaded,
+ url: url,
+ size: size
+ };
+ onChange(nextFileList);
+ that.setState({
+ fileUploading: false,
+ fileList: nextFileList
+ });
+ if (onStateChange) {
+ onStateChange({ uploading: false });
+ }
+ } else if (status === 'error') {
+ that.setState({
+ fileUploading: false
+ });
+ message.error(`${info.file.name} 上传失败,请重试`);
+ if (onStateChange) {
+ onStateChange({ uploading: false });
+ }
+ }
+ },
+ onRemove (file) {
+ let nextFileList = [];
+ fileList.map((f, i) => {
+ if (f.uid != file.uid) {
+ nextFileList.push(f);
+ }
+ });
+ let nextRemoveFiles = removeFilesList.concat([file.storageUrl]);
+ if (curPreviewPic == file.url) {
+ that.setState({
+ curPreviewPic: ''
+ });
+ }
+ onChange(nextFileList);
+ that.setState({
+ fileList: nextFileList,
+ removeFilesList: nextRemoveFiles
+ });
+ },
+ onPreview (file) {
+ let filePostfix = file.url.split('.').pop();
+ filePostfix = filePostfix.toLowerCase();
+ if (UploadPath.image.some((img) => img == filePostfix)) {
+ that.setState({
+ curPreviewPic: file.url
+ });
+ } else {
+ message.warn('仅支持图片预览');
+ }
+ }
+ };
+
+ let fileList_ = fileList
+ // .map(f => {
+ // if (f.storageUrl) {
+ // let realName = f.storageUrl.split('/').pop()
+ // if (f.name != realName) {
+ // f.name = realName
+ // }
+ // }
+ // return f
+ // })
+ console.log('fileList_:', fileList_);
+ return (
+
+
+
+ {
+ disabled ? (
+ ''
+ ) :
+ listType == 'picture-card' ?
+ (
+ fileList.length >= maxFilesNum_ ? null : (
+
+ )
+ ) : (
+
+ )
+ }
+
+ {
+ curPreviewPic ? (
+
+
+ 文件预览
+ { this.setState({ curPreviewPic: '' }); }}
+ >
+
+
+
+
+
+ ) : ''
+ }
+
+
+ );
+ }
+}
+
+function mapStateToProps (state) {
+ const { auth } = state
+ return {
+ user: auth.user
+ };
+}
+
+export default connect(mapStateToProps)(Uploads);
diff --git a/web/client/src/sections/fillion/containers/luzheng.js b/web/client/src/sections/fillion/containers/luzheng.js
index 918da324..57cba564 100644
--- a/web/client/src/sections/fillion/containers/luzheng.js
+++ b/web/client/src/sections/fillion/containers/luzheng.js
@@ -4,8 +4,9 @@ import { getAssess, delAssess, editAssess } from '../actions/assess';
import { getRoadadministration,addRoadadministration,delRoadadministration,modifyRoadadministration } from '../actions/luzheng';
import ProTable from '@ant-design/pro-table';
import AssessModal from '../components/luzhengmodel';
-import { Form, Space, DatePicker, Button, Select, Popconfirm } from 'antd'
+import { Form, Space, DatePicker, Button, Select, Popconfirm ,Image} from 'antd'
import moment from 'moment';
+import { values } from 'lodash';
export const unitList = [
'县道',
@@ -34,9 +35,13 @@ function Assess(props) {
const [query, setQuery] = useState({ page: 1, pageSize: 10 })
const [loading, setLoading] = useState(false);
const [isCheck, setIsCheck] = useState(false)
+ const [datasource,setdatasource] = useState([])
+ const [dateRange, setDateRange] = useState(['1970-1-1', '2099-12-31']);
+ const { RangePicker } = DatePicker
+ const [total,settotal]= useState(0)
const [editAble, setEditAble] = useState(user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'ASSESSMANAGE')?.isshow === "true" ? true : '')
useEffect(() => {
- dispatch(getRoadadministration()).then(res=>{console.log(res,'res')})
+
return () => { };
}, []);
@@ -47,7 +52,11 @@ function Assess(props) {
const getData = () => {
setLoading(true)
dispatch(getRoadadministration(query)).then(res => {
- setLoading(false)
+ if(res?.success){
+ setdatasource(res?.payload?.data?.rows)
+ settotal(res?.payload?.data?.count)
+ setLoading(false)
+ }
})
}
@@ -55,20 +64,14 @@ function Assess(props) {
-
-
+
-
-
+
+ { setDateRange(dateString) }} style={{ marginRight: '50px' }} />
@@ -86,6 +89,9 @@ function Assess(props) {
title: '执法日期',
dataIndex: 'enforcementdate',
key: 'enforcementdate',
+ render:(t,r)=>{
+ return r?.enforcementdate?moment(r?.enforcementdate).format('YYYY-MM-DD'):'--'
+ }
},
{
title: '执法道路',
@@ -101,6 +107,23 @@ function Assess(props) {
title: '执法图片',
dataIndex: 'picfile',
key: 'picfile',
+ render:(t,r)=>{
+ if(r?.picfile && r?.picfile?.length!==0){
+ return r?.picfile?.map(i=>{
+ return
+
+
+ })
+ }else{
+ return '--'
+ }
+
+
+
+
+
+
+ }
},
{
title: '操作',
@@ -115,13 +138,13 @@ function Assess(props) {
+
+ }} disabled = { editAble }>编辑
{
setLoading(true)
- dispatch(delAssess({ id: record.id })).then(res => {
+ dispatch(delRoadadministration(record.id)).then(res => {
setLoading(false)
if (res.success) {
getData()
@@ -134,10 +157,10 @@ function Assess(props) {
),
},]}
- dataSource={assess.rows || []}
+ dataSource={datasource || []}
loading={loading}
pagination={{
- total: assess?.count || 0,
+ total: total || 0,
pageSize: 10,
defaultPageSize: 10,
showSizeChanger: false,
@@ -153,7 +176,7 @@ function Assess(props) {
search={false}
/>
{
- assessModalVisible ? {
+ assessModalVisible ? {
getData()
setIsCheck(false)
setEditData(null)
diff --git a/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js b/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js
index 4fcbd1aa..28d119a7 100644
--- a/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js
+++ b/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js
@@ -61,6 +61,7 @@ const DetailForm = (props) => {
{ key: '修复端头(块)', name: 'endHeadRepair' },
{ key: '其他养护内容', name: 'otherDescription' },
{ key: '养护前图片', name: 'conserveBeforePic' },
+ { key: '养护中图片', name: 'conserveUnderwayPic' },
{ key: '养护后图片', name: 'conserveAfterPic' },
{ key: '上报视频', name: 'videoUrl' },
diff --git a/web/client/src/sections/fillion/nav-item.js b/web/client/src/sections/fillion/nav-item.js
index 8ac54677..f8644ec0 100644
--- a/web/client/src/sections/fillion/nav-item.js
+++ b/web/client/src/sections/fillion/nav-item.js
@@ -20,20 +20,22 @@ export function getNavItem(user, dispatch) {
i.resourceId === 'ASSESSMANAGE' ||
i.resourceId === 'VIDEOCENTER' ||
i.resourceId === 'BUILDINGPROJECT' ||
- i.resourceId === 'MAINTENANCESPOTCHECK'
+ i.resourceId === 'MAINTENANCESPOTCHECK' ||
+ i.resourceId === 'LUZHENG'
)
return (
user?.username == 'SuperAdmin' || isshow ?
} title={'数据管理'}>
- {user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'OVERLOADMANAGE') ?
+ {/* {user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'OVERLOADMANAGE') ?
治超管理
- : ''}
+ : ''} */}
{/*
任务管理
*/}
- {user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'OVERLOADMANAGE') ?
+
+ {user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'LUZHENG') ?
路政管理
: ''}
diff --git a/web/client/src/sections/quanju/containers/footer/build/Leftbottom.js b/web/client/src/sections/quanju/containers/footer/build/Leftbottom.js
index ceb389b5..c2d5009f 100644
--- a/web/client/src/sections/quanju/containers/footer/build/Leftbottom.js
+++ b/web/client/src/sections/quanju/containers/footer/build/Leftbottom.js
@@ -17,9 +17,15 @@ function Leftbottom(props) {
"rgba(4,251,240,0.5)",
]
const safetyData = [
- {name: '县道', value: 72},
- {name: '乡道', value: 17},
- {name: '村道', value: 4},
+ { name: '县道', value: 72 },
+ { name: '乡道', value: 17 },
+ { name: '村道', value: 4 },
+ ]
+ //写死数据
+ const dataNo = [
+ { name: '县', value: 207.8 },
+ { name: '乡', value: 680.5 },
+ { name: '村', value: 1800.7 },
]
const chartTitle = '道路总公里';
const title = '基础设施安全监测版块';
@@ -34,7 +40,7 @@ function Leftbottom(props) {
value: d.value
})
})
-
+
// let safetyOption = {
// tooltip: {
// show: true,
@@ -63,7 +69,7 @@ function Leftbottom(props) {
// // fontSize: 12,
// // fontWeight:500,
// // color:'#E9F7FF',
-
+
// // }
// // },
// legend: [
@@ -141,60 +147,60 @@ function Leftbottom(props) {
},
formatter: (values) => `${values.seriesName}
${values.marker} ${values.name}${values.value}公里`,
},
-// title: {
-// text:total,//主标题文本
-// left:'20%',
-// // top:'35%',
-// subtext:chartTitle,//副标题文本
-// textStyle:{
-// fontFamily : "YouSheBiaoTiHei",
-// fontSize: 20,
-// color:'#FFFFFF',
-// marginLeft:'20%',
-// align:'center'
-// },
-// subtextStyle:{
-// fontFamily : "PingFangSC-Medium PingFang SC",
-// fontSize: 12,
-// fontWeight:500,
-// color:'#E9F7FF',
-// align:'center'
+ // title: {
+ // text:total,//主标题文本
+ // left:'20%',
+ // // top:'35%',
+ // subtext:chartTitle,//副标题文本
+ // textStyle:{
+ // fontFamily : "YouSheBiaoTiHei",
+ // fontSize: 20,
+ // color:'#FFFFFF',
+ // marginLeft:'20%',
+ // align:'center'
+ // },
+ // subtextStyle:{
+ // fontFamily : "PingFangSC-Medium PingFang SC",
+ // fontSize: 12,
+ // fontWeight:500,
+ // color:'#E9F7FF',
+ // align:'center'
-// }
-// },
-legend: {
- orient: "vertical",
- itemWidth: 10,
- itemHeight: 10,
- // right: '30%',
- right: '10%',
- top: 'center',
- align: 'left',
- data: name,
- formatter: (name) => {
- for (let i = 0; i < option.series[1].data.length; i += 1) {
- if (name === option.series[1].data[i].name) {
- let arr = [`{a|${name}}`, `{b|${option.series[1].data[i].value}}`]
- return arr.join('\t');
- }
- }
- },
- textStyle: {
- rich: {
- a: {
- color: '#E9F7FF',
- fontSize: 14,
- padding:[0,10]
- },
- b: {
- fontSize: 16,
- fontFamily: 'YouSheBiaoTiHei',
- color: '#fff',
- padding:[0,0,0,12]
+ // }
+ // },
+ legend: {
+ orient: "vertical",
+ itemWidth: 10,
+ itemHeight: 10,
+ // right: '30%',
+ right: '10%',
+ top: 'center',
+ align: 'left',
+ data: name,
+ formatter: (name) => {
+ for (let i = 0; i < option.series[1].data.length; i += 1) {
+ if (name === option.series[1].data[i].name) {
+ let arr = [`{a|${name}}`, `{b|${option.series[1].data[i].value}}`]
+ return arr.join('\t');
+ }
+ }
},
- }
- }
-},
+ textStyle: {
+ rich: {
+ a: {
+ color: '#E9F7FF',
+ fontSize: 14,
+ padding: [0, 10]
+ },
+ b: {
+ fontSize: 16,
+ fontFamily: 'YouSheBiaoTiHei',
+ color: '#fff',
+ padding: [0, 0, 0, 12]
+ },
+ }
+ }
+ },
grid: {
left: '10%'
},
@@ -229,7 +235,8 @@ legend: {
label: {
show: false
},
- data: data,
+ data: dataNo,
+ // data: data,
},
],
};
@@ -262,23 +269,24 @@ legend: {
// highlightPie();
// }
// let changePieInterval = setInterval(selectPie, 1000);
-
+
myChart.onChartReady = (instance) => {
chartRef.current.safetyChart = instance;
}
myChart.setOption(option);
- return ()=>{
+ return () => {
// clearInterval(changePieInterval)
}
-}, [data]);
+ }, [data]);
return (
-
公里
-
-
{total}
+
公里
+
+
2689.00
+ {/* {total}
*/}
道路总公里
-
+
diff --git a/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js b/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
index fdc5d7ea..f057bbc5 100644
--- a/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
+++ b/web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
@@ -4,7 +4,7 @@ import { Col, Progress, Row } from 'antd';
import React, { useEffect, useRef, useState } from 'react';
// import ReactEcharts from 'echarts-for-react';
import * as echarts from 'echarts';
-function Rightbottom (props) {
+function Rightbottom(props) {
const { width, height, total, data, text } = props
const chartRef = useRef(null);
const [shuzu, setShuzu] = useState()
@@ -208,16 +208,17 @@ function Rightbottom (props) {
return (
-
-
-
- ► 三级及以上
-
-
{sanji[2] + sanji[3] + sanji[4]}
-
+
+
+
+ ► 三级及以上
+
+
{sanji[2] + sanji[3] + sanji[4]}
+
{/* 段 */}
-
{total || 0}
+ {/* {total || 0}
*/}
+ 2689.00
道路总公里
{/*
@@ -226,16 +227,16 @@ function Rightbottom (props) {
-
-
+
+
-
-
-
-
► 四级
+
+
+
+ ► 四级
+
+
{siji[0] + siji[1]}
-
{siji[0] + siji[1]}
-
);
diff --git a/web/client/src/sections/quanju/containers/footer/build/Rightcenter.js b/web/client/src/sections/quanju/containers/footer/build/Rightcenter.js
index 8c62e979..7cc464d5 100644
--- a/web/client/src/sections/quanju/containers/footer/build/Rightcenter.js
+++ b/web/client/src/sections/quanju/containers/footer/build/Rightcenter.js
@@ -27,7 +27,6 @@ const THIRD = "linear-gradient(360deg, rgba(148, 148, 255, 0.1) 0%, rgba(148, 14
const OTHER = "linear-gradient(360deg, rgba(28, 96, 253, 0) 0%, rgba(28, 96, 253, 0.2) 100%)"
let TOTALS = data?.map(({ name, total }, index) => {
let max = Math.max(...data.map(item=>item.total))
- // console.log(data.map(item=>item.total),'好朋友吗')
return {
name,
value: total,
@@ -38,7 +37,6 @@ let new_TOTALS = TOTALS && TOTALS.length > 10 ? TOTALS.slice(0, 10) : TOTALS
function Cell(props) {
const { name, rank, value, percent, style = {},cebg } = props
let bg = RNAKS[rank] || OTHER
- // console.log(percent,'百分比')
return
{
- const { dispatch } = props
+ const { dispatch, projectList } = props
let data1 = [
{ name: "县", value: 207 },
{ name: "乡", value: 729 },
@@ -26,8 +28,6 @@ const Build = (props) => {
// {name: '二级公路', value: 17},
// {name: '三级公路', value: 17},
// {name: '四级公路', value: 30},
-
-
// ]
const [buildingnumber, setbuildingnumber] = useState(0)
const [data, setdata] = useState([])
@@ -43,22 +43,17 @@ const Build = (props) => {
const requestbuildingnumber = async () => {
const res = await dispatch(getdaolutongji());
let alltype = Object.keys(res.payload.data?.roadType || {}).map((item) => ({ name: item, value: Number(keepThreeNum(res.payload.data.roadType[item])) }))
- // console.log(alltype,'打他啊')
setdata(alltype.filter(item => item.name === '县' || item.name === "乡" || item.name === '村'))
setbuildingnumber(res.payload.data)
- console.log(res.payload.data, '哈哈哈')
-
}
//获取宣传栏数据
const requestxuanchuanlan = async () => {
const res = await dispatch(getxuanchuan());
-
// setdata(alltype.filter(item=>item.name!=='null'))
setxuandata(res.payload.data || [])
- console.log(res.payload.data, '宣传栏数据')
-
}
+
let t1 = Object.values(buildingnumber?.townRoad || {})
let totalgongli = t1.length !== 0 ? t1.reduce((x, y) => x + y.mileage, 0) : 0 //乡镇道路占比总公里数
@@ -86,7 +81,6 @@ const Build = (props) => {
return b.number - a.number
})
list = list.filter(item => item.name !== "其他")
- // console.log(list,'红红火')
//道路等级数据
let alldengji = Object.keys(buildingnumber?.roadLevel || {}).map((item) => ({ name: item, value: Number(keepThreeNum(buildingnumber.roadLevel[item])) }))
@@ -95,10 +89,8 @@ const Build = (props) => {
onlineproject = onlineproject.sort((a, b) => {
return b.total - a.total
})
- //console.log('onlineproject', onlineproject)
let sunonlineproject = onlineproject?.reduce((x, y) => x + y.total, 0)
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 === '等外公路')
let sundata = data?.reduce((x, y) => x + y.value, 0)
@@ -107,10 +99,13 @@ const Build = (props) => {
useEffect(() => {
requestbuildingnumber();
requestxuanchuanlan()
+ dispatch(getProject())
}, [])
+
useEffect(() => {
lunbo.current.goTo(lunboindex)
}, [lunboindex])
+
const rendercontent = () => {
return (
{list.map(({ name, number, gongli }, index) =>
@@ -128,8 +123,6 @@ const Build = (props) => {
// "enable": true
// }
// ]
- // console.log(localStorage.getItem("qndmn"), '七牛')
- // console.log(xuandata, "宣传")
let videos = []
if (xuandata && xuandata.length) {
@@ -143,7 +136,7 @@ const Build = (props) => {
}
}
}
- console.log(lunboindex)
+
return (
<>
@@ -174,35 +167,75 @@ const Build = (props) => {
:
}
-
- {totalcount && totalcount !== 0 ?
-
-
-
-
-
公路公里数/公里
-
{keepThreeNum(totalgongli)}
+ {
+ totalcount && totalcount !== 0 ?
+
+
+
+
+
+ 公路公里数/公里
+ {keepThreeNum(totalgongli)}
+
+
+
+
+
+ 公路总数/条
+ {totalcount || 0}
+
+
+
+ 乡镇名称
+ 公路数量/条
+ 公里
+
+
-
-
-
-
公路总数/条
-
{totalcount || 0}
+ :
+ }
+ */}
+
+ {
+ totalcount && totalcount !== 0 ?
+
+
+
+ 项目名称
+ 项目规模(公里)
+ 项目投资(万元)
+
+
+ {
+ projectList.map((p, index) => {
+ return (
+
+ {p.entryName}
+ {p.projectMileage}
+ {p.investment}
+
+ )
+ })
+ }
+
+ }
+ containerStyle={{ position: "relative", height: "85%", }}
+ divHeight={"100%"} divId={"chart"}
+ />
-
-
- 乡镇名称
- 公路数量/条
- 公里
-
-
-
:
}
+ :
+ }
{
width='100%'
height='100%'
text='道路总公里'
+ //total={keepThreeNum(sundata)}
total={keepThreeNum(sundata)}
// colorList={colorList}
// underColorList={underColorList}
@@ -231,17 +265,13 @@ const Build = (props) => {
{/* {
videos.map((v, i) => {
- console.log('first')
return i == lunboMsg.current.index ?
{
@@ -67,7 +69,9 @@ const Leftcenter = (props) => {
桥梁统计座
-
{isNaN((bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])) ? "" : (bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])}
+
165
+
+ {/*
{isNaN((bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])) ? "" : (bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])}
*/}
diff --git a/web/client/src/sections/quanju/containers/footer/operation/right.js b/web/client/src/sections/quanju/containers/footer/operation/right.js
index e5cc28db..f1ce70d2 100644
--- a/web/client/src/sections/quanju/containers/footer/operation/right.js
+++ b/web/client/src/sections/quanju/containers/footer/operation/right.js
@@ -1,71 +1,151 @@
import React, { useState } from 'react'
-import { Carousel } from 'antd';
+import { Carousel, Input } from 'antd';
import Module from '../../public/module'
+import AutoRollComponent from '../build/AutoRollComponent'
+import { useEffect } from 'react';
+import { connect } from 'react-redux';
+import { busWillRun } from '../../public/olMap'
-const Right = () => {
- const [dataLists, setDataList] = useState([
- {
- route: '147',
- plate: '赣APJ090'
- }, {
- route: '166',
- plate: '赣APJ087'
- }, {
- route: '171',
- plate: '赣APJ184'
- }, {
- route: '186',
- plate: '赣APJ241'
- }, {
- route: '199',
- plate: '赣APJ337'
- }
- ])
- const style = { height: "97%", marginTop: "3%" }
- return (
-
-
-
-
- {
- dataLists.map((data, index) => (
-
-
-
-
- 所属线路
- {data.route}
- 车辆牌照号
- {data.plate}
-
-
-
-
- ))
- }
-
-
-
-
- )
+let queryTimeout = null
+const Right = ({ busRunTime }) => {
+ const [dataLists, setDataList] = useState([
+ {
+ route: '147',
+ plate: '赣APJ090'
+ }, {
+ route: '166',
+ plate: '赣APJ087'
+ }, {
+ route: '171',
+ plate: '赣APJ184'
+ }, {
+ route: '186',
+ plate: '赣APJ241'
+ }, {
+ route: '199',
+ plate: '赣APJ337'
+ }
+ ])
+ const [busRunTimeList, setBusRunTimeList] = useState(busRunTime)
+ const [queryStr, setQueryStr] = useState('')
+
+ useEffect(() => {
+ setBusRunTimeList(
+ queryStr ?
+ busRunTime.filter(b => {
+ return b?.busNoChar?.indexOf(queryStr) > -1
+ })
+ : busRunTime
+ )
+ }, [queryStr, busRunTime])
+
+ const style = { height: "97%", marginTop: "3%" }
+ return (
+
+
+
+
+
+
{
+ if (queryTimeout) {
+ clearTimeout(queryTimeout)
+ }
+ queryTimeout = setTimeout(() => {
+ setQueryStr(e.target.value)
+ }, 600)
+ }}
+ />
+
+
+
+ {
+ busRunTimeList.map((d, index) => {
+ return (
+
+
+
+
+ 车辆牌照
+ {d.busNoChar}
+ 调度状态
+ {busWillRun.find(w => w.value == d.willRun)?.text || '--'}
+
+
+ 发车时间
+ {d.lastDepTime}
+
+
+ 司机
+ {d.employeeName}
+ 工号
+ {d.opNo}
+
+
+
+ )
+ })
+ }
+ {/* {
+ dataLists.map((data, index) => (
+
+
+
+
+ 所属线路
+ {data.route}
+ 车辆牌照号
+ {data.plate}
+
+
+
+
+ ))
+ } */}
+
+
+
+
+ )
}
-export default Right
\ No newline at end of file
+
+function mapStateToProps (state) {
+ const { busRunTime, } = state;
+ return {
+ busRunTime: busRunTime.data || [],
+ };
+}
+
+export default connect(mapStateToProps)(Right);
\ No newline at end of file
diff --git a/web/client/src/sections/quanju/containers/public/olMap.js b/web/client/src/sections/quanju/containers/public/olMap.js
index a3da1c71..721ebc81 100644
--- a/web/client/src/sections/quanju/containers/public/olMap.js
+++ b/web/client/src/sections/quanju/containers/public/olMap.js
@@ -5,9 +5,21 @@ import Hua from '../footer/leadership/centerleft/hudong'
import moment from 'moment';
import { OlMapRequest } from '$utils'
+export const busWillRun = [
+ { text: '非运营', value: '0' },
+ { text: '运营', value: '1' },
+ { text: '维修', value: '2' },
+ { text: '保养', value: '3' },
+ { text: '专车', value: '4' },
+ { text: '机动车', value: '5' },
+ { text: '包车', value: '6' },
+ { text: '班车', value: '7' },
+ { text: '检车', value: '8' },
+]
+
const OlMap = (props) => {
const { dispatch, actions, user, olMapArcgisHost, olMapGeoDataHost, patrolList, roadProjectList, tab, busRunTime, busLine } = props
- console.log(patrolList)
+
const [olMapOpenData, setOlMapOpenData] = useState([])
const [olMap, setOlMap] = useState()
const [pointItem, setPointItem] = useState({})
@@ -188,7 +200,6 @@ const OlMap = (props) => {
positioning: 'top-right'
})
// 请求路线坐标
- console.log(d.code_road);
if (d.code_road) {
let codeMap = {
x: 'gpsxd',
@@ -205,7 +216,6 @@ const OlMap = (props) => {
})
.then(res => {
if (res.status == 200 && res.body && res.body.code == 1) {
- console.log(res);
const data = res.body.data
const { datalist } = data
if (datalist?.list?.length) {
@@ -365,17 +375,7 @@ const OlMap = (props) => {
}, {
n: '调度状态',
v: d.willRun,
- map: [
- { text: '非运营', value: '0' },
- { text: '运营', value: '1' },
- { text: '维修', value: '2' },
- { text: '保养', value: '3' },
- { text: '专车', value: '4' },
- { text: '机动车', value: '5' },
- { text: '包车', value: '6' },
- { text: '班车', value: '7' },
- { text: '检车', value: '8' },
- ],
+ map: busWillRun,
}, {
n: '实际发车时间',
v: d.lastDepTime