|
@@ -749,6 +749,7 @@
|
749
|
749
|
}
|
750
|
750
|
//#ifdef H5
|
751
|
751
|
uni.chooseImage({
|
|
752
|
+ count: 1,
|
752
|
753
|
sourceType: ['camera'],
|
753
|
754
|
success: (chooseImageRes) => {
|
754
|
755
|
console.log(chooseImageRes, pathUrl)
|
|
@@ -828,7 +829,9 @@
|
828
|
829
|
//#endif
|
829
|
830
|
//#ifdef APP-PLUS
|
830
|
831
|
uni.chooseImage({
|
|
832
|
+ count: 1,
|
831
|
833
|
sourceType: ['camera'],
|
|
834
|
+ sizeType: ['compressed'],
|
832
|
835
|
success: (chooseImageRes) => {
|
833
|
836
|
console.log(chooseImageRes, pathUrl)
|
834
|
837
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
@@ -897,40 +900,75 @@
|
897
|
900
|
//#endif
|
898
|
901
|
},
|
899
|
902
|
// 拍照-其他
|
900
|
|
- photographToOther(data, type) {
|
|
903
|
+ async photographToOther(data, type) {
|
901
|
904
|
this.currentData = data;
|
902
|
905
|
uni.showLoading({
|
903
|
906
|
title: "加载中",
|
904
|
907
|
mask: true,
|
905
|
908
|
});
|
906
|
909
|
// 其他临床服务
|
907
|
|
- //检验二维码的有效性
|
908
|
|
- post("/dept/scanning", {
|
|
910
|
+ let result = await post("/dept/scanning", {
|
909
|
911
|
content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
|
910
|
912
|
taskTypeId: data.taskType.id,
|
911
|
913
|
gdState: data.gdState.id,
|
912
|
|
- }).then((result) => {
|
913
|
|
- uni.hideLoading();
|
914
|
|
- this.currentCode = result.code;
|
915
|
|
- if (result.state == 200 || result.state == 201) {
|
916
|
|
- if (result.account) {
|
917
|
|
- this.uploadToOther(data, {
|
918
|
|
- account: result.account,
|
919
|
|
- accountName: result.name,
|
920
|
|
- accountId: result.id,
|
921
|
|
- }, type);
|
922
|
|
- } else {
|
923
|
|
- this.uploadToOther(data, undefined, type);
|
924
|
|
- }
|
925
|
|
- } else if (result.state == '0000') {
|
926
|
|
- this.showSelectAccount();
|
927
|
|
- } else {
|
928
|
|
- uni.showToast({
|
929
|
|
- icon: "none",
|
930
|
|
- title: "请求失败!",
|
931
|
|
- });
|
932
|
|
- }
|
933
|
914
|
});
|
|
915
|
+ uni.hideLoading();
|
|
916
|
+ this.currentCode = result.code;
|
|
917
|
+ if (result.state == 200 || result.state == 201) {
|
|
918
|
+ uni.showModal({
|
|
919
|
+ title: '提示',
|
|
920
|
+ content: '请尽量拍摄角度覆盖清洁区域?',
|
|
921
|
+ success: (res) => {
|
|
922
|
+ if (res.confirm) {
|
|
923
|
+ if (result.account) {
|
|
924
|
+ this.uploadToOther(data, {
|
|
925
|
+ account: result.account,
|
|
926
|
+ accountName: result.name,
|
|
927
|
+ accountId: result.id,
|
|
928
|
+ }, type);
|
|
929
|
+ } else {
|
|
930
|
+ this.uploadToOther(data, undefined, type);
|
|
931
|
+ }
|
|
932
|
+ } else if (res.cancel) {
|
|
933
|
+ console.log('用户点击取消');
|
|
934
|
+ }
|
|
935
|
+ }
|
|
936
|
+ });
|
|
937
|
+ } else if (result.state == '0000') {
|
|
938
|
+ this.showSelectAccount();
|
|
939
|
+ } else {
|
|
940
|
+ uni.showToast({
|
|
941
|
+ icon: "none",
|
|
942
|
+ title: "请求失败!",
|
|
943
|
+ });
|
|
944
|
+ }
|
|
945
|
+ //检验二维码的有效性
|
|
946
|
+ // post("/dept/scanning", {
|
|
947
|
+ // content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
|
|
948
|
+ // taskTypeId: data.taskType.id,
|
|
949
|
+ // gdState: data.gdState.id,
|
|
950
|
+ // }).then((result) => {
|
|
951
|
+ // uni.hideLoading();
|
|
952
|
+ // this.currentCode = result.code;
|
|
953
|
+ // if (result.state == 200 || result.state == 201) {
|
|
954
|
+ // if (result.account) {
|
|
955
|
+ // this.uploadToOther(data, {
|
|
956
|
+ // account: result.account,
|
|
957
|
+ // accountName: result.name,
|
|
958
|
+ // accountId: result.id,
|
|
959
|
+ // }, type);
|
|
960
|
+ // } else {
|
|
961
|
+ // this.uploadToOther(data, undefined, type);
|
|
962
|
+ // }
|
|
963
|
+ // } else if (result.state == '0000') {
|
|
964
|
+ // this.showSelectAccount();
|
|
965
|
+ // } else {
|
|
966
|
+ // uni.showToast({
|
|
967
|
+ // icon: "none",
|
|
968
|
+ // title: "请求失败!",
|
|
969
|
+ // });
|
|
970
|
+ // }
|
|
971
|
+ // });
|
934
|
972
|
},
|
935
|
973
|
// 悬浮按钮点击事件
|
936
|
974
|
trigger(e) {
|