。。。
This commit is contained in:
@@ -13,8 +13,7 @@ using namespace libxl;
|
||||
|
||||
void RepairMonitoringFromExcelToOracle( const std::wstring & filePath,
|
||||
unsigned int sheetIndex,
|
||||
unsigned int titleRowIndex,
|
||||
unsigned int firstRowIndex,
|
||||
bool hasTitleRow,
|
||||
const std::string & tnsName,
|
||||
const std::string & userName,
|
||||
const std::string & password )
|
||||
@@ -66,15 +65,17 @@ void RepairMonitoringFromExcelToOracle( const std::wstring & filePath,
|
||||
unsigned int index = firstColumnIndex;
|
||||
|
||||
//保存标题
|
||||
while ( index <= lastColumnIndex )
|
||||
if (hasTitleRow)
|
||||
{
|
||||
wstring && title = ReadCellStringFromXlsx( pBook, sheetIndex, titleRowIndex, index, false );
|
||||
while (index <= lastColumnIndex)
|
||||
{
|
||||
wstring&& title = ReadCellStringFromXlsx(pBook, sheetIndex, firstRowIndex, index, false);
|
||||
|
||||
titleMap.insert( pair<int, wstring>( index, title ) );
|
||||
titleMap.insert(pair<int, wstring>(index, title));
|
||||
|
||||
++index;
|
||||
++index;
|
||||
}
|
||||
}
|
||||
|
||||
//逐行保存数据
|
||||
|
||||
}
|
||||
|
@@ -4,8 +4,7 @@
|
||||
|
||||
void RepairMonitoringFromExcelToOracle( const std::wstring & filePath,
|
||||
unsigned int sheetIndex,
|
||||
unsigned int titleRowIndex,
|
||||
unsigned int firstRowIndex,
|
||||
bool hasTitleRow,
|
||||
const std::string & tnsName,
|
||||
const std::string & userName,
|
||||
const std::string & password );
|
||||
|
@@ -8,8 +8,6 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
UserInfo queryUserInfo( const string & userName,
|
||||
const string & password,
|
||||
const string & tnsName,
|
||||
|
@@ -5,4 +5,30 @@ QMainFrame::QMainFrame(QWidget* parent)
|
||||
: QMainWindow(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
void QMainFrame::init()
|
||||
{
|
||||
initData();
|
||||
initWidgets();
|
||||
initSignal();
|
||||
}
|
||||
|
||||
void QMainFrame::initData()
|
||||
{
|
||||
pStackedWidget = new QStackedWidget(this);
|
||||
pWidgetDataManagement = new QDataManagementWidget(pStackedWidget);
|
||||
}
|
||||
|
||||
void QMainFrame::initWidgets()
|
||||
{
|
||||
pStackedWidget->addWidget(pWidgetDataManagement);
|
||||
|
||||
setCentralWidget(pStackedWidget);
|
||||
}
|
||||
|
||||
void QMainFrame::initSignal()
|
||||
{
|
||||
}
|
||||
|
@@ -1,15 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QMainWindow>
|
||||
#include <QtWidgets/QStackedWidget>
|
||||
#include "QDataManagementWidget.h"
|
||||
#include "ui_QMainFrame.h"
|
||||
|
||||
class QMainFrame : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QMainFrame(QWidget* parent = Q_NULLPTR);
|
||||
QMainFrame( QWidget * parent = Q_NULLPTR );
|
||||
|
||||
private:
|
||||
Ui::QMainFrameClass ui;
|
||||
void init();
|
||||
void initData();
|
||||
void initWidgets();
|
||||
void initSignal();
|
||||
|
||||
private:
|
||||
Ui::QMainFrameClass ui;
|
||||
QStackedWidget * pStackedWidget;
|
||||
QDataManagementWidget * pWidgetDataManagement;
|
||||
};
|
||||
|
@@ -1,29 +1,100 @@
|
||||
<UI version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QMainFrameClass</class>
|
||||
<widget class="QMainWindow" name="QMainFrameClass" >
|
||||
<property name="objectName" >
|
||||
<string notr="true">QMainFrameClass</string>
|
||||
</property>
|
||||
<property name="geometry" >
|
||||
<widget class="QMainWindow" name="QMainFrameClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>796</width>
|
||||
<height>558</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string>QMainFrame</string>
|
||||
</property>
|
||||
<widget class="QMenuBar" name="menuBar" />
|
||||
<widget class="QToolBar" name="mainToolBar" />
|
||||
<widget class="QWidget" name="centralWidget" />
|
||||
<widget class="QStatusBar" name="statusBar" />
|
||||
<widget class="QWidget" name="centralWidget"/>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>796</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu">
|
||||
<property name="title">
|
||||
<string>系统</string>
|
||||
</property>
|
||||
<addaction name="pActionExit"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_2">
|
||||
<property name="title">
|
||||
<string>帮助</string>
|
||||
</property>
|
||||
<addaction name="pActionAbout"/>
|
||||
</widget>
|
||||
<addaction name="menu"/>
|
||||
<addaction name="menu_2"/>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>36</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<addaction name="pActionDataManagement"/>
|
||||
<addaction name="pActionParamentersManagement"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<action name="pActionExit">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/QMainFrame/Resources/quit.png</normaloff>:/QMainFrame/Resources/quit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>退出</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="pActionAbout">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/QMainFrame/Resources/cat.png</normaloff>:/QMainFrame/Resources/cat.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>关于</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="pActionDataManagement">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/QMainFrame/Resources/excel.png</normaloff>:/QMainFrame/Resources/excel.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>数据管理</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="pActionParamentersManagement">
|
||||
<property name="icon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/QMainFrame/Resources/option.png</normaloff>:/QMainFrame/Resources/option.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参数管理</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
<include location="resource.qrc"/>
|
||||
<include location="../../resource.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</UI>
|
||||
</ui>
|
||||
|
@@ -29,7 +29,7 @@ int main( int argc, char * argv[] )
|
||||
|
||||
test();
|
||||
|
||||
return 1;
|
||||
//return 1;
|
||||
|
||||
//登录界面
|
||||
try
|
||||
|
@@ -13,7 +13,7 @@ void test_username();
|
||||
|
||||
void test()
|
||||
{
|
||||
excelTest();
|
||||
//excelTest();
|
||||
}
|
||||
|
||||
void excelTest()
|
||||
|
@@ -0,0 +1,33 @@
|
||||
#include "QDataManagementWidget.h"
|
||||
|
||||
QDataManagementWidget::QDataManagementWidget( QWidget * parent )
|
||||
: QWidget( parent )
|
||||
{
|
||||
ui.setupUi( this );
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
QDataManagementWidget::~QDataManagementWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void QDataManagementWidget::init()
|
||||
{
|
||||
initData();
|
||||
initWidgets();
|
||||
initSignal();
|
||||
}
|
||||
|
||||
void QDataManagementWidget::initData()
|
||||
{
|
||||
}
|
||||
|
||||
void QDataManagementWidget::initWidgets()
|
||||
{
|
||||
setLayout( ui.pLayoutMain );
|
||||
}
|
||||
|
||||
void QDataManagementWidget::initSignal()
|
||||
{
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include "ui_QDataManagementWidget.h"
|
||||
|
||||
class QDataManagementWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QDataManagementWidget(QWidget *parent = Q_NULLPTR);
|
||||
~QDataManagementWidget();
|
||||
|
||||
private:
|
||||
void init();
|
||||
void initData();
|
||||
void initWidgets();
|
||||
void initSignal();
|
||||
|
||||
private:
|
||||
Ui::QDataManagementWidget ui;
|
||||
};
|
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QDataManagementWidget</class>
|
||||
<widget class="QWidget" name="QDataManagementWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>759</width>
|
||||
<height>487</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>QDataManagementWidget</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>20</y>
|
||||
<width>681</width>
|
||||
<height>431</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="pLayoutMain">
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>车商业绩表</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>车商方案表</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>送返修工单</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_4">
|
||||
<attribute name="title">
|
||||
<string>新送返修监控报表</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Reference in New Issue
Block a user