Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
bc0b52f893
@ -8,7 +8,14 @@ export function getCameraByArea(params:any){
|
||||
params:params
|
||||
});
|
||||
}
|
||||
|
||||
//获取左侧导航树-主设备
|
||||
export function getSubstationMainTree(params:any){
|
||||
return request({
|
||||
url: '/basedata/substation-maindevice/getSubstationMainTree' ,
|
||||
method: 'get',
|
||||
params:params
|
||||
});
|
||||
}
|
||||
export function getSubstationDeviceById(params:any){
|
||||
return request({
|
||||
url: '/basedata/substation-patroldevice/getSubstationDeviceById' ,
|
||||
@ -16,5 +23,59 @@ export function getSubstationDeviceById(params:any){
|
||||
params:params
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//紧急调用
|
||||
export function setWorkingOfPatrolDevice(params:any){
|
||||
return request({
|
||||
url: '/basedata/substation-patroldevice/setWorkingOfPatrolDevice' ,
|
||||
method: 'post',
|
||||
params:params
|
||||
});
|
||||
}
|
||||
//
|
||||
export function isUrgentRetrieval(params:any){
|
||||
return request({
|
||||
url: '/basedata/substation-patroldevice/isUrgentRetrieval' ,
|
||||
method: 'get',
|
||||
params:params
|
||||
});
|
||||
}
|
||||
//区域下声纹
|
||||
export function getVoicePrintByArea(params:any){
|
||||
return request({
|
||||
url: '/basedata/substation-patroldevice/getVoicePrintByArea' ,
|
||||
method: 'get',
|
||||
params:params
|
||||
});
|
||||
}
|
||||
//分页查看声纹检测数据{}
|
||||
export function getVoicePatrolPage(params:any){
|
||||
return request({
|
||||
url: '/basedata/voice-patrol-log/getVoicePatrolPage' ,
|
||||
method: 'get',
|
||||
params:params
|
||||
});
|
||||
}
|
||||
//升温录制
|
||||
export function executeVoicePatrolTask(params:any){
|
||||
return request({
|
||||
url: '/basedata/voice-patrol-log/executeVoicePatrolTask' ,
|
||||
method: 'post',
|
||||
params:params
|
||||
});
|
||||
}
|
||||
// 预置位模板录入
|
||||
export function importTemplateImage(params:any){
|
||||
return request({
|
||||
url: '/basedata/substation-patroldevice/importTemplateImage' ,
|
||||
method: 'get',
|
||||
params:params
|
||||
});
|
||||
}
|
||||
//预置位偏移检测
|
||||
export function presetOffsetDetection(params:any){
|
||||
return request({
|
||||
url: '/basedata/substation-patroldevice/presetOffsetDetection' ,
|
||||
method: 'get',
|
||||
params:params
|
||||
});
|
||||
}
|
BIN
riis-web/src/assets/newimg/gjsz.png
Normal file
BIN
riis-web/src/assets/newimg/gjsz.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 588 B |
BIN
riis-web/src/assets/newimg/lj.png
Normal file
BIN
riis-web/src/assets/newimg/lj.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 447 B |
BIN
riis-web/src/assets/newimg/ty.png
Normal file
BIN
riis-web/src/assets/newimg/ty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 469 B |
491
riis-web/src/components/wavEcharts/index.vue
Normal file
491
riis-web/src/components/wavEcharts/index.vue
Normal file
@ -0,0 +1,491 @@
|
||||
<template>
|
||||
<div class="audio-spectrum">
|
||||
<el-scrollbar height="700px">
|
||||
<!-- 分贝图表容器 -->
|
||||
<div ref="dbChartContainer" class="spectrum-chart-db"></div>
|
||||
<!-- 频率图表容器 -->
|
||||
<div ref="chartContainer" class="spectrum-chart"></div>
|
||||
</el-scrollbar>
|
||||
|
||||
<!-- 音频播放器 -->
|
||||
<audio ref="audioElement" style="width: 100%;" :src="fileUrl" controls></audio>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, onBeforeUnmount, watch } from 'vue';
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
// ==================== 常量定义 ====================
|
||||
const COLORS = {
|
||||
PRIMARY: '#63e2b7',
|
||||
SECONDARY: '#8b9cff',
|
||||
TERTIARY: '#ff88d0',
|
||||
DB_CHART: '#ff6666',
|
||||
AXIS: '#717d95',
|
||||
TEXT: '#8c94a3'
|
||||
};
|
||||
|
||||
// ==================== props定义 ====================
|
||||
const props = defineProps({
|
||||
fileUrl: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
});
|
||||
|
||||
// ==================== DOM引用 ====================
|
||||
const chartContainer = ref(null);
|
||||
const dbChartContainer = ref(null);
|
||||
const audioElement = ref(null);
|
||||
|
||||
// ==================== 图表实例 ====================
|
||||
let chartInstance = null;
|
||||
let dbChartInstance = null;
|
||||
|
||||
// ==================== 音频分析类 ====================
|
||||
/**
|
||||
* 音频分析器类
|
||||
* 负责音频数据采集、分析和图表数据更新
|
||||
*/
|
||||
class AudioAnalyzer {
|
||||
static FFT_SIZE = 8192;
|
||||
static SAMPLE_INTERVAL = 100;
|
||||
|
||||
/**
|
||||
* 初始化音频分析器
|
||||
*/
|
||||
constructor() {
|
||||
// 频率分析数据 [基频, 第一共振峰, 第二共振峰]
|
||||
this.chartData = [[], [], []];
|
||||
// 分贝数据 [频率-Hz, 强度-dB]
|
||||
this.dbChartData = [];
|
||||
// 创建音频上下文
|
||||
this.audioContext = new (window.AudioContext || window.webkitAudioContext)();
|
||||
// 创建分析器节点
|
||||
this.analyser = this.audioContext.createAnalyser();
|
||||
this.analyser.fftSize = AudioAnalyzer.FFT_SIZE;
|
||||
this.analyser.smoothingTimeConstant = 0.7;
|
||||
// 初始化分析数据缓冲区
|
||||
this.dataArray = new Float32Array(this.analyser.frequencyBinCount);
|
||||
// 动画帧ID
|
||||
this.animationId = null;
|
||||
// 停止标志
|
||||
this.isStopped = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接媒体源到分析器
|
||||
* @param {HTMLMediaElement} mediaElement - 音频元素
|
||||
*/
|
||||
connectMediaSource(mediaElement) {
|
||||
const mediaSource = this.audioContext.createMediaElementSource(mediaElement);
|
||||
mediaSource.connect(this.analyser);
|
||||
this.analyser.connect(this.audioContext.destination);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始音频分析
|
||||
*/
|
||||
startAnalyze() {
|
||||
if (this.animationId) return;
|
||||
this._analyze();
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止音频分析
|
||||
*/
|
||||
stopAnalyze() {
|
||||
if (this.animationId) {
|
||||
cancelAnimationFrame(this.animationId);
|
||||
this.animationId = null;
|
||||
}
|
||||
this.isStopped = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 音频分析循环
|
||||
*/
|
||||
_analyze() {
|
||||
if (this.isStopped) return;
|
||||
|
||||
// 获取当前频率数据
|
||||
this.analyser.getFloatFrequencyData(this.dataArray);
|
||||
// 分析共振峰
|
||||
const peaks = this._analyzeFormants();
|
||||
// 更新图表数据
|
||||
this._updateChart(peaks);
|
||||
|
||||
// 使用requestAnimationFrame配合setTimeout控制采样间隔
|
||||
this.animationId = requestAnimationFrame(() => {
|
||||
setTimeout(() => {
|
||||
if (!this.isStopped) this._analyze();
|
||||
}, AudioAnalyzer.SAMPLE_INTERVAL);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 分析共振峰数据
|
||||
* @returns {Array} 共振峰数据数组
|
||||
*/
|
||||
_analyzeFormants() {
|
||||
const sampleRate = this.audioContext.sampleRate;
|
||||
const linearData = this.dataArray.map(v => 10 ** (v / 20)); // 线性幅度转换
|
||||
const dbData = this.dataArray.slice(); // 原始分贝值
|
||||
|
||||
// 更新分贝图表数据
|
||||
this.dbChartData = Array.from(dbData).map((db, index) => [
|
||||
index * sampleRate / AudioAnalyzer.FFT_SIZE,
|
||||
db
|
||||
]);
|
||||
|
||||
// 查找三个频段的主峰
|
||||
return [
|
||||
this._findDominantPeak(linearData, sampleRate, 50, 300),
|
||||
this._findDominantPeak(linearData, sampleRate, 300, 1000),
|
||||
this._findDominantPeak(linearData, sampleRate, 1000, 3000)
|
||||
].filter(Boolean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找指定频段的主峰
|
||||
* @param {Array} data - 音频数据
|
||||
* @param {number} sampleRate - 采样率
|
||||
* @param {number} lowFreq - 最低频率
|
||||
* @param {number} highFreq - 最高频率
|
||||
* @returns {Object|null} 主峰信息
|
||||
*/
|
||||
_findDominantPeak(data, sampleRate, lowFreq, highFreq) {
|
||||
const minBin = Math.floor(lowFreq * AudioAnalyzer.FFT_SIZE / sampleRate);
|
||||
const maxBin = Math.ceil(highFreq * AudioAnalyzer.FFT_SIZE / sampleRate);
|
||||
|
||||
let maxIndex = -1;
|
||||
let maxValue = -Infinity;
|
||||
|
||||
for (let i = minBin; i <= maxBin; i++) {
|
||||
if (data[i] > maxValue) {
|
||||
maxValue = data[i];
|
||||
maxIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
return maxIndex !== -1 ? {
|
||||
frequency: maxIndex * sampleRate / AudioAnalyzer.FFT_SIZE,
|
||||
amplitude: maxValue
|
||||
} : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新图表数据
|
||||
* @param {Array} peaks - 共振峰数据
|
||||
*/
|
||||
_updateChart(peaks) {
|
||||
const currentTime = audioElement.value?.currentTime || 0;
|
||||
if (currentTime <= 0) return;
|
||||
|
||||
const msTime = currentTime * 1000;
|
||||
peaks.forEach((peak, i) => {
|
||||
if (i < 3 && peak) {
|
||||
this.chartData[i] = [...this.chartData[i], [msTime, peak.frequency]];
|
||||
}
|
||||
});
|
||||
this.updateChartSeries();
|
||||
updatePlayhead(msTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新图表系列数据
|
||||
*/
|
||||
updateChartSeries() {
|
||||
const option = chartInstance.getOption();
|
||||
// 使用slice替代JSON深拷贝,提升性能
|
||||
this.chartData.forEach((d, i) => {
|
||||
option.series[i].data = d.slice();
|
||||
});
|
||||
chartInstance.setOption(option);
|
||||
|
||||
// 同步更新分贝图表
|
||||
dbChartInstance.setOption({
|
||||
series: [{ data: this.dbChartData }]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 图表配置 ====================
|
||||
/**
|
||||
* 初始化图表
|
||||
*/
|
||||
const initChart = () => {
|
||||
// 创建主图表实例
|
||||
chartInstance = echarts.init(chartContainer.value);
|
||||
// 创建分贝图表实例
|
||||
dbChartInstance = echarts.init(dbChartContainer.value);
|
||||
|
||||
// 延迟调整尺寸以确保正确渲染
|
||||
setTimeout(() => {
|
||||
chartInstance.resize();
|
||||
dbChartInstance.resize();
|
||||
}, 10);
|
||||
|
||||
// 深色主题配置
|
||||
const darkTheme = {
|
||||
backgroundColor: 'rgb(0 30 85)',
|
||||
};
|
||||
|
||||
// 主图表配置
|
||||
const mainChartOption = {
|
||||
...darkTheme,
|
||||
title: {
|
||||
text: '音频频谱分析',
|
||||
left: 'center',
|
||||
textStyle: { color: '#ffffff' }
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
formatter: params => `时间: ${params[0].value[0].toFixed(0)}ms<br>${params.map(p =>
|
||||
`${p.marker} ${p.seriesName}: ${p.value[1].toFixed(1)}Hz`
|
||||
).join('<br>')}`
|
||||
},
|
||||
legend: {
|
||||
data: ['基频', '第一共振峰', '第二共振峰'],
|
||||
top: 35,
|
||||
textStyle: { color: '#e4e7ed' }
|
||||
},
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
name: '时间 (ms)',
|
||||
axisLabel: { formatter: value => `${Math.round(value)}ms` },
|
||||
axisLine: { lineStyle: { color: COLORS.AXIS } },
|
||||
axisLabel: { color: COLORS.TEXT }
|
||||
},
|
||||
yAxis: {
|
||||
type: 'log',
|
||||
name: '频率 (Hz)',
|
||||
min: 50,
|
||||
max: 5000,
|
||||
axisLabel: {
|
||||
formatter: value => value >= 1000 ? `${(value / 1000).toFixed(1)}k` : value
|
||||
},
|
||||
axisLine: { lineStyle: { color: COLORS.AXIS } },
|
||||
axisLabel: { color: COLORS.TEXT }
|
||||
},
|
||||
series: [
|
||||
createSeriesOption('基频', COLORS.PRIMARY, 2),
|
||||
createSeriesOption('第一共振峰', COLORS.SECONDARY, 1.5),
|
||||
createSeriesOption('第二共振峰', COLORS.TERTIARY, 1.5)
|
||||
],
|
||||
dataZoom: [{ type: 'inside' }],
|
||||
grid: { top: 80, bottom: 80 },
|
||||
graphic: [{
|
||||
type: 'line',
|
||||
z: 100,
|
||||
invisible: true,
|
||||
shape: { y1: 0, y2: 1 },
|
||||
style: { stroke: '#ff4d4f', lineWidth: 2 }
|
||||
}]
|
||||
};
|
||||
|
||||
// 分贝图表配置
|
||||
const dbChartOption = {
|
||||
...darkTheme,
|
||||
title: {
|
||||
text: '频谱强度(分贝)',
|
||||
left: 'center',
|
||||
textStyle: { color: '#ffffff' }
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
formatter: params => `频率: ${params[0].axisValue}Hz<br>强度: ${params[0].value}dB`
|
||||
},
|
||||
xAxis: {
|
||||
type: 'log',
|
||||
name: '频率 (Hz)',
|
||||
min: 400,
|
||||
max: 5000,
|
||||
axisLabel: {
|
||||
formatter: value => value >= 1000 ? `${(value / 1000).toFixed(1)}k` : value
|
||||
},
|
||||
axisLine: { lineStyle: { color: COLORS.AXIS } },
|
||||
axisLabel: { color: COLORS.TEXT }
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '强度 (dB)',
|
||||
axisLine: { lineStyle: { color: COLORS.AXIS } },
|
||||
axisLabel: { color: COLORS.TEXT }
|
||||
},
|
||||
series: [{
|
||||
name: '频谱强度',
|
||||
type: 'line',
|
||||
data: [],
|
||||
showSymbol: false,
|
||||
lineStyle: {
|
||||
color: COLORS.DB_CHART,
|
||||
width: 1.5,
|
||||
shadowColor: COLORS.DB_CHART,
|
||||
shadowBlur: 8
|
||||
}
|
||||
}],
|
||||
grid: { top: 80, bottom: 80 }
|
||||
};
|
||||
|
||||
// 应用图表配置
|
||||
chartInstance.setOption(mainChartOption);
|
||||
dbChartInstance.setOption(dbChartOption);
|
||||
};
|
||||
|
||||
/**
|
||||
* 创建系列配置
|
||||
* @param {string} name - 系列名称
|
||||
* @param {string} color - 系列颜色
|
||||
* @param {number} width - 线宽
|
||||
* @returns {Object} 系列配置对象
|
||||
*/
|
||||
const createSeriesOption = (name, color, width) => ({
|
||||
name,
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
showSymbol: false,
|
||||
lineStyle: {
|
||||
color,
|
||||
width,
|
||||
shadowColor: color,
|
||||
shadowBlur: 8
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 更新播放头位置
|
||||
* @param {number} currentTime - 当前时间(毫秒)
|
||||
*/
|
||||
const updatePlayhead = (currentTime) => {
|
||||
chartInstance.setOption({
|
||||
graphic: [{
|
||||
invisible: false,
|
||||
position: [currentTime, 0],
|
||||
shape: {
|
||||
x1: currentTime,
|
||||
x2: currentTime,
|
||||
y1: 0,
|
||||
y2: chartInstance.getHeight()
|
||||
}
|
||||
}]
|
||||
});
|
||||
};
|
||||
|
||||
// ==================== 主逻辑 ====================
|
||||
let analyzer = null;
|
||||
|
||||
/**
|
||||
* 播放事件处理函数
|
||||
*/
|
||||
const playHandler = () => {
|
||||
try {
|
||||
analyzer.connectMediaSource(audioElement.value);
|
||||
analyzer.startAnalyze();
|
||||
} catch (error) {
|
||||
console.error('音频连接失败:', error);
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
initChart();
|
||||
analyzer = new AudioAnalyzer();
|
||||
|
||||
// 添加事件监听器
|
||||
audioElement.value.addEventListener('play', playHandler);
|
||||
audioElement.value.addEventListener('pause', () => {
|
||||
analyzer.stopAnalyze();
|
||||
});
|
||||
audioElement.value.addEventListener('ended', () => {
|
||||
analyzer.stopAnalyze();
|
||||
});
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
// 清理资源
|
||||
analyzer?.stopAnalyze();
|
||||
analyzer?.audioContext?.close();
|
||||
chartInstance?.dispose();
|
||||
dbChartInstance?.dispose();
|
||||
});
|
||||
|
||||
/**
|
||||
* 文件URL变更监听器
|
||||
*/
|
||||
watch(() => props.fileUrl, async () => {
|
||||
try {
|
||||
// 停止当前分析
|
||||
if (analyzer) {
|
||||
analyzer.stopAnalyze();
|
||||
await analyzer.audioContext.close();
|
||||
}
|
||||
|
||||
// 重置图表
|
||||
chartInstance.setOption({
|
||||
series: [{ data: [] }, { data: [] }, { data: [] }],
|
||||
graphic: [{ invisible: true }]
|
||||
}, true);
|
||||
|
||||
// 等待DOM更新
|
||||
await new Promise(resolve => setTimeout(resolve, 50));
|
||||
|
||||
// 创建新分析器
|
||||
analyzer = new AudioAnalyzer();
|
||||
audioElement.value.load();
|
||||
|
||||
// 重新绑定事件监听器
|
||||
audioElement.value.removeEventListener('play', playHandler);
|
||||
audioElement.value.addEventListener('play', playHandler);
|
||||
} catch (error) {
|
||||
console.error('文件加载失败:', error);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.audio-spectrum {
|
||||
font-family: Arial;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.spectrum-chart,
|
||||
.spectrum-chart-db {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
background: rgba(255, 255, 255, 0.144);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
audio {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
border-radius: 8px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
/* 音频控件样式优化 */
|
||||
audio::-webkit-media-controls-panel {
|
||||
background: #008eaad7;
|
||||
}
|
||||
|
||||
audio::-webkit-media-controls-play-button,
|
||||
audio::-webkit-media-controls-mute-button {
|
||||
filter: invert(0.9);
|
||||
}
|
||||
|
||||
audio::-webkit-media-controls-current-time-display,
|
||||
audio::-webkit-media-controls-time-remaining-display {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Firefox兼容样式 */
|
||||
@-moz-document url-prefix() {
|
||||
audio {
|
||||
background: rgba(0, 30, 85, 0.8);
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
</style>
|
677
riis-web/src/views/collectmonitor/voiceprintDetection/index.vue
Normal file
677
riis-web/src/views/collectmonitor/voiceprintDetection/index.vue
Normal file
@ -0,0 +1,677 @@
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "stationboard", // 变电站首页
|
||||
};
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, nextTick, onBeforeUnmount } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { getVoicePrintByArea, getVoicePatrolPage, executeVoicePatrolTask } from "@/api/videomonitor/index";
|
||||
import Page from '@/components/Pagination/page.vue'
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import Eldialog from '@/components/seccmsdialog/eldialog.vue';
|
||||
import wavEcharts from '@/components/wavEcharts/index.vue';
|
||||
const userStore = useUserStore();
|
||||
const url = userStore.webApiBaseUrl;
|
||||
function getData() {
|
||||
getInit()
|
||||
}
|
||||
const CameraName = ref("")
|
||||
const navlist: any = ref([])
|
||||
const treeData: any = ref([])
|
||||
navlist.value = [{
|
||||
name: '全部'
|
||||
}, {
|
||||
name: '在线'
|
||||
}, {
|
||||
name: '离线'
|
||||
}]
|
||||
const activeIndex = ref(0)
|
||||
const status: any = ref(null)
|
||||
const currentNodeKey = ref()
|
||||
function navClick(index: any) {
|
||||
activeIndex.value = index
|
||||
if (activeIndex.value == 0) {
|
||||
status.value = null
|
||||
} else if (activeIndex.value == 1) {
|
||||
status.value = 1
|
||||
} else if (activeIndex.value == 2) {
|
||||
status.value = 0
|
||||
}
|
||||
getInit()
|
||||
}
|
||||
function getInit() {
|
||||
const params = {
|
||||
stationId: userStore.stationId,
|
||||
deviceName: CameraName.value,
|
||||
status: status.value
|
||||
}
|
||||
getVoicePrintByArea(params).then((res: any) => {
|
||||
treeData.value = res.data
|
||||
voiceprint_one.value = res.data[0].children[0]
|
||||
getdata()
|
||||
})
|
||||
}
|
||||
|
||||
const voiceprint_one: any = ref({})
|
||||
const defaultprops = {
|
||||
label: "patroldeviceName",
|
||||
}
|
||||
function handleNodeClick(data: any, node: any) {
|
||||
if (data.children) {
|
||||
node.isCurrent = false
|
||||
currentNodeKey.value = ""
|
||||
nextTick(() => {
|
||||
// currentNodeKey.value = orgId.value
|
||||
})
|
||||
} else {
|
||||
voiceprint_one.value = data
|
||||
getdata()
|
||||
// loading.value = true
|
||||
// Maindata.value = data
|
||||
// orgId.value = data.bayId;
|
||||
|
||||
}
|
||||
}
|
||||
onBeforeUnmount(() => {
|
||||
})
|
||||
onMounted(() => {
|
||||
getInit()
|
||||
})
|
||||
const tableData = ref([])
|
||||
const treeloading = ref(false)
|
||||
const environment_data = ref([
|
||||
|
||||
])
|
||||
const total: any = ref()
|
||||
const params: any = ref({
|
||||
stationId: userStore.stationId,
|
||||
patroldeviceId: voiceprint_one.value.patroldeviceId,
|
||||
size: 10,
|
||||
current: 1,
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
})
|
||||
function getdata() {
|
||||
if (tableData.value.length != 0) {
|
||||
params.value.startDate = tableData.value[0]
|
||||
params.value.endDate = tableData.value[1]
|
||||
} else {
|
||||
params.value.startDate = ''
|
||||
params.value.endDate = ''
|
||||
}
|
||||
|
||||
getVoicePatrolPage(params.value).then((res: any) => {
|
||||
environment_data.value = res.data.records
|
||||
params.value.size = res.data.size
|
||||
params.value.current = res.data.current
|
||||
total.value = res.data.total
|
||||
})
|
||||
}
|
||||
//控制行变色
|
||||
const tableRowClassName = ({
|
||||
row,
|
||||
rowIndex,
|
||||
}: {
|
||||
row: any
|
||||
rowIndex: number
|
||||
}) => {
|
||||
if (rowIndex % 2 === 0) {
|
||||
return 'warning-row'
|
||||
} else if (rowIndex % 2 === 1) {
|
||||
return 'success-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
const minLong = ref('')
|
||||
function recording() {
|
||||
var tast = /^\+?[1-9][0-9]*$/; //正整数
|
||||
if (tast.test(minLong.value) == false) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请输入正确的录制时长',
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
executeVoicePatrolTask({ id: voiceprint_one.value.patroldeviceId, duration: minLong.value }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '开始录制',
|
||||
})
|
||||
getdata()
|
||||
}
|
||||
})
|
||||
}
|
||||
const dialogVisible = ref(false)
|
||||
const dataOpen = ref()
|
||||
function handleClose() {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
function open(row: any) {
|
||||
console.log(row)
|
||||
dialogVisible.value = true
|
||||
dataOpen.value = row
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<div id="richboxid" class="videomonitor-box">
|
||||
<div id="richleft" class="videomonitor-left">
|
||||
<div class="stationboard-box-title">
|
||||
<img src="@/assets/navigation/ty_bq.png" />
|
||||
<div class="imgname">声纹列表</div>
|
||||
</div>
|
||||
|
||||
<el-input v-model="CameraName" clearable placeholder="请输入声纹名称" @clear="getData()"
|
||||
@keyup.enter="getData()" style="margin-left:14px ;width: 230px;" class="videomonitor-input">
|
||||
<template #suffix>
|
||||
<img src="@/assets/monitorsystem/spjk_ss.png" style="cursor:pointer ;" @click="getData">
|
||||
</template>
|
||||
</el-input>
|
||||
<div class="nav-box">
|
||||
<div class="nav-list" v-for="(item, index) in navlist"
|
||||
:class="{ 'nav-active': activeIndex == index }" @click="navClick(index)">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
<el-scrollbar style="margin-left:0px ;margin-top:10px ;" height="calc(77vh)">
|
||||
<el-tree :data="treeData" :props="defaultprops" @node-click="handleNodeClick" default-expand-all
|
||||
:current-node-key="currentNodeKey" node-key="bayId">
|
||||
<template #default="{ node }">
|
||||
<span>{{ node.data.name }}</span>
|
||||
<span>{{ node.label }}</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="videomonitor_right">
|
||||
<div class="videomonitor_right_top">
|
||||
<div class="stationboard-box-title">
|
||||
<img src="@/assets/navigation/ty_bq.png" />
|
||||
<div class="imgname">声纹装置信息 <span style="color:#00ffff ;">(在线)</span> </div>
|
||||
</div>
|
||||
<!-- <img src="@/assets/tank/line2.png" alt=""> -->
|
||||
<div class="top_table" v-if="voiceprint_one">
|
||||
<div class="table_one">
|
||||
<div class="table_one_left">设备编码</div>
|
||||
<div class="table_one_right">{{ voiceprint_one.patroldeviceCode }}</div>
|
||||
</div>
|
||||
<div class="table_one" style="border-left:0px;">
|
||||
<div class="table_one_left">设备名称</div>
|
||||
<div class="table_one_right">{{ voiceprint_one.patroldeviceName }}</div>
|
||||
</div>
|
||||
<div class="table_one">
|
||||
<div class="table_one_left">设备型号</div>
|
||||
<div class="table_one_right">{{ voiceprint_one.deviceModel }}</div>
|
||||
</div>
|
||||
<div class="table_one" style="border-left:0px;">
|
||||
<div class="table_one_left">安装位置</div>
|
||||
<div class="table_one_right">{{ voiceprint_one.place }}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table_one" style="border-bottom: 1px solid #005ba9;">
|
||||
<div class="table_one_left">以太网IP地址</div>
|
||||
<div class="table_one_right">{{ voiceprint_one.ipaddr }}</div>
|
||||
</div>
|
||||
<div class="table_one" style="border-bottom: 1px solid #005ba9; border-left:0px;">
|
||||
<div class="table_one_left">实物ID</div>
|
||||
<div class="table_one_right">{{ voiceprint_one.materialId }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="videomonitor_right_bottom">
|
||||
<div class="stationboard-box-title">
|
||||
<img src="@/assets/navigation/ty_bq.png" />
|
||||
<div class="imgname">声纹装置信息 <span style="color:#00ffff ;">(在线)</span> </div>
|
||||
</div>
|
||||
<img src="@/assets/tank/line2.png" alt="">
|
||||
<div class="bottom_table">
|
||||
<div class="screenHomepage">
|
||||
<el-date-picker class="screenHomepage" popper-class="elDatePicker" @change=""
|
||||
style="width: 300px; margin-right: 10px;" v-model="tableData" type="daterange"
|
||||
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD" format="YYYY-MM-DD" />
|
||||
<el-button class="searchButton" @click="getdata()">搜索</el-button>
|
||||
<el-input v-model="minLong" clearable placeholder="录制时长"
|
||||
style="margin-left:30px ;width: 180px;">
|
||||
<template #append>
|
||||
s
|
||||
</template>
|
||||
</el-input>
|
||||
<el-button class="searchButton" @click="recording()"
|
||||
style="margin-left: 5px;">录制</el-button>
|
||||
</div>
|
||||
<el-table :data="environment_data" :row-class-name="tableRowClassName" class="PatrolMonitoring"
|
||||
v-loading="treeloading" element-loading-background="rgb(11, 40, 34)" highlight-current-row
|
||||
style="width: 100%;margin:auto;position: relative;margin-top: 15px; height:calc(45vh); overflow: auto "
|
||||
:header-cell-style="{ background: '#002b6a', color: '#B5D7FF', height: '50px' }">
|
||||
<el-table-column type="index" label="序号" width="80px" align="center" />
|
||||
<el-table-column property="fileName" label="文件名称" align="center" />
|
||||
<el-table-column property="duration" label="时长" align="center">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.duration }}s</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="patroldeviceName" label="监测设备" align="center">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column property="date" label="录制时间" align="center" />
|
||||
<el-table-column property="name" label="操作" align="center" width="80px">
|
||||
<template #default="scope">
|
||||
<el-button class="searchButton" @click="open(scope.row)"
|
||||
style="width:40px;height:24px;">播放</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="width:100%;display:flex;align-items:center;margin-top:10px;">
|
||||
<Page style="margin:0 auto ;" :total="total" v-model:size="params.size" :jumper="'hide'"
|
||||
v-model:current="params.current" @pagination="getdata()"></Page>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Eldialog v-if="dialogVisible" :title="'文件播放'" :zIndex="2000" :width="'80%'" @before-close="handleClose">
|
||||
<template v-slot:PopFrameContent>
|
||||
<wavEcharts :fileUrl="url + '/playAudioFile?filename=' + encodeURI(dataOpen.fileName)" />
|
||||
<!-- <audio style="width: 100%;" :src="url + '/playAudioFile?filename=' + encodeURI(dataOpen.fileName)"
|
||||
controls>
|
||||
</audio> -->
|
||||
</template>
|
||||
</Eldialog>
|
||||
<!-- <el-dialog v-model="dialogVisible" :close-on-click-modal="false" :before-close="handleClose" :title="'文件播放'"
|
||||
append-to-body width="800px" draggable class="monitor-dialog">
|
||||
<audio style="width: 100%;" :src="url + '/playAudioFile?filename=' + encodeURI(dataOpen.fileName)"
|
||||
controls>
|
||||
</audio>
|
||||
</el-dialog> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
//轮训弹窗设置
|
||||
|
||||
|
||||
.imgbg {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.videomonitor-box {
|
||||
position: relative;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
padding: 8px;
|
||||
padding-bottom: 0;
|
||||
height: calc(92vh);
|
||||
|
||||
.telescopicidsbgcolor {
|
||||
background: rgb(7, 162, 110);
|
||||
}
|
||||
|
||||
.telescopicidsbgcolor:hover {
|
||||
background: linear-gradient(to left, #b1b1b1, #ebebeb, #b1b1b1) !important;
|
||||
|
||||
}
|
||||
|
||||
.videomonitor-left {
|
||||
width: 261px;
|
||||
min-width: 261px;
|
||||
height: calc(100vh - 90px);
|
||||
// border: 1px solid rgba(0, 249, 162, 0.2);
|
||||
// background: rgba(17, 52, 44, 0.9);
|
||||
background: url(@/assets/navigation/ty_260x988.png);
|
||||
background-size: 100% 100%;
|
||||
|
||||
.nav-box {
|
||||
padding-top: 10px;
|
||||
padding-left: 14px;
|
||||
width: 250px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.nav-list {
|
||||
width: 65px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
border: 1px solid rgba(0, 255, 255, 0.3);
|
||||
font-family: 'MicrosoftYaHei Regular', 'MicrosoftYaHei';
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-size: 14px;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.nav-active {
|
||||
color: rgb(0, 255, 255);
|
||||
border: 1px solid rgb(0, 255, 255);
|
||||
background: rgba(0, 255, 255, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.el-tree {
|
||||
background: transparent;
|
||||
color: #ffffff;
|
||||
--el-tree-node-hover-bg-color: transparent;
|
||||
--el-tree-text-color: rgb(0, 249, 162, 0.5);
|
||||
// --el-tree-expand-icon-color: var(--el-text-color-placeholder);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.videomonitor_right {
|
||||
width: 100%;
|
||||
height: calc(90vh);
|
||||
margin-left: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.videomonitor_right_top {
|
||||
width: 100%;
|
||||
height: 240px;
|
||||
// border: 1px solid red;
|
||||
background: url(@/assets/navigation/sbjc_485.png);
|
||||
background-size: 100% 100%;
|
||||
|
||||
.top_table {
|
||||
width: 100%;
|
||||
padding: 25px 20px 0px 20px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.table_one {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 44px;
|
||||
border: 1px solid #005ba9;
|
||||
border-bottom: 0px;
|
||||
font-size: 14px;
|
||||
|
||||
.table_one_left {
|
||||
width: 30%;
|
||||
height: 44px;
|
||||
color: rgba(255, 255, 255, 0.781);
|
||||
text-align: left;
|
||||
font-family: 'Arial Normal', 'Arial';
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
border-right: 1px solid #005ba9;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.table_one_right {
|
||||
width: 70%;
|
||||
height: 44px;
|
||||
color: #fff;
|
||||
text-align: left;
|
||||
font-family: 'Arial Normal', 'Arial';
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.videomonitor_right_bottom {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
// height: 450px;
|
||||
background: url(@/assets/navigation/sbjc_485.png);
|
||||
background-size: 100% 100%;
|
||||
margin-top: 28px;
|
||||
|
||||
.bottom_table {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.stationboard-box-title {
|
||||
font-family: '阿里妈妈数黑体 Bold', '阿里妈妈数黑体';
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-size: 16px;
|
||||
color: #ffffff;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.imgname {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.titleline {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.Camera-buttons-box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.Camera-img {
|
||||
width: 100%;
|
||||
height: calc(100vh - 140px);
|
||||
border: 2px solid #323030;
|
||||
}
|
||||
|
||||
.Jessibuca-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.Camera-img4 {
|
||||
width: 50%;
|
||||
height: 50%;
|
||||
// border: 2px solid transparent;
|
||||
border: 2px solid #323030;
|
||||
}
|
||||
|
||||
.Camera-img9 {
|
||||
width: 33.33%;
|
||||
height: 33.33%;
|
||||
border: 2px solid #323030;
|
||||
|
||||
}
|
||||
|
||||
.Camera-img16 {
|
||||
width: 25%;
|
||||
height: 25%;
|
||||
border: 2px solid #323030;
|
||||
|
||||
}
|
||||
|
||||
.CameraActive {
|
||||
border: 2px solid rgb(7, 162, 110);
|
||||
}
|
||||
}
|
||||
|
||||
.videomonitor-righthide {
|
||||
width: 20px;
|
||||
min-width: 20px;
|
||||
height: calc(100vh - 90px);
|
||||
cursor: pointer;
|
||||
// background: rgb(0, 255, 170,0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.videomonitor-righthide:hover {
|
||||
// height: rgb(0, 255, 170);
|
||||
}
|
||||
|
||||
.videomonitor-right {
|
||||
position: relative;
|
||||
width: 307px;
|
||||
min-width: 307px;
|
||||
height: calc(100vh - 90px);
|
||||
// border: 1px solid rgba(0, 249, 162, 0.2);
|
||||
// background: rgba(17, 52, 44, 0.9);
|
||||
background: url(@/assets/monitorsystem/spjk_ytbj.png) no-repeat center center;
|
||||
background-size: 100% 100%;
|
||||
|
||||
:deep(img) {
|
||||
pointer-events: none;
|
||||
-webkit-touch-callout: none;
|
||||
/*系统默认菜单被禁用*/
|
||||
-webkit-user-select: none;
|
||||
/*webkit浏览器*/
|
||||
-khtml-user-select: none;
|
||||
/*早期浏览器*/
|
||||
-moz-user-select: none;
|
||||
/*火狐*/
|
||||
-ms-user-select: none;
|
||||
/*IE10*/
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.Camera-left-buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
width: 156px;
|
||||
height: 156px;
|
||||
margin-right: 10px;
|
||||
|
||||
.Camera-left-input {
|
||||
width: 130px;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.Camera-left-button {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
// background-color: rgba(53, 222, 176,0.4);
|
||||
border: 1px solid rgba(0, 249, 162, 1);
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
|
||||
.img {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.Camera-left-button:hover {
|
||||
background-color: rgba(33, 191, 149, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.Camera-right-buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
width: 102px;
|
||||
height: 156px;
|
||||
|
||||
.buttonurl-box {
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
// background-color: rgba(53, 222, 176,0.4);
|
||||
border: 1px solid rgba(0, 249, 162, 1);
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
|
||||
.buttonurl-imgbox {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.buttonurl-imgbox:hover {
|
||||
background-color: rgba(33, 191, 149, 0.2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Camera-operate-buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
border: 1px solid rgb(7, 162, 110);
|
||||
cursor: pointer;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.Camera-operate-buttons:hover {
|
||||
background-color: rgba(33, 191, 149, 0.2);
|
||||
}
|
||||
|
||||
.informationtitle {
|
||||
width: 100px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
border: 1px solid rgba(0, 249, 162, 0.3);
|
||||
border-right: 0;
|
||||
padding-left: 10px;
|
||||
font-size: 14px;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
text-align: left;
|
||||
|
||||
}
|
||||
|
||||
.informationcontent {
|
||||
width: 165px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
border: 1px solid rgba(0, 249, 162, 0.3);
|
||||
padding-left: 10px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
/*内容超出后隐藏*/
|
||||
text-overflow: ellipsis;
|
||||
/* 超出内容显示为省略号*/
|
||||
white-space: nowrap;
|
||||
/*文本不进行换行*/
|
||||
}
|
||||
|
||||
.informationtop0 {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
:deep(.el-input-group__append) {
|
||||
background-color: #00ffff00 !important;
|
||||
}
|
||||
</style>
|
@ -375,9 +375,9 @@ const tableRowClassName = ({
|
||||
<template #default="scope">
|
||||
<span
|
||||
style="display: flex;display: -webkit-flex;justify-content: space-around; -webkit-justify-content: space-around; ">
|
||||
<img src="@/assets/tableicon/xg.png" title="修改"
|
||||
<img src="@/assets/newimg/ht_xg.png" title="修改"
|
||||
style="cursor: pointer;" @click="editclick(scope.row)">
|
||||
<img src="@/assets/tableicon/sc.png" title="删除"
|
||||
<img src="@/assets/newimg/ht_sc.png" title="删除"
|
||||
style="cursor: pointer;" @click="delclick(scope.row)">
|
||||
</span>
|
||||
</template>
|
||||
|
@ -488,9 +488,9 @@ const tableRowClassName = ({
|
||||
<template #default="scope">
|
||||
<span
|
||||
style="display: flex;display: -webkit-flex;justify-content: space-around; -webkit-justify-content: space-around; ">
|
||||
<img src="@/assets/navigation/ht_xg.png" title="修改" v-hasPerm="['update:devicesignal']"
|
||||
<img src="@/assets/newimg/ht_xg.png" title="修改" v-hasPerm="['update:devicesignal']"
|
||||
style="cursor: pointer;" @click="editclick(scope.row)">
|
||||
<img src="@/assets/navigation/ht_sc.png" title="删除" v-hasPerm="['del:devicesignal']"
|
||||
<img src="@/assets/newimg/ht_sc.png" title="删除" v-hasPerm="['del:devicesignal']"
|
||||
style="cursor: pointer;" @click="delclick(scope.row)">
|
||||
</span>
|
||||
</template>
|
||||
@ -514,7 +514,7 @@ const tableRowClassName = ({
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="width: 50%;">
|
||||
<el-form-item label="告警等级">
|
||||
<el-form-item label="告警等级" prop="alarmLevel">
|
||||
<el-radio-group v-model="alarmform.alarmLevel">
|
||||
<el-radio v-for="(levelitem, levelindex) in leveloptions" :key="levelindex"
|
||||
:value="levelitem.itemcode" :label="levelitem.itemcode">{{ levelitem.dictname }}</el-radio>
|
||||
|
@ -382,11 +382,11 @@ const tableRowClassName = ({
|
||||
<template #default="scope">
|
||||
<span
|
||||
style="display: flex;display: -webkit-flex;justify-content: space-around; -webkit-justify-content: space-around; ">
|
||||
<img src="@/assets/tableicon/xg.png" v-hasPerm="['update:devicesignal']" title="修改"
|
||||
<img src="@/assets/newimg/ht_xg.png" v-hasPerm="['update:devicesignal']" title="修改"
|
||||
style="cursor: pointer;" @click="editclick(scope.row)">
|
||||
<img src="@/assets/tableicon/gjsz.png" title="告警设置" style="cursor: pointer;"
|
||||
<img src="@/assets/newimg/gjsz.png" title="告警设置" style="cursor: pointer;"
|
||||
@click="setclick(scope.row)">
|
||||
<img src="@/assets/tableicon/sc.png" v-hasPerm="['del:devicesignal']" title="删除"
|
||||
<img src="@/assets/newimg/ht_sc.png" v-hasPerm="['del:devicesignal']" title="删除"
|
||||
style="cursor: pointer;" @click="delclick(scope.row)">
|
||||
</span>
|
||||
</template>
|
||||
|
@ -360,15 +360,15 @@ const tableRowClassName = ({
|
||||
<template #default="scope">
|
||||
<span
|
||||
style="display: flex;display: -webkit-flex;justify-content: space-around; -webkit-justify-content: space-around; ">
|
||||
<img src="@/assets/tableicon/xg.png" title="修改"
|
||||
<img src="@/assets/newimg/ht_xg.png" title="修改"
|
||||
style="cursor: pointer;" @click="editclick(scope.row)">
|
||||
<img v-if="scope.row.status === '02'"
|
||||
src="@/assets/tableicon/lj.png" title="连接" style="cursor: pointer;"
|
||||
src="@/assets/newimg/lj.png" title="连接" style="cursor: pointer;"
|
||||
@click="editstatus(scope.row, '01')">
|
||||
<img v-if="scope.row.status === '02'"
|
||||
src="@/assets/tableicon/ty.png" title="停用" style="cursor: pointer;"
|
||||
src="@/assets/newimg/ty.png" title="停用" style="cursor: pointer;"
|
||||
@click="editstatus(scope.row, '00')">
|
||||
<img src="@/assets/tableicon/sc.png" title="删除"
|
||||
<img src="@/assets/newimg/ht_sc.png" title="删除"
|
||||
style="cursor: pointer;" @click="delclick(scope.row)">
|
||||
</span>
|
||||
</template>
|
||||
|
@ -22,6 +22,9 @@ import JessibucaPlayer from '@/components/jessibuca/index1.vue'
|
||||
import { downloadFile } from '@/utils/index';
|
||||
import { exportPatrolDeviceList } from "@/api/robot";
|
||||
import Eldialog from '@/components/seccmsdialog/eldialog.vue';
|
||||
import {
|
||||
getArea,
|
||||
} from "@/api/monitordevice";
|
||||
//左侧树形控件
|
||||
interface Tree {
|
||||
[x: string]: any;
|
||||
@ -52,6 +55,7 @@ function getSelect() {
|
||||
stationId.value = res.data[0].stationId
|
||||
stationName.value = res.data[0].stationName
|
||||
stationCode.value = res.data[0].stationCode
|
||||
GetArea()
|
||||
treeloading.value = false
|
||||
loading.value = true
|
||||
nextTick(() => {
|
||||
@ -70,6 +74,7 @@ function handleNodeClick(data: Tree, node: any) {
|
||||
stationId.value = data.stationId
|
||||
stationName.value = data.stationName
|
||||
stationCode.value = data.stationCode
|
||||
GetArea()
|
||||
loading.value = true
|
||||
getData()
|
||||
disabled.value = false
|
||||
@ -261,11 +266,14 @@ const info: any = ref({
|
||||
materialId: '',
|
||||
internationalId: '',
|
||||
stationName: '',
|
||||
stationCode: ''
|
||||
stationCode: '',
|
||||
});
|
||||
|
||||
//rules - 新增
|
||||
const rules = ref({
|
||||
areaId: [
|
||||
{ required: true, message: '请输入设备编码', trigger: 'blur' },
|
||||
],
|
||||
patroldeviceCode: [
|
||||
{ required: true, message: '请输入设备编码', trigger: 'blur' },
|
||||
{ validator: stringlength1, trigger: 'blur' }
|
||||
@ -375,7 +383,13 @@ function confirmClick(formEl: any) {
|
||||
info.value.stationId = stationId.value
|
||||
info.value.stationName = stationName.value
|
||||
info.value.stationCode = stationCode.value
|
||||
|
||||
if (info.value.areaId != '') {
|
||||
areaList.value.forEach((element: any) => {
|
||||
if (element.areaId == info.value.areaId) {
|
||||
info.value.areaName = element.areaName
|
||||
}
|
||||
});
|
||||
}
|
||||
if (info.value.patroldeviceId) {
|
||||
editPosition(info.value).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
@ -542,6 +556,15 @@ function currency(list: any, itemcode: any) {
|
||||
})
|
||||
return dictname
|
||||
}
|
||||
const areaList: any = ref([])
|
||||
function GetArea() {
|
||||
const parmas = {
|
||||
stationCode: stationCode.value
|
||||
}
|
||||
getArea(parmas).then((res: any) => {
|
||||
areaList.value = res.data
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -555,66 +578,74 @@ function currency(list: any, itemcode: any) {
|
||||
<el-form ref="infoForm" :model="info" label-width="90px"
|
||||
style="display: flex; flex-wrap: wrap;margin: 5px;" :rules="rules">
|
||||
<el-form-item label="设备编码" style="width:50%" prop="patroldeviceCode">
|
||||
<el-input v-model="info.patroldeviceCode" style="width: 90%;margin-left: 8px;"
|
||||
<el-input v-model="info.patroldeviceCode" style="width: 100%;margin-left: 8px;"
|
||||
placeholder="请输入设备编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" style="width:50%" prop="patroldeviceName">
|
||||
<el-input v-model="info.patroldeviceName" style="width: 90%;margin-left: 8px;"
|
||||
<el-input v-model="info.patroldeviceName" style="width: 100%;margin-left: 8px;"
|
||||
placeholder="请输入设备名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域" style="width:50%" prop="areaId">
|
||||
<el-select v-model="info.areaId" placeholder="请选择区域"
|
||||
style="width: 100%;">
|
||||
<el-option v-for="item in areaList" :key="item.areaId" :label="item.areaName"
|
||||
:value="item.areaId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备型号" style="width:50%" prop="deviceModel">
|
||||
<el-input v-model="info.deviceModel" style="width: 90%;margin-left: 8px;"
|
||||
<el-input v-model="info.deviceModel" style="width: 100%;margin-left: 8px;"
|
||||
placeholder="请输入设备型号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用单位" style="width:50%">
|
||||
<el-input v-model="info.useUnit" style="width: 90%;margin-left: 8px;"
|
||||
<el-input v-model="info.useUnit" style="width: 100%;margin-left: 8px;"
|
||||
placeholder="请输入使用单位"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备来源" style="width:50%">
|
||||
<el-input v-model="info.deviceSource" style="width: 90%;margin-left: 8px;"
|
||||
<el-input v-model="info.deviceSource" style="width: 100%;margin-left: 8px;"
|
||||
placeholder="请输入设备来源"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期" style="width:50%">
|
||||
<div class="block" style="width: 92%;">
|
||||
<div class="block" style="width: 100%;">
|
||||
<el-date-picker v-model="info.productionDate" type="date" placeholder="请选择"
|
||||
value-format="YYYY-MM-DD" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="出厂编号" style="width:50%">
|
||||
<el-input v-model="info.productionCode" style="width: 90%;margin-left: 8px;"
|
||||
<el-input v-model="info.productionCode" style="width: 100%;margin-left: 8px;"
|
||||
placeholder="请输入出厂编号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产厂家" style="width:50%">
|
||||
<el-select v-model="info.manufacturer" placeholder="请选择生产厂家" style="width:92%;">
|
||||
<el-select v-model="info.manufacturer" placeholder="请选择生产厂家" style="width:100%;">
|
||||
<el-option v-for="item in manufacturerList" :key="item.id" :label="item.dictname"
|
||||
:value="item.itemcode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="安装位置" style="width:50%">
|
||||
<el-input v-model="info.place" style="width: 90%;margin-left: 8px;"
|
||||
<el-input v-model="info.place" style="width: 100%;margin-left: 8px;"
|
||||
placeholder="请输入安装位置"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="以太网IP地址" style="width:50%" prop="ipaddr">
|
||||
<el-input v-model="info.ipaddr" style="width: 90%;margin-left: 8px;"
|
||||
<el-input v-model="info.ipaddr" style="width: 100%;margin-left: 8px;"
|
||||
placeholder="请输入以太网IP地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="以太网Mac地址" style="width:50%" prop="macaddr">
|
||||
<el-input v-model="info.macaddr" style="width: 90%;margin-left: 8px;"
|
||||
<el-input v-model="info.macaddr" style="width: 100%;margin-left: 8px;"
|
||||
placeholder="以太网Mac地址"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="实物id" style="width:50%;" prop="materialId">
|
||||
<el-input v-model="info.materialId" style="width: 90%;margin-left: 8px;"
|
||||
<el-input v-model="info.materialId" style="width: 100%;margin-left: 8px;"
|
||||
placeholder="请输入实物id"></el-input>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="国际编码" style="width:50%;" prop="internationalId">
|
||||
<el-input v-model="info.internationalId" style="width: 90%;margin-left: 8px;"
|
||||
<el-input v-model="info.internationalId" style="width: 100%;margin-left: 8px;"
|
||||
placeholder="请输入国际编码"></el-input>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="备注信息" style="width:100%;display:flex;align-items:flex-start !important;">
|
||||
<el-form-item label="备注信息"
|
||||
style="width:100%;display:flex;align-items:flex-start !important;">
|
||||
<el-input type="textarea" v-model="info.custom1" :autosize="{ minRows: 2, maxRows: 8 }"
|
||||
style="width: 95% ;margin-left: 8px;" placeholder="请输入备注信息"></el-input>
|
||||
style="width: 100% ;margin-left: 8px;" placeholder="请输入备注信息"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -636,9 +667,11 @@ function currency(list: any, itemcode: any) {
|
||||
<div class="title" style="font-size: 14px;">分类导航</div>
|
||||
</div>
|
||||
<el-scrollbar height="calc(84vh)">
|
||||
<el-tree ref="treeRef" :class="useAppStore().size === 'default' ? 'silderLeft-large' : 'silderLeft-default'"
|
||||
<el-tree ref="treeRef"
|
||||
:class="useAppStore().size === 'default' ? 'silderLeft-large' : 'silderLeft-default'"
|
||||
node-key="stationId" :data="treedata" :current-node-key="currentNodeKey" :highlight-current="true"
|
||||
:props="defaultProps" v-loading="treeloading" @node-click="handleNodeClick" style="padding:10px 15px 0px;">
|
||||
:props="defaultProps" v-loading="treeloading" @node-click="handleNodeClick"
|
||||
style="padding:10px 15px 0px;">
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
<div class="moveBtn" v-move>
|
||||
@ -654,7 +687,8 @@ function currency(list: any, itemcode: any) {
|
||||
@keyup.enter="getData()" style="margin-right:15px ;width: 180px;" />
|
||||
<el-input v-model="deviceModel" clearable placeholder="请输入设备型号" @clear="getData()"
|
||||
@keyup.enter="getData()" style="margin-right:15px ;width: 180px;" />
|
||||
<el-select v-model="manufacturer" placeholder="请选择生产厂家" style="margin-right: 15px; " @change="getData">
|
||||
<el-select v-model="manufacturer" placeholder="请选择生产厂家" style="margin-right: 15px; "
|
||||
@change="getData">
|
||||
<el-option v-for="item in manufacturerList" :key="item.id" :label="item.dictname"
|
||||
:value="item.itemcode" />
|
||||
</el-select>
|
||||
@ -670,20 +704,21 @@ function currency(list: any, itemcode: any) {
|
||||
:disabled="treedata.length == 0 || disabled"> 新增</el-button>
|
||||
<!-- <el-button type="primary" @click="addClick"><img style="margin-right:5px;"
|
||||
src="@/assets/MenuIcon/u429.png" alt=""> 导入</el-button> -->
|
||||
<el-button class="searchButton" v-hasPerm="['del:patroldevice']" @click="delClick" :disabled="deviceInfos.length == 0"
|
||||
:type="deviceInfos.length > 0 ? 'primary' : ''"> 删除</el-button>
|
||||
<el-button class="searchButton" v-hasPerm="['del:patroldevice']" @click="delClick"
|
||||
:disabled="deviceInfos.length == 0" :type="deviceInfos.length > 0 ? 'primary' : ''">
|
||||
删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="draggable">
|
||||
<el-table v-loading="loading" :data="tableData" style="width: 100%;height: calc(75vh);
|
||||
overflow: auto;margin-bottom: 15px;" row-key="id"
|
||||
@selection-change="handleSelectionChange" default-expand-all :row-class-name="tableRowClassName"
|
||||
:header-cell-style="{ background: '#002b6a', color: '#B5D7FF', height: '50px'}">
|
||||
overflow: auto;margin-bottom: 15px;" row-key="id" @selection-change="handleSelectionChange"
|
||||
default-expand-all :row-class-name="tableRowClassName"
|
||||
:header-cell-style="{ background: '#002b6a', color: '#B5D7FF', height: '50px' }">
|
||||
<el-table-column type="selection" width="30" align="center" :selectable="checkSelectable" />
|
||||
<el-table-column type="index" label="序号" width="50px" align="center" />
|
||||
<el-table-column label="设备编码" prop="patroldeviceCode"></el-table-column>
|
||||
<el-table-column label="设备名称" prop="patroldeviceName"></el-table-column>
|
||||
<el-table-column label="设备型号" prop="deviceModel" ></el-table-column>
|
||||
<el-table-column label="设备型号" prop="deviceModel"></el-table-column>
|
||||
<el-table-column label="设备来源" prop="deviceSource" width="110"></el-table-column>
|
||||
<el-table-column label="生产厂家" prop="manufacturer" width="110">
|
||||
<template #default="scope">
|
||||
@ -694,7 +729,8 @@ function currency(list: any, itemcode: any) {
|
||||
<el-table-column label="实时状态" width="100" prop="datastatus">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.datastatus == 1" style="color:rgb(0, 204, 102)"><img
|
||||
src="@/assets/newimg/u387.png" alt="" style="display: inline-block; margin: 0px 5px; ">
|
||||
src="@/assets/newimg/u387.png" alt=""
|
||||
style="display: inline-block; margin: 0px 5px; ">
|
||||
在线</span>
|
||||
<span v-else style="color:#F24444"> <img src="@/assets/MenuIcon/u499.png" alt=""
|
||||
style="display: inline-block; margin: 0px 5px; ">离线</span>
|
||||
@ -713,8 +749,8 @@ function currency(list: any, itemcode: any) {
|
||||
<template #default="scope">
|
||||
<span
|
||||
style="display: flex;display: -webkit-flex; justify-content: space-around;-webkit-justify-content: space-around; ">
|
||||
<img v-hasPerm="['update:patroldevice']" src="@/assets/newimg/ht_xg.png" alt="" title="修改"
|
||||
@click="handleEdit(scope.row)" style="cursor: pointer;">
|
||||
<img v-hasPerm="['update:patroldevice']" src="@/assets/newimg/ht_xg.png" alt=""
|
||||
title="修改" @click="handleEdit(scope.row)" style="cursor: pointer;">
|
||||
<img v-hasPerm="['del:patroldevice']" src="@/assets/newimg/ht_sc.png" alt=""
|
||||
v-if="scope.row.datastatus == 0" title="删除" @click="handleDelete(scope.row)"
|
||||
style="cursor: pointer; ">
|
||||
@ -733,8 +769,8 @@ function currency(list: any, itemcode: any) {
|
||||
|
||||
|
||||
</el-dialog> -->
|
||||
<el-dialog v-model="dialogMonitor" :close-on-click-modal="false" :before-close="handleClose" :title="MonitorTile"
|
||||
append-to-body width="855px" draggable class="monitor-dialog">
|
||||
<el-dialog v-model="dialogMonitor" :close-on-click-modal="false" :before-close="handleClose"
|
||||
:title="MonitorTile" append-to-body width="855px" draggable class="monitor-dialog">
|
||||
<div class="Camera">
|
||||
<div class="Camera-left">
|
||||
<div class="Camera-img">
|
||||
@ -783,7 +819,8 @@ function currency(list: any, itemcode: any) {
|
||||
<div style="width: 50px;">预置位</div>
|
||||
<el-input type="number" class="Camera-number-input" style="width:100px"
|
||||
v-model="beforehandPosition" placeholder="" />
|
||||
<el-button class="searchButton" style="margin-left:10px" @click="setUpClick">设置</el-button>
|
||||
<el-button class="searchButton" style="margin-left:10px"
|
||||
@click="setUpClick">设置</el-button>
|
||||
<el-button class="searchButton" @click="delPositionClick">删除</el-button>
|
||||
<el-button class="searchButton" type="primary" @click="callClick">调用</el-button>
|
||||
</div>
|
||||
@ -1150,6 +1187,7 @@ function currency(list: any, itemcode: any) {
|
||||
position: relative;
|
||||
background: url(@/assets/navigation/ty_260x988.png);
|
||||
background-size: 100% 100%;
|
||||
|
||||
// padding:0px 10px;
|
||||
&:hover {
|
||||
.moveBtn {
|
||||
@ -1185,5 +1223,3 @@ function currency(list: any, itemcode: any) {
|
||||
--el-select-input-focus-border-color: #009bff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user