设备对应部位功能新增

This commit is contained in:
2026-06-03 16:28:57 +08:00
parent 1c5cede957
commit 457089e271
24 changed files with 747 additions and 7 deletions

View File

@@ -0,0 +1,10 @@
import { defHttp } from '/@/utils/http/axios';
enum Api {
list = '/xslmes/mesXslEquipPartMapping/list',
exportXls = '/xslmes/mesXslEquipPartMapping/exportXls',
}
export const list = (params) => defHttp.get({ url: Api.list, params });
export const getExportUrl = Api.exportXls;

View File

@@ -0,0 +1,20 @@
import { BasicColumn, FormSchema } from '/@/components/Table';
export const columns: BasicColumn[] = [
{ title: '设备名称', align: 'center', dataIndex: 'equipmentName', width: 180 },
{ title: '机台代号', align: 'center', dataIndex: 'machineCode', width: 140 },
{ title: '设备大部位', align: 'center', dataIndex: 'equipmentPartName', width: 160 },
{ title: '大部位代码', align: 'center', dataIndex: 'partCode', width: 120 },
{ title: '设备小部位', align: 'center', dataIndex: 'equipmentSubPartName', width: 160 },
{ title: '小部位代码', align: 'center', dataIndex: 'subPartCode', width: 120 },
{ title: '创建时间', align: 'center', dataIndex: 'createTime', width: 165 },
];
export const searchFormSchema: FormSchema[] = [
{ label: '设备名称', field: 'equipmentName', component: 'Input', colProps: { span: 6 } },
{ label: '机台代号', field: 'machineCode', component: 'Input', colProps: { span: 6 } },
{ label: '设备大部位', field: 'equipmentPartName', component: 'Input', colProps: { span: 6 } },
{ label: '设备小部位', field: 'equipmentSubPartName', component: 'Input', colProps: { span: 6 } },
{ label: '大部位代码', field: 'partCode', component: 'Input', colProps: { span: 6 } },
{ label: '小部位代码', field: 'subPartCode', component: 'Input', colProps: { span: 6 } },
];

View File

@@ -0,0 +1,45 @@
<template>
<div>
<BasicTable @register="registerTable">
<template #tableTitle>
<a-button
type="primary"
v-auth="'mes:mes_xsl_equip_part_mapping:exportXls'"
preIcon="ant-design:export-outlined"
@click="onExportXls"
>
导出
</a-button>
</template>
</BasicTable>
</div>
</template>
<script lang="ts" name="xslmes-mesXslEquipPartMapping" setup>
import { BasicTable } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, searchFormSchema } from './MesXslEquipPartMapping.data';
import { list, getExportUrl } from './MesXslEquipPartMapping.api';
const { tableContext, onExportXls } = useListPage({
tableProps: {
title: '设备对应部位',
api: list,
columns,
canResize: true,
showActionColumn: false,
formConfig: {
schemas: searchFormSchema,
labelWidth: 120,
autoSubmitOnEnter: true,
showAdvancedButton: true,
},
},
exportConfig: {
name: '设备对应部位',
url: getExportUrl,
},
});
const [registerTable] = tableContext;
</script>