kongdeqiang
2023-07-28 61634f10d31d1e1d7af7be0cb62ebd173ab8b414
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 ''