diff --git a/web/WebMvc/Areas/configure/Views/BaseProject/ProjectOverview.cshtml b/web/WebMvc/Areas/configure/Views/BaseProject/ProjectOverview.cshtml index 136c894..ec0dabd 100644 --- a/web/WebMvc/Areas/configure/Views/BaseProject/ProjectOverview.cshtml +++ b/web/WebMvc/Areas/configure/Views/BaseProject/ProjectOverview.cshtml @@ -14,8 +14,6 @@ .head-project-title {height: 10vh;text-align: center;line-height: 10vh;font-size:30px;padding-left: 6vh;} .head-project-route {display: flex;width: 20%;justify-content: flex-end;align-items: center;} - - .divcontent { display: flex; height: 100%; @@ -59,9 +57,7 @@ .iconfont { font-size: 42px; } - </style> - - + </style> } @@ -79,7 +75,7 @@ <div class="head-project-title">{{head.projectName}}</div> </div> <div class="head-project-route"> - <a href="/equipment/BaseEquipment/IndexProjectAndEq?flag=project" class="sys-a-det">切换到设备列表</a> + <a data-scr="/equipment/BaseEquipment/IndexProjectAndEq" href="" class="sys-a-det">切换到设备列表</a> </div> </div> </div> diff --git a/web/WebMvc/Areas/equipment/Views/BaseEquipment/IndexProjectAndEq.cshtml b/web/WebMvc/Areas/equipment/Views/BaseEquipment/IndexProjectAndEq.cshtml index d360d4e..e3f9cec 100644 --- a/web/WebMvc/Areas/equipment/Views/BaseEquipment/IndexProjectAndEq.cshtml +++ b/web/WebMvc/Areas/equipment/Views/BaseEquipment/IndexProjectAndEq.cshtml @@ -134,10 +134,14 @@ <div class="layui-btn-container"> <a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-mini" lay-event="btnSelect"><i class="layui-icon"></i>检索</a> <a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-mini" lay-event="btnRefresh"><i class="layui-icon"></i>刷新</a> - {{ loadMenus("BaseEquipment", 2) }} </div> </script> +<script type="text/html" id="barDemo"> + <a class="layui-btn layui-btn-xs" lay-event="EqDescTableRowEvent">查看</a> + <a class="layui-btn layui-btn-xs" lay-event="EqeqmaintainTableRowEvent">维保记录</a> +</script> + @section Scripts { <script type="text/javascript" src="/productjs/equipment/BaseEquipment.js" asp-append-version="true"></script> diff --git a/web/WebMvc/Areas/equipment/Views/BaseEquipment/ProjectMapEqDescIndex.cshtml b/web/WebMvc/Areas/equipment/Views/BaseEquipment/ProjectMapEqDescIndex.cshtml index 591a2c5..4ffaedd 100644 --- a/web/WebMvc/Areas/equipment/Views/BaseEquipment/ProjectMapEqDescIndex.cshtml +++ b/web/WebMvc/Areas/equipment/Views/BaseEquipment/ProjectMapEqDescIndex.cshtml @@ -9,11 +9,11 @@ } <span class="layui-breadcrumb" lay-separator=">" lay-filter="projectMap" style="visibility: visible;"> <a href="/configure/BaseProject/ProjectOverview">项目概述</a> - <a href="/equipment/BaseEquipment/IndexProjectAndEq?flag=project">设备列表</a> + <a href="/equipment/BaseEquipment/IndexProjectAndEq">设备列表</a> <a href="/equipment/BaseEquipment/ProjectMapEqDescIndex">设备可视化</a> </span> <br /> -wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww +设备可视化待实现 @section Scripts diff --git a/web/WebMvc/wwwroot/baseJs/login.js b/web/WebMvc/wwwroot/baseJs/login.js index 1097529..94405ec 100644 --- a/web/WebMvc/wwwroot/baseJs/login.js +++ b/web/WebMvc/wwwroot/baseJs/login.js @@ -97,6 +97,9 @@ layui.config({ base: "/js/" }).use(["form", "layer", "element"], function () { if (data.Code === 200) { localStorage.setItem("Account", data.Result.Account); localStorage.setItem("Name", data.Result.Name); + + localStorage.removeItem("projectMapKeys"); + localStorage.removeItem("projectMapName"); window.location.href = "/Home/Index"; } else { layer.msg(data.Message, { time: 4000 }); diff --git a/web/WebMvc/wwwroot/baseJs/projectMap.js b/web/WebMvc/wwwroot/baseJs/projectMap.js index 49edb7f..fa1cc8a 100644 --- a/web/WebMvc/wwwroot/baseJs/projectMap.js +++ b/web/WebMvc/wwwroot/baseJs/projectMap.js @@ -71,6 +71,9 @@ layui.config({ mapMarkerClick(item) { var url = `/configure/BaseProject/ProjectOverview?id=${item.id}&keys=${item.keys}&projectName=${item.projectName}`; var urlHtml = $(`<a title="项目概述" data-url="${url}"><i class="layui-icon" data-icon=""></i><cite>项目概述</cite></a>`) + + localStorage.setItem("projectMapKeys", item.keys); + localStorage.setItem("projectMapName", item.projectName); window.top.tab.tabAdd(urlHtml); }, /** diff --git a/web/WebMvc/wwwroot/js/system.js b/web/WebMvc/wwwroot/js/system.js index 5e01aeb..733303a 100644 --- a/web/WebMvc/wwwroot/js/system.js +++ b/web/WebMvc/wwwroot/js/system.js @@ -2065,6 +2065,13 @@ layui.define(importFileName, function (exports) { window.open("/htmlTemp/pdf.html?" + url, "pdf预览"); } + /** + * 获取父页面元素 + */ + u.prototype.getParentElemId = function (id) { + return window.parent.document.getElementById(id); + } + /*btn * action 是对应引入js 全局变量配置 */ diff --git a/web/WebMvc/wwwroot/productjs/configure/BaseProject.js b/web/WebMvc/wwwroot/productjs/configure/BaseProject.js index 4a0a6a2..d929e70 100644 --- a/web/WebMvc/wwwroot/productjs/configure/BaseProject.js +++ b/web/WebMvc/wwwroot/productjs/configure/BaseProject.js @@ -127,6 +127,13 @@ layui.config({ sysU.ajax(ajaxConfig); } }, + //项目客户信息链接 + btnLink: function (sU, toolbarId, obj) { + //var url = `/configure/BaseClientInfo/Index`; + //var urlHtml = $(`<a title="项目客户信息" data-url="${url}"><i class="layui-icon" data-icon=""></i><cite>项目客户信息</cite></a>`) + //window.top.tab.tabAdd(urlHtml); + sU.getParentElemId("BaseClientInfo").click(); + }, //所有动作成功之后 actionSuccess: (flag) => { sysU.refreshTable(app, sysU, null, flag); diff --git a/web/WebMvc/wwwroot/productjs/configure/ProjectOverview.js b/web/WebMvc/wwwroot/productjs/configure/ProjectOverview.js index 8d6d22f..8319ad2 100644 --- a/web/WebMvc/wwwroot/productjs/configure/ProjectOverview.js +++ b/web/WebMvc/wwwroot/productjs/configure/ProjectOverview.js @@ -13,7 +13,6 @@ layui.config({ sendDataDescWhere = null, areaName = "configure", controllerName = "BaseProject", - projectId = 0, projectKeys = null, projectName="", app = null; @@ -55,18 +54,22 @@ layui.config({ }, getUrlParam: function () { - projectId = "".GetUrlParam("id"); - projectKeys = "".GetUrlParam("keys"); - projectName = "".GetUrlParam("projectName"); + projectKeys = localStorage.getItem("projectMapKeys"); + projectName = localStorage.getItem("projectMapName"); }, + init: function () { + var tempElem = $(".sys-a-det"); + tempElem.attr("href", tempElem.data("scr") + `?projectKeys=${projectKeys}`) + } }, registerEvent: function () { - + }, init: function () { debugger app.methods.getUrlParam(); app.methods.initVue(); + app.methods.init(); } }; app.init(); diff --git a/web/WebMvc/wwwroot/productjs/equipment/BaseEquipment.js b/web/WebMvc/wwwroot/productjs/equipment/BaseEquipment.js index aa7be08..7d985dc 100644 --- a/web/WebMvc/wwwroot/productjs/equipment/BaseEquipment.js +++ b/web/WebMvc/wwwroot/productjs/equipment/BaseEquipment.js @@ -206,38 +206,47 @@ layui.config({ selectFactoryOpt.factoryCode.Where["factorySelectWhere"] = data.value; sysU.initSelect(selectFactoryOpt); }, - btnEqDesc: function (sU, toolbarId, obj) { + EqDescTableRowEvent: function (sU, toolbarId, obj) { window.open("/equipment/BaseEquipment/ProjectMapEqDescIndex","_self"); }, + EqeqmaintainTableRowEvent: function (sU, toolbarId, obj) { + window.open("/equipment/BaseEquipment/ProjectMapEqDescIndex", "_self"); + }, + //关联设备链接 + btnBindEquipment: function (sU, toolbarId, obj) { + sU.getParentElemId("BaseSim").click(); + }, } app = { data: { cols: [[ - { checkbox: true, fixed: true }, { field: "id", width: 80, hide: true, title: "Id" }, { field: "projectKeys", width: 150, title: "项目keys", hide: true, }, { field: "projectName", width: 150, title: "项目" }, /*{ field: "factoryCode", width: 150, title: "厂房编码" },*/ - { field: "equipmentCode", width: 150, title: "设备编码" }, + { field: "equipmentCode", width: 120, title: "设备编码"}, { field: "equipmentName", width: 150, title: "设备名称" }, { field: "equipmentTypeCode", width: 150, title: "设备类型编码", hide: true }, - { field: "name", width: 150, title: "设备类型" }, + { field: "name", width: 120, title: "设备类型" }, { field: "equipmentMaintainRuleCode", width: 150, title: "维护规则" }, + + { field: "equipmentStatus", width: 150, title: "状态" }, { field: "simNumber", width: 150, title: "SIM卡号" }, { field: "startTime", width: 150, title: "出厂时间" }, { field: "imgSrc", width: 150, title: "图片" }, - { field: "ip", width: 150, title: "IP" }, - { field: "destinationArea", width: 150, title: "所在区域" }, - { field: "remark", width: 150, title: "描述" }, - { field: "isEnable", width: 150, title: "是否启用", templet: '#isSysEnableTemplet' }, + { field: "ip", width: 150, title: "IP", hide: true, }, + { field: "destinationArea", width: 150, title: "区域", hide: true,}, + { field: "remark", width: 150, title: "描述", hide: true, }, + { field: "isEnable", width: 100, title: "启用", templet: '#isSysEnableTemplet' }, { field: "createTime", width: 150, title: "createTime" }, { field: "createBy", width: 150, title: "createBy" }, - { field: "updateTime", width: 150, title: "updateTime" }, - { field: "updateBy", width: 150, title: "updateBy" }, + + { field: "updateTime", width: 150, title: "updateTime", hide: true, }, + { field: "updateBy", width: 150, title: "updateBy", hide: true, }, ]], colsDesc: null, tableIns: null, @@ -274,6 +283,14 @@ layui.config({ initTable: function (opt) { var config = {}; if (opt != undefined) $.extend(config, opt); + //项目地图跳转过来的 + var flag = $(".layui-breadcrumb"); + if (flag.length >0) { + config["projectKeys"] = localStorage.getItem("projectMapKeys"); + app.data.cols[0].push({ fixed: 'right', title: '操作', width: 150, toolbar: '#barDemo' }); + } else { + app.data.cols[0].unshift({ checkbox: true, fixed: true }); + } let options = { elem: "#" + app.data.tableElem, url: `/${areaName}/${controllerName}/Load`, @@ -285,8 +302,7 @@ layui.config({ } } - //项目地图跳转过来的 - var flag = $(".layui-breadcrumb"); + if (flag.length > 0) { options["height"] = "full-25" } @@ -304,6 +320,7 @@ layui.config({ }, init: function () { + debugger //var sendDataWhere = form.val("listForm") app.methods.initTable(); app.methods.initFrom();