diff --git a/public/static/template8.png b/public/static/template8.png new file mode 100644 index 00000000..faab1578 Binary files /dev/null and b/public/static/template8.png differ diff --git a/src/demo/templates/template-files/template8.js b/src/demo/templates/template-files/template8.js new file mode 100644 index 00000000..6501c170 --- /dev/null +++ b/src/demo/templates/template-files/template8.js @@ -0,0 +1,290 @@ +export const name = "自定义表格"; +export const desc = "通过HTML元素实现自定义表格"; +export const author = "54xavier"; +export const link = "https://ccsimple.gitee.io/vue-plugin-hiprint/"; +// url 或者 base64 或者 require('../../../assets/logo.png') +export const preview = "/static/template8.png"; +export const printData = { + department: "技术部", + position: "前端开发工程师", + form_date: "2024-08-13", + pInfo: { + name: "张伟", + gender: "男", + place_of_birth: "江苏省南京市", + ethnicity: "汉族", + education_level: "本科", + major: "计算机科学与技术", + height: "178cm", + weight: "70kg", + birth_date: "1992-08-15", + political_affiliation: "中共党员", + graduation_year: "2015", + blood_type: "O型", + address: "北京市海淀区中关村东路10号", + email: "zhangwei@example.com", + phone: "138-1234-5678", + expected_salary: "20,000元/月", + availability: "2024-09-01", + mandarin_level: "一级甲等", + foreign_language_level: "英语六级", + }, +}; +export const json = { + panels: [ + { + index: 0, + name: 1, + height: 297, + width: 210, + paperHeader: 0, + paperFooter: 842, + printElements: [ + { + options: { + left: 12, + top: 12, + height: 430, + width: 566, + formatter: `function(t, e, d) { +var html = \` + +
+入职信息登记表 | +||||||
入职部门:\\\${d.department}入职岗位:\\\${d.position}填表时间:\\\${d.form_date} | +||||||
姓名 | +\\\${d.pInfo.name} | +性别 | +\\\${d.pInfo.gender} | +出生年月 | +\\\${d.pInfo.birth_date} | +贴照片处 | +
籍贯 | +\\\${d.pInfo.place_of_birth} | +民族 | +\\\${d.pInfo.ethnicity} | +政治面貌 | +\\\${d.pInfo.political_affiliation} | +|
文化程度 | +\\\${d.pInfo.education_level} | +专业 | +\\\${d.pInfo.major} | +毕业时间 | +\\\${d.pInfo.graduation_year} | +|
身高 | +\\\${d.pInfo.height} | +体重 | +\\\${d.pInfo.weight} | +血型 | +\\\${d.pInfo.blood_type} | +|
家庭住址 | +\\\${d.pInfo.address} | +|||||
联系电话 | +\\\${d.pInfo.phone} | +电子邮箱 | +\\\${d.pInfo.email} | +|||
期望薪资 | +\\\${d.pInfo.expected_salary} | +到岗时间 | +\\\${d.pInfo.availability} | +|||
语言能力 | +普通话 | +\\\${d.pInfo.mandarin_level} | +外语 | +\\\${d.pInfo.foreign_language_level} | +||
其他 | ++ |