Merge remote-tracking branch 'gitee/master'

master
wangh 4 years ago
commit 7f2540d8a1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 KiB

After

Width:  |  Height:  |  Size: 787 KiB

@ -1,4 +1,5 @@
$(() => {
moduleTitle()
// 公共请求地址
let url = '/broad/beforeLibrary'
@ -11,7 +12,9 @@ $(() => {
const orderDetailsTable = new AutoScrollTable(document.getElementById("orderDetails"), ["编号", "计划数量", "完成数量", "差异值", "时间",], {width: ['30%', null, null, null, '17%']})
// 产线当日订单信息
const PropertyInsuranceOneDayOrderInfoTable = new AutoScrollTable(document.getElementById("PropertyInsuranceOneDayOrderInfo"), planWorkOrderColumns, {width: ['30%', null, null, null, '17%']})
const PropertyInsuranceOneDayOrderInfoTable = new AutoScrollTable(document.getElementById("PropertyInsuranceOneDayOrderInfo"), [
"物料条码", "检测项", "质量缺陷", "标志", "时间",
], {width: ['30%', null, null, null, '17%']})
// 当日订单数量达成率
horizontalRoundedBarChartWithBackground(null, document.getElementById("orderQuantityFulfillmentRateOfTheDay"));
@ -31,24 +34,29 @@ $(() => {
xDataName: "达成率",
}, document.getElementById("orderQuantityFulfillmentRateOfTheDay"))
})
// const horizontalRoundedBarChartWithBackgroundEcharts = echarts.init(document.getElementById("orderQuantityFulfillmentRateOfTheDay"))
// horizontalRoundedBarChartWithBackgroundEcharts.setOption({
// yAxis: {
// data: data.map(value => value.plan_code),
// },
// series: [
// {
// data: data.map(value => value.rate),
// },
// {}
// ]
// })
//
//成品入库统计轮询
autoUpdate(url + "/selectProductInStore ", INTERVAL, data => {
barChartAndLineChart({
xName: data.map(value => value.name),
yDataTwo: data.map(value => value.qty),
yDataTwoName: "成品数量",
}, document.getElementById("FinishedGoodsWarehousingStatisticsByHour"));
})
//产线当日订单信息轮询
autoUpdate(url + "/selectOrderInfo ", INTERVAL, data => {
PropertyInsuranceOneDayOrderInfoTable.loadData(data.map(value => [value.plan_code, value.plan_number, value.actual_number, value.plan_number - value.actual_number, value.day]), Object.keys(planWorkOrderColumns))
PropertyInsuranceOneDayOrderInfoTable.loadData(data.map(value => [value.code, value.item, value.qa, value.state, value.day]), Object.keys(planWorkOrderColumns))
})
})
const moduleTitle = () => {
const html = `
<span style="position: absolute;top: 9.6%;left: 5.5%;color: #CFD2D0;font-size: 1.3vw">订单详情</span>
<span style="position: absolute;top: 9.6%;left: 37%;color: #CFD2D0;font-size: 1.3vw">当日订单数量达成率</span>
<span style="position: absolute;top: 9.6%;left: 68.5%;color: #CFD2D0;font-size: 1.3vw">质量统计</span>
<span style="position: absolute;top: 39%;left: 5.5%;color: #CFD2D0;font-size: 1.3vw">成品入库统计</span>
<span style="position: absolute;top: 69%;left: 5.5%;color: #CFD2D0;font-size: 1.3vw">成品质量详情</span>
<span style="position: absolute;top: 69%;left: 68.6%;color: #CFD2D0;font-size: 1.3vw">产线不良类型分布</span>
`
$('body').append(html)
}

@ -11,7 +11,7 @@ const horizontalRoundedBarChartWithBackground = function (data, id) {
if (!data) {
data = {
yName: ["设备001", "设备001", "设备001", "设备001", "设备001"],
xData: [53, 24, 66, 23, 54],
xData: [53, 24, 66, 23, 100],
xDataName: "达成率",
}
}
@ -22,7 +22,7 @@ const horizontalRoundedBarChartWithBackground = function (data, id) {
let option = {
grid: {
left: "0%",
right: "5%",
right: "12%",
bottom: "0%",
top: "0%",
containLabel: true,
@ -95,6 +95,15 @@ const horizontalRoundedBarChartWithBackground = function (data, id) {
},
barWidth: vw,
data: data.xData,
label: {
show: true,
position: "right",
textStyle: {
color: "#fff",
fontSize: 0.75 * vw
},
formatter:'{c}%'
},
},
{
name: "背景",
@ -232,7 +241,7 @@ const barChartAndLineChart = function (data, id) {
],
series: [
{
name: data.yDataOneName,
name: data.yDataOneName || '',
type: "line",
// smooth: true, //是否平滑曲线显示
// symbol:'circle', // 默认是空心圆(中间是白色的),改成实心圆
@ -295,7 +304,7 @@ const barChartAndLineChart = function (data, id) {
shadowBlur: 20, //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
},
},
data: data.yDataOne,
// data: data.yDataOne || [],
},
{
name: data.yDataTwoName,

Loading…
Cancel
Save