Merge branch 'wvp-28181-2.0' into wvp-28181-2.0

This commit is contained in:
mrjackwang
2022-03-03 19:52:16 +08:00
committed by GitHub
87 changed files with 1119 additions and 613 deletions

View File

@@ -55,14 +55,14 @@
<el-table-column prop="createTime" label="创建时间" align="center" width="140">
</el-table-column>
<el-table-column label="操作" width="360" align="center" fixed="right">
<el-table-column label="操作" width="450" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" :ref="scope.row.deviceId + 'refbtn' " v-if="scope.row.online!=0" icon="el-icon-refresh" @click="refDevice(scope.row)">刷新</el-button>
<el-button-group>
<el-button size="mini" icon="el-icon-video-camera-solid" v-bind:disabled="scope.row.online==0" type="primary" @click="showChannelList(scope.row)">通道</el-button>
<el-button size="mini" icon="el-icon-location" v-bind:disabled="scope.row.online==0" type="primary" @click="showDevicePosition(scope.row)">定位</el-button>
<el-button size="mini" icon="el-icon-edit" type="primary" @click="edit(scope.row)">编辑</el-button>
<el-button size="mini" icon="el-icon-delete" type="danger" v-if="scope.row.online==0" @click="deleteDevice(scope.row)">删除</el-button>
<el-button size="mini" icon="el-icon-delete" type="danger" @click="deleteDevice(scope.row)">删除</el-button>
</el-button-group>
</template>
</el-table-column>
@@ -165,15 +165,29 @@
},
deleteDevice: function(row) {
let that = this;
this.$axios({
method: 'delete',
url:`/api/device/query/devices/${row.deviceId}/delete`
}).then((res)=>{
this.getDeviceList();
}).catch((error) =>{
console.log(error);
});
let msg = "确定删除此设备?"
if (row.online !== 0) {
msg = "在线设备删除后仍可通过注册再次上线。<br/>如需彻底删除请先将设备离线。<br/><strong>确定删除此设备?</strong>"
}
this.$confirm(msg, '提示', {
dangerouslyUseHTMLString : true,
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true,
type: 'warning'
}).then(() => {
this.$axios({
method: 'delete',
url:`/api/device/query/devices/${row.deviceId}/delete`
}).then((res)=>{
this.getDeviceList();
}).catch((error) =>{
console.log(error);
});
}).catch(() => {
});
},
showChannelList: function(row) {

View File

@@ -28,9 +28,7 @@
<devicePlayer ref="devicePlayer" v-loading="isLoging"></devicePlayer>
<!--设备列表-->
<el-table ref="channelListTable" :data="deviceChannelList" :height="winHeight" border style="width: 100%">
<el-table-column prop="channelId" label="通道编号" width="210">
</el-table-column>
<el-table-column prop="deviceId" label="设备编号" width="210">
<el-table-column prop="channelId" label="通道编号" width="200">
</el-table-column>
<el-table-column prop="name" label="通道名称">
</el-table-column>

View File

@@ -75,7 +75,10 @@ export default {
isLoging: false,
rules: {
oldPassword: [{ required: true, validator: validatePass0, trigger: "blur" }],
newPassword: [{ required: true, validator: validatePass1, trigger: "blur" }],
newPassword: [{ required: true, validator: validatePass1, trigger: "blur" }, {
pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,20}$/,
message: "密码长度在8-20位之间,由字母+数字+特殊字符组成",
},],
confirmPassword: [{ required: true, validator: validatePass2, trigger: "blur" }],
},
};

View File

@@ -307,7 +307,7 @@ export default {
this.isLoging = false;
// this.videoUrl = streamInfo.rtc;
this.videoUrl = this.getUrlByStreamInfo(streamInfo);
this.streamId = streamInfo.streamId;
this.streamId = streamInfo.stream;
this.app = streamInfo.app;
this.mediaServerId = streamInfo.mediaServerId;
this.playFromStreamInfo(false, streamInfo)
@@ -485,8 +485,9 @@ export default {
}).then(function (res) {
var streamInfo = res.data;
that.app = streamInfo.app;
that.streamId = streamInfo.streamId;
that.streamId = streamInfo.stream;
that.mediaServerId = streamInfo.mediaServerId;
that.ssrc = streamInfo.ssrc;
that.videoUrl = that.getUrlByStreamInfo(streamInfo);
that.recordPlay = true;
});
@@ -497,7 +498,7 @@ export default {
this.videoUrl = '';
this.$axios({
method: 'get',
url: '/api/playback/stop/' + this.deviceId + "/" + this.channelId
url: '/api/playback/stop/' + this.deviceId + "/" + this.channelId + "/" + this.streamId
}).then(function (res) {
if (callback) callback()
});
@@ -517,7 +518,7 @@ export default {
}).then(function (res) {
var streamInfo = res.data;
that.app = streamInfo.app;
that.streamId = streamInfo.streamId;
that.streamId = streamInfo.stream;
that.mediaServerId = streamInfo.mediaServerId;
that.videoUrl = that.getUrlByStreamInfo(streamInfo);
that.recordPlay = true;
@@ -529,7 +530,7 @@ export default {
this.videoUrl = '';
this.$axios({
method: 'get',
url: '/api/download/stop/' + this.deviceId + "/" + this.channelId
url: '/api/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.streamId
}).then(function (res) {
if (callback) callback()
});
@@ -539,8 +540,6 @@ export default {
let that = this;
this.$axios({
method: 'post',
// url: '/api/ptz/' + this.deviceId + '/' + this.channelId + '?leftRight=' + leftRight + '&upDown=' + upDown +
// '&inOut=' + zoom + '&moveSpeed=50&zoomSpeed=50'
url: '/api/ptz/control/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed
}).then(function (res) {});
},