Merge remote-tracking branch 'origin/master'

master
wenjy 2 years ago
commit c9635228ac

@ -45,42 +45,44 @@ $(() => {
energyConsumption(result, document.getElementById("energyConsumption")); energyConsumption(result, document.getElementById("energyConsumption"));
}); });
const tableRes = {}
//生产计划 //生产计划
$.ajax({ const getTable = () => {
url: '/storage/getProductionPlan', $.ajax({
type: 'GET', url: '/tankShellDevice/getDeviceParameterValue',
dataType: 'JSON', type: 'GET',
success: function (res) { dataType: 'JSON',
console.log('update'); success: function (res) {
let Res = res if (res.length === tableRes.data?.length) return
Res.data.forEach(val => { console.log(res.map(val => [val.prameterValue]) == tableRes.data);
val[0] = 'SHEBEI452736' $('#productionPlan').remove()
val[1] = 'AGYM45HH23' $('.scrollTable').html('<div class="productionPlan" id="productionPlan"></div>')
val[2] = Math.random() * 30 tableRes.data = res.map(val => [val.deviceId,val.prameterName,val.prameterValue,val.createTime,])
val[3] = '2021.01.01 10:00:00' tableRes.header = ['设备名称', '参数名称', '当前值', '时间',]
delete val[4] dynamicTable({
}); el: '#productionPlan',
Res.header = ['设备名称', '参数名称', '当前值', '时间',] rowNum: 5,
console.log(Res); timeout: 0,
dynamicTable({ header: tableRes.header,
el: '#productionPlan', data: tableRes.data,
rowNum: 5, index: false,
timeout: 0, fontColor: '#B4B7BF ',
header: Res.header, indexBGC: '#86F3FF',
data: Res.data, headerBGC: 'rgba(8,36,75,0.2)',
index: false, oddRowBGC: 'rgba(8,36,75,0.2)',
fontColor: '#B4B7BF ', evenRowBGC: 'rgba(6,25,57,0.2)',
indexBGC: '#86F3FF', colWidth: ['100%', '100%', '40%', '160%',]
headerBGC: 'rgba(8,36,75,0.2)', });
oddRowBGC: 'rgba(8,36,75,0.2)', },
evenRowBGC: 'rgba(6,25,57,0.2)', error: function (e) {
colWidth: ['100%', '100%', '40%', '160%',] console.log(e)
}); }
}, });
error: function (e) { }
console.log(e) getTable()
} setInterval(() => {
}); getTable()
}, 10000);
tableAnimation('#productionPlan') tableAnimation('#productionPlan')
/*数据信息*/ /*数据信息*/
$.getJSON('/tankShellDevice/getDataInformation', function (result) { $.getJSON('/tankShellDevice/getDataInformation', function (result) {

@ -45,42 +45,44 @@ $(() => {
energyConsumption(result, document.getElementById("energyConsumption")); energyConsumption(result, document.getElementById("energyConsumption"));
}); });
const tableRes = {}
//生产计划 //生产计划
$.ajax({ const getTable = () => {
url: '/storage/getProductionPlan', $.ajax({
type: 'GET', url: '/tankShellDevice/getDeviceParameterValue',
dataType: 'JSON', type: 'GET',
success: function (res) { dataType: 'JSON',
console.log('update'); success: function (res) {
let Res = res if (res.length === tableRes.data?.length) return
Res.data.forEach(val => { console.log(res.map(val => [val.prameterValue]) == tableRes.data);
val[0] = 'SHEBEI452736' $('#productionPlan').remove()
val[1] = 'AGYM45HH23' $('.scrollTable').html('<div class="productionPlan" id="productionPlan"></div>')
val[2] = Math.random() * 30 tableRes.data = res.map(val => [val.deviceId,val.prameterName,val.prameterValue,val.createTime,])
val[3] = '2021.01.01 10:00:00' tableRes.header = ['设备名称', '参数名称', '当前值', '时间',]
delete val[4] dynamicTable({
}); el: '#productionPlan',
Res.header = ['设备名称', '参数名称', '当前值', '时间',] rowNum: 5,
console.log(Res); timeout: 0,
dynamicTable({ header: tableRes.header,
el: '#productionPlan', data: tableRes.data,
rowNum: 5, index: false,
timeout: 0, fontColor: '#B4B7BF ',
header: Res.header, indexBGC: '#86F3FF',
data: Res.data, headerBGC: 'rgba(8,36,75,0.2)',
index: false, oddRowBGC: 'rgba(8,36,75,0.2)',
fontColor: '#B4B7BF ', evenRowBGC: 'rgba(6,25,57,0.2)',
indexBGC: '#86F3FF', colWidth: ['100%', '100%', '40%', '160%',]
headerBGC: 'rgba(8,36,75,0.2)', });
oddRowBGC: 'rgba(8,36,75,0.2)', },
evenRowBGC: 'rgba(6,25,57,0.2)', error: function (e) {
colWidth: ['100%', '100%', '40%', '160%',] console.log(e)
}); }
}, });
error: function (e) { }
console.log(e) getTable()
} setInterval(() => {
}); getTable()
}, 10000);
tableAnimation('#productionPlan') tableAnimation('#productionPlan')
/*数据信息*/ /*数据信息*/
$.getJSON('/tankShellDevice/getDataInformation', function (result) { $.getJSON('/tankShellDevice/getDataInformation', function (result) {

Loading…
Cancel
Save