diff --git a/api/app/lib/controllers/alarm/dataContinuity.js b/api/app/lib/controllers/alarm/dataContinuity.js
index 905fafa..856ce58 100644
--- a/api/app/lib/controllers/alarm/dataContinuity.js
+++ b/api/app/lib/controllers/alarm/dataContinuity.js
@@ -156,10 +156,90 @@ async function st (ctx) {
}
}
+async function dataContinuityTypeList (ctx) {
+ try {
+ const { models } = ctx.fs.dc;
+
+ const typeListRes = await models.AlarmDataContinuityType.findAll({
+ order: [['id', 'asc']]
+ })
+
+ ctx.status = 200;
+ ctx.body = typeListRes
+ } catch (error) {
+ ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
+ ctx.status = 400;
+ ctx.body = {
+ message: typeof error == 'string' ? error : undefined
+ }
+ }
+}
+
+async function dataContinuityList (ctx) {
+ try {
+ const { models } = ctx.fs.dc;
+ const { limit, page, createTimes, typeNo } = ctx.query
+
+ let findOption = {
+ order: [['createTime', 'desc']],
+ where: {},
+ attributes: ['id', 'type', 'createTime'],
+ include: [{
+ model: models.AlarmDataContinuityType,
+ }]
+ }
+
+ if (limit) {
+ findOption.limit = limit
+ }
+ if (limit && page) {
+ findOption.offset = page * limit
+ }
+ if (createTimes && createTimes.length == 2) {
+ findOption.where.createTime = {
+ $between: [moment(createTimes[0]).format(), moment(createTimes[1]).format()]
+ }
+ }
+ if (typeNo) {
+ findOption.where.type = typeNo
+ }
+
+ const dataRes = await models.AlarmDataContinuity.findAndCountAll(findOption)
+
+ ctx.status = 200;
+ ctx.body = dataRes
+ } catch (error) {
+ ctx.fs.logger.error(`path: ${ctx.path}, error: error`);
+ ctx.status = 400;
+ ctx.body = {
+ message: typeof error == 'string' ? error : undefined
+ }
+ }
+}
+async function dataContinuityDetail (ctx) {
+ try {
+ const { models } = ctx.fs.dc;
+ const { continuityId } = ctx.params
+ const detailRes = await models.AlarmDataContinuity.findOne({
+ where: { id: continuityId },
+ })
-module.exports = {
+ ctx.status = 200;
+ ctx.body = detailRes
+ } catch (error) {
+ ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
+ ctx.status = 400;
+ ctx.body = {
+ message: typeof error == 'string' ? error : undefined
+ }
+ }
+}
+module.exports = {
postDataContinuity,
st,
+ dataContinuityTypeList,
+ dataContinuityList,
+ dataContinuityDetail,
};
\ No newline at end of file
diff --git a/api/app/lib/routes/alarm/index.js b/api/app/lib/routes/alarm/index.js
index 85a68a2..fd085b0 100644
--- a/api/app/lib/routes/alarm/index.js
+++ b/api/app/lib/routes/alarm/index.js
@@ -84,4 +84,13 @@ module.exports = function (app, router, opts) {
// app.fs.api.logAttr['GET/alarm/service/api'] = { content: '查询服务异常信息', visible: true };
// router.get('/alarm/service/api', service.serviceErrorList);
+
+ app.fs.api.logAttr['GET/data/continuity/type_list'] = { content: '获取数据连续性监控信息类型', visible: true };
+ router.get('/data/continuity/type_list', dataContinuity.dataContinuityTypeList);
+
+ app.fs.api.logAttr['GET/data/continuity'] = { content: '获取数据连续性监控信息', visible: true }
+ router.get('/data/continuity', dataContinuity.dataContinuityList);
+
+ app.fs.api.logAttr['GET/data/continuity/:continuityId/detail'] = { content: '获取数据连续性监控信息详细', visible: true }
+ router.get('/data/continuity/:continuityId/detail', dataContinuity.dataContinuityDetail);
};
diff --git a/web/client/src/sections/data/actions/dataQuery.js b/web/client/src/sections/data/actions/dataQuery.js
new file mode 100644
index 0000000..97495e3
--- /dev/null
+++ b/web/client/src/sections/data/actions/dataQuery.js
@@ -0,0 +1,36 @@
+'use strict';
+
+import { ApiTable, basicAction } from '$utils'
+
+export function getContinuityType () {
+ return dispatch => basicAction({
+ type: 'get',
+ dispatch: dispatch,
+ actionType: 'GET_DATA_CONTINUITY_TYPE',
+ url: `${ApiTable.getDataContinuityType}`,
+ msg: { error: '获取数据类型失败' },
+ reducer: { name: 'dataContinuityType' }
+ });
+}
+
+export function getContinuityList (query) {
+ return dispatch => basicAction({
+ type: 'get',
+ query: query,
+ dispatch: dispatch,
+ actionType: 'GET_DATA_CONTINUITY',
+ url: `${ApiTable.getDataContinuity}`,
+ msg: { error: '获取数据列表失败' },
+ reducer: { name: 'dataContinuity' }
+ });
+}
+
+export function getContinuityDetail (continuityId) {
+ return dispatch => basicAction({
+ type: 'get',
+ dispatch: dispatch,
+ actionType: 'GET_DATA_CONTINUITY_DETAIL',
+ url: `${ApiTable.getDataContinuityDetail.replace('{continuityId}', continuityId)}`,
+ msg: { error: '获取数据详情失败' },
+ });
+}
\ No newline at end of file
diff --git a/web/client/src/sections/data/actions/index.js b/web/client/src/sections/data/actions/index.js
index 33cdd8b..66a9a99 100644
--- a/web/client/src/sections/data/actions/index.js
+++ b/web/client/src/sections/data/actions/index.js
@@ -1,7 +1,7 @@
'use strict';
-import * as console from './console'
+import * as dataQuery from './dataQuery'
export default {
- ...console
+ ...dataQuery
}
\ No newline at end of file
diff --git a/web/client/src/sections/data/components/dataQueryCheck.jsx b/web/client/src/sections/data/components/dataQueryCheck.jsx
new file mode 100644
index 0000000..6c0630f
--- /dev/null
+++ b/web/client/src/sections/data/components/dataQueryCheck.jsx
@@ -0,0 +1,61 @@
+import React, { useEffect, useState, useRef } from 'react';
+import { connect } from 'react-redux';
+import moment from 'moment';
+import SimpleBar from 'simplebar-react';
+import { SkeletonScreen, } from "$components";
+import { IconSearch } from '@douyinfe/semi-icons';
+import { Form, Button, Skeleton, Table, Pagination, SideSheet } from '@douyinfe/semi-ui';
+import '../style.less'
+
+function DataQueryCkeck (props) {
+ const { clientWidth, visible, onCancel, checkData, actions, dispatch } = props
+ const { data: sectionData } = actions
+ const [loading, setLoading] = useState(false);
+ const [htmlCode, setHtmlCode] = useState('');
+
+ useEffect(() => {
+ if (checkData.id) {
+ setLoading(true)
+ setHtmlCode('')
+ dispatch(sectionData.getContinuityDetail(checkData.id)).then(res => {
+ if (res.success) {
+ setHtmlCode(res.payload?.data?.file || '')
+ }
+ setLoading(false)
+ })
+ }
+ }, [checkData])
+
+ return (
+