电饭煲使用接口数据
This commit is contained in:
parent
bed6cd98c9
commit
5f1bc5f444
|
|
@ -8,7 +8,9 @@ const api = {
|
|||
|
||||
baseURL3: 'http://36.139.158.169:9261',
|
||||
|
||||
baseURL: 'http://ppjlar.demo.natool.cn',
|
||||
// baseURL: 'http://ppjlar.demo.natool.cn',
|
||||
|
||||
baseURL: 'http://39.101.165.228:9009',
|
||||
|
||||
get (url) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
|||
|
|
@ -3,24 +3,24 @@
|
|||
<dv-full-screen-container>
|
||||
|
||||
|
||||
<top-header :Name="'电饭煲生产看板'" style="height:10%;" />
|
||||
<div style="display:flex;height: 40%;justify-content: space-around;margin-bottom: 30px;">
|
||||
<top-header v-if="resData" :Name="resData.title" style="height:10%;" />
|
||||
<div v-if="resData" style="display:flex;height: 40%;justify-content: space-around;margin-bottom: 30px;">
|
||||
<div class="main-container" style="width: 32%;">
|
||||
<NewContain :dataType="dataType" style="width:100%;height:100%"/>
|
||||
<NewContain :resData="resData" style="width:100%;height:100%" />
|
||||
</div>
|
||||
<div class="main-container" style="width: 32%;">
|
||||
<NewContain2 :dataType="dataType" style="width:100%;height:100%"/>
|
||||
<NewContain2 :resData="resData" style="width:100%;height:100%"/>
|
||||
</div>
|
||||
<div class="main-container" style="width: 32%;">
|
||||
<NewContain3 :dataType="dataType" style="width:100%;height:100%"/>
|
||||
<NewContain3 :resData="resData" style="width:100%;height:100%"/>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:flex;height: 44%;justify-content: space-around;">
|
||||
<div v-if="resData" style="display:flex;height: 44%;justify-content: space-around;">
|
||||
<div class="main-container" style="width: 48%;">
|
||||
<NewContain4 :dataType="dataType" style="width:100%;height:100%"/>
|
||||
<NewContain4 :resData="resData" style="width:100%;height:100%"/>
|
||||
</div>
|
||||
<div class="main-container" style="width: 48%;">
|
||||
<NewContain5 :dataType="dataType" style="width:100%;height:100%"/>
|
||||
<NewContain5 :resData="resData" style="width:100%;height:100%"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -52,19 +52,21 @@ export default {
|
|||
},
|
||||
created() {
|
||||
// 获取 URL 查询参数并设置 dataType
|
||||
const queryParams = new URLSearchParams(window.location.search);
|
||||
const dataTypeParam = queryParams.get('q');
|
||||
console.log(dataTypeParam)
|
||||
if (dataTypeParam === '1') {
|
||||
this.dataType = '整机';
|
||||
}else if(dataTypeParam === '3'){
|
||||
this.dataType = '3';
|
||||
}else{
|
||||
this.dataType = ''; // 如果不是 '1',则设置为空
|
||||
// const queryParams = new URLSearchParams(window.location.search);
|
||||
// const dataTypeParam = queryParams.get('q');
|
||||
this.$api.post('/api/pg/GetBIDemo',{
|
||||
code:'11'
|
||||
}).then(res=>{
|
||||
console.log(res.data)
|
||||
if(res.code == 200){
|
||||
this.resData = res.data;
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
resData:null,
|
||||
dataType:'',
|
||||
dataType2:'整机',
|
||||
switchType: 2
|
||||
|
|
|
|||
|
|
@ -13,28 +13,21 @@
|
|||
<div class="ncbmc-content">
|
||||
<div class="text-item">
|
||||
<p class="item-left">总人数:</p>
|
||||
<p class="item-right">28人</p>
|
||||
<p class="item-right">{{resData.info.PersonNumber}}人</p>
|
||||
</div>
|
||||
<!-- <div class="text-item">
|
||||
<p class="item-left">订单数量:</p>
|
||||
<p class="item-right">{{ resData.info.OrderQuantity }}</p>
|
||||
</div>
|
||||
<div class="text-item">
|
||||
<p class="item-left">完成数:</p>
|
||||
<p class="item-right">1500</p>
|
||||
</div>
|
||||
<div class="text-item">
|
||||
<p class="item-left">未完成数:</p>
|
||||
<p class="item-right">780</p>
|
||||
</div>
|
||||
<div class="text-item">
|
||||
<p class="item-right">{{ resData.info.DoneQuantity }}</p>
|
||||
</div> -->
|
||||
<div class="text-item" v-for="(item,index) in resData.info.Contacts" :key="'person'+index">
|
||||
<p class="item-left">负责人:</p>
|
||||
<p class="item-right">张三:19909209201</p>
|
||||
</div>
|
||||
<div class="text-item">
|
||||
<p class="item-left">负责人:</p>
|
||||
<p class="item-right">李四:19909209201</p>
|
||||
</div>
|
||||
<div class="text-item">
|
||||
<p class="item-left">负责人:</p>
|
||||
<p class="item-right">王五:19909209201</p>
|
||||
<p class="item-right">{{item.Name}}:{{ item.Phone }}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</dv-border-box-1>
|
||||
|
||||
|
|
@ -56,6 +49,9 @@ export default {
|
|||
LabelTag,
|
||||
},
|
||||
props: {
|
||||
resData:{
|
||||
type:Object,
|
||||
},
|
||||
dataType: {
|
||||
type: String,
|
||||
default: ''
|
||||
|
|
@ -67,6 +63,8 @@ export default {
|
|||
return {
|
||||
}
|
||||
},
|
||||
created(){
|
||||
},
|
||||
// 在mounted()中调用
|
||||
mounted() {
|
||||
|
||||
|
|
|
|||
|
|
@ -17,37 +17,37 @@
|
|||
</div>
|
||||
<div class="current-item">
|
||||
<span class="current-item-name">产品编码:</span>
|
||||
<span class="current-item-value">1102030006</span>
|
||||
<span class="current-item-value">{{resData.info.OrderCode}}</span>
|
||||
</div>
|
||||
<div class="current-item">
|
||||
<span class="current-item-name">产品名称:</span>
|
||||
<span class="current-item-value">电炖锅-MD-DGC4018-亮光银SL008-220V-600W-4L-中国-美的-MD-DGC4018-</span>
|
||||
<span class="current-item-value">{{resData.info.InventoryName}}</span>
|
||||
</div>
|
||||
<div style="display: flex;">
|
||||
<div class="current-item">
|
||||
<span class="current-item-name">工单数量:</span>
|
||||
<span class="current-item-value">1000</span>
|
||||
<span class="current-item-value">{{resData.info.OrderQuantity}}</span>
|
||||
</div>
|
||||
<div class="current-item">
|
||||
<span class="current-item-name">已完成数量:</span>
|
||||
<span class="current-item-value">635</span>
|
||||
<span class="current-item-value">{{resData.info.DoneQuantity}}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="display: flex;">
|
||||
<div class="current-item">
|
||||
<span class="current-item-name">完工进度:</span>
|
||||
<span class="current-item-value">67.5%</span>
|
||||
<span class="current-item-value">{{resData.info.DoneRate * 100}}%</span>
|
||||
</div>
|
||||
<div class="current-item">
|
||||
<span class="current-item-name">备料齐套进度:</span>
|
||||
<span class="current-item-value">98.84%</span>
|
||||
<span class="current-item-value">{{resData.info.MatchQuantity *100}}%</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="current-item">
|
||||
<span class="current-item-name">异常工时:</span>
|
||||
<span class="current-item-value">0H</span>
|
||||
<span class="current-item-value">{{resData.info.ErrorHour}}H</span>
|
||||
</div>
|
||||
</div>
|
||||
</dv-border-box-1>
|
||||
|
|
@ -70,6 +70,9 @@ export default {
|
|||
LabelTag,
|
||||
},
|
||||
props: {
|
||||
resData:{
|
||||
type:Object,
|
||||
},
|
||||
dataType: {
|
||||
type: String,
|
||||
default: ''
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
产线当日合格率
|
||||
</div>
|
||||
<div style="font-size: 40px;font-weight: bold;color: brown;">
|
||||
70%
|
||||
{{resData.defectData.qualifiedRate}}%
|
||||
</div>
|
||||
<div id="ncbox-pie" style="width: 100%;height: 200px;">
|
||||
</div>
|
||||
|
|
@ -28,13 +28,13 @@
|
|||
<div style="width: 20%;">数量</div>
|
||||
<div style="width: 20%;">占比</div>
|
||||
</div>
|
||||
<div class="ncbox-right-item">
|
||||
<div style="width: 20%;">No.1</div>
|
||||
<div style="width: 40%;">不通电</div>
|
||||
<div style="width: 20%;">4</div>
|
||||
<div style="width: 20%;">30.77%</div>
|
||||
<div class="ncbox-right-item" v-for="(item,index) in resData.defectData.defects" :key="'defect'+index">
|
||||
<div style="width: 20%;">No.{{ item.rank }}</div>
|
||||
<div style="width: 40%;">{{item.defectName}}</div>
|
||||
<div style="width: 20%;">{{ item.count }}</div>
|
||||
<div style="width: 20%;">{{item.ratio}}%</div>
|
||||
</div>
|
||||
<div class="ncbox-right-item">
|
||||
<!-- <div class="ncbox-right-item">
|
||||
<div style="width: 20%;">No.2</div>
|
||||
<div style="width: 40%;">发热盘托盘刮花,卡滞、油污</div>
|
||||
<div style="width: 20%;">3</div>
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
<div style="width: 40%;">氖赠/导线压线、破皮、露铜等不良,</div>
|
||||
<div style="width: 20%;">1</div>
|
||||
<div style="width: 20%;">7.69%</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</dv-border-box-1>
|
||||
|
|
@ -80,6 +80,9 @@ export default {
|
|||
LabelTag,
|
||||
},
|
||||
props: {
|
||||
resData:{
|
||||
type:Object,
|
||||
},
|
||||
dataType: {
|
||||
type: String,
|
||||
default: ''
|
||||
|
|
@ -94,6 +97,10 @@ export default {
|
|||
]
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.pieData[0].value = this.resData.defectData.qualifiedRate;
|
||||
this.pieData[1].value = 100 - this.resData.defectData.qualifiedRate;
|
||||
},
|
||||
mounted() {
|
||||
this.initPieChart();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ export default {
|
|||
LabelTag,
|
||||
},
|
||||
props: {
|
||||
resData:{
|
||||
type:Object,
|
||||
},
|
||||
dataType: {
|
||||
type: String,
|
||||
default: ''
|
||||
|
|
@ -42,8 +45,8 @@ export default {
|
|||
initMixedChart() {
|
||||
const chartDom = document.getElementById('nbc-line1');
|
||||
const myChart = echarts.init(chartDom);
|
||||
const actualData = [120, 132, 101, 120, 78, 0];
|
||||
const targetData = [120, 132, 101, 134, 90, 0];
|
||||
const actualData = this.resData.productionData.actual;
|
||||
const targetData = this.resData.productionData.target;
|
||||
const option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
|
|
@ -64,7 +67,7 @@ export default {
|
|||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['08:00-09:00', '09:00-10:00', '10:00-12:00', '13:30-15:30', '15:30-17:30', '17:30-19:30'],
|
||||
data:this.resData.productionData.timeSlots,
|
||||
axisLabel: {
|
||||
fontSize: 14, // 放大 x 轴文字
|
||||
fontWeight: 'bold', // x 轴文字加粗
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ export default {
|
|||
LabelTag,
|
||||
},
|
||||
props: {
|
||||
resData:{
|
||||
type:Object,
|
||||
},
|
||||
dataType: {
|
||||
type: String,
|
||||
default: ''
|
||||
|
|
@ -52,8 +55,8 @@ export default {
|
|||
initMixedChart() {
|
||||
const chartDom = document.getElementById('nbc-line2');
|
||||
const myChart = echarts.init(chartDom);
|
||||
const actualData = [10.5, 10.5, 10.5, 10.5, 0, 0];
|
||||
const targetData = [10.5, 10.5, 10.5, 10.5, 0, 0];
|
||||
const actualData =this.resData.upphData.actual;
|
||||
const targetData =this.resData.upphData.target;
|
||||
const option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
|
|
@ -74,7 +77,7 @@ export default {
|
|||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['08:00-09:00', '09:00-10:00', '10:00-12:00', '13:30-15:30', '15:30-17:30', '17:30-19:30'],
|
||||
data:this.resData.upphData.timeSlots,
|
||||
axisLabel: {
|
||||
fontSize: 14, // 放大 x 轴文字
|
||||
fontWeight: 'bold', // x 轴文字加粗
|
||||
|
|
|
|||
Loading…
Reference in New Issue