Commit 5623b5ee0f3d390ae733b6f8268f3235d3add599

Authored by xiaoxie
1 parent fb843d41

通道页适配全局样式

web_src/src/components/channelList.vue
1 <template> 1 <template>
2 - <div id="channelList">  
3 - <div style="background-color: #FFFFFF; position: relative; padding: 1rem 0.5rem 0.5rem 0.5rem; text-align: center;">  
4 - <span  
5 - style="font-size: 1rem; font-weight: 500; ">通道列表({{ parentChannelId == 0 ? deviceId : parentChannelId }})</span>  
6 -  
7 - </div>  
8 - <div  
9 - style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;font-size: 14px;">  
10 - <el-button icon="el-icon-arrow-left" size="mini" style="margin-right: 1rem;" type="primary" @click="showDevice">  
11 - 返回  
12 - </el-button> 2 + <div id="channelList" style="width: 100%">
  3 + <div class="page-header">
  4 + <div class="page-title">
  5 + <el-button icon="el-icon-arrow-left" size="mini" style="margin-right: 1rem;" type="primary" @click="showDevice">
  6 + 返回
  7 + </el-button>
  8 + 通道列表({{ parentChannelId == 0 ? deviceId : parentChannelId }})</div>
  9 + <div class="page-header-btn">
13 搜索: 10 搜索:
14 <el-input @input="search" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字" 11 <el-input @input="search" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字"
15 prefix-icon="el-icon-search" v-model="searchSrt" clearable></el-input> 12 prefix-icon="el-icon-search" v-model="searchSrt" clearable></el-input>
@@ -28,83 +25,84 @@ @@ -28,83 +25,84 @@
28 <el-option label="在线" value="true"></el-option> 25 <el-option label="在线" value="true"></el-option>
29 <el-option label="离线" value="false"></el-option> 26 <el-option label="离线" value="false"></el-option>
30 </el-select> 27 </el-select>
31 - <el-checkbox size="mini" style="margin-right: 1rem; float: right;" v-model="autoList" @change="autoListChange"> 28 + <el-checkbox size="mini" v-model="autoList" @change="autoListChange">
32 自动刷新 29 自动刷新
33 </el-checkbox> 30 </el-checkbox>
34 </div> 31 </div>
35 - <devicePlayer ref="devicePlayer" v-loading="isLoging"></devicePlayer>  
36 - <!--设备列表-->  
37 - <el-table ref="channelListTable" :data="deviceChannelList" :height="winHeight" border style="width: 100%">  
38 - <el-table-column prop="channelId" label="通道编号" width="200">  
39 - </el-table-column>  
40 - <el-table-column prop="name" label="通道名称">  
41 - </el-table-column>  
42 - <el-table-column label="快照" width="80" align="center">  
43 - <template slot-scope="scope">  
44 - <img style="max-height: 3rem;max-width: 4rem;"  
45 - :id="scope.row.deviceId + '_' + scope.row.channelId"  
46 - :src="getSnap(scope.row)"  
47 - @error="getSnapErrorEvent($event.target.id)"  
48 - alt="">  
49 - <!-- <el-image-->  
50 - <!-- :id="'snapImg_' + scope.row.deviceId + '_' + scope.row.channelId"-->  
51 - <!-- :src="getSnap(scope.row)"-->  
52 - <!-- @error="getSnapErrorEvent($event, scope.row)"-->  
53 - <!-- :fit="'contain'">-->  
54 - <!-- <div slot="error" class="image-slot">-->  
55 - <!-- <i class="el-icon-picture-outline"></i>-->  
56 - <!-- </div>-->  
57 - <!-- </el-image>-->  
58 - </template>  
59 - </el-table-column>  
60 - <el-table-column prop="subCount" label="子节点数">  
61 - </el-table-column>  
62 - <el-table-column prop="manufacture" label="厂家">  
63 - </el-table-column>  
64 - <el-table-column label="位置信息" align="center">  
65 - <template slot-scope="scope">  
66 - <span>{{ scope.row.longitude }},{{ scope.row.latitude }}</span>  
67 - </template>  
68 - </el-table-column>  
69 - <el-table-column prop="ptztypeText" label="云台类型"/>  
70 - <el-table-column label="开启音频" align="center">  
71 - <template slot-scope="scope">  
72 - <el-switch @change="updateChannel(scope.row)" v-model="scope.row.hasAudio" active-color="#409EFF">  
73 - </el-switch>  
74 - </template>  
75 - </el-table-column>  
76 - <el-table-column label="状态" width="180" align="center">  
77 - <template slot-scope="scope">  
78 - <div slot="reference" class="name-wrapper">  
79 - <el-tag size="medium" v-if="scope.row.status == 1">开启</el-tag>  
80 - <el-tag size="medium" type="info" v-if="scope.row.status == 0">关闭</el-tag>  
81 - </div>  
82 - </template>  
83 - </el-table-column> 32 + </div>
  33 + <devicePlayer ref="devicePlayer" v-loading="isLoging"></devicePlayer>
  34 + <!--设备列表-->
  35 + <el-table ref="channelListTable" :data="deviceChannelList" :height="winHeight" border style="width: 100%">
  36 + <el-table-column prop="channelId" label="通道编号" width="200">
  37 + </el-table-column>
  38 + <el-table-column prop="name" label="通道名称">
  39 + </el-table-column>
  40 + <el-table-column label="快照" width="80" align="center">
  41 + <template slot-scope="scope">
  42 + <img style="max-height: 3rem;max-width: 4rem;"
  43 + :id="scope.row.deviceId + '_' + scope.row.channelId"
  44 + :src="getSnap(scope.row)"
  45 + @error="getSnapErrorEvent($event.target.id)"
  46 + alt="">
  47 + <!-- <el-image-->
  48 + <!-- :id="'snapImg_' + scope.row.deviceId + '_' + scope.row.channelId"-->
  49 + <!-- :src="getSnap(scope.row)"-->
  50 + <!-- @error="getSnapErrorEvent($event, scope.row)"-->
  51 + <!-- :fit="'contain'">-->
  52 + <!-- <div slot="error" class="image-slot">-->
  53 + <!-- <i class="el-icon-picture-outline"></i>-->
  54 + <!-- </div>-->
  55 + <!-- </el-image>-->
  56 + </template>
  57 + </el-table-column>
  58 + <el-table-column prop="subCount" label="子节点数">
  59 + </el-table-column>
  60 + <el-table-column prop="manufacture" label="厂家">
  61 + </el-table-column>
  62 + <el-table-column label="位置信息" align="center">
  63 + <template slot-scope="scope">
  64 + <span>{{ scope.row.longitude }},{{ scope.row.latitude }}</span>
  65 + </template>
  66 + </el-table-column>
  67 + <el-table-column prop="ptztypeText" label="云台类型"/>
  68 + <el-table-column label="开启音频" align="center">
  69 + <template slot-scope="scope">
  70 + <el-switch @change="updateChannel(scope.row)" v-model="scope.row.hasAudio" active-color="#409EFF">
  71 + </el-switch>
  72 + </template>
  73 + </el-table-column>
  74 + <el-table-column label="状态" width="180" align="center">
  75 + <template slot-scope="scope">
  76 + <div slot="reference" class="name-wrapper">
  77 + <el-tag size="medium" v-if="scope.row.status == 1">开启</el-tag>
  78 + <el-tag size="medium" type="info" v-if="scope.row.status == 0">关闭</el-tag>
  79 + </div>
  80 + </template>
  81 + </el-table-column>
84 82
85 83
86 - <el-table-column label="操作" width="280" align="center" fixed="right">  
87 - <template slot-scope="scope">  
88 - <el-button-group>  
89 - <!-- <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">播放</el-button> -->  
90 - <el-button size="mini" icon="el-icon-video-play" @click="sendDevicePush(scope.row)">播放</el-button>  
91 - <el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="!!scope.row.streamId"  
92 - @click="stopDevicePush(scope.row)">停止  
93 - </el-button>  
94 - <el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.subCount > 0"  
95 - @click="changeSubchannel(scope.row)">查看  
96 - </el-button>  
97 - <el-button size="mini" icon="el-icon-video-camera" type="primary" @click="queryRecords(scope.row)">设备录象  
98 - </el-button>  
99 - <!-- <el-button size="mini" @click="sendDevicePush(scope.row)">录像查询</el-button> -->  
100 - </el-button-group>  
101 - </template>  
102 - </el-table-column>  
103 - </el-table>  
104 - <el-pagination style="float: right" @size-change="handleSizeChange" @current-change="currentChange"  
105 - :current-page="currentPage" :page-size="count" :page-sizes="[15, 20, 30, 50]"  
106 - layout="total, sizes, prev, pager, next" :total="total">  
107 - </el-pagination> 84 + <el-table-column label="操作" width="280" align="center" fixed="right">
  85 + <template slot-scope="scope">
  86 + <el-button-group>
  87 + <!-- <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">播放</el-button> -->
  88 + <el-button size="mini" icon="el-icon-video-play" @click="sendDevicePush(scope.row)">播放</el-button>
  89 + <el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="!!scope.row.streamId"
  90 + @click="stopDevicePush(scope.row)">停止
  91 + </el-button>
  92 + <el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.subCount > 0"
  93 + @click="changeSubchannel(scope.row)">查看
  94 + </el-button>
  95 + <el-button size="mini" icon="el-icon-video-camera" type="primary" @click="queryRecords(scope.row)">设备录象
  96 + </el-button>
  97 + <!-- <el-button size="mini" @click="sendDevicePush(scope.row)">录像查询</el-button> -->
  98 + </el-button-group>
  99 + </template>
  100 + </el-table-column>
  101 + </el-table>
  102 + <el-pagination style="float: right" @size-change="handleSizeChange" @current-change="currentChange"
  103 + :current-page="currentPage" :page-size="count" :page-sizes="[15, 20, 30, 50]"
  104 + layout="total, sizes, prev, pager, next" :total="total">
  105 + </el-pagination>
108 </div> 106 </div>
109 </template> 107 </template>
110 108