feat: 全部表格开启enter自动提交查询
This commit is contained in:
parent
fdc30067de
commit
e7cdafc6f1
|
@ -3,4 +3,3 @@ export enum ContractStatusEnum {
|
||||||
Approved = 1, // 已通过
|
Approved = 1, // 已通过
|
||||||
Rejected = 2, // 已拒绝
|
Rejected = 2, // 已拒绝
|
||||||
}
|
}
|
||||||
// 使用es6数组方法遍历枚举
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Contract',
|
name: 'Contract',
|
||||||
});
|
});
|
||||||
const [DynamicTable, dynamicTableInstance] = useTable();
|
const [DynamicTable, dynamicTableInstance] = useTable({ formProps: { autoSubmitOnEnter: true } });
|
||||||
const [showModal] = useFormModal();
|
const [showModal] = useFormModal();
|
||||||
const [fnModal] = useModal();
|
const [fnModal] = useModal();
|
||||||
const isUploadPopupVisiable = ref(false);
|
const isUploadPopupVisiable = ref(false);
|
||||||
|
|
|
@ -36,12 +36,10 @@ import { useDictStore } from '@/store/modules/dict';
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Company',
|
name: 'Company',
|
||||||
});
|
});
|
||||||
const [DynamicTable, dynamicTableInstance] = useTable();
|
const [DynamicTable, dynamicTableInstance] = useTable({ formProps: { autoSubmitOnEnter: true } });
|
||||||
const [showModal] = useFormModal();
|
const [showModal] = useFormModal();
|
||||||
const [fnModal] = useModal();
|
const [fnModal] = useModal();
|
||||||
const isUploadPopupVisiable = ref(false);
|
const isUploadPopupVisiable = ref(false);
|
||||||
const dictStore = useDictStore();
|
|
||||||
// companyList;
|
|
||||||
let columns = ref<TableColumnItem[]>();
|
let columns = ref<TableColumnItem[]>();
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
columns.value = [
|
columns.value = [
|
||||||
|
|
|
@ -31,20 +31,15 @@
|
||||||
import { onMounted, ref, type FunctionalComponent } from 'vue';
|
import { onMounted, ref, type FunctionalComponent } from 'vue';
|
||||||
import { DictEnum } from '@/enums/dictEnum';
|
import { DictEnum } from '@/enums/dictEnum';
|
||||||
import { useFormModal, useModal } from '@/hooks/useModal';
|
import { useFormModal, useModal } from '@/hooks/useModal';
|
||||||
import { contractSchemas } from './formSchemas';
|
|
||||||
import { formatToDate } from '@/utils/dateUtil';
|
|
||||||
import { Button } from 'ant-design-vue';
|
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({
|
defineOptions({
|
||||||
name: 'MaterialsInventory',
|
name: 'MaterialsInventory',
|
||||||
});
|
});
|
||||||
const [DynamicTable, dynamicTableInstance] = useTable();
|
const [DynamicTable, dynamicTableInstance] = useTable();
|
||||||
const [showModal] = useFormModal();
|
|
||||||
const [fnModal] = useModal();
|
const [fnModal] = useModal();
|
||||||
const isUploadPopupVisiable = ref(false);
|
const isUploadPopupVisiable = ref(false);
|
||||||
|
|
||||||
// contractList;
|
|
||||||
let columns = ref<TableColumnItem[]>();
|
let columns = ref<TableColumnItem[]>();
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
columns.value = [
|
columns.value = [
|
||||||
|
@ -156,7 +151,6 @@
|
||||||
// schemas: contractSchemas(contractTypes.value),
|
// schemas: contractSchemas(contractTypes.value),
|
||||||
// },
|
// },
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// // 如果是编辑的话,需要获取角色详情
|
// // 如果是编辑的话,需要获取角色详情
|
||||||
// if (record.id) {
|
// if (record.id) {
|
||||||
// const info = await Api.contract.contractInfo({ id: record.id });
|
// const info = await Api.contract.contractInfo({ id: record.id });
|
||||||
|
|
|
@ -37,27 +37,11 @@
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Product',
|
name: 'Product',
|
||||||
});
|
});
|
||||||
const [DynamicTable, dynamicTableInstance] = useTable();
|
const [DynamicTable, dynamicTableInstance] = useTable({ formProps: { autoSubmitOnEnter: true } });
|
||||||
const [showModal] = useFormModal();
|
const [showModal] = useFormModal();
|
||||||
const [fnModal] = useModal();
|
const [fnModal] = useModal();
|
||||||
const isUploadPopupVisiable = ref(false);
|
const isUploadPopupVisiable = ref(false);
|
||||||
const dictStore = useDictStore();
|
|
||||||
let columns = ref<TableColumnItem[]>();
|
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(() => {
|
onMounted(() => {
|
||||||
columns.value = [
|
columns.value = [
|
||||||
...baseColumns,
|
...baseColumns,
|
||||||
|
|
|
@ -36,11 +36,10 @@ import { useDictStore } from '@/store/modules/dict';
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Project',
|
name: 'Project',
|
||||||
});
|
});
|
||||||
const [DynamicTable, dynamicTableInstance] = useTable();
|
const [DynamicTable, dynamicTableInstance] = useTable({ formProps: { autoSubmitOnEnter: true } });
|
||||||
const [showModal] = useFormModal();
|
const [showModal] = useFormModal();
|
||||||
const [fnModal] = useModal();
|
const [fnModal] = useModal();
|
||||||
const isUploadPopupVisiable = ref(false);
|
const isUploadPopupVisiable = ref(false);
|
||||||
const dictStore = useDictStore();
|
|
||||||
// projectList;
|
// projectList;
|
||||||
let columns = ref<TableColumnItem[]>();
|
let columns = ref<TableColumnItem[]>();
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
Loading…
Reference in New Issue