From 3f6556ed37139142988bb8b697d8ff090de3df5f Mon Sep 17 00:00:00 2001
From: ccy <3140717620@qq.com>
Date: 星期一, 18 五月 2026 10:40:55 +0800
Subject: [PATCH] Merge branch 'master' of http://117.78.1.188:8089/r/CNNCSIM-LIC

---
 mainwindow.cpp |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/mainwindow.cpp b/mainwindow.cpp
index 20f1060..9499d6c 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -5,6 +5,7 @@
 #include <QClipboard>
 #include <QDateTime>
 #include <QDebug>
+#include <QDesktopServices>
 #include <QFileDialog>
 #include <QMessageBox>
 #include <QProcess>
@@ -63,6 +64,7 @@
     m_numToInfo.insert("12","IsEnabled_pipe");
     m_numToInfo.insert("13","IsEnabled_network");
     m_numToInfo.insert("14","Baseboard_Serialnumber");
+    changeUIstate();
 }
 
 QString MainWindow::toUpperAndLower(QString src)
@@ -518,6 +520,7 @@
     QDateTime licensedate = QDateTime::currentDateTime();
     QDateTime newlicensedate = licensedate.addMonths(time);
     QString licensedatestr = newlicensedate.toString("yyyy-MM-dd hh:mm:ss");
+    licensekey_Obj[m_numToInfo.key("LicensedDuration_start")] = licensedate.toString("yyyy-MM-dd hh:mm:ss");
     licensekey_Obj[m_numToInfo.key("LicensedDuration_end")] = licensedatestr;
     workingjsondoc.setObject(licensekey_Obj);
     //鏁版嵁鍘嬬缉锛屽幓绌烘牸鎹㈣绛夊浣欐棤鐢ㄤ俊鎭�
@@ -774,10 +777,10 @@
 
 void MainWindow::on_pushButton_viewUsers_clicked()
 {
-    QString excelPath = QApplication::applicationDirPath();
-    QString filename = QFileDialog::getOpenFileName(nullptr,tr("鎵撳紑鏂囦欢"),excelPath,tr("excel鏂囦欢(*.xlsx)"));
-    if(filename=="")
-    {
-        return;
-    }
+    QString excelPath = QApplication::applicationDirPath()+QStringLiteral("/瀹夊叏璇勪环杞欢鎺堟潈浜烘暟缁熻琛�.xlsx");
+
+    QUrl fileUrl = QUrl::fromLocalFile(excelPath);
+
+    // 2. 璋冪敤绯荤粺鏈嶅姟鎵撳紑鏂囦欢绠$悊鍣ㄥ苟閫変腑鏂囦欢
+    QDesktopServices::openUrl(fileUrl);
 }

--
Gitblit v1.9.1