Browse Source

Merge remote-tracking branch 'origin/master'

lizeyu 9 months ago
parent
commit
0f82edf1ae
90 changed files with 2192 additions and 1228 deletions
  1. 34 0
      parth5/parth5/package-lock.json
  2. 1 0
      parth5/parth5/package.json
  3. 52 0
      parth5/parth5/src/app/api/file/index.ts
  4. 1 1
      parth5/parth5/src/app/comm/modal/imglist/imglist.component.html
  5. 1 1
      parth5/parth5/src/app/comm/modal/imglist/imglist.component.scss
  6. 153 148
      parth5/parth5/src/app/comm/modal/imglist/imglist.component.ts
  7. 0 4
      parth5/parth5/src/app/explore-container/explore-container.component.html
  8. 0 27
      parth5/parth5/src/app/explore-container/explore-container.component.scss
  9. 0 24
      parth5/parth5/src/app/explore-container/explore-container.component.spec.ts
  10. 0 15
      parth5/parth5/src/app/explore-container/explore-container.component.ts
  11. 0 14
      parth5/parth5/src/app/explore-container/explore-container.module.ts
  12. 0 55
      parth5/parth5/src/app/home/editdues/editdues.component.html
  13. 0 37
      parth5/parth5/src/app/home/editdues/editdues.component.scss
  14. 0 24
      parth5/parth5/src/app/home/editdues/editdues.component.spec.ts
  15. 0 111
      parth5/parth5/src/app/home/editdues/editdues.component.ts
  16. 0 17
      parth5/parth5/src/app/home/home-routing.module.ts
  17. 0 31
      parth5/parth5/src/app/home/home.module.ts
  18. 0 101
      parth5/parth5/src/app/home/home.page.html
  19. 0 162
      parth5/parth5/src/app/home/home.page.scss
  20. 0 24
      parth5/parth5/src/app/home/home.page.spec.ts
  21. 0 82
      parth5/parth5/src/app/home/home.page.ts
  22. 10 7
      parth5/parth5/src/app/views/pages/partylife/shyk/edit/edit.component.ts
  23. 1 1
      parth5/parth5/src/app/views/pages/partylife/shyk/shyk.component.html
  24. 1 1
      parth5/parth5/src/app/views/pages/partylife/shyk/shyk.component.ts
  25. 6 0
      parth5/parth5/src/app/views/pages/study/againt/againt.component.html
  26. 13 0
      parth5/parth5/src/app/views/pages/study/againt/againt.component.scss
  27. 27 0
      parth5/parth5/src/app/views/pages/study/againt/againt.component.spec.ts
  28. 14 0
      parth5/parth5/src/app/views/pages/study/againt/againt.component.ts
  29. 7 0
      parth5/parth5/src/app/views/pages/study/education/education.component.html
  30. 13 0
      parth5/parth5/src/app/views/pages/study/education/education.component.scss
  31. 27 0
      parth5/parth5/src/app/views/pages/study/education/education.component.spec.ts
  32. 14 0
      parth5/parth5/src/app/views/pages/study/education/education.component.ts
  33. 16 0
      parth5/parth5/src/app/views/pages/study/partycourse/fileshower/fileshower.component.html
  34. 7 0
      parth5/parth5/src/app/views/pages/study/partycourse/fileshower/fileshower.component.scss
  35. 6 6
      parth5/parth5/src/app/views/tapp/tab-user/tab-user.page.spec.ts
  36. 38 0
      parth5/parth5/src/app/views/pages/study/partycourse/fileshower/fileshower.component.ts
  37. 62 0
      parth5/parth5/src/app/views/pages/study/partycourse/partycourse.component.html
  38. 160 0
      parth5/parth5/src/app/views/pages/study/partycourse/partycourse.component.scss
  39. 27 0
      parth5/parth5/src/app/views/pages/study/partycourse/partycourse.component.spec.ts
  40. 301 0
      parth5/parth5/src/app/views/pages/study/partycourse/partycourse.component.ts
  41. 6 0
      parth5/parth5/src/app/views/pages/study/rule/rule.component.html
  42. 13 0
      parth5/parth5/src/app/views/pages/study/rule/rule.component.scss
  43. 27 0
      parth5/parth5/src/app/views/pages/study/rule/rule.component.spec.ts
  44. 14 0
      parth5/parth5/src/app/views/pages/study/rule/rule.component.ts
  45. 1 1
      parth5/parth5/src/app/views/tapp/tab-main/tab-main-routing.module.ts
  46. 4 2
      parth5/parth5/src/app/views/tapp/tab-main/tab-main.module.ts
  47. 0 24
      parth5/parth5/src/app/views/tapp/tab-main/tab-main.page.spec.ts
  48. 0 0
      parth5/parth5/src/app/views/tapp/tab-main/tab-main.route.ts
  49. 10 0
      parth5/parth5/src/app/views/tapp/tab-study/tab-study-routing.module.ts
  50. 24 0
      parth5/parth5/src/app/views/tapp/tab-study/tab-study.module.ts
  51. 25 0
      parth5/parth5/src/app/views/tapp/tab-study/tab-study.page.html
  52. 14 0
      parth5/parth5/src/app/views/tapp/tab-study/tab-study.page.scss
  53. 15 0
      parth5/parth5/src/app/views/tapp/tab-study/tab-study.page.ts
  54. 9 0
      parth5/parth5/src/app/views/tapp/tab-study/tab-study.route.ts
  55. 2 10
      parth5/parth5/src/app/views/tapp/tab-user/tab-user-routing.module.ts
  56. 6 2
      parth5/parth5/src/app/views/tapp/tab-user/tab-user.module.ts
  57. 108 6
      parth5/parth5/src/app/views/tapp/tab-user/tab-user.page.html
  58. 162 0
      parth5/parth5/src/app/views/tapp/tab-user/tab-user.page.scss
  59. 79 2
      parth5/parth5/src/app/views/tapp/tab-user/tab-user.page.ts
  60. 11 0
      parth5/parth5/src/app/views/tapp/tab-user/tab-user.route.ts
  61. 0 24
      parth5/parth5/src/app/views/tapp/tab-work/tab-work.page.spec.ts
  62. 4 0
      parth5/parth5/src/app/views/tapp/tabs/tabs-routing.module.ts
  63. 5 3
      parth5/parth5/src/app/views/tapp/tabs/tabs.page.html
  64. 3 102
      src/main/java/com/ghsc/partybuild/controller/SHYKController.java
  65. 1 1
      src/main/java/com/ghsc/partybuild/controller/AppCgjqController.java
  66. 1 1
      src/main/java/com/ghsc/partybuild/controller/AppDicController.java
  67. 134 0
      src/main/java/com/ghsc/partybuild/controller/app/AppFileController.java
  68. 1 1
      src/main/java/com/ghsc/partybuild/controller/AppFundsController.java
  69. 7 96
      src/main/java/com/ghsc/partybuild/controller/AppHomeController.java
  70. 1 1
      src/main/java/com/ghsc/partybuild/controller/AppLogController.java
  71. 1 1
      src/main/java/com/ghsc/partybuild/controller/AppMessageController.java
  72. 1 1
      src/main/java/com/ghsc/partybuild/controller/AppModularController.java
  73. 1 1
      src/main/java/com/ghsc/partybuild/controller/AppPartyController.java
  74. 1 1
      src/main/java/com/ghsc/partybuild/controller/AppPartyTwoExtController.java
  75. 1 1
      src/main/java/com/ghsc/partybuild/controller/AppPublicityController.java
  76. 5 3
      src/main/java/com/ghsc/partybuild/controller/AppShykController.java
  77. 31 0
      src/main/java/com/ghsc/partybuild/filter/exception/BaseErrorEnum.java
  78. 6 0
      src/main/java/com/ghsc/partybuild/filter/exception/BaseErrorInfoInterface.java
  79. 28 0
      src/main/java/com/ghsc/partybuild/filter/exception/BaseException.java
  80. 25 0
      src/main/java/com/ghsc/partybuild/filter/exception/BaseResponse.java
  81. 31 0
      src/main/java/com/ghsc/partybuild/filter/exception/GlobalExceptionHandler.java
  82. 27 0
      src/main/java/com/ghsc/partybuild/filter/exception/RespGenerstor.java
  83. 10 0
      src/main/java/com/ghsc/partybuild/service/FileService.java
  84. 132 51
      src/main/java/com/ghsc/partybuild/service/impl/FileServiceImpl.java
  85. 81 0
      src/main/java/com/ghsc/partybuild/util/BASE64DecodedMultipartFile.java
  86. 10 0
      src/main/java/com/ghsc/partybuild/vo/ImageBase64Vo.java
  87. 11 0
      src/main/java/com/ghsc/partybuild/vo/UploadFileBase64Vo.java
  88. 25 0
      src/main/java/com/ghsc/partybuild/vo/shyk/DecisionUserJsonData.java
  89. 25 0
      src/main/java/com/ghsc/partybuild/vo/shyk/MeetingTopicJsonData.java
  90. 61 0
      src/main/java/com/ghsc/partybuild/vo/shyk/MeetingUserJsonData.java

+ 34 - 0
parth5/parth5/package-lock.json

@@ -5,6 +5,7 @@
   "requires": true,
   "packages": {
     "": {
+      "name": "parth5",
       "version": "0.0.1",
       "dependencies": {
         "@angular/animations": "^11.2.10",
@@ -17,6 +18,7 @@
         "@angular/platform-browser-dynamic": "~11.2.0",
         "@angular/router": "~11.2.0",
         "@angular/service-worker": "^11.2.10",
+        "@capacitor/camera": "^6.0.1",
         "@ionic/angular": "^5.5.2",
         "@types/crypto-js": "^4.0.1",
         "@types/echarts": "^4.9.9",
@@ -1841,6 +1843,23 @@
         "to-fast-properties": "^2.0.0"
       }
     },
+    "node_modules/@capacitor/camera": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmmirror.com/@capacitor/camera/-/camera-6.0.1.tgz",
+      "integrity": "sha512-KGfjv8q0Q9OEcpBGqSSZD2yb1KeDe12mlzOOPp4wr6GvcOY0EIvZ0o3KiPXegLVuRZeemz71/lCxPHAQ/5gAiA==",
+      "peerDependencies": {
+        "@capacitor/core": "^6.0.0"
+      }
+    },
+    "node_modules/@capacitor/core": {
+      "version": "6.1.0",
+      "resolved": "https://registry.npmmirror.com/@capacitor/core/-/core-6.1.0.tgz",
+      "integrity": "sha512-Kt4ONm0X9xxJXn9Q73oBaKdzep5B/VJw3VjXa2eGul4cD2k37mJwgjpXSMRnLH0Aju5bCiRL8J/hMAfTlokO6A==",
+      "peer": true,
+      "dependencies": {
+        "tslib": "^2.1.0"
+      }
+    },
     "node_modules/@discoveryjs/json-ext": {
       "version": "0.5.2",
       "resolved": "https://registry.npm.taobao.org/@discoveryjs/json-ext/download/@discoveryjs/json-ext-0.5.2.tgz?cache=0&sync_timestamp=1608991822359&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40discoveryjs%2Fjson-ext%2Fdownload%2F%40discoveryjs%2Fjson-ext-0.5.2.tgz",
@@ -21271,6 +21290,21 @@
         "to-fast-properties": "^2.0.0"
       }
     },
+    "@capacitor/camera": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmmirror.com/@capacitor/camera/-/camera-6.0.1.tgz",
+      "integrity": "sha512-KGfjv8q0Q9OEcpBGqSSZD2yb1KeDe12mlzOOPp4wr6GvcOY0EIvZ0o3KiPXegLVuRZeemz71/lCxPHAQ/5gAiA==",
+      "requires": {}
+    },
+    "@capacitor/core": {
+      "version": "6.1.0",
+      "resolved": "https://registry.npmmirror.com/@capacitor/core/-/core-6.1.0.tgz",
+      "integrity": "sha512-Kt4ONm0X9xxJXn9Q73oBaKdzep5B/VJw3VjXa2eGul4cD2k37mJwgjpXSMRnLH0Aju5bCiRL8J/hMAfTlokO6A==",
+      "peer": true,
+      "requires": {
+        "tslib": "^2.1.0"
+      }
+    },
     "@discoveryjs/json-ext": {
       "version": "0.5.2",
       "resolved": "https://registry.npm.taobao.org/@discoveryjs/json-ext/download/@discoveryjs/json-ext-0.5.2.tgz?cache=0&sync_timestamp=1608991822359&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40discoveryjs%2Fjson-ext%2Fdownload%2F%40discoveryjs%2Fjson-ext-0.5.2.tgz",

+ 1 - 0
parth5/parth5/package.json

@@ -23,6 +23,7 @@
     "@angular/platform-browser-dynamic": "~11.2.0",
     "@angular/router": "~11.2.0",
     "@angular/service-worker": "^11.2.10",
+    "@capacitor/camera": "^6.0.1",
     "@ionic/angular": "^5.5.2",
     "@types/crypto-js": "^4.0.1",
     "@types/echarts": "^4.9.9",

+ 52 - 0
parth5/parth5/src/app/api/file/index.ts

@@ -0,0 +1,52 @@
+import {ConfigService, RequsetData} from "../../service/config.service";
+import {Injectable} from "@angular/core";
+import {Observable} from "rxjs";
+
+export interface base64File {
+  base64: string,
+  fileRefId: string,
+  fileType: number,
+  isImage: boolean
+}
+
+@Injectable({providedIn: 'root'})
+export class FileApi {
+  constructor(private configService: ConfigService) {
+  }
+
+  getFileList(pageIndex: number, pageSize: number, fileRefId: string, fileTypeId: number): Observable<RequsetData> {
+    return this.configService.HttpGetRomote('/appApi/file/getFileList', {
+      pageIndex: pageIndex,
+      pageSize: pageSize,
+      fileRefId: fileRefId,
+      fileTypeId: fileTypeId
+    });
+  }
+
+  delete(fileId: string) {
+    return this.configService.HttpPostRomote('/appApi/file/deleteFile', {
+      fileId: fileId
+    });
+  }
+
+  deleteByRefId(fileRefId: string, fileType: number) {
+    return this.configService.HttpPostRomote('/appApi/file/deleteFileByRefId', {
+      fileRefId: fileRefId,
+      fileType: fileType
+    });
+  }
+
+  getImageBase64(fileId: string) {
+    return this.configService.HttpGetRomote('/appApi/file/getImageBase64', {
+      fileId: fileId
+    });
+  }
+
+  uploadFileBase64(data: base64File) {
+    return this.configService.HttpPostRomote('/appApi/file/uploadBase64', {
+      fileList: JSON.stringify([data])
+    });
+  }
+
+}
+

+ 1 - 1
parth5/parth5/src/app/comm/modal/imglist/imglist.component.html

@@ -1,6 +1,6 @@
 <div class="img-list">
   <div class="img-item" *ngFor="let it of imgList;let index=index;">
-    <img src="{{webServerHost}}/appApi/home/showImg/{{it.fileid}}" (click)="showBigImage(index)"/>
+    <img [src]="it.trustUrl" (click)="showBigImage(index)"/>
     <ion-icon *ngIf="!imgOption.readonly" class="remove-icon" name="close-circle" color="danger"
               (click)="removeImg(it.fileid)"></ion-icon>
   </div>

+ 1 - 1
parth5/parth5/src/app/comm/modal/imglist/imglist.component.scss

@@ -3,7 +3,7 @@
   text-align: center;
   flex-direction: row;
   flex-wrap: wrap;
-  padding: 5px 10px;
+  padding: 5px;
 
   .img-item {
     width: 25%;

+ 153 - 148
parth5/parth5/src/app/comm/modal/imglist/imglist.component.ts

@@ -2,8 +2,10 @@ import {Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angula
 import {ConfigService, RequsetData} from "../../../service/config.service";
 import {UserService} from "../../../service/user.service";
 import {ActionSheetController, AlertController, LoadingController} from "@ionic/angular";
-import {ImgFileModel, JsBridgeService} from "../../../service/js-bridge.service";
 import {PhotoSwipeComponent} from "../photo-swipe/photo-swipe.component";
+import {base64File, FileApi} from "../../../api/file";
+import {Camera, CameraResultType, CameraSource} from "@capacitor/camera";
+import {DomSanitizer} from '@angular/platform-browser';
 
 @Component({
   selector: 'app-imglist',
@@ -19,88 +21,88 @@ export class ImglistComponent implements OnInit {
     fileRefid: '',
     fileName: '',
     fileType: '',
-    isMulti: false,
+    isMulti: true,
     readonly: true
   };
-
   @Input() imgList: any = [];
   @Output() imgListChange = new EventEmitter();
 
-  getImgUrl: string = '/appApi/home/getFileList';
-  deleteImgUrl: string = '/appApi/home/deleteFile';
-  webServerHost: string = '';
-  showImgUrl: string = "";
-  bigImage = false;
-  upLoadData: ImgFileModel;
   userInfo: any = [];
   loading: any = null;
-
+  imgExt = ['.jpg', '.bmp', '.png', '.gif', '.jpe', '.jpeg'];
 
   constructor(private configService: ConfigService, private userService: UserService, public alertController: AlertController,
-              public loadingController: LoadingController, private jsBridgeService: JsBridgeService, private actionSheetController: ActionSheetController) {
+              public loadingController: LoadingController, private actionSheetController: ActionSheetController
+    , private fileApi: FileApi, private sanitizer: DomSanitizer) {
   }
 
   ngOnInit() {
     this.userInfo = this.userService.GetUser();
-    this.configService.GetConfig().subscribe((config) => {
-      this.webServerHost = config.webServerHost;
-    });
 
     this.getImgList();
   }
 
   getImgList() {
-    this.configService.HttpGetRomote(this.getImgUrl, {
-      filerefid: this.imgOption.fileRefid,
-      fileTypeId: this.imgOption.fileType,
-      pageindex: 1,
-      pagesize: 1000
-    }).subscribe((data: RequsetData) => {
-      if (data.success) {
-        if (data.item != null) {
-          let  types= ['.jpg', '.bmp', '.png', '.gif', '.jpe', '.jpeg'];
-          let list = data.item.list.filter(it => {
-            return types.indexOf(it.filesuffix.toLowerCase())>-1
-          });
-          this.imgList = list;
-          this.imgListChange.emit(this.imgList);
-        }
+    this.fileApi.getFileList(1, 100, this.imgOption.fileRefid, this.imgOption.fileType).subscribe((data: RequsetData) => {
+      if (data.success && data.item != null) {
+        let filterList = data.item.list.filter(it => {
+          return this.imgExt.indexOf(it.filesuffix.toLowerCase()) > -1 && this.imgList.filter(e => e.fileid === it.fileid).length === 0
+        });
+
+        this.imgList = this.imgList.concat(filterList);
+
+        this.imgListChange.emit(this.imgList);
+
+        this.getImgBase64();
+
       }
     });
   }
 
+  getImgBase64() {
+    this.imgList.filter(e => !e.base64).forEach(img => {
+      this.fileApi.getImageBase64(img.fileid).subscribe((data: RequsetData) => {
+        if (data.success && data.item != null) {
+          img.base64 = "data:image/png;base64," + data.item.base64;
+          img.height = data.item.height;
+          img.width = data.item.width;
+          img.blobUrl = URL.createObjectURL(this.base64ToBlob(img.base64));
+          img.trustUrl = this.sanitizer.bypassSecurityTrustResourceUrl(img.blobUrl);
+        }
+      });
+    });
+  }
+
   //上传图片
   uploadImg() {
-    this.presentActionSheet();
+    this.takePicture();
     return null;
   }
 
   //删除图片
   removeImg(id) {
     this.presentAlertConfirm("确认删除?", () => {
-      this.configService.HttpPostRomote(this.deleteImgUrl, {
-        fileid: id
-      }).subscribe((fdata: RequsetData) => {
+      this.fileApi.delete(id).subscribe((fdata: RequsetData) => {
         if (fdata.success) {
-          this.getImgList();
+          /*this.getImgList();*/
+
+          this.imgList = this.imgList.filter(e => e.fileid != id);
         }
       });
     });
-
   }
 
-
   showBigImage(index) {
     try {
       var items = [];
       this.imgList.forEach(item => {
-        let url = this.webServerHost + "/appApi/home/showImg/" + item.fileid;
-        let img = this.getImageWidth(url) || {width: 500, height: 300};
+        let url = item.blobUrl;
+
         items.push({
           src: url,
-          w: img.width || 500,
-          h: img.height || 300
-        })
+          w: item.width || 500,
+          h: item.height || 300
+        });
       });
 
       this.photoSwipe.open(items, {
@@ -112,121 +114,123 @@ export class ImglistComponent implements OnInit {
     }
   }
 
-  getImageWidth(url) {
-    var u = navigator.userAgent;
-    var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
-    //var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
-    if (isAndroid) {
-      let obj = {width: 0, height: 0}
-      try {
-        var img = new Image();
-        img.src = url;
-        // 如果图片被缓存,则直接返回缓存数据
-        if (img.complete) {
-          obj.width = img.width;
-          obj.height = img.height;
-          return obj
+  //压缩图片
+  dealImage(path: string, w = 1000, callback: any) {
+    let thisComponent = this;
+    const newImage = new Image();
+    const size = this.calSize(path);//获取mb大小
+    let quality = 0.52
+    if (size <= 1) {//1 mb
+      quality = 0.9;
+    }
+    if (size > 1) {
+      quality = 0.8
+    }
+
+    newImage.src = path;
+    newImage.setAttribute("crossOrigin", 'Anonymous');    // url为外域时需要
+    let imgWidth;
+    let imgHeight;
+    newImage.onload = function () {
+      imgWidth = newImage.width;
+      imgHeight = newImage.height;
+      const canvas = document.createElement("canvas");
+      const ctx = canvas.getContext("2d") as any;
+      if (Math.max(imgWidth, imgHeight) > w) {
+        if (imgWidth > imgHeight) {
+          canvas.width = w;
+          canvas.height = w * imgHeight / imgWidth;
         } else {
-          img.onload = function () {
-            obj.width = img.width;
-            obj.height = img.height;
-            return obj
-          }
+          canvas.height = w;
+          canvas.width = w * imgWidth / imgHeight;
         }
-      } catch (e) {
-        this.presentAlert("图片高宽获取异常:" + e);
-        return obj;
+      } else {
+        canvas.width = imgWidth;
+        canvas.height = imgHeight;
       }
+
+      ctx.clearRect(0, 0, canvas.width, canvas.height);
+
+      ctx.drawImage(newImage, 0, 0, canvas.width, canvas.height);
+      const newBase64 = canvas.toDataURL("image/jpeg", quality);
+      callback(thisComponent, newBase64);
     }
   }
 
-  async presentActionSheet() {
-    const actionSheet = await this.actionSheetController.create({
-      header: '图片来源',
-      buttons: [{
-        text: '相机',
-        icon: 'aperture',
-        handler: () => {
-          this.jsBridgeService.GetCamera().subscribe(req => {
-            //alert('读取成功,'+req.data.fileExt);
-            this.upLoadData = {
-              file: req.data.fileData,
-              fileName: this.imgOption.fileName + '.' + req.data.fileExt,
-              fileRefID: this.imgOption.fileRefid,
-              fileType: this.imgOption.fileType,
-              uid: this.userInfo.userid
-            };
-
-            if ((!req.success) || this.upLoadData.file == null || this.upLoadData.file.length == 0) {
-              this.loading.dismiss();
-              this.presentAlert("上传图片base64为空!");
-              return;
-            }
-            this.presentLoading("正在上传...").then(val => {
-              this.jsBridgeService.UploadImg(this.upLoadData).subscribe(fildId => {
-                setTimeout(() => {
-                  this.loading.dismiss();
-                  //alert('上传成功,'+fildId);
-                  if (fildId) {
-                    this.getImgList();
-                  } else {
-                    this.presentAlert("上传图片失败!");
-                  }
-                }, 3000);
-
-              });
-            });
-          }, err => {
-            this.upLoadData = null;
-          });
-        }
-      }, {
-        text: '相册',
-        icon: 'folder',
-        handler: () => {
-          this.jsBridgeService.GetPic().subscribe(req => {
-            //alert('读取成功,'+req.data.fileExt);
-            this.upLoadData = {
-              file: req.data.fileData,
-              fileName: this.imgOption.fileName + '.' + req.data.fileExt,
-              fileRefID: this.imgOption.fileRefid,
-              fileType: this.imgOption.fileType,
-              uid: this.userInfo.userid
-            };
-
-            if ((!req.success) || this.upLoadData.file == null || this.upLoadData.file.length == 0) {
-              this.presentAlert("上传图片base64为空!");
-              return;
+  calSize(base64url: string) {
+    let str = base64url.replace('data:image/png;base64,', '');
+    const equalIndex = str.indexOf('=');
+    if (str.indexOf('=') > 0) {
+      str = str.substring(0, equalIndex);
+    }
+    const strLength = str.length;
+    const fileLength = strLength - (strLength / 8) * 2;
+    // 返回单位为MB的大小
+    return parseFloat((fileLength / (1024 * 1024)).toFixed(2));
+  }
+
+  base64ToBlob(data) {
+    var arr = data.split(','),
+      mime = arr[0].match(/:(.*?);/)[1],
+      bstr = atob(arr[1]),
+      n = bstr.length,
+      u8arr = new Uint8Array(n);
+
+    while (n--) {
+      u8arr[n] = bstr.charCodeAt(n);
+    }
+    return new Blob([u8arr], {type: mime});
+  }
+
+  async takePicture() {
+    const image = await Camera.getPhoto({
+      quality: 90,
+      allowEditing: true,
+      source: CameraSource.Photos,
+      resultType: CameraResultType.DataUrl
+    });
+
+    this.dealImage(image.dataUrl, 1000, this.saveImg);
+
+  }
+
+  async saveImg(thisComponent, base64Str) {
+    const fileModel: base64File = {
+      base64: base64Str,
+      fileRefId: thisComponent.imgOption.fileRefid,
+      fileType: thisComponent.imgOption.fileType,
+      isImage: true
+    }
+
+    await thisComponent.presentLoading('正在上传,请稍等...', 2000);
+
+    if (!thisComponent.imgOption.isMulti) {
+      thisComponent.fileApi.deleteByRefId(fileModel.fileRefId, fileModel.fileType).subscribe((data: RequsetData) => {
+        if (data.success) {
+          thisComponent.imgList = [];
+
+          thisComponent.fileApi.uploadFileBase64(fileModel).subscribe((data: RequsetData) => {
+            if (data.success) {
+              thisComponent.presentAlert("上传成功");
+              thisComponent.getImgList();
+            } else {
+              thisComponent.presentAlert(data.msg);
             }
-            this.presentLoading("正在上传...").then(val => {
-              this.jsBridgeService.UploadImg(this.upLoadData).subscribe(fildId => {
-                setTimeout(() => {
-                  this.loading.dismiss();
-                  //alert('上传成功,'+fildId);
-                  if (fildId) {
-                    this.getImgList();
-                  } else {
-                    this.presentAlert("上传图片失败!");
-                  }
-                }, 3000);
-
-              });
-            });
-
-          }, err => {
-            this.upLoadData = null;
           });
+        } else {
+          thisComponent.presentAlert("原文件删除失败!" + data.msg);
         }
-      }, {
-        text: '取消',
-        icon: 'close',
-        role: 'cancel',
-        handler: () => {
-          console.log('Cancel clicked');
+      });
+    } else {
+      thisComponent.fileApi.uploadFileBase64(fileModel).subscribe((data: RequsetData) => {
+        if (data.success) {
+          thisComponent.presentAlert("上传成功");
+          thisComponent.getImgList();
+        } else {
+          thisComponent.presentAlert(data.msg);
         }
-      }]
-    });
-    await actionSheet.present();
+      });
+    }
   }
 
   async presentAlert(msg: string) {
@@ -262,10 +266,11 @@ export class ImglistComponent implements OnInit {
     await alert.present();
   }
 
-  async presentLoading(msg: string) {
+  async presentLoading(msg: string, duration: number) {
     this.loading = await this.loadingController.create({
       message: msg,
-      spinner: 'circles'
+      spinner: 'circles',
+      duration: duration
     });
     return this.loading.present();
   }

+ 0 - 4
parth5/parth5/src/app/explore-container/explore-container.component.html

@@ -1,4 +0,0 @@
-<div id="container">
-  <strong>{{ name }}</strong>
-  <p>Explore <a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/components">UI Components</a></p>
-</div>

+ 0 - 27
parth5/parth5/src/app/explore-container/explore-container.component.scss

@@ -1,27 +0,0 @@
-#container {
-  text-align: center;
-
-  position: absolute;
-  left: 0;
-  right: 0;
-  top: 50%;
-  transform: translateY(-50%);
-}
-
-#container strong {
-  font-size: 20px;
-  line-height: 26px;
-}
-
-#container p {
-  font-size: 16px;
-  line-height: 22px;
-
-  color: #8c8c8c;
-
-  margin: 0;
-}
-
-#container a {
-  text-decoration: none;
-}

+ 0 - 24
parth5/parth5/src/app/explore-container/explore-container.component.spec.ts

@@ -1,24 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-import { IonicModule } from '@ionic/angular';
-
-import { ExploreContainerComponent } from './explore-container.component';
-
-describe('ExploreContainerComponent', () => {
-  let component: ExploreContainerComponent;
-  let fixture: ComponentFixture<ExploreContainerComponent>;
-
-  beforeEach(waitForAsync(() => {
-    TestBed.configureTestingModule({
-      declarations: [ ExploreContainerComponent ],
-      imports: [IonicModule.forRoot()]
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(ExploreContainerComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  }));
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 15
parth5/parth5/src/app/explore-container/explore-container.component.ts

@@ -1,15 +0,0 @@
-import { Component, OnInit, Input } from '@angular/core';
-
-@Component({
-  selector: 'app-explore-container',
-  templateUrl: './explore-container.component.html',
-  styleUrls: ['./explore-container.component.scss'],
-})
-export class ExploreContainerComponent implements OnInit {
-  @Input() name: string;
-
-  constructor() { }
-
-  ngOnInit() {}
-
-}

+ 0 - 14
parth5/parth5/src/app/explore-container/explore-container.module.ts

@@ -1,14 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { FormsModule } from '@angular/forms';
-
-import { IonicModule } from '@ionic/angular';
-
-import { ExploreContainerComponent } from './explore-container.component';
-
-@NgModule({
-  imports: [ CommonModule, FormsModule, IonicModule],
-  declarations: [ExploreContainerComponent],
-  exports: [ExploreContainerComponent]
-})
-export class ExploreContainerComponentModule {}

+ 0 - 55
parth5/parth5/src/app/home/editdues/editdues.component.html

@@ -1,55 +0,0 @@
-<ion-header class="header-theme2">
-  <ion-toolbar>
-    <ion-label class="title-center">缴费</ion-label>
-    <ion-buttons slot="start">
-      <ion-back-button icon="ios-back2" text="" mode="md"></ion-back-button>
-    </ion-buttons>
-  </ion-toolbar>
-</ion-header>
-<ion-content>
-  <ion-list style="background-color:white;border-radius: 10px;margin: 10px;">
-    <ion-item mode="md">
-      <ion-label>
-        所在支部
-      </ion-label>
-      <ion-label style="text-align: right">
-        {{userInfo.dzzmc}}
-      </ion-label>
-    </ion-item>
-    <ion-item mode="md">
-      <ion-label>
-        党员
-      </ion-label>
-      <ion-label style="text-align: right">
-        {{userInfo.xm}}
-      </ion-label>
-    </ion-item>
-    <ion-item mode="md">
-      <ion-label>
-        工号/学号
-      </ion-label>
-      <ion-label style="text-align: right">
-        {{userInfo.mobile}}
-      </ion-label>
-    </ion-item>
-  </ion-list>
-  <ion-list style="background-color:white;border-radius: 10px;margin: 10px;">
-    <ion-item mode="md">
-      <ion-label>
-        年月
-      </ion-label>
-      <ion-label style="text-align: right">
-        {{dataModel.YEAR}}年{{dataModel.MONTH}}月
-      </ion-label>
-    </ion-item>
-    <ion-item mode="md" style="--border-width: 0px;">
-      <ion-label>
-        应缴金额(元)
-      </ion-label>
-      <ion-input placeholder="请输入应缴金额" style="text-align: right;" [(ngModel)]="dataModel.MONEY" required></ion-input>
-    </ion-item>
-  </ion-list>
-  <div style="text-align: center;padding-top: 40px;" *ngIf="showBtn">
-    <ion-button style="width: 60%;font-size: 18px;font-weight: bold;" (click)="wxPay()">提交支付</ion-button>
-  </div>
-</ion-content>

+ 0 - 37
parth5/parth5/src/app/home/editdues/editdues.component.scss

@@ -1,37 +0,0 @@
-ion-content{
-  --background: #FAFAFA !important;
-}
-.user-panel {
-  display: flex;
-  /*background-color: #FAFAFA;*/
-  padding: 0px;
-  margin-top: 5px;
-  justify-content: space-between;
-
-  .user-panel-item {
-    flex: 0 0 49%;
-    background-color: #FAFAFA;
-    border-radius: 10px;
-    padding: 5px;
-
-
-    .item-label{
-      display: flex;
-      margin-bottom: 6px;
-      .item-flag{
-        height: 15px;
-        width: 4px;
-        border-radius: 8px;
-        margin-top: 4px;
-        margin-right: 7px;
-        background: linear-gradient(to bottom,#fdfde8,#DE4F3F);
-      }
-    }
-
-    .item-text{
-      color: #998989;
-      margin-top: 10px;
-    }
-  }
-
-}

+ 0 - 24
parth5/parth5/src/app/home/editdues/editdues.component.spec.ts

@@ -1,24 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-import { IonicModule } from '@ionic/angular';
-
-import { EditduesComponent } from './editdues.component';
-
-describe('EditduesComponent', () => {
-  let component: EditduesComponent;
-  let fixture: ComponentFixture<EditduesComponent>;
-
-  beforeEach(waitForAsync(() => {
-    TestBed.configureTestingModule({
-      declarations: [ EditduesComponent ],
-      imports: [IonicModule.forRoot()]
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(EditduesComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  }));
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 111
parth5/parth5/src/app/home/editdues/editdues.component.ts

@@ -1,111 +0,0 @@
-import {Component, OnInit} from '@angular/core';
-import {ActivatedRoute, Router} from "@angular/router";
-import {ConfigService, RequsetData} from "../../service/config.service";
-import {UserService} from "../../service/user.service";
-import {AlertController, LoadingController, ModalController, NavController} from "@ionic/angular";
-import {WxpayService} from "../../service/wxpay.service";
-import * as moment from "../home.page";
-import {PartyduesService} from "../../service/partydues.service";
-
-@Component({
-  selector: 'app-editdues',
-  templateUrl: './editdues.component.html',
-  styleUrls: ['./editdues.component.scss'],
-})
-export class EditduesComponent implements OnInit {
-
-  loading: any = null;
-  dataModel: any = {};
-  userInfo: any = {};
-  detailId: string = '';
-  showBtn: boolean = false;
-
-  constructor(private router: Router, private routeInfo: ActivatedRoute, private configService: ConfigService, private userService: UserService, public alertController: AlertController, public modalController: ModalController, private navCtrl: NavController
-    , private wxpayService: WxpayService, public loadingController: LoadingController, private partyduesService: PartyduesService) {
-    this.userInfo = this.userService.GetExt().userInfo;
-
-    this.routeInfo.queryParams.subscribe(params => {
-      this.detailId = params['id']
-    });
-
-    this.partyduesService.getDuesList().subscribe((data) => {
-      if (data && data.length > 0) {
-        this.dataModel = data.filter(it => it.DETAILID == this.detailId)[0];
-        this.showBtn = this.dataModel.payState != 1;
-      }
-    });
-
-    this.partyduesService.getUserdues();
-  }
-
-  ngOnInit() {
-
-  }
-
-  wxPay() {
-    if (this.wxpayService.isWechat()) {
-      let openID = this.userService.getOpenID();
-      if (!openID){
-        this.presentAlert("openID获取失败,不能在微信浏览器提交支付!");
-        return false;
-      }
-
-      this.presentLoading("提交中...").then(val => {
-        this.partyduesService.updatePayState(this.dataModel.DETAILID, null).then((upsResult: any) => {
-          if (upsResult.success == true) {
-            this.wxpayService.createForJSAPI(this.dataModel.DETAILID, this.dataModel.MONEY, this.dataModel.userName + this.dataModel.YEAR + "年" + this.dataModel.MONTH + "月党费", openID).then((res: any) => {
-              this.loading.dismiss();
-              if (res && res.prepayId) {
-                this.wxpayService.wxPay(res);
-              }
-            }, error => {
-              this.loading.dismiss();
-              this.presentAlert(error);
-            });
-          } else {
-            this.loading.dismiss();
-            this.presentAlert("提交失败," + upsResult.msg);
-          }
-        });
-      });
-    } else {
-      this.presentLoading("提交中...").then(val => {
-        this.partyduesService.updatePayState(this.dataModel.DETAILID, null).then((upsResult: any) => {
-          if (upsResult.success == true) {
-            this.wxpayService.createForMWEB(this.dataModel.DETAILID, this.dataModel.MONEY, this.dataModel.userName + this.dataModel.YEAR + "年" + this.dataModel.MONTH + "月党费", '/home').then((res: any) => {
-              this.loading.dismiss();
-              if (res && res.mwebUrl) {
-                window.location.href = res.mwebUrl;
-              }
-            }, error => {
-              this.loading.dismiss();
-              this.presentAlert(error);
-            });
-          } else {
-            this.loading.dismiss();
-            this.presentAlert("提交失败," + upsResult.msg);
-          }
-        });
-      });
-    }
-  }
-
-  async presentLoading(msg: string) {
-    this.loading = await this.loadingController.create({
-      message: msg,
-      spinner: 'circles'
-    });
-    return this.loading.present();
-  }
-
-  async presentAlert(msg: string) {
-    const alert = await this.alertController.create({
-      header: '提示',
-      subHeader: '',
-      message: msg,
-      buttons: ['确定']
-    });
-
-    await alert.present();
-  }
-}

+ 0 - 17
parth5/parth5/src/app/home/home-routing.module.ts

@@ -1,17 +0,0 @@
-import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
-
-import { HomePage } from './home.page';
-
-const routes: Routes = [
-  {
-    path: '',
-    component: HomePage
-  }
-];
-
-@NgModule({
-  imports: [RouterModule.forChild(routes)],
-  exports: [RouterModule],
-})
-export class HomePageRoutingModule {}

+ 0 - 31
parth5/parth5/src/app/home/home.module.ts

@@ -1,31 +0,0 @@
-import {NgModule} from '@angular/core';
-import {CommonModule} from '@angular/common';
-import {FormsModule} from '@angular/forms';
-
-import {IonicModule} from '@ionic/angular';
-
-import {HomePageRoutingModule} from './home-routing.module';
-
-import {HomePage} from './home.page';
-import {RouterModule, Routes} from "@angular/router";
-import {EditduesComponent} from "../home/editdues/editdues.component";
-
-const routes: Routes = [
-  {
-    path: '',
-    component: HomePage
-  },
-  {path: 'editdues', component: EditduesComponent}
-];
-
-@NgModule({
-  imports: [
-    CommonModule,
-    FormsModule,
-    IonicModule,
-    RouterModule.forChild(routes)
-  ],
-  declarations: [HomePage, EditduesComponent]
-})
-export class HomePageModule {
-}

+ 0 - 101
parth5/parth5/src/app/home/home.page.html

@@ -1,101 +0,0 @@
-<ion-header class="header-theme2">
-  <ion-toolbar>
-    <ion-label class="title-center">缴纳党费</ion-label>
-  </ion-toolbar>
-</ion-header>
-<ion-content>
-  <!-- <div class="mine-toolbar">
-     <div class="info-img">
-       <img class="img-user" src="assets/icon/icon-user-2x.png"/>
-     </div>
-     <div class="info-text">
-       <div class="info-text-name">{{user?.username}}</div>
-       <div class="info-text-dp">{{roleName}}</div>
-     </div>
-     &lt;!&ndash;<div class="btn-role" (click)="btnRoles(selectRoles)">
-       <img src="assets/icon/icon-change.png"/>
-       切换角色
-     </div>&ndash;&gt;
-   </div>-->
-  <div class="panel">
-    <div class="panel-title">
-      个人信息
-    </div>
-    <div class="panel-content user-panel">
-      <ion-label class="user-panel-item">
-        <div class="font-color item-label">
-          <div class="item-flag"></div>
-          姓名
-        </div>
-        <ion-text class="item-text"><h3>{{user?.username}}</h3></ion-text>
-      </ion-label>
-      <ion-label class="user-panel-item">
-        <div class="font-color item-label">
-          <div class="item-flag"></div>
-          工号/学号
-        </div>
-        <ion-text class="item-text"><h3>{{userInfo.mobile}}</h3></ion-text>
-      </ion-label>
-    </div>
-    <div class="panel-content user-panel">
-      <ion-label class="user-panel-item">
-        <div class="font-color item-label">
-          <div class="item-flag"></div>
-          所在党委
-        </div>
-        <ion-text class="item-text"><h3>{{userInfo.dwname}}</h3></ion-text>
-      </ion-label>
-      <ion-label class="user-panel-item">
-        <div class="font-color item-label">
-          <div class="item-flag"></div>
-          所在支部
-        </div>
-        <ion-text class="item-text"><h3>{{userInfo.dzzmc}}</h3></ion-text>
-      </ion-label>
-    </div>
-    <div class="panel-content user-panel">
-      <ion-label class="user-panel-item">
-        <div class="font-color item-label">
-          <div class="item-flag"></div>
-          入党时间
-        </div>
-        <ion-text class="item-text"><h3>{{userInfo.rdsj}}</h3></ion-text>
-      </ion-label>
-      <ion-label class="user-panel-item">
-        <div class="font-color item-label">
-          <div class="item-flag"></div>
-          政治面貌
-        </div>
-        <ion-text class="item-text"><h3>{{userInfo.ryztmc}}</h3></ion-text>
-      </ion-label>
-    </div>
-  </div>
-  <div class="panel">
-    <div class="panel-title" style="align-items: center;">
-      <div>
-        我的党费
-      </div>
-      <ion-select name="year"
-                  id="year" okText="确定" cancelText="取消" [(ngModel)]="year"
-                  interface="action-sheet" placeholder="请选择" (ionChange)="yearChange()">
-        <ion-select-option [value]="it" *ngFor="let it of yearList">{{it}}
-        </ion-select-option>
-      </ion-select>
-    </div>
-    <span class="sub-title">
-          ({{year}}年缴费记录,每月应缴{{duesInfo.money==null?0:duesInfo.money}}元)
-        </span>
-    <div class="panel-content fee-panel">
-      <div class="fee-box">
-        <div class="box-item" *ngFor="let item of duesList" (click)="payFee(item)">
-          <img *ngIf="item.payState==1" class="box-item-flag" src="assets/icon/icon-feeflag.svg">
-          <span [ngClass]="item.payState==1?'box-item-text':(item.isPay?'':'box-item-text-disabled')">{{item.MONTH}}月</span>
-        </div>
-        <div *ngIf="duesList.length==0">暂无记录</div>
-      </div>
-      <div style="text-align: center;padding: 20px 0;">
-        点击月份进入缴费
-      </div>
-    </div>
-  </div>
-</ion-content>

+ 0 - 162
parth5/parth5/src/app/home/home.page.scss

@@ -1,162 +0,0 @@
-.mine-toolbar{
-  background-image: url("../../assets/icon/user-bg.png");
-  background-repeat:no-repeat;
-  background-size: 100% 100%;
-  height: 130px;
-  display: flex;
-  align-items: center;
-  .info-img{
-    flex: 0 0 25%;
-    text-align: center;
-    margin-left: 30px;
-    margin-top: 3px;
-    img{
-      height: 100px;
-      width: 80px;
-      border-radius: 10px;
-      margin-top: 10px;
-    }
-  }
-  .info-text{
-    flex: 1;
-    flex-direction: column;
-    margin-top: 10px;
-    color:var(--ion-color-primary-contrast);
-    .info-text-name{
-      font-size:20px;
-    }
-    .info-text-dp{
-      font-size: 16px;
-      opacity: 0.5;
-      color: white !important;
-    }
-    div {
-      padding-left: 5px;
-    }
-  }
-  .btn-role{
-    img{
-      height: 11px;
-    }
-    margin-right: 20px;
-    /*margin-bottom: 20px;*/
-    color: white;
-    border-radius: 20px;
-    background-color: rgba(255, 255, 255, 0.2);
-    padding: 2px 10px 3px 10px;
-    font-size: 14px;
-    margin-top: 10px;
-  }
-}
-
-ion-content {
-  --background: white !important;
-}
-
-.item-menu{
-  img{
-    width: 24px;
-    height: 24px;
-  }
-}
-
-.fee-panel {
-  background-color: #FAFAFA;
-
-  .fee-box {
-    display: flex;
-    text-align: center;
-    flex-direction: row;
-    flex-wrap: wrap;
-    padding: 3px;
-
-    .box-item {
-      box-sizing: border-box;
-      width: calc((100% - 30px) / 4);
-      height: 80px;
-      line-height: 80px;
-      background: #fff;
-      display: inline-block;
-      border-radius: 8px;
-      line-height: 80px;
-      text-align: center;
-      font-size: 18px;
-      margin-right:10px;
-      margin-bottom:10px;
-
-      .box-item-flag{
-        float: right;
-        height: 20px;
-        border-top-right-radius: 8px;
-      }
-
-      .box-item-text{
-        position: relative;
-        right: -9px;
-      }
-
-      .box-item-text-disabled{
-        color: #ddd;
-      }
-    }
-
-    .box-item:nth-child(4n) {
-      margin-right:0px;
-    }
-  }
-
-  /*自定义滚动条的伪对象选择器, CSS 可以隐藏滚动条*/
-  .fee-box::-webkit-scrollbar {
-    display: none;
-  }
-}
-
-.user-panel {
-  display: flex;
-  /*background-color: #FAFAFA;*/
-  padding: 0px;
-  margin-top: 5px;
-  justify-content: space-between;
-
-  .user-panel-item {
-    flex: 0 0 49%;
-    background-color: #FAFAFA;
-    border-radius: 10px;
-    padding: 5px;
-
-
-    .item-label{
-      display: flex;
-      margin-bottom: 6px;
-      .item-flag{
-        height: 15px;
-        width: 4px;
-        border-radius: 8px;
-        margin-top: 4px;
-        margin-right: 7px;
-        background: linear-gradient(to bottom,#fdfde8,#DE4F3F);
-      }
-    }
-
-    .item-text{
-      color: #998989;
-      margin-top: 10px;
-    }
-  }
-
-}
-
-.roles-select{
-  max-width: 60%;
-}
-
-ion-list{
-  padding: 0px;
-  ion-item{
-    --min-height: 42px;
-    ion-label{
-      margin: 0px;
-    }
-  }
-}
-

+ 0 - 24
parth5/parth5/src/app/home/home.page.spec.ts

@@ -1,24 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-import { IonicModule } from '@ionic/angular';
-
-import { HomePage } from './home.page';
-
-describe('HomePage', () => {
-  let component: HomePage;
-  let fixture: ComponentFixture<HomePage>;
-
-  beforeEach(waitForAsync(() => {
-    TestBed.configureTestingModule({
-      declarations: [ HomePage ],
-      imports: [IonicModule.forRoot()]
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(HomePage);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  }));
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 82
parth5/parth5/src/app/home/home.page.ts

@@ -1,82 +0,0 @@
-import {Component, OnInit} from '@angular/core';
-import {ConfigService, RequsetData} from "../service/config.service";
-import {UserService} from "../service/user.service";
-import {WorkService} from "../service/work.service";
-import {UsemodularService} from "../service/usemodular.service";
-import {WxpayService} from "../service/wxpay.service";
-import {ActivatedRoute, Router} from "@angular/router";
-import {ModalController, AlertController, LoadingController} from "@ionic/angular";
-import * as moment from "moment";
-import {PartyduesService} from "../service/partydues.service";
-
-@Component({
-  selector: 'app-home',
-  templateUrl: './home.page.html',
-  styleUrls: ['./home.page.scss'],
-})
-export class HomePage implements OnInit {
-
-  getDataUrl: string = '/appApi/party/getUserInfo';
-  userInfo: any = {};
-  user: any = {};
-  duesInfo: any = {};
-  duesList: any = [];
-  webServerHost: string = '';
-  year: any = new Date().getFullYear();
-  yearList: any[] = [];
-
-  constructor(private router: Router, private routeInfo: ActivatedRoute, private configService: ConfigService, private userService: UserService, private usemodularService: UsemodularService, private workService: WorkService,
-              public alertController: AlertController, private wxpayService: WxpayService, private partyduesService: PartyduesService) {
-  }
-
-  ionViewWillEnter(){
-    this.wxpayService.query().then((outTradeNo: string) => {
-      this.partyduesService.updatePayState(null, outTradeNo).then(upsResult => {
-        this.partyduesService.getUserdues();
-      });
-    });
-  }
-
-  ngOnInit() {
-    this.configService.GetConfig().subscribe((config) => {
-      this.webServerHost = config.webServerHost;
-    });
-    this.user = this.userService.GetUser();
-    this.userInfo = this.userService.GetExt().userInfo;
-    this.getYearList();
-    this.yearChange();
-
-    this.partyduesService.getDuesInfo().subscribe((data) => {
-      this.duesInfo = data || {};
-    });
-    this.partyduesService.getDuesList().subscribe((data) => {
-      this.duesList = data || [];
-    });
-
-    this.wxpayService.query().then((outTradeNo: string) => {
-      this.partyduesService.updatePayState(null, outTradeNo).then(upsResult => {
-        this.partyduesService.getUserdues();
-      });
-    });
-  }
-
-  getYearList() {
-    for (var i = 2022; i <= new Date().getFullYear(); i++) {
-      this.yearList.push(i);
-    }
-  }
-
-  yearChange() {
-    this.partyduesService.setYear(this.year)
-  }
-
-  payFee(data) {
-    if (!data.isPay)
-      return false;
-    this.router.navigate(['editdues'], {
-      relativeTo: this.routeInfo,
-      queryParams: {id: data.DETAILID, random: Math.random()}
-    });
-  }
-
-}

+ 10 - 7
parth5/parth5/src/app/views/pages/partylife/shyk/edit/edit.component.ts

@@ -45,14 +45,14 @@ export class EditComponent implements OnInit {
     fileRefid: '',
     fileName: '',
     fileType: 1,
-    isMulti: true,
+    isMulti: false,
     readonly: false
   };
   imgOption2: any = {
     fileRefid: '',
     fileName: '',
     fileType: 2,
-    isMulti: true,
+    isMulti: false,
     readonly: false
   };
 
@@ -65,6 +65,7 @@ export class EditComponent implements OnInit {
     this.userInfo = this.userService.GetUser();
     this.routeInfo.queryParams.subscribe(params => {
       this.dataModel.meetingid = params['id'];
+      this.op = parseInt(params['op']);
       this.imgOption1.fileRefid = this.dataModel.meetingid;
       this.imgOption2.fileRefid = this.dataModel.meetingid;
 
@@ -110,6 +111,8 @@ export class EditComponent implements OnInit {
           this.dataModel.chairuser = this.userInfo.username;
           this.dataModel.partycode = this.userService.GetUser().dataDzzdm.length <= 9 ? this.userInfo.DZZDM : this.userService.GetUser().dataDzzdm;
           this.dataModel.partyname = this.userService.GetUser().dataDzzdm.length <= 9 ? this.userInfo.DZZMC : this.userService.GetUser().dataDzzmc;
+
+          this.setMeetingname(this.dataModel.shyktype);
         }
 
         this.imgOption1.fileRefid = this.dataModel.meetingid;
@@ -167,9 +170,9 @@ export class EditComponent implements OnInit {
           } else {
             this.presentAlert(fdata.msg);
           }
-          this.cancel();
-          this.eventService.eventEmit.emit('reloadShykList', '刷新页面');
-          this.workService.getWorkSettingList();
+          this.back();
+          /*this.eventService.eventEmit.emit('reloadShykList', '刷新页面');
+          this.workService.getWorkSettingList();*/
         } else {
           this.presentAlert(fdata.msg);
         }
@@ -288,8 +291,8 @@ export class EditComponent implements OnInit {
   }
 
   //取消
-  cancel() {
-    this.router.navigate(['../shykindex'], {relativeTo: this.routeInfo});
+  back() {
+    this.router.navigate(['../../shyk'], {relativeTo: this.routeInfo});
   }
 
   async presentLoading(msg: string) {

+ 1 - 1
parth5/parth5/src/app/views/pages/partylife/shyk/shyk.component.html

@@ -18,7 +18,7 @@
 <ion-content>
   <ion-list>
     <ion-item-sliding *ngFor="let item of dataList">
-      <ion-item detail class="border-item" [routerLink]="['../shykdetail']"
+      <ion-item detail class="border-item" [routerLink]="['./detail']"
                 [queryParams]="{id: item.MEETINGID}">
         <ion-label text-wrap>
           <ion-row>

+ 1 - 1
parth5/parth5/src/app/views/pages/partylife/shyk/shyk.component.ts

@@ -137,7 +137,7 @@ export class ShykComponent implements OnInit {
 
     const {data} = await modal.onWillDismiss();
     if (data && data.success) {
-      this.searchParams.type = data.params.type;
+      /*this.searchParams.type = data.params.type;*/
       this.searchParams.shykType = data.params.shykType;
       this.searchParams.startDate = data.params.startDate;
       this.searchParams.endDate = data.params.endDate;

+ 6 - 0
parth5/parth5/src/app/views/pages/study/againt/againt.component.html

@@ -0,0 +1,6 @@
+<ion-content>
+  <div class="building">
+    <img class="building-img" src="assets/icon/education.svg">
+    <ion-text class="building-text">建设中...</ion-text>
+  </div>
+</ion-content>

+ 13 - 0
parth5/parth5/src/app/views/pages/study/againt/againt.component.scss

@@ -0,0 +1,13 @@
+.building {
+  display: flex;
+  flex-direction: column;
+  margin: 15px 0;
+  .building-img{
+    width: 20%;
+    display: flex;
+    align-self: center;
+  }
+  .building-text{
+    text-align: center;
+  }
+}

+ 27 - 0
parth5/parth5/src/app/views/pages/study/againt/againt.component.spec.ts

@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { AgaintComponent } from './againt.component';
+
+describe('AgaintComponent', () => {
+  let component: AgaintComponent;
+  let fixture: ComponentFixture<AgaintComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ AgaintComponent ],
+      schemas: [CUSTOM_ELEMENTS_SCHEMA],
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(AgaintComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 14 - 0
parth5/parth5/src/app/views/pages/study/againt/againt.component.ts

@@ -0,0 +1,14 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-againt',
+  templateUrl: './againt.component.html',
+  styleUrls: ['./againt.component.scss'],
+})
+export class AgaintComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {}
+
+}

+ 7 - 0
parth5/parth5/src/app/views/pages/study/education/education.component.html

@@ -0,0 +1,7 @@
+
+<ion-content>
+  <div class="building">
+    <img class="building-img" src="assets/icon/education.svg">
+    <ion-text class="building-text">建设中...</ion-text>
+  </div>
+</ion-content>

+ 13 - 0
parth5/parth5/src/app/views/pages/study/education/education.component.scss

@@ -0,0 +1,13 @@
+.building {
+  display: flex;
+  flex-direction: column;
+  margin: 15px 0;
+  .building-img{
+    width: 20%;
+    display: flex;
+    align-self: center;
+  }
+  .building-text{
+    text-align: center;
+  }
+}

+ 27 - 0
parth5/parth5/src/app/views/pages/study/education/education.component.spec.ts

@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { EducationComponent } from './education.component';
+
+describe('EducationComponent', () => {
+  let component: EducationComponent;
+  let fixture: ComponentFixture<EducationComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ EducationComponent ],
+      schemas: [CUSTOM_ELEMENTS_SCHEMA],
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(EducationComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 14 - 0
parth5/parth5/src/app/views/pages/study/education/education.component.ts

@@ -0,0 +1,14 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-education',
+  templateUrl: './education.component.html',
+  styleUrls: ['./education.component.scss'],
+})
+export class EducationComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {}
+
+}

+ 16 - 0
parth5/parth5/src/app/views/pages/study/partycourse/fileshower/fileshower.component.html

@@ -0,0 +1,16 @@
+<ion-header id="main-content" mode="md">
+  <ion-toolbar>
+    <ion-buttons slot="start">
+      <ion-button (click)="close()">
+        <ion-icon name="arrow-back-outline" size="large" class="back-img"></ion-icon>
+      </ion-button>
+    </ion-buttons>
+    <ion-label>{{pdfTitle}}</ion-label>
+  </ion-toolbar>
+</ion-header>
+<ion-content fullscreen="true">
+  <pinch-zoom>
+    <pdf-viewer [src]="safeUrl" [render-text]="false" [show-all]="true"
+                [original-size]="false" [autoresize]="true" class="pdf-viewer"></pdf-viewer>
+  </pinch-zoom>
+</ion-content>

+ 7 - 0
parth5/parth5/src/app/views/pages/study/partycourse/fileshower/fileshower.component.scss

@@ -0,0 +1,7 @@
+.pdf-viewer{
+  border: 0;
+  height: 100%;
+  width:100%;
+}
+
+

+ 6 - 6
parth5/parth5/src/app/views/tapp/tab-user/tab-user.page.spec.ts

@@ -1,19 +1,19 @@
 import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
 import { IonicModule } from '@ionic/angular';
 
-import { TabUserPage } from './tab-user.page';
+import { FileshowerComponent } from './fileshower.component';
 
-describe('TabUserPage', () => {
-  let component: TabUserPage;
-  let fixture: ComponentFixture<TabUserPage>;
+describe('FileshowerComponent', () => {
+  let component: FileshowerComponent;
+  let fixture: ComponentFixture<FileshowerComponent>;
 
   beforeEach(waitForAsync(() => {
     TestBed.configureTestingModule({
-      declarations: [ TabUserPage ],
+      declarations: [ FileshowerComponent ],
       imports: [IonicModule.forRoot()]
     }).compileComponents();
 
-    fixture = TestBed.createComponent(TabUserPage);
+    fixture = TestBed.createComponent(FileshowerComponent);
     component = fixture.componentInstance;
     fixture.detectChanges();
   }));

+ 38 - 0
parth5/parth5/src/app/views/pages/study/partycourse/fileshower/fileshower.component.ts

@@ -0,0 +1,38 @@
+import {Component, Input, OnInit} from '@angular/core';
+import {ConfigService} from "../../../service/config.service";
+import {ModalController} from "@ionic/angular";
+import { DomSanitizer } from '@angular/platform-browser';
+
+@Component({
+  selector: 'app-fileshower',
+  templateUrl: './fileshower.component.html',
+  styleUrls: ['./fileshower.component.scss'],
+})
+export class FileshowerComponent implements OnInit {
+
+  pdfUrl:string='/appApi/FileMgr/showDoc/';
+
+  safeUrl:any;
+
+  @Input()
+  pdfTitle:string='';
+
+  @Input()
+  fileId: string;
+
+  constructor(private configService:ConfigService,public modalController: ModalController,private sanitizer: DomSanitizer) { }
+
+  ngOnInit() {
+
+    this.configService.GetConfig().subscribe(config=>{
+      //this.sanitizer.bypassSecurityTrustResourceUrl(
+      this.safeUrl=config.webServerHost+this.pdfUrl+this.fileId;
+    });
+
+  }
+
+  close(){
+    this.modalController.dismiss({});
+  }
+
+}

+ 62 - 0
parth5/parth5/src/app/views/pages/study/partycourse/partycourse.component.html

@@ -0,0 +1,62 @@
+<ion-header id="main-content">
+  <ion-toolbar>
+    <ion-label style="font-size: 20px;">制度学习</ion-label>
+    <ion-searchbar slot="end" mode="ios" enterkeyhint="search" placeholder="搜索文件名称" showCancelButton="never" (ionChange)="searchChange($event)"></ion-searchbar>
+  </ion-toolbar>
+  <div class="panel-background search-panel">
+    <div class="search-label">
+      当前选中制度:
+    </div>
+    <div class="search-text">
+      <span>{{fileTypeData.fileTypeName}}</span>
+      <div class="select-right" (click)="selectFileType()">
+        <span>选目录</span>
+        <img src="assets/icon/icon-treeparty.png" height="16" width="16"/>
+      </div>
+    </div>
+  </div>
+  <ion-item class="item-filter item-title">
+  </ion-item>
+</ion-header>
+<ion-content>
+  <ion-list>
+    <ion-item class="item1" (click)="ShowPdf(it)" *ngFor="let it of dataList$|async">
+      <ion-label>
+        <h4>{{it.FILENAME}}</h4>
+        <p class="item-fileno">类型:{{it.FILETYPENAME}}</p>
+      </ion-label>
+      <ion-img src="assets/icon/read-book.svg" class="img-read" slot="end"></ion-img>
+    </ion-item>
+  </ion-list>
+  <ion-infinite-scroll threshold="100px" (ionInfinite)="scroll($event)">
+    <ion-infinite-scroll-content
+      loadingSpinner="bubbles"
+      loadingText="{{total>searchParams.pageIndex*searchParams.pageSize?'正在加载...':'暂无更多'}}">
+    </ion-infinite-scroll-content>
+  </ion-infinite-scroll>
+</ion-content>
+<ion-menu menuId="typeRoot" side="end" type="overlay" class="menu-body" contentId="main-content">
+  <ion-header class="menu-header">
+    <ion-icon name="close-circle-outline" class="btn-close" (click)="CloseMenu()"></ion-icon>
+    <ion-toolbar>
+      <ion-buttons slot="start">
+        <ion-button [hidden]="fileTypeData.selectedParent==null" (click)="BackMenu()">
+          <ion-icon class="back-img" name="arrow-back-outline"></ion-icon>
+        </ion-button>
+      </ion-buttons>
+      <ion-label [class]="{'filetype-selected':selectedTitle()}" (click)="SelectTitleFileType()" class="header-title">{{fileTypeData.pSelectedName}}</ion-label>
+    </ion-toolbar>
+  </ion-header>
+  <ion-content class="menu-content">
+    <ion-list>
+      <ion-item *ngFor="let it of typeList" (click)="ShowKidsFileType(it)">
+        <ion-label [class]="{'filetype-selected':selectedItem(it)}" >{{it.filetypename}}</ion-label>
+        <ion-icon [hidden]="it.childcount==0"   name="chevron-forward-outline" slot="end"></ion-icon>
+      </ion-item>
+    </ion-list>
+  </ion-content>
+  <ion-toolbar id="menu-bar" class="toolbar-center">
+    <ion-button color="light" (click)="CloseMenu()" mode="ios">关闭</ion-button>
+    <ion-button color="danger" (click)="chooseFileType()" mode="ios">选择</ion-button>
+  </ion-toolbar>
+</ion-menu>

+ 160 - 0
parth5/parth5/src/app/views/pages/study/partycourse/partycourse.component.scss

@@ -0,0 +1,160 @@
+:host{
+  --background:#000000;
+}
+
+.building {
+  display: flex;
+  flex-direction: column;
+  margin: 15px 0;
+  .building-img{
+    width: 20%;
+    display: flex;
+    align-self: center;
+  }
+  .building-text{
+    text-align: center;
+  }
+}
+.toolbar-label{
+  padding-left: 10px;
+}
+.search-panel {
+  padding: 5px 15px 15px 15px;
+  .search-label {
+    opacity: 0.75;
+    font-size: 14px;
+  }
+
+  .search-text {
+    display: flex;
+    justify-content: space-between;
+    padding-top: 15px;
+
+    div {
+      display: flex;
+      cursor: pointer;
+
+      img {
+        padding-left: 2px;
+      }
+    }
+  }
+}
+
+.filetype-selected {
+  color: #DE4F3F !important;
+}
+
+.back-btn {
+  padding: 10px;
+}
+
+#menu-bar{
+  margin-bottom: 40px;
+  :nth-child(1){
+    margin-right: 15px;
+    width: 100px;
+  }
+  :nth-child(2){
+    margin-left: 15px;
+    width: 100px;
+  }
+}
+
+.item-title{
+  height: 6px;
+}
+
+.item1{
+  --background:#F8F9FC;
+  --border-radius:10pt;
+  margin: 5px;
+
+  .img-read {
+    height: 22px;
+    width: 22px;
+  }
+}
+
+.search-panel {
+  padding: 5px 15px 15px 15px;
+
+  .search-label {
+    opacity: 0.75;
+    font-size: 14px;
+  }
+
+  .search-text {
+    display: flex;
+    justify-content: space-between;
+    padding-top: 15px;
+
+    ion-icon {
+      padding-top: 3px;
+    }
+
+    .select-right{
+      display: flex;
+      cursor: pointer;
+      margin-right: 15px;
+      img{
+        margin-left: 2px;
+        margin-top: 3px;
+      }
+    }
+  }
+}
+
+.selected {
+  color: #DE4F3F;
+
+  .img-check {
+    margin-right: 8px;
+  }
+}
+
+.menu-content {
+  .up-title {
+    color: #DE4F3F;
+  }
+
+}
+
+.menu-body {
+  --background: transparent;
+
+  .menu-header {
+    border-top-left-radius: 8px;
+    background: white;
+    --background: #fff;
+
+    ion-toolbar {
+      --background: #fff;
+      border-top-left-radius: 8px;
+    }
+    .back-img {
+      color: #380F0A;
+    }
+    .header-title {
+      padding: 20px 15px 10px 15px;
+      font-size: 15px;
+      color: #380F0A;
+      font-weight: bold;
+    }
+
+    .btn-close {
+      font-size: 22px;
+      padding: 10px 0 0 10px;
+      color: #5E4545;
+      cursor: pointer;
+    }
+  }
+
+  .toolbar-center {
+    border-bottom-left-radius: 8px;
+  }
+}
+
+
+
+

+ 27 - 0
parth5/parth5/src/app/views/pages/study/partycourse/partycourse.component.spec.ts

@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PartycourseComponent } from './partycourse.component';
+
+describe('PartycourseComponent', () => {
+  let component: PartycourseComponent;
+  let fixture: ComponentFixture<PartycourseComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ PartycourseComponent ],
+      schemas: [CUSTOM_ELEMENTS_SCHEMA],
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(PartycourseComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 301 - 0
parth5/parth5/src/app/views/pages/study/partycourse/partycourse.component.ts

@@ -0,0 +1,301 @@
+import {Component, Inject, OnInit} from '@angular/core';
+import {ActivatedRoute, Router} from "@angular/router";
+import {ConfigService, RequsetData} from "../../service/config.service";
+import {UserService} from "../../service/user.service";
+import {AlertController, MenuController, ModalController} from "@ionic/angular";
+import {PartycourseService, IFileParams} from '../../api/partycourse.service';
+import {Observable, Subject} from 'rxjs';
+import {FileshowerComponent} from './fileshower/fileshower.component';
+import {
+  debounceTime, distinctUntilChanged, switchMap, map, tap
+} from 'rxjs/operators';
+import {DOCUMENT} from "@angular/common";
+import {ShowpdfComponent} from "../../comm/modal/showpdf/showpdf.component";
+
+@Component({
+  selector: 'app-partycourse',
+  templateUrl: './partycourse.component.html',
+  styleUrls: ['./partycourse.component.scss'],
+})
+export class PartycourseComponent implements OnInit {
+
+  private searchFiles = new Subject<any>();
+  dataList$: Observable<any[]>;
+  dataParams: any = {
+    target: null,
+    total: 10,
+    searchParams: null
+  };
+  searchParams: IFileParams = {
+    pageIndex: 1,
+    pageSize: 10,
+    fileTypeId: '',
+    fileName: ''
+  };
+
+  dataList: any[] = [];
+  typeList: any[] = [];
+
+  total: number = 30;
+  fileTypeData: any = {
+    title: '全部目录',
+    allTypeName: '制度查询',
+    pSelectedName: '全部目录',
+    rootKids: [],
+    selectedNode: null,
+    selectedParent: null,
+    fileTypeName: ''
+  };
+  sourceType: null;
+
+  constructor(private router: Router, private routeInfo: ActivatedRoute, private partycourseService: PartycourseService, private configService: ConfigService, private userService: UserService,
+              public alertController: AlertController, private menu: MenuController, private modal: ModalController, @Inject(DOCUMENT) private document: any) {
+
+
+  }
+
+  ionViewWillEnter(): void {
+    this.searchParams.pageIndex = 1;
+  }
+
+  ngOnInit() {
+
+    this.dataList$ = this.searchFiles.pipe(
+      debounceTime(300),
+      distinctUntilChanged(null, x => x.searchParams.fileName + x.searchParams.fileTypeId + x.searchParams.pageIndex + x.searchParams.pageSize),
+      switchMap((params: any) => {
+
+        let sMap = this.partycourseService.GetFileListByType(params.searchParams).pipe(map(x => {
+
+          //this.total=x.item.total;
+          this.dataParams.total = x.item.total;
+
+          if (params.target) {
+            this.dataList = this.dataList.concat(x.item.list);
+            params.target.complete();
+          } else {
+            this.dataList = x.item.list;
+          }
+
+          return this.dataList;
+        }));
+
+        return sMap;
+      })
+    );
+    this.routeInfo.queryParams.subscribe(params => {
+      this.sourceType = params['sourceType'] == undefined ? null : params['sourceType'];
+      this.partycourseService.GetfileTypeRoot({sourceType: this.sourceType}).subscribe(next => {
+
+        this.fileTypeData.rootKids = next.item;
+        if (this.fileTypeData.rootKids.length > 0) {
+          if (this.sourceType != null) {
+            this.fileTypeData.selectedNode = this.fileTypeData.rootKids[0];
+            this.searchParams.fileTypeId = this.fileTypeData.selectedNode.filetypeid.toString();
+            this.fileTypeData.fileTypeName = this.fileTypeData.selectedNode.filetypename;
+          }
+          this.dataParams.searchParams = this.searchParams;
+          this.dataParams.target = null;
+          this.searchFiles.next(this.dataParams);
+          //this.loadFilesbyType();
+        }
+        this.typeList = this.fileTypeData.rootKids;
+      });
+    });
+  }
+
+
+  scroll(event) {
+
+    if (this.dataParams.total > this.searchParams.pageIndex * this.searchParams.pageSize) {
+      this.searchParams.pageIndex += 1;
+      //this.getList();
+      this.dataParams.target = event.target;
+      //this.dataParams.searchParams=this.searchParams;
+      this.searchFiles.next(this.dataParams);
+    } else {
+      setTimeout(() => {
+        event.target.complete();
+      }, 500);
+    }
+    /*
+      setTimeout(() => {
+        //event.target.complete();
+
+        }
+      }, 500);*/
+  }
+
+  back() {
+    this.router.navigateByUrl('/main/tabs/tab3');
+    //this.navCtrl.back();
+  }
+
+  searchChange(event) {
+    /*
+    this.fieldList[0].value = event.detail.value;
+    this.searchParams.dzzmc = event.detail.value;
+    this.reload();*/
+
+    //this.searchFiles.next(event.detail.value);
+
+    this.searchParams.fileName = event.detail.value;
+    this.searchParams.pageIndex = 1;
+    this.dataParams.target = null;
+    this.searchFiles.next(this.dataParams);
+    /*
+    this.searchParams.pageIndex=1;
+    this.dataList.length=0;
+    this.searchParams.fileTypeId=null;
+    this.fileTypeData.fileTypeName="";
+    this.loadFilesBySearch();*/
+  }
+
+  loadFilesBySearch() {
+
+    this.partycourseService.GetfileListByKey(this.searchParams).subscribe(next => {
+      //next.item
+      this.dataList = this.dataList.concat(next.item.list);
+    });
+
+  }
+
+  loadFilesbyType() {
+    //this.partycourseService.GetFileListByType(this.searchParams)
+
+    this.partycourseService.GetFileListByType(this.searchParams).subscribe(next => {
+      //next.item
+      //this.dataList=this.dataList.concat(next.item.list);
+
+    });
+  }
+
+  selectFileType() {
+    this.menu.enable(true, 'typeRoot').then(a => {
+    });
+    this.menu.open('typeRoot').then(a => {
+    });
+  }
+
+  ClickPFileType(it: any) {
+    /*
+    this.fileTypeData.pSelectedId=it.filetypeid;
+    this.fileTypeData.pSelectedName=it.filetypename;*/
+    //this.fileTypeData.selectedId=it.
+    this.fileTypeData.selectedNode = it;
+
+  }
+
+  selectedItem(it: any) {
+    let result = false;
+    if (this.fileTypeData.selectedNode != null) {
+      result = this.fileTypeData.selectedNode.filetypeid == it.filetypeid;
+    }
+    return result;
+  }
+
+  selectedTitle() {
+    let result = false;
+
+    if (this.fileTypeData.selectedNode == null) {
+      result = true;
+    } else {
+      if (this.fileTypeData.selectedParent != null) {
+        result = this.fileTypeData.selectedNode.filetypeid == this.fileTypeData.selectedParent.filetypeid;
+      }
+    }
+
+    return result;
+  }
+
+  SelectTitleFileType() {
+    this.fileTypeData.selectedNode = this.fileTypeData.selectedParent;
+  }
+
+  ShowKidsFileType(it: any) {
+    //this.ClickPFileType(it);
+    this.fileTypeData.selectedNode = it;
+
+    if (it.childcount == 0) {
+      return true;
+    }
+
+    this.fileTypeData.pSelectedName = it.filetypename;
+    this.fileTypeData.selectedParent = it;
+
+    if (it.kids != null) {
+      this.typeList = it.kids;
+
+    } else {
+      this.partycourseService.GetileTypesByParent(it.filetypeid).subscribe(req => {
+        it.kids = req.item;
+        it.kids.forEach(kit => {
+          kit.parent = it;
+        });
+        this.typeList = it.kids;
+
+      });
+    }
+
+  }
+
+  BackMenu() {
+    if (this.fileTypeData.selectedParent != null) {
+      this.fileTypeData.selectedNode = this.fileTypeData.selectedParent;
+      this.fileTypeData.selectedParent = this.fileTypeData.selectedParent.parent;
+    }
+
+    if (this.fileTypeData.selectedParent != null) {
+      this.typeList = this.fileTypeData.selectedParent.kids;
+    } else {
+      this.typeList = this.fileTypeData.rootKids;
+      this.fileTypeData.pSelectedName = this.fileTypeData.title;
+      this.fileTypeData.selectedNode = null;
+    }
+  }
+
+  CloseMenu() {
+    this.menu.close('typeRoot').then(a => {
+    });
+  }
+
+  chooseFileType() {
+    if (this.fileTypeData.selectedNode == null) {
+      this.searchParams.fileTypeId = '';
+      this.fileTypeData.fileTypeName = this.fileTypeData.title;
+    } else {
+      this.searchParams.fileTypeId = this.fileTypeData.selectedNode.filetypeid.toString();
+      this.fileTypeData.fileTypeName = this.fileTypeData.selectedNode.filetypename;
+    }
+    this.searchParams.pageIndex = 1;
+    this.dataParams.target = null;
+    //this.searchParams.fileName="";
+    //this.dataList.length=0;
+    this.searchFiles.next(this.dataParams);
+    //this.loadFilesbyType();
+    this.CloseMenu();
+  }
+
+  ShowPdf(it: any) {
+    let pdfModal = this.modal.create({
+      component: ShowpdfComponent,
+      componentProps: {
+        pdfTitle: it.FILENAME,
+        // pdfUrl:"/assets/study/pdf/"+it.URL
+        pdfUrl: '/appApi/FileMgr/showDoc/' + it.FILEID,
+        pointType: 2,
+        fileid: it.FILEID,
+        duration: it.DURATION
+      }
+    });
+    this.configService.HttpGetRomote('/appApi/onlineCourse/insertCourseRecord', {
+      courseId: it.FILEID,
+      studentUserId: this.userService.GetUser().userid, pointType: 2, title: it.FILENAME,
+      userName: this.userService.GetUser().username
+    }).subscribe((data: RequsetData) => {
+      if (data.success) {
+      }
+    });
+    pdfModal.then(a => a.present());
+  }
+}

+ 6 - 0
parth5/parth5/src/app/views/pages/study/rule/rule.component.html

@@ -0,0 +1,6 @@
+<ion-content>
+  <div class="building">
+    <img class="building-img" src="assets/icon/education.svg">
+    <ion-text class="building-text">建设中...</ion-text>
+  </div>
+</ion-content>

+ 13 - 0
parth5/parth5/src/app/views/pages/study/rule/rule.component.scss

@@ -0,0 +1,13 @@
+.building {
+  display: flex;
+  flex-direction: column;
+  margin: 15px 0;
+  .building-img{
+    width: 20%;
+    display: flex;
+    align-self: center;
+  }
+  .building-text{
+    text-align: center;
+  }
+}

+ 27 - 0
parth5/parth5/src/app/views/pages/study/rule/rule.component.spec.ts

@@ -0,0 +1,27 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { RuleComponent } from './rule.component';
+
+describe('RuleComponent', () => {
+  let component: RuleComponent;
+  let fixture: ComponentFixture<RuleComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ RuleComponent ],
+      schemas: [CUSTOM_ELEMENTS_SCHEMA],
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(RuleComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 14 - 0
parth5/parth5/src/app/views/pages/study/rule/rule.component.ts

@@ -0,0 +1,14 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-rule',
+  templateUrl: './rule.component.html',
+  styleUrls: ['./rule.component.scss'],
+})
+export class RuleComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {}
+
+}

+ 1 - 1
parth5/parth5/src/app/views/tapp/tab-main/tab-main-routing.module.ts

@@ -1,7 +1,7 @@
 import {NgModule} from '@angular/core';
 import {RouterModule} from '@angular/router';
 
-import {routes} from "./tab-main-routes";
+import {routes} from "./tab-main.route";
 
 
 @NgModule({

+ 4 - 2
parth5/parth5/src/app/views/tapp/tab-main/tab-main.module.ts

@@ -6,13 +6,14 @@ import {TabMainPageRoutingModule} from './tab-main-routing.module';
 import {PartysearchComponent} from "../../../comm/modal/partysearch/partysearch.component";
 import {PartytreeComponent} from "../../../comm/modal/partytree/partytree.component";
 import {SearchComponent} from "../../../comm/modal/search/search.component";
-import {routes} from "./tab-main-routes";
+import {routes} from "./tab-main.route";
 import {EmptyComponent} from "../../../comm/modal/empty/empty.component";
 import {Routes} from "@angular/router";
 import {PartyselectComponent} from "../../../comm/modal/partyselect/partyselect.component";
 import {ImglistComponent} from "../../../comm/modal/imglist/imglist.component";
 import {PhotoshowComponent} from "../../../comm/modal/photoshow/photoshow.component";
 import {PhotoSwipeComponent} from "../../../comm/modal/photo-swipe/photo-swipe.component";
+import {MyfilterPipe} from "../../../comm/pipes/myfilter.pipe";
 
 const pubComponents = [
   PartysearchComponent,
@@ -22,7 +23,8 @@ const pubComponents = [
   PartyselectComponent,
   ImglistComponent,
   PhotoshowComponent,
-  PhotoSwipeComponent
+  PhotoSwipeComponent,
+  MyfilterPipe
 ];
 
 /*function getRoutesComponent(routes: Routes) {

+ 0 - 24
parth5/parth5/src/app/views/tapp/tab-main/tab-main.page.spec.ts

@@ -1,24 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-import { IonicModule } from '@ionic/angular';
-
-import { TabMainPage } from './tab-main.page';
-
-describe('TabMainPage', () => {
-  let component: TabMainPage;
-  let fixture: ComponentFixture<TabMainPage>;
-
-  beforeEach(waitForAsync(() => {
-    TestBed.configureTestingModule({
-      declarations: [ TabMainPage ],
-      imports: [IonicModule.forRoot()]
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(TabMainPage);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  }));
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

parth5/parth5/src/app/views/tapp/tab-main/tab-main-routes.ts → parth5/parth5/src/app/views/tapp/tab-main/tab-main.route.ts


+ 10 - 0
parth5/parth5/src/app/views/tapp/tab-study/tab-study-routing.module.ts

@@ -0,0 +1,10 @@
+import { NgModule } from '@angular/core';
+import { RouterModule } from '@angular/router';
+import { routes } from "./tab-study.route";
+
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class TabStudyPageRoutingModule {}

+ 24 - 0
parth5/parth5/src/app/views/tapp/tab-study/tab-study.module.ts

@@ -0,0 +1,24 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+
+import { IonicModule } from '@ionic/angular';
+
+import { TabStudyPageRoutingModule } from './tab-study-routing.module';
+
+import { routes } from "./tab-study.route";
+
+const pubComponents = [
+
+];
+
+@NgModule({
+  imports: [
+    CommonModule,
+    FormsModule,
+    IonicModule,
+    TabStudyPageRoutingModule
+  ],
+  declarations: [...routes.map(e => e.component), ...pubComponents]
+})
+export class TabStudyPageModule {}

+ 25 - 0
parth5/parth5/src/app/views/tapp/tab-study/tab-study.page.html

@@ -0,0 +1,25 @@
+<ion-header>
+  <ion-toolbar color="danger">
+    <ion-input clearInput placeholder="输入查询标题"></ion-input>
+  </ion-toolbar>
+</ion-header>
+<ion-content>
+  <ion-tabs>
+    <ion-tab-bar slot="top" class="tab-bar">
+      <ion-tab-button tab="education">
+        <ion-label>专题教育</ion-label>
+      </ion-tab-button>
+      <ion-tab-button routerLink="/main/tabs/tab3/partycourse">
+        <ion-label>党课</ion-label>
+      </ion-tab-button>
+      <ion-tab-button tab="againt">
+        <ion-label>反腐倡廉</ion-label>
+      </ion-tab-button>
+      <ion-tab-button tab="rule">
+        <ion-label>法律法规</ion-label>
+      </ion-tab-button>
+    </ion-tab-bar>
+  </ion-tabs>
+
+
+</ion-content>

+ 14 - 0
parth5/parth5/src/app/views/tapp/tab-study/tab-study.page.scss

@@ -0,0 +1,14 @@
+ion-tab-button {
+  font-size: 16px;
+  color: black;
+}
+ion-tab-button.tab-selected {
+  color: red;
+  text-decoration: red;
+  text-decoration-style: solid;
+  text-decoration-line: underline;
+}
+
+.tab-bar{
+  --background:#ffeff1;
+}

+ 15 - 0
parth5/parth5/src/app/views/tapp/tab-study/tab-study.page.ts

@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-tab-study',
+  templateUrl: './tab-study.page.html',
+  styleUrls: ['./tab-study.page.scss'],
+})
+export class TabStudyPage implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+}

+ 9 - 0
parth5/parth5/src/app/views/tapp/tab-study/tab-study.route.ts

@@ -0,0 +1,9 @@
+import {Routes} from "@angular/router";
+import {TabStudyPage} from "./tab-study.page";
+
+export const routes: Routes = [
+  {
+    path: '',
+    component: TabStudyPage
+  },
+];

+ 2 - 10
parth5/parth5/src/app/views/tapp/tab-user/tab-user-routing.module.ts

@@ -1,14 +1,6 @@
 import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
-
-import { TabUserPage } from './tab-user.page';
-
-const routes: Routes = [
-  {
-    path: '',
-    component: TabUserPage
-  }
-];
+import { RouterModule } from '@angular/router';
+import { routes } from './tab-user.route'
 
 @NgModule({
   imports: [RouterModule.forChild(routes)],

+ 6 - 2
parth5/parth5/src/app/views/tapp/tab-user/tab-user.module.ts

@@ -6,7 +6,11 @@ import { IonicModule } from '@ionic/angular';
 
 import { TabUserPageRoutingModule } from './tab-user-routing.module';
 
-import { TabUserPage } from './tab-user.page';
+import { routes } from "./tab-user.route";
+
+const pubComponents = [
+
+];
 
 @NgModule({
   imports: [
@@ -15,6 +19,6 @@ import { TabUserPage } from './tab-user.page';
     IonicModule,
     TabUserPageRoutingModule
   ],
-  declarations: [TabUserPage]
+  declarations: [...routes.map(e => e.component), ...pubComponents]
 })
 export class TabUserPageModule {}

+ 108 - 6
parth5/parth5/src/app/views/tapp/tab-user/tab-user.page.html

@@ -1,9 +1,111 @@
-<ion-header>
-  <ion-toolbar>
-    <ion-title>tab_User</ion-title>
-  </ion-toolbar>
-</ion-header>
-
 <ion-content>
+  <div class="mine-toolbar">
+    <div class="info-img">
+      <img class="img-user" src="{{webServerHost}}/appApi/home/showDbImg/{{user.userid}}" onerror="this.src='assets/icon/icon-user-2x.png'"/>
+    </div>
+    <div class="info-text">
+      <div class="info-text-name">{{user?.username}}</div>
+      <div class="info-text-dp">{{roleName}}</div>
 
+    </div>
+    <div class="btn-role" (click)="btnRoles(selectRoles)">
+      <img src="assets/icon/icon-change.png"/>
+      切换角色
+    </div>
+  </div>
+  <div class="panel">
+    <div class="panel-title">
+      我的组织
+    </div>
+    <div class="panel-content user-panel">
+      <ion-label class="user-panel-item">
+        <div class="font-color item-label">
+          <div class="item-flag"></div>
+          所在党委
+        </div>
+        <ion-text class="item-text"><h3>{{dataModel.dwname}}</h3></ion-text>
+      </ion-label>
+      <ion-label class="user-panel-item">
+        <div class="font-color item-label">
+          <div class="item-flag"></div>
+          所在支部
+        </div>
+        <ion-text class="item-text"><h3>{{dataModel.dzzmc}}</h3></ion-text>
+      </ion-label>
+    </div>
+    <div class="panel-content user-panel">
+      <ion-label class="user-panel-item">
+        <div class="font-color item-label">
+          <div class="item-flag"></div>
+          入党时间
+        </div>
+        <ion-text class="item-text"><h3>{{dataModel.rdsj}}</h3></ion-text>
+      </ion-label>
+      <ion-label class="user-panel-item">
+        <div class="font-color item-label">
+          <div class="item-flag"></div>
+          政治面貌
+        </div>
+        <ion-text class="item-text"><h3>{{dataModel.ryztmc}}</h3></ion-text>
+      </ion-label>
+    </div>
+    <div *ngIf="dataModel.contactpoint != '' && dataModel.contactpoint != null" class="panel-content user-panel">
+      <ion-label class="user-panel-item" style="flex: 0 0 100%;">
+        <div class="font-color item-label">
+          <div class="item-flag"></div>
+          领导班子成员联系点
+        </div>
+        <ion-text class="item-text"><h3>{{dataModel.contactpoint}}</h3></ion-text>
+      </ion-label>
+    </div>
+  </div>
+  <div class="panel">
+    <div class="panel-title">
+      <div>
+        我的党费
+        <span class="sub-title">({{duesInfo.year}}年缴费记录,每月应缴{{duesInfo.money==null?0:duesInfo.money}}元)</span>
+      </div>
+    </div>
+    <div class="panel-content fee-panel">
+      <div class="fee-box">
+        <div class="box-item" *ngFor="let item of duesList">
+          <img *ngIf="item.ISHAV>0" class="box-item-flag" src="assets/icon/icon-feeflag.svg">
+          <span [ngClass]="item.ISHAV>0?'box-item-text':''" >{{item.MONTH}}月</span>
+        </div>
+      </div>
+    </div>
+  </div>
+  <ion-list>
+    <ion-item class="item-menu" routerLink="./partyUser/detail" [queryParams]="{rybm:dataModel.rybm}" detail>
+      <img src="assets/icon/icon-mine-userinfo.png" slot="start">
+      <ion-label>个人信息</ion-label>
+    </ion-item>
+    <ion-item class="item-menu" detail>
+      <img src="assets/icon/icon-mine-democracy.png" slot="start">
+      <ion-label>民主评议</ion-label>
+    </ion-item>
+    <ion-item class="item-menu" detail>
+      <img src="assets/icon/icon-mine-train.png" slot="start">
+      <ion-label>培训情况</ion-label>
+    </ion-item>
+    <ion-item class="item-menu" detail>
+      <img src="assets/icon/icon-mine-reward.png" slot="start">
+      <ion-label>评先情况</ion-label>
+    </ion-item>
+    <ion-item class="item-menu" detail>
+      <img src="assets/icon/icon-mine-punish.png" slot="start">
+      <ion-label>纪律处分情况</ion-label>
+    </ion-item>
+    <ion-item class="item-menu" detail>
+      <img src="assets/icon/icon-mine-help.png" slot="start">
+      <ion-label>党内关怀帮扶信息</ion-label>
+    </ion-item>
+    <ion-item [hidden]="true" class="item-menu">
+      <img src="assets/icon/change-role.svg" slot="start">
+      <ion-label>切换角色</ion-label>
+      <ion-select slot="end" #selectRoles class="roles-select" [value]="curRoleId" okText="确定" cancelText="取消" (ionChange)="RoleChange($event)">
+        <ion-select-option [value]="r.roleid" *ngFor="let r of userRoles">{{r.rolename}}</ion-select-option>
+      </ion-select>
+    </ion-item>
+  </ion-list>
 </ion-content>

+ 162 - 0
parth5/parth5/src/app/views/tapp/tab-user/tab-user.page.scss

@@ -0,0 +1,162 @@
+.mine-toolbar{
+  background-image: url("../../../../assets/icon/user-bg.png");
+  background-repeat:no-repeat;
+  background-size: 100% 100%;
+  height: 130px;
+  display: flex;
+  align-items: center;
+  .info-img{
+    flex: 0 0 25%;
+    text-align: center;
+    margin-left: 30px;
+    margin-top: 3px;
+    img{
+      height: 85px;
+      width: 80px;
+      border-radius: 10px;
+      margin-top: 10px;
+    }
+  }
+  .info-text{
+    flex: 1;
+    flex-direction: column;
+    margin-top: 10px;
+    color:var(--ion-color-primary-contrast);
+    .info-text-name{
+      font-size:20px;
+
+    }
+    .info-text-dp{
+      font-size: 16px;
+      opacity: 0.5;
+
+      color: white !important;
+    }
+    .info-text-pt{
+      font-size: 16px;
+
+      color: white !important;
+    }
+    div {
+      padding-left: 5px;
+      margin-top: 5px;
+    }
+  }
+  .btn-role{
+    img{
+      height: 11px;
+    }
+    margin-right: 20px;
+    /*margin-bottom: 20px;*/
+    color: white;
+    border-radius: 20px;
+    background-color: rgba(255, 255, 255, 0.2);
+    padding: 2px 10px 3px 10px;
+    font-size: 14px;
+    margin-top: 10px;
+  }
+}
+
+ion-content {
+  --background: white !important;
+}
+
+.item-menu{
+  img{
+    width: 24px;
+    height: 24px;
+  }
+}
+
+.fee-panel {
+  overflow: hidden;
+  background-color: #DB4E3E;
+  padding: 10px 5px;
+  background: linear-gradient(to right,#DB4E3E 80%,#8d8181);
+
+  .fee-box {
+    white-space: nowrap; /*文本不会换行,文本会在在同一行上继续*/
+    overflow-y: auto; /*可滑动*/
+
+    .box-item {
+      width: 50px;
+      height: 50px;
+      background: #fff;
+      display: inline-block;
+      border-radius: 8px;
+      line-height: 60px;
+      text-align: center;
+      font-size: 18px;
+      margin: 0 7px;
+
+      .box-item-flag{
+        float: right;
+        height: 20px;
+        border-top-right-radius: 8px;
+      }
+
+      .box-item-text{
+        position: relative;
+        right: -9px;
+      }
+    }
+  }
+
+  /*自定义滚动条的伪对象选择器, CSS 可以隐藏滚动条*/
+  .fee-box::-webkit-scrollbar {
+    display: none;
+  }
+}
+
+.user-panel {
+  display: flex;
+  /*background-color: #FAFAFA;*/
+  padding: 0px;
+  margin-top: 5px;
+  justify-content: space-between;
+
+  .user-panel-item {
+    flex: 0 0 49%;
+    background-color: #FAFAFA;
+    border-radius: 10px;
+    padding: 5px;
+
+
+    .item-label{
+      display: flex;
+      margin-bottom: 6px;
+      .item-flag{
+        height: 15px;
+        width: 4px;
+        border-radius: 8px;
+        margin-top: 4px;
+        margin-right: 7px;
+        background: linear-gradient(to bottom,#fdfde8,#DE4F3F);
+      }
+    }
+
+    .item-text{
+      color: #998989;
+      margin-top: 10px;
+    }
+  }
+
+}
+
+.roles-select{
+  max-width: 60%;
+}
+
+ion-list{
+  padding: 0px;
+  ion-item{
+    --min-height: 42px;
+    ion-label{
+      margin: 0px;
+    }
+  }
+}
+.img-points {
+  width: 22px;height: 22px;
+  vertical-align: middle;
+}

+ 79 - 2
parth5/parth5/src/app/views/tapp/tab-user/tab-user.page.ts

@@ -1,4 +1,9 @@
-import { Component, OnInit } from '@angular/core';
+import {Component, OnInit} from '@angular/core';
+import {ConfigService, RequsetData} from "../../../service/config.service";
+import {UserService} from "../../../service/user.service";
+import {WorkService} from "../../../service/work.service";
+import {UsemodularService} from "../../../service/usemodular.service";
+import {Router} from "@angular/router";
 
 @Component({
   selector: 'app-tab-user',
@@ -7,9 +12,81 @@ import { Component, OnInit } from '@angular/core';
 })
 export class TabUserPage implements OnInit {
 
-  constructor() { }
+  getDataUrl: string = '/appApi/party/getUserInfo';
+  getUserduesUrl: string = '/appApi/party/getUserDuesInfo';
+  dataModel: any = {};
+  user: any = {};
+  duesInfo: any = {};
+  userPoints: any = {GETPOINT: 0};
+  duesList: any = [];
+  userRoles: any[] = [];
+  curRoleId: string = '';
+  roleName: string = '';
+  webServerHost: string = '';
+
+  constructor(private router: Router, private configService: ConfigService, private userService: UserService, private usemodularService: UsemodularService, private workService: WorkService) {
+
+  }
 
   ngOnInit() {
+    this.configService.GetConfig().subscribe((config) => {
+      this.webServerHost = config.webServerHost;
+    });
+    this.user = this.userService.GetUser();
+    this.userRoles = this.userService.GetExt().userRoles;
+    this.curRoleId = this.user.curRoleId;
+    this.getRoleName();
+    this.getData();
+    this.getUserdues();
+  }
+
+  ionViewWillEnter(): void {
+
+  }
+
+  getData() {
+    this.configService.HttpGetRomote(this.getDataUrl, {
+      rybm: this.userService.GetUser().userid
+    }).subscribe((data: RequsetData) => {
+      if (data.success) {
+        this.dataModel = data.item;
+      }
+    });
+  }
+
+  getUserdues() {
+    this.configService.HttpGetRomote(this.getUserduesUrl, {
+      rybm: this.userService.GetUser().userid,
+      year: new Date().getFullYear()
+    }).subscribe((data: RequsetData) => {
+      if (data.success) {
+        this.duesInfo = data.item;
+        this.duesList = data.extdata.userMonthList;
+      }
+    });
+  }
+
+  RoleChange(e) {
+    this.user.curRoleId = e.detail.value;
+    this.userService.SetUser(this.user);
+    this.getRoleName();
+    this.userService.ReadUserDataScope(this.user.curRoleId, this.configService).then((data) => {
+      this.workService.getWorkSettingList();
+    });
+    this.usemodularService.getUseModularList();
+    this.usemodularService.getModularDataList();
+    this.usemodularService.getButtonList();
+    console.log("RoleChange,value:" + e.detail.value);
+    //this.router.navigateByUrl('/main/tabs/tab1');
+  }
+
+  btnRoles(e) {
+    e.el.open().then(a => {
+    });
+  }
+
+  getRoleName() {
+    this.roleName = this.userRoles.filter(it => it.roleid == this.user.curRoleId)[0].rolename;
   }
 
 }

+ 11 - 0
parth5/parth5/src/app/views/tapp/tab-user/tab-user.route.ts

@@ -0,0 +1,11 @@
+import {Routes} from "@angular/router";
+import {TabUserPage} from "./tab-user.page";
+import partyUserRoutes from "../../../routes/partyUser";
+
+export const routes: Routes = [
+  {
+    path: '',
+    component: TabUserPage
+  },
+  ...partyUserRoutes,
+];

+ 0 - 24
parth5/parth5/src/app/views/tapp/tab-work/tab-work.page.spec.ts

@@ -1,24 +0,0 @@
-import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
-import { IonicModule } from '@ionic/angular';
-
-import { TabWorkPage } from './tab-work.page';
-
-describe('TabWorkPage', () => {
-  let component: TabWorkPage;
-  let fixture: ComponentFixture<TabWorkPage>;
-
-  beforeEach(waitForAsync(() => {
-    TestBed.configureTestingModule({
-      declarations: [ TabWorkPage ],
-      imports: [IonicModule.forRoot()]
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(TabWorkPage);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  }));
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 4 - 0
parth5/parth5/src/app/views/tapp/tabs/tabs-routing.module.ts

@@ -15,6 +15,10 @@ const routes: Routes = [
         path: 'tabWork',
         loadChildren: () => import('../tab-work/tab-work.module').then(m => m.TabWorkPageModule)
       },
+      {
+        path: 'tabStudy',
+        loadChildren: () => import('../tab-study/tab-study.module').then(m => m.TabStudyPageModule)
+      },
       {
         path: 'tabUser',
         loadChildren: () => import('../tab-user/tab-user.module').then(m => m.TabUserPageModule)

+ 5 - 3
parth5/parth5/src/app/views/tapp/tabs/tabs.page.html

@@ -4,12 +4,14 @@
       <img src="assets/icon/tab_main.svg"/>
       <ion-label >首页</ion-label>
     </ion-tab-button>
-
-    <ion-tab-button class="tab-zuzhi"  tab="tabWork">
+    <ion-tab-button class="tab-zuzhi" tab="tabWork">
       <img src="assets/icon/tab_work.svg"/>
       <ion-label>工作提醒</ion-label>
     </ion-tab-button>
-
+    <ion-tab-button class="tab-xuexi" tab="tabStudy">
+      <img src="assets/icon/tab_xuexi.svg"/>
+      <ion-label>制度查询</ion-label>
+    </ion-tab-button>
     <ion-tab-button class="tab-me" tab="tabUser">
       <img src="assets/icon/tab_me.svg" />
       <ion-label>我的</ion-label>

+ 3 - 102
src/main/java/com/ghsc/partybuild/controller/SHYKController.java

@@ -1,8 +1,10 @@
 package com.ghsc.partybuild.controller;
 
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.ghsc.partybuild.vo.shyk.DecisionUserJsonData;
+import com.ghsc.partybuild.vo.shyk.MeetingTopicJsonData;
+import com.ghsc.partybuild.vo.shyk.MeetingUserJsonData;
 import com.github.pagehelper.PageInfo;
 import com.ghsc.partybuild.controller.jsonmodel.RequsetData;
 import com.ghsc.partybuild.model.*;
@@ -1250,104 +1252,3 @@ public class SHYKController {
 
 }
 
-@JsonIgnoreProperties(ignoreUnknown = true)
-class MeetingTopicJsonData {
-    private String mbmc;
-    private String id;
-
-    public String getMbmc() {
-        return mbmc;
-    }
-
-    public void setMbmc(String mbmc) {
-        this.mbmc = mbmc;
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-}
-
-@JsonIgnoreProperties(ignoreUnknown = true)
-class MeetingUserJsonData {
-    private String rybm;
-    private String xm;
-    private String szdzbdm;
-    private String dzzmc;
-    private Integer signinstatus;
-    private String userremark;
-
-    public Integer getSigninstatus() {
-        return signinstatus;
-    }
-
-    public void setSigninstatus(Integer signinstatus) {
-        this.signinstatus = signinstatus;
-    }
-
-    public String getUserremark() {
-        return userremark;
-    }
-
-    public void setUserremark(String userremark) {
-        this.userremark = userremark;
-    }
-
-    public String getRybm() {
-        return rybm;
-    }
-
-    public void setRybm(String rybm) {
-        this.rybm = rybm;
-    }
-
-    public String getXm() {
-        return xm;
-    }
-
-    public void setXm(String xm) {
-        this.xm = xm;
-    }
-
-    public String getSzdzbdm() {
-        return szdzbdm;
-    }
-
-    public void setSzdzbdm(String szdzbdm) {
-        this.szdzbdm = szdzbdm;
-    }
-
-    public String getDzzmc() {
-        return dzzmc;
-    }
-
-    public void setDzzmc(String dzzmc) {
-        this.dzzmc = dzzmc;
-    }
-}
-
-@JsonIgnoreProperties(ignoreUnknown = true)
-class DecisionUserJsonData {
-    private String content;
-    private String jymbid;
-
-    public String getJymbid() {
-        return jymbid;
-    }
-
-    public void setJymbid(String jymbid) {
-        this.jymbid = jymbid;
-    }
-
-    public String getContent() {
-        return content;
-    }
-
-    public void setContent(String content) {
-        this.content = content;
-    }
-}

+ 1 - 1
src/main/java/com/ghsc/partybuild/controller/AppCgjqController.java

@@ -1,4 +1,4 @@
-package com.ghsc.partybuild.controller;
+package com.ghsc.partybuild.controller.app;
 
 import com.github.pagehelper.PageInfo;
 import com.ghsc.partybuild.controller.jsonmodel.RequsetData;

+ 1 - 1
src/main/java/com/ghsc/partybuild/controller/AppDicController.java

@@ -1,4 +1,4 @@
-package com.ghsc.partybuild.controller;
+package com.ghsc.partybuild.controller.app;
 
 import com.ghsc.partybuild.controller.jsonmodel.RequsetData;
 import com.ghsc.partybuild.model.*;

+ 134 - 0
src/main/java/com/ghsc/partybuild/controller/app/AppFileController.java

@@ -0,0 +1,134 @@
+package com.ghsc.partybuild.controller.app;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.ghsc.partybuild.controller.jsonmodel.RequsetData;
+import com.ghsc.partybuild.filter.exception.RespGenerstor;
+import com.ghsc.partybuild.model.CfFile;
+import com.ghsc.partybuild.service.FileService;
+import com.ghsc.partybuild.service.UserService;
+import com.ghsc.partybuild.util.JsonMapper;
+import com.ghsc.partybuild.vo.ImageBase64Vo;
+import com.ghsc.partybuild.vo.UploadFileBase64Vo;
+import com.github.pagehelper.PageInfo;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Base64;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+@RestController
+@RequestMapping(value = "/appApi/file")
+public class AppFileController {
+    @Autowired
+    private FileService fileService;
+
+    @Autowired
+    private UserService userService;
+
+    /**
+     * @Description //TODO 查询cf_file表附件
+     * @Date 17:32 2019/7/31
+     * @Param [fileRefID, fileTypeId, pageIndex, pageSize]
+     **/
+    @GetMapping("/getFileList")
+    public RequsetData<PageInfo<Map<String, Object>>> getFileList(@RequestParam("pageIndex") Integer pageIndex, @RequestParam("pageSize") Integer pageSize,
+                                                                  @RequestParam(required = false) String fileRefId, @RequestParam(required = false) Integer fileTypeId) {
+        RequsetData<PageInfo<Map<String, Object>>> res = new RequsetData<>();
+
+        res.setItem(fileService.getFileList(fileRefId, fileTypeId, pageIndex, pageSize));
+
+        return res;
+    }
+
+    @ResponseBody
+    @PostMapping("/fileupload")
+    public RequsetData<String> FileUpload(@RequestBody Map<String, Object> map) {
+        RequsetData<String> res = new RequsetData<>();
+        log.info("FileUpload,上传图片名:[fileName:" + map.get("fileName") + "],[fileRefID:" + map.get("fileRefID") + "],[uid:" + map.get("uid") + "]");
+        res.setItem(fileService.SaveFile((String) map.get("file"), (String) map.get("fileName"), (String) map.get("fileRefID"), (String) map.get("uid"), (Integer) map.get("fileType")));
+        return res;
+    }
+
+    @PostMapping({"/showImg"})
+    @ResponseBody
+    public RequsetData<String> showImg(@RequestBody Map<String, Object> reqmMap) {
+        RequsetData<String> res = new RequsetData<>();
+        Map<String, Object> ext = new HashMap<>();
+        String imgType = "image/";
+        try {
+
+            ByteArrayOutputStream bout = new ByteArrayOutputStream();
+            /*
+            response.setContentType("image/png");
+            OutputStream os = response.getOutputStream();*/
+            String fileId = reqmMap.get("id").toString();
+            CfFile file = fileService.downFtpFile(fileId, bout);
+
+            String img = Base64.getEncoder().encodeToString(bout.toByteArray());
+            res.setItem(img);
+            ext.put("fileType", imgType + file.getFilesuffix().substring(1));
+            res.setExtdata(ext);
+            /*
+            response.setContentType(imgType + file.getFilesuffix().substring(1));*/
+        } catch (Exception ex) {
+            res.setSuccess(false);
+            res.setMsg(ex.getMessage());
+        }
+
+        return res;
+    }
+
+    @ResponseBody
+    @PostMapping("/FindTestResult")
+    public RequsetData<Map<String, Object>> FindTestResult(@RequestBody JsonNode reqMap) {
+
+        RequsetData<Map<String, Object>> res = new RequsetData<>();
+
+        String fileRefId = reqMap.get("fileRefId").asText();
+
+        res.setItem(fileService.FindTestResult(fileRefId));
+
+        return res;
+    }
+
+    @PostMapping("/deleteFile")
+    public RequsetData<String> deleteFile(@RequestBody Map<String, Object> reqMap) throws Exception {
+        String fileId = reqMap.get("fileId").toString();
+        return RespGenerstor.success(fileService.deleteFile(fileId));
+    }
+
+    @PostMapping("/deleteFileByRefId")
+    public RequsetData<String> deleteFileByRefId(@RequestBody Map<String, Object> reqMap) throws Exception {
+        String fileRefId = reqMap.get("fileRefId").toString();
+        Integer fileType = reqMap.get("fileType") != null ? Integer.parseInt(reqMap.get("fileType").toString()) : null;
+
+        return RespGenerstor.success(fileService.deleteFileByRefId(fileRefId, fileType));
+    }
+
+    @GetMapping("getFileBase64")
+    public RequsetData<String> getFileBase64(@RequestParam("fileId") String fileId) throws IOException {
+
+        return RespGenerstor.success(fileService.getFileBase64(fileId));
+    }
+
+    @GetMapping("getImageBase64")
+    public RequsetData<ImageBase64Vo> getImageBase64(@RequestParam("fileId") String fileId) throws IOException {
+        return RespGenerstor.success(fileService.getImageBase64(fileId));
+    }
+
+    @PostMapping("uploadBase64")
+    public RequsetData<Integer> uploadBase64(@RequestBody Map<String, Object> reqMap) throws Exception {
+        List<UploadFileBase64Vo> fileList = JsonMapper.jsonToObject(reqMap.get("fileList").toString(), new TypeReference<List<UploadFileBase64Vo>>() {
+        });
+
+        return RespGenerstor.success(fileService.uploadBase64(fileList, userService.getLoginUser().getUserid()));
+    }
+
+}

+ 1 - 1
src/main/java/com/ghsc/partybuild/controller/AppFundsController.java

@@ -1,4 +1,4 @@
-package com.ghsc.partybuild.controller;
+package com.ghsc.partybuild.controller.app;
 
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;

File diff suppressed because it is too large
+ 7 - 96
src/main/java/com/ghsc/partybuild/controller/AppHomeController.java


+ 1 - 1
src/main/java/com/ghsc/partybuild/controller/AppLogController.java

@@ -1,4 +1,4 @@
-package com.ghsc.partybuild.controller;
+package com.ghsc.partybuild.controller.app;
 
 import com.ghsc.partybuild.controller.jsonmodel.RequsetData;
 import com.ghsc.partybuild.model.CfLog;

+ 1 - 1
src/main/java/com/ghsc/partybuild/controller/AppMessageController.java

@@ -1,4 +1,4 @@
-package com.ghsc.partybuild.controller;
+package com.ghsc.partybuild.controller.app;
 
 import com.github.pagehelper.PageInfo;
 import com.ghsc.partybuild.controller.jsonmodel.RequsetData;

+ 1 - 1
src/main/java/com/ghsc/partybuild/controller/AppModularController.java

@@ -1,4 +1,4 @@
-package com.ghsc.partybuild.controller;
+package com.ghsc.partybuild.controller.app;
 
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;

+ 1 - 1
src/main/java/com/ghsc/partybuild/controller/AppPartyController.java

@@ -1,4 +1,4 @@
-package com.ghsc.partybuild.controller;
+package com.ghsc.partybuild.controller.app;
 
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;

+ 1 - 1
src/main/java/com/ghsc/partybuild/controller/AppPartyTwoExtController.java

@@ -1,4 +1,4 @@
-package com.ghsc.partybuild.controller;
+package com.ghsc.partybuild.controller.app;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;

+ 1 - 1
src/main/java/com/ghsc/partybuild/controller/AppPublicityController.java

@@ -1,4 +1,4 @@
-package com.ghsc.partybuild.controller;
+package com.ghsc.partybuild.controller.app;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;

+ 5 - 3
src/main/java/com/ghsc/partybuild/controller/AppShykController.java

@@ -1,7 +1,9 @@
-package com.ghsc.partybuild.controller;
+package com.ghsc.partybuild.controller.app;
 
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.ghsc.partybuild.vo.shyk.MeetingTopicJsonData;
+import com.ghsc.partybuild.vo.shyk.MeetingUserJsonData;
 import com.github.pagehelper.PageInfo;
 import com.ghsc.partybuild.controller.jsonmodel.RequsetData;
 import com.ghsc.partybuild.model.*;
@@ -32,7 +34,7 @@ public class AppShykController {
     @GetMapping("/getMeetingList")
     public RequsetData<PageInfo<HashMap<String, Object>>> GetMeetingList(@RequestParam("pageIndex") int pageIndex,
                                                                          @RequestParam("pageSize") int pageSize, @RequestParam(required = false) String dzzdm, @RequestParam(required = false) String userId,
-                                                                         @RequestParam(required = false) List<String> shykTypeList, @RequestParam(required = false) String title,
+                                                                         @RequestParam(required = false) List<String> shykType, @RequestParam(required = false) String title,
                                                                          @RequestParam(required = false) String startDate,
                                                                          @RequestParam(required = false) String endDate) {
 
@@ -41,7 +43,7 @@ public class AppShykController {
 
         RequsetData<PageInfo<HashMap<String, Object>>> result = new RequsetData<>();
 
-        result.setItem(shykService.getMeetingListByApp(pageIndex, pageSize, dzzdm, userId, null, shykTypeList, title, startDate, endDate));
+        result.setItem(shykService.getMeetingListByApp(pageIndex, pageSize, dzzdm, userId, null, shykType, title, startDate, endDate));
         HashMap<String, Object> extData = new HashMap<String, Object>();
 
         result.setExtdata(extData);

+ 31 - 0
src/main/java/com/ghsc/partybuild/filter/exception/BaseErrorEnum.java

@@ -0,0 +1,31 @@
+package com.ghsc.partybuild.filter.exception;
+
+public enum BaseErrorEnum implements BaseErrorInfoInterface {
+    SUCCESS("200", "成功"),
+    BODY_NOT_MATCH("400", "数据格式不匹配!请联系系统管理员!"),
+    NOT_FOUND("404", "访问资源不存在"),
+    INTERNAL_SERVER_ERROR("500", "服务器内部错误!请联系系统管理员!"),
+    USER_PASSWORD_ERROR("10001", "用户名或密码错误!"),
+    DELETE_NOT_DATA_ERROR("10002", "删除的数据不存在!"),
+    IMPORT_DATA_ERROR("10003", "导入数据存在错误,请查看错误列表,更正后重新导入!"),
+    APP_LOGIN_ERROR("10004", "无登录App权限!");
+
+    private String code;
+
+    private String message;
+
+    BaseErrorEnum(String code, String message) {
+        this.code = code;
+        this.message = message;
+    }
+
+    @Override
+    public String getCode() {
+        return code;
+    }
+
+    @Override
+    public String getMessage() {
+        return message;
+    }
+}

+ 6 - 0
src/main/java/com/ghsc/partybuild/filter/exception/BaseErrorInfoInterface.java

@@ -0,0 +1,6 @@
+package com.ghsc.partybuild.filter.exception;
+
+public interface BaseErrorInfoInterface {
+    String getCode();
+    String getMessage();
+}

+ 28 - 0
src/main/java/com/ghsc/partybuild/filter/exception/BaseException.java

@@ -0,0 +1,28 @@
+package com.ghsc.partybuild.filter.exception;
+
+import lombok.Data;
+
+@Data
+public class BaseException extends RuntimeException {
+
+    private String code;
+
+    private String message;
+
+
+    public BaseException() {
+        super();
+    }
+
+    public BaseException(BaseErrorEnum baseErrorEnum) {
+        super(baseErrorEnum.getCode());
+        this.code = baseErrorEnum.getCode();
+        this.message = baseErrorEnum.getMessage();
+    }
+
+    public BaseException(String code, String message) {
+        super(code);
+        this.code = (code == null || code.length() == 0) ? "未配置异常编码" : code;
+        this.message = message;
+    }
+}

+ 25 - 0
src/main/java/com/ghsc/partybuild/filter/exception/BaseResponse.java

@@ -0,0 +1,25 @@
+package com.ghsc.partybuild.filter.exception;
+
+import com.ghsc.partybuild.controller.jsonmodel.RequsetData;
+import lombok.Data;
+
+import java.util.Map;
+
+@Data
+public class BaseResponse<T> extends RequsetData<T> {
+
+    private String code;
+
+    public BaseResponse(Boolean success, String code, String message, T data, Map<String, Object> extData) {
+        super();
+        this.setExtdata(extData);
+        this.setMsg(message);
+        this.setItem(data);
+        this.setSuccess(success);
+        this.code = code;
+    }
+
+    public BaseResponse() {
+        super();
+    }
+}

+ 31 - 0
src/main/java/com/ghsc/partybuild/filter/exception/GlobalExceptionHandler.java

@@ -0,0 +1,31 @@
+package com.ghsc.partybuild.filter.exception;
+
+import com.alibaba.druid.support.logging.Log;
+import com.alibaba.druid.support.logging.LogFactory;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+
+@RestControllerAdvice
+public class GlobalExceptionHandler {
+
+    private static final Log logger = LogFactory.getLog(GlobalExceptionHandler.class);
+
+    @ExceptionHandler(value = BaseException.class)
+    public BaseResponse<Object> baseExceptionHandler(BaseException e) {
+        logger.error("发生业务异常!原因是:" + e.getMessage());
+        return RespGenerstor.fail(e.getCode(),e.getMessage());
+    }
+
+    @ExceptionHandler(value = NullPointerException.class)
+    public BaseResponse<Object> exceptionHandler(NullPointerException e) {
+        logger.error("发生空指针异常!原因是:" + e);
+        return RespGenerstor.fail(BaseErrorEnum.BODY_NOT_MATCH,"");
+    }
+
+    @ExceptionHandler(value = Exception.class)
+    public BaseResponse<Object> exceptionHandler(Exception e) {
+        logger.error("未知异常!原因是:" + e);
+        return RespGenerstor.fail(BaseErrorEnum.INTERNAL_SERVER_ERROR,"");
+    }
+
+}

+ 27 - 0
src/main/java/com/ghsc/partybuild/filter/exception/RespGenerstor.java

@@ -0,0 +1,27 @@
+package com.ghsc.partybuild.filter.exception;
+
+import java.util.Map;
+
+public class RespGenerstor {
+    public static BaseResponse success(Object data) {
+        return new BaseResponse(true, BaseErrorEnum.SUCCESS.getCode(), "接口调用成功", data, null);
+    }
+
+    public static BaseResponse<Object> fail(BaseErrorEnum baseErrorEnum, Object data) {
+        return new BaseResponse<Object>(false, baseErrorEnum.getCode(), baseErrorEnum.getMessage() + data.toString(), data, null);
+    }
+
+    public static BaseResponse<Object> fail(String code, String message) {
+        return new BaseResponse<Object>(false, code, message, null, null);
+    }
+
+    /**
+     * 导入时,数据不填充错误信息
+     * @param baseErrorEnum 错误代码
+     * @param data          接口数据
+     * @return
+     */
+    public static BaseResponse<Object> importFail(BaseErrorEnum baseErrorEnum, Object data) {
+        return new BaseResponse<Object>(false, baseErrorEnum.getCode(), baseErrorEnum.getMessage(), data, null);
+    }
+}

+ 10 - 0
src/main/java/com/ghsc/partybuild/service/FileService.java

@@ -7,6 +7,8 @@ import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
+import com.ghsc.partybuild.vo.ImageBase64Vo;
+import com.ghsc.partybuild.vo.UploadFileBase64Vo;
 import org.apache.commons.net.ftp.FTPClient;
 
 import com.github.pagehelper.PageInfo;
@@ -75,6 +77,8 @@ public interface FileService {
      */
     int deleteFile(String fileid);
 
+    int deleteFileByRefId(String fileRefId,Integer fileType);
+
     /**
      * down
      * @param beginTime
@@ -91,4 +95,10 @@ public interface FileService {
 
     Map<String,Object> FindTestResult(String fileRefId);
 
+    String getFileBase64(String fileId) throws IOException;
+
+    ImageBase64Vo getImageBase64(String fileId) throws IOException;
+
+    Integer uploadBase64(List<UploadFileBase64Vo> fileList, String userId) throws IOException;
+
 }

+ 132 - 51
src/main/java/com/ghsc/partybuild/service/impl/FileServiceImpl.java

@@ -1,5 +1,6 @@
 package com.ghsc.partybuild.service.impl;
 
+import java.awt.image.BufferedImage;
 import java.io.*;
 import java.net.URLDecoder;
 import java.time.LocalDateTime;
@@ -7,6 +8,9 @@ import java.time.format.DateTimeFormatter;
 import java.util.*;
 
 import com.ghsc.partybuild.mapper.CfFileCQuery;
+import com.ghsc.partybuild.util.BASE64DecodedMultipartFile;
+import com.ghsc.partybuild.vo.ImageBase64Vo;
+import com.ghsc.partybuild.vo.UploadFileBase64Vo;
 import net.coobird.thumbnailator.Thumbnails;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.net.ftp.FTP;
@@ -25,8 +29,11 @@ import com.ghsc.partybuild.model.CfFileExample;
 import com.ghsc.partybuild.service.FileService;
 import com.ghsc.partybuild.util.FtpHelper;
 import com.ghsc.partybuild.util.MapUtils;
+import org.springframework.web.multipart.MultipartFile;
 import sun.misc.BASE64Decoder;
 
+import javax.imageio.ImageIO;
+
 @Service("fileService")
 public class FileServiceImpl implements FileService {
 
@@ -46,7 +53,7 @@ public class FileServiceImpl implements FileService {
 
     private String ENCODE = "utf-8";
 
-    private List<String> imageTypes=new ArrayList<>();
+    private List<String> imageTypes = new ArrayList<>();
 
     public FileServiceImpl() {
         logger = LoggerFactory.getLogger(this.getClass());
@@ -78,12 +85,12 @@ public class FileServiceImpl implements FileService {
         CfFile cfFile = new CfFile();
         FTPClient ftpClient = new FTPClient();
         String fileId = "";
-        InputStream fileStream=null;
+        InputStream fileStream = null;
         try {
 
             cfFile.setFilesuffix(fileName.substring(fileName.lastIndexOf(".")));
 
-            if(this.imageTypes.contains(cfFile.getFilesuffix().replace(".","").toLowerCase())) {
+            if (this.imageTypes.contains(cfFile.getFilesuffix().replace(".", "").toLowerCase())) {
                 byte[] inform = informImage(byteArr);
                 fileStream = new ByteArrayInputStream(inform);
             } else {
@@ -107,7 +114,7 @@ public class FileServiceImpl implements FileService {
             cfFile.setOperatestate("A");
             cfFile.setOperatetime(new Date());
             cfFile.setSyncstate("N");
-            
+
             ftpClient.changeWorkingDirectory(filePath);
 
             ftpClient.storeFile(fileId + cfFile.getFilesuffix(), fileStream);
@@ -131,7 +138,7 @@ public class FileServiceImpl implements FileService {
         FTPClient ftpClient = new FTPClient();
         String fileId = "";
 
-        if(StringUtils.isBlank(file)){
+        if (StringUtils.isBlank(file)) {
             return fileId;
         }
         //logger.info("file:"+file.length());
@@ -150,7 +157,7 @@ public class FileServiceImpl implements FileService {
             cfFile.setFilerefid(fileRefID);
             cfFile.setCreatetime(new Date());
             String filePath = createServeDir(cfFile.getCreatetime(), ftpClient);
-            if(fileName.indexOf(".")>=0) {
+            if (fileName.indexOf(".") >= 0) {
                 cfFile.setFilesuffix(fileName.substring(fileName.lastIndexOf(".")));
             } else {
                 cfFile.setFilesuffix("");
@@ -167,7 +174,7 @@ public class FileServiceImpl implements FileService {
             }
 
             //byte[] bufImg = new BASE64Decoder().decodeBuffer(file);
-            byte[] bufImg= Base64.getDecoder().decode(file);
+            byte[] bufImg = Base64.getDecoder().decode(file);
 
             ftpClient.changeWorkingDirectory(filePath);
 
@@ -188,58 +195,58 @@ public class FileServiceImpl implements FileService {
         return fileId;
     }
 
-    public byte[] informImage(byte[] byteArr){
+    public byte[] informImage(byte[] byteArr) {
 
-        byte[] result=null;
+        byte[] result = null;
         //设置处理大小500K
-        int imageSize=1024*1024/2;
+        int imageSize = 1024 * 1024 / 2;
 
-        if(byteArr.length<imageSize){
-            result= byteArr;
+        if (byteArr.length < imageSize) {
+            result = byteArr;
         } else {
-            InputStream sourceImage=new ByteArrayInputStream(byteArr);
-            ByteArrayOutputStream osImage=null;
+            InputStream sourceImage = new ByteArrayInputStream(byteArr);
+            ByteArrayOutputStream osImage = null;
             try {
 
-                osImage=changeImageSize(sourceImage);
+                osImage = changeImageSize(sourceImage);
 
-                while (osImage.size()>imageSize){
+                while (osImage.size() > imageSize) {
 
-                    osImage=changeImageQuality(new ByteArrayInputStream(osImage.toByteArray()));
+                    osImage = changeImageQuality(new ByteArrayInputStream(osImage.toByteArray()));
 
                 }
 
-                result=osImage.toByteArray();
+                result = osImage.toByteArray();
 
-            } catch (Exception ex){
+            } catch (Exception ex) {
                 logger.error("informImage,图片读取失败!", ex);
             }
 
 
         }
 
-        logger.info("informImage,ftp上传压缩图片大小为:"+result.length);
+        logger.info("informImage,ftp上传压缩图片大小为:" + result.length);
 
         return result;
     }
 
-    public ByteArrayOutputStream changeImageSize(InputStream imageStream){
+    public ByteArrayOutputStream changeImageSize(InputStream imageStream) {
 
         ByteArrayOutputStream outArray = new ByteArrayOutputStream();
         try {
             Thumbnails.of(imageStream).size(1920, 1080).toOutputStream(outArray);
-        } catch (Exception ex){
+        } catch (Exception ex) {
             logger.error("ImageChangeSize,图片大小失败!", ex);
         }
         return outArray;
     }
 
-    public ByteArrayOutputStream changeImageQuality(InputStream imageStream){
+    public ByteArrayOutputStream changeImageQuality(InputStream imageStream) {
 
         ByteArrayOutputStream outArray = new ByteArrayOutputStream();
         try {
             Thumbnails.of(imageStream).outputQuality(0.75f).toOutputStream(outArray);
-        } catch (Exception ex){
+        } catch (Exception ex) {
             logger.error("changeImageQuality,图片质量失败!", ex);
         }
 
@@ -313,27 +320,32 @@ public class FileServiceImpl implements FileService {
 
     @Override
     public int deleteFile(String fileid) {
+        return cfFileMapper.deleteByPrimaryKey(fileid);
+    }
 
-        CfFile model = cfFileMapper.selectByPrimaryKey(fileid);
-
-        model.setOperatestate("D");
-        model.setOperatetime(new Date());
-        model.setSyncstate("N");
+    @Override
+    public int deleteFileByRefId(String fileRefId, Integer fileType) {
+        CfFileExample exp = new CfFileExample();
+        CfFileExample.Criteria cri = exp.or();
+        cri.andFilerefidEqualTo(fileRefId);
+        if (fileType != null) {
+            cri.andFiletypeEqualTo(fileType);
+        }
 
-        return cfFileMapper.updateByPrimaryKey(model);
+        return cfFileMapper.deleteByExample(exp);
     }
 
     @Override
     public List<Object> fileNeedDown(Date beginTime) {
-        List<Object> files=new ArrayList<>();
+        List<Object> files = new ArrayList<>();
         CfFileExample exp = new CfFileExample();
-        List<String> oStates=new ArrayList<>();
+        List<String> oStates = new ArrayList<>();
         oStates.add("A");
         oStates.add("M");
 
         exp.or().andOperatestateIn(oStates).andOperatetimeGreaterThan(beginTime);
 
-        List<CfFile> cfFiles=cfFileMapper.selectByExample(exp);
+        List<CfFile> cfFiles = cfFileMapper.selectByExample(exp);
 
         try {
             FTPClient ftpClient = new FTPClient();
@@ -343,19 +355,19 @@ public class FileServiceImpl implements FileService {
 
             cfFiles.forEach(f -> {
                 try {
-                    FTPFile[] ftpFiles=ftpClient.listFiles(f.getFileurl());
-                    if(ftpFiles.length==0){
+                    FTPFile[] ftpFiles = ftpClient.listFiles(f.getFileurl());
+                    if (ftpFiles.length == 0) {
                         files.add(f.getFileid());
                     }
 
-                } catch (Exception ex){
-                    logger.error("fileNeedDown,forEach检查文件id:"+f.getFileid(), ex);
+                } catch (Exception ex) {
+                    logger.error("fileNeedDown,forEach检查文件id:" + f.getFileid(), ex);
                 }
             });
 
             ftpHelper.closeConnect(ftpClient);
 
-        } catch (Exception ex){
+        } catch (Exception ex) {
             logger.error("fileNeedDown,检查文件失败!", ex);
         }
 
@@ -365,26 +377,26 @@ public class FileServiceImpl implements FileService {
     @Override
     public boolean ftpFileUplad(List<String> ftpFileInfo) {
 
-        boolean result=false;
-        CfFile cfFile = cfFileMapper.selectByPrimaryKey(ftpFileInfo.get(0).replace("\"",""));
+        boolean result = false;
+        CfFile cfFile = cfFileMapper.selectByPrimaryKey(ftpFileInfo.get(0).replace("\"", ""));
 
-        if(cfFile!=null){
-            try{
+        if (cfFile != null) {
+            try {
                 FTPClient ftpClient = new FTPClient();
                 ftpHelper.connectToServer(ftpClient);
                 ftpClient.enterLocalPassiveMode();
                 ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
-                String urlFile=ftpFileInfo.get(1).replace("\"","");
+                String urlFile = ftpFileInfo.get(1).replace("\"", "");
 
                 //byte[] ftpBytes = new BASE64Decoder().decodeBuffer(base64File);
-                String base64File=URLDecoder.decode(urlFile,ENCODE);
+                String base64File = URLDecoder.decode(urlFile, ENCODE);
                 //byte[] ftpBytes=new BASE64Decoder().decodeBuffer(base64File);
-                byte[] ftpBytes=Base64.getDecoder().decode(base64File);
+                byte[] ftpBytes = Base64.getDecoder().decode(base64File);
 
-                String[] filePaths=cfFile.getFileurl().split("/");
+                String[] filePaths = cfFile.getFileurl().split("/");
 
                 FTPFile[] ftpFiles = ftpClient.listFiles(filePaths[0]);
-                if(ftpFiles.length==0){
+                if (ftpFiles.length == 0) {
                     ftpClient.makeDirectory(filePaths[0]);
                 }
 
@@ -394,8 +406,8 @@ public class FileServiceImpl implements FileService {
 
                 ftpHelper.closeConnect(ftpClient);
 
-                result=true;
-            }catch (Exception ex){
+                result = true;
+            } catch (Exception ex) {
                 logger.error("ftpFileUplad,ftp文件上传完", ex);
             }
         }
@@ -405,13 +417,82 @@ public class FileServiceImpl implements FileService {
 
     @Override
     public Map<String, Object> FindTestResult(String fileRefId) {
-        List<Map<String, Object>> results=cfFileCQuery.FindTestResult(fileRefId);
+        List<Map<String, Object>> results = cfFileCQuery.FindTestResult(fileRefId);
 
-        if(results.size()>0){
+        if (results.size() > 0) {
             return results.get(0);
         }
 
         return null;
     }
 
+    @Override
+    public String getFileBase64(String fileId) throws IOException {
+        String base64String = "";
+
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+
+        try {
+            this.downFtpFile(fileId, bos);
+
+            byte[] bytes = bos.toByteArray();
+
+            Base64.Encoder encoder = Base64.getEncoder();
+
+            base64String = encoder.encodeToString(bytes);
+
+        } catch (Exception ex) {
+
+        } finally {
+            bos.close();
+        }
+
+        return base64String;
+    }
+
+    @Override
+    public ImageBase64Vo getImageBase64(String fileId) throws IOException {
+        ImageBase64Vo result = new ImageBase64Vo();
+
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+
+        try {
+            this.downFtpFile(fileId, bos);
+
+            byte[] bytes = bos.toByteArray();
+
+            BufferedImage image = ImageIO.read(new ByteArrayInputStream(bytes));
+
+            result.base64 = Base64.getEncoder().encodeToString(bytes);
+            result.height = image.getHeight();
+            result.width = image.getWidth();
+
+        } catch (Exception ex) {
+
+        } finally {
+            bos.close();
+        }
+
+        return result;
+    }
+
+    @Override
+    public Integer uploadBase64(List<UploadFileBase64Vo> fileList, String userId) throws IOException {
+        Integer result = 0;
+
+        for (int i = 0; i < fileList.size(); i++) {
+            UploadFileBase64Vo base64File = fileList.get(i);
+            MultipartFile multipartFile = BASE64DecodedMultipartFile.base64ToMultipart(base64File.base64);
+            MultipartFile[] files = new MultipartFile[]{multipartFile};
+
+            String fileName = multipartFile.getOriginalFilename();
+
+            this.saveFile(multipartFile.getBytes(), fileName, base64File.fileRefId, userId, base64File.fileType);
+
+            result++;
+        }
+
+        return result;
+    }
+
 }

+ 81 - 0
src/main/java/com/ghsc/partybuild/util/BASE64DecodedMultipartFile.java

@@ -0,0 +1,81 @@
+package com.ghsc.partybuild.util;
+
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.*;
+import java.util.Base64;
+
+public class BASE64DecodedMultipartFile implements MultipartFile {
+
+    private final byte[] imgContent;
+    private final String header;
+
+    public BASE64DecodedMultipartFile(byte[] imgContent, String header) {
+        this.imgContent = imgContent;
+        this.header = header.split(";")[0];
+    }
+
+    @Override
+    public String getName() {
+        return System.currentTimeMillis() + Math.random() + "." + header.split("/")[1];
+    }
+
+    @Override
+    public String getOriginalFilename() {
+        return System.currentTimeMillis() + (int) Math.random() * 10000 + "." + header.split("/")[1];
+    }
+
+    @Override
+    public String getContentType() {
+        return header.split(":")[1];
+    }
+
+    @Override
+    public boolean isEmpty() {
+        return imgContent == null || imgContent.length == 0;
+    }
+
+    @Override
+    public long getSize() {
+        return imgContent.length;
+    }
+
+    @Override
+    public byte[] getBytes() throws IOException {
+        return imgContent;
+    }
+
+    @Override
+    public InputStream getInputStream() throws IOException {
+        return new ByteArrayInputStream(imgContent);
+    }
+
+    @Override
+    public void transferTo(File dest) throws IOException, IllegalStateException {
+        new FileOutputStream(dest).write(imgContent);
+    }
+
+    public static MultipartFile base64ToMultipart(String base64) {
+        try {
+            String[] baseStrs = base64.split(",");
+
+//            BASE64Decoder decoder = new BASE64Decoder();
+//            byte[] b = new byte[0];
+//            b = decoder.decodeBuffer(baseStrs[1]);
+            Base64.Decoder decoder = Base64.getMimeDecoder();
+            byte[] b = new byte[0];
+            b = decoder.decode(baseStrs[1]);
+
+            for (int i = 0; i < b.length; ++i) {
+                if (b[i] < 0) {
+                    b[i] += 256;
+                }
+            }
+            return new BASE64DecodedMultipartFile(b, baseStrs[0]);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+}

+ 10 - 0
src/main/java/com/ghsc/partybuild/vo/ImageBase64Vo.java

@@ -0,0 +1,10 @@
+package com.ghsc.partybuild.vo;
+
+import lombok.Data;
+
+@Data
+public class ImageBase64Vo {
+    public String base64;
+    public Integer height;
+    public Integer width;
+}

+ 11 - 0
src/main/java/com/ghsc/partybuild/vo/UploadFileBase64Vo.java

@@ -0,0 +1,11 @@
+package com.ghsc.partybuild.vo;
+
+import lombok.Data;
+
+@Data
+public class UploadFileBase64Vo {
+    public String base64;
+    public String fileRefId;
+    public Integer fileType;
+    public boolean isImage;
+}

+ 25 - 0
src/main/java/com/ghsc/partybuild/vo/shyk/DecisionUserJsonData.java

@@ -0,0 +1,25 @@
+package com.ghsc.partybuild.vo.shyk;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class DecisionUserJsonData {
+    private String content;
+    private String jymbid;
+
+    public String getJymbid() {
+        return jymbid;
+    }
+
+    public void setJymbid(String jymbid) {
+        this.jymbid = jymbid;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+}

+ 25 - 0
src/main/java/com/ghsc/partybuild/vo/shyk/MeetingTopicJsonData.java

@@ -0,0 +1,25 @@
+package com.ghsc.partybuild.vo.shyk;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class MeetingTopicJsonData {
+    private String mbmc;
+    private String id;
+
+    public String getMbmc() {
+        return mbmc;
+    }
+
+    public void setMbmc(String mbmc) {
+        this.mbmc = mbmc;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+}

+ 61 - 0
src/main/java/com/ghsc/partybuild/vo/shyk/MeetingUserJsonData.java

@@ -0,0 +1,61 @@
+package com.ghsc.partybuild.vo.shyk;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class MeetingUserJsonData {
+    private String rybm;
+    private String xm;
+    private String szdzbdm;
+    private String dzzmc;
+    private Integer signinstatus;
+    private String userremark;
+
+    public Integer getSigninstatus() {
+        return signinstatus;
+    }
+
+    public void setSigninstatus(Integer signinstatus) {
+        this.signinstatus = signinstatus;
+    }
+
+    public String getUserremark() {
+        return userremark;
+    }
+
+    public void setUserremark(String userremark) {
+        this.userremark = userremark;
+    }
+
+    public String getRybm() {
+        return rybm;
+    }
+
+    public void setRybm(String rybm) {
+        this.rybm = rybm;
+    }
+
+    public String getXm() {
+        return xm;
+    }
+
+    public void setXm(String xm) {
+        this.xm = xm;
+    }
+
+    public String getSzdzbdm() {
+        return szdzbdm;
+    }
+
+    public void setSzdzbdm(String szdzbdm) {
+        this.szdzbdm = szdzbdm;
+    }
+
+    public String getDzzmc() {
+        return dzzmc;
+    }
+
+    public void setDzzmc(String dzzmc) {
+        this.dzzmc = dzzmc;
+    }
+}