|
@ -6,7 +6,7 @@ import { IconUpload,IconVigoLogo } from '@douyinfe/semi-icons'; |
|
|
import request from 'superagent'; |
|
|
import request from 'superagent'; |
|
|
|
|
|
|
|
|
const AddFirmwareModal = (props) => { |
|
|
const AddFirmwareModal = (props) => { |
|
|
const {modalVis,onCancel,crawapi,recordRow,actions,dispatch,qiniu} =props |
|
|
const {modalVis,onCancel,crawapi,recordRow,actions,dispatch,qiniu,apiRoot} =props |
|
|
const api = useRef(); |
|
|
const api = useRef(); |
|
|
const {domain}=qiniu //七牛服务器地址 |
|
|
const {domain}=qiniu //七牛服务器地址 |
|
|
const {firmwareUpgrade}=actions |
|
|
const {firmwareUpgrade}=actions |
|
@ -113,14 +113,14 @@ const AddFirmwareModal = (props) => { |
|
|
<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.Upload limit={1} |
|
|
<Form.Upload limit={1} |
|
|
action={`/_upload/attachments`} |
|
|
action={`${apiRoot}/attachments/p`} |
|
|
field='files' label='文件上传' |
|
|
field='files' label='文件上传' |
|
|
rules={[{ required: true, message: '文件上传必填' }]} |
|
|
rules={[{ required: true, message: '文件上传必填' }]} |
|
|
onRemove={() => { |
|
|
onRemove={() => { |
|
|
setUploadData({}) |
|
|
setUploadData({}) |
|
|
setRemoveFlag(true) |
|
|
setRemoveFlag(true) |
|
|
}} |
|
|
}} |
|
|
accept={'.bin'} |
|
|
// accept={'.txt, .doc, .docx, .xls, .xlsx, .pdf, .png, .jpg, .rar, .zip, .bin'} |
|
|
onSuccess={(responseBody, file,all) => { |
|
|
onSuccess={(responseBody, file,all) => { |
|
|
// console.log('file111',file) |
|
|
// console.log('file111',file) |
|
|
setFileObj(file) |
|
|
setFileObj(file) |
|
@ -154,6 +154,7 @@ function mapStateToProps (state) { |
|
|
actions: global.actions, |
|
|
actions: global.actions, |
|
|
crawapi: global.crawapi, |
|
|
crawapi: global.crawapi, |
|
|
qiniu:global.qiniu, |
|
|
qiniu:global.qiniu, |
|
|
|
|
|
apiRoot: global.apiRoot |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|