web
6 天以前 e8acf56b807be105702321a0be2119963fa69e03
fix:修改水温监控参数
已修改4个文件
124 ■■■■■ 文件已修改
src/api/screen/monitor/index.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/flow/graphic/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/temperature/graphic/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/screen/temperature/monitor/index.vue 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/screen/monitor/index.js
@@ -11,3 +11,24 @@
        data
    })
}
/**
 * 获取水温监控点参数
 */
export const getTempMonitorConfig = () => {
    return publicRequest({
        url: '/waterTemperature/getIntervalData',
        method: 'get'
    })
}
/**
 * 修改水温监控点参数
 */
export const editTempMonitorConfig = (data) => {
    return publicRequest({
        url: '/waterTemperature/editIntervalData',
        method: 'post',
        data
    })
}
src/views/screen/flow/graphic/index.vue
@@ -4,10 +4,11 @@
import {getFlowPointList} from '@/api/screen/index'
import {getFlowVideoData} from '@/api/screen/graphic/index.js'
import EZUIKit from 'ezuikit-js';
import {useRoute} from "vue-router";
import {useRoute, useRouter} from "vue-router";
import FullScreenVideo from "./components/FullScreenVideo.vue";
const route = useRoute();
const router = useRouter();
const menuList = ref([])
const userType = ref(getUserType())
@@ -136,7 +137,7 @@
                        </el-icon>
                        搜索
                    </el-button>
                    <el-button style="margin-left: 0" v-if="userType === '1'">
                    <el-button style="margin-left: 0" v-if="userType === '1'" @click="router.push('/monitorList')">
                        <el-icon>
                            <Plus/>
                        </el-icon>
src/views/screen/temperature/graphic/index.vue
@@ -1,10 +1,11 @@
<script setup>
import {ref, onMounted, watch} from "vue";
import {ref, onMounted} from "vue";
import * as echarts from 'echarts/core';
import {getTemperaturePointList} from '@/api/screen/index.js'
import Quarter from "@/components/Quarter";
import moment from "moment";
import { getGraphicData } from '@/api/screen/graphic/index.js'
import { debounce } from '@/utils/tool.js'
const menuList = ref([])
@@ -163,6 +164,14 @@
    })
}
// 监听页面大小变化,改变echarts的大小
window.onresize = debounce(function () {
    charts?.forEach(el => {
        el.resize()
    })
}, 500, true)
// 全屏操作
const handleFullScreen = () => {
    graphicRef.value.requestFullscreen()
@@ -225,6 +234,7 @@
// 获取报表数据
const getChartData = (point = '') => {
    chartData.value = []; //先赋值为空,强制元素重载
    const data = {
        type: timeType.value,
        pointId: point,
@@ -448,6 +458,7 @@
                    border-radius: 8px;
                    .charts {
                        width: 100%;
                        height: 100%;
                    }
                }
src/views/screen/temperature/monitor/index.vue
@@ -1,7 +1,7 @@
<script setup>
import {ref, onMounted} from "vue";
import {getUserType} from '@/utils/auth.js'
import {setTempMonitor} from '@/api/screen/monitor/index.js'
import {setTempMonitor, getTempMonitorConfig, editTempMonitorConfig} from '@/api/screen/monitor/index.js'
import {getTemperaturePointList} from '@/api/screen/index.js'
import pointApi from '@/api/facility/point.js'
import {useRouter} from "vue-router";
@@ -11,6 +11,7 @@
const menuList = ref([])
const monitorList = ref([])
const monitorConfig = ref({})
const userType = ref(getUserType())
const monitorRef = ref()
const searchVal = ref('')
@@ -42,6 +43,19 @@
    })
}
// 获取监控点参数
const getMonitorConfig = () => {
    getTempMonitorConfig().then(res => {
        monitorConfig.value = res.data
    })
}
// 设置监控点参数
const setMonitorConfig = () => {
    editTempMonitorConfig(monitorConfig.value).then(res => {
        ElMessage.success('设置成功')
    })
}
const setMonitorData = (data) => {
    setTempMonitor(data).then(res => {
@@ -60,6 +74,7 @@
onMounted(() => {
    getTempMonitor()
    getMonitorList()
    getMonitorConfig()
})
</script>
@@ -102,6 +117,21 @@
                        </el-icon>
                        新增
                    </el-button>
                    <div class="name">水位计采集间隔设置:</div>
                    <el-select v-model="monitorConfig.newIntervalTime">
                        <el-option :value="1" label="一分钟"/>
                        <el-option :value="2" label="两分钟"/>
                        <el-option :value="5" label="五分钟"/>
                        <el-option :value="10" label="十分钟"/>
                    </el-select>
                    <div class="name">水位计采集及数据上报间隔设置:</div>
                    <el-select v-model="monitorConfig.historyIntervalTime">
                        <el-option :value="1" label="一分钟"/>
                        <el-option :value="2" label="两分钟"/>
                        <el-option :value="5" label="五分钟"/>
                        <el-option :value="10" label="十分钟"/>
                    </el-select>
                    <el-button type="success" @click="setMonitorConfig">批量应用</el-button>
                </div>
                <div class="tool-r" @click="handleFullScreen">
                    <img src="@/assets/images/flow/fullscreen.png"/>
@@ -147,33 +177,6 @@
                            <div class="setbox">
                                <div class="name">水温下限设置:</div>
                                <el-input v-model="item.lowWaterLevel"/>
                            </div>
                            <div class="setbox">
                                <div class="name">水位计采集间隔设置:</div>
                                <el-select v-model="item.gatherIntervalTime">
                                    <el-option :value="1" label="一分钟"/>
                                    <el-option :value="2" label="两分钟"/>
                                    <el-option :value="5" label="五分钟"/>
                                    <el-option :value="10" label="十分钟"/>
                                </el-select>
                            </div>
                            <div class="setbox">
                                <div class="name">记录上报间隔设置:</div>
                                <el-select v-model="item.historyIntervalTime">
                                    <el-option :value="1" label="一分钟"/>
                                    <el-option :value="2" label="两分钟"/>
                                    <el-option :value="5" label="五分钟"/>
                                    <el-option :value="10" label="十分钟"/>
                                </el-select>
                            </div>
                            <div class="setbox">
                                <div class="name">实时数据上报间隔设置:</div>
                                <el-select v-model="item.newIntervalTime">
                                    <el-option :value="1" label="一分钟"/>
                                    <el-option :value="2" label="两分钟"/>
                                    <el-option :value="5" label="五分钟"/>
                                    <el-option :value="10" label="十分钟"/>
                                </el-select>
                            </div>
                        </div>
                        <div class="item-btn">
@@ -256,7 +259,16 @@
                gap: 1rem;
                .name {
                    flex-shrink: 0;
                    font-size: 1.1rem;
                    color: #fff;
                }
                :deep(.el-input){
                    flex-shrink: 0;
                }
                :deep(.el-select){
                    width: 8rem;
                    flex-shrink: 0;
                }
            }
@@ -370,10 +382,11 @@
                        .setbox {
                            width: 50%;
                            margin-top: 40px;
                            margin-top: 60px;
                            padding: 0 10px;
                            display: flex;
                            align-items: center;
                            font-size: 1.5rem;
                            .name {
                                flex-shrink: 0;
@@ -385,20 +398,6 @@
                                border-bottom: 1px solid #fff;
                                box-shadow: none;
                                border-radius: 0;
                            }
                            :deep(.el-select__wrapper) {
                                background-color: transparent;
                                box-shadow: none;
                                border-radius: 0;
                                .el-select__placeholder.is-transparent {
                                    color: #FFF;
                                }
                                .el-select__suffix .el-select__caret {
                                    color: #fff;
                                }
                            }
                        }
                    }