| | |
| | | <el-form |
| | | ref="form" |
| | | :model="importForm" |
| | | v-loading="loadingForm" |
| | | label-width="80px" |
| | | style="width: 80%; margin-left: 10%" |
| | | :rules="rules" |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | loadingForm:false, |
| | | file: '', |
| | | rules: { |
| | | device_name: [{ required: true, message: '请输入设备名称', trigger: 'blur' }], |
| | |
| | | formDatas.append('deviceName', that.importForm.device_name); |
| | | formDatas.append('releaseNote', that.importForm.release_note); |
| | | formDatas.append('status', that.importForm.status); |
| | | this.loading = true; |
| | | this.loadingForm = true; |
| | | // 提交 |
| | | upload(this.workspaceId, formDatas).then(res => { |
| | | this.loading = false; |
| | | this.loadingForm = false; |
| | | this.firmwareUploadBox = false; |
| | | that.importForm = {} |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | onLoad(page, params = {}) { |
| | | params['device_name'] = this.deviceName; |
| | | this.loading = true; |
| | | getDeviceFirmwareList(page.currentPage, page.pageSize, this.workspaceId, params).then(res => { |
| | | getDeviceFirmwareList(page.currentPage, page.pageSize, params).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |