diff --git a/Admin.NET/Admin.NET.Application/Configuration/Logging.json b/Admin.NET/Admin.NET.Application/Configuration/Logging.json index 5dee96c3..f3a10bb9 100644 --- a/Admin.NET/Admin.NET.Application/Configuration/Logging.json +++ b/Admin.NET/Admin.NET.Application/Configuration/Logging.json @@ -5,7 +5,8 @@ "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning", - "Microsoft.EntityFrameworkCore": "Information" + "Microsoft.EntityFrameworkCore": "Information", + "AspNetCoreRateLimit": "None" }, "File": { "Enabled": false, // 启用文件日志 diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj index 319af9fb..d888fadb 100644 --- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj +++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj @@ -17,7 +17,7 @@ - + @@ -39,7 +39,7 @@ - + diff --git a/Admin.NET/Admin.NET.Core/Extension/SqlSugarExtension.cs b/Admin.NET/Admin.NET.Core/Extension/SqlSugarExtension.cs index 7b9a7af5..1b49f748 100644 --- a/Admin.NET/Admin.NET.Core/Extension/SqlSugarExtension.cs +++ b/Admin.NET/Admin.NET.Core/Extension/SqlSugarExtension.cs @@ -197,7 +197,7 @@ public static class SqlSugarExtension return Expression.Constant(valueparsed, propertyType); } - if (propertyType == typeof(long)) + if (propertyType == typeof(long) || propertyType == typeof(long?)) { string? stringLong = GetStringFromJsonElement(value); diff --git a/Web/package.json b/Web/package.json index 9875bc1e..f8c28432 100644 --- a/Web/package.json +++ b/Web/package.json @@ -2,7 +2,7 @@ "name": "admin.net.pro", "type": "module", "version": "2.4.33", - "lastBuildTime": "2024.08.26", + "lastBuildTime": "2024.08.27", "description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架", "author": "zuohuaijun", "license": "MIT", @@ -66,11 +66,11 @@ "vue-grid-layout": "3.0.0-beta1", "vue-i18n": "^9.14.0", "vue-json-pretty": "^2.4.0", - "vue-plugin-hiprint": "0.0.57-beta28", + "vue-plugin-hiprint": "0.0.57-beta29", "vue-router": "^4.4.3", "vue-signature-pad": "^3.0.2", "vue3-tree-org": "^4.2.2", - "vxe-pc-ui": "^4.1.7", + "vxe-pc-ui": "^4.1.8", "vxe-table": "^4.7.59", "vxe-table-plugin-element": "^4.0.4", "vxe-table-plugin-export-xlsx": "^4.0.5", @@ -84,8 +84,8 @@ "@types/node": "^20.14.14", "@types/nprogress": "^0.2.3", "@types/sortablejs": "^1.15.8", - "@typescript-eslint/eslint-plugin": "^8.2.0", - "@typescript-eslint/parser": "^8.2.0", + "@typescript-eslint/eslint-plugin": "^8.3.0", + "@typescript-eslint/parser": "^8.3.0", "@vitejs/plugin-vue": "^5.1.2", "@vitejs/plugin-vue-jsx": "^4.0.1", "@vue/compiler-sfc": "^3.4.38", diff --git a/Web/src/components/iconSelector/index.vue b/Web/src/components/iconSelector/index.vue index 97b8370b..1e90093e 100644 --- a/Web/src/components/iconSelector/index.vue +++ b/Web/src/components/iconSelector/index.vue @@ -210,3 +210,9 @@ watch( } ); + + diff --git a/Web/src/views/system/print/component/editPrint.vue b/Web/src/views/system/print/component/editPrint.vue index 0889abd1..3dc2c841 100644 --- a/Web/src/views/system/print/component/editPrint.vue +++ b/Web/src/views/system/print/component/editPrint.vue @@ -123,6 +123,7 @@ const loadTemplate = () => { hiprintDesignRef.value?.hiprintTemplate.clear(); if (JSON.stringify(state.ruleForm) !== '{}') { hiprintDesignRef.value?.hiprintTemplate.update(JSON.parse(state.ruleForm.template)); + hiprintDesignRef.value?.initPaper(); } }; diff --git a/Web/src/views/system/print/component/hiprint/index.vue b/Web/src/views/system/print/component/hiprint/index.vue index fba8dea7..76049e04 100644 --- a/Web/src/views/system/print/component/hiprint/index.vue +++ b/Web/src/views/system/print/component/hiprint/index.vue @@ -163,13 +163,14 @@ const state = reactive({ // 计算当前纸张类型 const curPaperType = computed(() => { + let { width, height } = state.curPaper; let type = 'other'; let types: any = state.paperTypes; for (const key in types) { let item = types[key]; - let { width, height } = state.curPaper; if (item.width === width && item.height === height) { type = key; + break; } } return type; @@ -321,8 +322,18 @@ onMounted(() => { // otherPaper(); // 默认纸张 }); +// 初始化纸张大小 +const initPaper = () => { + var template = hiprintTemplate.value.getJson(); + var width = template.panels[0].width; + var height = template.panels[0].height; + + state.curPaper = { type: '', width: width, height: height }; // 计算纸张类型和状态 + hiprintTemplate.value.setPaper(width, height); // 设置纸张大小 +}; + // 导出对象 -defineExpose({ hiprintTemplate }); +defineExpose({ hiprintTemplate, initPaper });