From 61634f10d31d1e1d7af7be0cb62ebd173ab8b414 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期五, 28 七月 2023 10:20:05 +0800
Subject: [PATCH] 提交文件

---
 src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm.vue  |   17 
 src/api/daping.js                                              |   20 ++
 src/pages/show/showIndex/IndexMoudleBlock.vue                  |   39 +++
 src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm3.vue |  156 +++++++++++++++
 src/pages/show/showIndex/YunweiBlock/YunweiBlockForm.vue       |    2 
 src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm1.vue |  175 +++++++++++++++++
 src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm2.vue |  156 +++++++++++++++
 7 files changed, 550 insertions(+), 15 deletions(-)

diff --git a/src/api/daping.js b/src/api/daping.js
index d1b966f..9c3b1a5 100644
--- a/src/api/daping.js
+++ b/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);
diff --git a/src/pages/show/showIndex/IndexMoudleBlock.vue b/src/pages/show/showIndex/IndexMoudleBlock.vue
index 7feeb68..55e17f0 100644
--- a/src/pages/show/showIndex/IndexMoudleBlock.vue
+++ b/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====')
diff --git a/src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm.vue b/src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm.vue
index ec83cf2..6267b55 100644
--- a/src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm.vue
+++ b/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 '姝e父'
-      }else if(row.isRun == 1){
+      }else if(row.isRun == 2){
         return '寮傚父'
       }
     },
     handleClickRowName({row, column, rowIndex, columnIndex}) {
-      if(row.isRun == 1 && column.label == '鏄惁姝e父杩愯') {
+      if(row.isRun == 2 && column.label == '鏄惁姝e父杩愯') {
         return 'yichangStyle'
       }else {
         return ''
diff --git a/src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm1.vue b/src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm1.vue
new file mode 100644
index 0000000..4f5b55a
--- /dev/null
+++ b/src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm1.vue
@@ -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="娴侀噺锛坆yte锛�"
+          show-overflow-tooltip
+          align="left"
+          header-align="left"
+          min-width="70">
+        </el-table-column>
+        <el-table-column
+          :formatter="isRunformat"
+          prop="isRun"
+          label="鏄惁姝e父杩愯"
+          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 '姝e父'
+      }else if(row.isRun == 2){
+        return '寮傚父'
+      }
+    },
+    handleClickRowName({row, column, rowIndex, columnIndex}) {
+      if(row.isRun == 2 && column.label == '鏄惁姝e父杩愯') {
+        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>
diff --git a/src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm2.vue b/src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm2.vue
new file mode 100644
index 0000000..d7d7b55
--- /dev/null
+++ b/src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm2.vue
@@ -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 '姝e父'
+      }else if(row.isRun == 2){
+        return '寮傚父'
+      }
+    },
+    handleClickRowName({row, column, rowIndex, columnIndex}) {
+      if(row.isRun == 2 && column.label == '鏄惁姝e父杩愯') {
+        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>
diff --git a/src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm3.vue b/src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm3.vue
new file mode 100644
index 0000000..77670fe
--- /dev/null
+++ b/src/pages/show/showIndex/IndexMoudleBlock/IndexMoudleForm3.vue
@@ -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 '姝e父'
+      }else if(row.isRun == 2){
+        return '寮傚父'
+      }
+    },
+    handleClickRowName({row, column, rowIndex, columnIndex}) {
+      if(row.isRun == 2 && column.label == '鏄惁姝e父杩愯') {
+        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>
diff --git a/src/pages/show/showIndex/YunweiBlock/YunweiBlockForm.vue b/src/pages/show/showIndex/YunweiBlock/YunweiBlockForm.vue
index f3eed11..ddcf237 100644
--- a/src/pages/show/showIndex/YunweiBlock/YunweiBlockForm.vue
+++ b/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 '宸插畬鎴�'
                 }
             }
         }

--
Gitblit v1.9.1