Initial commit
This commit is contained in:
parent
dc5a8a456f
commit
d70a0f05e7
|
@ -29,7 +29,7 @@ namespace Parking_spaces.Controllers
|
|||
_httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(token);
|
||||
|
||||
// 构建 API 请求的 URL
|
||||
string apiUrl = "http://140.125.20.183:7700/Users/token";
|
||||
string apiUrl = "http://localhost:7700/Users/token";
|
||||
|
||||
// 调用需要身份验证的 API
|
||||
HttpResponseMessage response = await _httpClient.GetAsync(apiUrl);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://140.125.20.183:2361",
|
||||
"applicationUrl": "http://localhost:2361",
|
||||
"sslPort": 44352
|
||||
}
|
||||
},
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam",
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -105,7 +105,7 @@
|
|||
console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -127,7 +127,7 @@
|
|||
console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_violation_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_violation_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -238,7 +238,7 @@
|
|||
var stringify_obj = JSON.stringify(obj);
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam",
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam",
|
||||
//data: {test_id: test_id, test_date: test_date, test_time: test_time, test_analyst: test_analyst, img: img, data_creat_time: "2022-10-04T18:47:40.887014" },
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
|
@ -292,7 +292,7 @@
|
|||
var stringify_obj = JSON.stringify(obj);
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_pass",
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_pass",
|
||||
//data: {test_id: test_id, test_date: test_date, test_time: test_time, test_analyst: test_analyst, img: img, data_creat_time: "2022-10-04T18:47:40.887014" },
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
|
@ -350,7 +350,7 @@
|
|||
var stringify_obj = JSON.stringify(obj);
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam_ptz_pass",
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam_ptz_pass",
|
||||
//data: {test_id: test_id, test_date: test_date, test_time: test_time, test_analyst: test_analyst, img: img, data_creat_time: "2022-10-04T18:47:40.887014" },
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
|
@ -383,7 +383,7 @@
|
|||
var stringify_obj = JSON.stringify(obj);
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam_ptz_violation",
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam_ptz_violation",
|
||||
//data: {test_id: test_id, test_date: test_date, test_time: test_time, test_analyst: test_analyst, img: img, data_creat_time: "2022-10-04T18:47:40.887014" },
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
|
@ -431,7 +431,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -455,7 +455,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -471,7 +471,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
console.log(parking_spaces_name)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam/parking_spaces_name-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam/parking_spaces_name-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -123,7 +123,7 @@
|
|||
if (mode == "pass") {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam_ptz_pass/parking_spaces_name-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam_ptz_pass/parking_spaces_name-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -144,7 +144,7 @@
|
|||
if (mode == "car_num_check") {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam_ptz_car_num_check/parking_spaces_name-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam_ptz_car_num_check/parking_spaces_name-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -166,7 +166,7 @@
|
|||
if (mode == "violation") {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam_ptz_violation/parking_spaces_name-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam_ptz_violation/parking_spaces_name-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -193,7 +193,7 @@
|
|||
if (mode == "pass") {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_pass/" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_pass/" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -208,7 +208,7 @@
|
|||
if (mode == "car_num_check") {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_car_num_check/parking_spaces_name-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_car_num_check/parking_spaces_name-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -223,7 +223,7 @@
|
|||
if (mode == "violation") {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_violation/parking_spaces_name-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_violation/parking_spaces_name-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -371,7 +371,7 @@
|
|||
serial_num_choose = serial_num
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam_ptz_car_num_check/parking_spaces_name-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam_ptz_car_num_check/parking_spaces_name-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -568,7 +568,7 @@
|
|||
if (mode == "pass") {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_pass/" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_pass/" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -590,7 +590,7 @@
|
|||
if (mode == "car_num_check") {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_car_num_check/parking_spaces_name-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_car_num_check/parking_spaces_name-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -614,7 +614,7 @@
|
|||
console.log('violation')
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_violation/parking_spaces_name-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_violation/parking_spaces_name-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -646,7 +646,7 @@
|
|||
console.log(stringify_obj)
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_pass/" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_pass/" + parking_spaces_name,
|
||||
data: stringify_obj,
|
||||
|
||||
contentType: "application/json",
|
||||
|
@ -671,7 +671,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_car_num_check/parking_spaces_name-" + parking_spaces_name + "-serial_num-" + serial_num_choose.toString(),
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_car_num_check/parking_spaces_name-" + parking_spaces_name + "-serial_num-" + serial_num_choose.toString(),
|
||||
data: stringify_obj,
|
||||
|
||||
contentType: "application/json",
|
||||
|
@ -816,7 +816,7 @@
|
|||
console.log(stringify_obj)
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_car_num_check/",
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_car_num_check/",
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -835,7 +835,7 @@
|
|||
if (mode == "violation") {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_violation/parking_spaces_name-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_violation/parking_spaces_name-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -868,7 +868,7 @@
|
|||
console.log(stringify_obj)
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_violation/",
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_violation/",
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -950,7 +950,7 @@
|
|||
function put_violation_roi_1() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi/" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi/" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -978,7 +978,7 @@
|
|||
console.log(stringify_obj)
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi/" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi/" + parking_spaces_name,
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1051,7 +1051,7 @@
|
|||
if (mode == "violation") {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_violation/parking_spaces_name-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_violation/parking_spaces_name-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1084,7 +1084,7 @@
|
|||
console.log(stringify_obj)
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_violation/",
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_violation/",
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1166,7 +1166,7 @@
|
|||
if (mode == "pass") {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_pass/" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_pass/" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1196,7 +1196,7 @@
|
|||
console.log(stringify_obj)
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_pass/" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_pass/" + parking_spaces_name,
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1271,7 +1271,7 @@
|
|||
if (mode == "violation") {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_violation/parking_spaces_name-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_violation/parking_spaces_name-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1304,7 +1304,7 @@
|
|||
console.log(stringify_obj)
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_roi_violation/",
|
||||
url: "http://localhost:7700/api/Parking_spaces_roi_violation/",
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1332,7 +1332,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -1354,7 +1354,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -1370,7 +1370,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
var stringify_obj = JSON.stringify(obj);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://140.125.20.183:7700/api/El125_car_table",
|
||||
url: "http://localhost:7700/api/El125_car_table",
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -145,7 +145,7 @@
|
|||
function get_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/El125_car_table",
|
||||
url: "http://localhost:7700/api/El125_car_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -168,7 +168,7 @@
|
|||
function delet_data(license_plate_number) {
|
||||
$.ajax({
|
||||
type: "DELETE",
|
||||
url: "http://140.125.20.183:7700/api/El125_car_table/" + license_plate_number,
|
||||
url: "http://localhost:7700/api/El125_car_table/" + license_plate_number,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -193,7 +193,7 @@
|
|||
//console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -215,7 +215,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -231,7 +231,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -188,85 +188,71 @@
|
|||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<!-- 總車位與月租Excel 文件 及 校園車位信息 -->
|
||||
<style>
|
||||
.table th, .table td {
|
||||
text-align: center; /* 居中對齊 */
|
||||
}
|
||||
|
||||
<div class="row">
|
||||
<!--每日車流量-->
|
||||
.table th:nth-child(1), .table td:nth-child(1) {
|
||||
width: 200px; /* 根據需要調整寬度 */
|
||||
}
|
||||
|
||||
.table th:nth-child(2), .table td:nth-child(2) {
|
||||
width: 200px; /* 根據需要調整寬度 */
|
||||
}
|
||||
</style>
|
||||
<div class="col-xl-8 col-lg-8">
|
||||
<div class="card shadow mb-8">
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">
|
||||
每日車流量<button class="btn btn-info btn-circle btn-sm" style="float:right; background-image: url('/image/icon/F5.png'); background-size: cover;" onclick="get_in_yuntech_data_1()"></button>
|
||||
下載 總車位與月租Excel 文件 及 校園車位信息
|
||||
<button class="btn btn-info btn-circle btn-sm" style="float:right; background-image: url('/image/icon/F5.png'); background-size: cover;" onclick="get_yuntech_parking_data()"></button>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="chart-area">
|
||||
<canvas id="in_car_Bar"></canvas>
|
||||
<!-- 下載 Excel 文件按鈕 -->
|
||||
<div class="mb-3">
|
||||
<button class="btn btn-primary" onclick="downloadExcel()">下載 Excel</button>
|
||||
</div>
|
||||
|
||||
<!-- 校園總車位數量表格 -->
|
||||
<div>
|
||||
<h6 class="font-weight-bold text-primary">校園總車位數量</h6>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>總車位</th>
|
||||
<th>剩餘車位</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="parking_all_table">`
|
||||
<!-- 動態更新校園總車位與剩餘車位 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 校園當前車流量表格 -->
|
||||
<div>
|
||||
<h6 class="font-weight-bold text-primary">校園當前車流量</h6>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>類別</th>
|
||||
<th>數量</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="monthly_table">
|
||||
<!-- 動態更新月租與臨停車輛數據 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--校園總車位數量-->
|
||||
<div class="col-xl-4 col-lg-4">
|
||||
<div class="card shadow mb-4">
|
||||
<!-- Card Header - Dropdown -->
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">
|
||||
校園總車位數量<button class="btn btn-info btn-circle btn-sm" style="float:right; background-image: url('/image/icon/F5.png'); background-size: cover;" onclick="get_yuntech_parking_data()"></button>
|
||||
</h6>
|
||||
</div>
|
||||
<!-- Card Body -->
|
||||
<div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
總車位
|
||||
</th>
|
||||
<th>
|
||||
剩餘車位
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody id="parking_all_table">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<!-- 校園月租臨停數 -->
|
||||
<div class="col-xl-8 col-lg-8">
|
||||
<div class="card shadow mb-8">
|
||||
<!-- Card Header - Dropdown -->
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">
|
||||
校園當前車流量
|
||||
<button class="btn btn-info btn-circle btn-sm" style="float:right; background-image: url('/image/icon/F5.png'); background-size: cover;" onclick="get_monthly_rent_data()"></button>
|
||||
</h6>
|
||||
</div>
|
||||
<!-- Card Body -->
|
||||
<div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>類別</th>
|
||||
<th>數量</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="monthly_table"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--彈跳視窗-->
|
||||
<div>
|
||||
|
@ -278,6 +264,34 @@
|
|||
</div>
|
||||
</dialog>
|
||||
</div>
|
||||
<!--Excel下載-->
|
||||
<script>
|
||||
function downloadExcel() {
|
||||
fetch('http://localhost:7700/api/Excel/Download', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok.');
|
||||
}
|
||||
return response.blob();
|
||||
})
|
||||
.then(blob => {
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = `ParkingSpaces_${new Date().toISOString()}.xlsx`;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
a.remove();
|
||||
window.URL.revokeObjectURL(url); // Optional: Clean up the URL object
|
||||
})
|
||||
.catch(error => console.error('There was a problem with the fetch operation:', error));
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<script src="/bootstrap_1/vendor/chart.js/Chart.min.js"></script>
|
||||
|
@ -429,7 +443,7 @@
|
|||
//console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/get_day_violation-" + day,
|
||||
url: "http://localhost:7700/api/Violation_car_table/get_day_violation-" + day,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -478,7 +492,7 @@
|
|||
in_car_list = []
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/get_day_in_car-" + day,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/get_day_in_car-" + day,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -518,7 +532,7 @@
|
|||
function get_algorithm_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_space_algorithm",
|
||||
url: "http://localhost:7700/api/Parking_space_algorithm",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -533,7 +547,7 @@
|
|||
function get_algorithm_data_1() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_space_algorithm",
|
||||
url: "http://localhost:7700/api/Parking_space_algorithm",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -562,7 +576,7 @@
|
|||
var stringify_obj = JSON.stringify(data_1);
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Parking_space_algorithm/" + Model[i].algorithm_serial_num,
|
||||
url: "http://localhost:7700/api/Parking_space_algorithm/" + Model[i].algorithm_serial_num,
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -616,7 +630,7 @@
|
|||
function get_LED_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_lcd_instand",
|
||||
url: "http://localhost:7700/api/Parking_spaces_lcd_instand",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -661,7 +675,7 @@
|
|||
function get_monthly_rent_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_monthly_rent_number",
|
||||
url: "http://localhost:7700/api/Yuntech_monthly_rent_number",
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -712,7 +726,7 @@
|
|||
var stringify_obj = JSON.stringify(data);
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_monthly_rent_number/" + category,
|
||||
url: "http://localhost:7700/api/Yuntech_monthly_rent_number/" + category,
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -732,7 +746,7 @@
|
|||
function get_yuntech_parking_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_parking",
|
||||
url: "http://localhost:7700/api/Yuntech_parking",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -770,7 +784,7 @@
|
|||
function Update_now_num(all_num) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_parking/" + all_num,
|
||||
url: "http://localhost:7700/api/Yuntech_parking/" + all_num,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -789,7 +803,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_parking/" + Model.all_num,
|
||||
url: "http://localhost:7700/api/Yuntech_parking/" + Model.all_num,
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -821,7 +835,7 @@
|
|||
IP_1 = IP
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7705/IP/' + IP,
|
||||
url: 'http://localhost:7705/IP/' + IP,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -843,7 +857,7 @@
|
|||
//console.log(IP_1)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7705/IP/' + IP_1,
|
||||
url: 'http://localhost:7705/IP/' + IP_1,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -1042,7 +1056,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1060,7 +1074,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_violation_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_violation_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1078,7 +1092,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_cam_total_table",
|
||||
url: "http://localhost:7700/api/Yuntech_cam_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1097,7 +1111,7 @@
|
|||
location_name = location_name
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam",
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1116,7 +1130,7 @@
|
|||
location_name = location_name
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_cam",
|
||||
url: "http://localhost:7700/api/Yuntech_cam",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1249,7 +1263,7 @@
|
|||
//console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -1271,7 +1285,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -1287,7 +1301,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
function get_data(){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_space_algorithm",
|
||||
url: "http://localhost:7700/api/Parking_space_algorithm",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -66,7 +66,7 @@
|
|||
function get_data_1() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_space_algorithm",
|
||||
url: "http://localhost:7700/api/Parking_space_algorithm",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -96,7 +96,7 @@
|
|||
var stringify_obj = JSON.stringify(data_1);
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Parking_space_algorithm/" + Model[i].algorithm_serial_num,
|
||||
url: "http://localhost:7700/api/Parking_space_algorithm/" + Model[i].algorithm_serial_num,
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -157,7 +157,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -179,7 +179,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -195,7 +195,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -372,7 +372,7 @@
|
|||
//console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/get_day_violation-" + day,
|
||||
url: "http://localhost:7700/api/Violation_car_table/get_day_violation-" + day,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -421,7 +421,7 @@
|
|||
in_car_list = []
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/get_day_in_car-" + day,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/get_day_in_car-" + day,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -461,7 +461,7 @@
|
|||
function get_algorithm_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_space_algorithm",
|
||||
url: "http://localhost:7700/api/Parking_space_algorithm",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -476,7 +476,7 @@
|
|||
function get_algorithm_data_1() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_space_algorithm",
|
||||
url: "http://localhost:7700/api/Parking_space_algorithm",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -505,7 +505,7 @@
|
|||
var stringify_obj = JSON.stringify(data_1);
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Parking_space_algorithm/" + Model[i].algorithm_serial_num,
|
||||
url: "http://localhost:7700/api/Parking_space_algorithm/" + Model[i].algorithm_serial_num,
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -559,7 +559,7 @@
|
|||
function get_LED_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_lcd_instand",
|
||||
url: "http://localhost:7700/api/Parking_spaces_lcd_instand",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -618,7 +618,7 @@
|
|||
IP_1 = IP
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7705/IP/' + IP,
|
||||
url: 'http://localhost:7705/IP/' + IP,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -640,7 +640,7 @@
|
|||
//console.log(IP_1)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7705/IP/' + IP_1,
|
||||
url: 'http://localhost:7705/IP/' + IP_1,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -839,7 +839,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -857,7 +857,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_violation_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_violation_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -875,7 +875,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_cam_total_table",
|
||||
url: "http://localhost:7700/api/Yuntech_cam_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -894,7 +894,7 @@
|
|||
location_name = location_name
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam",
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -913,7 +913,7 @@
|
|||
location_name = location_name
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_cam",
|
||||
url: "http://localhost:7700/api/Yuntech_cam",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -1035,7 +1035,7 @@
|
|||
/*0523*/
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://140.125.20.183:7700/Users/authenticate",
|
||||
url: "http://localhost:7700/Users/authenticate",
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
success: function (msg) {
|
||||
|
@ -1076,7 +1076,7 @@
|
|||
//console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -1098,7 +1098,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -1114,7 +1114,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
function get_data(){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_lcd_instand",
|
||||
url: "http://localhost:7700/api/Parking_spaces_lcd_instand",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -117,7 +117,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -139,7 +139,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -155,7 +155,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
function get_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_lcd_instand",
|
||||
url: "http://localhost:7700/api/Parking_spaces_lcd_instand",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -116,7 +116,7 @@
|
|||
function Update_detail(parking_spaces_name){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table/" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table/" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -135,7 +135,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table/" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table/" + parking_spaces_name,
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -151,7 +151,7 @@
|
|||
function Update_detail_2() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_lcd_instand/parking_space_area-" + parking_spaces_name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_lcd_instand/parking_space_area-" + parking_spaces_name,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -177,7 +177,7 @@
|
|||
var stringify_obj = JSON.stringify(Model);
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_lcd_instand/" + Model.lcd_ip,
|
||||
url: "http://localhost:7700/api/Parking_spaces_lcd_instand/" + Model.lcd_ip,
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -208,7 +208,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -230,7 +230,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -246,7 +246,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam",
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -129,7 +129,7 @@
|
|||
IP_1 = IP
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7705/IP/' + IP_1,
|
||||
url: 'http://localhost:7705/IP/' + IP_1,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -147,7 +147,7 @@
|
|||
console.log(IP_1)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7705/IP/' + IP_1,
|
||||
url: 'http://localhost:7705/IP/' + IP_1,
|
||||
headers: {
|
||||
'Authorization':token
|
||||
},
|
||||
|
@ -195,7 +195,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -219,7 +219,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -235,7 +235,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -219,7 +219,7 @@
|
|||
console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_violation_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_violation_total_table",
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -275,7 +275,7 @@
|
|||
function get_recidivst_1(){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/recidivists",
|
||||
url: "http://localhost:7700/api/Violation_car_table/recidivists",
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -327,7 +327,7 @@
|
|||
//console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/get_day_violation-" + day,
|
||||
url: "http://localhost:7700/api/Violation_car_table/get_day_violation-" + day,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -370,7 +370,7 @@
|
|||
<script>
|
||||
function export_excel() {
|
||||
// 發送HTTP GET請求到Web API動作方法
|
||||
fetch('http://140.125.20.183:7700/api/Violation_car_table/export-all_excel',{
|
||||
fetch('http://localhost:7700/api/Violation_car_table/export-all_excel',{
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -418,7 +418,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -440,7 +440,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -456,7 +456,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
<form id="uploadForm" enctype="multipart/form-data">
|
||||
<input type="file" id="fileInput" name="file" accept=".xlsx, .xls" />
|
||||
<button type="submit">上傳</button>
|
||||
<button style="height:30px;float:right " class="btn btn-outline-secondary" onclick="serch_click()">搜尋</button>
|
||||
<input type="text" style="float:right" placeholder="請輸入車牌 ex:ABC4321" id="serch_text_id" />
|
||||
</form>
|
||||
|
||||
<div class="size2">
|
||||
|
@ -25,6 +27,9 @@
|
|||
<th>
|
||||
車牌號碼
|
||||
</th>
|
||||
<th>
|
||||
聯絡電話
|
||||
</th>
|
||||
<!--
|
||||
<th>
|
||||
狀態確認
|
||||
|
@ -40,6 +45,32 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<!--透過車牌號碼搜尋月租成員-->
|
||||
<script>
|
||||
function serch_click() {
|
||||
var license_plate_number = document.getElementById("serch_text_id").value; // 取得輸入的車牌號碼
|
||||
if (license_plate_number == "") {
|
||||
get_data();
|
||||
return; // 如果輸入為空,則停止後續操作
|
||||
}
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://localhost:7700/api/Yuntech_parking_user_list/license_plate_number-" + license_plate_number, // 使用車牌號碼查詢
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
contentType: "application/json",
|
||||
success: function (Model) {
|
||||
console.log(Model); // 檢查返回的數據
|
||||
All_Model = Model;
|
||||
|
||||
set_data_user_name_and_license_plate(Model); // 傳遞數據到顯示函數
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<!--新增使用者-->
|
||||
<div>
|
||||
|
@ -66,6 +97,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="add_user_phone_number_text_id">聯絡電話:</label>
|
||||
<input type="text" class="form-control" id="add_user_phone_number_text_id" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12 text-right">
|
||||
<button class="btn btn-success" onclick="post_user()">上傳</button>
|
||||
|
@ -79,62 +118,65 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--新增成員-->
|
||||
<script>
|
||||
function create_user() {
|
||||
document.getElementById("add_user_name_text_id").value="";
|
||||
document.getElementById("add_user_license_plate_number_text_id").value="";
|
||||
add_user_view.showModal()
|
||||
document.getElementById("add_user_name_text_id").value = "";
|
||||
document.getElementById("add_user_license_plate_number_text_id").value = "";
|
||||
document.getElementById("add_user_phone_number_text_id").value = "";
|
||||
add_user_view.showModal();
|
||||
}
|
||||
|
||||
function post_user() {
|
||||
var user_name = document.getElementById("add_user_name_text_id").value;
|
||||
var license_plate_number = document.getElementById("add_user_license_plate_number_text_id").value;
|
||||
var user_state_check = 'True'
|
||||
var obj = { user_license_plate_number: license_plate_number, user_name: user_name, user_state_check: user_state_check }
|
||||
var user_phone_number = document.getElementById("add_user_phone_number_text_id").value;
|
||||
var user_state_check = 'True';
|
||||
|
||||
// 將 user_phone_number 加入到物件中
|
||||
var obj = {
|
||||
user_license_plate_number: license_plate_number,
|
||||
user_name: user_name,
|
||||
user_state_check: user_state_check,
|
||||
user_phone_number: user_phone_number // 新增這一行
|
||||
};
|
||||
|
||||
var stringify_obj = JSON.stringify(obj);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_parking_user_list",
|
||||
url: "http://localhost:7700/api/Yuntech_parking_user_list",
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
success: function (msg) {
|
||||
console.log(msg)
|
||||
console.log(msg);
|
||||
if (msg == 'ok') {
|
||||
add_user_view.close()
|
||||
add_user_view.close();
|
||||
alert("上傳完成");
|
||||
get_data()
|
||||
get_data();
|
||||
}
|
||||
if (msg == '車牌重複') {
|
||||
alert("車牌重複");
|
||||
}
|
||||
|
||||
//test_upload_bt_2()
|
||||
//wait_view()
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<!--上傳excel-->
|
||||
<script>
|
||||
const api_url = 'http://140.125.20.183:7700'; // 定义 api_url
|
||||
const api_url = 'http://localhost:7700'; // 定义 api_url
|
||||
|
||||
document.getElementById('uploadForm').onsubmit = function (event) {
|
||||
event.preventDefault();
|
||||
const formData = new FormData();
|
||||
const fileInput = document.getElementById('fileInput');
|
||||
if (fileInput.files.length === 0) {
|
||||
alert("Please select a file!");
|
||||
//alert("Please select a file!");
|
||||
return;
|
||||
}
|
||||
formData.append("file", fileInput.files[0]);
|
||||
|
@ -163,38 +205,35 @@
|
|||
<!--設置資料-->
|
||||
<script>
|
||||
function set_data(Model) {
|
||||
console.log(Model)
|
||||
table = "<tr>";
|
||||
//console.log(Model.length)
|
||||
console.log(Model);
|
||||
let table = "<tr>";
|
||||
|
||||
if (Model.length > 0) {
|
||||
for (var i = 0; i < Model.length; i++) {
|
||||
table += "<td>" + Model[i].user_name + "</td>"
|
||||
table += "<td id='" + Model[i].user_license_plate_number + "_total'>" + Model[i].user_license_plate_number + "</td>"
|
||||
/*
|
||||
if (Model[i].user_state_check == "True") {
|
||||
table += "<td>" + "ok" + "</td>"
|
||||
}
|
||||
else {
|
||||
table += "<td>" + "Not ok" + "</td>"
|
||||
}*/
|
||||
table += "<td>" + '<button class="btn btn-danger" onclick="delet_data(' + "'" + Model[i].user_license_plate_number + "'" + ')">刪除</button>' + "</td>"
|
||||
/*table += '<button class="btn btn-danger " onclick="delet_data(' + "'" + Model[i].user_license_plate_number +"'"+ ')">刪除</button>'*/
|
||||
table += "</tr>"
|
||||
table += "<tr>"
|
||||
table += "<td>" + Model[i].user_name + "</td>";
|
||||
table += "<td id='" + Model[i].user_license_plate_number + "_total'>" + Model[i].user_license_plate_number + "</td>";
|
||||
table += "<td>" + Model[i].user_phone_number + "</td>";
|
||||
|
||||
// 增加空白的<td>以向右平移刪除按鈕
|
||||
table += "<td></td>"; // 你可以增加或減少這些空白<td>來調整平移的距離
|
||||
|
||||
table += "<td>" + '<button class="btn btn-danger" onclick="delet_data(' + "'" + Model[i].user_license_plate_number + "'" + ')">刪除</button>' + "</td>";
|
||||
table += "</tr>";
|
||||
table += "<tr>";
|
||||
}
|
||||
}
|
||||
document.getElementById("demo").innerHTML = table
|
||||
document.getElementById("demo").innerHTML = table;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<!--刪除資料-->
|
||||
<script>
|
||||
function delet_data(license_plate_number) {
|
||||
$.ajax({
|
||||
type: "DELETE",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_parking_user_list/" + license_plate_number,
|
||||
url: "http://localhost:7700/api/Yuntech_parking_user_list/" + license_plate_number,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -213,7 +252,7 @@
|
|||
function get_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_parking_user_list",
|
||||
url: "http://localhost:7700/api/Yuntech_parking_user_list",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -230,6 +269,28 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<!--放置月租成員資料-->
|
||||
<script>
|
||||
function set_data_user_name_and_license_plate(Model) {
|
||||
let table = ""; // 用來存放表格的字串
|
||||
console.log(Model.length); // 檢查返回數據的長度
|
||||
if (Model.length > 0) {
|
||||
for (let i = 0; i < Model.length; i++) {
|
||||
if (Model[i].user_name != null) {
|
||||
table += "<tr>"; // 每一筆資料都是一行
|
||||
table += "<td>" + Model[i].user_name + "</td>"; // 顯示使用者名稱
|
||||
table += "<td>" + Model[i].user_license_plate_number + "</td>"; // 顯示車牌號碼
|
||||
table += "<td>" + Model[i].user_phone_number + "</td>"; // 顯示電話號碼
|
||||
table += "</tr>";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
table = "<tr><td colspan='3'>查無資料,該台車為臨停車</td></tr>"; // 如果沒有找到資料,顯示提示訊息
|
||||
}
|
||||
document.getElementById("demo").innerHTML = table; // 將生成的表格內容插入到指定的元素中
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -242,7 +303,7 @@
|
|||
//console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -264,7 +325,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -280,7 +341,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -194,7 +194,7 @@
|
|||
var license_plate_number = document.getElementById("serch_text_id").value
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_instant/license_plate_number-" + license_plate_number,
|
||||
url: "http://localhost:7700/api/Parking_spaces_instant/license_plate_number-" + license_plate_number,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -225,7 +225,7 @@
|
|||
console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table",
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -297,7 +297,7 @@
|
|||
function get_single_parking_space_car(name){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_instant/parking_space_area-" + name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_instant/parking_space_area-" + name,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -328,8 +328,8 @@
|
|||
var stringify_obj = JSON.stringify(obj);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table",
|
||||
//url: "http://140.125.20.183:7700/api/Postural_Analysis_1",
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table",
|
||||
//url: "http://localhost:7700/api/Postural_Analysis_1",
|
||||
//data: {test_id: test_id, test_date: test_date, test_time: test_time, test_analyst: test_analyst, img: img, data_creat_time: "2022-10-04T18:47:40.887014" },
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
|
@ -353,7 +353,7 @@
|
|||
function delet_data(name){
|
||||
$.ajax({
|
||||
type: "DELETE",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table/"+name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table/"+name,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -391,7 +391,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -413,7 +413,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -429,7 +429,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
IP_1 = IP
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7705/IP/' + IP,
|
||||
url: 'http://localhost:7705/IP/' + IP,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -94,7 +94,7 @@
|
|||
console.log(IP_1)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7705/IP/' + IP_1,
|
||||
url: 'http://localhost:7705/IP/' + IP_1,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -294,7 +294,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -312,7 +312,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_violation_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_violation_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -330,7 +330,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_cam_total_table",
|
||||
url: "http://localhost:7700/api/Yuntech_cam_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -350,7 +350,7 @@
|
|||
location_name = location_name
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam",
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -369,7 +369,7 @@
|
|||
location_name = location_name
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_cam",
|
||||
url: "http://localhost:7700/api/Yuntech_cam",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -488,7 +488,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -512,7 +512,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -528,7 +528,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
//console.log(name)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/violation_location_name-" + name,
|
||||
url: "http://localhost:7700/api/Violation_car_table/violation_location_name-" + name,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -160,7 +160,7 @@
|
|||
console.log(time)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/location_nam-" + violation_location_name + "-time-" + time,
|
||||
url: "http://localhost:7700/api/Violation_car_table/location_nam-" + violation_location_name + "-time-" + time,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -181,7 +181,7 @@
|
|||
var stringify_obj = JSON.stringify(Model);
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/location_nam-" + violation_location_name + "-time-" + time,
|
||||
url: "http://localhost:7700/api/Violation_car_table/location_nam-" + violation_location_name + "-time-" + time,
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -237,7 +237,7 @@
|
|||
serial_number = car_serial_number
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/location_nam-" + location_name + "-time-" + time,
|
||||
url: "http://localhost:7700/api/Violation_car_table/location_nam-" + location_name + "-time-" + time,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -269,7 +269,7 @@
|
|||
}
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/license_plate_number-" + license_plate_number,
|
||||
url: "http://localhost:7700/api/Violation_car_table/license_plate_number-" + license_plate_number,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -295,7 +295,7 @@
|
|||
console.log(start_date)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/location_name_1_-" + name + "-start_time-" + start_date + "-end_time-" + end_date,
|
||||
url: "http://localhost:7700/api/Violation_car_table/location_name_1_-" + name + "-start_time-" + start_date + "-end_time-" + end_date,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -320,7 +320,7 @@
|
|||
var start_date = document.getElementById("start_date_id").value
|
||||
var end_date = document.getElementById("end_date_id").value
|
||||
// 發送HTTP GET請求到Web API動作方法
|
||||
fetch('http://140.125.20.183:7700/api/Violation_car_table/export-excel_location_name_1_-' + name + "-start_time-" + start_date + "-end_time-" + end_date, {
|
||||
fetch('http://localhost:7700/api/Violation_car_table/export-excel_location_name_1_-' + name + "-start_time-" + start_date + "-end_time-" + end_date, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -361,7 +361,7 @@
|
|||
function plate_export_excel() {
|
||||
var license_plate_number = document.getElementById("serch_text_id").value
|
||||
// 發送HTTP GET請求到Web API動作方法
|
||||
fetch('http://140.125.20.183:7700/api/Violation_car_table/export-excel_license_plate_number-'+license_plate_number, {
|
||||
fetch('http://localhost:7700/api/Violation_car_table/export-excel_license_plate_number-'+license_plate_number, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -407,7 +407,7 @@
|
|||
console.log(time)
|
||||
$.ajax({
|
||||
type: "DELETE",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/location_name-" + location_name + "-time-" + time,
|
||||
url: "http://localhost:7700/api/Violation_car_table/location_name-" + location_name + "-time-" + time,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -431,7 +431,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -453,7 +453,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -469,7 +469,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
//console.log(name)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/Amount-" + car_table_num,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/Amount-" + car_table_num,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -161,7 +161,7 @@
|
|||
var select = document.getElementById("location_select_id")
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/location_name" ,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/location_name" ,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -198,7 +198,7 @@
|
|||
//console.log(name)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/Amount-" + car_table_num,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/Amount-" + car_table_num,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -221,7 +221,7 @@
|
|||
//console.log(name)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/Amount-" + car_table_num,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/Amount-" + car_table_num,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -340,7 +340,7 @@
|
|||
// 發送AJAX GET請求
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/location_name-" + location_name + "-time-" + time,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/location_name-" + location_name + "-time-" + time,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -407,7 +407,7 @@
|
|||
}
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/license_plate_number-" + license_plate_number,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/license_plate_number-" + license_plate_number,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -443,7 +443,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/location_name_1_-" + name + "-start_time-" + start_date + "-end_time-" + end_date,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/location_name_1_-" + name + "-start_time-" + start_date + "-end_time-" + end_date,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -474,7 +474,7 @@
|
|||
console.log(select_location)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/location-" + select_location,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/location-" + select_location,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -505,7 +505,7 @@
|
|||
var end_time = new Date(end_date).toISOString();
|
||||
|
||||
// 構建請求URL
|
||||
var url = "http://140.125.20.183:7700/api/Yuntech_in_car_table/location_name_2_-" + name + "-start_time-" + start_date + "-end_time-" + end_date + "-export_excel";
|
||||
var url = "http://localhost:7700/api/Yuntech_in_car_table/location_name_2_-" + name + "-start_time-" + start_date + "-end_time-" + end_date + "-export_excel";
|
||||
|
||||
// 發送HTTP GET請求到Web API動作方法
|
||||
fetch(url, {
|
||||
|
@ -551,7 +551,7 @@
|
|||
<script>
|
||||
function export_excel() {
|
||||
// 發送HTTP GET請求到Web API動作方法
|
||||
fetch('http://140.125.20.183:7700/api/Yuntech_in_car_table/export-all_excel', {
|
||||
fetch('http://localhost:7700/api/Yuntech_in_car_table/export-all_excel', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -599,7 +599,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -621,7 +621,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -637,7 +637,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -2,265 +2,161 @@
|
|||
ViewData["Title"] = "Login";
|
||||
Layout = null;
|
||||
}
|
||||
<!--
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f2f2f2;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
.container {
|
||||
background-color: #ffffff;
|
||||
border-radius: 5px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.container h1 {
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.container label {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.container input[type="text"],
|
||||
.container input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.container button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background-color: #4caf50;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.container button:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-Hant">
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title>Login</title>
|
||||
<title>雲科校園停車場登錄</title>
|
||||
|
||||
<!-- Custom fonts for this template-->
|
||||
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
|
||||
rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template-->
|
||||
<link href="~/bootstrap_1/css/sb-admin-2.min.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body.bg-gradient-primary {
|
||||
background: url('/bootstrap_1/img/1.jpg') no-repeat center center fixed;
|
||||
background-size: cover;
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
background-color: transparent;
|
||||
border-radius: 5px;
|
||||
padding: 80px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 90%; /* 設置 container 的寬度為 90% */
|
||||
max-width: 600px; /* 設置 container 的最大寬度為 600px */
|
||||
}
|
||||
|
||||
.login-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.login-header img {
|
||||
height: 100px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.login-header h1 {
|
||||
margin: 0;
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
.login-content {
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-content .form-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.login-content input[type="text"],
|
||||
.login-content input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.login-content button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 10px 0;
|
||||
background-color: #4caf50;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.login-content button:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-gradient-primary">
|
||||
<div class="container">
|
||||
|
||||
<!-- Outer Row -->
|
||||
<div class="row justify-content-center">
|
||||
|
||||
<div class="col-xl-10 col-lg-12 col-md-9">
|
||||
|
||||
<div class="card o-hidden border-0 shadow-lg my-5">
|
||||
<div class="card-body p-0">
|
||||
<!-- Nested Row within Card Body -->
|
||||
<div class="row">
|
||||
<div class="col-lg-6 ">
|
||||
|
||||
<img style="width:100%" src="~/bootstrap_1/img/Yuntech.png">
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="p-5">
|
||||
<div class="text-center">
|
||||
<h1>Login</h1>
|
||||
</div>
|
||||
<div class="user">
|
||||
<div class="form-group">
|
||||
<input type="email" class="form-control form-control-user"
|
||||
id="username_id" aria-describedby="emailHelp"
|
||||
placeholder="輸入帳號...">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="password" class="form-control form-control-user"
|
||||
id="password_id" placeholder="密碼">
|
||||
</div>
|
||||
|
||||
<a onclick="login_clicked()" class="btn btn-success btn-user btn-block">
|
||||
Login
|
||||
</a>
|
||||
<a onclick="passerby_clicked()" class="btn btn-primary btn-user btn-block">
|
||||
路人登入
|
||||
</a>
|
||||
<hr>
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-container">
|
||||
<form id="login-form" onsubmit="handleFormSubmit(event)">
|
||||
<div class="login-header">
|
||||
<img src="~/bootstrap_1/img/Yuntech.png" alt="Yuntech">
|
||||
<h1>Login</h1>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="login-content">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control form-control-user" id="username_id" aria-describedby="emailHelp" placeholder="輸入帳號...">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="password" class="form-control form-control-user" id="password_id" placeholder="密碼">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success btn-user btn-block">Login</button>
|
||||
<a onclick="passerby_clicked()" class="btn btn-primary btn-user btn-block">路人登入</a>
|
||||
<hr>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
<!--
|
||||
<div class="container">
|
||||
<h1>Login</h1>
|
||||
<div >
|
||||
<label for="username">Username:</label>
|
||||
<input type="text" id="username_id" name="username" required>
|
||||
<label for="password">Password:</label>
|
||||
<input type="password" id="password_id" name="password" required>
|
||||
<button onclick="login_clicked()">登入</button>
|
||||
<button style="background-color: #0066FF;background-color: #5599FF;" onclick="passerby_clicked()">路人登入</button>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<script src="/bootstrap_1/vendor/jquery/jquery.min.js"></script>
|
||||
<script src="/bootstrap_1/vendor/jquery/jquery.min.js"></script>
|
||||
<script>
|
||||
function handleFormSubmit(event) {
|
||||
event.preventDefault(); // 防止表單的默認提交
|
||||
login_clicked(); // 手動調用登陸函數
|
||||
}
|
||||
|
||||
function login_clicked() {
|
||||
var username = document.getElementById("username_id").value;
|
||||
var password = document.getElementById("password_id").value;
|
||||
console.log(username, password);
|
||||
var obj = { Username: username, Password: password };
|
||||
var stringify_obj = JSON.stringify(obj);
|
||||
|
||||
<!--登入頁面-->
|
||||
<script>
|
||||
function login_clicked() {
|
||||
var username = document.getElementById("username_id").value
|
||||
var password = document.getElementById("password_id").value
|
||||
console.log(username, password)
|
||||
var obj = { Username: username, Password: password }
|
||||
var stringify_obj = JSON.stringify(obj);
|
||||
/* 0521
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "Users/authenticate",
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
success: function (msg) {
|
||||
console.log(msg)
|
||||
var token = msg.token; // 替换为您的JWT令牌
|
||||
var redirectUrl = "/Park_spaces/Parking_spaces_total_table"; // 替换为您的目标URL
|
||||
// 构建带有JWT令牌的完整URL
|
||||
var urlWithToken = redirectUrl + "?token=" + token;
|
||||
if(msg!=null){
|
||||
window.location = urlWithToken;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://localhost:7700/Users/authenticate",
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
success: function (msg) {
|
||||
console.log(msg);
|
||||
var token = msg.token;
|
||||
go_to_next_view(token);
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
window.alert("請輸入正確帳號密碼");
|
||||
document.getElementById("username_id").value = "";
|
||||
document.getElementById("password_id").value = "";
|
||||
console.log("error");
|
||||
}
|
||||
//window.location = "/Park_spaces/Parking_spaces_total_table";
|
||||
}
|
||||
});
|
||||
*/
|
||||
/*0522
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "Users/authenticate",
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
success: function (msg) {
|
||||
console.log(msg)
|
||||
var token = msg.token; // 替换为您的JWT令牌
|
||||
// 将令牌存储在本地存储中
|
||||
localStorage.setItem('token_park_space', token);
|
||||
// 跳转到目标页面
|
||||
window.location.href = '/Park_spaces/Parking_spaces_total_table';
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
// 处理错误
|
||||
window.alert("請輸入正確帳號密碼");
|
||||
document.getElementById("username_id").value = ""
|
||||
document.getElementById("password_id").value = ""
|
||||
console.log("error")
|
||||
}
|
||||
});*/
|
||||
/*0523*/
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://140.125.20.183:7700/Users/authenticate",
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
success: function (msg) {
|
||||
console.log(msg)
|
||||
var token = msg.token;
|
||||
go_to_next_view(token)
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
// 处理错误
|
||||
window.alert("請輸入正確帳號密碼");
|
||||
document.getElementById("username_id").value = ""
|
||||
document.getElementById("password_id").value = ""
|
||||
console.log("error")
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function go_to_next_view(token_str) {
|
||||
localStorage.setItem('token_park_space', token_str);
|
||||
window.location = '/Park_spaces/Parking_spaces_total_table';
|
||||
}
|
||||
|
||||
}
|
||||
function go_to_next_view(token_str) {
|
||||
// 将令牌存储在本地存储中
|
||||
localStorage.setItem('token_park_space', token_str);
|
||||
window.location = '/Park_spaces/Parking_spaces_total_table';
|
||||
/*
|
||||
// 获取 JWT 令牌
|
||||
var token = token_str;
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'Park_spaces/Parking_spaces_total_table',
|
||||
//url: 'http://140.125.20.183:5173/Users/token',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
success: function (response) {
|
||||
// window.location.href = '/test/' + response;
|
||||
window.location = '/Park_spaces/test/' + response;
|
||||
//console.log(response)
|
||||
|
||||
|
||||
},
|
||||
error: function (xhr) {
|
||||
// 处理错误响应,例如跳转到未授权页面
|
||||
window.location.href = 'https://example.com/unauthorized_page';
|
||||
}
|
||||
});*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<!--路人登入-->
|
||||
<script>
|
||||
function passerby_clicked() {
|
||||
localStorage.removeItem('token_park_space');
|
||||
window.location.href = '/Park_spaces/Parking_spaces_total_table';
|
||||
}
|
||||
</script>
|
||||
function passerby_clicked() {
|
||||
localStorage.removeItem('token_park_space');
|
||||
window.location.href = '/Park_spaces/Parking_spaces_total_table';
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -298,7 +298,7 @@
|
|||
//console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/get_day_violation-" + day,
|
||||
url: "http://localhost:7700/api/Violation_car_table/get_day_violation-" + day,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -346,7 +346,7 @@
|
|||
in_car_list = []
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/get_day_in_car-" + day,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/get_day_in_car-" + day,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -385,7 +385,7 @@
|
|||
function get_LED_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_lcd_instand",
|
||||
url: "http://localhost:7700/api/Parking_spaces_lcd_instand",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -426,7 +426,7 @@
|
|||
function get_monthly_rent_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_monthly_rent_number",
|
||||
url: "http://localhost:7700/api/Yuntech_monthly_rent_number",
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -477,7 +477,7 @@
|
|||
var stringify_obj = JSON.stringify(data);
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_monthly_rent_number/" + category,
|
||||
url: "http://localhost:7700/api/Yuntech_monthly_rent_number/" + category,
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -497,7 +497,7 @@
|
|||
function get_yuntech_parking_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_parking",
|
||||
url: "http://localhost:7700/api/Yuntech_parking",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -535,7 +535,7 @@
|
|||
function Update_now_num(all_num) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_parking/" + all_num,
|
||||
url: "http://localhost:7700/api/Yuntech_parking/" + all_num,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -554,7 +554,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_parking/" + Model.all_num,
|
||||
url: "http://localhost:7700/api/Yuntech_parking/" + Model.all_num,
|
||||
data: stringify_obj,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -577,7 +577,7 @@
|
|||
//console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -599,7 +599,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -615,7 +615,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_violation_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_violation_total_table",
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -271,7 +271,7 @@
|
|||
function get_recidivst_1() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/recidivists",
|
||||
url: "http://localhost:7700/api/Violation_car_table/recidivists",
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -323,7 +323,7 @@
|
|||
//console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/get_day_violation-" + day,
|
||||
url: "http://localhost:7700/api/Violation_car_table/get_day_violation-" + day,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -367,7 +367,7 @@
|
|||
<script>
|
||||
function export_excel() {
|
||||
// 發送HTTP GET請求到Web API動作方法
|
||||
fetch('http://140.125.20.183:7700/api/Violation_car_table/export-all_excel', {
|
||||
fetch('http://localhost:7700/api/Violation_car_table/export-all_excel', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -414,7 +414,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -436,7 +436,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -452,7 +452,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
<form id="uploadForm" enctype="multipart/form-data">
|
||||
<input type="file" id="fileInput" name="file" accept=".xlsx, .xls" />
|
||||
<button type="submit">上傳</button>
|
||||
<button style="height:30px;float:right " class="btn btn-outline-secondary" onclick="serch_click()">搜尋</button>
|
||||
<input type="text" style="float:right" placeholder="請輸入車牌 ex:ABC4321" id="serch_text_id" />
|
||||
</form>
|
||||
|
||||
|
||||
|
@ -26,6 +28,9 @@
|
|||
<th>
|
||||
車牌號碼
|
||||
</th>
|
||||
<th>
|
||||
聯絡電話
|
||||
</th>
|
||||
<!--
|
||||
<th>
|
||||
狀態確認
|
||||
|
@ -41,6 +46,30 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<!--透過車牌號碼搜尋月租成員-->
|
||||
<script>
|
||||
function serch_click() {
|
||||
var license_plate_number = document.getElementById("serch_text_id").value; // 取得輸入的車牌號碼
|
||||
if (license_plate_number == "") {
|
||||
get_data();
|
||||
return; // 如果輸入為空,則停止後續操作
|
||||
}
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://localhost:7700/api/Yuntech_parking_user_list/license_plate_number-" + license_plate_number, // 使用車牌號碼查詢
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
contentType: "application/json",
|
||||
success: function (Model) {
|
||||
console.log(Model); // 檢查返回的數據
|
||||
All_Model = Model;
|
||||
|
||||
set_data_user_name_and_license_plate(Model); // 傳遞數據到顯示函數
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--新增使用者-->
|
||||
<div>
|
||||
|
@ -67,6 +96,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="add_user_phone_number_text_id">聯絡電話:</label>
|
||||
<input type="text" class="form-control" id="add_user_phone_number_text_id" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-12 text-right">
|
||||
<button class="btn btn-success" onclick="post_user()">上傳</button>
|
||||
|
@ -80,61 +117,64 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--新增成員-->
|
||||
<script>
|
||||
function create_user() {
|
||||
document.getElementById("add_user_name_text_id").value="";
|
||||
document.getElementById("add_user_license_plate_number_text_id").value="";
|
||||
add_user_view.showModal()
|
||||
document.getElementById("add_user_name_text_id").value = "";
|
||||
document.getElementById("add_user_license_plate_number_text_id").value = "";
|
||||
document.getElementById("add_user_phone_number_text_id").value = "";
|
||||
add_user_view.showModal();
|
||||
}
|
||||
|
||||
function post_user() {
|
||||
var user_name = document.getElementById("add_user_name_text_id").value;
|
||||
var license_plate_number = document.getElementById("add_user_license_plate_number_text_id").value;
|
||||
var user_state_check = 'True'
|
||||
var obj = { user_license_plate_number: license_plate_number, user_name: user_name, user_state_check: user_state_check }
|
||||
var user_phone_number = document.getElementById("add_user_phone_number_text_id").value;
|
||||
var user_state_check = 'True';
|
||||
|
||||
// 將 user_phone_number 加入到物件中
|
||||
var obj = {
|
||||
user_license_plate_number: license_plate_number,
|
||||
user_name: user_name,
|
||||
user_state_check: user_state_check,
|
||||
user_phone_number: user_phone_number // 新增這一行
|
||||
};
|
||||
|
||||
var stringify_obj = JSON.stringify(obj);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_parking_user_list",
|
||||
url: "http://localhost:7700/api/Yuntech_parking_user_list",
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
success: function (msg) {
|
||||
console.log(msg)
|
||||
console.log(msg);
|
||||
if (msg == 'ok') {
|
||||
add_user_view.close()
|
||||
add_user_view.close();
|
||||
alert("上傳完成");
|
||||
get_data()
|
||||
get_data();
|
||||
}
|
||||
if (msg == '車牌重複') {
|
||||
alert("車牌重複");
|
||||
}
|
||||
|
||||
//test_upload_bt_2()
|
||||
//wait_view()
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<!--上傳excel-->
|
||||
<script>
|
||||
const api_url = 'http://140.125.20.183:7700'; // 定义 api_url
|
||||
const api_url = 'http://localhost:7700'; // 定义 api_url
|
||||
|
||||
document.getElementById('uploadForm').onsubmit = function (event) {
|
||||
event.preventDefault();
|
||||
const formData = new FormData();
|
||||
const fileInput = document.getElementById('fileInput');
|
||||
if (fileInput.files.length === 0) {
|
||||
alert("Please select a file!");
|
||||
//alert("Please select a file!");
|
||||
return;
|
||||
}
|
||||
formData.append("file", fileInput.files[0]);
|
||||
|
@ -165,28 +205,24 @@
|
|||
<!--設置資料-->
|
||||
<script>
|
||||
function set_data(Model) {
|
||||
console.log(Model)
|
||||
table = "<tr>";
|
||||
//console.log(Model.length)
|
||||
console.log(Model);
|
||||
let table = "<tr>";
|
||||
|
||||
if (Model.length > 0) {
|
||||
for (var i = 0; i < Model.length; i++) {
|
||||
table += "<td>" + Model[i].user_name + "</td>"
|
||||
table += "<td id='" + Model[i].user_license_plate_number + "_total'>" + Model[i].user_license_plate_number + "</td>"
|
||||
/*
|
||||
if (Model[i].user_state_check == "True") {
|
||||
table += "<td>" + "ok" + "</td>"
|
||||
}
|
||||
else {
|
||||
table += "<td>" + "Not ok" + "</td>"
|
||||
}*/
|
||||
table += "<td>" + '<button class="btn btn-danger" onclick="delet_data(' + "'" + Model[i].user_license_plate_number + "'" + ')">刪除</button>' + "</td>"
|
||||
/*table += '<button class="btn btn-danger " onclick="delet_data(' + "'" + Model[i].user_license_plate_number +"'"+ ')">刪除</button>'*/
|
||||
table += "</tr>"
|
||||
table += "<tr>"
|
||||
table += "<td>" + Model[i].user_name + "</td>";
|
||||
table += "<td id='" + Model[i].user_license_plate_number + "_total'>" + Model[i].user_license_plate_number + "</td>";
|
||||
table += "<td>" + Model[i].user_phone_number + "</td>";
|
||||
|
||||
// 增加空白的<td>以向右平移刪除按鈕
|
||||
table += "<td></td>"; // 你可以增加或減少這些空白<td>來調整平移的距離
|
||||
|
||||
table += "<td>" + '<button class="btn btn-danger" onclick="delet_data(' + "'" + Model[i].user_license_plate_number + "'" + ')">刪除</button>' + "</td>";
|
||||
table += "</tr>";
|
||||
table += "<tr>";
|
||||
}
|
||||
}
|
||||
document.getElementById("demo").innerHTML = table
|
||||
document.getElementById("demo").innerHTML = table;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -196,7 +232,7 @@
|
|||
function delet_data(license_plate_number) {
|
||||
$.ajax({
|
||||
type: "DELETE",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_parking_user_list/" + license_plate_number,
|
||||
url: "http://localhost:7700/api/Yuntech_parking_user_list/" + license_plate_number,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -215,7 +251,7 @@
|
|||
function get_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_parking_user_list",
|
||||
url: "http://localhost:7700/api/Yuntech_parking_user_list",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -232,6 +268,29 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<!--放置月租成員資料-->
|
||||
<script>
|
||||
function set_data_user_name_and_license_plate(Model) {
|
||||
let table = ""; // 用來存放表格的字串
|
||||
console.log(Model.length); // 檢查返回數據的長度
|
||||
if (Model.length > 0) {
|
||||
for (let i = 0; i < Model.length; i++) {
|
||||
if (Model[i].user_name != null) {
|
||||
table += "<tr>"; // 每一筆資料都是一行
|
||||
table += "<td>" + Model[i].user_name + "</td>"; // 顯示使用者名稱
|
||||
table += "<td>" + Model[i].user_license_plate_number + "</td>"; // 顯示車牌號碼
|
||||
table += "<td>" + Model[i].user_phone_number + "</td>"; // 顯示電話號碼
|
||||
table += "</tr>";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
table = "<tr><td colspan='3'>查無資料,該台車為臨停車</td></tr>"; // 如果沒有找到資料,顯示提示訊息
|
||||
}
|
||||
document.getElementById("demo").innerHTML = table; // 將生成的表格內容插入到指定的元素中
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -244,7 +303,7 @@
|
|||
//console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -268,7 +327,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -284,7 +343,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
IP_1 = IP
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7705/IP/' + IP,
|
||||
url: 'http://localhost:7705/IP/' + IP,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -95,7 +95,7 @@
|
|||
console.log(IP_1)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7705/IP/' + IP_1,
|
||||
url: 'http://localhost:7705/IP/' + IP_1,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -295,7 +295,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -313,7 +313,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_violation_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_violation_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -331,7 +331,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_cam_total_table",
|
||||
url: "http://localhost:7700/api/Yuntech_cam_total_table",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -351,7 +351,7 @@
|
|||
location_name = location_name
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_cam",
|
||||
url: "http://localhost:7700/api/Parking_spaces_cam",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -370,7 +370,7 @@
|
|||
location_name = location_name
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_cam",
|
||||
url: "http://localhost:7700/api/Yuntech_cam",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -489,7 +489,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -513,7 +513,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -529,7 +529,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
//console.log(name)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/violation_location_name-" + name,
|
||||
url: "http://localhost:7700/api/Violation_car_table/violation_location_name-" + name,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -160,7 +160,7 @@
|
|||
console.log(time)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/location_nam-" + violation_location_name + "-time-" + time,
|
||||
url: "http://localhost:7700/api/Violation_car_table/location_nam-" + violation_location_name + "-time-" + time,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -181,7 +181,7 @@
|
|||
var stringify_obj = JSON.stringify(Model);
|
||||
$.ajax({
|
||||
type: "PUT",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/location_nam-" + violation_location_name + "-time-" + time,
|
||||
url: "http://localhost:7700/api/Violation_car_table/location_nam-" + violation_location_name + "-time-" + time,
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -237,7 +237,7 @@
|
|||
serial_number = car_serial_number
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/location_nam-" + location_name + "-time-" + time,
|
||||
url: "http://localhost:7700/api/Violation_car_table/location_nam-" + location_name + "-time-" + time,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -269,7 +269,7 @@
|
|||
}
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/license_plate_number-" + license_plate_number,
|
||||
url: "http://localhost:7700/api/Violation_car_table/license_plate_number-" + license_plate_number,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -295,7 +295,7 @@
|
|||
console.log(start_date)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/location_name_1_-" + name + "-start_time-" + start_date + "-end_time-" + end_date,
|
||||
url: "http://localhost:7700/api/Violation_car_table/location_name_1_-" + name + "-start_time-" + start_date + "-end_time-" + end_date,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -321,7 +321,7 @@
|
|||
var start_date = document.getElementById("start_date_id").value
|
||||
var end_date = document.getElementById("end_date_id").value
|
||||
// 發送HTTP GET請求到Web API動作方法
|
||||
fetch('http://140.125.20.183:7700/api/Violation_car_table/export-excel_location_name_1_-' + name + "-start_time-" + start_date + "-end_time-" + end_date, {
|
||||
fetch('http://localhost:7700/api/Violation_car_table/export-excel_location_name_1_-' + name + "-start_time-" + start_date + "-end_time-" + end_date, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -362,7 +362,7 @@
|
|||
function plate_export_excel() {
|
||||
var license_plate_number = document.getElementById("serch_text_id").value
|
||||
// 發送HTTP GET請求到Web API動作方法
|
||||
fetch('http://140.125.20.183:7700/api/Violation_car_table/export-excel_license_plate_number-' + license_plate_number, {
|
||||
fetch('http://localhost:7700/api/Violation_car_table/export-excel_license_plate_number-' + license_plate_number, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -406,7 +406,7 @@
|
|||
console.log(time)
|
||||
$.ajax({
|
||||
type: "DELETE",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/location_name-" + location_name + "-time-" + time,
|
||||
url: "http://localhost:7700/api/Violation_car_table/location_name-" + location_name + "-time-" + time,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -430,7 +430,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -452,7 +452,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -468,7 +468,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
//console.log(name)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/Amount-" + car_table_num,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/Amount-" + car_table_num,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -154,7 +154,7 @@
|
|||
var select = document.getElementById("location_select_id")
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/location_name",
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/location_name",
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -190,7 +190,7 @@
|
|||
//console.log(name)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/Amount-" + car_table_num,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/Amount-" + car_table_num,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -213,7 +213,7 @@
|
|||
//console.log(name)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/Amount-" + car_table_num,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/Amount-" + car_table_num,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -333,7 +333,7 @@
|
|||
// 發送AJAX GET請求
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/location_name-" + location_name + "-time-" + time,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/location_name-" + location_name + "-time-" + time,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -394,7 +394,7 @@
|
|||
}
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/license_plate_number-" + license_plate_number,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/license_plate_number-" + license_plate_number,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -427,7 +427,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/location_name_1_-" + name + "-start_time-" + start_date + "-end_time-" + end_date,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/location_name_1_-" + name + "-start_time-" + start_date + "-end_time-" + end_date,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -452,7 +452,7 @@
|
|||
console.log(select_location)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/location-" + select_location,
|
||||
url: "http://localhost:7700/api/Yuntech_in_car_table/location-" + select_location,
|
||||
data: {},
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -482,7 +482,7 @@
|
|||
var end_time = new Date(end_date).toISOString();
|
||||
|
||||
// 構建請求URL
|
||||
var url = "http://140.125.20.183:7700/api/Yuntech_in_car_table/location_name_2_-" + name + "-start_time-" + start_date + "-end_time-" + end_date + "-export_excel";
|
||||
var url = "http://localhost:7700/api/Yuntech_in_car_table/location_name_2_-" + name + "-start_time-" + start_date + "-end_time-" + end_date + "-export_excel";
|
||||
|
||||
// 發送HTTP GET請求到Web API動作方法
|
||||
fetch(url, {
|
||||
|
@ -525,7 +525,7 @@
|
|||
<script>
|
||||
function export_excel() {
|
||||
// 發送HTTP GET請求到Web API動作方法
|
||||
fetch('http://140.125.20.183:7700/api/Yuntech_in_car_table/export-all_excel', {
|
||||
fetch('http://localhost:7700/api/Yuntech_in_car_table/export-all_excel', {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
|
@ -571,7 +571,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -593,7 +593,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -609,7 +609,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
var date = document.getElementById("serch_text_id").value
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_history/date-" + date,
|
||||
url: "http://localhost:7700/api/Parking_spaces_history/date-" + date,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -70,8 +70,8 @@
|
|||
function get_data() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
//url: "http://140.125.20.183:7700/api/Parking_spaces_history/parking_space_area-" + name,
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_history",
|
||||
//url: "http://localhost:7700/api/Parking_spaces_history/parking_space_area-" + name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_history",
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -117,7 +117,7 @@
|
|||
function select_data(){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table",
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -142,7 +142,7 @@
|
|||
var name = document.getElementById("select_id").value
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_history/parking_space_area-" + name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_history/parking_space_area-" + name,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
|
|
@ -194,7 +194,7 @@
|
|||
var license_plate_number = document.getElementById("serch_text_id").value
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_instant/license_plate_number-" + license_plate_number,
|
||||
url: "http://localhost:7700/api/Parking_spaces_instant/license_plate_number-" + license_plate_number,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -225,7 +225,7 @@
|
|||
console.log(token_check)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table",
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table",
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -297,7 +297,7 @@
|
|||
function get_single_parking_space_car(name){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_instant/parking_space_area-" + name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_instant/parking_space_area-" + name,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -328,8 +328,8 @@
|
|||
var stringify_obj = JSON.stringify(obj);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table",
|
||||
//url: "http://140.125.20.183:7700/api/Postural_Analysis_1",
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table",
|
||||
//url: "http://localhost:7700/api/Postural_Analysis_1",
|
||||
//data: {test_id: test_id, test_date: test_date, test_time: test_time, test_analyst: test_analyst, img: img, data_creat_time: "2022-10-04T18:47:40.887014" },
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
|
@ -353,7 +353,7 @@
|
|||
function delet_data(name){
|
||||
$.ajax({
|
||||
type: "DELETE",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table/"+name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table/"+name,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -394,7 +394,7 @@
|
|||
console.log(token)
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token_check',
|
||||
url: 'http://localhost:7700/Users/token_check',
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -416,7 +416,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/token-' + token,
|
||||
url: 'http://localhost:7700/Users/token-' + token,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
@ -432,7 +432,7 @@
|
|||
var token = localStorage.getItem('token_park_space');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'http://140.125.20.183:7700/Users/user_id-' + id,
|
||||
url: 'http://localhost:7700/Users/user_id-' + id,
|
||||
headers: {
|
||||
'Authorization': token
|
||||
},
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
console.log(stringify_obj)
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_instant",
|
||||
url: "http://localhost:7700/api/Parking_spaces_instant",
|
||||
//data: {test_id: test_id, test_date: test_date, test_time: test_time, test_analyst: test_analyst, img: img, data_creat_time: "2022-10-04T18:47:40.887014" },
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
|
@ -151,7 +151,7 @@
|
|||
console.log(stringify_obj)
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_history",
|
||||
url: "http://localhost:7700/api/Parking_spaces_history",
|
||||
//data: {test_id: test_id, test_date: test_date, test_time: test_time, test_analyst: test_analyst, img: img, data_creat_time: "2022-10-04T18:47:40.887014" },
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
|
@ -194,7 +194,7 @@
|
|||
var name = document.getElementById("parking_spaces_name_id").value
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_instant/parking_space_area-" + name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_instant/parking_space_area-" + name,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -274,7 +274,7 @@
|
|||
serial_number = car_serial_number
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_instant/parking_space_area_name-" + location_name + "-time-" + time,
|
||||
url: "http://localhost:7700/api/Parking_spaces_instant/parking_space_area_name-" + location_name + "-time-" + time,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
@ -327,7 +327,7 @@
|
|||
|
||||
$.ajax({
|
||||
type: "Post",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_history",
|
||||
url: "http://localhost:7700/api/Parking_spaces_history",
|
||||
data: stringify_obj,
|
||||
contentType: "application/json",
|
||||
success: function (msg) {
|
||||
|
@ -340,7 +340,7 @@
|
|||
function delet_data_2(location_name, name, time) {
|
||||
$.ajax({
|
||||
type: "DELETE",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_instant/parking_space_name-" + location_name + "-time-" + time,
|
||||
url: "http://localhost:7700/api/Parking_spaces_instant/parking_space_name-" + location_name + "-time-" + time,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
var name = document.getElementById("parking_spaces_name_id").value
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Parking_spaces_total_table/" + name,
|
||||
url: "http://localhost:7700/api/Parking_spaces_total_table/" + name,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
headers: {
|
||||
|
|
BIN
Parking_spaces/wwwroot/bootstrap_1/img/1.jpg
Normal file
BIN
Parking_spaces/wwwroot/bootstrap_1/img/1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 236 KiB |
Loading…
Reference in New Issue
Block a user