|
@@ -175,6 +175,13 @@
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
|
|
+ icon="el-icon-thumb"
|
|
|
|
+ @click="drawFence(scope.row)"
|
|
|
|
+ >绘制围栏
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
icon="el-icon-video-camera"
|
|
icon="el-icon-video-camera"
|
|
@click="preview(scope.row)"
|
|
@click="preview(scope.row)"
|
|
v-hasPermi="['camerachannel:camerachannel:selectchannel']"
|
|
v-hasPermi="['camerachannel:camerachannel:selectchannel']"
|
|
@@ -1171,6 +1178,10 @@ export default {
|
|
this.single = selection.length !== 1
|
|
this.single = selection.length !== 1
|
|
this.multiple = !selection.length
|
|
this.multiple = !selection.length
|
|
},
|
|
},
|
|
|
|
+ //绘制围栏
|
|
|
|
+ drawFence(row) {
|
|
|
|
+ window.open('http://' + row.cameraIp + ':1025?username=admin2&password=admin123')
|
|
|
|
+ },
|
|
/** ----------------------------------摄像头预览开始------------------------------------- */
|
|
/** ----------------------------------摄像头预览开始------------------------------------- */
|
|
preview(row) {
|
|
preview(row) {
|
|
selectConfigKey('DssVersion').then(res => {
|
|
selectConfigKey('DssVersion').then(res => {
|
|
@@ -1281,7 +1292,7 @@ export default {
|
|
preview_dss(cameraCode, cameraName, deviceCode, deviceSn, deviceProtocolType, deviceLoginType) {
|
|
preview_dss(cameraCode, cameraName, deviceCode, deviceSn, deviceProtocolType, deviceLoginType) {
|
|
getDahuaVideoServer().then(newResponse => {
|
|
getDahuaVideoServer().then(newResponse => {
|
|
this.ws.detectConnectQt().then(res => {
|
|
this.ws.detectConnectQt().then(res => {
|
|
- console.log('检测连接结果:', res);
|
|
|
|
|
|
+ console.log('检测连接结果:', res)
|
|
if (res) { // 连接客户端成功
|
|
if (res) { // 连接客户端成功
|
|
this.alertLogin()
|
|
this.alertLogin()
|
|
this.ws.login({
|
|
this.ws.login({
|
|
@@ -1292,7 +1303,7 @@ export default {
|
|
token: '',
|
|
token: '',
|
|
https: 1
|
|
https: 1
|
|
})
|
|
})
|
|
- console.log('登录结果:', res);
|
|
|
|
|
|
+ console.log('登录结果:', res)
|
|
this.ws.on('loginState', (res) => {
|
|
this.ws.on('loginState', (res) => {
|
|
this.isLogin = res
|
|
this.isLogin = res
|
|
if (res) {
|
|
if (res) {
|
|
@@ -1305,11 +1316,11 @@ export default {
|
|
channelList.push(code)
|
|
channelList.push(code)
|
|
}
|
|
}
|
|
// 构建参数对象
|
|
// 构建参数对象
|
|
- let params;
|
|
|
|
|
|
+ let params
|
|
if (deviceCode === null && deviceSn === null && deviceProtocolType === null && deviceLoginType === null) {
|
|
if (deviceCode === null && deviceSn === null && deviceProtocolType === null && deviceLoginType === null) {
|
|
- params = this.careteListJson(cameraCode, cameraName);
|
|
|
|
|
|
+ params = this.careteListJson(cameraCode, cameraName)
|
|
} else {
|
|
} else {
|
|
- params = this.careteListJson(cameraCode, cameraName, deviceCode, deviceSn, deviceProtocolType, deviceLoginType);
|
|
|
|
|
|
+ params = this.careteListJson(cameraCode, cameraName, deviceCode, deviceSn, deviceProtocolType, deviceLoginType)
|
|
}
|
|
}
|
|
// 过滤掉 null 参数
|
|
// 过滤掉 null 参数
|
|
if (deviceCode === null) delete params.deviceCode
|
|
if (deviceCode === null) delete params.deviceCode
|
|
@@ -1328,7 +1339,7 @@ export default {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- careteListJson(cameraCode, cameraName, deviceCode=null, deviceSn=null, deviceProtocolType=null, deviceLoginType=null) {
|
|
|
|
|
|
+ careteListJson(cameraCode, cameraName, deviceCode = null, deviceSn = null, deviceProtocolType = null, deviceLoginType = null) {
|
|
const treeLabels = [{
|
|
const treeLabels = [{
|
|
'id': null,
|
|
'id': null,
|
|
'labelCode': '999',
|
|
'labelCode': '999',
|
|
@@ -1352,20 +1363,20 @@ export default {
|
|
'cameraType': '1',
|
|
'cameraType': '1',
|
|
'online': '1',
|
|
'online': '1',
|
|
'cameraCode': '1'
|
|
'cameraCode': '1'
|
|
- };
|
|
|
|
- if (deviceCode!== null) {
|
|
|
|
- currentParams.deviceCode = deviceCode;
|
|
|
|
}
|
|
}
|
|
- if (deviceSn!== null) {
|
|
|
|
- currentParams.deviceSn = deviceSn;
|
|
|
|
|
|
+ if (deviceCode !== null) {
|
|
|
|
+ currentParams.deviceCode = deviceCode
|
|
|
|
+ }
|
|
|
|
+ if (deviceSn !== null) {
|
|
|
|
+ currentParams.deviceSn = deviceSn
|
|
}
|
|
}
|
|
- if (deviceProtocolType!== null) {
|
|
|
|
- currentParams.deviceProtocolType = deviceProtocolType;
|
|
|
|
|
|
+ if (deviceProtocolType !== null) {
|
|
|
|
+ currentParams.deviceProtocolType = deviceProtocolType
|
|
}
|
|
}
|
|
- if (deviceLoginType!== null) {
|
|
|
|
- currentParams.deviceLoginType = deviceLoginType;
|
|
|
|
|
|
+ if (deviceLoginType !== null) {
|
|
|
|
+ currentParams.deviceLoginType = deviceLoginType
|
|
}
|
|
}
|
|
- channelDates.push(currentParams);
|
|
|
|
|
|
+ channelDates.push(currentParams)
|
|
}
|
|
}
|
|
const labelChannels = [{
|
|
const labelChannels = [{
|
|
'labelCode': cameraCode,
|
|
'labelCode': cameraCode,
|