diff --git a/hx-ai-intelligent/public/asset/file/carbonAssets.xlsx b/hx-ai-intelligent/public/asset/file/carbonAssets.xlsx new file mode 100644 index 0000000..200c364 Binary files /dev/null and b/hx-ai-intelligent/public/asset/file/carbonAssets.xlsx differ diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue index 05bbc92..d2c5c2e 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue @@ -48,68 +48,27 @@
-
-
交易明细
-
- 新增 - - 导入 - - 导出 - 批量删除 -
-
- + - - +
配额统计
-
- 全国配额 - 地方配额 - CCER配额 +
+ 全国配额 + 地方配额 + CCER配额
@@ -155,13 +114,25 @@ - + - + - + (); - const thisYear = ref(new Date().getFullYear().toString()); + const year = ref(new Date().getFullYear().toString()); const queryParams = ref({ pageNum: 1, pageSize: 10, orgId: orgId.value, accountType: props.parentId, - year: thisYear.value, + year: year.value, }); const searchTableList = () => { - getDetailList(); + year.value = queryParams.value.year; + transactionType.value = queryParams.value.transactionType; + accountType.value = queryParams.value.accountType; + mainRef.value?.nsTableRef.reload(); + // getDetailList(); }; // 获取左侧列表数据 const getDetailList = () => { @@ -239,10 +214,11 @@ total.value = res.data.total; }); }; - getDetailList(); + // getDetailList(); const columns = [ { title: '序号', + width: 80, customRender: (text: any) => { return text.index + 1; }, @@ -298,9 +274,14 @@ pageNum: 1, pageSize: 10, orgId: orgId.value, - year: new Date().getFullYear(), + accountType: props.parentId, + year: new Date().getFullYear().toString(), }; - getDetailList(); + accountType.value = props.parentId; + year.value = new Date().getFullYear(); + transactionType.value = ''; + mainRef.value?.nsTableRef.reload(); + // getDetailList(); }; const editData = (record) => { getDictList(); @@ -378,6 +359,196 @@ }, }); }; + + const mainRef = ref(); + const transactionType = ref(); + const accountType = ref(); + accountType.value = props.parentId; + const tableConfig = ref({ + title: '数据库', + api: carbonAssets.carbonDetailsList, + params: { + orgId, + accountType, + year, + }, + headerActions: [ + { + label: '新增', + name: 'userAdd', + type: 'primary', + handle: () => { + text.value = '新增'; + visible.value = true; + getDictList(); + }, + }, + { + label: '导入', + type: 'primary', + name: 'carbonAssetsImport', + extra: { + api: carbonAssets.import, // 导入接口名 + params: { + orgId, + }, + title: '碳资产', // 弹窗title + templateName: 'carbonAssets', // 所使用的文件名称 + indexName: '碳资产', // 匹配类型字段 + message: [ + { label: '1、若必填项未填写,则不能进行导入操作' }, + { label: `2、当重复时,则更新数据。` }, + { label: '3、数据将从模版的第五行进行导入。' }, + { label: '4、文件导入勿超过5MB。' }, + ], + }, + }, + { + label: '导出', + type: 'primary', + handle: () => { + const exportQuery = ref({ + orgId: orgId.value, + pageNum: 1, + pageSize: 999, + year: queryParams.value.year, + ids: selectedRowKeys.value, + }); + const config = { + responseType: 'blob', + }; + fetch(carbonAssets.export, exportQuery.value, config) + .then((res) => { + // 创建一个 URL 对象,指向图片数据的 blob + const url = window.URL.createObjectURL(new Blob([res])); + // 创建一个 标签,用于触发下载 + const link = document.createElement('a'); + link.href = url; + link.setAttribute('download', 'carbonTradeDetails.xlsx'); // 设置下载的文件名 + document.body.appendChild(link); + link.click(); + + // 清理 URL 对象 + window.URL.revokeObjectURL(url); + selectedRowKeys.value = []; + }) + .catch((error) => { + console.error('下载失败:', error); + }); + }, + }, + { + label: '批量删除', + type: 'primary', + name: 'userBatchDel', + dynamicDisabled: (data: any) => { + return data.list.length === 0; + }, + confirm: true, + isReload: true, + isClearCheck: true, + api: carbonAssets.delete, + dynamicParams: { ids: 'id[]' }, + }, + ], + columns: [ + { + title: '序号', + width: 80, + customRender: (text: any) => { + return text.index + 1; + }, + }, + { + title: '资产类别', + dataIndex: 'accountType', + }, + { + title: '交易方式', + dataIndex: 'transactionTypeName', + }, + { + title: '交易日期', + dataIndex: 'transactionDate', + sorter: (a, b) => a.transactionDate - b.transactionDate, + }, + { + title: '本期收入(tCO2)', + dataIndex: 'income', + sorter: (a, b) => a.income - b.income, + }, + { + title: '本期支出(tCO2)', + dataIndex: 'expenditure', + sorter: (a, b) => a.expenditure - b.expenditure, + }, + { + title: '发生金额(¥)', + dataIndex: 'amountIncurredValue', + }, + { + title: '交易对象', + dataIndex: 'tradingPartner', + }, + { + title: '更新人', + dataIndex: 'updateUser', + }, + { + title: '更新时间', + dataIndex: 'updateTime', + }, + ], + columnActions: { + title: '操作', + actions: [ + { + label: '编辑', + name: 'userEdit', + handle: (record: any) => { + getDictList(); + text.value = '编辑'; + visible.value = true; + formState.value.id = record.id; + fetch(uploadPic.select, { bizId: record.id, bizType: 1 }).then((res) => { + fileList.value = res.data.map((item) => ({ + uid: item.id.toString(), // 使用文件的id作为唯一标识 + name: item.fileName, // 文件名 + status: 'done', // 设置默认状态为已完成 + type: 'done', + url: item.filePath, // 文件的URL,这里假设用示例的URL格式 + })); + }); + formState.value = JSON.parse(JSON.stringify(record)); + if (formState.value.expenditure === 0) { + formState.value.transactionQuantity = formState.value.income; + } else { + formState.value.transactionQuantity = formState.value.expenditure; + } + setTimeout(() => { + let selectDevice = ref([Number(formState.value.transactionType)]); + findParentIds(options.value, formState.value.transactionType, selectDevice.value); + formState.value.transactionType = selectDevice; + formState.value.transactionType = formState.value.transactionType; + }, 500); + }, + }, + { + label: '删除', + name: 'userDelete', + dynamicParams: { ids: 'id[]' }, + confirm: true, + isReload: true, + api: carbonAssets.delete, + }, + ], + }, + formConfig: { + schemas: [], + params: {}, + }, + rowKey: 'id', + }); // 分页器 const onChange = (pageNumber: number, size: number) => { queryParams.value.pageNum = pageNumber; @@ -492,6 +663,12 @@ }); fileList.value = newFileList; }; + const handleKeyDown = (event: KeyboardEvent) => { + // Check if the pressed key is a space + if (event.code === 'Space') { + event.preventDefault(); + } + }; const onSubmit = () => { formRef.value .validate() @@ -625,7 +802,7 @@ height: 16%; } .detailTable { - width: 65%; + width: 70%; margin-right: 20px; height: 100%; background: white; @@ -633,10 +810,27 @@ padding: 16px; } .total { - width: calc(35% - 20px); + width: calc(30% - 20px); height: 100%; background: white; border-radius: 12px; padding: 16px; } + :deep(.ns-table-search) { + display: none; + } + :deep(.ns-table-header) { + padding-top: unset !important; + align-items: unset !important; + padding-bottom: 10px; + height: unset !important; + } + :deep(.ns-basic-table) { + padding-top: unset !important; + } + :deep(.ns-table-main) { + padding: unset !important; + margin: unset !important; + border-radius: unset !important; + } diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/indexCopy.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index1.vue similarity index 85% rename from hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/indexCopy.vue rename to hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index1.vue index fd85219..05bbc92 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/indexCopy.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index1.vue @@ -48,8 +48,60 @@
- - +
+
交易明细
+
+ 新增 + + 导入 + + 导出 + 批量删除 +
+
+ + + +
@@ -187,7 +239,7 @@ total.value = res.data.total; }); }; - // getDetailList(); + getDetailList(); const columns = [ { title: '序号', @@ -326,129 +378,6 @@ }, }); }; - - const mainRef = ref(); - const tableConfig = ref({ - title: '数据库', - api: carbonAssets.carbonDetailsList, - params: { - orgId, - }, - headerActions: [ - { - label: '新增', - name: 'userAdd', - type: 'primary', - handle: () => { - }, - }, - { - label: '导入', - type: 'primary', - name: 'carbonEmissionFactorLibraryImport', - extra: { - api: carbonEmissionFactorLibrary.import, // 导入接口名 - params: { - orgId, - }, - title: '排放源', // 弹窗title - templateName: 'emissionSource', // 所使用的文件名称 - indexName: '设备id', // 匹配类型字段 - message: [ - { label: '1、若必填项未填写,则不能进行导入操作' }, - { label: `2、当重复时,则更新数据。` }, - { label: '3、数据将从模版的第五行进行导入。' }, - { label: '4、文件导入勿超过5MB。' }, - ], - }, - }, - { - label: '导出', - type: 'primary', - handle: () => { - }, - }, - { - label: '批量删除', - type: 'primary', - name: 'userBatchDel', - dynamicDisabled: (data: any) => { - return data.list.length === 0; - }, - confirm: true, - isReload: true, - isClearCheck: true, - api: carbonEmissionFactorLibrary.del, - dynamicParams: { ids: 'id[]' }, - }, - ], - columns: [ - { - title: '序号', - customRender: (text: any) => { - return text.index + 1; - }, - }, - { - title: '资产类别', - dataIndex: 'accountType', - }, - { - title: '交易方式', - dataIndex: 'transactionTypeName', - }, - { - title: '交易日期', - dataIndex: 'transactionDate', - sorter: (a, b) => a.transactionDate - b.transactionDate, - }, - { - title: '本期收入(tCO2)', - dataIndex: 'income', - sorter: (a, b) => a.income - b.income, - }, - { - title: '本期支出(tCO2)', - dataIndex: 'expenditure', - sorter: (a, b) => a.expenditure - b.expenditure, - }, - { - title: '发生金额(¥)', - dataIndex: 'amountIncurredValue', - }, - { - title: '交易对象', - dataIndex: 'tradingPartner', - }, - { - title: '更新人', - dataIndex: 'updateUser', - }, - { - title: '更新时间', - dataIndex: 'updateTime', - }, - ], - columnActions: { - title: '操作', - actions: [ - { - label: '编辑', - name: 'userEdit', - handle: (record: any) => {}, - }, - { - label: '删除', - name: 'userDelete', - dynamicParams: { ids: 'id[]' }, - confirm: true, - isReload: true, - api: carbonEmissionFactorLibrary.del, - }, - ], - }, - rowKey: 'id', - }); // 分页器 const onChange = (pageNumber: number, size: number) => { queryParams.value.pageNum = pageNumber; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/config.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/config.ts index 8d88d3c..25fdcf1 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/config.ts +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/config.ts @@ -15,7 +15,7 @@ export const formConfig = (disabled) => { component: 'NsInput', componentProps: { placeholder: '请输入排放源', - maxLength: 20, + maxLength: 5, }, rules: [ { @@ -92,7 +92,7 @@ export const formConfig = (disabled) => { component: 'NsInput', componentProps: { placeholder: '请输入排放环节', - maxLength: 20, + maxLength: 5, }, rules: [ { @@ -107,7 +107,7 @@ export const formConfig = (disabled) => { component: 'NsInputNumber', componentProps: { placeholder: '请输入排放因子值', - maxLength: 20, + maxLength: 5, }, rules: [ { @@ -154,7 +154,7 @@ export const formConfig = (disabled) => { component: 'NsInput', componentProps: { placeholder: '请输入碳排后缀', - maxLength: 20, + maxLength: 10, }, rules: [ { diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue index e09c09b..773d362 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue @@ -27,6 +27,7 @@ :tree-data="gData" :checkedKeys="checkedTreeNodeKeys" :selectedKeys="selectedKeys" + :show-line="{ showLeafIcon: false }" @dragenter="onDragEnter" @drop="onDrop" @check="checkTreeNode" @@ -164,6 +165,7 @@ :expanded-keys="unitExpandedKeys" :selectedKeys="unitSelectedKeys" :tree-data="unitTreeData" + :show-line="{ showLeafIcon: false }" v-if="unitTreeData && unitTreeData.length > 0" class="draggable-tree" block-node> @@ -198,7 +200,11 @@ - + @@ -211,7 +217,11 @@ - + { + // Check if the pressed key is a space + if (event.code === 'Space') { + event.preventDefault(); + } + }; const unitOrGroupOk = () => { unitFormRef.value .validate() diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts index 6f69329..42621d2 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts @@ -76,7 +76,7 @@ export const tableColumns = [ { title: '操作', key: 'action', - width: 130 + width: 130, }, ]; // 碳排速算表表头 @@ -119,7 +119,7 @@ export const columns = [ { title: '操作', key: 'action', - width: 130 + width: 130, }, ]; // 碳排速算新增页中表头 @@ -131,6 +131,7 @@ export const drawerColumns = [ { title: '因子值', dataIndex: 'emissionFactors', + key: 'emissionFactors', }, { title: '排放环节', @@ -142,4 +143,4 @@ export const drawerColumns = [ className: 'dataSources', dataIndex: 'dataSources', }, -]; \ No newline at end of file +]; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue index b4bd901..3454b15 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue @@ -22,7 +22,11 @@ :label-col="labelCol" :wrapper-col="wrapperCol"> - + @@ -250,6 +254,12 @@ isComputeCarbon: [{ required: true, message: '请选择是否计算碳排', trigger: 'change' }], unit: [{ required: true, message: '请选择计量单位', trigger: 'change' }], }; + const handleKeyDown = (event: KeyboardEvent) => { + // Check if the pressed key is a space + if (event.code === 'Space') { + event.preventDefault(); + } + }; // 排放类型的变量 const emissionTypeDic = ref(); // 计量单位的变量 @@ -259,15 +269,15 @@ // 年份选择改变触发 const changeYearData = () => { queryParams.value.year = selectYear.value; - getTableList(); + // getTableList(); }; const mainRef = ref(); const year = selectYear.value.format('YYYY'); const tableConfig = ref({ title: '能耗统计', api: energyConsumption.pageList, - rowSelection: null, params: queryParams.value, + rowSelection: null, headerActions: [ { label: '新增', @@ -690,10 +700,10 @@ field: 'year', label: '年份', component: 'NsDatePicker', + defaultValue: selectYear.value.format('YYYY'), componentProps: { picker: 'year', valueFormat: 'YYYY', - defaultValue: selectYear.value.format('YYYY'), }, }, ], diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue index 9d62f58..5350ea0 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue @@ -130,6 +130,11 @@ type: 'radio', }" :pagination="false"> + -
+
+ :scroll="{ y: 380 }"> @@ -162,7 +168,7 @@ -
+
@@ -193,6 +199,7 @@ :selectedKeys="categorySelectedKeys" :checkedKeys="categoryCheckedKeys" :tree-data="categoryTreeData" + :show-line="{ showLeafIcon: false }" v-if="categoryTreeData && categoryTreeData.length > 0" class="draggable-tree" @check="checkTreeNode" @@ -230,7 +237,11 @@ :label-col="labelCol" :wrapper-col="wrapperCol"> - + @@ -317,7 +328,11 @@ - + @@ -351,7 +366,10 @@ - + @@ -381,6 +399,11 @@ type: 'radio', }" :pagination="false"> +
{ treeData.value = res.data; if (changeSelectedKeys.value) { - selectedKeysR.value = [`0-${treeData.value.length - 1}`]; + selectedKeysR.value = [`0-0-${treeData.value[0].children.length - 1}`]; changeSelectedKeys.value = false; - getTableId.value = res.data[res.data.length - 1].id; + getTableId.value = res.data[0].children[res.data[0].children.length - 1].id; + bizId.value = res.data[0].children[res.data[0].children.length - 1].id; if (res.data.length != 0) { getPFYTableList(getTableId.value); getTableHeardUnit(getTableId.value); @@ -616,8 +640,9 @@ columns.value[3].title = '排放量'; } } else { - selectedKeysR.value = ['0-0']; - getTableId.value = res.data[0].id; + selectedKeysR.value = ['0-0-0']; + getTableId.value = res.data[0].children[0].id; + bizId.value = res.data[0].children[0].id; if (res.data.length != 0) { getPFYTableList(getTableId.value); getTableHeardUnit(getTableId.value); @@ -634,6 +659,7 @@ const onSelectR = (selectedKey: string[], info: any) => { selectedKeysR.value = selectedKey; getTableId.value = info.selectedNodes[0].id; + bizId.value = info.selectedNodes[0].id; getPFYTableList(getTableId.value); getTableHeardUnit(getTableId.value); }; @@ -647,8 +673,8 @@ } }); }; - const expandedKeysR = ref([]); - const selectedKeysR = ref(['0-0']); + const expandedKeysR = ref(['0-0']); + const selectedKeysR = ref(['0-0-0']); const checkedKeys = ref([]); watch(expandedKeysR, () => { console.log('expandedKeysR', expandedKeysR); @@ -778,6 +804,12 @@ groupData.value = res.data; }); }; + const handleKeyDown = (event: KeyboardEvent) => { + // Check if the pressed key is a space + if (event.code === 'Space') { + event.preventDefault(); + } + }; const onSubmit = () => { formRef.value .validate() @@ -945,10 +977,13 @@ }; // 点击凭证弹出框 const openVoucher = ref(false); + const bizId = ref(); const downLoadVoucher = () => { - fetch(carbonInventoryCheck.voucherDownloadList, { bizType: 2 }).then((res) => { - voucherData.value = res.data; - }); + fetch(carbonInventoryCheck.voucherDownloadList, { bizType: 2, bizId: bizId.value }).then( + (res) => { + voucherData.value = res.data; + }, + ); openVoucher.value = true; }; const selectedRowKeys = ref([]); @@ -1061,6 +1096,7 @@ canEdit.value = true; automatic.value = true; } else { + canEdit.value = false; automatic.value = false; } }; @@ -1220,6 +1256,8 @@ reportId: props.reportId, year: props.year, categoryId: categoryId.value, + startTime: props.startTime, + endTime: props.endTime, }); const linksData = ref([]); const datalist = ref([]); @@ -1243,6 +1281,8 @@ reportId: props.reportId, year: props.year, categoryId: categoryId.value, + startTime: props.startTime, + endTime: props.endTime, }); const tableHeader = ref([]); const getEmissionStatistic = () => { @@ -1556,7 +1596,7 @@ width: 300px; margin-right: @ns-gap; min-width: fit-content; - height: 93%; + height: 100%; border-radius: 8px; background: rgba(255, 255, 255, 1); box-shadow: 0px 2px 20px rgb(69 123 234 / 20%); @@ -1645,7 +1685,7 @@ .right { flex: 1; min-width: 0; - height: 93%; + height: 100%; border-radius: 8px; background: rgba(255, 255, 255, 1); box-shadow: 0px 2px 20px rgb(69 123 234 / 20%); diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue index b179f13..b8971e5 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue @@ -20,7 +20,9 @@ :footer-style="{ textAlign: 'right' }" destroyOnClose @close="onClose"> -
{{text}}
+
{{ text }}
- + - + { if (formState.value.reportPeriod === '2') { const year = current.year(); @@ -105,6 +115,12 @@ formState.value = {}; formRef.value.resetFields(); }; + const handleKeyDown = (event: KeyboardEvent) => { + // Check if the pressed key is a space + if (event.code === 'Space') { + event.preventDefault(); + } + }; // 点击确定提交 const onSubmit = () => { formRef.value @@ -142,7 +158,7 @@ name: 'userAdd', type: 'primary', handle: () => { - text.value = '新增报告' + text.value = '新增报告'; visible.value = true; }, }, @@ -186,7 +202,7 @@ label: '编辑', name: 'userEdit', handle: (record: any) => { - text.value = '编辑报告' + text.value = '编辑报告'; visible.value = true; fetch(carbonInventoryCheck.findById, { id: record.id }).then((res) => { formState.value = res.data; @@ -252,7 +268,7 @@ component: 'NsInput', componentProps: { placeholder: '请输入报告名称', - maxLength: 30, + maxLength: 20, }, }, { diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue index f6c6df3..4b15713 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue @@ -15,7 +15,13 @@ margin-bottom: 1%; ">
- 上一年 + 上一年 - 下一年 + 下一年 - + - - + + - - + + @@ -336,6 +346,12 @@ disabled.value = true; } }; + const handleKeyDown = (event: KeyboardEvent) => { + // Check if the pressed key is a space + if (event.code === 'Space') { + event.preventDefault(); + } + }; const handleOk = () => { formRef.value .validate() @@ -710,6 +726,7 @@