var totalCounts = null; var totalCountsecond = null; var fromDate, toDate; var province_id = null; var fromDatesecond, toDatesecond; var fromDatekeshvari, toDatekeshvari; var fromDateTestItems, toDateTestItems; var fromDateTestItems, toDateTestItems; var fromDateshowrizitem, toDateshowrizitem; var fromDateshowcity, toDateshowcity; var fromdatamaremat, todatemaremat; var fromdatesubostan, todatesubostan; var objectsendglobal = {}; var sorttestitemsflag = 0; var fromriz, toriz; var tableriz; var tablelist; var objectsend = []; var probj = []; var objecttablekol = []; var excelDatepickerFirstTable = {}; var PERMISSIONS = [] var objecttable1 = []; var objecttable2 = []; var objecttable3 = []; var objecttable4 = []; var objecttable5 = []; var objecttable6 = []; var objecttable7 = []; var objecttable8 = []; var objecttable9 = []; var objecttable10 = []; var objecttable11 = []; var objecttable12 = []; var objecttable13 = []; var objecttable14 = []; var objecttable15 = []; var objecttable16 = []; var objecttable20 = []; var objectsendtown = [] var objectfiltertable = []; var objectitemstable = []; var secondtableobject = [] var eacharray = {}; var sub = []; var subobject = {}; var iTableCounter = 1; var tablemaremat var tablepaksazi var tablealaem var tablehefaz var tablelighting var tableruller var tablecoloring var tablewashing var tablesafety var tableharim var tablepol var tabletunnel var tablezem var tablemachin var tablerahdar var tableemer var tablecontrol var tablemarematsecond var tablepaksazisecond var tablealaemsecond var tablehefazsecond var tablelightingsecond var tablerullersecond var tablecoloringsecond var tablewashingsecond var tablesafetysecond var tableharimsecond var tablepolsecond var tabletunnelsecond var tablezemsecond var tablemachinsecond var tablerahdarsecond var tableemersecond var tablecontrolsecond var subprovinceobj var provincechoose = null; var gozareshtable; var zirgozareshtable; var root_local = "https://rms.rmto.ir/"; // var root_local = "http://192.168.1.75/rms_new/public/index.php/"; // function showLoaderScreen() { // $(".starter-loader-container").css("display", "flex").hide().fadeIn(); // } // function //hide { // $(".starter-loader-container").fadeOut(); // } $(document).bind('click', function (e) { const clicked = $(e.target); if (clicked.parents('.datepicker-container').length != 0) return false; if (clicked.parents('.select2-selection__choice').length != 0) return false; if (clicked.closest('.btn-table-filter').length == 0 && clicked.closest(".parent-filter").length == 0 && $(".parent-filter").css("display") != "none") { $(".parent-filter").css("display", "none"); } if (clicked.closest('.btn-table-excel').length == 0 && clicked.closest(".parent-excel").length == 0 && $(".parent-excel").css("display") != "none") { $(".parent-excel").css("display", "none"); } }); $(document).ready(function () { $.ajax({ url: "https://rms.rmto.ir/webapi/user/get-permission", type: "GET", cache: false, async: false, contentType: false, processData: false, success: function (result) { PERMISSIONS = result.data }, error: function() { Swal.fire({ icon: "error", title: "خطا", text: 'مشکل در دریافت سطح دسترسی', confirmButtonText: "بروزرسانی صفحه", showLoaderOnConfirm: true, preConfirm: () => { location.reload(true); }, }); } }) $.fn.dataTable.ext.errMode = "none"; showprovincename(); showitemlist() // gozarehtowntable() // showtable1() // showLoaderScreen(); setTimeout(() => { checkPosition(); }, 50); //excel datePicker excelDatepickerFirstTable.from = $("#datapicker-from-excel-first-table").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { excelDatepickerFirstTable.from.touched = true; $("#datapicker-to-excel-first-table").prop("disabled", ""); if ( excelDatepickerFirstTable.from.getState().selected.unixDate >= excelDatepickerFirstTable.to.getState().selected.unixDate ) { excelDatepickerFirstTable.to.setDate(excelDatepickerFirstTable.from.getState().selected.unixDate); } if (excelDatepickerFirstTable.to && excelDatepickerFirstTable.to.options && excelDatepickerFirstTable.to.options.minDate != unix) { let cachedValue = excelDatepickerFirstTable.to.getState().selected.unixDate; excelDatepickerFirstTable.to.options = { minDate: unix }; if (excelDatepickerFirstTable.to.touched) { excelDatepickerFirstTable.to.setDate(cachedValue); } } }, }); excelDatepickerFirstTable.to = $("#datapicker-to-excel-first-table").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { excelDatepickerFirstTable.to.touched = true; }, }); console.log(excelDatepickerFirstTable) //end excel datePicker fromDate = $("#datepickfromdate").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { fromDate.touched = true; $("#datepicktodate").prop("disabled", ""); if ( fromDate.getState().selected.unixDate >= toDate.getState().selected.unixDate ) { toDate.setDate(fromDate.getState().selected.unixDate); } if (toDate && toDate.options && toDate.options.minDate != unix) { let cachedValue = toDate.getState().selected.unixDate; toDate.options = { minDate: unix }; if (toDate.touched) { toDate.setDate(cachedValue); } } }, }); fromDatesecond = $("#datepickfrommdate").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { fromDatesecond.touched = true; $("#datepicktoodate").prop("disabled", ""); if ( fromDatesecond.getState().selected.unixDate >= toDatesecond.getState().selected.unixDate ) { toDatesecond.setDate(fromDatesecond.getState().selected.unixDate); } if ( toDatesecond && toDatesecond.options && toDatesecond.options.minDate != unix ) { let cachedValue = toDatesecond.getState().selected.unixDate; toDatesecond.options = { minDate: unix }; if (toDatesecond.touched) { toDatesecond.setDate(cachedValue); } } }, }); fromDatekeshvari = $("#datepickfromdatekeshvar").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { fromDatekeshvari.touched = true; $("#datepicktodatekeshvar").prop("disabled", ""); if ( fromDatekeshvari.getState().selected.unixDate >= toDatekeshvari.getState().selected.unixDate ) { toDatekeshvari.setDate(fromDatekeshvari.getState().selected.unixDate); } if ( toDatekeshvari && toDatekeshvari.options && toDatekeshvari.options.minDate != unix ) { let cachedValue = toDatekeshvari.getState().selected.unixDate; toDatekeshvari.options = { minDate: unix }; if (toDatekeshvari.touched) { toDatekeshvari.setDate(cachedValue); } } }, }); fromdatamaremat = $("#fromdatamaremat").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { fromdatamaremat.touched = true; $("#todatemaremat").prop("disabled", ""); if ( fromdatamaremat.getState().selected.unixDate >= todatemaremat.getState().selected.unixDate ) { todatemaremat.setDate(fromdatamaremat.getState().selected.unixDate); } if ( todatemaremat && todatemaremat.options && todatemaremat.options.minDate != unix ) { let cachedValue = todatemaremat.getState().selected.unixDate; todatemaremat.options = { minDate: unix }; if (todatemaremat.touched) { todatemaremat.setDate(cachedValue); } } }, }); todatemaremat = $("#todatemaremat").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { todatemaremat.touched = true; $("#todatemaremat").prop("disabled", ""); if ( todatemaremat.getState().selected.unixDate >= todatemaremat.getState().selected.unixDate ) { todatemaremat.setDate(todatemaremat.getState().selected.unixDate); } if ( todatemaremat && todatemaremat.options && todatemaremat.options.minDate != unix ) { let cachedValue = todatemaremat.getState().selected.unixDate; todatemaremat.options = { minDate: unix }; if (todatemaremat.touched) { todatemaremat.setDate(cachedValue); } } }, }); // subostandat fromdatesubostan = $("#fromdatesubostan").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { fromdatesubostan.touched = true; $("#todatesubostan").prop("disabled", ""); if ( fromdatesubostan.getState().selected.unixDate >= todatesubostan.getState().selected.unixDate ) { todatesubostan.setDate(fromdatesubostan.getState().selected.unixDate); } if ( todatesubostan && todatesubostan.options && todatesubostan.options.minDate != unix ) { let cachedValue = todatesubostan.getState().selected.unixDate; todatesubostan.options = { minDate: unix }; if (todatesubostan.touched) { todatesubostan.setDate(cachedValue); } } }, }); todatesubostan = $("#todatesubostan").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { todatesubostan.touched = true; $("#todatesubostan").prop("disabled", ""); if ( todatesubostan.getState().selected.unixDate >= todatesubostan.getState().selected.unixDate ) { todatesubostan.setDate(todatesubostan.getState().selected.unixDate); } if ( todatesubostan && todatesubostan.options && todatesubostan.options.minDate != unix ) { let cachedValue = todatesubostan.getState().selected.unixDate; todatesubostan.options = { minDate: unix }; if (todatesubostan.touched) { todatesubostan.setDate(cachedValue); } } }, }); fromDateTestItems = $("#datepickfromdateTestItems").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { fromDateTestItems.touched = true; $("#datepicktodateTestItems").prop("disabled", ""); if ( fromDateTestItems.getState().selected.unixDate >= toDateTestItems.getState().selected.unixDate ) { toDateTestItems.setDate(fromDateTestItems.getState().selected.unixDate); } if ( toDateTestItems && toDateTestItems.options && toDateTestItems.options.minDate != unix ) { let cachedValue = toDateTestItems.getState().selected.unixDate; toDateTestItems.options = { minDate: unix }; if (toDateTestItems.touched) { toDateTestItems.setDate(cachedValue); } } }, }); toDateTestItems = $("#datepicktodateTestItems").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { toDateTestItems.touched = true; $("#datepicktodateTestItems").prop("disabled", ""); if ( toDateTestItems.getState().selected.unixDate >= toDateTestItems.getState().selected.unixDate ) { toDateTestItems.setDate(toDateTestItems.getState().selected.unixDate); } if ( toDateTestItems && toDateTestItems.options && toDateTestItems.options.minDate != unix ) { let cachedValue = toDateTestItems.getState().selected.unixDate; toDateTestItems.options = { minDate: unix }; if (toDateTestItems.touched) { toDateTestItems.setDate(cachedValue); } } }, }); fromDateshowrizitem = $("#fromDateshowrizitem").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { fromDateshowrizitem.touched = true; $("#toDateshowrizitem").prop("disabled", ""); if ( fromDateshowrizitem.getState().selected.unixDate >= toDateshowrizitem.getState().selected.unixDate ) { toDateshowrizitem.setDate(fromDateshowrizitem.getState().selected.unixDate); } if ( toDateshowrizitem && toDateshowrizitem.options && toDateshowrizitem.options.minDate != unix ) { let cachedValue = toDateshowrizitem.getState().selected.unixDate; toDateshowrizitem.options = { minDate: unix }; if (toDateshowrizitem.touched) { toDateshowrizitem.setDate(cachedValue); } } }, }); toDateshowrizitem = $("#toDateshowrizitem").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { toDateshowrizitem.touched = true; $("#toDateshowrizitem").prop("disabled", ""); if ( toDateshowrizitem.getState().selected.unixDate >= toDateshowrizitem.getState().selected.unixDate ) { toDateshowrizitem.setDate(toDateshowrizitem.getState().selected.unixDate); } if ( toDateshowrizitem && toDateshowrizitem.options && toDateshowrizitem.options.minDate != unix ) { let cachedValue = toDateshowrizitem.getState().selected.unixDate; toDateshowrizitem.options = { minDate: unix }; if (toDateshowrizitem.touched) { toDateshowrizitem.setDate(cachedValue); } } }, }); fromriz = $("#fromdatesubostan").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { fromriz.touched = true; $("#todatesubostan").prop("disabled", ""); if ( fromriz.getState().selected.unixDate >= toriz.getState().selected.unixDate ) { toriz.setDate(fromriz.getState().selected.unixDate); } if (toriz && toriz.options && toriz.options.minDate != unix) { let cachedValue = toriz.getState().selected.unixDate; toriz.options = { minDate: unix }; if (toriz.touched) { toriz.setDate(cachedValue); } } }, }); toDate = $("#datepicktodate").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { toDate.touched = true; /*if (fromDate && fromDate.options && fromDate.options.maxDate != unix) { let cachedValue = fromDate.getState().selected.unixDate; fromDate.options = { maxDate: unix }; if (fromDate.touched) { fromDate.setDate(cachedValue); } }*/ }, }); toDatesecond = $("#datepicktoodate").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { toDatesecond.touched = true; /*if (fromDate && fromDate.options && fromDate.options.maxDate != unix) { let cachedValue = fromDate.getState().selected.unixDate; fromDate.options = { maxDate: unix }; if (fromDate.touched) { fromDate.setDate(cachedValue); } }*/ }, }); toDatekeshvari = $("#datepicktodatekeshvar").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { toDatekeshvari.touched = true; /*if (fromDate && fromDate.options && fromDate.options.maxDate != unix) { let cachedValue = fromDate.getState().selected.unixDate; fromDate.options = { maxDate: unix }; if (fromDate.touched) { fromDate.setDate(cachedValue); } }*/ }, }); toriz = $("#todatesubostan").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { toriz.touched = true; /*if (fromDate && fromDate.options && fromDate.options.maxDate != unix) { let cachedValue = fromDate.getState().selected.unixDate; fromDate.options = { maxDate: unix }; if (fromDate.touched) { fromDate.setDate(cachedValue); } }*/ }, }); var tablekeshvar = $("#examplekeshvar").DataTable({ dom: "p>", pagingType: "simple_numbers", scrollX: true, responsive: true, searching: false, paging: false, ordering: false, info: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, processing: true, ajax: { url: root_local + "projects/ristat", type: "GET", dataSrc: function (json) { return json.data; }, }, columns: [ { orderable: false, data: "item_1" }, { orderable: false, data: "item_2" }, { orderable: false, data: "item_3" }, { orderable: false, data: "item_4" }, { orderable: false, data: "item_5" }, { orderable: false, data: "item_6" }, { orderable: false, data: "item_7" }, { orderable: false, data: "item_8" }, { orderable: false, data: "item_9" }, { orderable: false, data: "item_10" }, { orderable: false, data: "item_11" }, { orderable: false, data: "item_12" }, { orderable: false, data: "item_13" }, { orderable: false, data: "item_14" }, { orderable: false, data: "item_15" }, { orderable: false, data: "item_16" }, { orderable: false, data: "project" }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, buttons: [], }); var table = $("#example").DataTable({ dom: "p>", scrollX: true, responsive: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, null], [1, "asc"], [2, "desc"], [3, "desc"], [4, "desc"], [5, "desc"], ], order: [[1, "asc"]], processing: true, ajax: { url: root_local + "users/provinces-projects-count", type: "GET", dataSrc: function (json) { hideLoaderScreen() totalCounts = json.data.count; return json.data.projects; }, }, columns: [ { data: null, render: function (data, type, row, meta) { return meta.row + 1; }, }, { data: "province_name" }, { data: "roadItemsProjects" }, { data: "roadPatrolProjects" }, { data: "fastReaction" }, { data: "projectsCount" }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, buttons: [], footerCallback: function (row, data, start, end, display) { var api = this.api(); // console.log(totalCounts); // Update footer $(api.column(0).footer()).html(""); $(api.column(1).footer()).html("مجموع"); if (totalCounts != null) { $(api.column(2).footer()).html(totalCounts.roadItemsCount); $(api.column(3).footer()).html(totalCounts.roadPatrolCount); $(api.column(4).footer()).html(totalCounts.fastReaction); $(api.column(5).footer()).html(totalCounts.totalCount); } }, }); // mohammad edit start var testItemsTable = $("#exampleTestItems").DataTable({ // dom: "lBfrtip", dom: "p>", scrollX: true, responsive: true, // pagingType: "full_numbers", pagingType: "simple_numbers", searching: true, paging: true, ordering: true, info: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, processing: true, ajax: { url: "https://rms.rmto.ir/api/testitems", type: "GET", dataSrc: function (json) { // totalCounts = json.data.count; // console.log(json.data); return json.data; }, }, columns: [ { data: "city_na" }, { data: "items.1", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.2", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.3", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.4", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.5", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.6", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.7", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.8", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.9", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.10", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.11", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.12", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.13", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.14", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.15", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.16", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "items.20", render: function (data, type, row) { if (data == undefined) { return ""; } else { return data; } }, }, { data: "count_items" }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, buttons: [], }); // mohammad edit end $("#example").on("click", "button.show_table", function (e) { e.preventDefault(); province_id = table.row($(this).parents("tr")).data().province_id; $(".ostan-main").css("display", "block"); $(".riz-main").css("display", "block"); var tablee = $("#examplee").DataTable({ // dom: "lBfrtip", dom: "p>", destroy: true, scrollX: true, responsive: true, // "pagingType": "full_numbers", pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"], [1, "asc"], [2, "desc"], [3, "desc"], [4, "desc"], ], // order: [[1, "asc"]], processing: true, ajax: { url: root_local + "users/province-cities-projects-count?province-id=" + province_id, type: "GET", dataSrc: function (json) { totalCountsecond = json.data.count; return json.data.projects; }, }, columns: [ { data: null, render: function (data, type, row, meta) { // console.log(meta.row); return meta.row + 1; }, }, { data: "city_name" }, { data: "roadItemsProjects" }, { data: "roadPatrolProjects" }, { data: "projectsCount" }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, buttons: [], footerCallback: function (row, data, start, end, display) { var api = this.api(); // console.log(totalCounts); // Update footer $(api.column(0).footer()).html(""); $(api.column(1).footer()).html("مجموع"); if (totalCountsecond != null) { $(api.column(2).footer()).html(totalCountsecond.roadItemsCount); $(api.column(3).footer()).html(totalCountsecond.roadPatrolCount); $(api.column(4).footer()).html(totalCountsecond.totalCount); } }, }); //riz faliat tableriz = $("#exampleriz").DataTable({ dom: "p>", destroy: true, scrollX: true, responsive: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"], [1, "pstring-desc"], [2, "pstring-desc"], [3, "pstring-desc"], [4, "asc"], ], processing: true, ajax: { url: root_local + "projects/getrirpadmin/" + province_id, type: "GET", dataSrc: function (json) { console.log("test", json.data[0]) // if (json.data[0]) // //hide // if (json.data[0].sub_projects.item!=unde){ // console.log(json.data[0][36].sub_projects.item) // console.log(json.data[0][1].sub_projects[i].item) return json.data[0]; }, }, columns: [ { data: null, render: function (data, type, row, meta) { // console.log(meta.row); return meta.row + 1; }, }, { data: "user" }, { data: "type" }, { data: null, render: function (data, type, row) { if (data.type == "فعالیت روزانه و جاری راهداری") { if (data.item != undefined) { if (data.item == 1) { return " مرمت رویه"; } else if (data.item == 2) { return " پاکسازی"; } else if (data.item == 3) { return "علائم"; } else if (data.item == 4) { return "حفاظ"; } else if (data.item == 5) { return "روشنایی"; } else if (data.item == 6) { return " خط کشی"; } else if (data.item == 7) { return " رنگ آمیزی"; } else if (data.item == 8) { return " شستشو‌"; } else if (data.item == 9) { return " ایمن سازی"; } else if (data.item == 10) { return "حریم"; } else if (data.item == 11) { return "پل"; } else if (data.item == 12) { return " تونل و گالری"; } else if (data.item == 13) { return " عملیات زمستانی"; } else if (data.item == 14) { return " ماشین آلات"; } else if (data.item == 15) { return " راهدارخانه"; } else if (data.item == 16) { return " موارد اضطراری"; } else if (data.item == 20) { return "آیتم های بازدید و بازرسی و کنترل"; } else return "_"; } } else if (data.type == "گشت راهداری و ترابری") { if ( data.sub_projects != undefined && data.sub_projects.length != 0 ) { let textfile = " "; for (var i = 0; i < data.sub_projects.length; i++) { if (data.sub_projects[i].item == 1) { textfile += i + 1 + ")" + " " + " مرمت رویه"; } else if (data.sub_projects[i].item == 2) { textfile += i + 1 + ")" + " " + "پاکسازی" + "
"; } else if (data.sub_projects[i].item == 3) { textfile += i + 1 + ")" + " " + "علائم" + "
"; } else if (data.sub_projects[i].item == 4) { textfile += i + 1 + ")" + " " + "حفاظ" + "
"; } else if (data.sub_projects[i].item == 5) { textfile += i + 1 + ")" + " " + "روشنایی" + "
"; } else if (data.sub_projects[i].item == 6) { textfile += i + 1 + ")" + " " + "خط کشی" + "
"; } else if (data.sub_projects[i].item == 7) { textfile += i + 1 + ")" + " " + "رنگ آمیزی" + "
"; } else if (data.sub_projects[i].item == 8) { textfile += i + 1 + ")" + " " + "شستشو‌" + "
"; } else if (data.sub_projects[i].item == 9) { textfile += i + 1 + ")" + " " + "ایمن سازی" + "
"; } else if (data.sub_projects[i].item == 10) { textfile += i + 1 + ")" + " " + "حریم" + "
"; } else if (data.sub_projects[i].item == 11) { textfile += i + 1 + ")" + " " + "پل" + "
"; } else if (data.sub_projects[i].item == 12) { textfile += i + 1 + ")" + " " + " تونل و گالری" + "
"; } else if (data.sub_projects[i].item == 13) { textfile += i + 1 + ")" + " " + "عملیات زمستانی" + "
"; } else if (data.sub_projects[i].item == 14) { textfile += i + 1 + ")" + " " + " ماشین آلات" + "
"; } else if (data.sub_projects[i].item == 15) { textfile += i + 1 + ")" + " " + " راهدارخانه" + "
"; } else if (data.sub_projects[i].item == 16) { textfile += i + 1 + ")" + " " + " موارد اضطراری" + "
"; } else if (data.sub_projects[i].item == 17) { textfile += i + 1 + ")" + " " + " گزارش گشت راهداری" + "
"; } else if (data.sub_projects[i].item == 18) { textfile += i + 1 + ")" + " " + " کشیک راهداری زمستانی" + "
"; } else if (data.sub_projects[i].item == 19) { textfile += i + 1 + ")" + " " + " ناوگان حمل و نقل عمومی" + "
"; } else textfile += "_" + "
"; } return textfile; } else return "_"; } else return "_"; }, }, { data: null, render: function (data, type, row) { if (data.type == "فعالیت روزانه و جاری راهداری") { if (data.item != undefined) { // return data.item if (data.item == 1) { let textfile = ""; if (data.sub_items == 1) { textfile += "ترمیم افتادگی لبه آسفالت" + "
"; } if (data.sub_items == 2) { textfile += "شانه سازی" + "
"; } if (data.sub_items == 3) { textfile += "پر کردن گودافتادگی یا چاله با آسفالت" + "
"; } if (data.sub_items == 4) { textfile += "لکه گیری هندسی راه" + "
"; } if (data.sub_items == 5) { textfile += "مرمت آبشستگی راه ها و شانه راه ها" + "
"; } if (data.sub_items == 6) { textfile += "تنظیم سطح بستر حریم" + "
"; } if (data.sub_items == 7) { textfile += "درزگیری" + "
"; } if (data.sub_items == 8) { textfile += "مضرس کردن سطح راه ها" + "
"; } if (data.sub_items == 9) { textfile += "تراش رویه های موج زده" + "
"; } if (data.sub_items == 10) { textfile += "تیغ زنی راه های روستایی" + "
"; } if (data.sub_items == 11) { textfile += "شن ریزی، تسطیح و کمپکت راه روستایی" + "
"; } if (data.sub_items == 12) { textfile += "عملیات تسطیح، خاکبرداری و خاکریزی در رفوژ میانی" + "
"; } return textfile; } else if (data.item == 2) { let textfile = ""; if (data.sub_items == 1) { textfile += "پاک سازی و جاروزنی سطح راه" + "
"; } if (data.sub_items == 2) { textfile += "پاک سازی و تنقیه آبروهای کوچک و کالورت ها" + "
"; } if (data.sub_items == 3) { textfile += "پاک سازی سطح راه از لاشه حیوانات" + "
"; } if (data.sub_items == 4) { textfile += "پاک سازی قنوها و آبروهای طولی" + "
"; } if (data.sub_items == 5) { textfile += "پاک سازی سطح راه از آثار تصادفات" + "
"; } if (data.sub_items == 6) { textfile += "علف کنی و بوته کنی از حاشیه راه" + "
"; } if (data.sub_items == 7) { textfile += "پاک سازی حریم راه از مواد زائد و نخاله های ساختمانی" + "
"; } if (data.sub_items == 8) { textfile += "جمع آوری قطعات آسیب دیده حفاظ، علائم و ..." + "
"; } if (data.sub_items == 9) { textfile += "پاکسازی پارکینگ راه ها" + "
"; } if (data.sub_items == 10) { textfile += "پاکسازی کناره قرنیز پل ها، دیواره تونل ها، جداول و نیوجرسی از مصالح انباشته شده" + "
"; } if (data.sub_items == 11) { textfile += "پاکسازی و تمیزکاری جزیره های میانی" + "
"; } if (data.sub_items == 12) { textfile += "پاکسازی و تنقیه داخل پل ها" + "
"; } if (data.sub_items == 13) { textfile += "پاکسازی و تنقیه سیفون ها" + "
"; } if (data.sub_items == 14) { textfile += "پاکسازی و جمع آوری شاخه درختان از دهانه آبنماهای لوله ای" + "
"; } if (data.sub_items == 15) { textfile += "پاکسازی سطح راه از مواد نفتی یا روغنی" + "
"; } if (data.sub_items == 16) { textfile += "علف کنی و بوته کنی به صورت دستی اطراف تابلو، علائم و ..." + "
"; } if (data.sub_items == 17) { textfile += "ریزش برداری" + "
"; } if (data.sub_items == 18) { textfile += "جمع آوری خرده سنگ های ریزشی" + "
"; } if (data.sub_items == 19) { textfile += "لایروبی" + "
"; } return textfile; } else if (data.item == 3) { let textfile = ""; if (data.sub_items == 1) { textfile += "نصب تابلوهای اخطاری، انتظامی و مسیرنمای جدید" + "
"; } if (data.sub_items == 2) { textfile += "نصب تابلوهای اطلاعاتی جدید" + "
"; } if (data.sub_items == 3) { textfile += "تعویض شبرنگ تابلوهای اطلاعاتی" + "
"; } if (data.sub_items == 4) { textfile += "نصب بازتاب بر روی گاردریل و حفاظ های حاشیه راه و چشم گربه ای" + "
"; } if (data.sub_items == 5) { textfile += "تعویض صفحه تابلوهای اخطاری، انتظامی فاقد بازتاب و معیوب" + "
"; } if (data.sub_items == 6) { textfile += "مرمت شکستگی، خم شدگی و ... تابلوهای اطلاعاتی" + "
"; } if (data.sub_items == 7) { textfile += "اصلاح کج شدگی پایه تابلوها و علائم" + "
"; } if (data.sub_items == 8) { textfile += "نصب یا برداشت علائم موقت" + "
"; } return textfile; } else if (data.item == 4) { let textfile = ""; if (data.sub_items == 1) { textfile += "ارتقای حفاظ موجود میانی راه ها با حفاظ های مرسوم یا سایر روش ها" + "
"; } if (data.sub_items == 2) { textfile += "ارتقای حفاظ موجود پل ها و پرتگاه ها با حفاظ های مرسوم یا سایر روش ها" + "
"; } if (data.sub_items == 3) { textfile += "بهسازی حفاظ های موجود و آسیب دیده" + "
"; } return textfile; } else if (data.item == 5) { let textfile = ""; if (data.sub_items == 1) { textfile += "نگهداری و پاکسازی روشنایی طولی راه" + "
"; } if (data.sub_items == 2) { textfile += "نگهداری و پاکسازی روشنایی نقطه ای پارکینگ در حاشیه راه" + "
"; } if (data.sub_items == 3) { textfile += "نگهداری و پاکسازی روشنایی نقطه ای تقاطع در حاشیه راه" + "
"; } if (data.sub_items == 4) { textfile += "نگهداری و پاکسازی روشنایی نقطه ای محل نصب دوربین در حاشیه راه" + "
"; } if (data.sub_items == 5) { textfile += "نگهداری و پاکسازی روشنایی طولی نواحی یا گردنه های مه گیر" + "
"; } if (data.sub_items == 6) { textfile += "نگهداری و پاکسازی روشنایی تونل" + "
"; } if (data.sub_items == 7) { textfile += "تعمیرات شبکه روشنایی، کابل" + "
"; } if (data.sub_items == 8) { textfile += "تعمیرات شبکه روشنایی روشنایی، کله چراغ" + "
"; } if (data.sub_items == 9) { textfile += "تعمیرات شبکه روشنایی، مفصل زنی" + "
"; } if (data.sub_items == 10) { textfile += "تعمیرات شبکه روشنایی، تعمیر تابلو" + "
"; } if (data.sub_items == 11) { textfile += "تعمیرات برج نوری" + "
"; } return textfile; } else if (data.item == 6) { let textfile = ""; if (data.sub_items == 1) { textfile += "خط کشی با رنگ گرم ترافیکی" + "
"; } if (data.sub_items == 2) { textfile += "خط کشی با رنگ سرد ترافیکی" + "
"; } if (data.sub_items == 3) { textfile += "ترسیم نقوش، فلش، خط نوشته و ..." + "
"; } if (data.sub_items == 4) { textfile += "اجرای اکستروژن طولی" + "
"; } if (data.sub_items == 5) { textfile += "اجرای اکستروژن عرضی" + "
"; } if (data.sub_items == 6) { textfile += "پاک کردن خطوط ترافیکی از سطح راه" + "
"; } return textfile; } else if (data.item == 7) { let textfile = ""; if (data.sub_items == 1) { textfile += "رنگ آمیزی پایه تابلوها" + "
"; } if (data.sub_items == 2) { textfile += "رنگ آمیزی پایه چراغ ها" + "
"; } if (data.sub_items == 3) { textfile += "رنگ آمیزی پایه های روشنایی" + "
"; } if (data.sub_items == 4) { textfile += "رنگ آمیزی پل های عابر پیاده" + "
"; } if (data.sub_items == 5) { textfile += "رنگ آمیزی پایه تابلوهای دروازه ای" + "
"; } if (data.sub_items == 6) { textfile += "رنگ آمیزی حفاظ های فلزی" + "
"; } if (data.sub_items == 7) { textfile += "رنگ آمیزی نیوجرسی ها و سایر حفاظ های بتنی" + "
"; } if (data.sub_items == 8) { textfile += "رنگ آمیزی سرعتگاه ها" + "
"; } if (data.sub_items == 9) { textfile += "رنگ آمیزی پایه و کوله پل ها جهت آشکارسازی" + "
"; } return textfile; } else if (data.item == 8) { let textfile = ""; if (data.sub_items == 1) { textfile += "شستشوی علائم ایمنی اخطاری، انتظامی، مسیرنما و ..." + "
"; } if (data.sub_items == 2) { textfile += " شستشوی تابلوهای اطلاعاتی" + "
"; } if (data.sub_items == 3) { textfile += " شستشوی جداول" + "
"; } if (data.sub_items == 4) { textfile += " شستشوی نیوجرسی ها" + "
"; } if (data.sub_items == 5) { textfile += " شستشوی گاردریل ها و هندریل ها" + "
"; } if (data.sub_items == 6) { textfile += "شستشوی دیواره تونل ها" + "
"; } if (data.sub_items == 7) { textfile += "شستشوی تیکه گاه پل ها" + "
"; } return textfile; } else if (data.item == 9) { let textfile = ""; if (data.sub_items == 1) { textfile += "ایمن سازی سرگاردریل، موانع صلب، دماغه ها و موانع صلب" + "
"; } if (data.sub_items == 2) { textfile += "ایمن سازی شیب شیروانی ها" + "
"; } if (data.sub_items == 3) { textfile += "اجرای استراحتگاه" + "
"; } if (data.sub_items == 4) { textfile += "تعمیرات چراغ های آذرخشی و چشمک زن" + "
"; } if (data.sub_items == 5) { textfile += "ایجاد شیراهای لرزاننده طولی لاین کنار" + "
"; } if (data.sub_items == 6) { textfile += "ضربه گیر استوانه ای" + "
"; } if (data.sub_items == 7) { textfile += "نصب سرعت گیر استاندارد پلاستیکی" + "
"; } if (data.sub_items == 8) { textfile += "ایجاد شیارهای لرزاننده طولی در اکس راه های دوطرفه" + "
"; } if (data.sub_items == 9) { textfile += "ایجاد شیارهای لرزاننده عرضی" + "
"; } if (data.sub_items == 10) { textfile += "استوانه ایمنی جهت هدایت ترافیک" + "
"; } if (data.sub_items == 11) { textfile += "احداث سرعتگیر آسفالتی" + "
"; } if (data.sub_items == 12) { textfile += "اجرای هره خاکی نقطه ای" + "
"; } if (data.sub_items == 13) { textfile += "اجرای هره خاکی طولی" + "
"; } if (data.sub_items == 14) { textfile += "تعریض مقطعی جهت خروج اضطراری در سراشیبی ها" + "
"; } if (value == 15) { textfile += "حذف یا جا به جایی موانع صلب در حاشیه راه در محدوده عاری از مانع" + "
"; } return textfile; } else if (data.item == 10) { let textfile = ""; if (data.sub_items == 1) { textfile += "اخطار، تخریب، بازدید و یا تهیه اطلاعات از ساخت و ساز در حریم" + "
"; } if (data.sub_items == 2) { textfile += "اخطار، تخریب، بازدید و یا تهیه اطلاعات از ایجاد راه دسترسی در حریم" + "
"; } if (data.sub_items == 3) { textfile += "اخطار، تخریب، بازدید و یا تهیه اطلاعات از عبور تاسیسات زیر بنایی در حریم" + "
"; } if (data.sub_items == 4) { textfile += "برخورد با دستفروشان حاشیه راه" + "
"; } if (data.sub_items == 5) { textfile += "جمع آوری تابلوهای غیرمجاز در حاشیه راه ها" + "
"; } if (data.sub_items == 6) { textfile += "جمع آوری بنرهای تبلیغاتی غیرمجاز" + "
"; } return textfile; } else if (data.item == 11) { let textfile = ""; if (data.sub_items == 1) { textfile += "احداث یا مرمت قرنیز پل" + "
"; } if (data.sub_items == 2) { textfile += "لوله گذاری آبروها" + "
"; } if (data.sub_items == 3) { textfile += "تطویل و رفع انسداد آبچکان پل ها" + "
"; } if (data.sub_items == 4) { textfile += "بازسازی نرده پل" + "
"; } if (data.sub_items == 5) { textfile += "تعمیرات آبرو شامل کوله دستک و دال" + "
"; } if (data.sub_items == 6) { textfile += "مرمت و بازسازی درز انبساط" + "
"; } if (data.sub_items == 7) { textfile += "تعمیرات رادیه و برید" + "
"; } return textfile; } else if (data.item == 12) { let textfile = ""; if (data.sub_items == 1) { textfile += "زهکشی طاق تونل" + "
"; } if (data.sub_items == 2) { textfile += "مرمت و بازرسی آبروهای هدایت آب" + "
"; } if (data.sub_items == 3) { textfile += "لاینینگ" + "
"; } if (data.sub_items == 4) { textfile += "تعمیر و بازسازی گالری" + "
"; } if (data.sub_items == 5) { textfile += "گاباریت" + "
"; } if (data.sub_items == 6) { textfile += "نگهداری دوربین ها و ابزار دقیق" + "
"; } if (data.sub_items == 7) { textfile += "نگهداری تهویه تونل" + "
"; } return textfile; } else if (data.item == 13) { let textfile = ""; if (data.sub_items == 1) { textfile += "عملیات یخ زدایی با شن و نمک پاشی" + "
"; } if (data.sub_items == 2) { textfile += "برف روبی" + "
"; } if (data.sub_items == 3) { textfile += "برف روبی با بولدوزر و ماشین برف خور" + "
"; } if (data.sub_items == 4) { textfile += "برف روبی در شرایط کولاک و عدم دید" + "
"; } if (data.sub_items == 5) { textfile += "میزان نمک و شن و ماسه مصرفی" + "
"; } if (data.sub_items == 6) { textfile += "ریزش برداری" + "
"; } if (data.sub_items == 7) { textfile += "مسافرین اسکان داده شده" + "
"; } if (data.sub_items == 8) { textfile += "کمک رسانی به خودرو" + "
"; } return textfile; } else if (data.item == 14) { let textfile = ""; if (data.sub_items == 1) { textfile += "بنزین مصرفی کل ماشین آلات فعال - ماهانه" + "
"; } if (data.sub_items == 2) { textfile += "گازوئیل مصرفی کل ماشین آلات فعال - ماهانه" + "
"; } if (data.sub_items == 3) { textfile += "مواد مصرفی نفتی و انواع روغن - ماهانه" + "
"; } if (data.sub_items == 4) { textfile += "بازسازی و راه اندازی ماشین آلات" + "
"; } if (data.sub_items == 5) { textfile += "خرید ماشین آلات" + "
"; } if (data.sub_items == 6) { textfile += "خرید تجهیزآلات مرتبط به ماشین آلات" + "
"; } if (data.sub_items == 7) { textfile += "بازدید کارشناسان از ماشین آلات استان" + "
"; } if (data.sub_items == 8) { textfile += "سرویس کاری و تعمیرات جرئی روزانه" + "
"; } if (data.sub_items == 9) { textfile += "شستشوی نمک پاش ها و سایر ماشین آلات" + "
"; } if (data.sub_items == 10) { textfile += "جا به جایی دستگاه های سنگین راهداری" + "
"; } return textfile; } else if (data.item == 15) { let textfile = ""; if (data.sub_items == 1) { textfile += "راهدارخانه های بازسازی شده" + "
"; } if (data.sub_items == 2) { textfile += "خرید تجهیزآلات مرتبط با راهدارخانه ها" + "
"; } if (data.sub_items == 3) { textfile += "جلسات تشکیل شده در خصوص مدیریت بحران و پدافند غیرعامل" + "
"; } if (data.sub_items == 4) { textfile += "تعمیرات جزئی و موردی راهدارخانه ها" + "
"; } return textfile; } else if (data.item == 16) { let textfile = ""; if (data.sub_items == 1) { textfile += "پاک سازی سطح راه و رفع انسداد ناشی از ریزش کوه و سقوط بهمن" + "
"; } if (data.sub_items == 2) { textfile += "برقراری تردد و رفع انسداد ناشی از وقوع تصادف یا واژگونی وسایط نقلیه و پخش محموله در سطح راه" + "
"; } if (data.sub_items == 3) { textfile += "برقراری ارتباط و رفع انسداد ناشی از شن های روان" + "
"; } if (data.sub_items == 4) { textfile += "برقراری ارتباط در راه هایی که به دلیل آب بردگی دچار قطع ارتباط شده اند" + "
"; } if (data.sub_items == 5) { textfile += "برقراری ارتباط موقت در راه هایی که به دلیل شکستگی پل یا ریزش تونل یا ... قطع شده اند" + "
"; } if (data.sub_items == 6) { textfile += "بستن راه و هدایت ترافیکی در مواقع اضطراری" + "
"; } if (data.sub_items == 7) { textfile += "بازگشایی محورهایی که به علت کولاک مسدود شده اند" + "
"; } if (data.sub_items == 8) { textfile += "جا به جایی ماشین های سنگین گرفتار در سطح راه" + "
"; } if (data.sub_items == 9) { textfile += "لق گیری" + "
"; } return textfile; } else if (data.item == 17) { let textfile = ""; if (data.sub_items == 1) { textfile += "بازدید ادواری از ابنیه فنی و تکمیل چک لیست های مربوط توسط کارشناسان (نفر - ساعت)" + "
"; } if (data.sub_items == 2) { textfile += "بازدید ادواری از وضعیت علائم و تعیین کسری علائم و ارزیابی وضعیت خط کشی ها، تجهیزات روشنایی و تهویه تونلها و گاردریل و نظایر آنها و تکمیل چک لیستها توسط کارشناسان (نفر -ساعت)" + "
"; } if (data.sub_items == 3) { textfile += "ارزیابی ادواری وضعیت پایداری ترانشه ها و شیروانی ها، سیستم های زهکشی و ارزیابی علل ریزش ترانشه ها و علل شکست راه و تکمیل چک لیست توسط کارشناسان (نفر - ساعت)" + "
"; } if (data.sub_items == 4) { textfile += "ارزیابی ادواری وضعیت رویه های آسفالتی و شانه ها و ارزیابی و کنترل ترکها و تکمیل چک لیستها توسط کارشناسان (کیلومتر)" + "
"; } if (data.sub_items == 5) { textfile += "بررسی وضعیت حریم راه و تهیه گزارش مربوط با تجهیز و اعزام کارشناس (کیلومتر)" + "
"; } if (data.sub_items == 6) { textfile += "بازدید کارشناسان از ماشین آلات استان (تعداد دستگاه)" + "
"; } return textfile; } else return "_"; // return data.sub_items } else return "_"; } else if (data.type == "گشت راهداری و ترابری") { if ( data.sub_projects != undefined && data.sub_projects.length != 0 ) { let textfile = ""; for (var i = 0; i < data.sub_projects.length; i++) { if (data.sub_projects[i].item == 1) { data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ترمیم افتادگی لبه آسفالت" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "شانه سازی" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پر کردن گودافتادگی یا چاله با آسفالت" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "لکه گیری هندسی راه" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مرمت آبشستگی راه ها و شانه راه ها" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تنظیم سطح بستر حریم" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 2) { // textfilee += "test2" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی و جاروزنی سطح راه" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی و تنقیه آبروهای کوچک" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی سطح راه از لاشه حیوانات" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی قنوها و آبروهای طولی" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی سطح راه از آثار تصادفات" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "علف کنی و بوته کنی" + "
"; } if (value == 7) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی حریم راه از مواد زائد و نخاله های ساختمانی" + "
"; } if (value == 8) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "جمع آوری قطعات آسیب دیده حفاظ، علائم و ..." + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 3) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نصب تابلوهای اخطاری، انتظامی و مسیرنما" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نصب تابلوهای اطلاعاتی" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعویض شبرنگ تابلوهای اطلاعاتی" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نصب بازتاب بر روی گاردریل و حفاظ های حاشیه راه و چشم گربه ای" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 4) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ارتقای حفاظ میانی راه ها" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ارتقای حفاظ پل ها و پرتگاه ها" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بهسازی حفاظ های موجود" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 5) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "روشنایی طولی راه" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "روشنایی نقطه ای پارکینگ در حاشیه راه" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "روشنایی نقطه ای تقاطع در حاشیه راه" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "روشنایی نقطه ای محل نصب دوربین در حاشیه راه" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "روشنایی طولی نواحی یا گردنه های مه گیر" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "روشنایی تونل" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 6) { // let textfile = "test6" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "خط کشی با رنگ گرم ترافیکی" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "خط کشی با رنگ سرد ترافیکی" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ترسیم نقوش، فلش، خط نوشته و ..." + "
"; } }); // textfilee +="test6" } else if (data.sub_projects[i].item == 7) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "رنگ آمیزی پایه تابلوها" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "رنگ آمیزی پایه چراغ ها" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "رنگ آمیزی پایه های روشنایی" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "رنگ آمیزی پل های عابر پیاده" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "رنگ آمیزی پایه تابلوهای دروازه ای" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "رنگ آمیزی حفاظ ها" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 8) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "شستشوی علائم ایمنی اخطاری، انتظامی، مسیرنما و ..." + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + " شستشوی تابلوهای اطلاعاتی" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + " شستشوی جداول" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + " شستشوی نیوجرسی ها" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + " شستشوی گاردریل ها و هندریل ها" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "شستشوی دیواره تونل ها" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 9) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ایمن سازی سرگاردریل، موانع صلب، دماغه ها و موانع صلب" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ایمن سازی شیب شیروانی ها" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "اجرای استراحتگاه" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نصب و راه اندازی چراغ های آذرخشی و چشمک زن" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ایجاد شیراهای لرزاننده طولی" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ضربه گیر استوانه ای" + "
"; } if (value == 7) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نصب سرعت گیر استاندارد پلاستیکی" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 10) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ساخت و ساز" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "عبور تاسیسات زیربنایی" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "راه دسترسی اختصاصی" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "راه دسترسی تجمیع شده" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 11) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعمیرات الواسیون" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "دراواسیون و تنظیم بستر پل های بالای 6 متر" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "احداث رادیه و برید" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مرمت و بازسازی درز انبساط" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بازسازی نرده پل" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 12) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "زهکشی طاق تونل" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مرمت و بازرسی آبروهای هدایت آب" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "لاینینگ" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعمیر و بازسازی گالری" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "گاباریت" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 13) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "عملیات یخ زدایی با شن و نمک پاشی" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برف روبی با گریدر یا تیغه برف روب" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برف روبی با بولدوزر و ماشین برف خور" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برف روبی در شرایط کولاک و عدم دید" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "میزان نمک مصرفی" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ریزش برداری" + "
"; } if (value == 7) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مسافرین اسکان داده شده" + "
"; } if (value == 8) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کمک رسانی به خودرو رهاشده" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 14) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بنزین مصرفی کل ماشین آلات فعال" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "گازوئیل مصرفی کل ماشین آلات فعال" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مواد مصرفی نفتی و انواع روغن" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بازسازی و راه اندازی ماشین آلات" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "خرید ماشین آلات" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "خرید تجهیزآلات مرتبط به ماشین آلات" + "
"; } if (value == 7) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بازدید کارشناسان از ماشین آلات استان" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 15) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "راهدارخانه های بازسازی شده" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "خرید تجهیزآلات مرتبط با راهدارخانه ها" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "جلسات تشکیل شده در خصوص مدیریت بحران و پدافند غیرعامل" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 16) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی سطح راه و رفع انسداد ناشی از ریزش کوه و سقوط بهمن" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برقراری تردد و رفع انسداد ناشی از وقوع تصادف یا واژگونی وسایط نقلیه و پخش محموله در سطح راه" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برقراری ارتباط و رفع انسداد ناشی از شن های روان" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برقراری ارتباط در راه هایی که به دلیل آب بردگی دچار قطع ارتباط شده اند" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برقراری ارتباط موقت در راه هایی که به دلیل شکستگی پل یا ریزش تونل یا ... قطع شده اند" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بستن راه و هدایت ترافیکی در مواقع اضطراری" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 17) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی سطح راه و رفع انسداد ناشی از ریزش کوه و سقوط بهمن" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برقراری تردد و رفع انسداد ناشی از وقوع تصادف یا واژگونی وسایط نقلیه و پخش محموله در سطح راه" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برقراری ارتباط و رفع انسداد ناشی از شن های روان" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برقراری ارتباط در راه هایی که به دلیل آب بردگی دچار قطع ارتباط شده اند" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برقراری ارتباط موقت در راه هایی که به دلیل شکستگی پل یا ریزش تونل یا ... قطع شده اند" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بستن راه و هدایت ترافیکی در مواقع اضطراری" + "
"; } }); // return textfile } else return "_"; } return textfile; } else return "_"; } else return "_"; // return data.item }, }, { data: null, render: function (data, type, row) { if (data.type == "فعالیت روزانه و جاری راهداری") { if (data.item != undefined) { if (data.sub_items_data != null) { if (data.item == 1) { let textfile = ""; if (data.sub_items == 1) { if ( data.sub_items_data["reconstruction1-1"] != undefined ) { textfile += data.sub_items_data["reconstruction1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if ( data.sub_items_data["reconstruction2-1"] != undefined ) { textfile += data.sub_items_data["reconstruction2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if ( data.sub_items_data["reconstruction3-1"] != undefined ) { textfile += data.sub_items_data["reconstruction3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["reconstruction4-1"]) { textfile += data.sub_items_data["reconstruction4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if ( data.sub_items_data["reconstruction5-1"] != undefined ) { textfile += data.sub_items_data["reconstruction5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if ( data.sub_items_data["reconstruction6-1"] != undefined ) { textfile += data.sub_items_data["reconstruction6-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if ( data.sub_items_data["reconstruction7-1"] != undefined ) { textfile += data.sub_items_data["reconstruction7-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if ( data.sub_items_data["reconstruction8-1"] != undefined ) { textfile += data.sub_items_data["reconstruction8-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if ( data.sub_items_data["reconstruction9-1"] != undefined ) { textfile += data.sub_items_data["reconstruction9-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 10) { if ( data.sub_items_data["reconstruction10-1"] != undefined ) { textfile += data.sub_items_data["reconstruction10-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 11) { if ( data.sub_items_data["reconstruction11-1"] != undefined ) { textfile += data.sub_items_data["reconstruction11-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 12) { if ( data.sub_items_data["reconstruction12-1"] != undefined ) { textfile += data.sub_items_data["reconstruction12-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 13) { if ( data.sub_items_data["reconstruction13-1"] != undefined ) { textfile += data.sub_items_data["reconstruction13-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 2) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["cleaning1-1"] != undefined) { textfile += data.sub_items_data["cleaning1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["cleaning2-1"] != undefined) { textfile += data.sub_items_data["cleaning2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["cleaning3-1"] != undefined) { textfile += data.sub_items_data["cleaning3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["cleaning4-1"] != undefined) { textfile += data.sub_items_data["cleaning4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["cleaning5-1"] != undefined) { textfile += data.sub_items_data["cleaning5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["cleaning6-1"] != undefined) { textfile += data.sub_items_data["cleaning6-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["cleaning7-1"] != undefined) { textfile += data.sub_items_data["cleaning7-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["cleaning8-1"] != undefined) { textfile += data.sub_items_data["cleaning8-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["cleaning9-1"] != undefined) { textfile += data.sub_items_data["cleaning9-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 10) { if (data.sub_items_data["cleaning10-1"] != undefined) { textfile += data.sub_items_data["cleaning10-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 11) { if (data.sub_items_data["cleaning11-1"] != undefined) { textfile += data.sub_items_data["cleaning11-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 12) { if (data.sub_items_data["cleaning12-1"] != undefined) { textfile += data.sub_items_data["cleaning12-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 13) { if (data.sub_items_data["cleaning13-1"] != undefined) { textfile += data.sub_items_data["cleaning13-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 14) { if (data.sub_items_data["cleaning14-1"] != undefined) { textfile += data.sub_items_data["cleaning14-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 15) { if (data.sub_items_data["cleaning15-1"] != undefined) { textfile += data.sub_items_data["cleaning15-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 16) { if (data.sub_items_data["cleaning16-1"] != undefined) { textfile += data.sub_items_data["cleaning16-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 17) { if (data.sub_items_data["cleaning17-1"] != undefined) { textfile += data.sub_items_data["cleaning17-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 18) { if (data.sub_items_data["cleaning18-1"] != undefined) { textfile += data.sub_items_data["cleaning18-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 19) { if (data.sub_items_data["cleaning19-1"] != undefined) { textfile += data.sub_items_data["cleaning19-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 3) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["signs1-1"] != undefined) { textfile += data.sub_items_data["signs1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["signs2-1"] != undefined) { textfile += data.sub_items_data["signs2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["signs3-1"] != undefined) { textfile += data.sub_items_data["signs3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["signs4-1"] != undefined) { textfile += data.sub_items_data["signs4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["signs5-1"] != undefined) { textfile += data.sub_items_data["signs5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["signs6-1"] != undefined) { textfile += data.sub_items_data["signs6-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["signs7-1"] != undefined) { textfile += data.sub_items_data["signs7-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["signs8-1"] != undefined) { textfile += data.sub_items_data["signs8-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["signs9-1"] != undefined) { textfile += data.sub_items_data["signs9-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 4) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["shield1-1"] != undefined) { textfile += data.sub_items_data["shield1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["shield2-1"] != undefined) { textfile += data.sub_items_data["shield2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["shield3-1"] != undefined) { textfile += data.sub_items_data["shield3-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 5) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["lighting1-1"] != undefined) { textfile += data.sub_items_data["lighting1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["lighting2-1"] != undefined) { textfile += data.sub_items_data["lighting2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["lighting3-1"] != undefined) { textfile += data.sub_items_data["lighting3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["lighting4-1"] != undefined) { textfile += data.sub_items_data["lighting4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["lighting5-1"] != undefined) { textfile += data.sub_items_data["lighting5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["lighting6-1"] != undefined) { textfile += data.sub_items_data["lighting6-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["lighting7-1"] != undefined) { textfile += data.sub_items_data["lighting7-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["lighting8-1"] != undefined) { textfile += data.sub_items_data["lighting8-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["lighting9-1"] != undefined) { textfile += data.sub_items_data["lighting9-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 10) { if (data.sub_items_data["lighting10-1"] != undefined) { textfile += data.sub_items_data["lighting10-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 11) { if (data.sub_items_data["lighting11-1"] != undefined) { textfile += data.sub_items_data["lighting11-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 6) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["lining1-1"] != undefined) { textfile += data.sub_items_data["lining1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["lining2-1"] != undefined) { textfile += data.sub_items_data["lining2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["lining3-1"] != undefined) { textfile += data.sub_items_data["lining3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["lining4-1"] != undefined) { textfile += data.sub_items_data["lining4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["lining5-1"] != undefined) { textfile += data.sub_items_data["lining5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["lining6-1"] != undefined) { textfile += data.sub_items_data["lining6-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 7) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["coloring1-1"] != undefined) { textfile += data.sub_items_data["coloring1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["coloring2-1"] != undefined) { textfile += data.sub_items_data["coloring2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["coloring3-1"] != undefined) { textfile += data.sub_items_data["coloring3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["coloring4-1"] != undefined) { textfile += data.sub_items_data["coloring4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["coloring5-1"] != undefined) { textfile += data.sub_items_data["coloring5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["coloring6-1"] != undefined) { textfile += data.sub_items_data["coloring6-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["coloring7-1"] != undefined) { textfile += data.sub_items_data["coloring7-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["coloring8-1"] != undefined) { textfile += data.sub_items_data["coloring8-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["coloring9-1"] != undefined) { textfile += data.sub_items_data["coloring9-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 8) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["washing1-1"] != undefined) { textfile += data.sub_items_data["washing1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["washing2-1"] != undefined) { textfile += data.sub_items_data["washing2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["washing3-1"] != undefined) { textfile += data.sub_items_data["washing3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["washing4-1"] != undefined) { textfile += data.sub_items_data["washing4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["washing5-1"] != undefined) { textfile += data.sub_items_data["washing5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["washing6-1"] != undefined) { textfile += data.sub_items_data["washing6-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["washing7-1"] != undefined) { textfile += data.sub_items_data["washing7-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 9) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["securing1-1"] != undefined) { textfile += data.sub_items_data["securing1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["securing2-1"] != undefined) { textfile += data.sub_items_data["securing2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["securing3-1"] != undefined) { textfile += data.sub_items_data["securing3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["securing4-1"] != undefined) { textfile += data.sub_items_data["securing4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["securing5-1"] != undefined) { textfile += data.sub_items_data["securing5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["securing6-1"] != undefined) { textfile += data.sub_items_data["securing6-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["securing7-1"] != undefined) { textfile += data.sub_items_data["securing7-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["securing8-1"] != undefined) { textfile += data.sub_items_data["securing8-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["securing9-1"] != undefined) { textfile += data.sub_items_data["securing9-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 10) { if (data.sub_items_data["securing10-1"] != undefined) { textfile += data.sub_items_data["securing10-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 11) { if (data.sub_items_data["securing11-1"] != undefined) { textfile += data.sub_items_data["securing11-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 12) { if (data.sub_items_data["securing12-1"] != undefined) { textfile += data.sub_items_data["securing12-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 13) { if (data.sub_items_data["securing13-1"] != undefined) { textfile += data.sub_items_data["securing13-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 14) { if (data.sub_items_data["securing14-1"] != undefined) { textfile += data.sub_items_data["securing14-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 15) { if (data.sub_items_data["securing15-1"] != undefined) { textfile += data.sub_items_data["securing15-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 10) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["privacy1-1"] != undefined) { textfile += data.sub_items_data["privacy1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["privacy2-1"] != undefined) { textfile += data.sub_items_data["privacy2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["privacy3-1"] != undefined) { textfile += data.sub_items_data["privacy3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["privacy4-1"] != undefined) { textfile += data.sub_items_data["privacy4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["privacy5-1"] != undefined) { textfile += data.sub_items_data["privacy5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["privacy6-1"] != undefined) { textfile += data.sub_items_data["privacy6-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 11) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["bridge1-1"] != undefined) { textfile += data.sub_items_data["bridge1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["bridge2-1"] != undefined) { textfile += data.sub_items_data["bridge2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["bridge3-1"] != undefined) { textfile += data.sub_items_data["bridge3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["bridge4-1"] != undefined) { textfile += data.sub_items_data["bridge4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["bridge5-1"] != undefined) { textfile += data.sub_items_data["bridge5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["bridge6-1"] != undefined) { textfile += data.sub_items_data["bridge6-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["bridge7-1"] != undefined) { textfile += data.sub_items_data["bridge7-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 12) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["tunnel1-1"] != undefined) { textfile += data.sub_items_data["tunnel1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["tunnel2-1"] != undefined) { textfile += data.sub_items_data["tunnel2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["tunnel3-1"] != undefined) { textfile += data.sub_items_data["tunnel3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["tunnel4-1"] != undefined) { textfile += data.sub_items_data["tunnel4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["tunnel5-1"] != undefined) { textfile += data.sub_items_data["tunnel5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["tunnel6-1"] != undefined) { textfile += data.sub_items_data["tunnel6-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["tunnel7-1"] != undefined) { textfile += data.sub_items_data["tunnel7-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 13) { let textfile = ""; if (data.sub_items == 1) { if ( data.sub_items_data["winterOperation1-1"] != undefined ) { textfile += data.sub_items_data["winterOperation1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if ( data.sub_items_data["winterOperation2-1"] != undefined ) { textfile += data.sub_items_data["winterOperation2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if ( data.sub_items_data["winterOperation3-1"] != undefined ) { textfile += data.sub_items_data["winterOperation3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if ( data.sub_items_data["winterOperation4-1"] != undefined ) { textfile += data.sub_items_data["winterOperation4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if ( data.sub_items_data["winterOperation5-1"] != undefined ) { textfile += data.sub_items_data["winterOperation5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if ( data.sub_items_data["winterOperation6-1"] != undefined ) { textfile += data.sub_items_data["winterOperation6-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if ( data.sub_items_data["winterOperation7-1"] != undefined ) { textfile += data.sub_items_data["winterOperation7-1"] + "
"; } else textfile = "_" + "
"; } if (data.sub_items == 8) { if ( data.sub_items_data["winterOperation8-1"] != undefined ) { textfile += data.sub_items_data["winterOperation8-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 14) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["machinery1-1"] != undefined) { textfile += data.sub_items_data["machinery1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["machinery2-1"] != undefined) { textfile += data.sub_items_data["machinery2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["machinery3-1"] != undefined) { textfile += data.sub_items_data["machinery3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["machinery4-1"] != undefined) { textfile += data.sub_items_data["machinery4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["machinery5-1"] != undefined) { textfile += data.sub_items_data["machinery5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["machinery6-1"] != undefined) { textfile += data.sub_items_data["machinery6-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["machinery7-1"] != undefined) { textfile += data.sub_items_data["machinery7-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["machinery8-1"] != undefined) { textfile += data.sub_items_data["machinery8-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["machinery9-1"] != undefined) { textfile += data.sub_items_data["machinery9-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 10) { if (data.sub_items_data["machinery10-1"] != undefined) { textfile += data.sub_items_data["machinery10-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 15) { let textfile = ""; if (data.sub_items == 1) { if ( data.sub_items_data["tollhouse1-1"] != undefined && data.sub_items_data["tollhouse1-2"] != undefined ) { textfile += data.sub_items_data["tollhouse1-1"] + data.sub_items_data["tollhouse1-2"] + "
"; } else if ( data.sub_items_data["tollhouse1-1"] != undefined && data.sub_items_data["tollhouse1-2"] == undefined ) { textfile += data.sub_items_data["tollhouse1-1"] + "
"; } else if ( data.sub_items_data["tollhouse1-1"] == undefined && data.sub_items_data["tollhouse1-2"] != undefined ) { textfile += data.sub_items_data["tollhouse1-2"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if ( data.sub_items_data["tollhouse2-1"] != undefined && data.sub_items_data["tollhouse2-2"] != undefined ) { textfile += data.sub_items_data["tollhouse2-1"] + data.sub_items_data["tollhouse2-2"] + "
"; } else if ( data.sub_items_data["tollhouse2-1"] != undefined && data.sub_items_data["tollhouse2-2"] == undefined ) { textfile += data.sub_items_data["tollhouse2-1"] + "
"; } else if ( data.sub_items_data["tollhouse2-1"] == undefined && data.sub_items_data["tollhouse2-2"] != undefined ) { textfile += data.sub_items_data["tollhouse2-2"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["tollhouse3-1"] != undefined) { textfile += data.sub_items_data["tollhouse3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["tollhouse4-1"] != undefined) { textfile += data.sub_items_data["tollhouse4-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 16) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["emergency1-1"] != undefined) { textfile += data.sub_items_data["emergency1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["emergency2-1"] != undefined) { textfile += data.sub_items_data["tollhouse2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["emergency3-1"] != undefined) { textfile += data.sub_items_data["emergency3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["emergency4-1"] != undefined) { textfile += data.sub_items_data["emergency4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["emergency5-1"] != undefined) { textfile += data.sub_items_data["emergency5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["emergency6-1"] != undefined) { textfile += data.sub_items_data["emergency6-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["emergency7-1"] != undefined) { textfile += data.sub_items_data["emergency7-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["emergency8-1"] != undefined) { textfile += data.sub_items_data["emergency8-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["emergency9-1"] != undefined) { textfile += data.sub_items_data["emergency9-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 17) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["seeview1-1"] != undefined) { textfile += data.sub_items_data["seeview1-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["seeview2-1"] != undefined) { textfile += data.sub_items_data["seeview2-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["seeview3-1"] != undefined) { textfile += data.sub_items_data["seeview3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["seeview4-1"] != undefined) { textfile += data.sub_items_data["seeview4-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["seeview5-1"] != undefined) { textfile += data.sub_items_data["seeview5-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["seeview6-1"] != undefined) { textfile += data.sub_items_data["seeview6-1"] + "
"; } else textfile += "_" + "
"; } return textfile; } else return "_"; } else return "_"; } else return "_"; } else if ((data.type = "گشت راهداری و ترابری")) { if ( data.sub_projects != undefined && data.sub_projects.length != 0 ) { let textfile = ""; for (var i = 0; i < data.sub_projects.length; i++) { if (data.sub_projects[i].sub_items_data != null) { if (data.sub_projects[i].item == 1) { data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "reconstruction1-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "reconstruction1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "reconstruction2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "reconstruction2-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "reconstruction3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "reconstruction3-1" ] + "
"; // textfile+="تن" } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "reconstruction4-1" ] ) { textfile += data.sub_projects[i].sub_items_data[ "reconstruction4-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "reconstruction5-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "reconstruction5-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "reconstruction6-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "reconstruction6-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 2) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "cleaning1-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "cleaning2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning2-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "cleaning3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning3-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "cleaning4-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning4-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "cleaning5-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning5-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "cleaning6-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning6-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "cleaning7-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning7-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 8) { if ( data.sub_projects[i].sub_items_data[ "cleaning8-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning8-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 3) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data["signs1-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data["signs1-1"] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data["signs2-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data["signs2-1"] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data["signs3-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data["signs3-1"] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data["signs4-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data["signs4-1"] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 4) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "shield1-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "shield1-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "shield1-1-3" ] != undefined || data.sub_projects[i].sub_items_data[ "shield1-1-4" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "shield1-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "shield1-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "shield1-2-1" ] + "
"; } } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "shield2-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "shield2-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "shield2-1-3" ] != undefined || data.sub_projects[i].sub_items_data[ "shield2-1-4" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "shield2-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "shield2-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "shield2-2-1" ] + "
"; } } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "shield3-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "shield3-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "shield3-1-3" ] != undefined || data.sub_projects[i].sub_items_data[ "shield3-1-4" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "shield3-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "shield3-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "shield3-2-1" ] + "
"; } } }); // return textfile } else if (data.sub_projects[i].item == 5) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "lighting1-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting1-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting1-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting1-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "lighting1-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "lighting1-2-1" ] + "
"; } } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "lighting2-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting2-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting2-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting2-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "lighting2-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "lighting2-2-1" ] + "
"; } } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "lighting3-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting3-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting3-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting3-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "lighting3-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "lighting3-2-1" ] + "
"; } } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "lighting4-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting4-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting4-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting4-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "lighting4-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "lighting4-2-1" ] + "
"; } } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "lighting5-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting5-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting5-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting5-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "lighting5-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "lighting5-2-1" ] + "
"; } } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "lighting6-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting6-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting6-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting6-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "lighting6-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "lighting6-2-1" ] + "
"; } } }); // return textfile } else if (data.sub_projects[i].item == 6) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data["lining1-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data["lining1-1"] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data["lining2-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data["lining2-1"] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data["lining3-1"] ) { textfile += data.sub_projects[i].sub_items_data["lining3-1"] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 7) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "coloring1-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "coloring1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "coloring2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "coloring2-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "coloring3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "coloring3-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "coloring4-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "coloring4-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "coloring5-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "coloring5-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "coloring6-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "coloring6-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 8) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data["washing1-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "washing1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data["washing2-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "washing2-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data["washing3-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "washing3-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data["washing4-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "washing4-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data["washing5-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "washing5-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data["washing6-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "washing6-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 9) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "securing1-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "securing2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing2-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "securing3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing3-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "securing4-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing4-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "securing5-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing5-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "securing6-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing6-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "securing7-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing7-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 10) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "privacy1-1-1" ] != undefined ) { textfile += "اخطار" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy1-1-2" ] != undefined ) { textfile += "تخریب" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy1-1-3" ] != undefined ) { textfile += "مجوز" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy1-1-3" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy1-1-2" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy1-1-1" ] == undefined ) { textfile += "_" + "
"; } } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "privacy2-1-1" ] != undefined ) { textfile += "اخطار" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy2-1-2" ] != undefined ) { textfile += "تخریب" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy2-1-3" ] != undefined ) { textfile += "مجوز" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy2-1-3" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy2-1-2" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy2-1-1" ] == undefined ) { textfile += "_" + "
"; } } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "privacy3-1-1" ] != undefined ) { textfile += "اخطار " + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy3-1-2" ] != undefined ) { textfile += "تخریب " + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy3-1-3" ] != undefined ) { textfile += "مجوز " + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy3-1-3" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy3-1-2" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy3-1-1" ] == undefined ) { textfile += "_" + "
"; } } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "privacy4-1-1" ] != undefined ) { textfile += "اخطار" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy4-1-2" ] != undefined ) { textfile += "تخریب" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy4-1-3" ] != undefined ) { textfile += "مجوز" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy4-1-3" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy4-1-2" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy4-1-1" ] == undefined ) { textfile += "_" + "
"; } } }); // return textfile } else if (data.sub_projects[i].item == 13) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "winterOperation1-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "winterOperation1-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation1-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "winterOperation3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation3-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "winterOperation4-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation4-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "winterOperation5-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation5-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "winterOperation6-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation6-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "winterOperation7-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation7-1" ] + "
"; } else textfile = "_" + "
"; } if (value == 8) { if ( data.sub_projects[i].sub_items_data[ "winterOperation8-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation8-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 14) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "machinery1-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "machinery2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery2-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "machinery3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery3-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "machinery4-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery4-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery4-1" ] + data.sub_projects[i].sub_items_data[ "machinery4-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery4-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery4-2" ] == undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery4-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery4-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery4-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery4-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "machinery5-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery5-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery5-1" ] + data.sub_projects[i].sub_items_data[ "machinery5-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery5-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery5-2" ] == undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery5-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery5-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery5-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery5-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "machinery6-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery6-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery6-1" ] + data.sub_projects[i].sub_items_data[ "machinery6-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery6-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery6-2" ] == undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery6-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery6-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery6-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery6-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "machinery7-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery7-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery7-1" ] + data.sub_projects[i].sub_items_data[ "machinery7-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery7-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery7-2" ] == undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery7-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery7-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery7-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery7-2" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 15) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] + data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] == undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] == undefined && data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] + data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] == undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] == undefined && data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "tollhouse3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse3-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else return "_"; // return textfile } else return "_"; } return textfile; } else return "_"; } else return "_"; // return data.item }, }, { data: null, render: function (data, type, row) { if (data.type == "فعالیت روزانه و جاری راهداری") { if (data.item != undefined) { if (data.sub_items_data != null) { if (data.item == 1) { let textfile = ""; if (data.sub_items == 1) { if ( data.sub_items_data["reconstruction1-1"] != undefined ) { textfile += "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if ( data.sub_items_data["reconstruction2-1"] != undefined ) { textfile += "کیلومتر " + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if ( data.sub_items_data["reconstruction3-1"] != undefined ) { textfile += " تن" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["reconstruction4-1"]) { textfile += " متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if ( data.sub_items_data["reconstruction5-1"] != undefined ) { textfile += "متر مکعب " + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if ( data.sub_items_data["reconstruction6-1"] != undefined ) { textfile += "کیلومتر " + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if ( data.sub_items_data["reconstruction7-1"] != undefined ) { textfile += "متر طول " + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if ( data.sub_items_data["reconstruction8-1"] != undefined ) { textfile += "متر مربع " + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if ( data.sub_items_data["reconstruction9-1"] != undefined ) { textfile += "متر مربع " + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 10) { if ( data.sub_items_data["reconstruction10-1"] != undefined ) { textfile += "متر مربع " + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 11) { if ( data.sub_items_data["reconstruction11-1"] != undefined ) { textfile += "کیلومتر " + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 12) { if ( data.sub_items_data["reconstruction12-1"] != undefined ) { textfile += " کیلومتر " + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 13) { if ( data.sub_items_data["reconstruction13-1"] != undefined ) { textfile += " متر مکعب " + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 2) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["cleaning1-1"] != undefined) { textfile += "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["cleaning2-1"] != undefined) { textfile += "متر مکعب" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["cleaning3-1"] != undefined) { textfile += "تعداد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["cleaning4-1"] != undefined) { textfile += "متر طول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["cleaning5-1"] != undefined) { textfile += "مترطول-باند" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["cleaning6-1"] != undefined) { textfile += "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["cleaning7-1"] != undefined) { textfile += "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["cleaning8-1"] != undefined) { textfile += "تن" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["cleaning9-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 10) { if (data.sub_items_data["cleaning10-1"] != undefined) { textfile += "متر مکعب" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 11) { if (data.sub_items_data["cleaning11-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 12) { if (data.sub_items_data["cleaning12-1"] != undefined) { textfile += "متر مکعب" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 13) { if (data.sub_items_data["cleaning13-1"] != undefined) { textfile += "متر مکعب" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 14) { if (data.sub_items_data["cleaning14-1"] != undefined) { textfile += "نفر ساعت" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 15) { if (data.sub_items_data["cleaning15-1"] != undefined) { textfile += "مترطول-باند" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 16) { if (data.sub_items_data["cleaning16-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 17) { if (data.sub_items_data["cleaning17-1"] != undefined) { textfile += "مقطع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 18) { if (data.sub_items_data["cleaning18-1"] != undefined) { textfile += "نفر ساعت" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 19) { if (data.sub_items_data["cleaning19-1"] != undefined) { textfile += "متر مکعب" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 3) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["signs1-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["signs2-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["signs3-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["signs4-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["signs5-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["signs6-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["signs7-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["signs8-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["signs8-1"] != undefined) { textfile += "کیلومتر" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 4) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["shield1-1"] != undefined) { textfile += "متر طول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["shield2-1"] != undefined) { textfile += "متر طول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["shield3-1"] != undefined) { textfile += "متر طول" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 5) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["lighting1-1"] != undefined) { textfile += "متر طول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["lighting2-1"] != undefined) { textfile += "موردی" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["lighting3-1"] != undefined) { textfile += "موردی" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["lighting4-1"] != undefined) { textfile += "موردی" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["lighting5-1"] != undefined) { textfile += "متر طول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["lighting6-1"] != undefined) { textfile += "متر طول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["lighting7-1"] != undefined) { textfile += "متر طول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["lighting8-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["lighting9-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 10) { if (data.sub_items_data["lighting10-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 11) { if (data.sub_items_data["lighting11-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 6) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["lining1-1"] != undefined) { textfile += "کیلومتر-رنگ" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["lining2-1"] != undefined) { textfile += "کیلومتر-رنگ" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["lining3-1"]) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["lining4-1"]) { textfile += "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["lining4-1"]) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["lining4-1"]) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 7) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["coloring1-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["coloring2-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["coloring3-1"] != undefined) { textfile += "اصله" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["coloring4-1"] != undefined) { textfile += "دستگاه" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["coloring5-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["coloring6-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["coloring7-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["coloring8-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["coloring9-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 8) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["washing1-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["washing2-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["washing3-1"] != undefined) { textfile += "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["washing4-1"] != undefined) { textfile += "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["washing5-1"] != undefined) { textfile += "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["washing6-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["washing7-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 9) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["securing1-1"] != undefined) { textfile += "تعداد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["securing2-1"] != undefined) { textfile += "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["securing3-1"] != undefined) { textfile += "باب" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["securing4-1"] != undefined) { textfile += "دستگاه" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["securing5-1"] != undefined) { textfile += "کیلومتر-شیار" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["securing6-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["securing7-1"] != undefined) { textfile += "مترطول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["securing8-1"] != undefined) { textfile += "کیلومتر-شیار" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["securing9-1"] != undefined) { textfile += "متر مربع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 10) { if (data.sub_items_data["securing10-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 11) { if (data.sub_items_data["securing11-1"] != undefined) { textfile += "مترطول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 12) { if (data.sub_items_data["securing12-1"] != undefined) { textfile += "موردی" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 13) { if (data.sub_items_data["securing13-1"] != undefined) { textfile += "مترطول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 14) { if (data.sub_items_data["securing14-1"] != undefined) { textfile += "مترطول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 15) { if (data.sub_items_data["securing15-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 10) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["privacy1-1"] != undefined) { textfile += "مورد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["privacy2-1"] != undefined) { textfile += "مورد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["privacy3-1"] != undefined) { textfile += "مورد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["privacy4-1"] != undefined) { textfile += "مورد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["privacy5-1"] != undefined) { textfile += "مورد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["privacy6-1"] != undefined) { textfile += "مورد" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 11) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["bridge1-1"] != undefined) { textfile += "مترطول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["bridge2-1"] != undefined) { textfile += "تعداد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["bridge3-1"] != undefined) { textfile += "تعداد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["bridge4-1"] != undefined) { textfile += "مترطول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["bridge5-1"] != undefined) { textfile += "متر مکعب" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["bridge6-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["bridge7-1"] != undefined) { textfile += "متر مکعب" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 12) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["tunnel1-1"] != undefined) { textfile += "مورد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["tunnel2-1"] != undefined) { textfile += "مترطول" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["tunnel3-1"] != undefined) { textfile += "متر مکعب" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["tunnel4-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["tunnel5-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["tunnel6-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["tunnel7-1"] != undefined) { textfile += "عدد" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 13) { let textfile = ""; if (data.sub_items == 1) { if ( data.sub_items_data["winterOperation1-1"] != undefined ) { textfile += "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if ( data.sub_items_data["winterOperation2-1"] != undefined ) { textfile += "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if ( data.sub_items_data["winterOperation3-1"] != undefined ) { textfile += "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if ( data.sub_items_data["winterOperation4-1"] != undefined ) { textfile += "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if ( data.sub_items_data["winterOperation5-1"] != undefined ) { textfile += "تن" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if ( data.sub_items_data["winterOperation6-1"] != undefined ) { textfile += "مقطع" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if ( data.sub_items_data["winterOperation7-1"] != undefined ) { textfile += "نفر" + "
"; } else textfile = "_" + "
"; } if (data.sub_items == 8) { if ( data.sub_items_data["winterOperation8-1"] != undefined ) { textfile += "تعداد" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 14) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["machinery1-1"] != undefined) { textfile += "لیتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["machinery2-1"] != undefined) { textfile += "لیتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["machinery3-1"] != undefined) { textfile += "لیتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["machinery4-1"] != undefined) { textfile += "تعداد دستگاه" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["machinery5-1"] != undefined) { textfile += "تعداد دستگاه" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["machinery6-1"] != undefined) { textfile += "تعداد دستگاه" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["machinery7-1"] != undefined) { textfile += "مسافت-کیلومتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["machinery8-1"] != undefined) { textfile += "تعداد دستگاه" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["machinery9-1"] != undefined) { textfile += "تعداد دستگاه" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 10) { if (data.sub_items_data["machinery10-1"] != undefined) { textfile += "مسافت-کیلومتر" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 15) { let textfile = ""; if (data.sub_items == 1) { if ( data.sub_items_data["tollhouse1-1"] != undefined && data.sub_items_data["tollhouse1-2"] != undefined ) { textfile += data.sub_items_data["tollhouse1-1"] + data.sub_items_data["tollhouse1-2"] + "
"; } else if ( data.sub_items_data["tollhouse1-1"] != undefined && data.sub_items_data["tollhouse1-2"] == undefined ) { textfile += data.sub_items_data["tollhouse1-1"] + "
"; } else if ( data.sub_items_data["tollhouse1-1"] == undefined && data.sub_items_data["tollhouse1-2"] != undefined ) { textfile += data.sub_items_data["tollhouse1-2"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if ( data.sub_items_data["tollhouse2-1"] != undefined && data.sub_items_data["tollhouse2-2"] != undefined ) { textfile += data.sub_items_data["tollhouse2-1"] + data.sub_items_data["tollhouse2-2"] + "
"; } else if ( data.sub_items_data["tollhouse2-1"] != undefined && data.sub_items_data["tollhouse2-2"] == undefined ) { textfile += data.sub_items_data["tollhouse2-1"] + "
"; } else if ( data.sub_items_data["tollhouse2-1"] == undefined && data.sub_items_data["tollhouse2-2"] != undefined ) { textfile += data.sub_items_data["tollhouse2-2"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["tollhouse3-1"] != undefined) { textfile += data.sub_items_data["tollhouse3-1"] + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["tollhouse4-1"] != undefined) { textfile += "مورد" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 16) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["emergency1-1"] != undefined) { textfile += "تعداد محور" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["emergency2-1"] != undefined) { textfile += "تعداد محور" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["emergency3-1"] != undefined) { textfile += "تعداد محور" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["emergency4-1"] != undefined) { textfile += "تعداد محور" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["emergency5-1"] != undefined) { textfile += "تعداد محور" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["emergency6-1"] != undefined) { textfile += "تعداد محور" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 7) { if (data.sub_items_data["emergency7-1"] != undefined) { textfile += "تعداد محور" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 8) { if (data.sub_items_data["emergency8-1"] != undefined) { textfile += "تعداد دستگاه" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 9) { if (data.sub_items_data["emergency9-1"] != undefined) { textfile += "محور" + "
"; } else textfile += "_" + "
"; } return textfile; } else if (data.item == 17) { let textfile = ""; if (data.sub_items == 1) { if (data.sub_items_data["seeView1-1"] != undefined) { textfile += "نفر-ساعت" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 2) { if (data.sub_items_data["seeView2-1"] != undefined) { textfile += "نفر-ساعت" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 3) { if (data.sub_items_data["seeView3-1"] != undefined) { textfile += "نفر-ساعت" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 4) { if (data.sub_items_data["seeView4-1"] != undefined) { textfile += "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 5) { if (data.sub_items_data["seeView5-1"] != undefined) { textfile += "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (data.sub_items == 6) { if (data.sub_items_data["seeView6-1"] != undefined) { textfile += "تعداد دستگاه" + "
"; } else textfile += "_" + "
"; } return textfile; } else return "_"; } else return "_"; } else return "_"; } else if ((data.type = "گشت راهداری و ترابری")) { if ( data.sub_projects != undefined && data.sub_projects.length != 0 ) { let textfile = ""; for (var i = 0; i < data.sub_projects.length; i++) { if (data.sub_projects[i].sub_items_data != null) { if (data.sub_projects[i].item == 1) { data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "reconstruction1-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "reconstruction2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر " + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "reconstruction3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + " تن" + "
"; // textfile+="تن" } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "reconstruction4-1" ] ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + " متر مربع" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "reconstruction5-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "متر مکعب " + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "reconstruction6-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر " + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 2) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "cleaning1-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "cleaning2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "متر مکعب" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "cleaning3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "cleaning4-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "cleaning5-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترطول-باند" + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "cleaning6-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "cleaning7-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 8) { if ( data.sub_projects[i].sub_items_data[ "cleaning8-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تن" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 3) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data["signs1-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data["signs2-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data["signs3-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data["signs4-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 4) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "shield1-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "shield1-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "shield1-1-3" ] != undefined || data.sub_projects[i].sub_items_data[ "shield1-1-4" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "shield1-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "shield2-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "shield2-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "shield2-1-3" ] != undefined || data.sub_projects[i].sub_items_data[ "shield2-1-4" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "shield2-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "shield3-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "shield3-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "shield3-1-3" ] != undefined || data.sub_projects[i].sub_items_data[ "shield3-1-4" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "shield3-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } } }); // return textfile } else if (data.sub_projects[i].item == 5) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "lighting1-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting1-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting1-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting1-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "lighting2-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting2-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting2-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting2-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "lighting3-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting3-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting3-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting3-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "lighting4-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting4-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting4-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting4-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "lighting5-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting5-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting5-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting5-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "lighting6-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting6-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting6-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting6-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } } }); // return textfile } else if (data.sub_projects[i].item == 6) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data["lining1-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-رنگ" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data["lining2-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-رنگ" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data["lining3-1"] ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 7) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "coloring1-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "coloring2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "coloring3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "اصله" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "coloring4-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "دستگاه" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "coloring5-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "coloring6-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 8) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data["washing1-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data["washing2-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data["washing3-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data["washing4-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data["washing5-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data["washing6-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 9) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "securing1-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "securing2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "securing3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "باب" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "securing4-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "دستگاه" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "securing5-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-شیار" + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "securing6-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "securing7-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "طول" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 13) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "winterOperation1-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "winterOperation1-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "winterOperation3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "winterOperation4-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "winterOperation5-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تن" + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "winterOperation6-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مقطع" + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "winterOperation7-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile = "_" + "
"; } if (value == 8) { if ( data.sub_projects[i].sub_items_data[ "winterOperation8-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 14) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "machinery1-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "لیتر" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "machinery2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "لیتر" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "machinery3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "لیتر" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "machinery4-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery4-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "هزینه" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery4-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery4-2" ] == undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery4-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery4-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "هزینه" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "machinery5-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery5-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "نوع کاربری" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery5-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery5-2" ] == undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery5-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery5-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نوع کاربری " + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "machinery6-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery6-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "نوع کاربری" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery6-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery6-2" ] == undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery6-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery6-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نوع کاربری" + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "machinery7-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery7-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "تعداد بازدید " + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery7-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery7-2" ] == undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery7-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery7-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد بازدید " + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 15) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] + data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] == undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] == undefined && data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] + data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] == undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] == undefined && data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "tollhouse3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse3-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else return "_"; // return textfile } else return "_"; } return textfile; } else return "_"; } else return "_"; // return data.item }, }, { data: "created_at_jalali" }, { orderable: false, className: "text-center", data: null, render: function (data, type, row) { if (data.type == "فعالیت روزانه و جاری راهداری") { if (data.can_delete == 1) { return ( ' ' ); } else return ( ' ' ); } else if (data.type !== "فعالیت روزانه و جاری راهداری") { if (data.can_delete == 1) { return ' '; } else return ' '; } }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, buttons: [], }); }), table .on("order.dt search.dt", function () { table .column(0, { search: "applied", order: "applied" }) .nodes() .each(function (cell, i) { cell.innerHTML = i + 1; }); }) .draw(); }); $("#listitemtable").on("click", "button.editor_remove", function (e) { e.preventDefault(); // console.log("hi") var type = ""; var id = tablelist.row($(this).parents("tr")).data().id; if ( tablelist.row($(this).parents("tr")).data().type == "فعالیت روزانه و جاری راهداری" ) { type = "ri"; } else if ( tablelist.row($(this).parents("tr")).data().type == "گشت راهداری و ترابری" ) { type = "rp"; } else type = ""; // console.log("datai", id) // console.log("type" , type) Swal.fire({ icon: "warning", title: "آیا مطمئن هستید؟", text: "این عملیات قابل بازگشت نیست!", showCancelButton: true, confirmButtonColor: "#3085d6", cancelButtonColor: "#d33", confirmButtonText: "بله، تایید می‌شود", cancelButtonText: "منصرف شدم!", showLoaderOnConfirm: true, preConfirm: () => { // console.log("dataid" , id) // console.log("type" , type) $.ajax({ url: "https://rms.rmto.ir/users/cities-projects-item/delete", type: "POST", headers: { "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"), }, data: { id: id, type: type, }, success: function (result) { showLoaderScreen(); ajaxcalltable(); }, error: function (error) { Swal.fire({ icon: "error", title: "خطا", text: "مشکلی پیش آمده", confirmButtonText: "بستن", }); }, }); }, }); }); function ajaxcalltable() { $.ajax({ url: "https://rms.rmto.ir/projects/getrirpadmin", type: "GET", success: function (result) { hideLoaderScreen() // console.log(result.data[0]); $("#listitemtable").dataTable().fnClearTable(); $("#listitemtable").dataTable().fnAddData(result.data[0]); //hide; Swal.fire({ icon: "success", title: "با موفقیت حذف شد", confirmButtonText: "بستن", }); }, }); } $("#sort_date").on("click", function () { if ( $("#datepickfromdate").val() != " " && $("#datepicktodate").val() != " " ) { let startDate = moment( fromDate.getState().selected.year + "/" + fromDate.getState().selected.month + "/" + fromDate.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let endDate = moment( toDate.getState().selected.year + "/" + toDate.getState().selected.month + "/" + toDate.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); // $("#example").DataTable().clear().draw(); $("#example") .DataTable() .ajax.url( "https://rms.rmto.ir/users/provinces-projects-count" + "?end-date=" + endDate + "&start-date=" + startDate ) .load(); } }); $("#sortt_date").on("click", function () { if ( $("#datepickfrommdate").val() != " " && $("#datepicktoodate").val() != " " ) { let startDate = moment( fromDatesecond.getState().selected.year + "/" + fromDatesecond.getState().selected.month + "/" + fromDatesecond.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let endDate = moment( toDatesecond.getState().selected.year + "/" + toDatesecond.getState().selected.month + "/" + toDatesecond.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); // console.log(endDate) // $("#example").DataTable().clear().draw(); $("#examplee") .DataTable() .ajax.url( "https://rms.rmto.ir/users/province-cities-projects-count" + "?province-id=" + province_id + "&end-date=" + endDate + "&start-date=" + startDate ) .load(); } }); $("#sort_datekeshvar").on("click", function () { if ( $("#datepickfromdatekeshvar").val() != " " && $("#datepicktodatekeshvar").val() != " " ) { let startDate = moment( fromDatekeshvari.getState().selected.year + "/" + fromDatekeshvari.getState().selected.month + "/" + fromDatekeshvari.getState().selected.date ).format("YYYY-MM-DD"); let endDate = moment( toDatekeshvari.getState().selected.year + "/" + toDatekeshvari.getState().selected.month + "/" + toDatekeshvari.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); // $("#example").DataTable().clear().draw(); $("#examplekeshvar") .DataTable() .ajax.url( root_local + "projects/ristat" + "?end-date=" + endDate + "&start-date=" + startDate ) .load(); } }); // mohammad edit start $("#sort_dateTestItems").on("click", function () { if ( $("#datepickfromdateTestItems").val() != " " && $("#datepicktodateTestItems").val() != " " ) { let startDate = moment( fromDateTestItems.getState().selected.year + "/" + fromDateTestItems.getState().selected.month + "/" + fromDateTestItems.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let endDate = moment( toDateTestItems.getState().selected.year + "/" + toDateTestItems.getState().selected.month + "/" + toDateTestItems.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); // $("#example").DataTable().clear().draw(); $("#exampleTestItems") .DataTable() .ajax.url( "https://rms.rmto.ir/api/testitems" + "?end-date=" + endDate + "&start-date=" + startDate ) .load(); } }); // mohammad edit end $("#submitsubostan").on("click", function () { // alert("hiii") showLoaderScreen() $("#listitemtable").dataTable().fnClearTable(); if ($("#fromdatesubostan").val() != " " && $("#todatesubostan").val() != " ") { // alert("hi") let startDate = moment( fromriz.getState().selected.year + "/" + fromriz.getState().selected.month + "/" + fromriz.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let endDate = moment( toriz.getState().selected.year + "/" + toriz.getState().selected.month + "/" + toriz.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/projects/getrirpadmin?end-date=" + endDate + "&start-date=" + startDate, type: "GET", success: function (result) { $("#listitemtable").dataTable().fnAddData(result.data[0]); hideLoaderScreen(); }, }); } }); //add by me $(document).on("load", function () { $(window).bind("resize", checkPosition); }); function checkPosition() { if ($(window).width() < 1100) { $("#example_wrapper").css("margin-top", "50px"); } else { $("#example_wrapper").css("margin-top", ""); } if ($(window).width() < 555) { $(".content-center-dataTable").css("width", "260px"); } else { $(".content-center-dataTable").css("width", ""); } if ($(window).width() < 440) { $(".dataTables_filter input").css("width", "94px"); $(".dataTables_filter").css("margin-bottom", "10px"); $(".dt-buttons").addClass("d-flex"); $(".dt-buttons").addClass("justify-content-center"); $(".dt-buttons button").css("font-size", "10px"); } else { $(".dataTables_filter input").css("width", ""); $(".dataTables_filter").css("margin-bottom", ""); $(".dt-buttons").removeClass("d-flex"); $(".dt-buttons button").css("font-size", ""); $(".dt-buttons").removeClass("justify-content-center"); // pooria } } async function showLoaderScreen() { $(".divloader").css("display", "flex").hide().fadeIn(); return new Promise((resolve) => setTimeout(resolve, 400)); } function hideLoaderScreen() { $(".divloader").fadeOut(); } //;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;maxter toggle row button function plusrow(xid, name) { var idbuttrow = '#' + xid + 'plusbutton' + name $(idbuttrow).toggleClass("fa-plus-circle fa-minus-circle"); } //:::::::::::::::::::::::::::::::::::::::::::::::: function showprovincename() { // alert("hiii") let reqUrl = "https://rms.rmto.ir/public/contents/provinces"; // showLoaderScreen(); $.ajax({ url: reqUrl, type: "GET", success: function (result) { appendprovince('#select-province-excel-first-table', result.data) objecttablekol.push({ id: -1, name_fa: "کل کشور" }) objecttable1.push({ id: -1, name_fa: "کل کشور" }) objecttable2.push({ id: -1, name_fa: "کل کشور" }) objecttable3.push({ id: -1, name_fa: "کل کشور" }) objecttable4.push({ id: -1, name_fa: "کل کشور" }) objecttable5.push({ id: -1, name_fa: "کل کشور" }) objecttable6.push({ id: -1, name_fa: "کل کشور" }) objecttable7.push({ id: -1, name_fa: "کل کشور" }) objecttable8.push({ id: -1, name_fa: "کل کشور" }) objecttable9.push({ id: -1, name_fa: "کل کشور" }) objecttable10.push({ id: -1, name_fa: "کل کشور" }) objecttable11.push({ id: -1, name_fa: "کل کشور" }) objecttable12.push({ id: -1, name_fa: "کل کشور" }) objecttable13.push({ id: -1, name_fa: "کل کشور" }) objecttable14.push({ id: -1, name_fa: "کل کشور" }) objecttable15.push({ id: -1, name_fa: "کل کشور" }) objecttable16.push({ id: -1, name_fa: "کل کشور" }) objecttable20.push({ id: -1, name_fa: "کل کشور" }) for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objecttablekol.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable1.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable2.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable3.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable4.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable5.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable6.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable7.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable8.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable9.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable10.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable11.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable12.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable13.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable14.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable15.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable16.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) objecttable20.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } gozarehtowntable(objecttablekol) showtable1(objecttable1) // objectsendglobal = objectsend; // console.log("objectsendglo", objectsendglobal) // return; }, error: function (error) { }, }); } function showtable1(probj) { // alert("hiii") tablemaremat = $("#maremat").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=1", type: "GET", dataSrc: function (json) { hideLoaderScreen() for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { className: 'text-nowrap', data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 1) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable2(probj) { let date_from let date_to showLoaderScreen() if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } tablepaksazi = $("#paksazi").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=2" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { className: 'text-nowrap', data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t14 != null) { return data.t14.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t14 != null) { return data.t14.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t15 != null) { return data.t15.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t15 != null) { return data.t15.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t16 != null) { return data.t16.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t16 != null) { return data.t16.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t17 != null) { return data.t17.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t17 != null) { return data.t17.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t18 != null) { return data.t18.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t18 != null) { return data.t18.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t19 != null) { return data.t19.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t19 != null) { return data.t19.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 2) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable3(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tablealaem = $("#alaem").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=3" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 3) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable4(probj) { let date_from let date_to showLoaderScreen() if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } tablehefaz = $("#hefaz").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=4" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 4) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable5(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tablelighting = $("#lighting").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=5" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { className: 'text-nowrap', data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 5) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable6(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tableruller = $("#ruler").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=6" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 6) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable7(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tablecoloring = $("#coloring").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=7" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 7) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable8(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tablewashing = $("#washed").DataTable({ dom: 'lBfrtip', // dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=8" + "&dfrom_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 8) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable9(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tablesafety = $("#saftey").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=9" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t14 != null) { return data.t14.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t14 != null) { return data.t14.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t15 != null) { return data.t15.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t15 != null) { return data.t15.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 9) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable10(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tableharim = $("#harim").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=10" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 10) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable11(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tablepol = $("#pol").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=11" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 11) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable12(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tabletunnel = $("#tunnelGaleri").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=12" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 12) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable13(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tablezem = $("#zemestanii").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=13" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 13) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable14(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tablemachin = $("#mashinAlat").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=14" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 14) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable15(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tablerahdar = $("#tollhouse").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=10" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 15) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable16(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tableemer = $("#emergency").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=16" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", "className": 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'two/redirect') $(".parent-excel").find('.btn-set-excel').data('hasType', true) $(".parent-excel").find('.btn-set-excel').data('type', 16) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtable20(probj) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } showLoaderScreen() tablecontrol = $("#controlitemm").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province?item=20" + "&from_date=" + date_from + "&date_to=" + date_to , type: "GET", dataSrc: function (json) { // probj = objectsend; console.log("json", json) for (var j = 0; j < probj.length; j++) { for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probj[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } for (var i = 0; i < json.country.length; i++) { if (probj[j].id == json.country[i].p) { probj[j]['t' + json.country[i].t] = { "c": json.country[i].c, "s": json.country[i].s } } } } console.log("probj", probj) hideLoaderScreen(); return probj; }, }, columns: [ { "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa", className: 'text-nowrap', }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, ], buttons: [], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); // tablecontrol //tablecontrol } $("#optionfilter").on("change", function () { if (parseInt($(this).children("option:selected").val()) == 1) { $("#marematt").css('display', 'block') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#heafzz").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable1(objecttable1) } if (parseInt($(this).children("option:selected").val()) == 2) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'block') $("#alaemmm").css('display', 'none') $("#heafzz").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable2(objecttable2) } if (parseInt($(this).children("option:selected").val()) == 3) { // alert("hi") $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'block') $("#heafzz").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable3(objecttable3) } if (parseInt($(this).children("option:selected").val()) == 4) { // alert("hiiiii") $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#heafzz").css('display', 'block') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable4(objecttable4) } if (parseInt($(this).children("option:selected").val()) == 5) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#heafzz").css('display', 'none') $("#lightingg").css('display', 'block') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable5(objecttable5) } if (parseInt($(this).children("option:selected").val()) == 6) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#heafzz").css('display', 'none') $("#alaemmm").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'block') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable6(objecttable6) } if (parseInt($(this).children("option:selected").val()) == 7) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#heafzz").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'block') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable7(objecttable7) } if (parseInt($(this).children("option:selected").val()) == 8) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#heafzz").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'block') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable8(objecttable8) } if (parseInt($(this).children("option:selected").val()) == 9) { $("#heafzz").css('display', 'none') $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#heafzz").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'block') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable9(objecttable9) } if (parseInt($(this).children("option:selected").val()) == 10) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#lightingg").css('display', 'none') $("#heafzz").css('display', 'none') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'block') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable10(objecttable10) } if (parseInt($(this).children("option:selected").val()) == 11) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#heafzz").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'block') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable11(objecttable11) } if (parseInt($(this).children("option:selected").val()) == 12) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#heafzz").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'block') $("#mashinAlattt").css('display', 'none') $("#zemestani").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable12(objecttable12) } if (parseInt($(this).children("option:selected").val()) == 13) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#heafzz").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'block') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable13(objecttable13) } if (parseInt($(this).children("option:selected").val()) == 14) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#heafzz").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'block') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable14(objecttable14) } if (parseInt($(this).children("option:selected").val()) == 15) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#heafzz").css('display', 'none') $("#safteyy").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'block') $("#emer").css('display', 'none') $("#controlitem").css('display', 'none') showtable15(objecttable15) } if (parseInt($(this).children("option:selected").val()) == 16) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#heafzz").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'block') $("#controlitem").css('display', 'none') showtable16(objecttable16) } if (parseInt($(this).children("option:selected").val()) == 20) { $("#marematt").css('display', 'none') $("#paksazii").css('display', 'none') $("#alaemmm").css('display', 'none') $("#lightingg").css('display', 'none') $("#ruller").css('display', 'none') $("#coloringgg").css('display', 'none') $("#washingg").css('display', 'none') $("#safteyy").css('display', 'none') $("#heafzz").css('display', 'none') $("#harimm").css('display', 'none') $("#poll").css('display', 'none') $("#tunell").css('display', 'none') $("#zemestani").css('display', 'none') $("#mashinAlattt").css('display', 'none') $("#tollhousee").css('display', 'none') $("#emer").css('display', 'none') $("#controlitem").css('display', 'block') showtable20(objecttable20) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') }) //==================maxter $("#maremat1").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tablemaremat.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletownmaremat(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); //::::::::::::::::::::Expander:::maxc0der // tablemaremat.rows(':not(.parent)').nodes().to$().find('td:first-child').trigger('click'); //::::::::::::::::::::::::::::::::::::::::::: }) //////////////////////////////::::::::::::::MaxterCode mapper:::::::::::::::::://////////////////////////////// var oInnerTable; var px = $('#maremat').DataTable(); var tablchildx; //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: $("#maremat").on("click", "button.show_table", function () { var tr = $(this).closest('tr'); var row = tablemaremat.row(tr); // var row = px.row(tr); var id = tablemaremat.row(tr).data().id; //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::Render child table ::::: maxter //::::::::::::::::::::::::::::::::::::::::::::::::::::Get child table maxter $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } showtabletownmaremat(id) } }); //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // tablchildx = document.getElementById("marematTown_wrapper").innerHTML; tablchildx = $("#maremattTown").html(); //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // $('tr').removeClass('shown'); if (row.child.isShown()) { // This row is already open - close it row.child.hide(); tr.removeClass('shown'); } else { // Open this row $("[colspan=26]").css("display", "none"); $(".dt-buttons").css("display", "none"); tr.addClass('shown'); tr.addClass('openedrow'); //::::::::::::::::::::::::::::::::::::::::::::::::::::::::child shower ::::::::::::::::::::::::::: row.child(tablchildx).show(); } }); //:::::::::::::::::::::::::::::::::::::::::::x0d3r maxt3r:::::::::::::::::f0rmater::::::::::::::::::::::::::: // function format(data) { // return '
' + // '' + // '' + // '' + // '' + // '' + // '' + // '' + // '' + // '' + // '' + // '' + // '' + // '' + // '' + // '' + // '' + // '' + // '
Person ID:' + data.id + '
Name:' + data.first_name + ' ' + data.last_name + 'Email:' + data.email + '
Country:' + data.country + 'IP Address:' + data.ip_address + '
' + // '
'; // }; //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::child rower var oInnerTablepak; var pak = $('#paksazi').DataTable(); var tablepaksazichild; $("#paksazi").on("click", "button.show_table", function () { var tr = $(this).closest('tr'); var row = tablepaksazi.row(tr); // var row = px.row(tr); var id = tablepaksazi.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } // $("#maremattTown").css('display', 'none') // $("#paksaziiTown").css('display', 'none') // $("#alaemmmTown").css('display', 'none') // $("#heafzzTown").css('display', 'none') // $("#lightinggTown").css('display', 'none') // $("#rullerTown").css('display', 'none') // $("#coloringggTown").css('display', 'none') // $("#washinggTown").css('display', 'none') // $("#safteyyTown").css('display', 'none') // $("#harimmTown").css('display', 'none') // $("#pollTown").css('display', 'none') // $("#tunellTown").css('display', 'none') // $("#zemestaniTown").css('display', 'none') // $("#mashinAlatttTown").css('display', 'none') // $("#tollhouseeTown").css('display', 'none') // $("#emerTown").css('display', 'none') showtabletownpaksazi(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); tablepaksazichild = $("#paksaziiTown").html(); //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // $('tr').removeClass('shown'); if (row.child.isShown()) { // This row is already open - close it row.child.hide(); tr.removeClass('shown'); } else { // Open this row $("[colspan=40]").css("display", "none"); $(".dt-buttons").css("display", "none"); tr.addClass('shown'); tr.addClass('openedrow'); //::::::::::::::::::::::::::::::::::::::::::::::::::::::::child shower ::::::::::::::::::::::::::: row.child(tablepaksazichild).show(); } }) $("#alaem").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tablealaem.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletownalaemmm(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#hefaz").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tablehefaz.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletownheafz(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#lighting").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tablelighting.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletownlighting(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#ruler").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tableruller.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletownruller(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#coloring").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tablecoloring.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletowncoloring(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#washed").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tablewashing.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletownwashing(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#saftey").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tablesafety.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletownsafteyy(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#harim").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tableharim.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletownharimm(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#pol").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tablepol.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletownpoll(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#tunnelGaleri").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tabletunnel.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletowntunel(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#zemestanii").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tablezem.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletownzemestani(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#mashinAlat").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tablemachin.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletownmashinAlat(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#tollhouse").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tablerahdar.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletowntollhouse(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) $("#emer").on("click", "button.show_table", function () { var tr = $(this).closest("tr"); var id = tableemer.row(tr).data().id; $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + id, success: function (result) { objectsendtown = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectsendtown.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $("#maremattTown").css('display', 'none') $("#paksaziiTown").css('display', 'none') $("#alaemmmTown").css('display', 'none') $("#heafzzTown").css('display', 'none') $("#lightinggTown").css('display', 'none') $("#rullerTown").css('display', 'none') $("#coloringggTown").css('display', 'none') $("#washinggTown").css('display', 'none') $("#safteyyTown").css('display', 'none') $("#harimmTown").css('display', 'none') $("#pollTown").css('display', 'none') $("#tunellTown").css('display', 'none') $("#zemestaniTown").css('display', 'none') $("#mashinAlatttTown").css('display', 'none') $("#tollhouseeTown").css('display', 'none') $("#emerTown").css('display', 'none') showtabletownemer(id) // for (var j = 0; j < objectsendtown.length; j++) { // for (var i = 0; i < json.data.length; i++) { // if (objectsendtown[j].id == json.data[i].ci) { // objectsendtown[j]['t' + json.data[i].t] = { // "c": json.data[i].c, // "s": json.data[i].s // } // } // } // } } }); }) //::::::::::::::::: var marematchildtable; //:::::::::::::::::::: function showtabletownmaremat(num) { // $("#maremattTown").css('display', 'block') tablemarematsecond = $("#marematTown").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, searching: false, paging: false, bFilter: false, ordering: false, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=1&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } subprovince = objectsendtown; //hide return objectsendtown; // return probj; // console.log("hiiii", chiz.responseJSON) // return chiz.responseJSON; // // // showpie2(json.data.stat) // footercount2 = json.data.sum }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); marematchildtable = tablemarematsecond; } var paksazichildtable; function showtabletownpaksazi(num) { // $("#paksaziiTown").css('display', 'block') tablepaksazisecond = $("#paksaziTown").DataTable({ // dom: 'lBfrtip', dom: "<p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=2&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t14 != null) { return data.t14.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t14 != null) { return data.t14.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t15 != null) { return data.t15.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t15 != null) { return data.t15.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t16 != null) { return data.t16.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t16 != null) { return data.t16.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t17 != null) { return data.t17.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t17 != null) { return data.t17.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t18 != null) { return data.t18.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t18 != null) { return data.t18.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t19 != null) { return data.t19.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t19 != null) { return data.t19.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); paksazichildtable = tablepaksazisecond; } function showtabletownalaemmm(num) { $("#alaemmmTown").css('display', 'block') tablealaemsecond = $("#alaemTown").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=3&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletownheafz(num) { $("#heafzzTown").css('display', 'block') tablehefazsecond = $("#hefaz").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=4&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletownlighting(num) { $("#lightinggTown").css('display', 'block') tablelightingsecond = $("#lighting").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=5&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletownruller(num) { $("#rullerTown").css('display', 'block') tablerullersecond = $("#ruler").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=6&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletowncoloring(num) { $("#coloringggTown").css('display', 'block') tablecoloringsecond = $("#coloring").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=7&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletownwashing(num) { $("#washinggTown").css('display', 'block') tablewashingsecond = $("#washed").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=8&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletownsafteyy(num) { $("#safteyyTown").css('display', 'block') tablesafetysecond = $("#saftey").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=9&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t14 != null) { return data.t14.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t14 != null) { return data.t14.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t15 != null) { return data.t15.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t15 != null) { return data.t15.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletownharimm(num) { $("#harimmTown").css('display', 'block') tableharimsecond = $("#harim").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=10&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletownpoll(num) { $("#pollTown").css('display', 'block') tablepolsecond = $("#pol").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=11&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletowntunel(num) { $("#tunellTown").css('display', 'block') tabletunnelsecond = $("#tunnelGaleri").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=12&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletownzemestani(num) { $("#zemestaniTown").css('display', 'block') tablezemsecond = $("#zemestanii").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=13&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletownmashinAlat(num) { $("#mashinAlatttTown").css('display', 'block') tablemachinsecond = $("#mashinAlat").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=14&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletowntollhouse(num) { $("#tollhouseeTown").css('display', 'block') tablerahdarsecond = $("#tollhouse").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=15&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].ci) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showtabletownemer(num) { $("#emerTown").css('display', 'block') tableemersecond = $("#emergency").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-items-group-province-city?item=16&province_id=" + num, type: "GET", dataSrc: function (json) { for (var j = 0; j < objectsendtown.length; j++) { for (var i = 0; i < json.data.length; i++) { if (objectsendtown[j].id == json.data[i].p) { objectsendtown[j]['t' + json.data[i].t] = { "c": json.data[i].c, "s": json.data[i].s } } } } //hide // // // showpie2(json.data.stat) // footercount2 = json.data.sum return objectsendtown; }, }, columns: [ { "className": 'details-control', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, // { // data: null, // render: function (data, type, row) { // return "" // } // }, // copy ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function showitemlist() { tablelist = $("#listitemtable").DataTable({ dom: "p>", destroy: true, scrollX: true, responsive: true, pagingType: "simple_numbers", language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"], [1, "pstring-desc"], [2, "pstring-desc"], [3, "pstring-desc"], [4, "asc"], ], processing: true, ajax: { url: root_local + "projects/getrirpadmin", type: "GET", dataSrc: function (json) { console.log(json.data[0]) // if (json.data[0]) // //hide // if (json.data[0].sub_projects.item!=unde){ // console.log(json.data[0][36].sub_projects.item) // console.log(json.data[0][1].sub_projects[i].item) return json.data[0]; }, }, columns: [ { data: null, render: function (data, type, row, meta) { // console.log(meta.row); return meta.row + 1; }, }, { data: "province", }, { data: "user" }, { data: "type" }, { data: null, render: function (data, type, row) { if (data.type == "فعالیت روزانه و جاری راهداری") { if (data.item != undefined) { if (data.item == 1) { return " مرمت رویه"; } else if (data.item == 2) { return " پاکسازی"; } else if (data.item == 3) { return "علائم"; } else if (data.item == 4) { return "حفاظ"; } else if (data.item == 5) { return "روشنایی"; } else if (data.item == 6) { return " خط کشی"; } else if (data.item == 7) { return " رنگ آمیزی"; } else if (data.item == 8) { return " شستشو‌"; } else if (data.item == 9) { return " ایمن سازی"; } else if (data.item == 10) { return "حریم"; } else if (data.item == 11) { return "پل"; } else if (data.item == 12) { return " تونل و گالری"; } else if (data.item == 13) { return " عملیات زمستانی"; } else if (data.item == 14) { return " ماشین آلات"; } else if (data.item == 15) { return " راهدارخانه"; } else if (data.item == 16) { return " موارد اضطراری"; } else if (data.item == 20) { return "آیتم های بازدید و بازرسی و کنترل"; } else return "_"; } } else if (data.type == "گشت راهداری و ترابری") { if ( data.sub_projects != undefined && data.sub_projects.length != 0 ) { let textfile = " "; for (var i = 0; i < data.sub_projects.length; i++) { if (data.sub_projects[i].item == 1) { textfile += i + 1 + ")" + " " + " مرمت رویه"; } else if (data.sub_projects[i].item == 2) { textfile += i + 1 + ")" + " " + "پاکسازی" + "
"; } else if (data.sub_projects[i].item == 3) { textfile += i + 1 + ")" + " " + "علائم" + "
"; } else if (data.sub_projects[i].item == 4) { textfile += i + 1 + ")" + " " + "حفاظ" + "
"; } else if (data.sub_projects[i].item == 5) { textfile += i + 1 + ")" + " " + "روشنایی" + "
"; } else if (data.sub_projects[i].item == 6) { textfile += i + 1 + ")" + " " + "خط کشی" + "
"; } else if (data.sub_projects[i].item == 7) { textfile += i + 1 + ")" + " " + "رنگ آمیزی" + "
"; } else if (data.sub_projects[i].item == 8) { textfile += i + 1 + ")" + " " + "شستشو‌" + "
"; } else if (data.sub_projects[i].item == 9) { textfile += i + 1 + ")" + " " + "ایمن سازی" + "
"; } else if (data.sub_projects[i].item == 10) { textfile += i + 1 + ")" + " " + "حریم" + "
"; } else if (data.sub_projects[i].item == 11) { textfile += i + 1 + ")" + " " + "پل" + "
"; } else if (data.sub_projects[i].item == 12) { textfile += i + 1 + ")" + " " + " تونل و گالری" + "
"; } else if (data.sub_projects[i].item == 13) { textfile += i + 1 + ")" + " " + "عملیات زمستانی" + "
"; } else if (data.sub_projects[i].item == 14) { textfile += i + 1 + ")" + " " + " ماشین آلات" + "
"; } else if (data.sub_projects[i].item == 15) { textfile += i + 1 + ")" + " " + " راهدارخانه" + "
"; } else if (data.sub_projects[i].item == 16) { textfile += i + 1 + ")" + " " + " موارد اضطراری" + "
"; } else if (data.sub_projects[i].item == 17) { textfile += i + 1 + ")" + " " + " گزارش گشت راهداری" + "
"; } else if (data.sub_projects[i].item == 18) { textfile += i + 1 + ")" + " " + " کشیک راهداری زمستانی" + "
"; } else if (data.sub_projects[i].item == 19) { textfile += i + 1 + ")" + " " + " ناوگان حمل و نقل عمومی" + "
"; } else textfile += "_" + "
"; } return textfile; } else return "_"; } else return "_"; }, }, { data: null, render: function (data, type, row) { if (data.type == "فعالیت روزانه و جاری راهداری") { if (data.item != undefined) { // return data.item if (data.item == 1) { let textfile = ""; if (data.sub_items == 1) { textfile += "ترمیم افتادگی لبه آسفالت" + "
"; } if (data.sub_items == 2) { textfile += "شانه سازی" + "
"; } if (data.sub_items == 3) { textfile += "پر کردن گودافتادگی یا چاله با آسفالت" + "
"; } if (data.sub_items == 4) { textfile += "لکه گیری هندسی راه" + "
"; } if (data.sub_items == 5) { textfile += "مرمت آبشستگی راه ها و شانه راه ها" + "
"; } if (data.sub_items == 6) { textfile += "تنظیم سطح بستر حریم" + "
"; } if (data.sub_items == 8) { textfile += "درزگیری" + "
"; } if (data.sub_items == 9) { textfile += "مضرس کردن سطح راه ها" + "
"; } if (data.sub_items == 10) { textfile += "تراش رویه های موج زده" + "
"; } if (data.sub_items == 11) { textfile += "تیغ زنی راه های روستایی" + "
"; } if (data.sub_items == 12) { textfile += "شن ریزی، تسطیح و کمپکت راه روستایی" + "
"; } if (data.sub_items == 13) { textfile += "عملیات تسطیح، خاکبرداری و خاکریزی در رفوژ میانی" + "
"; } return textfile; } else if (data.item == 2) { let textfile = ""; if (data.sub_items == 1) { textfile += "پاک سازی و جاروزنی سطح راه" + "
"; } if (data.sub_items == 2) { textfile += "پاک سازی و تنقیه آبروهای کوچک و کالورت ها" + "
"; } if (data.sub_items == 3) { textfile += "پاک سازی سطح راه از لاشه حیوانات" + "
"; } if (data.sub_items == 4) { textfile += "پاک سازی قنوها و آبروهای طولی" + "
"; } if (data.sub_items == 5) { textfile += "پاک سازی سطح راه از آثار تصادفات" + "
"; } if (data.sub_items == 6) { textfile += "علف کنی و بوته کنی از حاشیه راه" + "
"; } if (data.sub_items == 7) { textfile += "پاک سازی حریم راه از مواد زائد و نخاله های ساختمانی" + "
"; } if (data.sub_items == 8) { textfile += "جمع آوری قطعات آسیب دیده حفاظ، علائم و ..." + "
"; } if (data.sub_items == 9) { textfile += "پاکسازی پارکینگ راه ها" + "
"; } if (data.sub_items == 10) { textfile += "پاکسازی کناره قرنیز پل ها، دیواره تونل ها، جداول و نیوجرسی از مصالح انباشته شده" + "
"; } if (data.sub_items == 11) { textfile += "پاکسازی و تمیزکاری جزیره های میانی" + "
"; } if (data.sub_items == 12) { textfile += "پاکسازی و تنقیه داخل پل ها" + "
"; } if (data.sub_items == 13) { textfile += "پاکسازی و تنقیه سیفون ها" + "
"; } if (data.sub_items == 14) { textfile += "پاکسازی و جمع آوری شاخه درختان از دهانه آبنماهای لوله ای" + "
"; } if (data.sub_items == 15) { textfile += "پاکسازی سطح راه از مواد نفتی یا روغنی" + "
"; } if (data.sub_items == 16) { textfile += "علف کنی و بوته کنی به صورت دستی اطراف تابلو، علائم و ..." + "
"; } if (data.sub_items == 17) { textfile += "ریزش برداری" + "
"; } if (data.sub_items == 18) { textfile += "جمع آوری خرده سنگ های ریزشی" + "
"; } if (data.sub_items == 19) { textfile += "لایروبی" + "
"; } return textfile; } else if (data.item == 3) { let textfile = ""; if (data.sub_items == 1) { textfile += "نصب تابلوهای اخطاری، انتظامی و مسیرنمای جدید" + "
"; } if (data.sub_items == 2) { textfile += "نصب تابلوهای اطلاعاتی جدید" + "
"; } if (data.sub_items == 3) { textfile += "تعویض شبرنگ تابلوهای اطلاعاتی" + "
"; } if (data.sub_items == 4) { textfile += "نصب بازتاب بر روی گاردریل و حفاظ های حاشیه راه و چشم گربه ای" + "
"; } if (data.sub_items == 5) { textfile += "تعویض صفحه تابلوهای اخطاری، انتظامی فاقد بازتاب و معیوب" + "
"; } if (data.sub_items == 6) { textfile += "مرمت شکستگی، خم شدگی و ... تابلوهای اطلاعاتی" + "
"; } if (data.sub_items == 7) { textfile += "اصلاح کج شدگی پایه تابلوها و علائم" + "
"; } if (data.sub_items == 8) { textfile += "نصب یا برداشت علائم موقت" + "
"; } if (data.sub_items == 9) { textfile += " اصلاح شیب شیروانی " + "
"; } return textfile; } else if (data.item == 4) { let textfile = ""; if (data.sub_items == 1) { textfile += "ارتقای حفاظ موجود میانی راه ها با حفاظ های مرسوم یا سایر روش ها" + "
"; } if (data.sub_items == 2) { textfile += "ارتقای حفاظ موجود پل ها و پرتگاه ها با حفاظ های مرسوم یا سایر روش ها" + "
"; } if (data.sub_items == 3) { textfile += "بهسازی حفاظ های موجود و آسیب دیده" + "
"; } return textfile; } else if (data.item == 5) { let textfile = ""; if (data.sub_items == 1) { textfile += "نگهداری و پاکسازی روشنایی طولی راه" + "
"; } if (data.sub_items == 2) { textfile += "نگهداری و پاکسازی روشنایی نقطه ای پارکینگ در حاشیه راه" + "
"; } if (data.sub_items == 3) { textfile += "نگهداری و پاکسازی روشنایی نقطه ای تقاطع در حاشیه راه" + "
"; } if (data.sub_items == 4) { textfile += "نگهداری و پاکسازی روشنایی نقطه ای محل نصب دوربین در حاشیه راه" + "
"; } if (data.sub_items == 5) { textfile += "نگهداری و پاکسازی روشنایی طولی نواحی یا گردنه های مه گیر" + "
"; } if (data.sub_items == 6) { textfile += "نگهداری و پاکسازی روشنایی تونل" + "
"; } if (data.sub_items == 7) { textfile += "تعمیرات شبکه روشنایی، کابل" + "
"; } if (data.sub_items == 8) { textfile += "تعمیرات شبکه روشنایی روشنایی، کله چراغ" + "
"; } if (data.sub_items == 9) { textfile += "تعمیرات شبکه روشنایی، مفصل زنی" + "
"; } if (data.sub_items == 10) { textfile += "تعمیرات شبکه روشنایی، تعمیر تابلو" + "
"; } if (data.sub_items == 11) { textfile += "تعمیرات برج نوری" + "
"; } return textfile; } else if (data.item == 6) { let textfile = ""; if (data.sub_items == 1) { textfile += "خط کشی با رنگ گرم ترافیکی" + "
"; } if (data.sub_items == 2) { textfile += "خط کشی با رنگ سرد ترافیکی" + "
"; } if (data.sub_items == 3) { textfile += "ترسیم نقوش، فلش، خط نوشته و ..." + "
"; } if (data.sub_items == 4) { textfile += "اجرای اکستروژن طولی" + "
"; } if (data.sub_items == 5) { textfile += "اجرای اکستروژن عرضی" + "
"; } if (data.sub_items == 6) { textfile += "پاک کردن خطوط ترافیکی از سطح راه" + "
"; } return textfile; } else if (data.item == 7) { let textfile = ""; if (data.sub_items == 1) { textfile += "رنگ آمیزی پایه تابلوها" + "
"; } if (data.sub_items == 2) { textfile += "رنگ آمیزی پایه چراغ ها" + "
"; } if (data.sub_items == 3) { textfile += "رنگ آمیزی پایه های روشنایی" + "
"; } if (data.sub_items == 4) { textfile += "رنگ آمیزی پل های عابر پیاده" + "
"; } if (data.sub_items == 5) { textfile += "رنگ آمیزی پایه تابلوهای دروازه ای" + "
"; } if (data.sub_items == 6) { textfile += "رنگ آمیزی حفاظ های فلزی" + "
"; } if (data.sub_items == 7) { textfile += "رنگ آمیزی نیوجرسی ها و سایر حفاظ های بتنی" + "
"; } if (data.sub_items == 8) { textfile += "رنگ آمیزی سرعتگاه ها" + "
"; } if (data.sub_items == 9) { textfile += "رنگ آمیزی پایه و کوله پل ها جهت آشکارسازی" + "
"; } return textfile; } else if (data.item == 8) { let textfile = ""; if (data.sub_items == 1) { textfile += "شستشوی علائم ایمنی اخطاری، انتظامی، مسیرنما و ..." + "
"; } if (data.sub_items == 2) { textfile += " شستشوی تابلوهای اطلاعاتی" + "
"; } if (data.sub_items == 3) { textfile += " شستشوی جداول" + "
"; } if (data.sub_items == 4) { textfile += " شستشوی نیوجرسی ها" + "
"; } if (data.sub_items == 5) { textfile += " شستشوی گاردریل ها و هندریل ها" + "
"; } if (data.sub_items == 6) { textfile += "شستشوی دیواره تونل ها" + "
"; } if (data.sub_items == 7) { textfile += "شستشوی تیکه گاه پل ها" + "
"; } return textfile; } else if (data.item == 9) { let textfile = ""; if (data.sub_items == 1) { textfile += "ایمن سازی سرگاردریل، موانع صلب، دماغه ها و موانع صلب" + "
"; } if (data.sub_items == 2) { textfile += "ایمن سازی شیب شیروانی ها" + "
"; } if (data.sub_items == 3) { textfile += "اجرای استراحتگاه" + "
"; } if (data.sub_items == 4) { textfile += "تعمیرات چراغ های آذرخشی و چشمک زن" + "
"; } if (data.sub_items == 5) { textfile += "ایجاد شیراهای لرزاننده طولی لاین کنار" + "
"; } if (data.sub_items == 6) { textfile += "ضربه گیر استوانه ای" + "
"; } if (data.sub_items == 7) { textfile += "نصب سرعت گیر استاندارد پلاستیکی" + "
"; } if (data.sub_items == 8) { textfile += "ایجاد شیارهای لرزاننده طولی در اکس راه های دوطرفه" + "
"; } if (data.sub_items == 9) { textfile += "استوانه ایمنی جهت هدایت ترافیک" + "
"; } if (data.sub_items == 10) { textfile += "استوانه ایمنی جهت هدایت ترافیک" + "
"; } if (data.sub_items == 11) { textfile += "احداث سرعتگیر آسفالتی" + "
"; } if (data.sub_items == 12) { textfile += "اجرای هره خاکی نقطه ای" + "
"; } if (data.sub_items == 13) { textfile += "اجرای هره خاکی طولی" + "
"; } if (data.sub_items == 14) { textfile += "تعریض مقطعی جهت خروج اضطراری در سراشیبی ها" + "
"; } if (data.sub_items == 15) { textfile += "حذف یا جا به جایی موانع صلب در حاشیه راه در محدوده عاری از مانع" + "
"; } return textfile; } else if (data.item == 10) { let textfile = ""; if (data.sub_items == 1) { textfile += "اخطار، تخریب، بازدید و یا تهیه اطلاعات از ساخت و ساز در حریم" + "
"; } if (data.sub_items == 2) { textfile += "اخطار، تخریب، بازدید و یا تهیه اطلاعات از ایجاد راه دسترسی در حریم" + "
"; } if (data.sub_items == 3) { textfile += "اخطار، تخریب، بازدید و یا تهیه اطلاعات از عبور تاسیسات زیر بنایی در حریم" + "
"; } if (data.sub_items == 4) { textfile += "برخورد با دستفروشان حاشیه راه" + "
"; } if (data.sub_items == 5) { textfile += "جمع آوری تابلوهای غیرمجاز در حاشیه راه ها" + "
"; } if (data.sub_items == 6) { textfile += "جمع آوری بنرهای تبلیغاتی غیرمجاز" + "
"; } return textfile; } else if (data.item == 11) { let textfile = ""; if (data.sub_items == 1) { textfile += "احداث یا مرمت قرنیز پل" + "
"; } if (data.sub_items == 2) { textfile += "لوله گذاری آبروها" + "
"; } if (data.sub_items == 3) { textfile += "تطویل و رفع انسداد آبچکان پل ها" + "
"; } if (data.sub_items == 4) { textfile += "بازسازی نرده پل" + "
"; } if (data.sub_items == 5) { textfile += "تعمیرات آبرو شامل کوله دستک و دال" + "
"; } if (data.sub_items == 6) { textfile += "مرمت و بازسازی درز انبساط" + "
"; } if (data.sub_items == 7) { textfile += "تعمیرات رادیه و برید" + "
"; } return textfile; } else if (data.item == 12) { let textfile = ""; if (data.sub_items == 1) { textfile += "زهکشی طاق تونل" + "
"; } if (data.sub_items == 2) { textfile += "مرمت و بازرسی آبروهای هدایت آب" + "
"; } if (data.sub_items == 3) { textfile += "لاینینگ" + "
"; } if (data.sub_items == 4) { textfile += "تعمیر و بازسازی گالری" + "
"; } if (data.sub_items == 5) { textfile += "گاباریت" + "
"; } if (data.sub_items == 6) { textfile += "نگهداری دوربین ها و ابزار دقیق" + "
"; } if (data.sub_items == 7) { textfile += "نگهداری تهویه تونل" + "
"; } return textfile; } else if (data.item == 13) { let textfile = ""; if (data.sub_items == 1) { textfile += "عملیات یخ زدایی با شن و نمک پاشی" + "
"; } if (data.sub_items == 2) { textfile += "برف روبی" + "
"; } if (data.sub_items == 3) { textfile += "برف روبی با بولدوزر و ماشین برف خور" + "
"; } if (data.sub_items == 4) { textfile += "برف روبی در شرایط کولاک و عدم دید" + "
"; } if (data.sub_items == 5) { textfile += "میزان نمک و شن و ماسه مصرفی" + "
"; } if (data.sub_items == 6) { textfile += "ریزش برداری" + "
"; } if (data.sub_items == 7) { textfile += "مسافرین اسکان داده شده" + "
"; } if (data.sub_items == 8) { textfile += "کمک رسانی به خودرو" + "
"; } return textfile; } else if (data.item == 14) { let textfile = ""; if (data.sub_items == 1) { textfile += "بنزین مصرفی کل ماشین آلات فعال - ماهانه" + "
"; } if (data.sub_items == 2) { textfile += "گازوئیل مصرفی کل ماشین آلات فعال - ماهانه" + "
"; } if (data.sub_items == 3) { textfile += "مواد مصرفی نفتی و انواع روغن - ماهانه" + "
"; } if (data.sub_items == 4) { textfile += "بازسازی و راه اندازی ماشین آلات" + "
"; } if (data.sub_items == 5) { textfile += "خرید ماشین آلات" + "
"; } if (data.sub_items == 6) { textfile += "خرید تجهیزآلات مرتبط به ماشین آلات" + "
"; } if (data.sub_items == 7) { textfile += "بازدید کارشناسان از ماشین آلات استان" + "
"; } if (data.sub_items == 8) { textfile += "سرویس کاری و تعمیرات جرئی روزانه" + "
"; } if (data.sub_items == 9) { textfile += "شستشوی نمک پاش ها و سایر ماشین آلات" + "
"; } if (data.sub_items == 10) { textfile += "جا به جایی دستگاه های سنگین راهداری" + "
"; } return textfile; } else if (data.item == 15) { let textfile = ""; if (data.sub_items == 1) { textfile += "راهدارخانه های بازسازی شده" + "
"; } if (data.sub_items == 2) { textfile += "خرید تجهیزآلات مرتبط با راهدارخانه ها" + "
"; } if (data.sub_items == 3) { textfile += "جلسات تشکیل شده در خصوص مدیریت بحران و پدافند غیرعامل" + "
"; } if (data.sub_items == 4) { textfile += "تعمیرات جزئی و موردی راهدارخانه ها" + "
"; } return textfile; } else if (data.item == 16) { let textfile = ""; if (data.sub_items == 1) { textfile += "پاک سازی سطح راه و رفع انسداد ناشی از ریزش کوه و سقوط بهمن" + "
"; } if (data.sub_items == 2) { textfile += "برقراری تردد و رفع انسداد ناشی از وقوع تصادف یا واژگونی وسایط نقلیه و پخش محموله در سطح راه" + "
"; } if (data.sub_items == 3) { textfile += "برقراری ارتباط و رفع انسداد ناشی از شن های روان" + "
"; } if (data.sub_items == 4) { textfile += "برقراری ارتباط در راه هایی که به دلیل آب بردگی دچار قطع ارتباط شده اند" + "
"; } if (data.sub_items == 5) { textfile += "برقراری ارتباط موقت در راه هایی که به دلیل شکستگی پل یا ریزش تونل یا ... قطع شده اند" + "
"; } if (data.sub_items == 6) { textfile += "بستن راه و هدایت ترافیکی در مواقع اضطراری" + "
"; } if (data.sub_items == 7) { textfile += "بازگشایی محورهایی که به علت کولاک مسدود شده اند" + "
"; } if (data.sub_items == 8) { textfile += "جا به جایی ماشین های سنگین گرفتار در سطح راه" + "
"; } if (data.sub_items == 9) { textfile += "لق گیری" + "
"; } return textfile; } else if (data.item == 20) { let textfile = ""; if (data.sub_items == 1) { textfile += "بازدید ادواری از ابنیه فنی و تکمیل چک لیست های مربوط توسط کارشناسان (نفر - ساعت)" + "
"; } if (data.sub_items == 2) { textfile += "بازدید ادواری از وضعیت علائم و تعیین کسری علائم و ارزیابی وضعیت خط کشی ها، تجهیزات روشنایی و تهویه تونلها و گاردریل و نظایر آنها و تکمیل چک لیستها توسط کارشناسان (نفر -ساعت)" + "
"; } if (data.sub_items == 3) { textfile += "ارزیابی ادواری وضعیت پایداری ترانشه ها و شیروانی ها، سیستم های زهکشی و ارزیابی علل ریزش ترانشه ها و علل شکست راه و تکمیل چک لیست توسط کارشناسان (نفر - ساعت)" + "
"; } if (data.sub_items == 4) { textfile += "ارزیابی ادواری وضعیت رویه های آسفالتی و شانه ها و ارزیابی و کنترل ترکها و تکمیل چک لیستها توسط کارشناسان (کیلومتر)" + "
"; } if (data.sub_items == 5) { textfile += "بررسی وضعیت حریم راه و تهیه گزارش مربوط با تجهیز و اعزام کارشناس (کیلومتر)" + "
"; } if (data.sub_items == 6) { textfile += "بازدید کارشناسان از ماشین آلات استان (تعداد دستگاه)" + "
"; } return textfile; } else return "_"; // return data.sub_items } else return "_"; } else if (data.type == "گشت راهداری و ترابری") { if ( data.sub_projects != undefined && data.sub_projects.length != 0 ) { let textfile = ""; for (var i = 0; i < data.sub_projects.length; i++) { if (data.sub_projects[i].item == 1) { data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ترمیم افتادگی لبه آسفالت" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "شانه سازی" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پر کردن گودافتادگی یا چاله با آسفالت" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "لکه گیری هندسی راه" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مرمت آبشستگی راه ها و شانه راه ها" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تنظیم سطح بستر حریم" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 2) { // textfilee += "test2" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی و جاروزنی سطح راه" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی و تنقیه آبروهای کوچک" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی سطح راه از لاشه حیوانات" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی قنوها و آبروهای طولی" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی سطح راه از آثار تصادفات" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "علف کنی و بوته کنی" + "
"; } if (value == 7) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی حریم راه از مواد زائد و نخاله های ساختمانی" + "
"; } if (value == 8) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "جمع آوری قطعات آسیب دیده حفاظ، علائم و ..." + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 3) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نصب تابلوهای اخطاری، انتظامی و مسیرنما" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نصب تابلوهای اطلاعاتی" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعویض شبرنگ تابلوهای اطلاعاتی" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نصب بازتاب بر روی گاردریل و حفاظ های حاشیه راه و چشم گربه ای" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 4) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ارتقای حفاظ میانی راه ها" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ارتقای حفاظ پل ها و پرتگاه ها" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بهسازی حفاظ های موجود" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 5) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "روشنایی طولی راه" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "روشنایی نقطه ای پارکینگ در حاشیه راه" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "روشنایی نقطه ای تقاطع در حاشیه راه" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "روشنایی نقطه ای محل نصب دوربین در حاشیه راه" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "روشنایی طولی نواحی یا گردنه های مه گیر" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "روشنایی تونل" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 6) { // let textfile = "test6" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "خط کشی با رنگ گرم ترافیکی" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "خط کشی با رنگ سرد ترافیکی" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ترسیم نقوش، فلش، خط نوشته و ..." + "
"; } }); // textfilee +="test6" } else if (data.sub_projects[i].item == 7) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "رنگ آمیزی پایه تابلوها" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "رنگ آمیزی پایه چراغ ها" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "رنگ آمیزی پایه های روشنایی" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "رنگ آمیزی پل های عابر پیاده" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "رنگ آمیزی پایه تابلوهای دروازه ای" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "رنگ آمیزی حفاظ ها" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 8) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "شستشوی علائم ایمنی اخطاری، انتظامی، مسیرنما و ..." + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + " شستشوی تابلوهای اطلاعاتی" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + " شستشوی جداول" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + " شستشوی نیوجرسی ها" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + " شستشوی گاردریل ها و هندریل ها" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "شستشوی دیواره تونل ها" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 9) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ایمن سازی سرگاردریل، موانع صلب، دماغه ها و موانع صلب" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ایمن سازی شیب شیروانی ها" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "اجرای استراحتگاه" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نصب و راه اندازی چراغ های آذرخشی و چشمک زن" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ایجاد شیراهای لرزاننده طولی" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ضربه گیر استوانه ای" + "
"; } if (value == 7) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نصب سرعت گیر استاندارد پلاستیکی" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 10) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ساخت و ساز" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "عبور تاسیسات زیربنایی" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "راه دسترسی اختصاصی" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "راه دسترسی تجمیع شده" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 11) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعمیرات الواسیون" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "دراواسیون و تنظیم بستر پل های بالای 6 متر" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "احداث رادیه و برید" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مرمت و بازسازی درز انبساط" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بازسازی نرده پل" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 12) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "زهکشی طاق تونل" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مرمت و بازرسی آبروهای هدایت آب" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "لاینینگ" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعمیر و بازسازی گالری" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "گاباریت" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 13) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "عملیات یخ زدایی با شن و نمک پاشی" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برف روبی با گریدر یا تیغه برف روب" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برف روبی با بولدوزر و ماشین برف خور" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برف روبی در شرایط کولاک و عدم دید" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "میزان نمک مصرفی" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "ریزش برداری" + "
"; } if (value == 7) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مسافرین اسکان داده شده" + "
"; } if (value == 8) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کمک رسانی به خودرو رهاشده" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 14) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بنزین مصرفی کل ماشین آلات فعال" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "گازوئیل مصرفی کل ماشین آلات فعال" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مواد مصرفی نفتی و انواع روغن" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بازسازی و راه اندازی ماشین آلات" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "خرید ماشین آلات" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "خرید تجهیزآلات مرتبط به ماشین آلات" + "
"; } if (value == 7) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بازدید کارشناسان از ماشین آلات استان" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 15) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "راهدارخانه های بازسازی شده" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "خرید تجهیزآلات مرتبط با راهدارخانه ها" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "جلسات تشکیل شده در خصوص مدیریت بحران و پدافند غیرعامل" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 16) { // let textfile = "" data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "پاک سازی سطح راه و رفع انسداد ناشی از ریزش کوه و سقوط بهمن" + "
"; } if (value == 2) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برقراری تردد و رفع انسداد ناشی از وقوع تصادف یا واژگونی وسایط نقلیه و پخش محموله در سطح راه" + "
"; } if (value == 3) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برقراری ارتباط و رفع انسداد ناشی از شن های روان" + "
"; } if (value == 4) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برقراری ارتباط در راه هایی که به دلیل آب بردگی دچار قطع ارتباط شده اند" + "
"; } if (value == 5) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "برقراری ارتباط موقت در راه هایی که به دلیل شکستگی پل یا ریزش تونل یا ... قطع شده اند" + "
"; } if (value == 6) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "بستن راه و هدایت ترافیکی در مواقع اضطراری" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 17) { // console.log("popopopopopopopitikoooooo", data.sub_projects[i].sub_items_data.report1) textfile = data.sub_projects[i].sub_items_data.report1 } else return "_"; } return textfile; } else return "_"; } else return "_"; // return data.item }, }, { data: null, render: function (data, type, row) { if (data.type == "فعالیت روزانه و جاری راهداری") { return data.sub_items_data } else if ((data.type = "گشت راهداری و ترابری")) { if ( data.sub_projects != undefined && data.sub_projects.length != 0 ) { let textfile = ""; for (var i = 0; i < data.sub_projects.length; i++) { if (data.sub_projects[i].sub_items_data != null) { if (data.sub_projects[i].item == 1) { data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "reconstruction1-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "reconstruction1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "reconstruction2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "reconstruction2-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "reconstruction3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "reconstruction3-1" ] + "
"; // textfile+="تن" } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "reconstruction4-1" ] ) { textfile += data.sub_projects[i].sub_items_data[ "reconstruction4-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "reconstruction5-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "reconstruction5-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "reconstruction6-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "reconstruction6-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 2) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "cleaning1-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "cleaning2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning2-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "cleaning3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning3-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "cleaning4-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning4-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "cleaning5-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning5-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "cleaning6-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning6-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "cleaning7-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning7-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 8) { if ( data.sub_projects[i].sub_items_data[ "cleaning8-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "cleaning8-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 3) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data["signs1-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data["signs1-1"] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data["signs2-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data["signs2-1"] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data["signs3-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data["signs3-1"] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data["signs4-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data["signs4-1"] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 4) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "shield1-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "shield1-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "shield1-1-3" ] != undefined || data.sub_projects[i].sub_items_data[ "shield1-1-4" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "shield1-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "shield1-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "shield1-2-1" ] + "
"; } } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "shield2-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "shield2-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "shield2-1-3" ] != undefined || data.sub_projects[i].sub_items_data[ "shield2-1-4" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "shield2-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "shield2-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "shield2-2-1" ] + "
"; } } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "shield3-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "shield3-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "shield3-1-3" ] != undefined || data.sub_projects[i].sub_items_data[ "shield3-1-4" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "shield3-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "shield3-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "shield3-2-1" ] + "
"; } } }); // return textfile } else if (data.sub_projects[i].item == 5) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "lighting1-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting1-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting1-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting1-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "lighting1-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "lighting1-2-1" ] + "
"; } } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "lighting2-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting2-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting2-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting2-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "lighting2-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "lighting2-2-1" ] + "
"; } } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "lighting3-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting3-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting3-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting3-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "lighting3-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "lighting3-2-1" ] + "
"; } } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "lighting4-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting4-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting4-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting4-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "lighting4-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "lighting4-2-1" ] + "
"; } } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "lighting5-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting5-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting5-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting5-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "lighting5-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "lighting5-2-1" ] + "
"; } } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "lighting6-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting6-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting6-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting6-2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "lighting6-2-1" ] + "
"; } else textfile += "_" + "
"; } else { textfile += data.sub_projects[i].sub_items_data[ "lighting6-2-1" ] + "
"; } } }); // return textfile } else if (data.sub_projects[i].item == 6) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data["lining1-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data["lining1-1"] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data["lining2-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data["lining2-1"] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data["lining3-1"] ) { textfile += data.sub_projects[i].sub_items_data["lining3-1"] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 7) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "coloring1-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "coloring1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "coloring2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "coloring2-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "coloring3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "coloring3-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "coloring4-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "coloring4-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "coloring5-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "coloring5-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "coloring6-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "coloring6-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 8) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data["washing1-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "washing1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data["washing2-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "washing2-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data["washing3-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "washing3-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data["washing4-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "washing4-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data["washing5-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "washing5-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data["washing6-1"] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "washing6-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 9) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "securing1-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "securing2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing2-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "securing3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing3-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "securing4-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing4-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "securing5-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing5-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "securing6-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing6-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "securing7-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "securing7-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 10) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "privacy1-1-1" ] != undefined ) { textfile += "اخطار" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy1-1-2" ] != undefined ) { textfile += "تخریب" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy1-1-3" ] != undefined ) { textfile += "مجوز" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy1-1-3" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy1-1-2" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy1-1-1" ] == undefined ) { textfile += "_" + "
"; } } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "privacy2-1-1" ] != undefined ) { textfile += "اخطار" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy2-1-2" ] != undefined ) { textfile += "تخریب" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy2-1-3" ] != undefined ) { textfile += "مجوز" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy2-1-3" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy2-1-2" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy2-1-1" ] == undefined ) { textfile += "_" + "
"; } } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "privacy3-1-1" ] != undefined ) { textfile += "اخطار " + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy3-1-2" ] != undefined ) { textfile += "تخریب " + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy3-1-3" ] != undefined ) { textfile += "مجوز " + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy3-1-3" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy3-1-2" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy3-1-1" ] == undefined ) { textfile += "_" + "
"; } } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "privacy4-1-1" ] != undefined ) { textfile += "اخطار" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy4-1-2" ] != undefined ) { textfile += "تخریب" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy4-1-3" ] != undefined ) { textfile += "مجوز" + "
"; } if ( data.sub_projects[i].sub_items_data[ "privacy4-1-3" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy4-1-2" ] == undefined && data.sub_projects[i].sub_items_data[ "privacy4-1-1" ] == undefined ) { textfile += "_" + "
"; } } }); // return textfile } else if (data.sub_projects[i].item == 13) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "winterOperation1-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "winterOperation1-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation1-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "winterOperation3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation3-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "winterOperation4-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation4-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "winterOperation5-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation5-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "winterOperation6-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation6-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "winterOperation7-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation7-1" ] + "
"; } else textfile = "_" + "
"; } if (value == 8) { if ( data.sub_projects[i].sub_items_data[ "winterOperation8-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "winterOperation8-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 14) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "machinery1-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery1-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "machinery2-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery2-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "machinery3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery3-1" ] + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "machinery4-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery4-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery4-1" ] + data.sub_projects[i].sub_items_data[ "machinery4-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery4-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery4-2" ] == undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery4-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery4-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery4-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery4-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "machinery5-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery5-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery5-1" ] + data.sub_projects[i].sub_items_data[ "machinery5-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery5-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery5-2" ] == undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery5-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery5-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery5-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery5-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "machinery6-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery6-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery6-1" ] + data.sub_projects[i].sub_items_data[ "machinery6-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery6-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery6-2" ] == undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery6-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery6-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery6-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery6-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "machinery7-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery7-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery7-1" ] + data.sub_projects[i].sub_items_data[ "machinery7-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery7-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery7-2" ] == undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery7-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery7-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery7-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "machinery7-2" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 15) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] + data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] == undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] == undefined && data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] + data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] == undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] == undefined && data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "tollhouse3-1" ] != undefined ) { textfile += data.sub_projects[i].sub_items_data[ "tollhouse3-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else return "_"; // return textfile } else return "_"; } return textfile; } else return "_"; } else return "_"; // return data.item }, }, { data: null, render: function (data, type, row) { if (data.type == "فعالیت روزانه و جاری راهداری") { return data.unit_fa } else if ((data.type = "گشت راهداری و ترابری")) { if ( data.sub_projects != undefined && data.sub_projects.length != 0 ) { let textfile = ""; for (var i = 0; i < data.sub_projects.length; i++) { if (data.sub_projects[i].sub_items_data != null) { if (data.sub_projects[i].item == 1) { data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "reconstruction1-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "reconstruction2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر " + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "reconstruction3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + " تن" + "
"; // textfile+="تن" } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "reconstruction4-1" ] ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + " متر مربع" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "reconstruction5-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "متر مکعب " + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "reconstruction6-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر " + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 2) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "cleaning1-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "cleaning2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "متر مکعب" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "cleaning3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "cleaning4-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "cleaning5-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترطول-باند" + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "cleaning6-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "cleaning7-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 8) { if ( data.sub_projects[i].sub_items_data[ "cleaning8-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تن" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 3) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data["signs1-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data["signs2-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data["signs3-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data["signs4-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 4) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "shield1-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "shield1-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "shield1-1-3" ] != undefined || data.sub_projects[i].sub_items_data[ "shield1-1-4" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "shield1-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "shield2-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "shield2-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "shield2-1-3" ] != undefined || data.sub_projects[i].sub_items_data[ "shield2-1-4" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "shield2-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "shield3-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "shield3-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "shield3-1-3" ] != undefined || data.sub_projects[i].sub_items_data[ "shield3-1-4" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "shield3-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } } }); // return textfile } else if (data.sub_projects[i].item == 5) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "lighting1-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting1-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting1-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting1-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "lighting2-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting2-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting2-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting2-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "lighting3-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting3-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting3-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting3-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "lighting4-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting4-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting4-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting4-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "lighting5-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting5-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting5-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting5-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "lighting6-1-1" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting6-1-2" ] != undefined || data.sub_projects[i].sub_items_data[ "lighting6-1-3" ] != undefined ) { if ( data.sub_projects[i].sub_items_data[ "lighting6-2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } else textfile += "_" + "
"; } else { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "موردی" + "
"; } } }); // return textfile } else if (data.sub_projects[i].item == 6) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data["lining1-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-رنگ" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data["lining2-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-رنگ" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data["lining3-1"] ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 7) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "coloring1-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "coloring2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "coloring3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "اصله" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "coloring4-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "دستگاه" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "coloring5-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "coloring6-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 8) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data["washing1-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data["washing2-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data["washing3-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data["washing4-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data["washing5-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data["washing6-1"] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مترمربع" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 9) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "securing1-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "securing2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "securing3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "باب" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "securing4-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "دستگاه" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "securing5-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-شیار" + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "securing6-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "securing7-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "طول" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 13) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "winterOperation1-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "winterOperation1-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "winterOperation3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "winterOperation4-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "winterOperation5-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تن" + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "winterOperation6-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "مقطع" + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "winterOperation7-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile = "_" + "
"; } if (value == 8) { if ( data.sub_projects[i].sub_items_data[ "winterOperation8-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد" + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 14) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "machinery1-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "لیتر" + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "machinery2-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "لیتر" + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "machinery3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "لیتر" + "
"; } else textfile += "_" + "
"; } if (value == 4) { if ( data.sub_projects[i].sub_items_data[ "machinery4-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery4-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "هزینه" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery4-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery4-2" ] == undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery4-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery4-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "هزینه" + "
"; } else textfile += "_" + "
"; } if (value == 5) { if ( data.sub_projects[i].sub_items_data[ "machinery5-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery5-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "نوع کاربری" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery5-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery5-2" ] == undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery5-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery5-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نوع کاربری " + "
"; } else textfile += "_" + "
"; } if (value == 6) { if ( data.sub_projects[i].sub_items_data[ "machinery6-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery6-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "نوع کاربری" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery6-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery6-2" ] == undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery6-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery6-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "نوع کاربری" + "
"; } else textfile += "_" + "
"; } if (value == 7) { if ( data.sub_projects[i].sub_items_data[ "machinery7-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery7-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "تعداد بازدید " + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery7-1" ] != undefined && data.sub_projects[i].sub_items_data[ "machinery7-2" ] == undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد دستگاه" + "
"; } else if ( data.sub_projects[i].sub_items_data[ "machinery7-1" ] == undefined && data.sub_projects[i].sub_items_data[ "machinery7-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + "تعداد بازدید " + "
"; } else textfile += "_" + "
"; } }); // return textfile } else if (data.sub_projects[i].item == 15) { // let textfile = ""; data.sub_projects[i].sub_items.forEach(function ( value, index ) { if (value == 1) { if ( data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] + data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] == undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse1-1" ] == undefined && data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse1-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 2) { if ( data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] + data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] != undefined && data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] == undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] + "
"; } else if ( data.sub_projects[i].sub_items_data[ "tollhouse2-1" ] == undefined && data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse2-2" ] + "
"; } else textfile += "_" + "
"; } if (value == 3) { if ( data.sub_projects[i].sub_items_data[ "tollhouse3-1" ] != undefined ) { textfile += i + 1 + "_" + (index + 1) + ")" + " " + data.sub_projects[i].sub_items_data[ "tollhouse3-1" ] + "
"; } else textfile += "_" + "
"; } }); // return textfile } else return "_"; // return textfile } else return "_"; } return textfile; } else return "_"; } else return "_"; // return data.item }, }, { data: "created_at_jalali" }, { orderable: false, className: "text-center", data: null, render: function (data, type, row) { if (data.type == "فعالیت روزانه و جاری راهداری") { if (data.can_delete == 1) { return ( ' ' ); } else return ( ' ' ); } else if (data.type !== "فعالیت روزانه و جاری راهداری") { if (data.can_delete == 1) { return ' '; } else return ' '; } }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, buttons: [ { extend: "excelHtml5", title: "Excel", /// [START] report_road_excel text: `
خروجی به اکسل
`, /// [end] report_road_excel exportOptions: { columns: [0, 1, 2, 3, 4, 5, 6, 7, 8], }, }, { /// [START] report_road_excel_filter text: `
خروجی به اکسل (جدید)
`, /// [end] report_road_excel_filter action: function (e, dt, node, config) { /// [START] report_road_excel_filter_province $('.select-province-box').css('display', $.inArray('report-road-item', PERMISSIONS) != -1 ? '' : 'none') /// [end] report_road_excel_filter_province topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'roaditem3') $(".parent-excel").find('.btn-set-excel').data('hasType', false) $(".parent-excel").find('.btn-set-excel').data('type', -1) $(".parent-excel").css("display", "block"); }, }, ], }); } function gozarehtowntable(probj) { // alert("hiii") gozareshtable = $("#gozarehtowntable").DataTable({ // dom: 'lBfrtip', dom: "p>", scrollX: true, destroy: true, pagingType: "simple_numbers", autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [0, "asc"] ], processing: true, ajax: { url: "https://rms.rmto.ir/report/total-group-province", type: "GET", dataSrc: function (json) { hideLoaderScreen() probjData = [] var sumrahdari; for (var j = 0; j < probj.length; j++) { probjData[j] = { id: probj[j].id, name_fa: probj[j].name_fa } for (var i = 0; i < json.data.length; i++) { if (probj[j].id == json.data[i].p) { probjData[j]['t' + json.data[i].i] = { "s": json.data[i].s } } } } return probjData }, }, columns: [{ "className": 'AcitivityMount', "orderable": false, "data": null, "defaultContent": '' }, { data: "name_fa" }, { data: null, render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t10 != null) { return data.t10.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t11 != null) { return data.t11.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t12 != null) { return data.t12.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t13 != null) { return data.t13.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t14 != null) { return data.t14.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t15 != null) { return data.t15.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t16 != null) { return data.t16.s } else { return "" } } }, { data: null, render: function (data, type, row) { if (data.t20 != null) { return data.t20.s } else { return "" } } }, { data: null, render: function (data, type, row) { var summajmoo = 0 if (data.t1 != null) { summajmoo = summajmoo + data.t1.s } if (data.t2 != null) { summajmoo = summajmoo + data.t2.s } if (data.t3 != null) { summajmoo = summajmoo + data.t3.s } if (data.t4 != null) { summajmoo = summajmoo + data.t4.s } if (data.t5 != null) { summajmoo = summajmoo + data.t5.s } if (data.t6 != null) { summajmoo = summajmoo + data.t6.s } if (data.t7 != null) { summajmoo = summajmoo + data.t7.s } if (data.t8 != null) { summajmoo = summajmoo + data.t8.s } if (data.t9 != null) { summajmoo = summajmoo + data.t9.s } if (data.t10 != null) { summajmoo = summajmoo + data.t10.s } if (data.t11 != null) { summajmoo = summajmoo + data.t11.s } if (data.t12 != null) { summajmoo = summajmoo + data.t12.s } if (data.t13 != null) { summajmoo = summajmoo + data.t13.s } if (data.t14 != null) { summajmoo = summajmoo + data.t14.s } if (data.t15 != null) { summajmoo = summajmoo + data.t15.s } if (data.t16 != null) { summajmoo = summajmoo + data.t16.s } if (data.t20 != null) { summajmoo = summajmoo + data.t20.s } return summajmoo } }, { className: "text-center", data: null, render: function (data, type, row) { if (data.t77 != null) { return data.t77.s } else { return "" } } }, ], buttons: [ { text: '
خروجی به اکسل (جدید)
', action: function (e, dt, node, config) { $('.select-province-box').css('display', '') topPosition = $(e.target).parents('.btn-table-excel').offset().top + $(e.target).parents('.btn-table-excel').height() + 10 $(".parent-excel").css('top', topPosition) $(".parent-excel").find('.btn-set-excel').data('table', 'roaditem1') $(".parent-excel").find('.btn-set-excel').data('hasType', false) $(".parent-excel").find('.btn-set-excel').data('type', -1) $(".parent-excel").css("display", "block"); }, }, ], initComplete: function (settings, json) { $("body").find(".dataTables_scrollBody").addClass("scrollbar"); }, }); } function format(row, num) { // console.log("rowwwwwwwwwwww" , row.data()[0] ) showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=1&province_id" + num, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { return showtablerizzz(result, row) // return "

hiiiiiii

" // alert("hiii") }, error: function (error) { }, }); } function showtablerizzz(res, row) { hideLoaderScreen() row.child(format(row.data("

hiiii

"))).show(); } $("#gozarehtowntable").on("click", "td.details-control", function (e) { var tr = $(this).closest('tr'); var row = gozareshtable.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() if (sorttestitemsflag == 1) { if ( $("#fromDateshowrizitem").val() != " " && $("#toDateshowrizitem").val() != " " ) { // alert("hihiihiijijjjk") let date_from = moment( fromDateshowrizitem.getState().selected.year + "/" + fromDateshowrizitem.getState().selected.month + "/" + fromDateshowrizitem.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( toDateshowrizitem.getState().selected.year + "/" + toDateshowrizitem.getState().selected.month + "/" + toDateshowrizitem.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-group-province-city?province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].c) { objectfiltertable[j]['t' + result.data[i].i] = { "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectfiltertable.length; i++) { var addnum = 0 if ((objectfiltertable[i].t1) != null) { addnum = addnum + objectfiltertable[i].t1.s } if ((objectfiltertable[i].t2) != null) { addnum = addnum + objectfiltertable[i].t2.s } if ((objectfiltertable[i].t3) != null) { addnum = addnum + objectfiltertable[i].t3.s } if ((objectfiltertable[i].t4) != null) { addnum = addnum + objectfiltertable[i].t4.s } if ((objectfiltertable[i].t5) != null) { addnum = addnum + objectfiltertable[i].t5.s } if ((objectfiltertable[i].t6) != null) { addnum = addnum + objectfiltertable[i].t6.s } if ((objectfiltertable[i].t7) != null) { addnum = addnum + objectfiltertable[i].t7.s } if ((objectfiltertable[i].t8) != null) { addnum = addnum + objectfiltertable[i].t8.s } if ((objectfiltertable[i].t9) != null) { addnum = addnum + objectfiltertable[i].t9.s } if ((objectfiltertable[i].t10) != null) { addnum = addnum + objectfiltertable[i].t10.s } if ((objectfiltertable[i].t11) != null) { addnum = addnum + objectfiltertable[i].t11.s } if ((objectfiltertable[i].t12) != null) { addnum = addnum + objectfiltertable[i].t12.s } if ((objectfiltertable[i].t13) != null) { addnum = addnum + objectfiltertable[i].t13.s } if ((objectfiltertable[i].t14) != null) { addnum = addnum + objectfiltertable[i].t14.s } if ((objectfiltertable[i].t15) != null) { addnum = addnum + objectfiltertable[i].t15.s } if ((objectfiltertable[i].t16) != null) { addnum = addnum + objectfiltertable[i].t16.s } if (addnum == 0) { addnum = "" } testi = testi + '' + '' + " " + '' + '' + objectfiltertable[i].name_fa + '' + '' + checkfunctionS(objectfiltertable[i].t1) + '' + '' + checkfunctionS(objectfiltertable[i].t2) + '' + '' + checkfunctionS(objectfiltertable[i].t3) + '' + '' + checkfunctionS(objectfiltertable[i].t4) + '' + '' + checkfunctionS(objectfiltertable[i].t5) + '' + '' + checkfunctionS(objectfiltertable[i].t6) + '' + '' + checkfunctionS(objectfiltertable[i].t7) + '' + '' + checkfunctionS(objectfiltertable[i].t8) + '' + '' + checkfunctionS(objectfiltertable[i].t9) + '' + '' + checkfunctionS(objectfiltertable[i].t10) + '' + '' + checkfunctionS(objectfiltertable[i].t11) + '' + '' + checkfunctionS(objectfiltertable[i].t12) + '' + '' + checkfunctionS(objectfiltertable[i].t13) + '' + '' + checkfunctionS(objectfiltertable[i].t14) + '' + '' + checkfunctionS(objectfiltertable[i].t15) + '' + '' + checkfunctionS(objectfiltertable[i].t16) + '' + '' + checkfunctionS(objectfiltertable[i].t20) + '' + '' + addnum + '' + '' + checkfunctionS(objectfiltertable[i].t77) + '' + ''; } hideLoaderScreen() pdata = '\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } else { $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-group-province-city?province_id=" + provinceid, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].c) { objectfiltertable[j]['t' + result.data[i].i] = { "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectfiltertable.length; i++) { var addnum = 0 if ((objectfiltertable[i].t1) != null) { addnum = addnum + objectfiltertable[i].t1.s } if ((objectfiltertable[i].t2) != null) { addnum = addnum + objectfiltertable[i].t2.s } if ((objectfiltertable[i].t3) != null) { addnum = addnum + objectfiltertable[i].t3.s } if ((objectfiltertable[i].t4) != null) { addnum = addnum + objectfiltertable[i].t4.s } if ((objectfiltertable[i].t5) != null) { addnum = addnum + objectfiltertable[i].t5.s } if ((objectfiltertable[i].t6) != null) { addnum = addnum + objectfiltertable[i].t6.s } if ((objectfiltertable[i].t7) != null) { addnum = addnum + objectfiltertable[i].t7.s } if ((objectfiltertable[i].t8) != null) { addnum = addnum + objectfiltertable[i].t8.s } if ((objectfiltertable[i].t9) != null) { addnum = addnum + objectfiltertable[i].t9.s } if ((objectfiltertable[i].t10) != null) { addnum = addnum + objectfiltertable[i].t10.s } if ((objectfiltertable[i].t11) != null) { addnum = addnum + objectfiltertable[i].t11.s } if ((objectfiltertable[i].t12) != null) { addnum = addnum + objectfiltertable[i].t12.s } if ((objectfiltertable[i].t13) != null) { addnum = addnum + objectfiltertable[i].t13.s } if ((objectfiltertable[i].t14) != null) { addnum = addnum + objectfiltertable[i].t14.s } if ((objectfiltertable[i].t15) != null) { addnum = addnum + objectfiltertable[i].t15.s } if ((objectfiltertable[i].t16) != null) { addnum = addnum + objectfiltertable[i].t16.s } if (addnum == 0) { addnum = "" } testi = testi + '' + '' + " " + '' + '' + objectfiltertable[i].name_fa + '' + '' + checkfunctionS(objectfiltertable[i].t1) + '' + '' + checkfunctionS(objectfiltertable[i].t2) + '' + '' + checkfunctionS(objectfiltertable[i].t3) + '' + '' + checkfunctionS(objectfiltertable[i].t4) + '' + '' + checkfunctionS(objectfiltertable[i].t5) + '' + '' + checkfunctionS(objectfiltertable[i].t6) + '' + '' + checkfunctionS(objectfiltertable[i].t7) + '' + '' + checkfunctionS(objectfiltertable[i].t8) + '' + '' + checkfunctionS(objectfiltertable[i].t9) + '' + '' + checkfunctionS(objectfiltertable[i].t10) + '' + '' + checkfunctionS(objectfiltertable[i].t11) + '' + '' + checkfunctionS(objectfiltertable[i].t12) + '' + '' + checkfunctionS(objectfiltertable[i].t13) + '' + '' + checkfunctionS(objectfiltertable[i].t14) + '' + '' + checkfunctionS(objectfiltertable[i].t15) + '' + '' + checkfunctionS(objectfiltertable[i].t16) + '' + '' + checkfunctionS(objectfiltertable[i].t20) + '' + '' + addnum + '' + '' + checkfunctionS(objectfiltertable[i].t77) + '' + ''; } hideLoaderScreen() pdata = '\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } } }) $("#maremat").on("click", "td.details-control", function (e) { let date_from let date_to var v1 var v2 var v3 var v4 var v5 var v6 var v7 var v8 var v9 var v10 var v11 var v12 var v13 if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablemaremat.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { // showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=1&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t8) + '' + '' + checkfunctionS(objectitemstable[i].t8) + '' + '' + checkfunctionC(objectitemstable[i].t9) + '' + '' + checkfunctionS(objectitemstable[i].t9) + '' + '' + checkfunctionC(objectitemstable[i].t10) + '' + '' + checkfunctionS(objectitemstable[i].t10) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + '' + checkfunctionC(objectitemstable[i].t11) + '' + '' + checkfunctionS(objectitemstable[i].t11) + '' + '' + checkfunctionC(objectitemstable[i].t12) + '' + '' + checkfunctionS(objectitemstable[i].t12) + '' + '' + checkfunctionC(objectitemstable[i].t13) + '' + '' + checkfunctionS(objectitemstable[i].t13) + '' + ''; } // hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#paksazi").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablepaksazi.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=2&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t9) + '' + '' + checkfunctionS(objectitemstable[i].t9) + '' + '' + checkfunctionC(objectitemstable[i].t10) + '' + '' + checkfunctionS(objectitemstable[i].t10) + '' + '' + checkfunctionC(objectitemstable[i].t11) + '' + '' + checkfunctionS(objectitemstable[i].t11) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t12) + '' + '' + checkfunctionS(objectitemstable[i].t12) + '' + '' + checkfunctionC(objectitemstable[i].t13) + '' + '' + checkfunctionS(objectitemstable[i].t13) + '' + '' + checkfunctionC(objectitemstable[i].t14) + '' + '' + checkfunctionS(objectitemstable[i].t14) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t15) + '' + '' + checkfunctionS(objectitemstable[i].t15) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + '' + checkfunctionC(objectitemstable[i].t16) + '' + '' + checkfunctionS(objectitemstable[i].t16) + '' + '' + checkfunctionC(objectitemstable[i].t7) + '' + '' + checkfunctionS(objectitemstable[i].t7) + '' + '' + checkfunctionC(objectitemstable[i].t8) + '' + '' + checkfunctionS(objectitemstable[i].t8) + '' + '' + checkfunctionC(objectitemstable[i].t17) + '' + '' + checkfunctionS(objectitemstable[i].t17) + '' + '' + checkfunctionC(objectitemstable[i].t18) + '' + '' + checkfunctionS(objectitemstable[i].t18) + '' + '' + checkfunctionC(objectitemstable[i].t19) + '' + '' + checkfunctionS(objectitemstable[i].t19) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#alaem").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablealaem.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=3&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + '' + checkfunctionC(objectitemstable[i].t7) + '' + '' + checkfunctionS(objectitemstable[i].t7) + '' + '' + checkfunctionC(objectitemstable[i].t8) + '' + '' + checkfunctionS(objectitemstable[i].t8) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#hefaz").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablehefaz.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=4&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + "" + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) //lighting $("#lighting").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablelighting.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=5&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + '' + checkfunctionC(objectitemstable[i].t7) + '' + '' + checkfunctionS(objectitemstable[i].t7) + '' + '' + checkfunctionC(objectitemstable[i].t8) + '' + '' + checkfunctionS(objectitemstable[i].t8) + '' + '' + checkfunctionC(objectitemstable[i].t9) + '' + '' + checkfunctionS(objectitemstable[i].t9) + '' + '' + checkfunctionC(objectitemstable[i].t10) + '' + '' + checkfunctionS(objectitemstable[i].t10) + '' + '' + checkfunctionC(objectitemstable[i].t11) + '' + '' + checkfunctionS(objectitemstable[i].t11) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#ruler").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tableruller.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=6&province_id=" + provinceid, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#coloring").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablecoloring.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=7&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + '' + checkfunctionC(objectitemstable[i].t7) + '' + '' + checkfunctionS(objectitemstable[i].t7) + '' + '' + checkfunctionC(objectitemstable[i].t8) + '' + '' + checkfunctionS(objectitemstable[i].t8) + '' + '' + checkfunctionC(objectitemstable[i].t9) + '' + '' + checkfunctionS(objectitemstable[i].t9) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#saftey").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablesafety.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=9&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + '' + checkfunctionC(objectitemstable[i].t7) + '' + '' + checkfunctionS(objectitemstable[i].t7) + '' + '' + checkfunctionC(objectitemstable[i].t8) + '' + '' + checkfunctionS(objectitemstable[i].t8) + '' + '' + checkfunctionC(objectitemstable[i].t9) + '' + '' + checkfunctionS(objectitemstable[i].t9) + '' + '' + checkfunctionC(objectitemstable[i].t10) + '' + '' + checkfunctionS(objectitemstable[i].t10) + '' + '' + checkfunctionC(objectitemstable[i].t11) + '' + '' + checkfunctionS(objectitemstable[i].t11) + '' + '' + checkfunctionC(objectitemstable[i].t12) + '' + '' + checkfunctionS(objectitemstable[i].t12) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#washed").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablewashing.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=8&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + '' + checkfunctionC(objectitemstable[i].t7) + '' + '' + checkfunctionS(objectitemstable[i].t7) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#harim").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tableharim.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=10&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#pol").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablepol.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=11&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + '' + checkfunctionC(objectitemstable[i].t7) + '' + '' + checkfunctionS(objectitemstable[i].t7) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#tunnelGaleri").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tabletunnel.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=12&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + '' + checkfunctionC(objectitemstable[i].t7) + '' + '' + checkfunctionS(objectitemstable[i].t7) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#zemestanii").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablezem.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=13&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#mashinAlat").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablemachin.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=14&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + '' + checkfunctionC(objectitemstable[i].t7) + '' + '' + checkfunctionS(objectitemstable[i].t7) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#tollhouse").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablerahdar.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=15&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) $("#emergency").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tableemer.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=16&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionS(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionS(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionS(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionS(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionS(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + '' + checkfunctionS(objectitemstable[i].t6) + '' + '' + checkfunctionC(objectitemstable[i].t7) + '' + '' + checkfunctionS(objectitemstable[i].t7) + '' + '' + checkfunctionC(objectitemstable[i].t8) + '' + '' + checkfunctionS(objectitemstable[i].t8) + '' + '' + checkfunctionC(objectitemstable[i].t9) + '' + '' + checkfunctionS(objectitemstable[i].t9) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) //item bazdid bare $("#controlitemm").on("click", "td.details-control", function (e) { let date_from let date_to if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log("from", date_from) date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); } var tr = $(this).closest('tr'); var row = tablecontrol.row(tr); var provinceid = row.data().id; if (provinceid != -1) { if (row.child.isShown()) { row.child.hide(); tr.removeClass('shown'); } else { showLoaderScreen() $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, success: function (result) { objectitemstable = []; for (var i = 0; i < result.data.length; i++) { // eacharray.province= i objectitemstable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=20&province_id=" + provinceid + "&date_from=" + date_from + "&date_to=" + date_to, type: "GET", cache: false, contentType: false, processData: false, success: function (result) { // objectsend={} for (var j = 0; j < objectitemstable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectitemstable[j].id == result.data[i].ci) { objectitemstable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } var pdata = '' var testi = '' for (var i = 0; i < objectitemstable.length; i++) { testi = testi + '' + '' + " " + '' + '' + objectitemstable[i].name_fa + '' + '' + checkfunctionC(objectitemstable[i].t1) + '' + '' + checkfunctionC(objectitemstable[i].t2) + '' + '' + checkfunctionC(objectitemstable[i].t3) + '' + '' + checkfunctionC(objectitemstable[i].t4) + '' + '' + checkfunctionC(objectitemstable[i].t5) + '' + '' + checkfunctionC(objectitemstable[i].t6) + '' + ''; } hideLoaderScreen() pdata = '' + testi + '
' row.child(pdata).show(); $('.tablechoose').parent().css('padding', '0px'); tr.addClass('shown'); }, error: function (error) { }, }); } }) } } }) // item bazdidi bare function checkfunctionC(obj) { if (obj != undefined) { return obj.c } else { return "" } } function checkfunctionS(obj) { if (obj != undefined) { return obj.s } else { return "" } } $("#sorttestitems").on("click", function () { //backhear sorttestitemsflag = 1 // alert("giiii") if ( $("#fromDateshowrizitem").val() != " " && $("#toDateshowrizitem").val() != " " ) { // alert("hihiihiijijjjk") let date_from = moment( fromDateshowrizitem.getState().selected.year + "/" + fromDateshowrizitem.getState().selected.month + "/" + fromDateshowrizitem.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( toDateshowrizitem.getState().selected.year + "/" + toDateshowrizitem.getState().selected.month + "/" + toDateshowrizitem.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); showLoaderScreen() $("#gozarehtowntable").dataTable().fnClearTable(); $("#gozarehtowntable") .DataTable() .ajax.url( "https://rms.rmto.ir/report/total-group-province" + "?from_date=" + date_from + "&date_to=" + date_to ) .load(); // hideLoaderScreen() } }); $("#marematsort").on("click", function () { var optionselected = $("#optionfilter option:selected").val() // alert("giiii") if ( $("#fromdatamaremat").val() != " " && $("#todatemaremat").val() != " " ) { // alert("hihiihiijijjjk") let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); showLoaderScreen() if (parseInt(optionselected) + 1 == 1) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#maremat") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 2) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#paksazi") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 3) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#alaem") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 4) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#hefaz") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 5) { var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + parseInt(optionselected) + 1; $("#lighting") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 6) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#ruler") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 7) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#coloring") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 8) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#washed") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 9) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#saftey") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 10) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#harim") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 11) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#pol") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 12) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#tunnelGaleri") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 13) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#tunnelGaleri") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 14) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#mashinAlat") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 15) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#tollhouse") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } else if (parseInt(optionselected) + 1 == 16) { var optionselect = parseInt(optionselected) + 1; var urlselectd = "https://rms.rmto.ir/report/total-items-group-province?item=" + optionselect; $("#emergency") .DataTable() .ajax.url( urlselectd + "&from_date=" + date_from + "&date_to=" + date_to ) .load(); } } // $("#example").DataTable().clear().draw(); hideLoaderScreen() }); // set new zir item $("#gozarehtowntable").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#gozarehtowntable .internal-table').remove() $('#gozarehtowntable .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#gozarehtowntable .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = gozareshtable.row(tr); var provinceid = row.data().id; var ths = $('#gozarehtowntable .th-head') $('#gozarehtowntable .internal-table').remove() internalTable(tr, "cityTable", 21) .then( (onResolved) => { // get data let date_from = moment( fromDateshowrizitem.getState().selected.year + "/" + fromDateshowrizitem.getState().selected.month + "/" + fromDateshowrizitem.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( toDateshowrizitem.getState().selected.year + "/" + toDateshowrizitem.getState().selected.month + "/" + toDateshowrizitem.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-group-province-city?province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { console.log({objectfiltertable,result}) for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].c) { objectfiltertable[j]['t' + result.data[i].i] = { "s": result.data[i].s } } } } console.log({objectfiltertable}) }, error: function (error) { }, }); //second ajax //get data var gozarehtowntableCity = $("#cityTable").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [18, "desc"] ], processing: true, data: objectfiltertable, columns: [{ data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { data: "name_fa", width: ths.eq(1).css('width'), }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t10 != null) { return data.t10.s } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t11 != null) { return data.t11.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t12 != null) { return data.t12.s } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t13 != null) { return data.t13.s } else { return "" } } }, { data: null, width: ths.eq(16).css('width'), render: function (data, type, row) { if (data.t14 != null) { return data.t14.s } else { return "" } } }, { data: null, width: ths.eq(17).css('width'), render: function (data, type, row) { if (data.t15 != null) { return data.t15.s } else { return "" } } }, { data: null, width: ths.eq(18).css('width'), render: function (data, type, row) { if (data.t16 != null) { return data.t16.s } else { return "" } } }, { data: null, width: ths.eq(19).css('width'), render: function (data, type, row) { if (data.t20 != null) { return data.t20.s } else { return "" } } }, { data: null, width: ths.eq(20).css('width'), render: function (data, type, row) { var summajmoo = 0 if (data.t1 != null) { summajmoo = summajmoo + data.t1.s } if (data.t2 != null) { summajmoo = summajmoo + data.t2.s } if (data.t3 != null) { summajmoo = summajmoo + data.t3.s } if (data.t4 != null) { summajmoo = summajmoo + data.t4.s } if (data.t5 != null) { summajmoo = summajmoo + data.t5.s } if (data.t6 != null) { summajmoo = summajmoo + data.t6.s } if (data.t7 != null) { summajmoo = summajmoo + data.t7.s } if (data.t8 != null) { summajmoo = summajmoo + data.t8.s } if (data.t9 != null) { summajmoo = summajmoo + data.t9.s } if (data.t10 != null) { summajmoo = summajmoo + data.t10.s } if (data.t11 != null) { summajmoo = summajmoo + data.t11.s } if (data.t12 != null) { summajmoo = summajmoo + data.t12.s } if (data.t13 != null) { summajmoo = summajmoo + data.t13.s } if (data.t14 != null) { summajmoo = summajmoo + data.t14.s } if (data.t15 != null) { summajmoo = summajmoo + data.t15.s } if (data.t16 != null) { summajmoo = summajmoo + data.t16.s } if (data.t20 != null) { summajmoo = summajmoo + data.t20.s } return summajmoo } }, { className: "text-center", data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t77 != null) { return data.t77.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set maremat $("#maremat").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#maremat .internal-table').remove() $('#maremat .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#maremat .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablemaremat.row(tr); var provinceid = row.data().id; var ths = $('#maremat .th-head') $('#maremat .internal-table').remove() internalTable(tr, "cityTableMaremat", 26) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=1&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); //second ajax //get data var marematCityTable = $("#cityTableMaremat").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [18, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { data: "name_fa", width: ths.eq(1).css('width'), }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t10 != null) { return data.t10.c } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t10 != null) { return data.t10.s } else { return "" } } }, { data: null, width: ths.eq(16).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(17).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(18).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(19).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(20).css('width'), render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, width: ths.eq(21).css('width'), render: function (data, type, row) { if (data.t11 != null) { return data.t11.s } else { return "" } } }, { data: null, width: ths.eq(22).css('width'), render: function (data, type, row) { if (data.t12 != null) { return data.t12.c } else { return "" } } }, { data: null, width: ths.eq(23).css('width'), render: function (data, type, row) { if (data.t12 != null) { return data.t12.s } else { return "" } } }, { data: null, width: ths.eq(24).css('width'), render: function (data, type, row) { if (data.t13 != null) { return data.t13.c } else { return "" } } }, { data: null, width: ths.eq(25).css('width'), render: function (data, type, row) { if (data.t13 != null) { return data.t13.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set maremat // set paksazi $("#paksazi").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#paksazi .internal-table').remove() $('#paksazi .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#paksazi .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablepaksazi.row(tr); var provinceid = row.data().id; var ths = $('#paksazi .th-head') $('#paksazi .internal-table').remove() internalTable(tr, "cityTablePaksazi", 40) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=2&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); //second ajax //get data var paksaziTable = $("#cityTablePaksazi").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [18, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { width: ths.eq(1).css('width'), data: "name_fa" }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t10 != null) { return data.t10.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t10 != null) { return data.t10.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t11 != null) { return data.t11.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t12 != null) { return data.t12.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t12 != null) { return data.t12.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t13 != null) { return data.t13.c } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t13 != null) { return data.t13.s } else { return "" } } }, { data: null, width: ths.eq(16).css('width'), render: function (data, type, row) { if (data.t14 != null) { return data.t14.c } else { return "" } } }, { data: null, width: ths.eq(17).css('width'), render: function (data, type, row) { if (data.t14 != null) { return data.t14.s } else { return "" } } }, { data: null, width: ths.eq(18).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(19).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(20).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(21).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(22).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(23).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(24).css('width'), render: function (data, type, row) { if (data.t15 != null) { return data.t15.c } else { return "" } } }, { data: null, width: ths.eq(25).css('width'), render: function (data, type, row) { if (data.t15 != null) { return data.t15.s } else { return "" } } }, { data: null, width: ths.eq(26).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(27).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(28).css('width'), render: function (data, type, row) { if (data.t16 != null) { return data.t16.c } else { return "" } } }, { data: null, width: ths.eq(29).css('width'), render: function (data, type, row) { if (data.t16 != null) { return data.t16.s } else { return "" } } }, { data: null, width: ths.eq(30).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, width: ths.eq(31).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, width: ths.eq(32).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, width: ths.eq(33).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, width: ths.eq(34).css('width'), render: function (data, type, row) { if (data.t17 != null) { return data.t17.c } else { return "" } } }, { data: null, width: ths.eq(35).css('width'), render: function (data, type, row) { if (data.t17 != null) { return data.t17.s } else { return "" } } }, { data: null, width: ths.eq(36).css('width'), render: function (data, type, row) { if (data.t18 != null) { return data.t18.c } else { return "" } } }, { data: null, width: ths.eq(37).css('width'), render: function (data, type, row) { if (data.t18 != null) { return data.t18.s } else { return "" } } }, { data: null, width: ths.eq(38).css('width'), render: function (data, type, row) { if (data.t19 != null) { return data.t19.c } else { return "" } } }, { data: null, width: ths.eq(39).css('width'), render: function (data, type, row) { if (data.t19 != null) { return data.t19.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set paksazi // set alaem $("#alaem").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#alaem .internal-table').remove() $('#alaem .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#alaem .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablealaem.row(tr); var provinceid = row.data().id; var ths = $('#alaem .th-head') $('#alaem .internal-table').remove() internalTable(tr, "cityTablealem", 18) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=3&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var alaemtable = $("#cityTablealem").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { width: ths.eq(1).css('width'), data: "name_fa" }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, width: ths.eq(16).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(17).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set alaem // set hefaz $("#hefaz").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#hefaz .internal-table').remove() $('#hefaz .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#hefaz .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablehefaz.row(tr); var provinceid = row.data().id; var ths = $('#hefaz .th-head') $('#hefaz .internal-table').remove() internalTable(tr, "cityTableHefaz", 8) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=4&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var heafztable = $("#cityTableHefaz").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { width: ths.eq(1).css('width'), data: "name_fa" }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set hefaz // set roshnayi $("#lighting").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#lighting .internal-table').remove() $('#lighting .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#lighting .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablelighting.row(tr); var provinceid = row.data().id; var ths = $('#lighting .th-head') $('#lighting .internal-table').remove() internalTable(tr, "cityTablelighting", 24) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=5&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var lightingtable = $("#cityTablelighting").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { width: ths.eq(1).css('width'), data: "name_fa" }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, width: ths.eq(16).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, width: ths.eq(17).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, width: ths.eq(18).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, width: ths.eq(19).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, width: ths.eq(20).css('width'), render: function (data, type, row) { if (data.t10 != null) { return data.t10.c } else { return "" } } }, { data: null, width: ths.eq(21).css('width'), render: function (data, type, row) { if (data.t10 != null) { return data.t10.s } else { return "" } } }, { data: null, width: ths.eq(22).css('width'), render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, width: ths.eq(23).css('width'), render: function (data, type, row) { if (data.t11 != null) { return data.t11.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set roshan // set khat kesshi $("#ruler").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#ruler .internal-table').remove() $('#ruler .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#ruler .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tableruller.row(tr); var provinceid = row.data().id; var ths = $('#ruler .th-head') $('#ruler .internal-table').remove() internalTable(tr, "cityTableruler", 16) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=6&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var rulerCity = $("#cityTableruler").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { width: ths.eq(1).css('width'), data: "name_fa" }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set khat keshi // set color $("#coloring").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#coloring .internal-table').remove() $('#coloring .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#coloring .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablecoloring.row(tr); var provinceid = row.data().id; var ths = $('#coloring .th-head') $('#coloring .internal-table').remove() internalTable(tr, "cityTableColoring", 20) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=7&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var coloringCity = $("#cityTableColoring").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { width: ths.eq(1).css('width'), data: "name_fa" }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, width: ths.eq(16).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, width: ths.eq(17).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, width: ths.eq(18).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, width: ths.eq(19).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set color // set washed $("#washed").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#washed .internal-table').remove() $('#washed .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#washed .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablewashing.row(tr); var provinceid = row.data().id; var ths = $('#washed .th-head') $('#washed .internal-table').remove() internalTable(tr, "cityTableWashed", 16) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=8&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var Washedcity = $("#cityTableWashed").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { width: ths.eq(1).css('width'), data: "name_fa", }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set washed // set imenssazi $("#saftey").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#saftey .internal-table').remove() $('#saftey .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#saftey .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablesafety.row(tr); var provinceid = row.data().id; var ths = $('#saftey .th-head') $('#saftey .internal-table').remove() internalTable(tr, "CitySafety", 26) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=9&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var safetyCity = $("#CitySafety").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { width: ths.eq(1).css('width'), data: "name_fa" }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, width: ths.eq(16).css('width'), render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, width: ths.eq(17).css('width'), render: function (data, type, row) { if (data.t11 != null) { return data.t11.c } else { return "" } } }, { data: null, width: ths.eq(18).css('width'), render: function (data, type, row) { if (data.t12 != null) { return data.t12.c } else { return "" } } }, { data: null, width: ths.eq(19).css('width'), render: function (data, type, row) { if (data.t12 != null) { return data.t12.s } else { return "" } } }, { data: null, width: ths.eq(20).css('width'), render: function (data, type, row) { if (data.t13 != null) { return data.t13.c } else { return "" } } }, { data: null, width: ths.eq(21).css('width'), render: function (data, type, row) { if (data.t13 != null) { return data.t13.s } else { return "" } } }, { data: null, width: ths.eq(22).css('width'), render: function (data, type, row) { if (data.t14 != null) { return data.t14.c } else { return "" } } }, { data: null, width: ths.eq(23).css('width'), render: function (data, type, row) { if (data.t14 != null) { return data.t14.s } else { return "" } } }, { data: null, width: ths.eq(24).css('width'), render: function (data, type, row) { if (data.t15 != null) { return data.t15.c } else { return "" } } }, { data: null, width: ths.eq(25).css('width'), render: function (data, type, row) { if (data.t15 != null) { return data.t15.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set imensazi // set harim $("#harim").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#harim .internal-table').remove() $('#harim .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#harim .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tableharim.row(tr); var provinceid = row.data().id; var ths = $('#harim .th-head') $('#harim .internal-table').remove() internalTable(tr, "CityHarim", 14) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=10&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var HarimTable = $("#CityHarim").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { data: "name_fa", width: ths.eq(1).css('width'), }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set harim // set pol $("#pol").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#pol .internal-table').remove() $('#pol .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#pol .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablepol.row(tr); var provinceid = row.data().id; var ths = $('#pol .th-head') $('#pol .internal-table').remove() internalTable(tr, "polCityTable", 16) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=11&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var polTable = $("#polCityTable").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { data: "name_fa", width: ths.eq(1).css('width'), }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set pol // set tuunel and galleri \ $("#tunnelGaleri").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#tunnelGaleri .internal-table').remove() $('#tunnelGaleri .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#tunnelGaleri .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tabletunnel.row(tr); var provinceid = row.data().id; var ths = $('#tunnelGaleri .th-head') $('#tunnelGaleri .internal-table').remove() internalTable(tr, "tunnelCityTable", 18) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=12&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var TunnelTable = $("#tunnelCityTable").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { data: "name_fa", width: ths.eq(1).css('width'), }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, width: ths.eq(16).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, width: ths.eq(17).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set tuunel and galleri // set semestoon $("#zemestanii").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#zemestanii .internal-table').remove() $('#zemestanii .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#zemestanii .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablezem.row(tr); var provinceid = row.data().id; var ths = $('#zemestanii .th-head') $('#zemestanii .internal-table').remove() internalTable(tr, "zemestaniTable", 12) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=13&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var zemestaniTable = $("#zemestaniTable").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { data: "name_fa", width: ths.eq(1).css('width'), }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // set zesemeston //mashin alat $("#mashinAlat").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#mashinAlat .internal-table').remove() $('#mashinAlat .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#mashinAlat .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablemachin.row(tr); var provinceid = row.data().id; var ths = $('#mashinAlat .th-head') $('#mashinAlat .internal-table').remove() internalTable(tr, "mashinTable", 16) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=14&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var mashinalatTable = $("#mashinTable").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { data: "name_fa", width: ths.eq(1).css('width'), }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // mashin alat //rahdarkhane $("#tollhouse").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#tollhouse .internal-table').remove() $('#tollhouse .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#tollhouse .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablerahdar.row(tr); var provinceid = row.data().id; var ths = $('#tollhouse .th-head') $('#tollhouse .internal-table').remove() internalTable(tr, "TollhouseTable", 6) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=15&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var TollHouseTable = $("#TollhouseTable").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { data: "name_fa", width: ths.eq(1).css('width'), }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) // rahdarkhne //mavarede eztreari $("#emergency").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#emergency .internal-table').remove() $('#emergency .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#emergency .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tableemer.row(tr); var provinceid = row.data().id; var ths = $('#emergency .th-head') $('#emergency .internal-table').remove() internalTable(tr, "EmergencyTable", 20) .then( (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=16&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); var emergencyTableShow = $("#EmergencyTable").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { data: "name_fa", width: ths.eq(1).css('width'), }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.s } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.s } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.s } else { return "" } } }, { data: null, width: ths.eq(8).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(9).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.s } else { return "" } } }, { data: null, width: ths.eq(10).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(11).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.s } else { return "" } } }, { data: null, width: ths.eq(12).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, { data: null, width: ths.eq(13).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.s } else { return "" } } }, { data: null, width: ths.eq(14).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.c } else { return "" } } }, { data: null, width: ths.eq(15).css('width'), render: function (data, type, row) { if (data.t7 != null) { return data.t7.s } else { return "" } } }, { data: null, width: ths.eq(16).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.c } else { return "" } } }, { data: null, width: ths.eq(17).css('width'), render: function (data, type, row) { if (data.t8 != null) { return data.t8.s } else { return "" } } }, { data: null, width: ths.eq(18).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.c } else { return "" } } }, { data: null, width: ths.eq(19).css('width'), render: function (data, type, row) { if (data.t9 != null) { return data.t9.s } else { return "" } } }, ], buttons: [], }); } ); }) // mavarede eztrerari //mavarede bazdidi $("#controlitemm").on("click", "td.AcitivityMount", async function (e) { if ($(this).hasClass('isShowActivityMount')) { $('#controlitemm .internal-table').remove() $('#controlitemm .isShowActivityMount').removeClass('isShowActivityMount') return false; } await showLoaderScreen() $('#controlitemm .isShowActivityMount').removeClass('isShowActivityMount') $(this).addClass('isShowActivityMount') var tr = $(this).closest("tr"); var row = tablecontrol.row(tr); var provinceid = row.data().id; var ths = $('#controlitemm .th-head') console.log("th", ths.eq(2).css('width'), ths.eq(3).css('width')) $('#controlitemm .internal-table').remove() internalTable(tr, "ControlItem", 8) .then( async (onResolved) => { // get data let date_from = moment( fromdatamaremat.getState().selected.year + "/" + fromdatamaremat.getState().selected.month + "/" + fromdatamaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let date_to = moment( todatemaremat.getState().selected.year + "/" + todatemaremat.getState().selected.month + "/" + todatemaremat.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces/" + provinceid, async: false, success: function (result) { objectfiltertable.length = 0 objectfiltertable = []; for (var i = 0; i < result.data.length; i++) { objectfiltertable.push({ id: result.data[i].id, name_fa: result.data[i].name_fa, }) } } }) // second ajax $.ajax({ url: "https://rms.rmto.ir/report/total-items-group-province-city?item=20&province_id=" + provinceid + "&from_date=" + date_from + "&date_to=" + date_to, type: "GET", async: false, cache: false, contentType: false, processData: false, success: function (result) { for (var j = 0; j < objectfiltertable.length; j++) { for (var i = 0; i < result.data.length; i++) { if (objectfiltertable[j].id == result.data[i].ci) { objectfiltertable[j]['t' + result.data[i].t] = { "c": result.data[i].c, "s": result.data[i].s } } } } }, error: function (error) { }, }); console.log("objectfiltertable", objectfiltertable) var ControlTable = $("#ControlItem").DataTable({ dom: "p>", pagingType: "simple_numbers", paging: false, searching: false, scrollX: true, destroy: true, responsive: true, autoWidth: false, language: { sEmptyTable: "هیچ داده‌ای در جدول وجود ندارد", sInfo: "نمایش _START_ تا _END_ از _TOTAL_ ردیف", sInfoEmpty: "نمایش 0 تا 0 از 0 ردیف", sInfoFiltered: "(فیلتر شده از _MAX_ ردیف)", sInfoPostFix: "", sInfoThousands: ",", sLengthMenu: "نمایش _MENU_ ردیف", sLoadingRecords: "در حال بارگذاری...", sProcessing: "در حال پردازش...", sSearch: "جستجو: ", sZeroRecords: "رکوردی با این مشخصات پیدا نشد", oPaginate: { sFirst: "برگه‌ی نخست", sLast: "برگه‌ی آخر", sNext: "بعدی", sPrevious: "قبلی", }, oAria: { sSortAscending: ": فعال سازی نمایش به صورت صعودی", sSortDescending: ": فعال سازی نمایش به صورت نزولی", }, }, order: [ [2, "desc"] ], processing: true, data: objectfiltertable, columns: [ { data: null, width: ths.eq(0).css('width'), render: function (data, type, row) { return "" } }, { data: "name_fa", width: ths.eq(1).css('width'), }, { data: null, width: ths.eq(2).css('width'), render: function (data, type, row) { if (data.t1 != null) { return data.t1.c } else { return "" } } }, { data: null, width: ths.eq(3).css('width'), render: function (data, type, row) { if (data.t2 != null) { return data.t2.c } else { return "" } } }, { data: null, width: ths.eq(4).css('width'), render: function (data, type, row) { if (data.t3 != null) { return data.t3.c } else { return "" } } }, { data: null, width: ths.eq(5).css('width'), render: function (data, type, row) { if (data.t4 != null) { return data.t4.c } else { return "" } } }, { data: null, width: ths.eq(6).css('width'), render: function (data, type, row) { if (data.t5 != null) { return data.t5.c } else { return "" } } }, { data: null, width: ths.eq(7).css('width'), render: function (data, type, row) { if (data.t6 != null) { return data.t6.c } else { return "" } } }, ], buttons: [], }); hideLoaderScreen() } ); }) //mavarede bazdidi function internalTable(tr, id, column) { var ths = '' var initTable; for (var i = 1; i <= column; i++) { ths += '' } initTable = ` ${ths}
` $(initTable).insertAfter(tr); return Promise.resolve("Success"); } // set new zir item function appendprovince(element, data) { $(element).empty(); $(element).append(''); for (let index = 0; index < data.length; index++) { $(element).append( "\ \ " ); } } $(document).on('click', '#btn_excel_download', function () { let currentDate = {} let queryParems = [] const route = $(this).data('table') const province = $('#select-province-excel-first-table').val() const type = $(this).data('hasType') ? $(this).data('type') : '' if ($(this).data('hasType')) queryParems.push(`type=${type}`) if (province != 0) queryParems.push(`province=${province}`) if (excelDatepickerFirstTable.from != '' && excelDatepickerFirstTable.to != '') { currentDate.from = moment( excelDatepickerFirstTable.from.getState().selected.year + "/" + excelDatepickerFirstTable.from.getState().selected.month + "/" + excelDatepickerFirstTable.from.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); currentDate.to = moment( excelDatepickerFirstTable.to.getState().selected.year + "/" + excelDatepickerFirstTable.to.getState().selected.month + "/" + excelDatepickerFirstTable.to.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); queryParems.push(`fromDate=${currentDate.from + " 00:00:00"}`) queryParems.push(`toDate=${currentDate.to + " 23:59:59"}`) } else { Swal.fire({ icon: "error", title: "خطا", text: "لطفا تاریخ مناسب برای دریافت فایل اکسل وارد کنید", confirmButtonText: "بستن", }); return false; } const url = `https://rms.rmto.ir/reports/${route}${queryParems.length != 0 ? `?${queryParems.join('&')}` : ''}` window.open(url, '_blank') })