From a6ce25150966463108d305f9754994ed72779e73 Mon Sep 17 00:00:00 2001 From: 24kycj <1637269896@qq.com> Date: Tue, 30 Dec 2025 20:48:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/components/admin.vue | 288 ++++++++---------- src/renderer/components/dispose.vue | 79 +++-- src/renderer/components/main.vue | 13 +- src/renderer/components/systemControl.vue | 86 +++--- .../components/work/AdvancedSettings.vue | 56 ++-- src/renderer/components/work/WorkMain.vue | 252 ++++++++++++++- .../work/sections/AdvancedFeatures.vue | 6 +- .../work/sections/HardwareControl.vue | 6 - src/renderer/lang/cn.js | 2 + src/renderer/lang/en.js | 2 + src/renderer/lang/ocn.js | 2 + 11 files changed, 514 insertions(+), 278 deletions(-) diff --git a/src/renderer/components/admin.vue b/src/renderer/components/admin.vue index 3c765ca..58ef803 100644 --- a/src/renderer/components/admin.vue +++ b/src/renderer/components/admin.vue @@ -6,13 +6,8 @@
{{ $t("index.wordSpace") }}
-
+
{{ getPrintName(item.PrinterID, true) }} @@ -30,9 +25,7 @@
- {{ $t("admin.hello") }} {{ user }} + {{ $t("admin.hello") }} {{ user }} {{ $t("admin.home") }}
@@ -46,27 +39,11 @@
- - - - - + + + + + @@ -464,7 +367,7 @@ export default { 131078: { tag: "Card_Low", err: 0 }, 131081: { tag: "Need_Cleaning", err: 0 }, 1167: { tag: "PAVO_DS_OFFLINE", err: 0 }, - 196609:{ tag: "FIND_CARD", err: 0 }, + 196609: { tag: "FIND_CARD", err: 0 }, }, errList: [], checkStates: {}, @@ -513,6 +416,11 @@ export default { method: "get", url: "/web/get_printer_info", }).then((res) => { + if (!res.data || !res.data.printerList) { + console.warn('获取工作站列表返回的数据格式不正确:', res) + this.infoData = [] + return + } this.infoData = res.data.printerList; this.workValue2 = this.workValue = res.data.printerList.length > 0 @@ -527,6 +435,10 @@ export default { this.DualSide = 1; //只要有一个是双面就是1 } } + }).catch((e) => { + console.error('获取工作站列表失败:', e) + this.infoData = [] + this.$message.error('获取工作站列表失败,请检查网络连接') }); }, runCheckState() { @@ -561,8 +473,7 @@ export default { //阻止即将发生的事件 this.runningEmergy = true; appendLog( - `Task ${this.running + 1}/${ - this.isFormat ? this.number : this.number2 + `Task ${this.running + 1}/${this.isFormat ? this.number : this.number2 } failed, Error = ${data.printer_status}`, this.root ); @@ -778,10 +689,10 @@ export default { ); this.$message( this.$t("admin.comingSoon") + - `${time[0]}` + - this.$t("admin.readLetter") + - `${disk[0]}` + - this.$t("admin.makeCpoy") + `${time[0]}` + + this.$t("admin.readLetter") + + `${disk[0]}` + + this.$t("admin.makeCpoy") ); this.handleCopyFile(`${disk[0]}:\\`); } @@ -877,10 +788,10 @@ export default { ) { this.$message( this.$t("admin.comingSoon") + - `${time[0]}` + - this.$t("admin.readLetter") + - `${disk[0]}` + - this.$t("admin.format") + `${time[0]}` + + this.$t("admin.readLetter") + + `${disk[0]}` + + this.$t("admin.format") ); await this.$axios({ method: "post", @@ -1032,42 +943,50 @@ export default { /deep/ .el-tabs__content { overflow-y: auto; } + .infdialog { /deep/.el-dialog { padding: 20px 0px; } + /deep/.el-dialog__header { padding: 0px; font-size: 15px; font-weight: bold; } + /deep/.el-dialog__body { margin-top: 30px; padding: 0px; } - /deep/.el-dialog__title { - } + + /deep/.el-dialog__title {} } .wLog { max-height: 600px; overflow: auto; } + h1, h2 { font-weight: normal; } + ul { list-style-type: none; padding: 0; } + li { display: inline-block; margin: 0 10px; } + a { color: #42b983; } + .left { background-color: #e8e7ee; height: 100%; @@ -1076,10 +995,12 @@ a { box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; + .title { color: #999999; font-size: 28px; } + .card { background-color: #f5f5f5; height: 50px; @@ -1100,36 +1021,45 @@ a { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; overflow-y: auto; + .tabs { height: 100%; + /deep/.el-tabs__header { margin: 0px; } + /deep/ .el-tabs__content { height: 100%; } } + &::-webkit-scrollbar { /*滚动条整体样式*/ - width: 10px; /*高宽分别对应横竖滚动条的尺寸*/ + width: 10px; + /*高宽分别对应横竖滚动条的尺寸*/ height: 1px; } + &::-webkit-scrollbar-thumb { /*滚动条里面小方块*/ border-radius: 10px; box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); background: #c7c7cb; } + &::-webkit-scrollbar-track { /*滚动条里面轨道*/ box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); border-radius: 10px; background: #ededed; } + .system { height: 100%; width: 100%; } + .App { height: 100%; width: 100%; @@ -1139,10 +1069,12 @@ a { box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; + .format { width: 100%; height: 300px; border-bottom: 1px rgb(224, 224, 224) solid; + .title { font-size: 14px; width: 150px; @@ -1155,6 +1087,7 @@ a { background-color: rgb(240, 240, 240); font-weight: bold; } + .tips { font-size: 14px; padding: 10px; @@ -1163,22 +1096,27 @@ a { align-items: center; text-align: left; } + .service { height: 150px; display: flex; align-items: center; justify-content: flex-start; + .lable { margin: 20px; font-size: 14px; } + .el-select { width: 150px; } + .el-input { width: 180px; } } + .el-button { color: rgb(154, 202, 128); width: 120px; @@ -1189,12 +1127,15 @@ a { float: right; margin-right: 25px; } + .el-button:hover { background-color: white; } + .el-button:active { background-color: white; } + .el-button:focus { background-color: white; } @@ -1204,6 +1145,7 @@ a { width: 100%; height: 300px; border-bottom: 1px rgb(224, 224, 224) solid; + .title { margin-top: 10px; font-size: 14px; @@ -1217,6 +1159,7 @@ a { background-color: rgb(240, 240, 240); font-weight: bold; } + .tips { font-size: 14px; padding: 10px; @@ -1224,22 +1167,27 @@ a { justify-content: flex-start; align-items: center; } + .service { height: 150px; display: flex; align-items: center; justify-content: flex-start; + .lable { margin: 20px; font-size: 14px; } + .el-select { width: 150px; } + .el-input { width: 180px; } } + .el-button { color: rgb(154, 202, 128); width: 120px; @@ -1250,21 +1198,26 @@ a { float: right; margin-right: 25px; } + .el-button:hover { background-color: white; } + .el-button:active { background-color: white; } + .el-button:focus { background-color: white; } } } + .dispose { height: 100%; width: 100%; } + .brief { height: 90%; width: 100%; @@ -1274,10 +1227,12 @@ a { box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; + .el-table { position: absolute; z-index: 0; } + .add-button { position: absolute; top: 6px; @@ -1286,6 +1241,7 @@ a { } } } + .right { background-color: #c8cfd7; height: 100%; @@ -1295,10 +1251,12 @@ a { box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; + .title { color: #999999; font-size: 28px; } + .log { padding: 20px; font-size: 18px; @@ -1311,11 +1269,13 @@ a { -moz-box-sizing: border-box; } } + .toMain { position: absolute; right: 200px; font-size: 16px; z-index: 1; + .link { color: blue; cursor: pointer; diff --git a/src/renderer/components/dispose.vue b/src/renderer/components/dispose.vue index 2625bcb..c958af6 100644 --- a/src/renderer/components/dispose.vue +++ b/src/renderer/components/dispose.vue @@ -4,12 +4,7 @@
LogLevel
- +
{{ $t("dispose.infoTips") }}
@@ -17,12 +12,7 @@
AutoRetryTimes
- +
{{ $t("dispose.errorTips1") }}
@@ -68,14 +58,11 @@
{{ $t("dispose.isReservetask") }}
-
+ ">
UploadSharedDir
@@ -83,16 +70,19 @@
{{ $t("dispose.isUpload") }}
-
+
AuthorizationCode
+ +
{{ $t("dispose.authCodeTips") }}
+
+ +
+ "> {{ $t("work.submit") }}
@@ -146,7 +136,18 @@ export default { label: "FATAL", }, ], - iniData: null, + iniData: { + LogLevel: 'INFO', + AutoRetryTimes: 0, + TaskDir: '', + SharedDir: '', + RejectConfig: false, + StopOnFailure: false, + KeepCombinedImage: false, + CleanTaskFile: false, + UploadSharedDir: false, + AuthorizationCode: '' + }, AutoRetryTimes: null, LogLevel: "TRACE", @@ -205,34 +206,35 @@ export default { that.iniData.LogLevel = data.LogLevel ? data.LogLevel : ""; that.iniData.CleanTaskFile = data.CleanTaskFile == "true" || - data.CleanTaskFile == "True" || - data.CleanTaskFile + data.CleanTaskFile == "True" || + data.CleanTaskFile ? true : false; that.iniData.KeepCombinedImage = data.KeepCombinedImage == "true" || - data.KeepCombinedImage == "True" || - data.KeepCombinedImage + data.KeepCombinedImage == "True" || + data.KeepCombinedImage ? true : false; that.iniData.RejectConfig = data.RejectConfig == "true" || - data.RejectConfig == "True" || - data.RejectConfig + data.RejectConfig == "True" || + data.RejectConfig ? true : false; that.iniData.StopOnFailure = data.StopOnFailure == "true" || - data.StopOnFailure == "True" || - data.StopOnFailure + data.StopOnFailure == "True" || + data.StopOnFailure ? true : false; that.iniData.UploadSharedDir = data.UploadSharedDir == "true" || - data.UploadSharedDir == "True" || - data.UploadSharedDir + data.UploadSharedDir == "True" || + data.UploadSharedDir ? true : false; + that.iniData.AuthorizationCode = data.AuthorizationCode ? data.AuthorizationCode : ""; console.log(data); } }); @@ -298,6 +300,7 @@ export default { -moz-box-sizing: border-box; display: flex; flex-direction: column; + .title { font-size: 14px; font-weight: bold; @@ -310,38 +313,45 @@ export default { align-items: center; background-color: rgb(240, 240, 240); } + .row { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; margin-top: 20px; + .lable { width: 200px; margin-left: 20px; font-size: 14px; text-align: left; } + .el-input { width: 200px; margin-left: 20px; } + .el-select { width: 200px; margin-left: 20px; } + .switch { display: flex; margin-left: 20px; justify-content: flex-start; width: 200px; } + .tips { font-size: 14px; margin-left: 20px; width: calc(100% - 440px); text-align: left; } + .el-button { color: rgb(154, 202, 128); width: 120px; @@ -350,12 +360,15 @@ export default { border-radius: 1px; box-shadow: 1px 0px 2px 0px grey; } + .el-button:hover { background-color: white; } + .el-button:active { background-color: white; } + .el-button:focus { background-color: white; } diff --git a/src/renderer/components/main.vue b/src/renderer/components/main.vue index e61cbe5..e4752e1 100644 --- a/src/renderer/components/main.vue +++ b/src/renderer/components/main.vue @@ -1025,6 +1025,13 @@ export default { url: '/web/get_printer_info' }) .then((res) => { + if (!res.data || !res.data.printerList) { + console.warn('获取工作站列表返回的数据格式不正确:', res) + this.infoData = [] + this.$message.error(this.$t('main.notConnected') || '获取工作站列表失败') + return + } + let infoData = [...this.infoData] this.infoData = res.data.printerList.map((item, index) => { let child = { ...item } @@ -1038,7 +1045,7 @@ export default { } }) // console.log('infoData', this.infoData) - if (!res.data.printerList || res.data.printerList.length == 0) { + if (res.data.printerList.length == 0) { this.$message.error(this.$t('main.notConnected')) } let DualSide = 0 //默认是单面 @@ -1077,7 +1084,9 @@ export default { this.DualSide = DualSide }) .catch((e) => { - + console.error('获取工作站列表失败:', e) + this.infoData = [] + this.$message.error(this.$t('main.notConnected') || '获取工作站列表失败,请检查网络连接') }) }, // 清除报错通知 diff --git a/src/renderer/components/systemControl.vue b/src/renderer/components/systemControl.vue index c02755c..e6e0cd3 100644 --- a/src/renderer/components/systemControl.vue +++ b/src/renderer/components/systemControl.vue @@ -9,24 +9,14 @@ state == null ? this.$t("systemControl.detecting") : state - ? this.$t("systemControl.start") - : this.$t("systemControl.stop") + ? this.$t("systemControl.start") + : this.$t("systemControl.stop") }}
{{ $t("systemControl.tips1") }}
- - + +
@@ -36,12 +26,8 @@
{{ $t("systemControl.selectWorkstation") }}
- +
@@ -118,27 +104,18 @@
{{ $t("systemControl.refreshTime1") }}
- - > + + >
{{ $t("systemControl.refreshTime2") }}
- +
{{ $t("systemControl.guide") }}
- +
@@ -147,12 +124,7 @@
{{ $t("systemControl.changeLanguage") }}
- +
@@ -323,7 +295,7 @@ export default { // ); //}, 2000); //this.workValue = !this.printData ? null : this.printData[0].PrinterID; - if (!localStorage.getItem('hideStep')||localStorage.getItem('hideStep')==0) this.showStep = true + if (!localStorage.getItem('hideStep') || localStorage.getItem('hideStep') == 0) this.showStep = true }, beforeDestroy() { this.timer = null; @@ -360,11 +332,20 @@ export default { method: "get", url: "/web/get_printer_info", }).then((res) => { + if (!res.data || !res.data.printerList) { + console.warn('获取工作站列表返回的数据格式不正确:', res) + this.printData = [] + return + } this.printData = res.data.printerList; if (this.printData.length != 0) { //自动选择第一个 this.workValue = this.printData[0].PrinterID; } + }).catch((e) => { + console.error('获取工作站列表失败:', e) + this.printData = [] + this.$message.error('获取工作站列表失败,请检查网络连接') }); }, checkServerState(callback) { @@ -779,12 +760,14 @@ export default { box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; + .restart { width: 100%; height: 180px; display: flex; flex-direction: column; border-bottom: 1px rgb(224, 224, 224) solid; + .title { font-size: 14px; width: 300px; @@ -797,27 +780,32 @@ export default { background-color: rgb(240, 240, 240); font-weight: bold; } + .service { width: 100%; height: 120px; display: flex; justify-content: flex-start; align-items: center; + .tips { color: rgb(94, 94, 94); font-size: 14px; margin-left: 20px; } + .serviceImg { display: flex; justify-content: center; align-items: center; flex-direction: row; margin-left: 100px; + .begin { width: 55px; height: 55px; } + .stop { margin-left: 5px; width: 50px; @@ -826,12 +814,14 @@ export default { } } } + .control { width: 100%; height: 420px; display: flex; flex-direction: column; border-bottom: 1px rgb(224, 224, 224) solid; + .title { margin-top: 20px; font-size: 14px; @@ -845,9 +835,11 @@ export default { background-color: rgb(240, 240, 240); font-weight: bold; } + .service { display: flex; flex-direction: column; + .select { display: flex; flex-direction: row; @@ -865,10 +857,12 @@ export default { width: 150px; margin-left: 20px; } + .el-select { width: 180px; } } + .concrete { display: flex; flex-direction: row; @@ -894,6 +888,7 @@ export default { flex-wrap: wrap; justify-content: flex-start; align-items: flex-start; + .el-button { width: 180px; height: 35px; @@ -911,15 +906,19 @@ export default { border-radius: 1px; box-shadow: 1px 0px 2px 0px grey; } + .el-button:nth-child(4) { margin-left: 0 !important; } + .el-button:hover { background-color: white; } + .el-button:active { background-color: white; } + .el-button:focus { background-color: white; } @@ -927,11 +926,13 @@ export default { } } } + .languageer { width: 100%; height: 220px; display: flex; flex-direction: column; + .title { margin-top: 20px; font-size: 14px; @@ -945,6 +946,7 @@ export default { background-color: rgb(240, 240, 240); font-weight: bold; } + .select { display: flex; flex-direction: row; @@ -952,12 +954,14 @@ export default { align-items: flex-start; margin-left: 20px; margin-top: 20px; + .lable { margin-top: 5px; font-size: 14px; width: 150px; text-align: left; } + .el-select { width: 180px; } diff --git a/src/renderer/components/work/AdvancedSettings.vue b/src/renderer/components/work/AdvancedSettings.vue index 74dd480..ae34709 100644 --- a/src/renderer/components/work/AdvancedSettings.vue +++ b/src/renderer/components/work/AdvancedSettings.vue @@ -17,11 +17,6 @@ -
{{ $t('work.installDongle') }} - +
-
- +
diff --git a/src/renderer/components/work/sections/HardwareControl.vue b/src/renderer/components/work/sections/HardwareControl.vue index 72f194d..7b86ab4 100644 --- a/src/renderer/components/work/sections/HardwareControl.vue +++ b/src/renderer/components/work/sections/HardwareControl.vue @@ -21,12 +21,6 @@ - - - - - diff --git a/src/renderer/lang/cn.js b/src/renderer/lang/cn.js index 3a0318e..369ec3c 100644 --- a/src/renderer/lang/cn.js +++ b/src/renderer/lang/cn.js @@ -117,6 +117,8 @@ export default { successReserve: "保存成功!", errorRead: "读取配置文件失败!", configTitle: "系统配置", + authCodePlaceholder: "请输入授权码", + authCodeTips: "系统授权码,用于激活高级功能和许可验证" }, dialog: { closeTips: "0.5秒后将自动关闭......", diff --git a/src/renderer/lang/en.js b/src/renderer/lang/en.js index eb91573..a6bf0ba 100644 --- a/src/renderer/lang/en.js +++ b/src/renderer/lang/en.js @@ -151,6 +151,8 @@ export default { successReserve: "Save success", errorRead: "Reading configuration file fail", configTitle: "CardSoon Production Service Configuration File", + authCodePlaceholder: "Enter authorization code", + authCodeTips: "System authorization code for activating advanced features and license validation" }, dialog: { closeTips: "The window will close in 0.5 seconds...", diff --git a/src/renderer/lang/ocn.js b/src/renderer/lang/ocn.js index a371df3..286f31e 100644 --- a/src/renderer/lang/ocn.js +++ b/src/renderer/lang/ocn.js @@ -93,6 +93,8 @@ export default { successReserve: "保存成功! ", errorRead: "讀取設定檔失敗! ", configTitle: "系統配寘", + authCodePlaceholder: "請輸入授權碼", + authCodeTips: "系統授權碼,用於啟動進階功能和許可驗證" }, dialog: { closeTips: "0.5秒後將自動關閉…… ",