feat: 全部表格开启enter自动提交查询

This commit is contained in:
louis 2024-03-08 10:41:59 +08:00
parent fdc30067de
commit e7cdafc6f1
6 changed files with 9 additions and 35 deletions

View File

@ -3,4 +3,3 @@ export enum ContractStatusEnum {
Approved = 1, // 已通过
Rejected = 2, // 已拒绝
}
// 使用es6数组方法遍历枚举

View File

@ -37,7 +37,7 @@
defineOptions({
name: 'Contract',
});
const [DynamicTable, dynamicTableInstance] = useTable();
const [DynamicTable, dynamicTableInstance] = useTable({ formProps: { autoSubmitOnEnter: true } });
const [showModal] = useFormModal();
const [fnModal] = useModal();
const isUploadPopupVisiable = ref(false);

View File

@ -36,12 +36,10 @@ import { useDictStore } from '@/store/modules/dict';
defineOptions({
name: 'Company',
});
const [DynamicTable, dynamicTableInstance] = useTable();
const [DynamicTable, dynamicTableInstance] = useTable({ formProps: { autoSubmitOnEnter: true } });
const [showModal] = useFormModal();
const [fnModal] = useModal();
const isUploadPopupVisiable = ref(false);
const dictStore = useDictStore();
// companyList;
let columns = ref<TableColumnItem[]>();
onMounted(() => {
columns.value = [

View File

@ -31,20 +31,15 @@
import { onMounted, ref, type FunctionalComponent } from 'vue';
import { DictEnum } from '@/enums/dictEnum';
import { useFormModal, useModal } from '@/hooks/useModal';
import { contractSchemas } from './formSchemas';
import { formatToDate } from '@/utils/dateUtil';
import { Button } from 'ant-design-vue';
import AttachmentManage from '@/components/business/attachment-manage/index.vue';
import AttachmentUpload from '@/components/business/attachment-upload/index.vue';
defineOptions({
name: 'MaterialsInventory',
});
const [DynamicTable, dynamicTableInstance] = useTable();
const [showModal] = useFormModal();
const [fnModal] = useModal();
const isUploadPopupVisiable = ref(false);
// contractList;
let columns = ref<TableColumnItem[]>();
onMounted(() => {
columns.value = [
@ -156,7 +151,6 @@
// schemas: contractSchemas(contractTypes.value),
// },
// });
// //
// if (record.id) {
// const info = await Api.contract.contractInfo({ id: record.id });

View File

@ -37,27 +37,11 @@
defineOptions({
name: 'Product',
});
const [DynamicTable, dynamicTableInstance] = useTable();
const [DynamicTable, dynamicTableInstance] = useTable({ formProps: { autoSubmitOnEnter: true } });
const [showModal] = useFormModal();
const [fnModal] = useModal();
const isUploadPopupVisiable = ref(false);
const dictStore = useDictStore();
let columns = ref<TableColumnItem[]>();
// const loadData = async (params): Promise<API.ProductEntity> => {
// console.log('params', params);
// return Api.product.productList(params);
// };
// const loadTableData = async (params: any) => {
// const { company, ...res } = params;
// const data = await Api.product.productList({
// ...res,
// company,
// });
// return data;
// };
const exportFormatter = (columns: TableColumn[], tableData: any[]) => {
return { header: columns.map((item) => item.title), data: [] };
};
onMounted(() => {
columns.value = [
...baseColumns,

View File

@ -36,11 +36,10 @@ import { useDictStore } from '@/store/modules/dict';
defineOptions({
name: 'Project',
});
const [DynamicTable, dynamicTableInstance] = useTable();
const [DynamicTable, dynamicTableInstance] = useTable({ formProps: { autoSubmitOnEnter: true } });
const [showModal] = useFormModal();
const [fnModal] = useModal();
const isUploadPopupVisiable = ref(false);
const dictStore = useDictStore();
// projectList;
let columns = ref<TableColumnItem[]>();
onMounted(() => {