diff --git a/api/app/lib/routes/project/index.js b/api/app/lib/routes/project/index.js
index 4cb4c3a..395f6c2 100644
--- a/api/app/lib/routes/project/index.js
+++ b/api/app/lib/routes/project/index.js
@@ -43,9 +43,6 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/project/group/statistic'] = { content: '获取项目分组统计信息', visible: true };
router.get('/project/group/statistic', projectGroup.groupStatistic);
- app.fs.api.logAttr['GET/project/group/statistic'] = { content: '获取项目分组统计信息', visible: true };
- router.get('/project/group/statistic', projectGroup.groupStatistic);
-
app.fs.api.logAttr['GET/project/group/statistic/online'] = { content: '获取项目分组在线率统计信息', visible: true };
router.get('/project/group/statistic/online', projectGroup.groupStatisticOnline);
};
\ No newline at end of file
diff --git a/web/client/assets/images/projectGroup/backend.png b/web/client/assets/images/projectGroup/backend.png
new file mode 100644
index 0000000..5544572
Binary files /dev/null and b/web/client/assets/images/projectGroup/backend.png differ
diff --git a/web/client/src/sections/projectGroup/actions/group.js b/web/client/src/sections/projectGroup/actions/group.js
index c84e90c..e7d2b18 100644
--- a/web/client/src/sections/projectGroup/actions/group.js
+++ b/web/client/src/sections/projectGroup/actions/group.js
@@ -32,4 +32,15 @@ export function delProjectGroup (id) {
url: `${ApiTable.projectGroup}?groupId=${id}`,
msg: { option: "删除项目分组" },
});
+}
+
+export function groupStatistic () {
+ return (dispatch) => basicAction({
+ type: "get",
+ dispatch: dispatch,
+ actionType: "GET_GROPUP_STATISTICS",
+ url: `${ApiTable.groupStatistic}`,
+ msg: { error: "获取项目分组统计信息失败" },
+ reducer: { name: "groupStatistic", params: { noClear: true } },
+ });
}
\ No newline at end of file
diff --git a/web/client/src/sections/projectGroup/components/header.jsx b/web/client/src/sections/projectGroup/components/header.jsx
index 3ea6e27..62a08fe 100644
--- a/web/client/src/sections/projectGroup/components/header.jsx
+++ b/web/client/src/sections/projectGroup/components/header.jsx
@@ -110,6 +110,14 @@ const Header = (props) => {
{weatherMap[weatherRealtime?.skycon]}
+
@@ -24,6 +30,7 @@ function mapStateToProps (state) {
return {
user: auth.user,
actions: global.actions,
+ clientHeight: global.clientHeight,
};
}
diff --git a/web/client/src/sections/projectGroup/containers/index.js b/web/client/src/sections/projectGroup/containers/index.js
index 3818a4a..3f751da 100644
--- a/web/client/src/sections/projectGroup/containers/index.js
+++ b/web/client/src/sections/projectGroup/containers/index.js
@@ -1,4 +1,5 @@
'use strict';
import Statistic from './statistic'
+import Bigscreen from './bigscreen'
-export { Statistic };
\ No newline at end of file
+export { Statistic ,Bigscreen};
\ No newline at end of file
diff --git a/web/client/src/sections/projectGroup/containers/statistic.jsx b/web/client/src/sections/projectGroup/containers/statistic.jsx
index a76caef..95a4bd5 100644
--- a/web/client/src/sections/projectGroup/containers/statistic.jsx
+++ b/web/client/src/sections/projectGroup/containers/statistic.jsx
@@ -1,19 +1,133 @@
import React, { useEffect, useRef, useState } from 'react';
import { connect } from 'react-redux';
+import { Skeleton, Button, Pagination, Form, Popconfirm, Table, Tooltip } from '@douyinfe/semi-ui';
+import { SkeletonScreen, } from "$components";
import Header from '../components/header';
import Body from '../components/body'
import Card from '../components/card'
import '../style.less'
-const Statistic = (props) => {
+const Statistic = ({ dispatch, actions, user, history, loading, groupStatistic, clientHeight }) => {
+ const { projectGroup } = actions;
+
+ const [query, setQuery] = useState({ limit: 10, page: 0 }); //页码信息
+
+ useEffect(() => {
+ dispatch(projectGroup.groupStatistic())
+
+ }, [])
+
+
+ let columns = [
+ {
+ title: '项目集名称',
+ dataIndex: "name",
+ key: 'name',
+ width: "30%",
+ render: (text, row) =>
{
+ localStorage.setItem('project_group_id', row.id)
+ history.push({
+ pathname: `/projectGroup/bigscreen`,
+ })
+ }}>{text}
+ }, {
+ title: '项目集类型',
+ dataIndex: "name",
+ key: 'name',
+ render: (_, row) => '--'
+ }, {
+ title: '项目个数',
+ dataIndex: "pomsProjectIds",
+ key: 'pomsProjectIds',
+ render: (_, row) => row?.pomsProjectIds?.length || 0
+ }, {
+ title: '结构物数量',
+ dataIndex: "strucCount",
+ key: 'strucCount',
+ }, {
+ title: '流转工单数',
+ dataIndex: "name",
+ key: 'name',
+ render: (_, row) => Math.floor(Math.random() * 10)
+ }, {
+ title: '中断时长',
+ dataIndex: "maxOffLineTime",
+ key: 'maxOffLineTime',
+ }, {
+ title: '今日告警个数',
+ dataIndex: "name",
+ key: 'name',
+ render: (_, row) => Math.floor(Math.random() * 20)
+ }
+ ]
+
+ const handleRow = (record, index) => {
+ return {
+ style: {
+ background: 'linear-gradient(180deg, #f1f7ff00 0%, #DEEBFF 100%)',
+ },
+ };
+
+ };
+
+
return (
-
- 123
+
+
+
+
+
+
+
+
+
+ 共{groupStatistic?.length || 0}条信息
+
+
{
+ setQuery({ limit: pageSize, page: currentPage - 1 });
+ // page.current = currentPage - 1
+ // setChange(!change)
+ }}
+ />
+
+
+
@@ -21,10 +135,13 @@ const Statistic = (props) => {
}
function mapStateToProps (state) {
- const { auth, global, } = state;
+ const { auth, global, groupStatistic } = state;
return {
+ clientHeight: global.clientHeight,
user: auth.user,
actions: global.actions,
+ groupStatistic: groupStatistic?.data || [],
+ loading: groupStatistic.isRequesting,
};
}
diff --git a/web/client/src/sections/projectGroup/routes.js b/web/client/src/sections/projectGroup/routes.js
index 1db3bed..dd7a581 100644
--- a/web/client/src/sections/projectGroup/routes.js
+++ b/web/client/src/sections/projectGroup/routes.js
@@ -1,4 +1,4 @@
-import { Statistic } from './containers';
+import { Statistic, Bigscreen } from './containers';
export default [{
type: 'outer',
@@ -8,4 +8,13 @@ export default [{
breadcrumb: '项目集',
component: Statistic,
}
-}];
\ No newline at end of file
+}, {
+ type: 'outer',
+ route: {
+ path: '/projectGroup/bigscreen',
+ key: 'bigscreen',
+ breadcrumb: '数据大屏 ',
+ component: Bigscreen,
+ }
+}
+];
\ No newline at end of file
diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js
index 6251a0b..2fade7a 100644
--- a/web/client/src/utils/webapi.js
+++ b/web/client/src/utils/webapi.js
@@ -38,6 +38,7 @@ export const ApiTable = {
//项目分组
projectGroup: 'project/group',
+ groupStatistic:'project/group/statistic',
//告警
getProjectPoms: 'project/poms', //获取已绑定项目