變更查詢進出校園頁面 新增出去車圖片

This commit is contained in:
leo890808 2024-04-30 16:05:28 +08:00
parent c5aaca4df4
commit 5f1653236e
2 changed files with 22 additions and 9 deletions

View File

@ -11,7 +11,7 @@
"Parking_spaces": { "Parking_spaces": {
"commandName": "Project", "commandName": "Project",
"launchBrowser": true, "launchBrowser": true,
"applicationUrl": "http://140.125.20.183:5173", "applicationUrl": "http://127.0.0.1:5173",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },

View File

@ -324,6 +324,7 @@
}, },
success: function (Model) { success: function (Model) {
console.log(Model) console.log(Model)
if (Model.out_time == null) {
table = "<tr>"; table = "<tr>";
table += "<td>" + Model.location + "</td>" table += "<td>" + Model.location + "</td>"
table += "<td>" + '<input type="text" id = "license_plate_number_text_id" value="' + Model.license_plate_number + '"/>' + "</td>" table += "<td>" + '<input type="text" id = "license_plate_number_text_id" value="' + Model.license_plate_number + '"/>' + "</td>"
@ -333,6 +334,18 @@
table += "<td id = 'create_data_time_id' >" + Model.in_time + "</td>" table += "<td id = 'create_data_time_id' >" + Model.in_time + "</td>"
document.getElementById("detail_car_data").innerHTML = table document.getElementById("detail_car_data").innerHTML = table
} }
else {
table = "<tr>";
table += "<td>" + Model.location + "</td>"
table += "<td>" + '<input type="text" id = "license_plate_number_text_id" value="' + Model.license_plate_number + '"/>' + "</td>"
//table += "<td>" + "</td>"
//table += "<td>" + "</td>"
table += "<td>" + "<img src=" + Model.car_img + ' style="width:60%"' + ">"+ "<img src=" + Model.out_car_img + ' style="width:60%"' + ">" + "</td>"
table += "<td id = 'create_data_time_id' >" + "進入時間:" + Model.in_time + "<br/>"+"<br/>" + "出去時間: " + Model.out_time + "</td>"
document.getElementById("detail_car_data").innerHTML = table
}
}
}); });
detail_car_data_view.showModal(); detail_car_data_view.showModal();
} }