😎1、修复打印模板默认纸张大小和状态 2、升级依赖
This commit is contained in:
parent
46153c0ac1
commit
aeccf511cd
@ -39,7 +39,7 @@
|
|||||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.167" />
|
<PackageReference Include="SqlSugarCore" Version="5.1.4.167" />
|
||||||
<PackageReference Include="SSH.NET" Version="2024.1.0" />
|
<PackageReference Include="SSH.NET" Version="2024.1.0" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.5" />
|
<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="UAParser" Version="3.1.47" />
|
||||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "admin.net.pro",
|
"name": "admin.net.pro",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "2.4.33",
|
"version": "2.4.33",
|
||||||
"lastBuildTime": "2024.08.26",
|
"lastBuildTime": "2024.08.27",
|
||||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||||
"author": "zuohuaijun",
|
"author": "zuohuaijun",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -66,7 +66,7 @@
|
|||||||
"vue-grid-layout": "3.0.0-beta1",
|
"vue-grid-layout": "3.0.0-beta1",
|
||||||
"vue-i18n": "^9.14.0",
|
"vue-i18n": "^9.14.0",
|
||||||
"vue-json-pretty": "^2.4.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-router": "^4.4.3",
|
||||||
"vue-signature-pad": "^3.0.2",
|
"vue-signature-pad": "^3.0.2",
|
||||||
"vue3-tree-org": "^4.2.2",
|
"vue3-tree-org": "^4.2.2",
|
||||||
@ -84,8 +84,8 @@
|
|||||||
"@types/node": "^20.14.14",
|
"@types/node": "^20.14.14",
|
||||||
"@types/nprogress": "^0.2.3",
|
"@types/nprogress": "^0.2.3",
|
||||||
"@types/sortablejs": "^1.15.8",
|
"@types/sortablejs": "^1.15.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.2.0",
|
"@typescript-eslint/eslint-plugin": "^8.3.0",
|
||||||
"@typescript-eslint/parser": "^8.2.0",
|
"@typescript-eslint/parser": "^8.3.0",
|
||||||
"@vitejs/plugin-vue": "^5.1.2",
|
"@vitejs/plugin-vue": "^5.1.2",
|
||||||
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
||||||
"@vue/compiler-sfc": "^3.4.38",
|
"@vue/compiler-sfc": "^3.4.38",
|
||||||
|
|||||||
@ -123,6 +123,7 @@ const loadTemplate = () => {
|
|||||||
hiprintDesignRef.value?.hiprintTemplate.clear();
|
hiprintDesignRef.value?.hiprintTemplate.clear();
|
||||||
if (JSON.stringify(state.ruleForm) !== '{}') {
|
if (JSON.stringify(state.ruleForm) !== '{}') {
|
||||||
hiprintDesignRef.value?.hiprintTemplate.update(JSON.parse(state.ruleForm.template));
|
hiprintDesignRef.value?.hiprintTemplate.update(JSON.parse(state.ruleForm.template));
|
||||||
|
hiprintDesignRef.value?.initPaper();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -163,13 +163,14 @@ const state = reactive({
|
|||||||
|
|
||||||
// 计算当前纸张类型
|
// 计算当前纸张类型
|
||||||
const curPaperType = computed(() => {
|
const curPaperType = computed(() => {
|
||||||
|
let { width, height } = state.curPaper;
|
||||||
let type = 'other';
|
let type = 'other';
|
||||||
let types: any = state.paperTypes;
|
let types: any = state.paperTypes;
|
||||||
for (const key in types) {
|
for (const key in types) {
|
||||||
let item = types[key];
|
let item = types[key];
|
||||||
let { width, height } = state.curPaper;
|
|
||||||
if (item.width === width && item.height === height) {
|
if (item.width === width && item.height === height) {
|
||||||
type = key;
|
type = key;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
@ -321,8 +322,18 @@ onMounted(() => {
|
|||||||
// otherPaper(); // 默认纸张
|
// 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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user