Commit 3d42c02d0812f0964aef552e1b25db4768f4dd28

Authored by HuXiYu
2 parents 0f6de2b4 7e897300

--

sys/Hh.Mes.POJO/WebEntity/EntityExtension/Extension.cs
... ... @@ -157,12 +157,35 @@ namespace Hh.Mes.POJO.Entity
157 157 }
158 158  
159 159  
160   - public partial class base_project {
161   -
  160 + public partial class base_project
  161 + {
162 162 /// <summary>
163 163 /// projectMapList 读取项目对应设备信息
164 164 /// </summary>
165 165 [SugarColumn(IsIgnore = true)]
  166 + public string falg { get; set; }
  167 +
  168 + /// <summary>
  169 + /// 设备总数
  170 + /// </summary>
  171 + [SugarColumn(IsIgnore = true)]
  172 + public int eqCount { get; set; }
  173 +
  174 + /// <summary>
  175 + /// 设备在线
  176 + /// </summary>
  177 + [SugarColumn(IsIgnore = true)]
  178 + public int eqOnLine { get; set; }
  179 +
  180 + /// <summary>
  181 + /// 设备待机
  182 + /// </summary>
  183 + [SugarColumn(IsIgnore = true)]
  184 + public int eqOff { get; set; }
  185 +
  186 + //设备故障
  187 + [SugarColumn(IsIgnore = true)]
  188 + public int eqAlarm { get; set; }
166 189 public string flag { get; set; }
167 190 }
168 191 }
... ...
sys/Hh.Mes.POJO/WebEntity/configure/base_project.cs
... ... @@ -4,7 +4,7 @@ using SqlSugar;
4 4 namespace Hh.Mes.POJO.Entity
5 5 {
6 6 [SugarTable("base_project")]
7   - public partial class base_project
  7 + public partial class base_project:base_entity
8 8 {
9 9 /// <summary>
10 10 /// 主键
... ...
sys/Hh.Mes.Service/WebService/Configure/BaseProjectService.cs
... ... @@ -18,6 +18,7 @@ using Hh.Mes.Common.config;
18 18 using Microsoft.AspNetCore.Hosting;
19 19 using MySqlX.XDevAPI.Common;
20 20 using System.Security.Claims;
  21 +using NPOI.SS.Formula.Functions;
21 22  
22 23 namespace Hh.Mes.Service.Configure
23 24 {
... ... @@ -31,6 +32,11 @@ namespace Hh.Mes.Service.Configure
31 32 var expression = LinqWhere(entity);
32 33 //先组合查询表达式
33 34 var query = Context.Queryable<base_project>().Where(expression);
  35 + if (entity.falg == "projectMapList")
  36 + {
  37 + result.Result = query.ToList();
  38 + return result;
  39 + }
34 40 //Exel为ture就不分页,因为导出的话是全部导出
35 41 if (pageReq != null)
36 42 {
... ... @@ -39,7 +45,7 @@ namespace Hh.Mes.Service.Configure
39 45 result.Count = total;
40 46 return result;
41 47 }
42   - if (entity.flag == "projectMapList")
  48 + if (entity.falg == "projectMapList")
43 49 {
44 50 result.Result = new
45 51 {
... ...
web/WebMvc/Areas/configure/Views/SysCompany/Index.cshtml deleted
1   -@{ Layout = "~/Views/Shared/_Layout.cshtml"; }
2   -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
3   -@section header
4   -{
5   -
6   -}
7   -
8   -<div id="listForm" class="layui-tab-item layui-show">
9   - <form class="layui-form layui-form-pane" action="" lay-filter="listForm">
10   - <table id="mainList" lay-filter="mainList"></table>
11   - </form>
12   -</div>
13   -
14   -<div id="modifyForm" class="layui-tab-item">
15   - <form class="layui-form layui-form-pane" action="" lay-filter="modifyForm" onsubmit="return false;">
16   - <div class="layui-card">
17   - <div class="layui-row">
18   -
19   - <div class="layui-col-sm6">
20   - <label class="layui-form-label layui-col-sm3">公司名称<label class="lable-required">*</label></label>
21   - <div class="layui-input-inline layui-col-sm6">
22   - <input name="name" type="text" lay-verify="required" class="layui-input">
23   - </div>
24   - </div>
25   - <div class="layui-col-sm6">
26   - <label class="layui-form-label layui-col-sm3">地址</label>
27   - <div class="layui-input-inline layui-col-sm6">
28   - <input name="address" type="text" maxlength="50" class="layui-input">
29   - </div>
30   - </div>
31   - <div class="layui-col-sm6">
32   - <label class="layui-form-label layui-col-sm3">联系电话</label>
33   - <div class="layui-input-inline layui-col-sm6">
34   - <input name="telephone" type="text" class="layui-input NumText">
35   - </div>
36   - </div>
37   - <div class="layui-col-sm6">
38   - <label class="layui-form-label layui-col-sm3">版本</label>
39   - <div class="layui-input-inline layui-col-sm6">
40   - <input name="ver" type="text" maxlength="50" class="layui-input">
41   - </div>
42   - </div>
43   - <!--表单验证按钮-->
44   - <button class="layui-btn" style="display:none" name="fromAdd" lay-filter="fromAdd" lay-submit>fromAdd</button>
45   - <button class="layui-btn" style="display:none" name="fromUpdate" lay-filter="fromUpdate" lay-submit>fromUpdate</button>
46   - </div>
47   - </div>
48   - <div hidden>
49   - <input name="companyId" readonly type="text" class="layui-input">
50   - <input name="fileId" readonly type="text" class="layui-input">
51   - <input name="isDelete" readonly type="text" class="layui-input">
52   -
53   - <input name="createBy" type="text" readonly class="layui-input">
54   - <input name="createTime" type="text" readonly class="layui-input">
55   - <input name="updateTime" type="text" readonly class="layui-input">
56   - <input name="updateBy" type="text" readonly class="layui-input">
57   - </div>
58   - </form>
59   -</div>
60   -
61   -
62   -<div id="ImportData" style="padding: 60px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;display: none;">
63   - <div>
64   - <div>
65   - <label>图片位置:</label>
66   - <select name="position" id="position">
67   - <option value="home">首页</option>
68   - <option value="login">登入页</option>
69   - </select>
70   - </div>
71   - <br />
72   - <input type="file" name="excelfile" id="excelfile" accept="image/gif, image/jpeg, image/png">
73   - </div>
74   -</div>
75   -
76   -<script type="text/html" id="toolbarTable">
77   - <div class="layui-btn-container">
78   - <a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-mini" lay-event="btnSelect"><i class="layui-icon">&#xe628;</i>检索</a>
79   - <a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-mini" lay-event="btnRefresh"><i class="layui-icon">&#xe9aa;</i>刷新</a>
80   - {{ loadMenus("SysCompany", 1) }}
81   - </div>
82   -</script>
83   -
84   -@section Scripts
85   -{
86   - <script type="text/javascript" src="/productjs/configure/SysCompany.js" asp-append-version="true"></script>
87   -}
88 0 \ No newline at end of file
web/WebMvc/wwwroot/baseJs/projectMap.js
... ... @@ -31,24 +31,24 @@ layui.config({
31 31  
32 32 getProjectData() {
33 33 var ajaxConfig = {
34   - data: null,
  34 + data: { pageRequest: null, entity: { falg:"projectMapList" } },
35 35 url: `/configure/BaseProject/Load`,
36 36 success: function (result) {
37 37 if (sysU.successBefore(result)) return false;
38   - app.methods.createMarkerInfo(result.Result)
  38 + app.methods.createMarkerInfo(result)
39 39 }
40 40 };
41 41 sysU.ajax(ajaxConfig);
42 42 },
43 43 createMarkerInfo(json) {
44   - json.forEach(item => {
45   - var content = `<h4 style = 'margin:0;'>${item.projectAddress}</h4><br/>
46   - 这里是显示项目信息
  44 + json.Result.forEach(item => {
  45 + var content = `<h4 style = 'margin:0;'>${item.projectAddress}</h4>
  46 + 设备总数:${item.eqCount}、在线:${item.eqOnLine}、待机:${item.eqOff}、故障:<span style='color:red;'>${item.eqAlarm}</span>
47 47 <div style = 'display: flex;' >
48 48 <div><a style='text-decoration: underline;color: blue;' onclick='app.methods.mapMarkerClick(${JSON.stringify(item)})' href='#'>点击链接</a></div>
49 49 </div >` ;//定义大标题 写html语句标签
50 50 mapObj.createMarkerInfo(content, {
51   - title: item.projectName,
  51 + title: "项目名称:"+item.projectName,
52 52 longitude: item.longitude,
53 53 latitude: item.latitude
54 54 });
... ...