Commit e264059c authored by 涂茜's avatar 涂茜

fix: 修改接口参数

parent 851b65bb
Pipeline #28911 failed with stages
in 14 seconds
......@@ -26,18 +26,7 @@ const DeviceTree = (props) => {
const [loading, setLoading] = useState(false);
useEffect(() => {
const param = {
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);
setParams(serviceParams);
}, []);
const handleData = (data) => {
......
......@@ -121,7 +121,6 @@ const RealTimeInfo = (props) => {
}
});
handleFilterColumns(newData);
// setTableData(newData);
const data = searchValue
? newData.filter((item) => item.name.indexOf(searchValue) !== -1)
: newData;
......@@ -138,7 +137,7 @@ const RealTimeInfo = (props) => {
? deviceRealInfoParams.accountFieldParams.map((item) => item.AName).join(',')
: '二供泵房,二供机组';
deviceConfService({
user: user || '1',
user,
showAll: true,
deviceType,
}).then((res) => {
......@@ -149,19 +148,7 @@ const RealTimeInfo = (props) => {
};
const GetDeviceRealInfo = () => {
const params = {
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) => {
deviceRealInfoService(deviceRealInfoParams).then((res) => {
if (res.code === 0 && res.data) {
setDeviceInfo(res.data.list[0]);
handleTabData(res.data.list[0]);
......@@ -339,7 +326,7 @@ RealTimeInfo.defaultProps = {
modalTitle: '实时指标监控',
placeholder: '输入指标名称等',
defaultTargetValue: 'emphasis',
user: '',
user: null,
deviceRealInfoParams: {},
deviceConfService: () => {},
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