Merge remote-tracking branch 'origin/master'

master
wenjy 2 years ago
commit c9635228ac

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

@ -45,29 +45,26 @@ $(() => {
energyConsumption(result, document.getElementById("energyConsumption")); energyConsumption(result, document.getElementById("energyConsumption"));
}); });
const tableRes = {}
//生产计划 //生产计划
const getTable = () => {
$.ajax({ $.ajax({
url: '/storage/getProductionPlan', url: '/tankShellDevice/getDeviceParameterValue',
type: 'GET', type: 'GET',
dataType: 'JSON', dataType: 'JSON',
success: function (res) { success: function (res) {
console.log('update'); if (res.length === tableRes.data?.length) return
let Res = res console.log(res.map(val => [val.prameterValue]) == tableRes.data);
Res.data.forEach(val => { $('#productionPlan').remove()
val[0] = 'SHEBEI452736' $('.scrollTable').html('<div class="productionPlan" id="productionPlan"></div>')
val[1] = 'AGYM45HH23' tableRes.data = res.map(val => [val.deviceId,val.prameterName,val.prameterValue,val.createTime,])
val[2] = Math.random() * 30 tableRes.header = ['设备名称', '参数名称', '当前值', '时间',]
val[3] = '2021.01.01 10:00:00'
delete val[4]
});
Res.header = ['设备名称', '参数名称', '当前值', '时间',]
console.log(Res);
dynamicTable({ dynamicTable({
el: '#productionPlan', el: '#productionPlan',
rowNum: 5, rowNum: 5,
timeout: 0, timeout: 0,
header: Res.header, header: tableRes.header,
data: Res.data, data: tableRes.data,
index: false, index: false,
fontColor: '#B4B7BF ', fontColor: '#B4B7BF ',
indexBGC: '#86F3FF', indexBGC: '#86F3FF',
@ -81,6 +78,11 @@ $(() => {
console.log(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