Skip to content

Commit d31d809

Browse files
committed
Add views and assets for user, health, finance, location and crontab pages
1 parent c497a67 commit d31d809

7 files changed

Lines changed: 287 additions & 71 deletions

File tree

priv/assets/css/location.css

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
/*------------------------------------------------------------------
2+
* 轨迹回放页面专用样式
3+
* Created: 2025-04-27
4+
* 用于轨迹回放页面的专用样式
5+
-------------------------------------------------------------------*/
6+
7+
/* 覆盖基本模板中的内容容器样式 */
8+
#body .content {
9+
padding: 0;
10+
margin: 0;
11+
height: auto;
12+
overflow: visible;
13+
}
14+
15+
#body .content .container {
16+
max-width: 100%;
17+
padding: 0;
18+
margin: 0;
19+
height: calc(100vh - 150px);
20+
position: relative;
21+
margin-top: 56px;
22+
margin-bottom: 60px;
23+
}
24+
25+
/* 页脚样式 */
26+
#footer {
27+
height: 60px;
28+
bottom: 12px;
29+
text-align: center;
30+
background-color: transparent;
31+
border-top: none;
32+
}
33+
34+
/* 地图容器样式 */
35+
#mapContainer {
36+
width: 100%;
37+
height: 100%;
38+
position: relative;
39+
}
40+
41+
/* 确保用户信息下拉菜单显示在最顶层 */
42+
.dropdown-menu, .nav-dropdown, .dropdown-menu-end {
43+
z-index: 9999 !important;
44+
position: relative;
45+
}
46+
47+
/* 查询面板样式 */
48+
.location-query-panel {
49+
border: none;
50+
border-radius: 0.5rem;
51+
box-shadow: 0 4px 16px rgba(33, 150, 243, 0.1);
52+
overflow: hidden;
53+
position: absolute;
54+
top: 15px;
55+
right: 10px;
56+
z-index: 900;
57+
width: 300px;
58+
background-color: rgba(255, 255, 255, 0.2);
59+
backdrop-filter: blur(3px);
60+
}
61+
62+
.location-query-panel .card-body {
63+
padding: 1rem;
64+
background-color: transparent;
65+
}
66+
67+
.location-query-panel .form-label {
68+
font-weight: 500;
69+
color: #444;
70+
margin-bottom: 0.5rem;
71+
display: block;
72+
}
73+
74+
.location-query-panel .form-control {
75+
width: 100%;
76+
padding: 0.5rem 0.75rem;
77+
border: 1px solid #e3e3e3;
78+
border-radius: 0.375rem;
79+
background-color: #fff;
80+
color: #444;
81+
font-size: 0.95rem;
82+
transition: border-color 0.2s ease, box-shadow 0.2s ease;
83+
height: calc(2.25rem + 2px);
84+
}
85+
86+
.location-query-panel .form-control:focus {
87+
border-color: #2196F3;
88+
outline: none;
89+
box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
90+
}
91+
92+
.location-query-panel .form-control::placeholder {
93+
color: #aaa;
94+
opacity: 0.7;
95+
}
96+
97+
/* 按钮样式 */
98+
.location-query-panel .button-group {
99+
display: flex;
100+
justify-content: space-between;
101+
gap: 0.25rem;
102+
margin-top: 1rem;
103+
}
104+
105+
.location-query-panel .btn {
106+
flex: 1;
107+
padding: 0.5rem 0.25rem;
108+
border-radius: 0.25rem;
109+
font-weight: 500;
110+
transition: all 0.2s ease;
111+
text-align: center;
112+
white-space: nowrap;
113+
}
114+
115+
/* 地图卡片样式 */
116+
.location-map-panel {
117+
border: none;
118+
border-radius: 0;
119+
box-shadow: none;
120+
margin: 0;
121+
overflow: hidden;
122+
position: absolute;
123+
top: 0;
124+
left: 0;
125+
right: 0;
126+
bottom: 0;
127+
width: 100%;
128+
height: 100%;
129+
}
130+
131+
.location-map-panel .card-body {
132+
padding: 0;
133+
height: 100%;
134+
width: 100%;
135+
}
136+
137+
/* 响应式调整 */
138+
@media (max-width: 768px) {
139+
.location-query-panel {
140+
width: 250px;
141+
}
142+
143+
.location-query-panel .button-group {
144+
flex-wrap: wrap;
145+
gap: 0.25rem;
146+
}
147+
148+
.location-query-panel .btn {
149+
flex: 1 0 calc(50% - 0.125rem);
150+
margin-bottom: 0.25rem;
151+
padding: 0.375rem 0.25rem;
152+
font-size: 0.75rem;
153+
}
154+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*!
2+
*
3+
* @author wangcw
4+
* @copyright (C) 2025, REDGREAT
5+
* Created : 2025-04-27
6+
*
7+
* Module : location-responsive.js
8+
* 处理地图响应式布局
9+
*
10+
*/
11+
12+
$(document).ready(function() {
13+
// 检测侧边栏状态
14+
function checkSidebarStatus() {
15+
// 检查侧边栏是否展开
16+
if ($('.sidebar').hasClass('expanded') || $('.sidebar').css('width') !== '0px') {
17+
$('body').addClass('sidebar-open');
18+
} else {
19+
$('body').removeClass('sidebar-open');
20+
}
21+
}
22+
23+
// 初始检查
24+
checkSidebarStatus();
25+
26+
// 监听窗口大小变化
27+
$(window).resize(function() {
28+
checkSidebarStatus();
29+
});
30+
31+
// 监听侧边栏切换按钮点击
32+
$('.sidebar-toggle, .sidebar-close').on('click', function() {
33+
// 延迟执行以确保侧边栏状态已更新
34+
setTimeout(checkSidebarStatus, 50);
35+
});
36+
37+
// 调整地图容器大小以适应页面
38+
function adjustMapContainer() {
39+
const headerHeight = $('header').outerHeight() || 56;
40+
const footerHeight = $('footer').outerHeight() || 0;
41+
42+
$('.map-wrapper').css({
43+
'top': headerHeight + 'px',
44+
'bottom': footerHeight + 'px'
45+
});
46+
47+
// 触发地图重绘
48+
if (window.AMap && window.mapwong) {
49+
window.mapwong.resize();
50+
}
51+
}
52+
53+
// 初始调整
54+
adjustMapContainer();
55+
56+
// 监听窗口大小变化时调整地图
57+
$(window).resize(function() {
58+
adjustMapContainer();
59+
});
60+
});

src/views/eadm_crontab.dtl

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,52 @@
55
{% block css %}
66
<link href="/assets/vendor/datetimepicker/datetimepicker.min.css" rel="stylesheet">
77
<link href="/assets/vendor/datatables/datatables.min.css" rel="stylesheet">
8+
<link href="/assets/css/common-panels.css" rel="stylesheet">
89
{% endblock %}
910
{% block content %}
1011

11-
<div class="containter">
12-
<div class="card">
12+
<div class="container">
13+
<div class="page-title">
14+
<div class="row d-flex justify-content-between">
15+
<div class="col-8">
16+
</div>
17+
<div class="col-4">
18+
<button type="button" id="refreshCron" class="btn btn-sm btn-outline-primary float-end mb-2">
19+
<i class="fas fa-redo-alt"></i> 刷新
20+
</button>
21+
<button type="button" id="addCron" class="btn btn-sm btn-outline-primary float-end mb-2 me-1" data-bs-toggle="modal" data-bs-target="#modal-cron-add">
22+
<i class="fas fa-plus-circle"></i> 新增
23+
</button>
24+
</div>
25+
</div>
26+
</div>
27+
<div class="card query-panel">
28+
<div class="card-header">
29+
</div>
1330
<div class="card-body">
14-
<div class="row">
15-
<div class="col-4">
16-
<div class="row-4 mt-0 mb-0">
17-
<label for="cronname">任务名称</label>
18-
<input id="cronname" type="text">
31+
<form id="crontab-search-form">
32+
<div class="row align-items-end">
33+
<div class="col-md-6 col-sm-6 mb-3">
34+
<div class="form-group">
35+
<label for="cronname" class="form-label">任务名称</label>
36+
<input id="cronname" type="text" class="form-control" placeholder="输入任务名称">
37+
</div>
1938
</div>
20-
</div>
21-
<div class="col-8">
22-
<div class="row-8 d-flex justify-content-end">
23-
<button class="btn btn-outline-success me-1" id="addCron"
24-
data-bs-toggle="modal" data-bs-target="#modal-cron-add">
25-
<i class="fa-fw select-all fas"></i> 新增
26-
</button>
27-
<button class="btn btn-outline-success me-1" id="refreshCron">
28-
<i class="fa-fw select-all fas"></i> 刷新
29-
</button>
30-
<button class="btn btn-outline-success me-1" id="cleanCron">
31-
<i class="fa-fw select-all fas"></i> 清空
32-
</button>
33-
<button class="btn btn-outline-success me-1" id="searchCron">
34-
<i class="fa-fw select-all fas"></i> 查询
35-
</button>
39+
<div class="col-md-6 col-sm-6 mb-3 text-end">
40+
<div class="form-group button-group">
41+
<button type="button" class="btn btn-light" id="cleanCron">
42+
<i class="fas fa-eraser"></i> 清空
43+
</button>
44+
<button type="button" class="btn btn-primary" id="searchCron">
45+
<i class="fas fa-search"></i> 查询
46+
</button>
47+
</div>
3648
</div>
3749
</div>
38-
</div>
50+
</form>
3951
</div>
4052
</div>
41-
<div class="card">
53+
<div class="card data-panel">
4254
<div class="card-body">
4355
<table class="table table-hover" id="table-cron" width="100%"></table>
4456
</div>
@@ -99,7 +111,7 @@
99111
</div>
100112
<div class="modal-body">
101113
<div class="container">
102-
<div class="card">
114+
<div class="card data-panel">
103115
<div class="card-body">
104116
<table class="table table-hover" id="table-cron-detail" width="100%"></table>
105117
</div>

src/views/eadm_finance.dtl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<div class="page-title">
1414
<div class="row d-flex justify-content-between">
1515
<div class="col-8">
16-
<h5 class="card-title mb-0">财务数据查询</h5>
1716
</div>
1817
<div class="col-4">
1918
<button type="button" id="refresh-finance-btn" class="btn btn-sm btn-outline-primary float-end mb-2">
@@ -30,7 +29,6 @@
3029
</div>
3130
<div class="card query-panel">
3231
<div class="card-header">
33-
<h5 class="card-title mb-0">查询条件</h5>
3432
</div>
3533
<div class="card-body">
3634
<form id="finance-search-form">

src/views/eadm_health.dtl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<div class="page-title">
1313
<div class="row d-flex justify-content-between">
1414
<div class="col-8">
15-
<h5 class="card-title mb-0">健康数据查询</h5>
1615
</div>
1716
<div class="col-4">
1817
<button type="button" id="refresh-health-btn" class="btn btn-sm btn-outline-primary float-end mb-2">
@@ -26,7 +25,6 @@
2625
</div>
2726
<div class="card query-panel">
2827
<div class="card-header">
29-
<h5 class="card-title mb-0">查询条件</h5>
3028
</div>
3129
<div class="card-body">
3230
<form id="health-search-form">

0 commit comments

Comments
 (0)