新增多个控制器以支持密炼相关功能,包括报警记录、自动卸料日志、物料对应、称量校验日志、密炼机动作状态等,提供分页查询、通过ID查询及导出Excel功能,增强系统的可用性与数据管理能力。
This commit is contained in:
64
jeecgboot-vue3/src/views/xslmesMcs/mesToMcsMixPlan/index.vue
Normal file
64
jeecgboot-vue3/src/views/xslmesMcs/mesToMcsMixPlan/index.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
<MesToMcsMixPlanModal @register="registerModal" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="xslmes-mcs-mesToMcsMixPlan" setup>
|
||||
import { reactive } from 'vue';
|
||||
import { BasicTable, TableAction } from '/@/components/Table';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import MesToMcsMixPlanModal from './components/MesToMcsMixPlanModal.vue';
|
||||
import { columns, searchFormSchema } from './MesToMcsMixPlan.data';
|
||||
import { list, getExportUrl } from './MesToMcsMixPlan.api';
|
||||
|
||||
const queryParam = reactive<any>({});
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
|
||||
const { tableContext, onExportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'MES下发混炼计划',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: true,
|
||||
formConfig: {
|
||||
schemas: searchFormSchema,
|
||||
autoSubmitOnEnter: true,
|
||||
showAdvancedButton: true,
|
||||
fieldMapToTime: [
|
||||
['writeTime', ['writeTime_begin', 'writeTime_end'], 'YYYY-MM-DD HH:mm:ss'],
|
||||
['cdate', ['cdate_begin', 'cdate_end'], 'YYYY-MM-DD HH:mm:ss'],
|
||||
],
|
||||
},
|
||||
actionColumn: { width: 80, fixed: 'right' },
|
||||
beforeFetch: (params) => Object.assign(params, queryParam),
|
||||
},
|
||||
exportConfig: { name: 'MES下发混炼计划', url: getExportUrl, params: queryParam },
|
||||
});
|
||||
|
||||
const [registerTable, { reload }] = tableContext;
|
||||
const superQueryConfig = reactive({});
|
||||
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => { queryParam[k] = params[k]; });
|
||||
reload();
|
||||
}
|
||||
|
||||
function handleDetail(record: Recordable) {
|
||||
openModal(true, { record, isUpdate: true, showFooter: false });
|
||||
}
|
||||
|
||||
function getTableAction(record) {
|
||||
return [{ label: '详情', onClick: handleDetail.bind(null, record) }];
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user