projects/mescc/zhp #47
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-06-17 09:41:03
|
* @Date: 2024-06-17 09:41:03
|
||||||
* @LastEditTime: 2024-06-17 09:54:26
|
* @LastEditTime: 2024-06-18 13:47:36
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -13,3 +13,11 @@ export function getComprehensiveDataPage(data) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getProduceTransData(data) {
|
||||||
|
return request({
|
||||||
|
url: 'ip/prod-output/queryYCEReportByDateRange',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -232,6 +232,8 @@ aside {
|
|||||||
background-color: #d9d9d9;
|
background-color: #d9d9d9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 大屏滚动表格
|
||||||
|
|
||||||
.no-data-bg {
|
.no-data-bg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -252,3 +254,13 @@ aside {
|
|||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dv-scroll-board .rows .ceil,
|
||||||
|
.dv-scroll-board .header .header-item {
|
||||||
|
border-right: 1px solid rgba(13, 23, 40, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dv-scroll-board .rows .ceil:last-child,
|
||||||
|
.dv-scroll-board .header .header-item:last-child {
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
@ -107,7 +107,7 @@ export default {
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
.factory-header > .menu2 {
|
.factory-header > .menu2 {
|
||||||
width: 26vw;
|
width: 20vw;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -73,12 +73,25 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
// rotate:45,
|
interval: 0,//设置横坐标为斜
|
||||||
|
rotate:45,
|
||||||
color: "rgba(255, 255, 255, 0.7)",
|
color: "rgba(255, 255, 255, 0.7)",
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
// formatter: function (value) {
|
||||||
|
// console.log(value);
|
||||||
|
|
||||||
|
// return value;
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
|
// dataZoom: [
|
||||||
|
// {
|
||||||
|
// // show: true,
|
||||||
|
// start: 0,
|
||||||
|
// end: 50
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: "value",
|
type: "value",
|
||||||
name: "单位/片",
|
name: "单位/片",
|
||||||
@ -92,7 +105,7 @@ export default {
|
|||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: "rgba(255, 255, 255, 0.7)",
|
color: "rgba(255, 255, 255, 0.7)",
|
||||||
fontSize: 12,
|
fontSize: 10,
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
@ -226,9 +239,9 @@ export default {
|
|||||||
// this.actualOptions = actualOptions;
|
// this.actualOptions = actualOptions;
|
||||||
// this.initOptions(actualOptions);
|
// this.initOptions(actualOptions);
|
||||||
// },
|
// },
|
||||||
energyCockpits() {
|
// energyCockpits() {
|
||||||
this.initChart();
|
// this.initChart();
|
||||||
},
|
// },
|
||||||
isOpen(val) {
|
isOpen(val) {
|
||||||
this.canvasReset();
|
this.canvasReset();
|
||||||
},
|
},
|
||||||
@ -263,6 +276,9 @@ export default {
|
|||||||
if (this.energyCockpits) {
|
if (this.energyCockpits) {
|
||||||
this.energyCockpits.forEach(ele => {
|
this.energyCockpits.forEach(ele => {
|
||||||
this.data.push(ele.targetProduction)
|
this.data.push(ele.targetProduction)
|
||||||
|
if (ele.workOrderNumber.length > 4) {
|
||||||
|
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
|
||||||
|
}
|
||||||
this.orderXAxis.push(ele.workOrderNumber)
|
this.orderXAxis.push(ele.workOrderNumber)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -273,6 +289,9 @@ export default {
|
|||||||
if (this.energyCockpits) {
|
if (this.energyCockpits) {
|
||||||
this.energyCockpits.forEach(ele => {
|
this.energyCockpits.forEach(ele => {
|
||||||
this.data.push(ele.plannedInvestment)
|
this.data.push(ele.plannedInvestment)
|
||||||
|
if (ele.workOrderNumber.length > 4) {
|
||||||
|
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
|
||||||
|
}
|
||||||
this.orderXAxis.push(ele.workOrderNumber)
|
this.orderXAxis.push(ele.workOrderNumber)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -282,6 +301,9 @@ export default {
|
|||||||
if (this.energyCockpits) {
|
if (this.energyCockpits) {
|
||||||
this.energyCockpits.forEach(ele => {
|
this.energyCockpits.forEach(ele => {
|
||||||
this.data.push(ele.actualInvestment)
|
this.data.push(ele.actualInvestment)
|
||||||
|
if (ele.workOrderNumber.length > 4) {
|
||||||
|
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
|
||||||
|
}
|
||||||
this.orderXAxis.push(ele.workOrderNumber)
|
this.orderXAxis.push(ele.workOrderNumber)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -291,6 +313,9 @@ export default {
|
|||||||
if (this.energyCockpits) {
|
if (this.energyCockpits) {
|
||||||
this.energyCockpits.forEach(ele => {
|
this.energyCockpits.forEach(ele => {
|
||||||
this.data.push(ele.actualProduction)
|
this.data.push(ele.actualProduction)
|
||||||
|
if (ele.workOrderNumber.length > 4) {
|
||||||
|
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
|
||||||
|
}
|
||||||
this.orderXAxis.push(ele.workOrderNumber)
|
this.orderXAxis.push(ele.workOrderNumber)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -300,6 +325,9 @@ export default {
|
|||||||
if (this.energyCockpits) {
|
if (this.energyCockpits) {
|
||||||
this.energyCockpits.forEach(ele => {
|
this.energyCockpits.forEach(ele => {
|
||||||
this.data.push(ele.wasteNum)
|
this.data.push(ele.wasteNum)
|
||||||
|
if (ele.workOrderNumber.length > 4) {
|
||||||
|
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
|
||||||
|
}
|
||||||
this.orderXAxis.push(ele.workOrderNumber)
|
this.orderXAxis.push(ele.workOrderNumber)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -310,6 +338,9 @@ export default {
|
|||||||
this.energyCockpits.forEach(ele => {
|
this.energyCockpits.forEach(ele => {
|
||||||
console.log(ele.reworkNum);
|
console.log(ele.reworkNum);
|
||||||
this.data.push(ele.reworkNum)
|
this.data.push(ele.reworkNum)
|
||||||
|
if (ele.workOrderNumber.length > 4) {
|
||||||
|
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
|
||||||
|
}
|
||||||
this.orderXAxis.push(ele.workOrderNumber)
|
this.orderXAxis.push(ele.workOrderNumber)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-29 14:48:06
|
* @Date: 2024-05-29 14:48:06
|
||||||
* @LastEditTime: 2024-06-17 16:40:15
|
* @LastEditTime: 2024-06-18 14:49:25
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -173,8 +173,11 @@ function getTemplate(period, dataList, than) {
|
|||||||
// console.log('dataList',dataList);
|
// console.log('dataList',dataList);
|
||||||
let items = [];
|
let items = [];
|
||||||
var day1 = new Date();
|
var day1 = new Date();
|
||||||
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000);
|
var day2 = new Date();
|
||||||
|
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
|
||||||
|
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
|
||||||
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
|
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
|
||||||
|
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
|
||||||
//今天的时间
|
//今天的时间
|
||||||
// var day2 = new Date();
|
// var day2 = new Date();
|
||||||
// day2.setTime(day2.getTime());
|
// day2.setTime(day2.getTime());
|
||||||
@ -187,11 +190,11 @@ function getTemplate(period, dataList, than) {
|
|||||||
if (period === 1 && than === '同比') {
|
if (period === 1 && than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
{
|
{
|
||||||
name: `${year-1}年${month}月${today}日`,
|
name: `${year - 1}年${yesterday}日`,
|
||||||
data: dataList ? dataList[0] : [],
|
data: dataList ? dataList[0] : [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: `${month}月${today}日`,
|
name: `${yesterday}日`,
|
||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
@ -199,11 +202,11 @@ function getTemplate(period, dataList, than) {
|
|||||||
} else if (period ===1 && than === '环比') {
|
} else if (period ===1 && than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{
|
{
|
||||||
name: `${yesterday}日`,
|
name: `${dayBeYes}日`,
|
||||||
data: dataList ? dataList[0] : [],
|
data: dataList ? dataList[0] : [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: `${month}月${today}日`,
|
name: `${yesterday}日`,
|
||||||
data: dataList ? dataList[1] : [],
|
data: dataList ? dataList[1] : [],
|
||||||
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-container">
|
<div class="order-container">
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<dv-scroll-board v-if="showTable" :config="config" style="width: 100%; height: 100%" ref="orderScrollBoard" />
|
<dv-scroll-board v-if="showTable" :config="config" style="width: 100%; height: 100%; color: rgba(255, 255, 255, .6);" ref="orderScrollBoard" />
|
||||||
</div>
|
</div>
|
||||||
<div class="chart">
|
<div class="chart">
|
||||||
<div class="chart-title">
|
<div class="chart-title">
|
||||||
@ -42,7 +42,7 @@ export default {
|
|||||||
rowNum: 12,
|
rowNum: 12,
|
||||||
waitTime: 3000,
|
waitTime: 3000,
|
||||||
columnWidth: [150],
|
columnWidth: [150],
|
||||||
align: ["center"],
|
align: ["left"],
|
||||||
carousel: "page",
|
carousel: "page",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -101,40 +101,25 @@ export default {
|
|||||||
arr.push(
|
arr.push(
|
||||||
`<span title=${this.prodOrder[i].workOrderNumber || ""}>${
|
`<span title=${this.prodOrder[i].workOrderNumber || ""}>${
|
||||||
this.prodOrder[i].workOrderNumber || ""
|
this.prodOrder[i].workOrderNumber || ""
|
||||||
}</span>`
|
}</span>`,
|
||||||
);
|
`<span title=${this.prodOrder[i].orderStatus || ""}>${this.prodOrder[i].orderStatus === 1 ? '未开始' : this.prodOrder[i].orderStatus === 2 ? '进行中' : '已完成' || ""
|
||||||
arr.push(
|
}</span>`,
|
||||||
`<span title=${this.prodOrder[i].orderStatus || ""}>${
|
`<span title=${this.prodOrder[i].plannedInvestment || ""}>${this.prodOrder[i].plannedInvestment || ""
|
||||||
this.prodOrder[i].orderStatus === 1 ? '未开始' : this.prodOrder[i].orderStatus === 2 ? '进行中' : '已完成' || ""
|
}</span>`,
|
||||||
}</span>`
|
|
||||||
);
|
|
||||||
arr.push(
|
|
||||||
`<span title=${this.prodOrder[i].plannedInvestment || ""}>${
|
|
||||||
this.prodOrder[i].plannedInvestment || ""
|
|
||||||
}</span>`
|
|
||||||
);
|
|
||||||
arr.push(
|
|
||||||
`<span title=${this.prodOrder[i].actualInvestment || ""}>${this.prodOrder[i].actualInvestment || ""
|
`<span title=${this.prodOrder[i].actualInvestment || ""}>${this.prodOrder[i].actualInvestment || ""
|
||||||
}</span>`
|
}</span>`,
|
||||||
);
|
|
||||||
arr.push(
|
|
||||||
`<span title=${this.prodOrder[i].targetProduction || ""}>${this.prodOrder[i].targetProduction || ""
|
`<span title=${this.prodOrder[i].targetProduction || ""}>${this.prodOrder[i].targetProduction || ""
|
||||||
}</span>`
|
}</span>`,
|
||||||
);
|
|
||||||
arr.push(
|
|
||||||
`<span title=${this.prodOrder[i].actualProduction || ""}>${this.prodOrder[i].actualProduction || ""
|
`<span title=${this.prodOrder[i].actualProduction || ""}>${this.prodOrder[i].actualProduction || ""
|
||||||
}</span>`
|
}</span>`,
|
||||||
);
|
`<span style="display:inline-block;width:45px;">${this.prodOrder[i].productionProgress
|
||||||
arr.push(`<span style="display:inline-block;width:45px;">${
|
|
||||||
this.prodOrder[i].productionProgress
|
|
||||||
? this.prodOrder[i].productionProgress.toFixed(0) + "%"
|
? this.prodOrder[i].productionProgress.toFixed(0) + "%"
|
||||||
: "0%"
|
: "0%"
|
||||||
}</span>
|
}</span>
|
||||||
<div style="display:inline-block;height:20px;margin-top:-5px;vertical-align:middle;">
|
<div style="display:inline-block;height:20px;margin-top:-5px;vertical-align:middle;">
|
||||||
<svg xmlns="http://www.w3.org/200/svg" height="20" width="20">
|
<svg xmlns="http://www.w3.org/200/svg" height="20" width="20">
|
||||||
<circle cx="10" cy="10" r="6" fill="none" stroke="#283851" stroke-width="4" stroke-linecap="round"/>
|
<circle cx="10" cy="10" r="6" fill="none" stroke="#283851" stroke-width="4" stroke-linecap="round"/>
|
||||||
<circle style="transform-origin: center;transform: rotate(-90deg);" id="J_progress_bar" cx="10" cy="10" r="6" fill="none" stroke="#47FF27" stroke-width="4" stroke-dasharray="${
|
<circle style="transform-origin: center;transform: rotate(-90deg);" id="J_progress_bar" cx="10" cy="10" r="6" fill="none" stroke="#47FF27" stroke-width="4" stroke-dasharray="${this.prodOrder[i].productionProgress
|
||||||
this.prodOrder[i].productionProgress
|
|
||||||
? this.prodOrder[i].productionProgress.toFixed(0) *
|
? this.prodOrder[i].productionProgress.toFixed(0) *
|
||||||
37.68 *
|
37.68 *
|
||||||
0.01 +
|
0.01 +
|
||||||
@ -145,7 +130,8 @@ export default {
|
|||||||
: 0 + "," + 37.68
|
: 0 + "," + 37.68
|
||||||
}"/>
|
}"/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>`);
|
</div>`
|
||||||
|
)
|
||||||
outArr.push(arr);
|
outArr.push(arr);
|
||||||
}
|
}
|
||||||
this.config.data = outArr;
|
this.config.data = outArr;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-15 10:49:13
|
* @Date: 2024-04-15 10:49:13
|
||||||
* @LastEditTime: 2024-06-17 14:01:39
|
* @LastEditTime: 2024-06-18 13:41:03
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -352,7 +352,9 @@ export default {
|
|||||||
this.listQuery.startDate = this.listQuery.reportTime[0] + '-01-01 00:00:00'
|
this.listQuery.startDate = this.listQuery.reportTime[0] + '-01-01 00:00:00'
|
||||||
this.listQuery.endDate = this.listQuery.reportTime[1] + '-12-31 23:59:59'
|
this.listQuery.endDate = this.listQuery.reportTime[1] + '-12-31 23:59:59'
|
||||||
}
|
}
|
||||||
this.listQuery.factory = this.currentMenu === '邯郸' ? 1 : 2
|
let arr = []
|
||||||
|
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(2)
|
||||||
|
this.listQuery.factory = arr
|
||||||
const res = await getComprehensiveDataPage(this.listQuery)
|
const res = await getComprehensiveDataPage(this.listQuery)
|
||||||
this.tableData = res.data.list
|
this.tableData = res.data.list
|
||||||
this.listQuery.total = res.data.total
|
this.listQuery.total = res.data.total
|
||||||
|
@ -7,17 +7,17 @@
|
|||||||
<div class="containerTop">
|
<div class="containerTop">
|
||||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
||||||
<el-form-item label="时间维度" prop="date">
|
<el-form-item label="时间维度" prop="date">
|
||||||
<el-select size="small" clearable v-model="listQuery.type" placeholder="请选择">
|
<el-select size="small" clearable v-model="listQuery.date" placeholder="请选择">
|
||||||
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
|
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-show="listQuery.type === 0 || listQuery.type === ''" label="时间范围" prop="reportTime">
|
<el-form-item v-show="listQuery.date === 0 || listQuery.type === ''" label="时间范围" prop="reportTime">
|
||||||
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="daterange" range-separator="至"
|
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="daterange" range-separator="至"
|
||||||
start-placeholder="开始日期" value-format="yyyy-MM-dd HH:mm:ss" @change="changeDayTime" end-placeholder="结束日期">
|
start-placeholder="开始日期" value-format="yyyy-MM-dd HH:mm:ss" @change="changeDayTime" end-placeholder="结束日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-show="listQuery.type === 1" label="时间范围" prop="reportTime">
|
<el-form-item v-show="listQuery.date === 1" label="时间范围" prop="reportTime">
|
||||||
<el-date-picker size="small" clearable v-model="start" type="week" format="yyyy 第 WW 周" placeholder="选择周"
|
<el-date-picker size="small" clearable v-model="start" type="week" format="yyyy 第 WW 周" placeholder="选择周"
|
||||||
style="width: 180px" @change="onValueChange">
|
style="width: 180px" @change="onValueChange">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -29,13 +29,13 @@
|
|||||||
{{ date1 }} 至 {{ date2 }},共 {{ weekNum }} 周
|
{{ date1 }} 至 {{ date2 }},共 {{ weekNum }} 周
|
||||||
</span> -->
|
</span> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-show="listQuery.type === 2" label="时间值" prop="reportTime">
|
<el-form-item v-show="listQuery.date === 2" label="时间值" prop="reportTime">
|
||||||
<el-date-picker size="small" v-model="listQuery.reportTime" type="monthrange"
|
<el-date-picker size="small" v-model="listQuery.reportTime" type="monthrange"
|
||||||
value-format="yyyy-MM-DD HH:mm:ss" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份"
|
value-format="yyyy-MM-DD HH:mm:ss" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份"
|
||||||
@change="changeTime">
|
@change="changeTime">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-show="listQuery.type === 3" label="时间值" prop="reportTime">
|
<el-form-item v-show="listQuery.date === 3" label="时间值" prop="reportTime">
|
||||||
<el-date-picker size="small" clearable v-model="listQuery.reportTime[0]" value-format="yyyy" type="year"
|
<el-date-picker size="small" clearable v-model="listQuery.reportTime[0]" value-format="yyyy" type="year"
|
||||||
placeholder="开始时间">
|
placeholder="开始时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -83,6 +83,7 @@ import bmSearchBar from "./components/bmSearchBar.vue";
|
|||||||
import BmLineBar from "./components/bmLineBar.vue";
|
import BmLineBar from "./components/bmLineBar.vue";
|
||||||
import ButtonNav from '@/components/ButtonNav'
|
import ButtonNav from '@/components/ButtonNav'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import { getProduceTransData } from '@/api/report';
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: "factory",
|
prop: "factory",
|
||||||
@ -132,11 +133,11 @@ export default {
|
|||||||
listQuery: {
|
listQuery: {
|
||||||
// size: 10,
|
// size: 10,
|
||||||
// current: 1,
|
// current: 1,
|
||||||
factory: null,
|
factorys: null,
|
||||||
// total: 0,
|
// total: 0,
|
||||||
type: 2,
|
date: 2,
|
||||||
startDate: undefined,
|
beginTime: undefined,
|
||||||
endDate: undefined,
|
endTime: undefined,
|
||||||
reportTime: []
|
reportTime: []
|
||||||
},
|
},
|
||||||
timeList: [
|
timeList: [
|
||||||
@ -319,13 +320,13 @@ export default {
|
|||||||
this.start = undefined
|
this.start = undefined
|
||||||
this.end = undefined
|
this.end = undefined
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.startDate = Number(this.start)
|
this.listQuery.beginTime = Number(this.start)
|
||||||
this.listQuery.endDate = Number(this.end)
|
this.listQuery.endTime = Number(this.end)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!this.start && !this.end) {
|
if (!this.start && !this.end) {
|
||||||
this.listQuery.startDate = undefined
|
this.listQuery.beginTime = undefined
|
||||||
this.listQuery.endDate = undefined
|
this.listQuery.endTime = undefined
|
||||||
}
|
}
|
||||||
// console.log(e);
|
// console.log(e);
|
||||||
},
|
},
|
||||||
@ -344,12 +345,12 @@ export default {
|
|||||||
});
|
});
|
||||||
this.listQuery.reportTime = [];
|
this.listQuery.reportTime = [];
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.startDate = this.listQuery.reportTime[0]
|
this.listQuery.beginTime = this.listQuery.reportTime[0]
|
||||||
this.listQuery.endDate = this.listQuery.reportTime[1]
|
this.listQuery.endTime = this.listQuery.reportTime[1]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.startDate = undefined
|
this.listQuery.beginTime = undefined
|
||||||
this.listQuery.endDate = undefined
|
this.listQuery.endTime = undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onValueChange(picker, k) { // 选中近k周后触发的操作
|
onValueChange(picker, k) { // 选中近k周后触发的操作
|
||||||
@ -364,15 +365,15 @@ export default {
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.startDate = this.date1
|
this.listQuery.beginTime = this.date1
|
||||||
this.listQuery.endDate = this.date2
|
this.listQuery.endTime = this.date2
|
||||||
// this.listQuery.startDate = Number(moment(this.start.getTime()).format('YYYYWW'))
|
// this.listQuery.beginTime = Number(moment(this.start.getTime()).format('YYYYWW'))
|
||||||
// this.listQuery.endDate = Number(moment(this.end.getTime()).format('YYYYWW'))
|
// this.listQuery.endTime = Number(moment(this.end.getTime()).format('YYYYWW'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!this.start && !this.end) {
|
if (!this.start && !this.end) {
|
||||||
this.listQuery.startDate = undefined
|
this.listQuery.beginTime = undefined
|
||||||
this.listQuery.endDate = undefined
|
this.listQuery.endTime = undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeDayTime() {
|
changeDayTime() {
|
||||||
@ -385,12 +386,12 @@ export default {
|
|||||||
});
|
});
|
||||||
this.listQuery.reportTime = [];
|
this.listQuery.reportTime = [];
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.startDate = this.listQuery.reportTime[0]
|
this.listQuery.beginTime = this.listQuery.reportTime[0]
|
||||||
this.listQuery.endDate = this.listQuery.reportTime[1]
|
this.listQuery.endTime = this.listQuery.reportTime[1]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.startDate = undefined
|
this.listQuery.beginTime = undefined
|
||||||
this.listQuery.endDate = undefined
|
this.listQuery.endTime = undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getOverView() {
|
getOverView() {
|
||||||
@ -408,18 +409,20 @@ export default {
|
|||||||
},
|
},
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
console.log(this.listQuery);
|
console.log(this.listQuery);
|
||||||
if (this.listQuery.type == 3) {
|
if (this.listQuery.date == 3) {
|
||||||
this.listQuery.startDate = this.listQuery.reportTime[0] + '-01-01 00:00:00'
|
this.listQuery.beginTime = this.listQuery.reportTime[0] + '-01-01 00:00:00'
|
||||||
this.listQuery.endDate = this.listQuery.reportTime[1] + '-12-31 23:59:59'
|
this.listQuery.endTime = this.listQuery.reportTime[1] + '-12-31 23:59:59'
|
||||||
}
|
}
|
||||||
this.listQuery.factory = this.currentMenu === '邯郸' ? 1 : 2
|
let arr = []
|
||||||
const res = await getComprehensiveDataPage(this.listQuery)
|
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(2)
|
||||||
|
this.listQuery.factorys = arr
|
||||||
|
const res = await getProduceTransData(this.listQuery)
|
||||||
this.tableData = res.data.list
|
this.tableData = res.data.list
|
||||||
this.listQuery.total = res.data.total
|
this.listQuery.total = res.data.total
|
||||||
if (this.listQuery.total > 0) {
|
if (this.listQuery.total > 0) {
|
||||||
this.tableData.forEach(item => {
|
this.tableData.forEach(item => {
|
||||||
item.startTime = item.startDate ? item.startDate[0] + '-' + item.startDate[1] + '-' + item.startDate[2] : '--'
|
item.startTime = item.beginTime ? item.beginTime[0] + '-' + item.beginTime[1] + '-' + item.beginTime[2] : '--'
|
||||||
item.endTime = item.endDate ? item.endDate[0] + '-' + item.endDate[1] + '-' + item.endDate[2] : '--'
|
item.endTime = item.endTime ? item.endTime[0] + '-' + item.endTime[1] + '-' + item.endTime[2] : '--'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user