feat(credit): 新增企业信用管理模块

- 添加企业信息模型定义,包含企业基本信息、联系方式、行业分类等字段
- 实现企业信息的增删改查接口,支持分页查询和批量操作
- 开发企业信息管理页面,包含表格展示、搜索筛选功能
- 添加企业信息编辑弹窗,支持新增和修改企业信息
- 实现企业信息导入功能,支持Excel文件批量导入
- 添加企业信息导入模板下载功能
- 实现企业信息的状态管理和排序功能
- 添加企业信息的详情展示和操作按钮
- 实现企业信息的批量删除功能
- 添加企业信息的搜索功能,支持关键词模糊查询
This commit is contained in:
2025-12-21 20:47:20 +08:00
parent 5872043040
commit 3c8ede258c
89 changed files with 14378 additions and 171 deletions

234
src/views/led/index.vue Normal file
View File

@@ -0,0 +1,234 @@
<template>
<div class="ele-body">
<div class="flex flex-col justify-center items-center mt-10">
<div class="text-4xl">广西医科大学第一附属医院</div>
<div class="text-2xl my-5">门诊医生一周内停替诊公布</div>
<ele-pro-table
ref="tableRef"
row-key="id"
:columns="columns"
:datasource="datasource"
:customRow="customRow"
tool-class="ele-toolbar-form"
class="sys-org-table"
/>
<div class="text-2xl my-5">门诊医生当天剩余号源公布</div>
<ele-pro-table
ref="tableRef"
row-key="id"
:columns="columns"
:datasource="datasource"
:customRow="customRow"
tool-class="ele-toolbar-form"
class="sys-org-table"
/>
</div>
</div>
</template>
<script lang="ts" setup>
import { createVNode, ref } from 'vue';
import { message, Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import type { EleProTable } from 'ele-admin-pro';
import { toTreeData } from 'ele-admin-pro';
import { useI18n } from 'vue-i18n';
import type {
DatasourceFunction,
ColumnItem
} from 'ele-admin-pro/es/ele-pro-table/types';
import { pageCmsAd, removeCmsAd, removeBatchCmsAd } from '@/api/cms/cmsAd';
import type { CmsAd, CmsAdParam } from '@/api/cms/cmsAd/model';
import { CmsNavigation } from '@/api/cms/cmsNavigation/model';
import { listCmsNavigation } from '@/api/cms/cmsNavigation';
import { stopReplace } from '@/api/led';
// 表格实例
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
// 国际化
const { locale } = useI18n();
// 表格选中数据
const selection = ref<CmsAd[]>([]);
// 当前编辑数据
const current = ref<CmsAd | null>(null);
// 是否显示编辑弹窗
const showEdit = ref(false);
// 是否显示批量移动弹窗
const showMove = ref(false);
// 栏目数据
const navigationList = ref<CmsNavigation[]>();
// 加载状态
const loading = ref(true);
// 表格数据源
const datasource: DatasourceFunction = ({
page,
limit,
where,
orders
}) => {
where.startDate = '2025-01-01';
where.endDate = '2025-06-30';
return stopReplace({
...where,
...orders,
page,
limit
});
};
// 表格列配置
const columns = ref<ColumnItem[]>([
{
title: '出诊时间',
width: 180,
align: 'center'
},
{
title: '科室',
dataIndex: 'name',
key: 'name',
align: 'center',
ellipsis: true,
width: 180
},
{
title: '时段',
dataIndex: 'type',
key: 'type',
align: 'center',
width: 120
},
{
title: '医生',
dataIndex: 'images',
key: 'images',
width: 120,
align: 'center'
},
{
title: '职称',
dataIndex: 'categoryId',
key: 'categoryId',
align: 'center',
width: 180
},
{
title: '替诊医生',
dataIndex: 'status',
key: 'status',
align: 'center',
width: 120
},
{
title: '替诊职称',
key: 'action',
width: 120,
align: 'center'
}
]);
/* 搜索 */
const reload = (where?: CmsAdParam) => {
selection.value = [];
tableRef?.value?.reload({ where: where });
};
/* 打开编辑弹窗 */
const openEdit = (row?: CmsAd) => {
current.value = row ?? null;
showEdit.value = true;
};
/* 打开批量移动弹窗 */
const openMove = () => {
showMove.value = true;
};
/* 删除单个 */
const remove = (row: CmsAd) => {
const hide = message.loading('请求中..', 0);
removeCmsAd(row.adId)
.then((msg) => {
hide();
message.success(msg);
reload();
})
.catch((e) => {
hide();
message.error(e.message);
});
};
/* 批量删除 */
const removeBatch = () => {
if (!selection.value.length) {
message.error('请至少选择一条数据');
return;
}
Modal.confirm({
title: '提示',
content: '确定要删除选中的记录吗?',
icon: createVNode(ExclamationCircleOutlined),
maskClosable: true,
onOk: () => {
const hide = message.loading('请求中..', 0);
removeBatchCmsAd(selection.value.map((d) => d.adId))
.then((msg) => {
hide();
message.success(msg);
reload();
})
.catch((e) => {
hide();
message.error(e.message);
});
}
});
};
/* 查询 */
const query = () => {
loading.value = true;
// 加载栏目数据
if (!navigationList.value) {
listCmsNavigation({}).then((res) => {
navigationList.value = toTreeData({
data: res?.map((d) => {
d.value = d.navigationId;
d.label = d.title;
if (!d.component) {
d.disabled = true;
}
return d;
}),
idField: 'navigationId',
parentIdField: 'parentId'
});
});
}
};
/* 自定义行属性 */
const customRow = (record: CmsAd) => {
return {
// 行点击事件
onClick: () => {
// console.log(record);
},
// 行双击事件
onDblclick: () => {
openEdit(record);
}
};
};
query();
</script>
<script lang="ts">
export default {
name: 'CmsAd'
};
</script>
<style lang="less" scoped></style>