|
@@ -43,51 +43,51 @@ export class InspectionListPage implements OnInit {
|
|
|
}
|
|
|
|
|
|
choosePicture() {
|
|
|
- // const options: ImagePickerOptions = {
|
|
|
- // maximumImagesCount: 30,
|
|
|
- // outputType: 1,
|
|
|
- // width: 1800,
|
|
|
- // height: 1350,
|
|
|
- // quality: 90
|
|
|
- // };
|
|
|
+ const options: ImagePickerOptions = {
|
|
|
+ maximumImagesCount: 30,
|
|
|
+ outputType: 1,
|
|
|
+ width: 1800,
|
|
|
+ height: 1350,
|
|
|
+ quality: 90
|
|
|
+ };
|
|
|
|
|
|
- // this.imagePicker.getPictures(options).then((results) => {
|
|
|
- // for (var i = 0; i < results.length; i++) {
|
|
|
- // this.base64.encodeFile(results[i]).then((base64File: string) => {
|
|
|
- // this.imgList.push(
|
|
|
- // base64File
|
|
|
- // )
|
|
|
- // let imageData = base64File.split('base64,')[1]
|
|
|
- // if (this.imageData) {
|
|
|
- // this.imageData = this.imageData + ',' + imageData
|
|
|
- // } else {
|
|
|
- // this.imageData = '' + imageData
|
|
|
- // }
|
|
|
- // }, (err) => {
|
|
|
- // console.log(err);
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }, (err) => { });
|
|
|
- // this.showPicture(qc, this.cameraSetting.albumOption)
|
|
|
+ this.imagePicker.getPictures(options).then((results) => {
|
|
|
+ for (var i = 0; i < results.length; i++) {
|
|
|
+ this.base64.encodeFile(results[i]).then((base64File: string) => {
|
|
|
+ this.imgList.push(
|
|
|
+ base64File
|
|
|
+ )
|
|
|
+ let imageData = base64File.split('base64,')[1]
|
|
|
+ if (this.imageData) {
|
|
|
+ this.imageData = this.imageData + ',' + imageData
|
|
|
+ } else {
|
|
|
+ this.imageData = '' + imageData
|
|
|
+ }
|
|
|
+ }, (err) => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, (err) => { });
|
|
|
+ this.showPicture(qc, this.cameraSetting.albumOption)
|
|
|
}
|
|
|
|
|
|
takePicture() {
|
|
|
- // this.showPicture(this.cameraSetting.takePhotoOption)
|
|
|
+ this.showPicture(this.cameraSetting.takePhotoOption)
|
|
|
}
|
|
|
showPicture(options) {
|
|
|
- // this.camera.getPicture(options).then((imageData) => {
|
|
|
- // this.imgList.push(
|
|
|
- // 'data:image/png;base64,' + imageData
|
|
|
- // )
|
|
|
- // if (this.imageData) {
|
|
|
- // this.imageData = this.imageData + ',' + imageData
|
|
|
- // } else {
|
|
|
- // this.imageData = '' + imageData
|
|
|
- // }
|
|
|
- // }, (err) => {
|
|
|
- // // Handle error
|
|
|
- // console.log("Camera issue: " + err);
|
|
|
- // });
|
|
|
+ this.camera.getPicture(options).then((imageData) => {
|
|
|
+ this.imgList.push(
|
|
|
+ 'data:image/png;base64,' + imageData
|
|
|
+ )
|
|
|
+ if (this.imageData) {
|
|
|
+ this.imageData = this.imageData + ',' + imageData
|
|
|
+ } else {
|
|
|
+ this.imageData = '' + imageData
|
|
|
+ }
|
|
|
+ }, (err) => {
|
|
|
+ // Handle error
|
|
|
+ console.log("Camera issue: " + err);
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
showFullScreenImage(data) {
|