diff --git a/app/HGProductionTool/HGProductionTool.pro b/app/HGProductionTool/HGProductionTool.pro
index 6719b36..72547e9 100644
--- a/app/HGProductionTool/HGProductionTool.pro
+++ b/app/HGProductionTool/HGProductionTool.pro
@@ -87,6 +87,7 @@ SOURCES += \
dialog_login.cpp \
dialog_rootfuntion.cpp \
dialog_setburnsn.cpp \
+ dialog_setlogpath.cpp \
dialog_uploadcfgfile.cpp \
dialog_userinput.cpp \
dialog_registeraccount.cpp \
@@ -112,6 +113,7 @@ HEADERS += \
dialog_login.h \
dialog_rootfuntion.h \
dialog_setburnsn.h \
+ dialog_setlogpath.h \
dialog_uploadcfgfile.h \
dialog_userinput.h \
dialog_registeraccount.h \
@@ -131,6 +133,7 @@ FORMS += \
dialog_login.ui \
dialog_rootfuntion.ui \
dialog_setburnsn.ui \
+ dialog_setlogpath.ui \
dialog_uploadcfgfile.ui \
dialog_userinput.ui \
dialog_registeraccount.ui \
diff --git a/app/HGProductionTool/ProductionTool_zh_CN.qm b/app/HGProductionTool/ProductionTool_zh_CN.qm
index 97224c6..20cc42d 100644
Binary files a/app/HGProductionTool/ProductionTool_zh_CN.qm and b/app/HGProductionTool/ProductionTool_zh_CN.qm differ
diff --git a/app/HGProductionTool/ProductionTool_zh_CN.ts b/app/HGProductionTool/ProductionTool_zh_CN.ts
index c51807d..7f0c1d4 100644
--- a/app/HGProductionTool/ProductionTool_zh_CN.ts
+++ b/app/HGProductionTool/ProductionTool_zh_CN.ts
@@ -77,17 +77,17 @@
设备类型:
-
+
设备名:
-
+
序列号:
-
+
设置序列号
@@ -107,10 +107,15 @@
进入测试
-
+
重启
+
+
+
+ 选择日志路径
+
确定
@@ -120,35 +125,35 @@
取消
-
-
-
-
+
+
+
+
提示
-
+
速度模式
-
+
失败!
-
+
成功!
-
+
休眠时间
-
+
Vid和Pid
@@ -161,93 +166,93 @@
检测到配置%1不一致,已重新配置,请再次检查
-
+
配置一致!
-
+
设备已丢失
-
+
序列号为空
-
+
序列号不合法
-
+
该设备正在进行测试
-
+
设置序列号失败
-
+
设备名: %1
-
+
Target Configration:
目标配置:
-
-
-
-
+
+
+
+
Speep mode: %1PPM
速度模式: %1PPM
-
-
-
+
+
+
设置
-
-
-
-
+
+
+
+
Sleep time: %1minute
休眠时间: %1分钟
-
-
-
-
+
+
+
+
Vid: %1 Pid: %2
Vid: %1 Pid: %2
-
+
当前设备配置:
-
-
+
+
设置序列号: %1
@@ -260,23 +265,23 @@
测试结果:成功!
-
-
+
+
检测到配置 %1不一致,请重新配置后再次检查
-
+
检测到配置 %1不一致,请重启后再次检查
-
+
将目标配置设置到设备
-
+
测试内容:
@@ -285,21 +290,21 @@
成功,请检查配置
-
-
-
-
+
+
+
+
休眠时间: 不休眠
-
-
+
+
测试员: %1, 测试项: %2
-
+
设置序列号成功
@@ -389,6 +394,55 @@
序列号为空
+
+ Dialog_SetLogPath
+
+
+
+ 选择日志保存路径
+
+
+
+
+ 日志路径:
+
+
+
+
+ 确定
+
+
+
+
+ 取消
+
+
+
+
+ 选择路径
+
+
+
+
+
+ 提示
+
+
+
+
+ 文件不能为空
+
+
+
+
+ 创建文件失败
+
+
+
+
+ 打开文件
+
+
Dialog_UserInput
@@ -682,35 +736,35 @@
登录
-
-
-
-
+
+
+
+
提示
-
+
账户不存在
-
+
密码不能为空
-
+
密码错误
-
+
请先选择配置文件
-
+
选择配置文件
@@ -1184,12 +1238,12 @@
设备未连接
-
+
设备类型:
-
+
序列号:
@@ -1206,7 +1260,7 @@
休眠时间:
-
+
加载上一次上传的图片
@@ -1215,14 +1269,14 @@
设备已断开
-
+
提示
-
-
-
+
+
+
畸变修正值:
@@ -1235,68 +1289,68 @@
取消
-
+
目标配置: 速度模式:
-
+
休眠时间:
-
+
,但是校正有异常
-
+
请验证设备配置:
-
+
vid:%1
-
+
pid:%1
-
+
休眠时间:%1分钟
-
+
休眠时间:%1
-
-
+
+
不休眠
-
+
速度模式:%1PPM
-
+
设备型号:%1
@@ -1311,46 +1365,46 @@
设备序列号: %1, 测试项: %2, 测试结果: 通过!
-
-
+
+
设备历史扫描张数:
-
-
-
-
+
+
+
+
提示
-
+
测试员: %1, 测试项: %2, 测试结果: 不通过! 原因: %3
-
+
测试员: %1, 测试项: %2, 测试结果: 通过!
-
+
无纸
-
+
设备处于休眠模式
-
+
设备处于计数模式
-
+
其他错误
@@ -1359,39 +1413,39 @@
设备序列号:%1
-
+
序号
-
+
测试项
-
+
测试状态
-
+
未测试
-
-
+
+
不通过
-
+
不支持
-
-
+
+
通过
@@ -1417,31 +1471,31 @@
Pid:
-
-
+
+
设备滚轴张数:
-
-
+
+
标准圆:宽 * 高:
-
+
固件号:
-
+
设备序列号:%1
-
+
device firmware number:%1
@@ -1449,17 +1503,17 @@
-
+
分钟
-
+
VID:
-
+
PID:
@@ -1519,25 +1573,40 @@
登出
-
+
+
+
+
+
+
退出
-
+
上传配置文件
-
+
刷新设备列表
-
+
查看日志
+
+
+
+
+
+
+
+
+
+
账户在其他地方登录
diff --git a/app/HGProductionTool/dialog_inputserialnum.cpp b/app/HGProductionTool/dialog_inputserialnum.cpp
index 942fcae..91cbee8 100644
--- a/app/HGProductionTool/dialog_inputserialnum.cpp
+++ b/app/HGProductionTool/dialog_inputserialnum.cpp
@@ -1,7 +1,10 @@
#include "dialog_inputserialnum.h"
#include "ui_dialog_inputserialnum.h"
#include "base/HGBase.h"
+#include "HGString.h"
#include "HGUIGlobal.h"
+#include "app_cfg.h"
+#include "dialog_setlogpath.h"
Dialog_InputSerialNum::Dialog_InputSerialNum(class MainWindow *mainWnd, Dialog_logIn::LogInType logInType, const QString &devName, const QString &profileName,
const QString &accountName, SANE_Handle handle, const QString &serialNum, const QString &devType) :
@@ -34,6 +37,12 @@ Dialog_InputSerialNum::Dialog_InputSerialNum(class MainWindow *mainWnd, Dialog_l
ui->pbtn_setConfig->setEnabled(false);
}
+ ui->pbtn_slectLogPath->setVisible(false);
+ if (m_accountName == "admin")
+ {
+ ui->pbtn_slectLogPath->setVisible(true);
+ }
+
ui->pbtn_enterTest->setEnabled(false);
ui->label_scanner->setText(tr("Device name: %1").arg(m_devName));
@@ -275,14 +284,16 @@ void Dialog_InputSerialNum::updateCurDeviceCfg()
QString Dialog_InputSerialNum::getLogPath()
{
- HGChar cachePath[512];
- HGBase_GetDocumentsPath(cachePath, 512);
+ HGChar logPath[512];
+ HGBase_GetDocumentsPath(logPath, 512);
HGChar procName[512];
HGBase_GetProcessName(procName, 512);
- strcat(cachePath, procName);
- strcat(cachePath, "/Test_Log/");
+ strcat(logPath, procName);
+ strcat(logPath, "/Test_Log/");
+ strcat(logPath, m_devType.toStdString().c_str());
+ strcat(logPath, "/");
- return getStdFileName(cachePath);
+ return getCfgValue("save", "logPath", getStdFileName(StdStringToUtf8(logPath).c_str()));
}
void Dialog_InputSerialNum::writeTestLog(QString logContent)
@@ -483,3 +494,9 @@ void Dialog_InputSerialNum::on_pbtn_reboot_clicked()
{
rebootDevice();
}
+
+void Dialog_InputSerialNum::on_pbtn_slectLogPath_clicked()
+{
+ Dialog_SetLogPath dlg(m_devType, this);
+ dlg.exec();
+}
diff --git a/app/HGProductionTool/dialog_inputserialnum.h b/app/HGProductionTool/dialog_inputserialnum.h
index 8558a8b..3d5cba4 100644
--- a/app/HGProductionTool/dialog_inputserialnum.h
+++ b/app/HGProductionTool/dialog_inputserialnum.h
@@ -70,6 +70,8 @@ private slots:
void on_pbtn_reboot_clicked();
+ void on_pbtn_slectLogPath_clicked();
+
private:
Ui::Dialog_InputSerialNum *ui;
diff --git a/app/HGProductionTool/dialog_inputserialnum.ui b/app/HGProductionTool/dialog_inputserialnum.ui
index fec0793..e11c015 100644
--- a/app/HGProductionTool/dialog_inputserialnum.ui
+++ b/app/HGProductionTool/dialog_inputserialnum.ui
@@ -212,6 +212,25 @@
Set Sn
+
+
+
+ 560
+ 50
+ 181
+ 31
+
+
+
+
+ 131
+ 31
+
+
+
+ Select Log Path
+
+
diff --git a/app/HGProductionTool/dialog_login.cpp b/app/HGProductionTool/dialog_login.cpp
index 9158d90..88a719f 100644
--- a/app/HGProductionTool/dialog_login.cpp
+++ b/app/HGProductionTool/dialog_login.cpp
@@ -27,6 +27,7 @@ Dialog_logIn::Dialog_logIn(QWidget *parent) :
ft2.setPointSize(8);
ui->lineEdit_password->setFont(ft2);
+ ui->pbtn_login->setDefault(true);
ui->pbtn_setting->setVisible(false);
ui->radioButton_pressureTest->setVisible(false);
diff --git a/app/HGProductionTool/form_maininterface.cpp b/app/HGProductionTool/form_maininterface.cpp
index 2e0b160..a25aae0 100644
--- a/app/HGProductionTool/form_maininterface.cpp
+++ b/app/HGProductionTool/form_maininterface.cpp
@@ -10,6 +10,7 @@
#include "HGString.h"
#include "form_texttips.h"
#include "test_base.h"
+#include "app_cfg.h"
#include "hgscanner.h"
#include "mainwindow.h"
#include "dialog_excepdesc.h"
@@ -672,14 +673,16 @@ void Form_mainInterface::getLogInfo(int ret)
QString Form_mainInterface::getLogPath()
{
- HGChar cachePath[512];
- HGBase_GetDocumentsPath(cachePath, 512);
+ HGChar logPath[512];
+ HGBase_GetDocumentsPath(logPath, 512);
HGChar procName[512];
HGBase_GetProcessName(procName, 512);
- strcat(cachePath, procName);
- strcat(cachePath, "/Test_Log/");
+ strcat(logPath, procName);
+ strcat(logPath, "/Test_Log/");
+ strcat(logPath, m_devType.toStdString().c_str());
+ strcat(logPath, "/");
- return getStdFileName(cachePath);
+ return getCfgValue("save", "logPath", getStdFileName(StdStringToUtf8(logPath).c_str()));
}
void Form_mainInterface::writeTestLog(QString logContent)
diff --git a/app/HGProductionTool/mainwindow.cpp b/app/HGProductionTool/mainwindow.cpp
index 0f5ac04..33654ff 100644
--- a/app/HGProductionTool/mainwindow.cpp
+++ b/app/HGProductionTool/mainwindow.cpp
@@ -4,6 +4,7 @@
#include
#include "base/HGBase.h"
#include "HGUIGlobal.h"
+#include "app_cfg.h"
#include "dialog_login.h"
#include "dialog_changepwd.h"
#include "dialog_accountmanage.h"
@@ -34,10 +35,10 @@ MainWindow::MainWindow(Dialog_logIn::LogInType loginType, const QString &profile
ui->act_manage->setVisible(false);
ui->act_export->setVisible(false);
ui->act_upload->setVisible(false);
-// ui->act_openLog->setVisible(false);
+ ui->act_openLog->setVisible(false);
-// if (m_accountName == "admin")
-// ui->act_openLog->setVisible(true);
+ if (m_accountName == "admin")
+ ui->act_openLog->setVisible(true);
ui->act_refreshDevice->setShortcut(QKeySequence("F5"));
@@ -699,7 +700,9 @@ void MainWindow::on_act_openLog_triggered()
strcat(logPath, procName);
strcat(logPath, "/Test_Log/");
- QString fileName = logPath + m_accountName + ".log";
+ QString defaultFileName = logPath + m_accountName + ".log";
+
+ QString fileName = getCfgValue("save", "logPath", defaultFileName);
QFileInfo fileInfo(getStdFileName(fileName));
auto pathDir = fileInfo.path();
QString strFilePath = "file:///" + pathDir;
diff --git a/app/HGProductionTool/mainwindow.ui b/app/HGProductionTool/mainwindow.ui
index 4f399e2..5bd2765 100644
--- a/app/HGProductionTool/mainwindow.ui
+++ b/app/HGProductionTool/mainwindow.ui
@@ -101,6 +101,11 @@
Ctrl+L
+
+
+ act_setLogPath
+
+