123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305 |
- <template>
- <view>
- <view class="timeBox flex justify-between align-center padding-lr-sm">
- <view class="time">{{getData.owner_name}}</view>
- <!-- <button class="cu-btn radius bg-offLine sm">
- <view class="radiusStatus offLine"></view>
- 离线
- </button> -->
- </view>
- <view>
- <!-- 基本信息start -->
- <view class="basic-info">
- <view class="info-tit margin-left-xs">
- <text class="cuIcon-titles margin-right-xs"></text>
- 基本信息
- </view>
- <view class="info-content">
- <view class="info-one-info ">
- <text>设备类型:</text>
- <text>{{getData.type_name}}</text>
- </view>
- <view class="info-one-info ">
- <text>设备编号:</text>
- <text>{{getData.owner_code}}</text>
- </view>
- <view class="info-one-info ">
- <text style="width:98px!important">物联网卡号:</text>
- <text>{{getData.sim}}</text>
- </view>
- <view class="info-one-info ">
- <text>安装位置:</text>
- <text>{{getData.unitinfo}}</text>
- </view>
- <view class="info-one-info ">
- <text>添加时间:</text>
- <text>{{getData.install_time}}</text>
- </view>
- <view class="info-one-info ">
- <text>设备地址:</text>
- <text>{{getData.owner_address}}</text>
- </view>
- </view>
- </view>
- <!-- 基本信息end -->
- <!-- 报警主机图表start -->
- <view class="processStatus" v-if="this.getData.dwtype==1">
- <view class="info-tit margin-left-xs">
- <text class="cuIcon-titles margin-right-xs"></text>
- 图表
- </view>
- <view class="info-content noborder">
- <chart :bindData="staticData"></chart>
- </view>
- </view>
- <!-- 报警主机图表end -->
- <!-- 水系统图表start -->
- <view class="processStatus" v-if="this.getData.dwtype==2">
- <view class="info-tit margin-left-xs">
- <text class="cuIcon-titles margin-right-xs"></text>
- 图表
- </view>
- <view class="info-content noborder">
- <water-chart :bindData="getData"></water-chart>
- </view>
- </view>
- <!-- 水系统图表end -->
-
- <!-- 液位 start -->
- <view v-if="this.getData.dwtype==5" class="processStatus">
- <view class="info-tit margin-left-xs">
- <text class="cuIcon-titles margin-right-xs"></text>
- 图表
- </view>
- <view class="info-content noborder">
- <liquid-chart :bindData="getData"></liquid-chart>
- </view>
- </view>
- <!-- 液位 end-->
- <view class="processStatus" v-if="this.getData.dwtype!=1&&this.getData.dwtype!=2&&this.getData.dwtype!=5">
- <view class="info-tit margin-left-xs">
- <text class="cuIcon-titles margin-right-xs"></text>
- 表格
- </view>
- <!-- 电气火灾start -->
- <fire-table v-if="this.getData.dwtype==7" :bindData="getFireData"></fire-table>
- <!-- 电气火灾end -->
- <!-- RTU start -->
- <view v-if="this.getData.dwtype==6" class="info-content padding" style="overflow:auto;width:97%">
- <table style="width:140%">
- <tr>
- <th>名称</th>
- <th>类型</th>
- <th>端口</th>
- <th>状态</th>
- <th>最后上传时间</th>
- </tr>
- <tr v-for="(item,index) in this.rtu_data" :key="index">
- <td>{{item.data4}}</td>
- <td>{{item.types}}</td>
- <td>{{item.ncmd}}</td>
- <td>{{item.data2}}</td>
- <td>{{item.time}}</td>
- </tr>
- </table>
- </view>
- <!-- RTU end -->
-
- <!-- 烟感 start -->
- <view v-if="this.getData.dwtype==3" class="info-content padding">
- <table>
- <tr>
- <th>烟感状态</th>
- <th>电池电量</th>
- <th>信号强度</th>
- <th>时间</th>
- </tr>
- <tr>
- <td>{{this.getData.device_status}}</td>
- <td>{{this.getData.battery_level}}</td>
- <td>{{this.getData.rsrq}}</td>
- <td>{{this.getData.stime}}</td>
- </tr>
- </table>
- </view>
- <!-- 烟感 end -->
- <!-- 视频 start -->
- <view v-if="this.getData.dwtype==16" class="info-content noborder padding">
- <table>
- <tr>
- <th>最后上传值</th>
- <th>最后上传时间</th>
- </tr>
- <tr v-for="(item,index) in this.video_data">
- <td >{{item.data4}}</td>
- <td>{{item.time}}</td>
- </tr>
- </table>
- </view>
- <!-- 视频 end -->
- <!-- 井盖 start -->
- <view v-if="this.getData.dwtype==128" class="info-content noborder padding">
- <table>
- <tr>
- <th>最后上传状态</th>
- <th>最后上传时间</th>
- </tr>
- <tr v-for="(item,index) in this.mc_data" :key="index">
- <td>{{item.data4}}</td>
- <td>{{item.time}}</td>
- </tr>
-
- </table>
- </view>
- <!-- 井盖 end -->
-
- <!-- 消防栓 start -->
- <view v-if="this.getData.dwtype==4" class="info-content noborder padding">
- <table>
- <tr>
- <th>报警内容</th>
- <th>统计时间</th>
- </tr>
- <tr>
- <td>
- {{this.getData.device_status}}
- </td>
- <td>{{this.getData.stime}}</td>
- </tr>
- </table>
- </view>
- <!-- 消防栓 end -->
-
- <!-- 液位 start -->
- <!-- <view v-if="this.getData.dwtype==5" class="info-content noborder padding">
- <table>
- <tr>
- <th>液位水位值</th>
- <th>液位统计时间</th>
- </tr>
- <tr>
- <td>
- {{this.getData.water_data?this.getData.water_data:'-'}}
- </td>
- <td>{{this.getData.stime?this.getData.stime:'-'}}</td>
- </tr>
- </table>
- </view> -->
-
-
-
-
- <!-- 液位 end -->
-
- <!-- 电梯 start -->
- <view v-if="this.getData.dwtype==17" class="info-content noborder padding">
- <table>
- <tr>
- <th>告警内容</th>
- <th>告警时间</th>
- </tr>
- <tr v-for="(item,index) in this.getData.elevator_data" :key="index">
- <td>
- {{item.data4}}
- </td>
- <td>{{item.time}}</td>
- </tr>
- </table>
- </view>
- <!-- 电梯 end -->
- </view>
- <!-- 表格start -->
- <!-- <table-detail v-if="this.getData.dwtype==4"></table-detail> -->
- <!-- 表格end -->
- <br>
- </view>
- </view>
- </template>
- <script>
- import chart from './components/chart.vue';
- import waterChart from './components/waterChart.vue'; liquidChart
- import liquidChart from './components/liquidChart.vue';
- import tableDetail from './components/table-detail.vue';
- import fireTable from './components/fireTable.vue';
- export default {
- components: {
- chart,
- waterChart,
- liquidChart,
- tableDetail,
- fireTable
- },
- data() {
- return {
- getData: {},
- mc_data: {},
- video_data: {}
- }
- },
- onLoad: function(option) {
- this.getDeviceDetails({
- "id": option.id
- })
- },
- methods: {
- // 设备详情数据请求
- async getDeviceDetails(params = {}) {
- const res = await this.$myRequest({
- url: 'DeviceManagement/getDeviceDetails',
- data: params,
- showLoading: true
- })
- this.getData = res.data.data[0];
- this.staticData = res.data.data[0]
- this.getFireData = res.data.data[0].electric_data;
- this.rtu_data = res.data.data[0].rtu_data;
- if (this.getData.dwtype == 16) {
- this.video_data = res.data.data[0].video_data;
- }
- if (this.getData.dwtype == 128) {
- this.mc_data = res.data.data[0].mc_data;
- }
- console.log(this.mc_data);
- },
- }
- }
- </script>
- <style lang="scss">
- .info-content.noborder> uni-view {
-
- border-bottom: 1px solid rgba(0,0,0,0);
- }
-
- </style>
|