mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 00:45:55 +08:00
固件添加链接
This commit is contained in:
@@ -21,11 +21,15 @@
|
|||||||
<el-card style="padding-bottom:100px;">
|
<el-card style="padding-bottom:100px;">
|
||||||
<el-table v-loading="loading" :data="firmwareList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="firmwareList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column label="固件名称" align="center" prop="firmwareName" />
|
<el-table-column label="固件名称" align="center" prop="firmwareName" />
|
||||||
<el-table-column label="产品名称" align="center" prop="productName" />
|
<el-table-column label="产品名称" align="center" prop="productName">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link :underline="false" type="primary" @click="handleViewProduct(scope.row.productId)">{{scope.row.productName}}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="下载地址" align="center" prop="filePath" width="400">
|
<el-table-column label="下载地址" align="center" prop="filePath" width="400">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link :href="getDownloadUrl(scope.row.filePath)" :underline="false" type="primary">{{getDownloadUrl(scope.row.filePath)}}</el-link>
|
<el-link :href="getDownloadUrl(scope.row.filePath)" :underline="false" type="success">{{getDownloadUrl(scope.row.filePath)}}</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="固件版本" align="center" prop="version">
|
<el-table-column label="固件版本" align="center" prop="version">
|
||||||
@@ -186,6 +190,17 @@ export default {
|
|||||||
this.getProductShortList();
|
this.getProductShortList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 查看产品按钮操作 */
|
||||||
|
handleViewProduct(productId) {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/iot/product-edit',
|
||||||
|
query: {
|
||||||
|
t: Date.now(),
|
||||||
|
productId: productId,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 获取下载路径前缀
|
||||||
getDownloadUrl(path) {
|
getDownloadUrl(path) {
|
||||||
return window.location.origin + process.env.VUE_APP_BASE_API + path;
|
return window.location.origin + process.env.VUE_APP_BASE_API + path;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,12 @@
|
|||||||
<div style="padding-left:20px;">
|
<div style="padding-left:20px;">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<el-tag type="danger" style="margin-left:15px;">该功能暂不可用,后面版本发布</el-tag>
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="warning" plain icon="el-icon-refresh" size="mini" @click="getList">刷新</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-tag type="danger" style="margin-left:15px;">该功能暂不可用,后面版本发布</el-tag>
|
||||||
|
</el-row>
|
||||||
<el-table v-loading="loading" :data="modelList" border style="margin-bottom:60px;margin-top:20px;" size="small">
|
<el-table v-loading="loading" :data="modelList" border style="margin-bottom:60px;margin-top:20px;" size="small">
|
||||||
<el-table-column label="名称" align="center" prop="modelName" />
|
<el-table-column label="名称" align="center" prop="modelName" />
|
||||||
<el-table-column label="标识符" align="center" prop="identifier" />
|
<el-table-column label="标识符" align="center" prop="identifier" />
|
||||||
@@ -71,7 +76,7 @@ export default {
|
|||||||
},
|
},
|
||||||
form: {},
|
form: {},
|
||||||
// 产品
|
// 产品
|
||||||
productInfo:{},
|
productInfo: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -121,4 +126,4 @@ export default {
|
|||||||
background: linear-gradient(303deg, #b2e9fc 50%, #b5c4f8 50%);
|
background: linear-gradient(303deg, #b2e9fc 50%, #b5c4f8 50%);
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -190,11 +190,25 @@ export default {
|
|||||||
if (this.form.productId != 0) {
|
if (this.form.productId != 0) {
|
||||||
this.getProduct();
|
this.getProduct();
|
||||||
}
|
}
|
||||||
this.init();
|
// 获取分类信息
|
||||||
|
this.getShortCategory();
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
const time = this.$route.query.t;
|
||||||
|
if (time != null && time != this.uniqueId) {
|
||||||
|
this.uniqueId = time;
|
||||||
|
// 获取产品信息
|
||||||
|
let productId = this.$route.query.productId
|
||||||
|
if (productId != null && productId!=0) {
|
||||||
|
this.form.productId = Number(productId);
|
||||||
|
this.getProduct();
|
||||||
|
this.getShortCategory();
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
// 获取简短分类列表
|
||||||
// 获取简短分类列表
|
getShortCategory() {
|
||||||
listShortCategory().then(response => {
|
listShortCategory().then(response => {
|
||||||
this.categoryShortList = response.data;
|
this.categoryShortList = response.data;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-if="productInfo.status==1">新增</el-button>
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-if="productInfo.status==1">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="el-icon-refresh" size="mini" @click="getList">刷新</el-button>
|
<el-button type="success" plain icon="el-icon-upload2" size="mini" @click="handleSelect" v-if="productInfo.status==1">导入通用物模型</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="el-icon-upload2" size="mini" @click="handleSelect" v-if="productInfo.status==1">导入通用物模型</el-button>
|
<el-button type="warning" plain icon="el-icon-refresh" size="mini" @click="getList">刷新</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="info" plain icon="el-icon-view" size="mini" @click="handleOpenThingsModel">查看物模型</el-button>
|
<el-button type="info" plain icon="el-icon-view" size="mini" @click="handleOpenThingsModel">查看物模型</el-button>
|
||||||
|
|||||||
Reference in New Issue
Block a user