修改界面

master
夜笙歌 3 years ago
parent d8f566a609
commit b3a9381e7b

@ -1,6 +1,7 @@
$(() => {
moduleTitle()
safe('#safe')
importData('#importData')
// 公共请求地址
let url = '/broad/mtk'
card({
@ -244,13 +245,11 @@ $(() => {
singleVerticalBarChart({
xName: arr.map(val => val.name),
yData: arr.map(val => val.qty),
}, document.getElementById("equipmentPower"),20,'20%')
}, document.getElementById("equipmentPower"),-20,'20%')
break
}
})
})
// autoUpdate(url + "/inStore3d", INTERVAL, data => {
// })
// 当日订单入库统计
autoUpdate(url + "/selectInstoreNumByday", INTERVAL, data => {
@ -259,7 +258,8 @@ $(() => {
yData: data.map(val => val.qty),
}, document.getElementById("productionEfficiency"),-20)
})
// 成品入库统计
// 重点工序质量监控
// autoUpdate(url + "/inStore3d", INTERVAL, data => {
percentageRingDiagram([
{
@ -303,7 +303,7 @@ const curWeek = () => {
}
firstDayOfYear = new Date(today.getFullYear(), 0, spendDay);
let d = Math.ceil((today.valueOf() - firstDayOfYear.valueOf()) / 86400000);
return Math.ceil(d / 7);
return Math.ceil((d / 7) +1);
}
const moduleTitle = () => {
@ -321,8 +321,9 @@ const moduleTitle = () => {
const safe = (el) => {
const html = `
<span style="position: absolute;top: 66%;left: 16%;color: #CBE6F7;font-size: 1.3vw;font-weight:600;transform: translateX(-50%);letter-spacing: 0.3vw">${new Date().getFullYear().toString()}年连续安全生产天数</span>
<span style="position: absolute;top: 74%;left: 16%;color: #08F580;font-size: 2.5vw;transform: translateX(-50%);letter-spacing: 0.3vw">${today()}<span style="font-size: 0.5vw"></span> </span>
<span style="position: absolute;top: 81%;left: 16%;color: #CBE6F7;font-size: 1vw;transform: translateX(-50%);letter-spacing: 0.3vw">QSR连续安全生产天数</span>
<span style="position: absolute;top: 89%;left: 16%;color: #CBE6F7;font-size: 1vw;transform: translateX(-50%);letter-spacing: 0.3vw">智能冷柜互联工厂</span>
`
$(el).html(html)
}
@ -384,4 +385,10 @@ const total = (val1 = 0, el) => {
<span style="position: absolute;top: 10%;left: 85.7%;color: #fff;font-size: 1vw;">合计${val1}</span>
`
$(el).html(html)
}
const importData = ( el) => {
const html = `
<span style="position: absolute;top: 54.3%;left: 85.7%;color: #fff;font-size: 1vw;">一次合格率</span>
`
$(el).html(html)
}

@ -183,6 +183,7 @@ const horizontalRoundedBarChartWithBackgroundTwo = function (data, id) {
axisLabel: {
color: "#fff",
// margin:150,
fontSize:0.75 * vw,
textStyle: {
textAlign:'center'
},
@ -252,19 +253,21 @@ const horizontalRoundedBarChartWithBackgroundTwo = function (data, id) {
})
let step = 1 / (data.yNameOne.length / 9) * 100
time = setInterval(() => {
option.dataZoom[0].end += step
option.dataZoom[0].start += step
if (option.dataZoom[0].start >= 100) {
option.dataZoom[0].start = 0
option.dataZoom[0].end = step
}
if (option.dataZoom[0].end >= 100) {
option.dataZoom[0].end = 100
option.dataZoom[0].start = option.dataZoom[0].end - step
}
charts.setOption(option);
}, 3000)
time = () => {
setInterval(() => {
option.dataZoom[0].end += step
option.dataZoom[0].start += step
if (option.dataZoom[0].start >= 100) {
option.dataZoom[0].start = 0
option.dataZoom[0].end = step
}
if (option.dataZoom[0].end >= 100) {
option.dataZoom[0].end = 100
option.dataZoom[0].start = option.dataZoom[0].end - step
}
charts.setOption(option);
}, 6000)
}
time()
}
charts.setOption(option);
@ -1629,6 +1632,7 @@ const singleVerticalBarChartTwo = function (data, id) {
},
dataZoom: [],
xAxis: {
margin:10,
nameTextStyle: {
color: '#c0c3cd',
padding: [0, 0, -10, 0],
@ -1638,7 +1642,8 @@ const singleVerticalBarChartTwo = function (data, id) {
color: '#c0c3cd', //X轴文字
fontSize: 14,
interval: 0,
rotate: 20,
margin:20,
rotate: -20,
},
axisTick: {
lineStyle: {

@ -34,6 +34,7 @@
<div id="cardThree"></div>
<div id="cardFour"></div>
<div id="cardFive"></div>
<div id="importData"></div>
<!--每日人力出勤-->
<div class="manpowerAttendance" id="manpowerAttendance"></div>

Loading…
Cancel
Save