kongdeqiang
2023-07-28 61634f10d31d1e1d7af7be0cb62ebd173ab8b414
提交文件
4个文件已修改
3个文件已添加
565 ■■■■■ 已修改文件
src/api/daping.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/show/showIndex/IndexMoudleBlock.vue 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm1.vue 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm2.vue 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm3.vue 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/show/showIndex/YunweiBlock/YunweiBlockForm.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/daping.js
@@ -5,9 +5,19 @@
  return getRequest('/tssw/api/getHost', params);
}
//主机
export const getHostInfo = params => {
  return getRequest('/tssw/api/getHostInfo', params);
}
//数通设备
export const getSnmp = params => {
  return getRequest('/tssw/api/getSnmp', params);
}
//数通设备
export const getSnmpInfo = params => {
  return getRequest('/tssw/api/getSnmpInfo', params);
}
//巡检任务
@@ -30,11 +40,21 @@
  return getRequest('/tssw/api/getUps', params);
}
//UPS
export const getUpsInfo = params => {
  return getRequest('/tssw/api/getUpsInfo', params);
}
//空调
export const getKongtiao = params => {
  return getRequest('/tssw/api/getKongtiao', params);
}
//空调
export const getKongtiaoInfo = params => {
  return getRequest('/tssw/api/getKongtiaoInfo', params);
}
//右边异常日志
export const getWarn = params => {
  return getRequest('/tssw/api/getWarn', params);
src/pages/show/showIndex/IndexMoudleBlock.vue
@@ -106,7 +106,7 @@
        </div>
      </div>
      <div
        @click="handleClickTk"
        @click="handleClickTk1"
        class="IndexMoudle-block"
      >
        <svg
@@ -211,7 +211,6 @@
        </div>
      </div>
      <div
        @click="handleClickTk"
        class="IndexMoudle-block">
        <svg
          class="IndexMoudleSvg"
@@ -318,7 +317,7 @@
        </div>
      </div>
      <div
        @click="handleClickTk"
        @click="handleClickTk2"
        class="IndexMoudle-block">
        <svg
          class="IndexMoudleSvg"
@@ -438,7 +437,7 @@
        </div>
      </div>
      <div
        @click="handleClickTk"
        @click="handleClickTk3"
        class="IndexMoudle-block">
        <svg
          class="IndexMoudleSvg"
@@ -565,6 +564,9 @@
        </div>
      </div>
      <indexMoudleForm ref="indexMoudleForm" v-if="indexMoudleVisiable"></indexMoudleForm>
      <indexMoudleForm1 ref="indexMoudleForm1" v-if="indexMoudleVisiable"></indexMoudleForm1>
      <indexMoudleForm2 ref="indexMoudleForm2" v-if="indexMoudleVisiable"></indexMoudleForm2>
      <indexMoudleForm3 ref="indexMoudleForm3" v-if="indexMoudleVisiable"></indexMoudleForm3>
    </div>
</template>
@@ -573,15 +575,24 @@
    import {getHost,getSnmp,getTask,getTaskInfoById,getUps,getKongtiao} from '@/api/daping'
    import countTo from "vue-count-to"
    import indexMoudleForm from "./IndexMoudleBlock/IndexMoudleForm";
    import indexMoudleForm1 from "./IndexMoudleBlock/IndexMoudleForm1";
    import indexMoudleForm2 from "./IndexMoudleBlock/IndexMoudleForm2";
    import indexMoudleForm3 from "./IndexMoudleBlock/IndexMoudleForm3";
    export default {
        name: "IndexMoudleBlock",
        components: {
          countTo,
          indexMoudleForm
          indexMoudleForm,
          indexMoudleForm1,
          indexMoudleForm2,
          indexMoudleForm3,
        },
        data() {
            return {
              indexMoudleVisiable:false, //弹框
              indexMoudleVisiable1:false, //弹框
              indexMoudleVisiable2:false, //弹框
              indexMoudleVisiable3:false, //弹框
                fuwuqiconfig1: {
                    number: [0],
                },
@@ -641,6 +652,24 @@
              this.$refs.indexMoudleForm.init()
            })
          },
          handleClickTk1() {
            this.indexMoudleVisiable1 = true
            this.$nextTick(() => {
              this.$refs.indexMoudleForm1.init()
            })
          },
          handleClickTk2() {
            this.indexMoudleVisiable2 = true
            this.$nextTick(() => {
              this.$refs.indexMoudleForm2.init()
            })
          },
          handleClickTk3() {
            this.indexMoudleVisiable3 = true
            this.$nextTick(() => {
              this.$refs.indexMoudleForm3.init()
            })
          },
          getHost(){  //主机
            getHost().then(res =>{
                console.log(res,'res====')
src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm.vue
@@ -2,7 +2,7 @@
  <div class="YunweiBlockForm-wrap">
    <el-dialog
      custom-class="YunweiBlockForm-dialog"
      title="运维详情"
      title="主机详情"
      :visible.sync="dialogVisible"
      width="600px"
      :close-on-click-modal="false"
@@ -50,7 +50,7 @@
</template>
<script>
import {getTaskInfoById} from '@/api/daping'
import {getHostInfo} from '@/api/daping'
export default {
  name: "YunweiBlockForm",
  data() {
@@ -70,26 +70,25 @@
    }
  },
  methods: {
    init(id) {
    init() {
      this.dialogVisible = true
      //this.getTaskInfoById(id)
    },
    getTaskInfoById(id) {
      getTaskInfoById({id:id}).then(res => {
    getTaskInfoById() {
      getHostInfo().then(res => {
        if(res.code == 0) {
          this.tableData = res.data
        }
      })
    },
    isRunformat(row) {
      if(row.isRun == 0 || row.isRun == null) {
      if(row.isRun == 1 || row.isRun == null) {
        return '正常'
      }else if(row.isRun == 1){
      }else if(row.isRun == 2){
        return '异常'
      }
    },
    handleClickRowName({row, column, rowIndex, columnIndex}) {
      if(row.isRun == 1 && column.label == '是否正常运行') {
      if(row.isRun == 2 && column.label == '是否正常运行') {
        return 'yichangStyle'
      }else {
        return ''
src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm1.vue
New file
@@ -0,0 +1,175 @@
<template>
  <div class="YunweiBlockForm-wrap">
    <el-dialog
      custom-class="YunweiBlockForm-dialog"
      title="设备详情"
      :visible.sync="dialogVisible"
      width="600px"
      :close-on-click-modal="false"
      append-to-body
      v-dialogDrag>
      <el-table
        :cell-class-name="handleClickRowName"
        style="width: 100%"
        :data="tableData">
        <el-table-column
          prop="name"
          label="名称"
          show-overflow-tooltip
          align="left"
          header-align="left"
          min-width="50">
        </el-table-column>
        <el-table-column
          prop="bytes"
          label="流量(byte)"
          show-overflow-tooltip
          align="left"
          header-align="left"
          min-width="70">
        </el-table-column>
        <el-table-column
          :formatter="isRunformat"
          prop="isRun"
          label="是否正常运行"
          align="left"
          header-align="left"
          min-width="30">
        </el-table-column>
        <el-table-column
          prop="remark"
          label="备注"
          show-overflow-tooltip
          align="left"
          header-align="center"
          min-width="70">
        </el-table-column>
      </el-table>
    </el-dialog>
  </div>
</template>
<script>
import {getSnmpInfo} from '@/api/daping'
export default {
  name: "YunweiBlockForm",
  data() {
    return {
      dialogVisible: false,
      tableData:[{
        name:'我是名称',
        bytes:'1000',
        isRun:'1',
        remark:'我是备注信息'
      },{
        name:'我是名称2',
        bytes:'1000',
        isRun:'0',
        remark:'我是备注信息'
      }],
    }
  },
  methods: {
    init() {
      this.dialogVisible = true
    },
    getTaskInfoById() {
      getSnmpInfo().then(res => {
        if(res.code == 0) {
          this.tableData = res.data
        }
      })
    },
    isRunformat(row) {
      if(row.isRun == 1 || row.isRun == null) {
        return '正常'
      }else if(row.isRun == 2){
        return '异常'
      }
    },
    handleClickRowName({row, column, rowIndex, columnIndex}) {
      if(row.isRun == 2 && column.label == '是否正常运行') {
        return 'yichangStyle'
      }else {
        return ''
      }
    }
  }
}
</script>
<style lang="scss">
.yichangStyle{
  .cell{
    color: red;
  }
}
.YunweiBlockForm-dialog{
  height: 2.9271rem  /* 562/192 */!important;
  width: 4.1771rem  /* 802/192 */!important;;
  background: url("../../../../assets/img/kehuxinxi-detail-bj.png") no-repeat center!important;
  background-size: 100% 100% !important;
}
.YunweiBlockForm-dialog{
  .el-dialog__title{
    color: #fff;
  }
  .el-dialog__header{
    display: flex;
    justify-content: center;
    padding:20px 25px;
  }
  .el-dialog__body{
    padding: 30px 25px;
    height: calc(100% - 0.3125rem  /* 60/192 */);
  }
  .el-icon-close:before{
    content: url('../../../../assets/img/closeBtnIcon.png');
    width: 0.125rem  /* 24/192 */;
    height: 0.125rem  /* 24/192 */;
  }
  .el-table{
    height: 100%;
    overflow-y: auto;
  }
  .el-table, .el-table__expanded-cell,.el-table tr,.el-table th.el-table__cell{
    background: transparent;
  }
  .el-table thead,.el-table{
    color: #fff;
  }
  .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{
    border:none;
  }
  .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{
    background:rgba(0,213,255,0.08);
  }
  .el-table__row{
    &:nth-child(odd) {
      background:rgba(0,213,255,0.08);
    }
  }
  .el-table::before{
    height: 0;
  }
  .el-table th.el-table__cell>.cell{
    font-size: 0.0729rem  /* 14/192 */;
  }
  .el-table td.el-table__cell div{
    font-size: 0.0729rem  /* 14/192 */;
  }
  .el-table .cell,.el-table th > .cell {
    display: inline-block;
    white-space: nowrap;
    width: auto;
  }
  .el-table .el-table__cell{
    padding: 0.026rem  /* 5/192 */ 0;
  }
}
</style>
<style lang="scss" scoped>
</style>
src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm2.vue
New file
@@ -0,0 +1,156 @@
<template>
  <div class="YunweiBlockForm-wrap">
    <el-dialog
      custom-class="YunweiBlockForm-dialog"
      title="UPS详情"
      :visible.sync="dialogVisible"
      width="600px"
      :close-on-click-modal="false"
      append-to-body
      v-dialogDrag>
      <el-table
        style="width: 100%"
        :data="tableData">
        <el-table-column
          prop="name"
          label="名称"
          show-overflow-tooltip
          align="left"
          header-align="left"
          min-width="50">
        </el-table-column>
        <el-table-column
          prop="bianliang"
          label="变量名称"
          show-overflow-tooltip
          align="left"
          header-align="left"
          min-width="120">
        </el-table-column>
        <el-table-column
          prop="isRun"
          label="状态"
          align="left"
          header-align="left"
          min-width="90">
        </el-table-column>
      </el-table>
    </el-dialog>
  </div>
</template>
<script>
import {getUpsInfo} from '@/api/daping'
export default {
  name: "YunweiBlockForm",
  data() {
    return {
      dialogVisible: false,
      tableData:[],
    }
  },
  methods: {
    init() {
      this.dialogVisible = true
    },
    getTaskInfoById() {
      getUpsInfo().then(res => {
        if(res.code == 0) {
          this.tableData = res.data
        }
      })
    },
    isRunformat(row) {
      if(row.isRun == 1 || row.isRun == null) {
        return '正常'
      }else if(row.isRun == 2){
        return '异常'
      }
    },
    handleClickRowName({row, column, rowIndex, columnIndex}) {
      if(row.isRun == 2 && column.label == '是否正常运行') {
        return 'yichangStyle'
      }else {
        return ''
      }
    }
  }
}
</script>
<style lang="scss">
.yichangStyle{
  .cell{
    color: red;
  }
}
.YunweiBlockForm-dialog{
  height: 2.9271rem  /* 562/192 */!important;
  width: 4.1771rem  /* 802/192 */!important;;
  background: url("../../../../assets/img/kehuxinxi-detail-bj.png") no-repeat center!important;
  background-size: 100% 100% !important;
}
.YunweiBlockForm-dialog{
  .el-dialog__title{
    color: #fff;
  }
  .el-dialog__header{
    display: flex;
    justify-content: center;
    padding:20px 25px;
  }
  .el-dialog__body{
    padding: 30px 25px;
    height: calc(100% - 0.3125rem  /* 60/192 */);
  }
  .el-icon-close:before{
    content: url('../../../../assets/img/closeBtnIcon.png');
    width: 0.125rem  /* 24/192 */;
    height: 0.125rem  /* 24/192 */;
  }
  .el-table{
    height: 100%;
    overflow-y: auto;
  }
  .el-table, .el-table__expanded-cell,.el-table tr,.el-table th.el-table__cell{
    background: transparent;
  }
  .el-table thead,.el-table{
    color: #fff;
  }
  .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{
    border:none;
  }
  .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{
    background:rgba(0,213,255,0.08);
  }
  .el-table__row{
    &:nth-child(odd) {
      background:rgba(0,213,255,0.08);
    }
  }
  .el-table::before{
    height: 0;
  }
  .el-table th.el-table__cell>.cell{
    font-size: 0.0729rem  /* 14/192 */;
  }
  .el-table td.el-table__cell div{
    font-size: 0.0729rem  /* 14/192 */;
  }
  .el-table .cell,.el-table th > .cell {
    display: inline-block;
    white-space: nowrap;
    width: auto;
  }
  .el-table .el-table__cell{
    padding: 0.026rem  /* 5/192 */ 0;
  }
}
</style>
<style lang="scss" scoped>
</style>
src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm3.vue
New file
@@ -0,0 +1,156 @@
<template>
  <div class="YunweiBlockForm-wrap">
    <el-dialog
      custom-class="YunweiBlockForm-dialog"
      title="空调详情"
      :visible.sync="dialogVisible"
      width="600px"
      :close-on-click-modal="false"
      append-to-body
      v-dialogDrag>
      <el-table
        style="width: 100%"
        :data="tableData">
        <el-table-column
          prop="name"
          label="名称"
          show-overflow-tooltip
          align="left"
          header-align="left"
          min-width="50">
        </el-table-column>
        <el-table-column
          prop="bianliang"
          label="变量名称"
          show-overflow-tooltip
          align="left"
          header-align="left"
          min-width="120">
        </el-table-column>
        <el-table-column
          prop="isRun"
          label="状态"
          align="left"
          header-align="left"
          min-width="90">
        </el-table-column>
      </el-table>
    </el-dialog>
  </div>
</template>
<script>
import {getKongtiaoInfo} from '@/api/daping'
export default {
  name: "YunweiBlockForm",
  data() {
    return {
      dialogVisible: false,
      tableData:[],
    }
  },
  methods: {
    init() {
      this.dialogVisible = true
    },
    getTaskInfoById() {
      getKongtiaoInfo().then(res => {
        if(res.code == 0) {
          this.tableData = res.data
        }
      })
    },
    isRunformat(row) {
      if(row.isRun == 1 || row.isRun == null) {
        return '正常'
      }else if(row.isRun == 2){
        return '异常'
      }
    },
    handleClickRowName({row, column, rowIndex, columnIndex}) {
      if(row.isRun == 2 && column.label == '是否正常运行') {
        return 'yichangStyle'
      }else {
        return ''
      }
    }
  }
}
</script>
<style lang="scss">
.yichangStyle{
  .cell{
    color: red;
  }
}
.YunweiBlockForm-dialog{
  height: 2.9271rem  /* 562/192 */!important;
  width: 4.1771rem  /* 802/192 */!important;;
  background: url("../../../../assets/img/kehuxinxi-detail-bj.png") no-repeat center!important;
  background-size: 100% 100% !important;
}
.YunweiBlockForm-dialog{
  .el-dialog__title{
    color: #fff;
  }
  .el-dialog__header{
    display: flex;
    justify-content: center;
    padding:20px 25px;
  }
  .el-dialog__body{
    padding: 30px 25px;
    height: calc(100% - 0.3125rem  /* 60/192 */);
  }
  .el-icon-close:before{
    content: url('../../../../assets/img/closeBtnIcon.png');
    width: 0.125rem  /* 24/192 */;
    height: 0.125rem  /* 24/192 */;
  }
  .el-table{
    height: 100%;
    overflow-y: auto;
  }
  .el-table, .el-table__expanded-cell,.el-table tr,.el-table th.el-table__cell{
    background: transparent;
  }
  .el-table thead,.el-table{
    color: #fff;
  }
  .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{
    border:none;
  }
  .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{
    background:rgba(0,213,255,0.08);
  }
  .el-table__row{
    &:nth-child(odd) {
      background:rgba(0,213,255,0.08);
    }
  }
  .el-table::before{
    height: 0;
  }
  .el-table th.el-table__cell>.cell{
    font-size: 0.0729rem  /* 14/192 */;
  }
  .el-table td.el-table__cell div{
    font-size: 0.0729rem  /* 14/192 */;
  }
  .el-table .cell,.el-table th > .cell {
    display: inline-block;
    white-space: nowrap;
    width: auto;
  }
  .el-table .el-table__cell{
    padding: 0.026rem  /* 5/192 */ 0;
  }
}
</style>
<style lang="scss" scoped>
</style>
src/pages/show/showIndex/YunweiBlock/YunweiBlockForm.vue
@@ -67,7 +67,7 @@
                if(row.isOk == 0 || row.isOk == null) {
                    return '未完成'
                }else if(row.isOk == 1){
                    return '完成'
                    return '已完成'
                }
            }
        }