修改默认条数

This commit is contained in:
haozq 2024-08-23 15:13:36 +08:00
parent 6dd7f53bd5
commit 86023302e4
6 changed files with 132 additions and 127 deletions

View File

@ -193,7 +193,8 @@ body {
#left-bottom {
width: 100%;
height: 57.8%;
height: 95.8%;
/*height: 57.8%;*/
background: url("../../img/video/ball_list.png") no-repeat 0 0 / 100% 100%;
background-position: center center !important;
}

View File

@ -2,8 +2,8 @@ let form, layer;
layui.use(function () {
let isc_login="http://iscssotest.ah.sgcc.com.cn/isc_sso/login?service=";
let logUrl="http://27.50.49.56:21624/zhgd-web/sgIndex.html";
// window.location.href =isc_login+logUrl;
// return false;
window.location.href =isc_login+logUrl;
return false;
form = layui.form;
layer = layui.layer;
form.on('submit(demo-login)', function (data) {

View File

@ -66,7 +66,7 @@ function realTimeMonitoring(){
<div class="item-icon"></div>
</div>`
}
$("#flex-Box").append(itemHtml)
})
}
@ -94,20 +94,20 @@ function DaylightDisplacementList(deviceId){
},
cols: [[
{field: 'number', width:80,title: '序号', align: 'center', type: 'numbers', fixed: 'left'},
// {field: 'areaName', title: '区域'},
// {field: 'areaName', title: '区域'},
{field: 'deviceName', title: '设备名称'},
{field: 'moduleName', title: '检测类型'},
{field: 'val', title: '检测值'},
// {field: 'sourceData', title: '原数据'},
// {field: 'sourceData', title: '原数据'},
{field: 'changeVal', title: '变化值'},
{field: 'createTime', title: '检测时间'},
{field: 'isWarn', title: '状态', templet: function (d) {
if (d.isWarn == 0) {
if (d.isWarn == 1) {
return '<span style="color: #FF5722;">告警</span>';
} else if (d.isWarn == 1) {
} else if (d.isWarn == 0) {
return '<span style="color: #5FB878;">正常</span>';
}else{
return '<span></span>';
return '<span style="color: #5FB878;">正常</span>';
}
}
}
@ -137,7 +137,8 @@ function DaylightDisplacementApi(){
"roleCode": roleCode,
"orgId": orgId,
"userId": userId,
"bidCode": bidCode
"bidCode": bidCode,
"deviceType":1908
}
let encryptStr = encryptCBC(JSON.stringify(params));
ajaxRequest(url, "POST", encryptStr, true, function () {
@ -151,8 +152,8 @@ function DaylightDisplacementApi(){
loginout(1)
}
}, function (xhr, status, error) {
error(xhr, status, error)
}, "application/json",aqEnnable);
error(xhr, status, error)
}, "application/json",aqEnnable);
}
function DaylightDisplacement(environmentData) {
@ -204,111 +205,112 @@ function zephyrineWeather() {
// navigator.geolocation.getCurrentPosition(function (position) {
// let latitude = position.coords.latitude;
// let longitude = position.coords.longitude;
let latitude = '31.93566198931321';
let longitude = '117.16010067578883';
console.log("经度:" + longitude + ", 纬度:" + latitude);
let latLon = longitude + ',' + latitude;
// 百度地图API
// 创建一个点坐标
var point = new BMap.Point(longitude, latitude);
let latitude = '34.007143';
let longitude = '116.884782';
console.log("经度:" + longitude + ", 纬度:" + latitude);
let latLon = '116.747321,33.934215';
// 根据坐标点获取位置信息
var geoc = new BMap.Geocoder();
geoc.getLocation(point, function(rs){
var addComp = rs.addressComponents;
var city = addComp.city;
var urban = addComp.city + ", " + addComp.district;
$("#city").text(city);
$("#urban").text(urban);
});
// 百度地图API
// 创建一个点坐标
var point = new BMap.Point(longitude, latitude);
const apiUrl = `https://devapi.qweather.com/v7/weather/now?location=${latLon}&key=b353808cee6649dba8ea4c6838319ea4`;
fetch(apiUrl)
.then(response => response.json())
.then(data => {
const dailyWeather = data.now;
$("#temp").text(dailyWeather.temp + "°");
$("#environment").text(dailyWeather.text);
if (dailyWeather.text === "晴") {
$("#weather_icon").css("background-image", "url('../../img/operEnvironment/clearWeather2.png')");
} else if (dailyWeather.text === "多云") {
$("#weather_icon").css("background-image", "url('../../img/operEnvironment/cloudy.png')");
} else if (dailyWeather.text === "阴") {
$("#weather_icon").css("background-image", "url('../../img/operEnvironment/cloudy_sm.png')");
} else if (dailyWeather.text === "中雨" || dailyWeather.text === "大雨" || dailyWeather.text === "雨" || dailyWeather.text === "小雨") {
$("#weather_icon").css("background-image", "url('../../img/operEnvironment/cloudy_sm.png')");
}
})
.catch(error => {
console.error('Error fetching weather data:', error);
// 根据坐标点获取位置信息
var geoc = new BMap.Geocoder();
geoc.getLocation(point, function(rs){
var addComp = rs.addressComponents;
var city = addComp.city;
var urban = addComp.city + ", " + addComp.district;
$("#city").text(city);
$("#urban").text(urban);
});
const apiUrl = `https://devapi.qweather.com/v7/weather/now?location=${latLon}&key=b353808cee6649dba8ea4c6838319ea4`;
fetch(apiUrl)
.then(response => response.json())
.then(data => {
const dailyWeather = data.now;
$("#temp").text(dailyWeather.temp + "°");
$("#environment").text(dailyWeather.text);
if (dailyWeather.text === "晴") {
$("#weather_icon").css("background-image", "url('../../img/operEnvironment/clearWeather2.png')");
} else if (dailyWeather.text === "多云") {
$("#weather_icon").css("background-image", "url('../../img/operEnvironment/cloudy.png')");
} else if (dailyWeather.text === "阴") {
$("#weather_icon").css("background-image", "url('../../img/operEnvironment/cloudy_sm.png')");
} else if (dailyWeather.text === "中雨" || dailyWeather.text === "大雨" || dailyWeather.text === "雨" || dailyWeather.text === "小雨") {
$("#weather_icon").css("background-image", "url('../../img/operEnvironment/cloudy_sm.png')");
}
})
.catch(error => {
console.error('Error fetching weather data:', error);
});
const apiUrls = `https://devapi.qweather.com/v7/weather/3d?location=${latLon}&key=b353808cee6649dba8ea4c6838319ea4`;
fetch(apiUrls)
.then(response => response.json())
.then(data => {
// 获取每日天气数据
const dailyWeather = data.daily;
if (dailyWeather && Array.isArray(dailyWeather)) {
dailyWeather.forEach((day, index) => {
const dayIndex = index + 1;
const dateId = `#date${dayIndex}`;
const tempsId = `#temps${dayIndex}`;
const airId = `#air${dayIndex}`;
const iconId = `#weather_small_icon${dayIndex}`;
// 更新HTML元素内容
$(dateId).text(day.fxDate);
$(tempsId).text(day.tempMin + '°~' + day.tempMax + '°');
$(airId).text(day.textDay);
// 根据天气情况更新背景图片
const weatherIcon = getWeatherIcon(day.textDay);
$(iconId).css('backgroundImage', `url('../../img/operEnvironment/${weatherIcon}')`);
});
} else {
console.log('未能获取有效的天气数据');
}
})
.catch(error => {
console.error('Error fetching weather data:', error);
});
const apiUrls = `https://devapi.qweather.com/v7/weather/3d?location=${latLon}&key=b353808cee6649dba8ea4c6838319ea4`;
fetch(apiUrls)
.then(response => response.json())
.then(data => {
// 获取每日天气数据
const dailyWeather = data.daily;
if (dailyWeather && Array.isArray(dailyWeather)) {
dailyWeather.forEach((day, index) => {
const dayIndex = index + 1;
const dateId = `#date${dayIndex}`;
const tempsId = `#temps${dayIndex}`;
const airId = `#air${dayIndex}`;
const iconId = `#weather_small_icon${dayIndex}`;
const apiUrlss = `https://devapi.qweather.com/v7/weather/24h?location=${latLon}&key=b353808cee6649dba8ea4c6838319ea4`;
fetch(apiUrlss)
.then(response => response.json())
.then(data => {
// 获取每小时天气数据
const dailyWeather = data.hourly;
if (dailyWeather && Array.isArray(dailyWeather) && dailyWeather.length >= 7) {
// 更新HTML元素内容
$(dateId).text(day.fxDate);
$(tempsId).text(day.tempMin + '°~' + day.tempMax + '°');
$(airId).text(day.textDay);
// 根据天气情况更新背景图片
const weatherIcon = getWeatherIcon(day.textDay);
$(iconId).css('backgroundImage', `url('../../img/operEnvironment/${weatherIcon}')`);
});
} else {
console.log('未能获取有效的天气数据');
}
})
.catch(error => {
console.error('Error fetching weather data:', error);
dailyWeather.slice(0, 7).map(hourlyData => {
const weather = hourlyData.text; // 天气
const temperature = hourlyData.temp; // 温度
const time = new Date(hourlyData.fxTime); // 获取时间日期对象
let weatherIcon = getWeatherIcon(weather);
weatherArray.push(weather);
weatherIconArray.push(`../../img/operEnvironment/${weatherIcon}`);
temperatureArray.push(temperature);
timeArray.push(`${time.getHours()}:${time.getMinutes()}`); // 将小时和分钟以字符串形式存入数组
});
console.log('天气数组:', weatherArray);
console.log('天气图标数组:', weatherIconArray);
console.log('温度数组:', temperatureArray);
console.log('时间数组:', timeArray);
//天气echarts图表
connect2();
const apiUrlss = `https://devapi.qweather.com/v7/weather/24h?location=${latLon}&key=b353808cee6649dba8ea4c6838319ea4`;
fetch(apiUrlss)
.then(response => response.json())
.then(data => {
// 获取每小时天气数据
const dailyWeather = data.hourly;
if (dailyWeather && Array.isArray(dailyWeather) && dailyWeather.length >= 7) {
} else {
console.log('未能获取有效的天气数据或数据不足7组');
}
})
.catch(error => {
console.error('获取天气数据时发生错误:', error);
});
dailyWeather.slice(0, 7).map(hourlyData => {
const weather = hourlyData.text; // 天气
const temperature = hourlyData.temp; // 温度
const time = new Date(hourlyData.fxTime); // 获取时间日期对象
let weatherIcon = getWeatherIcon(weather);
weatherArray.push(weather);
weatherIconArray.push(`../../img/operEnvironment/${weatherIcon}`);
temperatureArray.push(temperature);
timeArray.push(`${time.getHours()}:${time.getMinutes()}`); // 将小时和分钟以字符串形式存入数组
});
console.log('天气数组:', weatherArray);
console.log('天气图标数组:', weatherIconArray);
console.log('温度数组:', temperatureArray);
console.log('时间数组:', timeArray);
//天气echarts图表
connect2();
} else {
console.log('未能获取有效的天气数据或数据不足7组');
}
})
.catch(error => {
console.error('获取天气数据时发生错误:', error);
});
// });
// });
// } else {
// console.log("浏览器不支持 Geolocation API");
// }
@ -490,8 +492,8 @@ function LimitedSpaceApi(){
loginout(1)
}
}, function (xhr, status, error) {
error(xhr, status, error)
}, "application/json",aqEnnable);
error(xhr, status, error)
}, "application/json",aqEnnable);
}
function LimitedSpace(environmentData) {
@ -570,8 +572,8 @@ function LimitedSpaceEnvironmentApi(deviceId){
loginout(1)
}
}, function (xhr, status, error) {
error(xhr, status, error)
}, "application/json",aqEnnable);
error(xhr, status, error)
}, "application/json",aqEnnable);
}
//GPS安装检测
@ -581,7 +583,8 @@ function GPSInstallationApi(){
"roleCode": roleCode,
"orgId": orgId,
"userId": userId,
"bidCode": bidCode
"bidCode": bidCode,
"deviceType":"1910"
}
let encryptStr = encryptCBC(JSON.stringify(params));
ajaxRequest(url, "POST", encryptStr, true, function () {
@ -595,11 +598,12 @@ function GPSInstallationApi(){
loginout(1)
}
}, function (xhr, status, error) {
error(xhr, status, error)
}, "application/json",aqEnnable);
error(xhr, status, error)
}, "application/json",aqEnnable);
}
function GPSInstallation(environmentData) {
function
GPSInstallation(environmentData) {
console.log(environmentData);
if(environmentData && environmentData.length>0){
GPSInstallationEnvironmentApi(environmentData[0].deviceId);
@ -674,7 +678,7 @@ function GPSInstallationEnvironmentApi(deviceId){
loginout(1)
}
}, function (xhr, status, error) {
error(xhr, status, error)
}, "application/json",aqEnnable);
error(xhr, status, error)
}, "application/json",aqEnnable);
}

View File

@ -204,9 +204,9 @@ function getVehicleStatisticsList(bidCode) {
},
cols: [[
{ type: 'numbers', title: '序号' }, // 添加序号列
{ field: 'proName', title: '工程名称', align: 'center', width: '10%' },
{ field: 'carNum', title: '车牌号', align: 'center', width: '15%' },
{ field: 'userName', title: '司机', align: 'center', width: '15%' },
{ field: 'proName', title: '工程名称', align: 'center', width: '20%' },
{ field: 'carNum', title: '车牌号', align: 'center', width: '10%' },
{ field: 'userName', title: '司机', align: 'center', width: '10%' },
{ field: 'phone', title: '司机电话', align: 'center', width: '20%' },
{ field: 'accessType', title: '状态', align: 'center', width: '10%' },
{ field: 'accesssTime', title: '时间', align: 'center', width: '30%' }

View File

@ -143,7 +143,7 @@ let loading;
// 当语音识别服务错误时触发
recognition.onerror = function(error) {
layer.close(loading);
// console.error('语音识别服务错误:', error);
console.error('语音识别服务错误:', error);
layer.msg('浏览器不支持语音识别服务', {
icon: 6,
time: 1000

View File

@ -25,7 +25,7 @@
<div id="main-box" class="layout">
<div id="left-box" class="layout">
<!-- 云台控制 -->
<div id="left-top" class="layout">
<div id="left-top" class="layout" style="display: none">
<div id="left-top-one" class="layout">
<div id="one-child">
<div id="yclx" class="layout">
@ -93,16 +93,16 @@
<div id="left-bottom">
<div id="search-box">
<form class="layui-form layout" onsubmit="return false;">
<input class="layui-input" autocomplete="off" id="keyWord" placeholder="请输入关键字">
<img src="../../img/video/search.png" id="search-img" alt="搜索" onclick="loadVideoTree()">
<input class="layui-input" autocomplete="off" style="margin-top: 10px" id="keyWord" placeholder="请输入关键字">
<img src="../../img/video/search.png" style="margin-top: 10px" id="search-img" alt="搜索" onclick="loadVideoTree()">
</form>
</div>
<div id="device-online-box" class="layout">
<div id="device-online-box" class="layout" style="margin-top: 10px">
<div class="device-status layout">全部0</div>
<div class="device-status layout">在线0</div>
<div class="device-status layout">离线0</div>
</div>
<div id="device-tree">
<div id="device-tree" style="margin-top: 10px">
<ul id="video-tree" class="dtree" style="height: 100%;overflow: auto;margin: 0 2%;" data-id="-1"></ul>
</div>
</div>