@@ -31,10 +31,10 @@ $(() =>{
$('body').append(html);
})
-let onDutyPlan = (scheduledProductionNumber,actualOutPutNumber,differenceValueNumber) =>{
+let onDutyPlan = (scheduledProductionNumber, actualOutPutNumber, differenceValueNumber) => {
const scheduledProduction = [];
- const actualOutPut = [];
- const differenceValue = [];
+ const actualOutPut = [];
+ const differenceValue = [];
for (let i = 1; i <= 4; i++) {
scheduledProduction.push(`#scheduledProduction :nth-child(${i})`);
@@ -47,11 +47,11 @@ let onDutyPlan = (scheduledProductionNumber,actualOutPutNumber,differenceValueNu
updateSplitBlocks(differenceValueNumber, differenceValue);
}
-let storageStatistics = (leftInStoreNumber,leftOutStoreNumber,rightInStoreNumber,rightOutStoreNumber) =>{
+let storageStatistics = (leftInStoreNumber, leftOutStoreNumber, rightInStoreNumber, rightOutStoreNumber) => {
const leftInStore = [];
const leftOutStore = [];
- const rightInStore = [];
- const rightOutStore = [];
+ const rightInStore = [];
+ const rightOutStore = [];
for (let i = 1; i <= 4; i++) {
leftInStore.push(`#theCurrentTeam :nth-child(${i})`);
@@ -59,8 +59,8 @@ let storageStatistics = (leftInStoreNumber,leftOutStoreNumber,rightInStoreNumber
rightInStore.push(`#actualOutPut :nth-child(${i})`);
rightOutStore.push(`#differenceValue :nth-child(${i})`);
}
- updateSplitBlocks(leftInStoreNumber, leftInStore);
- updateSplitBlocks(leftOutStoreNumber, leftOutStore);
- updateSplitBlocks(rightInStoreNumber, rightInStore);
- updateSplitBlocks(rightOutStoreNumber, rightOutStore);
+ updateSplitBlocks(leftInStoreNumber || 0, leftInStore);
+ updateSplitBlocks(leftOutStoreNumber || 0, leftOutStore);
+ updateSplitBlocks(rightInStoreNumber || 0, rightInStore);
+ updateSplitBlocks(rightOutStoreNumber || 0, rightOutStore);
}
\ No newline at end of file
diff --git a/productionboard/src/main/resources/static/js/common/scrollTable.js b/productionboard/src/main/resources/static/js/common/scrollTable.js
index 2f47b3a..791c3a3 100644
--- a/productionboard/src/main/resources/static/js/common/scrollTable.js
+++ b/productionboard/src/main/resources/static/js/common/scrollTable.js
@@ -1,6 +1,6 @@
/**
* dynamicTable 动态表格
- * @param { Object } resource
+ * @param { Object } resource
* @param { String } el : 指定元素
* @param { Array } header : 表头
* @param { Array } data : 数据行
@@ -15,47 +15,47 @@
* @param { Array } colWidth : 每列的宽度
*/
let dynamicTable = resource => {
- 'use strict';
+ 'use strict';
- //检查参数类型
- if (typeof resource !== 'object') {
- console.error('未传入参数,或者参数不是Object类型');
- return
- }
+ //检查参数类型
+ if (typeof resource !== 'object') {
+ console.error('未传入参数,或者参数不是Object类型');
+ return
+ }
- // 检查是否传入元素
- const ele = resource.el;
- if (!ele) {
- console.error('元素获取不正确!');
- return
- }
- /**
- * 检查是否传入动画触发时长
- * 当时间小于 10 计算为秒级单位,
- * 大于 10 计算为毫秒级单位
- */
- let timeout = resource.timeout;
- if (!timeout) {
- timeout = 2000
- } else if (timeout < 10) {
- timeout = timeout * 1000
- }
+ // 检查是否传入元素
+ const ele = resource.el;
+ if (!ele) {
+ console.error('元素获取不正确!');
+ return
+ }
+ /**
+ * 检查是否传入动画触发时长
+ * 当时间小于 10 计算为秒级单位,
+ * 大于 10 计算为毫秒级单位
+ */
+ let timeout = resource.timeout;
+ if (!timeout) {
+ timeout = 2000
+ } else if (timeout < 10) {
+ timeout = timeout * 1000
+ }
- // 检查 配置元素是否传入数据
- const colName = resource.header === undefined ? '' : resource.header;
- const rowData = resource.data === undefined ? '' : resource.data;
- const rowNum = resource.rowNum === undefined ? '20%' : 100 / resource.rowNum + '%';
- const headerBGC = resource.headerBGC === undefined ? '#999' : resource.headerBGC;
- const oddRowBGC = resource.oddRowBGC === undefined ? '#bbb' : resource.oddRowBGC;
- const evenRowBGC = resource.evenRowBGC === undefined ? '#ddd' : resource.evenRowBGC;
- const fontColor = resource.fontColor === undefined ? 'black' : resource.fontColor;
- const indexBGC = resource.indexBGC === undefined ? '#555' : resource.indexBGC;
- const colIndex = resource.index === undefined ? true : resource.index;
- const colWidth = resource.colWidth === undefined ? false : resource.colWidth;
- const indexColor = fontColor.search(/('black')|(0{3,6})/) ? "white" : fontColor;
+ // 检查 配置元素是否传入数据
+ const colName = resource.header === undefined ? '' : resource.header;
+ const rowData = resource.data === undefined ? '' : resource.data;
+ const rowNum = resource.rowNum === undefined ? '20%' : 100 / resource.rowNum + '%';
+ const headerBGC = resource.headerBGC === undefined ? '#999' : resource.headerBGC;
+ const oddRowBGC = resource.oddRowBGC === undefined ? '#bbb' : resource.oddRowBGC;
+ const evenRowBGC = resource.evenRowBGC === undefined ? '#ddd' : resource.evenRowBGC;
+ const fontColor = resource.fontColor === undefined ? 'black' : resource.fontColor;
+ const indexBGC = resource.indexBGC === undefined ? '#555' : resource.indexBGC;
+ const colIndex = resource.index === undefined ? true : resource.index;
+ const colWidth = resource.colWidth === undefined ? false : resource.colWidth;
+ const indexColor = fontColor.search(/('black')|(0{3,6})/) ? "white" : fontColor;
- //基本table html
- const html = `
+ //基本table html
+ const html = `
@@ -63,195 +63,195 @@ let dynamicTable = resource => {
`;
- //Css样式集
- const boxCSS = {
- overflow: 'hidden',
- background: headerBGC
- };
- const tableCSS = {
- color: fontColor,
- width: '100%',
- height: '100%'
- };
- const theadCSS = {
- width: '100%',
- height: '20%'
- };
- const thead_trCSS = {
- display: "flex",
- flexWrap: "nowrap",
- width: "100%",
- height: "100%",
- background: headerBGC,
- justifyContent: "space-around"
- };
- const thCSS = {
- justifyContent: "space-around",
- fontWeight: "bold"
- };
- const tbodyCSS = {
- width: "100%",
- height: '80%',
- boxSizing: 'border-box'
- };
- const tbody_trCSS = {
- flexWrap: "nowrap",
- width: "100%",
- height: rowNum,
- justifyContent: "space-around"
- };
- const trOddCSS = {
- display: "flex",
- background: oddRowBGC
- };
- const trEvenCSS = {
- display: "flex",
- background: evenRowBGC
- };
- const th_tdCSS = {
- color:'#59B2F6',
- margin: 'auto 0',
- whiteSpace: 'nowrap',
- overflow: "hidden",
- textOverflow: 'ellipsis',
- textAlign: 'center',
- padding: '0 4px 0 4px'
- };
- const indexCSS = {
- display: 'inline-block',
- width: '90%',
- height: "90%",
- background: indexBGC,
- color: indexColor,
- borderRadius: '20%',
- margin: 'auto'
- };
- //插入table元素
- $(ele).append(html);
+ //Css样式集
+ const boxCSS = {
+ overflow: 'hidden',
+ background: headerBGC
+ };
+ const tableCSS = {
+ color: fontColor,
+ width: '100%',
+ height: '100%'
+ };
+ const theadCSS = {
+ width: '100%',
+ height: '20%'
+ };
+ const thead_trCSS = {
+ display: "flex",
+ flexWrap: "nowrap",
+ width: "100%",
+ height: "100%",
+ background: headerBGC,
+ justifyContent: "space-around"
+ };
+ const thCSS = {
+ justifyContent: "space-around",
+ fontWeight: "bold"
+ };
+ const tbodyCSS = {
+ width: "100%",
+ height: '80%',
+ boxSizing: 'border-box'
+ };
+ const tbody_trCSS = {
+ flexWrap: "nowrap",
+ width: "100%",
+ height: rowNum,
+ justifyContent: "space-around"
+ };
+ const trOddCSS = {
+ display: "flex",
+ background: oddRowBGC
+ };
+ const trEvenCSS = {
+ display: "flex",
+ background: evenRowBGC
+ };
+ const th_tdCSS = {
+ color: '#59B2F6',
+ margin: 'auto 0',
+ whiteSpace: 'nowrap',
+ overflow: "hidden",
+ textOverflow: 'ellipsis',
+ textAlign: 'center',
+ padding: '0 4px 0 4px'
+ };
+ const indexCSS = {
+ display: 'inline-block',
+ width: '90%',
+ height: "90%",
+ background: indexBGC,
+ color: indexColor,
+ borderRadius: '20%',
+ margin: 'auto'
+ };
+ //插入table元素
+ $(ele).append(html);
- //核心代码
- //遍历插入数据 表头
- if (colIndex) {
- $(ele + '>.table>.thead>.tr').append('
#
')
- }
- colName.forEach(element => {
- $(ele + '>.table>.thead>.tr').append(`
${element}
`)
- });
+ //核心代码
+ //遍历插入数据 表头
+ if (colIndex) {
+ $(ele + '>.table>.thead>.tr').append('
#
')
+ }
+ colName.forEach(element => {
+ $(ele + '>.table>.thead>.tr').append(`
${element}
`)
+ });
- //遍历插入数据 数据行
- for (let i = 0; i < rowData.length; i++) {
+ //遍历插入数据 数据行
+ for (let i = 0; i < rowData.length; i++) {
- $(ele + '>.table>.tbody').append('
');
- if (colIndex) {
- $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
- `
${i+1}
`)
- }
- rowData[i].forEach(element => {
- if (element == "一级") {
- $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
- `
`
- )
- } else if (element == "二级") {
- $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
- `
`
- )
- } else if (element == "三级") {
- $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
- `
`
- )
- } else if (element == "未处理") {
- $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
- `
${element}
`
- )
- } else if (element == "处理中") {
- $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
- `
${element}
`
- )
- } else if (element == "已结束") {
- $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
- `
${element}
`
- )
- } else {
- $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(`
${element}
`)
- }
+ $(ele + '>.table>.tbody').append('
');
+ if (colIndex) {
+ $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
+ `
${i + 1}
`)
+ }
+ rowData[i].forEach(element => {
+ if (element == "一级") {
+ $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
+ `
`
+ )
+ } else if (element == "二级") {
+ $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
+ `
`
+ )
+ } else if (element == "三级") {
+ $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
+ `
`
+ )
+ } else if (element == "未处理") {
+ $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
+ `
${element}
`
+ )
+ } else if (element == "处理中") {
+ $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
+ `
${element}
`
+ )
+ } else if (element == "已结束") {
+ $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
+ `
${element}
`
+ )
+ } else {
+ $(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(`
${element}
`)
+ }
- })
+ })
- }
+ }
- //设置CSS样式
- $(ele).css(boxCSS);
- $(ele + '>.table').css(tableCSS);
- $(ele + '>.table>.thead').css(theadCSS);
- $(ele + '>.table>.thead>.tr').css(thead_trCSS);
- $(ele + '>.table>.thead>.tr>.th').css(th_tdCSS).css(thCSS);
- $(ele + '>.table>.tbody').css(tbodyCSS);
- $(ele + '>.table>.tbody>.tr').css(tbody_trCSS);
- $(ele + '>.table>.tbody>.tr:odd').css(trOddCSS);
- $(ele + '>.table>.tbody>.tr:even').css(trEvenCSS);
- $(ele + '>.table>.tbody>.tr>.td').css(th_tdCSS);
- $(ele + '>.table span.index').css(indexCSS)
+ //设置CSS样式
+ $(ele).css(boxCSS);
+ $(ele + '>.table').css(tableCSS);
+ $(ele + '>.table>.thead').css(theadCSS);
+ $(ele + '>.table>.thead>.tr').css(thead_trCSS);
+ $(ele + '>.table>.thead>.tr>.th').css(th_tdCSS).css(thCSS);
+ $(ele + '>.table>.tbody').css(tbodyCSS);
+ $(ele + '>.table>.tbody>.tr').css(tbody_trCSS);
+ $(ele + '>.table>.tbody>.tr:odd').css(trOddCSS);
+ $(ele + '>.table>.tbody>.tr:even').css(trEvenCSS);
+ $(ele + '>.table>.tbody>.tr>.td').css(th_tdCSS);
+ $(ele + '>.table span.index').css(indexCSS)
- //统一计量单位
- const emptyUnit = element => element.replace(/[^0-9]/g, '');
- const hendlen = $(`${ele}>.table>.thead>.tr>.th`).length;
- const bodylen = $(`${ele}>.table>.tbody>.tr:nth-child(1)>.td`).length;
- const ceil = Math.ceil;
+ //统一计量单位
+ const emptyUnit = element => element.replace(/[^0-9]/g, '');
+ const hendlen = $(`${ele}>.table>.thead>.tr>.th`).length;
+ const bodylen = $(`${ele}>.table>.tbody>.tr:nth-child(1)>.td`).length;
+ const ceil = Math.ceil;
- /**
- * 设置每列的宽度
- * eq() 是在匹配的元素中取下标为n的元素
- * nth-child() 是在匹配元素的父元素中选择第n个元素
- */
- if (!colWidth) {
- $(`${ele}>.table>.thead>.tr>.th`).css({
- width: ceil(100 / hendlen) + '%'
- });
- $(`${ele}>.table>.tbody>.tr>.td`).css({
- width: ceil(100 / bodylen) + '%'
- });
- } else {
- for (let i = 0; i < colWidth.length; i++) {
- let emptyUnitColWidth = emptyUnit(colWidth[i]);
- $(`${ele}>.table>.thead>.tr>.th:nth-child(${i+1})`).width(`${emptyUnitColWidth}%`);
- $(`${ele}>.table>.tbody>.tr>.td:nth-child(${i+1})`).width(`${emptyUnitColWidth}%`);
- }
- }
+ /**
+ * 设置每列的宽度
+ * eq() 是在匹配的元素中取下标为n的元素
+ * nth-child() 是在匹配元素的父元素中选择第n个元素
+ */
+ if (!colWidth) {
+ $(`${ele}>.table>.thead>.tr>.th`).css({
+ width: ceil(100 / hendlen) + '%'
+ });
+ $(`${ele}>.table>.tbody>.tr>.td`).css({
+ width: ceil(100 / bodylen) + '%'
+ });
+ } else {
+ for (let i = 0; i < colWidth.length; i++) {
+ let emptyUnitColWidth = emptyUnit(colWidth[i]);
+ $(`${ele}>.table>.thead>.tr>.th:nth-child(${i + 1})`).width(`${emptyUnitColWidth}%`);
+ $(`${ele}>.table>.tbody>.tr>.td:nth-child(${i + 1})`).width(`${emptyUnitColWidth}%`);
+ }
+ }
- // 组件销毁钩子
- $(`${ele}`).bind('DOMNodeRemoved', (e) => {
- if (e.target.classList[0] === 'asit-table') {
- clearInterval(animation);
- }
- });
+ // 组件销毁钩子
+ $(`${ele}`).bind('DOMNodeRemoved', (e) => {
+ if (e.target.classList[0] === 'asit-table') {
+ clearInterval(animation);
+ }
+ });
}
const tableAnimation = (el) => {
- const evenRowBGC = 'rgba(6,25,57,0.2)' === undefined ? '#ddd' : 'rgba(6,25,57,0.2)';
- const oddRowBGC = 'rgba(8,36,75,0.2)' === undefined ? '#bbb' : 'rgba(8,36,75,0.2)';
- const trEvenCSS = {
- display: "flex",
- background: evenRowBGC
- };
- const trOddCSS = {
- display: "flex",
- background: oddRowBGC
- };
- let oddORevenCheck = $(`${el}>.table>.tbody>.tr`).length % 2 == 0 ? 'even' : 'odd';
- setInterval(function () {
- $(el + '>.table>.tbody>.tr:eq(0)').slideToggle(100, function () {
- switch (oddORevenCheck) {
- case 'even':
- $(this).clone().css(trEvenCSS).appendTo(el + '>.table>.tbody');
- oddORevenCheck = 'odd';
- break;
- case 'odd':
- $(this).clone().css(trOddCSS).appendTo(el + '>.table>.tbody');
- oddORevenCheck = 'even';
- break;
- }
- $(this).remove();
- });
- }, 2000);
+ const evenRowBGC = 'rgba(6,25,57,0.2)' === undefined ? '#ddd' : 'rgba(6,25,57,0.2)';
+ const oddRowBGC = 'rgba(8,36,75,0.2)' === undefined ? '#bbb' : 'rgba(8,36,75,0.2)';
+ const trEvenCSS = {
+ display: "flex",
+ background: evenRowBGC
+ };
+ const trOddCSS = {
+ display: "flex",
+ background: oddRowBGC
+ };
+ let oddORevenCheck = $(`${el}>.table>.tbody>.tr`).length % 2 == 0 ? 'even' : 'odd';
+ setInterval(function () {
+ $(el + '>.table>.tbody>.tr:eq(0)').slideToggle(100, function () {
+ switch (oddORevenCheck) {
+ case 'even':
+ $(this).clone().css(trEvenCSS).appendTo(el + '>.table>.tbody');
+ oddORevenCheck = 'odd';
+ break;
+ case 'odd':
+ $(this).clone().css(trOddCSS).appendTo(el + '>.table>.tbody');
+ oddORevenCheck = 'even';
+ break;
+ }
+ $(this).remove();
+ });
+ }, 2000);
}
\ No newline at end of file
diff --git a/productionboard/src/main/resources/static/js/common/synthetic.js b/productionboard/src/main/resources/static/js/common/synthetic.js
index ef92502..d7b2c0c 100644
--- a/productionboard/src/main/resources/static/js/common/synthetic.js
+++ b/productionboard/src/main/resources/static/js/common/synthetic.js
@@ -1,4 +1,3 @@
-
const dataInformationFunction = (statusArray) => {
let info = `
@@ -10,9 +9,9 @@ const dataInformationFunction = (statusArray) => {
${statusArray[3]} |
`;
- $("#dataInformation").append(info);
+ $("#dataInformation").html(info);
}
-const synthetic = (statusArray,param={a:0,b:0}) => {
+const synthetic = (statusArray, param = {a: 0, b: 0}) => {
let info = `
${statusArray[0] || 0} |
@@ -35,8 +34,8 @@ const synthetic = (statusArray,param={a:0,b:0}) => {
|
-
${statusArray[8] || 0}
-
${statusArray[9] || 0}
+
${statusArray[8] || 0}
+
${statusArray[9] || 0}
`;
- $("#synthetic").append(info);
+ $("#synthetic").html(info);
}
diff --git a/productionboard/src/main/resources/static/js/foamBox/index.js b/productionboard/src/main/resources/static/js/foamBox/index.js
index 710886f..43c5fcb 100644
--- a/productionboard/src/main/resources/static/js/foamBox/index.js
+++ b/productionboard/src/main/resources/static/js/foamBox/index.js
@@ -1,123 +1,127 @@
$(() => {
- //班组计划统计
- $.getJSON(`/foamBox/getTeamStatisticsJson?ids=${ids}`, function (result) {
- onDutyPlan(result.planAmount, result.actualAmount, result.planAmount- result.actualAmount)
- });
-
- //设备运行状态
- $.getJSON(`/foamBox/getRunStatusJson?ids=${ids}`, function (result) {
- deviceStatus(result);
- });
- // deviceStatus([1,1,1,1,1,1]);
-
-
- //库存统计
- $.getJSON(`/foamBox/getMaterialStoreJson`, function (result) {
- threeDimensionalCylindrical(result, document.getElementById("inventoryStatistics"));
- });
-
- //按型号统计产量
- $.getJSON(`/foamBox/getMaterialProdutionJson?ids=${ids}`, function (result) {
- horizontalBarChart(result, document.getElementById("statisticalOutputByModel"));
- });
-
- //小时产量
- $.getJSON(`/foamBox/getHourProdutionJson?ids=${ids}`, function (result) {
- brokenLineAreaDiagram(result, document.getElementById("hourlyOutputStatistics"));
- });
-
- //发泡参数
- $.getJSON(`/foamBox/getParamTemperature?ids=${ids}`, function (result) {
- multipleBrokenLineAreaDiagram(result, document.getElementById("foamingParameters"));
- });
-
- // 模具温度1
-
- const temperature = (res, ids) => {
- let mycharts = echarts.init(ids);
- console.log(res);
-
-
- let option = {
- grid: {
- top: '15%',
- left: '6%',
- right: '6%',
- bottom: '3%',
- containLabel: true
- },
- tooltip: {
- // trigger: "axis",
- },
- xAxis: [
- {
- interval: 0,
- type: 'category',
- data: res.xValueList,
- axisPointer: {
- type: 'shadow'
- },
- axisLabel:{
- show: true,
- rotate:30,
- interval:0
- }
- }
- ],
- yAxis: [
- {
- splitLine: {
- show: false,
- },
- type: 'value',
- name: '温度',
- min: 0,
- // max: 50,
- interval: 10,
- axisLabel: {
- formatter: '{value} °C '
- }
- },
- ],
- series: [
- {
- name: '内膜温度',
- type: 'bar',
- tooltip: {
- valueFormatter: function (value) {
- return value + ' ml';
- }
- },
- data: res.interiorList
- },
- {
- name: '外膜温度',
- type: 'bar',
- tooltip: {
- valueFormatter: function (value) {
- return value + ' ml';
- }
- },
- data: res.lateralList
- },
- ]
- };
-
- mycharts.setOption(option);
- $(window).resize(mycharts.resize);
+ let fun = () => {
+ //班组计划统计
+ $.getJSON(`/foamBox/getTeamStatisticsJson?ids=${ids}`, function (result) {
+ onDutyPlan(result.planAmount, result.actualAmount, result.planAmount - result.actualAmount)
+ });
+
+ //设备运行状态
+ $.getJSON(`/foamBox/getRunStatusJson?ids=${ids}`, function (result) {
+ deviceStatus(result);
+ });
+ // deviceStatus([1,1,1,1,1,1]);
+
+
+ //库存统计
+ $.getJSON(`/foamBox/getMaterialStoreJson`, function (result) {
+ threeDimensionalCylindrical(result, document.getElementById("inventoryStatistics"));
+ });
+
+ //按型号统计产量
+ $.getJSON(`/foamBox/getMaterialProdutionJson?ids=${ids}`, function (result) {
+ horizontalBarChart(result, document.getElementById("statisticalOutputByModel"));
+ });
+
+ //小时产量
+ $.getJSON(`/foamBox/getHourProdutionJson?ids=${ids}`, function (result) {
+ brokenLineAreaDiagram(result, document.getElementById("hourlyOutputStatistics"));
+ });
+
+ //发泡参数
+ $.getJSON(`/foamBox/getParamTemperature?ids=${ids}`, function (result) {
+ multipleBrokenLineAreaDiagram(result, document.getElementById("foamingParameters"));
+ });
+
+ // 模具温度1
+
+
+ $.getJSON(`/foamBox/getMouldTemperature?ids=${ids}`, function (result) {
+ temperature(result, document.getElementById("temperatureOne"));
+ });
+ $.getJSON(`/foamBox/getMouldTemperature2?ids=${ids}`, function (result) {
+ temperature(result, document.getElementById("temperatureTwo"));
+ });
+ setTimeout(fun, 10000)
}
-
- $.getJSON(`/foamBox/getMouldTemperature?ids=${ids}`, function (result) {
- temperature(result, document.getElementById("temperatureOne"));
- });
- $.getJSON(`/foamBox/getMouldTemperature2?ids=${ids}`, function (result) {
- temperature(result, document.getElementById("temperatureTwo"));
- });
+ fun()
})
+const temperature = (res, ids) => {
+ let mycharts = echarts.init(ids);
+ console.log(res);
+
+
+ let option = {
+ grid: {
+ top: '15%',
+ left: '6%',
+ right: '6%',
+ bottom: '3%',
+ containLabel: true
+ },
+ tooltip: {
+ // trigger: "axis",
+ },
+ xAxis: [
+ {
+ interval: 0,
+ type: 'category',
+ data: res.xValueList,
+ axisPointer: {
+ type: 'shadow'
+ },
+ axisLabel: {
+ show: true,
+ rotate: 30,
+ interval: 0
+ }
+ }
+ ],
+ yAxis: [
+ {
+ splitLine: {
+ show: false,
+ },
+ type: 'value',
+ name: '温度',
+ min: 0,
+ // max: 50,
+ interval: 10,
+ axisLabel: {
+ formatter: '{value} °C '
+ }
+ },
+ ],
+ series: [
+ {
+ name: '内膜温度',
+ type: 'bar',
+ tooltip: {
+ valueFormatter: function (value) {
+ return value + ' ml';
+ }
+ },
+ data: res.interiorList
+ },
+ {
+ name: '外膜温度',
+ type: 'bar',
+ tooltip: {
+ valueFormatter: function (value) {
+ return value + ' ml';
+ }
+ },
+ data: res.lateralList
+ },
+ ]
+ };
+
+ mycharts.setOption(option);
+ $(window).resize(mycharts.resize);
+}
const deviceStatus = (statusArray) => {
let info = `
diff --git a/productionboard/src/main/resources/static/js/preassemble/index.js b/productionboard/src/main/resources/static/js/preassemble/index.js
index cae72bd..34fa5a3 100644
--- a/productionboard/src/main/resources/static/js/preassemble/index.js
+++ b/productionboard/src/main/resources/static/js/preassemble/index.js
@@ -1,22 +1,26 @@
-$(()=>{
- // onDutyPlan(1234,1202,33);
- $.getJSON('/preassemble/getTeamStatisticsJson', function (result) {
- storageStatistics(result.className, result.planAmount, result.actualAmount, result.differenceAmount,)
- });
- //按型号统计产量
- $.getJSON('/preassemble/getMaterialProdutionJson', function (result) {
- horizontalBarChart(result,document.getElementById("statisticalOutputByModel"));
- });
+$(() => {
+ let fun = () => {
+ // onDutyPlan(1234,1202,33);
+ $.getJSON('/preassemble/getTeamStatisticsJson', function (result) {
+ storageStatistics(result.className, result.planAmount, result.actualAmount, result.differenceAmount,)
+ });
+ //按型号统计产量
+ $.getJSON('/preassemble/getMaterialProdutionJson', function (result) {
+ horizontalBarChart(result, document.getElementById("statisticalOutputByModel"));
+ });
- //小时产量
- $.getJSON('/preassemble/getHourProdutionJson', function (result) {
- greenPolygonalHistogram(result, document.getElementById("hourlyOutputStatistics"));
- });
+ //小时产量
+ $.getJSON('/preassemble/getHourProdutionJson', function (result) {
+ greenPolygonalHistogram(result, document.getElementById("hourlyOutputStatistics"));
+ });
- //库存统计
- $.getJSON('/preassemble/getMaterialStoreJson', function (result) {
- threeDimensionalCylindrical(result,document.getElementById("inventoryStatistics"));
- });
+ //库存统计
+ $.getJSON('/preassemble/getMaterialStoreJson', function (result) {
+ threeDimensionalCylindrical(result, document.getElementById("inventoryStatistics"));
+ });
+ setTimeout(fun, 10000)
+ }
+ fun()
})
diff --git a/productionboard/src/main/resources/static/js/storage/index.js b/productionboard/src/main/resources/static/js/storage/index.js
index f4b81ff..5251455 100644
--- a/productionboard/src/main/resources/static/js/storage/index.js
+++ b/productionboard/src/main/resources/static/js/storage/index.js
@@ -1,50 +1,59 @@
-$(()=>{
- //生产计划
- $.ajax({
- url: '/storage/getProductionPlan',
- type: 'GET',
- dataType: 'JSON',
- success: function(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: ['20%', '20%', '20%', '20%','20%']
- });
- },
- error: function(e) {
- console.log(e)
- }
- });
+$(() => {
+ let fun2 = () => {
+ //生产计划
+ $.ajax({
+ url: '/storage/getProductionPlan',
+ type: 'GET',
+ dataType: 'JSON',
+ success: function (res) {
+ $('#productionPlan').empty()
+ 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: ['20%', '20%', '20%', '20%', '20%']
+ });
+ },
+ error: function (e) {
+ console.log(e)
+ }
+ });
+ return setTimeout(fun2, 100000)
+ }
+ fun2()
tableAnimation('#productionPlan')
- //当前库存统计
- $.getJSON(`/storage/getStoreStatistics?ids=${ids}`, function (result) {
- multipleThreeDimensionalCylindrical(result, document.getElementById("theCurrentInventory"));
- });
- //库位参数
- $.getJSON(`/storage/getParamJson?ids=${ids}`, function (result) {
- //单日出入库统计
- storageStatistics(result[0] == null ? 0 : result[0],result[1] == null ? 0 : result[1],result[2] == null ? 0 : result[2],result[3] == null ? 0 : result[3]);
+ let fun = () => {
+ //当前库存统计
+ $.getJSON(`/storage/getStoreStatistics?ids=${ids}`, function (result) {
+ multipleThreeDimensionalCylindrical(result, document.getElementById("theCurrentInventory"), 2);
+ });
+ //库位参数
+ $.getJSON(`/storage/getParamJson?ids=${ids}`, function (result) {
+ //单日出入库统计
+ storageStatistics(result[0] == null ? 0 : result[0], result[1] == null ? 0 : result[1], result[2] == null ? 0 : result[2], result[3] == null ? 0 : result[3]);
- //库存统计
- $("#emptyLocation-left").text(result[4] == null ? 0 : result[4]);
- $("#haveUsedLocation-left").text(result[6] == null ? 0 : result[5]);
- $("#emptyLocation-right").text(result[5] == null ? 0 : result[6]);
- $("#haveUsedLocation-right").text(result[7] == null ? 0 : result[7]);
+ //库存统计
+ $("#emptyLocation-left").text(result[4] == null ? 0 : result[4]);
+ $("#haveUsedLocation-left").text(result[6] == null ? 0 : result[5]);
+ $("#emptyLocation-right").text(result[5] == null ? 0 : result[6]);
+ $("#haveUsedLocation-right").text(result[7] == null ? 0 : result[7]);
- //库位占比
- $("#emptyLocationNumber").text(result[8] == null ? 0 : result[8]);
- $("#emptyLocationRatio").text(result[9] == null ? 0 : result[9]);
- $("#haveUsedLocationNumber").text(result[10] == null ? 0 : result[10]);
- $("#haveUsedLocationRatio").text(result[11] == null ? 0 : result[11]);
- });
+ //库位占比
+ $("#emptyLocationNumber").text(result[8] == null ? 0 : result[8]);
+ $("#emptyLocationRatio").text(result[9] == null ? 0 : result[9]);
+ $("#haveUsedLocationNumber").text(result[10] == null ? 0 : result[10]);
+ $("#haveUsedLocationRatio").text(result[11] == null ? 0 : result[11]);
+ });
+ setTimeout(fun, 10000)
+ }
+ fun()
})
\ No newline at end of file
diff --git a/productionboard/src/main/resources/static/js/tankShell/device.js b/productionboard/src/main/resources/static/js/tankShell/device.js
index 979066f..ec142ea 100644
--- a/productionboard/src/main/resources/static/js/tankShell/device.js
+++ b/productionboard/src/main/resources/static/js/tankShell/device.js
@@ -1,27 +1,43 @@
$(() => {
+ let fun = () => {
+ //设备OEE统计
+ $.getJSON('/tankShellDevice/getOeeStatistics', function (result) {
+ OEEStatistics(result, document.getElementById("OEEStatistics"));
+ });
- //设备OEE统计
- $.getJSON('/tankShellDevice/getOeeStatistics', function (result) {
- OEEStatistics(result, document.getElementById("OEEStatistics"));
- });
- setInterval(() => {
- // OEEStatistics(result, document.getElementById("OEEStatistics"));
- }, 1000);
+ //设备故障排名
+ $.getJSON('/tankShellDevice/getStatisticalOutputByModel', function (result) {
+ equipmentFailure(result, document.getElementById("equipmentFailure"));
+ });
- //设备故障排名
- $.getJSON('/tankShellDevice/getStatisticalOutputByModel', function (result) {
- equipmentFailure(result, document.getElementById("equipmentFailure"));
- });
+ //loss
+ $.getJSON('/tankShellDevice/getLossStatistics', function (result) {
+ loss(result, document.getElementById("loss"));
+ });
- //loss
- $.getJSON('/tankShellDevice/getLossStatistics', function (result) {
- loss(result, document.getElementById("loss"));
- });
+ //设备产量能耗对比
+ $.getJSON('/tankShellDevice/getEnergyConsumption', function (result) {
+ energyConsumption(result, document.getElementById("energyConsumption"));
+ });
- //设备产量能耗对比
- $.getJSON('/tankShellDevice/getEnergyConsumption', function (result) {
- energyConsumption(result, document.getElementById("energyConsumption"));
- });
+ /*数据信息*/
+ $.getJSON('/tankShellDevice/getDataInformation', function (result) {
+ dataInformationFunction(result)
+ });
+ $.getJSON('/tankShellDevice/getRunParameters', function (result) {
+ console.log(result);
+ energyProductionStatisticsFunction(result)
+ runParamStatisticsFunction(result)
+ $("#lossParam").text(result[8]);
+
+ $("#meterParam").text(result[9]);
+ });
+ $.getJSON('/tankShellDevice/getRunParameters', function (result) {
+ runParamStatisticsFunction(result)
+ });
+ return setTimeout(fun,10000)
+ }
+ fun()
const tableRes = {}
//设备信息
@@ -61,21 +77,6 @@ $(() => {
getTable()
}, 10000);
tableAnimation('#productionPlan')
- /*数据信息*/
- $.getJSON('/tankShellDevice/getDataInformation', function (result) {
- dataInformationFunction(result)
- });
- $.getJSON('/tankShellDevice/getRunParameters', function (result) {
- console.log(result);
- energyProductionStatisticsFunction(result)
- runParamStatisticsFunction(result)
- $("#lossParam").text(result[8]);
-
- $("#meterParam").text(result[9]);
- });
- $.getJSON('/tankShellDevice/getRunParameters', function (result) {
- runParamStatisticsFunction(result)
- });
})
/*数据信息*/
@@ -94,7 +95,7 @@ const dataInformationFunction = (statusArray) => {
`;
- $("#dataInformation").append(info);
+ $("#dataInformation").html(info);
}
/*能耗产量统计*/
@@ -108,7 +109,7 @@ const energyProductionStatisticsFunction = (statusArray) => {
`;
- $("#energyProductionStatistics").append(info);
+ $("#energyProductionStatistics").html(info);
}
const runParamStatisticsFunction = (statusArray) => {
diff --git a/productionboard/src/main/resources/static/js/tankShell/index.js b/productionboard/src/main/resources/static/js/tankShell/index.js
index f8b2819..e795fce 100644
--- a/productionboard/src/main/resources/static/js/tankShell/index.js
+++ b/productionboard/src/main/resources/static/js/tankShell/index.js
@@ -1,23 +1,27 @@
-$(()=>{
- //班组统计
- // onDutyPlan(1234,1202,33);
- $.getJSON('/tankShell/getTeamStatisticsJson', function (result) {
- storageStatistics('白班', result.planAmount, result.actualAmount, result.differenceAmount,)
- });
+$(() => {
+ let fun = () => {
+ //班组统计
+ // onDutyPlan(1234,1202,33);
+ $.getJSON('/tankShell/getTeamStatisticsJson', function (result) {
+ storageStatistics('白班', result.planAmount, result.actualAmount, result.differenceAmount,)
+ });
- //按型号统计产量
- $.getJSON('/tankShell/getMaterialProdutionJson', function (result) {
- horizontalBarChart(result,document.getElementById("statisticalOutputByModel"));
- });
+ //按型号统计产量
+ $.getJSON('/tankShell/getMaterialProdutionJson', function (result) {
+ horizontalBarChart(result, document.getElementById("statisticalOutputByModel"));
+ });
- //小时产量
- $.getJSON('/tankShell/getHourProdutionJson', function (result) {
- brokenLineAreaDiagram(result, document.getElementById("hourlyOutputStatistics"));
- });
+ //小时产量
+ $.getJSON('/tankShell/getHourProdutionJson', function (result) {
+ brokenLineAreaDiagram(result, document.getElementById("hourlyOutputStatistics"));
+ });
- //库存统计
- $.getJSON('/tankShell/getMaterialStoreJson', function (result) {
- multipleThreeDimensionalCylindrical(result,document.getElementById("inventoryStatistics"));
- });
+ //库存统计
+ $.getJSON('/tankShell/getMaterialStoreJson', function (result) {
+ multipleThreeDimensionalCylindrical(result, document.getElementById("inventoryStatistics"));
+ });
+ setTimeout(fun, 10000)
+ }
+ fun()
})
diff --git a/productionboard/src/main/resources/templates/adsorptionTank/index.html b/productionboard/src/main/resources/templates/adsorptionTank/index.html
index f7c1200..6a47117 100644
--- a/productionboard/src/main/resources/templates/adsorptionTank/index.html
+++ b/productionboard/src/main/resources/templates/adsorptionTank/index.html
@@ -14,14 +14,14 @@
-
-
+
+
-
-
+
+
-
-
+
+