From 0c884de323542d94dd10819a4119c77049998ec2 Mon Sep 17 00:00:00 2001 From: DwCay Date: Tue, 20 Jun 2023 16:04:50 +0300 Subject: [PATCH] =?UTF-8?q?[WIP]=20=D0=94=D0=BE=D0=B4=D0=B5=D0=BB=D0=B0?= =?UTF-8?q?=D0=BB=20=D1=81=D0=BA=D1=80=D0=BE=D0=BB=20=D0=B4=D0=BE=20=D0=BD?= =?UTF-8?q?=D1=83=D0=B6=D0=BD=D0=BE=D0=B9=20=D1=87=D0=B0=D1=81=D1=82=D0=B8?= =?UTF-8?q?=20=D0=B7=D1=83=D0=B1=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ToothFormula/DentalConditionForm.vue | 26 ++++++++++++------- .../Forms/ToothFormula/ToothFormulaForm.vue | 2 +- .../Forms/ToothFormula/ToothFormulaTable.vue | 2 +- .../Forms/ToothFormula/tooths/IncorsTooth.vue | 4 +-- .../Forms/ToothFormula/tooths/MolarsTooth.vue | 6 ++--- .../tooths/PreMolarsFangsTooth.vue | 4 +-- 6 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/DentalConditionForm.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/DentalConditionForm.vue index 09f56b7..c362177 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/DentalConditionForm.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/DentalConditionForm.vue @@ -27,6 +27,7 @@ v-for="(type, key) in formConfig.conditions", v-model="isOpenExpansion[key]", :label="type.label", + @after-show="()=>jumpToItem()" ) .general-expaction.flex.flex-col.pl-4(v-if="!type?.partsTooth") .condition-item.flex.gap-11px.items-center.h-10.w-full( @@ -94,6 +95,7 @@ export default { components: { DetailedToothSvg }, data() { return { + partId: "", isOpenInfoSelected: false, listSelected: [], isOpenExpansion: { @@ -117,21 +119,27 @@ export default { }, methods: { clickPart(id) { - new Promise((resolve) => { - let arrayRefs = id.split("_"); + this.partId = id; + let partGeneralKey = id.split("_")[0]; + if (this.isOpenExpansion[partGeneralKey]) { + this.$refs[id][0].scrollIntoView({ + block: "center", + behavior: "smooth", + }); + } else { Object.keys(this.isOpenExpansion).forEach((key) => { - if (key === arrayRefs[0]) { + if (key === partGeneralKey) { this.isOpenExpansion[key] = true; } else { this.isOpenExpansion[key] = false; } }); - return resolve(id); - }).then((id) => { - this.$refs[id][0].scrollIntoView({ - block: "center", - behavior: "smooth", - }); + } + }, + jumpToItem() { + this.$refs[this.partId][0].scrollIntoView({ + block: "center", + behavior: "smooth", }); }, updateConditions() { diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaForm.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaForm.vue index 1490a45..6d2f76b 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaForm.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaForm.vue @@ -43,7 +43,7 @@ q-btn.w-12.h-full.rounded( size="12px", :style="{'backgroundColor': isShowSecondView ? 'var(--bg-aqua-blue)' : 'var(--bg-light-grey)'}", - @click="()=>{ isShowSecondView=true }", + @click="()=>{isShowSecondView=true }", ) img(:src="teeth_2") diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaTable.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaTable.vue index 841d9b5..d90c447 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaTable.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/ToothFormulaTable.vue @@ -21,7 +21,7 @@ :form-config="formConfig" ) .flex(v-else) - .cell.flex.flex-col.gap-y-7px.py-11px.items-center( + .cell.flex.flex-col.gap-y-7px.py-11px.items-center.justify-around( v-for="cell in config.columns", :class="{'flex-col-reverse': config.name === 'upper'}" :style="{'width': '6.25%', 'minWidth': '55px'}", diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/tooths/IncorsTooth.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/tooths/IncorsTooth.vue index 6e974ea..948c28d 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/tooths/IncorsTooth.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/Forms/ToothFormula/tooths/IncorsTooth.vue @@ -161,6 +161,8 @@ fill="#252850", stroke="white" ) + g(v-if="data.crown.general.seal") + path(d="M40.4489 9.76331C40.4489 8.50504 40.5071 7.4112 40.5609 6.46817C40.5647 6.40263 40.5684 6.33791 40.5721 6.274C40.6216 5.41073 40.6628 4.69477 40.6499 4.08281C40.6361 3.4256 40.5597 2.94088 40.3946 2.56649C40.2373 2.20961 39.9865 1.92397 39.5582 1.6857C39.1149 1.43905 38.4773 1.24139 37.5522 1.09263C36.6308 0.944462 35.456 0.849421 33.9572 0.789614C31.3963 0.687426 27.9377 0.689489 23.2622 0.692278C22.4613 0.692755 21.6247 0.693254 20.7507 0.693254C20.3012 0.693254 19.8616 0.69319 19.4315 0.693125C14.1463 0.692337 10.3193 0.691765 7.54653 0.815899C6.04823 0.882975 4.87372 0.985922 3.95277 1.14147C3.02833 1.2976 2.39034 1.50195 1.94637 1.75397C1.51685 1.99779 1.26448 2.28827 1.10628 2.64835C0.940712 3.02521 0.864407 3.50982 0.850534 4.16209C0.837567 4.77177 0.878938 5.48308 0.928707 6.3388C0.932211 6.39904 0.935756 6.45999 0.939326 6.52167C0.993167 7.45178 1.05128 8.52824 1.05128 9.76331C1.05128 10.5815 1.49902 11.4558 2.44923 12.3324C3.39643 13.2061 4.7976 14.037 6.57884 14.7559C10.138 16.1924 15.1222 17.1445 20.7507 17.1445C26.3793 17.1445 31.3631 16.1924 34.922 14.7559C36.7031 14.037 38.1041 13.2061 39.0512 12.3324C40.0013 11.4559 40.4489 10.5815 40.4489 9.76331Z" fill="#FFB931" stroke="white") g(v-if="data.general === 'В'" transform="translate(2.5 2)") path(d="M18.7505 31.1406C8.60226 31.1406 0.703384 24.2816 0.703125 17.4223C18.7497 17.4223 13.8937 0.828266 18.7505 0.828266C23.3064 0.828266 18.7505 17.3594 36.797 17.3594C36.797 24.7218 28.8987 31.1406 18.7505 31.1406Z" fill="#252850") mask(id="mask0_4460_281524" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="37" height="32") @@ -176,8 +178,6 @@ rect(width="2" height="48" transform="matrix(-0.866025 0.5 0.5 0.866025 -4.73584 4.43353)" fill="white" fill-opacity="0.3") rect(width="2" height="48" transform="matrix(-0.866025 0.5 0.5 0.866025 -8.19995 6.43353)" fill="white" fill-opacity="0.3") path(d="M10.7458 15.2351C8.56819 16.8046 5.53252 17.8416 1.21765 17.9178C1.39722 20.9921 3.23273 24.0833 6.23201 26.4619C9.38576 28.9631 13.7877 30.6406 18.7505 30.6406C28.509 30.6406 35.9373 24.6321 36.2843 17.8549C31.9674 17.7793 28.9144 16.7463 26.715 15.184C24.4306 13.5614 23.1171 11.4033 22.2518 9.28272C21.8197 8.22373 21.4976 7.16958 21.223 6.19433C21.1316 5.86978 21.0462 5.55694 20.9641 5.25603C20.7964 4.64144 20.6423 4.07664 20.4782 3.56353C20.2332 2.79724 19.9879 2.22215 19.697 1.84288C19.425 1.48818 19.1343 1.32827 18.7505 1.32827C18.3164 1.32827 17.9966 1.50101 17.7094 1.85587C17.4023 2.23532 17.1457 2.81036 16.8946 3.57676C16.7122 4.1334 16.5436 4.75425 16.3593 5.43291C16.2909 5.68489 16.2203 5.94483 16.146 6.21242C15.8747 7.19 15.5599 8.2476 15.1376 9.30995C14.2921 11.4373 13.0076 13.6049 10.7458 15.2351Z" stroke="#252850") - g(v-if="data.crown.general.seal") - path(d="M40.4489 9.76331C40.4489 8.50504 40.5071 7.4112 40.5609 6.46817C40.5647 6.40263 40.5684 6.33791 40.5721 6.274C40.6216 5.41073 40.6628 4.69477 40.6499 4.08281C40.6361 3.4256 40.5597 2.94088 40.3946 2.56649C40.2373 2.20961 39.9865 1.92397 39.5582 1.6857C39.1149 1.43905 38.4773 1.24139 37.5522 1.09263C36.6308 0.944462 35.456 0.849421 33.9572 0.789614C31.3963 0.687426 27.9377 0.689489 23.2622 0.692278C22.4613 0.692755 21.6247 0.693254 20.7507 0.693254C20.3012 0.693254 19.8616 0.69319 19.4315 0.693125C14.1463 0.692337 10.3193 0.691765 7.54653 0.815899C6.04823 0.882975 4.87372 0.985922 3.95277 1.14147C3.02833 1.2976 2.39034 1.50195 1.94637 1.75397C1.51685 1.99779 1.26448 2.28827 1.10628 2.64835C0.940712 3.02521 0.864407 3.50982 0.850534 4.16209C0.837567 4.77177 0.878938 5.48308 0.928707 6.3388C0.932211 6.39904 0.935756 6.45999 0.939326 6.52167C0.993167 7.45178 1.05128 8.52824 1.05128 9.76331C1.05128 10.5815 1.49902 11.4558 2.44923 12.3324C3.39643 13.2061 4.7976 14.037 6.57884 14.7559C10.138 16.1924 15.1222 17.1445 20.7507 17.1445C26.3793 17.1445 31.3631 16.1924 34.922 14.7559C36.7031 14.037 38.1041 13.2061 39.0512 12.3324C40.0013 11.4559 40.4489 10.5815 40.4489 9.76331Z" fill="#FFB931" stroke="white")