更新文档

This commit is contained in:
2026-05-01 23:03:42 +08:00
parent 5a31ff2179
commit a32baa96e3
14 changed files with 2799 additions and 1853 deletions
+22 -21
View File
@@ -7,8 +7,8 @@ ApplicationWindow {
id: window
width: 1560
height: 920
minimumWidth: 900
minimumHeight: 620
minimumWidth: Qt.platform.os === "android" ? 360 : 900
minimumHeight: Qt.platform.os === "android" ? 560 : 620
visible: true
title: "人脸识别考勤系统"
color: "#f6f7f9"
@@ -41,11 +41,12 @@ ApplicationWindow {
property int currentPageIndex: 0
property bool timeSlotsExpanded: false
property bool mappingsExpanded: false
readonly property bool androidLayout: Qt.platform.os === "android"
readonly property bool compactLayout: width < 1460
readonly property bool denseLayout: width < 1380
readonly property bool narrowLayout: width < 1280
readonly property bool slimLayout: width < 1040
readonly property bool phoneLayout: width < 560
readonly property bool phoneLayout: width < (androidLayout ? 640 : 560)
readonly property int sidebarWidth: slimLayout ? 0 : (compactLayout ? 212 : 240)
font.family: appFontFamily
@@ -169,12 +170,14 @@ ApplicationWindow {
}
contentItem: Label {
width: control.availableWidth
text: control.text
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
color: control.labelColor
font.pixelSize: 13
font.weight: appBoldWeight
elide: Text.ElideRight
}
}
@@ -194,12 +197,14 @@ ApplicationWindow {
}
contentItem: Label {
width: control.availableWidth
text: control.text
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
color: control.labelColor
font.pixelSize: 13
font.weight: appBoldWeight
elide: Text.ElideRight
}
}
@@ -1972,7 +1977,7 @@ ApplicationWindow {
radius: 8
color: panelStrong
border.color: lineColor
Layout.preferredHeight: phoneLayout ? 218 : (slimLayout ? 174 : 88)
Layout.preferredHeight: serverConfigGrid.implicitHeight + (slimLayout ? 24 : 36)
clip: true
GridLayout {
@@ -1998,13 +2003,13 @@ ApplicationWindow {
}
SecondaryButton {
Layout.fillWidth: phoneLayout
Layout.fillWidth: slimLayout
text: "保存地址"
onClicked: appController.serverUrl = serverUrlField.text
}
PrimaryButton {
Layout.fillWidth: phoneLayout
Layout.fillWidth: slimLayout
text: "测试连接"
fillColor: tealColor
onClicked: appController.testConnection()
@@ -2017,19 +2022,17 @@ ApplicationWindow {
radius: 8
color: panelStrong
border.color: lineColor
Layout.preferredHeight: timeSlotsExpanded
? 18 + (phoneLayout ? 132 : 64) + 12 + (phoneLayout ? 0 : 42) + (phoneLayout ? 0 : 12) + Math.max(phoneLayout ? 96 : 52, timeSlotListView.contentHeight) + 18
: (phoneLayout ? 124 : 100)
Layout.preferredHeight: timeSlotCardLayout.implicitHeight + 36
clip: true
ColumnLayout {
id: timeSlotCardLayout
anchors.fill: parent
anchors.margins: 18
spacing: 12
ColumnLayout {
Layout.fillWidth: true
Layout.preferredHeight: phoneLayout ? 132 : 64
spacing: 12
SectionHeader {
@@ -2040,7 +2043,7 @@ ApplicationWindow {
}
GridLayout {
Layout.fillWidth: true
columns: phoneLayout ? 3 : 5
columns: slimLayout ? 3 : 5
columnSpacing: 8
rowSpacing: 8
@@ -2058,7 +2061,7 @@ ApplicationWindow {
SecondaryButton {
Layout.fillWidth: true
visible: timeSlotsExpanded
text: "恢复默认"
text: "清空时段"
onClicked: {
appController.timeSlotModel.resetToDefault();
appController.saveTimeSlots();
@@ -2067,13 +2070,13 @@ ApplicationWindow {
SecondaryButton {
Layout.fillWidth: true
visible: timeSlotsExpanded
text: phoneLayout ? "同步" : "从服务器同步"
text: slimLayout ? "同步" : "从服务器同步"
onClicked: appController.reloadTimeSlotsFromServer()
}
PrimaryButton {
Layout.fillWidth: true
visible: timeSlotsExpanded
text: phoneLayout ? "保存" : "保存时间段"
text: slimLayout ? "保存" : "保存时间段"
onClicked: appController.saveTimeSlots()
}
}
@@ -2120,7 +2123,7 @@ ApplicationWindow {
id: timeSlotListView
visible: timeSlotsExpanded
Layout.fillWidth: true
Layout.preferredHeight: visible ? contentHeight : 0
Layout.preferredHeight: visible ? Math.max(phoneLayout ? 96 : 52, contentHeight) : 0
clip: false
interactive: false
spacing: 8
@@ -2253,19 +2256,17 @@ ApplicationWindow {
radius: 8
color: panelStrong
border.color: lineColor
Layout.preferredHeight: mappingsExpanded
? 18 + (phoneLayout ? 120 : 64) + 12 + mappingTabs.implicitHeight + 12 + Math.max(phoneLayout ? 112 : 64, mappingTabs.currentIndex === 0 ? studentMappingListView.contentHeight : classMappingListView.contentHeight) + 18
: (phoneLayout ? 124 : 100)
Layout.preferredHeight: mappingCardLayout.implicitHeight + 36
clip: true
ColumnLayout {
id: mappingCardLayout
anchors.fill: parent
anchors.margins: 18
spacing: 12
ColumnLayout {
Layout.fillWidth: true
Layout.preferredHeight: phoneLayout ? 120 : 64
spacing: 12
SectionHeader {
Layout.fillWidth: true
@@ -2324,7 +2325,7 @@ ApplicationWindow {
StackLayout {
visible: mappingsExpanded
Layout.fillWidth: true
Layout.preferredHeight: visible ? (mappingTabs.currentIndex === 0 ? studentMappingListView.contentHeight : classMappingListView.contentHeight) : 0
Layout.preferredHeight: visible ? Math.max(phoneLayout ? 112 : 64, mappingTabs.currentIndex === 0 ? studentMappingListView.contentHeight : classMappingListView.contentHeight) : 0
currentIndex: mappingTabs.currentIndex
Rectangle {
@@ -2861,7 +2862,7 @@ ApplicationWindow {
TextArea {
Layout.fillWidth: true
Layout.fillHeight: true
text: "本系统为纪田野的个人毕业设计作品,仅用于毕业设计展示、学习研究与系统功能验证。\nCopyright © 2026 纪田野。保留所有权利。\n仓库地址:https://git.yzfh.eu.cc/yzfh/qt.git\n演示账号与密码请在实际部署环境中单独配置。"
text: "本系统为纪田野的个人毕业设计作品,仅用于毕业设计展示、学习研究与系统功能验证。\n\nCopyright © 2026 纪田野。保留所有权利。\n\n仓库地址:https://git.yzfh.eu.cc/yzfh/qt.git\n\n演示账号:jtybishe 密码:jtybishe"
readOnly: true
selectByMouse: true
selectByKeyboard: true