diff --git a/LaserMethane.xcodeproj/project.pbxproj b/LaserMethane.xcodeproj/project.pbxproj index 8e73376..8322bfa 100644 --- a/LaserMethane.xcodeproj/project.pbxproj +++ b/LaserMethane.xcodeproj/project.pbxproj @@ -37,6 +37,12 @@ 65F2E02E26B1341300179EBD /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */; }; 65F2E03226B164CC00179EBD /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03026B164CC00179EBD /* LogViewController.swift */; }; 65F2E03326B164CC00179EBD /* LogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03126B164CC00179EBD /* LogViewController.xib */; }; + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03A26B1723700179EBD /* InspectViewController.swift */; }; + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03B26B1723700179EBD /* InspectViewController.xib */; }; + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03E26B1724900179EBD /* EventViewController.swift */; }; + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03F26B1724900179EBD /* EventViewController.xib */; }; + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E04226B2392600179EBD /* ListCustomCell.swift */; }; + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E04326B2392600179EBD /* ListCustomCell.xib */; }; 9C82F906203FB8735A689DE4 /* Pods_LaserMethane.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */; }; /* End PBXBuildFile section */ @@ -74,6 +80,12 @@ 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SwitchTableViewCell.xib; sourceTree = ""; }; 65F2E03026B164CC00179EBD /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 65F2E03126B164CC00179EBD /* LogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogViewController.xib; sourceTree = ""; }; + 65F2E03A26B1723700179EBD /* InspectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectViewController.swift; sourceTree = ""; }; + 65F2E03B26B1723700179EBD /* InspectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InspectViewController.xib; sourceTree = ""; }; + 65F2E03E26B1724900179EBD /* EventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventViewController.swift; sourceTree = ""; }; + 65F2E03F26B1724900179EBD /* EventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EventViewController.xib; sourceTree = ""; }; + 65F2E04226B2392600179EBD /* ListCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCustomCell.swift; sourceTree = ""; }; + 65F2E04326B2392600179EBD /* ListCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListCustomCell.xib; sourceTree = ""; }; 9D62480C27D0BD75CD9B2998 /* Pods-LaserMethane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaserMethane.debug.xcconfig"; path = "Target Support Files/Pods-LaserMethane/Pods-LaserMethane.debug.xcconfig"; sourceTree = ""; }; C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaserMethane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -109,6 +121,8 @@ 6518222826AFEAE500FCC275 /* ViewController */ = { isa = PBXGroup; children = ( + 65F2E03526B1721700179EBD /* Event */, + 65F2E03426B1720F00179EBD /* Inspect */, 65F2E02F26B164B200179EBD /* Log */, 65F2E01526B1007300179EBD /* Settings */, 65F2E00E26B0E69900179EBD /* MainMenu */, @@ -229,6 +243,8 @@ 65F2E02426B1326D00179EBD /* CommonTableViewCell.xib */, 65F2E02B26B1341300179EBD /* SwitchTableViewCell.swift */, 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */, + 65F2E04226B2392600179EBD /* ListCustomCell.swift */, + 65F2E04326B2392600179EBD /* ListCustomCell.xib */, ); path = View; sourceTree = ""; @@ -242,6 +258,24 @@ path = Log; sourceTree = ""; }; + 65F2E03426B1720F00179EBD /* Inspect */ = { + isa = PBXGroup; + children = ( + 65F2E03A26B1723700179EBD /* InspectViewController.swift */, + 65F2E03B26B1723700179EBD /* InspectViewController.xib */, + ); + path = Inspect; + sourceTree = ""; + }; + 65F2E03526B1721700179EBD /* Event */ = { + isa = PBXGroup; + children = ( + 65F2E03E26B1724900179EBD /* EventViewController.swift */, + 65F2E03F26B1724900179EBD /* EventViewController.xib */, + ); + path = Event; + sourceTree = ""; + }; AC84A85F6B9863F5CA60B68A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,8 +353,11 @@ buildActionMask = 2147483647; files = ( 65F2E00B26B012D700179EBD /* LoginViewController.xib in Resources */, + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */, + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */, 65F2E01D26B1019200179EBD /* SettingViewController.xib in Resources */, 65BF7C2826AFDDCD000FEC82 /* LaunchScreen.storyboard in Resources */, + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */, 65F2DFFB26B0099800179EBD /* GuideViewController.xib in Resources */, 65F2E02626B1326D00179EBD /* CommonTableViewCell.xib in Resources */, 65F2E01226B0E6D700179EBD /* MainMenuViewController.xib in Resources */, @@ -381,8 +418,10 @@ buildActionMask = 2147483647; files = ( 65F2DFFE26B0128C00179EBD /* ActionResultModel.swift in Sources */, + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */, 6518222526AFE98500FCC275 /* BaseViewController.swift in Sources */, 65F2DFFA26B0099800179EBD /* GuideViewController.swift in Sources */, + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */, 65F2E01C26B1019200179EBD /* SettingViewController.swift in Sources */, 6518222726AFE9EB00FCC275 /* String.swift in Sources */, 65F2E02D26B1341300179EBD /* SwitchTableViewCell.swift in Sources */, @@ -399,6 +438,7 @@ 65F2E00526B0129100179EBD /* InspectListModel.swift in Sources */, 65F2E00626B0129100179EBD /* BaseConfigModel.swift in Sources */, 65F2E00A26B012D700179EBD /* LoginViewController.swift in Sources */, + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */, 65F2DFCC26AFF2A900179EBD /* KeychainManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/LaserMethane.xcodeproj/project.pbxproj b/LaserMethane.xcodeproj/project.pbxproj index 8e73376..8322bfa 100644 --- a/LaserMethane.xcodeproj/project.pbxproj +++ b/LaserMethane.xcodeproj/project.pbxproj @@ -37,6 +37,12 @@ 65F2E02E26B1341300179EBD /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */; }; 65F2E03226B164CC00179EBD /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03026B164CC00179EBD /* LogViewController.swift */; }; 65F2E03326B164CC00179EBD /* LogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03126B164CC00179EBD /* LogViewController.xib */; }; + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03A26B1723700179EBD /* InspectViewController.swift */; }; + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03B26B1723700179EBD /* InspectViewController.xib */; }; + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03E26B1724900179EBD /* EventViewController.swift */; }; + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03F26B1724900179EBD /* EventViewController.xib */; }; + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E04226B2392600179EBD /* ListCustomCell.swift */; }; + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E04326B2392600179EBD /* ListCustomCell.xib */; }; 9C82F906203FB8735A689DE4 /* Pods_LaserMethane.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */; }; /* End PBXBuildFile section */ @@ -74,6 +80,12 @@ 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SwitchTableViewCell.xib; sourceTree = ""; }; 65F2E03026B164CC00179EBD /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 65F2E03126B164CC00179EBD /* LogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogViewController.xib; sourceTree = ""; }; + 65F2E03A26B1723700179EBD /* InspectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectViewController.swift; sourceTree = ""; }; + 65F2E03B26B1723700179EBD /* InspectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InspectViewController.xib; sourceTree = ""; }; + 65F2E03E26B1724900179EBD /* EventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventViewController.swift; sourceTree = ""; }; + 65F2E03F26B1724900179EBD /* EventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EventViewController.xib; sourceTree = ""; }; + 65F2E04226B2392600179EBD /* ListCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCustomCell.swift; sourceTree = ""; }; + 65F2E04326B2392600179EBD /* ListCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListCustomCell.xib; sourceTree = ""; }; 9D62480C27D0BD75CD9B2998 /* Pods-LaserMethane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaserMethane.debug.xcconfig"; path = "Target Support Files/Pods-LaserMethane/Pods-LaserMethane.debug.xcconfig"; sourceTree = ""; }; C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaserMethane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -109,6 +121,8 @@ 6518222826AFEAE500FCC275 /* ViewController */ = { isa = PBXGroup; children = ( + 65F2E03526B1721700179EBD /* Event */, + 65F2E03426B1720F00179EBD /* Inspect */, 65F2E02F26B164B200179EBD /* Log */, 65F2E01526B1007300179EBD /* Settings */, 65F2E00E26B0E69900179EBD /* MainMenu */, @@ -229,6 +243,8 @@ 65F2E02426B1326D00179EBD /* CommonTableViewCell.xib */, 65F2E02B26B1341300179EBD /* SwitchTableViewCell.swift */, 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */, + 65F2E04226B2392600179EBD /* ListCustomCell.swift */, + 65F2E04326B2392600179EBD /* ListCustomCell.xib */, ); path = View; sourceTree = ""; @@ -242,6 +258,24 @@ path = Log; sourceTree = ""; }; + 65F2E03426B1720F00179EBD /* Inspect */ = { + isa = PBXGroup; + children = ( + 65F2E03A26B1723700179EBD /* InspectViewController.swift */, + 65F2E03B26B1723700179EBD /* InspectViewController.xib */, + ); + path = Inspect; + sourceTree = ""; + }; + 65F2E03526B1721700179EBD /* Event */ = { + isa = PBXGroup; + children = ( + 65F2E03E26B1724900179EBD /* EventViewController.swift */, + 65F2E03F26B1724900179EBD /* EventViewController.xib */, + ); + path = Event; + sourceTree = ""; + }; AC84A85F6B9863F5CA60B68A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,8 +353,11 @@ buildActionMask = 2147483647; files = ( 65F2E00B26B012D700179EBD /* LoginViewController.xib in Resources */, + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */, + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */, 65F2E01D26B1019200179EBD /* SettingViewController.xib in Resources */, 65BF7C2826AFDDCD000FEC82 /* LaunchScreen.storyboard in Resources */, + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */, 65F2DFFB26B0099800179EBD /* GuideViewController.xib in Resources */, 65F2E02626B1326D00179EBD /* CommonTableViewCell.xib in Resources */, 65F2E01226B0E6D700179EBD /* MainMenuViewController.xib in Resources */, @@ -381,8 +418,10 @@ buildActionMask = 2147483647; files = ( 65F2DFFE26B0128C00179EBD /* ActionResultModel.swift in Sources */, + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */, 6518222526AFE98500FCC275 /* BaseViewController.swift in Sources */, 65F2DFFA26B0099800179EBD /* GuideViewController.swift in Sources */, + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */, 65F2E01C26B1019200179EBD /* SettingViewController.swift in Sources */, 6518222726AFE9EB00FCC275 /* String.swift in Sources */, 65F2E02D26B1341300179EBD /* SwitchTableViewCell.swift in Sources */, @@ -399,6 +438,7 @@ 65F2E00526B0129100179EBD /* InspectListModel.swift in Sources */, 65F2E00626B0129100179EBD /* BaseConfigModel.swift in Sources */, 65F2E00A26B012D700179EBD /* LoginViewController.swift in Sources */, + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */, 65F2DFCC26AFF2A900179EBD /* KeychainManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate index f410d4e..0da8420 100644 --- a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate +++ b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/LaserMethane.xcodeproj/project.pbxproj b/LaserMethane.xcodeproj/project.pbxproj index 8e73376..8322bfa 100644 --- a/LaserMethane.xcodeproj/project.pbxproj +++ b/LaserMethane.xcodeproj/project.pbxproj @@ -37,6 +37,12 @@ 65F2E02E26B1341300179EBD /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */; }; 65F2E03226B164CC00179EBD /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03026B164CC00179EBD /* LogViewController.swift */; }; 65F2E03326B164CC00179EBD /* LogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03126B164CC00179EBD /* LogViewController.xib */; }; + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03A26B1723700179EBD /* InspectViewController.swift */; }; + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03B26B1723700179EBD /* InspectViewController.xib */; }; + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03E26B1724900179EBD /* EventViewController.swift */; }; + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03F26B1724900179EBD /* EventViewController.xib */; }; + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E04226B2392600179EBD /* ListCustomCell.swift */; }; + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E04326B2392600179EBD /* ListCustomCell.xib */; }; 9C82F906203FB8735A689DE4 /* Pods_LaserMethane.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */; }; /* End PBXBuildFile section */ @@ -74,6 +80,12 @@ 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SwitchTableViewCell.xib; sourceTree = ""; }; 65F2E03026B164CC00179EBD /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 65F2E03126B164CC00179EBD /* LogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogViewController.xib; sourceTree = ""; }; + 65F2E03A26B1723700179EBD /* InspectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectViewController.swift; sourceTree = ""; }; + 65F2E03B26B1723700179EBD /* InspectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InspectViewController.xib; sourceTree = ""; }; + 65F2E03E26B1724900179EBD /* EventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventViewController.swift; sourceTree = ""; }; + 65F2E03F26B1724900179EBD /* EventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EventViewController.xib; sourceTree = ""; }; + 65F2E04226B2392600179EBD /* ListCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCustomCell.swift; sourceTree = ""; }; + 65F2E04326B2392600179EBD /* ListCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListCustomCell.xib; sourceTree = ""; }; 9D62480C27D0BD75CD9B2998 /* Pods-LaserMethane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaserMethane.debug.xcconfig"; path = "Target Support Files/Pods-LaserMethane/Pods-LaserMethane.debug.xcconfig"; sourceTree = ""; }; C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaserMethane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -109,6 +121,8 @@ 6518222826AFEAE500FCC275 /* ViewController */ = { isa = PBXGroup; children = ( + 65F2E03526B1721700179EBD /* Event */, + 65F2E03426B1720F00179EBD /* Inspect */, 65F2E02F26B164B200179EBD /* Log */, 65F2E01526B1007300179EBD /* Settings */, 65F2E00E26B0E69900179EBD /* MainMenu */, @@ -229,6 +243,8 @@ 65F2E02426B1326D00179EBD /* CommonTableViewCell.xib */, 65F2E02B26B1341300179EBD /* SwitchTableViewCell.swift */, 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */, + 65F2E04226B2392600179EBD /* ListCustomCell.swift */, + 65F2E04326B2392600179EBD /* ListCustomCell.xib */, ); path = View; sourceTree = ""; @@ -242,6 +258,24 @@ path = Log; sourceTree = ""; }; + 65F2E03426B1720F00179EBD /* Inspect */ = { + isa = PBXGroup; + children = ( + 65F2E03A26B1723700179EBD /* InspectViewController.swift */, + 65F2E03B26B1723700179EBD /* InspectViewController.xib */, + ); + path = Inspect; + sourceTree = ""; + }; + 65F2E03526B1721700179EBD /* Event */ = { + isa = PBXGroup; + children = ( + 65F2E03E26B1724900179EBD /* EventViewController.swift */, + 65F2E03F26B1724900179EBD /* EventViewController.xib */, + ); + path = Event; + sourceTree = ""; + }; AC84A85F6B9863F5CA60B68A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,8 +353,11 @@ buildActionMask = 2147483647; files = ( 65F2E00B26B012D700179EBD /* LoginViewController.xib in Resources */, + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */, + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */, 65F2E01D26B1019200179EBD /* SettingViewController.xib in Resources */, 65BF7C2826AFDDCD000FEC82 /* LaunchScreen.storyboard in Resources */, + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */, 65F2DFFB26B0099800179EBD /* GuideViewController.xib in Resources */, 65F2E02626B1326D00179EBD /* CommonTableViewCell.xib in Resources */, 65F2E01226B0E6D700179EBD /* MainMenuViewController.xib in Resources */, @@ -381,8 +418,10 @@ buildActionMask = 2147483647; files = ( 65F2DFFE26B0128C00179EBD /* ActionResultModel.swift in Sources */, + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */, 6518222526AFE98500FCC275 /* BaseViewController.swift in Sources */, 65F2DFFA26B0099800179EBD /* GuideViewController.swift in Sources */, + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */, 65F2E01C26B1019200179EBD /* SettingViewController.swift in Sources */, 6518222726AFE9EB00FCC275 /* String.swift in Sources */, 65F2E02D26B1341300179EBD /* SwitchTableViewCell.swift in Sources */, @@ -399,6 +438,7 @@ 65F2E00526B0129100179EBD /* InspectListModel.swift in Sources */, 65F2E00626B0129100179EBD /* BaseConfigModel.swift in Sources */, 65F2E00A26B012D700179EBD /* LoginViewController.swift in Sources */, + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */, 65F2DFCC26AFF2A900179EBD /* KeychainManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate index f410d4e..0da8420 100644 --- a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate +++ b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/LaserMethane/View/CommonTableViewCell.xib b/LaserMethane/View/CommonTableViewCell.xib index d40525e..3b31c1c 100644 --- a/LaserMethane/View/CommonTableViewCell.xib +++ b/LaserMethane/View/CommonTableViewCell.xib @@ -11,10 +11,10 @@ - + - + - + @@ -35,7 +35,7 @@ - + diff --git a/LaserMethane.xcodeproj/project.pbxproj b/LaserMethane.xcodeproj/project.pbxproj index 8e73376..8322bfa 100644 --- a/LaserMethane.xcodeproj/project.pbxproj +++ b/LaserMethane.xcodeproj/project.pbxproj @@ -37,6 +37,12 @@ 65F2E02E26B1341300179EBD /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */; }; 65F2E03226B164CC00179EBD /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03026B164CC00179EBD /* LogViewController.swift */; }; 65F2E03326B164CC00179EBD /* LogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03126B164CC00179EBD /* LogViewController.xib */; }; + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03A26B1723700179EBD /* InspectViewController.swift */; }; + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03B26B1723700179EBD /* InspectViewController.xib */; }; + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03E26B1724900179EBD /* EventViewController.swift */; }; + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03F26B1724900179EBD /* EventViewController.xib */; }; + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E04226B2392600179EBD /* ListCustomCell.swift */; }; + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E04326B2392600179EBD /* ListCustomCell.xib */; }; 9C82F906203FB8735A689DE4 /* Pods_LaserMethane.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */; }; /* End PBXBuildFile section */ @@ -74,6 +80,12 @@ 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SwitchTableViewCell.xib; sourceTree = ""; }; 65F2E03026B164CC00179EBD /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 65F2E03126B164CC00179EBD /* LogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogViewController.xib; sourceTree = ""; }; + 65F2E03A26B1723700179EBD /* InspectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectViewController.swift; sourceTree = ""; }; + 65F2E03B26B1723700179EBD /* InspectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InspectViewController.xib; sourceTree = ""; }; + 65F2E03E26B1724900179EBD /* EventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventViewController.swift; sourceTree = ""; }; + 65F2E03F26B1724900179EBD /* EventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EventViewController.xib; sourceTree = ""; }; + 65F2E04226B2392600179EBD /* ListCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCustomCell.swift; sourceTree = ""; }; + 65F2E04326B2392600179EBD /* ListCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListCustomCell.xib; sourceTree = ""; }; 9D62480C27D0BD75CD9B2998 /* Pods-LaserMethane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaserMethane.debug.xcconfig"; path = "Target Support Files/Pods-LaserMethane/Pods-LaserMethane.debug.xcconfig"; sourceTree = ""; }; C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaserMethane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -109,6 +121,8 @@ 6518222826AFEAE500FCC275 /* ViewController */ = { isa = PBXGroup; children = ( + 65F2E03526B1721700179EBD /* Event */, + 65F2E03426B1720F00179EBD /* Inspect */, 65F2E02F26B164B200179EBD /* Log */, 65F2E01526B1007300179EBD /* Settings */, 65F2E00E26B0E69900179EBD /* MainMenu */, @@ -229,6 +243,8 @@ 65F2E02426B1326D00179EBD /* CommonTableViewCell.xib */, 65F2E02B26B1341300179EBD /* SwitchTableViewCell.swift */, 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */, + 65F2E04226B2392600179EBD /* ListCustomCell.swift */, + 65F2E04326B2392600179EBD /* ListCustomCell.xib */, ); path = View; sourceTree = ""; @@ -242,6 +258,24 @@ path = Log; sourceTree = ""; }; + 65F2E03426B1720F00179EBD /* Inspect */ = { + isa = PBXGroup; + children = ( + 65F2E03A26B1723700179EBD /* InspectViewController.swift */, + 65F2E03B26B1723700179EBD /* InspectViewController.xib */, + ); + path = Inspect; + sourceTree = ""; + }; + 65F2E03526B1721700179EBD /* Event */ = { + isa = PBXGroup; + children = ( + 65F2E03E26B1724900179EBD /* EventViewController.swift */, + 65F2E03F26B1724900179EBD /* EventViewController.xib */, + ); + path = Event; + sourceTree = ""; + }; AC84A85F6B9863F5CA60B68A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,8 +353,11 @@ buildActionMask = 2147483647; files = ( 65F2E00B26B012D700179EBD /* LoginViewController.xib in Resources */, + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */, + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */, 65F2E01D26B1019200179EBD /* SettingViewController.xib in Resources */, 65BF7C2826AFDDCD000FEC82 /* LaunchScreen.storyboard in Resources */, + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */, 65F2DFFB26B0099800179EBD /* GuideViewController.xib in Resources */, 65F2E02626B1326D00179EBD /* CommonTableViewCell.xib in Resources */, 65F2E01226B0E6D700179EBD /* MainMenuViewController.xib in Resources */, @@ -381,8 +418,10 @@ buildActionMask = 2147483647; files = ( 65F2DFFE26B0128C00179EBD /* ActionResultModel.swift in Sources */, + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */, 6518222526AFE98500FCC275 /* BaseViewController.swift in Sources */, 65F2DFFA26B0099800179EBD /* GuideViewController.swift in Sources */, + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */, 65F2E01C26B1019200179EBD /* SettingViewController.swift in Sources */, 6518222726AFE9EB00FCC275 /* String.swift in Sources */, 65F2E02D26B1341300179EBD /* SwitchTableViewCell.swift in Sources */, @@ -399,6 +438,7 @@ 65F2E00526B0129100179EBD /* InspectListModel.swift in Sources */, 65F2E00626B0129100179EBD /* BaseConfigModel.swift in Sources */, 65F2E00A26B012D700179EBD /* LoginViewController.swift in Sources */, + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */, 65F2DFCC26AFF2A900179EBD /* KeychainManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate index f410d4e..0da8420 100644 --- a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate +++ b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/LaserMethane/View/CommonTableViewCell.xib b/LaserMethane/View/CommonTableViewCell.xib index d40525e..3b31c1c 100644 --- a/LaserMethane/View/CommonTableViewCell.xib +++ b/LaserMethane/View/CommonTableViewCell.xib @@ -11,10 +11,10 @@ - + - + - + @@ -35,7 +35,7 @@ - + diff --git a/LaserMethane/View/ListCustomCell.swift b/LaserMethane/View/ListCustomCell.swift new file mode 100644 index 0000000..ac95b8a --- /dev/null +++ b/LaserMethane/View/ListCustomCell.swift @@ -0,0 +1,28 @@ +// +// ListCustomCell.swift +// LaserMethane +// +// Created by 203 on 2021/7/29. +// + +import UIKit + +class ListCustomCell: UITableViewCell { + @IBOutlet var inspectNameLabel: UILabel! + @IBOutlet var inspectDateLabel: UILabel! + @IBOutlet var inspectUserLabel: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + inspectNameLabel.lineBreakMode = .byWordWrapping + inspectNameLabel.lineBreakMode = .byTruncatingTail + inspectNameLabel.numberOfLines = 1 + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } +} diff --git a/LaserMethane.xcodeproj/project.pbxproj b/LaserMethane.xcodeproj/project.pbxproj index 8e73376..8322bfa 100644 --- a/LaserMethane.xcodeproj/project.pbxproj +++ b/LaserMethane.xcodeproj/project.pbxproj @@ -37,6 +37,12 @@ 65F2E02E26B1341300179EBD /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */; }; 65F2E03226B164CC00179EBD /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03026B164CC00179EBD /* LogViewController.swift */; }; 65F2E03326B164CC00179EBD /* LogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03126B164CC00179EBD /* LogViewController.xib */; }; + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03A26B1723700179EBD /* InspectViewController.swift */; }; + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03B26B1723700179EBD /* InspectViewController.xib */; }; + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03E26B1724900179EBD /* EventViewController.swift */; }; + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03F26B1724900179EBD /* EventViewController.xib */; }; + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E04226B2392600179EBD /* ListCustomCell.swift */; }; + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E04326B2392600179EBD /* ListCustomCell.xib */; }; 9C82F906203FB8735A689DE4 /* Pods_LaserMethane.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */; }; /* End PBXBuildFile section */ @@ -74,6 +80,12 @@ 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SwitchTableViewCell.xib; sourceTree = ""; }; 65F2E03026B164CC00179EBD /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 65F2E03126B164CC00179EBD /* LogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogViewController.xib; sourceTree = ""; }; + 65F2E03A26B1723700179EBD /* InspectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectViewController.swift; sourceTree = ""; }; + 65F2E03B26B1723700179EBD /* InspectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InspectViewController.xib; sourceTree = ""; }; + 65F2E03E26B1724900179EBD /* EventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventViewController.swift; sourceTree = ""; }; + 65F2E03F26B1724900179EBD /* EventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EventViewController.xib; sourceTree = ""; }; + 65F2E04226B2392600179EBD /* ListCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCustomCell.swift; sourceTree = ""; }; + 65F2E04326B2392600179EBD /* ListCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListCustomCell.xib; sourceTree = ""; }; 9D62480C27D0BD75CD9B2998 /* Pods-LaserMethane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaserMethane.debug.xcconfig"; path = "Target Support Files/Pods-LaserMethane/Pods-LaserMethane.debug.xcconfig"; sourceTree = ""; }; C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaserMethane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -109,6 +121,8 @@ 6518222826AFEAE500FCC275 /* ViewController */ = { isa = PBXGroup; children = ( + 65F2E03526B1721700179EBD /* Event */, + 65F2E03426B1720F00179EBD /* Inspect */, 65F2E02F26B164B200179EBD /* Log */, 65F2E01526B1007300179EBD /* Settings */, 65F2E00E26B0E69900179EBD /* MainMenu */, @@ -229,6 +243,8 @@ 65F2E02426B1326D00179EBD /* CommonTableViewCell.xib */, 65F2E02B26B1341300179EBD /* SwitchTableViewCell.swift */, 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */, + 65F2E04226B2392600179EBD /* ListCustomCell.swift */, + 65F2E04326B2392600179EBD /* ListCustomCell.xib */, ); path = View; sourceTree = ""; @@ -242,6 +258,24 @@ path = Log; sourceTree = ""; }; + 65F2E03426B1720F00179EBD /* Inspect */ = { + isa = PBXGroup; + children = ( + 65F2E03A26B1723700179EBD /* InspectViewController.swift */, + 65F2E03B26B1723700179EBD /* InspectViewController.xib */, + ); + path = Inspect; + sourceTree = ""; + }; + 65F2E03526B1721700179EBD /* Event */ = { + isa = PBXGroup; + children = ( + 65F2E03E26B1724900179EBD /* EventViewController.swift */, + 65F2E03F26B1724900179EBD /* EventViewController.xib */, + ); + path = Event; + sourceTree = ""; + }; AC84A85F6B9863F5CA60B68A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,8 +353,11 @@ buildActionMask = 2147483647; files = ( 65F2E00B26B012D700179EBD /* LoginViewController.xib in Resources */, + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */, + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */, 65F2E01D26B1019200179EBD /* SettingViewController.xib in Resources */, 65BF7C2826AFDDCD000FEC82 /* LaunchScreen.storyboard in Resources */, + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */, 65F2DFFB26B0099800179EBD /* GuideViewController.xib in Resources */, 65F2E02626B1326D00179EBD /* CommonTableViewCell.xib in Resources */, 65F2E01226B0E6D700179EBD /* MainMenuViewController.xib in Resources */, @@ -381,8 +418,10 @@ buildActionMask = 2147483647; files = ( 65F2DFFE26B0128C00179EBD /* ActionResultModel.swift in Sources */, + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */, 6518222526AFE98500FCC275 /* BaseViewController.swift in Sources */, 65F2DFFA26B0099800179EBD /* GuideViewController.swift in Sources */, + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */, 65F2E01C26B1019200179EBD /* SettingViewController.swift in Sources */, 6518222726AFE9EB00FCC275 /* String.swift in Sources */, 65F2E02D26B1341300179EBD /* SwitchTableViewCell.swift in Sources */, @@ -399,6 +438,7 @@ 65F2E00526B0129100179EBD /* InspectListModel.swift in Sources */, 65F2E00626B0129100179EBD /* BaseConfigModel.swift in Sources */, 65F2E00A26B012D700179EBD /* LoginViewController.swift in Sources */, + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */, 65F2DFCC26AFF2A900179EBD /* KeychainManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate index f410d4e..0da8420 100644 --- a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate +++ b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/LaserMethane/View/CommonTableViewCell.xib b/LaserMethane/View/CommonTableViewCell.xib index d40525e..3b31c1c 100644 --- a/LaserMethane/View/CommonTableViewCell.xib +++ b/LaserMethane/View/CommonTableViewCell.xib @@ -11,10 +11,10 @@ - + - + - + @@ -35,7 +35,7 @@ - + diff --git a/LaserMethane/View/ListCustomCell.swift b/LaserMethane/View/ListCustomCell.swift new file mode 100644 index 0000000..ac95b8a --- /dev/null +++ b/LaserMethane/View/ListCustomCell.swift @@ -0,0 +1,28 @@ +// +// ListCustomCell.swift +// LaserMethane +// +// Created by 203 on 2021/7/29. +// + +import UIKit + +class ListCustomCell: UITableViewCell { + @IBOutlet var inspectNameLabel: UILabel! + @IBOutlet var inspectDateLabel: UILabel! + @IBOutlet var inspectUserLabel: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + inspectNameLabel.lineBreakMode = .byWordWrapping + inspectNameLabel.lineBreakMode = .byTruncatingTail + inspectNameLabel.numberOfLines = 1 + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } +} diff --git a/LaserMethane/View/ListCustomCell.xib b/LaserMethane/View/ListCustomCell.xib new file mode 100644 index 0000000..dba756d --- /dev/null +++ b/LaserMethane/View/ListCustomCell.xib @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane.xcodeproj/project.pbxproj b/LaserMethane.xcodeproj/project.pbxproj index 8e73376..8322bfa 100644 --- a/LaserMethane.xcodeproj/project.pbxproj +++ b/LaserMethane.xcodeproj/project.pbxproj @@ -37,6 +37,12 @@ 65F2E02E26B1341300179EBD /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */; }; 65F2E03226B164CC00179EBD /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03026B164CC00179EBD /* LogViewController.swift */; }; 65F2E03326B164CC00179EBD /* LogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03126B164CC00179EBD /* LogViewController.xib */; }; + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03A26B1723700179EBD /* InspectViewController.swift */; }; + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03B26B1723700179EBD /* InspectViewController.xib */; }; + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03E26B1724900179EBD /* EventViewController.swift */; }; + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03F26B1724900179EBD /* EventViewController.xib */; }; + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E04226B2392600179EBD /* ListCustomCell.swift */; }; + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E04326B2392600179EBD /* ListCustomCell.xib */; }; 9C82F906203FB8735A689DE4 /* Pods_LaserMethane.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */; }; /* End PBXBuildFile section */ @@ -74,6 +80,12 @@ 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SwitchTableViewCell.xib; sourceTree = ""; }; 65F2E03026B164CC00179EBD /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 65F2E03126B164CC00179EBD /* LogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogViewController.xib; sourceTree = ""; }; + 65F2E03A26B1723700179EBD /* InspectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectViewController.swift; sourceTree = ""; }; + 65F2E03B26B1723700179EBD /* InspectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InspectViewController.xib; sourceTree = ""; }; + 65F2E03E26B1724900179EBD /* EventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventViewController.swift; sourceTree = ""; }; + 65F2E03F26B1724900179EBD /* EventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EventViewController.xib; sourceTree = ""; }; + 65F2E04226B2392600179EBD /* ListCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCustomCell.swift; sourceTree = ""; }; + 65F2E04326B2392600179EBD /* ListCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListCustomCell.xib; sourceTree = ""; }; 9D62480C27D0BD75CD9B2998 /* Pods-LaserMethane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaserMethane.debug.xcconfig"; path = "Target Support Files/Pods-LaserMethane/Pods-LaserMethane.debug.xcconfig"; sourceTree = ""; }; C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaserMethane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -109,6 +121,8 @@ 6518222826AFEAE500FCC275 /* ViewController */ = { isa = PBXGroup; children = ( + 65F2E03526B1721700179EBD /* Event */, + 65F2E03426B1720F00179EBD /* Inspect */, 65F2E02F26B164B200179EBD /* Log */, 65F2E01526B1007300179EBD /* Settings */, 65F2E00E26B0E69900179EBD /* MainMenu */, @@ -229,6 +243,8 @@ 65F2E02426B1326D00179EBD /* CommonTableViewCell.xib */, 65F2E02B26B1341300179EBD /* SwitchTableViewCell.swift */, 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */, + 65F2E04226B2392600179EBD /* ListCustomCell.swift */, + 65F2E04326B2392600179EBD /* ListCustomCell.xib */, ); path = View; sourceTree = ""; @@ -242,6 +258,24 @@ path = Log; sourceTree = ""; }; + 65F2E03426B1720F00179EBD /* Inspect */ = { + isa = PBXGroup; + children = ( + 65F2E03A26B1723700179EBD /* InspectViewController.swift */, + 65F2E03B26B1723700179EBD /* InspectViewController.xib */, + ); + path = Inspect; + sourceTree = ""; + }; + 65F2E03526B1721700179EBD /* Event */ = { + isa = PBXGroup; + children = ( + 65F2E03E26B1724900179EBD /* EventViewController.swift */, + 65F2E03F26B1724900179EBD /* EventViewController.xib */, + ); + path = Event; + sourceTree = ""; + }; AC84A85F6B9863F5CA60B68A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,8 +353,11 @@ buildActionMask = 2147483647; files = ( 65F2E00B26B012D700179EBD /* LoginViewController.xib in Resources */, + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */, + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */, 65F2E01D26B1019200179EBD /* SettingViewController.xib in Resources */, 65BF7C2826AFDDCD000FEC82 /* LaunchScreen.storyboard in Resources */, + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */, 65F2DFFB26B0099800179EBD /* GuideViewController.xib in Resources */, 65F2E02626B1326D00179EBD /* CommonTableViewCell.xib in Resources */, 65F2E01226B0E6D700179EBD /* MainMenuViewController.xib in Resources */, @@ -381,8 +418,10 @@ buildActionMask = 2147483647; files = ( 65F2DFFE26B0128C00179EBD /* ActionResultModel.swift in Sources */, + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */, 6518222526AFE98500FCC275 /* BaseViewController.swift in Sources */, 65F2DFFA26B0099800179EBD /* GuideViewController.swift in Sources */, + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */, 65F2E01C26B1019200179EBD /* SettingViewController.swift in Sources */, 6518222726AFE9EB00FCC275 /* String.swift in Sources */, 65F2E02D26B1341300179EBD /* SwitchTableViewCell.swift in Sources */, @@ -399,6 +438,7 @@ 65F2E00526B0129100179EBD /* InspectListModel.swift in Sources */, 65F2E00626B0129100179EBD /* BaseConfigModel.swift in Sources */, 65F2E00A26B012D700179EBD /* LoginViewController.swift in Sources */, + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */, 65F2DFCC26AFF2A900179EBD /* KeychainManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate index f410d4e..0da8420 100644 --- a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate +++ b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/LaserMethane/View/CommonTableViewCell.xib b/LaserMethane/View/CommonTableViewCell.xib index d40525e..3b31c1c 100644 --- a/LaserMethane/View/CommonTableViewCell.xib +++ b/LaserMethane/View/CommonTableViewCell.xib @@ -11,10 +11,10 @@ - + - + - + @@ -35,7 +35,7 @@ - + diff --git a/LaserMethane/View/ListCustomCell.swift b/LaserMethane/View/ListCustomCell.swift new file mode 100644 index 0000000..ac95b8a --- /dev/null +++ b/LaserMethane/View/ListCustomCell.swift @@ -0,0 +1,28 @@ +// +// ListCustomCell.swift +// LaserMethane +// +// Created by 203 on 2021/7/29. +// + +import UIKit + +class ListCustomCell: UITableViewCell { + @IBOutlet var inspectNameLabel: UILabel! + @IBOutlet var inspectDateLabel: UILabel! + @IBOutlet var inspectUserLabel: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + inspectNameLabel.lineBreakMode = .byWordWrapping + inspectNameLabel.lineBreakMode = .byTruncatingTail + inspectNameLabel.numberOfLines = 1 + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } +} diff --git a/LaserMethane/View/ListCustomCell.xib b/LaserMethane/View/ListCustomCell.xib new file mode 100644 index 0000000..dba756d --- /dev/null +++ b/LaserMethane/View/ListCustomCell.xib @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/View/SwitchTableViewCell.xib b/LaserMethane/View/SwitchTableViewCell.xib index 0df19c0..70b6f48 100644 --- a/LaserMethane/View/SwitchTableViewCell.xib +++ b/LaserMethane/View/SwitchTableViewCell.xib @@ -10,10 +10,10 @@ - + - + - + @@ -34,7 +34,7 @@ - + diff --git a/LaserMethane.xcodeproj/project.pbxproj b/LaserMethane.xcodeproj/project.pbxproj index 8e73376..8322bfa 100644 --- a/LaserMethane.xcodeproj/project.pbxproj +++ b/LaserMethane.xcodeproj/project.pbxproj @@ -37,6 +37,12 @@ 65F2E02E26B1341300179EBD /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */; }; 65F2E03226B164CC00179EBD /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03026B164CC00179EBD /* LogViewController.swift */; }; 65F2E03326B164CC00179EBD /* LogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03126B164CC00179EBD /* LogViewController.xib */; }; + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03A26B1723700179EBD /* InspectViewController.swift */; }; + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03B26B1723700179EBD /* InspectViewController.xib */; }; + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03E26B1724900179EBD /* EventViewController.swift */; }; + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03F26B1724900179EBD /* EventViewController.xib */; }; + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E04226B2392600179EBD /* ListCustomCell.swift */; }; + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E04326B2392600179EBD /* ListCustomCell.xib */; }; 9C82F906203FB8735A689DE4 /* Pods_LaserMethane.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */; }; /* End PBXBuildFile section */ @@ -74,6 +80,12 @@ 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SwitchTableViewCell.xib; sourceTree = ""; }; 65F2E03026B164CC00179EBD /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 65F2E03126B164CC00179EBD /* LogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogViewController.xib; sourceTree = ""; }; + 65F2E03A26B1723700179EBD /* InspectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectViewController.swift; sourceTree = ""; }; + 65F2E03B26B1723700179EBD /* InspectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InspectViewController.xib; sourceTree = ""; }; + 65F2E03E26B1724900179EBD /* EventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventViewController.swift; sourceTree = ""; }; + 65F2E03F26B1724900179EBD /* EventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EventViewController.xib; sourceTree = ""; }; + 65F2E04226B2392600179EBD /* ListCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCustomCell.swift; sourceTree = ""; }; + 65F2E04326B2392600179EBD /* ListCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListCustomCell.xib; sourceTree = ""; }; 9D62480C27D0BD75CD9B2998 /* Pods-LaserMethane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaserMethane.debug.xcconfig"; path = "Target Support Files/Pods-LaserMethane/Pods-LaserMethane.debug.xcconfig"; sourceTree = ""; }; C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaserMethane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -109,6 +121,8 @@ 6518222826AFEAE500FCC275 /* ViewController */ = { isa = PBXGroup; children = ( + 65F2E03526B1721700179EBD /* Event */, + 65F2E03426B1720F00179EBD /* Inspect */, 65F2E02F26B164B200179EBD /* Log */, 65F2E01526B1007300179EBD /* Settings */, 65F2E00E26B0E69900179EBD /* MainMenu */, @@ -229,6 +243,8 @@ 65F2E02426B1326D00179EBD /* CommonTableViewCell.xib */, 65F2E02B26B1341300179EBD /* SwitchTableViewCell.swift */, 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */, + 65F2E04226B2392600179EBD /* ListCustomCell.swift */, + 65F2E04326B2392600179EBD /* ListCustomCell.xib */, ); path = View; sourceTree = ""; @@ -242,6 +258,24 @@ path = Log; sourceTree = ""; }; + 65F2E03426B1720F00179EBD /* Inspect */ = { + isa = PBXGroup; + children = ( + 65F2E03A26B1723700179EBD /* InspectViewController.swift */, + 65F2E03B26B1723700179EBD /* InspectViewController.xib */, + ); + path = Inspect; + sourceTree = ""; + }; + 65F2E03526B1721700179EBD /* Event */ = { + isa = PBXGroup; + children = ( + 65F2E03E26B1724900179EBD /* EventViewController.swift */, + 65F2E03F26B1724900179EBD /* EventViewController.xib */, + ); + path = Event; + sourceTree = ""; + }; AC84A85F6B9863F5CA60B68A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,8 +353,11 @@ buildActionMask = 2147483647; files = ( 65F2E00B26B012D700179EBD /* LoginViewController.xib in Resources */, + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */, + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */, 65F2E01D26B1019200179EBD /* SettingViewController.xib in Resources */, 65BF7C2826AFDDCD000FEC82 /* LaunchScreen.storyboard in Resources */, + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */, 65F2DFFB26B0099800179EBD /* GuideViewController.xib in Resources */, 65F2E02626B1326D00179EBD /* CommonTableViewCell.xib in Resources */, 65F2E01226B0E6D700179EBD /* MainMenuViewController.xib in Resources */, @@ -381,8 +418,10 @@ buildActionMask = 2147483647; files = ( 65F2DFFE26B0128C00179EBD /* ActionResultModel.swift in Sources */, + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */, 6518222526AFE98500FCC275 /* BaseViewController.swift in Sources */, 65F2DFFA26B0099800179EBD /* GuideViewController.swift in Sources */, + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */, 65F2E01C26B1019200179EBD /* SettingViewController.swift in Sources */, 6518222726AFE9EB00FCC275 /* String.swift in Sources */, 65F2E02D26B1341300179EBD /* SwitchTableViewCell.swift in Sources */, @@ -399,6 +438,7 @@ 65F2E00526B0129100179EBD /* InspectListModel.swift in Sources */, 65F2E00626B0129100179EBD /* BaseConfigModel.swift in Sources */, 65F2E00A26B012D700179EBD /* LoginViewController.swift in Sources */, + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */, 65F2DFCC26AFF2A900179EBD /* KeychainManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate index f410d4e..0da8420 100644 --- a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate +++ b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/LaserMethane/View/CommonTableViewCell.xib b/LaserMethane/View/CommonTableViewCell.xib index d40525e..3b31c1c 100644 --- a/LaserMethane/View/CommonTableViewCell.xib +++ b/LaserMethane/View/CommonTableViewCell.xib @@ -11,10 +11,10 @@ - + - + - + @@ -35,7 +35,7 @@ - + diff --git a/LaserMethane/View/ListCustomCell.swift b/LaserMethane/View/ListCustomCell.swift new file mode 100644 index 0000000..ac95b8a --- /dev/null +++ b/LaserMethane/View/ListCustomCell.swift @@ -0,0 +1,28 @@ +// +// ListCustomCell.swift +// LaserMethane +// +// Created by 203 on 2021/7/29. +// + +import UIKit + +class ListCustomCell: UITableViewCell { + @IBOutlet var inspectNameLabel: UILabel! + @IBOutlet var inspectDateLabel: UILabel! + @IBOutlet var inspectUserLabel: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + inspectNameLabel.lineBreakMode = .byWordWrapping + inspectNameLabel.lineBreakMode = .byTruncatingTail + inspectNameLabel.numberOfLines = 1 + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } +} diff --git a/LaserMethane/View/ListCustomCell.xib b/LaserMethane/View/ListCustomCell.xib new file mode 100644 index 0000000..dba756d --- /dev/null +++ b/LaserMethane/View/ListCustomCell.xib @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/View/SwitchTableViewCell.xib b/LaserMethane/View/SwitchTableViewCell.xib index 0df19c0..70b6f48 100644 --- a/LaserMethane/View/SwitchTableViewCell.xib +++ b/LaserMethane/View/SwitchTableViewCell.xib @@ -10,10 +10,10 @@ - + - + - + @@ -34,7 +34,7 @@ - + diff --git a/LaserMethane/ViewController/Event/EventViewController.swift b/LaserMethane/ViewController/Event/EventViewController.swift new file mode 100644 index 0000000..c47e008 --- /dev/null +++ b/LaserMethane/ViewController/Event/EventViewController.swift @@ -0,0 +1,34 @@ +// +// EventViewController.swift +// LaserMethane +// +// Created by 203 on 2021/7/28. +// + +import UIKit + +class EventViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + title = "事件查询" + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.barTintColor = .systemBlue + let dict: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white] + navigationController?.navigationBar.titleTextAttributes = dict + navigationController?.navigationBar.tintColor = .white + // Do any additional setup after loading the view. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/LaserMethane.xcodeproj/project.pbxproj b/LaserMethane.xcodeproj/project.pbxproj index 8e73376..8322bfa 100644 --- a/LaserMethane.xcodeproj/project.pbxproj +++ b/LaserMethane.xcodeproj/project.pbxproj @@ -37,6 +37,12 @@ 65F2E02E26B1341300179EBD /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */; }; 65F2E03226B164CC00179EBD /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03026B164CC00179EBD /* LogViewController.swift */; }; 65F2E03326B164CC00179EBD /* LogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03126B164CC00179EBD /* LogViewController.xib */; }; + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03A26B1723700179EBD /* InspectViewController.swift */; }; + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03B26B1723700179EBD /* InspectViewController.xib */; }; + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03E26B1724900179EBD /* EventViewController.swift */; }; + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03F26B1724900179EBD /* EventViewController.xib */; }; + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E04226B2392600179EBD /* ListCustomCell.swift */; }; + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E04326B2392600179EBD /* ListCustomCell.xib */; }; 9C82F906203FB8735A689DE4 /* Pods_LaserMethane.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */; }; /* End PBXBuildFile section */ @@ -74,6 +80,12 @@ 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SwitchTableViewCell.xib; sourceTree = ""; }; 65F2E03026B164CC00179EBD /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 65F2E03126B164CC00179EBD /* LogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogViewController.xib; sourceTree = ""; }; + 65F2E03A26B1723700179EBD /* InspectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectViewController.swift; sourceTree = ""; }; + 65F2E03B26B1723700179EBD /* InspectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InspectViewController.xib; sourceTree = ""; }; + 65F2E03E26B1724900179EBD /* EventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventViewController.swift; sourceTree = ""; }; + 65F2E03F26B1724900179EBD /* EventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EventViewController.xib; sourceTree = ""; }; + 65F2E04226B2392600179EBD /* ListCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCustomCell.swift; sourceTree = ""; }; + 65F2E04326B2392600179EBD /* ListCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListCustomCell.xib; sourceTree = ""; }; 9D62480C27D0BD75CD9B2998 /* Pods-LaserMethane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaserMethane.debug.xcconfig"; path = "Target Support Files/Pods-LaserMethane/Pods-LaserMethane.debug.xcconfig"; sourceTree = ""; }; C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaserMethane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -109,6 +121,8 @@ 6518222826AFEAE500FCC275 /* ViewController */ = { isa = PBXGroup; children = ( + 65F2E03526B1721700179EBD /* Event */, + 65F2E03426B1720F00179EBD /* Inspect */, 65F2E02F26B164B200179EBD /* Log */, 65F2E01526B1007300179EBD /* Settings */, 65F2E00E26B0E69900179EBD /* MainMenu */, @@ -229,6 +243,8 @@ 65F2E02426B1326D00179EBD /* CommonTableViewCell.xib */, 65F2E02B26B1341300179EBD /* SwitchTableViewCell.swift */, 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */, + 65F2E04226B2392600179EBD /* ListCustomCell.swift */, + 65F2E04326B2392600179EBD /* ListCustomCell.xib */, ); path = View; sourceTree = ""; @@ -242,6 +258,24 @@ path = Log; sourceTree = ""; }; + 65F2E03426B1720F00179EBD /* Inspect */ = { + isa = PBXGroup; + children = ( + 65F2E03A26B1723700179EBD /* InspectViewController.swift */, + 65F2E03B26B1723700179EBD /* InspectViewController.xib */, + ); + path = Inspect; + sourceTree = ""; + }; + 65F2E03526B1721700179EBD /* Event */ = { + isa = PBXGroup; + children = ( + 65F2E03E26B1724900179EBD /* EventViewController.swift */, + 65F2E03F26B1724900179EBD /* EventViewController.xib */, + ); + path = Event; + sourceTree = ""; + }; AC84A85F6B9863F5CA60B68A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,8 +353,11 @@ buildActionMask = 2147483647; files = ( 65F2E00B26B012D700179EBD /* LoginViewController.xib in Resources */, + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */, + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */, 65F2E01D26B1019200179EBD /* SettingViewController.xib in Resources */, 65BF7C2826AFDDCD000FEC82 /* LaunchScreen.storyboard in Resources */, + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */, 65F2DFFB26B0099800179EBD /* GuideViewController.xib in Resources */, 65F2E02626B1326D00179EBD /* CommonTableViewCell.xib in Resources */, 65F2E01226B0E6D700179EBD /* MainMenuViewController.xib in Resources */, @@ -381,8 +418,10 @@ buildActionMask = 2147483647; files = ( 65F2DFFE26B0128C00179EBD /* ActionResultModel.swift in Sources */, + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */, 6518222526AFE98500FCC275 /* BaseViewController.swift in Sources */, 65F2DFFA26B0099800179EBD /* GuideViewController.swift in Sources */, + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */, 65F2E01C26B1019200179EBD /* SettingViewController.swift in Sources */, 6518222726AFE9EB00FCC275 /* String.swift in Sources */, 65F2E02D26B1341300179EBD /* SwitchTableViewCell.swift in Sources */, @@ -399,6 +438,7 @@ 65F2E00526B0129100179EBD /* InspectListModel.swift in Sources */, 65F2E00626B0129100179EBD /* BaseConfigModel.swift in Sources */, 65F2E00A26B012D700179EBD /* LoginViewController.swift in Sources */, + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */, 65F2DFCC26AFF2A900179EBD /* KeychainManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate index f410d4e..0da8420 100644 --- a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate +++ b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/LaserMethane/View/CommonTableViewCell.xib b/LaserMethane/View/CommonTableViewCell.xib index d40525e..3b31c1c 100644 --- a/LaserMethane/View/CommonTableViewCell.xib +++ b/LaserMethane/View/CommonTableViewCell.xib @@ -11,10 +11,10 @@ - + - + - + @@ -35,7 +35,7 @@ - + diff --git a/LaserMethane/View/ListCustomCell.swift b/LaserMethane/View/ListCustomCell.swift new file mode 100644 index 0000000..ac95b8a --- /dev/null +++ b/LaserMethane/View/ListCustomCell.swift @@ -0,0 +1,28 @@ +// +// ListCustomCell.swift +// LaserMethane +// +// Created by 203 on 2021/7/29. +// + +import UIKit + +class ListCustomCell: UITableViewCell { + @IBOutlet var inspectNameLabel: UILabel! + @IBOutlet var inspectDateLabel: UILabel! + @IBOutlet var inspectUserLabel: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + inspectNameLabel.lineBreakMode = .byWordWrapping + inspectNameLabel.lineBreakMode = .byTruncatingTail + inspectNameLabel.numberOfLines = 1 + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } +} diff --git a/LaserMethane/View/ListCustomCell.xib b/LaserMethane/View/ListCustomCell.xib new file mode 100644 index 0000000..dba756d --- /dev/null +++ b/LaserMethane/View/ListCustomCell.xib @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/View/SwitchTableViewCell.xib b/LaserMethane/View/SwitchTableViewCell.xib index 0df19c0..70b6f48 100644 --- a/LaserMethane/View/SwitchTableViewCell.xib +++ b/LaserMethane/View/SwitchTableViewCell.xib @@ -10,10 +10,10 @@ - + - + - + @@ -34,7 +34,7 @@ - + diff --git a/LaserMethane/ViewController/Event/EventViewController.swift b/LaserMethane/ViewController/Event/EventViewController.swift new file mode 100644 index 0000000..c47e008 --- /dev/null +++ b/LaserMethane/ViewController/Event/EventViewController.swift @@ -0,0 +1,34 @@ +// +// EventViewController.swift +// LaserMethane +// +// Created by 203 on 2021/7/28. +// + +import UIKit + +class EventViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + title = "事件查询" + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.barTintColor = .systemBlue + let dict: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white] + navigationController?.navigationBar.titleTextAttributes = dict + navigationController?.navigationBar.tintColor = .white + // Do any additional setup after loading the view. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/LaserMethane/ViewController/Event/EventViewController.xib b/LaserMethane/ViewController/Event/EventViewController.xib new file mode 100644 index 0000000..5f161c8 --- /dev/null +++ b/LaserMethane/ViewController/Event/EventViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane.xcodeproj/project.pbxproj b/LaserMethane.xcodeproj/project.pbxproj index 8e73376..8322bfa 100644 --- a/LaserMethane.xcodeproj/project.pbxproj +++ b/LaserMethane.xcodeproj/project.pbxproj @@ -37,6 +37,12 @@ 65F2E02E26B1341300179EBD /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */; }; 65F2E03226B164CC00179EBD /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03026B164CC00179EBD /* LogViewController.swift */; }; 65F2E03326B164CC00179EBD /* LogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03126B164CC00179EBD /* LogViewController.xib */; }; + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03A26B1723700179EBD /* InspectViewController.swift */; }; + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03B26B1723700179EBD /* InspectViewController.xib */; }; + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03E26B1724900179EBD /* EventViewController.swift */; }; + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03F26B1724900179EBD /* EventViewController.xib */; }; + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E04226B2392600179EBD /* ListCustomCell.swift */; }; + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E04326B2392600179EBD /* ListCustomCell.xib */; }; 9C82F906203FB8735A689DE4 /* Pods_LaserMethane.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */; }; /* End PBXBuildFile section */ @@ -74,6 +80,12 @@ 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SwitchTableViewCell.xib; sourceTree = ""; }; 65F2E03026B164CC00179EBD /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 65F2E03126B164CC00179EBD /* LogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogViewController.xib; sourceTree = ""; }; + 65F2E03A26B1723700179EBD /* InspectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectViewController.swift; sourceTree = ""; }; + 65F2E03B26B1723700179EBD /* InspectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InspectViewController.xib; sourceTree = ""; }; + 65F2E03E26B1724900179EBD /* EventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventViewController.swift; sourceTree = ""; }; + 65F2E03F26B1724900179EBD /* EventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EventViewController.xib; sourceTree = ""; }; + 65F2E04226B2392600179EBD /* ListCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCustomCell.swift; sourceTree = ""; }; + 65F2E04326B2392600179EBD /* ListCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListCustomCell.xib; sourceTree = ""; }; 9D62480C27D0BD75CD9B2998 /* Pods-LaserMethane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaserMethane.debug.xcconfig"; path = "Target Support Files/Pods-LaserMethane/Pods-LaserMethane.debug.xcconfig"; sourceTree = ""; }; C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaserMethane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -109,6 +121,8 @@ 6518222826AFEAE500FCC275 /* ViewController */ = { isa = PBXGroup; children = ( + 65F2E03526B1721700179EBD /* Event */, + 65F2E03426B1720F00179EBD /* Inspect */, 65F2E02F26B164B200179EBD /* Log */, 65F2E01526B1007300179EBD /* Settings */, 65F2E00E26B0E69900179EBD /* MainMenu */, @@ -229,6 +243,8 @@ 65F2E02426B1326D00179EBD /* CommonTableViewCell.xib */, 65F2E02B26B1341300179EBD /* SwitchTableViewCell.swift */, 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */, + 65F2E04226B2392600179EBD /* ListCustomCell.swift */, + 65F2E04326B2392600179EBD /* ListCustomCell.xib */, ); path = View; sourceTree = ""; @@ -242,6 +258,24 @@ path = Log; sourceTree = ""; }; + 65F2E03426B1720F00179EBD /* Inspect */ = { + isa = PBXGroup; + children = ( + 65F2E03A26B1723700179EBD /* InspectViewController.swift */, + 65F2E03B26B1723700179EBD /* InspectViewController.xib */, + ); + path = Inspect; + sourceTree = ""; + }; + 65F2E03526B1721700179EBD /* Event */ = { + isa = PBXGroup; + children = ( + 65F2E03E26B1724900179EBD /* EventViewController.swift */, + 65F2E03F26B1724900179EBD /* EventViewController.xib */, + ); + path = Event; + sourceTree = ""; + }; AC84A85F6B9863F5CA60B68A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,8 +353,11 @@ buildActionMask = 2147483647; files = ( 65F2E00B26B012D700179EBD /* LoginViewController.xib in Resources */, + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */, + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */, 65F2E01D26B1019200179EBD /* SettingViewController.xib in Resources */, 65BF7C2826AFDDCD000FEC82 /* LaunchScreen.storyboard in Resources */, + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */, 65F2DFFB26B0099800179EBD /* GuideViewController.xib in Resources */, 65F2E02626B1326D00179EBD /* CommonTableViewCell.xib in Resources */, 65F2E01226B0E6D700179EBD /* MainMenuViewController.xib in Resources */, @@ -381,8 +418,10 @@ buildActionMask = 2147483647; files = ( 65F2DFFE26B0128C00179EBD /* ActionResultModel.swift in Sources */, + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */, 6518222526AFE98500FCC275 /* BaseViewController.swift in Sources */, 65F2DFFA26B0099800179EBD /* GuideViewController.swift in Sources */, + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */, 65F2E01C26B1019200179EBD /* SettingViewController.swift in Sources */, 6518222726AFE9EB00FCC275 /* String.swift in Sources */, 65F2E02D26B1341300179EBD /* SwitchTableViewCell.swift in Sources */, @@ -399,6 +438,7 @@ 65F2E00526B0129100179EBD /* InspectListModel.swift in Sources */, 65F2E00626B0129100179EBD /* BaseConfigModel.swift in Sources */, 65F2E00A26B012D700179EBD /* LoginViewController.swift in Sources */, + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */, 65F2DFCC26AFF2A900179EBD /* KeychainManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate index f410d4e..0da8420 100644 --- a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate +++ b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/LaserMethane/View/CommonTableViewCell.xib b/LaserMethane/View/CommonTableViewCell.xib index d40525e..3b31c1c 100644 --- a/LaserMethane/View/CommonTableViewCell.xib +++ b/LaserMethane/View/CommonTableViewCell.xib @@ -11,10 +11,10 @@ - + - + - + @@ -35,7 +35,7 @@ - + diff --git a/LaserMethane/View/ListCustomCell.swift b/LaserMethane/View/ListCustomCell.swift new file mode 100644 index 0000000..ac95b8a --- /dev/null +++ b/LaserMethane/View/ListCustomCell.swift @@ -0,0 +1,28 @@ +// +// ListCustomCell.swift +// LaserMethane +// +// Created by 203 on 2021/7/29. +// + +import UIKit + +class ListCustomCell: UITableViewCell { + @IBOutlet var inspectNameLabel: UILabel! + @IBOutlet var inspectDateLabel: UILabel! + @IBOutlet var inspectUserLabel: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + inspectNameLabel.lineBreakMode = .byWordWrapping + inspectNameLabel.lineBreakMode = .byTruncatingTail + inspectNameLabel.numberOfLines = 1 + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } +} diff --git a/LaserMethane/View/ListCustomCell.xib b/LaserMethane/View/ListCustomCell.xib new file mode 100644 index 0000000..dba756d --- /dev/null +++ b/LaserMethane/View/ListCustomCell.xib @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/View/SwitchTableViewCell.xib b/LaserMethane/View/SwitchTableViewCell.xib index 0df19c0..70b6f48 100644 --- a/LaserMethane/View/SwitchTableViewCell.xib +++ b/LaserMethane/View/SwitchTableViewCell.xib @@ -10,10 +10,10 @@ - + - + - + @@ -34,7 +34,7 @@ - + diff --git a/LaserMethane/ViewController/Event/EventViewController.swift b/LaserMethane/ViewController/Event/EventViewController.swift new file mode 100644 index 0000000..c47e008 --- /dev/null +++ b/LaserMethane/ViewController/Event/EventViewController.swift @@ -0,0 +1,34 @@ +// +// EventViewController.swift +// LaserMethane +// +// Created by 203 on 2021/7/28. +// + +import UIKit + +class EventViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + title = "事件查询" + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.barTintColor = .systemBlue + let dict: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white] + navigationController?.navigationBar.titleTextAttributes = dict + navigationController?.navigationBar.tintColor = .white + // Do any additional setup after loading the view. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/LaserMethane/ViewController/Event/EventViewController.xib b/LaserMethane/ViewController/Event/EventViewController.xib new file mode 100644 index 0000000..5f161c8 --- /dev/null +++ b/LaserMethane/ViewController/Event/EventViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/ViewController/Inspect/InspectViewController.swift b/LaserMethane/ViewController/Inspect/InspectViewController.swift new file mode 100644 index 0000000..58c33c5 --- /dev/null +++ b/LaserMethane/ViewController/Inspect/InspectViewController.swift @@ -0,0 +1,124 @@ +// +// InspectViewController.swift +// LaserMethane +// +// Created by 203 on 2021/7/28. +// + +import Alamofire +import KeychainAccess +import MJRefresh +import SwiftyJSON +import UIKit + +class InspectViewController: UIViewController { + @IBOutlet var startTimePicker: UIDatePicker! + @IBOutlet var endTimePicker: UIDatePicker! + @IBOutlet var keywordsView: UITextField! + @IBOutlet var inspectTableView: UITableView! + + var keychain: Keychain! + var baseURL: String? + var rowsArray: [RowsModel] = [] + var dformatter: DateFormatter! + var pageOffSet: Int = 1 + var isUpdate: Bool = false + var startDate: String? + var endDate: String? + var keyWords: String? + + override func viewDidLoad() { + super.viewDidLoad() + title = "巡检记录查询" + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.barTintColor = .systemBlue + let dict: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white] + navigationController?.navigationBar.titleTextAttributes = dict + navigationController?.navigationBar.tintColor = .white + // Do any additional setup after loading the view. + keychain = Keychain() + dformatter = DateFormatter() + setupTableView() + // 默认加载数据 + loadData(keywords: "", startTime: "", endTime: "", offset: 1) + } + + func loadData(keywords: String, startTime: String, endTime: String, offset: Int) { + baseURL = keychain[Constant.ServerConfig.rawValue] + let inspectListURL = baseURL! + Constant.inspectList.rawValue + Alamofire.request(inspectListURL, method: .get, + parameters: ["keywords": keywords, "startTime": startTime, "endTime": endTime, "limit": 15, "offset": offset], + headers: ["token": keychain[Constant.Token.rawValue]!]).responseJSON { response in + switch response.result { + case let .success(value): + let inspectModel = InspectListModel(respJson: JSON(value)) + if inspectModel.code == 200 { + if self.isUpdate { + self.rowsArray = inspectModel.data.rows + } else { + inspectModel.data.rows.forEach { model in + self.rowsArray.append(model) + } + } + // 必须要重新加载数据,否则不走数据绑定 + self.inspectTableView.reloadData() + } else { + AlertHub.shared.showWaringAlert(controller: self, messge: "查询失败,请重试") + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, messge: "未知错误") + } + } + } + + func setupTableView() { + inspectTableView.register(UINib(nibName: "ListCustomCell", bundle: nil), forCellReuseIdentifier: "listCustomCell") + inspectTableView.dataSource = self + inspectTableView.delegate = self + + inspectTableView.mj_header = MJRefreshNormalHeader { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { + self.isUpdate = true + self.pageOffSet = 1 + self.loadData(keywords: "", startTime: "", endTime: "", offset: self.pageOffSet) + self.inspectTableView.mj_header.endRefreshing() + }) + } + + inspectTableView.mj_footer = MJRefreshBackNormalFooter { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { + self.isUpdate = false + self.pageOffSet += 1 + self.loadData(keywords: self.keyWords ?? "", startTime: self.startDate ?? "", endTime: self.endDate ?? "", offset: self.pageOffSet) + self.inspectTableView.mj_footer.endRefreshing() + }) + } + } + + @IBAction func startSearchAction(_ sender: Any) { + dformatter.dateFormat = "yyyy-MM-dd" + startDate = dformatter.string(from: startTimePicker.date) + endDate = dformatter.string(from: endTimePicker.date) + keyWords = keywordsView.text + loadData(keywords: keyWords ?? "", startTime: startDate ?? "", endTime: endDate ?? "", offset: 1) + } +} + +extension InspectViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return rowsArray.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell: ListCustomCell! = inspectTableView.dequeueReusableCell(withIdentifier: "listCustomCell", for: indexPath) as? ListCustomCell + + let row = (indexPath as NSIndexPath).row + cell.inspectNameLabel.text = rowsArray[row].name + cell.inspectDateLabel.text = rowsArray[row].date + cell.inspectUserLabel.text = rowsArray[row].user + return cell + } +} + +extension InspectViewController: UITableViewDelegate { +} diff --git a/LaserMethane.xcodeproj/project.pbxproj b/LaserMethane.xcodeproj/project.pbxproj index 8e73376..8322bfa 100644 --- a/LaserMethane.xcodeproj/project.pbxproj +++ b/LaserMethane.xcodeproj/project.pbxproj @@ -37,6 +37,12 @@ 65F2E02E26B1341300179EBD /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */; }; 65F2E03226B164CC00179EBD /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03026B164CC00179EBD /* LogViewController.swift */; }; 65F2E03326B164CC00179EBD /* LogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03126B164CC00179EBD /* LogViewController.xib */; }; + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03A26B1723700179EBD /* InspectViewController.swift */; }; + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03B26B1723700179EBD /* InspectViewController.xib */; }; + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03E26B1724900179EBD /* EventViewController.swift */; }; + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03F26B1724900179EBD /* EventViewController.xib */; }; + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E04226B2392600179EBD /* ListCustomCell.swift */; }; + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E04326B2392600179EBD /* ListCustomCell.xib */; }; 9C82F906203FB8735A689DE4 /* Pods_LaserMethane.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */; }; /* End PBXBuildFile section */ @@ -74,6 +80,12 @@ 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SwitchTableViewCell.xib; sourceTree = ""; }; 65F2E03026B164CC00179EBD /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 65F2E03126B164CC00179EBD /* LogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogViewController.xib; sourceTree = ""; }; + 65F2E03A26B1723700179EBD /* InspectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectViewController.swift; sourceTree = ""; }; + 65F2E03B26B1723700179EBD /* InspectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InspectViewController.xib; sourceTree = ""; }; + 65F2E03E26B1724900179EBD /* EventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventViewController.swift; sourceTree = ""; }; + 65F2E03F26B1724900179EBD /* EventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EventViewController.xib; sourceTree = ""; }; + 65F2E04226B2392600179EBD /* ListCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCustomCell.swift; sourceTree = ""; }; + 65F2E04326B2392600179EBD /* ListCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListCustomCell.xib; sourceTree = ""; }; 9D62480C27D0BD75CD9B2998 /* Pods-LaserMethane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaserMethane.debug.xcconfig"; path = "Target Support Files/Pods-LaserMethane/Pods-LaserMethane.debug.xcconfig"; sourceTree = ""; }; C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaserMethane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -109,6 +121,8 @@ 6518222826AFEAE500FCC275 /* ViewController */ = { isa = PBXGroup; children = ( + 65F2E03526B1721700179EBD /* Event */, + 65F2E03426B1720F00179EBD /* Inspect */, 65F2E02F26B164B200179EBD /* Log */, 65F2E01526B1007300179EBD /* Settings */, 65F2E00E26B0E69900179EBD /* MainMenu */, @@ -229,6 +243,8 @@ 65F2E02426B1326D00179EBD /* CommonTableViewCell.xib */, 65F2E02B26B1341300179EBD /* SwitchTableViewCell.swift */, 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */, + 65F2E04226B2392600179EBD /* ListCustomCell.swift */, + 65F2E04326B2392600179EBD /* ListCustomCell.xib */, ); path = View; sourceTree = ""; @@ -242,6 +258,24 @@ path = Log; sourceTree = ""; }; + 65F2E03426B1720F00179EBD /* Inspect */ = { + isa = PBXGroup; + children = ( + 65F2E03A26B1723700179EBD /* InspectViewController.swift */, + 65F2E03B26B1723700179EBD /* InspectViewController.xib */, + ); + path = Inspect; + sourceTree = ""; + }; + 65F2E03526B1721700179EBD /* Event */ = { + isa = PBXGroup; + children = ( + 65F2E03E26B1724900179EBD /* EventViewController.swift */, + 65F2E03F26B1724900179EBD /* EventViewController.xib */, + ); + path = Event; + sourceTree = ""; + }; AC84A85F6B9863F5CA60B68A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,8 +353,11 @@ buildActionMask = 2147483647; files = ( 65F2E00B26B012D700179EBD /* LoginViewController.xib in Resources */, + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */, + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */, 65F2E01D26B1019200179EBD /* SettingViewController.xib in Resources */, 65BF7C2826AFDDCD000FEC82 /* LaunchScreen.storyboard in Resources */, + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */, 65F2DFFB26B0099800179EBD /* GuideViewController.xib in Resources */, 65F2E02626B1326D00179EBD /* CommonTableViewCell.xib in Resources */, 65F2E01226B0E6D700179EBD /* MainMenuViewController.xib in Resources */, @@ -381,8 +418,10 @@ buildActionMask = 2147483647; files = ( 65F2DFFE26B0128C00179EBD /* ActionResultModel.swift in Sources */, + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */, 6518222526AFE98500FCC275 /* BaseViewController.swift in Sources */, 65F2DFFA26B0099800179EBD /* GuideViewController.swift in Sources */, + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */, 65F2E01C26B1019200179EBD /* SettingViewController.swift in Sources */, 6518222726AFE9EB00FCC275 /* String.swift in Sources */, 65F2E02D26B1341300179EBD /* SwitchTableViewCell.swift in Sources */, @@ -399,6 +438,7 @@ 65F2E00526B0129100179EBD /* InspectListModel.swift in Sources */, 65F2E00626B0129100179EBD /* BaseConfigModel.swift in Sources */, 65F2E00A26B012D700179EBD /* LoginViewController.swift in Sources */, + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */, 65F2DFCC26AFF2A900179EBD /* KeychainManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate index f410d4e..0da8420 100644 --- a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate +++ b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/LaserMethane/View/CommonTableViewCell.xib b/LaserMethane/View/CommonTableViewCell.xib index d40525e..3b31c1c 100644 --- a/LaserMethane/View/CommonTableViewCell.xib +++ b/LaserMethane/View/CommonTableViewCell.xib @@ -11,10 +11,10 @@ - + - + - + @@ -35,7 +35,7 @@ - + diff --git a/LaserMethane/View/ListCustomCell.swift b/LaserMethane/View/ListCustomCell.swift new file mode 100644 index 0000000..ac95b8a --- /dev/null +++ b/LaserMethane/View/ListCustomCell.swift @@ -0,0 +1,28 @@ +// +// ListCustomCell.swift +// LaserMethane +// +// Created by 203 on 2021/7/29. +// + +import UIKit + +class ListCustomCell: UITableViewCell { + @IBOutlet var inspectNameLabel: UILabel! + @IBOutlet var inspectDateLabel: UILabel! + @IBOutlet var inspectUserLabel: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + inspectNameLabel.lineBreakMode = .byWordWrapping + inspectNameLabel.lineBreakMode = .byTruncatingTail + inspectNameLabel.numberOfLines = 1 + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } +} diff --git a/LaserMethane/View/ListCustomCell.xib b/LaserMethane/View/ListCustomCell.xib new file mode 100644 index 0000000..dba756d --- /dev/null +++ b/LaserMethane/View/ListCustomCell.xib @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/View/SwitchTableViewCell.xib b/LaserMethane/View/SwitchTableViewCell.xib index 0df19c0..70b6f48 100644 --- a/LaserMethane/View/SwitchTableViewCell.xib +++ b/LaserMethane/View/SwitchTableViewCell.xib @@ -10,10 +10,10 @@ - + - + - + @@ -34,7 +34,7 @@ - + diff --git a/LaserMethane/ViewController/Event/EventViewController.swift b/LaserMethane/ViewController/Event/EventViewController.swift new file mode 100644 index 0000000..c47e008 --- /dev/null +++ b/LaserMethane/ViewController/Event/EventViewController.swift @@ -0,0 +1,34 @@ +// +// EventViewController.swift +// LaserMethane +// +// Created by 203 on 2021/7/28. +// + +import UIKit + +class EventViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + title = "事件查询" + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.barTintColor = .systemBlue + let dict: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white] + navigationController?.navigationBar.titleTextAttributes = dict + navigationController?.navigationBar.tintColor = .white + // Do any additional setup after loading the view. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/LaserMethane/ViewController/Event/EventViewController.xib b/LaserMethane/ViewController/Event/EventViewController.xib new file mode 100644 index 0000000..5f161c8 --- /dev/null +++ b/LaserMethane/ViewController/Event/EventViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/ViewController/Inspect/InspectViewController.swift b/LaserMethane/ViewController/Inspect/InspectViewController.swift new file mode 100644 index 0000000..58c33c5 --- /dev/null +++ b/LaserMethane/ViewController/Inspect/InspectViewController.swift @@ -0,0 +1,124 @@ +// +// InspectViewController.swift +// LaserMethane +// +// Created by 203 on 2021/7/28. +// + +import Alamofire +import KeychainAccess +import MJRefresh +import SwiftyJSON +import UIKit + +class InspectViewController: UIViewController { + @IBOutlet var startTimePicker: UIDatePicker! + @IBOutlet var endTimePicker: UIDatePicker! + @IBOutlet var keywordsView: UITextField! + @IBOutlet var inspectTableView: UITableView! + + var keychain: Keychain! + var baseURL: String? + var rowsArray: [RowsModel] = [] + var dformatter: DateFormatter! + var pageOffSet: Int = 1 + var isUpdate: Bool = false + var startDate: String? + var endDate: String? + var keyWords: String? + + override func viewDidLoad() { + super.viewDidLoad() + title = "巡检记录查询" + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.barTintColor = .systemBlue + let dict: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white] + navigationController?.navigationBar.titleTextAttributes = dict + navigationController?.navigationBar.tintColor = .white + // Do any additional setup after loading the view. + keychain = Keychain() + dformatter = DateFormatter() + setupTableView() + // 默认加载数据 + loadData(keywords: "", startTime: "", endTime: "", offset: 1) + } + + func loadData(keywords: String, startTime: String, endTime: String, offset: Int) { + baseURL = keychain[Constant.ServerConfig.rawValue] + let inspectListURL = baseURL! + Constant.inspectList.rawValue + Alamofire.request(inspectListURL, method: .get, + parameters: ["keywords": keywords, "startTime": startTime, "endTime": endTime, "limit": 15, "offset": offset], + headers: ["token": keychain[Constant.Token.rawValue]!]).responseJSON { response in + switch response.result { + case let .success(value): + let inspectModel = InspectListModel(respJson: JSON(value)) + if inspectModel.code == 200 { + if self.isUpdate { + self.rowsArray = inspectModel.data.rows + } else { + inspectModel.data.rows.forEach { model in + self.rowsArray.append(model) + } + } + // 必须要重新加载数据,否则不走数据绑定 + self.inspectTableView.reloadData() + } else { + AlertHub.shared.showWaringAlert(controller: self, messge: "查询失败,请重试") + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, messge: "未知错误") + } + } + } + + func setupTableView() { + inspectTableView.register(UINib(nibName: "ListCustomCell", bundle: nil), forCellReuseIdentifier: "listCustomCell") + inspectTableView.dataSource = self + inspectTableView.delegate = self + + inspectTableView.mj_header = MJRefreshNormalHeader { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { + self.isUpdate = true + self.pageOffSet = 1 + self.loadData(keywords: "", startTime: "", endTime: "", offset: self.pageOffSet) + self.inspectTableView.mj_header.endRefreshing() + }) + } + + inspectTableView.mj_footer = MJRefreshBackNormalFooter { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { + self.isUpdate = false + self.pageOffSet += 1 + self.loadData(keywords: self.keyWords ?? "", startTime: self.startDate ?? "", endTime: self.endDate ?? "", offset: self.pageOffSet) + self.inspectTableView.mj_footer.endRefreshing() + }) + } + } + + @IBAction func startSearchAction(_ sender: Any) { + dformatter.dateFormat = "yyyy-MM-dd" + startDate = dformatter.string(from: startTimePicker.date) + endDate = dformatter.string(from: endTimePicker.date) + keyWords = keywordsView.text + loadData(keywords: keyWords ?? "", startTime: startDate ?? "", endTime: endDate ?? "", offset: 1) + } +} + +extension InspectViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return rowsArray.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell: ListCustomCell! = inspectTableView.dequeueReusableCell(withIdentifier: "listCustomCell", for: indexPath) as? ListCustomCell + + let row = (indexPath as NSIndexPath).row + cell.inspectNameLabel.text = rowsArray[row].name + cell.inspectDateLabel.text = rowsArray[row].date + cell.inspectUserLabel.text = rowsArray[row].user + return cell + } +} + +extension InspectViewController: UITableViewDelegate { +} diff --git a/LaserMethane/ViewController/Inspect/InspectViewController.xib b/LaserMethane/ViewController/Inspect/InspectViewController.xib new file mode 100644 index 0000000..4a6a91f --- /dev/null +++ b/LaserMethane/ViewController/Inspect/InspectViewController.xib @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane.xcodeproj/project.pbxproj b/LaserMethane.xcodeproj/project.pbxproj index 8e73376..8322bfa 100644 --- a/LaserMethane.xcodeproj/project.pbxproj +++ b/LaserMethane.xcodeproj/project.pbxproj @@ -37,6 +37,12 @@ 65F2E02E26B1341300179EBD /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */; }; 65F2E03226B164CC00179EBD /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03026B164CC00179EBD /* LogViewController.swift */; }; 65F2E03326B164CC00179EBD /* LogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03126B164CC00179EBD /* LogViewController.xib */; }; + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03A26B1723700179EBD /* InspectViewController.swift */; }; + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03B26B1723700179EBD /* InspectViewController.xib */; }; + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03E26B1724900179EBD /* EventViewController.swift */; }; + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03F26B1724900179EBD /* EventViewController.xib */; }; + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E04226B2392600179EBD /* ListCustomCell.swift */; }; + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E04326B2392600179EBD /* ListCustomCell.xib */; }; 9C82F906203FB8735A689DE4 /* Pods_LaserMethane.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */; }; /* End PBXBuildFile section */ @@ -74,6 +80,12 @@ 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SwitchTableViewCell.xib; sourceTree = ""; }; 65F2E03026B164CC00179EBD /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 65F2E03126B164CC00179EBD /* LogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogViewController.xib; sourceTree = ""; }; + 65F2E03A26B1723700179EBD /* InspectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectViewController.swift; sourceTree = ""; }; + 65F2E03B26B1723700179EBD /* InspectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InspectViewController.xib; sourceTree = ""; }; + 65F2E03E26B1724900179EBD /* EventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventViewController.swift; sourceTree = ""; }; + 65F2E03F26B1724900179EBD /* EventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EventViewController.xib; sourceTree = ""; }; + 65F2E04226B2392600179EBD /* ListCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCustomCell.swift; sourceTree = ""; }; + 65F2E04326B2392600179EBD /* ListCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListCustomCell.xib; sourceTree = ""; }; 9D62480C27D0BD75CD9B2998 /* Pods-LaserMethane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaserMethane.debug.xcconfig"; path = "Target Support Files/Pods-LaserMethane/Pods-LaserMethane.debug.xcconfig"; sourceTree = ""; }; C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaserMethane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -109,6 +121,8 @@ 6518222826AFEAE500FCC275 /* ViewController */ = { isa = PBXGroup; children = ( + 65F2E03526B1721700179EBD /* Event */, + 65F2E03426B1720F00179EBD /* Inspect */, 65F2E02F26B164B200179EBD /* Log */, 65F2E01526B1007300179EBD /* Settings */, 65F2E00E26B0E69900179EBD /* MainMenu */, @@ -229,6 +243,8 @@ 65F2E02426B1326D00179EBD /* CommonTableViewCell.xib */, 65F2E02B26B1341300179EBD /* SwitchTableViewCell.swift */, 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */, + 65F2E04226B2392600179EBD /* ListCustomCell.swift */, + 65F2E04326B2392600179EBD /* ListCustomCell.xib */, ); path = View; sourceTree = ""; @@ -242,6 +258,24 @@ path = Log; sourceTree = ""; }; + 65F2E03426B1720F00179EBD /* Inspect */ = { + isa = PBXGroup; + children = ( + 65F2E03A26B1723700179EBD /* InspectViewController.swift */, + 65F2E03B26B1723700179EBD /* InspectViewController.xib */, + ); + path = Inspect; + sourceTree = ""; + }; + 65F2E03526B1721700179EBD /* Event */ = { + isa = PBXGroup; + children = ( + 65F2E03E26B1724900179EBD /* EventViewController.swift */, + 65F2E03F26B1724900179EBD /* EventViewController.xib */, + ); + path = Event; + sourceTree = ""; + }; AC84A85F6B9863F5CA60B68A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,8 +353,11 @@ buildActionMask = 2147483647; files = ( 65F2E00B26B012D700179EBD /* LoginViewController.xib in Resources */, + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */, + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */, 65F2E01D26B1019200179EBD /* SettingViewController.xib in Resources */, 65BF7C2826AFDDCD000FEC82 /* LaunchScreen.storyboard in Resources */, + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */, 65F2DFFB26B0099800179EBD /* GuideViewController.xib in Resources */, 65F2E02626B1326D00179EBD /* CommonTableViewCell.xib in Resources */, 65F2E01226B0E6D700179EBD /* MainMenuViewController.xib in Resources */, @@ -381,8 +418,10 @@ buildActionMask = 2147483647; files = ( 65F2DFFE26B0128C00179EBD /* ActionResultModel.swift in Sources */, + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */, 6518222526AFE98500FCC275 /* BaseViewController.swift in Sources */, 65F2DFFA26B0099800179EBD /* GuideViewController.swift in Sources */, + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */, 65F2E01C26B1019200179EBD /* SettingViewController.swift in Sources */, 6518222726AFE9EB00FCC275 /* String.swift in Sources */, 65F2E02D26B1341300179EBD /* SwitchTableViewCell.swift in Sources */, @@ -399,6 +438,7 @@ 65F2E00526B0129100179EBD /* InspectListModel.swift in Sources */, 65F2E00626B0129100179EBD /* BaseConfigModel.swift in Sources */, 65F2E00A26B012D700179EBD /* LoginViewController.swift in Sources */, + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */, 65F2DFCC26AFF2A900179EBD /* KeychainManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate index f410d4e..0da8420 100644 --- a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate +++ b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/LaserMethane/View/CommonTableViewCell.xib b/LaserMethane/View/CommonTableViewCell.xib index d40525e..3b31c1c 100644 --- a/LaserMethane/View/CommonTableViewCell.xib +++ b/LaserMethane/View/CommonTableViewCell.xib @@ -11,10 +11,10 @@ - + - + - + @@ -35,7 +35,7 @@ - + diff --git a/LaserMethane/View/ListCustomCell.swift b/LaserMethane/View/ListCustomCell.swift new file mode 100644 index 0000000..ac95b8a --- /dev/null +++ b/LaserMethane/View/ListCustomCell.swift @@ -0,0 +1,28 @@ +// +// ListCustomCell.swift +// LaserMethane +// +// Created by 203 on 2021/7/29. +// + +import UIKit + +class ListCustomCell: UITableViewCell { + @IBOutlet var inspectNameLabel: UILabel! + @IBOutlet var inspectDateLabel: UILabel! + @IBOutlet var inspectUserLabel: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + inspectNameLabel.lineBreakMode = .byWordWrapping + inspectNameLabel.lineBreakMode = .byTruncatingTail + inspectNameLabel.numberOfLines = 1 + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } +} diff --git a/LaserMethane/View/ListCustomCell.xib b/LaserMethane/View/ListCustomCell.xib new file mode 100644 index 0000000..dba756d --- /dev/null +++ b/LaserMethane/View/ListCustomCell.xib @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/View/SwitchTableViewCell.xib b/LaserMethane/View/SwitchTableViewCell.xib index 0df19c0..70b6f48 100644 --- a/LaserMethane/View/SwitchTableViewCell.xib +++ b/LaserMethane/View/SwitchTableViewCell.xib @@ -10,10 +10,10 @@ - + - + - + @@ -34,7 +34,7 @@ - + diff --git a/LaserMethane/ViewController/Event/EventViewController.swift b/LaserMethane/ViewController/Event/EventViewController.swift new file mode 100644 index 0000000..c47e008 --- /dev/null +++ b/LaserMethane/ViewController/Event/EventViewController.swift @@ -0,0 +1,34 @@ +// +// EventViewController.swift +// LaserMethane +// +// Created by 203 on 2021/7/28. +// + +import UIKit + +class EventViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + title = "事件查询" + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.barTintColor = .systemBlue + let dict: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white] + navigationController?.navigationBar.titleTextAttributes = dict + navigationController?.navigationBar.tintColor = .white + // Do any additional setup after loading the view. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/LaserMethane/ViewController/Event/EventViewController.xib b/LaserMethane/ViewController/Event/EventViewController.xib new file mode 100644 index 0000000..5f161c8 --- /dev/null +++ b/LaserMethane/ViewController/Event/EventViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/ViewController/Inspect/InspectViewController.swift b/LaserMethane/ViewController/Inspect/InspectViewController.swift new file mode 100644 index 0000000..58c33c5 --- /dev/null +++ b/LaserMethane/ViewController/Inspect/InspectViewController.swift @@ -0,0 +1,124 @@ +// +// InspectViewController.swift +// LaserMethane +// +// Created by 203 on 2021/7/28. +// + +import Alamofire +import KeychainAccess +import MJRefresh +import SwiftyJSON +import UIKit + +class InspectViewController: UIViewController { + @IBOutlet var startTimePicker: UIDatePicker! + @IBOutlet var endTimePicker: UIDatePicker! + @IBOutlet var keywordsView: UITextField! + @IBOutlet var inspectTableView: UITableView! + + var keychain: Keychain! + var baseURL: String? + var rowsArray: [RowsModel] = [] + var dformatter: DateFormatter! + var pageOffSet: Int = 1 + var isUpdate: Bool = false + var startDate: String? + var endDate: String? + var keyWords: String? + + override func viewDidLoad() { + super.viewDidLoad() + title = "巡检记录查询" + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.barTintColor = .systemBlue + let dict: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white] + navigationController?.navigationBar.titleTextAttributes = dict + navigationController?.navigationBar.tintColor = .white + // Do any additional setup after loading the view. + keychain = Keychain() + dformatter = DateFormatter() + setupTableView() + // 默认加载数据 + loadData(keywords: "", startTime: "", endTime: "", offset: 1) + } + + func loadData(keywords: String, startTime: String, endTime: String, offset: Int) { + baseURL = keychain[Constant.ServerConfig.rawValue] + let inspectListURL = baseURL! + Constant.inspectList.rawValue + Alamofire.request(inspectListURL, method: .get, + parameters: ["keywords": keywords, "startTime": startTime, "endTime": endTime, "limit": 15, "offset": offset], + headers: ["token": keychain[Constant.Token.rawValue]!]).responseJSON { response in + switch response.result { + case let .success(value): + let inspectModel = InspectListModel(respJson: JSON(value)) + if inspectModel.code == 200 { + if self.isUpdate { + self.rowsArray = inspectModel.data.rows + } else { + inspectModel.data.rows.forEach { model in + self.rowsArray.append(model) + } + } + // 必须要重新加载数据,否则不走数据绑定 + self.inspectTableView.reloadData() + } else { + AlertHub.shared.showWaringAlert(controller: self, messge: "查询失败,请重试") + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, messge: "未知错误") + } + } + } + + func setupTableView() { + inspectTableView.register(UINib(nibName: "ListCustomCell", bundle: nil), forCellReuseIdentifier: "listCustomCell") + inspectTableView.dataSource = self + inspectTableView.delegate = self + + inspectTableView.mj_header = MJRefreshNormalHeader { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { + self.isUpdate = true + self.pageOffSet = 1 + self.loadData(keywords: "", startTime: "", endTime: "", offset: self.pageOffSet) + self.inspectTableView.mj_header.endRefreshing() + }) + } + + inspectTableView.mj_footer = MJRefreshBackNormalFooter { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { + self.isUpdate = false + self.pageOffSet += 1 + self.loadData(keywords: self.keyWords ?? "", startTime: self.startDate ?? "", endTime: self.endDate ?? "", offset: self.pageOffSet) + self.inspectTableView.mj_footer.endRefreshing() + }) + } + } + + @IBAction func startSearchAction(_ sender: Any) { + dformatter.dateFormat = "yyyy-MM-dd" + startDate = dformatter.string(from: startTimePicker.date) + endDate = dformatter.string(from: endTimePicker.date) + keyWords = keywordsView.text + loadData(keywords: keyWords ?? "", startTime: startDate ?? "", endTime: endDate ?? "", offset: 1) + } +} + +extension InspectViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return rowsArray.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell: ListCustomCell! = inspectTableView.dequeueReusableCell(withIdentifier: "listCustomCell", for: indexPath) as? ListCustomCell + + let row = (indexPath as NSIndexPath).row + cell.inspectNameLabel.text = rowsArray[row].name + cell.inspectDateLabel.text = rowsArray[row].date + cell.inspectUserLabel.text = rowsArray[row].user + return cell + } +} + +extension InspectViewController: UITableViewDelegate { +} diff --git a/LaserMethane/ViewController/Inspect/InspectViewController.xib b/LaserMethane/ViewController/Inspect/InspectViewController.xib new file mode 100644 index 0000000..4a6a91f --- /dev/null +++ b/LaserMethane/ViewController/Inspect/InspectViewController.xib @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/ViewController/MainMenu/MainMenuViewController.swift b/LaserMethane/ViewController/MainMenu/MainMenuViewController.swift index 802467d..68afa03 100644 --- a/LaserMethane/ViewController/MainMenu/MainMenuViewController.swift +++ b/LaserMethane/ViewController/MainMenu/MainMenuViewController.swift @@ -34,16 +34,10 @@ // 弹框选择 let selectController = UIAlertController(title: "选择记录类型", message: nil, preferredStyle: .alert) let inspectButton = UIAlertAction(title: "巡检记录", style: .default, handler: { _ in -// let destination = storyboard.instantiateViewController(identifier: "InspectNavigation") as! UINavigationController -// destination.modalPresentationStyle = UIModalPresentationStyle.fullScreen -// destination.modalTransitionStyle = UIModalTransitionStyle.crossDissolve -// self.present(destination, animated: true, completion: nil) + self.navigationController?.pushViewController(InspectViewController(), animated: true) }) let eventLogButton = UIAlertAction(title: "事件记录", style: .default, handler: { _ in -// let destination = storyboard.instantiateViewController(identifier: "EventLogNavigation") as! UINavigationController -// destination.modalPresentationStyle = UIModalPresentationStyle.fullScreen -// destination.modalTransitionStyle = UIModalTransitionStyle.crossDissolve -// self.present(destination, animated: true, completion: nil) + self.navigationController?.pushViewController(EventViewController(), animated: true) }) selectController.addAction(inspectButton) selectController.addAction(eventLogButton) diff --git a/LaserMethane.xcodeproj/project.pbxproj b/LaserMethane.xcodeproj/project.pbxproj index 8e73376..8322bfa 100644 --- a/LaserMethane.xcodeproj/project.pbxproj +++ b/LaserMethane.xcodeproj/project.pbxproj @@ -37,6 +37,12 @@ 65F2E02E26B1341300179EBD /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */; }; 65F2E03226B164CC00179EBD /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03026B164CC00179EBD /* LogViewController.swift */; }; 65F2E03326B164CC00179EBD /* LogViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03126B164CC00179EBD /* LogViewController.xib */; }; + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03A26B1723700179EBD /* InspectViewController.swift */; }; + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03B26B1723700179EBD /* InspectViewController.xib */; }; + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E03E26B1724900179EBD /* EventViewController.swift */; }; + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E03F26B1724900179EBD /* EventViewController.xib */; }; + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F2E04226B2392600179EBD /* ListCustomCell.swift */; }; + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 65F2E04326B2392600179EBD /* ListCustomCell.xib */; }; 9C82F906203FB8735A689DE4 /* Pods_LaserMethane.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */; }; /* End PBXBuildFile section */ @@ -74,6 +80,12 @@ 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SwitchTableViewCell.xib; sourceTree = ""; }; 65F2E03026B164CC00179EBD /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 65F2E03126B164CC00179EBD /* LogViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LogViewController.xib; sourceTree = ""; }; + 65F2E03A26B1723700179EBD /* InspectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InspectViewController.swift; sourceTree = ""; }; + 65F2E03B26B1723700179EBD /* InspectViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InspectViewController.xib; sourceTree = ""; }; + 65F2E03E26B1724900179EBD /* EventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventViewController.swift; sourceTree = ""; }; + 65F2E03F26B1724900179EBD /* EventViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EventViewController.xib; sourceTree = ""; }; + 65F2E04226B2392600179EBD /* ListCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCustomCell.swift; sourceTree = ""; }; + 65F2E04326B2392600179EBD /* ListCustomCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ListCustomCell.xib; sourceTree = ""; }; 9D62480C27D0BD75CD9B2998 /* Pods-LaserMethane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LaserMethane.debug.xcconfig"; path = "Target Support Files/Pods-LaserMethane/Pods-LaserMethane.debug.xcconfig"; sourceTree = ""; }; C9815BBE258D836DD4067F80 /* Pods_LaserMethane.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LaserMethane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -109,6 +121,8 @@ 6518222826AFEAE500FCC275 /* ViewController */ = { isa = PBXGroup; children = ( + 65F2E03526B1721700179EBD /* Event */, + 65F2E03426B1720F00179EBD /* Inspect */, 65F2E02F26B164B200179EBD /* Log */, 65F2E01526B1007300179EBD /* Settings */, 65F2E00E26B0E69900179EBD /* MainMenu */, @@ -229,6 +243,8 @@ 65F2E02426B1326D00179EBD /* CommonTableViewCell.xib */, 65F2E02B26B1341300179EBD /* SwitchTableViewCell.swift */, 65F2E02C26B1341300179EBD /* SwitchTableViewCell.xib */, + 65F2E04226B2392600179EBD /* ListCustomCell.swift */, + 65F2E04326B2392600179EBD /* ListCustomCell.xib */, ); path = View; sourceTree = ""; @@ -242,6 +258,24 @@ path = Log; sourceTree = ""; }; + 65F2E03426B1720F00179EBD /* Inspect */ = { + isa = PBXGroup; + children = ( + 65F2E03A26B1723700179EBD /* InspectViewController.swift */, + 65F2E03B26B1723700179EBD /* InspectViewController.xib */, + ); + path = Inspect; + sourceTree = ""; + }; + 65F2E03526B1721700179EBD /* Event */ = { + isa = PBXGroup; + children = ( + 65F2E03E26B1724900179EBD /* EventViewController.swift */, + 65F2E03F26B1724900179EBD /* EventViewController.xib */, + ); + path = Event; + sourceTree = ""; + }; AC84A85F6B9863F5CA60B68A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,8 +353,11 @@ buildActionMask = 2147483647; files = ( 65F2E00B26B012D700179EBD /* LoginViewController.xib in Resources */, + 65F2E04126B1724900179EBD /* EventViewController.xib in Resources */, + 65F2E04526B2392600179EBD /* ListCustomCell.xib in Resources */, 65F2E01D26B1019200179EBD /* SettingViewController.xib in Resources */, 65BF7C2826AFDDCD000FEC82 /* LaunchScreen.storyboard in Resources */, + 65F2E03D26B1723700179EBD /* InspectViewController.xib in Resources */, 65F2DFFB26B0099800179EBD /* GuideViewController.xib in Resources */, 65F2E02626B1326D00179EBD /* CommonTableViewCell.xib in Resources */, 65F2E01226B0E6D700179EBD /* MainMenuViewController.xib in Resources */, @@ -381,8 +418,10 @@ buildActionMask = 2147483647; files = ( 65F2DFFE26B0128C00179EBD /* ActionResultModel.swift in Sources */, + 65F2E04026B1724900179EBD /* EventViewController.swift in Sources */, 6518222526AFE98500FCC275 /* BaseViewController.swift in Sources */, 65F2DFFA26B0099800179EBD /* GuideViewController.swift in Sources */, + 65F2E03C26B1723700179EBD /* InspectViewController.swift in Sources */, 65F2E01C26B1019200179EBD /* SettingViewController.swift in Sources */, 6518222726AFE9EB00FCC275 /* String.swift in Sources */, 65F2E02D26B1341300179EBD /* SwitchTableViewCell.swift in Sources */, @@ -399,6 +438,7 @@ 65F2E00526B0129100179EBD /* InspectListModel.swift in Sources */, 65F2E00626B0129100179EBD /* BaseConfigModel.swift in Sources */, 65F2E00A26B012D700179EBD /* LoginViewController.swift in Sources */, + 65F2E04426B2392600179EBD /* ListCustomCell.swift in Sources */, 65F2DFCC26AFF2A900179EBD /* KeychainManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate index f410d4e..0da8420 100644 --- a/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate +++ b/LaserMethane.xcworkspace/xcuserdata/a203.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ diff --git a/LaserMethane/View/CommonTableViewCell.xib b/LaserMethane/View/CommonTableViewCell.xib index d40525e..3b31c1c 100644 --- a/LaserMethane/View/CommonTableViewCell.xib +++ b/LaserMethane/View/CommonTableViewCell.xib @@ -11,10 +11,10 @@ - + - + - + @@ -35,7 +35,7 @@ - + diff --git a/LaserMethane/View/ListCustomCell.swift b/LaserMethane/View/ListCustomCell.swift new file mode 100644 index 0000000..ac95b8a --- /dev/null +++ b/LaserMethane/View/ListCustomCell.swift @@ -0,0 +1,28 @@ +// +// ListCustomCell.swift +// LaserMethane +// +// Created by 203 on 2021/7/29. +// + +import UIKit + +class ListCustomCell: UITableViewCell { + @IBOutlet var inspectNameLabel: UILabel! + @IBOutlet var inspectDateLabel: UILabel! + @IBOutlet var inspectUserLabel: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + inspectNameLabel.lineBreakMode = .byWordWrapping + inspectNameLabel.lineBreakMode = .byTruncatingTail + inspectNameLabel.numberOfLines = 1 + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } +} diff --git a/LaserMethane/View/ListCustomCell.xib b/LaserMethane/View/ListCustomCell.xib new file mode 100644 index 0000000..dba756d --- /dev/null +++ b/LaserMethane/View/ListCustomCell.xib @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/View/SwitchTableViewCell.xib b/LaserMethane/View/SwitchTableViewCell.xib index 0df19c0..70b6f48 100644 --- a/LaserMethane/View/SwitchTableViewCell.xib +++ b/LaserMethane/View/SwitchTableViewCell.xib @@ -10,10 +10,10 @@ - + - + - + @@ -34,7 +34,7 @@ - + diff --git a/LaserMethane/ViewController/Event/EventViewController.swift b/LaserMethane/ViewController/Event/EventViewController.swift new file mode 100644 index 0000000..c47e008 --- /dev/null +++ b/LaserMethane/ViewController/Event/EventViewController.swift @@ -0,0 +1,34 @@ +// +// EventViewController.swift +// LaserMethane +// +// Created by 203 on 2021/7/28. +// + +import UIKit + +class EventViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + title = "事件查询" + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.barTintColor = .systemBlue + let dict: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white] + navigationController?.navigationBar.titleTextAttributes = dict + navigationController?.navigationBar.tintColor = .white + // Do any additional setup after loading the view. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/LaserMethane/ViewController/Event/EventViewController.xib b/LaserMethane/ViewController/Event/EventViewController.xib new file mode 100644 index 0000000..5f161c8 --- /dev/null +++ b/LaserMethane/ViewController/Event/EventViewController.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/ViewController/Inspect/InspectViewController.swift b/LaserMethane/ViewController/Inspect/InspectViewController.swift new file mode 100644 index 0000000..58c33c5 --- /dev/null +++ b/LaserMethane/ViewController/Inspect/InspectViewController.swift @@ -0,0 +1,124 @@ +// +// InspectViewController.swift +// LaserMethane +// +// Created by 203 on 2021/7/28. +// + +import Alamofire +import KeychainAccess +import MJRefresh +import SwiftyJSON +import UIKit + +class InspectViewController: UIViewController { + @IBOutlet var startTimePicker: UIDatePicker! + @IBOutlet var endTimePicker: UIDatePicker! + @IBOutlet var keywordsView: UITextField! + @IBOutlet var inspectTableView: UITableView! + + var keychain: Keychain! + var baseURL: String? + var rowsArray: [RowsModel] = [] + var dformatter: DateFormatter! + var pageOffSet: Int = 1 + var isUpdate: Bool = false + var startDate: String? + var endDate: String? + var keyWords: String? + + override func viewDidLoad() { + super.viewDidLoad() + title = "巡检记录查询" + navigationController?.navigationBar.isTranslucent = false + navigationController?.navigationBar.barTintColor = .systemBlue + let dict: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white] + navigationController?.navigationBar.titleTextAttributes = dict + navigationController?.navigationBar.tintColor = .white + // Do any additional setup after loading the view. + keychain = Keychain() + dformatter = DateFormatter() + setupTableView() + // 默认加载数据 + loadData(keywords: "", startTime: "", endTime: "", offset: 1) + } + + func loadData(keywords: String, startTime: String, endTime: String, offset: Int) { + baseURL = keychain[Constant.ServerConfig.rawValue] + let inspectListURL = baseURL! + Constant.inspectList.rawValue + Alamofire.request(inspectListURL, method: .get, + parameters: ["keywords": keywords, "startTime": startTime, "endTime": endTime, "limit": 15, "offset": offset], + headers: ["token": keychain[Constant.Token.rawValue]!]).responseJSON { response in + switch response.result { + case let .success(value): + let inspectModel = InspectListModel(respJson: JSON(value)) + if inspectModel.code == 200 { + if self.isUpdate { + self.rowsArray = inspectModel.data.rows + } else { + inspectModel.data.rows.forEach { model in + self.rowsArray.append(model) + } + } + // 必须要重新加载数据,否则不走数据绑定 + self.inspectTableView.reloadData() + } else { + AlertHub.shared.showWaringAlert(controller: self, messge: "查询失败,请重试") + } + case .failure: + AlertHub.shared.showWaringAlert(controller: self, messge: "未知错误") + } + } + } + + func setupTableView() { + inspectTableView.register(UINib(nibName: "ListCustomCell", bundle: nil), forCellReuseIdentifier: "listCustomCell") + inspectTableView.dataSource = self + inspectTableView.delegate = self + + inspectTableView.mj_header = MJRefreshNormalHeader { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { + self.isUpdate = true + self.pageOffSet = 1 + self.loadData(keywords: "", startTime: "", endTime: "", offset: self.pageOffSet) + self.inspectTableView.mj_header.endRefreshing() + }) + } + + inspectTableView.mj_footer = MJRefreshBackNormalFooter { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { + self.isUpdate = false + self.pageOffSet += 1 + self.loadData(keywords: self.keyWords ?? "", startTime: self.startDate ?? "", endTime: self.endDate ?? "", offset: self.pageOffSet) + self.inspectTableView.mj_footer.endRefreshing() + }) + } + } + + @IBAction func startSearchAction(_ sender: Any) { + dformatter.dateFormat = "yyyy-MM-dd" + startDate = dformatter.string(from: startTimePicker.date) + endDate = dformatter.string(from: endTimePicker.date) + keyWords = keywordsView.text + loadData(keywords: keyWords ?? "", startTime: startDate ?? "", endTime: endDate ?? "", offset: 1) + } +} + +extension InspectViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return rowsArray.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell: ListCustomCell! = inspectTableView.dequeueReusableCell(withIdentifier: "listCustomCell", for: indexPath) as? ListCustomCell + + let row = (indexPath as NSIndexPath).row + cell.inspectNameLabel.text = rowsArray[row].name + cell.inspectDateLabel.text = rowsArray[row].date + cell.inspectUserLabel.text = rowsArray[row].user + return cell + } +} + +extension InspectViewController: UITableViewDelegate { +} diff --git a/LaserMethane/ViewController/Inspect/InspectViewController.xib b/LaserMethane/ViewController/Inspect/InspectViewController.xib new file mode 100644 index 0000000..4a6a91f --- /dev/null +++ b/LaserMethane/ViewController/Inspect/InspectViewController.xib @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LaserMethane/ViewController/MainMenu/MainMenuViewController.swift b/LaserMethane/ViewController/MainMenu/MainMenuViewController.swift index 802467d..68afa03 100644 --- a/LaserMethane/ViewController/MainMenu/MainMenuViewController.swift +++ b/LaserMethane/ViewController/MainMenu/MainMenuViewController.swift @@ -34,16 +34,10 @@ // 弹框选择 let selectController = UIAlertController(title: "选择记录类型", message: nil, preferredStyle: .alert) let inspectButton = UIAlertAction(title: "巡检记录", style: .default, handler: { _ in -// let destination = storyboard.instantiateViewController(identifier: "InspectNavigation") as! UINavigationController -// destination.modalPresentationStyle = UIModalPresentationStyle.fullScreen -// destination.modalTransitionStyle = UIModalTransitionStyle.crossDissolve -// self.present(destination, animated: true, completion: nil) + self.navigationController?.pushViewController(InspectViewController(), animated: true) }) let eventLogButton = UIAlertAction(title: "事件记录", style: .default, handler: { _ in -// let destination = storyboard.instantiateViewController(identifier: "EventLogNavigation") as! UINavigationController -// destination.modalPresentationStyle = UIModalPresentationStyle.fullScreen -// destination.modalTransitionStyle = UIModalTransitionStyle.crossDissolve -// self.present(destination, animated: true, completion: nil) + self.navigationController?.pushViewController(EventViewController(), animated: true) }) selectController.addAction(inspectButton) selectController.addAction(eventLogButton) diff --git a/LaserMethane/ViewController/MainMenu/MainMenuViewController.xib b/LaserMethane/ViewController/MainMenu/MainMenuViewController.xib index 66d3c38..5e9c4a1 100644 --- a/LaserMethane/ViewController/MainMenu/MainMenuViewController.xib +++ b/LaserMethane/ViewController/MainMenu/MainMenuViewController.xib @@ -21,21 +21,21 @@ - + - - + - - - - + + + + + + - + + + + + + + + + + - + - - - - + + + + + + - + + + + + + + + + + + + - + - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +