Compare commits

...

7 Commits

Author SHA1 Message Date
Mehdi104797
10369cae2b تغییرات 2025-03-03 13:25:42 +03:30
Mehdi104797
cb4da7bb7d تغییرات جست جو 2025-03-01 13:16:46 +03:30
Mehdi104797
961426efdd فهرست 2025-03-01 11:21:13 +03:30
Mehdi104797
60069767c4 build-hadith 2025-02-27 10:13:14 +03:30
Mehdi104797
0825fefd58 build-hadith 2025-02-27 09:16:35 +03:30
Mehdi104797
371a3caece build-hadith 2025-02-27 08:55:33 +03:30
Mehdi104797
6d8478f019 تغییرات برای جستجو 2025-02-26 16:31:22 +03:30
34 changed files with 1247 additions and 125 deletions

15
apis/favoriteApi.js Normal file
View File

@ -0,0 +1,15 @@
export default {
favorite: {
add: "favorite/add/{{data_type}}/{{ref_key}}",
delete: "favorite/delete/{{data_type}}/{{id}}", //id = portal_meet_22569
deleteByRefid: "favorite/delete/{{data_type}}/{{index_key}}/{{ref_id}}", //id = portal_meet_22569
// getListSearch: "favorite/list/{{data_type}}/{{offset}}/{{limit}}", //offset=0 , limit=10
// counts: "favorite/counts/@data_type", // get
setFavoritesCat: "favorite/tags/@data_type/set/doc/@id",
getCategories: "favorite/tags/@data_type/get",
setCategories: "favorite/tags/@data_type/set",
getCounts: "favorite/tags/@data_type/counts",
getList: "favorite/list/@data_type/@offset/@limit/@filter",
},
};

24
apis/researchApi.js Normal file
View File

@ -0,0 +1,24 @@
export default {
admin: {
list: "",
show: "",
edit: "",
update: "",
delete: "",
},
research:{
listDefault:"research/search/{{user_id}}/{{offset}}/{{limit}}",
listBySearch:"research/search/{{user_id}}/{{offset}}/{{limit}}/q=",
deleteItem: "/public/{{index_key}}/delete/{{id}}", //ایدی فیش و یا حاشیه
},
subject: {
move: 'subject/order/move/parent',
order: 'subject/order/move/one',
list: 'list/subject/list',
add: 'list/subject/add',
edit: 'list/subject/edit',
delete: 'list/subject/delete',
order: 'list/subject/order',
},
};

View File

@ -45,10 +45,8 @@ export default {
list: "schema", list: "schema",
}, },
search: { search: {
autoComplate: autoComplate: "{{appname}}/complation/{{index_key}}/{{filter}}",
"{{appname}}/complation/{{index_key}}/{{filter}}", logAutoComplate: "searchlog/complation/{{filter}}",
logAutoComplate:
"searchlog/complation/{{filter}}",
default: default:
"{{appname}}/data/{{index_key}}/{{sortKey}}/{{offset}}/{{limit}}/{{filter}}", "{{appname}}/data/{{index_key}}/{{sortKey}}/{{offset}}/{{limit}}/{{filter}}",
queryNormal: queryNormal:
@ -62,12 +60,16 @@ export default {
items: items:
"navigate/report/items/search/{{index_key}}/{{offset}}/{{limit}}/{{filter}}", "navigate/report/items/search/{{index_key}}/{{offset}}/{{limit}}/{{filter}}",
chartTreeMap: "list/project/treemap/{{chart_key}}/{{filter}}", chartTreeMap: "list/project/treemap/{{chart_key}}/{{filter}}",
treeItems:"navigate/report/items/search/{{index_key}}/{{offset}}/{{limit}}/{{filter}}", treeItems:
"navigate/report/items/search/{{index_key}}/{{offset}}/{{limit}}/{{filter}}",
tree: "list/subject/list", tree: "list/subject/list",
graph:"repo/majles/{{to_key}}/relation" graph: "repo/majles/{{to_key}}/relation",
},
synonym: {
getSynonyms: "synonym/get/words",
synonymSearch: "search/qasection/synonym/@listkey/@offset/@limit/@q",
},
entity: {
blist: "{{index_key}}/{{type}}/list",
}, },
synonym:{
getSynonyms:"synonym/get/words",
synonymSearch:"search/qasection/synonym/@listkey/@offset/@limit/@q",
}
}; };

View File

@ -0,0 +1,89 @@
.search-filter {
.input-group {
border-radius: 1.6em;
border: 1px solid #eee;
}
.input-group-text {
// display: flex;
// align-items: center;
// justify-content: center;
font-size: 0.8rem;
// border: 1px solid #ddd;
}
.input-group-append {
.tavasi {
display: flex;
align-items: center;
padding: 0.4em;
}
.input-group-text {
// border-top-right-radius: 0.5em;
// border-bottom-right-radius: 0.5em;
// background-color: transparent;
}
}
.input-group-prepend {
position: relative;
.clear-search {
position: absolute;
right: -3em;
top: 0;
bottom: 0;
margin: auto;
display: flex;
align-items: center;
}
.input-group-text {
// background-color: transparent;
// border-top-left-radius: 0.5em;
// border-bottom-left-radius: 0.5em;
}
}
.form-control {
height: 2.5em;
border-color: transparent;
&::-webkit-search-decoration,
&::-webkit-search-cancel-button,
&::-webkit-search-results-button,
&::-webkit-search-results-decoration {
-webkit-appearance: none;
}
}
.nav-tabs {
overflow-x: auto;
flex-wrap: nowrap;
// border-bottom: 1px solid #00b6e3;
.nav-link {
text-align: right;
font-family: "sahel-semi-bold";
display: flex;
align-items: center;
// margin-bottom: 0.7em;
font-size: 1rem;
white-space: nowrap;
color: #6f6f6f;
border-color: transparent;
background-color: transparent;
&.active {
color: #00b6e3;
border-bottom: 1px solid #00b6e3;
}
}
.icon {
margin-left: 0.2em;
font-size: 0.6rem;
}
}
.close-search {
color: #7f8891;
}
}

View File

@ -0,0 +1,455 @@
// @import "../../common/scss/mixin";
// @import "../../common/scss/placeholder";
@import "@/assets/common/scss/mixin";
@import "@/assets/common/scss/placeholder";
// @import "../../common/scss/customizations/list-variables";
.report-system {
.main-page__content,.pages-content-container {
height: calc(100dvh - 3.8em);
min-height: 20em;
margin-right: var(--sidebar-collapsed-width);
&.expanded {
margin-right: var(--sidebar-width);
}
.pages {
//padding: 1.5em;
}
}
.menu-bar-container {
border-left: 1px solid #f1f1f1;
width: 305px;
padding-top: 24px;
padding-right: 24px;
padding-left: 24px;
min-height: 100dvh;
overflow-y: auto;
&__title {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 15px;
h5 {
font-size: 14px;
color: #1b2733;
}
.select2 {
width: 70px;
}
.select2-container--default .select2-selection--single {
border: unset;
font-size: 14px;
}
}
&__button {
@extend %simple-btn;
justify-content: flex-start;
font-size: 16px;
max-width: 256px;
color: var(--color-2);
&:not(:last-child) {
margin-bottom: 8px;
}
i {
font-size: 22px;
width: 55px;
display: flex;
justify-content: center;
align-items: center;
}
&--more {
color: var(--color-1) !important;
justify-content: center;
font-size: 19px;
font-weight: 600;
}
}
&__breadcrumb {
display: none;
}
@extend %pastil-color;
a:hover {
color: var(--color-2);
}
.color-1 {
border-color: #e8fcff;
&:hover {
background-color: #e8fcff;
}
i {
background: -webkit-linear-gradient(#00b6e3 0%, #81e6ff 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.color-2 {
border-color: #fef3ff;
&:hover {
background-color: #fef3ff;
}
i {
background: -webkit-linear-gradient(#b03bd9 0%, #dcbbff 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.color-3 {
border-color: #fffbe1;
&:hover {
background-color: #fffbe1;
}
i {
background: -webkit-linear-gradient(#fb0 0%, #ffdd81 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.color-4 {
border-color: #e7fce7;
&:hover {
background-color: #e7fce7;
}
i {
background: -webkit-linear-gradient(#39b778 0%, #88f57c 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.color-5 {
border-color: #e7fce7;
&:hover {
background-color: #e7fce7;
}
i {
background: -webkit-linear-gradient(#c1d4da 0%, #d9e2e9 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.menu-bar-content__edit-mark {
transition: all 0.3s ease;
margin-right: auto;
opacity: 0;
i {
background: -webkit-linear-gradient(#8fa4ab 0%, #bdc7d2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-size: 20px;
width: 30px;
}
}
.menu-bar-content__edit-mark-container {
margin-right: auto;
background-color: none;
background: none;
border: none;
width: unset;
display: flex;
justify-content: flex-end;
outline: none;
}
&__button:hover {
.menu-bar-content__edit-mark {
opacity: 1;
}
.menu-bar-content__edit-mark {
i {
background: -webkit-linear-gradient(#8fa4ab 0%, #bdc7d2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
}
&__header {
display: flex;
justify-content: space-between;
border-bottom: 1px solid #f1f1f1;
&--phone {
display: none;
}
}
&__search {
a {}
i {
font-size: 20px;
background: -webkit-linear-gradient(#a9bcc2 0%, #ccd2da 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
&__navs {
ul {}
li {}
a {
font-size: 13px;
color: #92a2b2;
}
}
&__search {
a {}
i {}
}
.nav-tabs {
border-color: transparent;
}
.nav-tabs .nav-link {
border: unset;
margin-left: 18px;
padding: 0;
padding-bottom: 20px;
&:first-child {
margin-right: 0;
}
&:hover {
color: var(--color-1);
}
}
.nav-tabs .nav-link.active {
border-bottom: 1px solid var(--color-1);
color: var(--color-1);
}
.detail-page__filters {
position: static;
right: unset;
z-index: 10;
top: unset;
background-color: unset;
border-left: unset;
.scrollbar {
max-width: 300px;
width: 100%;
padding-right: 0;
padding-left: 1em;
height: calc(100dvh - 6em);
}
}
}
.detail-page {
&__header {
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 47px;
padding-right: 47px;
border-bottom: 1px solid #f1f1f1;
padding-bottom: 10px;
height: 64px;
.document-list__star {
opacity: 1 !important;
}
}
&__head {
display: flex;
flex-direction: column;
}
&__title {
font-size: 14px;
display: flex;
align-items: center;
i {
margin-right: 3px;
font-size: 26px !important;
background: -webkit-linear-gradient(#c1d4da 0%, #e2e8ef 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
&__breadcrumb {
ul {
display: flex;
align-items: center;
list-style: none;
}
li {
display: flex;
align-items: center;
&:not(:last-child):after {
content: ">";
padding-right: 8px;
padding-left: 8px;
padding-top: 4px;
font-size: 10px;
font-weight: bold;
color: #bac4ce;
display: flex;
justify-content: center;
align-items: center;
}
&:last-child {
flex: 1;
a {}
}
}
a {
display: block;
font-size: 12px;
color: #92a2b2;
}
}
&__meta {
ul {
display: flex;
align-items: center;
}
li {}
}
&__shared-user {}
&__content {
max-height: calc(100dvh - 151px);
padding-right: 40px;
padding-top: 40px;
padding-bottom: 40px;
max-width: 696px;
margin-right: auto;
margin-left: auto;
h1 {
font-size: 24px;
color: #444444;
margin-top: 8px;
margin-bottom: 8px;
}
p {
font-size: 16px;
font-weight: lighter;
line-height: 30px;
margin-bottom: 8px;
}
}
&__edit-btn {
position: fixed;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
a {
min-width: 88px;
height: 40px;
color: white;
display: flex;
justify-content: center;
align-items: center;
font-size: 14px;
border-radius: 20px;
background: #1b2733;
&:hover {
color: white;
opacity: 0.8;
}
}
}
}
// .pages-content {
// padding: 0;
// }
.nav-tabs {
.nav-link {
color: #92a2b2;
border: 0;
border-bottom: 1px solid transparent;
&.active {
color: #00b6e3;
border-bottom: 1px solid #00b6e3;
}
}
}
}
.main {
.main-page__content {
.pages {
.pages-content {
.my-profile {
.aks-file-upload {
.aks-file-upload-content {
.profile__avatar {
img {
object-fit:cover;
border-radius:50%;
width:122px;
height:122px;
}
}
}
}
}
}
}
}
}
@import "./components/search-filter.scss";
@import "../../common/scss/layouts/panels";
@import "../../common/scss/responsive/responsive.scss"

View File

@ -157,7 +157,7 @@ export default {
components: { components: {
EntityToolsHeader: defineAsyncComponent(() => EntityToolsHeader: defineAsyncComponent(() =>
import("~/components/entity/components/EntityToolsHeader.vue") import("@search/components/entity/components/EntityToolsHeader.vue")
), ),
}, },
}; };

View File

@ -142,12 +142,12 @@ import chatApi from "@apis/chatApi";
import { mapActions, mapState } from "pinia"; import { mapActions, mapState } from "pinia";
import { useEntityStore } from "@search/stores/entityStore"; import { useEntityStore } from "@search/stores/entityStore";
import { useCommonStore } from "@stores/commonStore"; import { useCommonStore } from "~/stores/commonStore";
import { useSearchStore } from "@search/stores/searchStore"; import { useSearchStore } from "@search/stores/searchStore";
import propertyModalMixin from "@mixins/entity/propertyModalMixin"; import propertyModalMixin from "@search/mixins/entity/propertyModalMixin";
import EntityUploaderModal from "@components/entity/modals/EntityUploaderModal.vue"; import EntityUploaderModal from "@search/components/entity/modals/EntityUploaderModal.vue";
import EntityReportsModal from "@components/entity/modals/EntityReportsModal.vue"; import EntityReportsModal from "@search/components/entity/modals/EntityReportsModal.vue";
// import EntityCommentsList from "@components/entity/components/EntityComments.vue"; // import EntityCommentsList from "@components/entity/components/EntityComments.vue";
// import EntityCommentsForm from "@components/entity/components/EntityCommentsForm.vue"; // import EntityCommentsForm from "@components/entity/components/EntityCommentsForm.vue";
// import EntityLinkForm from "@components/entity/components/EntityLinkForm.vue"; // import EntityLinkForm from "@components/entity/components/EntityLinkForm.vue";

View File

@ -52,7 +52,7 @@ import repoApi from "@apis/repoApi";
import { mapActions, mapState } from "pinia"; import { mapActions, mapState } from "pinia";
import chatApi from "~/apis/chatApi"; import chatApi from "~/apis/chatApi";
import { useEntityStore } from "@search/stores/entityStore"; import { useEntityStore } from "@search/stores/entityStore";
import { useCommonStore } from "@stores/commonStore"; import { useCommonStore } from "~/stores/commonStore";
// import { createNewTooltip } from "~/services/createFloatingVue"; // import { createNewTooltip } from "~/services/createFloatingVue";
/** /**

View File

@ -373,11 +373,11 @@
</template> </template>
<script> <script>
import searchApis from "~/apis/searchApi"; import searchApis from "@search/apis/searchApi";
import adminApi from "~/apis/adminApi"; import adminApi from "~/apis/adminApi";
import settingsApi from "~/apis/settingsApi"; import settingsApi from "~/apis/settingsApi";
import { mapState, mapActions } from "pinia"; import { mapState, mapActions } from "pinia";
import stopWordContextMenu from "~/json/entity/stopWordContextMenu"; import stopWordContextMenu from "@search/json/entity/stopWordContextMenu";
import { useEntityStore } from "@search/stores/entityStore"; import { useEntityStore } from "@search/stores/entityStore";
/** /**

View File

@ -207,7 +207,7 @@
</template> </template>
<script> <script>
import entityTextMixin from "@mixins/entity/entityTextMixin"; import entityTextMixin from "@search/mixins/entity/entityTextMixin";
import { mapState, mapActions } from "pinia"; import { mapState, mapActions } from "pinia";
import repoApi from "@apis/repoApi"; import repoApi from "@apis/repoApi";
import { useEntityStore } from "@search/stores/entityStore"; import { useEntityStore } from "@search/stores/entityStore";
@ -409,7 +409,10 @@ export default {
}; };
}, },
computed: { computed: {
...mapState(useEntityStore, ["selectedItemEntityGetter","textStepsGetter"]), ...mapState(useEntityStore, [
"selectedItemEntityGetter",
"textStepsGetter",
]),
...mapState(useCommonStore, ["fontDataGetter"]), ...mapState(useCommonStore, ["fontDataGetter"]),
// fontSize() { // fontSize() {

View File

@ -75,7 +75,7 @@
import entityApi from "~/apis/entityApi.js"; import entityApi from "~/apis/entityApi.js";
import { mapState } from "pinia"; import { mapState } from "pinia";
import { cloneDeep } from "lodash"; import { cloneDeep } from "lodash";
import { useCommonStore } from "@stores/commonStore"; import { useCommonStore } from "~/stores/commonStore";
import { useEntityStore } from "@search/stores/entityStore"; import { useEntityStore } from "@search/stores/entityStore";
/** /**
* @vue-prop {Object} [valueModal={}] - یک آبجکت از مقادیر مورد نیاز برای فیش * @vue-prop {Object} [valueModal={}] - یک آبجکت از مقادیر مورد نیاز برای فیش

View File

@ -62,11 +62,11 @@
import repoApi from "~/apis/repoApi"; import repoApi from "~/apis/repoApi";
import { mapActions, mapState } from "pinia"; import { mapActions, mapState } from "pinia";
import { useSearchStore } from "~/stores/searchStore"; import { useSearchStore } from "@search/stores/searchStore";
import { useCommonStore } from "~/stores/commonStore"; import { useCommonStore } from "~/stores/commonStore";
import { useEntityStore } from "@search/stores/entityStore"; import { useEntityStore } from "@search/stores/entityStore";
import entityTextMixin from "~/mixins/entity/entityTextMixin"; import entityTextMixin from "@search/mixins/entity/entityTextMixin";
/** /**
* @vue-prop {String} [propText=""] - مقدار متنی که به عنوان ورودی به کامپوننت داده میشود. * @vue-prop {String} [propText=""] - مقدار متنی که به عنوان ورودی به کامپوننت داده میشود.
* @vue-data {String} [httpService=undefined] - محل قرارگیری آدرس URL سرویس HTTP. * @vue-data {String} [httpService=undefined] - محل قرارگیری آدرس URL سرویس HTTP.

View File

@ -97,7 +97,7 @@
<script> <script>
import { mapState, mapActions } from "pinia"; import { mapState, mapActions } from "pinia";
import toolsHeader from "~/json/entity/toolsHeader.json"; import toolsHeader from "@search/json/entity/toolsHeader.json";
import { useEntityStore } from "@search/stores/entityStore"; import { useEntityStore } from "@search/stores/entityStore";
export default { export default {

View File

@ -233,7 +233,7 @@
import searchApi from "~/apis/searchApi"; import searchApi from "~/apis/searchApi";
import { mapActions, mapState } from "pinia"; import { mapActions, mapState } from "pinia";
import mammoth from "mammoth"; import mammoth from "mammoth";
import { useSearchStore } from "@stores/searchStore"; import { useSearchStore } from "@search/stores/searchStore";
import { useEntityStore } from "@search/stores/entityStore"; import { useEntityStore } from "@search/stores/entityStore";
export default { export default {

View File

@ -65,7 +65,7 @@ import entityApi from "@apis/entityApi";
import { mapActions, mapState } from "pinia"; import { mapActions, mapState } from "pinia";
import { useEntityStore } from "@search/stores/entityStore"; import { useEntityStore } from "@search/stores/entityStore";
import { useSearchStore } from "~/stores/searchStore"; import { useSearchStore } from "@search/stores/searchStore";
import { useCommonStore } from "~/stores/commonStore"; import { useCommonStore } from "~/stores/commonStore";
export default { export default {

View File

@ -30,7 +30,7 @@
import { mapState, mapActions } from "pinia"; import { mapState, mapActions } from "pinia";
import favoriteApi from "~/apis/favoriteApi"; import favoriteApi from "~/apis/favoriteApi";
import { useEntityStore } from "@search/stores/entityStore"; import { useEntityStore } from "@search/stores/entityStore";
import { useSearchStore } from "~/stores/searchStore"; import { useSearchStore } from "@search/stores/searchStore";
import { useCommonStore } from "~/stores/commonStore"; import { useCommonStore } from "~/stores/commonStore";
export default { export default {
props: ["item"], props: ["item"],

View File

@ -0,0 +1,192 @@
<template>
<div class="form-group" :key="$attrs.name">
<div class="d-flex switch-main">
<div class="custom-control custom-switch">
<input
type="checkbox"
@change="updateMode"
:id="$attrs.name"
:name="$attrs.name"
v-model="textValue"
:true-value="true"
:false-value="false"
class="custom-control-input"
/>
<label class="custom-control-label" :for="$attrs.name">{{
$t(text1)
}}</label>
</div>
<label class="mb-0 mr-2 text-2" :for="$attrs.name">{{ $t(text2) }}</label>
</div>
</div>
</template>
<script>
import formBuilderMixin from "~/extensions/formBuilderExtension.js";
/**
* @vue-prop {string} [texts2 = Statistics] - متنی که برای نمایش به عنوان "ChartList" استفاده میشود.
* @vue-prop {string} [texts1 = Normal] - متنی که برای نمایش به عنوان "Chart" استفاده میشود.
*
* @vue-data {boolean} [textValue = true] - حالت انتخاب شده ی سوئیچ در حالت true فعال و در حالت false غیر فعال می باشد
* @vue-data {String} [text1 = ""] - متن اول که در برچسب اول نمایش داده میشود.
* @vue-data {String} [text2 = ""] - متن دوم که در برچسب دوم نمایش داده میشود.
*/
export default {
extends: formBuilderMixin,
// props: ["texts1", "texts2"],
props: {
texts2: {
default: "Statistics",
},
texts1: {
default: "Normal",
},
value: {
default: true,
},
},
data() {
return {
textValue: true,
text1: "Chart",
text2: "ChartList",
};
},
mounted() {
this.textValue = this.value;
this.updateText();
},
methods: {
/**
* متنهای پراپها را به متغیرهای اختصاص میدهد.
* اگر texts1 تعریف شده باشد، مقادیر text1 و text2 را به ترتیب با texts1 و texts2 جایگزین میکند.
*/
updateText() {
if (this.texts1 !== undefined) {
this.text1 = this.texts1;
this.text2 = this.texts2;
}
},
/**
* رویداد تغییر وضعیت چکباکس را مدیریت میکند.
* مقدار جدید textValue را از طریق رویداد "change-mode" به والد کامپوننت ارسال میکند.
*/
updateMode() {
this.$emit("change-mode", this.textValue);
},
},
};
</script>
<style scoped lang="scss">
.custom-control-label {
white-space: nowrap;
&::before {
border-color: var(--primary-color) !important ;
// background-color: var(--primary-color)!important;
}
}
.entity-text-switch {
.switch-main {
justify-content: end;
margin-left: 3em;
}
.custom-control-input {
width: 5em;
z-index: 99;
}
}
.custom-control {
.custom-control-input {
&:checked ~ .custom-control-label::before {
background-color: var(--primary-color);
}
}
}
.task-admin-switch {
&.form-group {
margin-bottom: 0 !important;
margin-top: 1em;
margin-right: 1em;
}
.custom-control-label {
&::before {
border-color: #fff;
background-color: rgb(135, 255, 249);
}
&::after {
background-color: #fff;
}
}
}
.compare-switch {
.custom-control-label {
&::before {
border-color: #fff;
background-color: rgb(135, 255, 249);
}
&::after {
background-color: #fff;
}
}
}
.text-2 {
white-space: nowrap;
}
/* .form-control {
height: auto !important;
} */
/*
.checkbox-4 {
width: 100px;
appearance: none;
height: 40px;
border-radius: 100px;
cursor: pointer;
background: #ffffff;
position: relative;
background: #e0e5ec;
box-shadow: 4px 4px 6px 0 rgba(255, 255, 255, 0.3),
-4px -4px 6px 0 rgba(116, 125, 136, 0.2),
inset -4px -4px 6px 0 rgba(255, 255, 255, 0.2),
inset 4px 4px 6px 0 rgba(0, 0, 0, 0.2);
transition: all 0.5s;
}
.checkbox-4::after {
content: "";
width: 30px;
height: 30px;
position: absolute;
left: 8px;
top: 5px;
border-radius: 100%;
background-color: #ffffff;
box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, 0.5),
7px 7px 20px 0px rgba(0, 0, 0, 0.1), 4px 4px 5px 0px rgba(0, 0, 0, 0.1);
transition: all 0.5s;
}
.checkbox-4:checked::after {
left: 65px;
}
.checkbox-4-pink:checked {
background: #fb2175;
}
.checkbox-4-danger:checked {
background: var(--danger);
}
.checkbox-4-success:checked {
background: var(--success);
}
.checkbox-4-info:checked {
background: var(--info);
}
.checkbox-4-dark:checked {
background: #1a1a1a;
}
.checkbox-4-magic:checked {
background: var(--magic);
} */
</style>

View File

@ -0,0 +1,178 @@
<template>
<div class="advanced-search firefox-scrollbar">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<form>
<component
v-for="(formElement, index) in localFormElements"
:key="index"
:formElement="getValueToFormElement(formElement)"
:inputClass="formElement.inputClass"
:labelClass="formElement.labelClass"
:is="returnComponentName(formElement.type)"
@tribute-on-search="remoteSearch"
@oninput="createQuery($event, index)"
class="inside-advanced-search"
></component>
<div class="d-flex justify-content-end align-items-baseline">
<div class="bottom-close-form ms-3">
<a @click.prevent="closeAdvancedSearch">بستن</a>
</div>
<div class="bottom-save-form">
<button
type="submit"
class="btn btn-primary"
style="font-size: 11px; height: 3em; width: 7em"
@click.prevent="searchStart()"
>
جستجو
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</template>
<script>
import { useResearchStore } from "../../../stores/researchStore";
import { mapState } from "pinia";
export default {
data() {
return {
listUpdatedText: {},
localFormElements: [],
value: "",
};
},
computed: {
...mapState(useSearchStore, ["searchActiveTabGetter"]),
...mapState(useResearchStore, ["researchSchemaGetter"]),
},
watch: {
researchSchemaGetter: {
handler: function (newSchema) {
if (newSchema[0].advance)
this.localFormElements = structuredClone(newSchema[0].advance);
},
// deep: true,
immediate: true,
},
},
beforeMount() {
this.httpService = new HttpService(import.meta.env.VITE_BASE_URL);
},
mounted() {
this.localFormElements = structuredClone(
this.researchSchemaGetter[0].advance
);
},
methods: {
closeAdvancedSearch() {
this.$emit("closeAdvancedSearch");
},
remoteSearch({ text, cb, item }) {
// for clearing the query when user remove by keyboard backspace.
if (text == "") this.makeSearchParams(undefined, 1);
let url = item.completion;
text = text.trim();
url = url.replace("{{key}}", this.researchSchemaGetter[0].key);
if (text == "") url = url.replace("/{{query}}", "");
else url = url.replace("{{query}}", text);
this.httpService.getRequest(url).then((response) => {
cb(response.data);
});
},
getValueToFormElement(elements) {
Object.keys(elements).forEach((key, index) => {
elements["value"] = this.researchSchemaGetter[0][elements.key];
});
return elements;
},
saveComponentValue(value, formElement) {
// در صورت تغییر نگهداری می شود تا وقتی کلید ثبت زد، ذخیره شود
if (this.researchSchemaGetter[0][formElement.key] != value) {
this.listUpdatedText[formElement.key] = value;
}
},
returnComponentName(type) {
// if(!this.isEditable(searchActiveTabGetter?.key))
// return "LabelComponent";
if (type == "select") return "SelectComponent";
else if (type == "range_date") return "RangeDateComponent";
else if (type == "completion") return "TributeComponent";
else return "InputComponent";
},
// این لازم نیست و استفاده نداره!!!!!
// saveProperty() {
// let id = this.$route.params.id;
// let key = this.$route.params.key;
// let formData = {
// id: id,
// meta: JSON.stringify(this.listUpdatedText),
// };
// let url = "/public/{{index_key}}/update/{{id}}";
// url = url.replace("{{index_key}}", key).replace("{{id}}", id);
// this.httpService.postRequest(url, formData).then((res) => {
// this.getServerItem();
// });
// },
createQuery(evt, index) {
// evt.target.value => from input component.
//evt => from datetime component.
let value = evt?.target?.value ?? evt;
this.$emit("set-query-advanced", this.makeSearchParams(value, index));
},
makeSearchParams(value, index) {
if (value != undefined) this.localFormElements[index].value = value;
else this.localFormElements[index].value = undefined;
let query = "";
this.localFormElements.forEach((item, rowIndex, array) => {
if (item.value?.length)
query += "#" + item.tag + " " + item.value + " ";
});
return query;
},
searchStart() {
this.$emit("searchStart", this.searchStartValue());
},
searchStartValue() {
let query = "";
this.localFormElements.forEach((item, rowIndex, array) => {
if (item.value?.length)
query += "#" + item.tag + " " + item.value + " ";
});
return myEncodeQuery(query);
},
myEncodeQuery(text) {
let ch1 = encodeURIComponent("#");
let ch2 = encodeURIComponent("/");
let ch3 = encodeURIComponent("\\");
// let ch4 = encodeURIComponent(".");
text = text.replaceAll("#", ch1);
text = text.replaceAll("/", "\\");
text = text.replaceAll("\\", ch3);
// text = text.replaceAll(".", '%2E');
return text;
},
},
};
</script>

View File

@ -399,13 +399,14 @@
<script> <script>
// import HttpService from "@services/httpService"; // import HttpService from "@services/httpService";
// import tableActions from "@search/json/listTableContextMenu"; // import tableActions from "@search/json/listTableContextMenu";
import favoriteApi from "~/apis/favoriteApi"; import favoriteApi from "@search/apis/favoriteApi";
import researchApi from "~/apis/researchApi"; import researchApi from "@search/apis/researchApi";
import { mapState, mapActions } from "pinia"; import { mapState, mapActions } from "pinia";
import { useSearchStore } from "~/stores/searchStore";
// import { useResearchStore } from "@search/stores/researchStore";
import { useSearchStore } from "@search/stores/searchStore";
import { useEntityStore } from "@search/stores/entityStore"; import { useEntityStore } from "@search/stores/entityStore";
import { useAuthStore } from "~/stores/authStore";
export default { export default {
props: { props: {
@ -476,8 +477,8 @@ export default {
}; };
}, },
computed: { computed: {
// ...mapState(useResearchStore, ["searchActiveTabGetter"]),
...mapState(useSearchStore, ["searchActiveTabGetter"]), ...mapState(useSearchStore, ["searchActiveTabGetter"]),
...mapState(useAuthStore, ["isRealUser"]),
}, },
methods: { methods: {
...mapActions(useEntityStore, ["SET_ITEM_ENTITY", "SET_LIST_ENTITY"]), ...mapActions(useEntityStore, ["SET_ITEM_ENTITY", "SET_LIST_ENTITY"]),
@ -713,7 +714,8 @@ export default {
} }
this.$router.push({ this.$router.push({
path: `/search/${key}/${valueId}`, name:'showEntity',
// path: `/search/${key}/${valueId}`,
params: { params: {
id: valueId, id: valueId,
key: key, key: key,
@ -732,7 +734,7 @@ export default {
}, },
showTextPage(event) {}, showTextPage(event) {},
async deleteResearch(item) { async deleteResearch(item) {
this.mySwalConfirm({ mySwalConfirm({
title: "هشدار!!!", title: "هشدار!!!",
html: `از حذف <b>${item._source.text_subject}</b> اطمینان دارید؟ `, html: `از حذف <b>${item._source.text_subject}</b> اطمینان دارید؟ `,
icon: "warning", icon: "warning",
@ -749,7 +751,7 @@ export default {
method: "post", method: "post",
}); });
this.mySwalToast({ mySwalToast({
html: res.message, html: res.message,
}); });
setTimeout(() => { setTimeout(() => {

View File

@ -16,7 +16,8 @@
<script> <script>
import { mapState } from "pinia"; import { mapState } from "pinia";
import { useSearchStore } from "~/stores/searchStore"; // import { useSearchStore } from "~/stores/searchStore";
// import { useSearchStore } from "@search/stores/searchStore";
export default { export default {
props: { props: {
filters: { filters: {
@ -32,7 +33,7 @@ export default {
}, },
}, },
computed: { computed: {
...mapState(useSearchStore, ["selectionFilterItemsGetter"]), // ...mapState(useSearchStore, ["selectionFilterItemsGetter"]),
}, },
}; };
</script> </script>

View File

@ -850,7 +850,8 @@ export default {
} }
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
@import "../../assets/reports/scss/components/search-filter.scss"; // @import "../../assets/reports/scss/components/search-filter.scss";
@import "../../../search_ui/assets/reports/scss/components/search-filter.scss";
.multiselect-item { .multiselect-item {
width: 100%; width: 100%;
overflow: auto; overflow: auto;

View File

@ -14,7 +14,7 @@
<script> <script>
import { mapState, mapActions } from "pinia"; import { mapState, mapActions } from "pinia";
import { useSearchStore } from "~/stores/searchStore"; import { useSearchStore } from "@search/stores/searchStore";
export default { export default {
props: { props: {

View File

@ -67,7 +67,7 @@
import { mapState, mapActions } from "pinia"; import { mapState, mapActions } from "pinia";
import searchApi from "~/apis/searchApi"; import searchApi from "~/apis/searchApi";
// import HttpService from "@services/httpService"; // import HttpService from "@services/httpService";
import { useSearchStore } from "~/stores/searchStore"; import { useSearchStore } from "@search/stores/searchStore";
import { useCommonStore } from "~/stores/commonStore"; import { useCommonStore } from "~/stores/commonStore";
export default { export default {

View File

@ -88,7 +88,7 @@
import { mapState, mapActions } from "pinia"; import { mapState, mapActions } from "pinia";
import listApis from "~/apis/listApi"; import listApis from "~/apis/listApi";
import { useSearchStore } from "~/stores/searchStore"; import { useSearchStore } from "@search/stores/searchStore";
// import { VueTreeList, Tree, TreeNode } from "vue-tree-list"; // import { VueTreeList, Tree, TreeNode } from "vue-tree-list";

View File

@ -1,7 +1,7 @@
<template> <template>
<div <div
class="main-chart" class="main-chart"
:class="{ 'jahat-chart': this.activeSystemGetter?.link == 'jahat' }" :class="{ 'jahat-chart': activeSystemGetter?.link == 'jahat' }"
> >
<div class="body" :class="bodyclass"> <div class="body" :class="bodyclass">
<div class="body-chart"> <div class="body-chart">
@ -109,58 +109,13 @@
</template> </template>
<script> <script>
// import HttpService from "~/services/httpService"; // import HttpService from "~/services/httpService";
import searchApi from "~/apis/searchApi"; // import searchApi from "~/apis/searchApi";
import repoApi from "~/apis/repoApi"; import searchApi from "@search/apis/searchApi";
import chartType from "~/json/search/chart.json"; // import repoApi from "~/apis/repoApi";
import chartType from "@search/json/search/chart.json";
import { mapState } from "pinia"; import { mapState } from "pinia";
// import TermContent from "~/components/search/view/TermContent.vue"; import { useSearchStore } from "@search/stores/searchStore";
// import NeshaContent from "~/components/search/view/NeshaContent.vue"; import { useCommonStore } from "~/stores/commonStore";
// import SearchContent from "~/components/search/view/SearchContent.vue";
// import QanonContent from "~/components/search/view/QanonContent.vue";
// import MajlesQanonContent from "~/components/search/view/MajlesQanonContent.vue";
// import MajlesQavaninContent from "~/components/search/view/MajlesQavaninContent.vue";
// import MajlesSectionContent from "~/components/search/view/MajlesSectionContent.vue";
// import MajlesMashruhContent from "~/components/search/view/MajlesMashruhContent.vue";
// import EmamainContent from "~/components/search/view/EmamainContent.vue";
// import MyContent from "~/components/search/MyContent.vue";
// import MajlesQaSectionContent from "~/components/search/view/MajlesQaSectionContent.vue";
// import EntityContent from "~/components/search/view/EntityContent.vue";
/**
* @vue-prop {String|null} [addressBarUrl=null] - آدرس بار
* @vue-prop {String} [selectedCategory=""] - دستهبندی انتخاب شده
* @vue-prop {Array} [dataChart=[]] - دادههای نمودار
* @vue-prop {Array} [dataTreeMap=[]] - دادههای درخت نقشه
* @vue-prop {String} [chartComponentName=""] - نام کامپوننت نمودار
*
* @vue-data {Object} [PieOptions={ radius: "60%", selectedMode: "single" }] - گزینههای نمودار دایرهای
* @vue-data {Number} [reRender=1] - شمارنده برای رندر مجدد
* @vue-data {String} [controlRequest=""] - درخواست کنترل
* @vue-data {Number} [listType=1] - نوع لیست
* @vue-data {Boolean} [hiden=false] - وضعیت پنهان شدن
* @vue-data {Boolean} [showBodyDescription=false] - نمایش توضیحات بدنه
* @vue-data {String} [name=""] - نام
* @vue-data {String} [y=""] - مقدار محور y
* @vue-data {Array} [chartAnswer=[]] - پاسخ نمودار
* @vue-data {String} [listSelectedPoint=""] - نقطه انتخاب شده در لیست
* @vue-data {Array} [listEntity=[]] - موجودیتهای لیست
* @vue-data {String} [selectedPoint=""] - نقطه انتخاب شده
* @vue-data {Object|undefined} [httpService=undefined] - سرویس HTTP
* @vue-data {Array} [chartTypeList=chartType] - لیست انواع نمودار
* @vue-data {Number} [Status=2] - وضعیت
* @vue-data {String} [filterUrl=""] - آدرس فیلتر
* @vue-data {String} [navigationList=""] - لیست ناوبری
* @vue-data {String} [navigationItemTitle=""] - عنوان آیتم ناوبری
* @vue-data {String} [navigationItem=""] - آیتم ناوبری
* @vue-data {String} [chartName=chartType[0].chartName] - نام نمودار
* @vue-data {Object} [pagination={ page: 1, pages: 0, total: 0, offset: 0, limit: 10 }] - اطلاعات صفحهبندی
* @vue-data {Boolean} [showList=false] - نمایش لیست
*
* @vue-computed {String} repoBaseUrl - آدرس پایه مخزن از محیط
* @vue-computed {String} bodyclass - کلاس بدنه بر اساس نام کامپوننت نمودار
* @vue-computed {Boolean} showNavigateItems - نمایش آیتمهای ناوبری بر اساس نام کامپوننت نمودار
* @vue-computed {String} contentComponentName - نام کامپوننت محتوا بر اساس وضعیت جستجو
*/
export default { export default {
props: { props: {
@ -250,8 +205,9 @@ export default {
...mapState(useSearchStore, [ ...mapState(useSearchStore, [
"searchChartSchemaGetter", "searchChartSchemaGetter",
"searchChartActiveSchemaGetter", "searchChartActiveSchemaGetter",
// "activeTabGetter", "activeTabGetter",
]), ]),
...mapState(useCommonStore, ["activeSystemGetter"]),
// repoBaseUrl() { // repoBaseUrl() {
// return import.meta.env.VITE_REPO; // return import.meta.env.VITE_REPO;
// }, // },
@ -462,7 +418,7 @@ export default {
this.controlRequest = "getTreeChartInitialList"; this.controlRequest = "getTreeChartInitialList";
this.showBodyDescription = true; this.showBodyDescription = true;
let url = let url =
repoApi.entity.blist searchApi.entity.blist
.replace("{{index_key}}", this.activeTabGetter.key) .replace("{{index_key}}", this.activeTabGetter.key)
.replace("{{type}}", this.activeTabGetter.key) + .replace("{{type}}", this.activeTabGetter.key) +
`/${this.pagination.offset}/${this.pagination.limit}`; `/${this.pagination.offset}/${this.pagination.limit}`;
@ -616,6 +572,31 @@ export default {
// TreeMap: () => import("~/components/charts/TreeMap.vue"), // TreeMap: () => import("~/components/charts/TreeMap.vue"),
// TimeLine: () => import("~/components/charts/TimeLine.vue"), // TimeLine: () => import("~/components/charts/TimeLine.vue"),
// Gantt: () => import("~/components/charts/Gantt.vue"), // Gantt: () => import("~/components/charts/Gantt.vue"),
// BaseModal: defineAsyncComponent(() =>
// import("~/components/global/BaseModal.vue")
// ),
// EntityContent: defineAsyncComponent(() =>
// import("~/components/search/view/EntityContent.vue")
// ),
TreeSimple: defineAsyncComponent(() =>
import("~/components/charts/TreeSimple.vue")
),
Bar: defineAsyncComponent(() =>
import("~/components/charts/Bar.vue")
),
Pie: defineAsyncComponent(() =>
import("~/components/charts/Pie.vue")
),
TreeMap: defineAsyncComponent(() =>
import("~/components/charts/TreeMap.vue")
),
// TimeLine: defineAsyncComponent(() =>
// import("~/components/charts/TimeLine.vue")
// ),
// Gantt: defineAsyncComponent(() =>
// import("~/components/charts/Gantt.vue")
// ),
}, },
}; };
</script> </script>

View File

@ -82,7 +82,7 @@
<script> <script>
import { mapState } from "pinia"; import { mapState } from "pinia";
import { useSearchStore } from "@search/stores/searchStore";
export default { export default {
props: ["changePageFilter", "listFilter", "activeTabGetter"], props: ["changePageFilter", "listFilter", "activeTabGetter"],
watch: { watch: {

View File

@ -129,7 +129,7 @@
<script> <script>
import { mapState, mapActions } from "pinia"; import { mapState, mapActions } from "pinia";
import { useEntityStore } from "@search/stores/entityStore"; import { useEntityStore } from "@search/stores/entityStore";
import { useSearchStore } from "~/stores/searchStore"; import { useSearchStore } from "@search/stores/searchStore";
/** /**
* *
* @vue-prop {Array} [listAggregations=[]] - یک آرایه حاوی جمعبندیهای لیست. * @vue-prop {Array} [listAggregations=[]] - یک آرایه حاوی جمعبندیهای لیست.

View File

@ -30,7 +30,7 @@
<script> <script>
import { mapState, mapActions } from "pinia"; import { mapState, mapActions } from "pinia";
// import summary from "~/json/search/summary.json"; // import summary from "~/json/search/summary.json";
import { useSearchStore } from "~/stores/searchStore"; import { useSearchStore } from "@search/stores/searchStore";
import { useCommonStore } from "~/stores/commonStore"; import { useCommonStore } from "~/stores/commonStore";
/** /**
* @vue-data {undefined} [info = undefined] - اطلاعاتی که به آن دسترسی نداریم یا اگر داریم یک شیء را نگه میدارد * @vue-data {undefined} [info = undefined] - اطلاعاتی که به آن دسترسی نداریم یا اگر داریم یک شیء را نگه میدارد

View File

@ -31,6 +31,14 @@
"actionMode": 3, "actionMode": 3,
"title": "نمودار", "title": "نمودار",
"translateKey": "Chart" "translateKey": "Chart"
},
{
"icon": "reports",
"color": 3,
"link": "myResearches",
"actionMode": 3,
"title": "تحقیقات",
"translateKey": ""
} }
] ]
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<NuxtLayout name="search-layout" :menu="sidbarMenu"> <SearchLayout :menu="sidbarMenu">
<!-- <Head> --> <!-- <Head> -->
<!-- <Title>{{ metaTitle }}</Title> --> <!-- <Title>{{ metaTitle }}</Title> -->
<!-- <Meta name="description" :content="title" /> --> <!-- <Meta name="description" :content="title" /> -->
@ -421,7 +421,7 @@
<!-- #endregion --> <!-- #endregion -->
</div> </div>
</div> </div>
</NuxtLayout> </SearchLayout>
</template> </template>
<script> <script>
@ -1688,6 +1688,9 @@ export default {
DraftImportEffectModal: defineAsyncComponent(() => DraftImportEffectModal: defineAsyncComponent(() =>
import("@search/components/entity/modals/DraftImportEffectModal.vue") import("@search/components/entity/modals/DraftImportEffectModal.vue")
), ),
SearchLayout: defineAsyncComponent(() =>
import("@search/layouts/SearchLayout.vue")
),
}, },
}; };
</script> </script>

View File

@ -1,5 +1,5 @@
<template> <template>
<NuxtLayout name="search-layout" :menu="sidbarMenu"> <SearchLayout :menu="sidbarMenuDefault">
<div class="container-fluid"> <div class="container-fluid">
<div class="row border-bottom header-height main-page__content-header"> <div class="row border-bottom header-height main-page__content-header">
<div <div
@ -240,7 +240,7 @@
</div> </div>
</div> </div>
</div> </div>
</NuxtLayout> </SearchLayout>
</template> </template>
<script> <script>
@ -253,7 +253,7 @@ import sidbarMenuMin from "@search/json/search/sidbarMenuMin.json";
import tableActions from "@search/json/search/listTableContextMenu"; import tableActions from "@search/json/search/listTableContextMenu";
import { useSearchStore } from "@search/stores/searchStore"; import { useSearchStore } from "@search/stores/searchStore";
import { useCommonStore } from "~/stores/commonStore";
export default { export default {
name: "searchChart", name: "searchChart",
@ -416,7 +416,7 @@ export default {
...mapActions(useSearchStore, [ ...mapActions(useSearchStore, [
"SET_SELECTED_PROJECT", "SET_SELECTED_PROJECT",
"SET_LIST", "SET_LIST",
"searchChartActiveSchemaSetter", "searchChartActiveSchemaSetter",
"searchChartSchemaSetter", "searchChartSchemaSetter",
"searchChartActiveTabSetter", "searchChartActiveTabSetter",
@ -1079,6 +1079,26 @@ export default {
}); });
}, },
}, },
components: {
SearchLayout: defineAsyncComponent(() =>
import("@search/layouts/SearchLayout.vue")
),
ChartContent: defineAsyncComponent(() =>
import("@search/components/search/view/ChartContent.vue")
),
ChartFilterList: defineAsyncComponent(() =>
import("@search/components/search/view/ChartFilterList.vue")
),
// SubjectForm: defineAsyncComponent(() =>
// import("@search/components/research/components/SubjectForm.vue")
// ),
// CategoryList: defineAsyncComponent(() =>
// import("@search/components/search/view/CategoryList.vue")
// ),
// BaseModal: defineAsyncComponent(() =>
// import("@search/components/global/BaseModal.vue")
// ),
},
}; };
</script> </script>

View File

@ -795,7 +795,7 @@ import { mapActions, mapState } from "pinia";
import { useSearchStore } from "@search/stores/searchStore"; import { useSearchStore } from "@search/stores/searchStore";
import { useCommonStore } from "~/stores/commonStore"; import { useCommonStore } from "~/stores/commonStore";
import searchApi from "@search/apis/searchApi.js"; import searchApi from "@search/apis/searchApi";
import adminApi from "~/apis/adminApi"; import adminApi from "~/apis/adminApi";
import sidbarMenuDefault from "@search/json/search/menu.json"; import sidbarMenuDefault from "@search/json/search/menu.json";
@ -960,6 +960,7 @@ export default {
// showFilter: false, // showFilter: false,
ismultiWord: false, ismultiWord: false,
showButton: false, showButton: false,
showSummary: false,
// topRepeatInListMode: true, // topRepeatInListMode: true,
iscode: false, iscode: false,
lastSearchInListMode: true, lastSearchInListMode: true,
@ -1035,7 +1036,6 @@ export default {
computed: { computed: {
...mapState(useSearchStore, [ ...mapState(useSearchStore, [
"domainActiveGetter",
"searchActiveTabGetter", "searchActiveTabGetter",
"searchSchemaGetter", "searchSchemaGetter",
"searchSynonymTitleGetter", "searchSynonymTitleGetter",
@ -1045,6 +1045,7 @@ export default {
"organNameGetter", "organNameGetter",
"isSidebarCollapsed", "isSidebarCollapsed",
"userPermisionGetter", "userPermisionGetter",
"domainActiveGetter",
]), ]),
// metaTitle() { // metaTitle() {
// return import.meta.env.VITE_SEARCH_PAGE_TITLE; // return import.meta.env.VITE_SEARCH_PAGE_TITLE;
@ -1162,14 +1163,35 @@ export default {
...mapActions(useCommonStore, [ ...mapActions(useCommonStore, [
"TOGGLE_SIDEBAR_MENU", "TOGGLE_SIDEBAR_MENU",
"sidebarCollapsedSetter", "sidebarCollapsedSetter",
"domainActiveSetter",
]), ]),
...mapActions(useSearchStore, [ ...mapActions(useSearchStore, [
"searchActiveTabSetter", "searchActiveTabSetter",
"searchSchemaSetter", "searchSchemaSetter",
"domainActiveSetter",
"searchSynonymTitleSetter", "searchSynonymTitleSetter",
]), ]),
initComponent() {
let activeItem = this.searchSchemaGetter[0];
if (this.$route.query.key) {
let key = this.$route.query.key;
activeItem = this.searchSchemaGetter?.find((item) => item.key === key);
}
this.searchActiveTabSetter(activeItem);
if (this.$route.query.q) {
this.setInputText(this.$route.query.q);
}
setTimeout(() => {
this.searchStart(this.textSearch);
// if (this.textSearch != undefined && this.textSearch != "") {
// this.searchStart(this.textSearch);
// } else {
// this.getDefaultByFilter();
// }
}, 500);
},
setMode(item) { setMode(item) {
this.mode = item; this.mode = item;
}, },
@ -1197,7 +1219,8 @@ export default {
* @param {string} value.domain[].key - کلید دامنه. * @param {string} value.domain[].key - کلید دامنه.
*/ */
setSearchDomain(value) { setSearchDomain(value) {
this.searchDomain = value.domain.domain; this.searchDomain = value.domain?.domain;
if (this.searchDomain == undefined) return;
let update = false; let update = false;
if (this.searchDomain && this.searchDomain[0].key != "all") { if (this.searchDomain && this.searchDomain[0].key != "all") {
@ -1211,8 +1234,7 @@ export default {
// this.searchDomain = [...this.searchDomain, ...value.domain.domain]; // this.searchDomain = [...this.searchDomain, ...value.domain.domain];
} }
// if (update || !this.domainActiveGetter) if (update || !this.domainActiveGetter) {
{
if (isMajlesBuild()) this.domainActiveSetter(this.searchDomain[1]); if (isMajlesBuild()) this.domainActiveSetter(this.searchDomain[1]);
else this.domainActiveSetter(this.searchDomain[0]); else this.domainActiveSetter(this.searchDomain[0]);
} }
@ -2056,3 +2078,107 @@ export default {
}, },
}; };
</script> </script>
<style scoped lang="scss">
.synonym-queries {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: #fff;
z-index: 99;
padding: 0.5em 1em;
display: flex;
align-items: center;
span {
flex: 1;
white-space: nowrap;
text-overflow: ellipsis;
overflow-x: auto;
}
}
.v-popper--theme-dropdown {
display: flex;
.v-popper__inner {
.my-tooltip-content {
color: white;
background-color: black;
padding: 1em;
}
}
}
.synonym-btn {
&.show-active {
position: relative;
&::before {
content: "";
display: inline-block;
position: absolute;
top: 0;
right: -0.3em;
width: 1em;
height: 1em;
border-radius: 50%;
background-color: green;
}
}
}
.container {
width: 100%;
max-width: 100em;
}
.filterlist {
box-shadow: 0 0.4688rem 2.1875rem rgba(4, 9, 20, 0.03),
0 0.9375rem 1.4063rem rgba(4, 9, 20, 0.03),
0 0.25rem 0.5313rem rgba(4, 9, 20, 0.03),
0 0.125rem 0.1875rem rgba(4, 9, 20, 0.03);
}
.nav-tabs {
border-bottom: unset !important;
}
.search-page__result {
li {
&:hover {
background-color: #d8f8fd !important;
}
}
}
.my-dropdown {
.dropdown-toggle {
background-color: #fff !important;
display: flex;
justify-content: space-between;
border: 1px solid var(--primary-color) !important;
&-color {
// width: 21em;
height: 2.5em;
border-radius: 0.5em !important;
}
&::after {
margin: unset !important;
}
}
.dropdown-menu {
min-width: 100%;
border-radius: var(--bs-dropdown-border-radius);
margin-top: unset;
}
.input-group-text {
background-color: #fff !important;
}
}
.dropdown-menu {
min-width: 100%;
}
.switch-with-icon {
align-items: flex-end;
}
.offcanvas-title {
font-family: sahel-semi-bold;
}
</style>

View File

@ -1,5 +1,5 @@
<template> <template>
<SearchLayout :menu="sidbarMenu"> <SearchLayout :menu="sidbarMenuDefault">
<div class="searchNavigation"> <div class="searchNavigation">
<div class="container-fluid"> <div class="container-fluid">
<div class="row main-page__content-header"> <div class="row main-page__content-header">
@ -298,7 +298,7 @@
<div <div
class="col-12 col-md-6 d-flex align-items-center justify-content-end" class="col-12 col-md-6 d-flex align-items-center justify-content-end"
> >
<sub-header <!-- <sub-header
:enableNewButton="false" :enableNewButton="false"
:canCreate="'item_new'" :canCreate="'item_new'"
:title="tableTitle" :title="tableTitle"
@ -306,8 +306,16 @@
@filterSelect="filterSelect" @filterSelect="filterSelect"
class="sub-header" class="sub-header"
:key="rerenderSubheader" :key="rerenderSubheader"
></sub-header> ></sub-header> -->
<!-- v-if="listAggregations" --> <!-- v-if="listAggregations" -->
<triple-switch
@change-mode="switchViewMode($event)"
classes="btn d-inline-flex px-2 "
texts1="حالت جدولی"
texts2="حالت فهرستی"
:value="viewMode"
></triple-switch>
<button <button
class="btn" class="btn"
@click.prevent=" @click.prevent="
@ -685,8 +693,8 @@ export default {
// menu: menu, // menu: menu,
// selectedFilter: "table", // selectedFilter: "table",
// sidbarMenuDefault: sidbarMenuDefault, sidbarMenuDefault: sidbarMenuDefault,
// sidbarMenuMin: sidbarMenuMin, sidbarMenuMin: sidbarMenuMin,
// showModal: false, // showModal: false,
formRerrenderer: 1, formRerrenderer: 1,
@ -1842,9 +1850,9 @@ export default {
SynonymSearch: defineAsyncComponent(() => SynonymSearch: defineAsyncComponent(() =>
import("@search/components/search/forms/SynonymSearch.vue") import("@search/components/search/forms/SynonymSearch.vue")
), ),
AdvancedSearch: defineAsyncComponent(() => // AdvancedSearch: defineAsyncComponent(() =>
import("@search/components/search/view/SearchAdvancedSearch.vue") // import("@search/components/search/SearchAdvancedSearch.vue")
), // ),
TripleSwitch: defineAsyncComponent(() => TripleSwitch: defineAsyncComponent(() =>
import("~/components/global/TripleSwitch.vue") import("~/components/global/TripleSwitch.vue")
), ),

View File

@ -1,4 +1,5 @@
import type { import type {
ActiveEntityViewSchema,
activeResearchType, activeResearchType,
ActiveTab, ActiveTab,
EntityViewSchema, EntityViewSchema,
@ -21,6 +22,7 @@ export const useEntityStore = defineStore("entityStore", {
"activeTab", "activeTab",
"isReadingMode", "isReadingMode",
"entityViewSchema", "entityViewSchema",
"activeEntityViewSchema",
"qruleActiveTab", "qruleActiveTab",
"qruleSchema", "qruleSchema",
@ -31,9 +33,11 @@ export const useEntityStore = defineStore("entityStore", {
], ],
}, },
state: () => ({ state: () => ({
activeTab: undefined as ActiveTab | undefined,
entityViewSchema: undefined as EntityViewSchema | undefined, entityViewSchema: undefined as EntityViewSchema | undefined,
selectedItemEntity: undefined as SelectedItemEntity | undefined, selectedItemEntity: undefined as SelectedItemEntity | undefined,
listEntity: undefined as ListEntity | undefined, listEntity: undefined as ListEntity | undefined,
activeEntityViewSchema: undefined as ActiveEntityViewSchema | undefined,
similarInfo: {} as SimilarInfo | undefined, similarInfo: {} as SimilarInfo | undefined,
vuexEntity: undefined, //پیدا نکردم vuexEntity: undefined, //پیدا نکردم
qruleActiveSchema: undefined as qruleActiveTabGetter | undefined, qruleActiveSchema: undefined as qruleActiveTabGetter | undefined,
@ -100,7 +104,9 @@ export const useEntityStore = defineStore("entityStore", {
entityViewSchemaGetter(state) { entityViewSchemaGetter(state) {
return state.entityViewSchema; return state.entityViewSchema;
}, },
activeTabGetter(state) {
return state.activeTab;
},
qruleActiveTabGetter(state) { qruleActiveTabGetter(state) {
return state.qruleActiveTab; return state.qruleActiveTab;
}, },
@ -113,6 +119,9 @@ export const useEntityStore = defineStore("entityStore", {
listEntityGetter(state) { listEntityGetter(state) {
return state.listEntity; return state.listEntity;
}, },
activeEntityViewSchemaGetter(state) {
return state.activeEntityViewSchema;
},
fontSizeGerrer(state) { fontSizeGerrer(state) {
return state.fontSize; return state.fontSize;
}, },
@ -174,7 +183,9 @@ export const useEntityStore = defineStore("entityStore", {
entityViewSchemaSetter(entityViewSchema = undefined) { entityViewSchemaSetter(entityViewSchema = undefined) {
this.entityViewSchema = entityViewSchema; this.entityViewSchema = entityViewSchema;
}, },
activeEntityViewSchemaSetter(activeEntityViewSchema = undefined) {
this.activeEntityViewSchema = activeEntityViewSchema;
},
qruleActiveTabSetter(qruleActiveTab = undefined) { qruleActiveTabSetter(qruleActiveTab = undefined) {
this.qruleActiveTab = qruleActiveTab; this.qruleActiveTab = qruleActiveTab;
}, },
@ -184,15 +195,18 @@ export const useEntityStore = defineStore("entityStore", {
qruleActiveSchemaSetter(qruleActiveSchema = undefined) { qruleActiveSchemaSetter(qruleActiveSchema = undefined) {
this.qruleActiveSchema = qruleActiveSchema; this.qruleActiveSchema = qruleActiveSchema;
}, },
activeTabSetter(activeTab = undefined) {
this.activeTab = activeTab;
},
SET_ITEM_ENTITY(item) { SET_ITEM_ENTITY(item=undefined) {
this.selectedItemEntity = item; this.selectedItemEntity = item;
}, },
SET_LIST_ENTITY(list) { SET_LIST_ENTITY(list=undefined) {
this.listEntity = list; this.listEntity = list;
}, },
SET_FONT(fontSize) { SET_FONT(fontSize=undefined) {
this.fontSize = fontSize; this.fontSize = fontSize;
}, },
// SET_QUERY( queryParams) { // SET_QUERY( queryParams) {
@ -201,10 +215,10 @@ export const useEntityStore = defineStore("entityStore", {
SET_ITEM_LIST_SELECTED_ID(itemListIdSelected) { SET_ITEM_LIST_SELECTED_ID(itemListIdSelected) {
this.itemListIdSelected = itemListIdSelected; this.itemListIdSelected = itemListIdSelected;
}, },
SET_STATUS_BUTTON(statusButton) { SET_STATUS_BUTTON(statusButton = undefined) {
this.statusButton = statusButton; this.statusButton = statusButton;
}, },
SET_STATUS_ENTITY_VIEWPAGE(statusEntityViewPage) { SET_STATUS_ENTITY_VIEWPAGE(statusEntityViewPage=undefined) {
this.statusEntityViewPage = statusEntityViewPage; this.statusEntityViewPage = statusEntityViewPage;
}, },
SET_STATUS_REMOVE_CHECKBOX(statusRemovCheckBox) { SET_STATUS_REMOVE_CHECKBOX(statusRemovCheckBox) {