| | |
| | | icon: 'ant-design:delete-outlined', |
| | | color: 'error', |
| | | popConfirm: { |
| | | title: '是否确认删除?', |
| | | placement: 'left', |
| | | title: '是否确认删除', |
| | | placement: 'left', |
| | | confirm: handleDelete.bind(null, record), |
| | | }, |
| | |
| | | <DeptModal @register="registerModal" @success="handleSuccess" /> |
| | | </div> |
| | | </template> |
| | | <script lang="ts"> |
| | | import { defineComponent } from 'vue'; |
| | | <script lang="ts" setup> |
| | | import { BasicTable, useTable, TableAction } from '@/components/Table'; |
| | | import { getDeptList } from '@/api/demo/system'; |
| | | |
| | | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
| | | import { getDeptList } from '/@/api/demo/system'; |
| | | |
| | | import { useModal } from '/@/components/Modal'; |
| | | import { useModal } from '@/components/Modal'; |
| | | import DeptModal from './DeptModal.vue'; |
| | | |
| | | import { columns, searchFormSchema } from './dept.data'; |
| | | |
| | | export default defineComponent({ |
| | | name: 'DeptManagement', |
| | | components: { BasicTable, DeptModal, TableAction }, |
| | | setup() { |
| | | defineOptions({ name: 'DeptManagement' }); |
| | | |
| | | const [registerModal, { openModal }] = useModal(); |
| | | const [registerTable, { reload }] = useTable({ |
| | | title: '部门列表', |
| | |
| | | function handleSuccess() { |
| | | reload(); |
| | | } |
| | | |
| | | return { |
| | | registerTable, |
| | | registerModal, |
| | | handleCreate, |
| | | handleEdit, |
| | | handleDelete, |
| | | handleSuccess, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |