工程模式 首頁 新增個別更新 修復小bug

This commit is contained in:
威勝 張 2024-02-05 11:26:36 +08:00
parent 1d57b03f20
commit 852d37b5aa
4 changed files with 21 additions and 11 deletions

View File

@ -142,7 +142,9 @@
<div class="col-xl-8 col-lg-8">
<div class="card shadow mb-8">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">每日違規數量</h6>
<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_violation_data_1()"></button>
</h6>
</div>
<div class="card-body">
<div class="chart-bar">
@ -156,7 +158,9 @@
<div class="card shadow mb-4">
<!-- Card Header - Dropdown -->
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">字幕機狀態</h6>
<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_LED_data()"></button>
</h6>
</div>
<!-- Card Body -->
<div>
@ -189,7 +193,9 @@
<div class="col-xl-8 col-lg-8">
<div class="card shadow mb-8">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">每日車流量</h6>
<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>
</h6>
</div>
<div class="card-body">
<div class="chart-bar">
@ -220,7 +226,8 @@
<!--設定數據圖數據-每日車流量-->
<script>
function set_in_yuntech_table(labels, dailyTrafficData) {
//dailyTrafficData.reverse();
date = JSON.parse(JSON.stringify(labels));
values = JSON.parse(JSON.stringify(dailyTrafficData));
// 假設你有一些資料,例如每日車流量
var dailyTrafficData = dailyTrafficData
@ -231,10 +238,10 @@
var myBarChart = new Chart(ctx, {
type: 'bar',
data: {
labels: labels,
labels: date.reverse(),
datasets: [{
label: '車流量',
data: dailyTrafficData,
data: values.reverse(),
backgroundColor: 'rgba(75, 192, 192, 0.2)', // 設定背景色
borderColor: 'rgba(75, 192, 192, 1)', // 設定邊框色
borderWidth: 1
@ -259,8 +266,8 @@
<script>
function set_violation_table(labels, dailyTrafficData) {
labels.reverse();
dailyTrafficData.reverse();
date = JSON.parse(JSON.stringify(labels));
values = JSON.parse(JSON.stringify(dailyTrafficData));
// 假設你有一些資料,例如每日違規數量
var dailyTrafficData = dailyTrafficData;
@ -271,10 +278,10 @@
var myBarChart = new Chart(ctx, {
type: 'bar',
data: {
labels: labels,
labels: date.reverse(),
datasets: [{
label: '違規數量',
data: dailyTrafficData,
data: values.reverse(),
backgroundColor: 'rgba(255, 0, 0, 0.5)', // 設定半透明的紅色背景
borderColor: 'rgba(255, 0, 0, 1)', // 設定不透明的紅色邊框
borderWidth: 1
@ -303,6 +310,7 @@
var token_ckeck //= document.getElementById("token_ckeck_id").value
var position //職位
function get_violation_data_1() {
violation_car_list = []
//console.log("start")
//token_check = document.getElementById("token_check_id").value
//console.log(token_check)
@ -385,8 +393,9 @@
var timeDifference = endDate - startDate;
var daysDifference = Math.floor(timeDifference / (1000 * 60 * 60 * 24));// 轉換為天數(毫秒 / 1000 / 60 / 60 / 24
////console.log(daysDifference)
if (daysDifference > 6) {
console.log(date_list)
break
}
@ -475,6 +484,7 @@
<!--獲取進入雲科資料-->
<script>
function get_in_yuntech_data_1() {
in_car_list = []
//console.log(token_check)
$.ajax({
type: "GET",

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB