<template>
  <div>
      <el-dialog
        v-dialogDrag
        :visible.sync="showModal"
        width="700px"
        title="组织详情"
      >
      <div class="maxHeight">
        <table class="tableClass">
          <tbody>
            <tr>
              <th>名称</th>
              <td>{{ obj.name }}</td>
            </tr>
            <tr>
              <th>上级组织</th>
              <td>{{ obj.parentName }}</td>
            </tr>
            <tr>
              <th>状态</th>
              <td>{{ obj.status?obj.status.value === 'NORMAL' ? '正常':'禁用' :'' }}</td>
            </tr>
            <tr>
              <th>排序</th>
              <td>{{ obj.sort }}</td>
            </tr>
            <tr>
              <th>备注</th>
              <td>{{ obj.remark }}</td>
            </tr>
          </tbody>
        </table>
      </div>
      </el-dialog>
  </div>
</template>
<script>
/**
 * 组织表详情
 */
import { sysOrg } from '../../../api'
export default {
  data() {
    return {
      obj: {},
      showModal: false
    }
  },
  methods: {
    _open: async function(id) {
      this.showModal = true
      const result = await sysOrg.getById(id)
      this.obj = result
    }
  }
}
</script>
