Commit f9784383 authored by Fachri's avatar Fachri

Merge branch 'master' of http://git.khansia.co.id/Nahrowi/oku-gis

parents 4c8269d5 46257a7c
...@@ -2976,14 +2976,17 @@ def filt_perbaikan_kecamatan(request): ...@@ -2976,14 +2976,17 @@ def filt_perbaikan_kecamatan(request):
tp.TYPE, tp.TYPE,
tp.tgl_perbaikan, tp.tgl_perbaikan,
tp.anggaran, tp.anggaran,
tp.tgl_selesai tp.tgl_selesai,
gdl.desa,
gdc.kecamatan
FROM FROM
( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp ( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp
JOIN geo_label gl ON gl.ID = tp.type_id JOIN geo_label gl ON gl.ID = tp.type_id
JOIN geo_data_kecamatan gdk on st_intersects(st_setsrid(gdk.geom, 4326), st_setsrid(tp.geom, 4326)) JOIN geo_data_kelurahan gdl on st_intersects(st_setsrid(gdl.geom, 4326), st_setsrid(tp.geom, 4326))
JOIN geo_data_kecamatan gdc ON st_intersects ( st_setsrid ( gdc.geom, 4326 ), st_setsrid ( tp.geom, 4326 ) )
WHERE WHERE
rn = 1 and gdk.ID = %s rn = 1 and gdc.ID = %s
"""% int(id_kec)) """% int(id_kec))
res_perbaikan = data_per.fetchall() res_perbaikan = data_per.fetchall()
res_all = [] res_all = []
...@@ -2996,6 +2999,8 @@ def filt_perbaikan_kecamatan(request): ...@@ -2996,6 +2999,8 @@ def filt_perbaikan_kecamatan(request):
'tgl_perbaikan':j[4], 'tgl_perbaikan':j[4],
'anggaran':j[5], 'anggaran':j[5],
'tgl_selesai':j[6], 'tgl_selesai':j[6],
'desa':j[7],
'kecamatan':j[8],
} }
res_all.append(data_all) res_all.append(data_all)
...@@ -3017,13 +3022,16 @@ def filt_perbaikan_desa(request): ...@@ -3017,13 +3022,16 @@ def filt_perbaikan_desa(request):
tp.TYPE, tp.TYPE,
tp.tgl_perbaikan, tp.tgl_perbaikan,
tp.anggaran, tp.anggaran,
tp.tgl_selesai tp.tgl_selesai,
gdl.desa,
gdc.kecamatan
FROM FROM
( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp ( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp
JOIN geo_label gl ON gl.ID = tp.type_id JOIN geo_label gl ON gl.ID = tp.type_id
JOIN geo_data_kelurahan gdk on st_intersects(st_setsrid(gdk.geom, 4326), st_setsrid(tp.geom, 4326)) JOIN geo_data_kelurahan gdl on st_intersects(st_setsrid(gdl.geom, 4326), st_setsrid(tp.geom, 4326))
JOIN geo_data_kecamatan gdc ON st_intersects ( st_setsrid ( gdc.geom, 4326 ), st_setsrid ( tp.geom, 4326 ) )
WHERE WHERE
rn = 1 and gdk.ID = %s rn = 1 and gdl.ID = %s
"""% int(id_desa)) """% int(id_desa))
res_perbaikan = data_per.fetchall() res_perbaikan = data_per.fetchall()
...@@ -3037,6 +3045,8 @@ def filt_perbaikan_desa(request): ...@@ -3037,6 +3045,8 @@ def filt_perbaikan_desa(request):
'tgl_perbaikan':j[4], 'tgl_perbaikan':j[4],
'anggaran':j[5], 'anggaran':j[5],
'tgl_selesai':j[6], 'tgl_selesai':j[6],
'desa':j[7],
'kecamatan':j[8],
} }
res_all.append(data_all) res_all.append(data_all)
......
...@@ -484,10 +484,14 @@ class Dashboard(generic.TemplateView): ...@@ -484,10 +484,14 @@ class Dashboard(generic.TemplateView):
tp.TYPE, tp.TYPE,
tp.tgl_perbaikan, tp.tgl_perbaikan,
tp.anggaran, tp.anggaran,
tp.tgl_selesai tp.tgl_selesai,
gdl.desa,
gdc.kecamatan
FROM FROM
( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp ( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp
JOIN geo_label gl ON gl.ID = tp.type_id JOIN geo_label gl ON gl.ID = tp.type_id
JOIN geo_data_kelurahan gdl on st_intersects(st_setsrid(gdl.geom, 4326), st_setsrid(tp.geom, 4326))
JOIN geo_data_kecamatan gdc ON st_intersects ( st_setsrid ( gdc.geom, 4326 ), st_setsrid ( tp.geom, 4326 ) )
WHERE WHERE
rn = 1 rn = 1
""") """)
...@@ -503,6 +507,8 @@ class Dashboard(generic.TemplateView): ...@@ -503,6 +507,8 @@ class Dashboard(generic.TemplateView):
'tgl_perbaikan':j[4], 'tgl_perbaikan':j[4],
'anggaran':j[5], 'anggaran':j[5],
'tgl_selesai':j[6], 'tgl_selesai':j[6],
'desa':j[7],
'kecamatan':j[8],
} }
res_all.append(data_all) res_all.append(data_all)
...@@ -673,10 +679,14 @@ def perbaikanrenovasi(request): ...@@ -673,10 +679,14 @@ def perbaikanrenovasi(request):
tp.TYPE, tp.TYPE,
tp.tgl_perbaikan, tp.tgl_perbaikan,
tp.anggaran, tp.anggaran,
tp.tgl_selesai tp.tgl_selesai,
gdl.desa,
gdc.kecamatan
FROM FROM
( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp ( SELECT tbl_perbaikan.*, ROW_NUMBER ( ) OVER ( PARTITION BY id_object ORDER BY tgl_selesai DESC ) AS rn FROM tbl_perbaikan ) tp
JOIN geo_label gl ON gl.ID = tp.type_id JOIN geo_label gl ON gl.ID = tp.type_id
JOIN geo_data_kelurahan gdl on st_intersects(st_setsrid(gdl.geom, 4326), st_setsrid(tp.geom, 4326))
JOIN geo_data_kecamatan gdc ON st_intersects ( st_setsrid ( gdc.geom, 4326 ), st_setsrid ( tp.geom, 4326 ) )
WHERE WHERE
rn = 1 rn = 1
""") """)
...@@ -694,6 +704,8 @@ def perbaikanrenovasi(request): ...@@ -694,6 +704,8 @@ def perbaikanrenovasi(request):
'tgl_perbaikan':j[4], 'tgl_perbaikan':j[4],
'anggaran':j[5], 'anggaran':j[5],
'tgl_selesai':j[6], 'tgl_selesai':j[6],
'desa':j[7],
'kecamatan':j[8],
} }
res_all.append(data_all) res_all.append(data_all)
...@@ -708,8 +720,8 @@ def loadDetail(request): ...@@ -708,8 +720,8 @@ def loadDetail(request):
SELECT SELECT
gl.NAME, gl.NAME,
tp.name, tp.name,
gj.remark, tp.type,
st_length ( gj.geom :: geography ), st_length ( tp.geom :: geography ),
tp.tgl_pembuatan, tp.tgl_pembuatan,
tp.tgl_perbaikan, tp.tgl_perbaikan,
tp.tgl_selesai, tp.tgl_selesai,
...@@ -723,17 +735,18 @@ def loadDetail(request): ...@@ -723,17 +735,18 @@ def loadDetail(request):
tp.id_object, tp.id_object,
tp.id, tp.id,
tp.proposal, tp.proposal,
tp.bukti_selesai tp.bukti_selesai,
tp.jenis_perbaikan
FROM FROM
tbl_perbaikan tp tbl_perbaikan tp
JOIN geo_label gl ON gl.ID = tp.type_id JOIN geo_label gl ON gl.ID = tp.type_id
JOIN geo_jalan gj ON gj.ID = tp.id_object
where tp.id_object = %s"""% id_object) where tp.id_object = %s"""% id_object)
res_perbaikan = data_per.fetchall() res_perbaikan = data_per.fetchall()
res_all = [] res_all = []
for j in res_perbaikan: for j in res_perbaikan:
data_all = { data_all = {
'jenis':j[0],
'name':j[1], 'name':j[1],
'type':j[2], 'type':j[2],
'panjang':j[3], 'panjang':j[3],
...@@ -750,7 +763,8 @@ def loadDetail(request): ...@@ -750,7 +763,8 @@ def loadDetail(request):
'id_object':j[14], 'id_object':j[14],
'id':j[15], 'id':j[15],
'proposal':j[16], 'proposal':j[16],
'bukti_selesai':j[17] 'bukti_selesai':j[17],
'jenis_perbaikan':j[18]
} }
res_all.append(data_all) res_all.append(data_all)
......
...@@ -903,7 +903,11 @@ ...@@ -903,7 +903,11 @@
}, function() { }, function() {
$("#modal_adm").modal('hide'); $("#modal_adm").modal('hide');
$("#modal_detail_non_kelurahan").modal('hide') $("#modal_detail_non_kelurahan").modal('hide')
//location.reload();
// location.reload();
// var checkBox = document.getElementById("knt_adm");
// document.getElementById("knt_adm").checked = true;
// newe(markeradm, geo_po_adm, checkBox)
}) })
} else { } else {
swal({ swal({
......
...@@ -1472,10 +1472,10 @@ ...@@ -1472,10 +1472,10 @@
</div> </div>
</div> </div>
<div id="modal_detail_perbaikan_dash" class="modal fade mymodal" style="padding-top: 0px;padding-bottom: 0px;right: -11px;width: 100% !important;max-height: 657px;overflow-y:hidden; left: 0px;"> <div id="modal_detail_perbaikan_dash" class="modal fade mymodal" style="padding-top: 0px;padding-bottom: 0px;right: -11px;width: 100% !important;max-height: 100%;overflow-y:hidden; left: 0px;">
<div class="modal-dialog modal-sm " style="max-height: 657px;margin: 0;float: right;bottom: 0; <div class="modal-dialog modal-sm " style="height: 100%;margin: 0;float: right;bottom: 0;
width: 320px;"> width: 320px;">
<div class="modal-content " style="background-color: #1B1F2D;max-height: 657px;color: white; "> <div class="modal-content " style="background-color: #1B1F2D;height: 100%;color: white; overflow-y: scroll;">
<div class="modal-body " style="padding: 0px;background-color: #1B1F2D; "> <div class="modal-body " style="padding: 0px;background-color: #1B1F2D; ">
<div style="float: right;margin: -42px 10px 0px 0px; "> <div style="float: right;margin: -42px 10px 0px 0px; ">
<button type="button " class="btn btn-link " onclick="cetakExcel() " style="color: white;padding-top: 2px;"><i class="icon-printer"></i> <button type="button " class="btn btn-link " onclick="cetakExcel() " style="color: white;padding-top: 2px;"><i class="icon-printer"></i>
...@@ -1488,7 +1488,7 @@ ...@@ -1488,7 +1488,7 @@
<span>x</span> <span>x</span>
</button> </button>
</div> </div>
<div class="isi text " style="margin-top: 50px;overflow-y: scroll;max-height: 607px;overflow-x: hidden; "> <div class="isi text " style="margin-top: 50px;height: 100%;overflow-x: hidden; ">
<div class="isi_detail_cek "> <div class="isi_detail_cek ">
<div> <div>
<div> <div>
......
This diff is collapsed.
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
</head> </head>
<body style="font-family: 'gilroylight';" oncontextmenu="return false"> <body style="font-family: 'gilroylight'; overflow-y: hidden;" oncontextmenu="return false">
......
...@@ -328,8 +328,9 @@ ...@@ -328,8 +328,9 @@
<thead> <thead>
<tr> <tr>
<th>No.</th> <th>No.</th>
<th>Sarana Perbaiakn</th> <th>Sarana Perbaikan</th>
<th>Nama</th> <th>Nama</th>
<th>Alamat</th>>
<th>Type</th> <th>Type</th>
<th>Tanggal Mulai</th> <th>Tanggal Mulai</th>
<th>Tanggal Selesai</th> <th>Tanggal Selesai</th>
...@@ -344,6 +345,7 @@ ...@@ -344,6 +345,7 @@
<td>{{forloop.counter}}</td> <td>{{forloop.counter}}</td>
<td>{{all.name_perbaikan}}</td> <td>{{all.name_perbaikan}}</td>
<td>{{all.name}}</td> <td>{{all.name}}</td>
<td>{{all.desa}}, {{all.kecamatan}}</td>
<td>{{all.type}}</td> <td>{{all.type}}</td>
<td>{{all.tgl_perbaikan}}</td> <td>{{all.tgl_perbaikan}}</td>
<td>{{all.tgl_selesai}}</td> <td>{{all.tgl_selesai}}</td>
...@@ -942,6 +944,8 @@ ...@@ -942,6 +944,8 @@
isi_modal_detail = [] isi_modal_detail = []
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
var crosser = data[i].jenis
console.log(crosser)
isi_modal_detail.push(`<tr> isi_modal_detail.push(`<tr>
<td>` + i + `</td> <td>` + i + `</td>
<td>` + data[i].name + `</td> <td>` + data[i].name + `</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment