تغییرات در تحقیقات
This commit is contained in:
parent
111d8b82a4
commit
35b126a68e
|
@ -40,8 +40,8 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { useResearchStore } from "../../../stores/researchStore";
|
import { useResearchStore } from "@research/stores/researchStore";
|
||||||
|
import { useSearchStore } from "@research/stores/searchStore";
|
||||||
import { mapState } from "pinia";
|
import { mapState } from "pinia";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -53,7 +53,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useSearchStore, ["searchActiveTabGetter"]),
|
// ...mapState(useSearchStore, ["searchActiveTabGetter"]),
|
||||||
...mapState(useResearchStore, ["researchSchemaGetter"]),
|
...mapState(useResearchStore, ["researchSchemaGetter"]),
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
@ -25,10 +25,13 @@
|
||||||
></filter-items>
|
></filter-items>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-for="(filter, index) in researchSchemaGetter[0].filter"
|
v-for="(filter, index) in researchSchemaGetter[0].filter"
|
||||||
v-if="researchSchemaGetter && listFilter && listFilter[filter.source_key]?.buckets.length > 0"
|
v-if="
|
||||||
|
researchSchemaGetter &&
|
||||||
|
listFilter &&
|
||||||
|
listFilter[filter?.source_key]?.buckets.length > 0
|
||||||
|
"
|
||||||
class="filters__sec"
|
class="filters__sec"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
|
@ -36,7 +39,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li
|
<li
|
||||||
v-for="(item, i) in getFilterItems(
|
v-for="(item, i) in getFilterItems(
|
||||||
filter.source_key,
|
filter?.source_key,
|
||||||
filter.by_more
|
filter.by_more
|
||||||
)"
|
)"
|
||||||
:key="i"
|
:key="i"
|
||||||
|
@ -79,8 +82,8 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState, mapActions } from "pinia";
|
import { mapState, mapActions } from "pinia";
|
||||||
import { useSearchStore } from "~/stores/searchStore";
|
import { useSearchStore } from "@search/stores/searchStore";
|
||||||
import { useResearchStore } from "../../../stores/researchStore";
|
import { useResearchStore } from "@research/stores/researchStore";
|
||||||
export default {
|
export default {
|
||||||
name: "FilterList",
|
name: "FilterList",
|
||||||
props: ["changePageFilter", "listAggregations", "selectedFilterItems"],
|
props: ["changePageFilter", "listAggregations", "selectedFilterItems"],
|
||||||
|
@ -100,17 +103,14 @@ export default {
|
||||||
windowWidth: window?.innerWidth,
|
windowWidth: window?.innerWidth,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useSearchStore, [
|
...mapState(useSearchStore, [
|
||||||
"searchSchemaGetter",
|
"searchSchemaGetter",
|
||||||
"searchActiveTabGetter",
|
"searchActiveTabGetter",
|
||||||
"selectionFilterItemsGetter",
|
"selectionFilterItemsGetter",
|
||||||
]),
|
]),
|
||||||
...mapState(useResearchStore, [
|
...mapState(useResearchStore, ["researchSchemaGetter"]),
|
||||||
"researchSchemaGetter",
|
|
||||||
|
|
||||||
]),
|
|
||||||
|
|
||||||
listTags() {
|
listTags() {
|
||||||
if (
|
if (
|
||||||
|
@ -143,15 +143,15 @@ export default {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
filterItems(newVal) {
|
filterItems(newVal) {
|
||||||
// this.selectionFilterItemsSetter(newVal)
|
// this.selectionFilterItemsSetter(newVal)
|
||||||
this.$emit("filterItems", newVal);
|
this.$emit("filterItems", newVal);
|
||||||
},
|
},
|
||||||
$route: {
|
$route: {
|
||||||
handler: function (to, from) {},
|
handler: function (to, from) {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.removeEventListener("resize", this.handleResize);
|
window.removeEventListener("resize", this.handleResize);
|
||||||
},
|
},
|
||||||
|
@ -168,7 +168,7 @@ export default {
|
||||||
// this.hidenfilter();
|
// this.hidenfilter();
|
||||||
} else if (this.$route.name === "searchNavigation") {
|
} else if (this.$route.name === "searchNavigation") {
|
||||||
this.setAnswer(this.listAggregations);
|
this.setAnswer(this.listAggregations);
|
||||||
this.filterItems = this.selectedFilterItems ;
|
this.filterItems = this.selectedFilterItems;
|
||||||
this.selectedFilterItems.forEach((element) => {
|
this.selectedFilterItems.forEach((element) => {
|
||||||
this.filterSelect.push(element.id);
|
this.filterSelect.push(element.id);
|
||||||
});
|
});
|
||||||
|
@ -190,7 +190,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(useSearchStore, ["selectionFilterItemsSetter"]),
|
...mapActions(useSearchStore, ["selectionFilterItemsSetter"]),
|
||||||
|
|
||||||
// handleResize() {
|
// handleResize() {
|
||||||
// this.windowWidth = window.innerWidth;
|
// this.windowWidth = window.innerWidth;
|
||||||
// if (this.$route.name === "searchCategory") {
|
// if (this.$route.name === "searchCategory") {
|
||||||
|
@ -290,8 +290,6 @@ export default {
|
||||||
this.delFilter(key);
|
this.delFilter(key);
|
||||||
// this.filterItems.splice(foundIndex, 1);
|
// this.filterItems.splice(foundIndex, 1);
|
||||||
el.classList.remove("active");
|
el.classList.remove("active");
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// اگر ایتم در آرایه وجود نداشت، آن را اضافه کن
|
// اگر ایتم در آرایه وجود نداشت، آن را اضافه کن
|
||||||
this.addFilter(key);
|
this.addFilter(key);
|
||||||
|
@ -333,7 +331,6 @@ export default {
|
||||||
this.filterUrl = "";
|
this.filterUrl = "";
|
||||||
var prevType = "";
|
var prevType = "";
|
||||||
this.filterSelect.forEach((item) => {
|
this.filterSelect.forEach((item) => {
|
||||||
|
|
||||||
var items = item.split("#");
|
var items = item.split("#");
|
||||||
|
|
||||||
if (prevType == items[0]) {
|
if (prevType == items[0]) {
|
||||||
|
|
56
layouts/ResearchLayout.vue
Normal file
56
layouts/ResearchLayout.vue
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
<template>
|
||||||
|
<main >
|
||||||
|
<the-sidebar :showUserAvatar="true" :menu="$attrs.menu"></the-sidebar>
|
||||||
|
|
||||||
|
<section
|
||||||
|
class="main-page__content"
|
||||||
|
:class="{ expanded: !isSidebarCollapsed }"
|
||||||
|
>
|
||||||
|
<slot name="named-slot"></slot>
|
||||||
|
<slot></slot>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import { mapActions, mapState } from "pinia";
|
||||||
|
import { useCommonStore } from "~/stores/commonStore";
|
||||||
|
import { clearBodyClass } from "@manuals/utilities";
|
||||||
|
import { mapState } from "pinia";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
beforeMount() {
|
||||||
|
clearBodyClass();
|
||||||
|
// this.uuid = Math.floor(Math.random() * 100);
|
||||||
|
// document.title = import.meta.env.VITE_SEARCH_PAGE_TITLE;
|
||||||
|
},
|
||||||
|
// mounted() {
|
||||||
|
// this.setBodyClass(this.$attrs.bodyClass);
|
||||||
|
// },
|
||||||
|
destroyed() {
|
||||||
|
clearBodyClass();
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
uuid: undefined,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(useCommonStore, ["isSidebarCollapsed"]),
|
||||||
|
},
|
||||||
|
// methods: {
|
||||||
|
// ...mapActions(useCommonStore, ["setBodyClass"]),
|
||||||
|
// },
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
/*@import "../../assets/scss/projects/tahrir/tahrir";*/
|
||||||
|
/*@import "../../assets/scss/projects/list/list";*/
|
||||||
|
// @import "../assets/search/scss/search";
|
||||||
|
@import "../assets/research/scss/research";
|
||||||
|
.search-system .modal-backdrop.show {
|
||||||
|
display: block;
|
||||||
|
background-color: #0000003b;
|
||||||
|
}
|
||||||
|
</style>
|
5
layouts/readme.md
Normal file
5
layouts/readme.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Layouts are wrappers around pages that contain a common User Interface for several pages, such as
|
||||||
|
a header and footer display. Layouts are Vue files using <slot /> components to display the page
|
||||||
|
content. The layouts/default.vue file will be used by default. Custom layouts can be set as part of
|
||||||
|
your page metadata.
|
||||||
|
If you only have a single layout in your application, we recommend using app.vue with <NuxtPage /> instead.
|
1033
pages/Research.vue
1033
pages/Research.vue
File diff suppressed because it is too large
Load Diff
1206
pages/index.vue
1206
pages/index.vue
File diff suppressed because it is too large
Load Diff
|
@ -68,11 +68,11 @@ export const useResearchStore = defineStore("researchStore", {
|
||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
researchSchemaSetter(researchSchema = undefined) {
|
researchSchemaSetter(researchSchema = []) {
|
||||||
this.researchSchema = researchSchema;
|
this.researchSchema = researchSchema;
|
||||||
},
|
},
|
||||||
|
|
||||||
researchActiveSchemaSetter(researchActiveSchema = undefined) {
|
researchActiveSchemaSetter(researchActiveSchema = []) {
|
||||||
this.researchActiveSchema = researchActiveSchema;
|
this.researchActiveSchema = researchActiveSchema;
|
||||||
},
|
},
|
||||||
researchDomainActiveSetter(domain: domain) {
|
researchDomainActiveSetter(domain: domain) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user