修改界面

master
夜笙歌 4 years ago
parent d8f566a609
commit b3a9381e7b

@ -1,6 +1,7 @@
$(() => { $(() => {
moduleTitle() moduleTitle()
safe('#safe') safe('#safe')
importData('#importData')
// 公共请求地址 // 公共请求地址
let url = '/broad/mtk' let url = '/broad/mtk'
card({ card({
@ -244,13 +245,11 @@ $(() => {
singleVerticalBarChart({ singleVerticalBarChart({
xName: arr.map(val => val.name), xName: arr.map(val => val.name),
yData: arr.map(val => val.qty), yData: arr.map(val => val.qty),
}, document.getElementById("equipmentPower"),20,'20%') }, document.getElementById("equipmentPower"),-20,'20%')
break break
} }
}) })
}) })
// autoUpdate(url + "/inStore3d", INTERVAL, data => {
// })
// 当日订单入库统计 // 当日订单入库统计
autoUpdate(url + "/selectInstoreNumByday", INTERVAL, data => { autoUpdate(url + "/selectInstoreNumByday", INTERVAL, data => {
@ -259,7 +258,8 @@ $(() => {
yData: data.map(val => val.qty), yData: data.map(val => val.qty),
}, document.getElementById("productionEfficiency"),-20) }, document.getElementById("productionEfficiency"),-20)
}) })
// 成品入库统计
// 重点工序质量监控
// autoUpdate(url + "/inStore3d", INTERVAL, data => { // autoUpdate(url + "/inStore3d", INTERVAL, data => {
percentageRingDiagram([ percentageRingDiagram([
{ {
@ -303,7 +303,7 @@ const curWeek = () => {
} }
firstDayOfYear = new Date(today.getFullYear(), 0, spendDay); firstDayOfYear = new Date(today.getFullYear(), 0, spendDay);
let d = Math.ceil((today.valueOf() - firstDayOfYear.valueOf()) / 86400000); let d = Math.ceil((today.valueOf() - firstDayOfYear.valueOf()) / 86400000);
return Math.ceil(d / 7); return Math.ceil((d / 7) +1);
} }
const moduleTitle = () => { const moduleTitle = () => {
@ -321,8 +321,9 @@ const moduleTitle = () => {
const safe = (el) => { const safe = (el) => {
const html = ` 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: 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) $(el).html(html)
} }
@ -385,3 +386,9 @@ const total = (val1 = 0, el) => {
` `
$(el).html(html) $(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: { axisLabel: {
color: "#fff", color: "#fff",
// margin:150, // margin:150,
fontSize:0.75 * vw,
textStyle: { textStyle: {
textAlign:'center' textAlign:'center'
}, },
@ -252,19 +253,21 @@ const horizontalRoundedBarChartWithBackgroundTwo = function (data, id) {
}) })
let step = 1 / (data.yNameOne.length / 9) * 100 let step = 1 / (data.yNameOne.length / 9) * 100
time = setInterval(() => { time = () => {
option.dataZoom[0].end += step setInterval(() => {
option.dataZoom[0].start += step option.dataZoom[0].end += step
if (option.dataZoom[0].start >= 100) { option.dataZoom[0].start += step
option.dataZoom[0].start = 0 if (option.dataZoom[0].start >= 100) {
option.dataZoom[0].end = step option.dataZoom[0].start = 0
} option.dataZoom[0].end = step
if (option.dataZoom[0].end >= 100) { }
option.dataZoom[0].end = 100 if (option.dataZoom[0].end >= 100) {
option.dataZoom[0].start = option.dataZoom[0].end - step option.dataZoom[0].end = 100
} option.dataZoom[0].start = option.dataZoom[0].end - step
charts.setOption(option); }
}, 3000) charts.setOption(option);
}, 6000)
}
time() time()
} }
charts.setOption(option); charts.setOption(option);
@ -1629,6 +1632,7 @@ const singleVerticalBarChartTwo = function (data, id) {
}, },
dataZoom: [], dataZoom: [],
xAxis: { xAxis: {
margin:10,
nameTextStyle: { nameTextStyle: {
color: '#c0c3cd', color: '#c0c3cd',
padding: [0, 0, -10, 0], padding: [0, 0, -10, 0],
@ -1638,7 +1642,8 @@ const singleVerticalBarChartTwo = function (data, id) {
color: '#c0c3cd', //X轴文字 color: '#c0c3cd', //X轴文字
fontSize: 14, fontSize: 14,
interval: 0, interval: 0,
rotate: 20, margin:20,
rotate: -20,
}, },
axisTick: { axisTick: {
lineStyle: { lineStyle: {

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

Loading…
Cancel
Save