Kaynağa Gözat

1.上传记录 已上传的删除功能完成

huangxiaodong 2 yıl önce
ebeveyn
işleme
40bf3c83f8
18 değiştirilmiş dosya ile 651 ekleme ve 8 silme
  1. 16 0
      创维盒子/双子星云手机.xcodeproj/project.pbxproj
  2. 22 0
      创维盒子/双子星云手机/Assets.xcassets/Set/common_red_delete.imageset/Contents.json
  3. BIN
      创维盒子/双子星云手机/Assets.xcassets/Set/common_red_delete.imageset/common_red_delete@2x.png
  4. BIN
      创维盒子/双子星云手机/Assets.xcassets/Set/common_red_delete.imageset/common_red_delete@3x.png
  5. 1 1
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileBottomView.m
  6. 9 0
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordBodyView.h
  7. 213 2
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordBodyView.m
  8. 5 0
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordCell.h
  9. 89 3
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordCell.m
  10. 16 0
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordEditBottomView.h
  11. 54 0
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordEditBottomView.m
  12. 21 0
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordTableViewHeadView.h
  13. 56 0
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordTableViewHeadView.m
  14. 4 1
      创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordheadView.m
  15. 4 1
      创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/uploadFileManager.h
  16. 18 0
      创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/uploadFileManager.m
  17. 113 0
      创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileRecordViewController.m
  18. 10 0
      创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

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

@@ -166,6 +166,10 @@
 		6B3F96342AD2A15A008E349E /* netWorkManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B3F96322AD2A15A008E349E /* netWorkManager.h */; };
 		6B3F96352AD2A15A008E349E /* netWorkManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B3F96332AD2A15A008E349E /* netWorkManager.m */; };
 		6B3F963A2AD2AD0B008E349E /* newWorkInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B3F96392AD2AD0B008E349E /* newWorkInterface.h */; };
+		6B72724B2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7272492B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h */; };
+		6B72724C2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B72724A2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m */; };
+		6B72724F2B0B58E500C03F87 /* uploadFileRecordEditBottomView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B72724D2B0B58E500C03F87 /* uploadFileRecordEditBottomView.h */; };
+		6B7272502B0B58E500C03F87 /* uploadFileRecordEditBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B72724E2B0B58E500C03F87 /* uploadFileRecordEditBottomView.m */; };
 		6B7B65582AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7B65562AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h */; };
 		6B7B65592AD9227700BE8CB3 /* PlayerViewController+otherDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6B7B65572AD9227700BE8CB3 /* PlayerViewController+otherDelegate.mm */; };
 		6B8FF6B92B04E19600800981 /* uploadFileRecordheadView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B8FF6B72B04E19600800981 /* uploadFileRecordheadView.h */; };
@@ -519,6 +523,10 @@
 		6B3F96322AD2A15A008E349E /* netWorkManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = netWorkManager.h; sourceTree = "<group>"; };
 		6B3F96332AD2A15A008E349E /* netWorkManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = netWorkManager.m; sourceTree = "<group>"; };
 		6B3F96392AD2AD0B008E349E /* newWorkInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = newWorkInterface.h; sourceTree = "<group>"; };
+		6B7272492B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileRecordTableViewHeadView.h; sourceTree = "<group>"; };
+		6B72724A2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileRecordTableViewHeadView.m; sourceTree = "<group>"; };
+		6B72724D2B0B58E500C03F87 /* uploadFileRecordEditBottomView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileRecordEditBottomView.h; sourceTree = "<group>"; };
+		6B72724E2B0B58E500C03F87 /* uploadFileRecordEditBottomView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileRecordEditBottomView.m; sourceTree = "<group>"; };
 		6B7B65562AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PlayerViewController+otherDelegate.h"; sourceTree = "<group>"; };
 		6B7B65572AD9227700BE8CB3 /* PlayerViewController+otherDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = "PlayerViewController+otherDelegate.mm"; sourceTree = "<group>"; };
 		6B7B65612ADEAE0300BE8CB3 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
@@ -1164,6 +1172,10 @@
 				6B8FF6BC2B04EB7100800981 /* uploadFileRecordBodyView.m */,
 				6B8FF6BF2B05B24D00800981 /* uploadFileRecordCell.h */,
 				6B8FF6C02B05B24D00800981 /* uploadFileRecordCell.m */,
+				6B7272492B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h */,
+				6B72724A2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m */,
+				6B72724D2B0B58E500C03F87 /* uploadFileRecordEditBottomView.h */,
+				6B72724E2B0B58E500C03F87 /* uploadFileRecordEditBottomView.m */,
 			);
 			path = photoView;
 			sourceTree = "<group>";
@@ -1652,12 +1664,14 @@
 				6B0582892B045E0B00D37290 /* uploadFileDataModel.h in Headers */,
 				6BF52C972AD5546500A617DB /* SimplePing.h in Headers */,
 				6B3F96342AD2A15A008E349E /* netWorkManager.h in Headers */,
+				6B72724F2B0B58E500C03F87 /* uploadFileRecordEditBottomView.h in Headers */,
 				184C8ADD2A949DBD00F26650 /* HWVersionModel.h in Headers */,
 				6B05826F2AFF692700D37290 /* photoPreViewBottomView.h in Headers */,
 				6B7B65582AD9227700BE8CB3 /* PlayerViewController+otherDelegate.h in Headers */,
 				186820212AB98600005702A6 /* QRCodeScanViewController.h in Headers */,
 				6B8FF6B92B04E19600800981 /* uploadFileRecordheadView.h in Headers */,
 				18FCE5482AD15E750020F623 /* PlayerViewController+AppDelegate.h in Headers */,
+				6B72724B2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h in Headers */,
 				181E84F72A8F451D00292B96 /* MineViewCell.h in Headers */,
 				6B8FF6C12B05B24D00800981 /* uploadFileRecordCell.h in Headers */,
 				183AE6D42A8CAFAE00B11CB0 /* UIView+View.h in Headers */,
@@ -2038,6 +2052,7 @@
 				6B8FF6BE2B04EB7100800981 /* uploadFileRecordBodyView.m in Sources */,
 				6BF52C9A2AD5546500A617DB /* WHPingTester.m in Sources */,
 				6BFF268D2AF8E1C600FCB4F7 /* forgetPwdViewController.m in Sources */,
+				6B72724C2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m in Sources */,
 				183AE6082A89CE3C00B11CB0 /* JSONHTTPClient.m in Sources */,
 				183AE6532A8A2CF000B11CB0 /* AFImageDownloader.m in Sources */,
 				A003F6B327D841EE00715CBF /* UIColor+HZXColor.m in Sources */,
@@ -2113,6 +2128,7 @@
 				183AE60A2A89CE3C00B11CB0 /* JSONModel+networking.m in Sources */,
 				A0951D9427ED61F5000E6AC4 /* HWAboutViewController.m in Sources */,
 				183AE5E12A89CD3C00B11CB0 /* SuperModel.m in Sources */,
+				6B7272502B0B58E500C03F87 /* uploadFileRecordEditBottomView.m in Sources */,
 				A003F6A927D841C800715CBF /* BaseTabBarController.m in Sources */,
 				A003F6C027D841FF00715CBF /* FLAnimatedImage.m in Sources */,
 				A02FF6AC27D7054700D59D3F /* main.m in Sources */,

+ 22 - 0
创维盒子/双子星云手机/Assets.xcassets/Set/common_red_delete.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "common_red_delete@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "common_red_delete@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
创维盒子/双子星云手机/Assets.xcassets/Set/common_red_delete.imageset/common_red_delete@2x.png


BIN
创维盒子/双子星云手机/Assets.xcassets/Set/common_red_delete.imageset/common_red_delete@3x.png


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

@@ -44,7 +44,7 @@
     _uploadFileRoutelabel = [[UILabel alloc] init];
     _uploadFileRoutelabel.font = [UIFont systemFontOfSize:14.0];
     _uploadFileRoutelabel.textColor = [UIColor hwColor:@"#959799" alpha:1.0];
-    _uploadFileRoutelabel.text = @"上传路径:xxxxxxxxxxxxxxx";
+    _uploadFileRoutelabel.text = @"上传路径:/sdcard/Download/";
     [self addSubview:_uploadFileRoutelabel];
     
     [_uploadFileRoutelabel mas_makeConstraints:^(MASConstraintMaker *make) {

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

@@ -6,6 +6,7 @@
 //
 
 #import <UIKit/UIKit.h>
+#import "uploadFileRecordViewController.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -14,8 +15,16 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic,copy) void (^didScrollFun)(NSInteger index);
 @property(nonatomic,assign) NSInteger selectIndex;// 从1开始
 @property (nonatomic, strong) NSMutableArray *allDataArr;
+@property (nonatomic, weak) uploadFileRecordViewController *curVC;
+@property (nonatomic,assign) BOOL isEditType;
+@property (nonatomic,assign) BOOL isSelectAllType;
+
+@property (nonatomic,copy) void (^didLongPressClick)(void);
 
 - (void)RefreshDataWithUploadingArr:(NSMutableArray* _Nullable)uploadingArr withDoneArr:(NSMutableArray* _Nullable)doneArr withfailArr:(NSMutableArray* _Nullable)failArr;
+
+#pragma mark 单个点击选中后删除
+- (void)deleteModelOneByOneFun;
 @end
 
 NS_ASSUME_NONNULL_END

+ 213 - 2
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordBodyView.m

@@ -9,10 +9,16 @@
 #import "uploadFileRecordCell.h"
 #import "UIScrollView+EmptyDataSet.h"
 #import "uploadFileDataModel.h"
+#import "uploadFileRecordTableViewHeadView.h"
+#import "ComontAlretViewController.h"
+#import "uploadFileManager.h"
 
 @interface uploadFileRecordBodyView ()<UITableViewDelegate,UITableViewDataSource,UIScrollViewDelegate,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
 @property (nonatomic,strong) UIScrollView *bgScrollV;
-
+@property (nonatomic,strong) uploadFileRecordTableViewHeadView *leftHeadView;
+@property (nonatomic,strong) uploadFileRecordTableViewHeadView *midHeadView;
+@property (nonatomic,strong) uploadFileRecordTableViewHeadView *rightHeadView;
+@property (nonatomic,strong) NSMutableArray *selectModelArr;
 @end
 
 @implementation uploadFileRecordBodyView
@@ -23,6 +29,7 @@
     _selectIndex = 1;
     [self drawAnyView];
     
+    _selectModelArr = [NSMutableArray new];
     return self;
 }
 
@@ -77,12 +84,34 @@
                     make.width.mas_equalTo(SCREEN_W);
                     make.top.mas_equalTo(0);
                     make.height.mas_equalTo(frame.size.height);
+                    //make.bottom.mas_equalTo(0);
                 }];
+                
+                
+                uploadFileRecordTableViewHeadView *headView =  [[uploadFileRecordTableViewHeadView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 40)];
+                curTableview.tableHeaderView = headView;
+                
+                KWeakSelf
+                headView.didClickButFun = ^{
+                    if(headView == self->_midHeadView)
+                    {
+                        [weakSelf didClickClearRecordInDoneFun];
+                    }
+                };
+                
+                if(i==0){
+                    self->_leftHeadView = headView;
+                }
+                else if(i==1){
+                    self->_midHeadView = headView;
+                }
+                else if(i==2){
+                    self->_rightHeadView = headView;
+                }
             }
         });
     });
     
-    
 }
 
 
@@ -127,6 +156,28 @@
         if(row < curArr.count){
             uploadFileDataModel *model = curArr[row];
             cell.curUploadFileDataModel = model;
+            cell.isEditType = _isEditType;
+            
+            if(_isEditType){
+                if([_selectModelArr containsObject:model]){
+                    cell.isSelectType = YES;
+                }
+                else{
+                    cell.isSelectType = NO;
+                }
+            }
+            
+            KWeakSelf
+            cell.didLongPressClick = ^{
+                weakSelf.isEditType = YES;
+                if(self->_didLongPressClick){
+                    self->_didLongPressClick();
+                }
+            };
+            
+            cell.didClckSelectBut = ^(BOOL isSelect) {
+                [weakSelf selectModelOneByOne:model BySelect:isSelect];
+            };
         }
     }
     
@@ -197,6 +248,15 @@
 {
     _allDataArr = allDataArr;
     
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.15 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        if(self->_allDataArr.count >=3){
+            [self RefresHeadUIFunBy:self->_allDataArr[0] withMidArr:self->_allDataArr[1] withRightArr:self->_allDataArr[2]];
+        }
+    });
+    
+    
+    
+    
     mainBlock(^{
         //刷新数据
         [self reloadAllDataFun];
@@ -243,5 +303,156 @@
             [curTabview reloadData];
         }
     }
+    
+    [self RefresHeadUIFunBy:uploadingArr withMidArr:doneArr withRightArr:failArr];
+}
+
+#pragma mark 熟悉头部数据
+-(void)RefresHeadUIFunBy:(NSMutableArray*)letfArr withMidArr:(NSMutableArray*)midArr withRightArr:(NSMutableArray*)rightArr
+{
+
+    if(letfArr){
+        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_uploading",nil);
+        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_all_suspend",nil);
+        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,letfArr.count];
+
+        _leftHeadView.titleLabel.text = titleStr;
+        [_leftHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
+        
+        if(letfArr.count == 0){
+            _leftHeadView.hidden = YES;
+        }
+        else{
+            _leftHeadView.hidden = NO;
+        }
+    }
+    
+    if(midArr){
+        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,midArr.count];
+
+        _midHeadView.titleLabel.text = titleStr;
+        [_midHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
+        
+        if(midArr.count == 0){
+            _midHeadView.hidden = YES;
+        }
+        else{
+            _midHeadView.hidden = NO;
+        }
+    }
+
+    if(rightArr){
+        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,midArr.count];
+
+        _rightHeadView.titleLabel.text = titleStr;
+        [_rightHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
+        
+        if(rightArr.count == 0){
+            _rightHeadView.hidden = YES;
+        }
+        else{
+            _rightHeadView.hidden = NO;
+        }
+    }
+}
+
+#pragma mark 点击上传中的全部暂停
+
+#pragma mark 点击上传成功的清空记录
+- (void)didClickClearRecordInDoneFun
+{
+    /*弹窗提示二次确认*/
+    KWeakSelf
+    ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"File_upload_Record_clear_Tip_title",nil)
+                                                                                     msg:NSLocalizedString(@"File_upload_Record_clear_Tip_msg",nil)
+                                                                                imageStr:nil
+                                                                             cancelTitle:NSLocalizedString(@"other_cancel",nil)
+                                                                                 okTitle:NSLocalizedString(@"other_comment_ok",nil) isOkBtnHighlight:YES
+                                                                              didClickOk:^{
+        [weakSelf ClearAllRecordInDoneFun];
+    } didClickCancel:^{
+        
+    }];
+    nextVC.modalPresentationStyle = UIModalPresentationCustom;
+  
+    [_curVC presentViewController:nextVC animated:YES completion:^{
+        nextVC.view.superview.backgroundColor = [UIColor clearColor];
+    }];
+
+}
+
+- (void)ClearAllRecordInDoneFun
+{
+    [[uploadFileManager shareInstance] deleteUploadFileRecordBy:_allDataArr[1] complete:^(BOOL isSuccess) {
+        HLog(@"isSuccess:%d",isSuccess);
+        
+        if(isSuccess){
+            [self->_allDataArr replaceObjectAtIndex:1 withObject:[NSMutableArray new]];
+            [self reloadAllDataFun];
+        }
+    }];
+}
+
+#pragma mark 点击上传失败的清空记录
+
+
+-(void)setIsEditType:(BOOL)isEditType
+{
+    _isEditType = isEditType;
+    
+    if(_isEditType){
+        _bgScrollV.scrollEnabled = NO;
+    }
+    else{
+        _bgScrollV.scrollEnabled = YES;
+        [_selectModelArr removeAllObjects];
+        
+    }
+    
+    [self reloadAllDataFun];
+}
+
+#pragma mark  点击全选
+- (void)setIsSelectAllType:(BOOL)isSelectAllType
+{
+    if(isSelectAllType && _allDataArr && _allDataArr.count > (_selectIndex-1)){
+        _selectModelArr = [NSMutableArray arrayWithArray:_allDataArr[_selectIndex-1]];
+        [self reloadAllDataFun];
+    }
+}
+
+#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;
+    }
+    
+    [[uploadFileManager shareInstance] deleteUploadFileRecordBy:_selectModelArr complete:^(BOOL isSuccess) {
+        HLog(@"isSuccess:%d",isSuccess);
+        
+        if(isSuccess){
+            NSMutableArray *curArr = self->_allDataArr[self->_selectIndex -1];
+            [curArr removeObjectsInArray:self->_selectModelArr];
+            [self reloadAllDataFun];
+            self->_selectModelArr = [NSMutableArray new];
+        }
+    }];
+}
+
 @end

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

@@ -12,7 +12,12 @@ NS_ASSUME_NONNULL_BEGIN
 @interface uploadFileRecordCell : UITableViewCell
 
 @property(nonatomic,strong)uploadFileDataModel * curUploadFileDataModel;
+@property (nonatomic,assign) BOOL isEditType;
+@property (nonatomic,assign) BOOL isSelectType;
 
+@property (nonatomic,copy) void (^didLongPressClick)(void);
+//点击按钮
+@property (nonatomic,copy) void (^didClckSelectBut)(BOOL isSelect);
 @end
 
 NS_ASSUME_NONNULL_END

+ 89 - 3
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/uploadFileRecordCell.m

@@ -9,6 +9,7 @@
 @interface uploadFileRecordCell ()
 @property(nonatomic,strong) UIImageView *fileImageView;
 @property(nonatomic,strong) UIImageView *upLoadStateImageView;
+@property (nonatomic, strong) UIButton *selectButton;
 
 @property(nonatomic,strong) UIView *progressBgView;
 @property(nonatomic,strong) UIView *progressSelectView;
@@ -57,6 +58,25 @@
         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(_upLoadStateImageView.mas_centerX);
+            make.centerY.mas_equalTo(_upLoadStateImageView.mas_centerY);
+        }];
+        
+        self.selectButton = but;
+    }
+    
     _progressBgView = [[UIView alloc] init];
     _progressBgView.backgroundColor = [UIColor hwColor:@"#F9F9F9" alpha:1.0];
     _progressBgView.layer.cornerRadius = 1.5;
@@ -115,7 +135,7 @@
     
     [_fileProgresslabel mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.mas_equalTo(_fileImageView.mas_right).offset(10);
-        make.right.mas_equalTo(_progressBgView.mas_centerX);
+        make.right.mas_equalTo(_progressBgView.mas_centerX).offset(100);
         make.height.mas_equalTo(15);
         make.top.mas_equalTo(_progressBgView.mas_bottom).offset(3);
     }];
@@ -133,11 +153,46 @@
         make.height.mas_equalTo(15);
         make.top.mas_equalTo(_progressBgView.mas_bottom).offset(3);
     }];
+    
+    //长按手势
+    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;
+    }
+    else{
+        self.selectButton.hidden = YES;
+    }
+}
+
+- (void)setIsSelectType:(BOOL)isSelectType
+{
+    _isSelectType = isSelectType;
+    
+    if(isSelectType){
+        self.selectButton.selected = YES;
+    }
+    else{
+        self.selectButton.selected = NO;
+    }
 }
 
 - (void)setCurUploadFileDataModel:(uploadFileDataModel *)curUploadFileDataModel
 {
-    HLog(@"hhhhhhh  %@ %ld %ld",curUploadFileDataModel.bg_id,curUploadFileDataModel.curUploadStateType,curUploadFileDataModel.didUploadBytes);
+    //HLog(@"hhhhhhh  %@ %ld %ld",curUploadFileDataModel.bg_id,curUploadFileDataModel.curUploadStateType,curUploadFileDataModel.didUploadBytes);
     
     _fileImageView.image = [UIImage imageWithData:curUploadFileDataModel.imageData];
     _fileSpeedlabel.hidden = YES;
@@ -203,9 +258,40 @@
         didUploadStr = [[NSString alloc] initWithFormat:@"%.2fG",didUploadSize_k/1024.0/1024.0];
     }
     
-    _fileProgresslabel.text = [[NSString alloc] initWithFormat:@"%@/%@",didUploadStr,totalSizeStr];
+    if(curUploadFileDataModel.curUploadStateType == uploadStateDone){
+        _fileProgresslabel.text = [[NSString alloc] initWithFormat:@"%@  %@",totalSizeStr,@"上传到:/sdcard/Download/"];
+    }
+    else{
+        _fileProgresslabel.text = [[NSString alloc] initWithFormat:@"%@/%@",didUploadStr,totalSizeStr];
+        
+    }
     
     _fileSpeedlabel.text = @"--";
 }
 
+
+-(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);
+    }
+}
 @end

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

@@ -0,0 +1,16 @@
+//
+//  uploadFileRecordEditBottomView.h
+//  隐私保护
+//
+//  Created by xd h on 2023/11/20.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface uploadFileRecordEditBottomView : UIView
+@property (nonatomic,copy) void (^didClickButFun)(void);
+@end
+
+NS_ASSUME_NONNULL_END

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

@@ -0,0 +1,54 @@
+//
+//  uploadFileRecordEditBottomView.m
+//  隐私保护
+//
+//  Created by xd h on 2023/11/20.
+//
+
+#import "uploadFileRecordEditBottomView.h"
+
+@implementation uploadFileRecordEditBottomView
+
+- (id)initWithFrame:(CGRect)frame{
+    self = [super initWithFrame:frame];
+    
+    [self drawAnyView];
+    
+    return self;
+}
+
+- (void)drawAnyView{
+    [self setBackgroundColor:[UIColor whiteColor]];
+    
+    self.layer.backgroundColor = [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0].CGColor;
+    self.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.0200].CGColor;
+    self.layer.shadowOffset = CGSizeMake(0,-1);
+    self.layer.shadowOpacity = 1;
+    self.layer.shadowRadius = 1;
+    
+    //删除
+    NSString* curImgUploadStr = [[NSString alloc] initWithFormat:@"%@ %@",@"  ",NSLocalizedString(@"File_upload_Record_delete",nil)];
+    UIButton *deleteBut = [[UIButton alloc] init];
+    [deleteBut setImage:[UIImage imageNamed:@"common_red_delete"] forState:UIControlStateNormal];
+    [deleteBut setTitle:curImgUploadStr forState:UIControlStateNormal];
+    [deleteBut setTitleColor:[UIColor hwColor:@"#FF4742" alpha:1.0] forState:UIControlStateNormal];
+    deleteBut.titleLabel.font = [UIFont systemFontOfSize:16.0];
+    [deleteBut addTarget:self action:@selector(didClickButFun:) forControlEvents:UIControlEventTouchUpInside];
+    [self addSubview:deleteBut];
+    
+    [deleteBut mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+        make.top.mas_equalTo(0);
+    }];
+}
+
+-(void)didClickButFun:(UIButton*)but
+{
+    if(_didClickButFun){
+        _didClickButFun();
+    }
+}
+
+@end

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

@@ -0,0 +1,21 @@
+//
+//  uploadFileRecordTableViewHeadView.h
+//  隐私保护
+//
+//  Created by xd h on 2023/11/20.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface uploadFileRecordTableViewHeadView : UIView
+
+@property(nonatomic,strong) UILabel  *titleLabel;//
+@property(nonatomic,strong) UIButton  *rightButton;//
+
+//点击
+@property (nonatomic,copy) void (^didClickButFun)(void);
+@end
+
+NS_ASSUME_NONNULL_END

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

@@ -0,0 +1,56 @@
+//
+//  uploadFileRecordTableViewHeadView.m
+//  隐私保护
+//
+//  Created by xd h on 2023/11/20.
+//
+
+#import "uploadFileRecordTableViewHeadView.h"
+
+@implementation uploadFileRecordTableViewHeadView
+
+- (id)initWithFrame:(CGRect)frame{
+    self = [super initWithFrame:frame];
+    
+    [self drawAnyView];
+    
+    return self;
+}
+
+- (void)drawAnyView{
+    [self setBackgroundColor:[UIColor whiteColor]];
+    
+    _titleLabel = [[UILabel alloc] init];
+    _titleLabel.textColor = [UIColor hwColor:@"#666666" alpha:1.0];
+    _titleLabel.font = [UIFont systemFontOfSize:12.0];
+    [self addSubview:_titleLabel];
+    
+    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(15);
+        make.right.mas_equalTo(100);
+        make.top.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+    }];
+    
+    _rightButton = [[UIButton alloc] init];
+    [_rightButton setTitleColor:[UIColor hwColor:@"#01B7EA" alpha:1.0] forState:UIControlStateNormal];
+    _rightButton.titleLabel.font = [UIFont systemFontOfSize:12.0];
+    _rightButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
+    [_rightButton addTarget:self action:@selector(didiClikButFun:) forControlEvents:UIControlEventTouchUpInside];
+    [self addSubview:_rightButton];
+    
+    [_rightButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.mas_equalTo(80);
+        make.right.mas_equalTo(-15);
+        make.top.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+    }];
+}
+
+- (void)didiClikButFun:(UIButton*)but
+{
+    if(_didClickButFun){
+        _didClickButFun();
+    }
+}
+@end

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

@@ -25,7 +25,10 @@
     [self setBackgroundColor:[UIColor hwColor:@"#F9F9F9" alpha:1.0]];
     self.layer.cornerRadius = 8;
     
-    NSArray *titleArr =  @[@"上传中",@"上传成功",@"上传失败"];
+    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);
+    NSArray *titleArr =  @[leftStr,midStr,rightStr];
     
     _butWidth = (SCREEN_W - 30)/3.0;
     

+ 4 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/uploadFileManager.h

@@ -11,7 +11,7 @@
 #import "TZAssetModel+imageData.h"
 
 #define upLoadFile_image_tableName @"upLoadFile_image_tableName"
-#define upLoadFile_Video_tableName @"upLoadFile_Video_tableName"
+//#define upLoadFile_Video_tableName @"upLoadFile_Video_tableName"
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -32,6 +32,9 @@ NS_ASSUME_NONNULL_BEGIN
 
 //修改文件上传的状态
 - (void)changeUploadFileState:(uploadStateType)curUploadStateType withDidUploadBytes:(long)didUpLoadBytes complete:(custom_complete_B)complete;
+
+//删除本地数据库记录
+- (void)deleteUploadFileRecordBy:(NSMutableArray *)delArr complete:(custom_complete_B)complete;
 @end
 
 NS_ASSUME_NONNULL_END

+ 18 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/uploadFileManager.m

@@ -165,4 +165,22 @@ static uploadFileManager * cur_uploadFileShareInstance = nil;
     }];
 }
 
+
+//删除本地数据库记录
+- (void)deleteUploadFileRecordBy:(NSMutableArray *)delArr complete:(custom_complete_B)complete
+{
+    //逻辑待优化
+    BOOL isSuc = false;
+    for (uploadFileDataModel *uploadFileDataMod in delArr) {
+        
+        NSMutableString* where = [[NSMutableString alloc] initWithString:@"where "];
+        
+        NSString *curStr =  [NSString stringWithFormat:@"%@=%@ ",bg_sqlKey(@"bg_id"),bg_sqlValue(uploadFileDataMod.bg_id)];
+        [where appendString:curStr];
+        isSuc = [uploadFileDataModel bg_delete:upLoadFile_image_tableName where:where];
+    }
+    
+    complete(isSuc);
+}
+
 @end

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

@@ -10,6 +10,7 @@
 #import "uploadFileDataModel.h"
 #import "uploadFileRecordheadView.h"
 #import "uploadFileRecordBodyView.h"
+#import "uploadFileRecordEditBottomView.h"
 
 @interface uploadFileRecordViewController ()
 
@@ -18,6 +19,12 @@
 @property (nonatomic, strong) uploadFileRecordheadView *uploadFileRecordheadV;
 @property (nonatomic, strong) uploadFileRecordBodyView *uploadFileRecordBodyV;
 @property (nonatomic, strong) NSMutableArray *allDataArr;
+
+@property (nonatomic, strong) UIButton *leftButton;
+@property (nonatomic, strong) UIButton *rightButton;
+@property (nonatomic, strong) uploadFileRecordEditBottomView *uploadFileRecordEditBottomV;
+@property (nonatomic,assign) BOOL isEditType;
+
 @end
 
 @implementation uploadFileRecordViewController
@@ -63,6 +70,7 @@
     };
     
     _uploadFileRecordBodyV = [[uploadFileRecordBodyView alloc] init];
+    _uploadFileRecordBodyV.curVC = self;
     [self.view addSubview:_uploadFileRecordBodyV];
     
     [_uploadFileRecordBodyV mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -72,9 +80,63 @@
         make.bottom.mas_equalTo(0);
     }];
     
+    
     _uploadFileRecordBodyV.didScrollFun = ^(NSInteger index) {
         [weakSelf didScorllBodyFun:index];
     };
+    
+    _uploadFileRecordBodyV.didLongPressClick = ^{
+        weakSelf.isEditType = YES;
+    };
+  
+    _leftButton = [[UIButton alloc] init];
+    [_leftButton setTitleColor:[UIColor hwColor:@"#01B7EA" alpha:1.0] forState:UIControlStateNormal];
+    _leftButton.titleLabel.font = [UIFont systemFontOfSize:18.0];
+    _leftButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
+    [_leftButton addTarget:self action:@selector(didClickButFun:) forControlEvents:UIControlEventTouchUpInside];
+    _leftButton.tag = 1;
+    [_leftButton setTitle:NSLocalizedString(@"other_cancel",nil) forState:UIControlStateNormal];
+    _leftButton.hidden = YES;
+    [self.navBarBGView addSubview:_leftButton];
+    
+    [_leftButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.mas_equalTo(80);
+        make.left.mas_equalTo(15);
+        make.height.mas_equalTo(self.backBtn.mas_height);
+        make.centerY.mas_equalTo(self.backBtn.mas_centerY);
+    }];
+    
+    _rightButton = [[UIButton alloc] init];
+    [_rightButton setTitleColor:[UIColor hwColor:@"#01B7EA" alpha:1.0] forState:UIControlStateNormal];
+    _rightButton.titleLabel.font = [UIFont systemFontOfSize:18.0];
+    _rightButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
+    [_rightButton addTarget:self action:@selector(didClickButFun:) forControlEvents:UIControlEventTouchUpInside];
+    _rightButton.tag = 2;
+    [_rightButton setTitle:NSLocalizedString(@"File_upload_Record_select_all",nil) forState:UIControlStateNormal];
+    _rightButton.hidden = YES;
+    [self.navBarBGView addSubview:_rightButton];
+    
+    [_rightButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.mas_equalTo(80);
+        make.right.mas_equalTo(-15);
+        make.height.mas_equalTo(self.backBtn.mas_height);
+        make.centerY.mas_equalTo(self.backBtn.mas_centerY);
+    }];
+    
+    _uploadFileRecordEditBottomV = [[uploadFileRecordEditBottomView alloc] init];
+    _uploadFileRecordEditBottomV.hidden = YES;
+    [self.view addSubview:_uploadFileRecordEditBottomV];
+    
+    [_uploadFileRecordEditBottomV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.height.mas_equalTo(60 + safeArea);
+        make.bottom.mas_equalTo(0);
+    }];
+    
+    _uploadFileRecordEditBottomV.didClickButFun = ^{
+        [weakSelf.uploadFileRecordBodyV deleteModelOneByOneFun];
+    };
 }
 
 #pragma mark 头部点击 背景滚动
@@ -148,6 +210,11 @@
                     
                     NSMutableArray *doneArr = _allDataArr[1];
                     [doneArr insertObject:uploadFileDataMod atIndex:0];
+                    
+                    //全部上传了
+                    if(curArr.count == 0){
+                        
+                    }
                 }
                 else if(uploadFileDataMod.curUploadStateType == uploadStateFail){
                     [curArr removeObject:mod];
@@ -180,4 +247,50 @@
     //self.uploadFileRecordBodyV.allDataArr = _allDataArr;
     
 }
+
+#pragma mark 按钮点击
+- (void)didClickButFun:(UIButton*)but
+{
+    NSInteger tag = but.tag;
+    if(tag == 1){
+        self.isEditType = NO;
+        self.uploadFileRecordBodyV.isEditType = NO;
+    }
+    else{
+        self.uploadFileRecordBodyV.isSelectAllType = YES;
+    }
+}
+
+-(void)setIsEditType:(BOOL)isEditType
+{
+    _isEditType = isEditType;
+    
+    if(_isEditType){
+        _leftButton.hidden = NO;
+        _rightButton.hidden = NO;
+        self.backBtn.hidden = YES;
+        _uploadFileRecordEditBottomV.hidden = NO;
+        
+        [_uploadFileRecordBodyV mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(0);
+            make.right.mas_equalTo(0);
+            make.bottom.mas_equalTo(_uploadFileRecordEditBottomV.mas_top).offset(0.0);
+            make.top.mas_equalTo(_uploadFileRecordheadV.mas_bottom).offset(0.0);
+        }];
+    }
+    else{
+        _leftButton.hidden = YES;
+        _rightButton.hidden = YES;
+        self.backBtn.hidden = NO;
+        
+        _uploadFileRecordEditBottomV.hidden = YES;
+        
+        [_uploadFileRecordBodyV mas_remakeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(0);
+            make.right.mas_equalTo(0);
+            make.bottom.mas_equalTo(_uploadFileRecordEditBottomV.mas_top).offset(0.0);
+            make.top.mas_equalTo(_uploadFileRecordheadV.mas_bottom).offset(0.0);
+        }];
+    }
+}
 @end

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

@@ -258,3 +258,13 @@
 "my_set_no_video_upload"   = "上传视频";
 "my_set_no_File_upload"   = "上传";
 "File_upload_Record_no_data"   = "暂无上传记录~";
+"File_upload_Record_uploading"   = "上传中";
+"File_upload_Record_upload_suc"   = "上传成功";
+"File_upload_Record_upload_fail"   = "上传失败";
+"File_upload_Record_did_upload"   = "已上传";
+"File_upload_Record_all_suspend"   = "全部暂停";
+"File_upload_Record_clear_Record"   = "清空记录";
+"File_upload_Record_clear_Tip_title"   = "温馨提示";
+"File_upload_Record_clear_Tip_msg"   = "仅删除记录,不会删除文件中心的文件";
+"File_upload_Record_select_all"   = "全选";
+"File_upload_Record_delete"   = "删除";