恒通达,q =3
This commit is contained in:
parent
b6f8346c71
commit
a0690eb0e6
|
|
@ -6,7 +6,13 @@
|
||||||
<dv-scroll-board :config="config3" style="height:90%;margin-left: 2%;width:96%" />
|
<dv-scroll-board :config="config3" style="height:90%;margin-left: 2%;width:96%" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%;" v-else>
|
<div style="width: 100%;" v-if="dataType == '3'">
|
||||||
|
<div class="bc-chart-item">
|
||||||
|
<div class="bcci-header">排工单执行进度</div>
|
||||||
|
<dv-scroll-board :config="config4" style="height:90%;margin-left: 2%;width:96%" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%;" v-if="dataType!='3' && dataType !='整机'">
|
||||||
<div class="bc-chart-item" v-if="isChange">
|
<div class="bc-chart-item" v-if="isChange">
|
||||||
<div class="bcci-header">机芯派工单执行进度</div>
|
<div class="bcci-header">机芯派工单执行进度</div>
|
||||||
<dv-scroll-board :config="config1" style="height:90%;margin-left: 2%;width:96%" />
|
<dv-scroll-board :config="config1" style="height:90%;margin-left: 2%;width:96%" />
|
||||||
|
|
@ -15,7 +21,7 @@
|
||||||
|
|
||||||
<div class="bc-chart-item" v-if="!isChange">
|
<div class="bc-chart-item" v-if="!isChange">
|
||||||
<div class="bcci-header">盖板派工单执行进度</div>
|
<div class="bcci-header">盖板派工单执行进度</div>
|
||||||
<dv-scroll-board :config="config2" style="height:90%;margin-left: 2%;width:96%" />
|
<dv-scroll-board :config="config" style="height:90%;margin-left: 2%;width:96%" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -121,6 +127,20 @@ export default {
|
||||||
createProgressCircle(0),
|
createProgressCircle(0),
|
||||||
completedQuantity // 完成数量
|
completedQuantity // 完成数量
|
||||||
];
|
];
|
||||||
|
}else if(title === 'U1机芯2'){
|
||||||
|
newDataItem = [
|
||||||
|
`PS-${formattedDate2}${String(i).padStart(3, '0')}`, // 编号
|
||||||
|
title, // 固定值
|
||||||
|
formattedDate, // 日期
|
||||||
|
orderQuantity, // 订单量
|
||||||
|
completionRate, // 完成率
|
||||||
|
createProgressCircle(100),
|
||||||
|
createProgressCircle(completionRate2),
|
||||||
|
createProgressCircle(completionRate2),
|
||||||
|
createProgressCircle(completionRate2),
|
||||||
|
createProgressCircle(0),
|
||||||
|
completedQuantity, // 完成数量
|
||||||
|
]
|
||||||
}else {
|
}else {
|
||||||
// eslint-disable-next-line no-const-assign
|
// eslint-disable-next-line no-const-assign
|
||||||
newDataItem = [
|
newDataItem = [
|
||||||
|
|
@ -176,6 +196,14 @@ export default {
|
||||||
columnWidth: [80, 300],
|
columnWidth: [80, 300],
|
||||||
align: ['center']
|
align: ['center']
|
||||||
},
|
},
|
||||||
|
config4: {
|
||||||
|
header: ['工单号', '产品名称','派工日期', '派工数量', '工序进度', '进水调节', '按钮调节', '桶身调节', '桶身装底座', '包装','剩余数量'] ,
|
||||||
|
data: generateRandomData(30, 'U1机芯2'),
|
||||||
|
headerHeight: 50,
|
||||||
|
index: true,
|
||||||
|
columnWidth: [80, 300],
|
||||||
|
align: ['center']
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
<div class="cc-main-container">
|
<div class="cc-main-container">
|
||||||
<div class="ccmc-left">
|
<div class="ccmc-left">
|
||||||
<div class="ccmc-title">
|
<div class="ccmc-title">
|
||||||
订单信息
|
本月工单概况
|
||||||
</div>
|
</div>
|
||||||
<div class="ccmc-items">
|
<div class="ccmc-items">
|
||||||
<div class="station-info" v-for="(item, index) in leftData" :key="index">
|
<div class="station-info" v-for="(item, index) in leftData" :key="index">
|
||||||
|
|
@ -29,12 +29,12 @@
|
||||||
|
|
||||||
<!-- <dv-active-ring-chart class="ccmc-middle" :config="config" /> -->
|
<!-- <dv-active-ring-chart class="ccmc-middle" :config="config" /> -->
|
||||||
<div class="ccmc-middle">
|
<div class="ccmc-middle">
|
||||||
<PieChart></PieChart>
|
<PieChart :dataType="dataType"></PieChart>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ccmc-right">
|
<div class="ccmc-right">
|
||||||
<div class="ccmc-title">
|
<div class="ccmc-title">
|
||||||
保养及备料信息
|
{{dataType=='3'?'未完成订单数量':'保养及备料信息'}}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="ccmc-items">
|
<!-- <div class="ccmc-items">
|
||||||
<div class="station-info" v-for="(item, index) in rightData" :key="index">
|
<div class="station-info" v-for="(item, index) in rightData" :key="index">
|
||||||
|
|
@ -106,6 +106,11 @@ export default {
|
||||||
{ icon: require(`@/img/icons/3.png`), name: '本月派工未完成数', value: '60%' },
|
{ icon: require(`@/img/icons/3.png`), name: '本月派工未完成数', value: '60%' },
|
||||||
{ icon: require(`@/img/icons/3.png`), name: '本月派工完成率', value: '100%' }
|
{ icon: require(`@/img/icons/3.png`), name: '本月派工完成率', value: '100%' }
|
||||||
];
|
];
|
||||||
|
const originalLeftData2 = [
|
||||||
|
{ icon: require(`@/img/icons/1.png`), name: '完成工单数', value: '1120' },
|
||||||
|
{ icon: require(`@/img/icons/2.png`), name: '生产中工单数', value: '600' },
|
||||||
|
{ icon: require(`@/img/icons/3.png`), name: '本月生产完成率', value: '100%' }
|
||||||
|
];
|
||||||
|
|
||||||
const originalRightData = [
|
const originalRightData = [
|
||||||
{ icon: require(`@/img/icons/12.png`), name: '保养台数', value: '20' },
|
{ icon: require(`@/img/icons/12.png`), name: '保养台数', value: '20' },
|
||||||
|
|
@ -113,38 +118,13 @@ export default {
|
||||||
{ icon: require(`@/img/icons/12.png`), name: '机芯备料进度', value: '98%' },
|
{ icon: require(`@/img/icons/12.png`), name: '机芯备料进度', value: '98%' },
|
||||||
{ icon: require(`@/img/icons/12.png`), name: '盖板备料进度', value: '85%' }
|
{ icon: require(`@/img/icons/12.png`), name: '盖板备料进度', value: '85%' }
|
||||||
];
|
];
|
||||||
|
const originalRightData2 = [
|
||||||
|
{ icon: require(`@/img/icons/12.png`), name: '水件', value: '12000' },
|
||||||
|
{ icon: require(`@/img/icons/12.png`), name: '排水阀', value: '8000' },
|
||||||
|
{ icon: require(`@/img/icons/12.png`), name: '进水阀', value: '6200' },
|
||||||
|
{ icon: require(`@/img/icons/12.png`), name: '按钮', value: '3300' }
|
||||||
|
];
|
||||||
|
|
||||||
// 将数值加倍(支持多次加倍)
|
|
||||||
const doubleValue = (value) => {
|
|
||||||
if (typeof value === 'string' && !isNaN(value)) {
|
|
||||||
return (parseFloat(value) * 2).toString();
|
|
||||||
} else if (typeof value === 'string' && value.includes('%')) {
|
|
||||||
return `${(parseFloat(value) * 2)}%`;
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 第一次加倍
|
|
||||||
const doubledLeftData = originalLeftData.map(item => ({
|
|
||||||
...item,
|
|
||||||
value: item.value
|
|
||||||
}));
|
|
||||||
|
|
||||||
const doubledRightData = originalRightData.map(item => ({
|
|
||||||
...item,
|
|
||||||
value: item.value
|
|
||||||
}));
|
|
||||||
|
|
||||||
// 第二次加倍
|
|
||||||
const quadrupledLeftData = doubledLeftData.map(item => ({
|
|
||||||
...item,
|
|
||||||
value: item.value
|
|
||||||
}));
|
|
||||||
|
|
||||||
const quadrupledRightData = doubledRightData.map(item => ({
|
|
||||||
...item,
|
|
||||||
value: item.value
|
|
||||||
}));
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
config: {
|
config: {
|
||||||
|
|
@ -177,8 +157,8 @@ export default {
|
||||||
data: ['机芯产量', '盖板产量']
|
data: ['机芯产量', '盖板产量']
|
||||||
},
|
},
|
||||||
|
|
||||||
leftData: quadrupledLeftData,
|
leftData: this.dataType == '3'?originalLeftData2:originalLeftData,
|
||||||
rightData: quadrupledRightData
|
rightData: this.dataType == '3'?originalRightData2:originalRightData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<dv-full-screen-container>
|
<dv-full-screen-container>
|
||||||
|
|
||||||
|
|
||||||
<top-header Name="褓座数字化智能工厂制造执行系统(MES)" style="height:5%;" />
|
<top-header :Name="dataType=='3'? '恒通达MES系统生产看板':'褓座数字化智能工厂制造执行系统(MES)'" style="height:5%;" />
|
||||||
<dv-border-box-1 class="main-container" style="height: 50%;">
|
<dv-border-box-1 class="main-container" style="height: 50%;">
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -63,9 +63,11 @@ export default {
|
||||||
// 获取 URL 查询参数并设置 dataType
|
// 获取 URL 查询参数并设置 dataType
|
||||||
const queryParams = new URLSearchParams(window.location.search);
|
const queryParams = new URLSearchParams(window.location.search);
|
||||||
const dataTypeParam = queryParams.get('q');
|
const dataTypeParam = queryParams.get('q');
|
||||||
|
console.log(dataTypeParam)
|
||||||
if (dataTypeParam === '1') {
|
if (dataTypeParam === '1') {
|
||||||
this.dataType = '整机';
|
this.dataType = '整机';
|
||||||
|
}else if(dataTypeParam === '3'){
|
||||||
|
this.dataType = '3';
|
||||||
}else{
|
}else{
|
||||||
this.dataType = ''; // 如果不是 '1',则设置为空
|
this.dataType = ''; // 如果不是 '1',则设置为空
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,10 @@
|
||||||
chartData: {
|
chartData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
dataType: {
|
dataType: {
|
||||||
}
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -95,6 +97,49 @@
|
||||||
option: {}
|
option: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created(){
|
||||||
|
// 获取 URL 查询参数并设置 dataType
|
||||||
|
const queryParams = new URLSearchParams(window.location.search);
|
||||||
|
const dataTypeParam = queryParams.get('q');
|
||||||
|
if(dataTypeParam == '3'){
|
||||||
|
this.config.data = [
|
||||||
|
{
|
||||||
|
value: 520,
|
||||||
|
name: "水件",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 280,
|
||||||
|
name: "排水阀",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 100,
|
||||||
|
name: "进水阀",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 100,
|
||||||
|
name: "按钮",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
this.testchartData = [
|
||||||
|
{
|
||||||
|
value: 520,
|
||||||
|
name: "水件",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 280,
|
||||||
|
name: "排水阀",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 100,
|
||||||
|
name: "进水阀",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 100,
|
||||||
|
name: "按钮",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const { createData } = this
|
const { createData } = this
|
||||||
|
|
||||||
|
|
@ -104,8 +149,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
createData() {
|
createData() {
|
||||||
|
let chartData = [
|
||||||
const chartData = [
|
|
||||||
{
|
{
|
||||||
value: 520,
|
value: 520,
|
||||||
name: "机芯产量",
|
name: "机芯产量",
|
||||||
|
|
@ -123,6 +167,7 @@
|
||||||
name: "组件产量",
|
name: "组件产量",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const colorList = [
|
const colorList = [
|
||||||
// new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
// new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
// {
|
// {
|
||||||
|
|
@ -207,7 +252,6 @@
|
||||||
pieData2.push(gapData);
|
pieData2.push(gapData);
|
||||||
}
|
}
|
||||||
var myChart = echarts.init(document.getElementById('pieId-new'));
|
var myChart = echarts.init(document.getElementById('pieId-new'));
|
||||||
const chartDom = document.getElementById('pieId-new');
|
|
||||||
this.option = {
|
this.option = {
|
||||||
title: [
|
title: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue