Merge remote-tracking branch 'gitee/master'

master
wangh 3 years ago
commit 8a4824eea5

@ -47,8 +47,8 @@ $(() => {
for (let i = 0; i < 12; i++) { for (let i = 0; i < 12; i++) {
arr.push(Math.ceil(targetTop.tips / 11)) arr.push(Math.ceil(targetTop.tips / 11))
} }
arr[3] = Math.ceil(targetTop.tips / 22) arr[2] = Math.ceil(targetTop.tips / 22)
arr[8] = Math.ceil(targetTop.tips / 22) arr[7] = Math.ceil(targetTop.tips / 22)
arr[0] = arr[0] - (arr.reduce((val1, val2) => val1 + val2, 0) - targetTop.tips) arr[0] = arr[0] - (arr.reduce((val1, val2) => val1 + val2, 0) - targetTop.tips)
targetTop.targetArr = arr targetTop.targetArr = arr
let num = 0 let num = 0

@ -8,7 +8,7 @@ $(() => {
deviceNameOne('28工位箱体发泡线', 25, 59) deviceNameOne('28工位箱体发泡线', 25, 59)
deviceNameOne('箱壳自动成型线', 37, 48) deviceNameOne('箱壳自动成型线', 37, 48)
deviceNameOne('成品分垛入库', 44, 18) deviceNameOne('成品分垛入库', 44, 18)
deviceNameOne('内胆底生产线', 52, 43) deviceNameOne('内胆底成型线', 52, 43)
deviceNameOne('压合区', 57, 61) deviceNameOne('压合区', 57, 61)
deviceNameOne('展厅', 49, 80) deviceNameOne('展厅', 49, 80)
deviceNameOne('蒸发器绕管机', 60, 43.5) deviceNameOne('蒸发器绕管机', 60, 43.5)

@ -1522,14 +1522,17 @@ const pieChartTwo = function (data, id, unit = '次') {
{ {
name: "访问来源", name: "访问来源",
type: "pie", type: "pie",
radius: "70%", radius: "50%",
center: ["50%", "50%"], center: ["50%", "50%"],
colorBy: 'data', colorBy: 'data',
// color: ["rgb(131,249,103)", "#FBFE27", "#FE5050", "#1DB7E5"], //'#FBFE27','rgb(11,228,96)','#FE5050' // color: ["rgb(131,249,103)", "#FBFE27", "#FE5050", "#1DB7E5"], //'#FBFE27','rgb(11,228,96)','#FE5050'
data: data, data: data,
roseType: "radius", roseType: "radius",
overflow:'break',
label: { label: {
overflow:'break',
normal: { normal: {
overflow:'break',
formatter: `{b|{b}} \n {c|{c}${unit}}`, formatter: `{b|{b}} \n {c|{c}${unit}}`,
rich: { rich: {
c: { c: {
@ -1556,8 +1559,8 @@ const pieChartTwo = function (data, id, unit = '次') {
color: "rgb(98,137,169)", color: "rgb(98,137,169)",
}, },
smooth: true, smooth: true,
length: 20, length: 5,
length2: 20, length2: 5,
}, },
}, },
}, },

@ -24,7 +24,7 @@
height: 20%; height: 20%;
top: 14.85%; top: 14.85%;
left: 3.4%; left: 3.4%;
/*font-size: 12%;*/ font-size: 8%;
/*padding-left: 1%; /*padding-left: 1%;
padding-top: 0.7%;*/ padding-top: 0.7%;*/
} }
@ -226,7 +226,9 @@
--> -->
<!--订单执行--> <!--订单执行-->
<div id="top-left"> <div class="topLeftDiv" id="topLeftDiv">
<div id="top-left">
</div>
</div> </div>
<!--生产统计--> <!--生产统计-->
@ -358,17 +360,17 @@
//夹具生产计划切换 //夹具生产计划切换
let tableData = [] let tableData = []
let classes = 0 let classes = 0
let dayClass = ['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '7:30','8:30', '9:30', '10:30', '11:30', '12:30', '13:30', '14:30', '15:30', '16:30', '17:30', '18:30'] let dayClass = ['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '7:30', '8:30', '9:30', '10:30', '11:30', '12:30', '13:30', '14:30', '15:30', '16:30', '17:30', '18:30']
let nightClass = ['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '19:30','20:30', '21:30', '22:30', '23:30', '0:30', '1:30', '2:30', '3:30', '4:30', '5:30', '6:30'] let nightClass = ['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '19:30', '20:30', '21:30', '22:30', '23:30', '0:30', '1:30', '2:30', '3:30', '4:30', '5:30', '6:30']
let tableWidth = ["5%", '10%', "7%", "5%", "5%", "5%", "8%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%"] let tableWidth = ["5%", '10%', "7%", "5%", "5%", "5%", "8%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%", "4%"]
showalert(); showalert();
setTimeout(() => { setTimeout(() => {
window.setInterval(showalert, 1000 * 15); window.setInterval(showalert, 1000 * 15);
},1000) }, 1000)
let isFirst = true let isFirst = true
let times = 1 let times = 1
const getTable = (state,data) => { const getTable = (state, data) => {
if (state === 0) { if (state === 0) {
planInfo = new AutoScrollTable(document.getElementById("my-transition"), dayClass, { planInfo = new AutoScrollTable(document.getElementById("my-transition"), dayClass, {
width: tableWidth, width: tableWidth,
@ -377,8 +379,8 @@
planInfo2 = new AutoScrollTable(document.getElementById("my-transition2"), dayClass, { planInfo2 = new AutoScrollTable(document.getElementById("my-transition2"), dayClass, {
width: tableWidth, width: tableWidth,
}, 7) }, 7)
planInfo.loadData(data.map(value => [value.station_no, value.name, value.status === '未生产' ? `<span style="color: yellow">${value.status}</span>` : value.status, value.target, value.plan_number, value.qty, `${value.rate}%`, value.h1, value.h2, value.h3, value.h4, value.h5, value.h6, value.h7, value.h8, value.h9, value.h10, value.h11, value.h12]), Object.keys(['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '7:30' ,'8:30', '9:30', '10:30', '11:30', '12:30', '13:30', '14:30', '15:30', '16:30', '17:30', '18:30'])) planInfo.loadData(data.map(value => [value.station_no, value.name, value.status === '未生产' ? `<span style="color: yellow">${value.status}</span>` : value.status, value.target, value.plan_number, value.qty, `${value.rate}%`, value.h1, value.h2, value.h3, value.h4, value.h5, value.h6, value.h7, value.h8, value.h9, value.h10, value.h11, value.h12]), Object.keys(['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '7:30', '8:30', '9:30', '10:30', '11:30', '12:30', '13:30', '14:30', '15:30', '16:30', '17:30', '18:30']))
planInfo2.loadData(data.map(value => [value.station_no, value.name, value.status === '未生产' ? `<span style="color: yellow">${value.status}</span>` : value.status, value.target, value.plan_number, value.qty, `${value.rate}%`, value.h1, value.h2, value.h3, value.h4, value.h5, value.h6, value.h7, value.h8, value.h9, value.h10, value.h11, value.h12]), Object.keys(['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '7:30' ,'8:30', '9:30', '10:30', '11:30', '12:30', '13:30', '14:30', '15:30', '16:30', '17:30', '18:30'])) planInfo2.loadData(data.map(value => [value.station_no, value.name, value.status === '未生产' ? `<span style="color: yellow">${value.status}</span>` : value.status, value.target, value.plan_number, value.qty, `${value.rate}%`, value.h1, value.h2, value.h3, value.h4, value.h5, value.h6, value.h7, value.h8, value.h9, value.h10, value.h11, value.h12]), Object.keys(['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '7:30', '8:30', '9:30', '10:30', '11:30', '12:30', '13:30', '14:30', '15:30', '16:30', '17:30', '18:30']))
} else { } else {
planInfo = new AutoScrollTable(document.getElementById("my-transition"), nightClass, { planInfo = new AutoScrollTable(document.getElementById("my-transition"), nightClass, {
width: tableWidth, width: tableWidth,
@ -387,7 +389,7 @@
planInfo2 = new AutoScrollTable(document.getElementById("my-transition2"), nightClass, { planInfo2 = new AutoScrollTable(document.getElementById("my-transition2"), nightClass, {
width: tableWidth, width: tableWidth,
}, 7) }, 7)
planInfo.loadData(data.map(value => [value.station_no, value.name, value.status === '未生产' ? `<span style="color: yellow">${value.status}</span>` : value.status, value.target, value.plan_number, value.qty, `${value.rate}%`, value.h1, value.h2, value.h3, value.h4, value.h5, value.h6, value.h7, value.h8, value.h9, value.h10, value.h11, value.h12]), Object.keys(['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '19:30','20:30', '21:30', '22:30', '23:30', '0:30', '1:30', '2:30', '3:30', '4:30', '5:30', '6:30',])) planInfo.loadData(data.map(value => [value.station_no, value.name, value.status === '未生产' ? `<span style="color: yellow">${value.status}</span>` : value.status, value.target, value.plan_number, value.qty, `${value.rate}%`, value.h1, value.h2, value.h3, value.h4, value.h5, value.h6, value.h7, value.h8, value.h9, value.h10, value.h11, value.h12]), Object.keys(['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '19:30', '20:30', '21:30', '22:30', '23:30', '0:30', '1:30', '2:30', '3:30', '4:30', '5:30', '6:30',]))
planInfo2.loadData(data.map(value => [value.station_no, value.name, value.status === '未生产' ? `<span style="color: yellow">${value.status}</span>` : value.status, value.target, value.plan_number, value.qty, `${value.rate}%`, value.h1, value.h2, value.h3, value.h4, value.h5, value.h6, value.h7, value.h8, value.h9, value.h10, value.h11, value.h12]), Object.keys(['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '19:30', '20:30', '21:30', '22:30', '23:30', '0:30', '1:30', '2:30', '3:30', '4:30', '5:30', '6:30'])) planInfo2.loadData(data.map(value => [value.station_no, value.name, value.status === '未生产' ? `<span style="color: yellow">${value.status}</span>` : value.status, value.target, value.plan_number, value.qty, `${value.rate}%`, value.h1, value.h2, value.h3, value.h4, value.h5, value.h6, value.h7, value.h8, value.h9, value.h10, value.h11, value.h12]), Object.keys(['工位', '型号', '状态', '目标', '计划', '累计', '达成率', '19:30', '20:30', '21:30', '22:30', '23:30', '0:30', '1:30', '2:30', '3:30', '4:30', '5:30', '6:30']))
} }
} }
@ -404,7 +406,7 @@
} }
if (tableData.length === 0) return if (tableData.length === 0) return
let dataTwo = tableData.slice(times * 7, times * 7 + 7) let dataTwo = tableData.slice(times * 7, times * 7 + 7)
getTable(classes,dataTwo) getTable(classes, dataTwo)
if (times < 3) { if (times < 3) {
times += 1 times += 1
} else { } else {
@ -420,9 +422,9 @@
"差异数", "差异数",
"执行进度" "执行进度"
]; ];
const orderInf = new AutoScrollTable(document.getElementById("top-left"), orderInfColumns, { // const orderInf = new AutoScrollTable(document.getElementById("top-left"), orderInfColumns, {
width: ['30%', '14.5%', '14.5%', '14.5%', '14.5%'] // width: ['30%', '14.5%', '14.5%', '14.5%', '14.5%']
}) // })
let selectors = [] let selectors = []
let tmp = [] let tmp = []
@ -474,9 +476,46 @@
}) })
// 订单执行 + 生产统计 // 订单执行 + 生产统计
autoUpdate('/broad/fp/selectOrderExecutionPlan', INTERVAL, data => { autoUpdate('/broad/fp/selectOrderExecutionPlan', INTERVAL, data => {
orderInf.loadData(data.map(value => [value.name, value.plan_number, value.actual_number, value.plan_number - value.actual_number, `${value.rate == 0 ? value.rate : value.rate + '%'}`]), Object.keys(orderInfColumns))
const tableFun = () => {
const tableRes = {
data: data.map(value => [value.name, value.plan_number, value.actual_number, value.plan_number - value.actual_number, `${value.rate == 0 ? value.rate : value.rate + '%'}`]),
header: [
"型号",
"计划数",
"完成数",
"差异数",
"执行进度"
]
}
const getTable = () => {
$('#top-left').remove()
$('.topLeftDiv').html('<div class="top-left" id="top-left"></div>')
dynamicTable({
el: '#top-left',
rowNum: 4,
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(8,36,75,0.2)',
colWidth: ['30%', '14%', '15%', '14%', '15%']
});
}
getTable()
setInterval(() => {
getTable()
}, 10000);
}
tableFun()
// orderInf.loadData(data.map(value => [value.name, value.plan_number, value.actual_number, value.plan_number - value.actual_number, `${value.rate == 0 ? value.rate : value.rate + '%'}`]), Object.keys(orderInfColumns))
}) })
tableAnimation('#top-left')
autoUpdate('/broad/fp/selectOrderExecution', INTERVAL, data => { autoUpdate('/broad/fp/selectOrderExecution', INTERVAL, data => {
modelChart.setOption({ modelChart.setOption({
xAxis: { xAxis: {
@ -507,12 +546,12 @@
dataOne = data.slice(times * 7, times * 7 + 7) dataOne = data.slice(times * 7, times * 7 + 7)
times++ times++
} }
getTable(classes,dataOne) getTable(classes, dataOne)
total( total(
Number((data.filter(val => val.status === '生产中').length / 28) * 100).toFixed(2) + '%', Number((data.filter(val => val.status === '生产中').length / 28) * 100).toFixed(2) + '%',
totalNum, totalNum,
eval(data.map(val => val.qty).join('+')), eval(data.map(val => val.qty).join('+')),
(Number(eval(data.map(val => val.qty).join('+')) / totalNum) * 100).toFixed(2)+ '%', (Number(eval(data.map(val => val.qty).join('+')) / totalNum) * 100).toFixed(2) + '%',
eval(data.map(val => val.h1).join('+')), eval(data.map(val => val.h1).join('+')),
eval(data.map(val => val.h2).join('+')), eval(data.map(val => val.h2).join('+')),
eval(data.map(val => val.h3).join('+')), eval(data.map(val => val.h3).join('+')),
@ -780,7 +819,7 @@
}) })
function resize() { function resize() {
orderInf.resize() // orderInf.resize()
// planInfo.resize() // planInfo.resize()
// planInfo2.resize() // planInfo2.resize()
modelChart.resize() modelChart.resize()

@ -99,7 +99,7 @@
<img alt="" src="../img/board/intelligentRefrigeratorInterconnectionFactory/arrows.gif" <img alt="" src="../img/board/intelligentRefrigeratorInterconnectionFactory/arrows.gif"
style="width: 3vw;height: 1.4vh;position: absolute;top: 33%;left: 67.6%;object-fit: contain;transform: rotate(0deg);"> style="width: 3vw;height: 1.4vh;position: absolute;top: 33%;left: 67.6%;object-fit: contain;transform: rotate(0deg);">
<img alt="" src="../img/board/intelligentRefrigeratorInterconnectionFactory/arrows.gif" <img alt="" src="../img/board/intelligentRefrigeratorInterconnectionFactory/arrows.gif"
style="width: 4.6vw;height: 0.8vh;position: absolute;top: 34.4%;left: 74.5%;object-fit: contain;transform: rotate(279deg);"> style="width: 4.6vw;height: 0.8vh;position: absolute;top: 34.4%;left: 76%;object-fit: contain;transform: rotate(279deg);">
<img alt="" src="../img/board/intelligentRefrigeratorInterconnectionFactory/arrows.gif" <img alt="" src="../img/board/intelligentRefrigeratorInterconnectionFactory/arrows.gif"
style="width: 3vw;height: 1.4vh;position: absolute;top: 25.7%;left: 77.1%;object-fit: contain;transform: rotate(70deg);"> style="width: 3vw;height: 1.4vh;position: absolute;top: 25.7%;left: 77.1%;object-fit: contain;transform: rotate(70deg);">
<img alt="" src="../img/board/intelligentRefrigeratorInterconnectionFactory/arrows.gif" <img alt="" src="../img/board/intelligentRefrigeratorInterconnectionFactory/arrows.gif"

Loading…
Cancel
Save