😎1、修复打印模板默认纸张大小和状态 2、升级依赖

This commit is contained in:
zuohuaijun 2024-08-27 23:29:54 +08:00
parent 46153c0ac1
commit aeccf511cd
4 changed files with 19 additions and 7 deletions

View File

@ -39,7 +39,7 @@
<PackageReference Include="SqlSugarCore" Version="5.1.4.167" />
<PackageReference Include="SSH.NET" Version="2024.1.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.5" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1076" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1077" />
<PackageReference Include="UAParser" Version="3.1.47" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
</ItemGroup>

View File

@ -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,7 +66,7 @@
"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",
@ -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",

View File

@ -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();
}
};

View File

@ -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 });
</script>
<style lang="scss" scoped>