fei.wang
2025-04-16 0b3d2deb37745ea5dce42fa4a18f22a29d2f4a12
src/views/dpdv/dpdv.vue
@@ -77,17 +77,22 @@
                        @click="monitorvisible = false">关闭</el-button>
                    <el-divider content-position="right"></el-divider>
                    <!-- <dv-border-box-12 class="monitor" style="position: absolute;z-index: 2004;"> -->
                    <el-table class="dptable" :data="monitorGridData" height="250" style=" overflow: auto;" >
                    <el-table class="dptable" :data="monitorGridData" height="250" style=" overflow: auto;">
                        <el-table-column width="80" property="date" label="编号"><template slot-scope="scope">
                                {{ scope.row.tagid }}
                            </template></el-table-column>
                        <el-table-column width="150" property="name" label="名称"> <template slot-scope="scope">
                                {{ scope.row.anchorname }}
                            </template></el-table-column>
                        <el-table-column width="80" property="address" label="状态"> <template slot-scope="scope">
                                <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span>
                        <el-table-column width="120" property="address" label="状态"> <template slot-scope="scope">
                                <!-- <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span>
                                <span v-else-if="scope.row.onlie == '0'"><img
                                        src="../../assets/images/offline.png"></span>
                                        src="../../assets/images/offline.png"></span> -->
                                        <span v-if="scope.row.onlie == '1'">在线</span>
                            <span v-else-if="scope.row.onlie == '0'">离线</span>
                            <span v-else-if="scope.row.onlie == '4'">高精度</span>
                            <span v-else-if="scope.row.onlie == '6'">超阈值告警</span>
                            <span v-else-if="scope.row.onlie == '7'">非高精度告警</span>
                            </template></el-table-column>
                        <el-table-column width="150" property="address" label="时间"> <template slot-scope="scope">
                                <span>{{ scope.row.addtime }}</span>
@@ -96,7 +101,7 @@
                    <!-- </dv-border-box-12> -->
                    <el-button class="title_right_monitor" type="text" style="color: aliceblue; font-size: 30px;"
                        slot="reference">{{
                    monitorNum }}</el-button>
                            monitorNum }}</el-button>
                    <!-- <span class="title_right_monitor" slot="reference" @click="monitorNumList">{{ monitorNum }}</span> -->
                </el-popover>
@@ -113,10 +118,15 @@
                        <el-table-column width="150" property="name" label="名称"> <template slot-scope="scope">
                                {{ scope.row.anchorname }}
                            </template></el-table-column>
                        <el-table-column width="80" property="address" label="状态"> <template slot-scope="scope">
                                <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span>
                        <el-table-column width="120" property="address" label="状态"> <template slot-scope="scope">
                                <!-- <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span>
                                <span v-else-if="scope.row.onlie == '0'"><img
                                        src="../../assets/images/offline.png"></span>
                                        src="../../assets/images/offline.png"></span> -->
                                        <span v-if="scope.row.onlie == '1'">在线</span>
                            <span v-else-if="scope.row.onlie == '0'">离线</span>
                            <span v-else-if="scope.row.onlie == '4'">高精度</span>
                            <span v-else-if="scope.row.onlie == '6'">超阈值告警</span>
                            <span v-else-if="scope.row.onlie == '7'">非高精度告警</span>
                            </template></el-table-column>
                        <el-table-column width="150" property="address" label="时间"> <template slot-scope="scope">
                                <span>{{ scope.row.addtime }}</span>
@@ -125,7 +135,7 @@
                    <!-- </dv-border-box-12> -->
                    <el-button class="title_right_standard" type="text" style="color: aliceblue; font-size: 30px;"
                        slot="reference">{{
                    standardNum }}</el-button>
                            standardNum }}</el-button>
                    <!-- <span class="title_right_standard" slot="reference">{{ standardNum }}</span> -->
                    <!-- <span class="title_right_monitor"  @click="monitorNumList">{{ monitorNum }}</span> -->
                </el-popover>
@@ -143,10 +153,16 @@
                        <el-table-column width="150" property="name" label="名称"> <template slot-scope="scope">
                                {{ scope.row.anchorname }}
                            </template></el-table-column>
                        <el-table-column width="80" property="address" label="状态"> <template slot-scope="scope">
                                <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span>
                        <el-table-column width="120" property="address" label="状态"> <template slot-scope="scope">
                                <!-- <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span>
                                <span v-else-if="scope.row.onlie == '0'"><img
                                        src="../../assets/images/offline.png"></span>
                                        src="../../assets/images/offline.png"></span> -->
                                        <span v-if="scope.row.onlie == '1'">在线</span>
                            <span v-else-if="scope.row.onlie == '0'">离线</span>
                            <span v-else-if="scope.row.onlie == '4'">高精度</span>
                            <span v-else-if="scope.row.onlie == '6'">超阈值告警</span>
                            <span v-else-if="scope.row.onlie == '7'">非高精度告警</span>
                            </template></el-table-column>
                        <el-table-column width="150" property="address" label="离线时间"> <template slot-scope="scope">
                                <span>{{ scope.row.addtime }}</span>
@@ -155,7 +171,7 @@
                    <!-- </dv-border-box-12> -->
                    <el-button class="title_right_offline" type="text" style="color: aliceblue; font-size: 30px;"
                        slot="reference">{{
                    offlineNum }}</el-button>
                            offlineNum }}</el-button>
                    <!-- <span class="title_right_offline" slot="reference">{{ offlineNum }}</span> -->
                    <!-- <span class="title_right_offline" >{{ offlineNum }}</span> -->
                    <!-- <span class="title_right_monitor"  @click="monitorNumList">{{ monitorNum }}</span> -->
@@ -177,7 +193,7 @@
                        <el-table-column width="80" property="address" label="报警类型"> <template slot-scope="scope">
                                {{ scope.row.alarmtype }}
                            </template></el-table-column>
                            <el-table-column width="80" property="address" label="处理状态"> <template slot-scope="scope">
                        <el-table-column width="80" property="address" label="处理状态"> <template slot-scope="scope">
                                {{ scope.row.status }}
                            </template></el-table-column>
                        <el-table-column width="150" property="address" label="时间"> <template slot-scope="scope">
@@ -200,7 +216,7 @@
                    <!-- </dv-border-box-12> -->
                    <el-button class="title_right_alarm" type="text" style="color: aliceblue; font-size: 30px;"
                        slot="reference">{{
                    alarmNum }}</el-button>
                            alarmNum }}</el-button>
                    <!-- <span class="title_right_alarm" slot="reference">{{ alarmNum }}</span> -->
                    <!-- <span class="title_right_offline" >{{ offlineNum }}</span> -->
                    <!-- <span class="title_right_offline" >{{ offlineNum }}</span> -->
@@ -247,14 +263,19 @@
                    </el-table-column> -->
                    <el-table-column label="设备状态" width="160" align="center">
                        <template slot-scope="scope">
                            <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span>
                            <span v-else-if="scope.row.onlie == '0'"><img src="../../assets/images/offline.png"></span>
                            <!-- <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online.png"></span>
                            <span v-else-if="scope.row.onlie == '0'"><img src="../../assets/images/offline.png"></span> -->
                            <span v-if="scope.row.onlie == '1'">在线</span>
                            <span v-else-if="scope.row.onlie == '0'">离线</span>
                            <span v-else-if="scope.row.onlie == '4'">高精度</span>
                            <span v-else-if="scope.row.onlie == '6'">超阈值告警</span>
                            <span v-else-if="scope.row.onlie == '7'">非高精度告警</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="卫星数" align="center">
                        <template slot-scope="scope">
                            <span>{{ scope.row.gpsnum }}</span>
                            <span>{{ scope.row.gpsnum+"/"+scope.row.gpsstate }}</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="分析时间" align="center">
@@ -285,13 +306,13 @@
            <el-dialog :modal="false" :visible.sync="processingdialogVisible" title="处理">
                <el-form ref="dataForm" :model="temp" label-width="120px" label-position="right">
                    <el-form-item label="序号">
                        <el-input v-model="temp.id
                    " />
                            " />
                    </el-form-item>
                    <el-form-item label="快速处理" >
                    <el-form-item label="快速处理">
                        <el-radio-group v-model="radio" v-removeAriaHidden class="dpradio">
                            <el-radio :label="3" class="dpradio">无需处理</el-radio>
                            <el-radio :label="6" class="dpradio">误报</el-radio>
@@ -316,7 +337,7 @@
            <!-- 查看对话框 -->
            <!-- <el-dialog :modal="false" :visible.sync="dialogVisible" :title="dialogType === 'view' ? '查看' : '新增'"  custom-class="lineChart"> -->
                <!-- <el-form ref="dataForm" :model="temp" label-width="120px" label-position="right">
            <!-- <el-form ref="dataForm" :model="temp" label-width="120px" label-position="right">
                    <el-form-item label="编号">
                        <el-input v-model="temp.tagid" readonly />
                    </el-form-item>
@@ -336,19 +357,22 @@
                        <el-input v-model="temp.gpsnum" readonly />
                    </el-form-item>
                </el-form> -->
                <div class="lineChart"  v-if="dialogVisible"  style="background-color:rgb(8, 17, 56) ;">
                    <span style=" display: flex;justify-content: center;align-items: center;font-size: 25px;margin-top: 20px;"> {{ temp.anchorname+"-" +temp.tagid+"变化趋势图"}}</span>
                    <el-button type="text" class="monitor_left_bnt"
                        style="position: absolute;right: 20px;top: 0;font-size: 25px;"
                        @click="dialogVisible = false">关闭</el-button>
                    <el-divider content-position="right"></el-divider>
                    <line-chart :chart-data="lineChartData"  height="85%" />
                    <!-- <el-button type="primary" @click="dialogVisible = false">
            <div class="lineChart" v-if="dialogVisible" style="background-color:rgb(8, 17, 56) ;">
                <span
                    style=" display: flex;justify-content: center;align-items: center;font-size: 25px;margin-top: 20px;">
                    {{
                        temp.anchorname + "-" + temp.tagid+"变化趋势图"}}</span>
                <el-button type="text" class="monitor_left_bnt"
                    style="position: absolute;right: 20px;top: 0;font-size: 25px;"
                    @click="dialogVisible = false">关闭</el-button>
                <el-divider content-position="right"></el-divider>
                <line-chart :chart-data="lineChartData" height="85%" />
                <!-- <el-button type="primary" @click="dialogVisible = false">
                        关闭
                    </el-button> -->
                </div>
            </div>
            <!-- </el-dialog> -->
        </div>
        <!-- </dv-full-screen-container> -->
@@ -459,7 +483,7 @@
import Pagination from '@/components/Pagination'
import drawMixin from "@/utils/drawMixin"; //自适应缩放
import { formatTime1 } from "@/utils/index.js"; //日期格式转换
import { getList, getEquipment, alldevice, getdevicestate, getsystem,getEquipmentmonitor,getEquipmenttwo } from '@/api/user'
import { getList, getEquipment, alldevice, getdevicestate, getsystem, getEquipmentmonitor, getEquipmenttwo } from '@/api/user'
import { deepClone } from '@/utils'
import { handlechart2, handlechartupdate3 } from '@/api/analysis'
const lineChartData = {
@@ -489,7 +513,7 @@
    },
    data() {
        return {
            month:'',
            month: '',
            barChartData: {
                tagid: '',
                ed: [],
@@ -553,7 +577,7 @@
            offlineNum: 0,//离线设备
            alarmNum: 0,//报警条数
            messageNum: 0,//报文条数
            alerttime:'',
            alerttime: '',
            total: 0,
            dialogVisible: false,
            dialogType: 'view',
@@ -565,7 +589,7 @@
    },
    created() {
        console.log(333333333);
        this.fetchData()
        this.monitordata()
    },
@@ -574,7 +598,7 @@
        const params = { username: localStorage.getItem('username'), phone: localStorage.getItem('phone') };
        alldevice(params).then(response => {
            console.log(response.data.dataList);
            this.initMap(response.data.dataList, response.data.view)
        })
@@ -693,9 +717,9 @@
        fetchData() {
            const params = { csname: localStorage.getItem('username'), phone: localStorage.getItem('phone') };
            getsystem(params).then(response => {
                if (response.data.systemname!=null) {
                if (response.data.systemname != null) {
                    localStorage.setItem('systemname', response.data.systemname);
                }else{
                } else {
                    localStorage.setItem('systemname', response.data.systemname);
                }
                this.systemname = response.data.systemname
@@ -707,14 +731,14 @@
            getEquipmentmonitor(params1).then(response => {
                console.log(4444444);
                this.list = response.data
console.log(response);
this.listLoading = false
                console.log(response);
                this.listLoading = false
            })
            const params2 = { username: localStorage.getItem('username'), phone: localStorage.getItem('phone') };
            getEquipmenttwo(params2).then(response => {
                console.log(5555555555);
                     this.processBarModel = []
                this.processBarModel = []
                // this.list = response.data
                var json = {
                    edmm: [],
@@ -737,7 +761,7 @@
                    json.winmin = response.data[index].winmin
                }
                this.barChartData = json
console.log(response);
                console.log(response);
            })
            // getList(this.listQuery).then(response => {
@@ -768,6 +792,9 @@
            //     this.total = response.data.total
            //     this.listLoading = false
            // })
            setTimeout(() => {
                this.fetchData()
            }, 10000);
        },
        //右侧数据
        monitordata() {
@@ -784,11 +811,11 @@
                this.alarmNum = response.data.alarmNum
                this.messageNum = response.data.messageNum
                this.alerttime = response.data.alerttime
            })
            setTimeout(() => {
                this.monitordata()
            }, 15000);
            }, 10000);
        },
        resetTemp() {
            this.temp = Object.assign({}, _temp)
@@ -801,22 +828,22 @@
            var new_year = currentDate.getFullYear(); // 取当前的年份(实际是输入日期的年份)  
            var month = currentDate.getMonth(); // 获取月份(0-11)  
            var new_month = month + 1; // 将月份转换为可读的格式(1-12) 
            this.month=new_month
            this.month = new_month
            // 获取当月的第一天  
            var firstDay = new Date(new_year, new_month - 6, 1); // 月份需要减1,因为getMonth()返回的是0-11 
            const newDate = formatTime1(firstDay, "yyyy-MM-dd");
            //获取当前年月日
            const dateYear = formatTime1(new Date(), "yyyy-MM-dd");
            const params = { date1: dateYear, date2: newDate, username: localStorage.getItem('username') || '' ,tagid:scope.row.tagid};
            const params = { date1: dateYear, date2: newDate, username: localStorage.getItem('username') || '', tagid: scope.row.tagid };
            console.log(params);
            handlechartupdate3(params).then(response => {
                this.lineChartData = response.data
                console.log(response.data);
                this.dialogVisible = true
            })
            this.resetTemp()
            this.dialogType = 'view'
            this.temp = deepClone(scope.row)
            // this.$nextTick(() => {
@@ -836,26 +863,26 @@
        },
        //跳转后台
        backstage() {
              window.open('/#/large/dashboard');
            window.open('/#/large/dashboard');
            // window.open('/dashboard');
            //  window.open('http://localhost:8084/#/dashboard');
            // this.$router.push({ path: '/dashboard' })
        },
 //退出
//  backout() {
    backout() {
       this.$store.dispatch('user/logout')
      this.$router.push(`/login?redirect=${this.$route.fullPath}`)
    },
        //退出
        //  backout() {
        backout() {
            this.$store.dispatch('user/logout')
            this.$router.push(`/login?redirect=${this.$route.fullPath}`)
        },
        //    window.open('/#/large/dashboard');
         // window.open('/dashboard');
         //  window.open('http://localhost:8084/#/dashboard');
         // this.$router.push({ path: '/dashboard' })
        // window.open('/dashboard');
        //  window.open('http://localhost:8084/#/dashboard');
        // this.$router.push({ path: '/dashboard' })
    //  },
        //  },
        //当前时间
        timeFn() {
            this.timing = setInterval(() => {
@@ -899,7 +926,6 @@
</script>
<style lang="scss" scoped>
#index {
    color: #d3d6dd;
    // width: 118%;
@@ -944,6 +970,7 @@
        height: 80px;
        background: url(../../assets/images/topright.png) no-repeat;
    }
    .right {
        position: absolute;
        top: 100px;
@@ -1036,16 +1063,17 @@
        margin-top: 69px;
        margin-left: 68px;
    }
    .el-radio__input {
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    display: inline-block;
    line-height: 1;
    position: relative;
    vertical-align: middle;
}
    .el-radio__input {
        white-space: nowrap;
        cursor: pointer;
        outline: none;
        display: inline-block;
        line-height: 1;
        position: relative;
        vertical-align: middle;
    }
    .title_left_tdmm.el-radio__input.is-checked .el-radio__inner {
        border-color: #1890ff;
@@ -1093,15 +1121,18 @@
        background-color: rgb(8, 17, 56);
        color: #fff;
    }
    .dpradio::v-deep.el-radio__input, .el-radio__input {
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    display: inline-block;
    line-height: 1;
    position: relative;
    vertical-align: middle;
}
    .dpradio::v-deep.el-radio__input,
    .el-radio__input {
        white-space: nowrap;
        cursor: pointer;
        outline: none;
        display: inline-block;
        line-height: 1;
        position: relative;
        vertical-align: middle;
    }
    // 表头边框
    ::v-deep .el-table tr {
        background-color: transparent !important;
@@ -1305,7 +1336,7 @@
        margin-left: 280px;
    }
    .custom-table .el-table__row .el-table_1_column_1 {
        color: #ffffff;
@@ -1320,15 +1351,17 @@
    }
    .dpradio.el-radio__input {
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    display: inline-block;
    line-height: 1;
    position: relative;
    vertical-align: middle;
}
        white-space: nowrap;
        cursor: pointer;
        outline: none;
        display: inline-block;
        line-height: 1;
        position: relative;
        vertical-align: middle;
    }
    .page {
        // width: 100%;
        height: 20%;