Update base
This commit is contained in:
parent
1c29416a9b
commit
7ddda745c0
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[submodule "systems/search_ui"]
|
||||||
|
path = systems/search_ui
|
||||||
|
url = https://git2.tavasi.ir/front/search_ui.git
|
||||||
|
[submodule "systems/research_ui"]
|
||||||
|
path = systems/research_ui
|
||||||
|
url = https://git2.tavasi.ir/front/research_ui.git
|
17
apis/aiToolsApi.js
Normal file
17
apis/aiToolsApi.js
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
export default {
|
||||||
|
schema: {
|
||||||
|
list: "schema",
|
||||||
|
},
|
||||||
|
MainContent: {
|
||||||
|
nextSection: "dataset/get/next",
|
||||||
|
update: "dataset/update/@task/@id",
|
||||||
|
update_result_objects: "dataset/update/result/object/@property_key/@id",
|
||||||
|
keywordAdd: "dataset/update/result/object/users/@id",
|
||||||
|
},
|
||||||
|
nlp: {
|
||||||
|
markdown: "ai/qanon/get/markdown",
|
||||||
|
markdown_section: "ai/qanon/get/markdown/section",
|
||||||
|
markdown_tree: "ai/qanon/get/markdown/tree",
|
||||||
|
effective_laws: "ai/laws/effective-laws",
|
||||||
|
},
|
||||||
|
};
|
86
apis/borhanApi.js
Normal file
86
apis/borhanApi.js
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
const baseUrl = "boronto/api/onto";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
schema: {
|
||||||
|
list: "schema",
|
||||||
|
},
|
||||||
|
|
||||||
|
ontologies: {
|
||||||
|
show: `${baseUrl}/iri/`,
|
||||||
|
create: `${baseUrl}/`,
|
||||||
|
update: "",
|
||||||
|
delete: "",
|
||||||
|
read: "",
|
||||||
|
import: `${baseUrl}/import/`,
|
||||||
|
fileList: "/file/permit/borhan/list/serviceid",
|
||||||
|
},
|
||||||
|
imports: {
|
||||||
|
show: "",
|
||||||
|
create: `${baseUrl}/import/`,
|
||||||
|
update: `${baseUrl}/import/`,
|
||||||
|
delete: `${baseUrl}/import/`,
|
||||||
|
read: `${baseUrl}/import/`,
|
||||||
|
},
|
||||||
|
annotations: {
|
||||||
|
show: `${baseUrl}/annotation/`,
|
||||||
|
read: `${baseUrl}/annotation/`,
|
||||||
|
create: `${baseUrl}/annotation/`,
|
||||||
|
delete: `${baseUrl}/annotation/`,
|
||||||
|
},
|
||||||
|
metrics: {
|
||||||
|
read: `${baseUrl}/metric/`,
|
||||||
|
},
|
||||||
|
prefixes: {
|
||||||
|
read: `${baseUrl}/prefix/all/`,
|
||||||
|
},
|
||||||
|
iri: {
|
||||||
|
read: `${baseUrl}/iri/`,
|
||||||
|
update: `${baseUrl}/iri/`,
|
||||||
|
},
|
||||||
|
// همون مهفوم یا convept
|
||||||
|
class: {
|
||||||
|
sub: `${baseUrl}/class/sub/`,
|
||||||
|
equ: `${baseUrl}/class/equ/`,
|
||||||
|
read: `${baseUrl}/class/`,
|
||||||
|
add: `${baseUrl}/class/{{key}}/`,
|
||||||
|
removeAnnotation: `${baseUrl}/class/annotation/delete/`,
|
||||||
|
|
||||||
|
remove: `${baseUrl}/class/{{key}}/delete/`,
|
||||||
|
removetree: `${baseUrl}/class/delete/`,
|
||||||
|
autoComplate: `${baseUrl}/class/auto_complate/`,
|
||||||
|
update: `${baseUrl}/class/`,
|
||||||
|
annotations: {
|
||||||
|
read: `${baseUrl}/class/all/`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
property: {
|
||||||
|
removetree: `${baseUrl}/{{key}}/delete/`,
|
||||||
|
sub: `${baseUrl}/{{property}}/sub/`,
|
||||||
|
read: `${baseUrl}/all_property/`,
|
||||||
|
readitem: `${baseUrl}/{{key}}/`,
|
||||||
|
update: `${baseUrl}/property/`,
|
||||||
|
add: `${baseUrl}/property/{{key}}/`,
|
||||||
|
select: `${baseUrl}/property/type/`,
|
||||||
|
get_tree: `${baseUrl}/{{property}}/all/`,
|
||||||
|
annotations: {
|
||||||
|
read: `${baseUrl}/property/all/`,
|
||||||
|
read_all: `${baseUrl}/{{property}}/all/`,
|
||||||
|
|
||||||
|
},
|
||||||
|
},
|
||||||
|
individual: {
|
||||||
|
removetree: `${baseUrl}/individual/delete/`,
|
||||||
|
read: `${baseUrl}/all_individual/`,
|
||||||
|
add: `${baseUrl}/individual/{{key}}/`,
|
||||||
|
addlist: `${baseUrl}/individual/`,
|
||||||
|
select: `${baseUrl}/property/type/`,
|
||||||
|
update: `${baseUrl}/individual/`,
|
||||||
|
autoComplate: `${baseUrl}/individual/auto_complate/`,
|
||||||
|
remove: `${baseUrl}/individual/{{key}}/delete/`,
|
||||||
|
removList: `${baseUrl}/individual/delete/`,
|
||||||
|
removeAnnotation: `${baseUrl}/individual/annotation/delete/`,
|
||||||
|
annotations: {
|
||||||
|
read: `${baseUrl}/individual/all/`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
74
apis/chatApi.js
Normal file
74
apis/chatApi.js
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
export default {
|
||||||
|
all: {
|
||||||
|
list: 'group/ve/get/groups/',
|
||||||
|
create: 'group/ed/set',
|
||||||
|
delete: 'group/ed/delete',
|
||||||
|
update: 'group/id',
|
||||||
|
edit: 'group/id',
|
||||||
|
updateAvatar: 'group/ed/avatar/',
|
||||||
|
|
||||||
|
},
|
||||||
|
groups: {
|
||||||
|
list: 'group/ve/get/groups/',
|
||||||
|
create: 'group/ed/set',
|
||||||
|
delete: 'group/ed/delete',
|
||||||
|
update: 'group/ed/set',
|
||||||
|
parent : 'group/ed/parent',
|
||||||
|
edit: 'group/id',
|
||||||
|
updateAvatar: 'group/ed/avatar/',
|
||||||
|
addMember: 'group/ed/setmembers/',
|
||||||
|
groupMembers: 'group/ve/members/ext/list/',
|
||||||
|
invite: 'group/invite',
|
||||||
|
leave: 'group/ed/leave',
|
||||||
|
|
||||||
|
},
|
||||||
|
lobbies: {
|
||||||
|
list: 'group/ve/get/lobby/1',
|
||||||
|
create: 'group/ed/set',
|
||||||
|
delete: 'group/ed/delete',
|
||||||
|
update: 'group/id',
|
||||||
|
edit: 'group/id',
|
||||||
|
updateAvatar: 'group/ed/avatar/',
|
||||||
|
|
||||||
|
},
|
||||||
|
privates: {
|
||||||
|
// list: 'message/private/list/',
|
||||||
|
list: 'message/private/list/similar/',
|
||||||
|
create: 'group/ed/set',
|
||||||
|
delete: 'message/delete',
|
||||||
|
update: 'group/id',
|
||||||
|
edit: 'group/id',
|
||||||
|
updateAvatar: 'group/ed/avatar/',
|
||||||
|
|
||||||
|
},
|
||||||
|
// myMessages: {
|
||||||
|
// list: "message/get/ext/",
|
||||||
|
// create: 'message/set',
|
||||||
|
// delete: 'message/id/delete',
|
||||||
|
// update: 'message/id',
|
||||||
|
// edit: 'message/id',
|
||||||
|
// },
|
||||||
|
unReads: {
|
||||||
|
list: "group/seen/list",
|
||||||
|
create: 'message/set',
|
||||||
|
delete: 'message/id/delete',
|
||||||
|
update: 'message/id',
|
||||||
|
edit: 'message/id',
|
||||||
|
groups: 'group/seen/group/',
|
||||||
|
privates: 'group/seen/user/',
|
||||||
|
|
||||||
|
},
|
||||||
|
messages: {
|
||||||
|
list: "message/get/ext/",
|
||||||
|
virtualList: "message/get/virtual/",
|
||||||
|
create: 'message/set',
|
||||||
|
delete: 'message/id/delete',
|
||||||
|
update: 'message/id',
|
||||||
|
edit: 'message/id',
|
||||||
|
show: 'message/get/info/@group_id/@messge_id',
|
||||||
|
},
|
||||||
|
// otherApi: {
|
||||||
|
// list: "message/get/group",
|
||||||
|
// update1:'message/get',
|
||||||
|
// },
|
||||||
|
}
|
50
apis/entityApi.js
Normal file
50
apis/entityApi.js
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
export default {
|
||||||
|
schema: {
|
||||||
|
list: "schema",
|
||||||
|
},
|
||||||
|
research: {
|
||||||
|
addItem: "research/add/repo/{{index_key}}",
|
||||||
|
updateItem: "research/update/repo/{{index_key}}/{{id}}", //ایدی فیش و یا حاشیه
|
||||||
|
deleteItem: "/public/{{index_key}}/delete/{{id}}", //ایدی فیش و یا حاشیه
|
||||||
|
listByEntityId: "research/get/list/{{entity_id}}", // گرفتن لیست با ایدی
|
||||||
|
listByEntityIdByFilter: "research/get/list/{{entity_id}}/{{filter}}", // گرفتن لیست با ایدی و فیلتر //research_type=فیش&service=repo&ref_key:sanad&user_create:2
|
||||||
|
getByFilter: "research/get/list/{{filter}}", // گرفتن لیست با فیلتر
|
||||||
|
},
|
||||||
|
fish: {
|
||||||
|
save: "research/",
|
||||||
|
list: "research/getFishList/",
|
||||||
|
add: "research/add/repo/{{index_key}}",
|
||||||
|
addTerm: "research/add/term/repo/{{index_key}}/{{project_id}}",
|
||||||
|
update: "research/update/repo/{{index_key}}/{{id}}",
|
||||||
|
},
|
||||||
|
annotation: {
|
||||||
|
add: "research/add/repo/{{index_key}}",
|
||||||
|
update: "research/update/repo/{{index_key}}/{{id}}",
|
||||||
|
},
|
||||||
|
level: {
|
||||||
|
item: "version/get/step/{{sanad}}/{{entity_id}}?title={{title}}",
|
||||||
|
saveEdit: "version/step/{{sanad}}",
|
||||||
|
add: "version/step/sanad",
|
||||||
|
edit: "version/step/sanad/{{id}}",
|
||||||
|
delete: "/version/delete/step/sanad/{{id}}",
|
||||||
|
},
|
||||||
|
similar: {
|
||||||
|
// vector:"/majles/search/{{index_key}}/vector/{{sort_state}}/{{offset}}/{{limit}}",
|
||||||
|
textual: "/majles/similar/{{index_key}}/{{field}}/{{offset}}/{{limit}}",
|
||||||
|
},
|
||||||
|
chart: {
|
||||||
|
ganttchart: "repo/majles/ganttchart/{{index_key}}",
|
||||||
|
ganttchart2: "/majles/ganttchart/{{index_key}}/{{filter}}",
|
||||||
|
version: "repo/majles/version/@index_key",
|
||||||
|
},
|
||||||
|
// search: {
|
||||||
|
// default: "{{mode}}/data/{{params}}/{{sortKey}}/{{offset}}/{{limit}}",
|
||||||
|
// },
|
||||||
|
comparison: {
|
||||||
|
getParent: "/public/@index_key/text/parent/@parent_id",
|
||||||
|
getText: "/public/@index_key/text/@id",
|
||||||
|
},
|
||||||
|
edit: {
|
||||||
|
treeList: "tree/@index_key/@qanon_id",
|
||||||
|
},
|
||||||
|
};
|
6
apis/lmsApi.js
Normal file
6
apis/lmsApi.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
export default {
|
||||||
|
all: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
|
@ -33,7 +33,8 @@ export default {
|
||||||
},
|
},
|
||||||
users: {
|
users: {
|
||||||
list: "/user/list/{{offset}}/{{limit}}/{{sortby}}/{{sortorder}}",
|
list: "/user/list/{{offset}}/{{limit}}/{{sortby}}/{{sortorder}}",
|
||||||
search: "/user/search/{{offset}}/{{limit}}/{{sortby}}/{{sortorder}}/{{query}}",
|
search:
|
||||||
|
"/user/search/{{offset}}/{{limit}}/{{sortby}}/{{sortorder}}/{{query}}",
|
||||||
create: "user/add",
|
create: "user/add",
|
||||||
update: "user/update",
|
update: "user/update",
|
||||||
updateUserState: "user/update/state",
|
updateUserState: "user/update/state",
|
||||||
|
|
|
@ -18,6 +18,7 @@ export default {
|
||||||
draftList : '{{appname}}/draft/{{index_key}}/{{sortKey}}/{{offset}}/{{limit}}/{{filter}}',
|
draftList : '{{appname}}/draft/{{index_key}}/{{sortKey}}/{{offset}}/{{limit}}/{{filter}}',
|
||||||
draftSave : '{{appname}}/draft/{{index_key}}/saveto/{{to_index_key}}/{{entity_id}}',
|
draftSave : '{{appname}}/draft/{{index_key}}/saveto/{{to_index_key}}/{{entity_id}}',
|
||||||
draftUnlock : '{{appname}}/draft/{{index_key}}/unlock/{{to_index_key}}/{{entity_id}}',
|
draftUnlock : '{{appname}}/draft/{{index_key}}/unlock/{{to_index_key}}/{{entity_id}}',
|
||||||
|
textVersion : 'monir/steps/{{ref_key}}/{{ref_id}}'
|
||||||
// getCrition:"crition/bysubjectid/list/0/10/{{subjectId}}",
|
// getCrition:"crition/bysubjectid/list/0/10/{{subjectId}}",
|
||||||
},
|
},
|
||||||
property: {
|
property: {
|
||||||
|
|
24
apis/researchApi.js
Normal file
24
apis/researchApi.js
Normal 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',
|
||||||
|
},
|
||||||
|
};
|
73
apis/searchApi.js
Normal file
73
apis/searchApi.js
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
export default {
|
||||||
|
items: {
|
||||||
|
get: "monir/search/get/byid/",
|
||||||
|
},
|
||||||
|
Farhanghestan: {
|
||||||
|
search_normal: "monir/search/0/10",
|
||||||
|
search_And: "monir/search/and/0/10",
|
||||||
|
search_Phrase: "monir/search/phrase/0/10",
|
||||||
|
search_Code: "monir/search/code/all/0/10",
|
||||||
|
},
|
||||||
|
subject: {
|
||||||
|
add: "sanad/subject/add",
|
||||||
|
// edit: "sanad/subject/edit",
|
||||||
|
delete: "sanad/subject/delete",
|
||||||
|
order: "monir/sanad/subject/order",
|
||||||
|
},
|
||||||
|
index: {
|
||||||
|
Index_one: "safheh212/one",
|
||||||
|
index_multi: "safheh212/multi",
|
||||||
|
},
|
||||||
|
nesha: {
|
||||||
|
search_normal: "monir/search/nesha/0/10",
|
||||||
|
},
|
||||||
|
wordSWeight: {
|
||||||
|
list: "ngrams/elastic/{{index_key}}/1to3",
|
||||||
|
},
|
||||||
|
rezome: {
|
||||||
|
add: "rezumeh",
|
||||||
|
get: "rezumeh/get",
|
||||||
|
},
|
||||||
|
navigation: {
|
||||||
|
list: "navigate/list/@entity",
|
||||||
|
report:
|
||||||
|
"navigate/report/{{index_key}}/{{offset}}/{{limit}}/{{aggs}}/{{filter}}",
|
||||||
|
reportItem: "navigate/report/items",
|
||||||
|
reportSubjectItem: "navigate/report/subject={{subject_title}}/items",
|
||||||
|
},
|
||||||
|
bnavigation: {
|
||||||
|
list: "repo/navigate/list",
|
||||||
|
report: "repo/navigate/report",
|
||||||
|
reportItem: "repo/navigate/report/items",
|
||||||
|
reportSubjectItem: "repo/navigate/report/subject={{subject_title}}/items",
|
||||||
|
},
|
||||||
|
schema: {
|
||||||
|
list: "schema",
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
autoComplate:
|
||||||
|
"{{appname}}/complation/{{index_key}}/{{filter}}",
|
||||||
|
logAutoComplate:
|
||||||
|
"searchlog/complation/{{filter}}",
|
||||||
|
default:
|
||||||
|
"{{appname}}/data/{{index_key}}/{{sortKey}}/{{offset}}/{{limit}}/{{filter}}",
|
||||||
|
queryNormal:
|
||||||
|
"{{appname}}/search/{{index_key}}/{{search_type}}/{{sortKey}}/{{field_collapse}}/{{offset}}/{{limit}}/{{filter}}",
|
||||||
|
textSearch:
|
||||||
|
"{{appname}}/search/text/{{index_key}}/{{field}}/{{offset}}/{{limit}}/{{filter}}",
|
||||||
|
},
|
||||||
|
chart: {
|
||||||
|
timeline: "{{appname}}/data/timeline/{{index_key}}",
|
||||||
|
xy: "{{appname}}/data/xy/{{index_key}}/{{field_key}}",
|
||||||
|
items:
|
||||||
|
"navigate/report/items/search/{{index_key}}/{{offset}}/{{limit}}/{{filter}}",
|
||||||
|
chartTreeMap: "list/project/treemap/{{chart_key}}/{{filter}}",
|
||||||
|
treeItems:"navigate/report/items/search/{{index_key}}/{{offset}}/{{limit}}/{{filter}}",
|
||||||
|
tree: "list/subject/list",
|
||||||
|
graph:"repo/majles/{{to_key}}/relation"
|
||||||
|
},
|
||||||
|
synonym:{
|
||||||
|
getSynonyms:"synonym/get/words",
|
||||||
|
synonymSearch:"search/qasection/synonym/@listkey/@offset/@limit/@q",
|
||||||
|
}
|
||||||
|
};
|
37
apis/tahrirApi.js
Normal file
37
apis/tahrirApi.js
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
export default {
|
||||||
|
users: {
|
||||||
|
list: 'user/list',
|
||||||
|
add: 'user/add'
|
||||||
|
},
|
||||||
|
profiles: {
|
||||||
|
list: 'profile/list',
|
||||||
|
add: 'profiles/add'
|
||||||
|
},
|
||||||
|
papers: {
|
||||||
|
list: 'project/list',
|
||||||
|
add: 'project/add'
|
||||||
|
},
|
||||||
|
docs: {
|
||||||
|
list: 'docs/list',
|
||||||
|
add: 'docs/add',
|
||||||
|
|
||||||
|
},
|
||||||
|
permissions: {
|
||||||
|
userPermissions: 'perm/add',
|
||||||
|
rolePermissions: 'perm/add'
|
||||||
|
},
|
||||||
|
comments: {
|
||||||
|
list: 'comment/20',
|
||||||
|
add: 'comment/add/20',
|
||||||
|
update: 'comment/edit/20',
|
||||||
|
documentComment: 'comment/parags/groupby/20',
|
||||||
|
addCommentToSelectedParag: 'paragraph/edit',
|
||||||
|
paragraphCommentList:'comment/20',
|
||||||
|
removeItem:'comment/delete/20',
|
||||||
|
replyto:'/comment/add/20',
|
||||||
|
|
||||||
|
},
|
||||||
|
moveOne: 'doc/order/move/one',
|
||||||
|
moveParent: 'doc/order/move/parent',
|
||||||
|
delete: 'doc/del',
|
||||||
|
}
|
34
apis/taskApi.js
Normal file
34
apis/taskApi.js
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
export default {
|
||||||
|
workingHours: {
|
||||||
|
list: "general/get",
|
||||||
|
load: "general/load",
|
||||||
|
add: "general/add",
|
||||||
|
taskAdd: "details/add",
|
||||||
|
taskEdit: "details/edit",
|
||||||
|
day: "details/page/day",
|
||||||
|
delete: "details/delete",
|
||||||
|
deleteHours: "general/delete/time",
|
||||||
|
complitionAll: "details/complition/title",
|
||||||
|
complition: "details/complition/title/{{query}}",
|
||||||
|
copy: "general/copy",
|
||||||
|
move: "general/move",
|
||||||
|
},
|
||||||
|
taskChart: {
|
||||||
|
donut: "chart/getCategory",
|
||||||
|
},
|
||||||
|
taskTeams: {
|
||||||
|
getList: "group/list",
|
||||||
|
delete: "group/delete ",
|
||||||
|
edit: "group/edit ",
|
||||||
|
add:"group/add",
|
||||||
|
members:"perm/list",
|
||||||
|
addMembers:"perm/add",
|
||||||
|
deleteMembers:"perm/delete",
|
||||||
|
editMembers:"perm/edit",
|
||||||
|
},
|
||||||
|
taskReport: {
|
||||||
|
getList: "general/getList",
|
||||||
|
groupList:"group/list",
|
||||||
|
sortgroup:"general/load/group",
|
||||||
|
},
|
||||||
|
};
|
39
apis/thiqatApi.js
Normal file
39
apis/thiqatApi.js
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
const baseUrl = "beta.thiqat.org/api/";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
baseUrl: "https://beta.thiqat.org/api/",
|
||||||
|
ChartLine:"/persons/id/times?iri={{name}}",
|
||||||
|
schema: {
|
||||||
|
list: "schema",
|
||||||
|
},
|
||||||
|
entities: {
|
||||||
|
filter_model: "/filter_model/",
|
||||||
|
list: "/",
|
||||||
|
info: "/id/",
|
||||||
|
relations: "/relations/",
|
||||||
|
persons: {
|
||||||
|
filter_model: "persons/filter_model/",
|
||||||
|
list: "persons/",
|
||||||
|
info: "persons/id/",
|
||||||
|
relations: "persons/id/relations/",
|
||||||
|
stats: "persons/stats/",
|
||||||
|
correlation_stats: "persons/correlation_stats/",
|
||||||
|
},
|
||||||
|
hadiths: {
|
||||||
|
filter_model: "hadiths/filter_model",
|
||||||
|
list: "hadiths/",
|
||||||
|
info: "hadiths/id"
|
||||||
|
},
|
||||||
|
terms: {
|
||||||
|
filter_model: "terms/filter_model",
|
||||||
|
list: "terms/",
|
||||||
|
info: "terms/id"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
persons: {
|
||||||
|
stats: "persons/stats/?parent_iri={{value}}",
|
||||||
|
// id:"persons/id/times?iri={{id}}",
|
||||||
|
id:"persons/id/times",
|
||||||
|
correlation:"persons/correlation_stats?parent1_iri={{id1}}&parent2_iri={{id2}}"
|
||||||
|
},
|
||||||
|
};
|
|
@ -6,7 +6,7 @@
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import entityApi from "~/apis/entityApi.js";
|
import entityApi from "~/apis/entityApi.js";
|
||||||
import { mapState } from "pinia";
|
import { mapState } from "pinia";
|
||||||
import { useEntityStore } from "~/stores/entityStore";
|
import { useCommonStore } from "~/stores/commonStore";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @vue-prop {Object|null} [selectedItem=null] - آیتم انتخاب شده
|
* @vue-prop {Object|null} [selectedItem=null] - آیتم انتخاب شده
|
||||||
|
@ -44,7 +44,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useEntityStore, ["activeEntityViewSchemaGetter"]),
|
...mapState(useCommonStore, ["activeEntityViewSchemaGetter"]),
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.selectedItem) {
|
if (this.selectedItem) {
|
||||||
|
|
|
@ -143,13 +143,12 @@
|
||||||
import researchApi from "@apis/researchApi";
|
import researchApi from "@apis/researchApi";
|
||||||
import HttpService from "@services/httpService";
|
import HttpService from "@services/httpService";
|
||||||
import { mapActions, mapState } from "pinia";
|
import { mapActions, mapState } from "pinia";
|
||||||
import { useResearchStore } from "~/stores/researchStore";
|
import { useCommonStore } from "~/stores/commonStore";
|
||||||
//
|
//
|
||||||
import { use } from "echarts/core";
|
import { use } from "echarts/core";
|
||||||
import { TreeChart } from "echarts/charts";
|
import { TreeChart } from "echarts/charts";
|
||||||
import { TooltipComponent, ToolboxComponent } from "echarts/components";
|
import { TooltipComponent, ToolboxComponent } from "echarts/components";
|
||||||
import { CanvasRenderer } from "echarts/renderers";
|
import { CanvasRenderer } from "echarts/renderers";
|
||||||
import { removeData } from "jquery";
|
|
||||||
use([TooltipComponent, TreeChart, CanvasRenderer, ToolboxComponent]);
|
use([TooltipComponent, TreeChart, CanvasRenderer, ToolboxComponent]);
|
||||||
/**
|
/**
|
||||||
* @vue-prop {Array} [dataTreeMap=] - آرایهای از دادههای نقشه درخت
|
* @vue-prop {Array} [dataTreeMap=] - آرایهای از دادههای نقشه درخت
|
||||||
|
@ -393,14 +392,14 @@ export default {
|
||||||
this.option.toolbox.feature.myTool2.iconStyle.color = "#fff";
|
this.option.toolbox.feature.myTool2.iconStyle.color = "#fff";
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useResearchStore, [
|
...mapState(useCommonStore, [
|
||||||
"dataForTreeMapGetter",
|
// "dataForTreeMapGetter",
|
||||||
"researchTermsGetter",
|
"researchTermsGetter",
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(useResearchStore, ["dataForTreeMapSetter"]),
|
// ...mapActions(useResearchStore, ["dataForTreeMapSetter"]),
|
||||||
/**
|
/**
|
||||||
*تغیرات مربوط به حالت نمایش و ویرایش در چارت
|
*تغیرات مربوط به حالت نمایش و ویرایش در چارت
|
||||||
|
|
||||||
|
|
|
@ -1,549 +0,0 @@
|
||||||
<template>
|
|
||||||
<div
|
|
||||||
class="input-group"
|
|
||||||
@keyup="keyupdiv"
|
|
||||||
:style="{
|
|
||||||
showAppend: { 'box-shadow': '0 1px 3px rgba(23, 23, 23, 0.24)' },
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<button
|
|
||||||
v-if="showPrepend"
|
|
||||||
dir="rtl"
|
|
||||||
class="btn d-flex align-items-center"
|
|
||||||
type="button"
|
|
||||||
id="button-addon2"
|
|
||||||
@click="searchNavigateList()"
|
|
||||||
>
|
|
||||||
جستجو
|
|
||||||
<span class="tavasi tavasi-Component-198--1"></span>
|
|
||||||
</button>
|
|
||||||
<span v-else style="opacity: 0">xxx</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
v-model="localTextSearch"
|
|
||||||
@click="showHisory()"
|
|
||||||
@keyup.enter="prevSearchStart"
|
|
||||||
@keyup="toggleAutocomplete"
|
|
||||||
@keydown="onKeyDown()"
|
|
||||||
class="form-control"
|
|
||||||
id="search"
|
|
||||||
:placeholder="placeholder"
|
|
||||||
autocomplete="off"
|
|
||||||
ref="searchinput"
|
|
||||||
@focus="setInputFocus()"
|
|
||||||
@blur="inputfocused = false"
|
|
||||||
v-focus
|
|
||||||
/>
|
|
||||||
<div :class="[showAppend ? 'input-group-text' : 'input-group-append']">
|
|
||||||
<template v-if="showAppend">
|
|
||||||
<button
|
|
||||||
v-tooltip="'جستجو در خاصیت(فیلد) ویژه'"
|
|
||||||
class="btn dropdown-toggle dropdown-toggle-color rounded-0"
|
|
||||||
type="button"
|
|
||||||
data-bs-toggle="dropdown"
|
|
||||||
aria-haspopup="true"
|
|
||||||
aria-expanded="false"
|
|
||||||
id="dropdownMenuButton12"
|
|
||||||
>
|
|
||||||
<span class="navItemlabel">
|
|
||||||
{{ domainActiveGetter?.label }}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton12">
|
|
||||||
<button
|
|
||||||
v-for="(navItem, index) in searchDomain"
|
|
||||||
:key="index"
|
|
||||||
type="button"
|
|
||||||
class="dropdown-item"
|
|
||||||
@click.prevent="setDomainField(navItem)"
|
|
||||||
>
|
|
||||||
{{ navItem.label }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<button
|
|
||||||
v-if="showAppendSearchButton"
|
|
||||||
v-tooltip="'جستجو در خاصیت(فیلد) ویژه'"
|
|
||||||
@click.prevent="prevSearchStart()"
|
|
||||||
class="btn btn-primary search-icon"
|
|
||||||
>
|
|
||||||
<svg class="icon icon-Component-198--1">
|
|
||||||
<use xlink:href="#icon-Component-198--1"></use>
|
|
||||||
</svg>
|
|
||||||
<!-- <NuxtImg src="@assets/common/img/searchmajles.svg" alt="" /> -->
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
v-if="inputPopupState == 3 && localListAutocomplate.length"
|
|
||||||
class="search-page__result firefox-scrollbar"
|
|
||||||
:class="{
|
|
||||||
show: localListAutocomplate.length,
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<!-- v-click-outside="onClickOutside" -->
|
|
||||||
<ul ref="auto_complate_ul">
|
|
||||||
<li v-for="(item, i) in localListAutocomplate" :key="i" :value="i">
|
|
||||||
<a @click.prevent="selectAutocomplate2(item)">
|
|
||||||
<span
|
|
||||||
class="text__14"
|
|
||||||
v-html="getHighlightAutocomplate(item)"
|
|
||||||
></span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
v-if="inputPopupState == 1"
|
|
||||||
class="search-page__result show"
|
|
||||||
>
|
|
||||||
<!-- v-click-outside="onClickOutside" -->
|
|
||||||
<template v-if="historySearch.length">
|
|
||||||
<div>
|
|
||||||
<div class="scrollbar">
|
|
||||||
<ul ref="his_ul">
|
|
||||||
<li v-for="(item, i) in historySearch" :key="i" :data-key="i">
|
|
||||||
<a @click.prevent="selectHistorySearch(item)">
|
|
||||||
<NuxtImg src="assets/common/img/Component 359 – 2.svg" alt="" />
|
|
||||||
<span class="text__14">{{ item }}</span>
|
|
||||||
</a>
|
|
||||||
<a @click="removeHistorySearch(i)" class="close">
|
|
||||||
<svg class="icon icon-Component-294--1">
|
|
||||||
<use xlink:href="#icon-Component-294--1"></use>
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<div class="scrollbar">
|
|
||||||
<ul ref="">
|
|
||||||
<li>
|
|
||||||
<p class="m-0 text__light">
|
|
||||||
<NuxtImg src="assets/common/img/Component 359 – 2.svg" alt="" />
|
|
||||||
<span class="text__14"> تاریخچه جستجو خالی می باشد </span>
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
import { mapState } from "pinia";
|
|
||||||
import searchApi from "~/apis/searchApi";
|
|
||||||
import { useSearchStore } from "~/stores/searchStore";
|
|
||||||
|
|
||||||
// Vue.directive("click-outside", {
|
|
||||||
// bind(el, binding, vnode) {
|
|
||||||
// el.clickOutsideEvent = (event) => {
|
|
||||||
// if (!(el === event.target || el.contains(event.target))) {
|
|
||||||
// vnode.context[binding.expression](event);
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
// document.body.addEventListener("click", el.clickOutsideEvent);
|
|
||||||
// },
|
|
||||||
// unbind(el) {
|
|
||||||
// document.body.removeEventListener("click", el.clickOutsideEvent);
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
placeholder: {
|
|
||||||
default: "جستجو در هزاران محتوای قوانین و مقرارت",
|
|
||||||
},
|
|
||||||
contentKey: {
|
|
||||||
default: "qasection",
|
|
||||||
},
|
|
||||||
entityTheme: {
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
showAppendSearchButton: {
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
showPrepend: {
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
showAppend: {
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
textSearch: {
|
|
||||||
default: "",
|
|
||||||
},
|
|
||||||
modeInit: {
|
|
||||||
default: 0,
|
|
||||||
},
|
|
||||||
searchDomain: {
|
|
||||||
default() {
|
|
||||||
return [];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
listAutocomplate: {
|
|
||||||
default() {
|
|
||||||
return [];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
emits: ["getAutoComplateList"],
|
|
||||||
watch: {
|
|
||||||
modeInit(newVal = 1) {
|
|
||||||
this.mode = newVal;
|
|
||||||
},
|
|
||||||
textSearch(newVal) {
|
|
||||||
this.localTextSearch = newVal;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
beforeMount() {
|
|
||||||
// this.inputPopupState = this.inputPopupState;
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.localTextSearch = this.textSearch;
|
|
||||||
|
|
||||||
if (window.localStorage.getItem([this.historySearchRecent])) {
|
|
||||||
try {
|
|
||||||
this.historySearch = JSON.parse(
|
|
||||||
window.localStorage.getItem([this.historySearchRecent])
|
|
||||||
);
|
|
||||||
} catch (e) {
|
|
||||||
window.localStorage.removeItem([this.historySearchRecent]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
window.removeEventListener("resize", this.handleResize);
|
|
||||||
window.removeEventListener("load", this.handleResize);
|
|
||||||
document.removeEventListener("click", this.handleClickOutside);
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
localListAutocomplate: [],
|
|
||||||
typingTimer: undefined,
|
|
||||||
doneTypingInterval: 800,
|
|
||||||
localTextSearch: "",
|
|
||||||
historySearch: [],
|
|
||||||
|
|
||||||
inputPopupState: 0,
|
|
||||||
mode: 1,
|
|
||||||
tagLiSelected: null,
|
|
||||||
inputfocused: false,
|
|
||||||
isLastKeyCodeArrow: false,
|
|
||||||
historySearchRecent: "historysearchrecent",
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapState(useSearchStore, [
|
|
||||||
"domainActiveGetter",
|
|
||||||
"searchActiveTabGetter",
|
|
||||||
"searchSchemaGetter",
|
|
||||||
"searchSynonymTitleGetter",
|
|
||||||
]),
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/**
|
|
||||||
* تنظیم آیتم انتخاب شده و شروع جستجو.
|
|
||||||
* @param {Object} navItem - آیتم انتخابشده.
|
|
||||||
*/
|
|
||||||
setDomainField(navItem) {
|
|
||||||
this.$emit("onSetDomainField", navItem);
|
|
||||||
// this.prevSearchStart();
|
|
||||||
},
|
|
||||||
async getAutoComplateList() {
|
|
||||||
this.localListAutocomplate = [];
|
|
||||||
if (this.localTextSearch == "") return;
|
|
||||||
|
|
||||||
let index_key = this.contentKey;
|
|
||||||
if (!index_key) return;
|
|
||||||
|
|
||||||
let url = searchApi.search.autoComplate;
|
|
||||||
|
|
||||||
url = url.replace("{{appname}}", buildName());
|
|
||||||
url = url.replace("{{index_key}}", index_key);
|
|
||||||
url = url.replace("{{filter}}", "q=" + this.localTextSearch);
|
|
||||||
|
|
||||||
try {
|
|
||||||
const { $api } = useNuxtApp();
|
|
||||||
const response = await $api(url, {
|
|
||||||
baseURL: repoUrl(),
|
|
||||||
});
|
|
||||||
|
|
||||||
this.localListAutocomplate = response.hits?.hits;
|
|
||||||
this.inputPopupState = 3;
|
|
||||||
} catch (err) {}
|
|
||||||
},
|
|
||||||
|
|
||||||
onKeyDown() {
|
|
||||||
clearTimeout(this.typingTimer);
|
|
||||||
this.typingTimer = undefined;
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* کنترل تایمر تکمیل خودکار و ارسال کوئری.
|
|
||||||
* تایمر فعلی را پاک میکند و یک تایمر جدید با یک تاخیر مشخص تنظیم میکند تا کوئری را ارسال کند.
|
|
||||||
*/
|
|
||||||
toggleAutocomplete(event) {
|
|
||||||
// برای کلید حرکت پایین درخواست اضافی نرود
|
|
||||||
if (
|
|
||||||
event.keyCode === 40 ||
|
|
||||||
event.keyCode === 38 ||
|
|
||||||
event.keyCode === 13
|
|
||||||
) {
|
|
||||||
this.isLastKeyCodeArrow = event.keyCode === 40 || event.keyCode === 38;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.isLastKeyCodeArrow = false;
|
|
||||||
|
|
||||||
if (!this.inputfocused && this.inputPopupState === 3) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.typingTimer) {
|
|
||||||
clearTimeout(this.typingTimer);
|
|
||||||
this.typingTimer = undefined;
|
|
||||||
} else {
|
|
||||||
this.typingTimer = setTimeout(() => {
|
|
||||||
this.getAutoComplateList();
|
|
||||||
this.typingTimer = undefined;
|
|
||||||
}, this.doneTypingInterval);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
setInputFocus() {
|
|
||||||
this.inputfocused = true;
|
|
||||||
// this.inputPopupfocused=false
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* شروع جستجو را کنترل میکند.
|
|
||||||
* @event prevSearchStart
|
|
||||||
*/
|
|
||||||
prevSearchStart(event) {
|
|
||||||
if (
|
|
||||||
this.isLastKeyCodeArrow &&
|
|
||||||
event.keyCode === 13 &&
|
|
||||||
this.inputPopupState != 0
|
|
||||||
) {
|
|
||||||
this.selectAutocomplate2();
|
|
||||||
this.isLastKeyCodeArrow = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.tagLiSelected = null;
|
|
||||||
this.inputPopupState = 0;
|
|
||||||
this.addHistorySearch(this.localTextSearch);
|
|
||||||
|
|
||||||
let tt = myEncodeQuery(this.localTextSearch);
|
|
||||||
this.$emit("onSearchStart", tt);
|
|
||||||
// this.searchStart(tt);
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
*نمایش سابقه جستجو.
|
|
||||||
*/
|
|
||||||
showHisory() {
|
|
||||||
setTimeout(() => {
|
|
||||||
if (this.localTextSearch == "") this.inputPopupState = 1;
|
|
||||||
else {
|
|
||||||
this.inputPopupState = 0;
|
|
||||||
this.tagLiSelected = null;
|
|
||||||
}
|
|
||||||
}, 100);
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* کنترل کلیکهای خارج از المان.
|
|
||||||
*/
|
|
||||||
keyupdiv(event) {
|
|
||||||
// 13:enter
|
|
||||||
// 8:backspace
|
|
||||||
if (this.inputfocused == false) return;
|
|
||||||
if (this.inputPopupState == 0 || this.inputPopupState == 2) return;
|
|
||||||
var el = "";
|
|
||||||
el =
|
|
||||||
this.inputPopupState == 1
|
|
||||||
? this.$refs["his_ul"]
|
|
||||||
: this.$refs["auto_complate_ul"];
|
|
||||||
|
|
||||||
if (!el || !el.firstChild) return;
|
|
||||||
|
|
||||||
const selectItem = (item) => {
|
|
||||||
this.tagLiSelected = item;
|
|
||||||
this.tagLiSelected?.classList.add("selected");
|
|
||||||
this.tagLiSelected?.focus();
|
|
||||||
};
|
|
||||||
|
|
||||||
// 40: arrow down
|
|
||||||
// 38: arrow up
|
|
||||||
if (this.inputfocused == true && event.keyCode === 40) {
|
|
||||||
if (this.tagLiSelected) {
|
|
||||||
this.tagLiSelected?.classList.remove("selected");
|
|
||||||
const next = this.tagLiSelected?.nextSibling || el.firstChild;
|
|
||||||
selectItem(next);
|
|
||||||
} else {
|
|
||||||
selectItem(el?.firstChild);
|
|
||||||
}
|
|
||||||
} else if (this.inputfocused == true && event.keyCode === 38) {
|
|
||||||
if (this.tagLiSelected) {
|
|
||||||
this.tagLiSelected?.classList.remove("selected");
|
|
||||||
const prev = this.tagLiSelected?.previousSibling || el.lastChild;
|
|
||||||
selectItem(prev);
|
|
||||||
} else {
|
|
||||||
selectItem(el?.lastChild);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 46: delete
|
|
||||||
else if (this.inputfocused == true && event.keyCode === 46) {
|
|
||||||
let index = this.tagLiSelected?.getAttribute("data-key");
|
|
||||||
|
|
||||||
this.removeHistorySearch(index);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onClickOutside() {
|
|
||||||
if (this.inputPopupState == 1 || this.inputPopupState == 3) {
|
|
||||||
this.inputPopupState = 0;
|
|
||||||
this.tagLiSelected = null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selectAutocomplate(item) {
|
|
||||||
this.tagLiSelected = null;
|
|
||||||
this.inputPopupState = 0;
|
|
||||||
this.localTextSearch = item;
|
|
||||||
|
|
||||||
this.$emit("onSearchStart", this.localTextSearch);
|
|
||||||
// this.$emit("onSearchStart", {
|
|
||||||
// textSearch: this.localTextSearch,
|
|
||||||
// searchItem: item,
|
|
||||||
// });
|
|
||||||
},
|
|
||||||
|
|
||||||
selectHistorySearch(item) {
|
|
||||||
this.localTextSearch = item;
|
|
||||||
this.$emit("onSearchStart", this.localTextSearch);
|
|
||||||
},
|
|
||||||
|
|
||||||
removeHistorySearch(x) {
|
|
||||||
this.tagLiSelected = null;
|
|
||||||
this.historySearch.splice(x, 1);
|
|
||||||
this.saveHistorySearch();
|
|
||||||
},
|
|
||||||
saveHistorySearch() {
|
|
||||||
const parsed = JSON.stringify(this.historySearch);
|
|
||||||
window.localStorage.setItem([this.historySearchRecent], parsed);
|
|
||||||
},
|
|
||||||
getHighlightAutocomplate(item) {
|
|
||||||
if (!item) return "";
|
|
||||||
|
|
||||||
let html = "";
|
|
||||||
|
|
||||||
let key = "title";
|
|
||||||
if (this.contentKey == "qasection" || this.contentKey == "rgsection") {
|
|
||||||
key = "qanon_title";
|
|
||||||
if (item?.highlight[key]) html = item.highlight[key][0];
|
|
||||||
if (!html) {
|
|
||||||
let key1 = key + ".ph";
|
|
||||||
if (item?.highlight[key1]) html = item.highlight[key1][0];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!html) {
|
|
||||||
let key1 = key + ".fa";
|
|
||||||
if (item?.highlight[key1]) html = item.highlight[key1][0];
|
|
||||||
}
|
|
||||||
|
|
||||||
let key2 = "ts_date";
|
|
||||||
if (item?._source[key2]) {
|
|
||||||
html += `<span style="color: #a7a098;"> - تاریخ: ${item._source[key2]}</span>`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.contentKey == "sanad") {
|
|
||||||
Object.values(item?.highlight).forEach((element, index) => {
|
|
||||||
html += element[0];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return html;
|
|
||||||
},
|
|
||||||
|
|
||||||
addHistorySearch(newSearch = "") {
|
|
||||||
if (newSearch == "") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var index = this.historySearch.indexOf(newSearch);
|
|
||||||
if (index != -1) {
|
|
||||||
this.historySearch.splice(index, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.historySearch.unshift(newSearch);
|
|
||||||
this.saveHistorySearch();
|
|
||||||
},
|
|
||||||
saveHistorySearch() {
|
|
||||||
const parsed = JSON.stringify(this.historySearch);
|
|
||||||
window.localStorage.setItem([this.historySearchRecent], parsed);
|
|
||||||
},
|
|
||||||
|
|
||||||
selectAutocomplate2(item) {
|
|
||||||
if (!item) {
|
|
||||||
if (this.localListAutocomplate.length) {
|
|
||||||
item = this.localListAutocomplate[this.tagLiSelected?.value];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let key = "title";
|
|
||||||
if (this.contentKey == "qasection" || this.contentKey == "rgsection")
|
|
||||||
key = "qanon_title";
|
|
||||||
|
|
||||||
this.inputfocused = false;
|
|
||||||
this.searchinput?.blur();
|
|
||||||
this.localTextSearch = item?._source[key];
|
|
||||||
|
|
||||||
this.$emit("onSearchStart", this.localTextSearch);
|
|
||||||
// this.$emit("onSearchStart", {
|
|
||||||
// textSearch: this.localTextSearch,
|
|
||||||
// searchItem: item,
|
|
||||||
// });
|
|
||||||
|
|
||||||
if (!item) {
|
|
||||||
this.localTextSearch = this.tagLiSelected?.innerText;
|
|
||||||
this.addHistorySearch(this.localTextSearch);
|
|
||||||
|
|
||||||
let tt = myEncodeQuery(this.localTextSearch);
|
|
||||||
|
|
||||||
this.$emit("onSearchStart", tt);
|
|
||||||
// this.$emit("onSearchStart", { textSearch: tt, searchItem: item });
|
|
||||||
}
|
|
||||||
|
|
||||||
this.inputPopupState = 0;
|
|
||||||
this.tagLiSelected = null;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.entityTheme {
|
|
||||||
.btn {
|
|
||||||
border-radius: 0.5rem 0 0 0.5rem !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.close {
|
|
||||||
svg {
|
|
||||||
font-size: 0.5em;
|
|
||||||
&:hover {
|
|
||||||
color: #ef4444 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.search-page__result.show {
|
|
||||||
border-radius: 0.5em !important;
|
|
||||||
}
|
|
||||||
.input-group-text {
|
|
||||||
background-color: #fff !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -84,7 +84,7 @@
|
||||||
<script>
|
<script>
|
||||||
import repoApi from "~/apis/repoApi";
|
import repoApi from "~/apis/repoApi";
|
||||||
import { mapState } from "pinia";
|
import { mapState } from "pinia";
|
||||||
import { useEntityStore } from "~/stores/entityStore";
|
import { useCommonStore } from "~/stores/commonStore";
|
||||||
|
|
||||||
import SelectComponentDefault from "~/components/SelectComponentDefault.vue";
|
import SelectComponentDefault from "~/components/SelectComponentDefault.vue";
|
||||||
import SelectComponent from "~/components/SelectComponent.vue";
|
import SelectComponent from "~/components/SelectComponent.vue";
|
||||||
|
@ -152,7 +152,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useEntityStore, [
|
...mapState(useCommonStore, [
|
||||||
// "selectedItemEntityGetter",
|
// "selectedItemEntityGetter",
|
||||||
"activeTabGetter",
|
"activeTabGetter",
|
||||||
]),
|
]),
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
<template>
|
|
||||||
<main :class="$route.name">
|
|
||||||
<the-sidebar
|
|
||||||
:showUserAvatar="true"
|
|
||||||
:menu="$attrs.menu"
|
|
||||||
@statusPag="statusPag"
|
|
||||||
></the-sidebar>
|
|
||||||
|
|
||||||
<section
|
|
||||||
class="main-page__content"
|
|
||||||
:class="{ expanded: !isSidebarCollapsed }"
|
|
||||||
>
|
|
||||||
<slot name="named-slot"></slot>
|
|
||||||
<slot></slot>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// import { mapActions, mapState } from "pinia";
|
|
||||||
// import { useCommonStore } from "~/stores/commonStore";
|
|
||||||
import {clearBodyClass} from "@manuals/utilities"
|
|
||||||
|
|
||||||
export default {
|
|
||||||
beforeMount() {
|
|
||||||
clearBodyClass();
|
|
||||||
// this.uuid = Math.floor(Math.random() * 100);
|
|
||||||
// document.title = import.meta.env.VITE_SEARCH_PAGE_TITLE;
|
|
||||||
},
|
|
||||||
// mounted() {
|
|
||||||
// this.setBodyClass(this.$attrs.bodyClass);
|
|
||||||
// },
|
|
||||||
destroyed() {
|
|
||||||
clearBodyClass();
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
uuid: undefined,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
// methods: {
|
|
||||||
// ...mapActions(useCommonStore, ["setBodyClass"]),
|
|
||||||
// },
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
/*@import "../../assets/scss/projects/tahrir/tahrir";*/
|
|
||||||
/*@import "../../assets/scss/projects/list/list";*/
|
|
||||||
@import "../assets/search/scss/search";
|
|
||||||
|
|
||||||
.search-system .modal-backdrop.show {
|
|
||||||
display: block;
|
|
||||||
background-color: #0000003b;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,5 +1,5 @@
|
||||||
import apis from "~/apis/listApi";
|
import apis from "~/apis/listApi";
|
||||||
import { useListStore } from "~/stores/listStore";
|
import { useSearchStore } from "@search/stores/searchStore";
|
||||||
|
|
||||||
interface FormData {
|
interface FormData {
|
||||||
id: string | number;
|
id: string | number;
|
||||||
|
@ -48,7 +48,7 @@ export const moveFromFolderToFolder = async (
|
||||||
cloneId: string | number,
|
cloneId: string | number,
|
||||||
toId: string | number
|
toId: string | number
|
||||||
) => {
|
) => {
|
||||||
const myStore = useListStore();
|
const myStore = useSearchStore();
|
||||||
const formData = {
|
const formData = {
|
||||||
id: cloneId,
|
id: cloneId,
|
||||||
newparent: toId ?? 0,
|
newparent: toId ?? 0,
|
||||||
|
@ -59,7 +59,7 @@ export const moveFromFolderToFolder = async (
|
||||||
};
|
};
|
||||||
|
|
||||||
export const moveFromFolderToRoot = async (cloneId: string | number) => {
|
export const moveFromFolderToRoot = async (cloneId: string | number) => {
|
||||||
const myStore = useListStore();
|
const myStore = useSearchStore();
|
||||||
const formData = {
|
const formData = {
|
||||||
id: cloneId,
|
id: cloneId,
|
||||||
newparent: 0,
|
newparent: 0,
|
||||||
|
@ -73,7 +73,7 @@ export const moveFromRootToFolder = async (
|
||||||
cloneId: string | number,
|
cloneId: string | number,
|
||||||
toId: string | number
|
toId: string | number
|
||||||
) => {
|
) => {
|
||||||
const myStore = useListStore();
|
const myStore = useSearchStore();
|
||||||
const formData = {
|
const formData = {
|
||||||
id: cloneId,
|
id: cloneId,
|
||||||
newparent: toId ?? 0,
|
newparent: toId ?? 0,
|
||||||
|
@ -110,7 +110,7 @@ export const moveItem = async (formData: FormData) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const addItemToList = async (itemId: string, listId: string) => {
|
export const addItemToList = async (itemId: string, listId: string) => {
|
||||||
const myStore = useListStore();
|
const myStore = useSearchStore();
|
||||||
const payload = {
|
const payload = {
|
||||||
itemid: itemId,
|
itemid: itemId,
|
||||||
listid: listId,
|
listid: listId,
|
||||||
|
@ -144,7 +144,7 @@ export const updateOrder = async (
|
||||||
listArray: [],
|
listArray: [],
|
||||||
index: number
|
index: number
|
||||||
) => {
|
) => {
|
||||||
const myStore = useListStore();
|
const myStore = useSearchStore();
|
||||||
const payload = {
|
const payload = {
|
||||||
id: list.id,
|
id: list.id,
|
||||||
offset: type === "move-up" ? -1 : 1,
|
offset: type === "move-up" ? -1 : 1,
|
||||||
|
|
|
@ -12,10 +12,53 @@ const buildName = import.meta.env.VITE_BUILD_NAME;
|
||||||
let mainStyle = `~/assets/common/scss/${buildName}-styles.scss`;
|
let mainStyle = `~/assets/common/scss/${buildName}-styles.scss`;
|
||||||
|
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
|
hooks: {
|
||||||
|
"pages:extend"(pages) {
|
||||||
|
// Add custom routes
|
||||||
|
pages.push(
|
||||||
|
{
|
||||||
|
name: "search",
|
||||||
|
path: "/search",
|
||||||
|
file: "~/systems/search_ui/pages/search/index.vue",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "searchNavigation",
|
||||||
|
path: "/search/lists",
|
||||||
|
file: "~/systems/search_ui/pages/search/lists.vue",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "searchChart",
|
||||||
|
path: "/search/charts",
|
||||||
|
file: "~/systems/search_ui/pages/search/charts.vue",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "showEntity",
|
||||||
|
path: "/search/:key/:id/show",
|
||||||
|
file: "~/systems/search_ui/pages/search/(show)/[key]/[id]/index.vue",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "navigationView",
|
||||||
|
path: "/search/:key/:id/list",
|
||||||
|
file: "~/systems/search_ui/pages/search/(show)/[key]/[id]/index.vue",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "entityResearch",
|
||||||
|
path: "/search/:key/:id/research",
|
||||||
|
file: "~/systems/search_ui/pages/search/(show)/[key]/[id]/index.vue",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "entityResearch",
|
||||||
|
path: "/search/:key/:id/detail",
|
||||||
|
file: "~/systems/search_ui/pages/search/(show)/[key]/[id]/index.vue",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
nitro: {
|
nitro: {
|
||||||
compressPublicAssets: true,
|
compressPublicAssets: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
colorMode: {
|
colorMode: {
|
||||||
preference: "light",
|
preference: "light",
|
||||||
},
|
},
|
||||||
|
@ -128,6 +171,9 @@ export default defineNuxtConfig({
|
||||||
"@utils": "~/utils",
|
"@utils": "~/utils",
|
||||||
"@manuals": "~/manuals",
|
"@manuals": "~/manuals",
|
||||||
"@pages": "~/pages",
|
"@pages": "~/pages",
|
||||||
|
"@search": "~/systems/search_ui",
|
||||||
|
"@research": "~/systems/research_ui",
|
||||||
|
"@hadith": "~/systems/hadith_ui",
|
||||||
},
|
},
|
||||||
vite: {
|
vite: {
|
||||||
resolve: {},
|
resolve: {},
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<script setup lang="ts"></script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<h1>
|
|
||||||
About page.
|
|
||||||
</h1>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style module>
|
|
||||||
.red {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -2,9 +2,9 @@
|
||||||
<div class="pages access-page p-3">
|
<div class="pages access-page p-3">
|
||||||
<sub-header-with-select
|
<sub-header-with-select
|
||||||
@open-form="toggleRolesPanel()"
|
@open-form="toggleRolesPanel()"
|
||||||
|
|
||||||
:showProjectSelect="$attrs.showProjectSelect"
|
:showProjectSelect="$attrs.showProjectSelect"
|
||||||
title="تنظیم دسترسی کاربران">
|
title="تنظیم دسترسی کاربران"
|
||||||
|
>
|
||||||
<!-- <button-->
|
<!-- <button-->
|
||||||
<!-- @click="toggleRolesPanel()"-->
|
<!-- @click="toggleRolesPanel()"-->
|
||||||
<!-- class="btn btn-outline-primary position-relative"-->
|
<!-- class="btn btn-outline-primary position-relative"-->
|
||||||
|
@ -17,106 +17,132 @@
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-borderless table-hover">
|
<table class="table table-borderless table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<th colspan="12" class="px-0">
|
<tr>
|
||||||
<form class="table-search-form" role="search">
|
<th colspan="12" class="px-0">
|
||||||
<div class="form-group">
|
<form class="table-search-form" role="search">
|
||||||
<div class="input-group">
|
<div class="form-group">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group">
|
||||||
<span class="input-group-text">
|
<div class="input-group-prepend">
|
||||||
<svg class="" aria-hidden="true" focusable="false"
|
<span class="input-group-text">
|
||||||
data-prefix="fas" data-icon="search" role="img" xmlns="http://www.w3.org/2000/svg"
|
<svg
|
||||||
viewBox="0 0 512 512" data-fa-i2svg="">
|
class=""
|
||||||
<path fill="currentColor"
|
aria-hidden="true"
|
||||||
d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"></path></svg>
|
focusable="false"
|
||||||
</span>
|
data-prefix="fas"
|
||||||
|
data-icon="search"
|
||||||
|
role="img"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 512 512"
|
||||||
|
data-fa-i2svg=""
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"
|
||||||
|
></path>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
v-model="searchForm.query"
|
||||||
|
type="search"
|
||||||
|
required
|
||||||
|
class="form-control"
|
||||||
|
id="search-query"
|
||||||
|
placeholder="جستجو..."
|
||||||
|
name="search-query"
|
||||||
|
aria-label="جستجو در اسناد، عناوین و واژگان"
|
||||||
|
aria-describedby="basic-addon1"
|
||||||
|
size="50"
|
||||||
|
/>
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button
|
||||||
|
:class="{
|
||||||
|
'show-reset-btn': searchForm.query.length > 0,
|
||||||
|
}"
|
||||||
|
type="button"
|
||||||
|
class="input-group-text"
|
||||||
|
id="basic-addon1"
|
||||||
|
>
|
||||||
|
<i class="tavasi tavasi-Component-294--1"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input
|
</form>
|
||||||
v-model="searchForm.query"
|
</th>
|
||||||
type="search"
|
</tr>
|
||||||
required
|
|
||||||
class="form-control"
|
|
||||||
id="search-query"
|
|
||||||
placeholder="جستجو..."
|
|
||||||
name="search-query"
|
|
||||||
aria-label="جستجو در اسناد، عناوین و واژگان"
|
|
||||||
aria-describedby="basic-addon1"
|
|
||||||
size="50"
|
|
||||||
>
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button :class="{'show-reset-btn' : searchForm.query.length > 0}"
|
|
||||||
type="button"
|
|
||||||
class="input-group-text"
|
|
||||||
id="basic-addon1">
|
|
||||||
<i class="tavasi tavasi-Component-294--1"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</th>
|
|
||||||
</thead>
|
</thead>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">#</th>
|
<th scope="col">#</th>
|
||||||
<th scope="col">نام</th>
|
<th scope="col">نام</th>
|
||||||
<th scope="col">نقش</th>
|
<th scope="col">نقش</th>
|
||||||
<th scope="col">تاریخ ثبت نام</th>
|
<th scope="col">تاریخ ثبت نام</th>
|
||||||
<th scope="col">عملیات</th>
|
<th scope="col">عملیات</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<template v-if="userRoles.length">
|
<template v-if="userRoles.length">
|
||||||
<tr v-for="({user,...item},index) in userRoles"
|
<tr
|
||||||
:class="{'active': item.active ?? false }" :key="index">
|
v-for="({ user, ...item }, index) in userRoles"
|
||||||
<th scope="row">{{ index + 1 }}</th>
|
:class="{ active: item.active ?? false }"
|
||||||
<td>
|
:key="index"
|
||||||
<div class="user-info">
|
>
|
||||||
<div class="user-info-avatar">
|
<th scope="row">{{ index + 1 }}</th>
|
||||||
<img :src="userAvatar(user)" :alt="fullName(user)">
|
<td>
|
||||||
|
<div class="user-info">
|
||||||
|
<div class="user-info-avatar">
|
||||||
|
<img :src="userAvatar(user)" :alt="fullName(user)" />
|
||||||
|
</div>
|
||||||
|
<div class="user-info-details">
|
||||||
|
<p class="name">
|
||||||
|
{{ fullName(user) }}
|
||||||
|
</p>
|
||||||
|
<p class="username">
|
||||||
|
@{{ user.username ?? "بدون نام کاربری" }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-info-details">
|
</td>
|
||||||
<p class="name">
|
<td>
|
||||||
{{ fullName(user) }}
|
<span>{{ item.role_name ?? "--" }}</span>
|
||||||
</p>
|
</td>
|
||||||
<p class="username">
|
<td>
|
||||||
@{{ user.username ?? 'بدون نام کاربری' }}
|
<span
|
||||||
</p>
|
>از
|
||||||
</div>
|
{{ convertUnixToPersianDateTime(item.created_at) }}</span
|
||||||
</div>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td><span>{{ item.role_name ?? '--' }}</span></td>
|
<td>
|
||||||
<td><span>از {{ convertUnixToPersianDateTime(item.created_at) }}</span></td>
|
<button
|
||||||
<td>
|
@click="toggleRolesPanel(index)"
|
||||||
<button @click="toggleRolesPanel(index)" title="ویرایش"
|
title="ویرایش"
|
||||||
class="btn edit-btn"
|
class="btn edit-btn"
|
||||||
data-bs-toggle="modal"
|
data-bs-toggle="modal"
|
||||||
data-bs-target="#edit-paper">
|
data-bs-target="#edit-paper"
|
||||||
<i class="tavasi tavasi-Component-242--1"></i>
|
>
|
||||||
</button>
|
<i class="tavasi tavasi-Component-242--1"></i>
|
||||||
<!-- <button @click="deleteItem(item.id)" title="حذف"-->
|
</button>
|
||||||
<!-- class="btn delete-btn"-->
|
<!-- <button @click="deleteItem(item.id)" title="حذف"-->
|
||||||
<!-- type="button"-->
|
<!-- class="btn delete-btn"-->
|
||||||
<!-- >-->
|
<!-- type="button"-->
|
||||||
<!-- <img class="" src="@assets/common/img/Component 295 – 1.svg" alt="حذف"/>-->
|
<!-- >-->
|
||||||
<!-- </button>-->
|
<!-- <img class="" src="@assets/common/img/Component 295 – 1.svg" alt="حذف"/>-->
|
||||||
</td>
|
<!-- </button>-->
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
</template>
|
||||||
<table-no-data v-else></table-no-data>
|
<table-no-data v-else></table-no-data>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="side-panel" v-if="showPanel">
|
<div class="side-panel" v-if="showPanel">
|
||||||
<div class="side-panel-header">
|
<div class="side-panel-header">
|
||||||
<h6 class="">
|
<h6 class="">مدیریت نقش ها</h6>
|
||||||
مدیریت نقش ها
|
|
||||||
</h6>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="side-panel-content ">
|
<div class="side-panel-content">
|
||||||
<!-- <div class="mb-5">-->
|
<!-- <div class="mb-5">-->
|
||||||
<!-- <label for="role_id">انتخاب بخش</label>-->
|
<!-- <label for="role_id">انتخاب بخش</label>-->
|
||||||
<!-- <select @change="getUserPermission()" name="role_id" id="role_id"-->
|
<!-- <select @change="getUserPermission()" name="role_id" id="role_id"-->
|
||||||
|
@ -133,20 +159,15 @@
|
||||||
<!-- </select>-->
|
<!-- </select>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
<accordion
|
<accordion v-if="user_id" :user_id="user_id"></accordion>
|
||||||
v-if="user_id"
|
|
||||||
:user_id="user_id"
|
|
||||||
></accordion>
|
|
||||||
<div class="side-panel-footer mt-4">
|
<div class="side-panel-footer mt-4">
|
||||||
<div>
|
<div></div>
|
||||||
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
@click.prevent="showPanel = false"
|
@click.prevent="showPanel = false"
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
data-dismiss="modal"
|
data-dismiss="modal"
|
||||||
>
|
>
|
||||||
بستن
|
بستن
|
||||||
</button>
|
</button>
|
||||||
|
@ -161,29 +182,25 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import apis from "@permission/permitApi";
|
import apis from "@permission/permitApi";
|
||||||
import {mapGetters} from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name:"UserAccessCustomization",
|
name: "UserAccessCustomization",
|
||||||
components: {
|
components: {
|
||||||
BreadCrumb: () =>
|
BreadCrumb: () => import("@components/BreadCrumb.vue"),
|
||||||
import( "@components/BreadCrumb.vue"),
|
Share: () => import("@view/modal/Share.vue"),
|
||||||
Share: () =>
|
Accordion: () => import("@permission/components/Accordion.vue"),
|
||||||
import( "@view/modal/Share.vue"),
|
|
||||||
Accordion: () =>
|
|
||||||
import( "@permission/components/Accordion.vue"),
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["projectGetter"])
|
...mapGetters(["projectGetter"]),
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
items: {
|
items: {
|
||||||
default() {
|
default() {
|
||||||
return {}
|
return {};
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -205,8 +222,8 @@ export default {
|
||||||
editMode: false,
|
editMode: false,
|
||||||
|
|
||||||
searchForm: {
|
searchForm: {
|
||||||
query: '',
|
query: "",
|
||||||
replaceWith: '',
|
replaceWith: "",
|
||||||
wholeWord: false,
|
wholeWord: false,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -217,30 +234,23 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
fullName(user) {
|
fullName(user) {
|
||||||
if (user.name && user.lastname)
|
if (user.name && user.lastname) return user.name + " " + user.lastname;
|
||||||
return user.name + ' ' + user.lastname;
|
else if (user.name && !user.lastname) return user.name;
|
||||||
else if (user.name && !user.lastname)
|
else if (!user.name && user.lastname) return user.lastname;
|
||||||
return user.name;
|
return "بدون نام";
|
||||||
else if (!user.name && user.lastname)
|
|
||||||
return user.lastname;
|
|
||||||
return 'بدون نام';
|
|
||||||
},
|
|
||||||
deleteItem() {
|
|
||||||
},
|
},
|
||||||
|
deleteItem() {},
|
||||||
getUserRole() {
|
getUserRole() {
|
||||||
ApiService.formData(
|
ApiService.formData(apis.permissions.listUserRole, {
|
||||||
apis.permissions.listUserRole,
|
project_id: this.projectGetter?.id,
|
||||||
{
|
})
|
||||||
project_id: this.projectGetter?.id
|
.then((response) => {
|
||||||
})
|
this.userRoles = response.data.data;
|
||||||
.then((response) => {
|
})
|
||||||
this.userRoles = response.data.data;
|
.catch((err) => {})
|
||||||
})
|
.finally(() => {
|
||||||
.catch((err) => {
|
this.loading = false;
|
||||||
})
|
});
|
||||||
.finally(() => {
|
|
||||||
this.loading = false;
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
save() {
|
save() {
|
||||||
|
@ -248,17 +258,19 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleRolesPanel(userRolesIndex = 0) {
|
toggleRolesPanel(userRolesIndex = 0) {
|
||||||
this.getSections().then(res => {
|
this.getSections().then((res) => {
|
||||||
this.sections = res.data.data;
|
this.sections = res.data.data;
|
||||||
|
|
||||||
this.role_id = this.userRoles[userRolesIndex].role_id ?? undefined;
|
this.role_id = this.userRoles[userRolesIndex].role_id ?? undefined;
|
||||||
this.user_id = this.userRoles[userRolesIndex].user.id ?? undefined;
|
this.user_id = this.userRoles[userRolesIndex].user.id ?? undefined;
|
||||||
|
|
||||||
this.showPanel = true;
|
this.showPanel = true;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
getSections() {
|
getSections() {
|
||||||
return ApiService.formData(apis.sections.list, {project_id: this.projectGetter?.id})
|
return ApiService.formData(apis.sections.list, {
|
||||||
|
project_id: this.projectGetter?.id,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
collapseAllPanels() {
|
collapseAllPanels() {
|
||||||
|
@ -277,7 +289,6 @@ export default {
|
||||||
this.typingTimer = setTimeout(() => {
|
this.typingTimer = setTimeout(() => {
|
||||||
this.highLight();
|
this.highLight();
|
||||||
}, this.doneTypingInterval);
|
}, this.doneTypingInterval);
|
||||||
|
|
||||||
},
|
},
|
||||||
onKeyDown() {
|
onKeyDown() {
|
||||||
clearTimeout(this.typingTimer);
|
clearTimeout(this.typingTimer);
|
||||||
|
@ -291,12 +302,9 @@ export default {
|
||||||
projectGetter() {
|
projectGetter() {
|
||||||
this.showPanel = false;
|
this.showPanel = false;
|
||||||
this.getUserRole();
|
this.getUserRole();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss"></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -166,7 +166,6 @@
|
||||||
import { useCommonStore } from "~/stores/commonStore";
|
import { useCommonStore } from "~/stores/commonStore";
|
||||||
import { mapState, mapActions } from "pinia";
|
import { mapState, mapActions } from "pinia";
|
||||||
import favoriteApi from "~/apis/favoriteApi";
|
import favoriteApi from "~/apis/favoriteApi";
|
||||||
import searchApi from "~/apis/searchApi";
|
|
||||||
import { useFavoriteStore } from "~/stores/favoriteStore";
|
import { useFavoriteStore } from "~/stores/favoriteStore";
|
||||||
import { useAuthStore } from "~/stores/authStore";
|
import { useAuthStore } from "~/stores/authStore";
|
||||||
import { clearBodyClass } from "@manuals/utilities";
|
import { clearBodyClass } from "@manuals/utilities";
|
||||||
|
@ -369,7 +368,7 @@ export default {
|
||||||
async getSchemas() {
|
async getSchemas() {
|
||||||
try {
|
try {
|
||||||
const { $api } = useNuxtApp();
|
const { $api } = useNuxtApp();
|
||||||
const res = await $api(searchApi.schema.list, {
|
const res = await $api(favoriteApi.schema.list, {
|
||||||
baseURL: import.meta.env.VITE_REPO_BASE_URL,
|
baseURL: import.meta.env.VITE_REPO_BASE_URL,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: {
|
body: {
|
||||||
|
@ -389,7 +388,7 @@ export default {
|
||||||
} catch (err) {}
|
} catch (err) {}
|
||||||
|
|
||||||
// this.httpService
|
// this.httpService
|
||||||
// .postRequest(searchApi.schema.list, {
|
// .postRequest(favoriteApi.schema.list, {
|
||||||
// organ: "public",
|
// organ: "public",
|
||||||
// system: "favorite",
|
// system: "favorite",
|
||||||
// build_state: this.buildState(),
|
// build_state: this.buildState(),
|
||||||
|
|
|
@ -160,7 +160,6 @@
|
||||||
import { useCommonStore } from "~/stores/commonStore";
|
import { useCommonStore } from "~/stores/commonStore";
|
||||||
import { mapState, mapActions } from "pinia";
|
import { mapState, mapActions } from "pinia";
|
||||||
import favoriteApi from "~/apis/favoriteApi";
|
import favoriteApi from "~/apis/favoriteApi";
|
||||||
import searchApi from "~/apis/searchApi";
|
|
||||||
import { useFavoriteStore } from "~/stores/favoriteStore";
|
import { useFavoriteStore } from "~/stores/favoriteStore";
|
||||||
import { useAuthStore } from "~/stores/authStore";
|
import { useAuthStore } from "~/stores/authStore";
|
||||||
import { clearBodyClass } from "@manuals/utilities";
|
import { clearBodyClass } from "@manuals/utilities";
|
||||||
|
@ -350,7 +349,7 @@ export default {
|
||||||
async getSchemas() {
|
async getSchemas() {
|
||||||
try {
|
try {
|
||||||
const { $api } = useNuxtApp();
|
const { $api } = useNuxtApp();
|
||||||
const res = await $api(searchApi.schema.list, {
|
const res = await $api(favoriteApi.schema.list, {
|
||||||
baseURL: import.meta.env.VITE_REPO_BASE_URL,
|
baseURL: import.meta.env.VITE_REPO_BASE_URL,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: {
|
body: {
|
||||||
|
@ -370,7 +369,7 @@ export default {
|
||||||
} catch (err) {}
|
} catch (err) {}
|
||||||
|
|
||||||
// this.httpService
|
// this.httpService
|
||||||
// .postRequest(searchApi.schema.list, {
|
// .postRequest(favoriteApi.schema.list, {
|
||||||
// organ: "public",
|
// organ: "public",
|
||||||
// system: "favorite",
|
// system: "favorite",
|
||||||
// build_state: buildState(),
|
// build_state: buildState(),
|
||||||
|
|
|
@ -102,7 +102,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { mapActions, mapState } from "pinia";
|
import { mapActions, mapState } from "pinia";
|
||||||
import { useCommonStore } from "~/stores/commonStore";
|
import { useCommonStore } from "~/stores/commonStore";
|
||||||
import { useEntityStore } from "~/stores/entityStore";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -145,12 +144,10 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useCommonStore, ["isShowHilightGetter"]),
|
...mapState(useCommonStore, ["isShowHilightGetter",'diffTypeGetter']),
|
||||||
...mapState(useEntityStore, ["diffTypeGetter"]),
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(useCommonStore, ["isShowHilightSetter"]),
|
...mapActions(useCommonStore, ["isShowHilightSetter","diffTypeSetter"]),
|
||||||
...mapActions(useEntityStore, ["diffTypeSetter"]),
|
|
||||||
switchViewMode(viewMode) {
|
switchViewMode(viewMode) {
|
||||||
this.viewMode = viewMode;
|
this.viewMode = viewMode;
|
||||||
if (viewMode == "show") this.isShowHilightSetter(true);
|
if (viewMode == "show") this.isShowHilightSetter(true);
|
||||||
|
|
|
@ -2,8 +2,7 @@ import { defineStore } from "pinia";
|
||||||
import { useAuthStore } from "./authStore";
|
import { useAuthStore } from "./authStore";
|
||||||
import permitApis from "~/apis/permitApi";
|
import permitApis from "~/apis/permitApi";
|
||||||
import authApi from "~/apis/authApi";
|
import authApi from "~/apis/authApi";
|
||||||
import {useStorage} from "@vueuse/core";
|
import { useStorage } from "@vueuse/core";
|
||||||
|
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
JahatSection,
|
JahatSection,
|
||||||
|
@ -21,11 +20,21 @@ import type {
|
||||||
Pagination,
|
Pagination,
|
||||||
} from "~/types/commonTypes";
|
} from "~/types/commonTypes";
|
||||||
|
|
||||||
|
import type { researchTerms } from "~/types/researchTypes";
|
||||||
|
import type { ActiveEntityViewSchema, ActiveTab } from "~/types/entityType";
|
||||||
|
|
||||||
export const useCommonStore = defineStore("commonStore", {
|
export const useCommonStore = defineStore("commonStore", {
|
||||||
persist: {
|
persist: {
|
||||||
storage: piniaPluginPersistedstate.localStorage()
|
storage: piniaPluginPersistedstate.localStorage(),
|
||||||
},
|
},
|
||||||
state: () => ({
|
state: () => ({
|
||||||
|
diffType: undefined,
|
||||||
|
|
||||||
|
activeTab: undefined as ActiveTab | undefined,
|
||||||
|
activeEntityViewSchema: undefined as ActiveEntityViewSchema | undefined,
|
||||||
|
|
||||||
|
researchTerms: undefined as researchTerms | undefined,
|
||||||
|
|
||||||
count: 0 as number,
|
count: 0 as number,
|
||||||
name: "" as string,
|
name: "" as string,
|
||||||
jahatSection: [] as JahatSection,
|
jahatSection: [] as JahatSection,
|
||||||
|
@ -73,6 +82,19 @@ export const useCommonStore = defineStore("commonStore", {
|
||||||
sidebarMenu: {},
|
sidebarMenu: {},
|
||||||
}),
|
}),
|
||||||
getters: {
|
getters: {
|
||||||
|
diffTypeGetter(diffType) {
|
||||||
|
return diffType;
|
||||||
|
},
|
||||||
|
activeTabGetter(state) {
|
||||||
|
return state.activeTab;
|
||||||
|
},
|
||||||
|
activeEntityViewSchemaGetter(state) {
|
||||||
|
return state.activeEntityViewSchema;
|
||||||
|
},
|
||||||
|
|
||||||
|
researchTermsGetter(state) {
|
||||||
|
return state.researchTerms;
|
||||||
|
},
|
||||||
doubleCount: (state) => state.count * 2,
|
doubleCount: (state) => state.count * 2,
|
||||||
loginMicroServiceName: () => import.meta.env.VITE_AUTH,
|
loginMicroServiceName: () => import.meta.env.VITE_AUTH,
|
||||||
messageMircroServiceName: () => import.meta.env.VITE_MESSAGE,
|
messageMircroServiceName: () => import.meta.env.VITE_MESSAGE,
|
||||||
|
@ -114,6 +136,19 @@ export const useCommonStore = defineStore("commonStore", {
|
||||||
isShowHilightGetter: (state) => state.isShowHilight,
|
isShowHilightGetter: (state) => state.isShowHilight,
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
diffTypeSetter(diffType) {
|
||||||
|
this.diffType = diffType;
|
||||||
|
},
|
||||||
|
activeTabSetter(activeTab = undefined) {
|
||||||
|
this.activeTab = activeTab;
|
||||||
|
},
|
||||||
|
activeEntityViewSchemaSetter(activeEntityViewSchema = undefined) {
|
||||||
|
this.activeEntityViewSchema = activeEntityViewSchema;
|
||||||
|
},
|
||||||
|
researchTermsSetter(researchTerms = undefined) {
|
||||||
|
this.researchTerms = researchTerms;
|
||||||
|
},
|
||||||
|
|
||||||
activeSchemaSetter(activeSchema: {}) {
|
activeSchemaSetter(activeSchema: {}) {
|
||||||
if (this.activeSchema) this.activeSchema = activeSchema;
|
if (this.activeSchema) this.activeSchema = activeSchema;
|
||||||
},
|
},
|
||||||
|
@ -318,7 +353,7 @@ export const useCommonStore = defineStore("commonStore", {
|
||||||
return await $fetch(permitApis.projects.list, {
|
return await $fetch(permitApis.projects.list, {
|
||||||
baseURL: baseUrl + apiName + import.meta.env.VITE_PERMIT_BASE_URL,
|
baseURL: baseUrl + apiName + import.meta.env.VITE_PERMIT_BASE_URL,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: useStorage('id_token','').value,
|
Authorization: useStorage("id_token", "").value,
|
||||||
},
|
},
|
||||||
method: "post",
|
method: "post",
|
||||||
})
|
})
|
||||||
|
|
1
systems/research_ui
Submodule
1
systems/research_ui
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 947af21d6d830d1402735381b009fe8553b1a18e
|
1
systems/search_ui
Submodule
1
systems/search_ui
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit e630a4a8ce226331c98ff742ac7dad1e2522e0af
|
Loading…
Reference in New Issue
Block a user