progress.vue
4.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<template>
<section class="inprogress">
<span class="button-big" @click="onProgress" v-text="nextStepButtonText" />
<div class="steps">
<el-steps :active="currentProgressStepNumber" align-center>
<el-tooltip class="box-item" effect="dark" placement="top" :visible="currentProgressStepNumber === 0">
<template #content>
<span>
<div class="tip">
{{ 'Make sure the Mesh Direction is the same as \n shown in the' }}
<el-popover placement="top" trigger="hover" :width="530">
<template #reference>
<u class="connect"> Picture. </u>
</template>
<img :width="500" :src="POSITIONIMAGE" alt="" />
</el-popover>
</div>
</span>
</template>
<el-step id="step1" :title="$t('steps.position')" :icon="LocationInformation" />
</el-tooltip>
<el-step :title="$t('steps.marginedit')" :icon="EditPen" />
<el-tooltip class="box-item" effect="dark" placement="top" :visible="currentProgressStepNumber === 2">
<template #content>
<span>
<div class="tip">
{{
'Left Click on Mesh to Generate a Reference Point. \n It is the same as shown in the'
}}
<el-popover placement="top" trigger="hover" :width="530">
<template #reference>
<u class="connect"> Picture. </u>
</template>
<img :width="500" :src="TRIMREGIONIMAGE" alt="" />
</el-popover>
</div>
</span>
</template>
<el-step :title="$t('steps.trimPointDefine')" :icon="Crop" />
</el-tooltip>
<el-step :title="$t('steps.aligner')" :icon="FolderChecked" />
</el-steps>
</div>
</section>
</template>
<script setup>
import POSITIONIMAGE from '@/views/assets/images/in-progress/position-example.png';
import TRIMREGIONIMAGE from '@/views/assets/images/in-progress/trimregion-example.png';
import { EditPen, LocationInformation, FolderChecked, Crop } from '@element-plus/icons-vue';
import { useInProgressStore } from '@/views/stores/inprogress/useInProgressStore';
import { useEditorStore } from '@/views/stores/useEditorStore';
import { storeToRefs } from 'pinia';
import { onMounted } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute();
const editorStore = useEditorStore();
const { generateAiTrimlines, editTrimlines, markPointsOnMesh, generateAlignerModal, handleAlignerCompleted } =
editorStore;
const store = useInProgressStore();
const { currentProgress, currentProgressStepNumber, nextStepButtonText } = storeToRefs(store);
const onProgress = () => {
switch (currentProgress.value) {
case 'position':
generateAiTrimlines();
break;
case 'positionComplete':
editTrimlines();
break;
case 'edit':
markPointsOnMesh();
break;
case 'trimPointDefine':
generateAlignerModal();
break;
case 'aligner':
case 'waiting':
handleAlignerCompleted();
break;
}
};
onMounted(() => {
const { blockOutValue, gapValue, thicknessValue, materialCompValue, materialCompRange } = route.query;
});
</script>
<style lang="less" scoped>
.inprogress {
span.button-big {
position: absolute;
bottom: 25px;
margin-left: 16px;
width: 350px !important;
height: 60px !important;
z-index: 2000 !important;
}
.steps {
position: absolute;
bottom: 25px;
width: 100%;
display: flex;
justify-content: center;
:deep(.el-step__icon) {
background: #f6f4f3 !important;
}
:deep(.el-steps--horizontal) {
width: 700px !important;
}
}
}
.tip {
white-space: pre-line;
font-size: 14px;
}
.connect {
font-size: 16px;
color: red;
cursor: pointer;
}
</style>