You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
143 lines
3.3 KiB
143 lines
3.3 KiB
1 month ago
|
<template>
|
||
|
<div class="project-detail-wrapper">
|
||
1 month ago
|
<div class="header">
|
||
1 month ago
|
<div class="title">
|
||
|
<img :src="waterIcon" />
|
||
|
<span>{{ data.name }}</span>
|
||
|
</div>
|
||
1 month ago
|
<div class="btns">
|
||
|
<el-icon @click="handleClose">
|
||
|
<Close />
|
||
|
</el-icon>
|
||
|
</div>
|
||
|
</div>
|
||
1 month ago
|
<div class="content">
|
||
1 month ago
|
<el-tabs class="main-tabs" :tab-position="'left'" v-model="activeTab">
|
||
1 month ago
|
<el-tab-pane label="基础信息" name="1" lazy>
|
||
|
<BaseInfo ref="baseInfoRef" :resCode="resCode" @getResInfo="handleGetResInfo"></BaseInfo>
|
||
|
</el-tab-pane>
|
||
|
<el-tab-pane label="数据统计" name="2" lazy>
|
||
|
<DataStatistics ref="dataStatisticsRef" :resCode="resCode"></DataStatistics>
|
||
|
</el-tab-pane>
|
||
|
<el-tab-pane label="监测预警" name="5" lazy>
|
||
|
<MonitorWarning ref="monitorWarning" :resCode="resCode"></MonitorWarning>
|
||
|
</el-tab-pane>
|
||
|
<!-- <el-tab-pane label="视频分析" name="6" lazy>
|
||
|
<VideoAnalysis ref="videoAnalysis" :resCode="resCode"></VideoAnalysis>
|
||
|
</el-tab-pane> -->
|
||
|
</el-tabs>
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
<script setup lang="ts">
|
||
1 month ago
|
import { ref, watch, onMounted } from "vue";
|
||
1 month ago
|
import BaseInfo from "./components/BaseInfo.vue";
|
||
|
import DataStatistics from "./components/DataStatistics.vue";
|
||
|
import MonitorWarning from "./components/MonitorWarning.vue";
|
||
1 month ago
|
import { Close } from "@element-plus/icons-vue";
|
||
1 month ago
|
import RB from "@/assets/map/reservoir_big.png";
|
||
|
import RN from "@/assets/map/reservoir_normal.png";
|
||
|
import RS from "@/assets/map/reservoir_small.png";
|
||
|
|
||
1 month ago
|
// import VideoAnalysis from "./components/VideoAnalysis.vue";
|
||
|
const props = defineProps({
|
||
|
data: {
|
||
1 month ago
|
type: Object,
|
||
|
default: {},
|
||
1 month ago
|
},
|
||
|
});
|
||
|
const resCode = ref("");
|
||
|
defineOptions({
|
||
|
name: "ProjectDetail",
|
||
|
});
|
||
|
const emits = defineEmits(["getResInfo"]);
|
||
1 month ago
|
const waterIcon = ref(RN);
|
||
1 month ago
|
const activeTab = ref("1");
|
||
1 month ago
|
|
||
|
function setWaterIcon() {
|
||
|
switch (props.data.scale) {
|
||
|
case "1.0":
|
||
|
case "2.0":
|
||
|
waterIcon.value = RB;
|
||
|
break;
|
||
|
case "3.0":
|
||
|
waterIcon.value = RN;
|
||
|
break;
|
||
|
case "4.0":
|
||
|
case "5.0":
|
||
|
waterIcon.value = RS;
|
||
|
break;
|
||
|
default:
|
||
|
waterIcon.value = RN;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
1 month ago
|
function handleGetResInfo(data: any) {
|
||
|
emits("getResInfo", data);
|
||
|
}
|
||
1 month ago
|
|
||
|
function handleClose() {
|
||
1 month ago
|
window.$bus.$emit("close-reservoir-dialog");
|
||
1 month ago
|
}
|
||
1 month ago
|
watch(
|
||
|
() => props.data,
|
||
|
(val) => {
|
||
|
if (val) {
|
||
|
resCode.value = val.code;
|
||
|
}
|
||
|
},
|
||
|
{ immediate: true },
|
||
|
);
|
||
1 month ago
|
|
||
|
onMounted(() => {
|
||
|
setWaterIcon();
|
||
|
});
|
||
1 month ago
|
</script>
|
||
|
<style scoped lang="scss">
|
||
|
.project-detail-wrapper {
|
||
|
position: fixed;
|
||
|
top: 50%;
|
||
|
left: 50%;
|
||
1 month ago
|
width: 80%;
|
||
1 month ago
|
min-height: 600px;
|
||
|
max-height: 800px;
|
||
|
transform: translate(-50%, -50%);
|
||
|
border-radius: 4px;
|
||
|
background: #fff;
|
||
1 month ago
|
.header {
|
||
|
display: flex;
|
||
|
padding: 0 20px;
|
||
|
height: 42px;
|
||
|
color: #262626;
|
||
|
font-family: PingFang SC;
|
||
|
font-size: 16px;
|
||
|
font-weight: 500;
|
||
|
flex-direction: row;
|
||
|
align-items: center;
|
||
|
justify-content: space-between;
|
||
1 month ago
|
.title {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
img {
|
||
|
width: 16px;
|
||
|
height: 16px;
|
||
|
margin-right: 4px;
|
||
|
}
|
||
|
}
|
||
|
.btns {
|
||
|
cursor: pointer;
|
||
|
}
|
||
1 month ago
|
}
|
||
|
.content {
|
||
|
height: 748px;
|
||
|
:deep(.main-tabs) {
|
||
|
height: 100%;
|
||
|
.sy-tabs__content,
|
||
|
.sy-tab-pane {
|
||
|
height: 100%;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
1 month ago
|
}
|
||
|
</style>
|