-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.html
341 lines (297 loc) · 12.5 KB
/
home.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<meta name="generator" content="Hugo 0.88.1">
<title>用户主页</title>
<link rel="canonical" href="">
<!-- Bootstrap core CSS -->
<link href="assets/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<!-- Custom styles for this template -->
<link href="css/dashboard.css" rel="stylesheet">
</head>
<body>
<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow" id="app1">
<a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="#">用户:{{uname}}, ID: {{uid}}</a>
<button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<input class="form-control form-control-dark w-100" type="text" placeholder="搜索" aria-label="Search">
<div class="navbar-nav">
<div class="nav-item text-nowrap">
<a class="nav-link px-3" href="index.html" @click.prevent="signout">退出登录</a>
</div>
</div>
</header>
<div class="container-fluid">
<div class="row">
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
<div class="position-sticky pt-3">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">
<span data-feather="home"></span>
主页
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="user_projs.html">
<span data-feather="file"></span>
我的项目
</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="shopping-cart"></span>
Products
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="users"></span>
Customers
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="bar-chart-2"></span>
Reports
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="layers"></span>
Integrations
</a>
</li> -->
</ul>
<!-- <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Saved reports</span>
<a class="link-secondary" href="#" aria-label="Add a new report">
<span data-feather="plus-circle"></span>
</a>
</h6> -->
<!-- <ul class="nav flex-column mb-2">
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Current month
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Last quarter
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Social engagement
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Year-end sale
</a>
</li>
</ul> -->
</div>
</nav>
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
<div
class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">项目经费信息</h1>
<div class="btn-toolbar mb-2 mb-md-0">
<div class="me-2" id="app4">
<select class="form-select" v-model="selected" @change="dispRecords">
<option value="1">所有类别</option>
<option v-for="(item,key) in data" :key="key" :value="item.category_id">
{{item.category_name}}
</option>
</select>
</div>
<!-- <div class="btn-group me-2">
<button type="button" class="btn btn-sm btn-outline-secondary">分享</button>
<button type="button" class="btn btn-sm btn-outline-secondary">导出</button>
</div> -->
<button type="button" class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#modal1">
添加
</button>
<!-- 模态框 -->
<div class="modal fade" id="modal1">
<div class="modal-dialog">
<div class="modal-content">
<!-- 模态框头部 -->
<div class="modal-header">
<h4 class="modal-title">新增记录</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<form id="app3" @submit="submitRecord">
<!-- 模态框内容 -->
<div class="modal-body">
<div class="input-group mb-3">
<span class="input-group-text">费用</span>
<input type="text" class="form-control" v-model="fund_amount">
<span class="input-group-text">元</span>
</div>
<div class="input-group mb-3">
<span class="input-group-text">使用时间</span>
<input type="datetime-local" class="form-control" v-model="fund_date">
</div>
<div class="input-group mb-3">
<span class="input-group-text">用途</span>
<select class="form-select" v-model="selected_category">
<option v-for="(item,key) in categories" :key="key" :value="item.category_id">
{{item.category_name}}
</option>
</select>
</div>
<div class="input-group mb-3">
<span class="input-group-text">经办人</span>
<input type="text" class="form-control" v-model="fund_manager">
</div>
<div class="input-group">
<span class="input-group-text">项目</span>
<select class="form-select" v-model="selected_project">
<option v-for="(item,key) in projects" :key="key" :value="item.project_id">
{{item.project_name}}
</option>
</select>
</div>
</div>
<!-- 模态框底部 -->
<div class="modal-footer">
<button type="submit" class="btn btn-outline-danger">提交</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- <canvas class="my-4 w-100" id="myChart" width="900" height="380"></canvas> -->
<!-- <h2>项目经费信息</h2> -->
<div class="table-responsive" id="app2">
<table class="table table-striped table-sm">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">费用</th>
<th scope="col">使用时间</th>
<th scope="col">类别</th>
<th scope="col">经办人</th>
<th scope="col">审核</th>
<th scope="col">修改时间</th>
<th scope="col">项目</th>
<th scope="col">操作</th>
<th scope="col"> </th>
</tr>
</thead>
<tbody>
<tr v-for="(item,key) in data" :key="key">
<td id="fund_id">{{item.fund_id}}</td>
<td id="fund_amount">{{item.fund_amount}} 元</td>
<td id="fund_date">{{item.fund_date|timeFormat}}</td>
<td id="fund_category_id">{{item.fund_category_id|toCategoryName}}</td>
<td id="fund_manager">{{item.fund_manager}}</td>
<td id="fund_audit">{{item.fund_audit|toChinese}}</td>
<td>{{item.fund_change_date|timeFormat}}</td>
<td id="fund_proj_id">{{item.fund_proj_id|toProjName}}</td>
<td>
<a href="" class="text-primary" @click="changeRecord">
{{item.fund_audit|modifyLink}}
</a>
</td>
<td>
<a href="" class="text-danger" @click.prevent="deleteRecord">
{{item.fund_audit|delLink}}
</a>
</td>
</tr>
</tbody>
</table>
</div>
<!-- 模态框 -->
<div class="modal fade" id="modal2">
<div class="modal-dialog">
<div class="modal-content">
<!-- 模态框头部 -->
<div class="modal-header">
<h4 class="modal-title">修改记录</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<form @submit="modifyRecord">
<!-- 模态框内容 -->
<div class="modal-body">
<div class="input-group mb-3">
<span class="input-group-text">费用</span>
<input type="text" class="form-control" v-model="fund_amount">
<span class="input-group-text">元</span>
</div>
<div class="input-group mb-3">
<span class="input-group-text">使用时间</span>
<input type="datetime-local" class="form-control" v-model="fund_date">
</div>
<div class="input-group mb-3">
<span class="input-group-text">用途</span>
<select class="form-select" v-model="selected_category">
<option v-for="(item,key) in categories" :key="key" :value="item.category_id">
{{item.category_name}}
</option>
</select>
</div>
<div class="input-group mb-3">
<span class="input-group-text">经办人</span>
<input type="text" class="form-control" v-model="fund_manager">
</div>
<div class="input-group">
<span class="input-group-text">项目</span>
<select class="form-select" v-model="selected_project">
<option v-for="(item,key) in projects" :key="key" :value="item.project_id">
{{item.project_name}}
</option>
</select>
</div>
</div>
<!-- 模态框底部 -->
<div class="modal-footer">
<button type="submit" class="btn btn-outline-danger">提交</button>
</div>
</form>
</div>
</div>
</div>
</main>
</div>
</div>
<script src="assets/dist/js/bootstrap.bundle.min.js"></script>
<script src="js/feather.min.js"></script>
<script src="js/dashboard.js"></script>
<script src="js/vue.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/js.cookie.min.js"></script>
<script src="js/fms.js"></script>
<script src="js/public.js"></script>
<script src="js/home.js"></script>
</body>
</html>