panxingxin 5 rokov pred
rodič
commit
2dc366d442

+ 1 - 1
src/app/contract-detail/contract-detail.page.html

@@ -78,7 +78,7 @@
       <ion-thumbnail *ngFor="let photo of contract.imgList index as i">
         <ion-icon name="close-circle-outline" (click)="deletePicture(contract, i)">
         </ion-icon>
-        <ion-img [src]="photo" (click)="showFullScreenImage(contract.imgUrl)"></ion-img>
+        <ion-img [src]="photo" (click)="showFullScreenImage(photo)"></ion-img>
       </ion-thumbnail>
     </ion-item>
   </ion-list>

+ 5 - 3
src/app/contract-detail/contract-detail.page.ts

@@ -62,10 +62,12 @@ export class ContractDetailPage implements OnInit {
 
   takePicture(contract) {
     const options: CameraOptions = {
-      quality: 50,
+      quality: 100,
       destinationType: this.camera.DestinationType.DATA_URL,
-      encodingType: this.camera.EncodingType.JPEG,
-      mediaType: this.camera.MediaType.PICTURE
+      encodingType: this.camera.EncodingType.PNG,
+      mediaType: this.camera.MediaType.PICTURE,
+      targetWidth: 1500,
+      targetHeight: 1180
     }
 
     this.camera.getPicture(options).then((imageData) => {

+ 5 - 3
src/app/sample-detail/sample-detail.page.ts

@@ -66,10 +66,12 @@ export class SampleDetailPage implements OnInit {
 
   takePicture(sample) {
     const options: CameraOptions = {
-      quality: 50,
+      quality: 100,
       destinationType: this.camera.DestinationType.DATA_URL,
-      encodingType: this.camera.EncodingType.JPEG,
-      mediaType: this.camera.MediaType.PICTURE
+      encodingType: this.camera.EncodingType.PNG,
+      mediaType: this.camera.MediaType.PICTURE,
+      targetWidth: 1500,
+      targetHeight: 1180
     }
 
     this.camera.getPicture(options).then((imageData) => {

+ 5 - 3
src/app/store-qc-detail/store-qc-detail.page.ts

@@ -94,10 +94,12 @@ export class StoreQCDetailPage implements OnInit {
   }
   takePicture(qc) {
     const options: CameraOptions = {
-      quality: 50,
+      quality: 100,
       destinationType: this.camera.DestinationType.DATA_URL,
       encodingType: this.camera.EncodingType.PNG,
-      mediaType: this.camera.MediaType.PICTURE
+      mediaType: this.camera.MediaType.PICTURE,
+      targetWidth: 1500,
+      targetHeight: 1180
     }
 
     this.camera.getPicture(options).then((imageData) => {
@@ -118,7 +120,7 @@ export class StoreQCDetailPage implements OnInit {
   deletePicture(qc, index) {
     qc.qcimgList.splice(index, 1)
     let arr = qc.imageData.split(',')
-    arr.splice(qc,1)
+    arr.splice(qc, 1)
     qc.imageData = arr.toString()
   }
 

+ 5 - 3
src/app/store-qc-scanning/store-qc-scanning.page.ts

@@ -189,10 +189,12 @@ export class StoreQCScanningPage implements OnInit {
 
   takePicture(qc) {
     const options: CameraOptions = {
-      quality: 50,
+      quality: 100,
       destinationType: this.camera.DestinationType.DATA_URL,
-      encodingType: this.camera.EncodingType.JPEG,
-      mediaType: this.camera.MediaType.PICTURE
+      encodingType: this.camera.EncodingType.PNG,
+      mediaType: this.camera.MediaType.PICTURE,
+      targetWidth: 1500,
+      targetHeight: 1180
     }
 
     this.camera.getPicture(options).then((imageData) => {