<template>
  <div>
      <el-dialog
        v-dialogDrag
        :visible.sync="showModal"
        width="700px"
        title="按钮详情"
      >
      <div class="maxHeight">
        <table class="tableClass">
          <tbody>
          <tr>
            <th style="width: 100px">所属菜单</th>
            <td>{{obj.parentName}}</td>
          </tr>
          <tr>
            <th style="width: 100px">按钮名称</th>
            <td>{{obj.name}}</td>
          </tr>
          <tr>
            <th style="width: 100px">编码</th>
            <td>{{obj.code}}</td>
          </tr>
          <tr>
            <th style="width: 100px">类型</th>
            <td>{{obj.uri === 'reportBtn' ? '报表':obj.uri === 'formBtn' ?'表单':'普通'}}</td>
          </tr>
          <tr>
            <th style="width: 100px">状态</th>
            <td>{{obj.status == 0 ? '禁用':'正常'}}</td>
          </tr>
          <tr>
            <th style="width: 100px">排序</th>
            <td>{{obj.sort}}</td>
          </tr>
          <tr>
            <th style="width: 100px">备注</th>
            <td>{{obj.remark}}</td>
          </tr>
          </tbody>
        </table>
      </div>
      </el-dialog>
  </div>
</template>
<script>
/**
 * 按钮详情
 */
import { sysResource } from '../../../api'

export default {
  data() {
    return {
      obj: {},
      showModal: false
    }
  },
  methods: {
    _open: async function(id) {
      this.showModal = true
      this.obj = await sysResource.getById(id)
    }
  }
}
</script>
