Browse Source

feat:fix bugs

dev
zhaobing’ 1 year ago
parent
commit
ea0d0787c6
  1. 9
      web/client/src/sections/data/containers/dataComponent.jsx
  2. 2
      web/client/src/sections/install/containers/cacl.jsx

9
web/client/src/sections/data/containers/dataComponent.jsx

@ -16,7 +16,6 @@ const createForm = Form.create;
const DataComponent =(props)=>{ const DataComponent =(props)=>{
const {isRequesting,dataList}=props const {isRequesting,dataList}=props
const {items,sensors}=dataList const {items,sensors}=dataList
const renderChart = () => { const renderChart = () => {
// const { dataAcquisitionPointList, dataAcquisitionList, isRequesting, dataType, aggregationData } =props; // const { dataAcquisitionPointList, dataAcquisitionList, isRequesting, dataType, aggregationData } =props;
@ -25,12 +24,11 @@ const DataComponent =(props)=>{
type="info" type="info"
description="查询数据中,请稍候..."/> description="查询数据中,请稍候..."/>
} }
if (JSON.stringify(dataList) == "{}") { if (JSON.stringify(dataList) == "[]") {
return <Banner description="无数据" type="info"/> return <Banner description="无数据" type="info"/>
} }
let chartContent = []; let chartContent = [];
let deviceItems ={pitstate: {name: "坑位状态", unit: null}} let deviceItems =items
let deviceSensors =[{id: "8d59eeef-147f-40e4-9516-768f8270b3fd", name: "女坑1",data:[{values: {pitstate: "1"}, time: "2023-11-06 03:03:58"},{values: {pitstate: "1"}, time: "2022-11-05 03:03:58"}]}];
for (let deviceItem in items) { for (let deviceItem in items) {
let chartDataD = []; let chartDataD = [];
let startD = ""; let startD = "";
@ -111,7 +109,8 @@ const mapStateToProps = (state) => {
dataContinuityType: dataContinuityType.data || [], dataContinuityType: dataContinuityType.data || [],
dataContinuity: dataContinuity.data || [], dataContinuity: dataContinuity.data || [],
pepProjectId:global.pepProjectId, pepProjectId:global.pepProjectId,
isRequesting:SensorsData.isRequesting isRequesting:SensorsData.isRequesting,
dataList:SensorsData.data||{}
}; };
} }
export default connect(mapStateToProps)(DataComponent); export default connect(mapStateToProps)(DataComponent);

2
web/client/src/sections/install/containers/cacl.jsx

@ -431,7 +431,7 @@ const Calc = (props) => {
</Col> </Col>
<Col span={6} > <Col span={6} >
<Form.Select showSearch filter multiple iSelect label="测点" field="point" value={sensorId} onChange={pointChange} <Form.Select showSearch filter multiple iSelect label="测点" field="point" value={sensorId} onChange={pointChange}
optionList={sensorList} placeholder="测点" style={{ textAlign: 'left', width: 274 }} > optionList={sensorList} placeholder="请选择测点" style={{ textAlign: 'left', width: 274 }} >
</Form.Select> </Form.Select>
</Col> </Col>
<Col span={6} > <Col span={6} >

Loading…
Cancel
Save