<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>
              <th>别名</th>
              <td>{{ obj.alias }}</td>
            </tr>
            <tr /><tr>
              <th>状态</th>
              <td colspan="3">
                {{ status }}
              </td>
            </tr>
            <tr>
              <th>图片</th>
              <td colspan="3">
                {{ obj.img }}
              </td>
            </tr>
            <tr>
              <th>备注</th>
              <td colspan="3">
                {{ obj.remark }}
              </td>
            </tr>
          </tbody>
        </table>
      </div>
      </el-dialog>
  </div>
</template>
<script>
/**
 * 模块表详情
 */
import { sysModule } from '../../../api'
export default {
  data() {
    return {
      obj: {},
      showModal: false,
      type: '',
      status: ''
    }
  },
  methods: {
    _open: async function(id) {
      this.showModal = true
      const result = await sysModule.getById(id)
      if (result) {
        this.obj = result
        this.type = this.obj.type.display
        this.status = this.obj.status.display
      }
    }
  }
}
</script>
