|
|
|
|
@ -120,7 +120,8 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { postExam } from "@/api/examination"; |
|
|
|
|
import { saveCupImg } from "@/api/hospital"; |
|
|
|
|
import { saveCupImg,saveCupImgLocal } from "@/api/hospital"; |
|
|
|
|
import QS from "qs" |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
@ -198,10 +199,12 @@ export default { |
|
|
|
|
message: '请求中', |
|
|
|
|
duration: 0, |
|
|
|
|
}) |
|
|
|
|
let params = {cupCardNo: this.Base64.encode(this.userInfo.papersnumber), cupImg: avatar} |
|
|
|
|
try { |
|
|
|
|
if (this.GlobalConfig.appMode) { |
|
|
|
|
vaildInterfacefn("cgstjyyxuwxt", "qdsgajjtjczdhqwzxq", JSON.stringify(param), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { |
|
|
|
|
vaildInterfacefn("cgstjyyxuwxt", "qdsgajjtjczdsctjrtx", JSON.stringify(param), "2", "https://" + this.GlobalConfig.urlCreatesign, "https://" + this.GlobalConfig.urlGateway).then((value) => { |
|
|
|
|
this.$toast.clear(); |
|
|
|
|
console.log('value',value) |
|
|
|
|
let retData = JSON.parse(value); |
|
|
|
|
if (retData.code == 200) { |
|
|
|
|
this.$toast('采集成功'); |
|
|
|
|
@ -214,7 +217,22 @@ export default { |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
saveCupImg(JSON.stringify(param)).then(res => { |
|
|
|
|
// let formData = new FormData(); |
|
|
|
|
// formData.append("data", JSON.stringify(params)); |
|
|
|
|
// console.log(formData) |
|
|
|
|
// saveCupImg(formData).then(res => { |
|
|
|
|
// this.$toast.clear(); |
|
|
|
|
// if (res.code == 200) { |
|
|
|
|
// this.$toast('采集成功'); |
|
|
|
|
// this.avatar = avatar; |
|
|
|
|
// console.log(this.avatar) |
|
|
|
|
// } else { |
|
|
|
|
// this.$toast(res.msg); |
|
|
|
|
// } |
|
|
|
|
// }, err => { |
|
|
|
|
// this.$toast.clear(); |
|
|
|
|
// }) |
|
|
|
|
saveCupImgLocal(params).then(res => { |
|
|
|
|
this.$toast.clear(); |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
this.$toast('采集成功'); |
|
|
|
|
@ -285,7 +303,7 @@ export default { |
|
|
|
|
|
|
|
|
|
confirm() { |
|
|
|
|
let param = this.proArr; |
|
|
|
|
console.log(param) |
|
|
|
|
console.log("param",param) |
|
|
|
|
this.isShowAvatar = false |
|
|
|
|
this.$toast.loading({ |
|
|
|
|
message: '请求中', |
|
|
|
|
|