Merge remote-tracking branch 'origin/master'

master
wangh 2 years ago
commit 83496721e0

@ -264,7 +264,7 @@ body.FoamerScada {
body.Foamer2 {
height: auto;
width: auto;
background: url(../img/foamer2.jpg) no-repeat center fixed;
background: url(../img/foamer21.jpg) no-repeat center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

@ -946,7 +946,7 @@ const barChartAndLineChartFour = function (data, id) {
}
// 折线图
const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
const lineChart = function (data, id, unit = '', smooth = false, color = '#14bd2d') {
let charts = echarts.init(id);
if (!data) {
data = {
@ -976,13 +976,13 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
},
legend: {
top: '5%',
itemWidth:20,
itemHeight:10,
itemStyle:{
borderWidth:1,
borderHeight:1,
itemWidth: 20,
itemHeight: 10,
itemStyle: {
borderWidth: 1,
borderHeight: 1,
},
formatter:function (val) {
formatter: function (val) {
return `${val} `
},
textStyle: {
@ -1010,7 +1010,7 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
},
yAxis: [
{
name:'合格率',
name: '合格率',
min: (min - 2 < 0) ? 0 : min - 2,
max: (max + 2 > 100) ? 100 : max + 2,
type: 'value',
@ -1031,7 +1031,7 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
},
axisLabel: {
show: true,
interval:0,
interval: 0,
textStyle: {
color: '#ffffff',
},
@ -1042,7 +1042,7 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
{
name: data.yDataName,
type: 'line',
smooth:smooth,
smooth: smooth,
showAllSymbol: true, //显示所有图形。
symbol: 'circle', //标记的图形为实心圆
symbolSize: 4, //标记的大小
@ -1079,7 +1079,7 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
}
const lineChartTwo = function (data, id, unit = '') {
let charts = echarts.init(id);
let color = ['#3094ea','#2fd032','#6ba72c','#7b6931','#8909E5']
let color = ['#3094ea', '#2fd032', '#6ba72c', '#7b6931', '#8909E5']
if (!data) {
data = {
xName: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
@ -1098,7 +1098,7 @@ const lineChartTwo = function (data, id, unit = '') {
let num = data.yData.map(val => val.data).flat(Infinity)
let min = Math.ceil(Math.min(...num))
let max = Math.ceil(Math.max(...num))
let series = data.yData.map((val,index) => {
let series = data.yData.map((val, index) => {
return {
name: val.name,
type: 'line',
@ -1150,14 +1150,15 @@ const lineChartTwo = function (data, id, unit = '') {
},
legend: {
top: '5%',
itemWidth:20,
itemHeight:10,
formatter:function (val) {
itemWidth: 20,
itemHeight: 10,
formatter: function (val) {
return `${val}`
},
textStyle: {
fontSize: 0.75 * vw,
color: () => {},
color: () => {
},
},
},
xAxis: {
@ -1210,7 +1211,7 @@ const lineChartTwo = function (data, id, unit = '') {
charts.setOption(option);
$(window).resize(charts.resize);
}
const lineChartThree = function (data, id, unit = '',smooth=false) {
const lineChartThree = function (data, id, unit = '', smooth = false) {
let charts = echarts.init(id);
if (!data) {
data = {
@ -1221,8 +1222,8 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
yDataTwoName: "百分比"
}
}
let min = Math.ceil(Math.min(...data.yData,...(data.yDataTwo || [])))
let max = Math.ceil(Math.max(...data.yData,...(data.yDataTwo || [])))
let min = Math.ceil(Math.min(...data.yData, ...(data.yDataTwo || [])))
let max = Math.ceil(Math.max(...data.yData, ...(data.yDataTwo || [])))
let option = {
grid: {
top: '28%',
@ -1242,13 +1243,13 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
},
legend: {
top: '5%',
itemWidth:20,
itemHeight:10,
itemStyle:{
borderWidth:1,
borderHeight:1,
itemWidth: 20,
itemHeight: 10,
itemStyle: {
borderWidth: 1,
borderHeight: 1,
},
formatter:function (val) {
formatter: function (val) {
return `${val} `
},
textStyle: {
@ -1276,7 +1277,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
},
yAxis: [
{
name:'(元/台)',
name: '(元/台)',
min: (min - 2 < 0) ? 0 : min - 2,
max: (max + 2 > 100) ? 100 : max + 2,
type: 'value',
@ -1297,7 +1298,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
},
axisLabel: {
show: true,
interval:0,
interval: 0,
textStyle: {
color: '#ffffff',
},
@ -1308,7 +1309,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
{
name: data.yDataName,
type: 'line',
smooth:smooth,
smooth: smooth,
showAllSymbol: true, //显示所有图形。
symbol: 'circle', //标记的图形为实心圆
symbolSize: 4, //标记的大小
@ -1340,7 +1341,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
{
name: data.yDataTwoName,
type: 'line',
smooth:smooth,
smooth: smooth,
showAllSymbol: true, //显示所有图形。
symbol: 'circle', //标记的图形为实心圆
symbolSize: 4, //标记的大小
@ -1528,11 +1529,11 @@ const pieChartTwo = function (data, id, unit = '次') {
// color: ["rgb(131,249,103)", "#FBFE27", "#FE5050", "#1DB7E5"], //'#FBFE27','rgb(11,228,96)','#FE5050'
data: data,
roseType: "radius",
overflow:'break',
overflow: 'break',
label: {
overflow:'break',
overflow: 'break',
normal: {
overflow:'break',
overflow: 'break',
formatter: `{b|{b}} \n {c|{c}${unit}}`,
rich: {
c: {
@ -1630,7 +1631,7 @@ const verticalBarChart = function (data, id, unit = '次') {
series: [
{
type: "bar",
barWidth: data.yData.length<4? 2*vw:'75%',
barWidth: data.yData.length < 4 ? 2 * vw : '75%',
label: {
show: true,
position: 'top',
@ -1674,6 +1675,36 @@ const verticalBarChart = function (data, id, unit = '次') {
// 多个垂直柱状图
const multipleVerticalBarChart1 = function (data, id) {
let charts = echarts.init(id);
let num1 = data.yDataOne.slice(0,4)
let num2 = data.yDataTwo.slice(0,4)
let num3 = data.yDataThree.slice(0,4)
num1 = num1.map(e => {
if (e > 14) {
return 14
} else if (e < 10) {
return 10
} else {
return e
}
})
num2 = num2.map(e => {
if (e > 14) {
return 14
} else if (e < 10) {
return 10
} else {
return e
}
})
num3 = num3.map(e => {
if (e > 14) {
return 14
} else if (e < 10) {
return 10
} else {
return e
}
})
if (!data) {
data = {
xName: [
@ -1703,20 +1734,6 @@ const multipleVerticalBarChart1 = function (data, id) {
},
},
},
// trigger: "axis",
// formatter: `{b}<br />{a0}: {c0}<br />{a1}: {c1}`,
// axisPointer: {
// type: "shadow",
// label: {
// backgroundColor: "#6a7985",
// },
// },
// textStyle: {
// color: "#fff",
// fontStyle: "normal",
// fontFamily: "微软雅黑",
// fontSize: 12,
// },
},
grid: {
left: "1%",
@ -1745,7 +1762,7 @@ const multipleVerticalBarChart1 = function (data, id) {
{
type: "category",
boundaryGap: true, //坐标轴两边留白
data: data.xName,
data: ['A1', 'A2', 'A3', 'A4'],
axisLabel: {
show: true,
color: '#fff'
@ -2193,7 +2210,7 @@ const multipleVerticalBarChart = function (data, id) {
charts.setOption(option);
$(window).resize(charts.resize);
}
const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',margin=20,isColor=true) {
const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '', margin = 20, isColor = true) {
let charts = echarts.init(id);
if (!data) {
data = {
@ -2219,7 +2236,7 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
}
},
legend: {
right:'0',
right: '0',
data: [data.yDataOneName, data.yDataTwoName],
textStyle: {
fontSize: 0.75 * vw,
@ -2270,7 +2287,7 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
itemStyle: {
//图形样式
normal: {
color: isColor? '#db8151': "#64BCEC",
color: isColor ? '#db8151' : "#64BCEC",
},
},
label: {
@ -2305,7 +2322,7 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
itemStyle: {
//图形样式
normal: {
color: isColor? '#9ce375': "#4FD3B9",
color: isColor ? '#9ce375' : "#4FD3B9",
},
},
data: data.yDataTwo
@ -2935,6 +2952,7 @@ const multipleBrokenLineAreaDiagram1 = (data, ids) => {
dataZoom: [],
xAxis: [
{
show: false,
type: "category",
boundaryGap: false,
axisLine: {
@ -2956,8 +2974,8 @@ const multipleBrokenLineAreaDiagram1 = (data, ids) => {
axisTick: {
show: false,
},
max: max + 0.5,
min: min - 1,
max: 24,
min: 18,
axisLine: {
lineStyle: {
color: "#57617B",

@ -18,9 +18,10 @@
<style>
.hide-scrollbar .autoscroll-table td:nth-child(6n + 2){
.hide-scrollbar .autoscroll-table td:nth-child(6n + 2) {
text-align: left;
}
.mid {
background: url(../img/mid.png) no-repeat;
background-size: 100% 100%;
@ -30,6 +31,7 @@
width: 91%;
height: 20%;
}
#top-right {
position: absolute;
width: 23.8%;
@ -367,14 +369,14 @@
<script src="../../static/js/auto-update.js" th:src="@{/js/auto-update.js}"></script>
<script src="../../static/js/data-merger.js" th:src="@{/js/data-merger.js}"></script>
<script>
const occupancy = (val1=0,val2=0) => {
const occupancy = (val1 = 0, val2 = 0) => {
const html = `内胆库存占用率:${val1}% &nbsp;&nbsp;&nbsp;&nbsp; 箱壳库存占用率:${val2}%`
$('#occupancy').html(html)
}
const planWorkOrderColumns = [
"序号", "型号","计划数量", "完成数量", "生产进度", "开始时间",
"序号", "型号", "计划数量", "完成数量", "生产进度", "开始时间",
]
const planWorkOrderTable = new AutoScrollTable(document.getElementById("plan-work-order"), planWorkOrderColumns, {width: ['10%','40%', '10%', '10%', '10%', '20%']})
const planWorkOrderTable = new AutoScrollTable(document.getElementById("plan-work-order"), planWorkOrderColumns, {width: ['10%', '40%', '10%', '10%', '10%', '20%']})
// const planTable = new AutoScrollTable(document.getElementById("plan-table"), [], {
// width: ['15%', '5%', null, null, null, null, null, null, null, null, null, null, null, null, null, null, "5%", "5%", "5%"],
// caption: "生产计划统计",
@ -415,11 +417,11 @@
let url = '/broad/box'
//生产计划工单
autoUpdate(url+"/getProductPlanInfo ", INTERVAL, data => {
planWorkOrderTable.loadData(data.map((value,index) => [index+1,value.name, value.plan_number, value.actual_number, `${value.rate}%`, value.day]), Object.keys(planWorkOrderColumns))
autoUpdate(url + "/getProductPlanInfo ", INTERVAL, data => {
planWorkOrderTable.loadData(data.map((value, index) => [index + 1, value.name, value.plan_number, value.actual_number, `${value.rate}%`, value.day]), Object.keys(planWorkOrderColumns))
})
autoUpdate(url+"/selectStockOccupancy ", INTERVAL, data => {
occupancy(data.find(val => val.name == 'S001').rate,data.find(val => val.name == 'S002').rate)
autoUpdate(url + "/selectStockOccupancy ", INTERVAL, data => {
occupancy(data.find(val => val.name == 'S001').rate, data.find(val => val.name == 'S002').rate)
})
autoUpdate(url + '/selectStock/S001', INTERVAL, data => {
@ -532,12 +534,12 @@
type: 'category',
axisTick: {
alignWithLabel: true,
interval:0,
interval: 0,
},
axisLabel: {
color: '#ffffff',
// fontSize:0.6 * vw,
interval:0,
interval: 0,
// rotate:30,
},
splitLine: {
@ -677,7 +679,7 @@
},
axisLabel: {
color: '#ffffff',
interval:0,
interval: 0,
// rotate:30,
},
splitLine: {
@ -785,7 +787,7 @@
},
axisLabel: {
color: '#ffffff',
interval:0,
interval: 0,
},
splitLine: {
show: false,

Loading…
Cancel
Save