Merge pull request #87 from dderbentsov/UC-36
поправил ошибки в отображении селектов
This commit is contained in:
4
src/assets/icons/calendar-input.svg
Normal file
4
src/assets/icons/calendar-input.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="16" height="18" viewBox="0 0 16 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.435 3.12162H4.97035H2.16732C1.70708 3.12162 1.33398 3.49472 1.33398 3.95495V5.55405H14.6673V3.95495C14.6673 3.49472 14.2942 3.12162 13.834 3.12162H11.435Z" fill="white"/>
|
||||||
|
<path d="M1.33398 5.55405H14.6673M1.33398 5.55405V3.95495M1.33398 5.55405V15.6667M14.6673 5.55405V3.95495M14.6673 5.55405V15.6667M11.435 3.12162V1.5M11.435 3.12162H4.97035M11.435 3.12162H13.834M4.97035 3.12162V1.5M4.97035 3.12162H2.16732M1.33398 3.95495V3.95495C1.33398 3.49472 1.70708 3.12162 2.16732 3.12162V3.12162M1.33398 3.95495C1.33398 3.49472 1.70708 3.12162 2.16732 3.12162M13.834 3.12162V3.12162C14.2942 3.12162 14.6673 3.49472 14.6673 3.95495V3.95495M13.834 3.12162C14.2942 3.12162 14.6673 3.49472 14.6673 3.95495M14.6673 15.6667V15.6667C14.6673 16.1269 14.2942 16.5 13.834 16.5V16.5M14.6673 15.6667C14.6673 16.1269 14.2942 16.5 13.834 16.5M13.834 16.5H2.16732M2.16732 16.5V16.5C1.70708 16.5 1.33398 16.1269 1.33398 15.6667V15.6667M2.16732 16.5C1.70708 16.5 1.33398 16.1269 1.33398 15.6667M3.83398 8.16667H12.1673M3.83398 10.6667H12.1673M3.83398 13.1667H12.1673" stroke="#4772F2" stroke-width="1.5" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -3,36 +3,34 @@
|
|||||||
@click="openSelect"
|
@click="openSelect"
|
||||||
:class="{border: styleBorder, 'py-2.5 px-4':!forNetworks, 'justify-center':forNetworks, 'justify-between':!forNetworks}"
|
:class="{border: styleBorder, 'py-2.5 px-4':!forNetworks, 'justify-center':forNetworks, 'justify-between':!forNetworks}"
|
||||||
)
|
)
|
||||||
.flex.mr-2
|
.flex.mr-2(v-if="!forNetworks")
|
||||||
input.text-base.select.cursor-pointer(
|
input.text-base.select.cursor-pointer(
|
||||||
:size="sizeInput"
|
:size="sizeInput"
|
||||||
v-if="!forNetworks"
|
|
||||||
v-model="optionData"
|
v-model="optionData"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
disabled
|
disabled
|
||||||
)
|
)
|
||||||
.absolute.options.top-12.left-0(
|
.absolute.options.top-12.left-0(
|
||||||
v-show="isSelectOpen"
|
v-show="isSelectOpen"
|
||||||
:id="id"
|
:id="id"
|
||||||
)
|
)
|
||||||
.option.px-4.py-1(
|
.option.px-4.py-1(
|
||||||
v-for="responsible in listData"
|
v-for="responsible in listData"
|
||||||
@click="(e) => chooseOption(e)"
|
@click="(e) => chooseOption(e)"
|
||||||
:key="responsible"
|
:key="responsible"
|
||||||
:id="responsible"
|
:id="responsible"
|
||||||
) {{responsible}}
|
) {{responsible}}
|
||||||
.flex.select.cursor-pointer.w-full.text-xl.items-center.networks(v-if="forNetworks" :class="optionData")
|
.flex.select.cursor-pointer.w-full.text-xl.items-center.networks(v-if="forNetworks" :class="optionData, 'px-2.5'")
|
||||||
.absolute.options.top-5(
|
.absolute.options.top-11.left-0(
|
||||||
v-show="isSelectOpen"
|
v-show="isSelectOpen"
|
||||||
class="left-[-11px]"
|
:id="id")
|
||||||
:id="id")
|
.flex.option.justify-center.py-1.text-xl(
|
||||||
.flex.option.justify-center.py-1.text-xl(
|
v-for="responsible in listData"
|
||||||
v-for="responsible in listData"
|
@click="(e) => chooseOption(e)"
|
||||||
@click="(e) => chooseOption(e)"
|
:key="responsible.network"
|
||||||
:key="responsible.network"
|
:id="responsible.network"
|
||||||
:id="responsible.network"
|
:class="responsible.icon"
|
||||||
:class="responsible.icon"
|
)
|
||||||
)
|
|
||||||
.select-form-separator.cursor-pointer.mr-6px(v-if="separator")
|
.select-form-separator.cursor-pointer.mr-6px(v-if="separator")
|
||||||
.text-xsm.ml-2.pt-1.icon-down-arrow.icon.text-center(v-if="!forNetworks" :class="{ open: isSelectOpen}")
|
.text-xsm.ml-2.pt-1.icon-down-arrow.icon.text-center(v-if="!forNetworks" :class="{ open: isSelectOpen}")
|
||||||
</template>
|
</template>
|
||||||
@@ -41,7 +39,6 @@
|
|||||||
export default {
|
export default {
|
||||||
name: "BaseSelect",
|
name: "BaseSelect",
|
||||||
props: {
|
props: {
|
||||||
defaultOption: String,
|
|
||||||
id: String,
|
id: String,
|
||||||
styleBorder: {
|
styleBorder: {
|
||||||
default: false,
|
default: false,
|
||||||
@@ -60,17 +57,12 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isSelectOpen: false,
|
isSelectOpen: false,
|
||||||
isSelectedOption: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openSelect() {
|
openSelect() {
|
||||||
this.isSelectOpen = !this.isSelectOpen;
|
this.isSelectOpen = !this.isSelectOpen;
|
||||||
},
|
},
|
||||||
selectOption(e) {
|
|
||||||
this.chooseOption(e);
|
|
||||||
this.isSelectedOption = true;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
:choose-option="chooseOptionNetworks"
|
:choose-option="chooseOptionNetworks"
|
||||||
:choose-priority="choosePriority"
|
:choose-priority="choosePriority"
|
||||||
:priority-list="priorityList"
|
:priority-list="priorityList"
|
||||||
:priority-option="getPriorityOption"
|
|
||||||
)
|
)
|
||||||
.flex(:style="{display :'none'}" ref="doc")
|
.flex(:style="{display :'none'}" ref="doc")
|
||||||
form-create-identity-documents(:identity-document="infoClient.identity_document" :save-client="saveClient")
|
form-create-identity-documents(:identity-document="infoClient.identity_document" :save-client="saveClient")
|
||||||
@@ -61,7 +60,7 @@ export default {
|
|||||||
basic: {
|
basic: {
|
||||||
full_name: "",
|
full_name: "",
|
||||||
birth_date: "",
|
birth_date: "",
|
||||||
priority: null,
|
priority: "",
|
||||||
contacts: [
|
contacts: [
|
||||||
{
|
{
|
||||||
id: "network",
|
id: "network",
|
||||||
@@ -130,13 +129,6 @@ export default {
|
|||||||
priorityList: ["Высокий", "Средний", "Низкий", "-"],
|
priorityList: ["Высокий", "Средний", "Низкий", "-"],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
getPriorityOption() {
|
|
||||||
return this.prioritySettings.settings.find(
|
|
||||||
(el) => el.priority === this.infoClient.basic.priority
|
|
||||||
).text;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
createIdentityDocument(id) {
|
createIdentityDocument(id) {
|
||||||
fetch("http://45.84.227.122:8080/general/identity_document/create/", {
|
fetch("http://45.84.227.122:8080/general/identity_document/create/", {
|
||||||
@@ -161,7 +153,9 @@ export default {
|
|||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
full_name: this.infoClient.basic.full_name,
|
full_name: this.infoClient.basic.full_name,
|
||||||
birth_date: this.infoClient.basic.birth_date,
|
birth_date: this.infoClient.basic.birth_date,
|
||||||
priority: this.infoClient.basic.priority,
|
priority: this.prioritySettings.settings.find(
|
||||||
|
(el) => el.text === this.infoClient.basic.priority
|
||||||
|
).priority,
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
@@ -171,9 +165,7 @@ export default {
|
|||||||
this.networkId = e.currentTarget.id;
|
this.networkId = e.currentTarget.id;
|
||||||
},
|
},
|
||||||
choosePriority(e) {
|
choosePriority(e) {
|
||||||
this.infoClient.basic.priority = this.prioritySettings.settings.find(
|
this.infoClient.basic.priority = e.target.id;
|
||||||
(el) => el.text === e.target.id
|
|
||||||
).priority;
|
|
||||||
},
|
},
|
||||||
chooseOptionNetworks(e) {
|
chooseOptionNetworks(e) {
|
||||||
let index = this.infoClient.basic.contacts.findIndex(
|
let index = this.infoClient.basic.contacts.findIndex(
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
.grid.grid-cols-2.gap-x-4.gap-y-6.px-4
|
.grid.grid-cols-2.gap-x-4.gap-y-6.px-4
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Приоритет
|
span.text-sm Приоритет
|
||||||
base-select(:list-data="priorityList" :option-data="priorityOption" default-option="Приоритет клиента" :for-networks="false" :style-border="true" :choose-option="choosePriority" :width-select="277")
|
base-select(:list-data="priorityList" :option-data="basicInfo.priority" placeholder="Приоритет клиента" :for-networks="false" :style-border="true" :choose-option="choosePriority" :size-input="22")
|
||||||
.flex.flex-col(class="gap-y-1.5")
|
.flex.flex-col(class="gap-y-1.5")
|
||||||
span.text-sm Дата рождения
|
span.text-sm Дата рождения
|
||||||
span.obligatory *
|
span.obligatory *
|
||||||
@@ -37,9 +37,6 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
choosePriority: Function,
|
choosePriority: Function,
|
||||||
priorityList: Array,
|
priorityList: Array,
|
||||||
priorityOption: {
|
|
||||||
default: "Приоритет",
|
|
||||||
},
|
|
||||||
saveNetworkId: Function,
|
saveNetworkId: Function,
|
||||||
chooseOption: Function,
|
chooseOption: Function,
|
||||||
phone: Object,
|
phone: Object,
|
||||||
|
|||||||
Reference in New Issue
Block a user