TG-PlatformPlus/qml/DataAnalysis.qml

64 lines
1.5 KiB
QML

import QtQuick
import QtQuick.Controls
import QtWebEngine
import "./common"
// import "./Style"
Item {
id: self
width: 400
height: 300
//![1]
property var weburl: "http://" + g_settingGrafanaHost+":" + g_settingGrafanaPort + g_settingGrafanaDashboardsUrl2
Rectangle
{
id: btnRectangle
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
height: 30
z:2
Row
{
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
spacing: 5
QxTitleButton{
text:"历史数据"
onClicked: historyDlg.visible = true
}
}
Row
{
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 10
spacing: 30
QxText{
text: "测试人员: " + g_session.name
}
QxText{
text:"测试地点: " + g_settingLocation
}
QxText{
text:"测试单位: " + g_settingCompany
}
}
}
WebEngineView {
id: webengine
anchors.left: parent.left
anchors.right: parent.right
anchors.top: btnRectangle.bottom
anchors.bottom: parent.bottom
url: g_settingGrafanaDashboardsUrl2 != "" ? weburl : ""
Text{text: weburl}
}
HistoryDialog{
id: historyDlg
visible: false
}
}