Commit f79d562b6e0d81c75f6f62b70069952a9667f5e6
Merge branch 'dev' of http://172.16.29.40:8010/MES/IOT into dev
Showing
9 changed files
with
66 additions
and
26 deletions
web/WebMvc/Areas/configure/Views/BaseProject/ProjectOverview.cshtml
... | ... | @@ -14,8 +14,6 @@ |
14 | 14 | .head-project-title {height: 10vh;text-align: center;line-height: 10vh;font-size:30px;padding-left: 6vh;} |
15 | 15 | .head-project-route {display: flex;width: 20%;justify-content: flex-end;align-items: center;} |
16 | 16 | |
17 | - | |
18 | - | |
19 | 17 | .divcontent { |
20 | 18 | display: flex; |
21 | 19 | height: 100%; |
... | ... | @@ -59,9 +57,7 @@ |
59 | 57 | .iconfont { |
60 | 58 | font-size: 42px; |
61 | 59 | } |
62 | - </style> | |
63 | - | |
64 | - | |
60 | + </style> | |
65 | 61 | } |
66 | 62 | |
67 | 63 | |
... | ... | @@ -79,7 +75,7 @@ |
79 | 75 | <div class="head-project-title">{{head.projectName}}</div> |
80 | 76 | </div> |
81 | 77 | <div class="head-project-route"> |
82 | - <a href="/equipment/BaseEquipment/IndexProjectAndEq?flag=project" class="sys-a-det">切换到设备列表</a> | |
78 | + <a data-scr="/equipment/BaseEquipment/IndexProjectAndEq" href="" class="sys-a-det">切换到设备列表</a> | |
83 | 79 | </div> |
84 | 80 | </div> |
85 | 81 | </div> |
... | ... |
web/WebMvc/Areas/equipment/Views/BaseEquipment/IndexProjectAndEq.cshtml
... | ... | @@ -134,10 +134,14 @@ |
134 | 134 | <div class="layui-btn-container"> |
135 | 135 | <a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-mini" lay-event="btnSelect"><i class="layui-icon"></i>检索</a> |
136 | 136 | <a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-mini" lay-event="btnRefresh"><i class="layui-icon"></i>刷新</a> |
137 | - {{ loadMenus("BaseEquipment", 2) }} | |
138 | 137 | </div> |
139 | 138 | </script> |
140 | 139 | |
140 | +<script type="text/html" id="barDemo"> | |
141 | + <a class="layui-btn layui-btn-xs" lay-event="EqDescTableRowEvent">查看</a> | |
142 | + <a class="layui-btn layui-btn-xs" lay-event="EqeqmaintainTableRowEvent">维保记录</a> | |
143 | +</script> | |
144 | + | |
141 | 145 | @section Scripts |
142 | 146 | { |
143 | 147 | <script type="text/javascript" src="/productjs/equipment/BaseEquipment.js" asp-append-version="true"></script> |
... | ... |
web/WebMvc/Areas/equipment/Views/BaseEquipment/ProjectMapEqDescIndex.cshtml
... | ... | @@ -9,11 +9,11 @@ |
9 | 9 | } |
10 | 10 | <span class="layui-breadcrumb" lay-separator=">" lay-filter="projectMap" style="visibility: visible;"> |
11 | 11 | <a href="/configure/BaseProject/ProjectOverview">项目概述</a> |
12 | - <a href="/equipment/BaseEquipment/IndexProjectAndEq?flag=project">设备列表</a> | |
12 | + <a href="/equipment/BaseEquipment/IndexProjectAndEq">设备列表</a> | |
13 | 13 | <a href="/equipment/BaseEquipment/ProjectMapEqDescIndex">设备可视化</a> |
14 | 14 | </span> |
15 | 15 | <br /> |
16 | -wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww | |
16 | +设备可视化待实现 | |
17 | 17 | |
18 | 18 | |
19 | 19 | @section Scripts |
... | ... |
web/WebMvc/wwwroot/baseJs/login.js
... | ... | @@ -97,6 +97,9 @@ layui.config({ base: "/js/" }).use(["form", "layer", "element"], function () { |
97 | 97 | if (data.Code === 200) { |
98 | 98 | localStorage.setItem("Account", data.Result.Account); |
99 | 99 | localStorage.setItem("Name", data.Result.Name); |
100 | + | |
101 | + localStorage.removeItem("projectMapKeys"); | |
102 | + localStorage.removeItem("projectMapName"); | |
100 | 103 | window.location.href = "/Home/Index"; |
101 | 104 | } else { |
102 | 105 | layer.msg(data.Message, { time: 4000 }); |
... | ... |
web/WebMvc/wwwroot/baseJs/projectMap.js
... | ... | @@ -71,6 +71,9 @@ layui.config({ |
71 | 71 | mapMarkerClick(item) { |
72 | 72 | var url = `/configure/BaseProject/ProjectOverview?id=${item.id}&keys=${item.keys}&projectName=${item.projectName}`; |
73 | 73 | var urlHtml = $(`<a title="项目概述" data-url="${url}"><i class="layui-icon" data-icon=""></i><cite>项目概述</cite></a>`) |
74 | + | |
75 | + localStorage.setItem("projectMapKeys", item.keys); | |
76 | + localStorage.setItem("projectMapName", item.projectName); | |
74 | 77 | window.top.tab.tabAdd(urlHtml); |
75 | 78 | }, |
76 | 79 | /** |
... | ... |
web/WebMvc/wwwroot/js/system.js
... | ... | @@ -2065,6 +2065,13 @@ layui.define(importFileName, function (exports) { |
2065 | 2065 | window.open("/htmlTemp/pdf.html?" + url, "pdf预览"); |
2066 | 2066 | } |
2067 | 2067 | |
2068 | + /** | |
2069 | + * 获取父页面元素 | |
2070 | + */ | |
2071 | + u.prototype.getParentElemId = function (id) { | |
2072 | + return window.parent.document.getElementById(id); | |
2073 | + } | |
2074 | + | |
2068 | 2075 | /*btn |
2069 | 2076 | * action 是对应引入js 全局变量配置 |
2070 | 2077 | */ |
... | ... |
web/WebMvc/wwwroot/productjs/configure/BaseProject.js
... | ... | @@ -127,6 +127,13 @@ layui.config({ |
127 | 127 | sysU.ajax(ajaxConfig); |
128 | 128 | } |
129 | 129 | }, |
130 | + //项目客户信息链接 | |
131 | + btnLink: function (sU, toolbarId, obj) { | |
132 | + //var url = `/configure/BaseClientInfo/Index`; | |
133 | + //var urlHtml = $(`<a title="项目客户信息" data-url="${url}"><i class="layui-icon" data-icon=""></i><cite>项目客户信息</cite></a>`) | |
134 | + //window.top.tab.tabAdd(urlHtml); | |
135 | + sU.getParentElemId("BaseClientInfo").click(); | |
136 | + }, | |
130 | 137 | //所有动作成功之后 |
131 | 138 | actionSuccess: (flag) => { |
132 | 139 | sysU.refreshTable(app, sysU, null, flag); |
... | ... |
web/WebMvc/wwwroot/productjs/configure/ProjectOverview.js
... | ... | @@ -13,7 +13,6 @@ layui.config({ |
13 | 13 | sendDataDescWhere = null, |
14 | 14 | areaName = "configure", |
15 | 15 | controllerName = "BaseProject", |
16 | - projectId = 0, | |
17 | 16 | projectKeys = null, |
18 | 17 | projectName="", |
19 | 18 | app = null; |
... | ... | @@ -55,18 +54,22 @@ layui.config({ |
55 | 54 | }, |
56 | 55 | |
57 | 56 | getUrlParam: function () { |
58 | - projectId = "".GetUrlParam("id"); | |
59 | - projectKeys = "".GetUrlParam("keys"); | |
60 | - projectName = "".GetUrlParam("projectName"); | |
57 | + projectKeys = localStorage.getItem("projectMapKeys"); | |
58 | + projectName = localStorage.getItem("projectMapName"); | |
61 | 59 | }, |
60 | + init: function () { | |
61 | + var tempElem = $(".sys-a-det"); | |
62 | + tempElem.attr("href", tempElem.data("scr") + `?projectKeys=${projectKeys}`) | |
63 | + } | |
62 | 64 | }, |
63 | 65 | registerEvent: function () { |
64 | - | |
66 | + | |
65 | 67 | }, |
66 | 68 | init: function () { |
67 | 69 | debugger |
68 | 70 | app.methods.getUrlParam(); |
69 | 71 | app.methods.initVue(); |
72 | + app.methods.init(); | |
70 | 73 | } |
71 | 74 | }; |
72 | 75 | app.init(); |
... | ... |
web/WebMvc/wwwroot/productjs/equipment/BaseEquipment.js
... | ... | @@ -206,38 +206,47 @@ layui.config({ |
206 | 206 | selectFactoryOpt.factoryCode.Where["factorySelectWhere"] = data.value; |
207 | 207 | sysU.initSelect(selectFactoryOpt); |
208 | 208 | }, |
209 | - btnEqDesc: function (sU, toolbarId, obj) { | |
209 | + EqDescTableRowEvent: function (sU, toolbarId, obj) { | |
210 | 210 | window.open("/equipment/BaseEquipment/ProjectMapEqDescIndex","_self"); |
211 | 211 | }, |
212 | + EqeqmaintainTableRowEvent: function (sU, toolbarId, obj) { | |
213 | + window.open("/equipment/BaseEquipment/ProjectMapEqDescIndex", "_self"); | |
214 | + }, | |
215 | + //关联设备链接 | |
216 | + btnBindEquipment: function (sU, toolbarId, obj) { | |
217 | + sU.getParentElemId("BaseSim").click(); | |
218 | + }, | |
212 | 219 | } |
213 | 220 | |
214 | 221 | app = { |
215 | 222 | data: { |
216 | 223 | cols: [[ |
217 | - { checkbox: true, fixed: true }, | |
218 | 224 | { field: "id", width: 80, hide: true, title: "Id" }, |
219 | 225 | { field: "projectKeys", width: 150, title: "项目keys", hide: true, }, |
220 | 226 | { field: "projectName", width: 150, title: "项目" }, |
221 | 227 | /*{ field: "factoryCode", width: 150, title: "厂房编码" },*/ |
222 | 228 | |
223 | - { field: "equipmentCode", width: 150, title: "设备编码" }, | |
229 | + { field: "equipmentCode", width: 120, title: "设备编码"}, | |
224 | 230 | { field: "equipmentName", width: 150, title: "设备名称" }, |
225 | 231 | { field: "equipmentTypeCode", width: 150, title: "设备类型编码", hide: true }, |
226 | - { field: "name", width: 150, title: "设备类型" }, | |
232 | + { field: "name", width: 120, title: "设备类型" }, | |
227 | 233 | { field: "equipmentMaintainRuleCode", width: 150, title: "维护规则" }, |
234 | + | |
235 | + { field: "equipmentStatus", width: 150, title: "状态" }, | |
228 | 236 | { field: "simNumber", width: 150, title: "SIM卡号" }, |
229 | 237 | { field: "startTime", width: 150, title: "出厂时间" }, |
230 | 238 | |
231 | 239 | { field: "imgSrc", width: 150, title: "图片" }, |
232 | - { field: "ip", width: 150, title: "IP" }, | |
233 | - { field: "destinationArea", width: 150, title: "所在区域" }, | |
234 | - { field: "remark", width: 150, title: "描述" }, | |
235 | - { field: "isEnable", width: 150, title: "是否启用", templet: '#isSysEnableTemplet' }, | |
240 | + { field: "ip", width: 150, title: "IP", hide: true, }, | |
241 | + { field: "destinationArea", width: 150, title: "区域", hide: true,}, | |
242 | + { field: "remark", width: 150, title: "描述", hide: true, }, | |
243 | + { field: "isEnable", width: 100, title: "启用", templet: '#isSysEnableTemplet' }, | |
236 | 244 | |
237 | 245 | { field: "createTime", width: 150, title: "createTime" }, |
238 | 246 | { field: "createBy", width: 150, title: "createBy" }, |
239 | - { field: "updateTime", width: 150, title: "updateTime" }, | |
240 | - { field: "updateBy", width: 150, title: "updateBy" }, | |
247 | + | |
248 | + { field: "updateTime", width: 150, title: "updateTime", hide: true, }, | |
249 | + { field: "updateBy", width: 150, title: "updateBy", hide: true, }, | |
241 | 250 | ]], |
242 | 251 | colsDesc: null, |
243 | 252 | tableIns: null, |
... | ... | @@ -274,6 +283,14 @@ layui.config({ |
274 | 283 | initTable: function (opt) { |
275 | 284 | var config = {}; |
276 | 285 | if (opt != undefined) $.extend(config, opt); |
286 | + //项目地图跳转过来的 | |
287 | + var flag = $(".layui-breadcrumb"); | |
288 | + if (flag.length >0) { | |
289 | + config["projectKeys"] = localStorage.getItem("projectMapKeys"); | |
290 | + app.data.cols[0].push({ fixed: 'right', title: '操作', width: 150, toolbar: '#barDemo' }); | |
291 | + } else { | |
292 | + app.data.cols[0].unshift({ checkbox: true, fixed: true }); | |
293 | + } | |
277 | 294 | let options = { |
278 | 295 | elem: "#" + app.data.tableElem, |
279 | 296 | url: `/${areaName}/${controllerName}/Load`, |
... | ... | @@ -285,8 +302,7 @@ layui.config({ |
285 | 302 | |
286 | 303 | } |
287 | 304 | } |
288 | - //项目地图跳转过来的 | |
289 | - var flag = $(".layui-breadcrumb"); | |
305 | + | |
290 | 306 | if (flag.length > 0) { |
291 | 307 | options["height"] = "full-25" |
292 | 308 | } |
... | ... | @@ -304,6 +320,7 @@ layui.config({ |
304 | 320 | |
305 | 321 | }, |
306 | 322 | init: function () { |
323 | + debugger | |
307 | 324 | //var sendDataWhere = form.val("listForm") |
308 | 325 | app.methods.initTable(); |
309 | 326 | app.methods.initFrom(); |
... | ... |