<template>
  <BasicModal
    width="1500px"
    title="新增参数"
    @register="registerModal"
    v-bind="$attrs"
    @ok="handleSubmit"
  >
    <div>
      <div class="title"><span>监测体系基本设置</span></div>
      <div><span>监测体系</span><a-select placeholder="请选择" /></div>
      <BasicTable @register="registerTable">
        <template #action="{}">
          <TableAction
            :actions="[
              {
                label: '编辑',
                // auth: 'api:yt:organization:update',
                // icon: 'clarity:note-edit-line',
                // onClick: handleEdit.bind(null, record),
              },
              {
                label: '删除',
                // auth: 'api:yt:organization:delete',
                // icon: 'ant-design:delete-outlined',
                // color: 'error',
                // popConfirm: {
                //   title: getDeleteTitle(), //是否确认删除//getDeleteTitle()
                //   confirm: handleDeleteOrBatchDelete.bind(null, record),
              },
            ]"
          />
        </template>
      </BasicTable>
    </div>
  </BasicModal>
</template>
<script lang="ts" setup>
  import { BasicModal, useModalInner } from '/@/components/Modal';
  import { BasicTable, useTable } from '/@/components/Table';
  import { configColumns } from './configTable.data';
  const [registerModal, { closeModal }] = useModalInner();

  const [registerTable] = useTable({
    title: '',
    // api: '', // 加载数据
    columns: configColumns,
    useSearchForm: false,
    showTableSetting: false,
    bordered: false,
    showIndexColumn: true,
    canResize: false,
    striped: true,
    pagination: true,
    actionColumn: {
      width: 200,
      title: '操作',
      dataIndex: 'action',
      slots: { customRender: 'action' },
      fixed: 'right',
    },
  });
  function handleSubmit() {
    closeModal();
  }
</script>
<style lang="less" scoped></style>
