whychdw
2021-01-23 3f48616280d680d42755c24e81de2db161339a78
设备实时告警修改
3个文件已修改
46 ■■■■■ 已修改文件
src/components/PageHeader.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/alarmMager/batteryrTimequery.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/alarmMager/deviceTimequery.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/PageHeader.vue
@@ -312,7 +312,6 @@
      this.$apis.top.searchServerState().then(res => {
        let rs = JSON.parse(res.data.result);
        if (rs.code == 1) {
          console.log(rs.data);
          let data = rs.data[0];
          let totalDiscSpace = data.total_disc_space;
          // 设置服务器磁盘信息
src/pages/alarmMager/batteryrTimequery.vue
@@ -256,7 +256,7 @@
                    } /* 二级警告 */ ,
                    alm_id: {
                        bol: true,
                        value1: "1",
                        value1: "100",
                        value2: 0
                    } /* 上限告警 */ ,
                    maint_type_id: {
@@ -286,7 +286,7 @@
                    } /* 四级告警 */ ,
                    alm_signal_id: {
                        bol: true,
                        value1: "0",
                        value1: "100",
                        value2: 0
                    } /* 下限告警 */
                },
@@ -458,6 +458,12 @@
                        params[item] = this.checkbox[item].value2;
                    }
                });
                // 一级和二级告警
        params.num = this.checkbox.Level_one_warn.bol?1:0;
        params.BattGroupId = this.checkbox.Level_two_warn.bol?2:0;
        // 上限和下限告警
        params.alm_id = this.checkbox.alm_id.bol?1:100;
        params.alm_signal_id = this.checkbox.alm_signal_id.bol?0:100;
                /*  console.log("params", params); */
                const alarmDatas = await newsAlarm({
                    bmd: {
@@ -480,8 +486,8 @@
                            maint_close: params.maint_close,
                            master_id: "0",
                            maint_done: params.maint_done,
                            num: "1",
                            BattGroupId: "2",
                            num: params.num,
                            BattGroupId: params.BattGroupId,
                            master_audit: params.master_audit,
                            appoint_uid: params.appoint_uid
                        },
@@ -635,9 +641,6 @@
                this.timer.start(() => {
                    this.$axios
                        .all([
                            this.vindicateData(),
                            this.computerSite(),
                            this.storageBatterys(),
                            this.paramsAlram(),
                        ])
                        .then(() => {
src/pages/alarmMager/deviceTimequery.vue
@@ -105,9 +105,9 @@
    import {
        export_json_to_excel
    } from '../../assets/js/excel/Export2Excel.js'
    import {
        isHasPermit
    } from "@/assets/js/tools";
  import {
    isHasPermit, Timeout
  } from "@/assets/js/tools";
    export default {
        data() {
            let permits = this.$store.state.user.permits;
@@ -118,6 +118,7 @@
                isCanConfirm: isCanConfirm,
                isCanQuit: isCanQuit,
                isCanDel: isCanDel,
        timer: new Timeout(),
                queryInfo: {
                    currentPage: 1,
                    pagesize: 10
@@ -246,7 +247,7 @@
        mounted() {
            this.deviceTime(); /* 维护区 */
            this.deviceName(); /* 机房名称 */
            this.alarmDev(); /* 实时告警 */
            this.startSearch(); /* 实时告警 */
        },
        methods: {
            // 导出表格
@@ -417,6 +418,18 @@
                    this.$layer.close(loading);
                }
            },
      startSearch() {
        this.timer.start(()=>{
          this.$axios.all([
              this.alarmDev()
          ]).then(()=>{
            this.timer.open();
          }).catch(error=>{
            console.log(error);
            this.timer.open();
          });
        },4000);
      },
            /* 删除 */
            async deviceDelete(value) {
                const confirmResult = await this.$confirm(
@@ -516,8 +529,11 @@
                this.queryInfo.currentPage = val2;
                this.alarmDev();
            }
        }
    };
        },
    destroyed() {
          this.timer.stop();
    }
  };
</script>
<style lang="less" scoped>