修改3d出现双人头bug

This commit is contained in:
limengnan 2025-12-02 18:10:06 +08:00
parent 69ec3e8d62
commit 522685d8c1
2 changed files with 10 additions and 5 deletions

View File

@ -128,7 +128,7 @@
<span class="currencytext3">{{ headlist.rotation }}°</span> <span class="currencytext3">{{ headlist.rotation }}°</span>
</div> </div>
<div style="width: 100%;height: 80%;" alt=""> <div style="width: 100%;height: 80%;" alt="">
<Model :rotation="Number(headlist.rotation)" :tilt="Number(headlist.tilt)" :pitch="Number(headlist.pitch)" :gender="patientInfo.gender || '男'" /> <Model v-if="patientInfo != null && patientInfo.id != null&& patientInfo.id != ''" :rotation="Number(headlist.rotation)" :tilt="Number(headlist.tilt)" :pitch="Number(headlist.pitch)" :gender="patientInfo.gender || '男'" />
</div> </div>
</div> </div>
@ -2289,6 +2289,7 @@ function closePatientProfile(){
text-align: right; text-align: right;
} }
.currencytext1{ .currencytext1{
min-width: 100px;
font-size: 24px; font-size: 24px;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
@ -2298,11 +2299,15 @@ function closePatientProfile(){
font-style: normal; font-style: normal;
font-size: 30px; font-size: 30px;
color: #FF6600; color: #FF6600;
text-align: r;
} }
.currencytext3{ .currencytext3{
width: 60px;
font-size: 24px; font-size: 24px;
font-weight: 700; font-weight: 700;
display: inline-block;
color: #266FFF; color: #266FFF;
text-align: left;
} }
.body-footbottom-box{ .body-footbottom-box{
display: flex; display: flex;
@ -2328,7 +2333,8 @@ function closePatientProfile(){
border-radius: 4px; border-radius: 4px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: space-between;
padding: 0px 10px;
} }
.body-footbottom-center{ .body-footbottom-center{
width: 40%; width: 40%;

View File

@ -26,7 +26,7 @@ const props = defineProps({
rotation: { type: [Number, String], default: 0 }, rotation: { type: [Number, String], default: 0 },
tilt: { type: [Number, String], default: 0 }, tilt: { type: [Number, String], default: 0 },
pitch: { type: [Number, String], default: 0 }, pitch: { type: [Number, String], default: 0 },
gender: { type: String, default: '' } gender: { type: String, default: '' }
}) })
onMounted(() => { onMounted(() => {
initThreeJS() initThreeJS()
@ -90,7 +90,6 @@ function initThreeJS() {
function loadModel() { function loadModel() {
const loader = new GLTFLoader(); const loader = new GLTFLoader();
// Model.glb // Model.glb
const url = (props.gender === '女') ? femaleUrl : maleUrl; const url = (props.gender === '女') ? femaleUrl : maleUrl;
loader.load(url, loader.load(url,
@ -198,7 +197,7 @@ watch(
} catch {} } catch {}
model = null; model = null;
} }
loadModel(); // loadModel();
} }
) )