<template>
  <sd-oa-table
    form-id="iamViewPermission"
    page-id="core/viewpermission/iamViewPermission"
    :columns="columns"
    :actions="actions"
    show-selection
    :search-fields="[]"
  >
    <template v-slot:form="{ model }">
      <!-- 表单ID -->
      <sd-form-item name="formId" />
      <!-- 模块名称 -->
      <sd-form-item name="moduleName" />
      <!-- 选择机构ID -->
      <sd-form-item name="selectOrgId" />
      <!-- 选择部门名称 -->
      <sd-form-item name="selectOrgName" />
      <!-- 查看范围 -->
      <sd-form-item name="viewScope" />
      <!-- 上级可查 -->
      <sd-form-item name="isParentView" />
      <!-- 下级可查 -->
      <sd-form-item name="isChildView" />
      <!-- 授权单位ID -->
      <sd-form-item name="authorityOrgId" :colspan="3">
        <a-textarea v-model="model.authorityOrgId" />
      </sd-form-item>
      <!-- 授权单位名称 -->
      <sd-form-item name="authorityOrgName" :colspan="3">
        <a-textarea v-model="model.authorityOrgName" />
      </sd-form-item>
      <!-- 审计分级机构ID
          <sd-form-item name="auditOrgId" />
           -->
      <!-- 扩展文本字段
          <sd-form-item name="reservestring1" />

          <sd-form-item name="reservestring2" />

          <sd-form-item name="reservestring3" />

          <sd-form-item name="reservestring4" />

          <sd-form-item name="reservestring5" />
           -->
      <!-- 扩展数字字段
          <sd-form-item name="reservelong1" />

          <sd-form-item name="reservelong2" />

          <sd-form-item name="reservelong3" />

          <sd-form-item name="reservelong4" />

          <sd-form-item name="reservelong5" />
           -->
    </template>
    <span slot="AppointmentTime" slot-scope="appointmentTime">
      {{ appointmentTime | sdDateFormat('YYYY-MM-DD HH:mm') }}
    </span>
  </sd-oa-table>
</template>

<script>
import TableActionTypes from '@/common/services/table-action-types'
import components from './_import-components/iam-audit-viewpermission-import'

export default {
  name: 'IamAuditViewpermission',
  metaInfo: {
    title: '查看权限',
  },
  components,
  data() {
    return {
      columns: [],
      actions: [
        {
          label: '新建',
          id: 'new',
          type: TableActionTypes.oa.create, // 新建按钮，不需要回调，自动处理
        },
        {
          label: '删除',
          id: 'delete',
          type: TableActionTypes.oa.delete, // 删除按钮，不需要回调，会自动处理
        },
      ],
    }
  },
  created() {},
  methods: {},
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
</style>
