Работа над расширенным поиском
This commit is contained in:
@@ -192,7 +192,7 @@
|
|||||||
<q-input
|
<q-input
|
||||||
v-model="extSearchNames"
|
v-model="extSearchNames"
|
||||||
class="col q-mt-xs" :bg-color="inputBgColor('extended')" input-style="cursor: pointer"
|
class="col q-mt-xs" :bg-color="inputBgColor('extended')" input-style="cursor: pointer"
|
||||||
style="min-width: 200px; max-width: 752px;" label="Расширенный поиск" stack-label outlined dense clearable readonly
|
style="min-width: 200px; max-width: 638px;" label="Расширенный поиск" stack-label outlined dense clearable readonly
|
||||||
@click.stop.prevent="selectExtSearch"
|
@click.stop.prevent="selectExtSearch"
|
||||||
>
|
>
|
||||||
<template v-if="extSearchNames" #append>
|
<template v-if="extSearchNames" #append>
|
||||||
@@ -204,6 +204,54 @@
|
|||||||
</q-tooltip>
|
</q-tooltip>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
|
<div class="q-mx-xs" />
|
||||||
|
<DivBtn
|
||||||
|
class="text-grey-8 bg-yellow-1 q-mt-xs" :size="30" round
|
||||||
|
:disabled="!extSearch.author"
|
||||||
|
@me-click="extToList('author')"
|
||||||
|
>
|
||||||
|
<div style="font-size: 130%">
|
||||||
|
<b>А</b>
|
||||||
|
</div>
|
||||||
|
<template #tooltip>
|
||||||
|
<q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
||||||
|
В раздел "Авторы" с переносом значения author={{ extSearch.author }}
|
||||||
|
</q-tooltip>
|
||||||
|
</template>
|
||||||
|
</DivBtn>
|
||||||
|
|
||||||
|
<div class="q-mx-xs" />
|
||||||
|
<DivBtn
|
||||||
|
class="text-grey-8 bg-yellow-1 q-mt-xs" :size="30" round
|
||||||
|
:disabled="!extSearch.series"
|
||||||
|
@me-click="extToList('series')"
|
||||||
|
>
|
||||||
|
<div style="font-size: 130%">
|
||||||
|
<b>С</b>
|
||||||
|
</div>
|
||||||
|
<template #tooltip>
|
||||||
|
<q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
||||||
|
В раздел "Серии" с переносом значения series={{ extSearch.series }}
|
||||||
|
</q-tooltip>
|
||||||
|
</template>
|
||||||
|
</DivBtn>
|
||||||
|
|
||||||
|
<div class="q-mx-xs" />
|
||||||
|
<DivBtn
|
||||||
|
class="text-grey-8 bg-yellow-1 q-mt-xs" :size="30" round
|
||||||
|
:disabled="!extSearch.title"
|
||||||
|
@me-click="extToList('title')"
|
||||||
|
>
|
||||||
|
<div style="font-size: 130%">
|
||||||
|
<b>К</b>
|
||||||
|
</div>
|
||||||
|
<template #tooltip>
|
||||||
|
<q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
||||||
|
В раздел "Книги" с переносом значения title={{ extSearch.title }}
|
||||||
|
</q-tooltip>
|
||||||
|
</template>
|
||||||
|
</DivBtn>
|
||||||
|
|
||||||
<div class="q-mx-xs" />
|
<div class="q-mx-xs" />
|
||||||
<DivBtn
|
<DivBtn
|
||||||
class="text-grey-8 bg-yellow-1 q-mt-xs" :size="30" :icon-size="24" round
|
class="text-grey-8 bg-yellow-1 q-mt-xs" :size="30" :icon-size="24" round
|
||||||
@@ -1114,6 +1162,12 @@ class Search {
|
|||||||
window.open(window.location.href, '_blank');
|
window.open(window.location.href, '_blank');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extToList(list) {
|
||||||
|
if (this.extSearch[list])
|
||||||
|
this.search[list] = this.extSearch[list];
|
||||||
|
this.selectedList = list;
|
||||||
|
}
|
||||||
|
|
||||||
async logout() {
|
async logout() {
|
||||||
await this.api.logout();
|
await this.api.logout();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
class="q-mt-xs" style="width: 150px;" :label="`(${f.type}) ${f.field}`"
|
class="q-mt-xs" style="width: 150px;" :label="`(${f.type}) ${f.field}`"
|
||||||
:bg-color="bgColor[f.field] || 'white'"
|
:bg-color="bgColor[f.field] || 'white'"
|
||||||
stack-label outlined dense clearable
|
stack-label outlined dense clearable
|
||||||
@keypress="onKeyPress"
|
@keydown="onKeyDown"
|
||||||
>
|
>
|
||||||
<q-tooltip v-if="search[f.field]" :delay="500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
<q-tooltip v-if="search[f.field]" :delay="500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
||||||
{{ search[f.field] }}
|
{{ search[f.field] }}
|
||||||
@@ -177,7 +177,7 @@ class SelectExtSearchDialog {
|
|||||||
this.$root.stdDialog.alert(info, 'Памятка', {iconName: 'la la-info-circle'});
|
this.$root.stdDialog.alert(info, 'Памятка', {iconName: 'la la-info-circle'});
|
||||||
}
|
}
|
||||||
|
|
||||||
onKeyPress(event) {
|
onKeyDown(event) {
|
||||||
if (event.code == 'Enter')
|
if (event.code == 'Enter')
|
||||||
this.apply();
|
this.apply();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="btn" class="button clickable row justify-center items-center" @click="clickEffect">
|
<div ref="btn" class="button clickable row justify-center items-center" :class="{disabled}" @click.stop.prevent="clickEffect">
|
||||||
<div class="row justify-center items-center no-wrap" :class="{'button-pressed': pressed}">
|
<div class="row justify-center items-center no-wrap" :class="{'button-pressed': pressed}">
|
||||||
<i :class="icon" :style="`font-size: ${iconSize}px; margin-top: ${imt}px`" />
|
<i :class="icon" :style="`font-size: ${iconSize}px; margin-top: ${imt}px`" />
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
@@ -29,8 +29,9 @@ class DivBtn {
|
|||||||
height: { type: Number, default: 0 },
|
height: { type: Number, default: 0 },
|
||||||
icon: { type: String, default: '' },
|
icon: { type: String, default: '' },
|
||||||
iconSize: { type: Number, default: 14 },
|
iconSize: { type: Number, default: 14 },
|
||||||
round: { type: Boolean },
|
round: Boolean,
|
||||||
imt: { type: Number, default: 0 },// icon margin top
|
imt: { type: Number, default: 0 },// icon margin top
|
||||||
|
disabled: Boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
pressed = false;
|
pressed = false;
|
||||||
@@ -57,7 +58,12 @@ class DivBtn {
|
|||||||
style.borderRadius = `${this.size/10}px`;
|
style.borderRadius = `${this.size/10}px`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickEffect() {
|
async clickEffect(event) {
|
||||||
|
if (this.disabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$emit('meClick', event);
|
||||||
this.pressed = true;
|
this.pressed = true;
|
||||||
await utils.sleep(100);
|
await utils.sleep(100);
|
||||||
this.pressed = false;
|
this.pressed = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user