Sfoglia il codice sorgente

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

hongrunxia 9 mesi fa
parent
commit
eaa1af2bd0

+ 593 - 2
src/views/vent/monitorManager/ceshi/index.vue

@@ -1,18 +1,609 @@
 <template>
     <div class="container-ln">
         <customHeader>潞宁新增</customHeader>
+        <div class="video-ln">
+            <div v-for="(item, index) in addrList" :key="index" class="video-module">
+                <div class="player-name">{{ item.name }}</div>
+                <div style="padding-top:3px">
+                    <template v-if="item.addr.startsWith('rtsp://')">
+                        <video :id="`video${index}`" muted autoplay></video>
+                        <div class="click-box" @dblclick="goFullScreen(`video${index}`)"></div>
+                    </template>
+                    <template v-else>
+                        <div :id="'player' + index"></div>
+                    </template>
+                </div>
+            </div>
+        </div>
+        <div class="content-ln">
+            <a-tabs class="tabs-box" type="card" v-model:activeKey="activeKey" @change="tabChange" id="tabsBox">
+                <a-tab-pane key="1" tab="安全监控">
+                    <template v-if="deviceType == 'fan' && activeKey == '1'">
+                        <GroupMonitorTable :dataSource="dataSource" :columnsType="`${deviceType}_monitor`" />
+                    </template>
+                    <template v-else-if="activeKey == '1' && deviceType">
+                        <template v-if="hasPermission('btn:noGb')">
+                            <MonitorTable ref="monitorTable" :columnsType="`${deviceType}_monitor`"
+                                :dataSource="dataSource" design-scope="device_monitor" :isShowPagination="false"
+                                :isShowActionColumn="isHaveAction.includes(deviceType.split('_')[0]) ? false : true"
+                                :is-show-select="false" title="设备监测" :scroll="{ y: 360 }" />
+                        </template>
+                        <template v-else>
+                            <MonitorTable ref="monitorTable" :columnsType="`${deviceType}_monitor`"
+                                :dataSource="dataSource" design-scope="device_monitor" :isShowPagination="false"
+                                :isShowActionColumn="isHaveAction.includes(deviceType.split('_')[0]) ? false : true"
+                                :is-show-select="false" title="设备监测" :form-config="undefined" :scroll="{ y: 650 }">
+                                <template #filterCell="{ column, record }">
+                                    <template v-if="deviceType.startsWith('gate')">
+                                        <template
+                                            v-if="record.frontGateOpenCtrl == 1 || record.frontGateOpenCtrl === true">
+                                            <a-tag
+                                                v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0"
+                                                color="red">正在打开</a-tag>
+                                            <a-tag v-else-if="column.dataIndex === 'frontGateOpen'"
+                                                color="processing">打开</a-tag>
+                                        </template>
+                                        <template
+                                            v-else-if="record.frontGateOpenCtrl == 0 || record.frontGateOpenCtrl === false">
+                                            <a-tag
+                                                v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0"
+                                                color="red">正在关闭</a-tag>
+                                            <a-tag
+                                                v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 1"
+                                                color="default">关闭</a-tag>
+                                            <a-tag
+                                                v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 1 && record.frontGateClose == 0"
+                                                color="default">打开</a-tag>
+                                        </template>
+                                        <template
+                                            v-if="record.rearGateOpenCtrl == 1 || record.rearGateOpenCtrl === true">
+                                            <a-tag
+                                                v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0"
+                                                color="red">正在打开</a-tag>
+                                            <a-tag v-else-if="column.dataIndex === 'rearGateOpen'"
+                                                color="processing">打开</a-tag>
+                                        </template>
+                                        <template
+                                            v-else-if="record.rearGateOpenCtrl == 0 || record.rearGateOpenCtrl === false">
+                                            <a-tag
+                                                v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0"
+                                                color="red">正在关闭</a-tag>
+                                            <a-tag
+                                                v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 1"
+                                                color="default">关闭</a-tag>
+                                            <a-tag
+                                                v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 1 && record.rearGateClose == 0"
+                                                color="default">打开</a-tag>
+                                        </template>
+                                    </template>
+                                    <template v-if="deviceType.startsWith('windrect')">
+                                        <a-tag v-if="column.dataIndex === 'sign'"
+                                            :color="record.sign == '0' ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'">
+                                            {{ record.sign == '0' ? '高位' : record.sign == 1 ? '中位' : '低位' }}</a-tag>
+                                        <template
+                                            v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
+                                            <a-tag v-if="record.isRun == -2 || record.isRun == -1"
+                                                :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
+                                                    record.isRun == -2 ? '空闲' : '等待'
+                                                }}</a-tag>
+                                            <a-tag v-else-if="record.isRun == 100" color="#4693FF">完成</a-tag>
+                                            <Progress v-else :percent="Number(record.isRun)" size="small"
+                                                status="active" />
+                                        </template>
+                                    </template>
+                                    <template v-if="deviceType.startsWith('safetymonitor')">
+                                        <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
+                                        <div v-if="!record.V && column.dataIndex === 'V'">-</div>
+                                        <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
+                                        <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
+                                        <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
+                                        <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
+                                    </template>
+                                    <a-tag v-if="column.dataIndex === 'warnFlag'"
+                                        :color="record.warnFlag == '0' ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
+                                        {{ record.warnFlag == '0' ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag
+                                            == 2 ? '断开' : '未监测'
+                                        }}</a-tag>
+                                    <a-tag v-if="column.dataIndex === 'netStatus'"
+                                        :color="record.netStatus == '0' ? '#f00' : 'green'">{{
+                                            record.netStatus == '0' ? '断开' : '连接'
+                                        }}</a-tag>
+                                </template>
+                            </MonitorTable>
+                        </template>
+
+                    </template>
+                </a-tab-pane>
+                <a-tab-pane key="2" tab="瓦斯抽放">
+                    <MonitorTable ref="monitorTable" :columnsType="`${deviceType1}_monitor`" :dataSource="dataSource"
+                        design-scope="device_monitor" :isShowPagination="false"
+                        :isShowActionColumn="isHaveAction.includes(deviceType1.split('_')[0]) ? false : true"
+                        :is-show-select="false" title="设备监测" :form-config="undefined" :scroll="{ y: 360 }">
+                        <template #filterCell="{ column, record }">
+                            <template v-if="deviceType1.startsWith('gate')">
+                                <template v-if="record.frontGateOpenCtrl == 1 || record.frontGateOpenCtrl === true">
+                                    <a-tag
+                                        v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0"
+                                        color="red">正在打开</a-tag>
+                                    <a-tag v-else-if="column.dataIndex === 'frontGateOpen'"
+                                        color="processing">打开</a-tag>
+                                </template>
+                                <template
+                                    v-else-if="record.frontGateOpenCtrl == 0 || record.frontGateOpenCtrl === false">
+                                    <a-tag
+                                        v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0"
+                                        color="red">正在关闭</a-tag>
+                                    <a-tag
+                                        v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 1"
+                                        color="default">关闭</a-tag>
+                                    <a-tag
+                                        v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 1 && record.frontGateClose == 0"
+                                        color="default">打开</a-tag>
+                                </template>
+                                <template v-if="record.rearGateOpenCtrl == 1 || record.rearGateOpenCtrl === true">
+                                    <a-tag
+                                        v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0"
+                                        color="red">正在打开</a-tag>
+                                    <a-tag v-else-if="column.dataIndex === 'rearGateOpen'" color="processing">打开</a-tag>
+                                </template>
+                                <template v-else-if="record.rearGateOpenCtrl == 0 || record.rearGateOpenCtrl === false">
+                                    <a-tag
+                                        v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0"
+                                        color="red">正在关闭</a-tag>
+                                    <a-tag
+                                        v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 1"
+                                        color="default">关闭</a-tag>
+                                    <a-tag
+                                        v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 1 && record.rearGateClose == 0"
+                                        color="default">打开</a-tag>
+                                </template>
+                            </template>
+                            <template v-if="deviceType1.startsWith('windrect')">
+                                <a-tag v-if="column.dataIndex === 'sign'"
+                                    :color="record.sign == '0' ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'">
+                                    {{ record.sign == '0' ? '高位' : record.sign == 1 ? '中位' : '低位' }}</a-tag>
+                                <template v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
+                                    <a-tag v-if="record.isRun == -2 || record.isRun == -1"
+                                        :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
+                                            record.isRun == -2 ? '空闲' : '等待'
+                                        }}</a-tag>
+                                    <a-tag v-else-if="record.isRun == 100" color="#4693FF">完成</a-tag>
+                                    <Progress v-else :percent="Number(record.isRun)" size="small" status="active" />
+                                </template>
+                            </template>
+                            <template v-if="deviceType1.startsWith('safetymonitor')">
+                                <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
+                                <div v-if="!record.V && column.dataIndex === 'V'">-</div>
+                                <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
+                                <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
+                                <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
+                                <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
+                            </template>
+                            <a-tag v-if="column.dataIndex === 'warnFlag'"
+                                :color="record.warnFlag == '0' ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
+                                {{ record.warnFlag == '0' ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag
+                                    == 2 ? '断开' : '未监测'
+                                }}</a-tag>
+                            <a-tag v-if="column.dataIndex === 'netStatus'"
+                                :color="record.netStatus == '0' ? '#f00' : 'green'">{{
+                                    record.netStatus == '0' ? '断开' : '连接'
+                                }}</a-tag>
+                        </template>
+                    </MonitorTable>
+                </a-tab-pane>
+            </a-tabs>
+
+        </div>
     </div>
 </template>
 
 <script setup lang="ts">
- import customHeader from '/@/components/vent/customHeader.vue';
+import { ref, reactive, onMounted, onUnmounted, shallowRef } from 'vue'
+import customHeader from '/@/components/vent/customHeader.vue';
+import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
+import MonitorTable from '../comment/MonitorTable.vue';
+import { cameraAddr, } from '../camera/camera.api'
+import { list } from '../safetyMonitor/safety.api';
+import { formConfig, isHaveAction } from '../safetyMonitor/safety.data';
+import Player, { I18N } from 'xgplayer';
+import ZH from 'xgplayer/es/lang/zh-cn'
+import HlsPlugin from 'xgplayer-hls';
+import FlvPlugin from 'xgplayer-flv';
+import 'xgplayer/dist/index.min.css';
+import { usePermission } from '/@/hooks/web/usePermission';
+const { hasPermission } = usePermission();
+const activeKey = ref('1'); // tab key
+const deviceType = ref('safetymonitor'); // 监测设备类型
+const deviceType1 = ref('safetymonitor'); // 监测设备类型
+const dataSource = shallowRef([]); // 实时监测数据
+const monitorTable = ref();
+const playerList = ref([])
+const webRtcServerList = <any[]>[]
+let addrList = ref<{ name: string, addr: string, devicekind: string }[]>([
+    { name: '摄像头1', addr: "http://0.0.0.0:8080/live/16.flv", devicekind: 'wasichoufang' },
+    { name: '摄像头2', addr: "http://0.0.0.0:8080/live/17.flv", devicekind: 'wasichoufang' }
+])
+I18N.use(ZH)
+
+// https获取监测数据
+let timer: null | NodeJS.Timeout = null;
+function getMonitor(flag?) {
+    if (deviceType.value) {
+        if (timer) timer = null;
+        timer = setTimeout(
+            async () => {
+                await getDataSource();
+                if (timer) {
+                    getMonitor();
+                }
+            },
+            flag ? 0 : 1000
+        );
+
+    }
+}
+//tabs选项切换
+async function tabChange(activeKeyVal) {
+    activeKey.value = activeKeyVal;
+    clearTimeout(timer);
+    if (activeKey.value != '1') {
+        deviceType.value = 'wasichoufang'
+    } else {
+        deviceType.value = 'safetymonitor'
+    }
+    getMonitor(true);
+}
+//获取安全监控-实时监测数据
+async function getDataSource() {
+    const res = await list({ devicetype: deviceType.value, filterParams: {} });
+    if (res.msgTxt.length > 0) {
+        dataSource.value = [];
+        let dataArr = res.msgTxt[0].datalist || [];
+        dataArr.filter((data: any) => {
+            const readData = data.readData;
+            return Object.assign(data, readData);
+        });
+        if (deviceType.value == 'safetymonitor') {
+            dataSource.value = dataArr;
+            dataSource.value = dataArr.filter(v => v.strinstallpos == '31102采面钻孔下风侧一氧化碳' || v.strinstallpos == '31102采面钻孔下风侧甲烷')
+        } else {
+            dataSource.value = dataArr;
+        }
+    } else {
+        dataSource.value = [];
+    }
+}
+function getVideo() {
+    const ip = VUE_APP_URL.webRtcUrl;
+    for (let i = 0; i < addrList.value.length; i++) {
+        const item = addrList.value[i]
+        if (item.addr.startsWith('rtsp://')) {
+            const dom = document.getElementById('video' + i) as HTMLVideoElement
+            dom.muted = true;
+            dom.volume = 0
+            const webRtcServer = new window['WebRtcStreamer'](dom, location.protocol + ip)
+            webRtcServerList.push(webRtcServer)
+            webRtcServer.connect(item.addr)
+        } else {
+            setNoRtspVideo('player' + i, item.addr)
+        }
+    }
+}
+async function getVideoAddrs() {
+    clearCamera();
+    playerList.value = []
+    const cameraList = <{ name: string, addr: string }[]>[]
+    for (let i = 0; i < addrList.value.length; i++) {
+        const item = addrList.value[i];
+
+        if (item['devicekind'] === 'toHKRtsp') {
+            // 从海康平台接口获取视频流
+            try {
+                const data = await cameraAddr({ cameraCode: item['addr'] });
+                if (data) {
+                    cameraList.push({ name: item['name'], addr: data['url'] });
+                }
+                // cameraList.push({
+                //   name: item['name'],
+                //   // addr: 'http://219.151.31.38/liveplay-kk.rtxapp.com/live/program/live/hnwshd/4000000/mnf.m3u8'
+                //   addr: 'https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.mp4/.m3u8',
+                // });
+            } catch (error) {
+
+            }
+
+        } else {
+            if (item['addr'].includes('0.0.0.0')) {
+                item['addr'] = item['addr'].replace('0.0.0.0', window.location.hostname)
+            }
+            cameraList.push({ name: item['name'], addr: item['addr'] });
+        }
+    }
+}
+function goFullScreen(domId) {
+    const videoDom = document.getElementById(domId) as HTMLVideoElement
+    if (videoDom.requestFullscreen) {
+        videoDom.requestFullscreen()
+        videoDom.play()
+    } else if (videoDom.mozRequestFullscreen) {
+        videoDom.mozRequestFullscreen()
+        videoDom.play()
+    } else if (videoDom.webkitRequestFullscreen) {
+        videoDom.webkitRequestFullscreen()
+        videoDom.play()
+    } else if (videoDom.msRequestFullscreen) {
+        videoDom.msRequestFullscreen()
+        videoDom.play()
+    }
+}
+function clearCamera() {
+    const num = webRtcServerList.length
+    for (let i = 0; i < num; i++) {
+        webRtcServerList[i].disconnect()
+        webRtcServerList[i] = null
+    }
+    for (let i = 0; i < playerList.value.length; i++) {
+        const player = playerList.value[i]
+        if (player.destroy) player.destroy()
+    }
+    playerList.value = []
+}
+function setNoRtspVideo(id, videoAddr) {
+    const fileExtension = videoAddr.split('.').pop();
+    if (fileExtension === 'flv') {
+        const player = new Player({
+            lang: 'zh',
+            id: id,
+            url: videoAddr,
+            width: 589,
+            height: 330,
+            poster: '/src/assets/images/vent/noSinge.png',
+            plugins: [FlvPlugin],
+            fluid: true,
+            autoplay: true,
+            isLive: true,
+            playsinline: true,
+            screenShot: true,
+            whitelist: [''],
+            ignores: ['time'],
+            closeVideoClick: true,
+            customConfig: {
+                isClickPlayBack: false
+            },
+            flv: {
+                retryCount: 3, // 重试 3 次,默认值
+                retryDelay: 1000, // 每次重试间隔 1 秒,默认值
+                loadTimeout: 10000, // 请求超时时间为 10 秒,默认值
+                fetchOptions: {
+                    // 该参数会透传给 fetch,默认值为 undefined
+                    mode: 'cors'
+                },
+                targetLatency: 10, // 直播目标延迟,默认 10 秒
+                maxLatency: 20, // 直播允许的最大延迟,默认 20 秒
+                disconnectTime: 10, // 直播断流时间,默认 0 秒,(独立使用时等于 maxLatency)
+                maxJumpDistance: 10,
+            }
+        });
+        playerList.value.push(player)
+    }
+    if (fileExtension === 'm3u8') {
+        let player
+        if (document.createElement('video').canPlayType('application/vnd.apple.mpegurl')) {
+            // 原生支持 hls 播放
+            player = new Player({
+                lang: 'zh',
+                id: id,
+                url: videoAddr,
+                width: 589,
+                height: 330,
+                isLive: true,
+                autoplay: true,
+                autoplayMuted: true,
+                cors: true,
+                poster: '/src/assets/images/vent/noSinge.png',
+                hls: {
+                    retryCount: 3, // 重试 3 次,默认值
+                    retryDelay: 1000, // 每次重试间隔 1 秒,默认值
+                    loadTimeout: 10000, // 请求超时时间为 10 秒,默认值
+                    fetchOptions: {
+                        // 该参数会透传给 fetch,默认值为 undefined
+                        mode: 'cors'
+                    },
+                    targetLatency: 10, // 直播目标延迟,默认 10 秒
+                    maxLatency: 20, // 直播允许的最大延迟,默认 20 秒
+                    disconnectTime: 10, // 直播断流时间,默认 0 秒,(独立使用时等于 maxLatency)
+                    maxJumpDistance: 10,
+                }
+
+            })
+        } else if (HlsPlugin.isSupported()) { // 第一步
+            player = new Player({
+                lang: 'zh',
+                id: id,
+                url: videoAddr,
+                width: 589,
+                height: 330,
+                isLive: true,
+                autoplay: true,
+                autoplayMuted: true,
+                plugins: [HlsPlugin], // 第二步
+                poster: '/src/assets/images/vent/noSinge.png',
+                hls: {
+                    retryCount: 3, // 重试 3 次,默认值
+                    retryDelay: 1000, // 每次重试间隔 1 秒,默认值
+                    loadTimeout: 10000, // 请求超时时间为 10 秒,默认值
+                    fetchOptions: {
+                        // 该参数会透传给 fetch,默认值为 undefined
+                        mode: 'cors'
+                    },
+                    targetLatency: 10, // 直播目标延迟,默认 10 秒
+                    maxLatency: 20, // 直播允许的最大延迟,默认 20 秒
+                    disconnectTime: 10, // 直播断流时间,默认 0 秒,(独立使用时等于 maxLatency)
+                    maxJumpDistance: 10,
+                }
+            })
+        }
+        playerList.value.push(player)
+    }
+}
+
+onMounted(() => {
+    getVideo()
+    getVideoAddrs()
+    getMonitor(true);
+})
+onUnmounted(() => {
+    clearCamera()
+    if (timer) {
+        clearTimeout(timer);
+    }
+    timer = undefined;
+});
 
 </script>
 
 <style lang="less" scoped>
-.container-ln{
+@import '/@/design/vent/color.less';
+@import '/@/design/vent/modal.less';
+
+.container-ln {
     position: relative;
     width: 100%;
     height: 100%;
+    padding: 0px 10px;
+    box-sizing: border-box;
+
+    .video-ln {
+        display: flex;
+        justify-content: space-around;
+        align-items: center;
+        width: 100%;
+        height: 50%;
+        padding-top: 80px;
+
+        .video-module {
+            position: relative;
+            width: 45%;
+            height: 100%;
+            background: url('/@/assets/images/vent/camera_bg.png');
+            background-size: 100% 100%;
+
+            .player-name {
+                font-size: 14px;
+                position: absolute;
+                top: 15px;
+                right: 15px;
+                color: #fff;
+                background-color: hsla(0, 0%, 50%, .5);
+                border-radius: 2px;
+                padding: 1px 5px;
+                max-width: 120px;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+                z-index: 999;
+            }
+
+            .click-box {
+                position: absolute;
+                width: 100%;
+                height: 100%;
+                top: 0;
+                left: 0;
+            }
+        }
+    }
+
+    .content-ln {
+        width: 100%;
+        height: 50%;
+
+        .tabs-box {
+            width: calc(100% - 12px) !important;
+            height: 100% !important;
+            bottom: 3px !important;
+        }
+    }
+}
+
+@ventSpace: zxm;
+
+:deep(.@{ventSpace}-tabs-tabpane-active) {
+    height: 100%;
+    border: 1px solid #44d3ff70;
+    border-radius: 2px;
+    -webkit-backdrop-filter: blur(8px);
+    box-shadow: 0 0 20px #44b4ff33 inset;
+    background-color: #ffffff11;
+    overflow-y: auto;
+}
+
+:deep(.@{ventSpace}-tabs-card) {
+    .@{ventSpace}-tabs-tab {
+        background: linear-gradient(#2cd1ff55, #1eb0ff55);
+        border-color: #74e9fe;
+        border-radius: 0%;
+
+        &:hover {
+            color: #64d5ff;
+        }
+    }
+
+    .@{ventSpace}-tabs-content {
+        height: 100% !important;
+    }
+
+    .@{ventSpace}-tabs-tab.@{ventSpace}-tabs-tab-active .@{ventSpace}-tabs-tab-btn {
+        color: aqua;
+    }
+
+    .@{ventSpace}-tabs-nav::before {
+        border-color: #74e9fe;
+    }
+
+
+    .@{ventSpace}-table-cell-row-hover {
+        background: #264d8833 !important;
+    }
+
+    .@{ventSpace}-table-row-selected {
+        background: #00c0a311 !important;
+
+        td {
+            background-color: #00000000 !important;
+        }
+    }
+
+    .@{ventSpace}-table-thead {
+        // background: linear-gradient(#004a8655 0%, #004a86aa 10%) !important;
+        background: #3d9dd45d !important;
+
+        &>tr>th,
+        .@{ventSpace}-table-column-title {
+            // color: #70f9fc !important;
+            border-color: #84f2ff !important;
+            border-left: none !important;
+            border-right: none !important;
+            padding: 7px;
+        }
+    }
+
+    .@{ventSpace}-table-tbody {
+        tr>td {
+            padding: 12px;
+        }
+    }
+
+    .@{ventSpace}-table-tbody>tr:hover.@{ventSpace}-table-row>td {
+        background-color: #26648855 !important;
+    }
+
+    .jeecg-basic-table-row__striped {
+
+        // background: #97efff11 !important;
+        td {
+            background-color: #97efff11 !important;
+        }
+    }
 }
 </style>

+ 1 - 0
src/views/vent/monitorManager/comment/MonitorTable.vue

@@ -109,6 +109,7 @@
       return props.columnsType;
     },
     (newVal) => {
+      console.log(newVal,'val-----')
       if(!newVal) return
       const column =  getTableHeaderColumns(newVal)
       console.log('监测列表表头000------------>', newVal)

+ 9 - 1
src/views/vent/monitorManager/deviceMonitor/components/device/index.vue

@@ -615,7 +615,15 @@ async function getDataSource() {
               dataSource.value = data
             }
           } else {
-            dataSource.value = data
+            let tableData:any[]=[]
+            data.forEach(el=>{
+              if(el.netStatus==1){
+                tableData.splice(0, 0,el);
+              }else {
+                tableData.push(el);
+              }
+            })
+            dataSource.value = tableData
           }
         }else{
           dataSource.value = []

+ 1 - 2
src/views/vent/monitorManager/deviceMonitor/components/device/modal/blastDelta.vue

@@ -344,13 +344,12 @@ function getCoordABY(params) {
 }
 //根据纵坐标获取直线AB横坐标
 function getCoordABX(params1) {
-    return Math.ceil(((parseFloat(coordinateB.x) - parseFloat(coordinateA.x)) * params1 + parseFloat(coordinateA.x) * parseFloat(coordinateB.y) - parseFloat(coordinateB.x) * parseFloat(coordinateA.y)) / (parseFloat(coordinateB.y) - parseFloat(coordinateA.y)))
+    return Math.floor(((parseFloat(coordinateB.x) - parseFloat(coordinateA.x)) * params1 + parseFloat(coordinateA.x) * parseFloat(coordinateB.y) - parseFloat(coordinateB.x) * parseFloat(coordinateA.y)) / (parseFloat(coordinateB.y) - parseFloat(coordinateA.y)))
 }
 
 watch(() => props.posMonitor, (newV, oldV) => {
     maxY1.value = parseFloat(newV.coval) + parseFloat(newV.gasval) + parseFloat(newV.ch2val) + parseFloat(newV.chval)
     maxX1.value = parseFloat(newV.o2val)
-   
     let btTriBlasts = JSON.parse(newV.btTriBlast)
     coordinateA.x = btTriBlasts.A_x
     coordinateA.y = btTriBlasts.A_y

+ 1 - 1
src/views/vent/monitorManager/deviceMonitor/components/device/modal/bundle.modal.vue

@@ -91,7 +91,7 @@
           </div>
         </div>
         <div class="right-bottom">
-          <span class="base-title">设备监测曲线</span>
+          <span class="base-title">设备监测曲线&nbsp; <span style="color:red">{{ posMonitor['netStatus'] != 1 ? '(设备未连接)' : '' }}</span></span>
           <div class="echarts-box">
             <BarAndLine  class="echarts-line" xAxisPropType="time" :dataSource="historyList" height="100%"
               width="65%" :chartsColumns="chartsColumns" :option="echatsOption" chartsType="listMonitor" />