Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OKU-GIS
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhamad
OKU-GIS
Commits
88ae78e8
Commit
88ae78e8
authored
Jul 29, 2021
by
Manggar Mahardhika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
4bc3a43e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
API/views.py
API/views.py
+1
-1
templates/includes/js-o.html
templates/includes/js-o.html
+33
-0
No files found.
API/views.py
View file @
88ae78e8
...
...
@@ -104,7 +104,7 @@ def jalan(request):
print
(
kulon
,
lor
,
wetan
,
lor
,
wetan
,
kidul
,
kulon
,
kidul
,
kulon
,
lor
,
kulon
,
lor
,
wetan
,
lor
,
wetan
,
kidul
,
kulon
,
kidul
,
kulon
,
lor
)
with
conn
.
cursor
()
as
jalan
:
jalan
.
execute
(
"SELECT json_build_object ('type', 'Feature', 'properties', ( gj.ID,
namrjl, st_length ( gj.geom :: geography ), gj.lebar_jalan, gj.remark, gj.gambar,(SELECT ARRAY_AGG ( '' || id || ',' || tgl_perbaikan || '' order by tgl_perbaikan DESC ) FROM tbl_perbaikan WHERE id_object = gj.ID
) ), 'geometry', ST_AsGeoJSON ( st_intersection(gj.geom, 'SRID=4326;POLYGON((
%
s
%
s,
%
s
%
s,
%
s
%
s,
%
s
%
s,
%
s
%
s))') :: geometry ) :: json ) FROM geo_jalan gj WHERE st_intersects(gj.geom,'SRID=4326;POLYGON((
%
s
%
s,
%
s
%
s,
%
s
%
s,
%
s
%
s,
%
s
%
s))') GROUP BY gj.id"
%
(
kulon
,
lor
,
wetan
,
lor
,
wetan
,
kidul
,
kulon
,
kidul
,
kulon
,
lor
,
kulon
,
lor
,
wetan
,
lor
,
wetan
,
kidul
,
kulon
,
kidul
,
kulon
,
lor
))
jalan
.
execute
(
"SELECT json_build_object ('type', 'Feature', 'properties', ( gj.ID,
gj.namrjl, st_length ( gj.geom :: geography ), gj.lebar_jalan, gj.remark, gj.gambar,(SELECT ARRAY_AGG ( '' || id || ',' || tgl_perbaikan || '' order by tgl_perbaikan DESC ) FROM tbl_perbaikan WHERE id_object = gj.ID and type_id = 2
) ), 'geometry', ST_AsGeoJSON ( st_intersection(gj.geom, 'SRID=4326;POLYGON((
%
s
%
s,
%
s
%
s,
%
s
%
s,
%
s
%
s,
%
s
%
s))') :: geometry ) :: json ) FROM geo_jalan gj WHERE st_intersects(gj.geom,'SRID=4326;POLYGON((
%
s
%
s,
%
s
%
s,
%
s
%
s,
%
s
%
s,
%
s
%
s))') GROUP BY gj.id"
%
(
kulon
,
lor
,
wetan
,
lor
,
wetan
,
kidul
,
kulon
,
kidul
,
kulon
,
lor
,
kulon
,
lor
,
wetan
,
lor
,
wetan
,
kidul
,
kulon
,
kidul
,
kulon
,
lor
))
prov_res
=
jalan
.
fetchall
()
data
=
{
'gen'
:
prov_res
}
...
...
templates/includes/js-o.html
View file @
88ae78e8
...
...
@@ -1467,6 +1467,32 @@
}
else
{
var
path_img
=
`"static/image/bangunan/`
+
feature
.
administrasi
.
f9
+
`"`
}
var
list_history
=
feature
.
properties
.
f7
var
list_history_panel
=
``
for
(
var
i
=
0
;
i
<
list_history
.
length
;
i
++
)
{
var
dt_history
=
list_history
[
i
].
split
(
"
,
"
);
var
data_history
=
`<div class="form-group" style="margin-bottom:0px;">
<div class="row">
<label class="col-md-6">`
+
dt_history
[
1
]
+
`</label>
<a class="col-md-3" onclick="getjalanper(`
+
dt_history
[
0
]
+
`)"><i>View Ruas</i></a>
<a class="col-md-3" onclick="getdetailper(`
+
dt_history
[
0
]
+
`)" data-toggle="modal" data-target="#modal_detail"><i>View Detail</i></a>
</div>
</div>`
;
list_history_panel
+=
data_history
};
history
=
`<p class="text-center">
History Perbaikan
</p>
<br>
`
+
list_history_panel
+
`
<p class="text-center" style="margin-top: 10px;">
<a href="#" id='btn_perbaikan_jalan' class="btn btn-default"><i>Tambah History Perbaikan</i></a>
</p>`
;
content_edit
=
`
<div class="modal-dialog" style="width: max-content;height: max-content;">
<div class="modal-content">
...
...
@@ -1670,6 +1696,13 @@
</th>
</tr>
</div>
<div class="container">
<tr style="height: 40px;">
<th id="history_panel">
`
+
history
+
`
</th>
</tr>
</div>
</tbody>
</table>`
;
$
(
"
#isi_panel
"
).
html
(
content
);
...
...
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