| | |
| | | import { message, Modal } from 'ant-design-vue'; |
| | | import { logout } from '@/config.js'; |
| | | import EditView from './edit.vue' |
| | | import FieldView from './field.vue' |
| | | import { formatMessage } from '@/utils/localeUtils.js'; |
| | | const context = getCurrentInstance()?.appContext.config.globalProperties; |
| | | |
| | |
| | | let pageSize = 10; |
| | | const searchInput = ref("") |
| | | const editChild = ref(null) |
| | | const fieldChild = ref(null) |
| | | |
| | | let tableData = ref([]); |
| | | getPage(); |
| | |
| | | editChild.value.isSave = item == null; |
| | | } |
| | | |
| | | const handleField = () => { |
| | | fieldChild.value.open = true; |
| | | } |
| | | |
| | | const handleDel = (rows) => { |
| | | Modal.confirm({ |
| | | title: formatMessage('page.delete', '删除'), |
| | |
| | | |
| | | <template> |
| | | <div> |
| | | <FieldView ref="fieldChild" @tableReload="handleTableReload" /> |
| | | <EditView ref="editChild" @tableReload="handleTableReload" /> |
| | | <div class="table-header"> |
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" |
| | | style="width: 200px;" @search="onSearch" /> |
| | | <div class="table-header-right"> |
| | | <a-button @click="handleEdit(null)" type="primary">{{ formatMessage('page.add', '添加') }}</a-button> |
| | | <a-button @click="handleField" type="primary">{{ formatMessage('page.add.field', '添加字段') }}</a-button> |
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button> |
| | | </div> |
| | | </div> |