diff --git a/api/app/lib/controllers/firmwareUpgrade/index.js b/api/app/lib/controllers/firmwareUpgrade/index.js index fcbbc91..3f0efe6 100644 --- a/api/app/lib/controllers/firmwareUpgrade/index.js +++ b/api/app/lib/controllers/firmwareUpgrade/index.js @@ -277,7 +277,7 @@ async function deleteFirmware(ctx){ async function getThingMessages(ctx){ try{ const {thingIds,device_meta_id,searchVal}=ctx.request.body - + const res= await ctx.app.fs.craw.post(ApiTable.getThingMessages,{data:{thingIds,device_meta_id}}) // console.log('xxxxxx',res) let rslt=[] @@ -312,7 +312,7 @@ async function getThingMessages(ctx){ } let result if(searchVal&&rslt&&rslt.length){ - result= rslt.filter(item=>item.deviceName===searchVal) + result= rslt.filter(item=>item.deviceName.includes(searchVal) ) } if(!searchVal){ result=rslt diff --git a/web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx b/web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx index 88d0883..c75952e 100644 --- a/web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx +++ b/web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx @@ -106,7 +106,7 @@ const AddFirmwareModal = (props) => { 'firmwareName':recordRow?.firmwareName, 'deviceName':recordRow?.device_meta_id, 'versionNo':recordRow?.versionNo, - 'files':recordRow?[{ url: `${domain}/${recordRow?.filepath}`, name: recordRow?.firmwareName }]:[], + 'files':recordRow?[{ url: `${domain}/${recordRow?.filepath}`, name: recordRow?.filepath.split('/')[recordRow?.filepath.split('/')?.length-1] }]:[], 'remark':recordRow?.remark }} getFormApi={formApi => api.current = formApi} labelCol={{ span: 7,offset:1}} wrapperCol={{span: 15,offset:1}} labelPosition='left' >