web
5 天以前 8f50c8203c8df64dd0a566b228bae7f69156e109
src/views/screen/flow/graphic/index.vue
@@ -1,16 +1,13 @@
<script setup>
import {ref} from "vue";
import {onMounted, ref} from "vue";
import {getUserType} from '@/utils/auth.js'
import html2canvas from "html2canvas";
import {getFlowPointList} from '@/api/screen/index'
const menuList = ref([])
const userType = ref(getUserType())
const monitorRef = ref()
const searchVal = ref('')
const selectType = ref(1);
const typeOption = ref([
    { label: '水电站流量监测点', value: 1 },
    { label: '新扎口流量监测点', value: 2 },
])
const video = ref()
// 全屏操作
@@ -30,6 +27,22 @@
    }
}
const handleSearch = async () => {
}
// 获取监控点
const getMoitorList = () => {
    getFlowPointList().then(res => {
        menuList.value = res.data
    })
}
onMounted(() => {
    getMoitorList()
})
</script>
<template>
@@ -37,39 +50,28 @@
        <div class="graphic-menu">
            <div class="menu-t">监控点列表</div>
            <el-menu class="el-menu">
                <el-sub-menu index="1">
                    <template #title>
                        <span>可移动监测点</span>
                <template v-for="(item, index) in menuList" :key="index+1">
                    <template v-if="item?.childrenList?.length === 0">
                        <el-menu-item :index="item.id">{{ item.pointName }}</el-menu-item>
                    </template>
                    <el-menu-item index="1-1">水电站流量监测点</el-menu-item>
                </el-sub-menu>
                <el-sub-menu index="2">
                    <template #title>
                        <span>固定位监测点</span>
                    <template v-else>
                        <el-sub-menu :index="item.id">
                            <template #title>
                                <span>{{ item.pointName }}</span>
                            </template>
                            <el-menu-item v-for="(child, cidx) in item.childrenList" :key="cidx" :index="child.id">
                                {{ child.pointName }}
                            </el-menu-item>
                        </el-sub-menu>
                    </template>
                    <el-menu-item index="2-1">新扎口流量监测点</el-menu-item>
                </el-sub-menu>
                </template>
            </el-menu>
        </div>
        <div class="graphic-monitor">
            <div class="monitor-tool">
                <div class="tool-l">
                    <div class="name">监测点类型</div>
                    <el-select
                        v-model="selectType"
                        class="tool-select"
                        placeholder="Select"
                        style="width: 15rem"
                    >
                        <el-option
                            v-for="item in typeOption"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                        />
                    </el-select>
                    <el-input v-model="searchVal" style="width: 20rem" />
                    <el-button><el-icon><Search /></el-icon>搜索</el-button>
                    <el-input v-model="searchVal" style="width: 20rem" placeholder="请输入监测点名称" />
                    <el-button @click="handleSearch"><el-icon><Search /></el-icon>搜索</el-button>
                    <el-button style="margin-left: 0" v-if="userType === '1'"><el-icon><Plus /></el-icon>新增</el-button>
                </div>
                <div class="tool-r" @click="handleFullScreen">
@@ -212,7 +214,6 @@
        flex-shrink: 0;
        width: 80%;
        height: 100%;
        background: linear-gradient( 180deg, #91BDDB 0%, rgba(102, 102, 102, 0.5) 100%);
        .monitor-tool{
            width: 100%;
            height: 60px;
@@ -240,6 +241,7 @@
        }
        .monitor-box{
            height: calc(100% - 60px);
            background: linear-gradient(180deg, #91BDDB 0%, rgba(102, 102, 102, 0.5) 100%);
            .monitor-list{
                height: 100%;
                display: flex;
@@ -252,6 +254,7 @@
                    background: rgba(23,108,229,0.3);
                    border: 1px solid #176CE5;
                    padding: 20px;
                    border-radius: 8px;
                    .title{
                        height: 12%;
                        text-align: center;
@@ -262,6 +265,7 @@
                        width: 100%;
                        height: 60%;
                        background: url("@/assets/images/login_icon.png") no-repeat;
                        background-size: 100% 100%;
                    }
                    .info{
                        width: 100%;