Browse Source

修复缺陷

jiawuxian 1 year ago
parent
commit
6442c0b022

+ 0 - 144
src/views/iot/videoDay/dialog.detail.vue

@@ -1,144 +0,0 @@
-<template>
-  <div class="videoDaysDetail">
-    <el-dialog title="录像天数详情" :visible.sync="isShow" width="1000px" :destroy-on-close="true">
-      <el-descriptions  :column="2" border>
-        <el-descriptions-item label="组织机构" >{{data.orgName}}</el-descriptions-item>
-        <el-descriptions-item label="上报时间" >{{data.updateTime}}</el-descriptions-item>
-        <el-descriptions-item label="监控主机" >{{data.equipmentName}}</el-descriptions-item>
-        <el-descriptions-item label="摄像头" >{{data.channelName}}</el-descriptions-item>
-        <el-descriptions-item label="通道号" >{{data.channelCode}}</el-descriptions-item>
-        <el-descriptions-item label="计划存储天数" >{{data.planDays}}</el-descriptions-item>
-        <el-descriptions-item label="实际存储天数" >{{data.realDays}}</el-descriptions-item>
-        <el-descriptions-item label="计划录像开始时间" >{{data.planStartTime}}</el-descriptions-item>
-        <el-descriptions-item label="计划录像结束时间" >{{data.planEndTime}}</el-descriptions-item>
-      </el-descriptions>
-
-      <div class="time-line">
-        <el-timeline :reverse="false">
-          <el-timeline-item v-for="(activity, index) in data.loseDateList" :key="index" color="rgb(208 230 253)"
-                            size="large" type="primary">
-            <div class="time">
-              <div>
-                      <span class="year">
-                        {{ activity.month }}
-                      </span>
-              </div>
-              <!-- <div class="day">{{ activity.time.substring(0, 4) }}年</div> -->
-            </div>
-            <div class="ml10">
-
-              <el-tag v-for="(date, number) in activity.lostDates" :key="number">
-                <div>{{ date }}
-                  <div class="reTip">
-                  </div>
-                </div>
-              </el-tag>
-            </div>
-          </el-timeline-item>
-        </el-timeline>
-      </div>
-
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="onHide">关闭</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-<script>
-
-export default {
-  data() {
-    return {
-      isShow: false,
-      data: {},
-      id: null,
-    };
-  },
-  methods: {
-    async show(id) {
-      this.id = id;
-      //this.data = await this.$api.videoDaysCheck.one(id);
-      this.isShow = true;
-    },
-    onHide() {
-      this.isShow = false;
-    },
-  },
-};
-</script>
-
-<style lang="scss">
-.videoDaysDetail {
-  .block {
-    display: block;
-  }
-
-  .time-line {
-    margin-top: 10px;
-    margin-left: 80px;
-  }
-
-  .list-title {
-    font-size: 16px;
-    font-family: PingFangSC-Medium, PingFang SC;
-    font-weight: 500;
-    color: #181b1e;
-  }
-
-  .list-company {
-    font-size: 14px;
-    font-family: PingFangSC-Regular, PingFang SC;
-    font-weight: 400;
-    color: #2991ff;
-    margin-top: 15px;
-    margin-bottom: 15px;
-  }
-
-  .list-desc {
-    font-size: 14px;
-    font-family: PingFangSC-Regular, PingFang SC;
-    font-weight: 400;
-    color: #596878;
-  }
-
-  .el-tag--small {
-    margin-bottom: 10px;
-  }
-
-  .reTip {
-    display: block;
-    background: #f00;
-    border-radius: 50%;
-    width: 4px;
-    height: 4px;
-    top: -21px;
-    right: -26px;
-    position: relative;
-    z-index: 4;
-  }
-
-  //左侧时间
-  .time {
-    color: rgb(181 215 251);
-    position: absolute;
-    left: -35px;
-    top: -1px;
-
-    .year {
-      font-size: 14px;
-      font-family: PingFangSC-Regular, PingFang SC;
-      font-weight: 400;
-      color: #20354a;
-    }
-
-    .day {
-      font-size: 14px;
-      font-family: PingFangSC-Regular, PingFang SC;
-      font-weight: 400;
-      color: #596878;
-      text-align: center;
-      margin-top: 10px;
-    }
-  }
-}
-</style>

+ 0 - 190
src/views/iot/videoDay/index.vue

@@ -1,190 +0,0 @@
-<template>
-  <div class="app-container">
-    <div class="main-right-box">
-      <div class="main-search-box">
-        <el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" size="small">
-          <el-form-item label="机构名称">
-            <org-tree
-              v-model="queryParams.orgId"
-              @defaultKey="getDefaultKey"
-              @checkChange="changeCheckBox"
-              @click="handleNodeClick"
-              :showCheckSub="false"
-              ref="orgTree"
-            ></org-tree>
-          </el-form-item>
-          <el-form-item label="监控主机" prop="reasons">
-            <el-input
-              v-model="queryParams.reasons"
-              clearable
-              placeholder="请输入关键字"
-              @keyup.enter.native="handleQuery"
-            />
-          </el-form-item>
-          <el-form-item label="摄像头" prop="type">
-            <el-select v-model="queryParams.type" clearable placeholder="请选择">
-              <el-option
-                v-for="dict in dict.type.out_in_type"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="上报时间">
-            <DataRangePicker
-              style="width: 240px"
-              v-model="queryParams.dateRange"
-              key="daterange"
-              type="daterange"
-              :editable="false"
-              :clearable="false"
-              range-separator="-"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-            />
-          </el-form-item>
-          <el-form-item label="丢失日期">
-              <el-date-picker
-                v-model="queryParams.date"
-                type="month"
-                value-format="yyyy-MM-dd"
-                placeholder="请选择保存日期"
-              >
-              </el-date-picker>
-          </el-form-item>
-          <el-form-item label="天数情况" prop="type">
-            <el-select v-model="queryParams.type" clearable placeholder="请选择">
-              <el-option
-                v-for="dict in dict.type.out_in_type"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
-          </el-form-item>
-        </el-form>
-
-        <el-row :gutter="10">
-          <el-col :span="1.5">
-
-            <el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery">搜索</el-button>
-          </el-col>
-          <el-col :span="1.5">
-            <el-button icon="el-icon-refresh" size="mini" type="primary" @click="resetQuery">重置</el-button>
-          </el-col>
-          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-        </el-row>
-      </div>
-      <el-table v-loading="loading" :data="dataList" border height="646" size="small">
-        <el-table-column label="序号" type="index" align="center" width="70"></el-table-column>
-        <el-table-column :show-overflow-tooltip="true" align="center" label="组织机构" prop="type" width="200"></el-table-column>
-        <el-table-column :show-overflow-tooltip="true" align="center" label="监控主机" prop="reasons"/>
-        <el-table-column align="center" label="摄像头" prop="letterNo" ></el-table-column>
-        <el-table-column align="center" label="通道号" prop="letterNo" ></el-table-column>
-        <el-table-column align="center" label="实际/计划存储天数" prop="letterNo" ></el-table-column>
-        <el-table-column align="center" label="天数状态" prop="letterNo" ></el-table-column>
-        <el-table-column align="center" label="最早录像日期" prop="letterNo" ></el-table-column>
-        <el-table-column align="center" label="上报日期" width="150">
-          <template slot-scope="scope">
-            <span>{{ scope.row.startTime }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" align="center"  width="120" >
-          <template slot-scope="r">
-            <el-button type="text" @click="onDetail(r.row.id)">详情</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-
-      <pagination
-        v-show="total>0"
-        :limit.sync="queryParams.pageSize"
-        :page.sync="queryParams.pageNum"
-        :total="total"
-        @pagination="getList"
-      />
-
-    </div>
-
-    <dialog-detail ref="DialogDetail" @success="refresh(true)"></dialog-detail>
-
-  </div>
-</template>
-
-<script>
-import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
-import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
-import DialogDetail from "./dialog.detail.vue";
-import {getLetterApproveList} from "@/api/core/letter";
-import dayjs from 'dayjs';
-export default {
-  components: {DataRangePicker, OrgTree,DialogDetail },
-  dicts: ['letter_status', 'out_in_type', 'out_in_approve_status'],
-  data() {
-    return {
-      loading:false,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        reasons: null,
-        type: null,
-        approveStatus: null,
-        orgId: this.$store.getters.orgId,
-      },
-      dataList:[],
-    };
-  },
-  mounted() {
-    this.getList();
-  },
-  methods: {
-    dayjs,
-    onDetail(id) {
-      this.$refs.DialogDetail.show(id);
-    },
-    refresh(isCurrent) {
-      this.$refs.st[isCurrent ? "refresh" : "search"]();
-    },
-    getDefaultKey(key) {
-      this.queryParams.orgId = key;
-      this.getList();
-    },
-    // 节点单击事件
-    handleNodeClick(data) {
-      this.queryParams.orgId = data.id;
-      this.handleQuery();
-    },
-    /** 下穿状态改变*/
-    changeCheckBox() {
-      this.queryParams.checkSub = !this.queryParams.checkSub;
-      this.getList();
-    },
-
-    /** 查询介绍信列表 */
-    getList() {
-      this.loading = true;
-      getLetterApproveList(this.queryParams).then(response => {
-        this.dataList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-  }
-};
-</script>

+ 22 - 1
src/views/iot/videoDiagnosis/ProgressBar.vue

@@ -118,12 +118,14 @@ export default {
         let lostVideo = [];
         if (this.lostData && this.lostData.length > 0) {
           let prevEnd = this.start_timestamp;
+          let totalPercent = 0;
           for (let tc of this.lostData) {
             let beginstamp = new Date(tc.beginTime).getTime();
 
             if (prevEnd != beginstamp) {
               let percent =
                 (beginstamp - prevEnd) / 60 / 1000 / this.minute_per_ruler;
+              totalPercent += percent;
               lostVideo.push({
                 key: prevEnd,
                 width: percent * 100,
@@ -134,6 +136,7 @@ export default {
             let endStamp = new Date(tc.endTime).getTime();
             let percent =
               (endStamp - beginstamp) / 60 / 1000 / this.minute_per_ruler;
+            totalPercent += percent;
             lostVideo.push({
               key: beginstamp,
               width: percent * 100,
@@ -142,6 +145,20 @@ export default {
 
             prevEnd = endStamp;
           }
+
+          if (totalPercent.toFixed(0) != 1) {
+            lostVideo.push({
+              key: new Date().valueOf(),
+              width: (1 - totalPercent) * 100,
+              color: "green",
+            });
+          }
+        } else {
+          lostVideo.push({
+            key: new Date().valueOf(),
+            width: 100,
+            color: "green",
+          });
         }
 
         this.lostVideo = lostVideo;
@@ -237,7 +254,11 @@ export default {
           var middle_date = _this.graduation_title(date);
           _this.ctx.fillStyle = "#318ed4";
           _this.ctx.font = "14px Arial";
-          _this.ctx.fillText(middle_date,i==0? graduation_left: graduation_left- 17, 35);
+          _this.ctx.fillText(
+            middle_date,
+            i == 0 ? graduation_left : graduation_left - 17,
+            35
+          );
           _this.drawLine(
             graduation_left,
             50,

+ 0 - 375
src/views/iot/videoDiagnosis/ProgressBar1.vue

@@ -1,375 +0,0 @@
-<template>
-    <div class="progress-box-bar" ref="progressbar">
-        <canvas draggable="false" id="procanvas" height="60" @contextmenu="contextMenuClick" @mousedown="mousedownFunc" @mouseup="mouseupFunc" @mousemove="mousemoveFunc" @mouseout="mouseoutFunc"></canvas>
-    </div>
-</template>
-
-<script>
-export default {
-    name:"ProgressBar",
-    props:["timeCell","startTime","videoData"],
-    data(){
-        return{
-            canvas:"",
-            ctx:"",
-            canvasW:"",
-            canvasH:"",
-            nowTime:"",
-            hours_per_ruler:24,    //时间轴显示12小时
-            half_time:5*60*60*1000,
-            graduation_step:20,     //刻度间最小宽度,单位px
-            start_timestamp:new Date().getTime()- 5*60*60*1000,    //开始时间、最左侧时间
-            minutes_per_step:[1, 2, 5, 10, 15, 20, 30, 60, 120, 180, 240, 360, 720, 1440],
-            distance_between_gtitle:80,
-            g_isMousedown:false,    //拖动mousedown标记
-            g_isMousemove:false,    //拖动mousemove标记
-            g_mousedownCursor:null,   //拖动mousedown的位置
-            returnTime: null,   //mouseup返回时间
-            downTime:[],    //下载时间
-            downLeft:0,
-            showDown:false,
-            tiaoTop:40,
-            tiaoHeight:20,
-
-        }
-    },
-    watch:{
-        timeCell(){
-            if(this.timeCell.length>0){
-                this.nowTime = this.changeTime(new Date(this.timeCell[0].beginTime).getTime());
-                this.start_timestamp = new Date(this.timeCell[0].beginTime).getTime()- this.half_time;
-                this.clearCanvas();
-                this.initCanvas();
-            }
-        },
-        startTime(){
-            if(!this.g_isMousedown){
-                this.nowTime = this.changeTime(this.startTime+this.half_time);
-                this.start_timestamp = this.startTime;
-                this.clearCanvas();
-                this.initCanvas();
-            }
-        }
-    },
-    mounted() {
-        this.canvas = document.getElementById("procanvas");
-        this.ctx = this.canvas.getContext('2d');
-        this.canvas.width = this.$refs.progressbar.offsetWidth;
-        this.canvasW = this.canvas.width;
-        this.canvasH = this.canvas.height;
-        this.nowTime = this.changeTime(new Date().getTime());
-        this.initCanvas();
-    },
-    methods:{
-        // 初始化canvas
-        initCanvas:function(){
-            this.drawCellBg();
-            //this.add_cells(this.timeCell);
-            this.add_graduations(this.start_timestamp);
-            this.draw_down(this.downTime);
-            this.drawTimeTriangle();
-        },
-        // // 绘制三角 时间
-        drawTimeTriangle(){
-            // this.ctx.beginPath();
-            // let x = this.canvasW/2;
-            // let x1 = this.canvasW/2-7;
-            // let x2 = this.canvasW/2+7;
-            // this.ctx.moveTo(x1,25);
-            // this.ctx.lineTo(x2,25);
-            // this.ctx.lineTo(x,36);
-            // this.ctx.fillStyle = "#318ed4";
-            // this.ctx.closePath();
-            // this.ctx.fill();
-            // this.ctx.fillStyle = "#fff";
-            // this.ctx.font = "14px Arial";
-            // this.ctx.fillText(this.nowTime,x-60,20);
-        },
-        // 画背景色
-        drawCellBg:function(){
-            this.ctx.fillStyle = "#ccc";
-            this.ctx.fillRect(0, this.tiaoTop, this.canvasW, this.tiaoHeight);
-        },
-        // 添加刻度
-        add_graduations:function(start_timestamp){
-            var _this = this;
-            var px_per_min = _this.canvasW / (_this.hours_per_ruler * 60); // px/min
-            var px_per_ms = _this.canvasW / (_this.hours_per_ruler * 60 * 60 * 1000); // px/ms
-            var px_per_step = _this.graduation_step;  // px/格 默认最小值20px
-            var min_per_step = px_per_step / px_per_min; // min/格
-            for(var i = 0; i < _this.minutes_per_step.length;i++){
-                if(min_per_step <= _this.minutes_per_step[i]){ //让每格时间在minutes_per_step规定的范围内
-                    min_per_step = _this.minutes_per_step[i];
-                    px_per_step = px_per_min * min_per_step;
-                    break
-                }
-            }
-            var medium_step = 30;
-            for (var i = 0; i < _this.minutes_per_step.length; i++) {
-                if (_this.distance_between_gtitle / px_per_min <= _this.minutes_per_step[i]) {
-                    medium_step = _this.minutes_per_step[i];
-                    break;
-                }
-            }
-            var num_steps = _this.canvasW / px_per_step; //总格数
-            var graduation_left;
-            var graduation_time;
-            var ms_offset = _this.ms_to_next_step(start_timestamp,min_per_step*60*1000);//开始的偏移时间 ms
-            var px_offset = ms_offset * px_per_ms; //开始的偏移距离 px
-            var ms_per_step = px_per_step / px_per_ms; // ms/step
-            for(var i = 0; i < num_steps; i++){
-                graduation_left = px_offset + i * px_per_step; // 距离=开始的偏移距离+格数*px/格
-                graduation_time = start_timestamp + ms_offset + i * ms_per_step; //时间=左侧开始时间+偏移时间+格数*ms/格
-                var date = new Date(graduation_time);
-                if (graduation_time / (60 * 1000) % medium_step == 0) {
-                    var middle_date = _this.graduation_title(date);
-                    _this.ctx.fillStyle = "#318ed4";
-                    _this.ctx.font = "14px Arial";
-                    _this.ctx.fillText(middle_date,graduation_left-17,75);
-                    _this.drawLine(graduation_left,50,graduation_left,60,"#318ed4",1);
-                }else{
-                    _this.drawLine(graduation_left,55,graduation_left,60,"rgba(250,250,250,0.7)",1);
-                }
-            }
-        },
-
-        // 画刻度线
-        drawLine:function(beginX,beginY,endX,endY,color,width){
-            this.ctx.beginPath();
-            this.ctx.moveTo(beginX,beginY);
-            this.ctx.lineTo(endX,endY);
-            this.ctx.strokeStyle = color;
-            this.ctx.lineWidth = width;
-            this.ctx.stroke();
-        },
-        // 添加录像块
-        add_cells:function(cells){
-            var _this = this;
-            cells.forEach(cell => {
-                _this.draw_cell(cell)
-            });
-        },
-        // 绘制录像块
-        draw_cell:function(cell){
-            var _this = this;
-            var px_per_ms = _this.canvasW / (_this.hours_per_ruler * 60 * 60 * 1000); // px/ms
-            var beginX = (cell.beginTime - _this.start_timestamp) * px_per_ms;
-            var cell_width = ( cell.endTime - cell.beginTime) * px_per_ms;
-            _this.ctx.fillStyle = "#2d86cd";
-            _this.ctx.fillRect(beginX,this.tiaoTop,cell_width,this.tiaoHeight);
-        },
-        // 绘制下载录像块
-        draw_down:function(cell){
-            var _this = this;
-            var px_per_ms = _this.canvasW / (_this.hours_per_ruler * 60 * 60 * 1000); // px/ms
-            var beginX = cell[0]>cell[1]?(cell[1]- _this.start_timestamp)* px_per_ms:(cell[0]- _this.start_timestamp)* px_per_ms;
-            var cell_width = cell[0]>cell[1]?(cell[0]-cell[1])* px_per_ms:(cell[1]-cell[0])* px_per_ms;
-            _this.ctx.fillStyle = "#ff0000";
-            _this.ctx.fillRect(beginX,this.tiaoTop,cell_width,this.tiaoHeight);
-        },
-        // 返回时间轴上刻度时间
-        graduation_title:function(datetime){
-            return (datetime.getHours()<10?'0'+datetime.getHours():datetime.getHours()) + ':' + ('0' + datetime.getMinutes().toString()).substr(-2);
-        },
-        // 开始的便宜时间  px
-        ms_to_next_step:function(timestamp, step) {
-            var remainder = timestamp % step;
-            return remainder ? step - remainder : 0;
-        },
-        // 清除画布
-        clearCanvas:function(){
-            this.ctx.clearRect(0,0,this.canvasW,this.canvasH);
-        },
-        // 获取鼠标x位置
-        get_cursor_x_position:function(e){
-            var posx = 0;
-            if (! e) {
-                e = window.event;
-            }
-            if (e.pageX || e.pageY) {
-                posx = e.pageX;
-            }else if (e.clientX || e.clientY) {
-                posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
-            }
-            return posx-355;//调整鼠标误差值
-        },
-        // 返回时间日期格式
-        changeTime:function(time) {
-            var newTime = new Date(time);
-            var year = newTime.getFullYear();
-            var month = newTime.getMonth() + 1;
-            if(month < 10){
-                var month = "0" + month;
-            }
-            var date = newTime.getDate();
-            if (date < 10) {
-                var date = "0" + date;
-            }
-            var hour = newTime.getHours();
-            if (hour < 10) {
-                var hour = "0" + hour;
-            }
-            var minute = newTime.getMinutes();
-            if (minute < 10) {
-                var minute = "0" + minute;
-            }
-            var second = newTime.getSeconds();
-            if (second < 10) {
-                var second = "0" + second;
-            }
-            return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
-        },
-        // 鼠标按下事件
-        mousedownFunc:function(e){
-            // if(e.button == 2){
-            //
-            // }else{
-            //     this.g_isMousedown = true;
-            // }
-            // this.g_mousedownCursor = this.get_cursor_x_position(e);//记住mousedown的位置
-
-        },
-        // 鼠标移动事件
-        mousemoveFunc:function(e){
-            let _this = this;
-            let pos_x = _this.get_cursor_x_position(e);
-            let px_per_ms = _this.canvasW / (_this.hours_per_ruler * 60 * 60 * 1000); // px/ms
-            _this.clearCanvas();
-            if(_this.g_isMousedown){
-                var diff_x = pos_x - _this.g_mousedownCursor;
-                _this.start_timestamp = _this.start_timestamp - Math.round(diff_x / px_per_ms);
-                _this.initCanvas();
-                _this.g_isMousemove = true;
-                _this.g_mousedownCursor = pos_x;
-                this.nowTime = this.changeTime(_this.start_timestamp+this.half_time);
-            }else{
-                var time = _this.start_timestamp + pos_x/px_per_ms;
-                _this.initCanvas();
-                _this.drawLine(pos_x,30,pos_x,60,"rgb(49,142,212)",1);
-                _this.ctx.fillStyle = "rgb(194, 202, 215)";
-                _this.ctx.fillText(_this.changeTime(time),pos_x-65,35);
-            }
-        },
-        // 鼠标释放弹起事件
-        mouseupFunc:function(e){
-            if(e.button == 2){
-                if(this.downTime.length==2){
-                    this.downLeft = this.g_mousedownCursor;
-                    this.showDown = true;
-                }
-            }else{
-                this.g_isMousedown = false;
-                this.g_isMousemove = false;
-                let time = this.start_timestamp+this.half_time;
-                this.$emit("setDragPlayTime",time);
-            }
-
-        },
-        // 鼠标移除隐藏时间事件
-        mouseoutFunc:function(e){
-            this.clearCanvas();
-            this.initCanvas();
-        },
-        contextMenuClick:function(e){
-            e.preventDefault();
-            return;
-            var _this = this;
-            var pos_x = _this.get_cursor_x_position(e);
-            var px_per_ms = _this.canvasW / (_this.hours_per_ruler * 60 * 60 * 1000); // px/ms
-            var time = _this.start_timestamp + pos_x/px_per_ms;
-            var flag = false;
-            var index = 0;
-            for(let i = 0;i<_this.timeCell.length;i++){
-                if(time>=_this.timeCell[i].beginTime && time<=_this.timeCell[i].endTime){
-                    flag = true;
-                    index = i;
-                }
-            }
-            if(flag){
-                if(_this.downTime.length<2){
-                    _this.downTime.push(time);
-                    if(_this.downTime.length==2){
-                        _this.clearCanvas();
-                        _this.initCanvas();
-                    }
-                }else if(_this.downTime.length==2){
-                    // console.log(_this.downTime);
-                }
-            }
-
-        },
-        downCLickBack(){
-            if(this.downTime.length == 2){
-                this.downTime.sort(function(a,b){
-                    return a-b
-                })
-                var userData = this.$store.getters.replayDownVideo.length+1;
-                var startTime1 = this.downTime[0]<this.downTime[1]?this.downTime[0]:this.downTime[1];
-                var startTime = this.changeTime(startTime1);
-                var endTime1 = this.downTime[0]>=this.downTime[1]?this.downTime[0]:this.downTime[1];
-                var endTime = this.changeTime(endTime1);
-                var fileName = new Date().getTime()+".mp4";
-                var server = this.$store.getters.serverConfig;
-                var alltime = Math.ceil((endTime1-startTime1)/1000);
-                var obj = {
-                    fileName:fileName,startTime:startTime,endTime:endTime,allTime:alltime,progress:"0%",userDate:userData,downType:0
-                };
-                var s_index = 0,e_index = 0;
-                for(var i = 0;i<this.timeCell.length;i++){
-                    if(this.downTime[0]>=this.timeCell[i].beginTime&&this.downTime[0]<=this.timeCell[i].endTime){
-                        s_index = i;
-                    }
-                    if(this.downTime[1]>=this.timeCell[i].beginTime&&this.downTime[1]<=this.timeCell[i].endTime){
-                        e_index = i;
-                    }
-                }
-                var fileArr = new Array();
-                for(var j=s_index;j<=e_index;j++){
-                    fileArr.push(this.videoData.videoList[j]);
-                }
-                var filesJson = JSON.stringify(fileArr);
-                this.downTime.splice(0,this.downTime.length);
-
-                var ss = document.getElementById("videoOcx").StartDownloadVodFile(server.ServerIP,server.ServerPort,filesJson,fileName,startTime,endTime,userData);
-                this.$store.commit("addDownLoadVideo",obj);
-                this.showDown = false;
-            }
-
-        },
-        cancelDownClick(){
-            this.downTime.splice(0,this.downTime.length);
-            this.showDown = false;
-        }
-    }
-}
-</script>
-
-<style scoped>
-    .progress-box-bar{
-        position: relative;
-        width:100%;
-        height: 100%;
-    }
-    .progress-box-bar canvas{
-       width: 100%;
-       cursor: pointer;
-    }
-    .progress-box-bar .downVideo{
-        position: absolute;
-        z-index: 10;
-        top: 0;
-        left: 300px;
-
-    }
-    .progress-box-bar .downVideo ul{
-        background-color: #fff;
-    }
-    .progress-box-bar .downVideo ul li{
-        line-height: 20px;
-        font-size: 12px;
-        cursor: pointer;
-    }
-    .progress-box-bar .downVideo ul li:hover{
-        background-color: #318ed4;
-    }
-</style>

+ 24 - 25
src/views/iot/videoDiagnosis/detail.vue

@@ -1,11 +1,6 @@
 <template>
   <div class="videoDaysDetail">
-    <el-dialog
-      title="录像详情"
-      :visible.sync="isShow"
-      width="1200px"
-      :destroy-on-close="true"
-    >
+    <DialogCom title="录像详情" :visible.sync="isShow" width="1200px">
       <el-descriptions
         title="基础信息"
         :column="3"
@@ -301,11 +296,10 @@
       <div slot="footer" class="dialog-footer">
         <el-button @click="onHide">关闭</el-button>
       </div>
-    </el-dialog>
+    </DialogCom>
   </div>
 </template>
 <script>
-import TimeLine from "./timeLine.vue";
 import ProgressBar from "./ProgressBar";
 import Calendar from "./Calendar.vue";
 import dayjs from "dayjs";
@@ -314,10 +308,9 @@ import { getLabel } from "@/views/commonOption.js";
 import { integrity } from "@/api/iot/videoDiagnosis";
 
 export default {
-  components: { TimeLine, ProgressBar, Calendar },
+  components: {  ProgressBar, Calendar },
   data() {
     return {
-      src: "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
       isShow: false,
       data: {},
       integrity: {},
@@ -347,8 +340,8 @@ export default {
     async show(hostCode, channelCode) {
       detail(hostCode, channelCode).then((r) => {
         let data = r.data;
-        data.hostCode=hostCode;
-        data.channelCode=channelCode;
+        data.hostCode = hostCode;
+        data.channelCode = channelCode;
         // this.data.storage.fullDates=["2024-02-15","2024-02-16","2024-02-17","2024-02-18","2024-02-19"]
         // this.data.storage.partialLossDates=["2024-02-5","2024-02-6","2024-02-7","2024-02-8","2024-02-9"]
         // this.data.storage.allLostDates=["2024-02-10","2024-02-11","2024-02-12","2024-02-13","2024-02-14"]
@@ -358,10 +351,11 @@ export default {
       });
     },
     getIntegrity(hostCode, channelCode, date) {
-      integrity(hostCode, channelCode, dayjs(date).format("YYYY-MM-DD")).then((r) => {
-
-        this.handleInterity(r.data);
-      });
+      integrity(hostCode, channelCode, dayjs(date).format("YYYY-MM-DD")).then(
+        (r) => {
+          this.handleInterity(r.data);
+        }
+      );
     },
     handleInterity(integrity) {
       this.integrity = integrity;
@@ -389,25 +383,30 @@ export default {
     },
     onHide() {
       this.isShow = false;
+      this.id = null;
+      this.integrity = {};
+      this.data = {};
+      (this.timeCells = []), //录像时间块
+        (this.lostData = []);
     },
     onSelectDate(date) {
-      this.getIntegrity(this.data.hostCode,this. data.channelCode, date);
+      this.getIntegrity(this.data.hostCode, this.data.channelCode, date);
     },
     lostDurationText(duration) {
       if (!duration) {
-        return '未丢失'
+        return "未丢失";
       }
 
-      let str = ''
-      let hour = Math.floor(duration / 60)
+      let str = "";
+      let hour = Math.floor(duration / 60);
       if (hour > 0) {
-        str += `${hour}小时`
+        str += `${hour}小时`;
       }
 
-      let minute = duration % 60
-      str += `${minute}分`
-      return str
-    }  
+      let minute = duration % 60;
+      str += `${minute}分`;
+      return str;
+    },
   },
 };
 </script>

+ 4 - 4
src/views/iot/videoDiagnosis/index.vue

@@ -25,11 +25,11 @@
               placeholder="请输入监控主机名称"
             />
           </el-form-item> -->
-          <el-form-item label="摄像头" prop="channelName">
+          <el-form-item label="通道名称" prop="channelName">
             <el-input
               v-model="queryParams.channelName"
               clearable
-              placeholder="请输入摄像头名称"
+              placeholder="请输入通道名称"
             />
           </el-form-item>
           <el-form-item label="录像丢失状态" prop="integrityState">
@@ -146,11 +146,11 @@
           label="通道名称"
           prop="channelName"
         ></el-table-column>
-        <el-table-column
+        <!-- <el-table-column
           align="center"
           label="IP地址"
           prop="channelIp"
-        ></el-table-column>
+        ></el-table-column> -->
         <el-table-column
           align="center"
           label="录像丢失时长"

+ 0 - 408
src/views/iot/videoDiagnosis/timeLine.vue

@@ -1,408 +0,0 @@
-<template>
-  <div>
-    <div id="loseTimeSpan"
-         style="width:700px"
-         class="loseTimeSpan">
-      <i v-for="(item,index) in checkSpan"
-         :key="index + 'x'"
-         :style="{width:item.width + 'px',left:item.start + 'px'}"
-         :title="'检查模版' + item.st + '~' +  item.et"></i>
-      <i v-for="(item,index) in loseSpan"
-         :key="index + 'y'"
-         class="lose"
-         :style="{width:item.width + 'px',left:item.start + 'px'}"
-         :title="'录像丢失' + item.st + '~' +  item.et"></i>
-      <i v-for="(item,index) in warnSpan"
-         :key="index + 'z'"
-         class="warn"
-         :style="{width:item.width + 'px',left:item.start + 'px'}"
-         :title="'无录像计划' + item.st + '~' +  item.et"></i>
-    </div>
-  </div>
-</template>
-
-<script>
-import axios from 'axios'
-export default {
-  name: "Login",
-  data () {
-    return {
-      DAY_SECOND: 86400,
-      rowData: this.data,
-      checkSpan: [],
-      loseSpan: [],
-      warnSpan: [],
-      widthrem:this.rems
-    }
-  },
-  props:{
-    data:{
-    },
-    rems:{
-      }
-  },
-  watch: {
-    data(rowData) {
-      if(!rowData) return;
-      this.rowData=rowData;
-      let data = this.renderVideoRuler();
-      this.checkSpan = data.checkSpan;
-      this.loseSpan = data.loseSpan;
-      this.warnSpan = data.warnSpan;
-    }
-  },
-  methods: {
-    //计算录像模版长度
-    calculateCheckSpanUI (spans = [], widthPx) {
-      const tmpTemplates = [];
-      const tmpSpans = [];
-      spans.forEach((item) => {
-        const st = this.datestr2number(item.st);
-        const et = this.datestr2number(item.et);
-
-        //转换为秒数
-        tmpTemplates.push({
-          st: st,
-          et: et
-        })
-
-        //计算宽度
-        let width = widthPx * ((et - st) / this.DAY_SECOND);
-
-        if (width < 1) {
-          width = 1;
-        }
-
-        //计算开始位置
-        let start = widthPx * (st / this.DAY_SECOND);
-
-
-        tmpSpans.push({
-          width: width,
-          start: start,
-          st: item.st,
-          et: item.et,
-        })
-      })
-
-      return {
-        templates: tmpTemplates,
-        spans: tmpSpans
-      }
-    },
-    //计算丢失数据的信息
-    calculateWarnSpanUI (spans = [], widthPx) {
-      let warnSpans = [];
-      // console.log(spans)
-      if (spans.length > 0) {
-        let flag = "00:00:00";
-        spans.forEach((item, index) => {
-          if (index==0&&item.st > flag) {
-            const st = this.datestr2number(flag) + 1;
-            const et = this.datestr2number(item.st) - 1;
-
-            //计算宽度
-            let width = widthPx * ((et - st) / this.DAY_SECOND);
-            if (width < 1) {
-              width = 1;
-            }
-
-            //计算开始位置
-            let start = widthPx * (st / this.DAY_SECOND);
-
-            warnSpans.push({
-              width: width,
-              start: start,
-              st: flag,
-              et: item.st
-            })
-          }else if(index>0&&item.st > spans[index-1].et){
-            const st = this.datestr2number(spans[index-1].et) + 1;
-            const et = this.datestr2number(item.st) - 1;
-
-            //计算宽度
-            let width = widthPx * ((et - st) / this.DAY_SECOND);
-            if (width < 1) {
-              width = 1;
-            }
-
-            //计算开始位置
-            let start = widthPx * (st / this.DAY_SECOND);
-
-            warnSpans.push({
-              width: width,
-              start: start,
-              st: spans[index-1].et,
-              et: item.st
-            })
-          }else {
-            flag
-          }
-
-          if (index + 1 === spans.length && item.et !== "23:59:59") {
-            const st = this.datestr2number(item.et) + 1;
-            const et = this.datestr2number("23:59:59");
-
-            //计算宽度
-            let width = widthPx * ((et - st) / this.DAY_SECOND);
-            if (width < 1) {
-              width = 1;
-            }
-
-            let start = widthPx * (st / this.DAY_SECOND);
-
-            warnSpans.push({
-              width: width,
-              start: start,
-              st: item.et,
-              et: "24:00:00"
-            })
-          }
-
-        });
-      }
-      return {
-        spans: warnSpans
-      }
-    },
-
-    //判断指定的丢失片段是否存在模版范围之中
-    judgeLoseSpan (checkSpanTemplate = [], st, et) {
-      let flag = false;
-      checkSpanTemplate.forEach((val) => {
-        if (st >= val.st && et <= val.et) {
-          flag = true;
-          return flag;
-        }
-      });
-      return flag;
-    },
-    //计算丢失录像
-    calculateLoseSpanUI (spans = [], checkSpanTemplate = [], widthPx) {
-
-      //计算每个span的边界
-      const tmpSpans = [], tmpWarnSpan = [];
-
-      if(spans.length===0)
-      {
-        return {
-        spans: tmpSpans,
-        warnSpans: tmpWarnSpan
-      }
-      }
-      //将检测模版和丢失片段都按照开始日期升序排序
-      checkSpanTemplate.sort(function (a, b) {
-        return a.st - b.st;
-      });
-
-
-      spans.sort(function (a, b) {
-        let datestr2number = (dateStr) => {
-          if (typeof dateStr !== "string") {
-            return 0;
-          }
-          const arr = dateStr.split(":");
-          if (arr.length !== 3) {
-            return 0;
-          }
-          return (Number.parseInt(arr[0]) * 3600) + (Number.parseInt(arr[1]) * 60) + (Number.parseInt(arr[2]));
-        }
-
-        return datestr2number(a.st) - datestr2number(b.st);
-      })
-
-
-
-
-      // let test = new Array();
-      // test.push(spans[1]);
-      // console.log(test);
-      spans.forEach((item) => {
-        let st = this.datestr2number(item.st);
-        let et = this.datestr2number(item.et);
-
-        if ((et - st) <= 5) {
-          return;
-        }
-
-        //判断丢失时间段是否在录像计划的范围内
-        const normalFlag = this.judgeLoseSpan(checkSpanTemplate, st, et);
-        // console.log('是否越界' + normalFlag)
-        if (!normalFlag) {
-          //异常丢失日期,超越了边界,去掉超过检查模版的边缘
-          //找到第一个复核丢失片段的检查模版
-          let checkSpan = undefined;
-          for (let i = 0; i < checkSpanTemplate.length; i++) {
-            const val = checkSpanTemplate[i];
-            if (!checkSpan && st <= val.st) {
-              checkSpan = val;
-              break;
-            }
-          }
-
-      // console.log('是否赋值' + JSON.stringify(checkSpan));
-
-
-          if (!checkSpan) {
-            //没有匹配到模版,重新使用ET匹配
-            for (let i = (checkSpanTemplate.length - 1); i >= 0; i--) {
-              const val = checkSpanTemplate[i];
-              if (!checkSpan && et >= val.et) {
-                checkSpan = val;
-                break;
-              }
-            }
-          }
-
-
-
-          if (!!checkSpan) {
-            let warnSt = 0, warnEt = 0;//告警录像
-            let loseSt = 0, loseEt = 0;//丢失录像
-
-            if (st < checkSpan.st) {
-              //左边越界
-              warnSt = st;
-              warnEt = checkSpan.st;
-              loseSt = checkSpan.st;
-              loseEt = et;
-            } else {
-              //右边越界
-              loseSt = st;
-              loseEt = checkSpan.et;
-              warnSt = checkSpan.et;
-              warnEt = et;
-            }
-
-            let width_1 = widthPx * ((warnEt - warnSt) / this.DAY_SECOND);
-
-            if (width_1 < 1) {
-              width_1 = 1;
-            }
-
-            tmpWarnSpan.push({
-              width: width_1,
-              start: widthPx * (warnSt / this.DAY_SECOND),
-              st: this.number2datestr(warnSt),
-              et: this.number2datestr(warnEt)
-            });
-
-            let width_2 = widthPx * ((loseEt - loseSt) / this.DAY_SECOND);
-            if (width_2 < 1) {
-              width_2 = 1;
-            }
-
-            tmpSpans.push({
-              width: width_2,
-              start: widthPx * (loseSt / this.DAY_SECOND),
-              st: this.number2datestr(loseSt),
-              et: this.number2datestr(loseEt)
-            })
-
-            return;
-
-          }
-
-        } else {
-
-          //正常片段
-          let width = widthPx * ((et - st) / this.DAY_SECOND);
-          if (width < 1) {
-            width = 1;
-          }
-
-          tmpSpans.push({
-            width: width,
-            start: widthPx * (st / this.DAY_SECOND),
-            st: item.st,
-            et: item.et
-          })
-        }
-
-
-      });
-
-      return {
-        spans: tmpSpans,
-        warnSpans: tmpWarnSpan
-      }
-
-    },
-
-    renderVideoRuler () {
-      if(!this.rowData) return ;
-      this.rowData.checkSpan=JSON.parse(this.rowData.checkSpan)
-      this.rowData.loseSpan=JSON.parse(this.rowData.loseSpan)
-      const checkSpan = this.calculateCheckSpanUI(this.rowData.checkSpan, this.widthrem);
-      const loseSpan = this.calculateLoseSpanUI(this.rowData.loseSpan, checkSpan.templates, this.widthrem);
-      const warnSpan = this.calculateWarnSpanUI(this.rowData.checkSpan, this.widthrem);
-      // debugger
-      return {
-        //存放检测模版气质时间得秒数
-        checkSpanTemplate: checkSpan.templates,
-        //检测模版数据
-        checkSpan: checkSpan.spans,
-        //录像丢失数据
-        loseSpan: loseSpan.spans,
-        //无录像计划的数据
-        warnSpan: warnSpan.spans
-      }
-
-    },
-    number2datestr (senconds) {
-      const hour = Math.floor((senconds % this.DAY_SECOND) / 3600);
-      const minute = Math.floor((senconds % 3600) / 60);
-      const second = senconds % 60;
-      return (hour < 10 ? '0' : '') + hour + ":" +
-        (minute < 10 ? '0' : '') + minute + ":" +
-        (second < 10 ? '0' : '') + second;
-    },
-    datestr2number (dateStr) {
-      if (typeof dateStr !== "string") {
-        return 0;
-      }
-      const arr = dateStr.split(":");
-      if (arr.length !== 3) {
-        return 0;
-      }
-      return (Number.parseInt(arr[0]) * 3600) + (Number.parseInt(arr[1]) * 60) + (Number.parseInt(arr[2]));
-    }
-  },
-  mounted () {
-    let data = this.renderVideoRuler();
-    if(!data) return;
-    this.checkSpan = data.checkSpan;
-    this.loseSpan = data.loseSpan;
-    this.warnSpan = data.warnSpan;
-  },
-  beforeDestroy () {
-  }
-}
-</script>
-
-<style>
-.loseTimeSpan {
-  background: transparent;
-  height: 20px;
-  overflow: hidden;
-  position: relative;
-}
-.loseTimeSpan i {
-  cursor: pointer;
-  margin: 0px;
-  padding: 0px;
-  display: inline-block;
-  z-index: 5;
-  position: absolute;
-  height: 100%;
-  background: #51ca65;
-}
-.loseTimeSpan .lose {
-  z-index: 20;
-  background: #f5a623;
-}
-.loseTimeSpan .warn {
-  z-index: 4;
-  background: #e0e0e0;
-}
-</style>

+ 0 - 178
src/views/iot/videoQuality/dialog.alarm.history.vue

@@ -1,178 +0,0 @@
-<template>
-  <div class="videoQuality">
-    <el-dialog title="告警历史记录" :visible.sync="isShow" width="1000px" @close="close">
-      <div class="page-body">
-        <search-table ref="st" url="/videoDiagnosisRecord/alarm/history/list" :search-data="search"
-          :manual="false" :page="true" :select="false" tableHeight="441px" :drag="false">
-          <!-- 搜索 -->
-          <template slot="searchs">
-            <el-row>
-              <el-col :span="6">
-                <el-form-item label="组织机构">
-                  <span class="ellipsis">{{ rowData ? rowData.orgName : "" }}</span>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label="监控主机">
-                  <span class="ellipsis">{{ rowData ? rowData.monitorHost : "" }}</span>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label="摄像头">
-                  <span class="ellipsis">{{ rowData ? rowData.deviceName : "" }}</span>
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label="通道号">
-                  <span class="ellipsis">{{ rowData ? rowData.channelNumber : "" }}</span>
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <!-- <el-form-item label="报警状态">
-              <el-select v-model="search.alarmState" clearable>
-                <el-option v-for="item in alarmStatusOptions" :key="item.value" :label="item.label" :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item> -->
-            <el-form-item label="告警类型">
-              <el-select v-model="search.alarmCode" clearable>
-                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="报警/恢复时间">
-              <el-date-picker v-model="search.alarmTime" type="daterange" range-separator="至" start-placeholder="开始日期"
-                end-placeholder="结束日期">
-              </el-date-picker>
-            </el-form-item>
-
-          </template>
-          <!-- 表格 -->
-          <template slot="columns">
-            <el-table-column type="index" label="序号" width="80px"></el-table-column>
-            <el-table-column prop="alarmType" label="告警类型" min-width="100px"></el-table-column>
-            <el-table-column label="报警发生时间">
-              <template slot-scope="r">
-                {{r.row.alarmStartTime}}
-              </template>
-            </el-table-column>
-            <el-table-column label="报警恢复时间">
-              <template slot-scope="r">
-                {{r.row.alarmEndTime}}
-              </template>
-            </el-table-column>
-          </template>
-        </search-table>
-      </div>
-
-      <div slot="footer" class="dialog-footer">
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import SearchTable from "../../../components/table/search.table.vue";
-import {  mapMutations } from "vuex";
-
-export default {
-  components:{
-    SearchTable
-  },
-  data() {
-    const params = this.$route.params;
-    return {
-      isShow: false,
-      rowData: null,
-      search: {
-        monitorHost: "",
-        channelCode: "",
-        createTime: null,
-        alarmType: null
-      },
-      alarmStatusOptions: [
-        {
-          value: 0,
-          label: "正常"
-        },
-        {
-          value: 1,
-          label: "异常"
-        },
-        {
-          value: 2,
-          label: "未告警"
-        },
-      ],
-      options: [
-        {
-          value: "114",
-          label: "信号丢失"
-        },
-        {
-          value: "131",
-          label: "视频遮挡"
-        },
-        {
-          value: "116",
-          label: "亮度异常"
-        },
-        {
-          value: "117",
-          label: "图像偏色"
-        },
-        {
-          value: "118",
-          label: "雪花干扰"
-        },
-        {
-          value: "119",
-          label: "条纹干扰"
-        },
-        {
-          value: "132",
-          label: "对比度异常"
-        },
-        {
-          value: "115",
-          label: "图像模糊",
-        }
-      ],
-    };
-  },
-  props: {},
-  watch: {},
-  computed: {
-  },
-  methods: {
-    ...mapMutations([]),
-    close() {
-      this.rowData=null;
-      this.$refs.st.ClearTableData();
-    },
-    async show(rowData) {
-      console.log("row", rowData);
-      this.rowData = rowData;
-      this.search ={
-        deviceId: rowData.deviceId,
-        alarmTime: null,
-        alarmCode: null,
-      };
-      this.isShow = true;
-    },
-  },
-  created() { },
-  mounted() { },
-};
-</script>
-
-<style lang="scss">
-.videoQuality {
-  .el-form {
-    padding-top: 5px;
-  }
-  .ellipsis {
-    width: 200px;
-  }
-}
-</style>

+ 0 - 190
src/views/iot/videoQuality/index.vue

@@ -1,190 +0,0 @@
-<template>
-  <div class="app-container">
-    <div class="main-right-box">
-      <div class="main-search-box">
-        <el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" size="small">
-          <el-form-item label="机构名称">
-            <org-tree
-              v-model="queryParams.orgId"
-              @defaultKey="getDefaultKey"
-              @checkChange="changeCheckBox"
-              @click="handleNodeClick"
-              :showCheckSub="false"
-              ref="orgTree"
-            ></org-tree>
-          </el-form-item>
-          <el-form-item label="监控主机" prop="reasons">
-            <el-input
-              v-model="queryParams.reasons"
-              clearable
-              placeholder="请输入关键字"
-              @keyup.enter.native="handleQuery"
-            />
-          </el-form-item>
-          <el-form-item label="摄像头" prop="type">
-            <el-select v-model="queryParams.type" clearable placeholder="请选择介绍信类型">
-              <el-option
-                v-for="dict in dict.type.out_in_type"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="报警状态" prop="approveStatus">
-            <el-select v-model="queryParams.approveStatus" clearable placeholder="请选择审批状态">
-              <el-option
-                v-for="dict in dict.type.out_in_approve_status"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="告警类型" prop="approveStatus">
-            <el-select v-model="queryParams.approveStatus" clearable placeholder="请选择审批状态">
-              <el-option
-                v-for="dict in dict.type.out_in_approve_status"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="报警/恢复时间">
-            <DataRangePicker
-              style="width: 240px"
-              v-model="queryParams.dateRange"
-              key="daterange"
-              type="daterange"
-              :editable="false"
-              :clearable="false"
-              range-separator="-"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-            />
-          </el-form-item>
-        </el-form>
-
-        <el-row :gutter="10">
-          <el-col :span="1.5">
-            <el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery">搜索</el-button>
-          </el-col>
-          <el-col :span="1.5">
-            <el-button icon="el-icon-refresh" size="mini" type="primary" @click="resetQuery">重置</el-button>
-          </el-col>
-          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-        </el-row>
-      </div>
-      <el-table v-loading="loading" :data="dataList" border height="646" size="small">
-        <el-table-column label="序号" type="index" align="center" width="70"></el-table-column>
-        <el-table-column :show-overflow-tooltip="true" align="center" label="组织机构" prop="type" width="180"></el-table-column>
-        <el-table-column :show-overflow-tooltip="true" align="center" label="监控主机" prop="reasons" width="140"/>
-        <el-table-column :show-overflow-tooltip="true" align="center" label="摄像头" prop="letterNo" width="140"></el-table-column>
-        <el-table-column :show-overflow-tooltip="true" align="center" label="通道号" prop="letterNo" width="140"></el-table-column>
-        <el-table-column align="center" label="报警/恢复时间" prop="letterNo" width="180"></el-table-column>
-        <el-table-column align="center" label="信号丢失" prop="letterNo" width="100"></el-table-column>
-        <el-table-column align="center" label="遮挡" prop="letterNo" ></el-table-column>
-        <el-table-column align="center" label="亮度" prop="letterNo" ></el-table-column>
-        <el-table-column align="center" label="偏色" prop="letterNo" ></el-table-column>
-        <el-table-column align="center" label="雪花" prop="letterNo" ></el-table-column>
-        <el-table-column align="center" label="条纹" prop="letterNo" ></el-table-column>
-        <el-table-column align="center" label="对比度" prop="letterNo" ></el-table-column>
-        <el-table-column align="center" label="模糊" prop="letterNo" ></el-table-column>
-        <el-table-column label="操作" align="center"  width="120" >
-          <template slot-scope="r">
-            <el-button type="text" @click="openAlarmHistoryDialog(r.row)">告警历史记录</el-button>
-          </template>
-        </el-table-column>
-
-      </el-table>
-
-      <pagination
-        v-show="total>0"
-        :limit.sync="queryParams.pageSize"
-        :page.sync="queryParams.pageNum"
-        :total="total"
-        @pagination="getList"
-      />
-
-    </div>
-<!--  请  -->
-    <dialog-alarm-history ref="alarmHistoryDialog"></dialog-alarm-history>
-
-  </div>
-</template>
-
-<script>
-import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
-import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
-import DialogAlarmHistory from "./dialog.alarm.history";
-import {getLetterApproveList} from "@/api/core/letter";
-import dayjs from 'dayjs';
-export default {
-  components: {DataRangePicker, OrgTree,DialogAlarmHistory },
-  dicts: ['letter_status', 'out_in_type', 'out_in_approve_status'],
-  data() {
-    return {
-      loading:false,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        reasons: null,
-        type: null,
-        approveStatus: null,
-        orgId: this.$store.getters.orgId,
-      },
-      dataList:[],
-    };
-  },
-  mounted() {
-    this.getList();
-  },
-  methods: {
-    dayjs,
-
-    openAlarmHistoryDialog(row) {
-      this.$refs.alarmHistoryDialog.show(row);
-    },
-    getDefaultKey(key) {
-      this.queryParams.orgId = key;
-      this.getList();
-    },
-    // 节点单击事件
-    handleNodeClick(data) {
-      this.queryParams.orgId = data.id;
-      this.handleQuery();
-    },
-    /** 下穿状态改变*/
-    changeCheckBox() {
-      this.queryParams.checkSub = !this.queryParams.checkSub;
-      this.getList();
-    },
-
-    /** 查询介绍信列表 */
-    getList() {
-      this.loading = true;
-      getLetterApproveList(this.queryParams).then(response => {
-        this.dataList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-  }
-};
-</script>

+ 0 - 138
vue.config.js

@@ -1,138 +0,0 @@
-'use strict'
-const path = require('path')
-const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
-
-
-function resolve(dir) {
-  return path.join(__dirname, dir)
-}
-
-const CompressionPlugin = require('compression-webpack-plugin')
-
-const name = process.env.VUE_APP_TITLE // 网页标题
-
-const port = process.env.port || process.env.npm_config_port || 9527 // 端口
-
-// vue.config.js 配置说明
-//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
-// 这里只列一部分,具体配置参考文档
-module.exports = {
-  // 部署生产环境和开发环境下的URL。
-  // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
-  // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
-  publicPath:"./",
-
-  // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
-  outputDir: 'web',
-  // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
-  assetsDir: 'static',
-  // 是否开启eslint保存检测,有效值:ture | false | 'error'
-  lintOnSave: false,
-  // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
-  productionSourceMap: false,
-  // webpack-dev-server 相关配置
-  devServer: {
-    //host: '0.0.0.0',
-    client:{
-      overlay:false
-    },
-    port: port,
-    open: false,
-    proxy: {
-      // detail: https://cli.vuejs.org/config/#devserver-proxy
-      '/dev-api': {
-        target: process.env.VUE_APP_BASE_API,
-        changeOrigin: true,
-        pathRewrite: {
-          '/dev-api' : ''
-        }
-      },
-    },
-  },
-  configureWebpack: {
-    name: name,
-    resolve: {
-      alias: {
-        '@': resolve('src')
-      }
-    },
-    plugins: [
-      new NodePolyfillPlugin(),
-      // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
-      new CompressionPlugin({
-        cache: false,                   // 不启用文件缓存
-        test: /\.(js|css|html)?$/i,     // 压缩文件格式
-        filename: '[path].gz[query]',   // 压缩后的文件名
-        algorithm: 'gzip',              // 使用gzip压缩
-        minRatio: 0.8                   // 压缩率小于1才会压缩
-      })
-    ],
-  },
-  chainWebpack(config) {
-    config.plugins.delete('preload') // TODO: need test
-    config.plugins.delete('prefetch') // TODO: need test
-    config.optimization.minimizer('terser').tap((args) => {
-      args[0].terserOptions.compress.drop_console = true
-      return args
-    })
-    // set svg-sprite-loader
-    config.module
-      .rule('svg')
-      .exclude.add(resolve('src/assets/icons'))
-      .end()
-    config.module
-      .rule('icons')
-      .test(/\.svg$/)
-      .include.add(resolve('src/assets/icons'))
-      .end()
-      .use('svg-sprite-loader')
-      .loader('svg-sprite-loader')
-      .options({
-        symbolId: 'icon-[name]'
-      })
-      .end()
-
-    config
-      .when(process.env.NODE_ENV !== 'development',
-        config => {
-          config
-            .plugin('ScriptExtHtmlWebpackPlugin')
-            .after('html')
-            .use('script-ext-html-webpack-plugin', [{
-            // `runtime` must same as runtimeChunk name. default is `runtime`
-              inline: /runtime\..*\.js$/
-            }])
-            .end()
-          config
-            .optimization.splitChunks({
-              chunks: 'all',
-              cacheGroups: {
-                libs: {
-                  name: 'chunk-libs',
-                  test: /[\\/]node_modules[\\/]/,
-                  priority: 10,
-                  chunks: 'initial' // only package third parties that are initially dependent
-                },
-                elementUI: {
-                  name: 'chunk-elementUI', // split elementUI into a single package
-                  priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
-                  test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
-                },
-                commons: {
-                  name: 'chunk-commons',
-                  test: resolve('src/components'), // can customize your rules
-                  minChunks: 3, //  minimum common number
-                  priority: 5,
-                  reuseExistingChunk: true
-                }
-              }
-            })
-          config.optimization.runtimeChunk('single'),
-          {
-             from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
-             to: './' //到根目录下
-          }
-        }
-      )
-  }
-}