界面调整

This commit is contained in:
kerwincui
2022-06-12 12:13:23 +08:00
parent 2b1b73abff
commit 8b42e52db0
3 changed files with 38 additions and 16 deletions

View File

@@ -70,7 +70,7 @@
<el-button-group style="margin-top:15px;">
<el-button size="mini" type="primary" icon="el-icon-edit" @click="handleEditProduct(item)" v-hasPermi="['iot:product:edit']">详情</el-button>
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(item)" v-hasPermi="['iot:product:remove']" v-if="item.status==1">删除</el-button>
<el-button size="mini" type="info" icon="el-icon-download" @click="handleGeneratorSDK(item)" v-hasPermi="['iot:product:edit']" v-if="item.status==2">下载SDK</el-button>
<el-button size="mini" type="success" icon="el-icon-s-check" @click="handleDeviceAuthorize(item)" v-hasPermi="['iot:product:edit']" v-if="item.status==2" :disabled="item.isAuthorize!=1">设备授权</el-button>
<el-button size="mini" type="warning" icon="el-icon-search" @click="handleViewDevice(item.productId)" v-hasPermi="['iot:device:query']">查看设备</el-button>
</el-button-group>
</el-card>
@@ -246,6 +246,18 @@ export default {
}
});
},
/** 设备授权操作 */
handleDeviceAuthorize(row) {
let productId = row.productId
this.$router.push({
path: '/iot/product-edit',
query: {
productId: productId,
tabPanelName:'productAuthorize',
pageNum: this.queryParams.pageNum
}
});
},
}
};
</script>

View File

@@ -192,9 +192,14 @@ export default {
// 获取产品信息
const productId = this.$route.query && this.$route.query.productId;
this.form.productId = productId;
if (this.form.productId != 0) {
if (this.form.productId != 0 && this.form.productId != null) {
this.getProduct();
}
// 切换选项卡
const tabPanelName = this.$route.query && this.$route.query.tabPanelName;
if (tabPanelName != null && tabPanelName != '') {
this.activeName = tabPanelName;
}
// 获取分类信息
this.getShortCategory();
},
@@ -209,6 +214,11 @@ export default {
this.getProduct();
this.getShortCategory();
}
// 切换选项卡
const tabPanelName = this.$route.query && this.$route.query.tabPanelName;
if (tabPanelName != null && tabPanelName != '') {
this.activeName = tabPanelName;
}
}
},
methods: {