使用vue开发实现XixunPlayer的功能.
XixunPlayer 查询硬件状态
/**
* @Author: 858834013@qq.com
* @Name: getFpgaInfomation
* @Date: 2022-04-26
* @Desc: XixunPlayer 查询硬件状态
*/
<template>
<div>
<el-button class="mb20" @click="getdata" size="mini" type="primary">硬件状态</el-button>
<el-dialog
title="查询硬件状态"
:visible.sync="dialogVisible"
width="60%">
<div class="screenshots">
<el-table
:data="data"
stripe
style="width: 100%">
<el-table-column
prop="externalVoltage2"
label="外部电压2"
width="180">
</el-table-column>
<el-table-column
prop="humidity"
label="湿度"
width="180">
</el-table-column>
<el-table-column
prop="externalVoltage1"
label="外部电压1">
</el-table-column>
<el-table-column
prop="cardVoltage"
label="卡电压">
</el-table-column>
<el-table-column
prop="smoke"
label="烟雾警告">
</el-table-column>
<el-table-column
prop="version"
label="版本">
</el-table-column>
<el-table-column
prop="temperature"
label="温度">
</el-table-column>
<el-table-column
prop="doorOpened"
label="门被打开">
</el-table-column>
</el-table>
</div>
</el-dialog>
</div>
</template>
<script>
import { getdata } from '@/api/led/led'
export default {
name: 'getFpgaInfomation',
components: {},
data () {
return {
dialogVisible: false,
data: []
}
},
props: {
id: {
type: String,
default () {
return ''
}
}
},
methods: {
getdata () {
var that = this
getdata(that.id, {
type: 'callCardService',
fn: 'getFpgaInfomation'
}).then(function (res) {
that.data = res.result
that.dialogVisible = true
})
},
}
}
</script>