Commit c801ee62184d13acc4c5d6bd2d9586dca13306fc
1 parent
31a8e6ea
调整页面样式
Showing
4 changed files
with
72 additions
and
66 deletions
web_src/src/App.vue
| ... | ... | @@ -76,7 +76,7 @@ body, |
| 76 | 76 | line-height: 60px; |
| 77 | 77 | } |
| 78 | 78 | .el-main { |
| 79 | - background-color: #e9eef3; | |
| 79 | + background-color: #f0f2f5; | |
| 80 | 80 | color: #333; |
| 81 | 81 | text-align: center; |
| 82 | 82 | padding-top: 0px !important; |
| ... | ... | @@ -101,4 +101,8 @@ body, |
| 101 | 101 | box-shadow: inset 0 0 6px rgba(0, 0, 0, .1); |
| 102 | 102 | -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1); |
| 103 | 103 | } |
| 104 | +.table-header { | |
| 105 | + color: #727272; | |
| 106 | + font-weight: 600; | |
| 107 | +} | |
| 104 | 108 | </style> | ... | ... |
web_src/src/components/DeviceList.vue
| ... | ... | @@ -9,21 +9,21 @@ |
| 9 | 9 | </div> |
| 10 | 10 | <!-- <devicePlayer ref="devicePlayer"></devicePlayer> --> |
| 11 | 11 | <!--设备列表--> |
| 12 | - <el-table :data="deviceList" border style="width: 100%;font-size: 12px;" :height="winHeight"> | |
| 13 | - <el-table-column prop="name" label="名称" align="center"> | |
| 12 | + <el-table :data="deviceList" style="width: 100%;font-size: 12px;" :height="winHeight" header-row-class-name="table-header"> | |
| 13 | + <el-table-column prop="name" label="名称" > | |
| 14 | 14 | </el-table-column> |
| 15 | - <el-table-column prop="deviceId" label="设备编号" width="180" align="center"> | |
| 15 | + <el-table-column prop="deviceId" label="设备编号" width="180" > | |
| 16 | 16 | </el-table-column> |
| 17 | - <el-table-column label="地址" width="180" align="center"> | |
| 17 | + <el-table-column label="地址" width="180" > | |
| 18 | 18 | <template slot-scope="scope"> |
| 19 | 19 | <div slot="reference" class="name-wrapper"> |
| 20 | 20 | <el-tag size="medium">{{ scope.row.hostAddress }}</el-tag> |
| 21 | 21 | </div> |
| 22 | 22 | </template> |
| 23 | 23 | </el-table-column> |
| 24 | - <el-table-column prop="manufacturer" label="厂家" align="center"> | |
| 24 | + <el-table-column prop="manufacturer" label="厂家" > | |
| 25 | 25 | </el-table-column> |
| 26 | - <el-table-column label="流传输模式" align="center" width="120"> | |
| 26 | + <el-table-column label="流传输模式" width="120"> | |
| 27 | 27 | <template slot-scope="scope"> |
| 28 | 28 | <el-select size="mini" @change="transportChange(scope.row)" v-model="scope.row.streamMode" placeholder="请选择"> |
| 29 | 29 | <el-option key="UDP" label="UDP" value="UDP"></el-option> |
| ... | ... | @@ -32,9 +32,9 @@ |
| 32 | 32 | </el-select> |
| 33 | 33 | </template> |
| 34 | 34 | </el-table-column> |
| 35 | - <el-table-column prop="channelCount" label="通道数" align="center"> | |
| 35 | + <el-table-column prop="channelCount" label="通道数" > | |
| 36 | 36 | </el-table-column> |
| 37 | - <el-table-column label="状态" width="120" align="center"> | |
| 37 | + <el-table-column label="状态" width="120" > | |
| 38 | 38 | <template slot-scope="scope"> |
| 39 | 39 | <div slot="reference" class="name-wrapper"> |
| 40 | 40 | <el-tag size="medium" v-if="scope.row.online == 1">在线</el-tag> |
| ... | ... | @@ -42,30 +42,32 @@ |
| 42 | 42 | </div> |
| 43 | 43 | </template> |
| 44 | 44 | </el-table-column> |
| 45 | - <el-table-column prop="keepaliveTime" label="最近心跳" align="center" width="140"> | |
| 45 | + <el-table-column prop="keepaliveTime" label="最近心跳" width="140"> | |
| 46 | 46 | </el-table-column> |
| 47 | - <el-table-column prop="registerTime" label="最近注册" align="center" width="140"> | |
| 47 | + <el-table-column prop="registerTime" label="最近注册" width="140"> | |
| 48 | 48 | </el-table-column> |
| 49 | - <el-table-column prop="updateTime" label="更新时间" align="center" width="140"> | |
| 49 | + <el-table-column prop="updateTime" label="更新时间" width="140"> | |
| 50 | 50 | </el-table-column> |
| 51 | - <el-table-column prop="createTime" label="创建时间" align="center" width="140"> | |
| 51 | + <el-table-column prop="createTime" label="创建时间" width="140"> | |
| 52 | 52 | </el-table-column> |
| 53 | 53 | |
| 54 | - <el-table-column label="操作" width="450" align="center" fixed="right"> | |
| 54 | + <el-table-column label="操作" width="450" fixed="right"> | |
| 55 | 55 | <template slot-scope="scope"> |
| 56 | - <el-button size="mini" v-if="scope.row.online!=0" icon="el-icon-refresh" @click="refDevice(scope.row)" | |
| 56 | + <el-button type="text" size="mini" v-bind:disabled="scope.row.online==0" icon="el-icon-refresh" @click="refDevice(scope.row)" | |
| 57 | 57 | @mouseover="getTooltipContent(scope.row.deviceId)">刷新 |
| 58 | 58 | </el-button> |
| 59 | - <el-button-group> | |
| 60 | - <el-button size="mini" icon="el-icon-video-camera-solid" v-bind:disabled="scope.row.online==0" | |
| 61 | - type="primary" @click="showChannelList(scope.row)">通道 | |
| 62 | - </el-button> | |
| 63 | - <el-button size="mini" icon="el-icon-location" v-bind:disabled="scope.row.online==0" type="primary" | |
| 64 | - @click="showDevicePosition(scope.row)">定位 | |
| 65 | - </el-button> | |
| 66 | - <el-button size="mini" icon="el-icon-edit" type="primary" @click="edit(scope.row)">编辑</el-button> | |
| 67 | - <el-button size="mini" icon="el-icon-delete" type="danger" @click="deleteDevice(scope.row)">删除</el-button> | |
| 68 | - </el-button-group> | |
| 59 | + <el-divider direction="vertical"></el-divider> | |
| 60 | + <el-button type="text" size="mini" icon="el-icon-video-camera-solid" v-bind:disabled="scope.row.online==0" | |
| 61 | + @click="showChannelList(scope.row)">通道 | |
| 62 | + </el-button> | |
| 63 | + <el-divider direction="vertical"></el-divider> | |
| 64 | + <el-button size="mini" icon="el-icon-location" v-bind:disabled="scope.row.online==0" type="text" | |
| 65 | + @click="showDevicePosition(scope.row)">定位 | |
| 66 | + </el-button> | |
| 67 | + <el-divider direction="vertical"></el-divider> | |
| 68 | + <el-button size="mini" icon="el-icon-edit" type="text" @click="edit(scope.row)">编辑</el-button> | |
| 69 | + <el-divider direction="vertical"></el-divider> | |
| 70 | + <el-button size="mini" icon="el-icon-delete" type="text" @click="deleteDevice(scope.row)" style="color: #f56c6c">删除</el-button> | |
| 69 | 71 | </template> |
| 70 | 72 | </el-table-column> |
| 71 | 73 | </el-table> |
| ... | ... | @@ -347,4 +349,5 @@ export default { |
| 347 | 349 | padding: 0.3rem; |
| 348 | 350 | width: 14.4rem; |
| 349 | 351 | } |
| 352 | + | |
| 350 | 353 | </style> | ... | ... |
web_src/src/components/channelList.vue
| ... | ... | @@ -32,49 +32,42 @@ |
| 32 | 32 | </div> |
| 33 | 33 | <devicePlayer ref="devicePlayer" v-loading="isLoging"></devicePlayer> |
| 34 | 34 | <!--设备列表--> |
| 35 | - <el-table ref="channelListTable" :data="deviceChannelList" :height="winHeight" border style="width: 100%"> | |
| 35 | + <el-table ref="channelListTable" :data="deviceChannelList" :height="winHeight" style="width: 100%" header-row-class-name="table-header"> | |
| 36 | 36 | <el-table-column prop="channelId" label="通道编号" width="200"> |
| 37 | 37 | </el-table-column> |
| 38 | - <el-table-column prop="name" label="通道名称"> | |
| 38 | + <el-table-column prop="name" label="通道名称" > | |
| 39 | 39 | </el-table-column> |
| 40 | - <el-table-column label="快照" width="80" align="center"> | |
| 40 | + <el-table-column label="快照" width="80"> | |
| 41 | 41 | <template slot-scope="scope"> |
| 42 | -<!-- <img style="max-height: 3rem;max-width: 4rem;"--> | |
| 43 | -<!-- v-if="scope.row.subCount === 0 && scope.row.parental === 0"--> | |
| 44 | -<!-- :deviceId="scope.row.deviceId"--> | |
| 45 | -<!-- :channelId="scope.row.channelId"--> | |
| 46 | -<!-- :src="getSnap(scope.row)"--> | |
| 47 | -<!-- @error="getSnapErrorEvent($event.target.deviceId, $event.target.channelId)"--> | |
| 48 | -<!-- alt="">--> | |
| 49 | - <el-image | |
| 50 | - :src="getSnap(scope.row)" | |
| 51 | - :preview-src-list="getBigSnap(scope.row)" | |
| 52 | - @error="getSnapErrorEvent(scope.row.deviceId, cope.row.channelId)" | |
| 53 | - :fit="'contain'"> | |
| 54 | - <div slot="error" class="image-slot"> | |
| 55 | - <i class="el-icon-picture-outline"></i> | |
| 56 | - </div> | |
| 57 | - </el-image> | |
| 42 | + <el-image | |
| 43 | + :src="getSnap(scope.row)" | |
| 44 | + :preview-src-list="getBigSnap(scope.row)" | |
| 45 | + @error="getSnapErrorEvent(scope.row.deviceId, cope.row.channelId)" | |
| 46 | + :fit="'contain'"> | |
| 47 | + <div slot="error" class="image-slot"> | |
| 48 | + <i class="el-icon-picture-outline"></i> | |
| 49 | + </div> | |
| 50 | + </el-image> | |
| 58 | 51 | </template> |
| 59 | 52 | </el-table-column> |
| 60 | - <el-table-column prop="subCount" label="子节点数"> | |
| 53 | + <el-table-column prop="subCount" label="子节点数" width="120"> | |
| 61 | 54 | </el-table-column> |
| 62 | - <el-table-column prop="manufacture" label="厂家"> | |
| 55 | + <el-table-column prop="manufacture" label="厂家" width="120"> | |
| 63 | 56 | </el-table-column> |
| 64 | - <el-table-column label="位置信息" align="center"> | |
| 57 | + <el-table-column label="位置信息" width="180"> | |
| 65 | 58 | <template slot-scope="scope"> |
| 66 | 59 | <span v-if="scope.row.longitude*scope.row.latitude > 0">{{ scope.row.longitude }},<br>{{ scope.row.latitude }}</span> |
| 67 | 60 | <span v-if="scope.row.longitude*scope.row.latitude === 0">无</span> |
| 68 | 61 | </template> |
| 69 | 62 | </el-table-column> |
| 70 | - <el-table-column prop="ptztypeText" label="云台类型"/> | |
| 71 | - <el-table-column label="开启音频" align="center"> | |
| 63 | + <el-table-column prop="ptztypeText" label="云台类型" width="120" /> | |
| 64 | + <el-table-column label="开启音频" > | |
| 72 | 65 | <template slot-scope="scope"> |
| 73 | 66 | <el-switch @change="updateChannel(scope.row)" v-model="scope.row.hasAudio" active-color="#409EFF"> |
| 74 | 67 | </el-switch> |
| 75 | 68 | </template> |
| 76 | 69 | </el-table-column> |
| 77 | - <el-table-column label="状态" width="180" align="center"> | |
| 70 | + <el-table-column label="状态" width="240" > | |
| 78 | 71 | <template slot-scope="scope"> |
| 79 | 72 | <div slot="reference" class="name-wrapper"> |
| 80 | 73 | <el-tag size="medium" v-if="scope.row.status == 1">开启</el-tag> |
| ... | ... | @@ -84,21 +77,21 @@ |
| 84 | 77 | </el-table-column> |
| 85 | 78 | |
| 86 | 79 | |
| 87 | - <el-table-column label="操作" width="280" align="center" fixed="right"> | |
| 80 | + <el-table-column label="操作" width="280" fixed="right"> | |
| 88 | 81 | <template slot-scope="scope"> |
| 89 | - <el-button-group> | |
| 90 | - <!-- <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">播放</el-button> --> | |
| 91 | - <el-button size="mini" icon="el-icon-video-play" @click="sendDevicePush(scope.row)">播放</el-button> | |
| 92 | - <el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="!!scope.row.streamId" | |
| 93 | - @click="stopDevicePush(scope.row)">停止 | |
| 94 | - </el-button> | |
| 95 | - <el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.subCount > 0 || scope.row.parental === 1" | |
| 96 | - @click="changeSubchannel(scope.row)">查看 | |
| 97 | - </el-button> | |
| 98 | - <el-button size="mini" icon="el-icon-video-camera" type="primary" @click="queryRecords(scope.row)">设备录像 | |
| 99 | - </el-button> | |
| 100 | - <!-- <el-button size="mini" @click="sendDevicePush(scope.row)">录像查询</el-button> --> | |
| 101 | - </el-button-group> | |
| 82 | + <!-- <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">播放</el-button> --> | |
| 83 | + <el-button size="mini" icon="el-icon-video-play" type="text" @click="sendDevicePush(scope.row)">播放</el-button> | |
| 84 | + <el-button size="mini" icon="el-icon-switch-button" type="text" style="color: #f56c6c" v-if="!!scope.row.streamId" | |
| 85 | + @click="stopDevicePush(scope.row)">停止 | |
| 86 | + </el-button> | |
| 87 | + <el-divider direction="vertical"></el-divider> | |
| 88 | + <el-button size="mini" icon="el-icon-s-open" type="text" v-if="scope.row.subCount > 0 || scope.row.parental === 1" | |
| 89 | + @click="changeSubchannel(scope.row)">查看 | |
| 90 | + </el-button> | |
| 91 | + <el-divider v-if="scope.row.subCount > 0 || scope.row.parental === 1" direction="vertical"></el-divider> | |
| 92 | + <el-button size="mini" icon="el-icon-video-camera" type="text" @click="queryRecords(scope.row)">设备录像 | |
| 93 | + </el-button> | |
| 94 | + <!-- <el-button size="mini" @click="sendDevicePush(scope.row)">录像查询</el-button> --> | |
| 102 | 95 | </template> |
| 103 | 96 | </el-table-column> |
| 104 | 97 | </el-table> | ... | ... |
web_src/src/layout/UiHeader.vue
| 1 | 1 | <template> |
| 2 | 2 | <div id="UiHeader"> |
| 3 | - <el-menu router :default-active="activeIndex" menu-trigger="click" background-color="#545c64" text-color="#fff" | |
| 4 | - active-text-color="#ffd04b" mode="horizontal"> | |
| 3 | + | |
| 4 | + <el-menu router :default-active="activeIndex" menu-trigger="click" background-color="#001529" text-color="#fff" | |
| 5 | + active-text-color="#1890ff" mode="horizontal"> | |
| 6 | + | |
| 5 | 7 | <el-menu-item index="/control">控制台</el-menu-item> |
| 6 | 8 | <el-menu-item index="/live">分屏监控</el-menu-item> |
| 7 | 9 | <el-menu-item index="/deviceList">国标设备</el-menu-item> |
| ... | ... | @@ -148,4 +150,8 @@ export default { |
| 148 | 150 | #UiHeader .el-switch__label.is-active{ |
| 149 | 151 | color: #409EFF; |
| 150 | 152 | } |
| 153 | +#UiHeader .el-menu-item.is-active { | |
| 154 | + color: #fff!important; | |
| 155 | + background-color: #1890ff!important; | |
| 156 | +} | |
| 151 | 157 | </style> | ... | ... |