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

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": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "http://140.125.20.183:5173",
"applicationUrl": "http://127.0.0.1:5173",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},

View File

@ -324,14 +324,27 @@
},
success: function (Model) {
console.log(Model)
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:80%"' + ">" + "</td>"
table += "<td id = 'create_data_time_id' >" + Model.in_time + "</td>"
document.getElementById("detail_car_data").innerHTML = table
if (Model.out_time == null) {
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:80%"' + ">" + "</td>"
table += "<td id = 'create_data_time_id' >" + Model.in_time + "</td>"
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();