コード例 #1
0
        //
        // GET: /EarlyMonitor/

        /// <summary>
        /// 预警监测地图
        /// </summary>
        /// <returns></returns>
        public ActionResult JcIndex()
        {
            ViewBag.rights = T_SYSSEC_RIGHTCls.getRightStrByUID(new T_SYSSEC_IPSUSER_SW {
                USERID = SystemCls.getUserID()
            });
            string method = Request.Params["Method"];

            switch (method)
            {
            case "monitor":
                ViewBag.loadFunc = "getJcMonitorLonLat()";    //电子监控
                ViewBag.loadtype = "1";
                pubViewBag("008003", "008003", "电子监控");
                break;

            default:
                ViewBag.loadFunc = "getJcCameraLonLat()";    //红外相机监测
                ViewBag.loadtype = "0";
                pubViewBag("008001", "008001", "红外相机");
                break;
            }
            return(View());
        }
コード例 #2
0
        /// <summary>
        /// 二维整合页面
        /// </summary>
        /// <returns></returns>
        public ActionResult Total2DIndex()
        {
            pubViewBag("030", "030", "二维护林员");
            var CenterX = Request.Params["CenterX"];
            var CenterY = Request.Params["CenterY"];
            var CenterZ = Request.Params["CenterZ"];

            if (string.IsNullOrEmpty(CenterX) == false && string.IsNullOrEmpty(CenterY) == false)
            {
                double[] arr = ClsPositionTrans.GpsTransform(double.Parse(CenterY), double.Parse(CenterX), "1");
                CenterX = arr[1].ToString();
                CenterY = arr[0].ToString();
            }
            else
            {
                CenterX = ConfigCls.getConfigValue("Longitude");
                CenterY = ConfigCls.getConfigValue("Latitude");
            }
            if (string.IsNullOrEmpty(CenterZ) == false)
            {
                if (Convert.ToDouble(CenterZ) >= 571000)
                {
                    CenterZ = "8";
                }
                else if (Convert.ToDouble(CenterZ) >= 321000 && Convert.ToDouble(CenterZ) < 571000)
                {
                    CenterZ = "9";
                }
                else if (Convert.ToDouble(CenterZ) >= 138000 && Convert.ToDouble(CenterZ) < 321000)
                {
                    CenterZ = "10";
                }
                else if (Convert.ToDouble(CenterZ) >= 65000 && Convert.ToDouble(CenterZ) < 138000)
                {
                    CenterZ = "11";
                }
                else if (Convert.ToDouble(CenterZ) >= 37000 && Convert.ToDouble(CenterZ) < 65000)
                {
                    CenterZ = "12";
                }
                else if (Convert.ToDouble(CenterZ) >= 12600 && Convert.ToDouble(CenterZ) < 37000)
                {
                    CenterZ = "13";
                }
                else if (Convert.ToDouble(CenterZ) >= 5980 && Convert.ToDouble(CenterZ) < 12600)
                {
                    CenterZ = "14";
                }
                else if (Convert.ToDouble(CenterZ) >= 3700 && Convert.ToDouble(CenterZ) < 5980)
                {
                    CenterZ = "15";
                }
                else if (Convert.ToDouble(CenterZ) >= 2390 && Convert.ToDouble(CenterZ) < 3700)
                {
                    CenterZ = "16";
                }
                else if (Convert.ToDouble(CenterZ) >= 1096 && Convert.ToDouble(CenterZ) < 2390)
                {
                    CenterZ = "17";
                }
                else if (Convert.ToDouble(CenterZ) >= 635 && Convert.ToDouble(CenterZ) < 1096)
                {
                    CenterZ = "18";
                }
                else if (Convert.ToDouble(CenterZ) < 635)
                {
                    CenterZ = "19";
                }
            }
            else
            {
                CenterZ = "10";
            }
            ViewBag.CenterX = CenterX;
            ViewBag.CenterY = CenterY;
            ViewBag.CenterZ = CenterZ;
            ViewBag.rights  = T_SYSSEC_RIGHTCls.getRightStrByUID(new T_SYSSEC_IPSUSER_SW {
                USERID = SystemCls.getUserID()
            });
            return(View());
        }
コード例 #3
0
        /// <summary>
        /// 菜单
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            pubViewBag("020002", "020002", "二维护林员");
            var CenterX = Request.Params["CenterX"];
            var CenterY = Request.Params["CenterY"];
            var CenterZ = Request.Params["CenterZ"];

            if (string.IsNullOrEmpty(CenterX) == false && string.IsNullOrEmpty(CenterY) == false)
            {
                double[] arr = ClsPositionTrans.GpsTransform(double.Parse(CenterY), double.Parse(CenterX), "1");
                CenterX = arr[1].ToString();
                CenterY = arr[0].ToString();
            }
            else
            {
                CenterX = ConfigCls.getConfigValue("Longitude");
                CenterY = ConfigCls.getConfigValue("Latitude");
            }
            if (string.IsNullOrEmpty(CenterZ) == false)
            {
                if (Convert.ToDouble(CenterZ) >= 571000)
                {
                    CenterZ = "8";
                }
                else if (Convert.ToDouble(CenterZ) >= 321000 && Convert.ToDouble(CenterZ) < 571000)
                {
                    CenterZ = "9";
                }
                else if (Convert.ToDouble(CenterZ) >= 138000 && Convert.ToDouble(CenterZ) < 321000)
                {
                    CenterZ = "10";
                }
                else if (Convert.ToDouble(CenterZ) >= 65000 && Convert.ToDouble(CenterZ) < 138000)
                {
                    CenterZ = "11";
                }
                else if (Convert.ToDouble(CenterZ) >= 37000 && Convert.ToDouble(CenterZ) < 65000)
                {
                    CenterZ = "12";
                }
                else if (Convert.ToDouble(CenterZ) >= 12600 && Convert.ToDouble(CenterZ) < 37000)
                {
                    CenterZ = "13";
                }
                else if (Convert.ToDouble(CenterZ) >= 5980 && Convert.ToDouble(CenterZ) < 12600)
                {
                    CenterZ = "14";
                }
                else if (Convert.ToDouble(CenterZ) >= 3700 && Convert.ToDouble(CenterZ) < 5980)
                {
                    CenterZ = "15";
                }
                else if (Convert.ToDouble(CenterZ) >= 2390 && Convert.ToDouble(CenterZ) < 3700)
                {
                    CenterZ = "16";
                }
                else if (Convert.ToDouble(CenterZ) >= 1096 && Convert.ToDouble(CenterZ) < 2390)
                {
                    CenterZ = "17";
                }
                else if (Convert.ToDouble(CenterZ) >= 635 && Convert.ToDouble(CenterZ) < 1096)
                {
                    CenterZ = "18";
                }
                else if (Convert.ToDouble(CenterZ) < 635)
                {
                    CenterZ = "19";
                }
            }
            else
            {
                CenterZ = "10";
            }
            ViewBag.CenterX = CenterX;
            ViewBag.CenterY = CenterY;
            ViewBag.CenterZ = CenterZ;
            ViewBag.rights  = T_SYSSEC_RIGHTCls.getRightStrByUID(new T_SYSSEC_IPSUSER_SW {
                USERID = SystemCls.getUserID()
            });
            string method = Request.Params["Method"];
            string str    = ViewBag.getPageMenuStr;

            ViewBag.getPageMenuStr = str.Replace("window.location.href='/Home/Index?Method=report&TID=1';", "getReport(&quot;1&quot;,&quot;0&quot;,&quot;火情&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=report&TID=2';", "getReport(&quot;2&quot;,&quot;0&quot;,&quot;病虫害&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=report&TID=3';", "getReport(&quot;3&quot;,&quot;0&quot;,&quot;盗砍盗伐&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=report&TID=4';", "getReport(&quot;4&quot;,&quot;0&quot;,&quot;安全隐患&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=collect&TID=1';", "getCollect(&quot;1&quot;,&quot;0&quot;,&quot;建筑物&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=collect&TID=2';", "getCollect(&quot;2&quot;,&quot;0&quot;,&quot;消防设施&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=collect&TID=3';", "getCollect(&quot;3&quot;,&quot;0&quot;,&quot;道路&quot;)")
                                     .Replace("window.location.href='/Home/Index?Method=collect&TID=4';", "getCollect(&quot;4&quot;,&quot;0&quot;,&quot;可燃物载量&quot;)")
                                     .Replace("window.location.href='/Home/Index';", "(getLonLat(&quot;&quot;))")
                                     .Replace("window.location.href='/Home/Index?Method=dm';", "(GetDmFun())")
                                     .Replace("window.location.href='/Home/Index?Method=hot';", "(getHot(&quot;0&quot;))")
                                     .Replace("window.location.href='/Home/Index?Method=alarm';", "(getAlarm(&quot;0&quot;))")
                                     .Replace("window.location.href='/Home/Index?Method=dl';", "(GetElecFun())");

            ViewBag.getPageMenuStr = ViewBag.getPageMenuStr;
            switch (method)
            {
            case "alarm":
                ViewBag.loadFunc = "getAlarm(\"0\")";    //一键报警
                break;

            case "hot":
                ViewBag.loadFunc = "getHot(\"0\")";    //热点
                break;

            case "report":    //数据上报
                var reportsw = new T_SYS_DICTSW();
                reportsw.DICTTYPEID = "5";
                reportsw.DICTVALUE  = Request.Params["TID"];
                var reportmodel = T_SYS_DICTCls.getModel(reportsw);
                ViewBag.loadFunc = "getReport(\"" + Request.Params["TID"] + "\",\"0\",\"" + reportmodel.DICTNAME + "\")";    //1 火情 2 病虫害 3 盗砍盗伐  //第一个参数是数据类型 第二个参数是处理状态
                break;

            case "collect":    //数据采集
                var sw = new T_SYS_DICTSW();
                sw.DICTTYPEID = "4";
                sw.DICTVALUE  = Request.Params["TID"];
                var model = T_SYS_DICTCls.getModel(sw);
                ViewBag.loadFunc = "getCollect(\"" + Request.Params["TID"] + "\",\"0\",\"" + model.DICTNAME + "\")";    //第一个参数是数据类型 第二个参数是处理状态 第三个参数名字
                break;

            default:
                ViewBag.loadFunc = "getLonLat(\"\")";
                break;
            }
            string TID = Request.Params["TID"];

            if (method == "report")//上报
            {
                var sw = new T_SYS_DICTSW();
                sw.DICTTYPEID = "5";
                sw.DICTVALUE  = TID;
                var model = T_SYS_DICTCls.getModel(sw);
                if (TID.Length == 1)
                {
                    pubViewBag("00200" + TID, "00200" + TID, model.DICTNAME);
                }
                else if (TID.Length == 2)
                {
                    pubViewBag("0020" + TID, "0020" + TID, model.DICTNAME);
                }
                else
                {
                    pubViewBag("002" + TID, "002" + TID, model.DICTNAME);
                }
            }
            else if (method == "collect")//采集
            {
                var sw = new T_SYS_DICTSW();
                sw.DICTTYPEID = "4";
                sw.DICTVALUE  = TID;
                var model = T_SYS_DICTCls.getModel(sw);
                if (TID.Length == 1)
                {
                    pubViewBag("00300" + TID, "00300" + TID, model.DICTNAME);
                }
                else if (TID.Length == 2)
                {
                    pubViewBag("0030" + TID, "0030" + TID, model.DICTNAME);
                }
                else
                {
                    pubViewBag("003" + TID, "003" + TID, model.DICTNAME);
                }
            }
            else if (method == "dm")
            {
                pubViewBag("001002", "001002", "点名管理");
            }
            else if (method == "dl")
            {
                pubViewBag("001005", "001005", "电量查询");
            }
            else if (method == "hot")
            {
                pubViewBag("001003", "001003", "热点追踪");
            }
            else if (method == "alarm")
            {
                pubViewBag("001004", "001004", "报警管理");
            }
            else
            {
                pubViewBag("001001", "001001", "巡查监控");
            }
            ViewBag.Method = Request.Params["Method"];       //类别方法 用于GIS页面
            ViewBag.TID    = Request.Params["TID"];          //类别ID
            return(View());
        }