<template>
  <div class="infoDetail">
    <el-form
      ref="form"
      :model="detail"
      label-width="100px"
      class="dispatch-detial"
    >
      <el-form-item label="组织名称" :class="required?'mandatory':''">
        <p class="tip">{{ detail.name }}</p>
      </el-form-item>
      <el-form-item label="组织类型" :class="required?'mandatory':''">
        <p class="tip">{{ type }}</p>
      </el-form-item>
      <el-form-item label="上级组织">
        <p class="tip">{{ detail.parentName }}</p>
      </el-form-item>
      <el-form-item label="负责人">
        <p class="tip">{{ detail.leader }}</p>
      </el-form-item>
      <el-form-item label="联系电话">
        <p class="tip">{{ detail.phone }}</p>
      </el-form-item>
      <el-form-item label="备注">
        <p class="tip">{{ detail.remark }}</p>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { reactive, toRefs,computed } from "vue"; //watch

export default {
  name: "seeInfo",
  props: ["required", "detail"],
  setup(props) {
    const data = reactive({
      searchAttr: { pageSize: 12, projectId: props.data },
    });
    const type = computed(() =>{
      let leble = {
        '1':'总队',
        '2':'支队',
        '3':'大队',
      }
      console.log('type',props);
      return leble[props.detail.deptType] || 'zanw'
    })
    return { ...toRefs(data),type };
  },
  methods: {},
  computed: {},
  components: {
    // "com-dialog": comDialog,
  },
};
</script>

<style lang="scss" scoped>
.table-ctrl-right {
  .search-scene {
    margin: 0 20px 0 26px;
  }
  i {
    margin-left: 20px;
    font-size: 1.7rem;
    vertical-align: middle;
    cursor: pointer;

    &.active {
      color: var(--primaryColor);
    }
  }
}

.title {
  font-weight: bold;
  color: #26559b;
  line-height: 19px;
  font-size: 14px;
}
</style>

<style>
.upload-demo .el-upload {
  line-height: initial;
}

.arch-name .el-input__inner {
  padding-right: 50px;
}
</style>