kongdeqiang
2023-07-31 2abce925663c0c044c9b5421eab9881e4dbe9f18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
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
      this.getTaskInfoById()
    },
    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>