Browse Source

feat:fix bugs

dev
zhaobing’ 1 year ago
parent
commit
6893553c94
  1. 30
      web/client/src/sections/analysis/containers/tableShow.jsx
  2. 8
      web/client/src/sections/analysis/nav-item.jsx
  3. 2
      web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx

30
web/client/src/sections/analysis/containers/tableShow.jsx

@ -171,7 +171,7 @@ const Network = props => {
? deviceListAlarms?.find(v => v.deviceId == p.sensorId)
? '异常'
: '正常'
: '正常',
: '--',
option: objRslt ? objRslt.option : p.option,
}
})
@ -190,22 +190,24 @@ const Network = props => {
// const lastDataCopy=useMemo(()=>{
// return lastData
// },[thingId])
// const scroll = useMemo(() => ({ y: 400 }), [])
const scroll = useMemo(() => ({ y:clientHeight-600+175 }), [])
//
const inputChange = e => {
setSearchName(e)
}
//
const selectChange = e => {
setSearchType(typeList.find(f => f.value == e)?.label)
let rslt=typeList.find(f => f.value == e)
setSearchType(rslt?rslt.label:undefined)
}
//
const searchHandler = () => {
setLastData(
searchName || searchType
? lastDataCopy.filter(f => f.sensorName.includes(searchName) && f.deviceType.includes(searchType))
: lastDataCopy
lastDataCopy.filter(f =>
(searchName === undefined || f.sensorName.includes(searchName)) &&
(searchType === undefined || f.deviceType===searchType)
)
)
}
@ -213,7 +215,7 @@ const Network = props => {
{
title: '设备名称',
dataIndex: 'sensorName',
width: 200,
width: '20%',
key: 'sensorName',
render: (_, r) => {
return (
@ -228,19 +230,19 @@ const Network = props => {
{
title: '设备类型',
dataIndex: 'deviceType',
width: 200,
width: '15%',
key: 'deviceType',
},
{
title: '最后采集时间',
dataIndex: 'collectTime',
width: 200,
width: '15%',
key: 'collectTime',
},
{
title: '数据',
dataIndex: 'data',
width: 200,
width: '20%',
key: 'data',
render: (_, r) => {
return (
@ -254,19 +256,19 @@ const Network = props => {
},
{
title: '物联网卡状态',
width: 200,
width: '15%',
dataIndex: 'iotCardStatus',
key: 'iotCardStatus',
},
{
title: '状态',
width: 200,
width: '10%',
dataIndex: 'status',
key: 'status',
},
{
title: '操作',
width: 200,
width: '10%',
dataIndex: 'option',
key: 'option',
},
@ -318,7 +320,7 @@ const Network = props => {
</div>
</div>
<Table
// scroll={scroll}
scroll={scroll}
columns={columns}
dataSource={lastData}></Table>
</>

8
web/client/src/sections/analysis/nav-item.jsx

@ -24,9 +24,11 @@ export function getNavItem (user, dispatch) {
to: '/analysis/operationAnalysis/operationData',
items: [{
itemKey: 'operationData', to: '/analysis/operationAnalysis/operationData', text: '运维数据'
},{
itemKey: 'network', to: '/analysis/operationAnalysis/network', text: '一图统揽'
}]
},
// {
// itemKey: 'network', to: '/analysis/operationAnalysis/network', text: ''
// }
]
},
// {
// itemKey: 'workorderAnalysis',

2
web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx

@ -53,7 +53,7 @@ const AddFirmwareModal = (props) => {
request.post(crawapi+'/firmwareupgrade')
// .set('Content-Type','application/octet-stream')
// .attach('file',blobData,removeFlag?fileObj.name:recordRow?recordRow.firmwareName:fileObj.name)
.field('filePath',removeFlag?`${domain}/attachments/`+fileUrl:recordRow?`${domain}/attachments/`+recordRow.filepath:`${domain}/attachments/`+fileUrl)
.field('filePath',removeFlag?`${domain}/`+fileUrl:recordRow?`${domain}/`+recordRow.filepath:`${domain}/`+fileUrl)
.field('userId', userId||'')
.field('firmwareName', res?.firmwareName||'')
.field('comment',res?.remark||'')

Loading…
Cancel
Save