.
This commit is contained in:
7
package-lock.json
generated
7
package-lock.json
generated
@@ -11,6 +11,7 @@
|
|||||||
"@dop/astra-ui": "^0.2.5",
|
"@dop/astra-ui": "^0.2.5",
|
||||||
"@vuelidate/core": "^2.0.0",
|
"@vuelidate/core": "^2.0.0",
|
||||||
"@vuelidate/validators": "^2.0.0",
|
"@vuelidate/validators": "^2.0.0",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"vue": "^3.2.13",
|
"vue": "^3.2.13",
|
||||||
"vue-router": "^4.1.5",
|
"vue-router": "^4.1.5",
|
||||||
@@ -7578,8 +7579,7 @@
|
|||||||
"node_modules/lodash": {
|
"node_modules/lodash": {
|
||||||
"version": "4.17.21",
|
"version": "4.17.21",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/lodash.assign": {
|
"node_modules/lodash.assign": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
@@ -17981,8 +17981,7 @@
|
|||||||
"lodash": {
|
"lodash": {
|
||||||
"version": "4.17.21",
|
"version": "4.17.21",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"lodash.assign": {
|
"lodash.assign": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
"@dop/astra-ui": "^0.2.5",
|
"@dop/astra-ui": "^0.2.5",
|
||||||
"@vuelidate/core": "^2.0.0",
|
"@vuelidate/core": "^2.0.0",
|
||||||
"@vuelidate/validators": "^2.0.0",
|
"@vuelidate/validators": "^2.0.0",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"vue": "^3.2.13",
|
"vue": "^3.2.13",
|
||||||
"vue-router": "^4.1.5",
|
"vue-router": "^4.1.5",
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.medcards-wrapper.flex.flex-col.w-full.gap-y-2.h-full
|
.medcards-wrapper.flex.flex-col.gap-y-2.h-full
|
||||||
table-patients
|
|
||||||
medical-card-search
|
medical-card-search
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -13,3 +12,8 @@ export default {
|
|||||||
components: { MedicalCardSearch, TablePatients },
|
components: { MedicalCardSearch, TablePatients },
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="sass">
|
||||||
|
.medcards-wrapper
|
||||||
|
width: calc(100vw - 72px)
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.medical-wrapper.flex.h-full.rounded.w-full.flex-col
|
.medical-wrapper.rounded.h-full
|
||||||
list-header
|
list-header
|
||||||
list-contents
|
list-contents
|
||||||
</template>
|
</template>
|
||||||
@@ -16,4 +16,5 @@ export default {
|
|||||||
<style lang="sass" scoped>
|
<style lang="sass" scoped>
|
||||||
.medical-wrapper
|
.medical-wrapper
|
||||||
background-color: var(--default-white)
|
background-color: var(--default-white)
|
||||||
|
overflow: hidden
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,42 +1,16 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.header-wrapper.flex.w-full.justify-between.p-4
|
.header-wrapper.flex.w-full.justify-between.p-4
|
||||||
.flex.items-center.justify-center.gap-x-2
|
.flex.items-center.justify-center.gap-x-2
|
||||||
base-select.search(
|
base-input.search(
|
||||||
width="438px",
|
:width="438",
|
||||||
size="M",
|
size="M",
|
||||||
placeholder="Найти медкарту",
|
placeholder="Введите ФИО или номер телефона",
|
||||||
icon-left,
|
icon-left,
|
||||||
hide-dropdown-icon,
|
v-model="filterString"
|
||||||
use-input
|
|
||||||
:items="filteringMedcardsList",
|
|
||||||
custom-option,
|
|
||||||
:filter-fn="filterFn",
|
|
||||||
:popup-content-style="{height: filteringMedcardsList?.length > 3 ? '216px' : ''}"
|
|
||||||
)
|
)
|
||||||
template(v-slot:iconLeft)
|
template(#iconLeft)
|
||||||
q-icon.search-icon(name="app:search", size="20px")
|
q-icon.search-icon(name="app:search", size="20px")
|
||||||
template(v-slot:customOption="slotProps")
|
base-button(width="216px", @click="openCreateMedcardPage")
|
||||||
.w-full.item.px-4.py-2.flex.gap-x-3.cursor-pointer(
|
|
||||||
v-bind="slotProps.props"
|
|
||||||
)
|
|
||||||
q-avatar(size="40px")
|
|
||||||
img(:src="slotProps.avatar")
|
|
||||||
.flex.flex-col.gap-y-1
|
|
||||||
.text-dark.text-sm.font-medium {{ slotProps.label }}
|
|
||||||
.text-xsx.grey-color Медкарта {{ `#${slotProps.medcard?.split(" ")?.join("")}` }}
|
|
||||||
template(v-slot:beforeOptions)
|
|
||||||
.h-10.w-full.px-4.pt-3.pb-2.flex.items-center
|
|
||||||
span.text-sm.grey-color {{ filteringMedcardsList.length }} результатов
|
|
||||||
template(v-slot:noOption)
|
|
||||||
.w-full.px-4.py-3.flex.items-center.text-sm.grey-color.font-medium Результатов по запросу не найдено
|
|
||||||
base-select(
|
|
||||||
width="280px",
|
|
||||||
:items="sortingOptions",
|
|
||||||
size="M",
|
|
||||||
placeholder="Сортировать по ...",
|
|
||||||
v-model="sortingType"
|
|
||||||
)
|
|
||||||
base-button(width="216px")
|
|
||||||
q-icon.plus.mr-2(name="app:plus", size="24px")
|
q-icon.plus.mr-2(name="app:plus", size="24px")
|
||||||
span Создать медкарту
|
span Создать медкарту
|
||||||
</template>
|
</template>
|
||||||
@@ -45,47 +19,26 @@
|
|||||||
import BaseInput from "@/components/base/BaseInput.vue";
|
import BaseInput from "@/components/base/BaseInput.vue";
|
||||||
import BaseSelect from "@/components/base/BaseSelect.vue";
|
import BaseSelect from "@/components/base/BaseSelect.vue";
|
||||||
import BaseButton from "@/components/base/BaseButton.vue";
|
import BaseButton from "@/components/base/BaseButton.vue";
|
||||||
import {
|
|
||||||
medcardsList,
|
import debounce from "lodash/debounce";
|
||||||
sortingOptions,
|
|
||||||
} from "@/pages/medcards/utils/medcardsConfig.js";
|
|
||||||
export default {
|
export default {
|
||||||
name: "MedicalCardSearchHeader",
|
name: "MedicalCardSearchHeader",
|
||||||
components: { BaseInput, BaseSelect, BaseButton },
|
components: { BaseInput, BaseSelect, BaseButton },
|
||||||
|
emits: ["search"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
filteringMedcardsList: null,
|
filterString: "",
|
||||||
sortingOptions: sortingOptions,
|
|
||||||
sortingType: null,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
serializedMedcardsList() {
|
|
||||||
return medcardsList.map((elem) => ({
|
|
||||||
label: `${elem?.last_name} ${elem?.first_name} ${elem?.patronymic}`,
|
|
||||||
id: elem?.id,
|
|
||||||
avatar: elem?.avatar,
|
|
||||||
medcard: elem?.medcard,
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
filterFn(val, update) {
|
openCreateMedcardPage() {
|
||||||
update(() => {
|
alert("Создать медкарту с ФИО: " + this.filterString);
|
||||||
this.filteringMedcardsList = this.serializedMedcardsList?.filter(
|
|
||||||
(elem) => {
|
|
||||||
let reg = new RegExp(`^${val}`, "ig");
|
|
||||||
if (reg.test(elem.label)) return elem;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
initializeMedcardsList() {
|
|
||||||
this.filteringMedcardsList = this.serializedMedcardsList;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
watch: {
|
||||||
this.initializeMedcardsList();
|
filterString: debounce((value) => {
|
||||||
|
this.$emit("search", value);
|
||||||
|
}, 300),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
scrollPresence() {
|
scrollPresence() {
|
||||||
return this.medcardsInfo.length > 9;
|
return this.medcardsInfo.length > 9;
|
||||||
// const wrapper = document.getElementById("listWrapper");
|
|
||||||
// return wrapper?.scrollHeight > wrapper?.clientHeight;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -65,8 +63,7 @@ export default {
|
|||||||
.grey-color
|
.grey-color
|
||||||
color: var(--font-grey-color)
|
color: var(--font-grey-color)
|
||||||
.body
|
.body
|
||||||
height: calc(100vh - 56px - 24px - 360px - 72px - 40px)
|
overflow: auto
|
||||||
overflow-y: auto
|
|
||||||
&::-webkit-scrollbar-track
|
&::-webkit-scrollbar-track
|
||||||
margin: 24px 0 24px 0
|
margin: 24px 0 24px 0
|
||||||
background: #E9E9ED
|
background: #E9E9ED
|
||||||
|
|||||||
Reference in New Issue
Block a user