diff --git a/web/client/assets/images/quanju/gonglugongcheng.png b/web/client/assets/images/quanju/gonglugongcheng.png new file mode 100644 index 00000000..a0e2474d Binary files /dev/null and b/web/client/assets/images/quanju/gonglugongcheng.png differ diff --git a/web/client/assets/images/quanju/gonglugongli.png b/web/client/assets/images/quanju/gonglugongli.png new file mode 100644 index 00000000..fa3eb038 Binary files /dev/null and b/web/client/assets/images/quanju/gonglugongli.png differ diff --git a/web/client/assets/images/quanju/gongluzong.png b/web/client/assets/images/quanju/gongluzong.png new file mode 100644 index 00000000..b96788d5 Binary files /dev/null and b/web/client/assets/images/quanju/gongluzong.png differ diff --git a/web/client/assets/images/quanju/xuanchuanlan.jpg b/web/client/assets/images/quanju/xuanchuanlan.jpg new file mode 100644 index 00000000..7e6ac53d Binary files /dev/null and b/web/client/assets/images/quanju/xuanchuanlan.jpg differ diff --git a/web/client/src/sections/fillion/components/promotionalTable.js b/web/client/src/sections/fillion/components/promotionalTable.js new file mode 100644 index 00000000..7b7803fc --- /dev/null +++ b/web/client/src/sections/fillion/components/promotionalTable.js @@ -0,0 +1,170 @@ +import React, { useEffect, useState } from 'react'; +import { connect } from 'react-redux'; +import { Spin, Button, Popconfirm, Badge } from 'antd'; +import ProTable from '@ant-design/pro-table'; +import './protable.less' +import moment from 'moment'; +import { getReportStatistic } from "../actions/infor" +const promotionalTable = (props) => { + const { dispatch, user, depData, depMessage, depLoading } = props + const [rowSelected, setRowSelected] = useState([]) + const [regionId, setRegionId] = useState()//区域id + const [placeType, setPlaceType] = useState()//场所 + const [day, setDay] = useState([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])//日期 + const [sitename, setSitename] = useState()//场所名称 + const [counts, setCounts] = useState()//shuju + useEffect(() => { + setRegionId(user.departmentId) + }, [user]) + + const columns = + [{ + title: '序号', + search: false, + dataIndex: 'containers', + + fixed: 'left', + width: 120, + render: (dom, record) => { + return record.address + }, + fieldProps: { + getPopupContainer: (triggerNode) => triggerNode.parentNode, + } + }, + { + title: '视频名称', + dataIndex: 'placeName', + fixed: 'left', + width: 120, + options: 1, + backgroundColor: "#ffffff", + fieldProps: { + onChange: (value, cs) => { + setSitename(value.currentTarget.value) + }, + placeholder: '请输入视频名称进行搜索', + getPopupContainer: (triggerNode) => triggerNode.parentNode, + }, + }, + + { + title: '修改时间', + search: false, + dataIndex: 'time2', + valueType: 'dateRange', + // align: 'right', + width: 120, + render: (dom, record) => { + return record.address + }, + fieldProps: { + getPopupContainer: (triggerNode) => triggerNode.parentNode, + } + }, + { + key: "direction", + hideInTable: true, + dataIndex: "direction", + order: 6, + renderFormItem: (item, { type, defaultRender, ...rest }, form) => { + return ( +
+
+ + + ); + }, + }, + ] + return ( + +
+ { finishedProductTable = c; }} + style={{ width: "100% ", overflow: "auto", height: '760px' }} + rowKey='id' + onReset={(v) => { + const { id } = depMessage[0] + console.log(id) + setRegionId(id) + setPlaceType(-1) + setDay([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]) + setSitename('') + }} + rowSelection={{ + selectedRowKeys: rowSelected, + onChange: (selectedRowKeys) => { + setRowSelected(selectedRowKeys); + }, + }} + columns={columns} + + dataSource={(counts || {}).rows || []} + request={async (params) => { + const query = { + startDate: day[0], + endDate: day[1], + placeType: placeType, + regionId: regionId, + placeName: sitename, + limit: params.pageSize, + offset: ((params.current ? params.current : 1) - 1) * params.pageSize + } + setRowSelected([]); + const res = await dispatch(getReportStatistic(query)); + setCounts(res.payload.data) + return { + ...res, + total: res.payload.data ? res.payload.data.count : 0 + } + }} + // search={{ + // defaultCollapsed: false, + // optionRender: (searchConfig, formProps, dom) => [ + // ...dom.reverse(), + // { props.exports(rowSelected, counts) }}> + // + // + // ], + // }} + > +
+ +
+ ) +} +function mapStateToProps(state) { + const { auth, depMessage } = state; + const pakData = (dep) => { + return dep.map((d) => { + return { + title: d.name, + value: d.id, + // children: d.type >= 2 ? [] : pakData(d.subordinate) + children: pakData(d.subordinate) + } + }) + } + let depData = pakData(depMessage.data || []) + return { + user: auth.user, + depMessage: depMessage.data || [], + depLoading: depMessage.isRequesting, + depData, + }; +} +export default connect(mapStateToProps)(promotionalTable); \ No newline at end of file diff --git a/web/client/src/sections/fillion/containers/index.js b/web/client/src/sections/fillion/containers/index.js index b135e3ee..64a7add4 100644 --- a/web/client/src/sections/fillion/containers/index.js +++ b/web/client/src/sections/fillion/containers/index.js @@ -8,5 +8,5 @@ import OperaTional from './operational'; import Enforce from './enforce'; import Public from './public'; import Videois from './videois'; - -export { Infor,transportation,BridgeTable,HigHways,OperaTional,Enforce,Public,Videois }; \ No newline at end of file +import PromoTional from './promotional'; +export { Infor,transportation,BridgeTable,HigHways,OperaTional,Enforce,Public,Videois,PromoTional }; \ No newline at end of file diff --git a/web/client/src/sections/fillion/containers/promotional.js b/web/client/src/sections/fillion/containers/promotional.js new file mode 100644 index 00000000..cdb3492d --- /dev/null +++ b/web/client/src/sections/fillion/containers/promotional.js @@ -0,0 +1,43 @@ +import React, { useEffect, useState } from 'react'; +import { connect } from 'react-redux'; +import '../style.less'; +import { getDepMessage, getReportStatistic } from "../actions/infor" +import EnforceTable from '../components/enforceTable'; +import PromoTionalTable from '../components/promotionalTable'; +const superagent = require('superagent'); +const promotional = (props) => { + const { dispatch, user } = props + const [data, setData] = useState() + useEffect(() => { + // dispatch(getDepMessage()) + dispatch(getReportStatistic()) + setData(props) + }, []); + // //批量导出 + // const exports = (ids, counts) => { + // // console.log(user); + // let reportIds = []; + // if (ids.length) + // reportIds = ids + // else + // reportIds = (counts || {}).ids || []; + // superagent.post('/_report/http') + // .send({ id: reportIds.map(i => Number(i)) }).end((err, res) => { + // const resTextIs = res.text.split('/').pop() + // window.open( + // '/_api/' + + // `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`) + // }) + // } + return ( + <> + + ) +} +function mapStateToProps(state) { + const { auth } = state + return { + user: auth.user, + } +} +export default connect(mapStateToProps)(promotional); \ No newline at end of file diff --git a/web/client/src/sections/fillion/nav-item.js b/web/client/src/sections/fillion/nav-item.js index 6517d23a..9f5f1cc7 100644 --- a/web/client/src/sections/fillion/nav-item.js +++ b/web/client/src/sections/fillion/nav-item.js @@ -29,6 +29,9 @@ export function getNavItem(user, dispatch) { 视频管理 + + 宣传视频 + ); -} \ No newline at end of file +} diff --git a/web/client/src/sections/fillion/routes.js b/web/client/src/sections/fillion/routes.js index aeba08d1..a0b01d3a 100644 --- a/web/client/src/sections/fillion/routes.js +++ b/web/client/src/sections/fillion/routes.js @@ -7,6 +7,7 @@ import { OperaTional } from './containers'; import { Enforce } from './containers'; import { Public } from './containers'; import { Videois } from './containers'; +import { PromoTional } from './containers'; export default [{ type: 'inner', route: { @@ -66,6 +67,13 @@ export default [{ component: Videois, breadcrumb: '视频管理', } + , { + path: '/promotional', + key: 'fillionpromotional', + menuSelectKeys: ['fillionpromotional'], + component: PromoTional, + breadcrumb: '视频管理', + } ] } }]; diff --git a/web/client/src/sections/quanju/containers/example.js b/web/client/src/sections/quanju/containers/example.js index d38abe45..6605abd1 100644 --- a/web/client/src/sections/quanju/containers/example.js +++ b/web/client/src/sections/quanju/containers/example.js @@ -11,9 +11,9 @@ const Example = (props) => { const { dispatch, actions, user, loading } = props const [tabKey, setTabKey] = useState('leadership') - useEffect(() => { - dispatch(actions.example.getMembers(user.orgId)) - }, []) + // useEffect(() => { + // dispatch(actions.example.getMembers(user.orgId)) + // }, []) const tabChange = (tab) => { //leader 领导驾驶舱 site 工地 toilet 公厕 light 照明 water水质 encomic经济 environment 生态环境 security 智慧安监 // setCurrentTab(tab); 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 d924cff1..5c923bdd 100644 --- a/web/client/src/sections/quanju/containers/footer/build/index.js +++ b/web/client/src/sections/quanju/containers/footer/build/index.js @@ -5,19 +5,37 @@ import LeftBottom from './Leftbottom' import RightTop from './Righttop' import Rightcenter from './Rightcenter' import Rightbottom from './Rightbottom' +import Module from '../../public/module' import './style.less' const Build = () => { return (
- - - + +
+ 在建公路数量 +
+
+ + +
- - - + + +
) diff --git a/web/client/src/sections/quanju/containers/public/module.js b/web/client/src/sections/quanju/containers/public/module.js index 53c833f1..eb1fefb5 100644 --- a/web/client/src/sections/quanju/containers/public/module.js +++ b/web/client/src/sections/quanju/containers/public/module.js @@ -12,7 +12,7 @@ const Module = (props) => { {title || []} -
+
{children}