.
This commit is contained in:
parent
ad470940f4
commit
03122c1c62
|
@ -183,7 +183,7 @@
|
||||||
>
|
>
|
||||||
<div class="main-page_body-items-move-copy in-desktop mt-2">
|
<div class="main-page_body-items-move-copy in-desktop mt-2">
|
||||||
<div class="btn-move move ms-3">
|
<div class="btn-move move ms-3">
|
||||||
<date-picker
|
<PersianDatepicker
|
||||||
title="انتقال"
|
title="انتقال"
|
||||||
label="انتقال محتوا به تاریخ دیگر"
|
label="انتقال محتوا به تاریخ دیگر"
|
||||||
class="date-picker text-move"
|
class="date-picker text-move"
|
||||||
|
@ -199,7 +199,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="copy btn-copy">
|
<div class="copy btn-copy">
|
||||||
<date-picker
|
<PersianDatepicker
|
||||||
title="کپی"
|
title="کپی"
|
||||||
label="کپی محتوا به تاریخ دیگر"
|
label="کپی محتوا به تاریخ دیگر"
|
||||||
class="date-picker text-copy"
|
class="date-picker text-copy"
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="main-page_body-items-move-copy in-mobile mt-2">
|
<div class="main-page_body-items-move-copy in-mobile mt-2">
|
||||||
<div class="btn-move move ms-3">
|
<div class="btn-move move ms-3">
|
||||||
<date-picker
|
<PersianDatepicker
|
||||||
title="انتقال"
|
title="انتقال"
|
||||||
label="انتقال"
|
label="انتقال"
|
||||||
class="date-picker text-move"
|
class="date-picker text-move"
|
||||||
|
@ -234,7 +234,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="copy btn-copy">
|
<div class="copy btn-copy">
|
||||||
<date-picker
|
<PersianDatepicker
|
||||||
title="کپی"
|
title="کپی"
|
||||||
label="کپی"
|
label="کپی"
|
||||||
class="date-picker text-copy"
|
class="date-picker text-copy"
|
||||||
|
@ -261,7 +261,7 @@
|
||||||
// import { mapActions, mapGetters, mapMutations } from "vuex";
|
// import { mapActions, mapGetters, mapMutations } from "vuex";
|
||||||
import taskApi from "@apis/taskApi";
|
import taskApi from "@apis/taskApi";
|
||||||
import HttpService from "@services/httpService";
|
import HttpService from "@services/httpService";
|
||||||
import VuePersianDatetimePicker from "vue-persian-datetime-picker";
|
// import VuePersianDatetimePicker from "vue-persian-datetime-picker";
|
||||||
import { p2e } from "@plugins/persianNumber";
|
import { p2e } from "@plugins/persianNumber";
|
||||||
import { mapGetters, mapMutations } from "vuex";
|
import { mapGetters, mapMutations } from "vuex";
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
<section>
|
<section>
|
||||||
<Navbar class="task-navbar"> </Navbar>
|
<Navbar class="task-navbar"> </Navbar>
|
||||||
|
|
||||||
<the-sidebar2
|
<!-- <the-sidebar2
|
||||||
:showUserAvatar="true"
|
:showUserAvatar="true"
|
||||||
:menu="menu"
|
:menu="menu"
|
||||||
@statusPage="statusPage"
|
@statusPage="statusPage"
|
||||||
></the-sidebar2>
|
></the-sidebar2> -->
|
||||||
|
|
||||||
<main class="main-page__content" :class="{ expanded: !isSidebarCollapsed }">
|
<main class="main-page__content" :class="{ expanded: !isSidebarCollapsed }">
|
||||||
<right-section
|
<right-section
|
||||||
|
@ -34,13 +34,17 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapMutations, mapActions } from "vuex";
|
// import { mapGetters, mapMutations, mapActions } from "vuex";
|
||||||
import HttpService from "@services/httpService";
|
// import HttpService from "@services/httpService";
|
||||||
|
import { mapState, mapActions } from "pinia";
|
||||||
|
|
||||||
|
import { useCommonStore } from "~/stores/commonStore";
|
||||||
import menu from "@task/json/menu.json";
|
import menu from "@task/json/menu.json";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
this.httpService = new HttpService();
|
// this.httpService = new HttpService();
|
||||||
|
this.httpService = useNuxtApp()["$http"];
|
||||||
this.getSchemas();
|
this.getSchemas();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -64,7 +68,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
httpService: {},
|
||||||
nomber: 0,
|
nomber: 0,
|
||||||
statusPagHedear: 1,
|
statusPagHedear: 1,
|
||||||
render: 1,
|
render: 1,
|
||||||
|
@ -73,19 +77,20 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapState(useCommonStore,[
|
||||||
"getPanelStatus",
|
"getPanelStatus",
|
||||||
"isSidebarCollapsed",
|
"isSidebarCollapsed",
|
||||||
"organNameGetter",
|
"organNameGetter",
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations([
|
...mapActions(useCommonStore,[
|
||||||
"TOGGLE_PANEL",
|
"TOGGLE_PANEL",
|
||||||
"sidebarCollapsedSetter",
|
"sidebarCollapsedSetter",
|
||||||
"taskSchemaSetter",
|
"taskSchemaSetter",
|
||||||
|
"checkPermissions"
|
||||||
]),
|
]),
|
||||||
...mapActions(["checkPermissions"]),
|
// ...mapActions(["checkPermissions"]),
|
||||||
getSchemas() {
|
getSchemas() {
|
||||||
let url = this.repoMicroServiceName + "schema";
|
let url = this.repoMicroServiceName + "schema";
|
||||||
this.httpService
|
this.httpService
|
||||||
|
|
|
@ -123,8 +123,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useAuthStore,[
|
...mapState(useAuthStore,[
|
||||||
"currentUser",
|
"currentUser",
|
||||||
|
|
||||||
]),
|
]),
|
||||||
...mapState(useCommonStore,[
|
...mapState(useCommonStore,[
|
||||||
"getPanelStatus",
|
"getPanelStatus",
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<the-sidebar2
|
<!-- <the-sidebar2
|
||||||
:class="buildName"
|
:class="buildName"
|
||||||
:menu="menu"
|
:menu="menu"
|
||||||
:showUserAvatar="true"
|
:showUserAvatar="true"
|
||||||
></the-sidebar2>
|
></the-sidebar2> -->
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -66,20 +66,24 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import HttpService from "@services/httpService";
|
|
||||||
import menu from "@task/json/menu.json";
|
import menu from "@task/json/menu.json";
|
||||||
import { mapGetters, mapMutations } from "vuex";
|
// import { mapGetters, mapMutations } from "vuex";
|
||||||
|
import { mapState, mapActions } from "pinia";
|
||||||
|
import { useEntityStore } from "@task/stores/entityStore";
|
||||||
|
|
||||||
|
import { useCommonStore } from "~/stores/commonStore";
|
||||||
export default {
|
export default {
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
this.httpService = new HttpService(this.taskMicroServiceName);
|
// this.httpService = new HttpService(this.taskMicroServiceName);
|
||||||
|
this.httpService = useNuxtApp()["$http"];
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.setActiveTab(this.navList[0]);
|
this.setActiveTab(this.navList[0]);
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
httpService: undefined,
|
// httpService: undefined,
|
||||||
|
httpService: {},
|
||||||
menu: menu,
|
menu: menu,
|
||||||
mainComponentName: "TaskUserReport",
|
mainComponentName: "TaskUserReport",
|
||||||
navList: [
|
navList: [
|
||||||
|
@ -92,11 +96,12 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters("entity", ["activeTabGetter"]),
|
...mapGetters(useEntityStore, ["activeTabGetter"]),
|
||||||
...mapGetters(["isSidebarCollapsed"]),
|
// ...mapGetters(["isSidebarCollapsed"]),
|
||||||
|
...mapState(useCommonStore, ["isSidebarCollapsed"]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations("entity", ["activeTabSetter"]),
|
...mapMutations(useEntityStore, ["activeTabSetter"]),
|
||||||
setActiveTab(tab) {
|
setActiveTab(tab) {
|
||||||
this.activeTabSetter(tab);
|
this.activeTabSetter(tab);
|
||||||
if (tab.key == "group") {
|
if (tab.key == "group") {
|
||||||
|
@ -137,6 +142,6 @@ export default {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
.nav-tabs {
|
.nav-tabs {
|
||||||
border-bottom: unset;
|
border-bottom: unset;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<header>
|
<header>
|
||||||
<the-navbar></the-navbar>
|
<the-navbar></the-navbar>
|
||||||
</header>
|
</header>
|
||||||
<the-sidebar2 :menu="menu" :showUserAvatar="true"></the-sidebar2>
|
<!-- <the-sidebar2 :menu="menu" :showUserAvatar="true"></the-sidebar2> -->
|
||||||
<main
|
<main
|
||||||
class="pages-content-container main-page__content"
|
class="pages-content-container main-page__content"
|
||||||
:class="{ expanded: !isSidebarCollapsed }"
|
:class="{ expanded: !isSidebarCollapsed }"
|
||||||
|
@ -168,15 +168,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapActions } from "vuex";
|
// import { mapGetters, mapActions } from "vuex";
|
||||||
import HttpService from "@services/httpService";
|
// import HttpService from "@services/httpService";
|
||||||
|
import { useCommonStore } from "~/stores/commonStore";
|
||||||
|
import { usePermitStore } from "~/stores/permitStore";
|
||||||
|
|
||||||
|
|
||||||
import menu from "@task/json/menu.json";
|
import menu from "@task/json/menu.json";
|
||||||
import permitApis from "@apis/permitApi";
|
import permitApis from "@apis/permitApi";
|
||||||
import taskApi from "@apis/taskApi";
|
import taskApi from "@task/apis/taskApi";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
this.httpService = new HttpService(this.taskMicroServiceName);
|
// this.httpService = new HttpService(this.taskMicroServiceName);
|
||||||
|
this.httpService = useNuxtApp()["$http"];
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.checkPermisionBeforGetList();
|
this.checkPermisionBeforGetList();
|
||||||
|
@ -192,7 +197,8 @@ export default {
|
||||||
groupLists: [],
|
groupLists: [],
|
||||||
menu: menu,
|
menu: menu,
|
||||||
firstTimeSearching: false,
|
firstTimeSearching: false,
|
||||||
httpService: undefined,
|
// httpService: undefined,
|
||||||
|
httpService: {},
|
||||||
tableActions: [
|
tableActions: [
|
||||||
{
|
{
|
||||||
showOutside: true,
|
showOutside: true,
|
||||||
|
@ -262,12 +268,12 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["isSidebarCollapsed"]),
|
...mapGetters(useCommonStore,["isSidebarCollapsed"]),
|
||||||
|
|
||||||
...mapGetters("permit", ["projectGetter"]),
|
...mapGetters(usePermitStore, ["projectGetter"]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(["checkPermissions"]),
|
...mapActions(useCommonStore,["checkPermissions"]),
|
||||||
|
|
||||||
async getGroups() {
|
async getGroups() {
|
||||||
let url = taskApi.taskTeams.getList;
|
let url = taskApi.taskTeams.getList;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { clearBodyClass } from "@manuals/utilities";
|
import { clearBodyClass } from "@manuals/utilities";
|
||||||
import menu from "@chat/json/menu.json";
|
import menu from "@task/json/menu.json";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "taskRouterView",
|
name: "taskRouterView",
|
||||||
|
|
302
stores/entityStore.ts
Normal file
302
stores/entityStore.ts
Normal file
|
@ -0,0 +1,302 @@
|
||||||
|
import type {
|
||||||
|
ActiveEntityViewSchema,
|
||||||
|
activeResearchType,
|
||||||
|
ActiveTab,
|
||||||
|
EntityViewSchema,
|
||||||
|
ListEntity,
|
||||||
|
qruleActiveTab,
|
||||||
|
qruleActiveTabGetter,
|
||||||
|
SelectedItemEntity,
|
||||||
|
SimilarInfo,
|
||||||
|
} from "~/types/entityType";
|
||||||
|
|
||||||
|
export const useEntityStore = defineStore("entityStore", {
|
||||||
|
persist: {
|
||||||
|
storage: piniaPluginPersistedstate.localStorage(),
|
||||||
|
pick: [
|
||||||
|
"draftSchema",
|
||||||
|
"draftActiveStep",
|
||||||
|
"draftActiveSchema",
|
||||||
|
"draftSaveBoxSchema",
|
||||||
|
|
||||||
|
"activeTab",
|
||||||
|
"isReadingMode",
|
||||||
|
"entityViewSchema",
|
||||||
|
"activeEntityViewSchema",
|
||||||
|
|
||||||
|
"qruleActiveTab",
|
||||||
|
"qruleSchema",
|
||||||
|
"qruleActiveSchema",
|
||||||
|
|
||||||
|
"listHighlightText",
|
||||||
|
"activeResearchType",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
state: () => ({
|
||||||
|
activeTab: undefined as ActiveTab | undefined,
|
||||||
|
entityViewSchema: undefined as EntityViewSchema | undefined,
|
||||||
|
selectedItemEntity: undefined as SelectedItemEntity | undefined,
|
||||||
|
listEntity: undefined as ListEntity | undefined,
|
||||||
|
activeEntityViewSchema: undefined as ActiveEntityViewSchema | undefined,
|
||||||
|
similarInfo: {} as SimilarInfo | undefined,
|
||||||
|
vuexEntity: undefined, //پیدا نکردم
|
||||||
|
qruleActiveSchema: undefined as qruleActiveTabGetter | undefined,
|
||||||
|
qruleActiveTab: undefined as qruleActiveTab | undefined,
|
||||||
|
activeResearchType: undefined as activeResearchType | undefined,
|
||||||
|
isReadingMode: false,
|
||||||
|
fontSize: undefined as undefined | string,
|
||||||
|
selectedText: undefined as undefined | string,
|
||||||
|
showSidebar: false,
|
||||||
|
statusId: undefined,
|
||||||
|
statusButton: undefined,
|
||||||
|
statusEntityViewPage: undefined,
|
||||||
|
textSteps: [],
|
||||||
|
listHighlightText: [],
|
||||||
|
breadCrumb: [],
|
||||||
|
|
||||||
|
// draft law
|
||||||
|
nlpTree: undefined,
|
||||||
|
draftActiveStep: undefined,
|
||||||
|
draftActiveSchema: undefined,
|
||||||
|
draftSchema: undefined,
|
||||||
|
draftSaveBoxSchema: [],
|
||||||
|
// draft law
|
||||||
|
|
||||||
|
qruleSchema: undefined,
|
||||||
|
queryParams: undefined,
|
||||||
|
statusRemovCheckBox: undefined,
|
||||||
|
requestSimilar: false, // این متغییر دیگه نباید استفاده شود
|
||||||
|
newSimilar: false, // این متغییر دیگه نباید استفاده شود
|
||||||
|
showModal: false,
|
||||||
|
changePagForFish: 0,
|
||||||
|
itemEditForFish: undefined,
|
||||||
|
fishActions: undefined,
|
||||||
|
annotationActions: undefined,
|
||||||
|
itemEditForAnnotation: undefined,
|
||||||
|
showModalAnnotation: false,
|
||||||
|
}),
|
||||||
|
getters: {
|
||||||
|
// start: draft page
|
||||||
|
nlpTreeGetter(state) {
|
||||||
|
return state.nlpTree;
|
||||||
|
},
|
||||||
|
draftActiveStepGetter(state) {
|
||||||
|
return state.draftActiveStep;
|
||||||
|
},
|
||||||
|
draftSchemaGetter(state) {
|
||||||
|
return state.draftSchema;
|
||||||
|
},
|
||||||
|
draftActiveSchemaGetter(state) {
|
||||||
|
return state.draftActiveSchema;
|
||||||
|
},
|
||||||
|
draftSaveBoxSchemaGetter(state) {
|
||||||
|
return state.draftSaveBoxSchema;
|
||||||
|
},
|
||||||
|
// end: draft page
|
||||||
|
|
||||||
|
vuexEntityGetter(state) {
|
||||||
|
return state.vuexEntity;
|
||||||
|
},
|
||||||
|
breadCrumbGetter(state) {
|
||||||
|
return state.breadCrumb;
|
||||||
|
},
|
||||||
|
|
||||||
|
entityViewSchemaGetter(state) {
|
||||||
|
return state.entityViewSchema;
|
||||||
|
},
|
||||||
|
activeTabGetter(state) {
|
||||||
|
return state.activeTab;
|
||||||
|
},
|
||||||
|
qruleActiveTabGetter(state) {
|
||||||
|
return state.qruleActiveTab;
|
||||||
|
},
|
||||||
|
qruleActiveSchemaGetter(state) {
|
||||||
|
return state.qruleActiveSchema;
|
||||||
|
},
|
||||||
|
selectedItemEntityGetter(state) {
|
||||||
|
return state.selectedItemEntity;
|
||||||
|
},
|
||||||
|
listEntityGetter(state) {
|
||||||
|
return state.listEntity;
|
||||||
|
},
|
||||||
|
activeEntityViewSchemaGetter(state) {
|
||||||
|
return state.activeEntityViewSchema;
|
||||||
|
},
|
||||||
|
fontSizeGerrer(state) {
|
||||||
|
return state.fontSize;
|
||||||
|
},
|
||||||
|
statusButtonGetter(state) {
|
||||||
|
return state.statusButton;
|
||||||
|
},
|
||||||
|
statusEntityViewPageGetter(state) {
|
||||||
|
return state.statusEntityViewPage;
|
||||||
|
},
|
||||||
|
textStepsGetter(state) {
|
||||||
|
return state.textSteps;
|
||||||
|
},
|
||||||
|
showSidebarGetter(state) {
|
||||||
|
return state.showSidebar;
|
||||||
|
},
|
||||||
|
similarInfoGetter(state) {
|
||||||
|
return state.similarInfo;
|
||||||
|
},
|
||||||
|
selectedTextGetter(state) {
|
||||||
|
return state.selectedText;
|
||||||
|
},
|
||||||
|
listHighlightTextGetter(state) {
|
||||||
|
return state.listHighlightText;
|
||||||
|
},
|
||||||
|
activeResearchTypeGetter(state) {
|
||||||
|
return state.activeResearchType;
|
||||||
|
},
|
||||||
|
isReadingModeGetter(state) {
|
||||||
|
return state.isReadingMode;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
// start: draft page
|
||||||
|
nlpTreeSetter(nlpTree = undefined) {
|
||||||
|
this.nlpTree = nlpTree;
|
||||||
|
},
|
||||||
|
draftActiveStepSetter(draftActiveStep = undefined) {
|
||||||
|
this.draftActiveStep = draftActiveStep;
|
||||||
|
},
|
||||||
|
draftSchemaSetter(draftSchema = undefined) {
|
||||||
|
this.draftSchema = draftSchema;
|
||||||
|
},
|
||||||
|
draftActiveSchemaSetter(draftActiveSchema = undefined) {
|
||||||
|
this.draftActiveSchema = draftActiveSchema;
|
||||||
|
},
|
||||||
|
draftSaveBoxSchemaSetter(draftSaveBoxSchema = []) {
|
||||||
|
this.draftSaveBoxSchema = draftSaveBoxSchema;
|
||||||
|
},
|
||||||
|
// end: draft page
|
||||||
|
|
||||||
|
vuexEntitySetter(vuexEntity = undefined) {
|
||||||
|
this.vuexEntity = vuexEntity;
|
||||||
|
},
|
||||||
|
breadCrumbSetter(newItem = undefined) {
|
||||||
|
if (!newItem) this.breadCrumb = [];
|
||||||
|
else this.breadCrumb = [...this.breadCrumb, newItem];
|
||||||
|
},
|
||||||
|
|
||||||
|
entityViewSchemaSetter(entityViewSchema = undefined) {
|
||||||
|
this.entityViewSchema = entityViewSchema;
|
||||||
|
},
|
||||||
|
activeEntityViewSchemaSetter(activeEntityViewSchema = undefined) {
|
||||||
|
this.activeEntityViewSchema = activeEntityViewSchema;
|
||||||
|
},
|
||||||
|
qruleActiveTabSetter(qruleActiveTab = undefined) {
|
||||||
|
this.qruleActiveTab = qruleActiveTab;
|
||||||
|
},
|
||||||
|
qruleSchemaSetter(qruleSchema = undefined) {
|
||||||
|
this.qruleSchema = qruleSchema;
|
||||||
|
},
|
||||||
|
qruleActiveSchemaSetter(qruleActiveSchema = undefined) {
|
||||||
|
this.qruleActiveSchema = qruleActiveSchema;
|
||||||
|
},
|
||||||
|
activeTabSetter(activeTab = undefined) {
|
||||||
|
this.activeTab = activeTab;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
SET_ITEM_ENTITY(item=undefined) {
|
||||||
|
this.selectedItemEntity = item;
|
||||||
|
},
|
||||||
|
SET_LIST_ENTITY(list=undefined) {
|
||||||
|
this.listEntity = list;
|
||||||
|
},
|
||||||
|
SET_FONT(fontSize=undefined) {
|
||||||
|
this.fontSize = fontSize;
|
||||||
|
},
|
||||||
|
// SET_QUERY( queryParams) {
|
||||||
|
// this.queryParams = queryParams;
|
||||||
|
// },
|
||||||
|
SET_ITEM_LIST_SELECTED_ID(itemListIdSelected) {
|
||||||
|
this.itemListIdSelected = itemListIdSelected;
|
||||||
|
},
|
||||||
|
SET_STATUS_BUTTON(statusButton = undefined) {
|
||||||
|
this.statusButton = statusButton;
|
||||||
|
},
|
||||||
|
SET_STATUS_ENTITY_VIEWPAGE(statusEntityViewPage=undefined) {
|
||||||
|
this.statusEntityViewPage = statusEntityViewPage;
|
||||||
|
},
|
||||||
|
SET_STATUS_REMOVE_CHECKBOX(statusRemovCheckBox) {
|
||||||
|
this.statusRemovCheckBox = statusRemovCheckBox;
|
||||||
|
},
|
||||||
|
SET_TEXT_STEPS(textSteps) {
|
||||||
|
this.textSteps = textSteps;
|
||||||
|
},
|
||||||
|
SET_SHOW_SIDEBAR(showSidebar) {
|
||||||
|
this.showSidebar = showSidebar;
|
||||||
|
},
|
||||||
|
SET_REQUEST_SIMILAR(requestSimilar) {
|
||||||
|
this.requestSimilar = requestSimilar;
|
||||||
|
},
|
||||||
|
SET_NEW_SIMILAR(newSimilar) {
|
||||||
|
this.newSimilar = newSimilar;
|
||||||
|
},
|
||||||
|
selectedTextSetter(selectedText) {
|
||||||
|
this.selectedText = selectedText;
|
||||||
|
},
|
||||||
|
SET_SHOW_MODAL(showModal) {
|
||||||
|
this.showModal = showModal;
|
||||||
|
},
|
||||||
|
SET_CHANGE_PAG_FOR_FISH(changePagForFish) {
|
||||||
|
this.changePagForFish = changePagForFish;
|
||||||
|
},
|
||||||
|
itemEditForFishSetter(itemEditForFish) {
|
||||||
|
this.itemEditForFish = itemEditForFish;
|
||||||
|
},
|
||||||
|
fishActionsSetter(fishActions) {
|
||||||
|
this.fishActions = fishActions;
|
||||||
|
},
|
||||||
|
annotationActionsSetter(annotationActions) {
|
||||||
|
this.annotationActions = annotationActions;
|
||||||
|
},
|
||||||
|
itemEditForAnnotationSetter(itemEditForAnnotation) {
|
||||||
|
this.itemEditForAnnotation = itemEditForAnnotation;
|
||||||
|
},
|
||||||
|
showModalAnnotationSetter(showModalAnnotation) {
|
||||||
|
this.showModalAnnotation = showModalAnnotation;
|
||||||
|
},
|
||||||
|
similarInfoSetter(similarInfo) {
|
||||||
|
this.similarInfo = similarInfo;
|
||||||
|
},
|
||||||
|
listHighlightTextSetter(listHighlightText) {
|
||||||
|
// this.listHighlightText = listHighlightText;
|
||||||
|
// if (!this.listHighlightText.includes(listHighlightText)) {
|
||||||
|
// this.listHighlightText.push(listHighlightText);
|
||||||
|
// }
|
||||||
|
const exists = this.listHighlightText.some(
|
||||||
|
(item) => item.text === listHighlightText.text
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!exists) {
|
||||||
|
this.listHighlightText.push(listHighlightText);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
removeHighlightTextSetter(listHighlightText) {
|
||||||
|
this.listHighlightText = this.listHighlightText.filter(
|
||||||
|
(item) => item.text !== listHighlightText.text
|
||||||
|
);
|
||||||
|
},
|
||||||
|
toggleShowHighlightSetter(newState) {
|
||||||
|
this.listHighlightText.forEach((item) => (item.show = newState));
|
||||||
|
},
|
||||||
|
activeResearchTypeSetter(activeResearchType) {
|
||||||
|
this.activeResearchType = activeResearchType;
|
||||||
|
},
|
||||||
|
isReadingModeSetter(isReadingMode) {
|
||||||
|
this.isReadingMode = isReadingMode;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// export default {
|
||||||
|
// namespaced:true,
|
||||||
|
|
||||||
|
// state,
|
||||||
|
// actions,
|
||||||
|
// mutations,
|
||||||
|
// getters
|
||||||
|
// };
|
210
stores/searchStore.ts
Normal file
210
stores/searchStore.ts
Normal file
|
@ -0,0 +1,210 @@
|
||||||
|
import type {
|
||||||
|
activeSearchChartSchema,
|
||||||
|
activeSearchListSchema,
|
||||||
|
Domain,
|
||||||
|
searchActiveTab,
|
||||||
|
searchChartActiveTab,
|
||||||
|
searchListActiveTab,
|
||||||
|
searchSchema,
|
||||||
|
searchSynonymForm,
|
||||||
|
searchSynonymTitle,
|
||||||
|
selectionFilterItems,
|
||||||
|
} from "~/types/searchTypes";
|
||||||
|
|
||||||
|
import type {
|
||||||
|
isReturnFromItemshowPage,
|
||||||
|
list,
|
||||||
|
listComponentName,
|
||||||
|
listId,
|
||||||
|
projects,
|
||||||
|
selectedItem,
|
||||||
|
selectedProject,
|
||||||
|
} from "~/types/listTypes";
|
||||||
|
|
||||||
|
export const useSearchStore = defineStore("searchStore", {
|
||||||
|
persist: {
|
||||||
|
storage: piniaPluginPersistedstate.localStorage(),
|
||||||
|
}, state: () => ({
|
||||||
|
selectedProject: undefined as selectedProject | undefined,
|
||||||
|
isReturnFromItemshowPage: false as isReturnFromItemshowPage,
|
||||||
|
list: undefined as list | undefined,
|
||||||
|
listId: undefined as listId | undefined,
|
||||||
|
listComponentName: "ItemList" as listComponentName | undefined,
|
||||||
|
projects: [] as projects[],
|
||||||
|
// pieData: [],
|
||||||
|
selectedItem: undefined as selectedItem | undefined,
|
||||||
|
|
||||||
|
|
||||||
|
// activeTab: undefined,
|
||||||
|
|
||||||
|
searchActiveTab: undefined as searchActiveTab | undefined,
|
||||||
|
searchSchema: undefined as searchSchema | undefined,
|
||||||
|
|
||||||
|
searchActiveSchema: undefined as searchActiveTab | undefined,
|
||||||
|
|
||||||
|
searchListActiveTab: undefined as searchListActiveTab | undefined,
|
||||||
|
searchListSchema: undefined as searchListActiveTab[] | undefined,
|
||||||
|
activeSearchListSchema: undefined as activeSearchListSchema | undefined,
|
||||||
|
|
||||||
|
searchChartActiveTab: undefined as searchChartActiveTab | undefined,
|
||||||
|
searchChartSchema: undefined as searchChartActiveTab[] | undefined,
|
||||||
|
activeSearchChartSchema: undefined as activeSearchChartSchema | undefined,
|
||||||
|
|
||||||
|
searchSynonymTitle: undefined as searchSynonymTitle | undefined,
|
||||||
|
searchSynonymForm: undefined as searchSynonymForm | undefined,
|
||||||
|
|
||||||
|
selectionFilterItems: [] as selectionFilterItems,
|
||||||
|
}),
|
||||||
|
getters: {
|
||||||
|
projectsGetter(state) {
|
||||||
|
return state.projects;
|
||||||
|
},
|
||||||
|
selectedProjectGetter(state) {
|
||||||
|
return state.selectedProject;
|
||||||
|
},
|
||||||
|
listIdGetter(state) {
|
||||||
|
return state.listId;
|
||||||
|
},
|
||||||
|
listComponentNameGetter(state) {
|
||||||
|
return state.listComponentName;
|
||||||
|
},
|
||||||
|
selectedItemGetter(state) {
|
||||||
|
return state.selectedItem;
|
||||||
|
},
|
||||||
|
isReturnFromItemshowPageGetter(state) {
|
||||||
|
return state.isReturnFromItemshowPage;
|
||||||
|
},
|
||||||
|
listGetter(state) {
|
||||||
|
return state.list;
|
||||||
|
},
|
||||||
|
|
||||||
|
searchSynonymTitleGetter(state) {
|
||||||
|
return state.searchSynonymTitle;
|
||||||
|
},
|
||||||
|
searchSynonymFormGetter(state) {
|
||||||
|
return state.searchSynonymForm;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// activeTabGetter(state) {
|
||||||
|
// return state.activeTab;
|
||||||
|
// },
|
||||||
|
|
||||||
|
// search page
|
||||||
|
searchActiveTabGetter(state) {
|
||||||
|
return state.searchActiveTab;
|
||||||
|
},
|
||||||
|
searchSchemaGetter(state) {
|
||||||
|
return state.searchSchema;
|
||||||
|
},
|
||||||
|
|
||||||
|
searchActiveSchemaGetter(state) {
|
||||||
|
return state.searchActiveSchema;
|
||||||
|
},
|
||||||
|
|
||||||
|
// search list
|
||||||
|
searchListActiveTabGetter(state) {
|
||||||
|
return state.searchListActiveTab;
|
||||||
|
},
|
||||||
|
searchListSchemaGetter(state) {
|
||||||
|
return state.searchListSchema;
|
||||||
|
},
|
||||||
|
searchListActiveSchemaGetter(state) {
|
||||||
|
return state.activeSearchListSchema;
|
||||||
|
},
|
||||||
|
|
||||||
|
// search chart
|
||||||
|
searchChartActiveTabGetter(state) {
|
||||||
|
return state.searchChartActiveTab;
|
||||||
|
},
|
||||||
|
searchChartSchemaGetter(state) {
|
||||||
|
return state.searchChartSchema;
|
||||||
|
},
|
||||||
|
searchChartActiveSchemaGetter(state) {
|
||||||
|
return state.activeSearchChartSchema;
|
||||||
|
},
|
||||||
|
selectionFilterItemsGetter(state) {
|
||||||
|
return state.selectionFilterItems;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
SET_SELECTED_PROJECT(selectedProject = undefined) {
|
||||||
|
this.selectedProject = selectedProject;
|
||||||
|
},
|
||||||
|
SET_LIST_ID(listId = undefined) {
|
||||||
|
this.listId = listId;
|
||||||
|
},
|
||||||
|
SET_LIST_COMPONENT_NAME(
|
||||||
|
payload = { selectedItem: undefined, listComponentName: undefined }
|
||||||
|
) {
|
||||||
|
this.selectedItem = payload.selectedItem;
|
||||||
|
this.listComponentName = payload.listComponentName;
|
||||||
|
},
|
||||||
|
SET_SELECTED_ITEM(selectedItem = undefined) {
|
||||||
|
this.selectedItem = selectedItem;
|
||||||
|
},
|
||||||
|
SET_IS_RETURN_FROM_ITEM_SHOW_PAGE(isReturnFromItemshowPage = false) {
|
||||||
|
this.isReturnFromItemshowPage = isReturnFromItemshowPage;
|
||||||
|
},
|
||||||
|
SET_LIST(list = undefined) {
|
||||||
|
this.list = list;
|
||||||
|
},
|
||||||
|
|
||||||
|
searchSynonymFormSetter(searchSynonymForm = undefined) {
|
||||||
|
this.searchSynonymForm = searchSynonymForm;
|
||||||
|
},
|
||||||
|
searchSynonymTitleSetter(searchSynonymTitle = undefined) {
|
||||||
|
this.searchSynonymTitle = searchSynonymTitle;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// activeTabSetter(activeTab = undefined) {
|
||||||
|
// this.activeTab = activeTab;
|
||||||
|
// },
|
||||||
|
|
||||||
|
// search page
|
||||||
|
searchActiveTabSetter(searchActiveTab: searchActiveTab = undefined) {
|
||||||
|
this.searchActiveTab = searchActiveTab;
|
||||||
|
},
|
||||||
|
searchSchemaSetter(searchSchema = undefined) {
|
||||||
|
this.searchSchema = searchSchema;
|
||||||
|
},
|
||||||
|
|
||||||
|
searchActiveSchemaSetter(searchActiveSchema = undefined) {
|
||||||
|
this.searchActiveSchema = searchActiveSchema;
|
||||||
|
},
|
||||||
|
|
||||||
|
// search list
|
||||||
|
searchListActiveTabSetter(searchListActiveTab = undefined) {
|
||||||
|
this.searchListActiveTab = searchListActiveTab;
|
||||||
|
},
|
||||||
|
searchListSchemaSetter(searchListSchema = undefined) {
|
||||||
|
this.searchListSchema = searchListSchema;
|
||||||
|
},
|
||||||
|
searchListActiveSchemaSetter(activeSearchListSchema = undefined) {
|
||||||
|
this.activeSearchListSchema = activeSearchListSchema;
|
||||||
|
},
|
||||||
|
|
||||||
|
// search chart
|
||||||
|
searchChartActiveTabSetter(searchChartActiveTab = undefined) {
|
||||||
|
this.searchChartActiveTab = searchChartActiveTab;
|
||||||
|
},
|
||||||
|
searchChartSchemaSetter(searchChartSchema = undefined) {
|
||||||
|
this.searchChartSchema = searchChartSchema;
|
||||||
|
},
|
||||||
|
searchChartActiveSchemaSetter(activeSearchChartSchema = undefined) {
|
||||||
|
this.activeSearchChartSchema = activeSearchChartSchema;
|
||||||
|
},
|
||||||
|
selectionFilterItemsSetter(selectionFilterItems = []) {
|
||||||
|
this.selectionFilterItems = <selectionFilterItems>selectionFilterItems;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// export default {
|
||||||
|
// namespaced:true,
|
||||||
|
|
||||||
|
// state,
|
||||||
|
// actions,
|
||||||
|
// mutations,
|
||||||
|
// getters
|
||||||
|
// };
|
283
types/entityType.ts
Normal file
283
types/entityType.ts
Normal file
|
@ -0,0 +1,283 @@
|
||||||
|
// #region common Types
|
||||||
|
export type ListSource = {
|
||||||
|
ref_id: number;
|
||||||
|
ts_ref: string;
|
||||||
|
other_info: OtherInfo;
|
||||||
|
topics: [];
|
||||||
|
sort_date_timestamp: number;
|
||||||
|
main_type: string;
|
||||||
|
version_info: VersionInfo;
|
||||||
|
content: string;
|
||||||
|
expire_date: string;
|
||||||
|
sub_type: string;
|
||||||
|
parent_id: string;
|
||||||
|
qanon_etebar: string;
|
||||||
|
ts_date: string;
|
||||||
|
qanon_title: string;
|
||||||
|
qanon_id: string;
|
||||||
|
ref_key: string;
|
||||||
|
html: string;
|
||||||
|
id: string;
|
||||||
|
content_len: number;
|
||||||
|
state_etebar: string;
|
||||||
|
ts_year: string;
|
||||||
|
child_order: number;
|
||||||
|
title_type: string;
|
||||||
|
};
|
||||||
|
export type OtherInfo = {
|
||||||
|
level: number;
|
||||||
|
hierarchy: string;
|
||||||
|
number_text: string;
|
||||||
|
full_path: string;
|
||||||
|
};
|
||||||
|
export type VersionInfo = {
|
||||||
|
number: number;
|
||||||
|
operation: string;
|
||||||
|
timestamp: number;
|
||||||
|
};
|
||||||
|
// #endregion common Types
|
||||||
|
// #region ListItem Types
|
||||||
|
export type ListItem = {
|
||||||
|
_index: string;
|
||||||
|
_id: string;
|
||||||
|
_score: null;
|
||||||
|
_source: ListSource;
|
||||||
|
sort: number[];
|
||||||
|
};
|
||||||
|
export type List = ListItem[];
|
||||||
|
// #endregion ListItem Types
|
||||||
|
|
||||||
|
// #region ActiveEntityViewSchema Types
|
||||||
|
export type ActiveEntityViewSchema = {
|
||||||
|
key: string;
|
||||||
|
routeName: string;
|
||||||
|
type: string;
|
||||||
|
label: string;
|
||||||
|
header: {
|
||||||
|
componentName: string;
|
||||||
|
top_main: HeaderItems[];
|
||||||
|
top_jump: [];
|
||||||
|
top_mirror: HeaderItems[];
|
||||||
|
tools: {
|
||||||
|
showCompare: number;
|
||||||
|
showSearch: number;
|
||||||
|
showHeading: number;
|
||||||
|
showSettings: number;
|
||||||
|
showHilight: number;
|
||||||
|
showChanges: number;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
entityPanel: {
|
||||||
|
entityHeading: EntityPanel & {
|
||||||
|
type: string;
|
||||||
|
};
|
||||||
|
navigation: EntityPanel;
|
||||||
|
};
|
||||||
|
contextMenu: ContextMenu[];
|
||||||
|
researchs: Researchs[];
|
||||||
|
property: Property[];
|
||||||
|
settings: Settings[];
|
||||||
|
versionEnable: false;
|
||||||
|
field_collapse: string;
|
||||||
|
entity_title: string;
|
||||||
|
items: ActiveEntityViewSchemaItems[];
|
||||||
|
tabs: Tabs[];
|
||||||
|
};
|
||||||
|
export type Property = {
|
||||||
|
title: string;
|
||||||
|
key: string;
|
||||||
|
type: string;
|
||||||
|
items: PropertyItem[];
|
||||||
|
};
|
||||||
|
export type PropertyItem = {
|
||||||
|
hideInCreateEntity: number;
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
type: string;
|
||||||
|
placeholder: string;
|
||||||
|
required: string;
|
||||||
|
validation_regex: string;
|
||||||
|
validation_error: string;
|
||||||
|
multi_select: string;
|
||||||
|
options: [];
|
||||||
|
labelClass: string;
|
||||||
|
inputClass: string;
|
||||||
|
};
|
||||||
|
export type Panel = {
|
||||||
|
header: [{ key: string; label: string; type: string }];
|
||||||
|
content: { key: string; label: string; type: string };
|
||||||
|
};
|
||||||
|
export type ContextMenu = {
|
||||||
|
key: string;
|
||||||
|
title: string;
|
||||||
|
icon: string;
|
||||||
|
panel: Panel[];
|
||||||
|
form?: [];
|
||||||
|
};
|
||||||
|
export type TstateOptions = {
|
||||||
|
value: string;
|
||||||
|
title: string;
|
||||||
|
type_label: string;
|
||||||
|
showInput: number;
|
||||||
|
};
|
||||||
|
export type ActiveEntityViewSchemaItems = {
|
||||||
|
title: string;
|
||||||
|
scrollTitle: string;
|
||||||
|
key: string;
|
||||||
|
type: string;
|
||||||
|
filed_state: string;
|
||||||
|
readonly: number;
|
||||||
|
modalName: string;
|
||||||
|
completion: string;
|
||||||
|
tstate_options: TstateOptions[];
|
||||||
|
items: ActiveEntityViewSchemaItemschilds[];
|
||||||
|
};
|
||||||
|
export type ActiveEntityViewSchemaItemschilds = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
};
|
||||||
|
export type EntityPanel = {
|
||||||
|
title: string;
|
||||||
|
key: string;
|
||||||
|
routeName: string;
|
||||||
|
};
|
||||||
|
export type HeaderItems = {
|
||||||
|
title: string;
|
||||||
|
key: string;
|
||||||
|
type: string;
|
||||||
|
col: string;
|
||||||
|
};
|
||||||
|
export type Researchs = {
|
||||||
|
key: string;
|
||||||
|
title: string;
|
||||||
|
icon: string;
|
||||||
|
form: [];
|
||||||
|
};
|
||||||
|
export type Settings = {
|
||||||
|
label: string;
|
||||||
|
key: string;
|
||||||
|
type: string;
|
||||||
|
items: [{ value: string; title: string }];
|
||||||
|
default: string | boolean;
|
||||||
|
};
|
||||||
|
export type Tabs = {
|
||||||
|
title: string;
|
||||||
|
componentName: string;
|
||||||
|
key: string;
|
||||||
|
};
|
||||||
|
// #endregion ActiveEntityViewSchema Types
|
||||||
|
// #region ActiveSystem Types
|
||||||
|
export type ActiveSystem = {
|
||||||
|
id: number;
|
||||||
|
created_at: number;
|
||||||
|
updated_at: number;
|
||||||
|
title: string;
|
||||||
|
users: string;
|
||||||
|
organ: string;
|
||||||
|
owner: number;
|
||||||
|
comment: string;
|
||||||
|
link: string;
|
||||||
|
showInDashboard: number;
|
||||||
|
loading: boolean;
|
||||||
|
};
|
||||||
|
// #endregion ActiveSystem Types
|
||||||
|
// #region ActiveTab Types
|
||||||
|
export type ActiveTab = {
|
||||||
|
title: string;
|
||||||
|
componentName: string;
|
||||||
|
key: string;
|
||||||
|
};
|
||||||
|
// #endregion ActiveTab Types
|
||||||
|
export type EntityViewSchema = ActiveEntityViewSchema[];
|
||||||
|
// #region ListEntity Types
|
||||||
|
export type ListEntity = [
|
||||||
|
ListItem & {
|
||||||
|
fields: { qanon_id: string[] };
|
||||||
|
inner_hits: InnerHits;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export type InnerHits = {
|
||||||
|
by_collapse: {
|
||||||
|
hits: {
|
||||||
|
total: { value: number; relation: string };
|
||||||
|
max_score: number;
|
||||||
|
hits: ListItem[];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
// #endregion ListEntity Types
|
||||||
|
export type SelectedItemEntity = ListItem & ListSource;
|
||||||
|
// #region SimilarInfo Types
|
||||||
|
|
||||||
|
export type SimilarInfo = {
|
||||||
|
type: string;
|
||||||
|
show: boolean;
|
||||||
|
text: string;
|
||||||
|
id: string;
|
||||||
|
label: string;
|
||||||
|
};
|
||||||
|
// #endregion SimilarInfo Types
|
||||||
|
// #region qruleActiveTabGetter Types
|
||||||
|
export type qruleActiveTabGetter = {
|
||||||
|
key: string;
|
||||||
|
routeName: string;
|
||||||
|
type: string;
|
||||||
|
label: string;
|
||||||
|
field_collapse: string;
|
||||||
|
filter: qruleActiveTabFilter[];
|
||||||
|
tabs: qruleActiveTabGetterTabs[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type qruleActiveTabFilter = {
|
||||||
|
title: string;
|
||||||
|
filter_key: string;
|
||||||
|
source_key: string;
|
||||||
|
by_more: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type qruleActiveTabGetterTabsTable_columns = {
|
||||||
|
key: string;
|
||||||
|
title: string;
|
||||||
|
width: string;
|
||||||
|
textAlign: string;
|
||||||
|
isLink: boolean;
|
||||||
|
trancate_word: number;
|
||||||
|
process: string;
|
||||||
|
};
|
||||||
|
export type qruleActiveTabGetterTabsItems_headers = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
options: [{ value: string; title: string }];
|
||||||
|
};
|
||||||
|
export type qruleActiveTabGetterTabsItems = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
type: string;
|
||||||
|
placeholder: string;
|
||||||
|
required: string;
|
||||||
|
delimiter: string;
|
||||||
|
isarray: 1;
|
||||||
|
classes: string;
|
||||||
|
url_GET: string;
|
||||||
|
rows: string;
|
||||||
|
options: [{ value: string; title: string }];
|
||||||
|
};
|
||||||
|
export type qruleActiveTabGetterTabs = {
|
||||||
|
title: "اجزاء قانون";
|
||||||
|
key: "rulesection";
|
||||||
|
componentName: "EntityQModelRule";
|
||||||
|
key_filter: "";
|
||||||
|
items_headers: qruleActiveTabGetterTabsItems_headers[];
|
||||||
|
table_columns: qruleActiveTabGetterTabsTable_columns[];
|
||||||
|
items: qruleActiveTabGetterTabsItems[];
|
||||||
|
};
|
||||||
|
// #endregion qruleActiveTabGetter Types
|
||||||
|
export type qruleActiveTab = {
|
||||||
|
title: string;
|
||||||
|
key: string;
|
||||||
|
componentName: string;
|
||||||
|
key_filter: string;
|
||||||
|
items_headers: [];
|
||||||
|
table_columns: qruleActiveTabGetterTabsTable_columns[];
|
||||||
|
};
|
||||||
|
export type activeResearchType = { key: string; title: string };
|
260
types/searchTypes.ts
Normal file
260
types/searchTypes.ts
Normal file
|
@ -0,0 +1,260 @@
|
||||||
|
export type SummaryOption = { key: string; label: string; type: string };
|
||||||
|
export type Filter = {
|
||||||
|
title: string;
|
||||||
|
filter_key: string;
|
||||||
|
source_key: string;
|
||||||
|
by_more: number;
|
||||||
|
};
|
||||||
|
export type Summary = {
|
||||||
|
title: string;
|
||||||
|
key: string;
|
||||||
|
options: SummaryOption[];
|
||||||
|
};
|
||||||
|
export type Tag = {
|
||||||
|
قانون: string;
|
||||||
|
عنوان: string;
|
||||||
|
متن: string;
|
||||||
|
ماده: string;
|
||||||
|
نوع: string;
|
||||||
|
سال: string;
|
||||||
|
دسته: string;
|
||||||
|
مصوب: string;
|
||||||
|
تاریخ: string;
|
||||||
|
};
|
||||||
|
export type Domain = {
|
||||||
|
label: string;
|
||||||
|
tag: string;
|
||||||
|
key: string;
|
||||||
|
field_collapse: string;
|
||||||
|
table_actions: TableActions[];
|
||||||
|
table_columns: TableColumns;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DomainItem = {
|
||||||
|
label: string;
|
||||||
|
tag: string;
|
||||||
|
key: string;
|
||||||
|
field_collapse: string;
|
||||||
|
table_actions: TableActions[];
|
||||||
|
table_columns: TableColumns[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type baseTableAction = {
|
||||||
|
title: string;
|
||||||
|
key: string;
|
||||||
|
"v-can": string;
|
||||||
|
icon: string;
|
||||||
|
type: string;
|
||||||
|
link_route?: {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
key: string;
|
||||||
|
};
|
||||||
|
toggle_icons?: { icon1: string; icon2: string };
|
||||||
|
};
|
||||||
|
export type TableActions = [
|
||||||
|
baseTableAction & {
|
||||||
|
api_items: {
|
||||||
|
data_type: string;
|
||||||
|
ref_key: string;
|
||||||
|
id: string;
|
||||||
|
title: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
export type TableColumnItem = {
|
||||||
|
key: string;
|
||||||
|
title: string;
|
||||||
|
width: string;
|
||||||
|
textAlign?: string;
|
||||||
|
isLink?: true;
|
||||||
|
link_route?: { id: string; name: string; key: string };
|
||||||
|
trancate_word?: number;
|
||||||
|
colors?: {
|
||||||
|
منسوخه: string;
|
||||||
|
معتبر: string;
|
||||||
|
موقت: string;
|
||||||
|
"بااجرامنتفي مي شود": string;
|
||||||
|
تمديد: string;
|
||||||
|
آزمايشي: string;
|
||||||
|
تنفيذ: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export type TableColumns = TableColumnItem[];
|
||||||
|
|
||||||
|
export type Advance = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
tag: string;
|
||||||
|
type: string;
|
||||||
|
placeholder: string;
|
||||||
|
labelClass: string;
|
||||||
|
inputClass: string;
|
||||||
|
multi_select: string;
|
||||||
|
options?: [{ value: string; title: string }];
|
||||||
|
};
|
||||||
|
export type SearchType = {
|
||||||
|
key: string;
|
||||||
|
description?: string;
|
||||||
|
label: string;
|
||||||
|
item?: {
|
||||||
|
label: string;
|
||||||
|
type: string;
|
||||||
|
component: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export type SearchContentActions = {
|
||||||
|
icon?: "";
|
||||||
|
title: string;
|
||||||
|
key: string;
|
||||||
|
type: string;
|
||||||
|
"v-can": string;
|
||||||
|
|
||||||
|
api_items?: {
|
||||||
|
data_type: string;
|
||||||
|
ref_key: string;
|
||||||
|
id: string;
|
||||||
|
title: string;
|
||||||
|
};
|
||||||
|
toggle_icons?: { icon1: string; icon2: string };
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Item = {
|
||||||
|
key: string;
|
||||||
|
source_key: string;
|
||||||
|
label: string;
|
||||||
|
style: string;
|
||||||
|
process?: string;
|
||||||
|
|
||||||
|
link_route?: {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
key: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export type Items = {
|
||||||
|
key: string;
|
||||||
|
items: Item[];
|
||||||
|
array_key: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type SearchContentCollapseItems = {
|
||||||
|
key: string;
|
||||||
|
items: Items[];
|
||||||
|
};
|
||||||
|
export type ListItem = {
|
||||||
|
title: string;
|
||||||
|
list_key: string;
|
||||||
|
filter_key: string;
|
||||||
|
icon: string;
|
||||||
|
};
|
||||||
|
export type List = ListItem[];
|
||||||
|
// search
|
||||||
|
export type searchActiveTab = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
key_navbar:string;
|
||||||
|
description: string;
|
||||||
|
routeName: string;
|
||||||
|
searchContent: string;
|
||||||
|
showTableList: number;
|
||||||
|
summary: Summary;
|
||||||
|
filter: Filter[];
|
||||||
|
domain: {
|
||||||
|
tags: Tag;
|
||||||
|
domain: Domain[] | [];
|
||||||
|
}|{};
|
||||||
|
advance: Advance[];
|
||||||
|
searchType: SearchType[];
|
||||||
|
search_content: {
|
||||||
|
actions: SearchContentActions[];
|
||||||
|
collapse_items: SearchContentCollapseItems;
|
||||||
|
};
|
||||||
|
lists: List;
|
||||||
|
colors_qanon_etebar: {
|
||||||
|
منسوخه: "red";
|
||||||
|
معتبر: "green";
|
||||||
|
موقت: "blue";
|
||||||
|
"بااجرامنتفي مي شود": "blue";
|
||||||
|
تمديد: "coral";
|
||||||
|
آزمايشي: "blue";
|
||||||
|
تنفيذ: "coral";
|
||||||
|
};
|
||||||
|
}| undefined;
|
||||||
|
export type searchSchema = searchActiveTab[];
|
||||||
|
export type searchActiveSchema = [];
|
||||||
|
|
||||||
|
// search list
|
||||||
|
export type searchChartSchemaItem = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
description: string;
|
||||||
|
routeName: string;
|
||||||
|
searchContent: string;
|
||||||
|
showTableList: number;
|
||||||
|
summary: Summary;
|
||||||
|
filter: Filter[];
|
||||||
|
search_content: {
|
||||||
|
actions: SearchContentActions[];
|
||||||
|
collapse_items: SearchContentCollapseItems;
|
||||||
|
};
|
||||||
|
info: {
|
||||||
|
title: string;
|
||||||
|
index_name: string;
|
||||||
|
meta: string;
|
||||||
|
table_columns: string;
|
||||||
|
table_columns_subject: string;
|
||||||
|
entity_view: string;
|
||||||
|
lists: [];
|
||||||
|
items: [{ name: string; title: string }];
|
||||||
|
};
|
||||||
|
actions: TableActions;
|
||||||
|
items: searchListActiveTab[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type searchListActiveTabItem = {
|
||||||
|
key: string;
|
||||||
|
id: number;
|
||||||
|
url_GET_item: string;
|
||||||
|
key_filter: string;
|
||||||
|
label: string;
|
||||||
|
};
|
||||||
|
export type searchListActiveTab = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
field_collapsed: string;
|
||||||
|
items: searchListActiveTabItem[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type searchListSchema = searchChartSchemaItem[];
|
||||||
|
export type activeSearchListSchema = searchChartSchemaItem;
|
||||||
|
|
||||||
|
// search chart
|
||||||
|
export type searchChartActiveTab = {
|
||||||
|
key: string;
|
||||||
|
componentName: string;
|
||||||
|
label: string;
|
||||||
|
chartBase: {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
items: [{ key: string; label: string }];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export type searchChartSchema = activeSearchChartSchema[];
|
||||||
|
export type activeSearchChartSchema = searchActiveTab & {
|
||||||
|
items: searchChartSchemaItem[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type searchSynonymTitle = {};
|
||||||
|
export type searchSynonymForm = [];
|
||||||
|
export type selectionFilterItems = [];
|
||||||
|
|
||||||
|
export type helpSchema = helpActiveSchema[];
|
||||||
|
export type helpActiveSchema = {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
title: string;
|
||||||
|
comment: string;
|
||||||
|
};
|
||||||
|
export type DomainActive = Domain;
|
Loading…
Reference in New Issue
Block a user