ソースを参照

1.备份代码暂存

huangxiaodong 1 年間 前
コミット
5f5a2d68fa

+ 16 - 0
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -173,6 +173,10 @@
 		6B1FBD332B455DBD00926382 /* PlayerViewController+upLoadFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD312B455DBD00926382 /* PlayerViewController+upLoadFile.m */; };
 		6B1FBD362B455DD600926382 /* PlayerViewController+backupsFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD342B455DD600926382 /* PlayerViewController+backupsFile.h */; };
 		6B1FBD372B455DD600926382 /* PlayerViewController+backupsFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD352B455DD600926382 /* PlayerViewController+backupsFile.m */; };
+		6B1FBD3A2B467A8000926382 /* backupsFilerecordTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD382B467A8000926382 /* backupsFilerecordTableView.h */; };
+		6B1FBD3B2B467A8000926382 /* backupsFilerecordTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD392B467A8000926382 /* backupsFilerecordTableView.m */; };
+		6B1FBD3E2B46875300926382 /* backupsFileRecordCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD3C2B46875300926382 /* backupsFileRecordCell.h */; };
+		6B1FBD3F2B46875300926382 /* backupsFileRecordCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD3D2B46875300926382 /* backupsFileRecordCell.m */; };
 		6B2170882B1444CC00656670 /* allVersionView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B2170862B1444CC00656670 /* allVersionView.h */; };
 		6B2170892B1444CC00656670 /* allVersionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B2170872B1444CC00656670 /* allVersionView.m */; };
 		6B21708C2B14BDAA00656670 /* couldphoneSysInfoModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B21708A2B14BDAA00656670 /* couldphoneSysInfoModel.h */; };
@@ -578,6 +582,10 @@
 		6B1FBD312B455DBD00926382 /* PlayerViewController+upLoadFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "PlayerViewController+upLoadFile.m"; sourceTree = "<group>"; };
 		6B1FBD342B455DD600926382 /* PlayerViewController+backupsFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PlayerViewController+backupsFile.h"; sourceTree = "<group>"; };
 		6B1FBD352B455DD600926382 /* PlayerViewController+backupsFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "PlayerViewController+backupsFile.m"; sourceTree = "<group>"; };
+		6B1FBD382B467A8000926382 /* backupsFilerecordTableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = backupsFilerecordTableView.h; sourceTree = "<group>"; };
+		6B1FBD392B467A8000926382 /* backupsFilerecordTableView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = backupsFilerecordTableView.m; sourceTree = "<group>"; };
+		6B1FBD3C2B46875300926382 /* backupsFileRecordCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = backupsFileRecordCell.h; sourceTree = "<group>"; };
+		6B1FBD3D2B46875300926382 /* backupsFileRecordCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = backupsFileRecordCell.m; sourceTree = "<group>"; };
 		6B2170862B1444CC00656670 /* allVersionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = allVersionView.h; sourceTree = "<group>"; };
 		6B2170872B1444CC00656670 /* allVersionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = allVersionView.m; sourceTree = "<group>"; };
 		6B21708A2B14BDAA00656670 /* couldphoneSysInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = couldphoneSysInfoModel.h; sourceTree = "<group>"; };
@@ -1288,8 +1296,12 @@
 				6B72725A2B0E22D000C03F87 /* uploadFileRecordBgScorllView.m */,
 				6B72725D2B0E240F00C03F87 /* uploadFileRecordTableView.h */,
 				6B72725E2B0E240F00C03F87 /* uploadFileRecordTableView.m */,
+				6B1FBD382B467A8000926382 /* backupsFilerecordTableView.h */,
+				6B1FBD392B467A8000926382 /* backupsFilerecordTableView.m */,
 				6B8FF6BF2B05B24D00800981 /* uploadFileRecordCell.h */,
 				6B8FF6C02B05B24D00800981 /* uploadFileRecordCell.m */,
+				6B1FBD3C2B46875300926382 /* backupsFileRecordCell.h */,
+				6B1FBD3D2B46875300926382 /* backupsFileRecordCell.m */,
 				6B7272492B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h */,
 				6B72724A2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m */,
 				6B72724D2B0B58E500C03F87 /* uploadFileRecordEditBottomView.h */,
@@ -1828,6 +1840,7 @@
 				181E84F22A8F0A9B00292B96 /* HelpDownScrollView.h in Headers */,
 				6B2170882B1444CC00656670 /* allVersionView.h in Headers */,
 				6B2170912B15BAE700656670 /* privacyModeViewController.h in Headers */,
+				6B1FBD3A2B467A8000926382 /* backupsFilerecordTableView.h in Headers */,
 				6BF0F3D02AD391D8000AA133 /* connectDeviceManager.h in Headers */,
 				6BFF26952AF9D8CC00FCB4F7 /* AuthCodeInputView.h in Headers */,
 				6B5B607A2B3E71B6009A2AE2 /* filePathCreatTableViewCell.h in Headers */,
@@ -1881,6 +1894,7 @@
 				6B72725B2B0E22D000C03F87 /* uploadFileRecordBgScorllView.h in Headers */,
 				18A909982ABC4A3300E6D2BE /* ComontAlretViewController.h in Headers */,
 				6B7272532B0CABC600C03F87 /* cachesFileManager.h in Headers */,
+				6B1FBD3E2B46875300926382 /* backupsFileRecordCell.h in Headers */,
 				186820192AB94877005702A6 /* GuideLastView.h in Headers */,
 				6B0582632AFF4B7D00D37290 /* PhotoPreviewViewController.h in Headers */,
 				6B0581AD2AFCF57300D37290 /* AJPhotoGroupView.h in Headers */,
@@ -2195,6 +2209,7 @@
 				18F9CB062ABD7835003FF71A /* TipsQRCodeForChangeDeviceViewController.m in Sources */,
 				6B5B60662B3D5FD8009A2AE2 /* fileTransfeSetViewController.m in Sources */,
 				183AE6502A8A2CF000B11CB0 /* UIButton+AFNetworking.m in Sources */,
+				6B1FBD3B2B467A8000926382 /* backupsFilerecordTableView.m in Sources */,
 				A084D68E27E859D300054880 /* HWToolListCell.m in Sources */,
 				183AE6512A8A2CF000B11CB0 /* UIActivityIndicatorView+AFNetworking.m in Sources */,
 				A003F6A627D841C800715CBF /* BaseViewController.m in Sources */,
@@ -2295,6 +2310,7 @@
 				A08A950127E9A4E400C544BB /* FMDatabaseAdditions.m in Sources */,
 				A08A94FB27E9A4E400C544BB /* BGDB.m in Sources */,
 				A003F6B427D841EE00715CBF /* UITextfield+NLLimit.m in Sources */,
+				6B1FBD3F2B46875300926382 /* backupsFileRecordCell.m in Sources */,
 				6BFF26892AF8949F00FCB4F7 /* playerShowSecretkeyView.m in Sources */,
 				6B8FF6C22B05B24D00800981 /* uploadFileRecordCell.m in Sources */,
 				A003F6A727D841C800715CBF /* BaseNavigationController.m in Sources */,

+ 10 - 2
创维盒子/双子星云手机/Class/Set/uploadFile/model/photosBackupsTaskModel.h

@@ -11,6 +11,13 @@
 #import "uploadFileDataModel.h"
 NS_ASSUME_NONNULL_BEGIN
 
+typedef enum{
+    backupsStateUploading = 0,
+    backupsStateSuspend,
+    backupsStateFail,
+    backupsStateDone,//
+}backupsStateType;
+
 @interface photosBackupsTaskModel : JSONModel
 @property (nonatomic, assign) NSInteger count;       ///< Count of photos the album contain
 //@property (nonatomic, strong) PHFetchResult *result;
@@ -25,11 +32,12 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, assign) NSUInteger failCount;
 @property (nonatomic, assign) NSUInteger didBackupsCount;
 @property (nonatomic, assign) BOOL isSuspendType;
-@property (nonatomic, assign) BOOL isCompleteType;
+@property (nonatomic, assign) backupsStateType curBackupsState;
+@property (nonatomic, copy) NSString *backupsTipMsg;//备份失败消息等
 
 @property (nonatomic, retain) NSData *_Nullable imageData;//image
 
-@property (nonatomic, assign)  uploadStateType curUploadStateType;
+//@property (nonatomic, assign)  uploadStateType curUploadStateType;
 @property (nonatomic, assign)  uploadFileType curUploadFileType;
 @property (nonatomic, assign)  long didUploadBytes;//已经上传的字节数
 @property (nonatomic, assign)  long totalBytes;//总字节数

+ 24 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/backupsFileRecordCell.h

@@ -0,0 +1,24 @@
+//
+//  backupsFileRecordCell.h
+//  隐私保护
+//
+//  Created by xd h on 2024/1/4.
+//
+
+#import <UIKit/UIKit.h>
+#import "photosBackupsTaskModel.h"
+NS_ASSUME_NONNULL_BEGIN
+
+@interface backupsFileRecordCell : UITableViewCell
+@property(nonatomic,strong)photosBackupsTaskModel * curPhotosBackupsTaskModel;
+@property (nonatomic,assign) BOOL isEditType;
+@property (nonatomic,assign) BOOL isSelectType;
+
+@property (nonatomic,copy) void (^didLongPressClick)(void);
+//点击按钮
+@property (nonatomic,copy) void (^didClckSelectBut)(BOOL isSelect);
+//手势点击
+@property (nonatomic,copy) void (^didTapPressClick)(void);
+@end
+
+NS_ASSUME_NONNULL_END

+ 387 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/backupsFileRecordCell.m

@@ -0,0 +1,387 @@
+//
+//  backupsFileRecordCell.m
+//  隐私保护
+//
+//  Created by xd h on 2024/1/4.
+//
+
+#import "backupsFileRecordCell.h"
+
+#import "cachesFileManager.h"
+#import <SDWebImage/SDWebImage.h>
+
+@interface backupsFileRecordCell ()
+@property(nonatomic,strong) UIImageView *fileImageView;
+@property(nonatomic,strong) UIButton *upLoadStateButton;
+
+@property (nonatomic, strong) UIButton *selectButton;
+
+@property(nonatomic,strong) UIView *progressBgView;
+@property(nonatomic,strong) UIView *progressSelectView;
+@property(nonatomic,strong) CAGradientLayer *glayer;
+
+@property(nonatomic,strong) UILabel *fileNamelabel;
+@property(nonatomic,strong) UILabel *fileProgresslabel;
+@property(nonatomic,strong) UILabel *fileSpeedlabel;
+
+@property(nonatomic,strong) UILabel *rightTiplabel;
+
+@end
+
+@implementation backupsFileRecordCell
+
+- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
+{
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    
+    if (self)
+    {
+        [self drawView];
+    }
+    
+    return self;
+}
+
+- (void)drawView
+{
+    _fileImageView = [[UIImageView alloc] init];
+    //_fileImageView.backgroundColor = [UIColor greenColor];
+    [self.contentView addSubview:_fileImageView];
+    
+    [_fileImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(15);
+        make.width.mas_equalTo(34);
+        make.height.mas_equalTo(34);
+        make.bottom.mas_equalTo(-18);
+    }];
+    
+    _upLoadStateButton = [[UIButton alloc] init];
+    //_upLoadStateButton.backgroundColor = [UIColor redColor];
+    [self.contentView addSubview:_upLoadStateButton];
+    [_upLoadStateButton addTarget:self action:@selector(tapClick:) forControlEvents:UIControlEventTouchUpInside];
+    
+    [_upLoadStateButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-5);
+        make.width.mas_equalTo(50);
+        make.height.mas_equalTo(50);
+        make.bottom.mas_equalTo(-18);
+    }];
+    
+    if (self.selectButton == nil) {
+        UIButton *but = [[UIButton alloc] init];
+        [but setImage:[UIImage imageNamed:@"upload_file_uncheck"] forState:UIControlStateNormal];
+        [but setImage:[UIImage imageNamed:@"upload_file_check"] forState:UIControlStateSelected];
+        [self.contentView addSubview:but];
+        [but addTarget:self action:@selector(didClickSelectButFun:) forControlEvents:UIControlEventTouchUpInside];
+        but.hidden = YES;
+        //but.backgroundColor = [UIColor greenColor];
+        //but.frame = CGRectMake([UIScreen mainScreen].bounds.size.width -10 - 25, 0, 25, 25);
+        [but mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.width.mas_equalTo(30);
+            make.height.mas_equalTo(30);
+            make.centerX.mas_equalTo(_upLoadStateButton.mas_centerX);
+            make.centerY.mas_equalTo(_upLoadStateButton.mas_centerY);
+        }];
+        
+        self.selectButton = but;
+    }
+    
+    _progressBgView = [[UIView alloc] init];
+    _progressBgView.backgroundColor = [UIColor hwColor:@"#F9F9F9" alpha:1.0];
+    _progressBgView.layer.cornerRadius = 1.5;
+    _progressBgView.layer.masksToBounds = YES;
+    [self.contentView addSubview:_progressBgView];
+    
+    [_progressBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(_fileImageView.mas_right).offset(10);
+        make.right.mas_equalTo(_upLoadStateButton.mas_left).offset(-10);
+        make.height.mas_equalTo(2);
+        make.centerY.mas_equalTo(0);
+    }];
+    
+    _progressSelectView = [[UIView alloc] init];
+    //_progressSelectView.backgroundColor = [UIColor hwColor:@"#F9F9F9" alpha:1.0];
+    _progressSelectView.layer.cornerRadius = 1.5;
+    _progressSelectView.layer.masksToBounds = YES;
+    [_progressBgView addSubview:_progressSelectView];
+    
+//    [_progressSelectView mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.left.mas_equalTo(0);
+//        make.right.mas_equalTo(-100);
+//        make.height.mas_equalTo(3);
+//        make.centerY.mas_equalTo(0);
+//    }];
+    
+    // gradient
+    _glayer = [CAGradientLayer layer];
+    _glayer.startPoint = CGPointMake(0, 0.5);
+    _glayer.endPoint = CGPointMake(1, 0.5);
+    _glayer.colors = @[(__bridge id)[UIColor hwColor:@"#0BDDFD" alpha:1.0].CGColor, (__bridge id)[UIColor hwColor:@"#048CFB" alpha:1.0].CGColor];
+    _glayer.locations = @[@(0), @(1.0f)];
+    [_progressSelectView.layer addSublayer:_glayer];
+    
+    CGRect frame = CGRectMake(0, 0, SCREEN_W, 2);
+    //_progressSelectView.frame = frame;
+    _glayer.frame = frame;
+    
+    _fileNamelabel = [[UILabel alloc] init];
+    _fileNamelabel.font = [UIFont boldSystemFontOfSize:16.0];
+    //_fileNamelabel.backgroundColor = [UIColor greenColor];
+    [self.contentView addSubview:_fileNamelabel];
+    
+    [_fileNamelabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(_fileImageView.mas_right).offset(10);
+        make.right.mas_equalTo(_upLoadStateButton.mas_left).offset(-10);
+        make.height.mas_equalTo(19);
+        make.bottom.mas_equalTo(_progressBgView.mas_top).offset(-3);
+    }];
+    
+    _fileProgresslabel = [[UILabel alloc] init];
+    _fileProgresslabel.font = [UIFont systemFontOfSize:12.0];
+    _fileProgresslabel.textColor = [UIColor hwColor:@"#959799" alpha:1.0];
+    //_fileProgresslabel.backgroundColor = [UIColor greenColor];
+    [self.contentView addSubview:_fileProgresslabel];
+    
+    [_fileProgresslabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(_fileImageView.mas_right).offset(10);
+        make.right.mas_equalTo(_progressBgView.mas_centerX).offset(100);
+        make.height.mas_equalTo(15);
+        make.top.mas_equalTo(_progressBgView.mas_bottom).offset(3);
+    }];
+    
+    _fileSpeedlabel = [[UILabel alloc] init];
+    _fileSpeedlabel.font = [UIFont systemFontOfSize:12.0];
+    _fileSpeedlabel.textColor = [UIColor hwColor:@"#959799" alpha:1.0];
+    _fileSpeedlabel.textAlignment = NSTextAlignmentRight;
+    //_fileSpeedlabel.backgroundColor = [UIColor blackColor];
+    [self.contentView addSubview:_fileSpeedlabel];
+    
+    [_fileSpeedlabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(_upLoadStateButton.mas_left).offset(-10);
+        make.left.mas_equalTo(_progressBgView.mas_centerX);
+        make.height.mas_equalTo(15);
+        make.top.mas_equalTo(_progressBgView.mas_bottom).offset(3);
+    }];
+    
+    
+    _rightTiplabel = [[UILabel alloc] init];
+    _rightTiplabel.font = [UIFont systemFontOfSize:12.0];
+    _rightTiplabel.textColor = [UIColor hwColor:@"#959799" alpha:1.0];
+    _rightTiplabel.textAlignment = NSTextAlignmentRight;
+    _rightTiplabel.numberOfLines = 0;
+    //_fileSpeedlabel.backgroundColor = [UIColor blackColor];
+    [self.contentView addSubview:_rightTiplabel];
+    _rightTiplabel.hidden = YES;
+    
+    [_rightTiplabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-15.0);
+        make.left.mas_equalTo(_progressBgView.mas_centerX);
+        make.height.mas_equalTo(30);
+        make.centerY.mas_equalTo(0);
+    }];
+    
+    //长按手势
+    UILongPressGestureRecognizer *longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressClick:)];
+    //用几个手指触屏,默认1
+    longPressGesture.numberOfTouchesRequired = 1;
+    //设置最短长按时间,单位为秒(默认0.5)
+    longPressGesture.minimumPressDuration = 1;
+    //设置手势识别期间所允许的手势可移动范围
+    longPressGesture.allowableMovement = 10;
+    [self.contentView addGestureRecognizer:longPressGesture];
+
+}
+
+- (void)setIsEditType:(BOOL)isEditType
+{
+    _isEditType = isEditType;
+    
+    if(isEditType){
+        self.selectButton.hidden = NO;
+        
+//        if(_curUploadFileDataModel.curUploadStateType == uploadStateWait
+//           ||_curUploadFileDataModel.curUploadStateType == uploadStateUploading
+//           ||_curUploadFileDataModel.curUploadStateType == uploadStateSuspend){
+            _upLoadStateButton.hidden = YES;
+        //}
+    }
+    else{
+        self.selectButton.hidden = YES;
+        
+//        if(_curUploadFileDataModel.curUploadStateType == uploadStateWait
+//           ||_curUploadFileDataModel.curUploadStateType == uploadStateUploading
+//           ||_curUploadFileDataModel.curUploadStateType == uploadStateSuspend){
+            _upLoadStateButton.hidden = NO;
+        //}
+    }
+}
+
+- (void)setIsSelectType:(BOOL)isSelectType
+{
+    _isSelectType = isSelectType;
+    
+    if(isSelectType){
+        self.selectButton.selected = YES;
+    }
+    else{
+        self.selectButton.selected = NO;
+    }
+}
+
+- (void)setCurPhotosBackupsTaskModel:(photosBackupsTaskModel *)curPhotosBackupsTaskModel
+{
+    _curPhotosBackupsTaskModel.imageData = nil;
+    _curPhotosBackupsTaskModel = nil;
+    
+    _curPhotosBackupsTaskModel = curPhotosBackupsTaskModel;
+    
+    _curPhotosBackupsTaskModel.curBackupsState = backupsStateUploading;
+    
+    _fileImageView.image = [UIImage imageNamed:@"uploadFile_image"];
+    
+    _fileSpeedlabel.hidden = YES;
+    
+    if(_curPhotosBackupsTaskModel.curBackupsState == backupsStateUploading){
+       
+        [_upLoadStateButton setImage:[UIImage imageNamed:@"uploadFile_suspend"] forState:UIControlStateNormal];
+        _fileSpeedlabel.hidden = NO;
+        
+        //
+        _fileSpeedlabel.text = @"";
+        
+        if(_curPhotosBackupsTaskModel.preTimeInterval <= 0){
+            _fileSpeedlabel.text = @"--";
+        }
+        else{
+            NSTimeInterval  timers = _curPhotosBackupsTaskModel.curTimeInterval - _curPhotosBackupsTaskModel.preTimeInterval;
+            
+            if(timers > 0){
+                long speed= 1*1024*1024 / timers;
+                NSString * speedStr = nil;
+                NSInteger speed_k = speed / (1024);
+                if(speed_k < 1024){
+                    speedStr = [[NSString alloc] initWithFormat:@"%ldKB/s",speed_k];
+                }
+                else {
+                    speedStr = [[NSString alloc] initWithFormat:@"%.1fMB/s",speed_k/1024.0];
+                }
+                
+                _fileSpeedlabel.text = speedStr;
+            }
+        }
+        
+        _curPhotosBackupsTaskModel.preTimeInterval = _curPhotosBackupsTaskModel.curTimeInterval;
+    }
+    else if(_curPhotosBackupsTaskModel.curBackupsState == backupsStateSuspend){
+        [_upLoadStateButton setImage:[UIImage imageNamed:@"uploadFile_start"] forState:UIControlStateNormal];
+    }
+    else if(_curPhotosBackupsTaskModel.curBackupsState == backupsStateFail){
+        _upLoadStateButton.hidden = YES;
+        _progressBgView.hidden = YES;
+    }
+    else{
+        _upLoadStateButton.hidden = YES;
+        _progressBgView.hidden = YES;
+    }
+    
+    _fileNamelabel.text = NSLocalizedString(@"set_Privacy_title_image",nil);
+    
+    
+    if(_curPhotosBackupsTaskModel.curBackupsState == backupsStateDone){
+        
+        NSString * curTimerStr = _curPhotosBackupsTaskModel.bg_updateTime;
+        if(!curTimerStr){
+            curTimerStr = _curPhotosBackupsTaskModel.bg_createTime;
+        }
+        
+        if(curTimerStr){
+            curTimerStr = [curTimerStr substringToIndex:(curTimerStr.length -4)];
+        }
+        
+        _fileProgresslabel.text = curTimerStr;
+        
+        _rightTiplabel.hidden = NO;
+        
+        _rightTiplabel.text = [[NSString alloc] initWithFormat:@"%@:%ld",NSLocalizedString(@"File_Transfer_List_head_title_done",nil),_curPhotosBackupsTaskModel.didBackupsCount];
+    }
+    else if(_curPhotosBackupsTaskModel.curBackupsState == backupsStateFail){
+        
+        _fileProgresslabel.text = [[NSString alloc] initWithFormat:@"%ld/%ld",_curPhotosBackupsTaskModel.didBackupsCount,_curPhotosBackupsTaskModel.count];
+        
+        //_curPhotosBackupsTaskModel.backupsTipMsg = @"备份失败,备份路径不存在";
+        _rightTiplabel.hidden = NO;
+        _rightTiplabel.textColor = [UIColor hwColor:@"#DD4E4E" alpha:1.0];
+        _rightTiplabel.text = _curPhotosBackupsTaskModel.backupsTipMsg;
+    }
+    else{
+        _fileProgresslabel.text = [[NSString alloc] initWithFormat:@"%ld/%ld",_curPhotosBackupsTaskModel.didBackupsCount,_curPhotosBackupsTaskModel.count - _curPhotosBackupsTaskModel.failCount];
+        
+        //进度设置
+        CGRect frame = CGRectMake(0, 0, SCREEN_W - 15*2 - 34*2, 2);
+        
+        CGFloat curProgress = _curPhotosBackupsTaskModel.didBackupsCount/((_curPhotosBackupsTaskModel.count - _curPhotosBackupsTaskModel.failCount)*1.0);
+
+        if(curProgress > 1){
+            curProgress = 1;
+        }
+
+        frame.size.width =  frame.size.width * curProgress;
+        
+        if (isnan(frame.size.width))
+        {
+            return;
+        }
+        
+        _progressSelectView.frame = frame;
+        //_glayer.frame = frame;
+    }
+    
+}
+
+
+-(void)longPressClick:(UILongPressGestureRecognizer *)press{
+    //state属性是所有手势父类提供的方法,用于记录手势的状态
+    if(press.state == UIGestureRecognizerStateBegan){
+        //NSLog(@"长按手势开始响应!");
+        
+        if(_didLongPressClick){
+            _didLongPressClick();
+        }
+        
+    }else if (press.state == UIGestureRecognizerStateChanged){
+        //NSLog(@"长按手势状态发生改变!");
+    }else{
+        //NSLog(@"长按手势结束!");
+    }
+
+}
+
+- (void)didClickSelectButFun:(UIButton*)but
+{
+    but.selected = !but.selected;
+    if(_didClckSelectBut){
+        _didClckSelectBut(but.selected);
+    }
+}
+
+- (void)tapClick:(UIButton*)but{
+    if(_didTapPressClick){
+        _didTapPressClick();
+    }
+    
+    if(_curPhotosBackupsTaskModel.curBackupsState == backupsStateUploading){
+        [_upLoadStateButton setImage:[UIImage imageNamed:@"uploadFile_start"] forState:UIControlStateNormal];
+    }
+    else if(_curPhotosBackupsTaskModel.curBackupsState == backupsStateSuspend){
+       
+        [_upLoadStateButton setImage:[UIImage imageNamed:@"uploadFile_suspend"] forState:UIControlStateNormal];
+    }
+    
+    
+    but.userInteractionEnabled = NO;
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        but.userInteractionEnabled = YES;
+    });
+}
+
+@end

+ 29 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/backupsFilerecordTableView.h

@@ -0,0 +1,29 @@
+//
+//  backupsFilerecordTableView.h
+//  隐私保护
+//
+//  Created by xd h on 2024/1/4.
+//
+
+#import <UIKit/UIKit.h>
+#import "uploadFileRecordTableViewHeadView.h"
+#import "photosBackupsTaskModel.h"
+NS_ASSUME_NONNULL_BEGIN
+
+@interface backupsFilerecordTableView : UITableView
+@property (nonatomic, strong) NSArray *outSideDataArr;
+
+@property (nonatomic,assign) BOOL isEditType;
+@property (nonatomic,assign) BOOL isSelectAllType;
+@property (nonatomic,strong) NSMutableArray *selectModelArr;
+
+@property (nonatomic,copy) void (^didLongPressClick)(void);
+@property (nonatomic,copy) void (^didClickReUploadBlock)(photosBackupsTaskModel* model);
+
+-(void)reloadDataFun;
+#pragma mark 单个点击选中后删除
+- (void)deleteModelOneByOneFun;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 425 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/backupsFilerecordTableView.m

@@ -0,0 +1,425 @@
+//
+//  backupsFilerecordTableView.m
+//  隐私保护
+//
+//  Created by xd h on 2024/1/4.
+//
+
+#import "backupsFilerecordTableView.h"
+
+#import "UIScrollView+EmptyDataSet.h"
+#import "uploadFileManager.h"
+#import "backupsFileRecordCell.h"
+
+@interface backupsFilerecordTableView()<UITableViewDataSource,UITableViewDelegate,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
+{
+    NSMutableArray *backupsingArr;
+    NSMutableArray *backupsfailArr;
+    NSMutableArray *backupsDoneArr;
+}
+
+@property (nonatomic, strong) NSMutableArray *curDataArr;
+@end
+
+@implementation backupsFilerecordTableView
+
+- (id)initWithFrame:(CGRect)frame {
+    self = [super initWithFrame:frame];
+    if (self) {
+        [self initCommon];
+        _selectModelArr = [NSMutableArray new];
+        _curDataArr = [NSMutableArray new];
+        
+        backupsingArr = [NSMutableArray new];
+        backupsfailArr = [NSMutableArray new];
+        backupsDoneArr = [NSMutableArray new];
+    }
+    return self;
+}
+
+- (void)initCommon {
+    self.delegate = self;
+    self.dataSource = self;
+    self.showsVerticalScrollIndicator = NO;
+    self.showsHorizontalScrollIndicator = NO;
+    [self setSeparatorStyle:(UITableViewCellSeparatorStyleNone)];
+    [self setSeparatorColor:[UIColor clearColor]];
+    [self setBackgroundColor:[UIColor clearColor]];
+    [self setTableFooterView:[UIView new]];
+    [self setBounces:YES];
+    if (@available(iOS 15.0, *)) {
+        self.sectionHeaderTopPadding = 0;
+    }
+    
+    //空数据引入第三方开源处理
+    self.emptyDataSetSource = self;
+    self.emptyDataSetDelegate = self;
+}
+
+
+-(void)setOutSideDataArr:(NSArray *)outSideDataArr
+{
+    _outSideDataArr = outSideDataArr;
+    
+    [backupsingArr removeAllObjects];
+    [backupsfailArr removeAllObjects];
+    [backupsDoneArr removeAllObjects];
+    
+    if(outSideDataArr && outSideDataArr.count >0){
+        for (photosBackupsTaskModel*model in outSideDataArr) {
+            if(model.curBackupsState == backupsStateUploading
+               ||model.curBackupsState == backupsStateSuspend){
+                [backupsingArr addObject:model];
+            }
+            else if(model.curBackupsState == backupsStateFail){
+                [backupsfailArr addObject:model];
+            }
+            else{
+                [backupsDoneArr addObject:model];
+            }
+        }
+    }
+    
+    if(backupsingArr.count > 0){
+        [_curDataArr addObject:backupsingArr];
+    }
+       
+    if(backupsfailArr.count > 0){
+        [_curDataArr addObject:backupsfailArr];
+    }
+    
+    if(backupsDoneArr.count > 0){
+        [_curDataArr addObject:backupsDoneArr];
+    }
+    
+    [self reloadDataFun];
+}
+
+#pragma mark - 列表委托
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
+    return _curDataArr.count;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    
+    if(_curDataArr.count > section){
+        NSArray *curArr = _curDataArr[section];
+        return curArr.count;
+    }
+    
+    return 0;
+    
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    NSInteger row = indexPath.row;
+    NSInteger section = indexPath.section;
+    static NSString *identifier = @"backupsFileRecordCell";
+    
+    backupsFileRecordCell * cell =  [tableView dequeueReusableCellWithIdentifier:identifier];
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    if (!cell){
+        cell = [[backupsFileRecordCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
+        [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
+        [cell setBackgroundColor:[UIColor clearColor]];
+        [cell setAccessoryType:(UITableViewCellAccessoryNone)];
+    }
+    
+    if(section <_curDataArr.count){
+        NSMutableArray *curArr = _curDataArr[section];
+    
+        if(row < curArr.count){
+            uploadFileDataModel *model = curArr[row];
+            cell.curPhotosBackupsTaskModel = model;
+            cell.isEditType = _isEditType;
+
+            if(_isEditType){
+                if([_selectModelArr containsObject:model]){
+                    cell.isSelectType = YES;
+                }
+                else{
+                    cell.isSelectType = NO;
+                }
+            }
+            
+            KWeakSelf
+            cell.didLongPressClick = ^{
+                [weakSelf didLongPressClickFun];
+            };
+
+            cell.didClckSelectBut = ^(BOOL isSelect) {
+                [weakSelf selectModelOneByOne:model BySelect:isSelect];
+            };
+
+            cell.didTapPressClick = ^{
+                if(model.curUploadStateType == uploadStateUploading){
+                    [weakSelf handleUploadingStateTapFunBy:YES with:model];
+                }
+                else if(model.curUploadStateType == uploadStateSuspend){
+                    [weakSelf handleUploadingStateTapFunBy:NO with:model];
+                }
+                else if(model.curUploadStateType == uploadStateFail){
+                    [weakSelf handleUploadFailStateWith:model];
+                }
+            };
+        }
+    
+    }
+
+    return cell;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return 70;
+}
+
+- (UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
+{
+
+    UIView* headView = [UIView new];
+    headView.backgroundColor = [UIColor whiteColor];
+    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, SCREEN_W -15, 50)];
+    titleLabel.font = [UIFont systemFontOfSize:12.0];
+    titleLabel.textColor = [UIColor hwColor:@"#666666" alpha:1.0];
+    [headView addSubview:titleLabel];
+    
+    NSInteger curType = 0;// 0 上传中  1 失败 2 完成
+    if(section == 2){
+        curType = 2;
+    }
+    else if(section == 1){
+        if(backupsingArr.count == 0){
+            curType = 2;
+        }
+        else if(backupsfailArr.count == 0){
+            curType = 2;
+        }
+        else{
+            curType = 1;
+        }
+    }
+    else{
+        if(backupsingArr.count > 0){
+            curType = 0;
+        }
+        else if(backupsfailArr.count > 0){
+            curType = 1;
+        }
+        else{
+            curType = 2;
+        }
+    }
+    
+    NSString *text = @"";
+    if(curType == 0){
+        text = NSLocalizedString(@"File_Transfer_List_head_title_ing",nil);
+        text = [[NSString alloc] initWithFormat:@"%@(%ld)",text,backupsingArr.count];
+    }
+    else if(curType == 1){
+        text = NSLocalizedString(@"File_Transfer_List_head_title_fail",nil);
+        text = [[NSString alloc] initWithFormat:@"%@(%ld)",text,backupsfailArr.count];
+    }
+    else{
+        text = NSLocalizedString(@"File_Transfer_List_head_title_done",nil);
+        text = [[NSString alloc] initWithFormat:@"%@(%ld)",text,backupsDoneArr.count];
+    }
+
+    titleLabel.text = text;
+    return headView;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
+{
+    return 50;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    
+}
+
+#pragma mark 空数据
+- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
+    
+    NSString *imageName = @"uploadFile_noData";
+    
+    if(self.tag == 101){
+        imageName = @"uploadFile_noData";
+    }
+    else if(self.tag == 102){
+        imageName = @"uploadFile_noData";
+    }
+    
+    return [UIImage imageNamed:imageName];
+}
+
+- (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView {
+    NSString *text = NSLocalizedString(@"File_upload_Record_no_data",nil);
+    
+    if(self.tag == 101){
+        text = NSLocalizedString(@"File_download_Record_no_data",nil);
+    }
+    else if(self.tag == 102){
+        text = NSLocalizedString(@"File_backups_Record_no_data",nil);
+    }
+    
+    NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:16.0f],
+                                 NSForegroundColorAttributeName: HW999999Color};
+    
+    return [[NSAttributedString alloc] initWithString:text attributes:attributes];
+}
+
+//调整图片位置
+- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView {
+    return -150;
+}
+
+-(void)reloadDataFun{
+    mainBlock(^{
+        [self RefresHeadUIFun];
+        [self reloadData];
+    });
+}
+
+#pragma mark 熟悉头部数据
+-(void)RefresHeadUIFun
+{
+    uploadFileRecordTableViewHeadView *headView = (uploadFileRecordTableViewHeadView *)self.tableHeaderView;
+    
+    if(!headView || ![headView isKindOfClass:[uploadFileRecordTableViewHeadView class]]){
+        return;
+    }
+    
+    if(!_curDataArr ||_curDataArr.count ==0){
+        headView.hidden = YES;
+        return;
+    }
+   
+    headView.hidden = NO;
+
+    NSInteger tag = self.tag;
+    
+    if(tag == 100){
+        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_uploading",nil);
+        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_all_suspend",nil);
+        NSString *rightSelectStr =  NSLocalizedString(@"File_upload_Record_all_open",nil);
+        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_curDataArr.count];
+
+        headView.titleLabel.text = titleStr;
+        [headView.rightButton setTitle:rightStr forState:UIControlStateNormal];
+        [headView.rightButton setTitle:rightSelectStr forState:UIControlStateSelected];
+        
+    }
+    else if(tag == 101){
+        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_did_upload",nil);
+        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_clear_Record",nil);
+        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_curDataArr.count];
+
+        headView.titleLabel.text = titleStr;
+        [headView.rightButton setTitle:rightStr forState:UIControlStateNormal];
+    }
+    else if(tag == 102){
+        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_did_upload",nil);
+        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_clear_Record",nil);
+        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_curDataArr.count];
+
+        headView.titleLabel.text = titleStr;
+        [headView.rightButton setTitle:rightStr forState:UIControlStateNormal];
+    }
+}
+
+#pragma mark  点击全选
+- (void)setIsSelectAllType:(BOOL)isSelectAllType
+{
+    _selectModelArr = [NSMutableArray arrayWithArray:_curDataArr];
+    [self reloadDataFun];
+}
+
+-(void)setIsEditType:(BOOL)isEditType
+{
+    _isEditType = isEditType;
+    
+    if(_isEditType){
+        //_bgScrollV.scrollEnabled = NO;
+    }
+    else{
+        //_bgScrollV.scrollEnabled = YES;
+        [_selectModelArr removeAllObjects];
+        
+    }
+    
+    [self reloadDataFun];
+}
+
+#pragma mark cell长按时间
+- (void)didLongPressClickFun{
+        self.isEditType = YES;
+        if(self->_didLongPressClick){
+            self->_didLongPressClick();
+        }
+}
+
+#pragma mark 单个点击选中 取消
+- (void)selectModelOneByOne:(uploadFileDataModel*)model BySelect:(BOOL)isSelcet
+{
+    if(isSelcet){
+        [_selectModelArr addObject:model];
+    }
+    else{
+        [_selectModelArr removeObject:model];
+    }
+}
+
+#pragma mark 单个点击选中后删除
+- (void)deleteModelOneByOneFun{
+    if(!_selectModelArr || _selectModelArr.count==0){
+        
+        return;
+    }
+    
+    KWeakSelf
+    [[uploadFileManager shareInstance] deleteUploadFileRecordBy:_selectModelArr withDelCache:YES complete:^(BOOL isSuccess) {
+        HLog(@"isSuccess:%d",isSuccess);
+        
+        if(isSuccess){
+            NSMutableArray *curArr = self->_curDataArr;
+            [curArr removeObjectsInArray:self->_selectModelArr];
+            [weakSelf reloadDataFun];
+            self->_selectModelArr = [NSMutableArray new];
+        }
+    }];
+}
+
+
+#pragma mark 处理上传中的 状态点击事件
+- (void)handleUploadingStateTapFunBy:(BOOL)isSuspendType with:(uploadFileDataModel*)model
+{
+    if (isSuspendType) {
+        [[uploadFileManager shareInstance] suspendUploadFileFun:NO];
+    }
+    else{
+        NSMutableArray*arr = [NSMutableArray new];
+        [arr addObject:model];
+        [[uploadFileManager shareInstance] reUploadFileFunBy:arr];
+    }
+    
+}
+
+#pragma mark 处理上传中的 状态点击事件
+- (void)handleUploadFailStateWith:(uploadFileDataModel*)model{
+    
+    [_curDataArr removeObject:model];
+    [self reloadDataFun];
+    
+    if(_didClickReUploadBlock){
+        _didClickReUploadBlock(model);
+    }
+    
+    NSMutableArray*arr = [NSMutableArray new];
+    model.curUploadStateType = uploadStateWait;
+    [arr addObject:model];
+    [[uploadFileManager shareInstance] reUploadFileFunBy:arr];
+    
+}
+@end

+ 17 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordTableView.m

@@ -132,12 +132,28 @@
 #pragma mark 空数据
 - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
     
-    return [UIImage imageNamed:@"uploadFile_noData"];
+    NSString *imageName = @"uploadFile_noData";
+    
+    if(self.tag == 101){
+        imageName = @"uploadFile_noData";
+    }
+    else if(self.tag == 102){
+        imageName = @"uploadFile_noData";
+    }
+    
+    return [UIImage imageNamed:imageName];
 }
 
 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView {
     NSString *text = NSLocalizedString(@"File_upload_Record_no_data",nil);
     
+    if(self.tag == 101){
+        text = NSLocalizedString(@"File_download_Record_no_data",nil);
+    }
+    else if(self.tag == 102){
+        text = NSLocalizedString(@"File_backups_Record_no_data",nil);
+    }
+    
     NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:16.0f],
                                  NSForegroundColorAttributeName: HW999999Color};
     

+ 4 - 4
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordheadView.m

@@ -24,10 +24,10 @@
 - (void)drawAnyView{
     [self setBackgroundColor:[UIColor hwColor:@"#F9F9F9" alpha:1.0]];
     self.layer.cornerRadius = 8;
-    
-    NSString *leftStr =  NSLocalizedString(@"File_upload_Record_uploading",nil);
-    NSString *midStr =  NSLocalizedString(@"File_upload_Record_upload_suc",nil);
-    NSString *rightStr =  NSLocalizedString(@"File_upload_Record_upload_fail",nil);
+
+    NSString *leftStr =  NSLocalizedString(@"my_set_no_File_upload",nil);
+    NSString *midStr =  NSLocalizedString(@"my_set_no_File_download",nil);
+    NSString *rightStr =  NSLocalizedString(@"my_set_no_File_backups",nil);
     NSArray *titleArr =  @[leftStr,midStr,rightStr];
     
     _butWidth = (SCREEN_W - 30)/3.0;

+ 4 - 3
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/backupsFileManager.m

@@ -61,7 +61,8 @@ static backupsFileManager * cur_backupsFileShareInstance = nil;
             return;
         }
         
-        if(lastModel.isCompleteType){//上次备份完成
+        if(lastModel.curBackupsState == backupsStateFail
+           ||lastModel.curBackupsState == backupsStateDone){//上次备份完成
             [self getAllAlbumsFun];
         }
         else{//继续上次的备份任务
@@ -124,7 +125,7 @@ static backupsFileManager * cur_backupsFileShareInstance = nil;
     if(_curPhotosBackupsTaskMod.LocalIdentifierArr.count
        <= (_curPhotosBackupsTaskMod.didBackupsCount + _curPhotosBackupsTaskMod.failCount))
     {
-        _curPhotosBackupsTaskMod.isCompleteType = YES;
+        _curPhotosBackupsTaskMod.curBackupsState = backupsStateDone;
         [self RefreshDatabaseFun];
         return;
     }
@@ -137,7 +138,7 @@ static backupsFileManager * cur_backupsFileShareInstance = nil;
     NSInteger index = _curPhotosBackupsTaskMod.didBackupsCount + _curPhotosBackupsTaskMod.failCount;
     
     if(index >= _curPhotosBackupsTaskMod.LocalIdentifierArr.count){
-        _curPhotosBackupsTaskMod.isCompleteType = YES;
+        _curPhotosBackupsTaskMod.curBackupsState = backupsStateDone;
         [self RefreshDatabaseFun];
         return;
     }

+ 39 - 23
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileRecordViewController.m

@@ -15,6 +15,10 @@
 #import "uploadFileRecordTableView.h"
 #import "uploadFileRecordTableViewHeadView.h"
 #import "ComontAlretViewController.h"
+#import "backupsFilerecordTableView.h"
+#import "backupsFileManager.h"
+#import "photosBackupsTaskModel.h"
+
 
 @interface uploadFileRecordViewController ()<UIScrollViewDelegate>
 
@@ -26,11 +30,11 @@
 @property (nonatomic, strong) uploadFileRecordBgScorllView *uploadFileRecordBgScorllV;
 @property (nonatomic, strong) uploadFileRecordTableView *leftTableView;
 @property (nonatomic, strong) uploadFileRecordTableView *midTableView;
-@property (nonatomic, strong) uploadFileRecordTableView *rightTableView;
+@property (nonatomic, strong) backupsFilerecordTableView *rightTableView;
 
 @property (nonatomic,strong) uploadFileRecordTableViewHeadView *leftHeadView;
 @property (nonatomic,strong) uploadFileRecordTableViewHeadView *midHeadView;
-@property (nonatomic,strong) uploadFileRecordTableViewHeadView *rightHeadView;
+//@property (nonatomic,strong) uploadFileRecordTableViewHeadView *rightHeadView;
 
 
 //@property (nonatomic, strong) NSMutableArray *allDataArr;
@@ -56,7 +60,7 @@
     
     [self.view setBackgroundColor:[UIColor whiteColor]];
     
-    self.titleLabel.text = NSLocalizedString(@"my_set_no_File_upload_record",nil) ;
+    self.titleLabel.text = NSLocalizedString(@"my_set_no_File_Transfer_List",nil) ;
     
     [self.toolBar setHidden:YES];
     [self.navigationBar setHidden:YES];
@@ -66,6 +70,7 @@
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
         [self initbaseUIFun];
         [self getDataInDatabaseFun];
+        [self getBackupsDatabaseFun];
     });
 }
 
@@ -141,7 +146,7 @@
         weakSelf.isEditType = YES;
     };
     
-    _rightTableView = [[uploadFileRecordTableView alloc] init];
+    _rightTableView = [[backupsFilerecordTableView alloc] init];
     _rightTableView.tag = 102;
     [_uploadFileRecordBgScorllV addSubview:_rightTableView];
 
@@ -156,8 +161,8 @@
         weakSelf.isEditType = YES;
     };
     
-    _rightTableView.didClickReUploadBlock = ^(uploadFileDataModel * _Nonnull model) {
-        [weakSelf didClickReUploadFun:model];
+    _rightTableView.didClickReUploadBlock = ^(photosBackupsTaskModel* _Nonnull model) {
+       // [weakSelf didClickReUploadFun:model];
     };
     
     _uploadFileRecordBgScorllV.contentSize = CGSizeMake(SCREEN_W*3.0, curHeight);
@@ -174,11 +179,11 @@
         [weakSelf didClickClearRecordInDoneFun];
     };
     
-    _rightHeadView =  [[uploadFileRecordTableViewHeadView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 40)];
-    _rightTableView.tableHeaderView = _rightHeadView;
-    _rightHeadView.didClickButFun = ^{
-        [weakSelf didClickClearRecordInFailFun];
-    };
+//    _rightHeadView =  [[uploadFileRecordTableViewHeadView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 40)];
+//    _rightTableView.tableHeaderView = _rightHeadView;
+//    _rightHeadView.didClickButFun = ^{
+//        [weakSelf didClickClearRecordInFailFun];
+//    };
     
     
     
@@ -377,8 +382,8 @@
         weakSelf.midTableView.curDataArr = Arr[1];
         [weakSelf.midTableView reloadDataFun];
         
-        weakSelf.rightTableView.curDataArr = Arr[2];
-        [weakSelf.rightTableView reloadDataFun];
+//        weakSelf.rightTableView.curDataArr = Arr[2];
+//        [weakSelf.rightTableView reloadDataFun];
     }];
 }
 
@@ -410,8 +415,8 @@
             weakSelf.midTableView.curDataArr = Arr[1];
             [weakSelf.midTableView reloadDataFun];
             
-            weakSelf.rightTableView.curDataArr = Arr[2];
-            [weakSelf.rightTableView reloadDataFun];
+//            weakSelf.rightTableView.curDataArr = Arr[2];
+//            [weakSelf.rightTableView reloadDataFun];
             
             [weakSelf handleUploadingRightButFun];
         });
@@ -469,6 +474,17 @@
 
 }
 
+- (void)getBackupsDatabaseFun
+{
+    KWeakSelf
+    [photosBackupsTaskModel bg_findAsync:backups_photos_tableName limit:0 orderBy:nil desc:YES complete:^(NSArray * _Nullable array) {
+        mainBlock(^{
+            weakSelf.rightTableView.outSideDataArr = array;
+        });
+            
+    }];
+}
+
 #pragma mark 处理上传中的 全部暂停等
 - (void)handleUploadingRightButFun
 {
@@ -817,14 +833,14 @@
 
 - (void)ClearAllRecordInFailFun
 {
-    [[uploadFileManager shareInstance] deleteUploadFileRecordBy:_rightTableView.curDataArr withDelCache:YES complete:^(BOOL isSuccess) {
-        HLog(@"isSuccess:%d",isSuccess);
-        
-        if(isSuccess){
-            [self->_rightTableView.curDataArr removeAllObjects];
-            [self->_rightTableView reloadDataFun];
-        }
-    }];
+//    [[uploadFileManager shareInstance] deleteUploadFileRecordBy:_rightTableView.curDataArr withDelCache:YES complete:^(BOOL isSuccess) {
+//        HLog(@"isSuccess:%d",isSuccess);
+//        
+//        if(isSuccess){
+//            [self->_rightTableView.curDataArr removeAllObjects];
+//            [self->_rightTableView reloadDataFun];
+//        }
+//    }];
 }
 
 #pragma mark 失败重传

+ 10 - 1
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -258,7 +258,7 @@
 "my_set_no_image_upload"   = "图片";
 "my_set_no_video_upload"   = "视频";
 "my_set_no_File_upload"   = "上传";
-"File_upload_Record_no_data"   = "暂无上传记录";
+"File_upload_Record_no_data"   = "暂无上传记录";
 "File_upload_Record_uploading"   = "上传中";
 "File_upload_Record_upload_suc"   = "上传成功";
 "File_upload_Record_upload_fail"   = "上传失败";
@@ -343,3 +343,12 @@
 "File_backups_path_way_tip"   = "每次开启app时自动备份新文件,默认备份至系统盘,可手动切换至外接盘。相册文件默认备份至:";
 "File_backups_set_close_title"   = "关闭相册备份";
 "File_backups_set_close_tip"   = "关闭备份会取消正在备份的任务,请谨慎操作";
+"my_set_no_File_Transfer_List"   = "传输列表";
+"my_set_no_File_download"   = "下载";
+"my_set_no_File_backups"   = "备份";
+"File_download_Record_no_data"   = "暂无下载记录";
+"File_backups_Record_no_data"   = "暂无备份记录";
+"File_Transfer_List_head_title_ing"   = "正在传输";
+"File_Transfer_List_head_title_fail"   = "传输失败";
+"File_Transfer_List_head_title_done"   = "已完成";
+