Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
synergy-components
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
synergy-components
Commits
115e7864
Commit
115e7864
authored
Sep 16, 2022
by
Samir Sadyhov
🤔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
доработка компонентов по реестрам, для компонента фильтра
parent
86cac93c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
24 deletions
+48
-24
constructor/components/Канбан-доска/Канбан-доска.js
constructor/components/Канбан-доска/Канбан-доска.js
+44
-13
constructor/components/записи реестра/записи реестра.js
constructor/components/записи реестра/записи реестра.js
+4
-11
No files found.
constructor/components/Канбан-доска/Канбан-доска.js
View file @
115e7864
...
@@ -29,12 +29,23 @@ const KanbanBoard = {
...
@@ -29,12 +29,23 @@ const KanbanBoard = {
columns
:
[],
columns
:
[],
searchString
:
null
,
searchString
:
null
,
filterSearchUrl
:
null
,
sum
:
null
,
sum
:
null
,
pageCode
:
null
,
pageCode
:
null
,
stringLength
:
50
,
stringLength
:
50
,
getUrlParam
:
function
(
column
){
getNextFieldNumber
:
function
(
url
)
{
let
p
=
url
.
substring
(
url
.
indexOf
(
'
?
'
)
+
1
).
split
(
'
&
'
);
p
=
p
.
map
(
x
=>
{
x
=
x
.
split
(
'
=
'
);
if
(
x
[
0
].
indexOf
(
'
field
'
)
!==
-
1
&&
x
[
0
]
!==
'
fields
'
)
return
x
[
0
];
}).
filter
(
x
=>
x
).
sort
();
if
(
p
.
length
)
return
Number
(
p
[
p
.
length
-
1
].
substring
(
5
))
+
1
;
return
''
;
},
getUrlParam
:
function
(
column
)
{
const
{
key
,
currentPage
,
countInPart
}
=
column
;
const
{
key
,
currentPage
,
countInPart
}
=
column
;
let
param
=
`?registryCode=
${
this
.
registryCode
}
`
;
let
param
=
`?registryCode=
${
this
.
registryCode
}
`
;
if
(
this
.
filterCode
)
param
+=
`&filterCode=
${
this
.
filterCode
}
`
;
if
(
this
.
filterCode
)
param
+=
`&filterCode=
${
this
.
filterCode
}
`
;
...
@@ -43,7 +54,17 @@ const KanbanBoard = {
...
@@ -43,7 +54,17 @@ const KanbanBoard = {
param
+=
`&fields=
${
this
.
fieldDict
}
`
;
param
+=
`&fields=
${
this
.
fieldDict
}
`
;
}
}
if
(
this
.
searchString
)
param
+=
`&searchString=
${
this
.
searchString
}
`
;
if
(
this
.
searchString
)
param
+=
`&searchString=
${
this
.
searchString
}
`
;
if
(
key
)
param
+=
`&field=
${
this
.
fieldDict
}
&condition=TEXT_EQUALS&key=
${
key
}
`
;
if
(
this
.
filterSearchUrl
)
{
param
+=
this
.
filterSearchUrl
;
if
(
key
)
{
let
next
=
this
.
getNextFieldNumber
(
this
.
filterSearchUrl
);
param
+=
`&field
${
next
}
=
${
this
.
fieldDict
}
&condition
${
next
}
=TEXT_EQUALS&key
${
next
}
=
${
key
}
`
;
}
}
else
{
if
(
key
)
param
+=
`&field=
${
this
.
fieldDict
}
&condition=TEXT_EQUALS&key=
${
key
}
`
;
}
param
+=
`&pageNumber=
${
currentPage
}
&countInPart=
${
countInPart
}
`
;
param
+=
`&pageNumber=
${
currentPage
}
&countInPart=
${
countInPart
}
`
;
return
param
;
return
param
;
},
},
...
@@ -61,7 +82,17 @@ const KanbanBoard = {
...
@@ -61,7 +82,17 @@ const KanbanBoard = {
let
param
=
`?registryCode=
${
this
.
registryCode
}
`
;
let
param
=
`?registryCode=
${
this
.
registryCode
}
`
;
if
(
this
.
filterCode
)
param
+=
`&filterCode=
${
this
.
filterCode
}
`
;
if
(
this
.
filterCode
)
param
+=
`&filterCode=
${
this
.
filterCode
}
`
;
if
(
this
.
searchString
)
param
+=
`&searchString=
${
this
.
searchString
}
`
;
if
(
this
.
searchString
)
param
+=
`&searchString=
${
this
.
searchString
}
`
;
if
(
key
)
param
+=
`&field=
${
this
.
fieldDict
}
&condition=TEXT_EQUALS&key=
${
key
}
`
;
if
(
this
.
filterSearchUrl
)
{
param
+=
this
.
filterSearchUrl
;
if
(
key
)
{
let
next
=
this
.
getNextFieldNumber
(
this
.
filterSearchUrl
);
param
+=
`&field
${
next
}
=
${
this
.
fieldDict
}
&condition
${
next
}
=TEXT_EQUALS&key
${
next
}
=
${
key
}
`
;
}
}
else
{
if
(
key
)
param
+=
`&field=
${
this
.
fieldDict
}
&condition=TEXT_EQUALS&key=
${
key
}
`
;
}
param
+=
`&fieldCode=
${
fieldCode
}
&countType=sum`
;
param
+=
`&fieldCode=
${
fieldCode
}
&countType=sum`
;
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
...
@@ -468,20 +499,20 @@ compContainer.off()
...
@@ -468,20 +499,20 @@ compContainer.off()
KanbanBoard
.
render
();
KanbanBoard
.
render
();
}).
on
(
'
searchInRegistry
'
,
e
=>
{
}).
on
(
'
searchInRegistry
'
,
e
=>
{
if
(
!
e
.
hasOwnProperty
(
'
eventParam
'
))
return
;
if
(
!
e
.
hasOwnProperty
(
'
eventParam
'
))
return
;
if
(
e
.
eventParam
.
searchString
&&
e
.
eventParam
.
searchString
!==
""
)
{
const
{
searchString
=
null
}
=
e
.
eventParam
;
KanbanBoard
.
searchString
=
e
.
eventParam
.
searchString
;
KanbanBoard
.
searchString
=
searchString
;
}
else
{
KanbanBoard
.
searchString
=
null
;
}
KanbanBoard
.
reset
();
KanbanBoard
.
reset
();
KanbanBoard
.
render
();
KanbanBoard
.
render
();
}).
on
(
'
changeFilterCode
'
,
e
=>
{
}).
on
(
'
changeFilterCode
'
,
e
=>
{
if
(
!
e
.
hasOwnProperty
(
'
eventParam
'
))
return
;
if
(
!
e
.
hasOwnProperty
(
'
eventParam
'
))
return
;
if
(
e
.
eventParam
.
filterCode
&&
e
.
eventParam
.
filterCode
!==
""
)
{
const
{
filterCode
=
null
}
=
e
.
eventParam
;
KanbanBoard
.
filterCode
=
e
.
eventParam
.
filterCode
;
KanbanBoard
.
filterCode
=
filterCode
;
}
else
{
KanbanBoard
.
reset
();
KanbanBoard
.
filterCode
=
null
;
KanbanBoard
.
render
();
}
}).
on
(
'
filterRegistryRows
'
,
e
=>
{
if
(
!
e
.
hasOwnProperty
(
'
eventParam
'
))
return
;
const
{
filterSearchUrl
}
=
e
.
eventParam
;
KanbanBoard
.
filterSearchUrl
=
filterSearchUrl
;
KanbanBoard
.
reset
();
KanbanBoard
.
reset
();
KanbanBoard
.
render
();
KanbanBoard
.
render
();
});
});
...
...
constructor/components/записи реестра/записи реестра.js
View file @
115e7864
...
@@ -598,22 +598,15 @@ compContainer.off()
...
@@ -598,22 +598,15 @@ compContainer.off()
})
})
.
on
(
'
searchInRegistry
'
,
e
=>
{
.
on
(
'
searchInRegistry
'
,
e
=>
{
if
(
!
e
.
hasOwnProperty
(
'
eventParam
'
))
return
;
if
(
!
e
.
hasOwnProperty
(
'
eventParam
'
))
return
;
if
(
e
.
eventParam
.
searchString
&&
e
.
eventParam
.
searchString
!==
""
)
{
const
{
searchString
=
null
}
=
e
.
eventParam
;
registryTable
.
searchString
=
e
.
eventParam
.
searchString
;
registryTable
.
searchString
=
searchString
;
}
else
{
registryTable
.
searchString
=
null
;
}
Paginator
.
currentPage
=
1
;
Paginator
.
currentPage
=
1
;
registryTable
.
createBody
();
registryTable
.
createBody
();
})
})
.
on
(
'
filterRegistryRows
'
,
e
=>
{
.
on
(
'
filterRegistryRows
'
,
e
=>
{
if
(
!
e
.
hasOwnProperty
(
'
eventParam
'
))
return
;
if
(
!
e
.
hasOwnProperty
(
'
eventParam
'
))
return
;
if
(
e
.
eventParam
.
filterSearchUrl
&&
e
.
eventParam
.
filterSearchUrl
!==
""
)
{
const
{
filterSearchUrl
=
null
}
=
e
.
eventParam
;
registryTable
.
filterSearchUrl
=
e
.
eventParam
.
filterSearchUrl
;
registryTable
.
filterSearchUrl
=
filterSearchUrl
;
}
else
{
registryTable
.
filterSearchUrl
=
null
;
return
;
}
Paginator
.
currentPage
=
1
;
Paginator
.
currentPage
=
1
;
registryTable
.
createBody
();
registryTable
.
createBody
();
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment