diff --git a/l2-frontend/src/construct/ConstructCompany.vue b/l2-frontend/src/construct/ConstructCompany.vue index 15ad5111b4..613b704964 100644 --- a/l2-frontend/src/construct/ConstructCompany.vue +++ b/l2-frontend/src/construct/ConstructCompany.vue @@ -307,6 +307,7 @@ :table-data="examListPagination" row-key-field-name="card_id" :checkbox-option="checkboxOption" + :cell-selection-option="cellSelectionOption" />
rowIndex + 1, + }, + { + field: 'card', + key: 'card', + title: '', + align: 'center', + width: 30, + renderBodyCell: ({ row }, h) => ( + h('div', { class: 'button' }, [ + h( + 'button', + { class: this.button.transparentButton, on: { click: () => { this.openCard(row.card_id); } } }, + [h('i', { class: 'fa-solid fa-user' })], + ), + ]) + ), }, { - field: 'fio', key: 'fio', title: 'Пациент', align: 'left', width: 300, + field: 'fio', + key: 'fio', + title: 'Пациент', + align: 'left', + width: 300, + }, + { + field: 'date', key: 'date', title: 'Дата', align: 'center', width: 50, }, { field: 'harmful_factors', key: 'harmful_factors', title: 'Вредные факторы', align: 'left', width: 200, @@ -440,6 +472,7 @@ export default { mounted() { this.getCompanies(); this.getContracts(); + this.getInternalBase(); }, methods: { async getCompanies() { @@ -552,6 +585,15 @@ export default { async getResearches() { this.researches = await this.$api('/get-research-list'); }, + async getInternalBase() { + await this.$store.dispatch(actions.DEC_LOADING); + const baseData = await this.$api('/bases'); + await this.$store.dispatch(actions.DEC_LOADING); + this.basePk = baseData.bases[0].pk; + }, + openCard(cardPk) { + window.open(`/ui/directions?card_pk=${cardPk}&base_pk=${this.basePk}`); + }, pageNumberChange(number: number) { this.page = number; }, @@ -705,3 +747,22 @@ export default { padding: 7px 0; } + +