seyason 5 lat temu
rodzic
commit
815640ba17

+ 11 - 1
fhKeeper/formulahousekeeper/management-platform/pom.xml

@@ -114,5 +114,15 @@
         </dependency>
     </dependencies>
 
-
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 6 - 5
fhKeeper/formulahousekeeper/mywork/home.cpp

@@ -1,4 +1,4 @@
-#include "home.h"
+#include "home.h"
 #include "ui_home.h"
 #include <QDateTime>
 #include <QMessageBox>
@@ -20,7 +20,7 @@
 #include <windows.h>
 #include <tlhelp32.h>
 #include <stdio.h>
-
+#pragma execution_character_set("utf-8")
 Home::Home(QWidget *parent) :
     QMainWindow(parent),
     ui(new Ui::Home)
@@ -31,7 +31,7 @@ Home::Home(QWidget *parent) :
     connect(myTimer,&QTimer::timeout,[this](){
             captureScreen();
     });
-    myTimer->start(60000);
+    myTimer->start(10000);
 
     //set ui data
     webWidget = new QWebEngineView(this);
@@ -237,13 +237,14 @@ void Home::loadNavigate(QString sUrl)
 }
 Home::~Home()
 {
+    delete webWidget;
     delete ui;
 }
 void Home::closeEvent ( QCloseEvent * e )
 {
     if( QMessageBox::question(this,
-                             tr("Quit"),
-                             tr("Are you sure to quit this application?"),
+                             tr("退出"),
+                             tr("您确定要退出吗?"),
                               QMessageBox::Yes, QMessageBox::No )
                    == QMessageBox::Yes){
         e->accept();//不会将事件传递给组件的父组件

+ 3 - 3
fhKeeper/formulahousekeeper/mywork/httpapi.h

@@ -1,4 +1,4 @@
-#ifndef HTTPAPI
+#ifndef HTTPAPI
 #define HTTPAPI
 
 #include <functional>
@@ -6,8 +6,8 @@
 #include <QPair>
 #include <QJsonObject>
 #include "baseapi.h"
-const QString SERVER_URL = QString("http://127.0.0.1:10010");
-//const QString SERVER_URL = QString("http://118.190.47.230:10010");
+//const QString SERVER_URL = QString("http://127.0.0.1:10010");
+const QString SERVER_URL = QString("http://118.190.47.230:10010");
 class HttpAPI: public BaseAPI
 {
 public:

+ 12 - 3
fhKeeper/formulahousekeeper/mywork/mainwindow.cpp

@@ -1,4 +1,4 @@
-#include "mainwindow.h"
+#include "mainwindow.h"
 #include "ui_mainwindow.h"
 #include "home.h"
 
@@ -8,7 +8,7 @@
 #include <QEventLoop>
 #include <QMessageBox>
 #include "httpapi.h"
-
+#pragma execution_character_set("utf-8")
 MainWindow::MainWindow(QWidget *parent)
     : QMainWindow(parent)
     , ui(new Ui::MainWindow)
@@ -17,7 +17,15 @@ MainWindow::MainWindow(QWidget *parent)
     ui->setupUi(this);
     connect(ui->loginBtn,SIGNAL(clicked()),this,SLOT(login_in()));
 //    connect(ui->loginBtn, &QAction::triggered, this, &MainWindow::login_in);
-
+    // 设置窗体标题
+    setWindowTitle(tr("智能工时管家"));
+    //设置账号密码
+    m_setting->beginGroup("user");
+    if (m_setting->contains("phone")) {
+        ui->account->setText(m_setting->value("phone").toString());
+        ui->pwd->setText(m_setting->value("pwd").toString());
+    }
+    m_setting->endGroup();
 }
 void MainWindow::login_in(void){//登陆
     //设置url
@@ -38,6 +46,7 @@ void MainWindow::login_in(void){//登陆
                 m_setting->setValue("id", obj.value("id"));
                 m_setting->setValue("name", obj.value("name"));
                 m_setting->setValue("phone", obj.value("phone"));
+                m_setting->setValue("pwd", pwd);
                 m_setting->endGroup();
                 //enter home page
                 home = new Home();

+ 3 - 3
fhKeeper/formulahousekeeper/mywork/mainwindow.ui

@@ -30,14 +30,14 @@
    <widget class="QLabel" name="label">
     <property name="geometry">
      <rect>
-      <x>320</x>
-      <y>100</y>
+      <x>310</x>
+      <y>110</y>
       <width>151</width>
       <height>61</height>
      </rect>
     </property>
     <property name="text">
-     <string>欢迎使用工时管家软件</string>
+     <string>欢迎使用智能工时管家</string>
     </property>
    </widget>
    <widget class="QLineEdit" name="account">