<template>
  <div class="detaileDialog">
    <el-dialog
      width="836px"
      title="详情查看"
      :visible.sync="detaildData.dialogVisible"
    >
      <el-form
        style="padding: 0 10px; margin-left: -20px"
        label-width="120px"
        ref="ruleForm"
        :model="detaildData.data"
        label-position="top"
      >
        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="监测系统名称:">
              <el-input
                v-model="detaildData.data.monitorSystemName"
                autocomplete="off"
                disabled
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="监测系统编码:">
              <el-input
                v-model="detaildData.data.clientId"
                autocomplete="off"
                disabled
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="密钥:">
              <el-input
                v-model="detaildData.data.clientSecret"
                autocomplete="off"
                disabled
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="报警信息内容:">
              <el-input
                v-model="detaildData.data.alarmContent"
                autocomplete="off"
                disabled
                type="textarea"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="报警信息生成机制:">
              <el-input
                v-model="detaildData.data.alarmGenerate"
                autocomplete="off"
                disabled
                type="textarea"
                style="height:50px"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="报警解除机制:">
              <el-input
                v-model="detaildData.data.alarmRelease"
                autocomplete="off"
                disabled
                type="textarea"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="24">
          <el-col :span="12">
            <el-form-item label="系统简介:">
              <el-input
                v-model="detaildData.data.systemIntroduce"
                autocomplete="off"
                disabled
                type="textarea"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="报警对应的处理措施:">
              <el-input
                v-model="detaildData.data.treateMeasure"
                autocomplete="off"
                disabled
                type="textarea"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="24">
          <el-col :span="24">
              <el-form-item label="备注：" prop="remark">
                  <el-input placeholder="请输入备注" disabled v-model="detaildData.data.remark" type="textarea"/>
              </el-form-item>
          </el-col>
      </el-row>
      </el-form>
    </el-dialog>
  </div>
</template>
<script>
import { getMenuTree } from "@/api/sysManage";
export default {
  name: "addRoleDialog",
  props: {
    detaildData: {
      type: Object,
      default: {},
    },
  },
  created() {
    this.getMenuTree();
  },
  data() {
    return {
      meunTreeData: [],
    };
  },
  methods: {
    getMenuTree() {
      getMenuTree().then((res) => {
        if (res.code == 200) {
          this.meunTreeData = res.data;
          this.loopMuduleTreeDisabled(this.meunTreeData, this);
        }
      });
    },
    loopMuduleTreeDisabled(arr, that) {
      arr.forEach((item) => {
        that.$set(item, "disabled", true);
        if (item.children && item.children.length > 0) {
          this.loopMuduleTreeDisabled(item.children, that);
        }
      });
    },
  },
};
</script>
<style lang="scss" scoped>
::v-deep .el-dialog__body {
  padding: 20px 95px !important;
}
.dialog-footer {
  div {
    display: inline-block;
    width: 80px;
    height: 40px;
    border-radius: 2px;
    font-size: 14px;
    line-height: 40px;
    text-align: center;
  }

  div:hover {
    cursor: pointer;
  }
  .search {
    margin: 0 12px;
    background-color: #2766dd;
    color: #fff;
  }

  .search:hover {
    background-color: #4d85f4;
  }
  .reset {
    color: #333334;
    border: 1px solid #d7d7d7;
  }

  .reset:hover {
    color: #1f9fff;
    border: 1px solid #1f9fff;
  }
}
// 选中后radio文本的颜色
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: #2766dd;
}

/* radio选中后小圆点的颜色 */
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background: #2766dd !important;
  border-color: #2766dd !important;
}
</style>