Merge remote-tracking branch 'origin/master'

master
wenjy 2 years ago
commit c9635228ac

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

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

Loading…
Cancel
Save