From 2dfc8dc4bcd3d3cd4aed1b6054e073e140eba9c8 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 19 May 2025 16:05:50 +0800
Subject: [PATCH] Merge branch 'master' into jiangwu
---
src/views/device/components/firmwareManage.vue | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/views/device/components/firmwareManage.vue b/src/views/device/components/firmwareManage.vue
index 18c7c33..9c397ea 100644
--- a/src/views/device/components/firmwareManage.vue
+++ b/src/views/device/components/firmwareManage.vue
@@ -17,6 +17,7 @@
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
+ @on-load="onLoad"
>
<template #menu-left>
<el-button type="primary" icon="el-icon-plus" plain @click="openFirmwareUpload"
@@ -28,12 +29,13 @@
<el-form
ref="form"
:model="importForm"
+ v-loading="loadingForm"
label-width="80px"
style="width: 80%; margin-left: 10%"
:rules="rules"
>
<el-form-item label="设备名称" prop="device_name">
- <el-input v-model="importForm.device_name" clearable disabled></el-input>
+ <el-input v-model="importForm.device_name" clearable></el-input>
</el-form-item>
<!-- 上传 -->
@@ -76,6 +78,7 @@
export default {
data() {
return {
+ loadingForm:false,
file: '',
rules: {
device_name: [{ required: true, message: '请输入设备名称', trigger: 'blur' }],
@@ -86,7 +89,7 @@
firmwareUploadBox: false,
form: {},
query: {},
- workspaceId: '',
+ workspaceId: '4a574d68-4ad3-48f7-9f16-3edbcd8056e1',
deviceName: '',
loading: true,
page: {
@@ -223,6 +226,7 @@
label: '上传状态',
prop: 'upload_status',
addDisplay: false,
+ editDisplay: false,
labelWidth: 130,
type: 'select',
width: 100,
@@ -284,11 +288,12 @@
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',
@@ -312,8 +317,8 @@
},
// 初始化数据
init(data) {
- this.workspaceId = data.workspace_id;
- // this.workspaceId = '4a574d68-4ad3-48f7-9f16-3edbcd8056e1';
+ // this.workspaceId = data.workspace_id;
+ this.workspaceId = '4a574d68-4ad3-48f7-9f16-3edbcd8056e1';
this.deviceName = data.device_name;
this.onLoad(this.page);
},
@@ -404,7 +409,7 @@
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;
--
Gitblit v1.9.3