diff --git a/DataBase/版本日志/SGGLDB_2025-12-16-xiaj(博晟培训考试和塔吊菜单).sql b/DataBase/版本日志/SGGLDB_2025-12-16-xiaj(博晟培训考试和塔吊菜单).sql
new file mode 100644
index 0000000..a5c75b5
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_2025-12-16-xiaj(博晟培训考试和塔吊菜单).sql
@@ -0,0 +1,408 @@
+
+
+
+--˵Ȩ
+IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '4E0030F6-EF5E-40A6-939F-C29BC4D7CEE1')
+BEGIN
+INSERT [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'193BB4A7-B5F2-4A01-8E98-8010D073CA7A', N'4E0030F6-EF5E-40A6-939F-C29BC4D7CEE1', N'', 1)
+
+INSERT [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'249C8227-035A-419C-84B7-49BF75B0CC9D', N'9DE9B74A-0823-4857-8B50-2DAA5E635EC4', N'', 1)
+INSERT [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'5B819DF9-9076-4BEF-8404-F6A75D9B9633', N'9DE9B74A-0823-4857-8B50-2DAA5E635EC4', N'', 4)
+INSERT [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'739FEA2A-EDCC-4212-BA6E-52BF16F692EE', N'9DE9B74A-0823-4857-8B50-2DAA5E635EC4', N'', 2)
+INSERT [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'DB9951FE-07B7-406E-9574-9A14C30F267F', N'9DE9B74A-0823-4857-8B50-2DAA5E635EC4', N'ɾ', 3)
+END
+GO
+
+--ѵԺ˵
+IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '3FD5EEC5-B3ED-4944-B9E9-6B8C923316E3')
+BEGIN
+INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'17666A2C-EE47-42DE-AB8E-E23088BB156D', N'ѵԱ', NULL, N'BoSheng/BoTrainPerson.aspx', 40, N'3FD5EEC5-B3ED-4944-B9E9-6B8C923316E3', N'Menu_Person_P', 0, 1, 1)
+INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'3FD5EEC5-B3ED-4944-B9E9-6B8C923316E3', N'ѵԣչ', NULL, N'', 95, N'0', N'Menu_Person_P', 0, 0, 1)
+INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'4E0030F6-EF5E-40A6-939F-C29BC4D7CEE1', N'ԱϢ', NULL, N'BoSheng/BoPerson.aspx', 20, N'3FD5EEC5-B3ED-4944-B9E9-6B8C923316E3', N'Menu_Person_P', 0, 1, 1)
+INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'909BBC10-68D4-4C97-9FC3-9C1168D5FBC5', N'ѵԾ', NULL, N'BoSheng/BoExam.aspx', 50, N'3FD5EEC5-B3ED-4944-B9E9-6B8C923316E3', N'Menu_Person_P', 0, 1, 1)
+INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'9DF3DA33-E80D-4BF5-882C-842E400F7CAF', N'ѵ¼', NULL, N'BoSheng/BoTrain.aspx', 30, N'3FD5EEC5-B3ED-4944-B9E9-6B8C923316E3', N'Menu_Person_P', 0, 1, 1)
+INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'C5DF2DE4-EB56-45F9-9881-6CD0B7A8E72F', N'Աѵ¼', NULL, N'BoSheng/BoPersonTrainRecord.aspx', 60, N'3FD5EEC5-B3ED-4944-B9E9-6B8C923316E3', N'Menu_Person_P', 0, 1, 1)
+INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'FCA7A020-9F1B-4E1B-B457-001E05A19774', N'Ŀλ', NULL, N'BoSheng/BoUnit.aspx', 10, N'3FD5EEC5-B3ED-4944-B9E9-6B8C923316E3', N'Menu_Person_P', 0, 1, 1)
+
+INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'960812BA-ADE3-41C2-AE4A-BF24A58DE4CB', N'״̬', NULL, N'HSSE/TowerCrane/TowerCraneState.aspx', 120, N'688a1471-2d76-4d51-9d2c-6807795beb11', N'Menu_Device_P', 0, 1, 1)
+INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'9DE9B74A-0823-4857-8B50-2DAA5E635EC4', N'', NULL, N'HSSE/TowerCrane/TowerCrane.aspx', 70, N'688a1471-2d76-4d51-9d2c-6807795beb11', N'Menu_Device_P', 0, 1, 1)
+INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'DE0CA5F1-AE72-4752-A244-D474F3F5F9C8', N'¼', NULL, N'HSSE/TowerCrane/TowerCraneRecord.aspx', 130, N'688a1471-2d76-4d51-9d2c-6807795beb11', N'Menu_Device_P', 0, 1, 1)
+END
+GO
+
+
+---ѵ
+--Bo_Sheng_Exam
+IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Bo_Sheng_Exam') AND type = N'U')
+BEGIN
+CREATE TABLE [dbo].[Bo_Sheng_Exam](
+ [ID] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [RecordId] [nvarchar](50) NULL,
+ [ExamNo] [nvarchar](50) NULL,
+ [GroupNo] [nvarchar](50) NULL,
+ [CourseID] [nvarchar](50) NULL,
+ [COrder] [int] NULL,
+ [QsnCode] [nvarchar](50) NULL,
+ [QsnId] [nvarchar](50) NULL,
+ [QsnContent] [nvarchar](max) NULL,
+ [QsnFileName] [nvarchar](50) NULL,
+ [QsnAnswer] [nvarchar](50) NULL,
+ [QsnCategory] [nvarchar](50) NULL,
+ [QsnKind] [nvarchar](50) NULL,
+ [QsnImportant] [nvarchar](50) NULL,
+ [Description] [nvarchar](500) NULL,
+ [Analysis] [nvarchar](max) NULL,
+ [UploadTime] [datetime] NULL,
+ [DeleteTag] [nvarchar](50) NULL,
+ CONSTRAINT [PK_Bo_Sheng_Exam] PRIMARY KEY CLUSTERED
+(
+ [ID] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+
+END
+
+GO
+
+--Bo_Sheng_Person
+IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Bo_Sheng_Person') AND type = N'U')
+BEGIN
+
+CREATE TABLE [dbo].[Bo_Sheng_Person](
+ [ID] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [CreateDate] [datetime] NULL,
+ [CreateUser] [nvarchar](50) NULL,
+ [OperDate] [datetime] NULL,
+ [OperUser] [nvarchar](50) NULL,
+ [DeleteUser] [nvarchar](50) NULL,
+ [DeleteDate] [datetime] NULL,
+ [DeleteTag] [nvarchar](50) NULL,
+ [Name] [nvarchar](100) NULL,
+ [Sex] [nvarchar](2) NULL,
+ [BirthDay] [datetime] NULL,
+ [Address] [nvarchar](200) NULL,
+ [Nation] [nvarchar](50) NULL,
+ [IdentifyID] [nvarchar](50) NULL,
+ [Kind] [nvarchar](50) NULL,
+ [Photo] [nvarchar](2000) NULL,
+ [Police] [nvarchar](50) NULL,
+ [ValidPeriodStart] [nvarchar](50) NULL,
+ [ValidPeriodEnd] [nvarchar](50) NULL,
+ [Education] [nvarchar](50) NULL,
+ [Native] [nvarchar](500) NULL,
+ [Telephone] [nvarchar](50) NULL,
+ [MaritalStatus] [nvarchar](50) NULL,
+ [BloodGroup] [nvarchar](50) NULL,
+ [RegisteredType] [nvarchar](50) NULL,
+ [Age] [int] NULL,
+ [JobNumber] [nvarchar](50) NULL,
+ [CardContent] [nvarchar](50) NULL,
+ [ContactTel] [nvarchar](50) NULL,
+ [SecondContacts] [nvarchar](50) NULL,
+ [SecondContactsTel] [nvarchar](50) NULL,
+ [NewAddress] [nvarchar](50) NULL,
+ [HealthCondition] [nvarchar](50) NULL,
+ [HealthFile] [nvarchar](500) NULL,
+ [BuildArea] [nvarchar](50) NULL,
+ [TraPrincipal] [nvarchar](50) NULL,
+ [RegisterDate] [datetime] NULL,
+ [CategoryType] [nvarchar](50) NULL,
+ [Station] [nvarchar](50) NULL,
+ [Category] [nvarchar](50) NULL,
+ [CategoryLevel] [nvarchar](50) NULL,
+ [EntranceDate] [datetime] NULL,
+ [IsOut] [nvarchar](50) NULL,
+ [LeaveDate] [datetime] NULL,
+ [IsBlackList] [nvarchar](50) NULL,
+ [AgreementId] [nvarchar](100) NULL,
+ [HasInsurance] [nvarchar](50) NULL,
+ [DeviceNumber] [nvarchar](50) NULL,
+ [IsActive] [nvarchar](50) NULL,
+ [DepartId] [nvarchar](50) NULL,
+ [DepartName] [nvarchar](100) NULL,
+ [OwnerDepartId] [nvarchar](50) NULL,
+ [UploadTime] [datetime] NULL,
+ CONSTRAINT [PK_Bo_Sheng_Person] PRIMARY KEY CLUSTERED
+(
+ [ID] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+END
+
+GO
+
+--Bo_Sheng_PersonTrainRecord
+IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Bo_Sheng_PersonTrainRecord') AND type = N'U')
+BEGIN
+CREATE TABLE [dbo].[Bo_Sheng_PersonTrainRecord](
+ [ID] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [EmpName] [nvarchar](50) NULL,
+ [IdentifyId] [nvarchar](50) NULL,
+ [CategoryName] [nvarchar](50) NULL,
+ [RecordId] [nvarchar](50) NULL,
+ [DepartId] [nvarchar](50) NULL,
+ [DepartName] [nvarchar](50) NULL,
+ [TrainPeriod] [nvarchar](50) NULL,
+ [TotalScore] [decimal](18, 2) NULL,
+ [PassScore] [decimal](18, 2) NULL,
+ [Score] [decimal](18, 2) NULL,
+ [IsPass] [nvarchar](50) NULL,
+ [GroupNo] [nvarchar](50) NULL,
+ [ExamNo] [nvarchar](50) NULL,
+ [ExamCount] [nvarchar](50) NULL,
+ [DeviceNo] [nvarchar](50) NULL,
+ [OwnerDepartId] [nvarchar](50) NULL,
+ [Answers] [nvarchar](500) NULL,
+ [RecordName] [nvarchar](50) NULL,
+ [TrainType] [nvarchar](50) NULL,
+ [PaperMode] [nvarchar](50) NULL,
+ [TrainMode] [nvarchar](50) NULL,
+ [TrainPrincipal] [nvarchar](50) NULL,
+ [TrainStartDate] [datetime] NULL,
+ [TrainEndDate] [datetime] NULL,
+ [TrainContent] [nvarchar](2000) NULL,
+ [TrainDescript] [nvarchar](max) NULL,
+ [DeleteTag] [nvarchar](50) NULL,
+ CONSTRAINT [PK_Bo_Sheng_PersonTrainRecord] PRIMARY KEY CLUSTERED
+(
+ [ID] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+
+END
+
+GO
+
+--Bo_Sheng_Train
+IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Bo_Sheng_Train') AND type = N'U')
+BEGIN
+CREATE TABLE [dbo].[Bo_Sheng_Train](
+ [ID] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [DeleteUser] [nvarchar](50) NULL,
+ [DeleteDate] [datetime] NULL,
+ [DeleteTag] [nvarchar](50) NULL,
+ [RecordName] [nvarchar](500) NULL,
+ [TrainType] [nvarchar](50) NULL,
+ [PaperMode] [nvarchar](50) NULL,
+ [TrainMode] [nvarchar](50) NULL,
+ [TrainPrincipal] [nvarchar](50) NULL,
+ [TrainStartDate] [datetime] NULL,
+ [TrainEndDate] [datetime] NULL,
+ [TrainContent] [nvarchar](max) NULL,
+ [TrainDescript] [nvarchar](max) NULL,
+ [TrainPeriod] [nvarchar](50) NULL,
+ [PersonCount] [int] NULL,
+ [PassedCount] [int] NULL,
+ [CoverImg] [nvarchar](2000) NULL,
+ [DemandID] [nvarchar](50) NULL,
+ [CourseCount] [int] NULL,
+ [CourseDuration] [nvarchar](50) NULL,
+ [Source] [nvarchar](50) NULL,
+ [Description] [nvarchar](500) NULL,
+ [DeviceNo] [nvarchar](50) NULL,
+ [OwnerDepartId] [nvarchar](50) NULL,
+ [UploadTime] [datetime] NULL,
+ [OwnerDeptName] [nvarchar](100) NULL,
+ [TrainDepart] [nvarchar](max) NULL,
+ [CreateDate] [datetime] NULL,
+ [CreateUser] [nvarchar](50) NULL,
+ [OperDate] [datetime] NULL,
+ [OperUser] [nvarchar](50) NULL,
+ CONSTRAINT [PK_Bo_Sheng_Train] PRIMARY KEY CLUSTERED
+(
+ [ID] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+
+END
+
+GO
+
+--Bo_Sheng_TrainPerson
+IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Bo_Sheng_TrainPerson') AND type = N'U')
+BEGIN
+CREATE TABLE [dbo].[Bo_Sheng_TrainPerson](
+ [ID] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [DeleteUser] [nvarchar](50) NULL,
+ [DeleteDate] [datetime] NULL,
+ [DeleteTag] [nvarchar](50) NULL,
+ [EmpName] [nvarchar](100) NULL,
+ [IdentifyId] [nvarchar](50) NULL,
+ [Photo] [nvarchar](500) NULL,
+ [Station] [nvarchar](50) NULL,
+ [Category] [nvarchar](50) NULL,
+ [CategoryName] [nvarchar](50) NULL,
+ [RecordId] [nvarchar](50) NULL,
+ [SignName] [nvarchar](500) NULL,
+ [DepartId] [nvarchar](50) NULL,
+ [DepartName] [nvarchar](50) NULL,
+ [SignInDate] [datetime] NULL,
+ [SignInType] [nvarchar](50) NULL,
+ [TrainPeriod] [nvarchar](50) NULL,
+ [State] [nvarchar](50) NULL,
+ [TotalScore] [decimal](18, 2) NULL,
+ [PassScore] [decimal](18, 0) NULL,
+ [Score] [decimal](18, 2) NULL,
+ [IsPass] [nvarchar](50) NULL,
+ [GroupNo] [nvarchar](50) NULL,
+ [ExamNo] [nvarchar](50) NULL,
+ [ExamCount] [int] NULL,
+ [DeviceNo] [nvarchar](50) NULL,
+ [OwnerDepartId] [nvarchar](50) NULL,
+ [UploadTime] [datetime] NULL,
+ [Answers] [nvarchar](2000) NULL,
+ [CreateDate] [datetime] NULL,
+ [CreateUser] [nvarchar](50) NULL,
+ [OperDate] [datetime] NULL,
+ [OperUser] [nvarchar](50) NULL,
+ CONSTRAINT [PK_Bo_Sheng_TrainPerson] PRIMARY KEY CLUSTERED
+(
+ [ID] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+END
+
+GO
+
+--Bo_Sheng_Unit
+IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Bo_Sheng_Unit') AND type = N'U')
+BEGIN
+CREATE TABLE [dbo].[Bo_Sheng_Unit](
+ [ID] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [ParentID] [nvarchar](50) NULL,
+ [DepartCode] [nvarchar](50) NULL,
+ [ParentCode] [nvarchar](50) NULL,
+ [DepartName] [nvarchar](200) NULL,
+ [DepartType] [nvarchar](50) NULL,
+ [DepartShortName] [nvarchar](50) NULL,
+ [DepartOrder] [nvarchar](50) NULL,
+ [State] [nvarchar](50) NULL,
+ [DepartSir] [nvarchar](50) NULL,
+ [IsEpiboly] [nvarchar](50) NULL,
+ [Phone] [nvarchar](50) NULL,
+ [Charge] [nvarchar](50) NULL,
+ [Remark] [nvarchar](1000) NULL,
+ [OwnerDeptID] [nvarchar](50) NULL,
+ [CreateDate] [datetime] NULL,
+ [CreateUser] [nvarchar](50) NULL,
+ [OperDate] [datetime] NULL,
+ [OperUser] [nvarchar](50) NULL,
+ [DeleteTag] [nvarchar](50) NULL,
+ CONSTRAINT [PK_Bo_Sheng_Unit] PRIMARY KEY CLUSTERED
+(
+ [ID] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+
+END
+
+GO
+
+
+
+
+
+
+
+
+---
+
+--HSSE_TowerCrane
+IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'HSSE_TowerCrane') AND type = N'U')
+BEGIN
+CREATE TABLE [dbo].[HSSE_TowerCrane](
+ [TowerCraneId] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [TowerCraneName] [nvarchar](50) NULL,
+ [TowerCraneCode] [nvarchar](50) NULL,
+ [MaxHoist] [float] NULL,
+ [MaxMoment] [float] NULL,
+ [FrontArmLength] [float] NULL,
+ [BackArmLength] [float] NULL,
+ [TowerCap] [nvarchar](2) NULL,
+ [ArmHeigh] [float] NULL,
+ [Remark] [nvarchar](50) NULL,
+ [CreateDate] [datetime] NULL,
+ [VideoAccount] [nvarchar](50) NULL,
+ [VideoPassword] [nvarchar](50) NULL,
+ CONSTRAINT [PK_HSSE_TowerCrane] PRIMARY KEY CLUSTERED
+(
+ [TowerCraneId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+END
+
+GO
+
+--HSSE_TowerCraneRecord
+IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'HSSE_TowerCraneRecord') AND type = N'U')
+BEGIN
+
+CREATE TABLE [dbo].[HSSE_TowerCraneRecord](
+ [TowerCraneRecordId] [nvarchar](50) NOT NULL,
+ [AlarmType] [nvarchar](50) NULL,
+ [AmountHoist] [float] NULL,
+ [Camber] [float] NULL,
+ [Height] [float] NULL,
+ [Hoist] [float] NULL,
+ [Moment] [float] NULL,
+ [Range] [float] NULL,
+ [RotationAngle] [float] NULL,
+ [WindSpeed] [float] NULL,
+ [Date] [datetime] NULL,
+ [TowerCraneId] [nvarchar](50) NULL,
+ [Remark] [nvarchar](50) NULL,
+ CONSTRAINT [PK_HSSE_TowerCraneRecord] PRIMARY KEY CLUSTERED
+(
+ [TowerCraneRecordId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+END
+
+GO
+
+
+
+
+--Sys_DataExchange
+IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Sys_DataExchange') AND type = N'U')
+BEGIN
+CREATE TABLE [dbo].[Sys_DataExchange](
+ [DataID] [int] NOT NULL,
+ [GetTime] [datetime] NULL,
+ [MessageText] [nvarchar](max) NULL,
+ [FromSystem] [nvarchar](50) NULL,
+ [ToSystem] [nvarchar](50) NULL,
+ [IsUpdate] [bit] NULL,
+ CONSTRAINT [PK_Sys_DataExchange] PRIMARY KEY CLUSTERED
+(
+ [DataID] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
+ALTER TABLE [dbo].[Sys_DataExchange] ADD CONSTRAINT [DF_Sys_DataExchange_DataID] DEFAULT ((0)) FOR [DataID]
+ALTER TABLE [dbo].[Sys_DataExchange] ADD CONSTRAINT [DF_Sys_DataExchange_IsUpdate] DEFAULT ((0)) FOR [IsUpdate]
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Sys_DataExchange', @level2type=N'COLUMN',@level2name=N'DataID'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȡʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Sys_DataExchange', @level2type=N'COLUMN',@level2name=N'GetTime'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Sys_DataExchange', @level2type=N'COLUMN',@level2name=N'MessageText'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Դϵͳ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Sys_DataExchange', @level2type=N'COLUMN',@level2name=N'FromSystem'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϵͳ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Sys_DataExchange', @level2type=N'COLUMN',@level2name=N'ToSystem'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Sys_DataExchange', @level2type=N'COLUMN',@level2name=N'IsUpdate'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ݽ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Sys_DataExchange'
+
+END
+
+GO
+
+
+
diff --git a/SUBQHSE/BLL/BLL.csproj b/SUBQHSE/BLL/BLL.csproj
index 33a221d..30f0605 100644
--- a/SUBQHSE/BLL/BLL.csproj
+++ b/SUBQHSE/BLL/BLL.csproj
@@ -285,6 +285,8 @@
+
+
diff --git a/SUBQHSE/BLL/BoSheng/BOSHENGMonitorService.cs b/SUBQHSE/BLL/BoSheng/BOSHENGMonitorService.cs
new file mode 100644
index 0000000..8024f14
--- /dev/null
+++ b/SUBQHSE/BLL/BoSheng/BOSHENGMonitorService.cs
@@ -0,0 +1,735 @@
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Timers;
+
+namespace BLL
+{
+ public class BOSHENGMonitorService
+ {
+ #region 启动监视器 系统启动5分钟
+ ///
+ /// 监视组件
+ ///
+ private static Timer messageTimer;
+
+ ///
+ /// 启动监视器,不一定能成功,根据系统设置决定对监视器执行的操作 系统启动5分钟
+ ///
+ public static void StartMonitor()
+ {
+ int adTimeJ = 30;
+ if (messageTimer != null)
+ {
+ messageTimer.Stop();
+ messageTimer.Dispose();
+ messageTimer = null;
+ }
+ if (adTimeJ > 0)
+ {
+ messageTimer = new Timer
+ {
+ AutoReset = true
+ };
+ messageTimer.Elapsed += new ElapsedEventHandler(AddData);
+ messageTimer.Interval = 1000 * 60 * adTimeJ;// 60000 * adTimeJ;
+ messageTimer.Start();
+ }
+ }
+
+ ///
+ /// 流程确认 定时执行 系统启动5分钟
+ ///
+ /// Timer组件
+ /// 事件参数
+ public static void AddData(object sender, ElapsedEventArgs e)
+ {
+ try
+ {
+ var getDataList = (from x in Funs.DB.Sys_DataExchange where x.IsUpdate == false select x).Take(100).ToList();
+ if (getDataList.Count() > 0)
+ {
+ var getDataList0 = getDataList.Where(x => x.MessageText.Contains("\"Type\":0")).ToList();
+ var getDataList1 = getDataList.Where(x => x.MessageText.Contains("\"Type\":1")).ToList();
+ var getDataList2 = getDataList.Where(x => x.MessageText.Contains("\"Type\":2")).ToList();
+ var getDataList3 = getDataList.Where(x => x.MessageText.Contains("\"Type\":3")).ToList();
+ var getDataList4 = getDataList.Where(x => x.MessageText.Contains("\"Type\":4")).ToList();
+ var getDataList5 = getDataList.Where(x => x.MessageText.Contains("\"Type\":5")).ToList();
+
+ AddDataItem(getDataList1);
+ AddDataItem(getDataList0);
+ AddDataItem(getDataList2);
+ AddDataItem(getDataList3);
+ AddDataItem(getDataList4);
+ AddDataItem(getDataList5);
+ }
+ }
+ catch (Exception ex)
+ {
+ StartMonitor();
+ ErrLogInfo.WriteLog(ex, "博晟数据接口定时器", "RealNameMonitorService.AdUserInProcess");
+ }
+ }
+ #endregion
+
+ #region 与博晟培训考试接口数据插入明细方法
+ ///
+ /// 与博晟培训考试接口数据插入明细方法
+ ///
+ ///
+ private static void AddDataItem(List getDataExchange)
+ {
+ bool isOk = false;
+ foreach (var item in getDataExchange)
+ {
+ JObject obj = JObject.Parse(item.MessageText);
+ string type = obj["Type"].ToString();
+ string code = obj["Code"].ToString();
+ string fromprojectId = obj["DepartId"].ToString();
+ string OtherDepartId = obj["OtherDepartId"].ToString();
+ JArray arr = JArray.Parse(obj["Data"].ToString());
+ string projectId = string.Empty;
+ ////根据传值项目主键
+ var getProjectByFromProjectId = Funs.DB.Base_Project.FirstOrDefault(x => x.FromProjectId == fromprojectId && x.ProjectCode == OtherDepartId);
+ if (getProjectByFromProjectId != null)
+ {
+ projectId = getProjectByFromProjectId.ProjectId;
+ }
+ else
+ {
+
+ var getPByCode = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectCode == OtherDepartId);
+ if (getPByCode != null)
+ {
+ getPByCode.FromProjectId = fromprojectId;
+ Funs.DB.SubmitChanges();
+ projectId = getPByCode.ProjectId;
+ }
+ else
+ {
+ if (type == "1")
+ {
+ projectId = AddProject(arr);
+ }
+ }
+ }
+
+ if (!string.IsNullOrEmpty(projectId))
+ {
+ var sysUser = BLL.UserService.GetUserByUserId(BLL.Const.sysglyId);
+ if (sysUser != null)
+ {
+ sysUser.LoginProjectId = projectId;
+ }
+
+ if (type == "0")
+ {
+ isOk = AddPerson(projectId, arr, sysUser);
+ }
+ else if (type == "1")
+ {
+ isOk = AddUnit(projectId, arr, sysUser);
+ }
+ else if (type == "2")
+ {
+ isOk = AddTrainRecord(projectId, arr, sysUser);
+ }
+ else if (type == "3")
+ {
+ isOk = AddTrainRecordPerson(projectId, arr, sysUser);
+ }
+ else if (type == "4")
+ {
+ isOk = AddEduTrain_TrainTest(projectId, arr, sysUser);
+ }
+ else if (type == "5")
+ {
+ isOk = AddPersonTrainRecord(projectId, arr, sysUser);
+ }
+
+ if (isOk) ///更新数据接收状态
+ {
+ item.IsUpdate = true;
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region 插入信息-项目信息
+ ///
+ /// 插入信息-项目信息
+ ///
+ ///
+ ///
+ public static string AddProject(JArray arr)
+ {
+ using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
+ {
+ string projectId = string.Empty;
+ try
+ {
+ foreach (var item in arr)
+ {
+ string fromUnitId = item["ID"].ToString();
+ string departName = item["DepartName"].ToString(); ///单位名称
+ string departSir = item["DepartSir"].ToString(); ///单位级别 0:非项目部 1:项目部级 2:项目部下级单位
+ if (!string.IsNullOrEmpty(fromUnitId) && !string.IsNullOrEmpty(departName) && departSir == "1")
+ {
+ var getProjectByFromProjectId = db.Base_Project.FirstOrDefault(x => x.FromProjectId == fromUnitId);
+ if (getProjectByFromProjectId == null)
+ {
+ string projectCode = item["ProjectCode"].ToString();
+ var getProjectByProjectCode = db.Base_Project.FirstOrDefault(x => x.ProjectCode == projectCode);
+ if (getProjectByProjectCode != null)
+ {
+ projectId = getProjectByProjectCode.ProjectId;
+ getProjectByProjectCode.FromProjectId = fromUnitId;
+ db.SubmitChanges();
+ }
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ ErrLogInfo.WriteLog("博晟-项目同步", ex);
+ }
+ return projectId;
+ }
+ }
+ #endregion
+
+ #region 插入人员信息
+ ///
+ /// 插入人员信息 0
+ ///
+ ///
+ ///
+ public static bool AddPerson(string projectId, JArray arr, Model.Sys_User user)
+ {
+ using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
+ {
+ bool isOk = true;
+ try
+ {
+ List insertPersons = new List();
+ //List insertSitePersons = new List();
+ foreach (var item in arr)
+ {
+ string getID = item["ID"].ToString();
+ var getPerson = db.Bo_Sheng_Person.FirstOrDefault(x => x.ID == getID);
+ if (!string.IsNullOrEmpty(getID))
+ {
+ if (getPerson == null)
+ {
+ Model.Bo_Sheng_Person newPerson = new Model.Bo_Sheng_Person
+ {
+ ID = getID,
+ ProjectId = projectId,
+ CreateDate = Funs.GetNewDateTime(item["CreateDate"].ToString()),
+ CreateUser = item["CreateUser"].ToString(),
+ OperDate = Funs.GetNewDateTime(item["OperDate"].ToString()),
+ OperUser = item["OperUser"].ToString(),
+ DeleteUser = item["DeleteUser"].ToString(),
+ DeleteDate = Funs.GetNewDateTime(item["DeleteDate"].ToString()),
+ DeleteTag = item["DeleteTag"].ToString(),
+ Name = item["Name"].ToString(),
+ Sex = item["Sex"].ToString(),
+ BirthDay = Funs.GetNewDateTime(item["BirthDay"].ToString()),
+ Address = item["Address"].ToString(),
+ Nation = item["Nation"].ToString(),
+ IdentifyID = item["IdentifyID"].ToString(),
+ Kind = item["Kind"].ToString(),
+ Photo = item["Photo"].ToString(),
+ Police = item["Police"].ToString(),
+ ValidPeriodStart = item["ValidPeriodStart"].ToString(),
+ ValidPeriodEnd = item["ValidPeriodEnd"].ToString(),
+ Education = item["Education"].ToString(),
+ Native = item["Native"].ToString(),
+ Telephone = item["Telephone"].ToString(),
+ MaritalStatus = item["MaritalStatus"].ToString(),
+ BloodGroup = item["BloodGroup"].ToString(),
+ RegisteredType = item["RegisteredType"].ToString(),
+ Age = Funs.GetNewInt(item["Age"].ToString()),
+ JobNumber = item["JobNumber"].ToString(),
+ CardContent = item["CardContent"].ToString(),
+ ContactTel = item["ContactTel"].ToString(),
+ SecondContacts = item["SecondContacts"].ToString(),
+ SecondContactsTel = item["SecondContactsTel"].ToString(),
+ NewAddress = item["NewAddress"].ToString(),
+ HealthCondition = item["HealthCondition"].ToString(),
+ HealthFile = item["HealthFile"].ToString(),
+ BuildArea = item["BuildArea"].ToString(),
+ TraPrincipal = item["TraPrincipal"].ToString(),
+ RegisterDate = Funs.GetNewDateTime(item["RegisterDate"].ToString()),
+ CategoryType = item["CategoryType"].ToString(),
+ Station = item["Station"].ToString(),
+ Category = item["Category"].ToString(),
+ CategoryLevel = item["CategoryLevel"].ToString(),
+ EntranceDate = Funs.GetNewDateTime(item["EntranceDate"].ToString()),
+ IsOut = item["IsOut"].ToString(),
+ LeaveDate = Funs.GetNewDateTime(item["LeaveDate"].ToString()),
+ IsBlackList = item["IsBlackList"].ToString(),
+ AgreementId = item["AgreementId"].ToString(),
+ HasInsurance = item["HasInsurance"].ToString(),
+ DeviceNumber = item["DeviceNumber"].ToString(),
+ IsActive = item["IsActive"].ToString(),
+ DepartId = item["DepartId"].ToString(),
+ DepartName = item["DepartName"].ToString(),
+ OwnerDepartId = item["OwnerDepartId"].ToString(),
+ UploadTime = Funs.GetNewDateTime(item["UploadTime"].ToString()),
+ };
+ insertPersons.Add(newPerson);
+ }
+ else
+ {
+ getPerson.DeleteUser = item["DeleteUser"].ToString();
+ getPerson.DeleteDate = Funs.GetNewDateTime(item["DeleteDate"].ToString());
+ getPerson.DeleteTag = item["DeleteTag"].ToString();
+ db.SubmitChanges();
+ }
+ }
+ //var getSitePerson = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == item["IdentifyID"].ToString());
+ //if (!string.IsNullOrEmpty(getID))
+ //{
+ // if (getSitePerson == null)
+ // {
+ // Model.SitePerson_Person newPerson = new Model.SitePerson_Person
+ // {
+ // PersonId = SQLHelper.GetNewID(),
+ // ProjectId = projectId,
+ // PersonName = item["Name"].ToString(),
+ // Sex = item["Sex"].ToString(),
+ // Birthday = Funs.GetNewDateTime(item["BirthDay"].ToString()),
+ // Address = item["Address"].ToString(),
+ // Nation = item["Nation"].ToString(),
+ // IdentityCard = item["IdentifyID"].ToString(),
+ // UnitId = BLL.UnitService.GetUnitIdByUnitName(item["DepartName"].ToString()),
+ // Telephone = item["Telephone"].ToString(),
+ // MaritalStatus = item["MaritalStatus"].ToString(),
+ // };
+ // insertSitePersons.Add(newPerson);
+ // }
+ //}
+
+ if (insertPersons.Count() > 0)
+ {
+ db.Bo_Sheng_Person.InsertAllOnSubmit(insertPersons);
+ db.SubmitChanges();
+ }
+ //if (insertSitePersons.Count() > 0)
+ //{
+ // db.SitePerson_Person.InsertAllOnSubmit(insertSitePersons);
+ // db.SubmitChanges();
+ //}
+ }
+ }
+ catch (Exception ex)
+ {
+ isOk = false;
+ ErrLogInfo.WriteLog("博晟-人员信息同步", ex);
+ }
+
+ return isOk;
+ }
+ }
+ #endregion
+
+ #region 插入信息-单位信息 1
+ ///
+ /// 插入信息-单位信息 1
+ ///
+ ///
+ ///
+ public static bool AddUnit(string projectId, JArray arr, Model.Sys_User user)
+ {
+ using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
+ {
+ bool isOk = true;
+ try
+ {
+ List insertUnits = new List();
+ foreach (var item in arr)
+ {
+ string getID = item["ID"].ToString();
+ var getUnit = db.Bo_Sheng_Unit.FirstOrDefault(x => x.ID == getID);
+ if (!string.IsNullOrEmpty(getID))
+ {
+ if (getUnit == null)
+ {
+ Model.Bo_Sheng_Unit newUnit = new Model.Bo_Sheng_Unit
+ {
+ ID = getID,
+ ProjectId = projectId,
+ DeleteTag = item["DeleteTag"].ToString(),
+ ParentID = item["ParentID"].ToString(),
+ DepartCode = item["DepartCode"].ToString(),
+ ParentCode = item["ParentCode"].ToString(),
+ DepartName = item["DepartName"].ToString(),
+ DepartType = item["DepartType"].ToString(),
+ DepartShortName = item["DepartShortName"].ToString(),
+ DepartOrder = item["DepartOrder"].ToString(),
+ State = item["State"].ToString(),
+ DepartSir = item["DepartSir"].ToString(),
+ IsEpiboly = item["IsEpiboly"].ToString(),
+ Phone = item["Phone"].ToString(),
+ Charge = item["Charge"].ToString(),
+ Remark = item["Remark"].ToString(),
+ OwnerDeptID = item["OwnerDeptID"].ToString(),
+ CreateDate = Funs.GetNewDateTime(item["CreateDate"].ToString()),
+ CreateUser = item["CreateUser"].ToString(),
+ OperDate = Funs.GetNewDateTime(item["OperDate"].ToString()),
+ OperUser = item["OperUser"].ToString(),
+ };
+ insertUnits.Add(newUnit);
+ }
+ else
+ {
+ getUnit.DeleteTag = item["DeleteTag"].ToString();
+ db.SubmitChanges();
+ }
+ }
+ }
+ if (insertUnits.Count() > 0)
+ {
+ db.Bo_Sheng_Unit.InsertAllOnSubmit(insertUnits);
+ db.SubmitChanges();
+ }
+ }
+ catch (Exception ex)
+ {
+ isOk = false;
+ ErrLogInfo.WriteLog("博晟-单位信息同步", ex);
+ }
+ return isOk;
+ }
+ }
+ #endregion
+
+ #region 插入培训记录 2
+ ///
+ /// 插入培训记录 2
+ ///
+ ///
+ ///
+ public static bool AddTrainRecord(string projectId, JArray arr, Model.Sys_User user)
+ {
+ using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
+ {
+ bool isOk = true;
+ try
+ {
+ List insertTrains = new List();
+ foreach (var item in arr)
+ {
+ string getID = item["ID"].ToString();
+ var getTrain = db.Bo_Sheng_Train.FirstOrDefault(x => x.ID == getID);
+ if (!string.IsNullOrEmpty(getID))
+ {
+ if (getTrain == null)
+ {
+ Model.Bo_Sheng_Train newTrainRecord = new Model.Bo_Sheng_Train
+ {
+ ID = getID,
+ ProjectId = projectId,
+ DeleteUser = item["DeleteUser"].ToString(),
+ DeleteDate = Funs.GetNewDateTime(item["DeleteDate"].ToString()),
+ DeleteTag = item["DeleteTag"].ToString(),
+ RecordName = item["RecordName"].ToString(),
+ TrainType = item["TrainType"].ToString(),
+ PaperMode = item["PaperMode"].ToString(),
+ TrainMode = item["TrainMode"].ToString(),
+ TrainPrincipal = item["TrainPrincipal"].ToString(),
+ TrainStartDate = Funs.GetNewDateTime(item["TrainStartDate"].ToString()),
+ TrainEndDate = Funs.GetNewDateTime(item["TrainEndDate"].ToString()),
+ TrainContent = item["TrainContent"].ToString(),
+ TrainDescript = item["TrainDescript"].ToString(),
+ TrainPeriod = item["TrainPeriod"].ToString(),
+ PersonCount = Funs.GetNewInt(item["PersonCount"].ToString()),
+ PassedCount = Funs.GetNewInt(item["PassedCount"].ToString()),
+ CoverImg = item["CoverImg"].ToString(),
+ DemandID = item["DemandID"].ToString(),
+ CourseCount = Funs.GetNewInt(item["CourseCount"].ToString()),
+ CourseDuration = item["CourseDuration"].ToString(),
+ Source = item["Source"].ToString(),
+ Description = item["Description"].ToString(),
+ DeviceNo = item["DeviceNo"].ToString(),
+ OwnerDepartId = item["OwnerDepartId"].ToString(),
+ UploadTime = Funs.GetNewDateTime(item["UploadTime"].ToString()),
+ OwnerDeptName = item["OwnerDeptName"].ToString(),
+ TrainDepart = item["TrainDepart"].ToString(),
+ CreateDate = Funs.GetNewDateTime(item["CreateDate"].ToString()),
+ CreateUser = item["CreateUser"].ToString(),
+ OperDate = Funs.GetNewDateTime(item["OperDate"].ToString()),
+ OperUser = item["OperUser"].ToString(),
+ };
+ insertTrains.Add(newTrainRecord);
+ }
+ else
+ {
+ getTrain.DeleteUser = item["DeleteUser"].ToString();
+ getTrain.DeleteDate = Funs.GetNewDateTime(item["DeleteDate"].ToString());
+ getTrain.DeleteTag = item["DeleteTag"].ToString();
+ db.SubmitChanges();
+ }
+ }
+ }
+ if (insertTrains.Count() > 0)
+ {
+ db.Bo_Sheng_Train.InsertAllOnSubmit(insertTrains);
+ db.SubmitChanges();
+ }
+ }
+ catch (Exception ex)
+ {
+ isOk = false;
+ ErrLogInfo.WriteLog("博晟-培训记录同步", ex);
+ }
+ return isOk;
+ }
+ }
+ #endregion
+
+ #region 插入培训人员 3
+ ///
+ /// 插入培训人员 3
+ ///
+ ///
+ ///
+ public static bool AddTrainRecordPerson(string projectId, JArray arr, Model.Sys_User user)
+ {
+ using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
+ {
+ bool isOk = true;
+ try
+ {
+ List insertTrainPersons = new List();
+ foreach (var item in arr)
+ {
+ string getID = item["ID"].ToString();
+ var getTrainPerson = db.Bo_Sheng_TrainPerson.FirstOrDefault(x => x.ID == getID);
+ if (!string.IsNullOrEmpty(getID))
+ {
+ if (getTrainPerson == null)
+ {
+ Model.Bo_Sheng_TrainPerson newPerson = new Model.Bo_Sheng_TrainPerson
+ {
+ ID = getID,
+ ProjectId = projectId,
+ DeleteUser = item["DeleteUser"].ToString(),
+ DeleteDate = Funs.GetNewDateTime(item["DeleteDate"].ToString()),
+ DeleteTag = item["DeleteTag"].ToString(),
+ EmpName = item["EmpName"].ToString(),
+ IdentifyId = item["IdentifyId"].ToString(),
+ Photo = item["Photo"].ToString(),
+ Station = item["Station"].ToString(),
+ Category = item["Category"].ToString(),
+ CategoryName = item["CategoryName"].ToString(),
+ RecordId = item["RecordId"].ToString(),
+ SignName = item["SignName"].ToString(),
+ DepartId = item["DepartId"].ToString(),
+ DepartName = item["DepartName"].ToString(),
+ SignInDate = Funs.GetNewDateTime(item["SignInDate"].ToString()),
+ SignInType = item["SignInType"].ToString(),
+ TrainPeriod = item["TrainPeriod"].ToString(),
+ State = item["State"].ToString(),
+ TotalScore = Funs.GetNewDecimal(item["TotalScore"].ToString()),
+ PassScore = Funs.GetNewDecimal(item["PassScore"].ToString()),
+ Score = Funs.GetNewDecimal(item["Score"].ToString()),
+ IsPass = item["IsPass"].ToString(),
+ GroupNo = item["GroupNo"].ToString(),
+ ExamNo = item["ExamNo"].ToString(),
+ ExamCount = Funs.GetNewInt(item["ExamCount"].ToString()),
+ DeviceNo = item["DeviceNo"].ToString(),
+ OwnerDepartId = item["OwnerDepartId"].ToString(),
+ UploadTime = Funs.GetNewDateTime(item["UploadTime"].ToString()),
+ Answers = item["Answers"].ToString(),
+ CreateDate = Funs.GetNewDateTime(item["CreateDate"].ToString()),
+ CreateUser = item["CreateUser"].ToString(),
+ OperDate = Funs.GetNewDateTime(item["OperDate"].ToString()),
+ OperUser = item["OperUser"].ToString(),
+ };
+ insertTrainPersons.Add(newPerson);
+ }
+ else
+ {
+ getTrainPerson.DeleteUser = item["DeleteUser"].ToString();
+ getTrainPerson.DeleteDate = Funs.GetNewDateTime(item["DeleteDate"].ToString());
+ getTrainPerson.DeleteTag = item["DeleteTag"].ToString();
+ db.SubmitChanges();
+ }
+ }
+ }
+
+ if (insertTrainPersons.Count() > 0)
+ {
+ db.Bo_Sheng_TrainPerson.InsertAllOnSubmit(insertTrainPersons);
+ db.SubmitChanges();
+ }
+ }
+ catch (Exception ex)
+ {
+ isOk = false;
+ ErrLogInfo.WriteLog("博晟-培训人员同步", ex);
+ }
+ return isOk;
+ }
+ }
+ #endregion
+
+ #region 插入试卷 4
+ ///
+ /// 插入试卷 4
+ ///
+ ///
+ ///
+ public static bool AddEduTrain_TrainTest(string projectId, JArray arr, Model.Sys_User user)
+ {
+ using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
+ {
+ bool isOk = true;
+ try
+ {
+ List insertExams = new List();
+ foreach (var item in arr)
+ {
+ string getID = item["ID"].ToString();
+ var getExam = db.Bo_Sheng_Exam.FirstOrDefault(x => x.ID == getID);
+ if (!string.IsNullOrEmpty(getID))
+ {
+ if (getExam == null)
+ {
+ Model.Bo_Sheng_Exam newTrainTest = new Model.Bo_Sheng_Exam
+ {
+ ID = getID,
+ ProjectId = projectId,
+ DeleteTag = item["DeleteTag"].ToString(),
+ RecordId = item["RecordId"].ToString(),
+ ExamNo = item["ExamNo"].ToString(),
+ GroupNo = item["GroupNo"].ToString(),
+ CourseID = item["CourseID"].ToString(),
+ COrder = Funs.GetNewInt(item["COrder"].ToString()),
+ QsnCode = item["QsnCode"].ToString(),
+ QsnId = item["QsnId"].ToString(),
+ QsnContent = item["QsnContent"].ToString(),
+ QsnFileName = item["QsnFileName"].ToString(),
+ QsnAnswer = item["QsnAnswer"].ToString(),
+ QsnCategory = item["QsnCategory"].ToString(),
+ QsnKind = item["QsnKind"].ToString(),
+ QsnImportant = item["QsnImportant"].ToString(),
+ Description = item["Description"].ToString(),
+ Analysis = item["Analysis"].ToString(),
+ UploadTime = Funs.GetNewDateTime(item["UploadTime"].ToString()),
+ };
+
+ insertExams.Add(newTrainTest);
+ }
+ else
+ {
+ getExam.DeleteTag = item["DeleteTag"].ToString();
+ db.SubmitChanges();
+ }
+ }
+ }
+
+ if (insertExams.Count() > 0)
+ {
+ db.Bo_Sheng_Exam.InsertAllOnSubmit(insertExams);
+ db.SubmitChanges();
+ }
+ }
+ catch (Exception ex)
+ {
+ isOk = false;
+ ErrLogInfo.WriteLog("博晟-培训试卷同步", ex);
+ }
+ return isOk;
+ }
+ }
+ #endregion
+
+ #region 插入人员培训记录 5
+ ///
+ /// 插入人员培训记录 5
+ ///
+ ///
+ ///
+ public static bool AddPersonTrainRecord(string projectId, JArray arr, Model.Sys_User user)
+ {
+ using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
+ {
+ bool isOk = true;
+ try
+ {
+ List insertPersonTrainRecords = new List();
+ foreach (var item in arr)
+ {
+ string getID = item["ID"].ToString();
+ var getPersonTrainRecord = db.Bo_Sheng_PersonTrainRecord.FirstOrDefault(x => x.ID == getID);
+ if (!string.IsNullOrEmpty(getID))
+ {
+ if (getPersonTrainRecord == null)
+ {
+ Model.Bo_Sheng_PersonTrainRecord newRecord = new Model.Bo_Sheng_PersonTrainRecord
+ {
+ ID = getID,
+ ProjectId = projectId,
+ DeleteTag = item["DeleteTag"].ToString(),
+ EmpName = item["EmpName"].ToString(),
+ IdentifyId = item["IdentifyId"].ToString(),
+ CategoryName = item["CategoryName"].ToString(),
+ RecordId = item["RecordId"].ToString(),
+ DepartId = item["DepartId"].ToString(),
+ DepartName = item["DepartName"].ToString(),
+ TrainPeriod = item["TrainPeriod"].ToString(),
+ TotalScore = Funs.GetNewDecimal(item["TotalScore"].ToString()),
+ PassScore = Funs.GetNewDecimal(item["PassScore"].ToString()),
+ Score = Funs.GetNewDecimal(item["Score"].ToString()),
+ IsPass = item["IsPass"].ToString(),
+ GroupNo = item["GroupNo"].ToString(),
+ ExamNo = item["ExamNo"].ToString(),
+ ExamCount = item["ExamCount"].ToString(),
+ DeviceNo = item["DeviceNo"].ToString(),
+ OwnerDepartId = item["OwnerDepartId"].ToString(),
+ Answers = item["Answers"].ToString(),
+ RecordName = item["RecordName"].ToString(),
+ TrainType = item["TrainType"].ToString(),
+ PaperMode = item["PaperMode"].ToString(),
+ TrainMode = item["TrainMode"].ToString(),
+ TrainPrincipal = item["TrainPrincipal"].ToString(),
+ TrainStartDate = Funs.GetNewDateTime(item["TrainStartDate"].ToString()),
+ TrainEndDate = Funs.GetNewDateTime(item["TrainEndDate"].ToString()),
+ TrainContent = item["TrainContent"].ToString(),
+ TrainDescript = item["TrainDescript"].ToString(),
+ };
+
+ insertPersonTrainRecords.Add(newRecord);
+ }
+ else
+ {
+ getPersonTrainRecord.DeleteTag = item["DeleteTag"].ToString();
+ db.SubmitChanges();
+ }
+ }
+ }
+
+ if (insertPersonTrainRecords.Count() > 0)
+ {
+ db.Bo_Sheng_PersonTrainRecord.InsertAllOnSubmit(insertPersonTrainRecords);
+ db.SubmitChanges();
+ }
+ }
+ catch (Exception ex)
+ {
+ isOk = false;
+ ErrLogInfo.WriteLog("博晟-人员培训记录同步", ex);
+ }
+ return isOk;
+ }
+ }
+ #endregion
+ }
+}
diff --git a/SUBQHSE/BLL/BoSheng/BOSHENGService.cs b/SUBQHSE/BLL/BoSheng/BOSHENGService.cs
new file mode 100644
index 0000000..5bd99d5
--- /dev/null
+++ b/SUBQHSE/BLL/BoSheng/BOSHENGService.cs
@@ -0,0 +1,558 @@
+using FineUIPro;
+using Model;
+using System;
+using System.Collections;
+using System.Linq;
+
+namespace BLL
+{
+ public static class BOSHENGService
+ {
+ public static Model.SUBQHSEDB db = Funs.DB;
+
+ #region 获取单位列表
+ ///
+ /// 记录数
+ ///
+ public static int unitcount
+ {
+ get;
+ set;
+ }
+
+ ///
+ /// 定义变量
+ ///
+ private static IQueryable getUnits = from x in db.Bo_Sheng_Unit
+ where (x.DeleteTag == "False" || x.DeleteTag == null)
+ select x;
+
+ ///
+ /// 获取分页列表
+ ///
+ /// 页码
+ /// 每页数量
+ ///
+ public static IEnumerable getUnitListData(string projectId, string departName, string departCode, Grid Grid1)
+ {
+ IQueryable getDataList = getUnits.Where(x => x.ProjectId == projectId);
+
+ if (!string.IsNullOrEmpty(departName))
+ {
+ getDataList = getDataList.Where(x => x.DepartName.Contains(departName));
+ }
+ if (!string.IsNullOrEmpty(departCode))
+ {
+ getDataList = getDataList.Where(x => x.DepartCode.Contains(departCode));
+ }
+ unitcount = getDataList.Count();
+ if (unitcount == 0)
+ {
+ return null;
+ }
+ getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return from x in getDataList
+ select new
+ {
+ x.ID,
+ x.ProjectId,
+ x.ParentID,
+ x.DepartCode,
+ x.ParentCode,
+ x.DepartName,
+ x.DepartType,
+ x.DepartShortName,
+ x.DepartOrder,
+ x.State,
+ x.DepartSir,
+ x.IsEpiboly,
+ x.Phone,
+ x.Charge,
+ x.Remark,
+ x.OwnerDeptID,
+ x.CreateDate,
+ x.CreateUser,
+ x.OperDate,
+ x.OperUser,
+ };
+ }
+ #endregion
+
+ #region 获取人员列表
+ ///
+ /// 记录数
+ ///
+ public static int personcount
+ {
+ get;
+ set;
+ }
+
+ ///
+ /// 定义变量
+ ///
+ private static IQueryable getPersons = from x in db.Bo_Sheng_Person
+ where (x.DeleteTag == "False" || x.DeleteTag == null)
+ select x;
+
+ ///
+ /// 获取分页列表
+ ///
+ /// 页码
+ /// 每页数量
+ ///
+ public static IEnumerable getPersonListData(string projectId, string departName, string name, string identifyID, Grid Grid1)
+ {
+ IQueryable getDataList = getPersons.Where(x => x.ProjectId == projectId);
+ if (!string.IsNullOrEmpty(departName))
+ {
+ getDataList = getDataList.Where(x => x.DepartName.Contains(departName));
+ }
+ if (!string.IsNullOrEmpty(name))
+ {
+ getDataList = getDataList.Where(x => x.Name.Contains(name));
+ }
+ if (!string.IsNullOrEmpty(identifyID))
+ {
+ getDataList = getDataList.Where(x => x.IdentifyID == identifyID);
+ }
+
+ personcount = getDataList.Count();
+ if (personcount == 0)
+ {
+ return null;
+ }
+ getDataList = SortConditionHelper.SortingAndPaging(getDataList.OrderBy(x => x.DepartName), Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return from x in getDataList
+ select new
+ {
+ x.ID,
+ x.ProjectId,
+ x.CreateDate,
+ x.CreateUser,
+ x.OperDate,
+ x.OperUser,
+ x.DeleteUser,
+ x.DeleteDate,
+ x.DeleteTag,
+ x.Name,
+ x.Sex,
+ SexName = x.Sex == "2" ? "女" : "男",
+ x.BirthDay,
+ x.Address,
+ x.Nation,
+ x.IdentifyID,
+ x.Kind,
+ x.Photo,
+ x.Police,
+ x.ValidPeriodStart,
+ x.ValidPeriodEnd,
+ x.Education,
+ x.Native,
+ x.Telephone,
+ x.MaritalStatus,
+ x.BloodGroup,
+ x.RegisteredType,
+ x.Age,
+ x.JobNumber,
+ x.CardContent,
+ x.ContactTel,
+ x.SecondContacts,
+ x.SecondContactsTel,
+ x.NewAddress,
+ x.HealthCondition,
+ x.HealthFile,
+ x.BuildArea,
+ x.TraPrincipal,
+ x.RegisterDate,
+ x.CategoryType,
+ x.Station,
+ x.Category,
+ x.CategoryLevel,
+ x.EntranceDate,
+ x.IsOut,
+ IsOutName = x.IsOut == "1" ? "是" : "否",
+ x.LeaveDate,
+ x.IsBlackList,
+ IsBlackListName = x.IsBlackList == "1" ? "是" : "否",
+ x.AgreementId,
+ x.HasInsurance,
+ x.DeviceNumber,
+ x.IsActive,
+ x.DepartId,
+ x.DepartName,
+ x.OwnerDepartId,
+ x.UploadTime,
+ };
+ }
+
+ #endregion
+
+ #region 获取培训记录列表
+ ///
+ /// 记录数
+ ///
+ public static int traincount
+ {
+ get;
+ set;
+ }
+
+ ///
+ /// 定义变量
+ ///
+ private static IQueryable getTrains = from x in db.Bo_Sheng_Train
+ where (x.DeleteTag == "False" || x.DeleteTag == null)
+ select x;
+
+ ///
+ /// 获取分页列表
+ ///
+ /// 页码
+ /// 每页数量
+ ///
+ public static IEnumerable getTrainListData(string projectId, string trainType, string recordName, Grid Grid1)
+ {
+ IQueryable getDataList = getTrains.Where(x => x.ProjectId == projectId);
+ if (!string.IsNullOrEmpty(trainType))
+ {
+ getDataList = getDataList.Where(x => x.TrainType.Contains(trainType));
+ }
+ if (!string.IsNullOrEmpty(recordName))
+ {
+ getDataList = getDataList.Where(x => x.RecordName.Contains(recordName));
+ }
+
+ traincount = getDataList.Count();
+ if (traincount == 0)
+ {
+ return null;
+ }
+ getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return from x in getDataList
+ select new
+ {
+ x.ID,
+ x.ProjectId,
+ x.DeleteUser,
+ x.DeleteDate,
+ x.DeleteTag,
+ x.RecordName,
+ x.TrainType,
+ x.PaperMode,
+ PaperModeName = x.PaperMode == "0" ? "使用原卷" : "重新出卷",
+ x.TrainMode,
+ x.TrainPrincipal,
+ x.TrainStartDate,
+ x.TrainEndDate,
+ x.TrainContent,
+ x.TrainDescript,
+ x.TrainPeriod,
+ x.PersonCount,
+ x.PassedCount,
+ x.CoverImg,
+ x.DemandID,
+ x.CourseCount,
+ x.CourseDuration,
+ x.Source,
+ SourceName = x.Source == "0" ? "项目" : "课程",
+ x.Description,
+ x.DeviceNo,
+ x.OwnerDepartId,
+ x.UploadTime,
+ x.OwnerDeptName,
+ x.TrainDepart,
+ x.CreateDate,
+ x.CreateUser,
+ x.OperDate,
+ x.OperUser,
+ };
+ }
+ #endregion
+
+ #region 获取培训人员列表
+ ///
+ /// 记录数
+ ///
+ public static int trainPersoncount
+ {
+ get;
+ set;
+ }
+
+ ///
+ /// 定义变量
+ ///
+ private static IQueryable getTrainPersons = from x in db.Bo_Sheng_TrainPerson
+ where (x.DeleteTag == "False" || x.DeleteTag == null)
+ select x;
+
+ ///
+ /// 获取分页列表
+ ///
+ /// 页码
+ /// 每页数量
+ ///
+ public static IEnumerable getTrainPersonListData(string projectId, string departName, string name, string identifyID, Grid Grid1)
+ {
+ IQueryable getDataList = getTrainPersons.Where(x => x.ProjectId == projectId);
+ if (!string.IsNullOrEmpty(departName))
+ {
+ getDataList = getDataList.Where(x => x.DepartName.Contains(departName));
+ }
+ if (!string.IsNullOrEmpty(name))
+ {
+ getDataList = getDataList.Where(x => x.EmpName.Contains(name));
+ }
+ if (!string.IsNullOrEmpty(identifyID))
+ {
+ getDataList = getDataList.Where(x => x.IdentifyId.Contains(identifyID));
+ }
+
+ trainPersoncount = getDataList.Count();
+ if (trainPersoncount == 0)
+ {
+ return null;
+ }
+ getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return from x in getDataList
+ select new
+ {
+ x.ID,
+ x.ProjectId,
+ x.DeleteUser,
+ x.DeleteDate,
+ x.DeleteTag,
+ x.EmpName,
+ x.IdentifyId,
+ x.Photo,
+ x.Station,
+ x.Category,
+ x.CategoryName,
+ x.RecordId,
+ x.SignName,
+ x.DepartId,
+ x.DepartName,
+ x.SignInDate,
+ x.SignInType,
+ x.TrainPeriod,
+ x.State,
+ StateName = x.State == "0" ? "正常" : "补签",
+ x.TotalScore,
+ x.PassScore,
+ x.Score,
+ x.IsPass,
+ IsPassName = x.IsPass == "0" ? "否" : "是",
+ x.GroupNo,
+ x.ExamNo,
+ x.ExamCount,
+ x.DeviceNo,
+ x.OwnerDepartId,
+ x.UploadTime,
+ x.Answers,
+ x.CreateDate,
+ x.CreateUser,
+ x.OperDate,
+ x.OperUser,
+ };
+ }
+ #endregion
+
+ #region 获取试卷列表
+ ///
+ /// 记录数
+ ///
+ public static int examcount
+ {
+ get;
+ set;
+ }
+
+ ///
+ /// 定义变量
+ ///
+ private static IQueryable getExams = from x in db.Bo_Sheng_Exam
+ where (x.DeleteTag == "False" || x.DeleteTag == null)
+ select x;
+
+ ///
+ /// 获取分页列表
+ ///
+ /// 页码
+ /// 每页数量
+ ///
+ public static IEnumerable getExamListData(string projectId, string qsnCode, string qsnContent, Grid Grid1)
+ {
+ IQueryable getDataList = getExams.Where(x => x.ProjectId == projectId);
+
+ if (!string.IsNullOrEmpty(qsnCode))
+ {
+ getDataList = getDataList.Where(x => x.QsnCode == qsnCode);
+ }
+ if (!string.IsNullOrEmpty(qsnContent))
+ {
+ getDataList = getDataList.Where(x => x.QsnContent.Contains(qsnContent));
+ }
+
+ examcount = getDataList.Count();
+ if (examcount == 0)
+ {
+ return null;
+ }
+ getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return from x in getDataList
+ select new
+ {
+ x.ID,
+ x.ProjectId,
+ x.RecordId,
+ x.ExamNo,
+ x.GroupNo,
+ x.CourseID,
+ x.COrder,
+ x.QsnCode,
+ x.QsnId,
+ x.QsnContent,
+ x.QsnFileName,
+ x.QsnAnswer,
+ x.QsnCategory,
+ QsnCategoryName = x.QsnCategory == "3" ? "图片题" : (x.QsnCategory == "2" ? "多媒体题" : "文字题"),
+ x.QsnKind,
+ QsnKindName = x.QsnKind == "3" ? "判断" : (x.QsnCategory == "2" ? "多选" : "单选"),
+ x.QsnImportant,
+ QsnImportantName = x.QsnImportant == "2" ? "困难" : (x.QsnCategory == "1" ? "一般" : "容易"),
+ x.Description,
+ x.Analysis,
+ x.UploadTime,
+ };
+ }
+ #endregion
+
+ #region 获取人员培训记录列表
+ ///
+ /// 记录数
+ ///
+ public static int personTrainRecordcount
+ {
+ get;
+ set;
+ }
+
+ ///
+ /// 定义变量
+ ///
+ private static IQueryable getPersonTrainRecords = from x in db.Bo_Sheng_PersonTrainRecord
+ where (x.DeleteTag == "False" || x.DeleteTag == null)
+ select x;
+
+ ///
+ /// 获取分页列表
+ ///
+ /// 页码
+ /// 每页数量
+ ///
+ public static IEnumerable getPersonTrainRecordListData(string projectId, string departName, string name, string identifyID, Grid Grid1)
+ {
+ IQueryable getDataList = getPersonTrainRecords.Where(x => x.ProjectId == projectId);
+
+ if (!string.IsNullOrEmpty(name))
+ {
+ getDataList = getDataList.Where(x => x.EmpName.Contains(name));
+ }
+ if (!string.IsNullOrEmpty(departName))
+ {
+ getDataList = getDataList.Where(x => x.DepartName.Contains(departName));
+ }
+ if (!string.IsNullOrEmpty(identifyID))
+ {
+ getDataList = getDataList.Where(x => x.IdentifyId.Contains(identifyID));
+ }
+
+ personTrainRecordcount = getDataList.Count();
+ if (personTrainRecordcount == 0)
+ {
+ return null;
+ }
+ getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
+ return from x in getDataList
+ select new
+ {
+ x.ID,
+ x.ProjectId,
+ x.EmpName,
+ x.IdentifyId,
+ x.CategoryName,
+ x.RecordId,
+ x.DepartId,
+ x.DepartName,
+ x.TrainPeriod,
+ x.TotalScore,
+ x.PassScore,
+ x.Score,
+ x.IsPass,
+ IsPassName = x.IsPass == "0" ? "否" : "是",
+ x.GroupNo,
+ x.ExamNo,
+ x.ExamCount,
+ x.DeviceNo,
+ x.OwnerDepartId,
+ x.Answers,
+ x.RecordName,
+ x.TrainType,
+ x.PaperMode,
+ PaperModeName = x.PaperMode == "0" ? "使用原卷" : "重新出卷",
+ x.TrainMode,
+ x.TrainPrincipal,
+ x.TrainStartDate,
+ x.TrainEndDate,
+ x.TrainContent,
+ x.TrainDescript,
+ };
+ }
+ #endregion
+
+ ///
+ /// 根据主键获取博晟人员信息
+ ///
+ ///
+ ///
+ public static Model.Bo_Sheng_Person GetBoPersonById(string id)
+ {
+ return Funs.DB.Bo_Sheng_Person.FirstOrDefault(e => e.ID == id);
+ }
+
+ ///
+ /// 修改博晟人员信息
+ ///
+ ///
+ ///
+ public static void UpdateBoPerson(Bo_Sheng_Person person)
+ {
+ Model.Bo_Sheng_Person newPerson = Funs.DB.Bo_Sheng_Person.FirstOrDefault(e => e.ID == person.ID);
+ if (newPerson != null)
+ {
+ newPerson.Name = person.Name;
+ newPerson.DepartName = person.DepartName;
+ newPerson.IdentifyID = person.IdentifyID;
+ newPerson.Sex = person.Sex;
+ newPerson.BirthDay = person.BirthDay;
+ newPerson.Station = person.Station;
+ newPerson.Address = person.Address;
+ newPerson.Police = person.Police;
+ newPerson.ValidPeriodStart = person.ValidPeriodStart;
+ newPerson.ValidPeriodEnd = person.ValidPeriodEnd;
+ newPerson.Telephone = person.Telephone;
+ newPerson.JobNumber = person.JobNumber;
+ newPerson.NewAddress = person.NewAddress;
+ newPerson.RegisterDate = person.RegisterDate;
+ newPerson.CategoryLevel = person.CategoryLevel;
+ newPerson.EntranceDate = person.EntranceDate;
+ newPerson.LeaveDate = person.LeaveDate;
+ newPerson.IsOut = person.IsOut;
+ newPerson.IsBlackList = person.IsBlackList;
+ newPerson.UploadTime = person.UploadTime;
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SUBQHSE/BLL/Common/Const.cs b/SUBQHSE/BLL/Common/Const.cs
index 4c6d0ba..ed1eb75 100644
--- a/SUBQHSE/BLL/Common/Const.cs
+++ b/SUBQHSE/BLL/Common/Const.cs
@@ -3507,6 +3507,12 @@ namespace BLL
///
public const string HSSE_EquipmentQualityImportTemplateUrl = "File\\Excel\\HJGL_DataIn\\特种机具导入模板.xls";
+ ///
+ /// 塔吊
+ ///
+ public const string TowerCraneMenuId = "9DE9B74A-0823-4857-8B50-2DAA5E635EC4";
+
+
///
/// 材质定义
@@ -3515,6 +3521,13 @@ namespace BLL
#endregion
+ #region 博晟培训考试
+ ///
+ /// 人员信息
+ ///
+ public const string BoPersonMenuId = "4E0030F6-EF5E-40A6-939F-C29BC4D7CEE1";
+ #endregion
+
#region 焊接管理
///
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoExam.aspx b/SUBQHSE/FineUIPro.Web/BoSheng/BoExam.aspx
new file mode 100644
index 0000000..98f78ae
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoExam.aspx
@@ -0,0 +1,95 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BoExam.aspx.cs"
+ Inherits="FineUIPro.Web.BoSheng.BoExam" %>
+
+
+
+
+ 考试试卷
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoExam.aspx.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoExam.aspx.cs
new file mode 100644
index 0000000..b079785
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoExam.aspx.cs
@@ -0,0 +1,94 @@
+using BLL;
+using System;
+using System.Text;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.BoSheng
+{
+ public partial class BoExam : PageBase
+ {
+ ///
+ /// 加载
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Funs.DropDownPageSize(this.ddlPageSize);
+ //this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ //this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ this.GridBind();
+ }
+ }
+
+ ///
+ /// 获取数据,合并相同行
+ ///
+ private void GridBind()
+ {
+ var getData = BOSHENGService.getExamListData(this.CurrUser.LoginProjectId, this.txtQsnCode.Text.Trim(),this.txtQsnContent.Text.Trim(), Grid1);
+ Grid1.RecordCount = BOSHENGService.examcount;
+ Grid1.DataSource = getData;
+ Grid1.DataBind();
+ }
+
+ protected void btnSearch_Click(object sender, EventArgs e)
+ {
+ this.GridBind();
+ }
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("考试试卷" + filename, Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = Encoding.UTF8;
+ this.Grid1.PageSize = this.Grid1.RecordCount;
+ this.GridBind();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+ #endregion
+
+ #region 分页 排序
+ ///
+ /// 改变索引事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ this.GridBind();
+ }
+
+ ///
+ /// 分页下拉选择事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ this.GridBind();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ this.GridBind();
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoExam.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoExam.aspx.designer.cs
new file mode 100644
index 0000000..7b224f7
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoExam.aspx.designer.cs
@@ -0,0 +1,132 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.BoSheng {
+
+
+ public partial class BoExam {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// txtQsnCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtQsnCode;
+
+ ///
+ /// txtQsnContent 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtQsnContent;
+
+ ///
+ /// btnSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSearch;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// labNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label labNumber;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoPerson.aspx b/SUBQHSE/FineUIPro.Web/BoSheng/BoPerson.aspx
new file mode 100644
index 0000000..954102c
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoPerson.aspx
@@ -0,0 +1,151 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BoPerson.aspx.cs"
+ Inherits="FineUIPro.Web.BoSheng.BoPerson" %>
+
+
+
+
+ 人员信息
+
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoPerson.aspx.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoPerson.aspx.cs
new file mode 100644
index 0000000..1dc310c
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoPerson.aspx.cs
@@ -0,0 +1,151 @@
+using BLL;
+using System;
+using System.Text;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.BoSheng
+{
+ public partial class BoPerson : PageBase
+ {
+ ///
+ /// 加载
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ GetButtonPower();
+ Funs.DropDownPageSize(this.ddlPageSize);
+ //this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ //this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ this.GridBind();
+ }
+ }
+
+ ///
+ /// 获取数据,合并相同行
+ ///
+ private void GridBind()
+ {
+ var getData = BOSHENGService.getPersonListData(this.CurrUser.LoginProjectId, this.txtDepartName.Text.Trim(),this.txtName.Text.Trim(), this.txtIdentifyID.Text.Trim(), Grid1);
+ Grid1.RecordCount = BOSHENGService.personcount;
+ Grid1.DataSource = getData;
+ Grid1.DataBind();
+ }
+
+ protected void btnSearch_Click(object sender, EventArgs e)
+ {
+ this.GridBind();
+ }
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("人员信息" + filename, Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = Encoding.UTF8;
+ this.Grid1.PageSize = this.Grid1.RecordCount;
+ this.GridBind();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+ #endregion
+
+ #region 分页 排序
+ ///
+ /// 改变索引事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ this.GridBind();
+ }
+
+ ///
+ /// 分页下拉选择事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ this.GridBind();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ this.GridBind();
+ }
+ #endregion
+
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ this.GridBind();
+ }
+
+ protected void btnMenuEdit_Click(object sender, EventArgs e)
+ {
+ this.EditData();
+ }
+
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ this.EditData();
+ }
+
+ ///
+ /// 编辑数据方法
+ ///
+ private void EditData()
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string id = Grid1.SelectedRowID;
+ var person = BLL.BOSHENGService.GetBoPersonById(id);
+ if (person != null)
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BoPersonEdit.aspx?id={0}", id, "编辑 - ")));
+ }
+ }
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ if (Request.Params["value"] == "0")
+ {
+ return;
+ }
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.BoPersonMenuId);
+ if (buttonList.Count > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnMenuEdit.Hidden = false;
+ }
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoPerson.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoPerson.aspx.designer.cs
new file mode 100644
index 0000000..7741bcb
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoPerson.aspx.designer.cs
@@ -0,0 +1,168 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.BoSheng {
+
+
+ public partial class BoPerson {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// txtDepartName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtDepartName;
+
+ ///
+ /// txtName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtName;
+
+ ///
+ /// txtIdentifyID 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtIdentifyID;
+
+ ///
+ /// btnSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSearch;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// labNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label labNumber;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuEdit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuEdit;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonEdit.aspx b/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonEdit.aspx
new file mode 100644
index 0000000..1d35e15
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonEdit.aspx
@@ -0,0 +1,96 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BoPersonEdit.aspx.cs" Inherits="FineUIPro.Web.BoSheng.BoPersonEdit" %>
+
+
+
+
+
+
+ 修改博晟人员信息
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonEdit.aspx.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonEdit.aspx.cs
new file mode 100644
index 0000000..ada4275
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonEdit.aspx.cs
@@ -0,0 +1,127 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.BoSheng
+{
+ public partial class BoPersonEdit : PageBase
+ {
+ #region 定义项
+ ///
+ /// 主键
+ ///
+ private string Id
+ {
+ get
+ {
+ return (string)ViewState["Id"];
+ }
+ set
+ {
+ ViewState["Id"] = value;
+ }
+ }
+ #endregion
+
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
+ this.Id = Request.Params["id"];
+ if (!string.IsNullOrEmpty(this.Id))
+ {
+ Model.Bo_Sheng_Person person = BLL.BOSHENGService.GetBoPersonById(this.Id);
+ if (person != null)
+ {
+ this.txtName.Text = person.Name;
+ this.txtDepartName.Text = person.DepartName;
+ this.txtIdentifyID.Text = person.IdentifyID;
+ this.rblSex.SelectedValue = person.Sex;
+ this.txtBirthDay.Text = person.BirthDay.HasValue ? string.Format("{0:yyyy-MM-dd}", person.BirthDay) : "";
+ this.txtStation.Text = person.Station;
+ this.txtAddress.Text = person.Address;
+ this.txtPolice.Text = person.Police;
+ this.txtValidPeriodStart.Text = string.Format("{0:yyyy-MM-dd}", person.ValidPeriodStart);
+ this.txtValidPeriodEnd.Text = string.Format("{0:yyyy-MM-dd}", person.ValidPeriodEnd);
+ this.txtTelephone.Text = person.Telephone;
+ this.txtJobNumber.Text = person.JobNumber;
+ this.txtNewAddress.Text = person.NewAddress;
+ this.txtRegisterDate.Text = person.RegisterDate.HasValue ? string.Format("{0:yyyy-MM-dd HH:mm:ss}", person.RegisterDate) : "";
+ this.txtCategoryLevel.Text = person.CategoryLevel;
+ this.txtEntranceDate.Text = person.EntranceDate.HasValue ? string.Format("{0:yyyy-MM-dd HH:mm:ss}", person.EntranceDate) : "";
+ this.txtLeaveDate.Text = person.LeaveDate.HasValue ? string.Format("{0:yyyy-MM-dd hh:mm:ss}", person.LeaveDate) : "";
+ if (person.IsOut == "1")
+ {
+ this.cbIsOutName.Checked = true;
+ }
+ if (person.IsBlackList == "1")
+ {
+ this.cbIsBlackListName.Checked = true;
+ }
+ this.txtUploadTime.Text = person.UploadTime.HasValue ? string.Format("{0:yyyy-MM-dd HH:mm:ss}", person.UploadTime) : "";
+ }
+ }
+ }
+ }
+
+
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ Model.Bo_Sheng_Person person = BLL.BOSHENGService.GetBoPersonById(this.Id);
+ if (person != null)
+ {
+ person.ID = this.Id;
+ person.Name = this.txtName.Text.Trim();
+ person.DepartName = this.txtDepartName.Text.Trim();
+ person.IdentifyID = this.txtIdentifyID.Text.Trim();
+ person.Sex = this.rblSex.SelectedValue;
+ person.BirthDay = Funs.GetNewDateTime(this.txtBirthDay.Text.Trim());
+ person.Station = this.txtStation.Text.Trim();
+ person.Address = this.txtAddress.Text.Trim();
+ person.Police = this.txtPolice.Text.Trim();
+ person.ValidPeriodStart =this.txtValidPeriodStart.Text.Trim();
+ person.ValidPeriodEnd = this.txtValidPeriodEnd.Text.Trim();
+ person.Telephone = this.txtTelephone.Text.Trim();
+ person.JobNumber = this.txtJobNumber.Text.Trim();
+ person.NewAddress = this.txtNewAddress.Text.Trim();
+ if (!string.IsNullOrEmpty(this.txtRegisterDate.Text))
+ {
+ person.RegisterDate = Convert.ToDateTime(this.txtRegisterDate.Text);
+ }
+ person.CategoryLevel = this.txtCategoryLevel.Text.Trim();
+ if (!string.IsNullOrEmpty(this.txtEntranceDate.Text))
+ {
+ person.EntranceDate = Convert.ToDateTime(this.txtEntranceDate.Text);
+ }
+ if (!string.IsNullOrEmpty(this.txtLeaveDate.Text))
+ {
+ person.LeaveDate = Convert.ToDateTime(this.txtLeaveDate.Text);
+ }
+ person.IsOut = this.cbIsOutName.Checked? "1" : "0";
+ person.IsBlackList = this.cbIsBlackListName.Checked ? "1" : "0";
+ if (!string.IsNullOrEmpty(this.txtUploadTime.Text))
+ {
+ person.UploadTime = Convert.ToDateTime(this.txtUploadTime.Text);
+ }
+ BLL.BOSHENGService.UpdateBoPerson(person);
+ ShowNotify("修改成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonEdit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonEdit.aspx.designer.cs
new file mode 100644
index 0000000..3c90296
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonEdit.aspx.designer.cs
@@ -0,0 +1,258 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.BoSheng {
+
+
+ public partial class BoPersonEdit {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtName;
+
+ ///
+ /// txtDepartName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtDepartName;
+
+ ///
+ /// txtIdentifyID 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtIdentifyID;
+
+ ///
+ /// rblSex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblSex;
+
+ ///
+ /// txtBirthDay 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtBirthDay;
+
+ ///
+ /// txtStation 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtStation;
+
+ ///
+ /// txtAddress 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtAddress;
+
+ ///
+ /// txtPolice 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtPolice;
+
+ ///
+ /// txtValidPeriodStart 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtValidPeriodStart;
+
+ ///
+ /// txtValidPeriodEnd 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtValidPeriodEnd;
+
+ ///
+ /// txtTelephone 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtTelephone;
+
+ ///
+ /// txtJobNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtJobNumber;
+
+ ///
+ /// txtNewAddress 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtNewAddress;
+
+ ///
+ /// txtRegisterDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtRegisterDate;
+
+ ///
+ /// txtCategoryLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtCategoryLevel;
+
+ ///
+ /// txtEntranceDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtEntranceDate;
+
+ ///
+ /// cbIsOutName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox cbIsOutName;
+
+ ///
+ /// txtLeaveDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtLeaveDate;
+
+ ///
+ /// cbIsBlackListName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox cbIsBlackListName;
+
+ ///
+ /// txtUploadTime 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtUploadTime;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonTrainRecord.aspx b/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonTrainRecord.aspx
new file mode 100644
index 0000000..a3ff16a
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonTrainRecord.aspx
@@ -0,0 +1,130 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BoPersonTrainRecord.aspx.cs"
+ Inherits="FineUIPro.Web.BoSheng.BoPersonTrainRecord" %>
+
+
+
+
+ 人员培训记录
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonTrainRecord.aspx.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonTrainRecord.aspx.cs
new file mode 100644
index 0000000..213096d
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonTrainRecord.aspx.cs
@@ -0,0 +1,94 @@
+using BLL;
+using System;
+using System.Text;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.BoSheng
+{
+ public partial class BoPersonTrainRecord : PageBase
+ {
+ ///
+ /// 加载
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Funs.DropDownPageSize(this.ddlPageSize);
+ //this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ //this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ this.GridBind();
+ }
+ }
+
+ ///
+ /// 获取数据,合并相同行
+ ///
+ private void GridBind()
+ {
+ var getData = BOSHENGService.getPersonTrainRecordListData(this.CurrUser.LoginProjectId, this.txtDepartName.Text.Trim(),this.txtName.Text.Trim(), this.txtIdentifyID.Text.Trim(), Grid1);
+ Grid1.RecordCount = BOSHENGService.personTrainRecordcount;
+ Grid1.DataSource = getData;
+ Grid1.DataBind();
+ }
+
+ protected void btnSearch_Click(object sender, EventArgs e)
+ {
+ this.GridBind();
+ }
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("人员培训记录" + filename, Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = Encoding.UTF8;
+ this.Grid1.PageSize = this.Grid1.RecordCount;
+ this.GridBind();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+ #endregion
+
+ #region 分页 排序
+ ///
+ /// 改变索引事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ this.GridBind();
+ }
+
+ ///
+ /// 分页下拉选择事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ this.GridBind();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ this.GridBind();
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonTrainRecord.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonTrainRecord.aspx.designer.cs
new file mode 100644
index 0000000..46c0365
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoPersonTrainRecord.aspx.designer.cs
@@ -0,0 +1,141 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.BoSheng {
+
+
+ public partial class BoPersonTrainRecord {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// txtDepartName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtDepartName;
+
+ ///
+ /// txtName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtName;
+
+ ///
+ /// txtIdentifyID 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtIdentifyID;
+
+ ///
+ /// btnSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSearch;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// labNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label labNumber;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoTrain.aspx b/SUBQHSE/FineUIPro.Web/BoSheng/BoTrain.aspx
new file mode 100644
index 0000000..280f9fd
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoTrain.aspx
@@ -0,0 +1,120 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BoTrain.aspx.cs"
+ Inherits="FineUIPro.Web.BoSheng.BoTrain" %>
+
+
+
+
+ 培训记录
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoTrain.aspx.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoTrain.aspx.cs
new file mode 100644
index 0000000..e8a3cd9
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoTrain.aspx.cs
@@ -0,0 +1,106 @@
+using BLL;
+using System;
+using System.Text;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.BoSheng
+{
+ public partial class BoTrain : PageBase
+ {
+ ///
+ /// 加载
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Funs.DropDownPageSize(this.ddlPageSize);
+ //this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ //this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ this.GridBind();
+ }
+ }
+
+ ///
+ /// 获取数据,合并相同行
+ ///
+ private void GridBind()
+ {
+ var getData = BOSHENGService.getTrainListData(this.CurrUser.LoginProjectId, this.txtTrainType.Text.Trim(),this.txtName.Text.Trim(), Grid1);
+ Grid1.RecordCount = BOSHENGService.traincount;
+ Grid1.DataSource = getData;
+ Grid1.DataBind();
+ }
+
+ protected void btnSearch_Click(object sender, EventArgs e)
+ {
+ this.GridBind();
+ }
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("培训记录" + filename, Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = Encoding.UTF8;
+ this.Grid1.PageSize = this.Grid1.RecordCount;
+ this.GridBind();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+ #endregion
+
+ #region 分页 排序
+ ///
+ /// 改变索引事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ this.GridBind();
+ }
+
+ ///
+ /// 分页下拉选择事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ this.GridBind();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ this.GridBind();
+ }
+ #endregion
+
+ #region 同步培训记录
+ ///
+ /// 同步培训记录
+ ///
+ ///
+ ///
+ protected void btnRefresh_Click(object sender, EventArgs e)
+ {
+ BOSHENGMonitorService.AddData(null, null);
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoTrain.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoTrain.aspx.designer.cs
new file mode 100644
index 0000000..7bb4074
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoTrain.aspx.designer.cs
@@ -0,0 +1,141 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.BoSheng {
+
+
+ public partial class BoTrain {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// txtTrainType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtTrainType;
+
+ ///
+ /// txtName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtName;
+
+ ///
+ /// btnSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSearch;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// btnRefresh 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnRefresh;
+
+ ///
+ /// labNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label labNumber;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoTrainPerson.aspx b/SUBQHSE/FineUIPro.Web/BoSheng/BoTrainPerson.aspx
new file mode 100644
index 0000000..7aff217
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoTrainPerson.aspx
@@ -0,0 +1,115 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BoTrainPerson.aspx.cs"
+ Inherits="FineUIPro.Web.BoSheng.BoTrainPerson" %>
+
+
+
+
+ 培训人员
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoTrainPerson.aspx.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoTrainPerson.aspx.cs
new file mode 100644
index 0000000..cbcf5b6
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoTrainPerson.aspx.cs
@@ -0,0 +1,94 @@
+using BLL;
+using System;
+using System.Text;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.BoSheng
+{
+ public partial class BoTrainPerson : PageBase
+ {
+ ///
+ /// 加载
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Funs.DropDownPageSize(this.ddlPageSize);
+ //this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ //this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ this.GridBind();
+ }
+ }
+
+ ///
+ /// 获取数据,合并相同行
+ ///
+ private void GridBind()
+ {
+ var getData = BOSHENGService.getTrainPersonListData(this.CurrUser.LoginProjectId, this.txtDepartName.Text.Trim(),this.txtName.Text.Trim(), this.txtIdentifyID.Text.Trim(), Grid1);
+ Grid1.RecordCount = BOSHENGService.trainPersoncount;
+ Grid1.DataSource = getData;
+ Grid1.DataBind();
+ }
+
+ protected void btnSearch_Click(object sender, EventArgs e)
+ {
+ this.GridBind();
+ }
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("培训人员" + filename, Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = Encoding.UTF8;
+ this.Grid1.PageSize = this.Grid1.RecordCount;
+ this.GridBind();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+ #endregion
+
+ #region 分页 排序
+ ///
+ /// 改变索引事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ this.GridBind();
+ }
+
+ ///
+ /// 分页下拉选择事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ this.GridBind();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ this.GridBind();
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoTrainPerson.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoTrainPerson.aspx.designer.cs
new file mode 100644
index 0000000..b550cea
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoTrainPerson.aspx.designer.cs
@@ -0,0 +1,141 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.BoSheng {
+
+
+ public partial class BoTrainPerson {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// txtDepartName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtDepartName;
+
+ ///
+ /// txtName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtName;
+
+ ///
+ /// txtIdentifyID 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtIdentifyID;
+
+ ///
+ /// btnSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSearch;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// labNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label labNumber;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoUnit.aspx b/SUBQHSE/FineUIPro.Web/BoSheng/BoUnit.aspx
new file mode 100644
index 0000000..e5cdc44
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoUnit.aspx
@@ -0,0 +1,89 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BoUnit.aspx.cs"
+ Inherits="FineUIPro.Web.BoSheng.BoUnit" %>
+
+
+
+
+ 项目单位
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoUnit.aspx.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoUnit.aspx.cs
new file mode 100644
index 0000000..0e47fb1
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoUnit.aspx.cs
@@ -0,0 +1,94 @@
+using BLL;
+using System;
+using System.Text;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.BoSheng
+{
+ public partial class BoUnit : PageBase
+ {
+ ///
+ /// 加载
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Funs.DropDownPageSize(this.ddlPageSize);
+ //this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ //this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ this.GridBind();
+ }
+ }
+
+ ///
+ /// 获取数据,合并相同行
+ ///
+ private void GridBind()
+ {
+ var getData = BOSHENGService.getUnitListData(this.CurrUser.LoginProjectId, this.txtName.Text.Trim(), this.txtCode.Text.Trim(), Grid1);
+ Grid1.RecordCount = BOSHENGService.unitcount;
+ Grid1.DataSource = getData;
+ Grid1.DataBind();
+ }
+
+ protected void btnSearch_Click(object sender, EventArgs e)
+ {
+ this.GridBind();
+ }
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("项目单位" + filename, Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = Encoding.UTF8;
+ this.Grid1.PageSize = this.Grid1.RecordCount;
+ this.GridBind();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+ #endregion
+
+ #region 分页 排序
+ ///
+ /// 改变索引事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ this.GridBind();
+ }
+
+ ///
+ /// 分页下拉选择事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ this.GridBind();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ this.GridBind();
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/BoSheng/BoUnit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/BoSheng/BoUnit.aspx.designer.cs
new file mode 100644
index 0000000..1bccba8
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/BoSheng/BoUnit.aspx.designer.cs
@@ -0,0 +1,132 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.BoSheng {
+
+
+ public partial class BoUnit {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// txtName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtName;
+
+ ///
+ /// txtCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtCode;
+
+ ///
+ /// btnSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSearch;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// labNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label labNumber;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj b/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj
index 0da815e..c52265d 100644
--- a/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj
@@ -300,6 +300,13 @@
+
+
+
+
+
+
+
@@ -1126,12 +1133,18 @@
+
+
+
+
+
+
@@ -6974,6 +6987,55 @@
WorkStage.aspx
+
+ BoExam.aspx
+ ASPXCodeBehind
+
+
+ BoExam.aspx
+
+
+ BoPerson.aspx
+ ASPXCodeBehind
+
+
+ BoPerson.aspx
+
+
+ BoPersonEdit.aspx
+ ASPXCodeBehind
+
+
+ BoPersonEdit.aspx
+
+
+ BoPersonTrainRecord.aspx
+ ASPXCodeBehind
+
+
+ BoPersonTrainRecord.aspx
+
+
+ BoTrain.aspx
+ ASPXCodeBehind
+
+
+ BoTrain.aspx
+
+
+ BoTrainPerson.aspx
+ ASPXCodeBehind
+
+
+ BoTrainPerson.aspx
+
+
+ BoUnit.aspx
+ ASPXCodeBehind
+
+
+ BoUnit.aspx
+
main.aspx
ASPXCodeBehind
@@ -12390,6 +12452,34 @@
ProjectWorkPersonStatistic.aspx
+
+ TowerCrane.aspx
+ ASPXCodeBehind
+
+
+ TowerCrane.aspx
+
+
+ TowerCraneEdit.aspx
+ ASPXCodeBehind
+
+
+ TowerCraneEdit.aspx
+
+
+ TowerCraneRecord.aspx
+ ASPXCodeBehind
+
+
+ TowerCraneRecord.aspx
+
+
+ TowerCraneState.aspx
+ ASPXCodeBehind
+
+
+ TowerCraneState.aspx
+
indexold.aspx
ASPXCodeBehind
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCrane.aspx b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCrane.aspx
new file mode 100644
index 0000000..c589962
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCrane.aspx
@@ -0,0 +1,142 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TowerCrane.aspx.cs" Inherits="FineUIPro.Web.HSSE.TowerCrane.TowerCrane" %>
+
+
+
+
+
+
+ 塔吊
+
+
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCrane.aspx.cs b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCrane.aspx.cs
new file mode 100644
index 0000000..d0ae529
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCrane.aspx.cs
@@ -0,0 +1,235 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Text;
+using BLL;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.HSSE.TowerCrane
+{
+ public partial class TowerCrane : PageBase
+ {
+ #region 定义项
+ ///
+ /// 主键
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.ProjectId = this.CurrUser.LoginProjectId;
+ if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
+ {
+ this.ProjectId = Request.Params["projectId"];
+ }
+ ////权限按钮方法
+ this.GetButtonPower();
+ this.btnNew.OnClientClick = Window1.GetShowReference("TowerCraneEdit.aspx") + "return false;";
+ if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
+ {
+ Grid1.PageSize = this.CurrUser.PageSize.Value;
+ }
+ this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+ // 绑定表格
+ this.BindGrid();
+ }
+ }
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ string strSql = @"SELECT * from HSSE_TowerCrane WHERE ";
+ List listStr = new List();
+ strSql += " ProjectId = @ProjectId";
+ listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
+
+ if (!string.IsNullOrEmpty(txtName.Text))
+ {
+ if (!string.IsNullOrEmpty(txtName.Text))
+ {
+ strSql += " and Name like '%"+ txtName.Text + "%' ";
+ }
+ }
+ strSql += " order by CreateDate desc";
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+
+ Grid1.RecordCount = tb.Rows.Count;
+ //tb = GetFilteredTable(Grid1.FilteredData, tb);
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+
+ #region 分页 排序
+ ///
+ /// 改变索引事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ BindGrid();
+ }
+
+ ///
+ /// 分页下拉选择事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
+ {
+ this.BindGrid();
+ }
+ #endregion
+ #endregion
+
+ #region 查询
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void TextBox_TextChanged(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ }
+ #endregion
+
+ #region 编辑
+ ///
+ /// 双击事件
+ ///
+ ///
+ ///
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ this.EditData();
+ }
+
+ ///
+ /// 右键编辑事件
+ ///
+ ///
+ ///
+ protected void btnMenuEdit_Click(object sender, EventArgs e)
+ {
+ this.EditData();
+ }
+
+ ///
+ /// 编辑数据方法
+ ///
+ private void EditData()
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string id = Grid1.SelectedRowID;
+ var meeting = Funs.DB.HSSE_TowerCrane.FirstOrDefault(x => x.TowerCraneId == id);
+ if (meeting != null)
+ {
+
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TowerCraneEdit.aspx?TowerCraneId={0}", id, "编辑 - ")));
+
+ }
+ }
+ #endregion
+
+ #region 删除
+ ///
+ /// 右键删除事件
+ ///
+ ///
+ ///
+ protected void btnMenuDelete_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ var towerCrane = Funs.DB.HSSE_TowerCrane.FirstOrDefault(x=>x.TowerCraneId== rowID);
+ if (towerCrane != null)
+ {
+ Funs.DB.HSSE_TowerCrane.DeleteOnSubmit(towerCrane);
+ BLL.LogService.AddSys_Log(this.CurrUser, towerCrane.TowerCraneCode, towerCrane.TowerCraneId, BLL.Const.TowerCraneMenuId, BLL.Const.BtnDelete);
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ this.BindGrid();
+ ShowNotify("删除数据成功!", MessageBoxIcon.Success);
+ }
+ }
+ #endregion
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ if (Request.Params["value"] == "0")
+ {
+ return;
+ }
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectContactListMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnAdd))
+ {
+ this.btnNew.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnMenuEdit.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ this.btnMenuDelete.Hidden = false;
+ }
+ }
+ }
+ #endregion
+
+
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCrane.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCrane.aspx.designer.cs
new file mode 100644
index 0000000..172492e
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCrane.aspx.designer.cs
@@ -0,0 +1,161 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.HSSE.TowerCrane
+{
+
+
+ public partial class TowerCrane
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// txtName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtName;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// lblNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNumber;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuEdit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuEdit;
+
+ ///
+ /// btnMenuDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDelete;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneEdit.aspx b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneEdit.aspx
new file mode 100644
index 0000000..cbf7aaf
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneEdit.aspx
@@ -0,0 +1,81 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TowerCraneEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.TowerCrane.TowerCraneEdit" %>
+
+
+
+
+ 编辑安全隐患类型
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneEdit.aspx.cs b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneEdit.aspx.cs
new file mode 100644
index 0000000..f67f2ec
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneEdit.aspx.cs
@@ -0,0 +1,171 @@
+using BLL;
+using System;
+using System.Linq;
+
+namespace FineUIPro.Web.HSSE.TowerCrane
+{
+ public partial class TowerCraneEdit : PageBase
+ {
+ #region 定义变量
+ ///
+ /// 主键
+ ///
+ public string TowerCraneId
+ {
+ get
+ {
+ return (string)ViewState["TowerCraneId"];
+ }
+ set
+ {
+ ViewState["TowerCraneId"] = value;
+ }
+ }
+
+
+ #endregion
+
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ ////权限按钮方法
+ this.GetButtonPower();
+ this.TowerCraneId = Request.Params["TowerCraneId"];
+ if (!string.IsNullOrEmpty(this.TowerCraneId))
+ {
+ Model.HSSE_TowerCrane rectify = Funs.DB.HSSE_TowerCrane.FirstOrDefault(x=>x.TowerCraneId==this.TowerCraneId);
+ if (rectify != null)
+ {
+ this.txtTowerCraneName.Text = rectify.TowerCraneName;
+ this.txtTowerCraneCode.Text = rectify.TowerCraneCode;
+ this.txtVideoAccount.Text = rectify.VideoAccount;
+ this.txtVideoPassword.Text = rectify.VideoPassword;
+ if (rectify.MaxHoist.HasValue)
+ {
+ this.txtMaxHoist.Text = rectify.MaxHoist.Value.ToString("#.##");
+ }
+ if (rectify.MaxMoment.HasValue)
+ {
+ this.txtMaxMoment.Text = rectify.MaxMoment.Value.ToString("#.##");
+ }
+ if (rectify.FrontArmLength.HasValue)
+ {
+ this.txtFrontArmLength.Text = rectify.FrontArmLength.Value.ToString("#.##");
+ }
+ if (rectify.BackArmLength.HasValue)
+ {
+ this.txtBackArmLength.Text = rectify.BackArmLength.Value.ToString("#.##");
+ }
+ if (rectify.ArmHeigh.HasValue)
+ {
+ this.txtArmHeigh.Text = rectify.ArmHeigh.Value.ToString("#.##");
+ }
+ if (rectify.MaxMoment.HasValue)
+ {
+ this.txtMaxMoment.Text = rectify.MaxMoment.Value.ToString("#.##");
+ }
+ if (rectify.TowerCap=="是")
+ {
+ this.isTowerCap.Checked = true;
+ }
+ else
+ {
+ this.isTowerCap.Checked = false;
+ }
+ this.txtRemark.Text = rectify.Remark;
+
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region 保存
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ Model.HSSE_TowerCrane towerCrane = null;
+
+ if (!string.IsNullOrEmpty(TowerCraneId))
+ {
+ towerCrane = Funs.DB.HSSE_TowerCrane.FirstOrDefault(x => x.TowerCraneId == this.TowerCraneId);
+ }
+ else
+ {
+ towerCrane = new Model.HSSE_TowerCrane();
+ towerCrane.TowerCraneId = SQLHelper.GetNewID(typeof(Model.HSSE_TowerCrane));
+ towerCrane.ProjectId = CurrUser.LoginProjectId;
+ towerCrane.CreateDate = DateTime.Now;
+ Funs.DB.HSSE_TowerCrane.InsertOnSubmit(towerCrane);
+ }
+ towerCrane.TowerCraneCode = this.txtTowerCraneCode.Text.Trim();
+ towerCrane.TowerCraneName = this.txtTowerCraneName.Text.Trim();
+ towerCrane.VideoAccount = this.txtVideoAccount.Text.Trim();
+ towerCrane.VideoPassword = this.txtVideoPassword.Text.Trim();
+
+ if (!string.IsNullOrEmpty(this.txtMaxHoist.Text))
+ {
+ towerCrane.MaxHoist = double.Parse(this.txtMaxHoist.Text);
+ }
+ if (!string.IsNullOrEmpty(this.txtMaxMoment.Text))
+ {
+ towerCrane.MaxMoment = double.Parse(this.txtMaxMoment.Text);
+ }
+ if (!string.IsNullOrEmpty(this.txtFrontArmLength.Text))
+ {
+ towerCrane.FrontArmLength = double.Parse(this.txtFrontArmLength.Text);
+ }
+ if (!string.IsNullOrEmpty(this.txtBackArmLength.Text))
+ {
+ towerCrane.BackArmLength = double.Parse(this.txtBackArmLength.Text);
+ }
+ if (!string.IsNullOrEmpty(this.txtArmHeigh.Text))
+ {
+ towerCrane.ArmHeigh = double.Parse(this.txtArmHeigh.Text);
+ }
+ if (isTowerCap.Checked)
+ {
+ towerCrane.TowerCap = "是";
+ }
+ else
+ {
+ towerCrane.TowerCap = "否";
+ }
+ towerCrane.Remark = this.txtRemark.Text.Trim();
+ Funs.DB.SubmitChanges();
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ #endregion
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TowerCraneMenuId);
+ if (buttonList.Count() > 0)
+ {
+
+ if (buttonList.Contains(BLL.Const.BtnSave))
+ {
+ this.btnSave.Hidden = false;
+ }
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneEdit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneEdit.aspx.designer.cs
new file mode 100644
index 0000000..b50c4f9
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneEdit.aspx.designer.cs
@@ -0,0 +1,161 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.HSSE.TowerCrane
+{
+
+
+ public partial class TowerCraneEdit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtTowerCraneCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtTowerCraneCode;
+
+ ///
+ /// txtTowerCraneName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtTowerCraneName;
+
+ ///
+ /// txtVideoAccount 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtVideoAccount;
+
+ ///
+ /// txtVideoPassword 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtVideoPassword;
+
+ ///
+ /// txtMaxHoist 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtMaxHoist;
+
+ ///
+ /// txtMaxMoment 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtMaxMoment;
+
+ ///
+ /// txtFrontArmLength 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtFrontArmLength;
+
+ ///
+ /// txtBackArmLength 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtBackArmLength;
+
+ ///
+ /// isTowerCap 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox isTowerCap;
+
+ ///
+ /// txtArmHeigh 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtArmHeigh;
+
+ ///
+ /// txtRemark 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtRemark;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneRecord.aspx b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneRecord.aspx
new file mode 100644
index 0000000..9def8d2
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneRecord.aspx
@@ -0,0 +1,147 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TowerCraneRecord.aspx.cs" Inherits="FineUIPro.Web.HSSE.TowerCrane.TowerCraneRecord" %>
+
+
+
+
+
+
+ 塔吊
+
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneRecord.aspx.cs b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneRecord.aspx.cs
new file mode 100644
index 0000000..a5a4e66
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneRecord.aspx.cs
@@ -0,0 +1,229 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Text;
+using BLL;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.HSSE.TowerCrane
+{
+ public partial class TowerCraneRecord : PageBase
+ {
+ #region 定义项
+ ///
+ /// 主键
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.InitTreeMenu();//加载树
+ }
+ }
+ #region 加载树装置-单位-工作区
+ ///
+ /// 加载树
+ ///
+ private void InitTreeMenu()
+ {
+ this.tvControlItem.Nodes.Clear();
+
+ ////塔吊
+ var towerCranes = (from x in Funs.DB.HSSE_TowerCrane
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ && (string.IsNullOrEmpty(txtIsono.Text) || x.TowerCraneName.Contains(txtIsono.Text))
+ orderby x.CreateDate
+ select x).ToList();
+
+ foreach (var item in towerCranes)
+ {
+ TreeNode rootNode = new TreeNode();
+ rootNode.Text = item.TowerCraneName;
+ rootNode.NodeID = item.TowerCraneId;
+ rootNode.EnableClickEvent = true;
+ this.tvControlItem.Nodes.Add(rootNode);
+ }
+
+ }
+ #endregion
+
+
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void Tree_TextChanged(object sender, EventArgs e)
+ {
+ this.InitTreeMenu();
+
+ }
+
+
+ ///
+ /// 树展开事件
+ ///
+ ///
+ ///
+ protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
+ {
+
+ BindGrid();
+ }
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ string TowerCraneId = this.tvControlItem.SelectedNodeID;
+ if (!string.IsNullOrEmpty(TowerCraneId))
+ {
+ string strSql = @"SELECT * from HSSE_TowerCraneRecord WHERE ";
+ List listStr = new List();
+ strSql += " TowerCraneId = @TowerCraneId";
+ listStr.Add(new SqlParameter("@TowerCraneId", TowerCraneId));
+ if (ckIsWarnOnly.Checked)
+ {
+ strSql += " and AlarmType is not null ";
+ }
+ if (!string.IsNullOrEmpty(txtStartTime.Text))
+ {
+ strSql += " and Date >='"+ txtStartTime.Text + "' ";
+ }
+ if (!string.IsNullOrEmpty(txtEndTime.Text))
+ {
+ strSql += " and Date <='" + txtEndTime.Text + "' ";
+ }
+ strSql += " order by Date desc";
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+
+ Grid1.RecordCount = tb.Rows.Count;
+ //tb = GetFilteredTable(Grid1.FilteredData, tb);
+ var table = this.GetPagedDataTable(Grid1, tb);
+ if (table != null && table.Rows.Count > 0)
+ {
+ Dictionary alarmMap = new Dictionary();
+
+ alarmMap.Add("111", "重量预警");
+ alarmMap.Add("112", "重量报警");
+ alarmMap.Add("121", "风速预警");
+ alarmMap.Add("122", "风速报警");
+ alarmMap.Add("131", "内限位报警");
+ alarmMap.Add("132", "内限位预警");
+ alarmMap.Add("133", "外限位预警");
+ alarmMap.Add("134", "外限位报警");
+ alarmMap.Add("141", "倾角预警");
+ alarmMap.Add("142", "倾角报警");
+ alarmMap.Add("151", "上限位预警");
+ alarmMap.Add("152", "上限位报警");
+ alarmMap.Add("201", "障碍物碰撞报警");
+ alarmMap.Add("202", "塔机群碰撞报警");
+
+ foreach (DataRow row in table.Rows)
+ {
+ string AlarmType = row["AlarmType"].ToString();
+ if (!string.IsNullOrEmpty(AlarmType))
+ {
+ var alarms = AlarmType.Replace("[", "").Replace("]", "").Split(',');
+ string res = "";
+ foreach (string alarm in alarms)
+ {
+ if (alarmMap.ContainsKey(alarm))
+ {
+ res += alarmMap[alarm] + ",";
+ }
+ }
+ row["AlarmType"] = res.TrimEnd(',');
+ }
+
+ }
+ }
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+ else
+ {
+ Grid1.DataSource = null;
+ Grid1.DataBind();
+ }
+ }
+
+ #region 分页 排序
+ ///
+ /// 改变索引事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ BindGrid();
+ }
+
+ ///
+ /// 分页下拉选择事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
+ {
+ this.BindGrid();
+ }
+ #endregion
+ #endregion
+
+ #region 查询
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void TextBox_TextChanged(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ }
+ #endregion
+
+
+
+
+
+
+ protected void btnQuery_Click(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneRecord.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneRecord.aspx.designer.cs
new file mode 100644
index 0000000..854721c
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneRecord.aspx.designer.cs
@@ -0,0 +1,197 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.HSSE.TowerCrane
+{
+
+
+ public partial class TowerCraneRecord
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel2;
+
+ ///
+ /// panelLeftRegion 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel panelLeftRegion;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// txtIsono 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtIsono;
+
+ ///
+ /// hfTowerCraneId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hfTowerCraneId;
+
+ ///
+ /// tvControlItem 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Tree tvControlItem;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// ckIsWarnOnly 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox ckIsWarnOnly;
+
+ ///
+ /// txtStartTime 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtStartTime;
+
+ ///
+ /// txtEndTime 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtEndTime;
+
+ ///
+ /// btnQuery 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnQuery;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// lblNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNumber;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneState.aspx b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneState.aspx
new file mode 100644
index 0000000..41eae5c
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneState.aspx
@@ -0,0 +1,517 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TowerCraneState.aspx.cs" Inherits="FineUIPro.Web.HSSE.TowerCrane.TowerCraneState" %>
+
+
+
+
+
+
+ 塔吊状态
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneState.aspx.cs b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneState.aspx.cs
new file mode 100644
index 0000000..0b61bde
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneState.aspx.cs
@@ -0,0 +1,246 @@
+using BLL;
+using System;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using Newtonsoft.Json.Linq;
+using System.IO;
+using NPOI.XSSF.UserModel;
+using NPOI.SS.UserModel;
+using System.Runtime.Serialization;
+using FineUIPro.Web.ProjectData;
+using System.Configuration;
+using System.Web.Services;
+using Newtonsoft.Json;
+using FineUIPro.Web.DataShow;
+
+namespace FineUIPro.Web.HSSE.TowerCrane
+{
+ public partial class TowerCraneState : PageBase
+ {
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.InitTreeMenu();//加载树
+ //显示列
+
+ }
+ }
+ #endregion
+
+ #region 加载树装置-单位-工作区
+ ///
+ /// 加载树
+ ///
+ private void InitTreeMenu()
+ {
+ this.tvControlItem.Nodes.Clear();
+
+ ////塔吊
+ var towerCranes = (from x in Funs.DB.HSSE_TowerCrane where x.ProjectId == this.CurrUser.LoginProjectId
+ && ( string.IsNullOrEmpty(txtIsono.Text) || x.TowerCraneName.Contains(txtIsono.Text))
+ orderby x.CreateDate select x ).ToList();
+
+ foreach(var item in towerCranes )
+ {
+ TreeNode rootNode = new TreeNode();
+ rootNode.Text = item.TowerCraneName;
+ rootNode.NodeID = item.TowerCraneId;
+ rootNode.EnableClickEvent= true;
+ this.tvControlItem.Nodes.Add(rootNode);
+ }
+
+ }
+ #endregion
+
+ #region 绑定树节点
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void Tree_TextChanged(object sender, EventArgs e)
+ {
+ this.InitTreeMenu();
+
+ }
+
+ #region 树展开事件
+ ///
+ /// 树展开事件
+ ///
+ ///
+ ///
+ protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
+ {
+ string TowerCraneId = this.tvControlItem.SelectedNodeID;
+ this.hfTowerCraneId.Text = TowerCraneId;
+ var towerCrane = Funs.DB.HSSE_TowerCrane.FirstOrDefault(x => x.TowerCraneId == TowerCraneId);
+ PageContext.RegisterStartupScript("runGetData() ; initVideo('"+ towerCrane.VideoAccount + "', '"+ Funs.EncryptionPassword(towerCrane.VideoPassword )+ "');");
+
+ }
+
+
+ [WebMethod]
+ public static string GetData(string TowerCraneId)
+ {
+ Dictionary res = new Dictionary();
+ var towerCrane = Funs.DB.HSSE_TowerCrane.FirstOrDefault(x => x.TowerCraneId == TowerCraneId);
+ if (towerCrane != null)
+ {
+ res.Add("TowerCraneName", towerCrane.TowerCraneName);
+ res.Add("TowerCraneCode", towerCrane.TowerCraneCode);
+ res.Add("TowerCap", towerCrane.TowerCap);
+ res.Add("VideoAccount", towerCrane.VideoAccount);
+ res.Add("VideoPassword", Funs.EncryptionPassword(towerCrane.VideoPassword));
+
+ if (towerCrane.MaxHoist.HasValue)
+ {
+ res.Add("MaxHoist", towerCrane.MaxHoist.Value.ToString("##.##"));
+ }
+ if (towerCrane.MaxMoment.HasValue)
+ {
+ res.Add("MaxMoment", towerCrane.MaxMoment.Value.ToString("##.##"));
+ }
+ if (towerCrane.FrontArmLength.HasValue)
+ {
+ res.Add("FrontArmLength", towerCrane.FrontArmLength.Value.ToString("##.##"));
+ }
+ if (towerCrane.BackArmLength.HasValue)
+ {
+ res.Add("BackArmLength", towerCrane.BackArmLength.Value.ToString("##.##"));
+
+ }
+ if (towerCrane.ArmHeigh.HasValue)
+ {
+ res.Add("ArmHeigh", towerCrane.ArmHeigh.Value.ToString("##.##"));
+
+ }
+
+ DateTime date = DateTime.Now.AddDays(-1);
+ var record = Funs.DB.HSSE_TowerCraneRecord.Where(x=>x.TowerCraneId==TowerCraneId && x.Date>=date).OrderByDescending(x=>x.Date).ToList();
+
+ if (record.Count > 0)
+ {
+ res.Add("AmountHoist", record[0].AmountHoist.Value.ToString("#0.##"));
+ res.Add("Camber", record[0].Camber.Value.ToString("#0.##"));
+ res.Add("Height", record[0].Height.Value.ToString("#0.##"));
+ res.Add("Hoist", record[0].Hoist.Value.ToString("#0.##"));
+ res.Add("Moment", record[0].Moment.Value.ToString("#0.##"));
+ res.Add("Range", record[0].Range.Value.ToString("#0.##"));
+ res.Add("RotationAngle", record[0].RotationAngle.Value.ToString("#0.##"));
+ res.Add("WindSpeed", record[0].WindSpeed.Value.ToString("#0.##"));
+ }
+ else
+ {
+ res.Add("AmountHoist", "0");
+ res.Add("Camber", "0");
+ res.Add("Height", "0");
+ res.Add("Hoist", "0");
+ res.Add("Moment", "0");
+ res.Add("Range", "0");
+ res.Add("RotationAngle", "0");
+ res.Add("WindSpeed", "0");
+ }
+ HashSet warnings = new HashSet();
+ warnings.Add("111");
+ warnings.Add("121");
+ warnings.Add("132");
+ warnings.Add("133");
+ warnings.Add("141");
+ warnings.Add("151");
+ HashSet alarms = new HashSet();
+ alarms.Add("112");
+ alarms.Add("122");
+ alarms.Add("131");
+ alarms.Add("134");
+ alarms.Add("142");
+ alarms.Add("152");
+ alarms.Add("201");
+ alarms.Add("202");
+ int DailyWarning = 0;
+ int DailyAlarm = 0;
+ List SSDZ = new List();
+ List SSDZX = new List();
+ List SSLJ = new List();
+ List SSLJX = new List();
+ List BJQS = new List();
+ List BJQSX = new List();
+
+
+
+ foreach (var r in record)
+ {
+ if (!string.IsNullOrEmpty(r.AlarmType))
+ {
+ string[] AlarmType = r.AlarmType.Replace("[","").Replace("]","").Split(',');
+ foreach(string a in AlarmType)
+ {
+ if (warnings.Contains(a))
+ {
+ DailyWarning++;
+
+ }
+ if (alarms.Contains(a))
+ {
+ DailyAlarm++;
+
+ }
+ }
+ BJQS.Add(AlarmType.Length);
+ BJQSX.Add(r.Date.Value.ToString("HH:mm"));
+
+
+ }
+ if (r.Hoist.HasValue)
+ {
+ SSDZ.Add(r.Hoist.Value);
+ SSDZX.Add(r.Date.Value.ToString("HH:mm"));
+ }
+ else
+ {
+ SSDZ.Add(0);
+
+ }
+ if (r.Moment.HasValue)
+ {
+ SSLJ.Add(r.Moment.Value);
+ SSLJX.Add(r.Date.Value.ToString("HH:mm"));
+ }
+ else
+ {
+ SSLJ.Add(0);
+
+ }
+ }
+
+ res.Add("SSDZ", SSDZ);
+ res.Add("SSDZX", SSDZX);
+ res.Add("SSLJ", SSLJ);
+ res.Add("SSLJX", SSLJX);
+ res.Add("BJQS", BJQS);
+ res.Add("BJQSX", BJQSX);
+ res.Add("DailyWarning", DailyWarning + "");
+ res.Add("DailyAlarm", DailyAlarm + "");
+
+
+ }
+
+ return JsonConvert.SerializeObject(res); ;
+ }
+ #endregion
+ #endregion
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneState.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneState.aspx.designer.cs
new file mode 100644
index 0000000..dedf040
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/HSSE/TowerCrane/TowerCraneState.aspx.designer.cs
@@ -0,0 +1,152 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.HSSE.TowerCrane
+{
+
+
+ public partial class TowerCraneState
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// panelLeftRegion 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel panelLeftRegion;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// txtIsono 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtIsono;
+
+ ///
+ /// hfTowerCraneId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hfTowerCraneId;
+
+ ///
+ /// tvControlItem 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Tree tvControlItem;
+
+ ///
+ /// panelCenterRegion 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel panelCenterRegion;
+
+ ///
+ /// ContentPanel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel1;
+
+ ///
+ /// divMaxMoment 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divMaxMoment;
+
+ ///
+ /// divFrontArmLength 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divFrontArmLength;
+
+ ///
+ /// divBackArmLength 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divBackArmLength;
+
+ ///
+ /// divTowerCap 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divTowerCap;
+
+ ///
+ /// divArmHeigh 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divArmHeigh;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/res/css/commontower.css b/SUBQHSE/FineUIPro.Web/res/css/commontower.css
new file mode 100644
index 0000000..7711651
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/res/css/commontower.css
@@ -0,0 +1,39 @@
+/* 删除: 之前的样式 */
+/* 添加重置CSS样式 */
+html,
+body,
+div,
+span,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+live-player {
+ font-family: '宋体';
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 14px;
+ line-height: 1;
+ vertical-align: baseline;
+ box-sizing: border-box;
+ user-select: none; /* 添加: 禁止文字选中 */
+}
+html,
+body {
+ height: 100%;
+ width: 100%;
+}
+
+ol,
+ul {
+ list-style: none;
+}
+
+html::-webkit-scrollbar {
+ display: none;
+}
+
diff --git a/SUBQHSE/FineUIPro.Web/res/css/indextower.css b/SUBQHSE/FineUIPro.Web/res/css/indextower.css
new file mode 100644
index 0000000..478d73c
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/res/css/indextower.css
@@ -0,0 +1,265 @@
+.y_wrap{
+ height: 100%;
+ width: 100%;
+ display: grid;
+ padding: 0.1875rem;
+ grid-template-columns: 1.2fr 2fr;
+ gap: 0.1875rem;
+ background-color: #f5f3f3;
+}
+.y_l_site{
+ height: 100%;
+ display: grid;
+ grid-template-rows: 1.3fr 2fr 1.2fr;
+ gap: 0.1875rem;
+}
+
+.y_r_site{
+ height: 100%;
+ display: grid;
+ grid-template-rows: 2fr 1fr 2fr;
+ gap: 0.1875rem;
+}
+.y_r_site_sub{
+ display: grid;
+ grid-template-columns: 1.2fr 2fr;
+ gap: 0.1875rem;
+}
+.y_r_site_sub1{
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 0.1875rem;
+}
+.y_r_site_sub1>div,
+.y_r_site_sub>div,
+.y_r_site>div:nth-child(2),
+.y_l_site>div{
+ background-color: #ffffff;
+}
+
+.y_box{
+ position: relative;
+}
+.y_box>.tit{
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ align-items: center;
+ padding: 0 0.25rem;
+ height: 0.5rem;
+}
+.y_box>.tit>p{
+ line-height: 1;
+ font-size: 0.2rem;
+ margin-left: 0.1875rem;
+}
+
+.y_c_icon{
+ height: 0.2rem;
+ width: 0.2rem;
+ border:0.0375rem solid #5b97f9;
+ border-radius: 50%;
+ position: relative;
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+}
+.y_c_icon>span{
+ height: 0.125rem;
+ width: 0.125rem;
+ border-radius: 50%;
+ border:0.0375rem solid #5b97f9;
+}
+
+.y_box_main{
+ width: 100%;
+ height: calc(100% - 0.5rem);
+}
+
+/* 设备报警 */
+#sbbj{
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ align-items: center;
+ justify-items: center;
+}
+
+#sbbj>div{
+ min-width: 1.8rem;
+ max-width: 90%;
+ height: 0.725rem;
+ padding-left: 1rem;
+ background-position: left center;
+ background-repeat: no-repeat;
+ background-size: 0.875rem 0.725rem;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: center;
+}
+#sbbj>div:nth-child(1){
+ background-image: url("../images/tower/twoerpolic.bb339ff.png");
+}
+ #sbbj > div:nth-child(2) {
+ background-image: url("../images/tower/twoerpolice2.261a289.png");
+ }
+#sbbj>div>div:nth-child(1){
+ font-size: 0.2rem;
+}
+#sbbj>div>div:nth-child(2){
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ width: 100%;
+}
+#sbbj>div>div:nth-child(2)>span{
+ font-size: 0.2rem;
+}
+
+/* 设备信息 */
+#sbxx{
+ padding: 0.1875rem;
+}
+#sbxx>.y_row{
+ padding: 0.125rem 0;
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ align-items: center;
+ border-bottom: 1px solid #ddd;
+}
+#sbxx>.y_row>.y_span{
+ flex: 1;
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ align-items: center;
+}
+#sbxx>.y_row>.y_span>div{
+ width: 50%;
+}
+#sbxx>.y_row>.y_span>.y_span_lab{
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ align-items: center;
+}
+#sbxx>.y_row>.y_span>.y_span_val{
+ text-align: right;
+ padding: 0 0.125rem;
+}
+#sbxx>.y_row>.y_span>.y_span_lab>span:nth-child(1){
+ display: inline-block;
+ height: 0.2rem;
+ width: 0.075rem;
+ border-radius: 0.0375rem;
+ background-color: #5b97f9;
+}
+#sbxx>.y_row>.y_span>.y_span_lab>span:nth-child(2){
+ font-size: 0.2rem;
+ margin-left: 0.125rem;
+}
+
+
+/* 吊重\风速... */
+#zt{
+ padding: 0.125rem;
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ grid-row: 1fr 1fr;
+ grid-row-gap: 0.1875rem;
+ grid-column-gap: 0.125rem;
+}
+#zt>div{
+ border: 1px solid #d3e3fe;
+ background-color: #eff5ff;
+ border-radius: 0.1rem;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ padding: 0 0.1875rem;
+ align-items: center;
+}
+ #zt > div > span:nth-child(1) {
+ height: 0.475rem;
+ width: 0.475rem;
+ background-image: url("../images/tower/work1.e93d23f.png");
+ background-position: center center;
+ background-repeat: no-repeat;
+ background-size: 0.475rem 0.475rem;
+ }
+ #zt > div:nth-child(2) > span:nth-child(1) {
+ background-image: url("../images/tower/2.png");
+ }
+ #zt > div:nth-child(3) > span:nth-child(1) {
+ background-image: url("../images/tower/3.png");
+ }
+ #zt > div:nth-child(4) > span:nth-child(1) {
+ background-image: url("../images/tower/4.png");
+ }
+ #zt > div:nth-child(5) > span:nth-child(1) {
+ background-image: url("../images/tower/5.png");
+ }
+ #zt > div:nth-child(6) > span:nth-child(1) {
+ background-image: url("../images/tower/6.png");
+ }
+#zt>div>span:nth-child(2){
+ width: 40%;
+ color: #649bf8;
+ font-size: .2rem;
+ font-weight: 700;
+ text-align: center;
+}
+#zt>div>span:nth-child(3){
+ color: #404040;
+ font-size: 0.2rem;
+}
+
+/* 塔吊状态 */
+#tdzt{
+ padding: 0.1875rem;
+}
+ #tdzt > div {
+ width: 100%;
+ height: calc(100% - 0.5rem);
+ background-image: url(../images/tower/tjimg.97b7389.png);
+ background-position: center;
+ background-repeat: no-repeat;
+ }
+
+#tdzt>p{
+ height: 0.5rem;
+ line-height: .5rem;
+ font-size: 0.225rem;
+ text-align: center;
+}
+/* 视频 */
+#sp{
+ position: relative; /* 设置相对定位 */
+ width: 100%; /* 宽度占满父容器 */
+ height: 100%;
+}
+ #sp live-player {
+ position: absolute; /* 绝对定位 */
+ top: 0;
+ left: 0;
+ width: 100%; /* 宽度100% */
+ height: 100%; /* 高度100% */
+ background-color: #000000;
+ object-fit: cover; /* 保持原始比例并覆盖整个区域 */
+ }
+
+
+
+
+.c_5b97f9{
+ color: #5b97f9;
+ font-weight: 700;
+ font-size: 0.25rem !important;
+}
+.c_ff5353{
+ color: #ff5353;
+ font-weight: 700;
+ font-size: 0.25rem !important;
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/res/liveplayer/liveplayer-element.min.js b/SUBQHSE/FineUIPro.Web/res/liveplayer/liveplayer-element.min.js
index c45336a..3db4054 100644
--- a/SUBQHSE/FineUIPro.Web/res/liveplayer/liveplayer-element.min.js
+++ b/SUBQHSE/FineUIPro.Web/res/liveplayer/liveplayer-element.min.js
@@ -1 +1 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,(function(e,t){function n(e,t){Ye(e).forEach((function(n){return t(e[n],n)}))}function r(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,o=n[r].value;"boolean"!=typeof e[i]&&-1===",autoplay,stretch,fluent,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+",")||(o=null!==o),t[i]=o}return t}function S(e,t){return e.getAttribute(t)}function w(e,t,n){e.setAttribute(t,n)}function k(e,t){e.removeAttribute(t)}function E(){t.body.focus(),t.onselectstart=function(){return!1}}function C(){t.onselectstart=function(){return!0}}function A(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(a(e,"height"))),n.width||(n.width=parseFloat(a(e,"width"))),n}}function j(n){var r;if(n.getBoundingClientRect&&n.parentNode&&(r=n.getBoundingClientRect()),!r)return{left:0,top:0};var i=t.documentElement,o=t.body,a=i.clientLeft||o.clientLeft||0,s=e.pageXOffset||o.scrollLeft,u=r.left+s-a,l=i.clientTop||o.clientTop||0,c=e.pageYOffset||o.scrollTop,d=r.top+c-l;return{left:Math.round(u),top:Math.round(d)}}function x(e,t){var n={},r=j(e),i=e.offsetWidth,o=e.offsetHeight,a=r.top,s=r.left,u=t.pageY,l=t.pageX;return t.changedTouches&&(l=t.changedTouches[0].pageX,u=t.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(a-u+o)/o)),n.x=Math.max(0,Math.min(1,(l-s)/i)),n}function O(e){return i(e)&&3===e.nodeType}function L(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function P(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),c(e)||O(e)?e:"string"==typeof e&&/\S/.test(e)?t.createTextNode(e):void 0})).filter((function(e){return e}))}function R(e,t){return P(t).forEach((function(t){return e.appendChild(t)})),e}function I(e,t){return R(L(e),t)}function M(e){return void 0===e.button&&void 0===e.buttons||0===e.button&&void 0===e.buttons||"mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons}function D(){return et++}function U(e,t){if(Qe.has(e)){var n=Qe.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Qe.delete(e)}}function B(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function N(n){function r(){return!0}function i(){return!1}if(!n||!n.isPropagationStopped){var o=n||e.event;for(var a in n={},o)"layerX"!==a&&"layerY"!==a&&"keyLocation"!==a&&"webkitMovementX"!==a&&"webkitMovementY"!==a&&("returnValue"===a&&o.preventDefault||(n[a]=o[a]));if(n.target||(n.target=n.srcElement||t),n.relatedTarget||(n.relatedTarget=n.fromElement===n.target?n.toElement:n.fromElement),n.preventDefault=function(){o.preventDefault&&o.preventDefault(),n.returnValue=!1,o.returnValue=!1,n.defaultPrevented=!0},n.defaultPrevented=!1,n.stopPropagation=function(){o.stopPropagation&&o.stopPropagation(),n.cancelBubble=!0,o.cancelBubble=!0,n.isPropagationStopped=r},n.isPropagationStopped=i,n.stopImmediatePropagation=function(){o.stopImmediatePropagation&&o.stopImmediatePropagation(),n.isImmediatePropagationStopped=r,n.stopPropagation()},n.isImmediatePropagationStopped=i,null!==n.clientX&&void 0!==n.clientX){var s=t.documentElement,u=t.body;n.pageX=n.clientX+(s&&s.scrollLeft||u&&u.scrollLeft||0)-(s&&s.clientLeft||u&&u.clientLeft||0),n.pageY=n.clientY+(s&&s.scrollTop||u&&u.scrollTop||0)-(s&&s.clientTop||u&&u.clientTop||0)}n.which=n.charCode||n.keyCode,null!==n.button&&void 0!==n.button&&(n.button=1&n.button?0:4&n.button?1:2&n.button?2:0)}return n}function F(e,t,n){if(Array.isArray(t))return B(F,e,t,n);Qe.has(e)||Qe.set(e,{});var r=Qe.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=D()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=N(t);var i=r.handlers[t.type];if(i)for(var o=i.slice(0),a=0,s=o.length;a-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function V(e,t,n){if(Qe.has(e)){var r=Qe.get(e);if(r.handlers){if(Array.isArray(t))return B(V,e,t,n);var i=function(e,t){r.handlers[t]=[],U(e,t)};if(void 0!==t){var o=r.handlers[t];if(o){if(!n)return void i(e,t);if(n.guid)for(var a=0;an)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function te(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:ee.bind(null,"start",0,e),end:ee.bind(null,"end",1,e)}}function ne(e,t){return Array.isArray(e)?te(e):void 0===e||void 0===t?te():te([[e,t]])}function re(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=ne(0,0));for(var o=0;ot&&(r=t),i+=r-n;return i/t}function ie(e){if(e instanceof ie)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:i(e)&&("number"==typeof e.code&&(this.code=e.code),r(this,e)),this.message||(this.message=ie.defaultMessages[this.code]||"")}function oe(e){return null!=e&&"function"==typeof e.then}function ae(e){oe(e)&&e.then(null,(function(e){}))}function se(e,t){return e(t={exports:{}},t.exports),t.exports}function ue(e,t,n){var r=e;return jn(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=$r(t,{uri:e}),r.callback=n,r}function le(e,t,n){return ce(t=ue(e,t,n))}function ce(e){function t(){var e=void 0;if(e=a.response?a.response:a.responseText||function(e){if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;return""!==e.responseType||t?null:e.responseXML}(a),v)try{e=JSON.parse(e)}catch(e){}return e}function n(e){return clearTimeout(l),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,o(e,m)}function r(){if(!u){var n;clearTimeout(l),n=e.useXDR&&void 0===a.status?200:1223===a.status?204:a.status;var r=m,i=null;return 0!==n?(r={body:t(),statusCode:n,method:d,headers:{},url:c,rawRequest:a},a.getAllResponseHeaders&&(r.headers=qr(a.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),o(i,r,r.body)}}if(void 0===e.callback)throw new Error("callback argument missing");var i=!1,o=function(t,n,r){i||(i=!0,e.callback(t,n,r))},a=e.xhr||null;a||(a=e.cors||e.useXDR?new le.XDomainRequest:new le.XMLHttpRequest);var s,u,l,c=a.url=e.uri||e.url,d=a.method=e.method||"GET",f=e.body||e.data,h=a.headers=e.headers||{},p=!!e.sync,v=!1,m={body:void 0,headers:{},statusCode:0,method:d,url:c,rawRequest:a};if("json"in e&&!1!==e.json&&(v=!0,h.accept||h.Accept||(h.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(h["content-type"]||h["Content-Type"]||(h["Content-Type"]="application/json"),f=JSON.stringify(!0===e.json?f:e.json))),a.onreadystatechange=function(){4===a.readyState&&setTimeout(r,0)},a.onload=r,a.onerror=n,a.onprogress=function(){},a.onabort=function(){u=!0},a.ontimeout=n,a.open(d,c,!p,e.username,e.password),p||(a.withCredentials=!!e.withCredentials),!p&&e.timeout>0&&(l=setTimeout((function(){if(!u){u=!0,a.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",n(e)}}),e.timeout)),a.setRequestHeader)for(s in h)h.hasOwnProperty(s)&&a.setRequestHeader(s,h[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(a.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(a),a.send(f||null),a}function de(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function fe(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function he(){this.values=oi(null)}function pe(e,t,n,r){var i=r?e.split(r):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);if(2===a.length)t(a[0],a[1])}}function ve(e,t,n){function r(){var t=fe(e);if(null===t)throw new de(de.Errors.BadTimeStamp,"Malformed timestamp: "+o);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function i(){e=e.replace(/^\s+/,"")}var o=e;if(i(),t.startTime=r(),i(),"--\x3e"!==e.substr(0,3))throw new de(de.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);e=e.substr(3),i(),t.endTime=r(),i(),function(e,t){var r=new he;pe(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var o=t.split(","),a=o[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","middle","end"]);break;case"position":o=t.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","middle","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","middle","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line","auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align","middle"),t.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}function me(e,t){function n(e){return ai[e]}for(var r,i=e.document.createElement("div"),o=i,a=[];null!==(r=function(){if(!t)return null;var e=t.match(/^([^<]*)(<[^>]*>?)?/);return function(e){return t=t.substr(e.length),e}(e[1]?e[1]:e[2])}());)if("<"!==r[0])o.appendChild(e.document.createTextNode(function(e){for(;l=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(l[0],n);return e}(r)));else{if("/"===r[1]){a.length&&a[a.length-1]===r.substr(2).replace(">","")&&(a.pop(),o=o.parentNode);continue}var s,u=fe(r.substr(1,r.length-2));if(u){s=e.document.createProcessingInstruction("timestamp",u),o.appendChild(s);continue}var l=r.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!l)continue;if(!(s=function(t,n){var r=si[t];if(!r)return null;var i=e.document.createElement(r);i.localName=r;var o=ui[t];return o&&n&&(i[o]=n.trim()),i}(l[1],l[3])))continue;if(!function(e,t){return!li[t.localName]||li[t.localName]===e.localName}(o,s))continue;l[2]&&(s.className=l[2].substr(1).replace("."," ")),a.push(l[1]),o.appendChild(s),o=s}return i}function ge(e){for(var t=0;t=n[0]&&e<=n[1])return!0}return!1}function ye(e){function t(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function n(e){if(!e||!e.length)return null;var r=e.pop(),i=r.textContent||r.innerText;if(i){var o=i.match(/^.*(\n|\r)/);return o?(e.length=0,o[0]):i}return"ruby"===r.tagName?n(e):r.childNodes?(t(e,r),n(e)):void 0}var r=[],i="";if(!e||!e.childNodes)return"ltr";for(t(r,e);i=n(r);)for(var o=0;o=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;id&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),a<0&&(c+=""===o.vertical?n.height:n.width,s=s.reverse()),i.move(f,c)}else{var h=i.lineHeight/n.height*100;switch(o.lineAlign){case"middle":a-=h/2;break;case"end":a-=h}switch(o.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new Te(t)}var p=function(e,t){for(var i,o=new Te(e),a=1,s=0;su&&(i=new Te(e),a=u),e=new Te(o)}return i||o}(i,s);t.move(p.toCSSCompatValues(n))}function we(){}function ke(e){return"string"==typeof e&&!!pi[e.toLowerCase()]&&e.toLowerCase()}function Ee(e,t,n){this.hasBeenReset=!1;var r="",i=!1,o=e,a=t,s=n,u=null,l="",c=!0,d="auto",f="start",h=50,p="middle",v=50,m="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(e){r=""+e}},pauseOnExit:{enumerable:!0,get:function(){return i},set:function(e){i=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return s},set:function(e){s=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(e){u=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(e){var t=function(e){return"string"==typeof e&&!!hi[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");l=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(e){c=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return d},set:function(e){if("number"!=typeof e&&e!==fi)throw new SyntaxError("An invalid number or illegal string was specified.");d=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=ke(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");f=t,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return h},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");h=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return p},set:function(e){var t=ke(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");p=t,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return m},set:function(e){var t=ke(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}}}),this.displayState=void 0}function Ce(e){return"number"==typeof e&&e>=0&&e<=100}function Ae(e,t,n){e.setTimeout((function(){return function e(t,n,i,o,a,s){void 0===t&&(t={}),void 0===n&&(n=[]),void 0===a&&(a=[]),void 0===s&&(s=!1);var u=n,l=u[0],c=u.slice(1);if("string"==typeof l)e(t,bi[l],i,o,a,s);else if(l){var d=function(e,t){var n=Ti[e.id()],r=null;if(null==n)return r=t(e),Ti[e.id()]=[[t,r]],r;for(var i=0;i=0;i--){var o=e[i];o[t]&&o[t](r,n)}}(e,n,s,a),s}function xe(e){return function(t,n){return t===Si?Si:n[e]?n[e](t):t}}function Oe(e){if(!e.type){var t=Ai(e.src);t&&(e.type=t)}return e}function Le(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Pe(e,t,n){try{e.style[t]=n}catch(e){return}}function Re(e,t){return void 0===t&&(t=e),Ni(e,t)}function Ie(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}function Me(e,t,n){var r=Me.getPlayer(e);if(r)return t&&qe.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var o="string"==typeof e?Xe("#"+ya(e)):e;if(!c(o))throw new TypeError("The element or ID supplied is not valid. (videojs)");o.ownerDocument.defaultView&&o.ownerDocument.body.contains(o)||qe.warn("The element supplied is not included in the DOM"),t=t||{},Me.hooks("beforesetup").forEach((function(e){var n=e(o,K(t));i(n)&&!Array.isArray(n)?t=K(t,n):qe.error("please return an object in beforesetup hooks")}));var a=Et.getComponent("Player");return r=new a(o,t,n),Me.hooks("setup").forEach((function(e){return e(r)})),r}function De(){return(De=Object.assign||function(e){for(var t=1;t0)for(var o=0,a=i.length;o=n&&(t.apply(void 0,arguments),r=i)}},ht=function(){};ht.prototype.allowedEvents_={},ht.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},F(this,e,t),this.addEventListener=n},ht.prototype.addEventListener=ht.prototype.on,ht.prototype.off=function(e,t){V(this,e,t)},ht.prototype.removeEventListener=ht.prototype.off,ht.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},z(this,e,t),this.addEventListener=n},ht.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},G(this,e,t),this.addEventListener=n},ht.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=N(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),H(this,e)},ht.prototype.dispatchEvent=ht.prototype.trigger,ht.prototype.queueTrigger=function(t){var n=this;st||(st=new Map);var r=t.type||t,i=st.get(this);i||(i=new Map,st.set(this,i));var o=i.get(r);i.delete(r),e.clearTimeout(o);var a=e.setTimeout((function(){0===i.size&&(i=null,st.delete(n)),n.trigger(t)}),0);i.set(r,a)};var pt=function(e){return e instanceof ht||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},vt=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},mt=function(e){if(!e.nodeName&&!pt(e))throw new Error("Invalid target; must be a DOM node or evented object.")},gt=function(e){if(!vt(e))throw new Error("Invalid event type; must be a non-empty string or array.")},yt=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},_t=function(e,t){var n,r,i,o=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return o?(n=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],i=t[1]):(n=t[0],r=t[1],i=t[2]),mt(n),gt(r),yt(i),{isTargetingSelf:o,target:n,type:r,listener:i=dt(e,i)}},bt=function(e,t,n,r){mt(e),e.nodeName?it[t](e,n,r):e[t](n,r)},Tt={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Qe.has(this.el_)&&Qe.delete(this.el_),this.el_=null),this.player_=null},n.player=function(){return this.player_},n.options=function(e){return e?(this.options_=K(this.options_,e),this.options_):this.options_},n.el=function(){return this.el_},n.createEl=function(e,t,n){return h(e,t,n)},n.localize=function(e,t,n){void 0===n&&(n=e);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],a=r&&r.split("-")[0],s=i&&i[a],u=n;return o&&o[e]?u=o[e]:s&&s[e]&&(u=s[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i}))),u},n.contentEl=function(){return this.contentEl_||this.el_},n.id=function(){return this.id_},n.name=function(){return this.name_},n.children=function(){return this.children_},n.getChildById=function(e){return this.childIndex_[e]},n.getChild=function(e){if(e)return this.childNameIndex_[e]},n.addChild=function(e,n,r){var i,o;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof e){o=kt(e);var a=n.componentClass||o;n.name=o;var s=t.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=e;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(o=o||i.name&&kt(i.name()))&&(this.childNameIndex_[o]=i,this.childNameIndex_[wt(o)]=i),"function"==typeof i.el&&i.el()){var u=this.contentEl().children[r]||null;this.contentEl().insertBefore(i.el(),u)}return i},n.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[kt(e.name())]=null,this.childNameIndex_[wt(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},n.initChildren=function(){var e=this,n=this.options_.children;if(n){var r,i=this.options_,o=t.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(t){var r,i;return"string"==typeof t?i=n[r=t]||e.options_[r]||{}:(r=t.name,i=t),{name:r,opts:i}})).filter((function(e){var n=t.getComponent(e.opts.componentClass||kt(e.name));return n&&!o.isTech(n)})).forEach((function(t){var n=t.name,r=t.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=e.options_.playerOptions;var o=e.addChild(n,r);o&&(e[n]=o)}}))}},n.buildCSSClass=function(){return""},n.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},n.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},n.$=function(e,t){return Xe(e,t||this.contentEl())},n.$$=function(e,t){return Je(e,t||this.contentEl())},n.hasClass=function(e){return m(this.el_,e)},n.addClass=function(e){g(this.el_,e)},n.removeClass=function(e){y(this.el_,e)},n.toggleClass=function(e,t){_(this.el_,e,t)},n.show=function(){this.removeClass("vjs-hidden")},n.hide=function(){this.addClass("vjs-hidden")},n.lockShowing=function(){this.addClass("vjs-lock-showing")},n.unlockShowing=function(){this.removeClass("vjs-lock-showing")},n.getAttribute=function(e){return S(this.el_,e)},n.setAttribute=function(e,t){w(this.el_,e,t)},n.removeAttribute=function(e){k(this.el_,e)},n.width=function(e,t){return this.dimension("width",e,t)},n.height=function(e,t){return this.dimension("height",e,t)},n.dimensions=function(e,t){this.width(e,!0),this.height(t)},n.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+kt(e)],10)},n.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=a(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+kt(e);t=this.el_[n]}return t},n.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},n.currentWidth=function(){return this.currentDimension("width")},n.currentHeight=function(){return this.currentDimension("height")},n.focus=function(){this.el_.focus()},n.blur=function(){this.el_.blur()},n.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},n.handleKeyPress=function(e){this.handleKeyDown(e)},n.emitTapEvents=function(){var t,n=0,r=null;this.on("touchstart",(function(i){1===i.touches.length&&(r={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},n=e.performance.now(),t=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)t=!1;else if(r){var n=e.touches[0].pageX-r.pageX,i=e.touches[0].pageY-r.pageY;Math.sqrt(n*n+i*i)>10&&(t=!1)}}));var i=function(){t=!1};this.on("touchleave",i),this.on("touchcancel",i),this.on("touchend",(function(i){r=null,!0===t&&e.performance.now()-n<200&&(i.preventDefault(),this.trigger("tap"))}))},n.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=dt(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},n.setTimeout=function(t,n){var r,i=this;return t=dt(this,t),this.clearTimersOnDispose_(),r=e.setTimeout((function(){i.setTimeoutIds_.has(r)&&i.setTimeoutIds_.delete(r),t()}),n),this.setTimeoutIds_.add(r),r},n.clearTimeout=function(t){return this.setTimeoutIds_.has(t)&&(this.setTimeoutIds_.delete(t),e.clearTimeout(t)),t},n.setInterval=function(t,n){t=dt(this,t),this.clearTimersOnDispose_();var r=e.setInterval(t,n);return this.setIntervalIds_.add(r),r},n.clearInterval=function(t){return this.setIntervalIds_.has(t)&&(this.setIntervalIds_.delete(t),e.clearInterval(t)),t},n.requestAnimationFrame=function(t){var n,r=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),t=dt(this,t),n=e.requestAnimationFrame((function(){r.rafIds_.has(n)&&r.rafIds_.delete(n),t()})),this.rafIds_.add(n),n):this.setTimeout(t,1e3/60)},n.cancelAnimationFrame=function(t){return this.supportsRaf_?(this.rafIds_.has(t)&&(this.rafIds_.delete(t),e.cancelAnimationFrame(t)),t):this.clearTimeout(t)},n.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],r=t[1];e[n].forEach(e[r],e)})),e.clearingTimersOnDispose_=!1})))},t.registerComponent=function(e,n){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var r=t.getComponent("Tech"),i=r&&r.isTech(n),o=t===n||t.prototype.isPrototypeOf(n.prototype);if(i||!o)throw new Error('Illegal component, "'+e+'"; '+(i?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");e=kt(e),t.components_||(t.components_={});var a=t.getComponent("Player");if("Player"===e&&a&&a.players){var s=a.players,u=Object.keys(s);if(s&&u.length>0&&u.map((function(e){return s[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,t.components_[wt(e)]=n,n},t.getComponent=function(e){if(e&&t.components_)return t.components_[e]},t}();Et.prototype.supportsRaf_="function"==typeof e.requestAnimationFrame&&"function"==typeof e.cancelAnimationFrame,Et.registerComponent("Component",Et);for(var Ct,At=e.navigator&&e.navigator.userAgent||"",jt=/AppleWebKit\/([\d.]+)/i.exec(At),xt=jt?parseFloat(jt.pop()):null,Ot=/iPad/i.test(At),Lt=/iPhone/i.test(At)&&!Ot,Pt=/iPod/i.test(At),Rt=Lt||Ot||Pt,It=function(){var e=At.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),Mt=/Android/i.test(At),Dt=function(){var e=At.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),Ut=Mt&&Dt<5&&xt<537,Bt=/Firefox/i.test(At),Nt=/Edge/i.test(At),Ft=!Nt&&(/Chrome/i.test(At)||/CriOS/i.test(At)),Vt=function(){var e=At.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Ht=function(){var e=/MSIE\s(\d+)\.\d/.exec(At),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(At)&&/rv:11.0/.test(At)&&(t=11),t}(),zt=/Safari/i.test(At)&&!Ft&&!Mt&&!Nt,Gt=(zt||Rt)&&!Ft,Wt=/Windows/i.test(At),qt=(l()&&("ontouchstart"in e||e.navigator.maxTouchPoints||e.DocumentTouch&&e.document instanceof e.DocumentTouch)),$t=Object.freeze({IS_IPAD:Ot,IS_IPHONE:Lt,IS_IPOD:Pt,IS_IOS:Rt,IOS_VERSION:It,IS_ANDROID:Mt,ANDROID_VERSION:Dt,IS_NATIVE_ANDROID:Ut,IS_FIREFOX:Bt,IS_EDGE:Nt,IS_CHROME:Ft,CHROME_VERSION:Vt,IE_VERSION:Ht,IS_SAFARI:zt,IS_ANY_SAFARI:Gt,IS_WINDOWS:Wt,TOUCH_ENABLED:qt}),Kt={prefixed:!0},Yt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],Xt=Yt[0],Jt=0;Jt=0;r--)if(t[r].enabled){dn(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}Y(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&dn(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,dn(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(un),hn=function(e,t){for(var n=0;n=0;r--)if(t[r].selected){hn(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(Q(n),"selectedIndex",{get:function(){for(var e=0;e',i=o.firstChild,o.setAttribute("style","display:none; position:absolute;"),t.body.appendChild(o));for(var s={},u=0;ux',e=n.firstChild.href}return e},En=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},Cn=function(t){var n=e.location,r=wn(t);return(":"===r.protocol?n.protocol:r.protocol)+r.host!==n.protocol+n.host},An=Object.freeze({parseUrl:wn,getAbsoluteURL:kn,getFileExtension:En,isCrossOrigin:Cn}),jn=function(e){var t=xn.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},xn=Object.prototype.toString,On=Array.prototype.slice,Ln=Object.prototype.toString,Pn=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||"[object Function]"!==Ln.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n,r=On.call(arguments,1),i=function(){if(this instanceof n){var i=t.apply(this,r.concat(On.call(arguments)));return Object(i)===i?i:this}return t.apply(e,r.concat(On.call(arguments)))},o=Math.max(0,t.length-r.length),a=[],s=0;s=0&&"[object Function]"===Rn.call(e.callee)),n};if(!Object.keys){var Mn=Object.prototype.hasOwnProperty,Dn=Object.prototype.toString,Un=In,Bn=Object.prototype.propertyIsEnumerable,Nn=!Bn.call({toString:null},"toString"),Fn=Bn.call((function(){}),"prototype"),Vn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Hn=function(e){var t=e.constructor;return t&&t.prototype===e},zn={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Gn=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!zn["$"+e]&&Mn.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{Hn(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();cn=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===Dn.call(e),r=Un(e),i=t&&"[object String]"===Dn.call(e),o=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=Fn&&n;if(i&&e.length>0&&!Mn.call(e,0))for(var s=0;s0)for(var u=0;u2?arguments[2]:{},r=Xn(t);Jn&&(r=Qn.call(r,Object.getOwnPropertySymbols(t)));for(var i=0;i1&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');var n="$ "+e;if(!(n in lr))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===lr[n]&&!t)throw new TypeError("intrinsic "+e+" exists, but is not available. Please file an issue!");return lr[n]},dr=Pn.call(Function.call,Object.prototype.hasOwnProperty),fr=cr("%TypeError%"),hr=cr("%SyntaxError%"),pr={"Property Descriptor":function(e,t){if("Object"!==e.Type(t))return!1;var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(dr(t,r)&&!n[r])return!1;var i=dr(t,"[[Value]]"),o=dr(t,"[[Get]]")||dr(t,"[[Set]]");if(i&&o)throw new fr("Property Descriptors may not be both accessor and data descriptors");return!0}},vr=function(e,t,n,r){var i=pr[t];if("function"!=typeof i)throw new hr("unknown record type: "+t);if(!i(e,r))throw new fr(n+" must be a "+t);console.log(i(e,r),r)},mr=Number.isNaN||function(e){return e!=e},gr=Number.isNaN||function(e){return e!=e},yr=Number.isFinite||function(e){return"number"==typeof e&&!gr(e)&&e!==1/0&&e!==-1/0},_r=function(e){return e>=0?1:-1},br=Function.prototype.toString,Tr=/^\s*class\b/,Sr=function(e){try{var t=br.call(e);return Tr.test(t)}catch(e){return!1}},wr=Object.prototype.toString,kr="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,Er=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(kr)return function(e){try{return!Sr(e)&&(br.call(e),!0)}catch(e){return!1}}(e);if(Sr(e))return!1;var t=wr.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},Cr=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},Ar=Object.prototype.toString,jr=function(e){var t;if((t=arguments.length>1?arguments[1]:"[object Date]"===Ar.call(e)?String:Number)===String||t===Number){var n,r,i=t===String?["toString","valueOf"]:["valueOf","toString"];for(r=0;r1?jr(e,arguments[1]):jr(e)},ToBoolean:function(e){return!!e},ToNumber:function(e){return+e},ToInteger:function(e){var t=this.ToNumber(e);return mr(t)?0:0!==t&&yr(t)?_r(t)*Math.floor(Math.abs(t)):t},ToInt32:function(e){return this.ToNumber(e)>>0},ToUint32:function(e){return this.ToNumber(e)>>>0},ToUint16:function(e){var t=this.ToNumber(e);return mr(t)||0===t||!yr(t)?0:function(e,t){var n=e%t;return Math.floor(n>=0?n:n+t)}(_r(t)*Math.floor(Math.abs(t)),65536)},ToString:function(e){return Lr(e)},ToObject:function(e){return this.CheckObjectCoercible(e),xr(e)},CheckObjectCoercible:function(e,t){if(null==e)throw new Or(t||"Cannot call method on "+e);return e},IsCallable:Er,SameValue:function(e,t){return e===t?0!==e||1/e==1/t:mr(e)&&mr(t)},Type:function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0},IsPropertyDescriptor:function(e){if("Object"!==this.Type(e))return!1;var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(dr(e,n)&&!t[n])return!1;var r=dr(e,"[[Value]]"),i=dr(e,"[[Get]]")||dr(e,"[[Set]]");if(r&&i)throw new Or("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return void 0!==e&&(vr(this,"Property Descriptor","Desc",e),!(!dr(e,"[[Get]]")&&!dr(e,"[[Set]]")))},IsDataDescriptor:function(e){return void 0!==e&&(vr(this,"Property Descriptor","Desc",e),!(!dr(e,"[[Value]]")&&!dr(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return void 0!==e&&(vr(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if(void 0===e)return e;if(vr(this,"Property Descriptor","Desc",e),this.IsDataDescriptor(e))return{value:e["[[Value]]"],writable:!!e["[[Writable]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};if(this.IsAccessorDescriptor(e))return{get:e["[[Get]]"],set:e["[[Set]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};throw new Or("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new Or("ToPropertyDescriptor requires an object");var t={};if(dr(e,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),dr(e,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(e.configurable)),dr(e,"value")&&(t["[[Value]]"]=e.value),dr(e,"writable")&&(t["[[Writable]]"]=this.ToBoolean(e.writable)),dr(e,"get")){var n=e.get;if(void 0!==n&&!this.IsCallable(n))throw new TypeError("getter must be a function");t["[[Get]]"]=n}if(dr(e,"set")){var r=e.set;if(void 0!==r&&!this.IsCallable(r))throw new Or("setter must be a function");t["[[Set]]"]=r}if((dr(t,"[[Get]]")||dr(t,"[[Set]]"))&&(dr(t,"[[Value]]")||dr(t,"[[Writable]]")))throw new Or("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},Rr=Pn.call(Function.call,String.prototype.replace),Ir=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Mr=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,Dr=function(){var e=Pr.ToString(Pr.CheckObjectCoercible(this));return Rr(Rr(e,Ir,""),Mr,"")},Ur=function(){return String.prototype.trim&&""==="".trim()?String.prototype.trim:Dr},Br=Pn.call(Function.call,Ur());ir(Br,{getPolyfill:Ur,implementation:Dr,shim:function(){var e=Ur();return ir(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var Nr=Br,Fr=Object.prototype.toString,Vr=Object.prototype.hasOwnProperty,Hr=function(e,t,n){for(var r=0,i=e.length;r=3&&(r=n),"[object Array]"===Fr.call(e)?Hr(e,t,r):"string"==typeof e?zr(e,t,r):Gr(e,t,r)},qr=function(e){if(!e)return{};var t={};return Wr(Nr(e).split("\n"),(function(e){var n=e.indexOf(":"),r=Nr(e.slice(0,n)).toLowerCase(),i=Nr(e.slice(n+1));void 0===t[r]?t[r]=i:function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t[r])?t[r].push(i):t[r]=[t[r],i]})),t},$r=function(){for(var e={},t=0;t0&&(e.console&&e.console.groupCollapsed&&e.console.groupCollapsed("Text Track parsing errors for "+n.src),i.forEach((function(e){return qe.error(e)})),e.console&&e.console.groupEnd&&e.console.groupEnd()),r.flush()},Jr=function(t,n){var r={uri:t},i=Cn(t);i&&(r.cors=i),Yr(r,dt(this,(function(t,r,i){if(t)return qe.error(t,r);n.loaded_=!0,"function"!=typeof e.WebVTT?n.tech_&&n.tech_.any(["vttjsloaded","vttjserror"],(function(e){return"vttjserror"===e.type?void qe.error("vttjs failed to load, stopping trying to process "+n.src):Xr(i,n)})):Xr(i,n)})))},Zr=function(t){function n(e){var n;if(void 0===e&&(e={}),!e.tech)throw new Error("A tech was not provided.");var r=K(e,{kind:bn[e.kind]||"subtitles",language:e.language||e.srclang||""}),i=Tn[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=t.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[];var a=new gn(n.cues_),s=new gn(n.activeCues_),u=!1,l=dt(Q(n),(function(){this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1)}));return"disabled"!==i&&n.tech_.ready((function(){n.tech_.on("timeupdate",l)}),!0),Object.defineProperties(Q(n),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return i},set:function(e){var t=this;Tn[e]&&("disabled"!==(i=e)?this.tech_.ready((function(){t.tech_.on("timeupdate",l)}),!0):this.tech_.off("timeupdate",l),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n=e||i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e)&&t.push(i)}if(u=!1,t.length!==this.activeCues_.length)u=!0;else for(var o=0;o=0&&t<=100)&&(this.set(e,t),!0)}};var ai={"&":"&","<":"<",">":">","":"","":""," ":" "},si={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},ui={v:"title",lang:"lang"},li={rt:"ruby"},ci=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];_e.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},_e.prototype.formatStyle=function(e,t){return 0===e?0:e+t},be.prototype=oi(_e.prototype),be.prototype.constructor=be,Te.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},Te.prototype.overlaps=function(e){return this.lefte.left&&this.tope.top},Te.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Te.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},Te.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Te.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Te.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},we.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},we.convertCueToDOMTree=function(e,t){return e&&t?me(e,t):null},we.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t0)return void this.trigger("vttjsloaded");var r=t.createElement("script");r.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",r.onload=function(){n.trigger("vttjsloaded")},r.onerror=function(){n.trigger("vttjserror")},this.on("dispose",(function(){r.onload=null,r.onerror=null})),e.WebVTT=!0,this.el().parentNode.appendChild(r)}else this.ready(this.addWebVttScript_)},i.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return e.trigger("texttrackchange")},a=function(){o();for(var e=0;e',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&qe.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),i=r({role:"button"},i),this.tabIndex_=n.tabIndex;var o=e.prototype.createEl.call(this,t,n,i);return this.createControlTextEl(o),o},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=h("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,p(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},n.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver),this.off("mouseout",this.handleMouseOut),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},n.handleClick=function(e){},n.handleKeyDown=function(t){on.isEventKey(t,"Space")||on.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Et);Et.registerComponent("ClickableComponent",xi);var Oi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update(),t.on("posterchange",dt(Q(r),r.update)),r}Y(t,e);var n=t.prototype;return n.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},n.createEl=function(){return h("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.handleClick=function(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?ae(this.player_.play()):this.player_.pause())},t}(xi);Et.registerComponent("PosterImage",Oi);var Li={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},Pi=function(t){function n(n,r,i){var o;o=t.call(this,n,r,i)||this;var a=dt(Q(o),o.updateDisplay);return n.on("loadstart",dt(Q(o),o.toggleDisplay)),n.on("texttrackchange",a),n.on("loadedmetadata",dt(Q(o),o.preselectTrack)),n.ready(dt(Q(o),(function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",a),n.on("playerresize",a),e.addEventListener("orientationchange",a),n.on("dispose",(function(){return e.removeEventListener("orientationchange",a)}));for(var t=this.options_.playerOptions.tracks||[],r=0;r',className:this.buildCSSClass()},t),n=r({type:"button"},n);var i=Et.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(i),i},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return qe.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Et.prototype.addChild.call(this,e,t)},n.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(t){on.isEventKey(t,"Space")||on.isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(xi);Et.registerComponent("Button",Ii);var Mi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).mouseused_=!1,r.on("mousedown",r.handleMouseDown),r}Y(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)return ae(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var i=function(){return r.focus()};oe(t)?t.then(i,(function(){})):this.setTimeout(i,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(Ii);Mi.prototype.controlText_="Play Video",Et.registerComponent("BigPlayButton",Mi);var Di=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}Y(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){on.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Ii);Et.registerComponent("CloseButton",Di);var Ui=function(e){function t(t,n){var r;return void 0===n&&(n={}),r=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,r.on(t,"play",r.handlePlay),r.on(t,"pause",r.handlePause),n.replay&&r.on(t,"ended",r.handleEnded),r}Y(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(Ii);Ui.prototype.controlText_="Play",Et.registerComponent("PlayToggle",Ui);var Bi=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},Ni=Bi,Fi=function(e){function n(t,n){var r;return(r=e.call(this,t,n)||this).throttledUpdateContent=ft(dt(Q(r),r.updateContent),ct),r.on(t,"timeupdate",r.throttledUpdateContent),r}Y(n,e);var r=n.prototype;return r.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control",innerHTML:''+this.localize(this.labelText_)+" "});return this.contentEl_=h("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),this.updateTextNode_(),n.appendChild(this.contentEl_),n},r.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},r.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=t.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},r.formatTime_=function(e){return Re(e)},r.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},r.updateContent=function(e){},n}(Et);Fi.prototype.labelText_="Time",Fi.prototype.controlText_="Time",Et.registerComponent("TimeDisplay",Fi);var Vi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"ended",r.handleEnded),r}Y(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},n.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(Fi);Vi.prototype.labelText_="Current Time",Vi.prototype.controlText_="Current Time",Et.registerComponent("CurrentTimeDisplay",Vi);var Hi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",r.updateContent),r.on(t,"loadstart",r.updateContent),r.on(t,"loadedmetadata",r.throttledUpdateContent),r}Y(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(Fi);Hi.prototype.labelText_="Duration",Hi.prototype.controlText_="Duration",Et.registerComponent("DurationDisplay",Hi);var zi=function(e){function t(){return e.apply(this,arguments)||this}return Y(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"/
"},{"aria-hidden":!0})},t}(Et);Et.registerComponent("TimeDivider",zi);var Gi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",r.throttledUpdateContent),r.on(t,"ended",r.handleEnded),r}Y(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return t.insertBefore(h("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){"number"==typeof this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},n.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(Fi);Gi.prototype.labelText_="Remaining Time",Gi.prototype.controlText_="Remaining Time",Et.registerComponent("RemainingTimeDisplay",Gi);var Wi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r}Y(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=h("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(Et);Et.registerComponent("LiveDisplay",Wi);var qi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatus),r}Y(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=h("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.updateLiveEdgeStatus=function(e){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,e.prototype.dispose.call(this)},t}(Ii);qi.prototype.controlText_="Seek to live, currently playing live",Et.registerComponent("SeekToLive",qi);var $i=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}Y(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),n.className=n.className+" vjs-slider",n=r({tabIndex:0},n),i=r({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),e.prototype.createEl.call(this,t,n,i)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Ft||e.preventDefault(),E(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;C(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},n.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var n=(100*e).toFixed(2)+"%",r=t.el().style,i=this.vertical()?"height":"width";return r[i]!==n&&(r[i]=n),e}}},n.calculateDistance=function(e){var t=x(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){on.isEventKey(t,"Left")||on.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):on.isEventKey(t,"Right")||on.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(Et);Et.registerComponent("Slider",$i);var Ki=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",r.update),r}Y(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+': 0%'})},n.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this.player_.liveTracker,n=this.player_.buffered(),r=t&&t.isLive()?t.seekableEnd():this.player_.duration(),i=this.player_.bufferedEnd(),o=this.partEls_,a=this.$(".vjs-control-text-loaded-percentage"),s=function(e,t,n){var r=e/t||0;return r=100*(r>=1?1:r),n&&(r=r.toFixed(2)),r+"%"};this.el_.style.width=s(i,r),p(a,s(i,r,!0));for(var u=0;un.length;f--)this.el_.removeChild(o[f-1]);o.length=n.length},t}(Et);Et.registerComponent("LoadProgressBar",Ki);var Yi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=ft(dt(Q(r),r.update),ct),r}Y(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=A(this.el_),i=A(this.player_.el()),o=e.width*t;if(i&&r){var a=e.left-i.left+o,s=e.width-o+(i.right-e.right),u=r.width/2;ar.width&&(u=r.width),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){p(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var o,a=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var s=i.player_.liveTracker.liveWindow(),u=s-t*s;o=(u<1?"":"-")+Re(u,s)}else o=Re(n,a);i.update(e,t,o),r&&r()}))},t}(Et);Et.registerComponent("TimeTooltip",Yi);var Xi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=ft(dt(Q(r),r.update),ct),r}Y(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}(Et);Xi.prototype.options_={children:[]},Rt||Mt||Xi.prototype.options_.children.push("timeTooltip"),Et.registerComponent("PlayProgressBar",Xi);var Ji=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=ft(dt(Q(r),r.update),ct),r}Y(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,(function(){n.el_.style.left=e.width*t+"px"}))},t}(Et);Ji.prototype.options_={children:["timeTooltip"]},Et.registerComponent("MouseTimeDisplay",Ji);var Zi=function(e){function n(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}Y(n,e);var r=n.prototype;return r.setEventHandlers_=function(){this.update=ft(dt(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.on(this.player_,"durationchange",this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in t&&"visibilityState"in t&&this.on(t,"visibilitychange",this.toggleVisibility_)},r.toggleVisibility_=function(e){t.hidden?this.disableInterval_(e):(this.enableInterval_(),this.requestAnimationFrame(this.update))},r.enableInterval_=function(){var e=this;this.clearInterval(this.updateInterval),this.updateInterval=this.setInterval((function(){e.requestAnimationFrame(e.update)}),30)},r.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&"ended"!==e.type||this.clearInterval(this.updateInterval)},r.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},r.update_=function(e,t){var n=this.player_.liveTracker,r=this.player_.duration();n&&n.isLive()&&(r=this.player_.liveTracker.liveCurrentTime()),this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Re(e,r),Re(r,r)],"{1} of {2}")),this.bar&&this.bar.update(A(this.el_),t)},r.update=function(t){if(null!==this.el().offsetParent){var n=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n}},r.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},r.handleEnded=function(e){this.update_(this.player_.duration(),1)},r.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e>=1?1:e||0},r.handleMouseDown=function(t){M(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},r.handleMouseMove=function(e){if(M(e)){var t,n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){var i=r.seekableStart(),o=r.liveCurrentTime();if((t=i+n*r.liveWindow())>=o&&(t=o),t<=i&&(t=i+.1),t===1/0)return}else(t=n*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},r.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},r.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},r.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&ae(this.player_.play())},r.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},r.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},r.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},r.handleKeyDown=function(t){if(on.isEventKey(t,"Space")||on.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(on.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(0);else if(on.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(on(t))){t.preventDefault(),t.stopPropagation();var n=10*(on.codes[on(t)]-on.codes[0])/100;this.player_.currentTime(this.player_.duration()*n)}else on.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):on.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n}($i);Zi.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Rt||Mt||Zi.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Et.registerComponent("SeekBar",Zi);var Qi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=ft(dt(Q(r),r.handleMouseMove),ct),r.throttledHandleMouseSeek=ft(dt(Q(r),r.handleMouseSeek),ct),r.enable(),r}Y(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("mouseTimeDisplay"),r=t.el(),i=A(r),o=x(r,e).x;o>1?o=1:o<0&&(o=0),n&&n.update(i,o)}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},n.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(Et);Qi.prototype.options_={children:["seekBar"]},Et.registerComponent("ProgressControl",Qi);var eo=function(e){function n(n,r){var i;return(i=e.call(this,n,r)||this).on(n,["enterpictureinpicture","leavepictureinpicture"],i.handlePictureInPictureChange),t.pictureInPictureEnabled||i.disable(),i}Y(n,e);var r=n.prototype;return r.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},r.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture")},r.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},n}(Ii);eo.prototype.controlText_="Picture-in-Picture",Et.registerComponent("PictureInPictureToggle",eo);var to=function(e){function n(n,r){var i;return(i=e.call(this,n,r)||this).on(n,"fullscreenchange",i.handleFullscreenChange),!1===t[n.fsApi_.fullscreenEnabled]&&i.disable(),i}Y(n,e);var r=n.prototype;return r.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},r.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},r.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},n}(Ii);to.prototype.controlText_="Fullscreen",Et.registerComponent("FullscreenToggle",to);var no=function(e){function t(){return e.apply(this,arguments)||this}return Y(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},t}(Et);Et.registerComponent("VolumeLevel",no);var ro=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",r.updateLastVolume_),r.on(t,"volumechange",r.updateARIAAttributes),t.ready((function(){return r.updateARIAAttributes()})),r}Y(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(t){M(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){M(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}($i);ro.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},ro.prototype.playerEvent="volumechange",Et.registerComponent("VolumeBar",ro);var io=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||o(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(Q(r=e.call(this,t,n)||this),t),r.throttledHandleMouseMove=ft(dt(Q(r),r.handleMouseMove),ct),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}Y(t,e);var n=t.prototype;return n.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},n.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(Et);io.prototype.options_={children:["volumeBar"]},Et.registerComponent("VolumeControl",io);var oo=function(e){function t(t,n){var r;return function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(Q(r=e.call(this,t,n)||this),t),r.on(t,["loadstart","volumechange"],r.update),r}Y(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;Rt&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)y(this.el_,"vjs-vol-"+n);g(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(Ii);oo.prototype.controlText_="Mute",Et.registerComponent("MuteToggle",oo);var ao=function(e){function n(t,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||o(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).on(t,["loadstart"],r.volumePanelState_),r.on(r.muteToggle,"keyup",r.handleKeyPress),r.on(r.volumeControl,"keyup",r.handleVolumeControlKeyUp),r.on("keydown",r.handleKeyPress),r.on("mouseover",r.handleMouseOver),r.on("mouseout",r.handleMouseOut),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}Y(n,e);var r=n.prototype;return r.sliderActive_=function(){this.addClass("vjs-slider-active")},r.sliderInactive_=function(){this.removeClass("vjs-slider-active")},r.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},r.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},r.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},r.handleVolumeControlKeyUp=function(e){on.isEventKey(e,"Esc")&&this.muteToggle.focus()},r.handleMouseOver=function(e){this.addClass("vjs-hover"),F(t,"keyup",dt(this,this.handleKeyPress))},r.handleMouseOut=function(e){this.removeClass("vjs-hover"),V(t,"keyup",dt(this,this.handleKeyPress))},r.handleKeyPress=function(e){on.isEventKey(e,"Esc")&&this.handleMouseOut()},n}(Et);ao.prototype.options_={children:["muteToggle","volumeControl"]},Et.registerComponent("VolumePanel",ao);var so=function(e){function n(t,n){var r;return r=e.call(this,t,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",r.handleKeyDown),r.boundHandleBlur_=dt(Q(r),r.handleBlur),r.boundHandleTapClick_=dt(Q(r),r.handleTapClick),r}Y(n,e);var r=n.prototype;return r.addEventListenerForItem=function(e){e instanceof Et&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},r.removeEventListenerForItem=function(e){e instanceof Et&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},r.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},r.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},r.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=h(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),F(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},r.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},r.handleBlur=function(e){var n=e.relatedTarget||t.activeElement;if(!this.children().some((function(e){return e.el()===n}))){var r=this.menuButton_;r&&r.buttonPressed_&&n!==r.el().firstChild&&r.unpressButton()}},r.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},r.handleKeyDown=function(e){on.isEventKey(e,"Left")||on.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(on.isEventKey(e,"Right")||on.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},r.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},r.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},r.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},n}(Et);Et.registerComponent("Menu",so);var uo=function(e){function n(n,r){var i;void 0===r&&(r={}),(i=e.call(this,n,r)||this).menuButton_=new Ii(n,r),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var o=Ii.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+o,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"keydown",i.handleKeyDown),i.on(i.menuButton_,"mouseenter",(function(){i.addClass("vjs-hover"),i.menu.show(),F(t,"keyup",dt(Q(i),i.handleMenuKeyUp))})),i.on("mouseleave",i.handleMouseLeave),i.on("keydown",i.handleSubmenuKeyDown),i}Y(n,e);var r=n.prototype;return r.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},r.createMenu=function(){var e=new so(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=h("li",{className:"vjs-menu-title",innerHTML:kt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var n=new Et(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r