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
1dc705f3
Commit
1dc705f3
authored
Aug 02, 2021
by
Manggar Mahardhika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
88ae78e8
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1751 additions
and
710 deletions
+1751
-710
API/urls.py
API/urls.py
+1
-0
API/views.py
API/views.py
+180
-30
Application/urls.py
Application/urls.py
+1
-0
Application/views.py
Application/views.py
+23
-3
OKU/settings.py
OKU/settings.py
+2
-2
templates/includes/content.html
templates/includes/content.html
+122
-0
templates/includes/css-o.html
templates/includes/css-o.html
+6
-0
templates/includes/insert.html
templates/includes/insert.html
+4
-3
templates/includes/js-m.html
templates/includes/js-m.html
+799
-91
templates/includes/js-o.html
templates/includes/js-o.html
+573
-573
templates/includes/modal.html
templates/includes/modal.html
+40
-8
No files found.
API/urls.py
View file @
1dc705f3
...
...
@@ -47,6 +47,7 @@ urlpatterns = [
path
(
'hapus'
,
views
.
hapus
,
name
=
'hapus'
),
path
(
'dkantor'
,
views
.
deletekantoradmin
,
name
=
'dkantor'
),
path
(
'change-tipe'
,
views
.
changetipe
,
name
=
'change-tipe'
),
path
(
'c_bangunan'
,
views
.
createbang
,
name
=
'c_bangunan'
),
path
(
'create-jalan'
,
views
.
createjalan
,
name
=
'create-jalan'
),
...
...
API/views.py
View file @
1dc705f3
This diff is collapsed.
Click to expand it.
Application/urls.py
View file @
1dc705f3
...
...
@@ -13,6 +13,7 @@ urlpatterns = [
path
(
'perbaikan'
,
views
.
perbaikanrenovasi
,
name
=
'perbaikan'
),
path
(
'loadDetail'
,
views
.
loadDetail
,
name
=
'loadDetail'
),
path
(
'input-perbaikan'
,
views
.
inpuperbaikan
,
name
=
'input-perbaikan'
),
path
(
'input-perbaikan-bang'
,
views
.
inputperbaikanbangunan
,
name
=
'input-perbaikan-bang'
),
path
(
'save-perbaikan'
,
views
.
saveperbaikan
,
name
=
'save-perbaikan'
),
path
(
'load-jl-by-id-detail'
,
views
.
loadbyiddetail
,
name
=
'load-jl-by-id-detail'
),
...
...
Application/views.py
View file @
1dc705f3
...
...
@@ -75,7 +75,8 @@ class Dashboard(generic.TemplateView):
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)"""
)
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
=
[]
...
...
@@ -464,7 +465,6 @@ class Dashboard(generic.TemplateView):
for
i
in
gardu_listrik_res
:
gardu_listrik_result
.
append
(
i
[
0
])
context
=
{
...
...
@@ -641,6 +641,26 @@ def inpuperbaikan(request):
respon
=
res_data
[
0
]
return
Response
(
respon
)
@
api_view
((
'GET'
,))
def
inputperbaikanbangunan
(
request
):
id
=
request
.
GET
.
get
(
'id_bangunan'
)
with
conn
.
cursor
()
as
data_per
:
data_per
.
execute
(
"""
SELECT
name,
type,
json_build_object ( 'type', 'Feature', 'geometry', ST_AsGeoJSON ( geom :: geometry ) :: json ),
ID
FROM
geo_bangunan
WHERE
ID =
%
s
"""
%
id
)
res_data
=
data_per
.
fetchall
()
respon
=
res_data
[
0
]
return
Response
(
respon
)
from
django.core.files.storage
import
FileSystemStorage
import
random
import
re
...
...
@@ -770,7 +790,7 @@ def saveperbaikan(request):
jenis_perbaikan
,
coordinat
))
conn
.
commit
()
data
=
"
Alhamdulilah
"
data
=
"
Sukses
"
info
=
"Data Telah Berhasil di Perbaharui"
code
=
0
...
...
OKU/settings.py
View file @
1dc705f3
...
...
@@ -87,8 +87,8 @@ DATABASES = {
'PASSWORD'
:
'khansia215758'
,
'HOST'
:
'30.10.20.102'
,
'PORT'
:
'5432'
,
#
'HOST': '103.126.28.66',
#
'PORT': '8082',
#'HOST': '103.126.28.66',
#'PORT': '8082',
}
}
...
...
templates/includes/content.html
View file @
1dc705f3
...
...
@@ -121,6 +121,128 @@
</div>
<div
class=
"content-wrapper mymodal"
id=
"input_perbaikan_bang"
style=
"display: none;padding: 60px;"
>
<div
class=
"content"
style=
"padding: 15px;max-height: 550px;"
>
<!-- Main charts -->
<div
class=
"panel panel-flat"
style=
"display: none;"
>
<div
class=
"panel-body"
style=
"padding-top: 10px;"
>
<div
class=
"tabbable"
>
<ul
class=
"nav nav-tabs nav-tabs-bottom nav-justified"
>
<button
type=
"button"
class=
"close"
onclick=
"destroyWraper()"
>
×
</button>
<li
class=
"active"
><a
href=
"#left-tab-input-coordinat"
data-toggle=
"tab"
>
Koordinat
</a></li>
<li><a
href=
"#right-tab-input-informasi"
data-toggle=
"tab"
>
Insert Informasi
</a></li>
</ul>
</div>
<div
class=
"tab-content"
>
<div
class=
"tab-pane active"
id=
"left-tab-input-coordinat"
>
<div
class=
"modal-body"
style=
"max-height: 450px;overflow-y: auto;"
>
<input
type=
"text"
class=
"hidden"
id=
"poly_create_input_bang"
>
<input
type=
"text"
class=
"hidden"
id=
"id_bang_perbaikan"
>
<input
type=
"text"
class=
"hidden"
id=
"type_id_bang"
>
<div
id=
"map-insert-bang"
style=
"height: 375px;width: 100%"
>
</div>
</div>
</div>
<div
class=
"tab-pane"
id=
"right-tab-input-informasi"
>
<div
class=
"modal-body"
style=
"max-height: 415px;overflow-y: auto;"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
<label>
Nama :
</label>
<input
type=
"text"
id=
"nama_bang"
class=
"form-control"
value=
""
>
</div>
<div
class=
"form-group"
>
<label>
Type :
</label>
<input
type=
"text"
id=
"type_bang"
class=
"form-control"
value=
""
>
</div>
<div
class=
"form-group"
>
<label>
Kelurahan :
</label>
<input
type=
"text"
id=
"kelurahan_bang"
class=
"form-control"
value=
""
>
</div>
<div
class=
"form-group"
>
<label>
Kecamatan :
</label>
<input
type=
"text"
id=
"kecamatan_bang"
class=
"form-control"
value=
""
>
</div>
<div
class=
"form-group"
>
<label>
Anggaran :
</label>
<input
type=
"text"
id=
"anggaran_bang"
class=
"form-control"
value=
""
>
</div>
<div
class=
"form-group"
>
<label>
Pihak yang Mengesahkan :
</label>
<input
type=
"text"
id=
"pihakpengesahan_bang"
class=
"form-control"
value=
""
>
</div>
<div
class=
"form-group"
>
<label>
Tanggal Disetujui :
</label>
<input
type=
"date"
id=
"tgldisetujui_bang"
class=
"form-control"
value=
""
>
</div>
<div
class=
"form-group"
>
<label>
Tanggal Mulai Perbaikan :
</label>
<input
type=
"date"
id=
"tglmulaiperbaikan_bang"
class=
"form-control"
value=
""
>
</div>
<div
class=
"form-group"
>
<label>
Tanggal Selesai Perbaikan :
</label>
<input
type=
"date"
id=
"tglselesaiperbaikan_bang"
class=
"form-control"
value=
""
>
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
<label>
Penanggung Jawab Lapangan :
</label>
<input
type=
"text"
id=
"pjlapangan_bang"
class=
"form-control"
value=
""
>
</div>
<div
class=
"form-group"
>
<label>
Kontraktor :
</label>
<input
type=
"text"
id=
"kontraktor_bang"
class=
"form-control"
value=
""
>
</div>
<!-- <div class="form-group">
<label>Panjang Jalan Keseluruhan :</label>
<input type="text" id="panjangjalanall" class="form-control" value="">
</div>
<div class="form-group">
<label>Panjang Jalan Perbaikan :</label>
<input type="text" id="panjangjalanperbaikan" class="form-control" value="">
</div>
<div class="form-group">
<label>Lebar Jalan Perbaikan :</label>
<input type="text" id="lebarjalanperbaikan" class="form-control" value="">
</div> -->
<div
class=
"form-group"
>
<label>
Jenis Perbaikan :
</label>
<input
type=
"text"
id=
"jenisperbaikan_bang"
class=
"form-control"
value=
""
>
</div>
<div
class=
"form-group"
>
<label>
Proposal (.pdf):
</label>
<input
type=
"file"
id=
"proposal_bang"
>
</div>
<div
class=
"form-group"
>
<label>
Bukti Selesai Perbaikan (.png/.jpg/.jpeg/):
</label>
<input
type=
"file"
id=
"buktiselesai_bang"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"panel-footer"
>
<button
type=
"button"
class=
"btn btn-info"
id=
"save-perbaikan_bang"
style=
"float: right; margin-right: 40px;"
>
SAVE
</button>
<button
type=
"button"
class=
"btn btn-link"
onclick=
"destroyWraper()"
style=
"float: right;"
>
Close
</button>
</div>
</div>
</div>
<!-- /main charts -->
</div>
<!-- editing kelurahan -->
<div
class=
"content-wrapper mymodal"
id=
"edit_kelurahan"
style=
"display: none;padding: 60px;"
>
<div
class=
"content"
style=
"padding: 15px;max-height: 550px;"
>
...
...
templates/includes/css-o.html
View file @
1dc705f3
...
...
@@ -143,6 +143,9 @@
#btn_edit_bangunan
{
display
:
none
;
}
#btn_delete_bangunan
{
display
:
none
;
}
#btn_edit_kelurahan
{
display
:
block
;
...
...
@@ -188,6 +191,9 @@
#btn_edit_adm
{
display
:
none
;
}
#btn_delete_adm
{
display
:
none
;
}
#btn_edit_rs
{
display
:
none
;
...
...
templates/includes/insert.html
View file @
1dc705f3
...
...
@@ -244,7 +244,7 @@
map_create_bangunan
.
on
(
L
.
Draw
.
Event
.
CREATED
,
function
(
e
)
{
var
layer
=
e
.
layer
;
$
(
"
#poly_create
"
).
empty
();
$
(
"
#poly_create
_bangunan
"
).
empty
();
var
type
=
e
.
layerType
;
var
layer
=
e
.
layer
;
...
...
@@ -262,7 +262,7 @@
}
}
window
.
thisBaseDrawPolygonLayer
=
layer
;
$
(
"
#poly_create
"
).
val
(
JSON
.
stringify
(
kordinat
));
$
(
"
#poly_create
_bangunan
"
).
val
(
JSON
.
stringify
(
kordinat
));
});
polygon_options
=
{
...
...
@@ -426,6 +426,7 @@
});
$
(
document
).
on
(
"
click
"
,
"
#create_save_jalan
"
,
function
(
e
)
{
data
=
new
FormData
()
...
...
@@ -470,7 +471,7 @@
$
(
document
).
on
(
"
click
"
,
"
#create_save_bangunan
"
,
function
(
e
)
{
var
polygin
=
$
(
'
#poly_create
'
).
val
();
var
polygin
=
$
(
'
#poly_create
_bangunan
'
).
val
();
var
name_poly
=
$
(
'
#name_create
'
).
val
();
var
info_poly
=
$
(
'
#info_create
'
).
val
();
var
alamat_poly
=
$
(
'
#alamat_create
'
).
val
();
...
...
templates/includes/js-m.html
View file @
1dc705f3
This diff is collapsed.
Click to expand it.
templates/includes/js-o.html
View file @
1dc705f3
This diff is collapsed.
Click to expand it.
templates/includes/modal.html
View file @
1dc705f3
...
...
@@ -126,6 +126,7 @@
<div
class=
"modal-body"
style=
"max-height: 450px;overflow-y: auto;"
>
<div
class=
"tab-pane has-padding"
id=
"panel-tab2"
>
<div
class=
"tab-pane"
id=
"bottom-justified-data"
>
<input
type=
"text"
name=
"idjalan"
id=
"idjalan"
class=
"form-control hidden"
value=
""
>
<div
class=
"tabbable"
>
<ul
class=
"nav nav-tabs nav-tabs-bottom nav-justified"
>
...
...
@@ -140,7 +141,7 @@
<div
class=
"form-group"
>
<label
class=
"col-lg-2 control-label"
style=
"margin-top:10px"
>
Image
</label>
<div
class=
"col-lg-9"
style=
"margin-top:10px"
>
<input
type=
"file"
id=
"img
bangun
an"
name=
"images[]"
multiple
accept=
"image/jpg,image/png,image/jpeg,image/gif"
>
<input
type=
"file"
id=
"img
jal
an"
name=
"images[]"
multiple
accept=
"image/jpg,image/png,image/jpeg,image/gif"
>
</div>
</div>
</div>
...
...
@@ -149,8 +150,8 @@
<div
class=
"row"
style=
"height: 337px;"
>
<input
type=
"text"
class=
"hidden"
name=
"coordinate
bangunan"
id=
"coordinatebangun
an"
value=
""
>
<input
type=
"text"
name=
"id
bangunan"
id=
"idbangun
an"
class=
"form-control hidden"
value=
""
disable
>
<input
type=
"text"
class=
"hidden"
name=
"coordinate
jalan"
id=
"coordinatejal
an"
value=
""
>
<input
type=
"text"
name=
"id
jalan"
id=
"idjal
an"
class=
"form-control hidden"
value=
""
disable
>
<table
style=
"margin-left: 50px;
width: 100vh;"
>
<tr>
...
...
@@ -199,7 +200,7 @@
<div
class=
"modal-footer "
>
<button
type=
"button"
class=
"btn btn-link"
onclick=
"destroyfade()"
data-dismiss=
"modal"
>
Close
</button>
<button
type=
"button"
id=
"btnsave
bangun
an"
class=
"btn btn-info"
>
Save changes
</button>
<button
type=
"button"
id=
"btnsave
jal
an"
class=
"btn btn-info"
>
Save changes
</button>
</div>
</div>
</div>
...
...
@@ -471,7 +472,7 @@
<div
class=
"row"
style=
"margin-top: 15px;"
>
<div
class=
"form-group"
>
<label
class=
"col-lg-3 control-label lbl-top"
style=
"margin-top: 15px;"
>
Tipe
Point
</label>
<label
class=
"col-lg-3 control-label lbl-top"
style=
"margin-top: 15px;"
>
Jenis
Point
</label>
<div
class=
"col-lg-9"
>
<select
style=
"border-bottom: 1px solid rgb(83, 83, 83) !important;"
id=
"tipe_point"
data-placeholder=
"select point.."
class=
"select-size-md"
>
<option
value=
"null"
selected
disabled
>
-- Pilih Jenis Point --
</option>
...
...
@@ -494,9 +495,11 @@
<div
class=
"row"
style=
"margin-top: 15px;"
>
<div
class=
"form-group"
>
<label
class=
"col-lg-3 control-label lbl-top"
style=
"margin-top: 15px;"
>
Informasi Bangunan
</label>
<label
class=
"col-lg-3 control-label lbl-top"
style=
"margin-top: 15px;"
>
Tipe Point
</label>
<div
class=
"col-lg-9"
>
<input
id=
"info_create_point"
type=
"text"
class=
"form-control"
value=
""
placeholder=
"Rumah/Gedung/Ruko/Pabrik/dsb"
required
>
<select
style=
"border-bottom: 1px solid rgb(83, 83, 83) !important;width: 220px;"
id=
"tipe_point_2"
data-placeholder=
"select point.."
class=
"select-size-md"
>
<option
value=
"null"
selected
disabled
>
-- Pilih Tipe Point --
</option>
</select>
</div>
</div>
</div>
...
...
@@ -577,4 +580,33 @@
</div>
</div>
</div>
</div>
\ No newline at end of file
</div>
<script>
$
(
"
#tipe_point
"
).
change
(
function
()
{
var
tipe
=
$
(
this
).
val
();
$
.
ajax
({
url
:
"
{% url 'api:change-tipe' %}
"
,
data
:
{
'
tipe
'
:
tipe
},
dataType
:
'
json
'
,
success
:
function
(
data
)
{
console
.
log
(
data
)
var
data_all_kab
=
[]
for
(
var
i
=
0
;
i
<
data
[
'
result
'
].
length
;
i
++
)
{
var
data_k
=
data
[
'
result
'
][
i
][
0
];
console
.
log
(
data_k
)
var
data_kab
=
`<option value="`
+
data_k
+
`">`
+
data_k
+
`</option>`
;
data_all_kab
.
push
(
data_kab
)
};
$
(
'
#tipe_point_2
'
).
html
(
`<option value="null" selected disabled>-- Pilih Tipe Point --</option>`
+
data_all_kab
);
}
});
});
</script>
\ No newline at end of file
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