- 添加企业信息模型定义,包含企业基本信息、联系方式、行业分类等字段 - 实现企业信息的增删改查接口,支持分页查询和批量操作 - 开发企业信息管理页面,包含表格展示、搜索筛选功能 - 添加企业信息编辑弹窗,支持新增和修改企业信息 - 实现企业信息导入功能,支持Excel文件批量导入 - 添加企业信息导入模板下载功能 - 实现企业信息的状态管理和排序功能 - 添加企业信息的详情展示和操作按钮 - 实现企业信息的批量删除功能 - 添加企业信息的搜索功能,支持关键词模糊查询
99 lines
2.0 KiB
Vue
99 lines
2.0 KiB
Vue
<!-- 信用模块通用工具栏 -->
|
|
<template>
|
|
<a-space :size="10" style="flex-wrap: wrap">
|
|
<a-button type="primary" class="ele-btn-icon" @click="add">
|
|
<template #icon>
|
|
<PlusOutlined />
|
|
</template>
|
|
<span>添加</span>
|
|
</a-button>
|
|
<a-button class="ele-btn-icon" @click="openImport">
|
|
<template #icon>
|
|
<CloudUploadOutlined />
|
|
</template>
|
|
<span>导入</span>
|
|
</a-button>
|
|
<a-button class="ele-btn-icon" @click="exportData">
|
|
<template #icon>
|
|
<CloudDownloadOutlined />
|
|
</template>
|
|
<span>导出</span>
|
|
</a-button>
|
|
<a-button
|
|
danger
|
|
class="ele-btn-icon"
|
|
:disabled="!selection?.length"
|
|
@click="remove"
|
|
>
|
|
<template #icon>
|
|
<DeleteOutlined />
|
|
</template>
|
|
<span>批量删除</span>
|
|
</a-button>
|
|
<a-input-search
|
|
allow-clear
|
|
v-model:value="keywords"
|
|
placeholder="请输入关键词"
|
|
style="width: 220px"
|
|
@search="handleSearch"
|
|
@pressEnter="handleSearch"
|
|
/>
|
|
</a-space>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { computed, ref } from 'vue';
|
|
import {
|
|
PlusOutlined,
|
|
CloudUploadOutlined,
|
|
CloudDownloadOutlined,
|
|
DeleteOutlined
|
|
} from '@ant-design/icons-vue';
|
|
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
selection?: any[];
|
|
}>(),
|
|
{
|
|
selection: () => []
|
|
}
|
|
);
|
|
|
|
const emit = defineEmits<{
|
|
(e: 'search', where?: { keywords?: string }): void;
|
|
(e: 'add'): void;
|
|
(e: 'remove'): void;
|
|
(e: 'batchMove'): void;
|
|
(e: 'importData'): void;
|
|
(e: 'exportData'): void;
|
|
}>();
|
|
|
|
const keywords = ref('');
|
|
const selection = computed(() => props.selection || []);
|
|
|
|
// 新增
|
|
const add = () => {
|
|
emit('add');
|
|
};
|
|
|
|
// 搜索
|
|
const handleSearch = () => {
|
|
emit('search', { keywords: keywords.value });
|
|
};
|
|
|
|
// 导入
|
|
const openImport = () => {
|
|
emit('importData');
|
|
};
|
|
|
|
// 导出
|
|
const exportData = () => {
|
|
emit('exportData');
|
|
};
|
|
|
|
// 批量删除
|
|
const remove = () => {
|
|
emit('remove');
|
|
};
|
|
</script>
|