#
Junjie
2024-07-08 3f6e622083cd63400fd3fc8f5dee4f4c5f2a4ab9
zy-asrs-admin/src/views/base/mat/index.vue
@@ -5,6 +5,7 @@
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;
@@ -15,6 +16,7 @@
let pageSize = 10;
const searchInput = ref("")
const editChild = ref(null)
const fieldChild = ref(null)
let tableData = ref([]);
getPage();
@@ -272,6 +274,10 @@
  editChild.value.isSave = item == null;
}
const handleField = () => {
  fieldChild.value.open = true;
}
const handleDel = (rows) => {
  Modal.confirm({
    title: formatMessage('page.delete', '删除'),
@@ -330,12 +336,14 @@
<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>