diff --git a/web/client/src/sections/dataQuality/containers/documentLibrary.js b/web/client/src/sections/dataQuality/containers/documentLibrary.js
index 8688693..35fd4c4 100644
--- a/web/client/src/sections/dataQuality/containers/documentLibrary.js
+++ b/web/client/src/sections/dataQuality/containers/documentLibrary.js
@@ -16,13 +16,10 @@ function Approve ({ loading, clientHeight, actions, dispatch, }) {
const { dataQuality } = actions
const [checkAll, setCheckAll] = useState(false)
- const [query, setQuery] = useState({ page: 0, limit: 10 });
const [folderData, setFolderData] = useState([]);
const [fileData, setFileData] = useState([])
const [groupModal, setGroupModal] = useState(false)
const [fileModal, setFileModal] = useState(false)
- const [editData, setEditData] = useState({})
- const [column, setColumn] = useState([])
const [parent, setParent] = useState(null)
const [keywords, setKeywords] = useState()
const [breadcrumbData, setBreadcrumbData] = useState([{ name: '根目录', parent: null }])
diff --git a/web/client/src/sections/dataQuality/containers/qualityMonitor.js b/web/client/src/sections/dataQuality/containers/qualityMonitor.js
index c4078ae..e58f133 100644
--- a/web/client/src/sections/dataQuality/containers/qualityMonitor.js
+++ b/web/client/src/sections/dataQuality/containers/qualityMonitor.js
@@ -1,42 +1,115 @@
import React, { useEffect, useState } from 'react'
import { connect } from 'react-redux';
import moment from 'moment';
-import ApproveModal from '../components/groupModal';
+import ReactECharts from 'echarts-for-react';
import { Tabs, Form, Input, DatePicker, Button, Table, Select } from 'antd';
-import { v1 } from 'uuid';
+
function MyApplication ({ loading, clientHeight, actions, dispatch, user }) {
- const { resourceConsumption } = actions
+ const { dataQuality } = actions
const [query, setQuery] = useState({ page: 0, limit: 10 });
const [proTableList, setProTableList] = useState({ rows: [], count: 0 });
- const [formData, setFormData] = useState({})
+ const [bistribution, setBistribution] = useState({})
useEffect(() => {
resourceData()
}, [])
- let resourceData = (params) => {
- // let data = params || query
- // dispatch(resourceConsumption.getApproveList({ applyById: user?.id, ...formData, ...data, })).then(res => {
- // if (res.success) {
- // setProTableList(res.payload.data)
- // }
- // })
+ let resourceData = () => {
+ dispatch(dataQuality.getBusinessRules({})).then(res => {
+ if (res.success) {
+ let data = res.payload.data?.rows
+ setBistribution({
+ ordinary: data?.filter(c => c.problemLevel == '一般')?.length || 0,
+ significance: data?.filter(c => c.problemLevel == '重要')?.length || 0,
+ seriousness: data?.filter(c => c.problemLevel == '严重')?.length || 0,
+ count: res.payload.data?.count
+ })
+
+ }
+ })
+ }
+
+
+ const option = {
+ title: {
+ text: '规则分部情况',
+ subtext: '',
+ x: 'center'
+ },
+ tooltip: {
+ trigger: 'item',
+ formatter: "{a}
{b} : {c} ({d}%)"
+ },
+ legend: {
+ orient: 'vertical',
+ left: 'right',
+ data: ['一般', '重要', '严重']
+ },
+ series: [
+ {
+ name: '分布情况',
+ type: 'pie',
+ radius: '55%',
+ center: ['50%', '60%'],
+ data: [
+ { value: bistribution?.ordinary, name: '一般' },
+ { value: bistribution?.significance, name: '重要' },
+ { value: bistribution?.seriousness, name: '严重' },
+ ],
+ itemStyle: {
+ emphasis: {
+ shadowBlur: 10,
+ shadowOffsetX: 0,
+ shadowColor: 'rgba(0, 0, 0, 0.5)'
+ }
+ }
+ }
+ ]
+ };
+
+ const [count, setCount] = useState(0);
+
+ function onChartReady (echarts) {
+ console.log('echarts is ready', echarts);
}
+ function onChartClick (param, echarts) {
+ console.log(param, echarts);
+ setCount(count + 1);
+ };
-
+ function onChartLegendselectchanged (param, echarts) {
+ console.log(param, echarts);
+ };
+ return