Commit e264059c authored by 涂茜's avatar 涂茜

fix: 修改接口参数

parent 851b65bb
Pipeline #28911 failed with stages
in 14 seconds
...@@ -26,18 +26,7 @@ const DeviceTree = (props) => { ...@@ -26,18 +26,7 @@ const DeviceTree = (props) => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
useEffect(() => { useEffect(() => {
const param = { setParams(serviceParams);
pageIndex: serviceParams.pageIndex || 1,
pageSize: serviceParams.pageSize || 20,
deviceTypes: serviceParams.deviceTypes || '二供泵房,二供机组',
getChild: serviceParams.getChild,
userID: serviceParams.userID || '',
queryInfo: serviceParams.queryInfo || '',
sortFields: serviceParams.sortFields || '',
direction: serviceParams.direction || '',
isTop: serviceParams.isTop,
};
setParams(param);
}, []); }, []);
const handleData = (data) => { const handleData = (data) => {
......
...@@ -121,7 +121,6 @@ const RealTimeInfo = (props) => { ...@@ -121,7 +121,6 @@ const RealTimeInfo = (props) => {
} }
}); });
handleFilterColumns(newData); handleFilterColumns(newData);
// setTableData(newData);
const data = searchValue const data = searchValue
? newData.filter((item) => item.name.indexOf(searchValue) !== -1) ? newData.filter((item) => item.name.indexOf(searchValue) !== -1)
: newData; : newData;
...@@ -138,7 +137,7 @@ const RealTimeInfo = (props) => { ...@@ -138,7 +137,7 @@ const RealTimeInfo = (props) => {
? deviceRealInfoParams.accountFieldParams.map((item) => item.AName).join(',') ? deviceRealInfoParams.accountFieldParams.map((item) => item.AName).join(',')
: '二供泵房,二供机组'; : '二供泵房,二供机组';
deviceConfService({ deviceConfService({
user: user || '1', user,
showAll: true, showAll: true,
deviceType, deviceType,
}).then((res) => { }).then((res) => {
...@@ -149,19 +148,7 @@ const RealTimeInfo = (props) => { ...@@ -149,19 +148,7 @@ const RealTimeInfo = (props) => {
}; };
const GetDeviceRealInfo = () => { const GetDeviceRealInfo = () => {
const params = { deviceRealInfoService(deviceRealInfoParams).then((res) => {
userID: deviceRealInfoParams.userID || '1',
pageIndex: deviceRealInfoParams.pageIndex || 1,
pageSize: deviceRealInfoParams.pageSize || 20,
isFocus: deviceRealInfoParams.isFocus || false,
accountFieldParams: deviceRealInfoParams.accountFieldParams || [
{ AName: '二供泵房' },
{ AName: '二供机组' },
],
equipmentCode: deviceRealInfoParams.equipmentCode || 'EGBF00000001',
...deviceRealInfoParams,
};
deviceRealInfoService(params).then((res) => {
if (res.code === 0 && res.data) { if (res.code === 0 && res.data) {
setDeviceInfo(res.data.list[0]); setDeviceInfo(res.data.list[0]);
handleTabData(res.data.list[0]); handleTabData(res.data.list[0]);
...@@ -339,7 +326,7 @@ RealTimeInfo.defaultProps = { ...@@ -339,7 +326,7 @@ RealTimeInfo.defaultProps = {
modalTitle: '实时指标监控', modalTitle: '实时指标监控',
placeholder: '输入指标名称等', placeholder: '输入指标名称等',
defaultTargetValue: 'emphasis', defaultTargetValue: 'emphasis',
user: '', user: null,
deviceRealInfoParams: {}, deviceRealInfoParams: {},
deviceConfService: () => {}, deviceConfService: () => {},
pointAddressEntryService: () => {}, pointAddressEntryService: () => {},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment