From f0a3b92dd33ab024f9909faaeb2ae9c99205c271 Mon Sep 17 00:00:00 2001 From: 24kycj <1637269896@qq.com> Date: Fri, 28 Nov 2025 03:15:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/components/workAdd/workAdd.vue | 294 ++++++++++++++------ src/renderer/views/dashboard/index.vue | 35 ++- src/renderer/views/login/index.vue | 75 +++-- 3 files changed, 278 insertions(+), 126 deletions(-) diff --git a/src/renderer/components/workAdd/workAdd.vue b/src/renderer/components/workAdd/workAdd.vue index 6f8ae46..a493225 100644 --- a/src/renderer/components/workAdd/workAdd.vue +++ b/src/renderer/components/workAdd/workAdd.vue @@ -49,92 +49,10 @@ @@ -521,6 +528,7 @@ export default { // 新手引导 guideStep: null, currentStep: 0, + tempHideStep: false, // 临时存储新手引导开关状态 } }, watch: { @@ -631,7 +639,7 @@ export default { const diskSize = disk.size let t = diskSize ? parseFloat(this.$accDiv(this.totalSize, diskSize)) * 100 : 0 return t > 100 ? 100 : t - } + }, }, mounted() { let workForm = localStorage.getItem('workForm') @@ -644,9 +652,10 @@ export default { this.$store.dispatch('setDatas', { name: 'setForm', data: JSON.parse(setForm) }) } // 新手引导 - this.guideStep = JSON.parse(localStorage.getItem('guideStep')) - this.currentStep = localStorage.getItem('currentStep') - if (this.guideStep[this.currentStep]) { + const guideStepStr = localStorage.getItem('guideStep') + this.guideStep = guideStepStr ? JSON.parse(guideStepStr) : null + this.currentStep = localStorage.getItem('currentStep') || -1 + if (this.guideStep && this.guideStep[this.currentStep]) { this.guideStep[this.currentStep].show = false setTimeout(() => { this.guideStep[this.currentStep].show = true @@ -1135,6 +1144,10 @@ export default { this.$emit('close') }, // 高级设置 + openSetDialog() { + this.initSet() + this.setShow = true + }, setCancel() { this.setShow = false }, @@ -1143,10 +1156,109 @@ export default { this.$store.dispatch('chat/setDatas', { name: 'workStatus', data: true }) this.$store.dispatch('setDatas', { name: 'setForm', data: this.setForm }) localStorage.setItem('setForm', JSON.stringify(this.setForm)) + // 根据临时变量更新 hideStep + if (this.tempHideStep) { + // 开启新手引导:设置 hideStep 为 0 + localStorage.setItem('hideStep', 0) + // 初始化 guideStep(如果不存在) + const guideStepStr = localStorage.getItem('guideStep') + if (!guideStepStr) { + this.initGuideStep() + } + } else { + // 关闭新手引导:设置 hideStep 为 1 + localStorage.setItem('hideStep', 1) + // 关闭当前显示的引导 + if (this.guideStep) { + for (let key in this.guideStep) { + this.guideStep[key].show = false + } + } + this.currentStep = -1 + localStorage.setItem('currentStep', this.currentStep) + if (this.guideStep) { + localStorage.setItem('guideStep', JSON.stringify(this.guideStep)) + } + } }, initSet() { this.setForm = { ...this.$store.state.user.setForm } console.log(this.$store.state.user.setForm) + // 初始化新手引导开关状态 + const hideStep = localStorage.getItem('hideStep') + this.tempHideStep = !hideStep || hideStep == 0 + }, + // 初始化新手引导步骤 + initGuideStep() { + const guideStep = [ + { + show: false, + placement: 'right', + step: '系统状态面板,显示系统名称,耗材信息等,通过下拉菜单可以执行设置光盘桶等常见操作。', + }, + { + show: false, + placement: 'left', + step: '光驱状态面板,显示当前光驱工作状态,刻录进度和速度等相关信息。', + }, + { + show: false, + placement: 'left', + step: '日志面板,显示当前日志动态。', + }, + { + show: false, + placement: 'top', + step: '作业列表面板,显示当前作业信息。', + }, + { + show: false, + placement: 'bottom', + step: '服务启动和停止切换按钮。', + }, + { + show: false, + placement: 'bottom', + step: '任务统计面板。', + }, + { + show: false, + placement: 'bottom', + step: '系统设置按钮,详情请见软件使用手册。', + }, + { + show: false, + placement: 'bottom', + step: '新建作业和打开作业按钮。', + }, + { + show: false, + placement: 'bottom', + step: '选择作业的光盘类型和任务类型。', + }, + { + show: false, + placement: 'right', + step: '作业内容面板,选择文件夹和文件作为光盘刻录内容,修改光盘卷标名称。', + }, + { + show: false, + placement: 'left', + step: '作业标签面板,选择或创建一个光盘标签,也可以通过下拉菜单选择默认标签,默认标签路径为软件目录下User Templates文件夹中。', + }, + { + show: false, + placement: 'bottom', + step: '高级作业设置按钮,配置刻录速度,校验,跨盘,虚拟刻录等详细的作业设置。', + }, + { + show: false, + placement: 'top', + step: '点击保存作业或提交按钮,还可以点击链接查看更多软件使用手册。', + }, + ] + localStorage.setItem('guideStep', JSON.stringify(guideStep)) + localStorage.setItem('currentStep', 0) }, // 退出新手引导 exitGuide() { diff --git a/src/renderer/views/dashboard/index.vue b/src/renderer/views/dashboard/index.vue index 85a5b10..f530d43 100644 --- a/src/renderer/views/dashboard/index.vue +++ b/src/renderer/views/dashboard/index.vue @@ -147,7 +147,7 @@
-
同方光盘刻录一体机{{ printer_info.printer_name }}({{ printer_info.printer_path }})
+
国产光盘刻录一体机 DP-{{ printer_info.printer_name }}({{ printer_info.printer_path }})
@@ -510,11 +510,10 @@ width="400px" >
- -
Disc Worker
-
版本1.0.1
+
国产光盘打印刻录系统 DiscWorker
+
版本1.0
@@ -1356,67 +1355,67 @@ export default { { show: false, placement: 'right', - step: '第1步', + step: '系统状态面板,显示系统名称,耗材信息等,通过下拉菜单可以执行设置光盘桶等常见操作。', }, { show: false, placement: 'left', - step: '第2步', + step: '光驱状态面板,显示当前光驱工作状态,刻录进度和速度等相关信息。', }, { show: false, placement: 'left', - step: '第3步', + step: '日志面板,显示当前日志动态。', }, { show: false, placement: 'top', - step: '第4步', + step: '作业列表面板,显示当前作业信息。', }, { show: false, placement: 'bottom', - step: '第5步', + step: '服务启动和停止切换按钮。', }, { show: false, placement: 'bottom', - step: '第6步', + step: '任务统计面板。', }, { show: false, placement: 'bottom', - step: '第7步', + step: '系统设置按钮,详情请见软件使用手册。', }, { show: false, placement: 'bottom', - step: '第8步', + step: '新建作业和打开作业按钮。', }, { show: false, placement: 'bottom', - step: '第9步', + step: '选择作业的光盘类型和任务类型。', }, { show: false, placement: 'right', - step: '第10步', + step: '作业内容面板,选择文件夹和文件作为光盘刻录内容,修改光盘卷标名称。', }, { show: false, placement: 'left', - step: '第11步', + step: '作业标签面板,选择或创建一个光盘标签,也可以通过下拉菜单选择默认标签,默认标签路径为软件目录下User Templates文件夹中。', }, { show: false, placement: 'bottom', - step: '第12步', + step: '高级作业设置按钮,配置刻录速度,校验,跨盘,虚拟刻录等详细的作业设置。', }, { show: false, placement: 'top', - step: '第13步', + step: '点击保存作业或提交按钮,还可以点击链接查看更多软件使用手册。', }, ] localStorage.setItem('guideStep', JSON.stringify(guideStep)) diff --git a/src/renderer/views/login/index.vue b/src/renderer/views/login/index.vue index 5b64a04..80111ef 100644 --- a/src/renderer/views/login/index.vue +++ b/src/renderer/views/login/index.vue @@ -2,21 +2,23 @@ @@ -81,10 +100,10 @@ export default { this.loading = true setToken('data.token') if (localStorage.getItem('setForm')) { - this.$store.dispatch('setDatas', {name: 'setForm', data: localStorage.getItem('setForm')}) + this.$store.dispatch('setDatas', { name: 'setForm', data: localStorage.getItem('setForm') }) } - this.$store.dispatch('setDatas', {name: 'token', data: 'data.token'}) - this.$store.dispatch('setDatas', {name: 'oneLogin', data: true}) + this.$store.dispatch('setDatas', { name: 'token', data: 'data.token' }) + this.$store.dispatch('setDatas', { name: 'oneLogin', data: true }) setTimeout(() => { this.loading = false this.$router.push({ path: '/' }) @@ -106,8 +125,8 @@ export default {