新增 透過時間搜尋 、車牌搜尋
This commit is contained in:
parent
d087812571
commit
315e2a9608
@ -9,7 +9,12 @@
|
||||
<h1>違規車輛</h1>
|
||||
|
||||
<div class="size2">
|
||||
起始時間 : <input type="date" id="start_date_id">
|
||||
結束時間 : <input type="date" id="end_date_id">
|
||||
<button style="height:30px; " class="btn btn-outline-secondary" onclick="serch_date_click()">搜尋</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" />
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -234,7 +239,52 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--透過車牌號碼搜尋-->
|
||||
<script>
|
||||
function serch_click() {
|
||||
var license_plate_number = document.getElementById("serch_text_id").value
|
||||
if (license_plate_number == "") {
|
||||
get_data()
|
||||
}
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Violation_car_table/license_plate_number-" + license_plate_number,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
success: function (Model) {
|
||||
console.log(Model)
|
||||
All_Model = Model
|
||||
set_data(Model)
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<!--透過日期搜尋紀錄-->
|
||||
<script>
|
||||
function serch_date_click() {
|
||||
var name = document.getElementById("parking_spaces_name_id").value
|
||||
var start_date = document.getElementById("start_date_id").value
|
||||
var end_date = document.getElementById("end_date_id").value
|
||||
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,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
success: function (Model) {
|
||||
console.log(Model)
|
||||
All_Model = Model
|
||||
set_data(Model)
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--刪除資料-->
|
||||
<script>
|
||||
|
@ -8,7 +8,12 @@
|
||||
|
||||
|
||||
<div class="size2">
|
||||
起始時間 : <input type="date" id="start_date_id">
|
||||
結束時間 : <input type="date" id="end_date_id">
|
||||
<button style="height:30px; " class="btn btn-outline-secondary" onclick="serch_date_click()">搜尋</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" />
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -158,7 +163,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--違規車輛詳細-->
|
||||
<!--車輛詳細-->
|
||||
<script>
|
||||
function detail_data(location_name, car_serial_number, time) {
|
||||
//console.log(location_name)
|
||||
@ -186,6 +191,53 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--透過車牌號碼搜尋-->
|
||||
<script>
|
||||
function serch_click() {
|
||||
var license_plate_number = document.getElementById("serch_text_id").value
|
||||
if (license_plate_number == "") {
|
||||
get_data()
|
||||
}
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "http://140.125.20.183:7700/api/Yuntech_in_car_table/license_plate_number-" + license_plate_number,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
success: function (Model) {
|
||||
console.log(Model)
|
||||
All_Model = Model
|
||||
|
||||
set_data(Model)
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--透過日期搜尋紀錄-->
|
||||
<script>
|
||||
function serch_date_click() {
|
||||
var name = "大門口"
|
||||
var start_date = document.getElementById("start_date_id").value
|
||||
var end_date = document.getElementById("end_date_id").value
|
||||
console.log(start_date)
|
||||
$.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,
|
||||
data: {},
|
||||
contentType: "application/json",
|
||||
success: function (Model) {
|
||||
console.log(Model)
|
||||
All_Model = Model
|
||||
set_data(Model)
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--檢查token-->
|
||||
<script>
|
||||
function token_check() {
|
||||
|
Loading…
Reference in New Issue
Block a user