You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

682 lines
13 KiB

3 years ago
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
3 years ago
​
​
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
​
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
3 years ago
​
3 years ago
3 years ago
​
3 years ago
3 years ago
​
3 years ago
​
3 years ago
​
​
3 years ago
​
​
​
​
3 years ago
​
​
3 years ago
3 years ago
3 years ago
3 years ago
​
​
3 years ago
​
​
​
3 years ago
​
3 years ago
3 years ago
3 years ago
​
3 years ago
​
​
3 years ago
3 years ago
​
​
​
​
​
​
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
​
​
​
​
3 years ago
3 years ago
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
3 years ago
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.thymeleaf.org">
  3. <head th:replace="~{fragments/modules/base/head :: head}">
  4. <script type="text/javascript"
  5. src="https://www.gstatic.com/charts/loader.js"></script>
  6. <script
  7. src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script>
  8. </head>
  9. <style>
  10. .chart-container {
  11. display: flex;
  12. justify-content: center;
  13. align-items: center;
  14. height: 100%;
  15. box-sizing: border-box;
  16. /* Optionally set the height to fill the container */
  17. }
  18. </style>
  19. <body>
  20. <div class="wrapper">
  21. <!-- header top menu Start -->
  22. <header th:replace="~{fragments/modules/base/header :: header}"></header>
  23. <!-- header top menu end -->
  24. <div class="page-wrap">
  25. <!--=============== Left Menu side Start ================-->
  26. <div th:replace="~{fragments/modules/base/menu :: menu}"></div>
  27. <!--=============== Left side End ================-->
  28. <div class="main-content">
  29. <div class="container-fluid">
  30. <div class="page-header mb-2">
  31. <div class="row align-items-end">
  32. <div class="col-lg-8">
  33. <div class="page-header-title">
  34. <i class="ik ik-bar-chart-2 bg-blue"></i>
  35. <div class="d-inline">
  36. <h5>PGR Report</h5>
  37. <span>Public Grievance Redressal Complaint Report</span>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="col-lg-4">
  42. <nav class="breadcrumb-container" aria-label="breadcrumb">
  43. <ol class="breadcrumb">
  44. <li class="breadcrumb-item"><a href="index"><i
  45. class="ik ik-home"></i></a></li>
  46. <li class="breadcrumb-item active" aria-current="page">Dashboard</li>
  47. </ol>
  48. </nav>
  49. </div>
  50. </div>
  51. </div>
  52. <h4 class="h4 text-right text-mute" style="font-size: 12px;">
  53. Auto refresh in <font id="refresh-countdown">00</font> seconds
  54. </h4>
  55. <br>
  56. <form class="" action="" onsubmit="getByZone()">
  57. <div class="row">
  58. <div class="col-md-4">
  59. <label for="fromDate" class="">From Date</label> <input
  60. type="date" class="form-control" id="fromDate" name="sFrDate"
  61. th:value="${sFrDate}" data-date-format="dd/mm/yy" required>
  62. </div>
  63. <div class="col-md-4">
  64. <label for="toDate" class="">To Date</label> <input type="date"
  65. class="form-control" id="toDate" name="sToDate"
  66. th:value="${sToDate}" data-date-format="dd/mm/yy" required>
  67. </div>
  68. <div class="col-md-4">
  69. <label for="DepartmentDropdown">Select AgeAnalysis
  70. Department for PieChart:</label> <select class="form-control"
  71. name="DEPT_NAME" id="zone">
  72. <option value='0' th:selected="${DEPT_NAME == 0}">----All
  73. ----</option>
  74. <option th:each="complaintdepartment : ${complaintdept1}"
  75. th:value="${complaintdepartment.name}"
  76. th:text="${complaintdepartment.name}"
  77. th:selected="${DEPT_NAME == complaintdepartment.name}"></option>
  78. </select>
  79. </div>
  80. <div class="col-md-4">
  81. <label for="DepartmentDropdown">Select Department
  82. Department for BarChart:</label> <select class="form-control"
  83. name="DEPTID" id="zonewithreopenbar">
  84. <option value='0' th:selected="${DEPTID == 0}">----All
  85. ----</option>
  86. <option th:each="complaintdepartment : ${complaintdept}"
  87. th:value="${complaintdepartment.id}"
  88. th:text="${complaintdepartment.name}"
  89. th:selected="${DEPTID == complaintdepartment.id}"></option>
  90. </select>
  91. </div>
  92. <div class="col-md-4"
  93. style="display: flex; justify-content: space-between; align-items: center; margin-top: 25px;">
  94. <button type="submit" style="height: auto; width: 90%;"
  95. class="btn btn-primary">Search</button>
  96. </div>
  97. </div>
  98. </form>
  99. <br>
  100. <div class="row"
  101. style="max-width: 100%; max-height: 100%; overflow: auto;">
  102. <div class="col-md-12">
  103. <div class="card sale-card"
  104. style="max-width: 150%; max-height: 150%; height: 100%; width: auto; overflow: auto;">
  105. <div class="card-block"
  106. style="max-width: 100%; max-height: 90%; height: 90%; width: auto; overflow: auto;">
  107. <svg id="chart-container" xmlns="http://www.w3.org/2000/svg"
  108. viewBox="0 0 1000 500" preserveAspectRatio="xMidYMid meet"
  109. style="max-width: 100%; max-height: 100%;">
  110. <foreignObject width="100%" height="100%">
  111. <div id="totalpiechart" style="width: 50%; height: auto; float: left;"></div>
  112. <div id="reopenpiechart" style="width: 50%; height: auto; float: left;"></div>
  113. </foreignObject>
  114. </svg>
  115. </div>
  116. <div class="card-block"
  117. style="max-width: 100%; max-height: 100%; height: 100%; width: auto; overflow: auto;">
  118. <svg id="chart-container" xmlns="http://www.w3.org/2000/svg"
  119. viewBox="0 0 1000 500" preserveAspectRatio="xMidYMid meet"
  120. style="max-width: 100%; max-height: 100%;">
  121. <foreignObject width="100%" height="100%">
  122. <div id="barchart" style="width: 50%; height: auto; float: left;"></div>
  123. </foreignObject>
  124. </svg>
  125. </div>
  126. <div class="card-block"
  127. style="max-width: 100%; max-height: 100%; height: 100%; width: auto; overflow: auto;">
  128. <svg id="chart-container" xmlns="http://www.w3.org/2000/svg"
  129. viewBox="0 0 1000 500" preserveAspectRatio="xMidYMid meet"
  130. style="max-width: 100%; max-height: 100%;">
  131. <foreignObject width="100%" height="100%">
  132. <div id="reopenbarchart" style="width: 50%; height: auto; float: left;"></div>
  133. </foreignObject>
  134. </svg>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. <br>
  140. </div>
  141. <br>
  142. </div>
  143. <footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
  144. </div>
  145. </div>
  146. <!-- Model Box -->
  147. <div class="modal" id="addEvent" tabindex="-1" role="dialog"
  148. aria-labelledby="addEventLabel" aria-hidden="true">
  149. <div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
  150. <script th:replace="~{fragments/modules/base/script :: script}"></script>
  151. <script src="/assets/node_modules/amcharts3/amcharts/amcharts.js"></script>
  152. <script src="/assets/node_modules/amcharts3/amcharts/serial.js"></script>
  153. <script src="/assets/node_modules/amcharts3/amcharts/themes/light.js"></script>
  154. <script
  155. src="/assets/node_modules/fullcalendar/dist/fullcalendar.min.js"></script>
  156. <script
  157. src="/assets/node_modules/tempusdominus-bootstrap-4/build/js/tempusdominus-bootstrap-4.min.js"></script>
  158. <script>
  159. $(document).ready(function () {
  160. $.ajax({
  161. url: '/pgr/daskboard', // Change this URL to your endpoint
  162. type: 'GET',
  163. success: function (data) {
  164. var dropdown = $('#DepartmentDropdown')
  165. $.each(data, function (index, complaintdepartment) {
  166. dropdown.append($('<option></option>').attr('value', complaintdepartment.id).text(complaintdepartment.name));
  167. });
  168. },
  169. });
  170. });
  171. function getByZone(){
  172. alert("Wait for response..")
  173. let DEPT_NAME = document.getElementById("zone").value;
  174. let DEPTID = document.getElementById("zonewithreopenbar").value;
  175. window.location.href='/dashboard?zone='+DEPT_NAME +'&zonewithreopenbar='+DEPTID;
  176. }
  177. </script>
  178. <script type="text/javascript"
  179. src="https://www.gstatic.com/charts/loader.js"></script>
  180. <script type="text/javascript" th:inline="javascript">
  181. var daysDataTotal = [
  182. [(${ageanalysisdashboardList[0].DAYS_0_15_PEN})],
  183. [(${ageanalysisdashboardList[0].DAYS_16_30_PEN})],
  184. [(${ageanalysisdashboardList[0].DAYS_31_60_PEN})],
  185. [(${ageanalysisdashboardList[0].DAYS_61_90_PEN})],
  186. [(${ageanalysisdashboardList[0].DAYS_90_PEN})]
  187. ];
  188. var daysDataReopen = [
  189. [(${ageanalysisdashboardList[0].DAYS_0_15_REOPEN})],
  190. [(${ageanalysisdashboardList[0].DAYS_16_30_REOPEN})],
  191. [(${ageanalysisdashboardList[0].DAYS_31_60_REOPEN})],
  192. [(${ageanalysisdashboardList[0].DAYS_61_90_REOPEN})],
  193. [(${ageanalysisdashboardList[0].DAYS_90_REOPEN})]
  194. ];
  195. google.charts.load('current', {'packages': ['corechart']});
  196. google.charts.setOnLoadCallback(drawPieCharts); // Use a new callback for pie charts
  197. google.charts.setOnLoadCallback(drawBarCharts); // Use a new callback for bar charts
  198. function drawPieCharts() {
  199. console.log("Pie charts");
  200. var dataTotal = google.visualization.arrayToDataTable([
  201. ['Category', 'Count'],
  202. ['0-15 Days Pending', daysDataTotal[0]],
  203. ['16-30 Days Pending', daysDataTotal[1]],
  204. ['31-60 Days Pending', daysDataTotal[2]],
  205. ['61-90 Days Pending', daysDataTotal[3]],
  206. ['Above 90 Days Pending', daysDataTotal[4]],
  207. ]);
  208. var dataReopen = google.visualization.arrayToDataTable([
  209. ['Category', 'Count'],
  210. ['0-15 Days Reopen', daysDataReopen[0]],
  211. ['16-30 Days Reopen', daysDataReopen[1]],
  212. ['31-60 Days Reopen', daysDataReopen[2]],
  213. ['61-90 Days Reopen', daysDataReopen[3]],
  214. ['Above 90 Days Reopen', daysDataReopen[4]],
  215. ]);
  216. var optionspiepen = {
  217. 'title': 'Overall Pending Complaint Info ',
  218. 'legend': 'bottom',
  219. 'height': '500',
  220. 'width': '500',
  221. 'colors': ['#f4ca47', '#0ebce0', '#aae00e', '#053a4c', '#0ee0ad']
  222. };
  223. var optionspiere = {
  224. 'title': 'Overall Reopen Complaint Info',
  225. 'legend': 'bottom',
  226. 'height': '500',
  227. 'width': '500',
  228. 'colors': ['#f4ca47', '#0ebce0', '#aae00e', '#053a4c', '#0ee0ad']
  229. };
  230. var piechartTotal = new google.visualization.PieChart(document.getElementById('totalpiechart'));
  231. var piechartReopen = new google.visualization.PieChart(document.getElementById('reopenpiechart'));
  232. piechartTotal.draw(dataTotal, optionspiepen);
  233. piechartReopen.draw(dataReopen, optionspiere);
  234. }
  235. var zoneDatawithReopen = [
  236. [(${zonewisedashboardList[0].NonBURSTLT})],
  237. [(${zonewisedashboardList[0].REOFGAR})],
  238. [(${zonewisedashboardList[0].ROAD})],
  239. [(${zonewisedashboardList[0].MOSQUITE})],
  240. [(${zonewisedashboardList[0].WATER})],
  241. [(${zonewisedashboardList[0].REOFDEB})],
  242. [(${zonewisedashboardList[0].TREE})],
  243. [(${zonewisedashboardList[0].DOGS})],
  244. [(${zonewisedashboardList[0].ENCMTN})],
  245. [(${zonewisedashboardList[0].POT})],
  246. [(${zonewisedashboardList[0].PTAX})],
  247. /* [(${zonewisedashboardList[0].OTHERS})],
  248. [(${zonewisedashboardList[0].TOTAL})] */
  249. ];
  250. var zoneDatawithoutReopen = [
  251. [(${reopenzonewisedashboardList[0].NonBURSTLT})],
  252. [(${reopenzonewisedashboardList[0].REOFGAR})],
  253. [(${reopenzonewisedashboardList[0].ROAD})],
  254. [(${reopenzonewisedashboardList[0].MOSQUITE})],
  255. [(${reopenzonewisedashboardList[0].WATER})],
  256. [(${reopenzonewisedashboardList[0].REOFDEB})],
  257. [(${reopenzonewisedashboardList[0].TREE})],
  258. [(${reopenzonewisedashboardList[0].DOGS})],
  259. [(${reopenzonewisedashboardList[0].ENCMTN})],
  260. [(${reopenzonewisedashboardList[0].POT})],
  261. [(${reopenzonewisedashboardList[0].PTAX})],
  262. /* [(${reopenzonewisedashboardList[0].OTHERS})],
  263. [(${reopenzonewisedashboardList[0].TOTAL})] */
  264. ];
  265. function drawBarCharts() {
  266. console.log("Bar charts");
  267. var zonewithReopen = google.visualization.arrayToDataTable([
  268. ['Category', 'Count'],
  269. ['Street Light not burning', zoneDatawithReopen[0]],
  270. ['Removal of Garbage', zoneDatawithReopen[1]],
  271. ['Road Damaged', zoneDatawithReopen[2]],
  272. ['Mosquito Nuisance', zoneDatawithReopen[3]],
  273. ['Water Stagnation', zoneDatawithReopen[4]],
  274. ['Removal of Debries', zoneDatawithReopen[5]],
  275. ['Tree Fallen', zoneDatawithReopen[6]],
  276. ['Dog Menace', zoneDatawithReopen[7]],
  277. ['Encroachment', zoneDatawithReopen[8]],
  278. ['Potshole', zoneDatawithReopen[9]],
  279. ['Property Tax', zoneDatawithReopen[10]],
  280. /* ['Others', zoneDatawithReopen[11]],
  281. ['Total', zoneDatawithReopen[12]], */
  282. ]);
  283. var zonewithoutReopen = google.visualization.arrayToDataTable([
  284. ['Category', 'Count'],
  285. ['Street Light not burning', zoneDatawithoutReopen[0]],
  286. ['Removal of Garbage', zoneDatawithoutReopen[1]],
  287. ['Road Damaged', zoneDatawithoutReopen[2]],
  288. ['Mosquito Nuisance', zoneDatawithoutReopen[3]],
  289. ['Water Stagnation', zoneDatawithoutReopen[4]],
  290. ['Removal of Debries', zoneDatawithoutReopen[5]],
  291. ['Tree Fallen', zoneDatawithoutReopen[6]],
  292. ['Dog Menace', zoneDatawithoutReopen[7]],
  293. ['Encroachment', zoneDatawithoutReopen[8]],
  294. ['Potshole', zoneDatawithoutReopen[9]],
  295. ['Property Tax', zoneDatawithoutReopen[10]],
  296. /* ['Others', zoneDatawithoutReopen[11]],
  297. ['Total', zoneDatawithoutReopen[12]], */
  298. ]);
  299. var optionszonewithreopencolumn = {
  300. 'title': 'Zonewise (With Reopen) ',
  301. 'legend': 'bottom',
  302. 'height': '500',
  303. 'width': '1100',
  304. "useLineColorForBulletBorder": true,
  305. 'colors': ['Green', 'Blue', 'Yellow', 'Brown', 'Pink', 'Orange', 'Purple', 'Grey', 'SkyBlue', 'LightGreen'],
  306. 'responsive':true
  307. };
  308. var optionszonewithoutreopencolumn = {
  309. 'title': 'Zonewise (Without Reopen) ',
  310. 'legend': 'bottom',
  311. 'height': '500',
  312. 'width': '1100',
  313. "useLineColorForBulletBorder": true,
  314. 'colors': ['Red', 'Blue', 'Yellow', 'Brown', 'Pink', 'Orange', 'Purple', 'Grey', 'SkyBlue', 'LightGreen'],
  315. 'responsive':true
  316. };
  317. var barchartReopen = new google.visualization.ColumnChart(document.getElementById('reopenbarchart'));
  318. var barchartwithReopen = new google.visualization.ColumnChart(document.getElementById('barchart'));
  319. barchartReopen.draw(zonewithoutReopen, optionszonewithoutreopencolumn);
  320. barchartwithReopen.draw(zonewithReopen, optionszonewithreopencolumn);
  321. }
  322. </script>
  323. </body>
  324. </html>