Browse Source

feat:fix bugs

dev
zhaobing’ 1 year ago
parent
commit
6ad6742890
  1. 4
      web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx

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

@ -33,6 +33,7 @@ const AddFirmwareModal = (props) => {
const okHandler= ()=>{
// console.log('fileObj',fileObj)
api.current.validate().then(async (res)=>{
console.log('x1112221',removeFlag,recordRow)
// console.log('ressss',res)
// const query = {
// version:res?.versionNo,
@ -53,7 +54,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}/`+fileUrl:recordRow?`${domain}/`+recordRow.filepath:`${domain}/`+fileUrl)
.field('filePath',removeFlag?`${domain}/`+fileUrl : recordRow?recordRow.filepath : `${domain}/`+fileUrl)
.field('userId', userId||'')
.field('firmwareName', res?.firmwareName||'')
.field('comment',res?.remark||'')
@ -130,6 +131,7 @@ const AddFirmwareModal = (props) => {
onSuccess={(responseBody, file,all) => {
// console.log('file111',file)
setFileObj(file)
console.log('x1111',responseBody?.uploaded)
setFileUrl(responseBody?.uploaded)
setUploadData({
name: file.name,

Loading…
Cancel
Save