From 4640dc7ce69ed3ca79b84ad739750c35e7e7be5e Mon Sep 17 00:00:00 2001
From: zmk <496160012@qq.com>
Date: 星期二, 28 五月 2024 17:17:05 +0800
Subject: [PATCH] Merge branch 'master' of ssh://117.78.1.188:29418/dkyChenJiang
---
javaweb-plus/javaweb-admin/src/main/resources/static/css/skins.css | 6
javaweb-plus/javaweb-admin/src/main/resources/static/img/logo.png | 0
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java | 6
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java | 2
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java | 4
javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java | 2
javaweb-plus/javaweb-admin/src/main/resources/templates/index.html | 11 +
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html | 129 ++++++++++++++++++++++++-
javaweb-plus/javaweb-admin/src/main/resources/static/images/logo.png | 0
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml | 18 +++
javaweb-plus/javaweb-admin/src/main/resources/templates/main.html | 117 +++++++++++++++++-----
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java | 2
12 files changed, 246 insertions(+), 51 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 27f5aee..ff28937 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
@@ -252,7 +252,7 @@
@GetMapping("/system/stat/tubLogData")
public AjaxResult tubLogData() {
AjaxResult ajaxResult = new AjaxResult();
- List<TubLog> tubLogs = tubLogMapper.countTubLogDate();
+ List<TubLog> tubLogs = tubLogMapper.countTubLogDate(null);
ajaxResult.put("tubLogs",tubLogs);
return ajaxResult;
}
diff --git a/javaweb-plus/javaweb-admin/src/main/resources/static/css/skins.css b/javaweb-plus/javaweb-admin/src/main/resources/static/css/skins.css
index 306c930..c0c0755 100644
--- a/javaweb-plus/javaweb-admin/src/main/resources/static/css/skins.css
+++ b/javaweb-plus/javaweb-admin/src/main/resources/static/css/skins.css
@@ -791,7 +791,8 @@
}
.theme-dark .nav>li.active {
- background: #293846;
+ /*background: #293846;*/
+ background: rgb(44, 46, 68);
}
.theme-dark .navbar-static-side {
@@ -804,7 +805,8 @@
.theme-dark .navbar-default .nav>li>a:hover,
.theme-dark .navbar-default .nav>li>a:focus {
- background: #293846;
+ background: rgba(24,144,255,.85);
+ /*background: #293846;*/
}
/** 娴呰壊涓婚 theme-light **/
diff --git a/javaweb-plus/javaweb-admin/src/main/resources/static/images/logo.png b/javaweb-plus/javaweb-admin/src/main/resources/static/images/logo.png
new file mode 100644
index 0000000..c95fbc4
--- /dev/null
+++ b/javaweb-plus/javaweb-admin/src/main/resources/static/images/logo.png
Binary files differ
diff --git a/javaweb-plus/javaweb-admin/src/main/resources/static/img/logo.png b/javaweb-plus/javaweb-admin/src/main/resources/static/img/logo.png
new file mode 100644
index 0000000..c95fbc4
--- /dev/null
+++ b/javaweb-plus/javaweb-admin/src/main/resources/static/img/logo.png
Binary files differ
diff --git a/javaweb-plus/javaweb-admin/src/main/resources/templates/index.html b/javaweb-plus/javaweb-admin/src/main/resources/templates/index.html
index 2dfe104..69714d7 100644
--- a/javaweb-plus/javaweb-admin/src/main/resources/templates/index.html
+++ b/javaweb-plus/javaweb-admin/src/main/resources/templates/index.html
@@ -28,9 +28,12 @@
<div class="sidebar-collapse">
<ul class="nav" id="side-menu">
<a th:href="@{/index}">
- <li class="logo">
- <span class="logo-lg" >閽绘帰宸ョ▼骞冲彴</span>
- </li>
+<!-- <li class="logo">-->
+<!-- <span class="logo-lg" >閽绘帰宸ョ▼骞冲彴</span>-->
+<!-- </li>-->
+ <li style="margin: 36px auto;text-align: center">
+ <img th:src="@{/images/logo.png}">
+ </li>
</a>
<!-- <li>-->
@@ -230,7 +233,7 @@
th:src="@{/system/main}" frameborder="0" seamless></iframe>
</div>
<div class="footer">
- <div class="pull-right">Copyright 漏 2022.宸ョ▼鍕樺療鍦拌川淇℃伅鏌ヨ鏈嶅姟骞冲彴 All Rights Reserved. Powered by. 浜琁CP澶�</div>
+ <div class="pull-right">Copyright 漏 2024.閽绘帰宸ョ▼淇℃伅鍖栫郴缁� All Rights Reserved. Powered by. 浜琁CP澶�</div>
</div>
</div>
<!--鍙充晶閮ㄥ垎缁撴潫-->
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 7fec47c..119fd49 100644
--- a/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
+++ b/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
@@ -85,7 +85,7 @@
padding: 0 40px;
align-content: center;
}
- .ilblock span{
+ .ilblock>span{
display: block;
line-height: 30px;
}
@@ -150,19 +150,18 @@
</div>
<div style="flex:6;" class="ilblock">
- <span style="color:rgba(0,0,0,.65);font-size: 15px;">
+ <span style="color:rgba(0,0,0,.87);font-size: 15px;">
鍗忚皟涓�
- <span style="float: right">
- {{indexDataCount.projectStatus0}}
- </span>
+ <span style="float: right">{{indexDataCount.projectStatus0}}</span>
<!-- <li class="el-icon-caret-bottom" style="color: #f56c6c">-->
+
</span>
- <span style="color:rgba(0,0,0,.65);font-size: 15px;">
+ <span style="color:rgba(0,0,0,.87);font-size: 15px;">
寰呭紑宸�
<span style="float: right">{{indexDataCount.projectStatus1}}</span>
<!-- <li class="el-icon-caret-bottom" style="color: #e6a23c">-->
</span>
- <span style="color:rgba(0,0,0,.65);font-size: 15px;">
+ <span style="color:rgba(0,0,0,.87);font-size: 15px;">
杩涜涓�
<span style="float: right">{{indexDataCount.projectStatus2}}</span>
<!-- <li class="el-icon-caret-top" style="color: #409eff">-->
@@ -186,11 +185,11 @@
</div>
<div style="flex:6;" class="ilblock">
- <span style="color:rgba(0,0,0,.65);font-size: 15px;">
+ <span style="color:rgba(0,0,0,.87);font-size: 15px;">
鎬昏繘灏� <span style="float: right">{{indexDataCount.footageCount}}m</span>
<!-- <li class="el-icon-caret-bottom" style="color: #f56c6c">-->
</span>
- <span style="color:rgba(0,0,0,.65);font-size: 15px;">
+ <span style="color:rgba(0,0,0,.87);font-size: 15px;">
宸插畬鎴� <span style="float: right">{{indexDataCount.footageCplCount}}m</span>
<!-- <li class="el-icon-caret-bottom" style="color: #409eff">-->
</span>
@@ -215,11 +214,11 @@
<div>
</div>
- <span style="color:rgba(0,0,0,.65);font-size: 15px;">
+ <span style="color:rgba(0,0,0,.87);font-size: 15px;">
宸插畨瑁� <span style="float: right">0</span>
<!-- <li class="el-icon-caret-bottom" style="color: #f56c6c">-->
</span>
- <span style="color:rgba(0,0,0,.65);font-size: 15px;">
+ <span style="color:rgba(0,0,0,.87);font-size: 15px;">
鏈畨瑁� <span style="float: right">68</span>
<!-- <li class="el-icon-caret-bottom" style="color: #409eff">-->
</span>
@@ -241,15 +240,15 @@
</div>
<div style="flex:6;" class="ilblock">
- <span style="color:rgba(0,0,0,.65);font-size: 15px;">
+ <span style="color:rgba(0,0,0,.87);font-size: 15px;">
鏂藉伐璧勬枡 <span style="float: right">0</span>
<!-- <li class="el-icon-caret-bottom" style="color: #f56c6c">-->
</span>
- <span style="color:rgba(0,0,0,.65);font-size: 15px;">
+ <span style="color:rgba(0,0,0,.87);font-size: 15px;">
瀹夊叏璧勬枡 <span style="float: right">0</span>
<!-- <li class="el-icon-caret-bottom" style="color: #409eff">-->
</span>
- <span style="color:rgba(0,0,0,.65);font-size: 15px;">
+ <span style="color:rgba(0,0,0,.87);font-size: 15px;">
璐ㄩ噺璧勬枡 <span style="float: right">0</span>
<!-- <li class="el-icon-caret-bottom" style="color: #409eff">-->
</span>
@@ -264,26 +263,29 @@
<div style="height: 200px;width: 100%;">
<h3>鏉愭枡缁熻</h3>
<el-col :span="10" style="height: 200px;">
- <template>
- <el-table :data="tubLogs" border size="small" style="width: 100%"
- :header-cell-style="{color: '#4D4D4D',background: '#F7931E',fontWeight: '400'}"
- :row-class-name="tableRowClassName">
-<!-- <el-table-column prop="code" label="搴忓彿"></el-table-column>-->
- <el-table-column prop="tubName" label="鍚嶇О"></el-table-column>
- <el-table-column prop="inboundNumber" label="鍏ュ簱鏁伴噺"></el-table-column>
- <el-table-column prop="outboundNumber" label="鍑哄簱鏁伴噺"></el-table-column>
- <el-table-column prop="unit" label="鍗曚綅"></el-table-column>
+ <div style="margin-top: 15px">
+ <template>
+ <el-table :data="tubLogs" border size="small" style="width: 100%"
+ :header-cell-style="{color: '#4D4D4D',background: '#F7931E',fontWeight: '400'}"
+ :row-class-name="tableRowClassName">
+ <!-- <el-table-column prop="code" label="搴忓彿"></el-table-column>-->
+ <el-table-column prop="tubName" label="鍚嶇О"></el-table-column>
+ <el-table-column prop="inboundNumber" label="鍏ュ簱鏁伴噺"></el-table-column>
+ <el-table-column prop="outboundNumber" label="鍑哄簱鏁伴噺"></el-table-column>
+ <el-table-column prop="unit" label="鍗曚綅"></el-table-column>
- </el-table>
- </template>
+ </el-table>
+ </template>
+ </div>
</el-col>
<el-col :span="14" style="height: 200px;">
+ <div id="column-chart" style="height: 180px; width: 100%;"></div>
</el-col>
</div>
</el-card>
<el-card class="box-card" style="margin-top: 20px;">
- <div id="map_div" style="width: 100%;height: 550px;"></div>
+ <div id="map_div" style="width: 100%;height: 550px;margin-top: -5px"></div>
</el-card>
</el-col>
@@ -371,13 +373,72 @@
}
function tubLogs() {
+
+ const chart = echarts.init(document.getElementById("column-chart"));
+ const option = {
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow'
+ }
+ },
+ legend: {},
+ grid: {
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ xAxis: [
+ {
+ type: 'category',
+ data: []
+ }
+ ],
+ yAxis: [
+ {
+ type: 'value'
+ }
+ ],
+ series: [
+ {
+ name: '鍑哄簱',
+ type: 'bar',
+ emphasis: {
+ focus: 'series'
+ },
+ data: []
+ },
+ {
+ name: '鍏ュ簱',
+ type: 'bar',
+ stack: 'Ad',
+ emphasis: {
+ focus: 'series'
+ },
+ data: []
+ },
+
+ ]
+ };
+
let url = ctx + "/system/stat/tubLogData";
$.ajaxSettings.async = false;
$.get(url,{},function(res){
vm.tubLogs = res.tubLogs;
+
+ res.tubLogs.forEach(function(value, index, array) {
+ const tubName = value.tubName;
+ const inboundNumber = value.inboundNumber;
+ const outboundNumber = value.outboundNumber;
+ const unit = value.unit;
+ option.xAxis[0].data[index] = tubName;
+ option.series[0].data[index] = outboundNumber;
+ option.series[1].data[index] = inboundNumber;
+ });
+ chart.setOption(option, true);
})
$.ajaxSettings.async = false;
- console.log(vm.tubLogs);
}
//棣栭〉绗竴琛屼釜鏁扮粺璁�
@@ -398,8 +459,6 @@
vm.stationProcessData = res.projectData;
})
$.ajaxSettings.async = false;
- console.log(vm.stationProcessData);
-
}
var vm = new Vue({
el: "#app",
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java
index 2ae93e6..6695b35 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java
@@ -141,10 +141,10 @@
/**
* 缁熻
*/
- @GetMapping("/countTubLogDate")
+ @GetMapping("/countTubLogDate/{projectId}")
@ResponseBody
- public AjaxResult countTubLogDate() {
- return tubLogService.countTubLogDate();
+ public AjaxResult countTubLogDate(@PathVariable("projectId") String projectId) {
+ return tubLogService.countTubLogDate(projectId);
}
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java
index 2aa702e..8f33224 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java
@@ -70,5 +70,5 @@
/**
* 缁熻
*/
- List<TubLog> countTubLogDate();
+ List<TubLog> countTubLogDate(@Param("projectId") String projectId);
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java
index 3a51560..dd8a9ef 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java
@@ -76,5 +76,5 @@
/**
* 缁熻
*/
- AjaxResult countTubLogDate();
+ AjaxResult countTubLogDate(String projectId);
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java
index 9d153f2..f7de5ef 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java
@@ -111,8 +111,8 @@
* 缁熻
*/
@Override
- public AjaxResult countTubLogDate() {
- List<TubLog> list = tubLogMapper.countTubLogDate();
+ public AjaxResult countTubLogDate(String projectId) {
+ List<TubLog> list = tubLogMapper.countTubLogDate(projectId);
return AjaxResult.success("鏌ヨ鎴愬姛锛�",list);
}
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml
index 7410116..650f94b 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml
+++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml
@@ -52,7 +52,7 @@
SELECT MAX(id) FROM js_tub_log where project_id = #{projectId}
</select>
- <select id="countTubLogDate" resultMap="TubLogResult">
+ <select id="countTubLogDate2" resultMap="TubLogResult">
SELECT
a.tub_name,
b.inbound_number,
@@ -63,6 +63,22 @@
LEFT JOIN ( SELECT tub_name, SUM( number ) AS inbound_number, unit FROM js_tub_log WHERE inbound_date IS NOT NULL GROUP BY tub_name ) b ON a.tub_name = b.tub_name
</select>
+ <select id="countTubLogDate" resultMap="TubLogResult">
+ SELECT
+ a.project_id,
+ a.tub_name,
+ b.inbound_number,
+ a.outbound_number,
+ a.unit
+ FROM
+ ( SELECT project_id, tub_name, SUM( number ) AS outbound_number, unit FROM js_tub_log WHERE outbound_date IS NOT NULL GROUP BY tub_name ) a
+ LEFT JOIN ( SELECT project_id, tub_name, SUM( number ) AS inbound_number, unit FROM js_tub_log WHERE inbound_date IS NOT NULL GROUP BY tub_name ) b ON a.tub_name = b.tub_name
+ AND a.project_id = b.project_id
+ <where>
+ <if test="projectId != null and projectId != ''"> and a.project_id = #{projectId}</if>
+ </where>
+ </select>
+
<insert id="insertTubLog" parameterType="TubLog" useGeneratedKeys="true" keyProperty="id">
insert into js_tub_log
<trim prefix="(" suffix=")" suffixOverrides=",">
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html
index dcd8d16..15c7106 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html
@@ -161,11 +161,49 @@
</el-row>
<el-row style="height: 200px;">
<el-col :span="24">
- <el-card class="box-card card-green" style="height: 320px;margin-top: 20px">
- <div slot="header" class="clearfix">
- <span>鏉愭枡淇℃伅</span>
- </div>
+
+ <el-card class="box-card card-green" style="height: 320px;margin-top: 20px">
+ <div slot="header" class="clearfix">
+ <span>鏉愭枡缁熻</span>
+ </div>
+ <el-col :span="10" style="height: 320px;">
+ <template>
+ <el-table :data="tubLogs" border size="small" style="width: 100%"
+ :header-cell-style="{color: '#4D4D4D',background: '#F7931E',fontWeight: '400'}"
+ :row-class-name="tableRowClassName">
+ <el-table-column prop="tubName" label="鍚嶇О"></el-table-column>
+ <el-table-column prop="inboundNumber" label="鍏ュ簱鏁伴噺"></el-table-column>
+ <el-table-column prop="outboundNumber" label="鍑哄簱鏁伴噺"></el-table-column>
+ <el-table-column prop="unit" label="鍗曚綅"></el-table-column>
+ </el-table>
+ </template>
+ </el-col>
+ <el-col :span="14" style="height: 320px;">
+ <div id="column-chart" style="height: 250px; width: 100%;"></div>
+ </el-col>
</el-card>
+<!-- <el-card class="box-card card-green" style="height: 320px;margin-top: 20px">-->
+<!-- <div slot="header" class="clearfix">-->
+<!-- <span>鏉愭枡淇℃伅</span>-->
+<!-- </div>-->
+<!-- <div>-->
+<!-- <template>-->
+<!-- <el-table :data="tubLogs" border size="small" style="width: 100%"-->
+<!-- :header-cell-style="{color: '#4D4D4D',background: '#F7931E',fontWeight: '400'}"-->
+<!-- :row-class-name="tableRowClassName">-->
+<!-- <!– <el-table-column prop="code" label="搴忓彿"></el-table-column>–>-->
+<!-- <el-table-column prop="tubName" label="鍚嶇О"></el-table-column>-->
+<!-- <el-table-column prop="inboundNumber" label="鍏ュ簱鏁伴噺"></el-table-column>-->
+<!-- <el-table-column prop="outboundNumber" label="鍑哄簱鏁伴噺"></el-table-column>-->
+<!-- <el-table-column prop="unit" label="鍗曚綅"></el-table-column>-->
+
+<!-- </el-table>-->
+<!-- </template>-->
+<!-- </div>-->
+<!-- </el-card>-->
+
+
+
</el-col>
</el-row>
@@ -173,12 +211,14 @@
<th:block th:include="include :: footer" />
+ <script th:src="@{/ajax/libs/report/echarts/echarts-all.js}"></script>
<script th:inline="javascript">
var project =[[${project}]];
var projectId=[[${projectId}]];
var statusDatas = [[${@dict.getType('hole_status')}]];
var prefix = ctx + "geo/hole";
+ var prefix2 = ctx + "geo/TubLog";
$(function() {
var url = prefix + "/holelist?projectId=" + projectId;
@@ -187,10 +227,77 @@
vm.holeData = res.data;
});
vm.project = project;
-
- console.log(vm.project);
- console.log(vm.holeData);
+ tubLogs();
});
+
+ function tubLogs() {
+ const chart = echarts.init(document.getElementById("column-chart"));
+ const option = {
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow'
+ }
+ },
+ legend: {},
+ grid: {
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ xAxis: [
+ {
+ type: 'category',
+ data: []
+ }
+ ],
+ yAxis: [
+ {
+ type: 'value'
+ }
+ ],
+ series: [
+ {
+ name: '鍑哄簱',
+ type: 'bar',
+ emphasis: {
+ focus: 'series'
+ },
+ data: []
+ },
+ {
+ name: '鍏ュ簱',
+ type: 'bar',
+ stack: 'Ad',
+ emphasis: {
+ focus: 'series'
+ },
+ data: []
+ },
+
+ ]
+ };
+
+ let url = prefix2 + "/countTubLogDate/" + projectId;
+ $.ajaxSettings.async = false;
+ $.get(url,{},function(res){
+ vm.tubLogs = res.data;
+
+ res.data.forEach(function(value, index, array) {
+ const tubName = value.tubName;
+ const inboundNumber = value.inboundNumber;
+ const outboundNumber = value.outboundNumber;
+ const unit = value.unit;
+ option.xAxis[0].data[index] = tubName;
+ option.series[0].data[index] = outboundNumber;
+ option.series[1].data[index] = inboundNumber;
+ });
+ chart.setOption(option, true);
+
+ })
+ $.ajaxSettings.async = false;
+ }
var vm = new Vue({
el: "#app",
@@ -198,9 +305,17 @@
return {
project: "",
holeData: [],
+ tubLogs:[],
};
},
methods: {
+ tableRowClassName({ row, rowIndex }) {
+ if (rowIndex % 2 == 0) {
+ return "";
+ } else {
+ return "warning-row";
+ }
+ },
}
});
--
Gitblit v1.9.1