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
bd5668c7
Commit
bd5668c7
authored
Oct 07, 2021
by
Muhamad
Browse files
Options
Browse Files
Download
Plain Diff
modal all
parents
c5daf7f6
79b2e193
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1409 additions
and
391 deletions
+1409
-391
API/urls.py
API/urls.py
+4
-1
API/views.py
API/views.py
+120
-5
static/css/layout-style.css
static/css/layout-style.css
+49
-4
static/img/icon-1/contact_info.svg
static/img/icon-1/contact_info.svg
+15
-0
static/js/action.js
static/js/action.js
+385
-40
templates/includes/js-m.html
templates/includes/js-m.html
+81
-72
templates/includes/js-o.html
templates/includes/js-o.html
+44
-26
templates/includes/modal.html
templates/includes/modal.html
+167
-50
templates/includes/plugin.html
templates/includes/plugin.html
+3
-9
templates/includes/sidebar.html
templates/includes/sidebar.html
+241
-100
templates/layout/layout.html
templates/layout/layout.html
+300
-84
No files found.
API/urls.py
View file @
bd5668c7
...
...
@@ -73,5 +73,8 @@ urlpatterns = [
path
(
'deletejalan'
,
views
.
deletejalan
,
name
=
'hapus-jalan'
),
path
(
'search_spes'
,
views
.
search_spes
,
name
=
'search_spes'
),
path
(
'search_lanjut'
,
views
.
search_lanjut
,
name
=
'search_lanjut'
),
path
(
'load_point_id'
,
views
.
load_point_id
)
path
(
'load_point_id'
,
views
.
load_point_id
),
path
(
'edit_detail_poin'
,
views
.
edit_detail_poin
),
path
(
'download_perbaikan_data'
,
views
.
download_perbaikan_data
)
]
\ No newline at end of file
API/views.py
View file @
bd5668c7
...
...
@@ -62,7 +62,7 @@ def tuplah(request):
with
conn
.
cursor
()
as
desa
:
desa
.
execute
(
f
"SELECT json_build_object('type', 'Feature', 'legend', (a.id, a.legenda, st_area(a.geom::geography), a.gambar) ,'geometry', ST_AsGeoJSON( st_intersection(a.geom, b.geom):: geometry) :: json) from geo_tuplah a, geo_prov_kab b where b.kabupaten = 'OGAN KOMERING ULU'"
)
all
=
desa
.
fetchall
()
data
=
{
'tuplah'
:
all
}
return
Response
(
data
)
...
...
@@ -2876,7 +2876,7 @@ def user_data(request):
au.first_name,
au.last_name,
au.is_active,
au.last_login
,
DATE(au.last_login)
,
au.email,
ag.name,
au.is_staff,
...
...
@@ -2900,7 +2900,7 @@ def user_data(request):
au.first_name,
au.last_name,
au.is_active,
au.last_login
,
DATE(au.last_login)
,
au.email,
ag.name,
au.is_staff,
...
...
@@ -3362,7 +3362,7 @@ def load_point_id(request):
'type',
'Feature',
'properties',
(id, namobj, alamat, luas_bangunan, perangkat),
(id, namobj, alamat, luas_bangunan, perangkat
, gambar
),
'geometry',
ST_AsGeoJSON ( geom :: geometry ) :: json
)
...
...
@@ -3372,5 +3372,120 @@ def load_point_id(request):
id =
%
s
"""
%
(
dtb
,
id
))
poin
=
poi
.
fetchall
()
print
(
poin
)
context
=
{
'result'
:
poin
}
return
Response
(
context
)
\ No newline at end of file
return
Response
(
context
)
@
api_view
((
'POST'
,))
def
edit_detail_poin
(
request
):
idkantor
=
request
.
POST
.
get
(
'id'
)
namobj
=
request
.
POST
.
get
(
'namobj'
)
luat_tanah
=
request
.
POST
.
get
(
'luastanah'
)
gambar
=
request
.
POST
.
get
(
'gambar'
)
alamat
=
request
.
POST
.
get
(
'alamat'
)
dbp
=
request
.
POST
.
get
(
'db'
)
if
alamat
is
None
:
alamat
=
'alamat'
elif
alamat
==
''
:
alamat
=
'alamat'
else
:
alamat
=
request
.
POST
.
get
(
'alamat'
)
perangkat
=
request
.
POST
.
get
(
'perangkat'
)
if
perangkat
is
None
:
perangkat
=
'Bpk'
elif
perangkat
==
''
:
perangkat
=
'Bpk'
else
:
perangkat
=
request
.
POST
.
get
(
'perangkat'
)
point
=
request
.
POST
.
get
(
"point"
)
cood_edit
=
json
.
loads
(
point
)
co_edit
=
cood_edit
[
'geometry'
][
'coordinates'
]
file1
=
request
.
FILES
.
get
(
'file'
)
fss
=
FileSystemStorage
(
location
=
'/var/www/django/oku.khansia.co.id/static/img/image/'
)
try
:
format
=
(
file1
.
name
)
.
split
(
"."
)
num
=
random
.
randrange
(
1
,
10000000000000
)
namafile
=
f
"{namobj}_{num}.{format[-1:][0]}"
filename
=
fss
.
save
(
namafile
,
file1
)
# print(file.name)
url
=
fss
.
url
(
filename
)
except
:
namafile
=
gambar
with
conn
.
cursor
()
as
editka
:
editka
.
execute
(
"""update
%
s set geom = st_geomfromgeojson('{"type":"Point", "coordinates":
%
s, "crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'), namobj = '
%
s', luas_tanah =
%
s, perangkat = '
%
s', alamat = '
%
s', gambar = '
%
s' where id =
%
s"""
%
(
dbp
,
co_edit
,
namobj
,
luat_tanah
,
perangkat
,
alamat
,
namafile
,
idkantor
))
conn
.
commit
()
data
=
'SUCCESS'
info
=
'data telah diperbaharui'
status
=
0
respon
=
{
'data'
:
data
,
'info'
:
info
,
'status'
:
status
}
return
Response
(
respon
)
@
api_view
((
'GET'
,))
def
download_perbaikan_data
(
request
):
with
conn
.
cursor
()
as
tbl_p
:
tbl_p
.
execute
(
"""
SELECT
gl.NAME,
tp.name,
gj.remark,
st_length ( gj.geom :: geography ),
tp.tgl_pembuatan,
tp.tgl_perbaikan,
tp.tgl_selesai,
tp.anggaran,
tp.pj,
tp.pj_lapangan,
tp.kontraktor,
ST_AsGeoJSON ( tp.geom :: geometry ) :: json,
tp.pjg_perbaikan,
tp.lbr_perbaikan,
tp.id_object,
tp.id,
tp.proposal,
tp.bukti_selesai
FROM
tbl_perbaikan tp
JOIN geo_label gl ON gl.ID = tp.type_id
JOIN geo_jalan gj ON gj.ID = tp.id_object
ORDER BY
tp.id ASC
"""
)
tbl_per
=
tbl_p
.
fetchall
()
per_res
=
[]
for
rows
in
tbl_per
:
print
(
rows
)
datas
=
{
"id"
:
rows
[
15
],
"jenis_perbaikan"
:
rows
[
0
],
"nama"
:
rows
[
1
],
"tipe"
:
rows
[
2
],
"panjang"
:
rows
[
3
],
"tgl_pembuatan"
:
rows
[
4
],
"tgl_perbaikan"
:
rows
[
5
],
"tgl_selesai"
:
rows
[
6
],
"anggaran"
:
rows
[
7
],
"pj"
:
rows
[
8
],
"pj_lapangan"
:
rows
[
9
],
"kontraktor"
:
rows
[
10
],
"panjang_per"
:
rows
[
12
],
"lebar_per"
:
rows
[
13
],
}
per_res
.
append
(
datas
)
respon
=
{
'data'
:
per_res
,
}
return
Response
(
respon
)
\ No newline at end of file
static/css/layout-style.css
View file @
bd5668c7
...
...
@@ -746,12 +746,17 @@ li.active>a:after {
.modal-header
{
background-color
:
#1B1F2D
!important
;
border
:
#1B1F2D
;
border-top-right-radius
:
10px
;
border-top-left-radius
:
10px
;
border-top-right-radius
:
10px
!important
;
border-top-left-radius
:
10px
!important
;
color
:
white
;
}
#modal_adm
>
.modal-content
{
border-radius
:
10px
;
.modal-header
>
button
{
color
:
white
;
}
.modal-content
{
border-radius
:
10px
!important
;
}
#modal_detail_non_kelurahan
>
div
>
div
>
div
.modal-body
>
fieldset
>
div
>
div
:nth-child
(
1
)>
div
.gambar_keterangan
>
img
{
...
...
@@ -763,6 +768,46 @@ li.active>a:after {
display
:
none
;
}
.icon-location3
:before
{
margin-left
:
-14px
;
}
#maps_detail_p
>
div
.leaflet-control-container
>
div
.leaflet-top.leaflet-left
{
display
:
none
;
}
#map-edit-tuplah
>
div
.leaflet-control-container
>
div
.leaflet-top.leaflet-left
>
div
>
div
>
div
{
display
:
none
;
}
#modal_bangunan_delete
>
div
{
width
:
360px
!important
;
}
.apexcharts-toolbar
>
div
.apexcharts-menu-icon
>
div
>
span
{
color
:
white
;
position
:
absolute
;
top
:
-22px
;
font-size
:
16px
;
margin-left
:
40px
;
}
.apexcharts-toolbar
>
div
.apexcharts-menu-icon
>
div
>
i
{
color
:
white
;
}
#modal_detail_kelurahan
>
div
>
div
>
div
>
fieldset
>
div
>
div
:nth-child
(
1
)>
div
.tombol-edit.text-center
>
a
{
color
:
white
;
}
#modal_detail_kelurahan
>
div
>
div
>
div
>
fieldset
>
div
>
div
:nth-child
(
1
)>
div
.tombol-edit.text-center
>
a
:hover
{
box-shadow
:
0
0
0
100px
rgb
(
0
0
0
/
0%
)
inset
;
}
.apexcharts-menu.apexcharts-menu-open
{
color
:
black
!important
;
}
@media
(
max-width
:
1025px
)
{
.dock
{
position
:
absolute
;
...
...
static/img/icon-1/contact_info.svg
0 → 100644
View file @
bd5668c7
<svg
width=
"278"
height=
"330"
viewBox=
"0 0 278 330"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<mask
id=
"mask0"
style=
"mask-type:alpha"
maskUnits=
"userSpaceOnUse"
x=
"0"
y=
"0"
width=
"278"
height=
"330"
>
<rect
width=
"278"
height=
"330"
rx=
"10"
fill=
"url(#paint0_linear)"
/>
</mask>
<g
mask=
"url(#mask0)"
>
<path
opacity=
"0.2"
d=
"M199.78 294.593C292.322 334.061 278.284 169.675 277.764 130H297V332H262.687H101C113.477 306.835 147.667 272.367 199.78 294.593Z"
fill=
"#4077B4"
/>
<path
d=
"M203.252 297.185C292.489 333.918 278.952 180.925 278.451 144H297V332H263.912H108C120.032 308.579 153 276.5 203.252 297.185Z"
fill=
"#4077B4"
/>
</g>
<defs>
<linearGradient
id=
"paint0_linear"
x1=
"169"
y1=
"-34"
x2=
"133.5"
y2=
"359.5"
gradientUnits=
"userSpaceOnUse"
>
<stop
stop-color=
"#3085E8"
/>
<stop
offset=
"1"
stop-color=
"#3D7DB8"
/>
</linearGradient>
</defs>
</svg>
static/js/action.js
View file @
bd5668c7
This diff is collapsed.
Click to expand it.
templates/includes/js-m.html
View file @
bd5668c7
This diff is collapsed.
Click to expand it.
templates/includes/js-o.html
View file @
bd5668c7
...
...
@@ -192,6 +192,7 @@
</style>
{% endif %}{% endfor %}
<script>
//tes
function
panel_samp
()
{
$
(
"
#panel-samping
"
).
addClass
(
"
move
"
);
$
(
"
#button_unhide_panel
"
).
addClass
(
"
move-btn
"
);
...
...
@@ -2055,10 +2056,13 @@
</div>
`
)
if
(
feature
.
properties
.
f16
!=
null
)
{
var
list_history
=
feature
.
properties
.
f16
if
(
feature
.
properties
.
f7
!=
null
)
{
console
.
log
(
feature
.
properties
.
f7
)
var
list_history
=
feature
.
properties
.
f7
console
.
log
(
list_history
[
0
].
split
(
"
,
"
)[
0
])
var
perbaikan_
pt
=
`<div class='row'>
var
perbaikan_
jl
=
`<div class='row'>
<label class="col-md-8">`
+
list_history
[
0
].
split
(
"
,
"
)[
1
]
+
`</label>
...
...
@@ -2069,7 +2073,7 @@
<a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>`
}
else
{
var
perbaikan_
pt
=
`<div class='row'>
var
perbaikan_
jl
=
`<div class='row'>
<div class="col-md-6">
<label class="col-md-6">Null</label>
</div>
...
...
@@ -2078,25 +2082,38 @@
<a class="col-md-6" class="btn" id="btn_perbaikan_jalan"><i>Input Perbaikan</i></a>
`
}
$
(
"
.isi_keterangan
"
).
html
(
`
<input type="text" name="idjalan" id="idjalan" class="hidden" value="">
<input type="text" name="coordinatejalan" id="coordinatejalan" class="hidden" value="">
<div>
$
(
"
.nama_keterangan
"
).
html
(
`
<div>
<span>Panjang Jalan</span>
<span style="font-size: large;">
`
+
feature
.
properties
.
f2
+
`
</span>
</div>
<div>
<span>
`
+
feature
.
properties
.
f3
+
`m
</span>
<span></span>
</div>
</div>
<div>
<div>
<span>Lebar Jalan</span>
`
)
$
(
"
.isi_keterangan
"
).
html
(
`
<input type="text" name="idjalan" id="idjalan" class="hidden" value="">
<input type="text" name="coordinatejalan" id="coordinatejalan" class="hidden" value="">
<div class="row">
<div class="col-md-6">
<div>
<span>Panjang Jalan</span>
</div>
<div>
<span>`
+
feature
.
properties
.
f3
+
`m</span>
</div>
</div>
<div>
<span style="font-family: 'Roboto';">`
+
feature
.
properties
.
f4
+
` m</span>
<div class="col-md-6">
<div>
<span>Lebar Jalan</span>
</div>
<div>
<span style="font-family: 'Roboto';">`
+
feature
.
properties
.
f4
+
` m</span>
</div>
</div>
</div>
<div>
...
...
@@ -2169,7 +2186,6 @@
$
(
'
#lebarjalan
'
).
val
(
feature
.
properties
.
f4
);
$
(
'
#tipejalan
'
).
val
(
feature
.
properties
.
f5
);
$
(
"
#coordinatejalan
"
).
val
(
feature
.
geometry
);
}
});
...
...
@@ -2280,12 +2296,11 @@
});
$
(
document
).
on
(
"
click
"
,
"
#btn_jalan
"
,
function
()
{
if
(
map_edit_jalan
.
hasLayer
(
polygon_edit_jalan
))
{
polygon_edit_jalan
.
remove
()
}
var
id_poly
=
$
(
'
#idjalan
'
).
val
();
$
(
"
#modal-jalan
"
).
modal
(
"
show
"
)
$
.
ajax
({
url
:
"
{% url 'api:edit-jalan' %}
"
,
data
:
{
...
...
@@ -2294,8 +2309,8 @@
dataType
:
'
json
'
,
success
:
function
(
data
)
{
loaderPage
(
false
);
$
(
"
#modal-jalan
"
).
modal
(
"
show
"
)
$
(
"
.
modal_detail_non_kelurahan
"
).
modal
(
"
hide
"
)
$
(
"
#
modal_detail_non_kelurahan
"
).
modal
(
"
hide
"
)
setTimeout
(
function
()
{
map_edit_jalan
.
invalidateSize
();
},
1000
);
...
...
@@ -2338,7 +2353,8 @@
$
(
document
).
on
(
"
click
"
,
"
#btn_hapus_jalan
"
,
function
()
{
$
(
"
#modal-hapus-jalan
"
).
modal
(
"
show
"
)
$
(
"
#modal_detail_non_kelurahan
"
).
modal
(
"
hide
"
)
var
id_poly
=
$
(
'
#idjalan
'
).
val
();
$
.
ajax
({
...
...
@@ -2373,7 +2389,7 @@
icon
:
"
success
"
,
confirmButtonColor
:
"
#00BCD4
"
},
function
()
{
$
(
"
#modal-hapus-jalan
"
).
css
(
'
display
'
,
'
non
e
'
);
$
(
"
#modal-hapus-jalan
"
).
modal
(
'
hid
e
'
);
})
}
else
{
swal
({
...
...
@@ -2418,7 +2434,7 @@
icon
:
"
success
"
,
confirmButtonColor
:
"
#00BCD4
"
},
function
()
{
$
(
"
#modal-jalan
"
).
css
(
'
display
'
,
'
non
e
'
);
$
(
"
#modal-jalan
"
).
modal
(
'
hid
e
'
);
})
}
else
{
swal
({
...
...
@@ -2749,6 +2765,8 @@
$
(
"
.modal-backdrop
"
).
css
(
"
display
"
,
"
none
"
)
$
(
"
.modal-backdrop
"
).
removeClass
(
'
show
'
);
$
(
"
body
"
).
css
(
'
padding-right
'
,
'
0px !important
'
)
document
.
querySelector
(
"
#right-tab2-feas-upli > div > div:nth-child(6) > div > label
"
).
html
(
`Pimpinan`
)
document
.
querySelector
(
"
#right-tab2-feas-upli > div > div:nth-child(3)
"
).
css
(
"
display
"
,
"
block
"
)
}
function
destroyWraper
()
{
...
...
@@ -3838,7 +3856,7 @@
$
(
"
.tombol_action_create
"
).
html
(
``
)
$
(
"
.tab_1
"
).
html
(
"
Koordinat
"
)
$
(
"
.tab_2
"
).
html
(
"
Informasi Point
"
)
$
(
"
.tombol_save_create
"
).
html
(
`<input type="button" class="btn btn-primary" id="btnsavepoint" value="SAVE"
style="margin-right:30px;"
>
$
(
"
.tombol_save_create
"
).
html
(
`<input type="button" class="btn btn-primary" id="btnsavepoint" value="SAVE">
<input type="text" name="poly_create_point" class="hidden" id="poly_create_point" value="">`
)
$
(
"
#koordinatjalan
"
).
html
(
`
...
...
templates/includes/modal.html
View file @
bd5668c7
This diff is collapsed.
Click to expand it.
templates/includes/plugin.html
View file @
bd5668c7
...
...
@@ -7,9 +7,7 @@
<input
type=
"checkbox"
name=
"checkbox"
onclick=
"mapsganti()"
id=
"mapschange"
style=
"position: absolute;opacity: 0;width: 40px;height: 40px;margin-top: -5px;"
>
<div
id=
"labelchange"
>
<img
src=
"{% static 'img/icon-1/Vector3d.svg' %}"
alt=
""
style=
"height: 50px;
width: 50px;
margin-top: -1px;
margin-left: -4px;"
>
width: 50px;"
>
</div>
</a>
...
...
@@ -24,9 +22,7 @@
<div
class=
"dropdown show-dropdown"
style=
"top: 1px;"
>
<a
href=
"#"
data-toggle=
"dropdown"
>
<img
src=
"{% static 'img/icon-1/Vectorbasemaps.svg' %}"
alt=
""
style=
"height: 50px;
width: 50px;
margin-top: -1px;
margin-left: -4px;"
>
width: 50px;"
>
</a>
<ul
class=
"dropdown-menu"
x-placement=
"bottom-start"
>
<li
class=
"header-title text-center"
>
Maps BaseLayer
</li>
...
...
@@ -81,9 +77,7 @@
<div
class=
"dropdown show-dropdown "
>
<a
href=
"#"
data-toggle=
"dropdown"
>
<img
src=
"{% static 'img/icon-1/Vectoroverlay.svg' %}"
alt=
""
style=
"height: 50px;
width: 50px;
margin-top: -1px;
margin-left: -4px;"
>
width: 50px;"
>
</a>
<ul
class=
"dropdown-menu"
style=
"top: 12px;
width: 300px;
...
...
templates/includes/sidebar.html
View file @
bd5668c7
This diff is collapsed.
Click to expand it.
templates/layout/layout.html
View file @
bd5668c7
This diff is collapsed.
Click to expand it.
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