Browse Source

feat:固件升级新增md5码值

dev
zhaobing’ 1 year ago
parent
commit
2204f737be
  1. 5
      web/client/src/sections/firmwareUpgrade/components/addFirmwareModal.jsx
  2. 8
      web/client/src/sections/firmwareUpgrade/containers/firmwareLibrary.jsx

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

@ -57,6 +57,7 @@ const AddFirmwareModal = (props) => {
.field('userId', userId||'') .field('userId', userId||'')
.field('firmwareName', res?.firmwareName||'') .field('firmwareName', res?.firmwareName||'')
.field('comment',res?.remark||'') .field('comment',res?.remark||'')
.field('md5Value',res?.md5||'')
.field('device_meta_name', options?.find(item=>item.value===res?.deviceName)?.label||'') .field('device_meta_name', options?.find(item=>item.value===res?.deviceName)?.label||'')
.query({ version:res?.versionNo,device_meta_id: res?.deviceName,token:'22767e1f-db8d-4a1d-87d4-56347cf21247'}) .query({ version:res?.versionNo,device_meta_id: res?.deviceName,token:'22767e1f-db8d-4a1d-87d4-56347cf21247'})
.end((err, response) => { .end((err, response) => {
@ -108,11 +109,13 @@ const AddFirmwareModal = (props) => {
'deviceName':recordRow?.device_meta_id, 'deviceName':recordRow?.device_meta_id,
'versionNo':recordRow?.versionNo, 'versionNo':recordRow?.versionNo,
'files':recordRow?[{ url: `${domain}/${recordRow?.filepath}`, name: recordRow?.filepath.split('/')[recordRow?.filepath.split('/')?.length-1] }]:[], 'files':recordRow?[{ url: `${domain}/${recordRow?.filepath}`, name: recordRow?.filepath.split('/')[recordRow?.filepath.split('/')?.length-1] }]:[],
'remark':recordRow?.remark 'remark':recordRow?.remark,
'md5Value':recordRow?.md5Value,
}} getFormApi={formApi => api.current = formApi} labelCol={{ span: 7,offset:1}} wrapperCol={{span: 15,offset:1}} labelPosition='left' > }} getFormApi={formApi => api.current = formApi} labelCol={{ span: 7,offset:1}} wrapperCol={{span: 15,offset:1}} labelPosition='left' >
<Form.Input field='firmwareName' label='固件版本名称:' style={{with:'80%'}} rules={[{ required: true, message: '固件版本名称必填' }]}></Form.Input> <Form.Input field='firmwareName' label='固件版本名称:' style={{with:'80%'}} rules={[{ required: true, message: '固件版本名称必填' }]}></Form.Input>
<Form.Select disabled={recordRow?true:false} field='deviceName' label='设备型号:' placeholder='请选择设备型号' optionList={options} rules={[{ required: true, message: '设备型号必填' }]}></Form.Select> <Form.Select disabled={recordRow?true:false} field='deviceName' label='设备型号:' placeholder='请选择设备型号' optionList={options} rules={[{ required: true, message: '设备型号必填' }]}></Form.Select>
<Form.Input disabled={recordRow?true:false} field='versionNo' label='版本号:' rules={[{ required: true, message: '版本号必填' }]}></Form.Input> <Form.Input disabled={recordRow?true:false} field='versionNo' label='版本号:' rules={[{ required: true, message: '版本号必填' }]}></Form.Input>
<Form.Input field='md5Value' label='MD5码值:' rules={[{ required: true, message: 'MD5码值必填' }]}></Form.Input>
<Form.Upload limit={1} <Form.Upload limit={1}
// action={`/file/uploadLocal&token=` + user.token} // action={`/file/uploadLocal&token=` + user.token}
// action={`/file/uploadLocal&token=` + user.token} // action={`/file/uploadLocal&token=` + user.token}

8
web/client/src/sections/firmwareUpgrade/containers/firmwareLibrary.jsx

@ -67,6 +67,13 @@ let columns=[{
title: '版本号', title: '版本号',
dataIndex: 'versionNo' dataIndex: 'versionNo'
}, },
{
title:'MD5码值',
dataIndex: 'md5Value',
render:(_,record)=>{
return <span>--</span>
}
},
{ {
title: '上传时间', title: '上传时间',
dataIndex: 'uploadTime' dataIndex: 'uploadTime'
@ -77,6 +84,7 @@ let columns=[{
return <span>{users?.find(item=>item.id==record.uploader)?.name||''}</span> return <span>{users?.find(item=>item.id==record.uploader)?.name||''}</span>
} }
}, },
{ {
title: '备注', title: '备注',
dataIndex: 'comment' dataIndex: 'comment'

Loading…
Cancel
Save