[WIP] Заменил степпер на квазаровский, фикс стилей
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
<template lang="pug">
|
||||
.header-inputs-wrapper.flex.items-center.font-medium.text-base(:class="{ open: isOpen }")
|
||||
.select-container(@click="changeState", v-click-outside="closeOptions")
|
||||
.select-wrapper.flex.items-center.cursor-pointer.mx-4.my-2
|
||||
.icon-wrapper.icon-search.flex.text-lg.justify-center.items-center
|
||||
span.custom-input.select-input.inline-block.box-border.align-middle.pl-2.pr-1 {{ selectedFilter }}
|
||||
.arrow.icon-down-arrow.text-xsm.mt-px.flex.justify-center.items-center
|
||||
.options-wrapper.flex.flex-col.box-border.p-4.mt-1(v-if="isOpen")
|
||||
.option-list.cursor-pointer.flex.flex-row.mb-4(
|
||||
v-for="filter in filters",
|
||||
:key="filter", @click="selectFilter(filter)"
|
||||
.header-inputs-wrapper.flex.items-center.font-medium.text-base
|
||||
q-select.w-40.pl-3.pr-2.selected(
|
||||
v-model="selectedFilter",
|
||||
:options="filters",
|
||||
borderless,
|
||||
dense
|
||||
)
|
||||
template(v-slot:selected)
|
||||
span(:style="{color: 'var(--btn-blue-color)'}") {{ selectedFilter }}
|
||||
template(v-slot:prepend)
|
||||
q-icon.pr-1(
|
||||
name="app:icon-search",
|
||||
size="18px",
|
||||
:style="{color: 'var(--btn-blue-color)', opacity: '0.7'}"
|
||||
)
|
||||
.icon-wrapper.mr-2.flex.justify-center
|
||||
.icon-ok.text-xs.flex.justify-center.items-center(v-if="filter === selectedFilter")
|
||||
.flex.items-center {{ filter }}
|
||||
q-input.px-4(
|
||||
type="text",
|
||||
placeholder="Искать ...",
|
||||
:input-style="{color: 'var(--btn-blue-color)'}",
|
||||
borderless,
|
||||
square
|
||||
)
|
||||
@@ -24,10 +24,11 @@
|
||||
|
||||
<script>
|
||||
import BaseInput from "@/components/base/BaseInput";
|
||||
import BaseSelect from "@/components/base/BaseSelect";
|
||||
|
||||
export default {
|
||||
name: "HeaderInputs",
|
||||
components: { BaseInput },
|
||||
components: { BaseInput, BaseSelect },
|
||||
data() {
|
||||
return {
|
||||
selectedFilter: "Календарь",
|
||||
@@ -36,80 +37,20 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
changeState() {
|
||||
this.isOpen = !this.isOpen;
|
||||
},
|
||||
selectFilter(filter) {
|
||||
this.selectedFilter = filter;
|
||||
},
|
||||
closeOptions() {
|
||||
this.isOpen = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
.open
|
||||
.arrow
|
||||
transform: rotate(180deg)
|
||||
|
||||
.header-inputs-wrapper
|
||||
height: 40px
|
||||
background-color: var(--default-white)
|
||||
border-radius: 4px
|
||||
border: 1px solid var(--border-light-grey-color)
|
||||
|
||||
.select-container
|
||||
.selected
|
||||
border-right: 1px solid var(--border-light-grey-color)
|
||||
|
||||
.icon-wrapper
|
||||
width: 24px
|
||||
height: 24px
|
||||
|
||||
.custom-input
|
||||
border: none
|
||||
outline: none
|
||||
background-color: transparent
|
||||
color: var(--btn-blue-color)
|
||||
height: 100%
|
||||
|
||||
.select-wrapper
|
||||
position: relative
|
||||
z-index: 2
|
||||
|
||||
.select-input
|
||||
width: 100px
|
||||
|
||||
.options-wrapper
|
||||
width: 172px
|
||||
background-color: var(--default-white)
|
||||
color: var(--font-dark-blue-color)
|
||||
border-radius: 4px
|
||||
position: absolute
|
||||
box-shadow: var(--default-shadow)
|
||||
|
||||
.search-input
|
||||
&::placeholder
|
||||
color: var(--font-grey-color)
|
||||
|
||||
.icon-search
|
||||
color: var(--btn-blue-color)
|
||||
opacity: 0.5
|
||||
|
||||
.option-list
|
||||
&:last-child
|
||||
margin: 0
|
||||
&:hover
|
||||
color: var(--btn-blue-color)
|
||||
|
||||
.arrow
|
||||
color: var(--btn-blue-color)
|
||||
|
||||
.icon-down-arrow
|
||||
width: 16px
|
||||
height: 16px
|
||||
|
||||
.input-height
|
||||
height: 38px
|
||||
</style>
|
||||
|
||||
@@ -53,6 +53,14 @@ export default {
|
||||
type: String,
|
||||
default: "menu",
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
size: {
|
||||
type: Number,
|
||||
default: 18,
|
||||
},
|
||||
disable: Boolean,
|
||||
label: String,
|
||||
},
|
||||
|
||||
79
src/components/base/BaseStepperQuasar.vue
Normal file
79
src/components/base/BaseStepperQuasar.vue
Normal file
@@ -0,0 +1,79 @@
|
||||
<template lang="pug">
|
||||
q-stepper(
|
||||
v-model="currentStep",
|
||||
:color="color",
|
||||
:flat="flat",
|
||||
class="font-input",
|
||||
animated
|
||||
)
|
||||
q-step.overflow-hidden(
|
||||
v-for="step in steps",
|
||||
:name="step.id",
|
||||
:title="step.value",
|
||||
:key="step.id",
|
||||
:prefix="step.id + 1"
|
||||
:done="currentStep > step.id"
|
||||
)
|
||||
slot
|
||||
q-stepper-navigation.flex.justify-between
|
||||
.flex
|
||||
q-btn(
|
||||
@click="prevStep",
|
||||
v-if="currentStep !== 0",
|
||||
outline,
|
||||
no-caps,
|
||||
label="Назад",
|
||||
color="primary",
|
||||
padding="8px 24px"
|
||||
)
|
||||
.flex
|
||||
q-btn(
|
||||
@click="nextStep",
|
||||
v-if="currentStep < steps.length-1",
|
||||
no-caps,
|
||||
label="Далее",
|
||||
color="primary",
|
||||
padding="8px 24px"
|
||||
)
|
||||
q-btn(
|
||||
@click="finish",
|
||||
v-if="currentStep === steps.length-1",
|
||||
no-caps,
|
||||
:label="finishLabel",
|
||||
color="primary",
|
||||
padding="8px 24px"
|
||||
)
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "BaseStepperQuasar",
|
||||
props: {
|
||||
name: Number,
|
||||
steps: Array,
|
||||
currentStep: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
nextStep: Function,
|
||||
prevStep: Function,
|
||||
flat: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: "primary",
|
||||
},
|
||||
finishLabel: {
|
||||
type: String,
|
||||
default: "Завершить",
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
.font-input
|
||||
font-feature-settings: 'pnum' on, 'lnum' on
|
||||
</style>
|
||||
@@ -39,8 +39,7 @@
|
||||
mask="###-###-### ##",
|
||||
v-model="identityDocument.snils.number",
|
||||
placeholder="000–000–000 00",
|
||||
label="Номер СНИЛС",
|
||||
outlined
|
||||
label="Номер СНИЛС"
|
||||
)
|
||||
base-input(
|
||||
disabled,
|
||||
@@ -48,8 +47,7 @@
|
||||
mask="############",
|
||||
v-model="identityDocument.inn.number",
|
||||
placeholder="000000000000",
|
||||
label="Номер ИНН",
|
||||
outlined
|
||||
label="Номер ИНН"
|
||||
)
|
||||
</template>
|
||||
|
||||
|
||||
@@ -3,42 +3,17 @@
|
||||
.flex.flex.flex-col.gap-y-6
|
||||
span.text-center.font-bold.text-xl Создание медицинской карты стоматологического пациента
|
||||
.flex.self-center
|
||||
base-stepper(
|
||||
base-stepper-quasar(
|
||||
:steps="steps",
|
||||
:currentStep="currentStep"
|
||||
:currentStep="currentStep",
|
||||
:next-step="nextStep",
|
||||
:prev-step="prevStep",
|
||||
finishLabel="Создать медицинскую карту",
|
||||
flat
|
||||
)
|
||||
component(
|
||||
v-bind:is="currentTabComponent",
|
||||
:client-detail="clientData",
|
||||
)
|
||||
.flex.justify-between
|
||||
.flex
|
||||
q-btn(
|
||||
@click="prevStep",
|
||||
v-if="currentStep !== 0",
|
||||
outline,
|
||||
no-caps,
|
||||
label="Назад",
|
||||
color="primary",
|
||||
padding="8px 24px"
|
||||
)
|
||||
.flex
|
||||
q-btn(
|
||||
@click="nextStep",
|
||||
v-if="currentStep < steps.length-1",
|
||||
no-caps,
|
||||
label="Далее",
|
||||
color="primary",
|
||||
padding="8px 24px"
|
||||
)
|
||||
q-btn(
|
||||
@click="finish",
|
||||
v-if="currentStep === steps.length-1",
|
||||
no-caps,
|
||||
label="Создать медицинскую карту",
|
||||
style="width: 272px",
|
||||
color="primary",
|
||||
padding="8px 24px"
|
||||
:client-detail="clientData"
|
||||
)
|
||||
</template>
|
||||
|
||||
@@ -48,8 +23,8 @@ import BaseSelect from "@/components/base/BaseSelect";
|
||||
import MedicalBaseData from "@/pages/medicalCard/components/MedicalBaseData";
|
||||
import MedicalIdentityDocuments from "@/pages/medicalCard/components/MedicalIdentityDocuments";
|
||||
import MedicalPolicyDocuments from "@/pages/medicalCard/components/MedicalPolicyDocuments";
|
||||
import BaseStepper from "@/components/base/BaseStepper.vue";
|
||||
import { fetchWrapper } from "@/shared/fetchWrapper.js";
|
||||
import BaseStepperQuasar from "@/components/base/BaseStepperQuasar";
|
||||
|
||||
export default {
|
||||
name: "FormCreateMedicalCard",
|
||||
@@ -59,7 +34,7 @@ export default {
|
||||
MedicalBaseData,
|
||||
MedicalIdentityDocuments,
|
||||
MedicalPolicyDocuments,
|
||||
BaseStepper,
|
||||
BaseStepperQuasar,
|
||||
},
|
||||
props: {
|
||||
selectedClientId: String,
|
||||
|
||||
@@ -1,56 +1,29 @@
|
||||
<template lang="pug">
|
||||
.flex.flex-col.gap-y-6.justify-between
|
||||
.flex.flex-col.gap-y-6
|
||||
.flex.flex-col.justify-between
|
||||
span.font-bold.text-xl Договор
|
||||
.flex.self-center
|
||||
base-stepper(
|
||||
base-stepper-quasar(
|
||||
:currentStep="currentStep",
|
||||
:steps="steps",
|
||||
:currentStep="currentStep"
|
||||
:next-step="nextStep",
|
||||
:prev-step="prevStep",
|
||||
flat
|
||||
)
|
||||
component(v-bind:is="currentTabComponent")
|
||||
.flex.justify-between
|
||||
.flex
|
||||
q-btn(
|
||||
@click="prevStep",
|
||||
v-if="currentStep !== 0",
|
||||
outline,
|
||||
no-caps,
|
||||
label="Назад",
|
||||
color="primary",
|
||||
padding="8px 24px"
|
||||
)
|
||||
.flex
|
||||
q-btn(
|
||||
@click="nextStep",
|
||||
v-if="currentStep < steps.length-1",
|
||||
no-caps,
|
||||
label="Далее",
|
||||
color="primary",
|
||||
padding="8px 24px"
|
||||
)
|
||||
q-btn(
|
||||
@click="finish",
|
||||
v-if="currentStep === steps.length-1",
|
||||
no-caps,
|
||||
label="Завершить",
|
||||
color="primary",
|
||||
padding="8px 24px"
|
||||
)
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseStepper from "@/components/base/BaseStepper";
|
||||
import AgreementCommon from "./FormsAgreementCreate/AgreementCommon";
|
||||
import AgreementPerson from "./FormsAgreementCreate/AgreementPerson";
|
||||
import AgreementServices from "./FormsAgreementCreate/AgreementServices";
|
||||
import BaseStepperQuasar from "@/components/base/BaseStepperQuasar";
|
||||
|
||||
export default {
|
||||
name: "StepperCreateAgreement",
|
||||
components: {
|
||||
BaseStepper,
|
||||
AgreementCommon,
|
||||
AgreementPerson,
|
||||
AgreementServices,
|
||||
BaseStepperQuasar,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user