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
893487ac
Commit
893487ac
authored
Nov 03, 2021
by
Manggar Mahardhika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
46257a7c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
18 deletions
+87
-18
API/__pycache__/urls.cpython-36.pyc
API/__pycache__/urls.cpython-36.pyc
+0
-0
API/__pycache__/views.cpython-36.pyc
API/__pycache__/views.cpython-36.pyc
+0
-0
API/urls.py
API/urls.py
+2
-0
API/views.py
API/views.py
+56
-2
templates/includes/js-m.html
templates/includes/js-m.html
+29
-16
No files found.
API/__pycache__/urls.cpython-36.pyc
View file @
893487ac
No preview for this file type
API/__pycache__/views.cpython-36.pyc
View file @
893487ac
No preview for this file type
API/urls.py
View file @
893487ac
...
...
@@ -81,7 +81,9 @@ urlpatterns = [
path
(
'load_point_id'
,
views
.
load_point_id
),
path
(
'edit_detail_poin'
,
views
.
edit_detail_poin
),
path
(
'dpoint'
,
views
.
dpoint
,
name
=
'dpoint'
),
path
(
'reloadpoint'
,
views
.
reload_point
,
name
=
'reloadpoint'
),
path
(
'download_perbaikan_data'
,
views
.
download_perbaikan_data
),
path
(
'search_list_perbaikan'
,
views
.
search_list_perbaikan
)
]
\ No newline at end of file
API/views.py
View file @
893487ac
...
...
@@ -3721,7 +3721,61 @@ def search_list_perbaikan(request):
rn = 1
AND ( gl.NAME ILIKE'{}
%
' OR tp.NAME ILIKE'{}
%
' OR tp.TYPE ILIKE'{}
%
' OR tp.anggaran ILIKE'{}
%
' )"""
.
format
(
v
,
v
,
v
,
v
))
search_list
=
list_s
.
fetchall
()
return
Response
(
search_list
)
@
api_view
((
'POST'
,))
def
reload_point
(
request
):
with
conn
.
cursor
()
as
kantor_administrasi
:
kantor_administrasi
.
execute
(
"""SELECT
json_build_object (
'type',
'Feature',
'administrasi',
(
A.namobj,
A.remark,
A.alamat,
A.luas_bangunan,
A.luas_tanah,
A.satuan_luas_bangunan,
A.satuan_luas_tanah,
A.gambar,
A.tinggi_bangunan,
A.perangkat,
A.tipe_gambar,
b.kabupaten,
c.kecamatan,
d.desa,
a.id,
(
SELECT ARRAY_AGG
( '' || ID || ',' || tgl_perbaikan || ',' || jenis_perbaikan || '' ORDER BY tgl_perbaikan DESC )
FROM
tbl_perbaikan
WHERE
id_object = A.ID
AND type_id = 1
)
),
'geometry',
ST_AsGeoJSON ( A.geom :: geometry ) :: json
)
FROM
geo_kantor_administrasi A
JOIN geo_prov_kab b ON st_intersects ( A.geom, b.geom )
JOIN geo_data_kecamatan c ON st_intersects(A.geom, c.geom)
join geo_data_kelurahan d on st_intersects(A.geom, d.geom)
WHERE a.is_deleted = 0"""
)
kantor_administrasi_res
=
kantor_administrasi
.
fetchall
()
kantor_administrasi_result
=
[]
for
i
in
kantor_administrasi_res
:
if
i
[
0
][
'administrasi'
][
'f16'
]
==
None
:
i
[
0
][
'administrasi'
][
'f16'
]
=
"None"
kantor_administrasi_result
.
append
(
i
[
0
])
context
=
{
'kantor_administrasi'
:
kantor_administrasi_result
,
}
return
(
context
)
\ No newline at end of file
templates/includes/js-m.html
View file @
893487ac
...
...
@@ -903,11 +903,24 @@
},
function
()
{
$
(
"
#modal_adm
"
).
modal
(
'
hide
'
);
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
'
hide
'
)
// location.reload();
// var checkBox = document.getElementById("knt_adm");
// document.getElementById("knt_adm").checked = true;
// newe(markeradm, geo_po_adm, checkBox)
// markeradm.remove()
// geo_po_adm.remove()
// valket()
location
.
reload
();
// $.ajax({
// url: "{% url 'api:reloadpoint' %}",
// data: data,
// dataType: 'json',
// type: 'POST',
// processData: false,
// contentType: false,
// success: function(data) {
// let rel = data
// geo_json_po_adm(data);
// var checkBox = document.getElementById("knt_adm");
// newe(markeradm, geo_po_adm, checkBox)
// }
// })
})
}
else
{
swal
({
...
...
@@ -988,7 +1001,7 @@
},
function
()
{
$
(
"
#modald_adm
"
).
modal
(
'
hide
'
);
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
'
hide
'
)
//
location.reload();
location
.
reload
();
})
}
else
{
swal
({
...
...
@@ -1404,7 +1417,7 @@
$
(
"
#modal_adm
"
).
modal
(
'
hide
'
);
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
'
hide
'
)
//
location.reload();
location
.
reload
();
})
}
else
{
swal
({
...
...
@@ -1818,7 +1831,7 @@
},
function
()
{
$
(
"
#modal_adm
"
).
modal
(
"
hide
"
);
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
'
hide
'
)
//
location.reload();
location
.
reload
();
})
}
else
{
swal
({
...
...
@@ -2217,7 +2230,7 @@
},
function
()
{
$
(
"
#modal_adm
"
).
modal
(
'
hide
'
);
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
'
hide
'
)
//
location.reload();
location
.
reload
();
})
}
else
{
swal
({
...
...
@@ -2739,7 +2752,7 @@
},
function
()
{
$
(
"
#modal_adm
"
).
modal
(
'
hide
'
);
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
'
hide
'
)
//
location.reload();
location
.
reload
();
})
}
else
{
swal
({
...
...
@@ -3227,7 +3240,7 @@
},
function
()
{
$
(
"
#modal_adm
"
).
modal
(
'
hide
'
);
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
'
hide
'
)
//
location.reload();
location
.
reload
();
})
}
else
{
swal
({
...
...
@@ -3602,7 +3615,7 @@
},
function
()
{
$
(
"
#modal_adm
"
).
modal
(
'
hide
'
);
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
'
hide
'
)
//
location.reload();
location
.
reload
();
})
}
else
{
swal
({
...
...
@@ -3997,7 +4010,7 @@
},
function
()
{
$
(
"
#modal_adm
"
).
modal
(
'
hide
'
);
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
'
hide
'
)
//
location.reload();
location
.
reload
();
})
}
else
{
swal
({
...
...
@@ -4385,7 +4398,7 @@
},
function
()
{
$
(
"
#modal_adm
"
).
modal
(
'
hide
'
);
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
'
hide
'
)
//
location.reload();
location
.
reload
();
})
}
else
{
swal
({
...
...
@@ -4774,7 +4787,7 @@
},
function
()
{
$
(
"
#modal_adm
"
).
modal
(
'
hide
'
);
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
'
hide
'
)
//
location.reload();
location
.
reload
();
})
}
else
{
swal
({
...
...
@@ -5174,7 +5187,7 @@
},
function
()
{
$
(
"
#modal_adm
"
).
modal
(
'
hide
'
);
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
'
hide
'
)
//
location.reload();
location
.
reload
();
})
}
else
{
swal
({
...
...
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