var markerList = []; var markerLayers = null; var markerList = []; var markerLayers = null; var mapradar = null; var idkolcor = null; var smarkerGhRa var emarkerGhRa var smarkerKarCh var emarkerKarCh var smarkerThSe var emarkerThSe var smarkerThKer var emarkerThKer var smarkerfirooz var emarkerfirooz var smarkertabriz var emarkertabriz var tabrizpoly = null; var machinarydatavalid = ""; var ekiplistvalid = ""; var smarkerrasht var emarkerrasht var rashtpoly = null; var startmarkerpin = []; var endmarkerpin = []; var project_update_list = [] var projectarraymachine = [] var ekiplist = [] var smarkeramol var emarkeramol var amolpoly = null; var firstpolyline = null; var firoozpoly = null; var forthpolyline = null; var fifthpolyline = null; var seventhpolyline = null; var startAbrarMarker = null; var isSetStartAbrarMarker = false; var ekipmarker = null; var issetekipmarker = false; var endAbrarMarker = null; var isSetEndAbrarMarker = false; var routeControls = []; var routecolor = []; var routeControlsPath = []; var marker141List = []; var marker141Layers = null; var firoozlayer = []; var amollayer = []; var rashtlayer = []; var markerfiroozkooh = []; var markeramol = []; var markerrasht = []; var newrashtlayer = []; var chalooslayer = []; var semnanlayer = []; var tabrizlayer = []; var kermanlayer = []; var colormodal = []; var globalmodaldata = []; var markershowdata = []; var marker141LayersWithoutCluster = null; var globalcolor = ""; var globalgeo = null; var keepChartNum = null; var onlineTrafficLayer = []; var datacity; var bokhorProvinceNameArray = []; //pooria now var number_data_city_persent; //end pooria now var flagPopupli = 0; var flagPopup = 0; var flag_li_city = 0; var marker141List = []; var markerlis1 = []; var markerlis2 = []; var markerlis3 = []; var markerlis4 = []; var markerlis5 = []; var markerlis6 = []; var markerlis7 = []; var markerlis8 = []; var markerrashtnew = []; var markerlisfirooz = []; var markerlistamo = []; var markerlist var markerchaloos = []; var markersemnan = []; var markertabriz = []; var markerkermanshah = []; var marker141Layers = null; var marker141LayersWithoutCluster = null; var middleLat = ""; var popupArrays = []; var keepChartNum = null; var routingArray = [] const API_ENDPOINT = "https://141.ir/api"; const MAP_ENDPOINT = "https://testmap.141.ir"; const MAP_MIN_ZOOM = 6; const MAP_MAX_ZOOM = 15; var routeControlsPath = []; var popupArraysPath = []; var polylinePath = null; const windowWidth = $(window).width(); var frommDate, tooDate; var marematDate, marematCity, marematOffice; var imagekol; var slideIndexlayer = 1; var firoozkoohtest; var firoozkoohstart; var startRoute = []; var testRoute = []; var originMarkerArr = []; var destMarkerArr = []; var routeArray = []; var markerlistfiroozarray = {}; var markerstartfirooz = null; var markendfiroozkooh = null; var markerstartamol = null; var markerendamol = null; var markerstartrasht = null; var markerendrasht = null; var markerstartrashtnew = null; var markerendrashtnew = null; var marketstartchaloos = null; var marketendchaloos = null; var markerstartsemnan = null; var markerendsemnan = null; var markerstarttabriz = null; var markerendtabriz = null; var markerstartkermanshah = null; var markerendkermanshah = null; var startroute0 = null; var startroute1 = null; var startroute2 = null; var startroute3 = null; var startroute4 = null; var startroute5 = null; var startroute6 = null; var startroute7 = null; var testroute0 = null; var testroute1 = null; var testroute2 = null; var testroute3 = null; var testroute5 = null; var testroute6 = null; var testroute4 = null; var testroute7 = null; var startAbrarDivIcon = L.divIcon({ html: `
شروع
`, iconSize: [55, 75], iconAnchor: [33, 64], }); var endAbrarDivIcon = L.divIcon({ html: `
پایان
`, iconSize: [55, 75], iconAnchor: [33, 64], }); var startAbrarDivIconrahdar = L.divIcon({ html: `
شروع
`, iconSize: [55, 75], iconAnchor: [33, 64], }); var endAbrarDivIconrahdar = L.divIcon({ html: `
پایان
`, iconSize: [55, 75], iconAnchor: [33, 64], }); // IRAN bounds, by this order: // [North, East] // [South, West] var bounds = [ [42.9130026312, 75.6166317076], [20.5782370061, 30.5092252948], ]; var itempoint = null; var map = L.map("map", { maxBounds: bounds, minZoom: MAP_MIN_ZOOM, //maxZoom: MAP_MAX_ZOOM, zoomControl: false, }).setView([35.5468992, 51.7300532], 7); // Create map tile layer L.tileLayer(MAP_ENDPOINT + "/141map/{z}/{x}/{y}.png", {}).addTo(map); $(document).ready(function () { $.ajax({ url: "https://rms.rmto.ir/public/contents/provinces", type: "GET", cache: false, contentType: false, processData: false, success: function (result) { bokhorProvinceNameArray = result.data; }, error: function (error) { }, }); }); fisheyeMenu({ growRatio: 1.7, verticalLimit: 10, horizontalLimit: 1.8, }); function fisheyeMenu(options) { // get all items from fisheye-menu var items = Array.prototype.slice.call( document.querySelectorAll(".fisheye-menu button.layerButton") ); var item = items[0]; //get horizontal center point of each item var itemsMiddle = items.map(function (item) { return item.offsetLeft + item.offsetWidth / 2; }); //get vertical center point of each item var itemsVertMiddle = items.map(function (item) { return item.offsetTop + item.offsetHeight / 2; }); var itemWidth = item.offsetWidth; // vertical limits of function running var topLimit = item.offsetParent.offsetTop - (options.verticalLimit || 10); var bottomLimit = item.offsetParent.offsetTop + item.offsetHeight + (options.verticalLimit || 10); // ratio of new size to default var growRatio = options.growRatio || 1.8; // horizontal limit of grow reaction for single item var limit = item.offsetWidth * (options.horizontalLimit || 1.5); var sizeDiff = Math.round(itemWidth * (growRatio - 1)); var removeGoDown = function (evt) { evt.target.parentNode.classList.remove("go-down"); }; var setListeners = (function () { items.forEach(function (itm, index) { itm.addEventListener("transitionend", removeGoDown); }); })(); var makeItemBigger = function (x, y) { var verticallyCorrect = y > topLimit && y < bottomLimit ? true : false; // if mouse out from vertically cirrect area make items small with transition if (!verticallyCorrect && !item.parentNode.classList.contains("go-down")) { item.parentNode.classList.add("go-down"); } // if (verticallyCorrect) { // let menuWidth = $('.menu_vertical').css('width'); // $('.menu_vertical').css('width', 'calc(' + menuWidth + ' + 50px') // } items.forEach(function (item, index) { var middlePoint = itemsMiddle[index]; // horizontal distance from center point to cursor var dist = Math.abs(x - middlePoint); // if distance is bigger than limit in any direction // ratio is equal to 1 (item size not changed) var ratio = dist > limit ? 1 : dist / limit; ratio = verticallyCorrect ? ratio : 1; var newSize = itemWidth + (1 - ratio) * sizeDiff; // add negative top margin to item equal to half size difference // to stay item vertical centered var newMarginTop = -((1 - ratio) * (sizeDiff / 2)); item.style.width = newSize + "px"; item.style.height = newSize + "px"; item.style.marginTop = newMarginTop + "px"; }); }; document.body.addEventListener("mousemove", function (e) { // position of cursor var pointerX = e.pageX; var pointerY = e.pageY; makeItemBigger(pointerX, pointerY); }); } function showmodalaccvillage() { $("#villageacc_modal").modal("show"); } function showprojecttype() { $("#project-choose").val(0); $("#stepModalprojecttype").modal("show"); } function showprojecttest(index) { if (index == 1) { window.open("https://rms.rmto.ir/road-maintenance-project"); // to do next page } else if (index == 2) { window.open("https://rms.rmto.ir/road-danger-prevention"); } else if (index == 3) { window.open("https://rms.rmto.ir/road-upgrade-safety"); } else if (index == 4) { window.open("https://rms.rmto.ir/road-technical-building"); } else if (index == 5) { window.open("https://rms.rmto.ir/road-tollhouse-management"); } else if (index == 6) { window.open("https://rms.rmto.ir/road-construction-rural"); } } function showpassmodal() { // $("#changepass").modal("show"); $("#dropdown-contentside").css("display", "block"); } $("#showcardproject").hover(function () { $("#dropdown-contentside").css("display", "block"); }); //now pooria $("#all_point_map").hover(function () { $("#dropdown-contentside_edited").css("display", "block"); $("#dropdown-contentside_first-").css("display", "none"); }); $("#all_point_now_dot").hover(function () { $("#dropdown-contentside_first-").css("display", "block"); }) $("#all_point_filter").hover(function () { $("#all-point-map").css("display", "block"); $("#dropdown-contentside_edited").css("display", "none"); $("#dropdown-contentside_first-").css("display", "none"); }) $("#point_prevention_hover").hover(function () { $("#dropdown-contentside_first-").css("display", "none"); }); $("#Tollhouse").hover(function () { $("#dropdown-contentside2").css("display", "block"); }); $("#uploadfile").hover(function () { $("#dropdown-contentside2").css("display", "none"); }); $("#zirsakht").hover(function () { $("#dropdown-contentside2").css("display", "none"); }); $("#all251-danger-pointsShow").hover(function () { // $("#dropdown-contentside_edited").css("display", "none"); $("#dropdown-contentside_first-").css("display", "none"); }); $("#all_point_now_dot").hover(function () { $("#dropdown-contentside_edited").css("display", "none"); $("#all-point-map").css("display", "none"); }); $("#all_point_filter").hover(function () { $("#dropdown-contentside_edited").css("display", "none"); $("#dropdown-contentside_first-").css("display", "none"); // $("#all-point-map").css("display", "none"); }); $("#dropdownshow_all_dot").mouseleave(function () { $("#dropdown-contentside_edited").css("display", "none"); $("#dropdown-contentside_first-").css("display", "none"); }); $("#dropdown-contentside2").mouseleave(function () { $("#dropdown-contentside2").css("display", "none"); }); $("#all-point-map").mouseleave(function () { $("#all-point-map").css("display", "none"); }); //End now pooria $("#show-report-ul").hover(function () { $("#dropdown-contentside").css("display", "none"); }); $("#show-maintenance-points").hover(function () { $("#dropdown-contentside").css("display", "none"); }); $(".responsiveTopMenuname").hover( function () { $(".user-box").css("display", "block"); }, function () { // $(".user-box").css("display", "none"); } ); $(".user-box").mouseleave(function () { $(this).hide(); }); // $("#showcardproject").mouseleave(function () { // $("#dropdown-contentside").css('display', 'none') // }) // $("dropdownthingy").mouseleave(function () { // console.log("leave the sh") // // if() // // $("#dropdown-contentside").css('display', 'none') // }) $("#dropdownshow").mouseenter(function () { $("#dropdown-contentside").css("display", "none"); }); $("#dropTollShow").mouseenter(function () { $("#dropdown-contentside2").css("display", "none"); }); $("#dropdown-contentside").mouseleave(function () { $("#dropdown-contentside").css("display", "none"); }); $("#dropdown-contentside2").mouseleave(function () { $("#dropdown-contentside2").css("display", "none"); }); //to do yasi $("#project-choose").change(function () { if ((value = $(this).val()) && $(this).val() != 0) { if ($(this).val() == 1) { window.open("https://rms.rmto.ir/road-maintenance-project"); $("#stepModalprojecttype").modal("hide"); } else if ($(this).val() == 2) { window.open("https://rms.rmto.ir/road-danger-prevention"); $("#stepModalprojecttype").modal("hide"); } else if ($(this).val() == 3) { window.open("https://rms.rmto.ir/road-upgrade-safety"); $("#stepModalprojecttype").modal("hide"); } else if ($(this).val() == 4) { window.open("https://rms.rmto.ir/road-technical-building"); $("#stepModalprojecttype").modal("hide"); } else if ($(this).val() == 5) { window.open("https://rms.rmto.ir/road-tollhouse-management"); $("#stepModalprojecttype").modal("hide"); } else if ($(this).val() == 6) { window.open("https://rms.rmto.ir/road-construction-rural"); $("#stepModalprojecttype").modal("hide"); } } }); frommDate = $("#datepickfromdate").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { frommDate.touched = true; $("#datepicktodate").prop("disabled", ""); if ( frommDate.getState().selected.unixDate >= tooDate.getState().selected.unixDate ) { tooDate.setDate(frommDate.getState().selected.unixDate); } if (tooDate && tooDate.options && tooDate.options.minDate != unix) { let cachedValue = tooDate.getState().selected.unixDate; tooDate.options = { minDate: unix }; if (tooDate.touched) { tooDate.setDate(cachedValue); } } }, }); tooDate = $("#datepicktodate").persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { tooDate.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); } }*/ }, }); $(".right-menu-toggle").on("click", function () { if ($(this).css("right") == "0px") { $(".right-menu-charts").css("right", "-60px"); $(this).css("right", "60px"); $(this).addClass("hide-menu-toggle"); $(this) .find("i") .addClass("fa-arrow-alt-circle-left") .removeClass("fa-arrow-alt-circle-right"); } else { $(".right-menu-charts").css("right", "30px"); $(this).css("right", "0px"); $(this).removeClass("hide-menu-toggle"); $(this) .find("i") .addClass("fa-arrow-alt-circle-right") .removeClass("fa-arrow-alt-circle-left"); } }); $(".item-menu-chart").on("click", function () { let num = parseInt($(this).attr("chartId")); keepChartNum = num; if (!$(this).hasClass("item-menu-chart-disabled")) { if ($(this).hasClass("item-menu-active")) { handleChartButtonClick(0); removeFeaturesFromMap(); } else { remove141Layer(); if ($(".item-menu-chart.item-menu-active").length > 0) { handleChartButtonClick(0, this); removeFeaturesFromMap(); setTimeout(function () { updateChartBox(num); handleChartButtonClick(1); addFeaturesToMap(); addTopFeatureToStat(); }, 500); } else { updateChartBox(num); handleChartButtonClick(1, this); addFeaturesToMap(); addTopFeatureToStat(); } } } }); $(".menu-map-toggle").on("click", function () { if ($(this).parent().css("width") == "500px") { $(this) .parent() .animate( { width: "50", height: "50", }, 500, function () { $(this).find(".map-svg-box").removeClass("map-svg-box-open"); $(this).css("z-index", "12"); $(".left-menu-141").css("left", "30px"); // $(".relatedWebsites").css("left", "30px"); //test $(this).find(".menu-map-close").hide(); } ); } else { $(this).parent().css("z-index", "15"); $(".left-menu-141").css("left", "-80px"); $(".relatedWebsites").css("left", "-80%"); //test $(this) .parent() .animate( { width: "500", height: "480", }, 500, function () { $(this).find(".map-svg-box").addClass("map-svg-box-open"); $(this).find(".menu-map-close").show(); } ); } }); $(".left-menu-map > .menu-map-close").on("click", function () { if ($(this).parent().css("width") == "500px") { $(this) .parent() .animate( { width: "50", height: "50", }, 500, function () { $(this).find(".map-svg-box").removeClass("map-svg-box-open"); $(this).css("z-index", "12"); $(".left-menu-141").css("left", "30px"); // $(".relatedWebsites").css("left", "30px"); //test $(this).find(".menu-map-close").hide(); } ); } }); $(".left-menu-view-chart .chart-tools-item.chart-sync-icon").on( "click", function () { handleChartButtonClick(0, $(".item-menu-chart.item-menu-active")); removeFeaturesFromMap(); setTimeout(function () { updateChartBox(keepChartNum); handleChartButtonClick(1); addFeaturesToMap(); addTopFeatureToStat(); }, 500); } ); $(".left-menu-view-chart .chart-tools-item.chart-filter-icon").on( "click", function () { $( ".left-menu-view-chart > .chart-filter-box input[name=chartFilterToDate]" ).prop("disabled", "disabled"); $(".left-menu-view-chart > .chart-view-box").fadeOut(300, function () { $(".left-menu-view-chart > .chart-filter-box").fadeIn(300); }); let fromDate, toDate; fromDate = $( ".left-menu-view-chart > .chart-filter-box input[name=chartFilterFromDate]" ).persianDatepicker({ format: "YYYY/MM/DD", autoClose: true, onSelect: function (unix) { fromDate.touched = true; $( ".left-menu-view-chart > .chart-filter-box input[name=chartFilterToDate]" ).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); } } }, }); toDate = $( ".left-menu-view-chart > .chart-filter-box input[name=chartFilterToDate]" ).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); } }*/ }, }); } ); $(".left-menu-view-chart .filter-box-submit > .submit-cancel").on( "click", function () { $(".left-menu-view-chart > .chart-filter-box").fadeOut(300, function () { $(".left-menu-view-chart > .chart-view-box").fadeIn(300); }); } ); $(".left-menu-view-chart .filter-box-submit > .submit-send").on( "click", function () { handleChartButtonClick(0, $(".item-menu-chart.item-menu-active")); removeFeaturesFromMap(); setTimeout(function () { updateChartBox(keepChartNum); handleChartButtonClick(1); addFeaturesToMap(); addTopFeatureToStat(); }, 500); } ); $(".left-menu-view-chart .chart-tools-item.chart-close-icon").on( "click", function () { handleChartButtonClick(0); removeFeaturesFromMap(); } ); $(".right-menu-stat-chart > .menu-stat-close").on("click", function () { handleChartButtonClick(0); removeFeaturesFromMap(); $(".item-menu-141.item-141-active").removeClass("item-141-active"); setAbrarProcess = 0; setBokhorProcess = 0; }); function handleChartButtonClick(openChart = 1, element = null) { if (setAbrarProcess || setBokhorProcess) { $(".right-menu-stat-chart").css("top", "-858px"); $(".left-menu-stat-chart-info").css("top", "-308px"); $(".item-menu-141.item-141-active").removeClass("item-141-active"); removeFeaturesFromMap(); setTimeout(function () { setAbrarProcess = 0; setBokhorProcess = 0; $(".menu-stat-list > .stat-list").empty(); handleChartButtonClickAfterAbrar(openChart, element); }, 500); } else { handleChartButtonClickAfterAbrar(openChart, element); } } function handleChartButtonClickAfterAbrar(openChart = 1, element = null) { if (openChart) { if ($(".left-menu-map").css("width") == "500px") { $(".left-menu-map").animate( { width: "50", height: "50", }, 500, function () { $(this).find(".map-svg-box").removeClass("map-svg-box-open"); $(this).css("z-index", "12"); $(".left-menu-141").css("left", "30px"); // $(".relatedWebsites").css("left", "30px"); //test $(this).find(".menu-map-close").hide(); if (element) { $(".left-menu-view-chart").css("left", "30px"); $(".right-menu-stat-chart").css("top", "88px"); $(".left-menu-view-chart").css("z-index", "16"); $(".left-menu-map").css("left", "-80px"); $(".left-menu-141").css("left", "-80px"); $(".relatedWebsites").css("left", "-80%"); //test $(element).addClass("item-menu-active"); } else { $(".left-menu-view-chart").css("left", "30px"); $(".right-menu-stat-chart").css("top", "88px"); } } ); } else { if (element) { $(".left-menu-view-chart").css("left", "30px"); $(".right-menu-stat-chart").css("top", "88px"); $(".left-menu-view-chart").css("z-index", "16"); $(".left-menu-map").css("left", "-80px"); $(".left-menu-141").css("left", "-80px"); $(".relatedWebsites").css("left", "-80%"); //test $(element).addClass("item-menu-active"); } else { $(".left-menu-view-chart").css("left", "30px"); $(".right-menu-stat-chart").css("top", "88px"); } } } else { if (element) { $(".left-menu-view-chart").css("left", "-530px"); $(".right-menu-stat-chart").css("top", "-858px"); $(".left-menu-stat-chart-info").css("top", "-308px"); emptyStatItems(); $(".item-menu-chart.item-menu-active").removeClass("item-menu-active"); $(element).addClass("item-menu-active"); } else { remove141Layer(); removeCityFeaturesFromMap(); removeFeaturesFromMap(); keepMapFeatureColor = null; map.flyTo([32.62, 53.25], 6); $(".left-menu-view-chart").css("left", "-530px"); $(".left-menu-map").css("left", "30px"); $(".left-menu-141").css("left", "30px"); // $(".relatedWebsites").css("left", "30px"); //test $(".left-menu-view-chart").css("z-index", "12"); $(".right-menu-stat-chart").css("top", "-858px"); $(".left-menu-stat-chart-info").css("top", "-308px"); emptyStatItems(); $(".item-menu-chart.item-menu-active").removeClass("item-menu-active"); } setTimeout(function () { $(".left-menu-view-chart > .chart-filter-box").hide(); $(".left-menu-view-chart > .chart-view-box").show(); }, 500); } } function emptyStatItems() { setTimeout(function () { $(".menu-stat-list > .stat-list").empty(); }, 500); } // $(".left-menu-141 > .item-menu-141").on("click", function () { // let get141Id = parseInt($(this).attr("id141")); // if (get141Id == 20) { // window.open("/abrar-projects", "_self"); // } // if (get141Id < 13) { // if (!$(this).hasClass("item-141-active")) { // $(".left-menu-141 > .item-menu-141.item-141-active").removeClass( // "item-141-active" // ); // $(this).addClass("item-141-active"); // if (setAbrarProcess) { // setAbrarProcess = 0; // hideAbrarChartStat(); // setTimeout(function () { // show141Layer(get141Id); // }, 500); // } else if (setBokhorProcess) { // setBokhorProcess = 0; // hideBokhorChartStat(); // setTimeout(function () { // show141Layer(get141Id); // }, 500); // } else { // show141Layer(get141Id); // } // } else { // $(this).removeClass("item-141-active"); // remove141Layer(); // } // } else if (get141Id === 13) { // if (!$(this).hasClass("item-141-active")) { // $(".left-menu-141 > .item-menu-141.item-141-active").removeClass( // "item-141-active" // ); // $(this).addClass("item-141-active"); // if (setAbrarProcess) { // setAbrarProcess = 0; // hideAbrarChartStat(); // setTimeout(function () { // showmodalaccvillage(); // }, 500); // } else if (setBokhorProcess) { // setBokhorProcess = 0; // hideBokhorChartStat(); // setTimeout(function () { // showmodalaccvillage(); // }, 500); // } else { // showmodalaccvillage(); // } // } else { // $(this).removeClass("item-141-active"); // remove141Layer(); // } // } else if (get141Id === 14) { // if (!$(this).hasClass("item-141-active")) { // $(".left-menu-141 > .item-menu-141.item-141-active").removeClass( // "item-141-active" // ); // $(this).addClass("item-141-active"); // setAbrarProcess = 1; // removeFeaturesFromMap(); // if (setBokhorProcess) { // setBokhorProcess = 0; // hideBokhorChartStat(); // setTimeout(function () { // showAbrarChartStat(); // }, 500); // } else { // showAbrarChartStat(); // } // } else { // setAbrarProcess = 0; // $(this).removeClass("item-141-active"); // hideAbrarChartStat(); // } // } else if (get141Id === 15) { // if (!$(this).hasClass("item-141-active")) { // $(".left-menu-141 > .item-menu-141.item-141-active").removeClass( // "item-141-active" // ); // $(this).addClass("item-141-active"); // setBokhorProcess = 1; // removeFeaturesFromMap(); // if (setAbrarProcess) { // setAbrarProcess = 0; // hideAbrarChartStat(); // setTimeout(function () { // showBokhorChartStat(); // }, 500); // } else { // showBokhorChartStat(); // } // } else { // setBokhorProcess = 0; // $(this).removeClass("item-141-active"); // hideBokhorChartStat(); // } // } else if (get141Id === 16) { // if (!$(this).hasClass("item-141-active")) { // $(".left-menu-141 > .item-menu-141.item-141-active").removeClass( // "item-141-active" // ); // $(this).addClass("item-141-active"); // fullCityGeoJSONTemp.type = "FeatureCollection"; // fullCityGeoJSONTemp.features = fullCityGeoJSON.features; // if (setAbrarProcess) { // setAbrarProcess = 0; // hideAbrarChartStat(); // setTimeout(function () { // addCityFeaturesToMap(); // }, 500); // } else if (setBokhorProcess) { // setBokhorProcess = 0; // hideBokhorChartStat(); // setTimeout(function () { // addCityFeaturesToMap(); // }, 500); // } else { // addCityFeaturesToMap(); // } // } else { // $(this).removeClass("item-141-active"); // removeCityFeaturesFromMap(); // } // } else { // // // } // }); function showRmtoToll(id) { // e.preventDefault(); if (id == 2) { window.open("https://rms.rmto.ir/rahdari-points-table"); } else { let get141Id = parseInt($(".left-menu-141 > .item-menu-141").attr("id141")); console.log(get141Id); if (get141Id < 13) { if (!$(this).hasClass("item-141-active")) { $(".left-menu-141 > .item-menu-141.item-141-active").removeClass( "item-141-active" ); $(this).addClass("item-141-active"); if (setAbrarProcess) { setAbrarProcess = 0; hideAbrarChartStat(); setTimeout(function () { show141Layer(get141Id); }, 500); } else if (setBokhorProcess) { setBokhorProcess = 0; hideBokhorChartStat(); setTimeout(function () { show141Layer(get141Id); }, 500); } else { show141Layer(get141Id); } } else { $(this).removeClass("item-141-active"); remove141Layer(); } } } } // $("#Tollhouse").on("click", function (e) { // e.preventDefault(); // window.open("https://rms.rmto.ir/rahdari-points-table"); // // let get141Id = parseInt($(".left-menu-141 > .item-menu-141").attr("id141")); // // console.log(get141Id); // // if (get141Id < 13) { // // if (!$(this).hasClass("item-141-active")) { // // $(".left-menu-141 > .item-menu-141.item-141-active").removeClass( // // "item-141-active" // // ); // // $(this).addClass("item-141-active"); // // if (setAbrarProcess) { // // setAbrarProcess = 0; // // hideAbrarChartStat(); // // setTimeout(function () { // // show141Layer(get141Id); // // }, 500); // // } else if (setBokhorProcess) { // // setBokhorProcess = 0; // // hideBokhorChartStat(); // // setTimeout(function () { // // show141Layer(get141Id); // // }, 500); // // } else { // // show141Layer(get141Id); // // } // // } else { // // $(this).removeClass("item-141-active"); // // remove141Layer(); // // } // // } // }); $("#ProjectV").on("click", function (e) { e.preventDefault(); // alert("hiiiiu") window.open("/abrar-projects", "_self"); }); $("#uploadfile").on("click", function (e) { e.preventDefault(); if ($(".announcement-box").css("display") != "none") { $(".announcement-box").css("display", "none"); } else { $(".announcement-box").css("display", "block"); } }); $("#Barkhord").on("click", function (e) { e.preventDefault(); // if (!$(this).hasClass("item-141-active")) { // $(".left-menu-141 > .item-menu-141.item-141-active").removeClass( // "item-141-active" // ); // $(this).addClass("item-141-active"); //yasiiiiiiiooooooo function loadIranGeoJson(callback) { showLoaderScreen(); var xobj = new XMLHttpRequest(); xobj.overrideMimeType("application/json"); xobj.open("GET", "/api/provinces35geojson", true); xobj.onreadystatechange = function () { if (xobj.readyState == 4 && xobj.status == "200") { //hideLoaderScreen(); callback(xobj.responseText); } }; xobj.send(null); } function loadCityGeoJson(callback) { //showLoaderScreen(); var xobj = new XMLHttpRequest(); xobj.overrideMimeType("application/json"); xobj.open("GET", "/api/cities430geojson", true); xobj.onreadystatechange = function () { if (xobj.readyState == 4 && xobj.status == "200") { hideLoaderScreen(); callback(xobj.responseText); } }; xobj.send(null); } function initIranGeoJson() { loadIranGeoJson(function (response) { iranGeoJSON = JSON.parse(response); setBokhorProcess = 1; removeFeaturesFromMap(); if (setAbrarProcess) { setAbrarProcess = 0; hideAbrarChartStat(); setTimeout(function () { showBokhorChartStat(); }, 500); } else { showBokhorChartStat(); } }); } function initCityGeoJson() { loadCityGeoJson(function (response) { fullCityGeoJSON = JSON.parse(response); setBokhorProcess = 1; removeFeaturesFromMap(); if (setAbrarProcess) { setAbrarProcess = 0; hideAbrarChartStat(); setTimeout(function () { showBokhorChartStat(); }, 500); } else { showBokhorChartStat(); } }); } initIranGeoJson() initCityGeoJson() // setBokhorProcess = 1; // removeFeaturesFromMap(); // if (setAbrarProcess) { // setAbrarProcess = 0; // hideAbrarChartStat(); // setTimeout(function () { // showBokhorChartStat(); // }, 500); // } else { // showBokhorChartStat(); // } // } else { // setBokhorProcess = 0; // $(this).removeClass("item-141-active"); // hideBokhorChartStat(); // } }); $("#PahneB").on("click", function (e) { e.preventDefault(); if (!$(this).hasClass("item-141-active")) { $(".left-menu-141 > .item-menu-141.item-141-active").removeClass( "item-141-active" ); $(this).addClass("item-141-active"); fullCityGeoJSONTemp.type = "FeatureCollection"; fullCityGeoJSONTemp.features = fullCityGeoJSON.features; if (setAbrarProcess) { setAbrarProcess = 0; hideAbrarChartStat(); setTimeout(function () { addCityFeaturesToMap(); }, 500); } else if (setBokhorProcess) { setBokhorProcess = 0; hideBokhorChartStat(); setTimeout(function () { addCityFeaturesToMap(); }, 500); } else { addCityFeaturesToMap(); } } else { $(this).removeClass("item-141-active"); removeCityFeaturesFromMap(); } }); $("#all_village").on("click", function () { $("#villageacc_modal").modal("hide"); showRoadAccidentLayerWithoutCluster(); }); $("#251_village").on("click", function () { $("#villageacc_modal").modal("hide"); showRoadAccidentLayer251(); }); $("#251_village_edit").on("click", function () { window.open("/accident-251-points/edit", "_self"); }); function clickfindshow(index) { itempoint = index + 1; // console.log("item", itempoint) } var showFastReactionPoint = false; $("#chooseclock").on("click", function () { // console.log("hiihii", itempoint) $("#choosetime").modal("hide"); if ( $("#datepickfromdate").val() != " " && $("#datepicktodate").val() != " " ) { let startDate = moment( frommDate.getState().selected.year + "/" + frommDate.getState().selected.month + "/" + frommDate.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); let endDate = moment( tooDate.getState().selected.year + "/" + tooDate.getState().selected.month + "/" + tooDate.getState().selected.date, "jYYYY/jM/jD" ).format("YYYY-MM-DD"); console.log(startDate); console.log(endDate); if (showFastReactionPoint) { showFastFunction(startDate, endDate); } else { showLoaderScreen(); $.ajax({ url: "/homeprojects/roaditems/points" + "?item=" + itempoint + "&end-date=" + endDate + "&start-date=" + startDate, type: "GET", success: function (result) { // console.log("resssss", result.data); show_point(result.data); // hideLoaderScreen(); }, error: function (error) { //console.log(error); hideLoaderScreen(); }, }); } } }); function show_point(data) { if (marker141Layers != null) { marker141List = []; map.removeLayer(marker141Layers); } if (marker141LayersWithoutCluster != null) { map.removeLayer(marker141LayersWithoutCluster); } // console.log("index", index) // console.log("data", data) // marker141Layers = L.markerClusterGroup(); let markerG = []; for (let index = 0; index < data.length; index++) { let marker = L.circleMarker( [data[index].start_lat, data[index].start_lng], { color: "#007bff", stroke: false, radius: 2, fillOpacity: 1, } ).on("click", function (e) { $("#datepoint").val(data[index].created_at); $("#edarepoint").val(data[index].province_name); $("#citypoint").val(data[index].city_name); headermodal(data[index].item); $("#showpoint").modal("show"); GenerateTable(data[index].sub_items, data[index].sub_items_data, index); show_point_photo(data[index].files); // console.log(e) }); markerG.push(marker); } marker141Layers = L.layerGroup(markerG); map.addLayer(marker141Layers); hideLoaderScreen(); } function headermodal(item) { $("#headerid").empty(); if (item == 1) { $("#headerid").append( ' ' ); } else if (item == 2) { $("#headerid").append( ' ' ); } else if (item == 3) { $("#headerid").append( ' ' ); } else if (item == 4) { $("#headerid").append( ' ' ); } else if (item == 5) { $("#headerid").append( ' ' ); } else if (item == 6) { $("#headerid").append( ' ' ); } else if (item == 7) { $("#headerid").append( ' ' ); } else if (item == 8) { $("#headerid").append( ' ' ); } else if (item == 9) { $("#headerid").append( ' ' ); } else if (item == 10) { $("#headerid").append( ' ' ); } else if (item == 11) { $("#headerid").append( ' ' ); } else if (item == 12) { $("#headerid").append( ' ' ); } else if (item == 13) { $("#headerid").append( ' ' ); } else if (item == 14) { $("#headerid").append( ' ' ); } else if (item == 15) { $("#headerid").append( ' ' ); } else if (item == 16) { $("#headerid").append( ' ' ); } } function show_point_photo(array) { $("#showpicture").empty(); // console.log("array", array) if (array.length > 0) { array.forEach((element) => $("#showpicture").append('') ); } } function subshow(index) { if (itempoint == 1) { // return index if (index == 7) { return "روکش"; } if (index == 1) { return "ترمیم افتادگی لبه آسفالت"; } if (index == 2) { return "شانه سازی"; } if (index == 3) { return "پر کردن گودافتادگی یا چاله با آسفالت"; } if (index == 4) { return "لکه گیری هندسی راه"; } if (index == 5) { return "مرمت آبشستگی راه ها و شانه راه ها"; } if (index == 6) { return "تنظیم سطح بستر حریم"; } } else if (itempoint == 2) { if (index == 1) { return "پاک سازی و جاروزنی سطح راه"; } if (index == 2) { return "پاک سازی و تنقیه آبروهای کوچک"; } if (index == 3) { return "پاک سازی سطح راه از لاشه حیوانات"; } if (index == 4) { return "پاک سازی قنوها و آبروهای طولی"; } if (index == 5) { return "پاک سازی سطح راه از آثار تصادفات"; } if (index == 6) { return "علف کنی و بوته کنی" + "
"; } if (index == 7) { return "پاک سازی حریم راه از مواد زائد و نخاله های ساختمانی"; } if (index == 8) { return "جمع آوری قطعات آسیب دیده حفاظ، علائم و ..."; } } else if (itempoint == 3) { if (index == 1) { return "نصب تابلوهای اخطاری، انتظامی و مسیرنما"; } if (index == 2) { return "نصب تابلوهای اطلاعاتی"; } if (index == 3) { return "تعویض شبرنگ تابلوهای اطلاعاتی"; } if (index == 4) { return "نصب بازتاب بر روی گاردریل و حفاظ های حاشیه راه و چشم گربه ای"; } } else if (itempoint == 4) { if (index == 1) { return "ارتقای حفاظ میانی راه ها"; } if (index == 2) { return "ارتقای حفاظ پل ها و پرتگاه ها" + "
"; } if (index == 3) { return "بهسازی حفاظ های موجود" + "
"; } } else if (itempoint == 5) { if (index == 1) { return "روشنایی طولی راه"; } if (index == 2) { return "روشنایی نقطه ای پارکینگ در حاشیه راه"; } if (index == 3) { return "روشنایی نقطه ای تقاطع در حاشیه راه"; } if (index == 4) { return "روشنایی نقطه ای محل نصب دوربین در حاشیه راه"; } if (index == 5) { return "روشنایی طولی نواحی یا گردنه های مه گیر"; } if (index == 6) { return "روشنایی تونل"; } } else if (itempoint == 6) { if (index == 1) { return "خط کشی با رنگ گرم ترافیکی"; } if (index == 2) { return "خط کشی با رنگ سرد ترافیکی"; } if (index == 3) { return "ترسیم نقوش، فلش، خط نوشته و ..."; } } else if (itempoint == 7) { if (index == 1) { return "رنگ آمیزی پایه تابلوها"; } if (index == 2) { return "رنگ آمیزی پایه چراغ ها"; } if (index == 3) { return "رنگ آمیزی پایه های روشنایی"; } if (index == 4) { return "رنگ آمیزی پل های عابر پیاده"; } if (index == 5) { return "رنگ آمیزی پایه تابلوهای دروازه ای"; } if (index == 6) { return "رنگ آمیزی حفاظ ها"; } } else if (itempoint == 8) { if (index == 1) { return "شستشوی علائم ایمنی اخطاری، انتظامی، مسیرنما و ..."; } if (index == 2) { return " شستشوی تابلوهای اطلاعاتی"; } if (index == 3) { return " شستشوی جداول"; } if (index == 4) { return " شستشوی نیوجرسی ها"; } if (index == 5) { return " شستشوی گاردریل ها و هندریل ها"; } if (index == 6) { return "شستشوی دیواره تونل ها"; } } else if (itempoint == 9) { if (index == 1) { return "ایمن سازی سرگاردریل، موانع صلب، دماغه ها و موانع صلب"; } if (index == 2) { return "ایمن سازی شیب شیروانی ها"; } if (index == 3) { return "اجرای استراحتگاه"; } if (index == 4) { return "نصب و راه اندازی چراغ های آذرخشی و چشمک زن"; } if (index == 5) { return "ایجاد شیراهای لرزاننده طولی"; } if (index == 6) { return "ضربه گیر استوانه ای"; } if (index == 7) { return "نصب سرعت گیر استاندارد پلاستیکی"; } } else if (itempoint == 10) { if (index == 1) { return "ساخت و ساز"; } if (index == 2) { return "عبور تاسیسات زیربنایی"; } if (index == 3) { return "راه دسترسی اختصاصی"; } if (index == 4) { return "راه دسترسی تجمیع شده"; } } else if (itempoint == 11) { if (index == 1) { return "تعمیرات الواسیون"; } if (index == 2) { return "دراواسیون و تنظیم بستر پل های بالای 6 متر"; } if (index == 3) { return "احداث رادیه و برید"; } if (index == 4) { return "مرمت و بازسازی درز انبساط"; } if (index == 5) { return "بازسازی نرده پل"; } } else if (itempoint == 12) { if (index == 1) { return "زهکشی طاق تونل"; } if (index == 2) { return "مرمت و بازرسی آبروهای هدایت آب"; } if (index == 3) { return "لاینینگ"; } if (index == 4) { return "تعمیر و بازسازی گالری"; } if (index == 5) { return "گاباریت"; } } else if (itempoint == 13) { if (index == 1) { return "عملیات یخ زدایی با شن و نمک پاشی"; } if (index == 2) { return "برف روبی با گریدر یا تیغه برف روب"; } if (index == 3) { return "برف روبی با بولدوزر و ماشین برف خور"; } if (index == 4) { return "برف روبی در شرایط کولاک و عدم دید"; } if (index == 5) { return "میزان نمک مصرفی"; } if (index == 6) { return "ریزش برداری"; } if (index == 7) { return "مسافرین اسکان داده شده"; } if (index == 8) { return "کمک رسانی به خودرو رهاشده"; } } else if (itempoint == 14) { if (index == 1) { return "بنزین مصرفی کل ماشین آلات فعال"; } if (index == 2) { return "گازوئیل مصرفی کل ماشین آلات فعال"; } if (index == 3) { return "مواد مصرفی نفتی و انواع روغن"; } if (index == 4) { return "بازسازی و راه اندازی ماشین آلات"; } if (index == 5) { return "خرید ماشین آلات"; } if (index == 6) { return "خرید تجهیزآلات مرتبط به ماشین آلات"; } if (index == 7) { return "بازدید کارشناسان از ماشین آلات استان"; } } else if (itempoint == 15) { if (index == 1) { return "راهدارخانه های بازسازی شده"; } if (index == 2) { return "خرید تجهیزآلات مرتبط با راهدارخانه ها"; } if (index == 3) { return "جلسات تشکیل شده در خصوص مدیریت بحران و پدافند غیرعامل"; } } else if (itempoint == 16) { if (index == 1) { return ( "پاک سازی سطح راه و رفع انسداد ناشی از ریزش کوه و سقوط بهمن" + "
" ); } if (index == 2) { return ( "برقراری تردد و رفع انسداد ناشی از وقوع تصادف یا واژگونی وسایط نقلیه و پخش محموله در سطح راه" + "
" ); } if (index == 3) { return "برقراری ارتباط و رفع انسداد ناشی از شن های روان" + "
"; } if (index == 4) { return ( "برقراری ارتباط در راه هایی که به دلیل آب بردگی دچار قطع ارتباط شده اند" + "
" ); } if (index == 5) { return ( "برقراری ارتباط موقت در راه هایی که به دلیل شکستگی پل یا ریزش تونل یا ... قطع شده اند" + "
" ); } if (index == 6) { return "بستن راه و هدایت ترافیکی در مواقع اضطراری" + "
"; } } } function showcount(item, data) { if (itempoint == 1) { let textfile = ""; if (item == 7) { if ( data["reconstruction7-1-1"] != undefined && data["reconstruction7-1-2"] != undefined ) { textfile += "روکش آسفالت :" + data["reconstruction7-1-1"] + " " + "کیلومتر " + "تناژ" + " " + data["reconstruction7-1-2"] + "
"; } else if ( data["reconstruction7-1-1"] != undefined && data["reconstruction7-1-2"] == undefined ) { textfile += "روکش آسفالت :" + data["reconstruction7-1-1"] + " " + "کیلومتر " + " " + "
"; } else if ( data["reconstruction7-1-1"] == undefined && data["reconstruction7-1-2"] != undefined ) { textfile += "روکش آسفالت :" + "تناژ" + " " + data["reconstruction7-1-2"] + "
"; } if ( data["reconstruction7-2-1"] != undefined && data["reconstruction7-2-2"] != undefined ) { textfile += "ماسه آسفالت :" + " " + data["reconstruction7-2-1"] + " " + "کیلومتر " + " " + "تناژ" + " " + data["reconstruction7-2-2"] + "
"; } else if ( data["reconstruction7-2-1"] != undefined && data["reconstruction7-2-2"] == undefined ) { textfile += "ماسه آسفالت :" + " " + data["reconstruction7-2-1"] + " " + "کیلومتر " + "
"; } else if ( data["reconstruction7-2-1"] == undefined && data["reconstruction7-2-2"] != undefined ) { textfile += "ماسه آسفالت :" + " " + "تناژ" + data["reconstruction7-1-2"] + " " + "
"; } if ( data["reconstruction7-3-1"] != undefined && data["reconstruction7-3-2"] != undefined ) { textfile += " باریافت سرد/گرم :" + " " + data["reconstruction7-3-1"] + "کیلومتر " + " " + "تناژ" + " " + data["reconstruction7-3-2"] + "
"; } else if ( data["reconstruction7-3-1"] != undefined && data["reconstruction7-3-2"] == undefined ) { textfile += " باریافت سرد/گرم :" + data["reconstruction7-3-1"] + " " + "کیلومتر " + "
"; } else if ( data["reconstruction7-3-1"] == undefined && data["reconstruction7-3-2"] != undefined ) { textfile += " باریافت سرد/گرم :" + "تناژ" + data["reconstruction7-3-2"] + "
"; } if ( data["reconstruction7-4-1"] != undefined && data["reconstruction7-4-2"] != undefined ) { textfile += " میکروسرفیسینگ :" + data["reconstruction7-4-1"] + "کیلومتر " + " " + "تناژ" + data["reconstruction7-4-2"] + "
"; } else if ( data["reconstruction7-4-1"] != undefined && data["reconstruction7-4-2"] == undefined ) { textfile += " میکروسرفیسینگ :" + data["reconstruction7-4-1"] + "کیلومتر " + "
"; } else if ( data["reconstruction7-4-1"] == undefined && data["reconstruction7-4-2"] != undefined ) { textfile += " میکروسرفیسینگ :" + "تناژ" + data["reconstruction7-4-2"] + "
"; } if ( data["reconstruction7-5-1"] != undefined && data["reconstruction7-5-2"] != undefined ) { textfile += " چیپ سیل" + data["reconstruction7-5-1"] + "کیلومتر " + " " + "تناژ" + data["reconstruction7-5-2"] + "
"; } else if ( data["reconstruction7-5-1"] != undefined && data["reconstruction7-5-2"] == undefined ) { textfile += " چیپ سیل" + data["reconstruction7-5-1"] + "کیلومتر " + "
"; } else if ( data["reconstruction7-5-1"] == undefined && data["reconstruction7-5-2"] != undefined ) { textfile += " چیپ سیل" + "تناژ" + data["reconstruction7-5-2"] + "
"; } if ( data["reconstruction7-6-1"] != undefined && data["reconstruction7-6-2"] != undefined ) { textfile += " اسلاری سیل" + data["reconstruction7-6-1"] + "کیلومتر " + " " + "تناژ" + data["reconstruction7-6-2"] + "
"; } else if ( data["reconstruction7-6-1"] != undefined && data["reconstruction7-6-2"] == undefined ) { textfile += " اسلاری سیل" + data["reconstruction7-6-1"] + "کیلومتر " + "
"; } else if ( data["reconstruction7-6-1"] == undefined && data["reconstruction7-6-2"] != undefined ) { textfile += " اسلاری سیل" + "تناژ" + data["reconstruction7-6-2"] + "
"; } if ( data["reconstruction7-7-1"] != undefined && data["reconstruction7-7-2"] != undefined ) { textfile += " اسکراب سیل :" + data["reconstruction7-7-1"] + "کیلومتر " + " " + "تناژ" + data["reconstruction7-7-2"] + "
"; } else if ( data["reconstruction7-7-1"] != undefined && data["reconstruction7-7-2"] == undefined ) { textfile += " اسکراب سیل :" + data["reconstruction7-7-1"] + "کیلومتر " + "
"; } else if ( data["reconstruction7-7-1"] == undefined && data["reconstruction7-7-2"] != undefined ) { textfile += " اسکراب سیل :" + "تناژ" + data["reconstruction7-7-2"] + "
"; } if ( data["reconstruction7-8-1"] != undefined && data["reconstruction7-8-2"] != undefined ) { textfile += " فوگ سیل :" + data["reconstruction7-8-1"] + "کیلومتر " + " " + "تناژ" + data["reconstruction7-8-2"] + "
"; } else if ( data["reconstruction7-8-1"] != undefined && data["reconstruction7-8-2"] == undefined ) { textfile += " فوگ سیل :" + data["reconstruction7-8-1"] + "کیلومتر " + "
"; } else if ( data["reconstruction7-8-1"] == undefined && data["reconstruction7-8-2"] != undefined ) { textfile += " فوگ سیل :" + "تناژ" + data["reconstruction7-8-2"] + "
"; } if ( data["reconstruction7-9-1"] != undefined && data["reconstruction7-9-2"] != undefined ) { textfile += " سیل کت :" + data["reconstruction7-9-1"] + "کیلومتر " + " " + "تناژ" + data["reconstruction7-9-2"] + "
"; } else if ( data["reconstruction7-9-1"] != undefined && data["reconstruction7-9-2"] == undefined ) { textfile += " سیل کت :" + data["reconstruction7-9-1"] + "کیلومتر " + "
"; } else if ( data["reconstruction7-9-1"] == undefined && data["reconstruction7-9-2"] != undefined ) { textfile += " سیل کت :" + "تناژ" + data["reconstruction7-9-2"] + "
"; } if ( data["reconstruction7-10-1"] != undefined && data["reconstruction7-10-2"] != undefined ) { textfile += " کیپ سیل :" + data["reconstruction7-10-1"] + "کیلومتر " + " " + "تناژ" + data["reconstruction7-10-2"] + "
"; } else if ( data["reconstruction7-10-1"] != undefined && data["reconstruction7-10-2"] == undefined ) { textfile += " کیپ سیل :" + data["reconstruction7-10-1"] + "کیلومتر " + "
"; } else if ( data["reconstruction7-10-1"] == undefined && data["reconstruction7-10-2"] != undefined ) { textfile += " کیپ سیل :" + "تناژ" + data["reconstruction7-10-2"] + "
"; } if ( data["reconstruction7-11-1"] != undefined && data["reconstruction7-11-2"] != undefined ) { textfile += " آسفالت سرد/ردمیکس :" + data["reconstruction7-11-1"] + "کیلومتر " + " " + "تناژ" + data["reconstruction7-11-2"] + "
"; } else if ( data["reconstruction7-11-1"] != undefined && data["reconstruction7-11-2"] == undefined ) { textfile += "آسفالت سرد/ردمیکس :" + data["reconstruction7-11-1"] + "کیلومتر " + "
"; } else if ( data["reconstruction7-11-1"] == undefined && data["reconstruction7-11-2"] != undefined ) { textfile += " آسفالت سرد/ردمیکس :" + "تناژ" + data["reconstruction7-11-2"] + "
"; } return textfile; } if (item == 1) { if (data["reconstruction1-1"] != undefined) { textfile = data["reconstruction1-1"] + "کیلومتر " + "
"; } else textfile = "_" + "
"; return textfile; } if (item == 2) { if (data["reconstruction2-1"] != undefined) { textfile = data["reconstruction2-1"] + " تن" + "
"; } else textfile = "_" + "
"; return textfile; } if (item == 3) { if (data["reconstruction3-1"]) { textfile = data["reconstruction3-1"] + " متر مربع" + "
"; } else textfile = "_" + "
"; return textfile; } if (item == 4) { if (data["reconstruction4-1"] != undefined) { textfile = data["reconstruction4-1"] + "متر مکعب " + "
"; } else textfile = "_" + "
"; return textfile; } if (item == 5) { if (data["reconstruction5-1"] != undefined) { textfile = data["reconstruction5-1"] + "کیلومتر " + "
"; } else textfile = "_" + "
"; return textfile; } if (item == 6) { if (data["reconstruction6-1"] != undefined) { textfile = data["reconstruction6-1"] + "کیلومتر " + "
"; } else textfile = "_" + "
"; return textfile; } } else if (itempoint == 2) { let textfile = ""; if (item == 1) { if (data["cleaning1-1"] != undefined) { textfile += data["cleaning1-1"] + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 2) { if (data["cleaning2-1"] != undefined) { textfile += data["cleaning2-1"] + "متر مکعب" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 3) { if (data["cleaning3-1"] != undefined) { textfile += data["cleaning3-1"] + "تعداد" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 4) { if (data["cleaning4-1"] != undefined) { textfile += data["cleaning4-1"] + "کیلومتر" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 5) { if (data["cleaning5-1"] != undefined) { textfile += data["cleaning5-1"] + "مترطول-باند" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 6) { if (data["cleaning6-1"] != undefined) { textfile += data["cleaning6-1"] + "کیلومتر" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 7) { if (data["cleaning7-1"] != undefined) { textfile += data["cleaning7-1"] + "کیلومتر" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 8) { if (data["cleaning8-1"] != undefined) { textfile += data["cleaning8-1"] + "تن" + "
"; } else textfile += "_" + "
"; return textfile; } } else if (itempoint == 3) { let textfile = ""; if (item == 1) { if (data["signs1-1"] != undefined) { textfile += data["signs1-1"] + "تعداد" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 2) { if (data["signs2-1"] != undefined) { textfile += data["signs2-1"] + "مترمربع" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 3) { if (data["signs3-1"] != undefined) { textfile += data["signs3-1"] + "مترمربع" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 4) { if (data["signs4-1"] != undefined) { textfile += data["signs4-1"] + "تعداد" + "
"; } else textfile += "_" + "
"; return textfile; } } else if (itempoint == 4) { let textfile = ""; if (item == 1) { if ( data["shield1-1-1"] != undefined || data["shield1-1-2"] != undefined || data["shield1-1-3"] != undefined || data["shield1-1-4"] != undefined ) { if (data["shield1-2-1"] != undefined) { textfile += data["shield1-2-1"] + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += data["shield1-2-1"] + "کیلومتر" + "
"; } return textfile; } if (value == 2) { if ( data["shield2-1-1"] != undefined || data["shield2-1-2"] != undefined || data["shield2-1-3"] != undefined || data["shield2-1-4"] != undefined ) { if (data["shield2-2-1"] != undefined) { textfile += data["shield2-2-1"] + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += data["shield2-2-1"] + "کیلومتر" + "
"; } return textfile; } if (value == 3) { if ( data["shield3-1-1"] != undefined || data["shield3-1-2"] != undefined || data["shield3-1-3"] != undefined || data["shield3-1-4"] != undefined ) { if (data["shield3-2-1"] != undefined) { textfile += data["shield3-2-1"] + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += data["shield3-2-1"] + "کیلومتر" + "
"; } return textfile; } } else if (itempoint == 5) { let textfile = ""; if (item == 1) { if ( data["lighting1-1-1"] != undefined || data["lighting1-1-2"] != undefined || data["lighting1-1-3"] != undefined ) { if (data["lighting1-2-1"] != undefined) { textfile += data["lighting1-2-1"] + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += data["lighting1-2-1"] + "کیلومتر" + "
"; } return textfile; } if (item == 2) { if ( data["lighting2-1-1"] != undefined || data["lighting2-1-2"] != undefined || data["lighting2-1-3"] != undefined ) { if (data["lighting2-2-1"] != undefined) { textfile += data["lighting2-2-1"] + "موردی" + "
"; } else textfile += "_" + "
"; } else { textfile += data["lighting2-2-1"] + "موردی" + "
"; } return textfile; } if (item == 3) { if ( data["lighting3-1-1"] != undefined || data["lighting3-1-2"] != undefined || data["lighting3-1-3"] != undefined ) { if (data["lighting3-2-1"] != undefined) { textfile += data["lighting3-2-1"] + "موردی" + "
"; } else textfile += "_" + "
"; } else { textfile += data["lighting3-2-1"] + "موردی" + "
"; } return textfile; } if (item == 4) { if ( data["lighting4-1-1"] != undefined || data["lighting4-1-2"] != undefined || data["lighting4-1-3"] != undefined ) { if (data["lighting4-2-1"] != undefined) { textfile += data["lighting4-2-1"] + "موردی" + "
"; } else textfile += "_" + "
"; } else { textfile += data["lighting4-2-1"] + "موردی" + "
"; } return textfile; } if (item == 5) { if ( data["lighting5-1-1"] != undefined || data["lighting5-1-2"] != undefined || data["lighting5-1-3"] != undefined ) { if (data["lighting5-2-1"] != undefined) { textfile += data["lighting5-2-1"] + "کیلومتر" + "
"; } else textfile += "_" + "
"; } else { textfile += data["lighting5-2-1"] + "کیلومتر" + "
"; } return textfile; } if (item == 6) { if ( data["lighting6-1-1"] != undefined || data["lighting6-1-2"] != undefined || data["lighting6-1-3"] != undefined ) { if (data["lighting6-2-1"] != undefined) { textfile += data["lighting6-2-1"] + "موردی" + "
"; } else textfile += "_" + "
"; } else { textfile += data["lighting6-2-1"] + "موردی" + "
"; } return textfile; } } else if (itempoint == 6) { let textfile = ""; if (item == 1) { if (data["lining1-1"] != undefined) { textfile += data["lining1-1"] + "کیلومتر-رنگ" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 2) { if (data["lining2-1"] != undefined) { textfile += data["lining2-1"] + "کیلومتر-رنگ" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 3) { if (data["lining3-1"]) { textfile += data["lining3-1"] + "مترمربع" + "
"; } else textfile += "_" + "
"; return textfile; } } else if (itempoint == 7) { let textfile = ""; if (item == 1) { if (data["coloring1-1"] != undefined) { textfile += data["coloring1-1"] + "تعداد" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 2) { if (data["coloring2-1"] != undefined) { textfile += data["coloring2-1"] + "تعداد" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 3) { if (data["coloring3-1"] != undefined) { textfile += data["coloring3-1"] + "اصله" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 4) { if (data["coloring4-1"] != undefined) { textfile += data["coloring4-1"] + "دستگاه" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 5) { if (data["coloring5-1"] != undefined) { textfile += data["coloring5-1"] + "تعداد" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 6) { if (data["coloring6-1"] != undefined) { textfile += data["coloring6-1"] + "مترمربع" + "
"; } else textfile += "_" + "
"; return textfile; } } else if (itempoint == 8) { let textfile = ""; if (item == 1) { if (data["washing1-1"] != undefined) { textfile += data["washing1-1"] + "تعداد" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 2) { if (data["washing2-1"] != undefined) { textfile += data["washing2-1"] + "مترمربع" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 3) { if (data["washing3-1"] != undefined) { textfile += data["washing3-1"] + "کیلومتر" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 4) { if (data["washing4-1"] != undefined) { textfile += data["washing4-1"] + "مترمربع" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 5) { if (data["washing5-1"] != undefined) { textfile += data["washing5-1"] + "کیلومتر" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 6) { if (data["washing6-1"] != undefined) { textfile += data["washing6-1"] + "مترمربع" + "
"; } else textfile += "_" + "
"; return textfile; } } else if (itempoint == 9) { let textfile = ""; if (item == 1) { if (data["securing1-1"] != undefined) { textfile += data["securing1-1"] + "تعداد" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 2) { if (data["securing2-1"] != undefined) { textfile += data["securing2-1"] + "کیلومتر" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 3) { if (data["securing3-1"] != undefined) { textfile += data["securing3-1"] + "باب" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 4) { if (data["securing4-1"] != undefined) { textfile += data["securing4-1"] + "دستگاه" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 5) { if (data["securing5-1"] != undefined) { textfile += data["securing5-1"] + "کیلومتر-شیار" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 6) { if (data["securing6-1"] != undefined) { textfile += data["securing6-1"] + "تعداد" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 7) { if (data["securing7-1"] != undefined) { textfile += data["securing7-1"] + "طول" + "
"; } else textfile += "_" + "
"; return textfile; } } else if (itempoint == 10) { return "_"; } else if (itempoint == 11) { return "_"; } else if (itempoint == 12) { return "_"; } else if (itempoint == 13) { let textfile = ""; if (item == 1) { if (data["winterOperation1-1"] != undefined) { textfile += data["winterOperation1-1"] + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 2) { if (data["winterOperation1-2"] != undefined) { textfile += data["winterOperation1-2"] + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 3) { if (data["winterOperation3-1"] != undefined) { textfile += data["winterOperation3-1"] + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 4) { if (data["winterOperation4-1"] != undefined) { textfile += data["winterOperation4-1"] + "کیلومتر-باند" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 5) { if (data["winterOperation5-1"] != undefined) { textfile += data["winterOperation5-1"] + "تن" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 6) { if (data["winterOperation6-1"] != undefined) { textfile += data["winterOperation6-1"] + "مقطع" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 7) { if (data["winterOperation7-1"] != undefined) { textfile += data["winterOperation7-1"] + "تعداد" + "
"; } else textfile = "_" + "
"; return textfile; } if (item == 8) { if (data["winterOperation8-1"] != undefined) { textfile += data["winterOperation8-1"] + "تعداد" + "
"; } else textfile += "_" + "
"; return textfile; } } else if (itempoint == 14) { let textfile = ""; if (item == 1) { if (data["machinery1-1"] != undefined) { textfile += data["machinery1-1"] + "لیتر" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 2) { if (data["machinery2-1"] != undefined) { textfile += data["machinery2-1"] + "لیتر" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 3) { if (data["machinery3-1"] != undefined) { textfile += data["machinery3-1"] + "لیتر" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 4) { if ( data["machinery4-1"] != undefined && data["machinery4-2"] != undefined ) { textfile += data["machinery4-1"] + "تعداد دستگاه" + data["machinery4-2"] + "هزینه" + "
"; } else if ( data["machinery4-1"] != undefined && data["machinery4-2"] == undefined ) { textfile += data["machinery4-1"] + "تعداد دستگاه" + "
"; } else if ( data["machinery4-1"] == undefined && data["machinery4-2"] != undefined ) { textfile += data["machinery4-2"] + "هزینه" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 5) { if ( data["machinery5-1"] != undefined && data["machinery5-2"] != undefined ) { textfile += data["machinery5-1"] + "تعداد دستگاه" + data["machinery5-2"] + "نوع کاربری" + "
"; } else if ( data["machinery5-1"] != undefined && data["machinery5-2"] == undefined ) { textfile += data["machinery5-1"] + "تعداد دستگاه" + "
"; } else if ( data["machinery5-1"] == undefined && data["machinery5-2"] != undefined ) { textfile += data["machinery5-2"] + "نوع کاربری " + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 6) { if ( data["machinery6-1"] != undefined && data["machinery6-2"] != undefined ) { textfile += data["machinery6-1"] + "تعداد دستگاه" + data["machinery6-2"] + "نوع کاربری" + "
"; } else if ( data["machinery6-1"] != undefined && data["machinery6-2"] == undefined ) { textfile += data["machinery6-1"] + "تعداد دستگاه" + "
"; } else if ( data["machinery6-1"] == undefined && data["machinery6-2"] != undefined ) { textfile += data["machinery6-2"] + "نوع کاربری" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 7) { if ( data["machinery7-1"] != undefined && data["machinery7-2"] != undefined ) { textfile += data["machinery7-1"] + "تعداد دستگاه" + data["machinery7-2"] + "تعداد بازدید " + "
"; } else if ( data["machinery7-1"] != undefined && data["machinery7-2"] == undefined ) { textfile += data["machinery7-1"] + "تعداد دستگاه" + "
"; } else if ( data["machinery7-1"] == undefined && data["machinery7-2"] != undefined ) { textfile += data["machinery7-2"] + "تعداد بازدید " + "
"; } else textfile += "_" + "
"; return textfile; } } else if (itempoint == 15) { let textfile = ""; if (item == 1) { if ( data["tollhouse1-1"] != undefined && data["tollhouse1-2"] != undefined ) { textfile += data["tollhouse1-1"] + "باب" + data["tollhouse1-2"] + "هزینه" + "
"; } else if ( data["tollhouse1-1"] != undefined && data["tollhouse1-2"] == undefined ) { textfile += data["tollhouse1-1"] + "باب" + "
"; } else if ( data["tollhouse1-1"] == undefined && data["tollhouse1-2"] != undefined ) { textfile += data["tollhouse1-2"] + "هزینه" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 2) { if ( data["tollhouse2-1"] != undefined && data["tollhouse2-2"] != undefined ) { textfile += data["tollhouse2-1"] + "تعداد" + data["tollhouse2-2"] + "نوع" + "
"; } else if ( data["tollhouse2-1"] != undefined && data["tollhouse2-2"] == undefined ) { textfile += data["tollhouse2-1"] + "تعداد" + "
"; } else if ( data["tollhouse2-1"] == undefined && data["tollhouse2-2"] != undefined ) { textfile += data["tollhouse2-2"] + "نوع" + "
"; } else textfile += "_" + "
"; return textfile; } if (item == 3) { if (data["tollhouse3-1"] != undefined) { textfile += data["tollhouse3-1"] + "
"; } else textfile += "_" + "
"; return textfile; } } else if (itempoint == 16) { return "_"; } } function GenerateTable(item, dataitem) { var customers = new Array(); if (customers != []) { customers = []; } customers.push(["ردیف", "ریزفعالیت ", "مقدار"]); for (var i = 0; i < item.length; i++) { customers.push([i + 1, subshow(item[i]), showcount(item[i], dataitem)]); } var table = document.createElement("TABLE"); $(table).attr("width", "100%"); $(table).addClass("table"); $(table).addClass("table-bordered"); $(table).addClass("tablemodal"); table.border = "1"; //Get the count of columns. var columnCount = customers[0].length; //Add the header row. var row = table.insertRow(-1); for (var i = 0; i < columnCount; i++) { var headerCell = document.createElement("TH"); headerCell.innerHTML = customers[0][i]; row.appendChild(headerCell); } //Add the data rows. for (var i = 1; i < customers.length; i++) { row = table.insertRow(-1); for (var j = 0; j < columnCount; j++) { var cell = row.insertCell(-1); cell.innerHTML = customers[i][j]; } } var dvTable = document.getElementById("showtable"); dvTable.innerHTML = ""; dvTable.appendChild(table); } function generatemachinary(data, flag) { if (flag == 0) { var item = data var customers = new Array(); if (customers != []) { customers = []; } customers.push(["ردیف", " نوع دستگاه ", " نام راننده", "شماره تلفن"]); for (var i = 0; i < item.length; i++) { customers.push([i + 1, dastgahname(item[i].dastgahtype), drivername(item[i].drivername), showphone(item[i].driverphone)]); } var table = document.createElement("TABLE"); $(table).attr("width", "100%"); $(table).addClass("table"); $(table).addClass("table-bordered"); $(table).addClass("tablemodal"); table.border = "1"; //Get the count of columns. var columnCount = customers[0].length; //Add the header row. var row = table.insertRow(-1); for (var i = 0; i < columnCount; i++) { var headerCell = document.createElement("TH"); headerCell.innerHTML = customers[0][i]; row.appendChild(headerCell); } //Add the data rows. for (var i = 1; i < customers.length; i++) { row = table.insertRow(-1); for (var j = 0; j < columnCount; j++) { var cell = row.insertCell(-1); cell.innerHTML = customers[i][j]; } } var dvTable = document.getElementById("showmachinekip"); dvTable.innerHTML = ""; dvTable.appendChild(table); } else { var item = jQuery.parseJSON(data) var customers = new Array(); if (customers != []) { customers = []; } customers.push(["ردیف", " نوع دستگاه ", " نام راننده", "شماره تلفن"]); for (var i = 0; i < item.length; i++) { customers.push([i + 1, dastgahname(item[i].dastgahtype), drivername(item[i].drivername), showphone(item[i].driverphone)]); } var table = document.createElement("TABLE"); $(table).attr("width", "100%"); $(table).addClass("table"); $(table).addClass("table-bordered"); $(table).addClass("tablemodal"); table.border = "1"; //Get the count of columns. var columnCount = customers[0].length; //Add the header row. var row = table.insertRow(-1); for (var i = 0; i < columnCount; i++) { var headerCell = document.createElement("TH"); headerCell.innerHTML = customers[0][i]; row.appendChild(headerCell); } //Add the data rows. for (var i = 1; i < customers.length; i++) { row = table.insertRow(-1); for (var j = 0; j < columnCount; j++) { var cell = row.insertCell(-1); cell.innerHTML = customers[i][j]; } } var dvTable = document.getElementById("showmachinekip"); dvTable.innerHTML = ""; dvTable.appendChild(table); } // $('.machinlistcard').css('height' , '0px'); // $('.machinlistcard').css('margin-bottom' , '0px'); // $('.machinlistcard::before').css('transform' , 'rotate(90deg)'); // $('.machinlistcard').css('height' , '0px'); // $('.machinlistcard').css('margin-bottom' , '0px'); // $('.machinlistcard::before').css('transform' , 'rotate(90deg)'); } function dastgahname(data) { return data } function drivername(data) { return data } function showphone(data) { return data } function generatetablecoridor(data, flag) { if (flag == 0) { var item = data var customers = new Array(); if (customers != []) { customers = []; } customers.push(["ردیف", "نام اکیپ ", "شماره تلفن"]); for (var i = 0; i < item.length; i++) { customers.push([i + 1, showekip(item[i].nameofekip), showphone(item[i].ekipphone)]); } var table = document.createElement("TABLE"); $(table).attr("width", "100%"); $(table).addClass("table"); $(table).addClass("table-bordered"); $(table).addClass("tablemodal"); table.border = "1"; //Get the count of columns. var columnCount = customers[0].length; //Add the header row. var row = table.insertRow(-1); for (var i = 0; i < columnCount; i++) { var headerCell = document.createElement("TH"); headerCell.innerHTML = customers[0][i]; row.appendChild(headerCell); } //Add the data rows. for (var i = 1; i < customers.length; i++) { row = table.insertRow(-1); for (var j = 0; j < columnCount; j++) { var cell = row.insertCell(-1); cell.innerHTML = customers[i][j]; } } var dvTable = document.getElementById("showcoridorekip"); dvTable.innerHTML = ""; dvTable.appendChild(table); } else { var item = jQuery.parseJSON(data) var customers = new Array(); if (customers != []) { customers = []; } customers.push(["ردیف", "نام اکیپ ", "شماره تلفن"]); for (var i = 0; i < item.length; i++) { customers.push([i + 1, showekip(item[i].nameofekip), showphone(item[i].ekipphone)]); } var table = document.createElement("TABLE"); $(table).attr("width", "100%"); $(table).addClass("table"); $(table).addClass("table-bordered"); $(table).addClass("tablemodal"); table.border = "1"; //Get the count of columns. var columnCount = customers[0].length; //Add the header row. var row = table.insertRow(-1); for (var i = 0; i < columnCount; i++) { var headerCell = document.createElement("TH"); headerCell.innerHTML = customers[0][i]; row.appendChild(headerCell); } //Add the data rows. for (var i = 1; i < customers.length; i++) { row = table.insertRow(-1); for (var j = 0; j < columnCount; j++) { var cell = row.insertCell(-1); cell.innerHTML = customers[i][j]; } } var dvTable = document.getElementById("showcoridorekip"); dvTable.innerHTML = ""; dvTable.appendChild(table); } // $('.ekiptest').css('height' , '0px'); // $('.ekiptest').css('margin-bottom' , '0px'); // $('.ekiplistt::before').css('transform' , 'rotate(90deg)'); } function showekip(data) { console.log("num", data); return data } function showphone(data) { console.log("num", data); return data } function showRoadAccidentLayer251() { if (marker141Layers != null) { marker141List = []; map.removeLayer(marker141Layers); } if (marker141LayersWithoutCluster != null) { map.removeLayer(marker141LayersWithoutCluster); } showLoaderScreen(); $.get("/accident-251-points", function (result) { let roadAccidentPoints = result.data; let markerG = []; for (let i = 0; i < roadAccidentPoints.length; i++) { try { let setIcon = null; if (roadAccidentPoints[i].progress == "100") { if (result.edit_id == roadAccidentPoints[i].province_id) { setIcon = greenIcon; } else { setIcon = greenIconFix; } } else { if (result.edit_id == roadAccidentPoints[i].province_id) { setIcon = redIcon; } else { setIcon = redIconFix; } } let marker = L.marker( [roadAccidentPoints[i].lat, roadAccidentPoints[i].lng], { icon: setIcon, content: roadAccidentPoints[i], } ) .on("click", function (e) { $("[data-mask]").inputmask(); let valueprogress = ""; let datatext = this.options.content; $("#pointid").val(datatext.id); $("#opration").val(datatext.operation); //oparation $("#target").val(datatext.target); //target $("#action").val(datatext.actions); //action $("#ac-point-lat").val(datatext.lat); $("#ac-point-lng").val(datatext.lng); valueprogress = datatext.progress; let test = '
\
'; $("#sliderphysici").empty(); $("#sliderphysici").append( '' ); $("#sliderphysici").append(test); $(".ex2").slider({ min: 0, max: 100, formatter: function (value) { return value + "٪"; }, tooltip: "always", tooltip_position: "bottom", }); $("#end-date").persianDatepicker({ format: "MMMM YYY", autoClose: true, viewMode: "month", dayPicker: { enabled: false, }, }); $("#cost").val(datatext.cost); //cost //$("#cost").attr('min', datatext.cost);//cost $("#end-date").val(datatext.end_date); //end-date }) .bindPopup( getPopupContentAccident_251(roadAccidentPoints[i], result.edit_id), { className: "customPopupStyle" } ); //marker141Layers.push(marker); //map.addLayer(marker) markerG.push(marker); } catch (e) { // } } marker141Layers = L.layerGroup(markerG); // marker141Layers.addLayers(marker141List); map.addLayer(marker141Layers); hideLoaderScreen(); }); } function getPopupContentAccident_251(data, edit_id) { if (edit_id == data.province_id) { return ( '\