diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index fa2961c..9fe918d 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -173,6 +173,7 @@ }); }, methods: { + ...mapMutations('patient', ['setPatientData', 'setPatientDataCur']), handleClickMenu(item, index) { if (index != this.current) { this.current_ = this.current @@ -206,6 +207,7 @@ if(this.$route.name != 'Thrombolysis') this.$router.push('/firstaid/thrombolysis') }else{ this.setPatientData({}); + this.setPatientDataCur({}); if(this.$route.name != 'PatientList') this.$router.replace('/firstaid/patientList') } diff --git a/src/views/thrombolysis/components/throm-before3.vue b/src/views/thrombolysis/components/throm-before3.vue index ba22460..fb0881c 100644 --- a/src/views/thrombolysis/components/throm-before3.vue +++ b/src/views/thrombolysis/components/throm-before3.vue @@ -22,6 +22,7 @@
+ 上传院前CT图片 0 ? cmr.supportedImageResolutions[0] : null; - const fmt = cmr.supportedImageFormats.length > 0 ? cmr.supportedImageFormats[0] : null; + const res = cmr.supportedImageResolutions.length > 0 ? cmr.supportedImageResolutions[0] : { width: 640, height: 480 }; // 默认分辨率; + const fmt = cmr.supportedImageFormats.length > 0 ? cmr.supportedImageFormats[0] : 'jpeg'; if (!res || !fmt) { plus.nativeUI.toast('摄像头不支持该格式或分辨率'); return; @@ -202,6 +203,13 @@ } ); }, + onFileChange(event) { + const file = event.target.files[0]; + if (file) { + // 处理图片文件 + this.compressImage(file); + } + }, //显示图片 showPics(url, name) { let _this = this;