显示效果优化

pull/353/head
648540858 2022-06-15 16:04:36 +08:00
parent dbe6ece653
commit c2faa8c3ce
6 changed files with 49 additions and 11 deletions

View File

@ -56,7 +56,7 @@
@mouseover="getTooltipContent(scope.row.deviceId)">刷新 @mouseover="getTooltipContent(scope.row.deviceId)">刷新
</el-button> </el-button>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-button type="text" size="medium" icon="el-icon-video-camera-solid" v-bind:disabled="scope.row.online==0" <el-button type="text" size="medium" icon="el-icon-video-camera" v-bind:disabled="scope.row.online==0"
@click="showChannelList(scope.row)">通道 @click="showChannelList(scope.row)">通道
</el-button> </el-button>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>

View File

@ -38,11 +38,11 @@
<el-table-column prop="name" label="通道名称" min-width="200"> <el-table-column prop="name" label="通道名称" min-width="200">
</el-table-column> </el-table-column>
<el-table-column label="快照" min-width="120"> <el-table-column label="快照" min-width="120">
<template slot-scope="scope"> <template v-slot:default="scope">
<el-image <el-image
:src="getSnap(scope.row)" :src="getSnap(scope.row)"
:preview-src-list="getBigSnap(scope.row)" :preview-src-list="getBigSnap(scope.row)"
@error="getSnapErrorEvent(scope.row.deviceId, cope.row.channelId)" @error="getSnapErrorEvent(scope.row.deviceId, scope.row.channelId)"
:fit="'contain'" :fit="'contain'"
style="width: 60px"> style="width: 60px">
<div slot="error" class="image-slot"> <div slot="error" class="image-slot">
@ -71,8 +71,8 @@
<el-table-column label="状态" min-width="120"> <el-table-column label="状态" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.status == 1">线</el-tag> <el-tag size="medium" v-if="scope.row.status === 1">线</el-tag>
<el-tag size="medium" type="info" v-if="scope.row.status == 0">线</el-tag> <el-tag size="medium" type="info" v-if="scope.row.status === 0">线</el-tag>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -112,6 +112,8 @@
import devicePlayer from './dialog/devicePlayer.vue' import devicePlayer from './dialog/devicePlayer.vue'
import uiHeader from '../layout/UiHeader.vue' import uiHeader from '../layout/UiHeader.vue'
import moment from "moment"; import moment from "moment";
import DviceService from "./service/DeviceService";
import DeviceService from "./service/DeviceService";
export default { export default {
name: 'channelList', name: 'channelList',
@ -121,6 +123,8 @@ export default {
}, },
data() { data() {
return { return {
deviceService: new DeviceService(),
device: null,
deviceId: this.$route.params.deviceId, deviceId: this.$route.params.deviceId,
parentChannelId: this.$route.params.parentChannelId, parentChannelId: this.$route.params.parentChannelId,
deviceChannelList: [], deviceChannelList: [],
@ -141,7 +145,17 @@ export default {
}, },
mounted() { mounted() {
if (this.deviceId) {
this.deviceService.getDevice(this.deviceId, (result)=>{
this.device = result;
}, (error)=>{
console.log("获取设备信息失败")
console.error(error)
})
}
this.initData(); this.initData();
}, },
destroyed() { destroyed() {
this.$destroy('videojs'); this.$destroy('videojs');

View File

@ -235,10 +235,8 @@
<el-table-column prop="local_ip" label="本地"></el-table-column> <el-table-column prop="local_ip" label="本地"></el-table-column>
<el-table-column prop="typeid" label="类型"></el-table-column> <el-table-column prop="typeid" label="类型"></el-table-column>
<el-table-column align="right"> <el-table-column align="right">
<template slot="header" slot-scope="scope"> <template v-slot:default="scope">
<el-button icon="el-icon-refresh-right" circle @click="getAllSession()"></el-button> <el-button size="mini" icon="el-icon-refresh-right" circle @click="getAllSession()"></el-button>
</template>
<template slot-scope="scope">
<el-button @click.native.prevent="deleteRow(scope.$index, allSessionData)" type="text" size="small">移除 <el-button @click.native.prevent="deleteRow(scope.$index, allSessionData)" type="text" size="small">移除
</el-button> </el-button>
</template> </template>

View File

@ -38,8 +38,8 @@
</el-form-item> </el-form-item>
<el-form-item label="地理坐标系" prop="geoCoordSys" > <el-form-item label="地理坐标系" prop="geoCoordSys" >
<el-select v-model="form.geoCoordSys" style="float: left; width: 100%" > <el-select v-model="form.geoCoordSys" style="float: left; width: 100%" >
<el-option key="GCJ02" label="GCJ02" value="GCJ02"></el-option>
<el-option key="WGS84" label="WGS84" value="WGS84"></el-option> <el-option key="WGS84" label="WGS84" value="WGS84"></el-option>
<el-option key="GCJ02" label="GCJ02" value="GCJ02"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="目录订阅" title="0为取消订阅" prop="subscribeCycleForCatalog" > <el-form-item label="目录订阅" title="0为取消订阅" prop="subscribeCycleForCatalog" >

View File

@ -266,7 +266,20 @@ export default {
this.channel = channels[0] this.channel = channels[0]
} }
this.$nextTick(() => { this.$nextTick(() => {
this.infoBoxId = this.$refs.map.openInfoBox([this.channel.longitude, this.channel.latitude], this.$refs.infobox, [0, -50]) let longitudeStr;
let latitudeStr;
if (window.mapParam.coordinateSystem == "GCJ-02") {
longitudeStr = "longitudeGcj02";
latitudeStr = "latitudeGcj02";
}else if (window.mapParam.coordinateSystem == "WGS84") {
longitudeStr = "longitudeWgs84";
latitudeStr = "latitudeWgs84";
}else {
longitudeStr = "longitude";
latitudeStr = "latitude";
}
let position = [this.channel[longitudeStr], this.channel[latitudeStr]];
this.infoBoxId = this.$refs.map.openInfoBox(position, this.$refs.infobox, [0, -50])
}) })
}, },
closeInfoBox: function () { closeInfoBox: function () {

View File

@ -21,6 +21,19 @@ class DeviceService{
if (typeof (errorCallback) == "function") errorCallback(error) if (typeof (errorCallback) == "function") errorCallback(error)
}); });
} }
getDevice(deviceId, callback, errorCallback){
this.$axios({
method: 'get',
url:`/api/device/query/devices/${deviceId}`,
}).then((res) => {
if (typeof (callback) == "function") callback(res.data)
}).catch((error) => {
console.log(error);
if (typeof (errorCallback) == "function") errorCallback(error)
});
}
getAllDeviceList(callback,endCallback, errorCallback) { getAllDeviceList(callback,endCallback, errorCallback) {
let currentPage = 1; let currentPage = 1;
let count = 100; let count = 100;