Browse Source

fix: 放开视频,添加字典映射,修改数据监测默认展示页

feature-v1.0.0
panyuyi 1 month ago
parent
commit
287a6f3b58
  1. 2
      src/views/Main/Dike/components/DataStatistics.vue
  2. 9
      src/views/Main/Reservoir/components/BaseInfo.vue
  3. 2
      src/views/Main/Reservoir/components/DataStatistics.vue
  4. 34
      src/views/Main/Reservoir/components/VideoAnalysis.vue
  5. 15
      src/views/Main/Reservoir/index.vue
  6. 9
      src/views/Main/Sluice/components/BaseInfo.vue
  7. 2
      src/views/Main/Sluice/components/DataStatistics.vue
  8. 29
      src/views/Main/Sluice/components/VideoAnalysis.vue
  9. 10
      src/views/Main/Sluice/index.vue

2
src/views/Main/Dike/components/DataStatistics.vue

@ -94,7 +94,7 @@ const props = defineProps({
}, },
}); });
const cascaderOptions: any = ref([]); const cascaderOptions: any = ref([]);
const showType: any = ref("1"); const showType: any = ref("2");
const cascaderArr: any = ref([]); const cascaderArr: any = ref([]);
const dateArr: any = ref([]); const dateArr: any = ref([]);
const cascaderProps: any = { const cascaderProps: any = {

9
src/views/Main/Reservoir/components/BaseInfo.vue

@ -50,7 +50,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label> 归口管理部门 </template> <template #label> 归口管理部门 </template>
{{ form.admDep }} {{ departmentFormat(form.admDep) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label> 水库主管部门 </template> <template #label> 水库主管部门 </template>
@ -562,6 +562,10 @@ const props = defineProps({
type: Array<{ dictLabel: string; dictValue: string }>, type: Array<{ dictLabel: string; dictValue: string }>,
default: [], default: [],
}, },
departmentOptions: {
type: Array<{ dictLabel: string; dictValue: string }>,
default: [],
},
}); });
let myChart: any = null; let myChart: any = null;
let code: any = null; let code: any = null;
@ -740,6 +744,9 @@ function gradeFormat(key: string) {
function scaleFormat(key: string) { function scaleFormat(key: string) {
return getDictLabel(props.scaleOptions, key); return getDictLabel(props.scaleOptions, key);
} }
function departmentFormat(key: string) {
return getDictLabel(props.departmentOptions, key);
}
watch( watch(
() => props.resCode, () => props.resCode,

2
src/views/Main/Reservoir/components/DataStatistics.vue

@ -98,7 +98,7 @@ const props = defineProps({
}, },
}); });
const cascaderOptions: any = ref([]); const cascaderOptions: any = ref([]);
const showType: any = ref("1"); const showType: any = ref("2");
const cascaderArr: any = ref([]); const cascaderArr: any = ref([]);
const dateArr: any = ref([]); const dateArr: any = ref([]);
const cascaderProps: any = { const cascaderProps: any = {

34
src/views/Main/Reservoir/components/VideoAnalysis.vue

@ -1,14 +1,29 @@
<template> <template>
<div class="video-analysis"> <div class="video-analysis">
<div class="videoSelect"> <div class="videoSelect">
<el-select placeholder="请选择视频" v-model="activeVideo" size="small" style="width: 240px" @change="videoChange"> <el-select
<el-option v-for="item in videoList" :key="item" :label="item" :value="item" /> placeholder="请选择视频"
v-model="activeVideo"
size="small"
style="width: 240px"
@change="videoChange"
>
<el-option
v-for="item in videoList"
:key="item"
:label="item"
:value="item"
/>
</el-select> </el-select>
</div> </div>
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane label="实时视频" name="realTime"> <el-tab-pane label="实时视频" name="realTime">
<div class="videoBox"> <div class="videoBox">
<video style="width: 100%; height: 100%" :src="videoUrl" v-if="videoUrl"></video> <video
style="width: 100%; height: 100%"
:src="videoUrl"
v-if="videoUrl"
></video>
<div v-else class="videoNull"> <div v-else class="videoNull">
<div class="videoContent"> <div class="videoContent">
<img src="@/assets/image/videoNull.png" /> <img src="@/assets/image/videoNull.png" />
@ -40,8 +55,8 @@ onMounted(() => {
pageSize: 100, pageSize: 100,
resCode: props.resCode, resCode: props.resCode,
}).then((res) => { }).then((res) => {
if (res.data) { if (res) {
videoList.value = res.data.cameraIds; videoList.value = res.cameraIds;
} }
}); });
}); });
@ -50,14 +65,15 @@ function videoChange(val: any) {
getOperationPlay({ getOperationPlay({
cameraId: val, cameraId: val,
}).then((res) => { }).then((res) => {
if (res.data) { if (res) {
videoUrl.value = res.data.urlsMap.flvPlayUrl; videoUrl.value = res.urlsMap.flvPlayUrl;
} }
}); });
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.video-analysis { .video-analysis {
padding: 4px 10px;
.videoBox { .videoBox {
height: 558px; height: 558px;
video { video {
@ -87,8 +103,8 @@ function videoChange(val: any) {
.videoSelect { .videoSelect {
position: absolute; position: absolute;
z-index: 12; z-index: 12;
right: 0; right: 12px;
top: 5px; top: 1px;
} }
} }
</style> </style>

15
src/views/Main/Reservoir/index.vue

@ -21,6 +21,10 @@
<BaseInfo <BaseInfo
ref="baseInfoRef" ref="baseInfoRef"
:resCode="resCode" :resCode="resCode"
:gradeOptions="gradeOptions"
:projTypeOptions="projTypeOptions"
:scaleOptions="scaleOptions"
:departmentOptions="departmentOptions"
@getResInfo="handleGetResInfo" @getResInfo="handleGetResInfo"
></BaseInfo> ></BaseInfo>
</el-tab-pane> </el-tab-pane>
@ -36,10 +40,9 @@
:resCode="resCode" :resCode="resCode"
></MonitorWarning> ></MonitorWarning>
</el-tab-pane> </el-tab-pane>
<!-- <el-tab-pane label="视频分析" name="6" lazy> <el-tab-pane label="视频影像" name="6" lazy>
<VideoAnalysis ref="videoAnalysis" :resCode="resCode"></VideoAnalysis> <VideoAnalysis ref="videoAnalysis" :resCode="resCode"></VideoAnalysis>
</el-tab-pane> --> </el-tab-pane>
<el-tab-pane label="视频查看" name="6" disabled lazy> </el-tab-pane>
<el-tab-pane label="巡查养护" name="7" disabled lazy> </el-tab-pane> <el-tab-pane label="巡查养护" name="7" disabled lazy> </el-tab-pane>
<el-tab-pane label="动物防治" name="8" disabled lazy> </el-tab-pane> <el-tab-pane label="动物防治" name="8" disabled lazy> </el-tab-pane>
<el-tab-pane label="安全鉴定" name="9" disabled lazy> </el-tab-pane> <el-tab-pane label="安全鉴定" name="9" disabled lazy> </el-tab-pane>
@ -64,7 +67,7 @@ import RS from "@/assets/map/reservoir_small.png";
import { getDictLabel } from "@/utils/dictUtils"; import { getDictLabel } from "@/utils/dictUtils";
import { getDicts } from "@/api/common"; import { getDicts } from "@/api/common";
// import VideoAnalysis from "./components/VideoAnalysis.vue"; import VideoAnalysis from "./components/VideoAnalysis.vue";
const props = defineProps({ const props = defineProps({
data: { data: {
type: Object, type: Object,
@ -109,6 +112,7 @@ function handleClose() {
const gradeOptions = ref([]); const gradeOptions = ref([]);
const projTypeOptions = ref([]); const projTypeOptions = ref([]);
const scaleOptions = ref([]); const scaleOptions = ref([]);
const departmentOptions = ref([]);
function initDict() { function initDict() {
getDicts("reservoir_type").then((res) => { getDicts("reservoir_type").then((res) => {
projTypeOptions.value = res || []; projTypeOptions.value = res || [];
@ -119,6 +123,9 @@ function initDict() {
getDicts("engineering_scale").then((res) => { getDicts("engineering_scale").then((res) => {
scaleOptions.value = res || []; scaleOptions.value = res || [];
}); });
getDicts("centralized_management_department").then((res) => {
departmentOptions.value = res || [];
});
} }
function scaleFormat(key: string) { function scaleFormat(key: string) {

9
src/views/Main/Sluice/components/BaseInfo.vue

@ -92,7 +92,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label>归口管理部门</template> <template #label>归口管理部门</template>
{{ form.admDep }} {{ departmentFormat(form.admDep) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template #label>备注</template> <template #label>备注</template>
@ -213,6 +213,10 @@ const props = defineProps({
type: Array<{ dictLabel: string; dictValue: string }>, type: Array<{ dictLabel: string; dictValue: string }>,
default: [], default: [],
}, },
departmentOptions: {
type: Array<{ dictLabel: string; dictValue: string }>,
default: [],
},
}); });
let code: any = null; let code: any = null;
const activeName: any = ref("1"); const activeName: any = ref("1");
@ -277,6 +281,9 @@ function buildingLevelFormat(key: string) {
function seismicFormat(key: string) { function seismicFormat(key: string) {
return getDictLabel(props.seismicOptions, key); return getDictLabel(props.seismicOptions, key);
} }
function departmentFormat(key: string) {
return getDictLabel(props.departmentOptions, key);
}
watch( watch(
() => props.resCode, () => props.resCode,

2
src/views/Main/Sluice/components/DataStatistics.vue

@ -94,7 +94,7 @@ const props = defineProps({
}, },
}); });
const cascaderOptions: any = ref([]); const cascaderOptions: any = ref([]);
const showType: any = ref("1"); const showType: any = ref("2");
const cascaderArr: any = ref([]); const cascaderArr: any = ref([]);
const dateArr: any = ref([]); const dateArr: any = ref([]);
const cascaderProps: any = { const cascaderProps: any = {

29
src/views/Main/Sluice/components/VideoAnalysis.vue

@ -1,14 +1,29 @@
<template> <template>
<div class="video-analysis"> <div class="video-analysis">
<div class="videoSelect"> <div class="videoSelect">
<el-select placeholder="请选择视频" v-model="activeVideo" size="small" style="width: 240px" @change="videoChange"> <el-select
<el-option v-for="item in videoList" :key="item" :label="item" :value="item" /> placeholder="请选择视频"
v-model="activeVideo"
size="small"
style="width: 240px"
@change="videoChange"
>
<el-option
v-for="item in videoList"
:key="item"
:label="item"
:value="item"
/>
</el-select> </el-select>
</div> </div>
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane label="实时视频" name="realTime"> <el-tab-pane label="实时视频" name="realTime">
<div class="videoBox"> <div class="videoBox">
<video style="width: 100%; height: 100%" :src="videoUrl" v-if="videoUrl"></video> <video
style="width: 100%; height: 100%"
:src="videoUrl"
v-if="videoUrl"
></video>
<div v-else class="videoNull"> <div v-else class="videoNull">
<div class="videoContent"> <div class="videoContent">
<img src="@/assets/image/videoNull.png" /> <img src="@/assets/image/videoNull.png" />
@ -40,8 +55,8 @@ onMounted(() => {
pageSize: 100, pageSize: 100,
resCode: props.resCode, resCode: props.resCode,
}).then((res) => { }).then((res) => {
if (res.data) { if (res) {
videoList.value = res.data.cameraIds; videoList.value = res.cameraIds;
} }
}); });
}); });
@ -50,8 +65,8 @@ function videoChange(val: any) {
getOperationPlay({ getOperationPlay({
cameraId: val, cameraId: val,
}).then((res) => { }).then((res) => {
if (res.data) { if (res) {
videoUrl.value = res.data.urlsMap.flvPlayUrl; videoUrl.value = res.urlsMap.flvPlayUrl;
} }
}); });
} }

10
src/views/Main/Sluice/index.vue

@ -26,6 +26,7 @@
:scaleOptions="scaleOptions" :scaleOptions="scaleOptions"
:buildingLevelOptions="buildingLevelOptions" :buildingLevelOptions="buildingLevelOptions"
:seismicOptions="seismicOptions" :seismicOptions="seismicOptions"
:departmentOptions="departmentOptions"
@getResInfo="handleGetResInfo" @getResInfo="handleGetResInfo"
></BaseInfo> ></BaseInfo>
</el-tab-pane> </el-tab-pane>
@ -47,7 +48,9 @@
:resCode="resCode" :resCode="resCode"
></StatisticsAnalysis> ></StatisticsAnalysis>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="视频查看" name="6" disabled lazy> </el-tab-pane> <el-tab-pane label="视频查看" name="6" lazy disabled>
<!-- <VideoAnalysis></VideoAnalysis> -->
</el-tab-pane>
<el-tab-pane label="巡查养护" name="7" disabled lazy> </el-tab-pane> <el-tab-pane label="巡查养护" name="7" disabled lazy> </el-tab-pane>
<el-tab-pane label="动物防治" name="8" disabled lazy> </el-tab-pane> <el-tab-pane label="动物防治" name="8" disabled lazy> </el-tab-pane>
<el-tab-pane label="安全鉴定" name="9" disabled lazy> </el-tab-pane> <el-tab-pane label="安全鉴定" name="9" disabled lazy> </el-tab-pane>
@ -64,6 +67,7 @@ import BaseInfo from "./components/BaseInfo.vue";
import DataStatistics from "./components/DataStatistics.vue"; import DataStatistics from "./components/DataStatistics.vue";
import MonitorWarning from "./components/MonitorWarning.vue"; import MonitorWarning from "./components/MonitorWarning.vue";
import StatisticsAnalysis from "./components/StatisticsAnalysis.vue"; import StatisticsAnalysis from "./components/StatisticsAnalysis.vue";
// import VideoAnalysis from "./components/VideoAnalysis.vue";
import { Close } from "@element-plus/icons-vue"; import { Close } from "@element-plus/icons-vue";
import SB from "@/assets/map/sluice_big.png"; import SB from "@/assets/map/sluice_big.png";
import SM from "@/assets/map/sluice_middle.png"; import SM from "@/assets/map/sluice_middle.png";
@ -117,6 +121,7 @@ const projTypeOptions = ref([]);
const scaleOptions = ref([]); const scaleOptions = ref([]);
const buildingLevelOptions = ref([]); const buildingLevelOptions = ref([]);
const seismicOptions = ref([]); const seismicOptions = ref([]);
const departmentOptions = ref([]);
function initDict() { function initDict() {
getDicts("sluice_type").then((res) => { getDicts("sluice_type").then((res) => {
@ -134,6 +139,9 @@ function initDict() {
getDicts("design_seismic_intensity").then((res) => { getDicts("design_seismic_intensity").then((res) => {
seismicOptions.value = res || []; seismicOptions.value = res || [];
}); });
getDicts("centralized_management_department").then((res) => {
departmentOptions.value = res || [];
});
} }
function scaleFormat(key: string) { function scaleFormat(key: string) {

Loading…
Cancel
Save