From cee7c6d6fe76ea03d1fb6c07916d2cb1ec2d8817 Mon Sep 17 00:00:00 2001
From: zmk <496160012@qq.com>
Date: 星期一, 27 五月 2024 18:08:41 +0800
Subject: [PATCH] 提交代码
---
javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java | 18 ++++++++++++++++++
javaweb-plus/javaweb-admin/src/main/resources/templates/main.html | 23 +++++++++++++++++++++--
2 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java b/javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java
index ff59cd9..95c76b1 100644
--- a/javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java
+++ b/javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java
@@ -12,8 +12,10 @@
import com.javaweb.geo.domain.Hole;
import com.javaweb.geo.domain.HoleMedia;
import com.javaweb.geo.domain.Project;
+import com.javaweb.geo.domain.TubLog;
import com.javaweb.geo.enums.RecordType;
import com.javaweb.geo.mapper.HoleMapper;
+import com.javaweb.geo.mapper.TubLogMapper;
import com.javaweb.geo.service.IHoleMediaService;
import com.javaweb.geo.service.IHoleService;
import com.javaweb.geo.service.IProjectService;
@@ -60,6 +62,10 @@
@Autowired
private IHoleMediaService holeMediaService;
+
+ @Autowired
+ private TubLogMapper tubLogMapper;
+
private String getAdminIndex() {
return configService.selectConfigByKey(CmsConstants.KEY_ADMIN_INDEX);
@@ -240,5 +246,17 @@
return AjaxResult.success("鏌ヨ鎴愬姛",result);
}
+ /**
+ * 缁熻鏉愭枡鐨勬秷鑰�
+ * @return
+ */
+ @ResponseBody
+ @GetMapping("/system/tubLogData")
+ public AjaxResult tubLogData() {
+ AjaxResult ajaxResult = new AjaxResult();
+ List<TubLog> tubLogs = tubLogMapper.countTubLogDate();
+ ajaxResult.put("tubLogs",tubLogs);
+ return ajaxResult;
+ }
}
diff --git a/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html b/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
index b63b3bc..f9af9eb 100644
--- a/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
+++ b/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
@@ -14,6 +14,9 @@
width: 100%;
background-color: rgba(0,0,0,0.01) !important;
}
+ body{
+ padding: 10px;
+ }
[v-cloak]{
display: none;
}
@@ -191,9 +194,15 @@
<el-row>
<el-col :span="16">
<el-card class="box-card">
- <div style="height: 200px;">
+ <div>
<h3>鏉愭枡缁熻</h3>
+
+ <el-col :span="10" style="height: 200px;">
+ </el-col>
+ <el-col :span="14" style="height: 200px;">
+ </el-col>
</div>
+
</el-card>
<el-card class="box-card" style="margin-top: 4px;">
@@ -272,12 +281,21 @@
totalProcess();
stationProcess();
indexCount();
+ tubLogs();
})
function viewStation(station) {
var lng = station.lng;
var lat = station.lat;
map.centerAndZoom(new T.LngLat(lng, lat), 13);
- // $.modal.openTab("鍦哄湴瀵艰埅",ctx+"/geo/project/navigate?ids="+id);
+ }
+
+ function tubLogs() {
+ let url = ctx + "/system/tubLogData";
+ $.ajaxSettings.async = false;
+ $.get(url,{},function(res){
+ vm.tubLogData = res.tubLogData;
+ })
+ $.ajaxSettings.async = false;
}
function indexCount() {
@@ -305,6 +323,7 @@
return {
stationProcessData: [],
indexDataCount :"",
+ tubLogData:[],
};
},
methods: {
--
Gitblit v1.9.1