From ebd891f589992c80c67b5c9a1de909773cee700b Mon Sep 17 00:00:00 2001 From: NKDShinKu <2010182879@qq.com> Date: Mon, 7 Apr 2025 14:00:10 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=8D=95?= =?UTF-8?q?=E9=80=89=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SingleSelect.vue | 70 +++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/components/SingleSelect.vue diff --git a/src/components/SingleSelect.vue b/src/components/SingleSelect.vue new file mode 100644 index 0000000..290d874 --- /dev/null +++ b/src/components/SingleSelect.vue @@ -0,0 +1,70 @@ + + + From ed635eec7eb6d94da7ca5b73597363bd468b8234 Mon Sep 17 00:00:00 2001 From: NKDShinKu <2010182879@qq.com> Date: Mon, 7 Apr 2025 14:08:26 +0800 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=87=A0?= =?UTF-8?q?=E4=B8=AA=E7=AE=80=E5=8E=86=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/templates.json | 17 +- src/stores/useResumeStore.ts | 338 ++++++++++++++++-- src/stores/useTemplateStore.ts | 29 +- src/template/templateA/assets/style.css | 28 +- src/template/templateA/indexPage.vue | 169 +++++++-- src/template/templateB/indexPage.vue | 18 +- src/types/resume.d.ts | 31 +- src/types/template.d.ts | 8 + .../components/CampusExperienceEdit.vue | 47 +++ .../edit-menu/components/CustomizeEdit.vue | 16 + .../edit-menu/components/EducationEdit.vue | 11 +- .../edit/edit-menu/components/HobbiesEdit.vue | 16 + .../edit-menu/components/InternshipEdit.vue | 40 +++ .../edit-menu/components/JobIntentionEdit.vue | 75 ++++ .../edit-menu/components/PersonalInfoEdit.vue | 22 +- .../edit-menu/components/PortfolioEdit.vue | 34 ++ .../edit-menu/components/ProjectsEdit.vue | 11 +- .../components/WorkExperienceEdit.vue | 9 +- src/views/edit/edit-menu/indexPage.vue | 48 +++ src/views/edit/editor/indexPage.vue | 2 +- .../edit/setting/components/GapSetting.vue | 2 +- .../setting/components/TemplateSetting.vue | 2 +- 22 files changed, 844 insertions(+), 129 deletions(-) create mode 100644 src/views/edit/edit-menu/components/CampusExperienceEdit.vue create mode 100644 src/views/edit/edit-menu/components/CustomizeEdit.vue create mode 100644 src/views/edit/edit-menu/components/HobbiesEdit.vue create mode 100644 src/views/edit/edit-menu/components/InternshipEdit.vue create mode 100644 src/views/edit/edit-menu/components/JobIntentionEdit.vue create mode 100644 src/views/edit/edit-menu/components/PortfolioEdit.vue diff --git a/public/templates.json b/public/templates.json index d2fdbd9..b616f52 100644 --- a/public/templates.json +++ b/public/templates.json @@ -10,7 +10,12 @@ "industry": "互联网", "color": "蓝色", "setting": { - "color":"#2b7fff" + "themeColor":"#2b7fff", + "fontColor":"#ffffff", + "fontFamily":"zql", + "lineSpacing": "21", + "blockSpacing":"21", + "pageMargin": "21" } }, { @@ -22,6 +27,14 @@ "layout": "classical", "style": "简约", "industry": "IT", - "color": "黄色" + "color": "红色", + "setting": { + "themeColor":"#e46767", + "fontColor":"#ffffff", + "fontFamily":"", + "lineSpacing": "20", + "blockSpacing":"21", + "pageMargin": "21" + } } ] \ No newline at end of file diff --git a/src/stores/useResumeStore.ts b/src/stores/useResumeStore.ts index d5a389d..9cb11f6 100644 --- a/src/stores/useResumeStore.ts +++ b/src/stores/useResumeStore.ts @@ -1,5 +1,5 @@ import { defineStore } from 'pinia'; -import type { Education, Honor, PersonalInfo, Project, Skill, WorkExperience } from '@/types/resume'; +import type { Education, Honor, PersonalInfo, Project, Skill, WorkExperience, JobIntention, CampusExperience, Internship, Portfolio } from '@/types/resume'; import { ref } from 'vue'; interface section { label: string; @@ -13,95 +13,294 @@ export interface ResumeState { skills: Skill[]; projects: Project[]; honors: Honor[]; + jobIntention: JobIntention; + campusExperience: CampusExperience[]; + internship: Internship[]; + portfolio: Portfolio[]; summary: string; + hobbies: string; + customize: string; + + currentId: number; isFirstVisit: boolean; sections: section[]; } +// const resumeTemplate = { +// // 基本信息 +// personalInfo: { +// name: '', // 姓名 +// gender: '', // 性别 +// phone: '', // 联系电话 +// email: '', // 电子邮箱 +// university: '', // 所在大学 +// politicalStatus: '', // 政治面貌 +// website: '', // 个人网站 +// avatar: '', // 头像 +// major: '', // 专业 +// age: '', // 年龄 +// applicationPosition: '' // 申请职位 +// }, + +// // 求职意向 +// jobIntention: { +// position: '', // 意向岗位 +// city: '', // 意向城市 +// salary: '', // 期待薪资 +// status: '', // 求职状态(如:正在找工作、在职、观望) +// type: '', // 求职类型(如:全职、实习、远程) +// }, + +// // 教育经历 +// education: [ +// { +// id: 1, +// school: '', +// degree: '', +// major: '', +// startDate: '', +// endDate: '', +// } +// ], + +// // 校园经历 +// campusExperience: [ +// { +// id: 1, +// startDate: '', +// endDate: '', +// title: '', // 摘要(标题) +// responsibility: '', // 主要职责 +// description: '', // 经历描述 +// } +// ], + +// // 实习经历(复用工作经验) +// internship: [ +// { +// id: 1, +// company: '', +// position: '', +// startDate: '', +// endDate: '', +// description: '' +// } +// ], + +// // 工作经验 +// workExperience: [ +// { +// id: 2, +// company: '', +// position: '', +// startDate: '', +// endDate: '', +// description: '' +// } +// ], + +// // 技能 +// skills: [ +// { +// id: 3, +// skillName: '' +// } +// ], + +// // 项目经验 +// projects: [ +// { +// id: 4, +// projectName: '', +// role: '', +// startDate: '', +// endDate: '', +// description: '', +// briefIntroduction: '' +// } +// ], + +// // 作品展示 +// portfolio: [ +// { +// id: 1, +// name: '', // 作品名称 +// url: '', // 作品网址 +// description: '' // 作品描述 +// } +// ], + +// // 荣誉奖项 +// honors: [ +// { +// id: 5, +// honorName: '', +// date: '', +// description: '' +// } +// ], + +// // 自我评价 +// summary: '', +// hobbies: '', +// customize: '', +// } as const; + const resumeTemplate = { // 基本信息 personalInfo: { - name: '', // 姓名 - gender: '', // 性别 - phone: '', // 联系电话 - email: '', // 电子邮箱 - university: '', // 所在大学 - politicalStatus: '', // 政治面貌 - website: '', // 个人网站 - avatar: '', // 头像 - major: '', // 专业 - age: '', // 年龄 - applicationPosition: '' // 申请职位 + name: '李华', + gender: '男', + phone: '13800138000', + email: 'lihua@example.com', + university: '清华大学', + politicalStatus: '共青团员', + website: 'https://lihua.dev', + avatar: 'https://example.com/avatar.jpg', + major: '计算机科学与技术', + age: '22', + applicationPosition: '前端开发工程师' + }, + + // 求职意向 + jobIntention: { + position: '前端开发工程师', + city: '北京', + salary: '15k-20k', + status: '正在找工作', + type: '全职', }, // 教育经历 education: [ { - id: 1, // 唯一标识 - school: '', // 学校名称 - degree: '', // 学位 - major: '', // 专业 - startDate: '', // 开始时间 - endDate: '', // 结束时间1 + id: 1, + school: '清华大学', + degree: '本科', + major: '计算机科学与技术', + startDate: '2019-09', + endDate: '2023-07', + } + ], + + // 校园经历 + campusExperience: [ + { + id: 1, + startDate: '2020-09', + endDate: '2021-06', + title: '学生会技术部部长', + responsibility: '负责校园活动平台开发与维护,组织技术培训', + description: '带领5人团队开发学生会网站,实现活动报名、信息公告等功能,提高工作效率60%。' + } + ], + + // 实习经历 + internship: [ + { + id: 1, + company: '字节跳动', + position: '前端实习生', + startDate: '2022-07', + endDate: '2022-09', + description: '参与字节跳动教育产品的前端开发,负责小程序组件的开发与优化。使用Vue3 + TypeScript开发页面组件,提升页面渲染速度约30%。' } ], // 工作经验 workExperience: [ { - id: 2, // 唯一标识 - company: '', // 公司名称 - position: '', // 职位 - startDate: '', // 开始时间 - endDate: '', // 结束时间 - description: '' // 描述 + id: 2, + company: '腾讯', + position: '前端开发工程师', + startDate: '2023-08', + endDate: '至今', + description: '参与微信小程序及H5页面开发,负责前端架构优化与组件封装,提升用户体验与代码复用性。' } ], // 技能 skills: [ { - id: 3, // 唯一标识 - skillName: '' // 技能名称 + id: 3, + skillName: 'JavaScript / TypeScript' + }, + { + id: 4, + skillName: 'Vue3 / React' + }, + { + id: 5, + skillName: 'HTML / CSS / Sass' + }, + { + id: 6, + skillName: 'Git / Webpack / Vite' } ], // 项目经验 projects: [ { - id: 4, // 唯一标识 - projectName: '', // 项目名称 - role: '', // 担任角色 - startDate: '', // 开始时间 - endDate: '', // 结束时间 - description: '', // 项目描述 - briefIntroduction: '' // 项目简介 + id: 4, + projectName: '简历生成平台', + role: '前端开发', + startDate: '2023-03', + endDate: '2023-06', + description: '开发一个在线简历编辑与导出平台,用户可可视化编辑内容、实时预览并导出为PDF。', + briefIntroduction: 'Vue3 + Pinia + TailwindCSS,前端渲染性能优化,支持本地存储自动保存。' + } + ], + + // 作品展示 + portfolio: [ + { + id: 1, + name: '个人博客系统', + url: 'https://lihua.dev/blog', + description: '基于Nuxt3和Markdown的技术博客系统,支持动态路由、标签分类与暗黑模式切换。' } ], + // 荣誉奖项 honors: [ { - id: 5, // 唯一标识 - honorName: '', // 荣誉名称 - date: '', // 获奖时间 - description: '' // 描述 + id: 5, + honorName: '全国大学生计算机设计大赛一等奖', + date: '2022-08', + description: '开发智能校园助手小程序,涵盖课表查询、成绩提醒等功能,获得评委一致好评。' } ], + // 自我评价 - summary: '' + summary: '热爱前端开发,注重用户体验与代码质量,具备良好的团队协作与学习能力。熟悉现代前端框架,能够独立完成从开发到上线的全过程。', + + // 兴趣爱好 + hobbies: '编程、羽毛球、摄影、技术写作', + + // 自定义内容 + customize: '开源贡献者:为多个GitHub开源项目提交过PR,包括UI组件库、开发工具插件等。' } as const; + const sectionsDefault = ref([ { label: "基本信息", key: "personalInfo", value: true }, + { label: "求职意向", key: "jobIntention", value: true }, { label: "教育经历", key: "education", value: true }, + { label: "校园经历", key: "campusExperience", value: true }, + { label: "实习经历", key: "internship", value: true }, { label: "工作经验", key: "workExperience", value: true }, { label: "技能特长", key: "skills", value: true }, { label: "项目经验", key: "projects", value: true }, + { label: "作品展示", key: "portfolio", value: false }, { label: "荣誉奖项", key: "honors", value: true }, { label: "自我评价", key: "summary", value: true }, + { label: "兴趣爱好", key: "hobbies", value: false }, + { label: "自定义", key: "customize", value: false } ]); + export const useResumeStore = defineStore('resume', { state: (): ResumeState => { @@ -189,6 +388,16 @@ export const useResumeStore = defineStore('resume', { this.saveToLocalStorage(); }, + updateHobbies(updatedHobbies: string) { + this.hobbies = updatedHobbies; + this.saveToLocalStorage(); + }, + + updateCustomize(updatedCustomize: string) { + this.customize = updatedCustomize; + this.saveToLocalStorage(); + }, + // 新增教育经历 addEducation(newItem: Omit) { this.addItem(this.education, newItem); @@ -264,6 +473,59 @@ export const useResumeStore = defineStore('resume', { this.updateItem(this.honors, updatedItem); }, + // 更新求职意向 + updateJobIntention(updatedInfo: Partial) { + this.jobIntention = { ...this.jobIntention, ...updatedInfo }; + this.saveToLocalStorage(); + }, + + // 新增校园经历 + addCampusExperience(newItem: Omit) { + this.addItem(this.campusExperience, newItem); + }, + + // 删除校园经历 + deleteCampusExperience(id: number) { + this.deleteItem(this.campusExperience, id); + }, + + // 更新校园经历 + updateCampusExperience(updatedItem: CampusExperience) { + this.updateItem(this.campusExperience, updatedItem); + }, + + // 新增实习经历 + addInternship(newItem: Omit) { + this.addItem(this.internship, newItem); + }, + + // 删除实习经历 + deleteInternship(id: number) { + this.deleteItem(this.internship, id); + }, + + // 更新实习经历 + updateInternship(updatedItem: WorkExperience) { + this.updateItem(this.internship, updatedItem); + }, + + // 新增作品展示 + addPortfolio(newItem: Omit) { + this.addItem(this.portfolio, newItem); + }, + + // 删除作品展示 + deletePortfolio(id: number) { + this.deleteItem(this.portfolio, id); + }, + + // 更新作品展示 + updatePortfolio(updatedItem: Portfolio) { + this.updateItem(this.portfolio, updatedItem); + this.saveToLocalStorage(); + }, + + loadFromLocalStorage() { const stored = localStorage.getItem('resumeStore'); if (stored) { diff --git a/src/stores/useTemplateStore.ts b/src/stores/useTemplateStore.ts index 2675eca..08c6313 100644 --- a/src/stores/useTemplateStore.ts +++ b/src/stores/useTemplateStore.ts @@ -5,20 +5,27 @@ import type { Template } from "../types/template"; export const useTemplateStore = defineStore('templateStore', () => { const currentTemplate = ref