|
@@ -7,13 +7,13 @@
|
|
|
<!-- 时间选择 -->
|
|
<!-- 时间选择 -->
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<div style="display: flex; align-items: center; justify-content: center;">
|
|
<div style="display: flex; align-items: center; justify-content: center;">
|
|
|
|
|
+ <span style="white-space: nowrap; margin-right: 10px;">时间:</span>
|
|
|
<el-date-picker clearable
|
|
<el-date-picker clearable
|
|
|
v-model="processParams.date"
|
|
v-model="processParams.date"
|
|
|
type="date"
|
|
type="date"
|
|
|
value-format="YYYY-MM-DD"
|
|
value-format="YYYY-MM-DD"
|
|
|
placeholder="请选择日期"
|
|
placeholder="请选择日期"
|
|
|
- style="width: 130px"
|
|
|
|
|
- @change="handleProcessQuery">
|
|
|
|
|
|
|
+ style="width: 130px">
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
<el-select v-model="processParams.hour" placeholder="小时" style="width: 80px; margin-left: 5px;">
|
|
<el-select v-model="processParams.hour" placeholder="小时" style="width: 80px; margin-left: 5px;">
|
|
|
<el-option v-for="hour in 24" :key="hour - 1" :label="(hour - 1).toString().padStart(2, '0') + ':00'"
|
|
<el-option v-for="hour in 24" :key="hour - 1" :label="(hour - 1).toString().padStart(2, '0') + ':00'"
|
|
@@ -76,19 +76,16 @@
|
|
|
<!-- 时间选择 -->
|
|
<!-- 时间选择 -->
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<div style="display: flex; align-items: center; justify-content: center;">
|
|
<div style="display: flex; align-items: center; justify-content: center;">
|
|
|
- <el-date-picker clearable
|
|
|
|
|
- v-model="electricityParams.date"
|
|
|
|
|
- type="date"
|
|
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
|
|
- placeholder="请选择日期"
|
|
|
|
|
- style="width: 130px"
|
|
|
|
|
- @change="handleElectricityQuery">
|
|
|
|
|
|
|
+ <span style="white-space: nowrap; margin-right: 10px;">时间范围:</span>
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="electricityParams.date"
|
|
|
|
|
+ type="daterange"
|
|
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
|
|
+ range-separator="至"
|
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
|
+ end-placeholder="结束日期"
|
|
|
|
|
+ style="width: 250px">
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
- <el-select v-model="electricityParams.hour" placeholder="小时"
|
|
|
|
|
- style="width: 80px; margin-left: 5px;">
|
|
|
|
|
- <el-option v-for="hour in 24" :key="hour - 1" :label="(hour - 1).toString().padStart(2, '0') + ':00'"
|
|
|
|
|
- :value="hour - 1"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
@@ -155,8 +152,10 @@ const processParams = reactive({
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const electricityParams = reactive({
|
|
const electricityParams = reactive({
|
|
|
- date: new Date(new Date().getTime() - 31 * 60 * 60 * 1000).Format('yyyy-MM-dd'),
|
|
|
|
|
- hour: new Date().getHours(),
|
|
|
|
|
|
|
+ date: [
|
|
|
|
|
+ new Date(new Date().getTime() - 31 * 60 * 60 * 1000).Format('yyyy-MM-dd'),
|
|
|
|
|
+ new Date(new Date().getTime() - 31 * 60 * 60 * 1000).Format('yyyy-MM-dd')
|
|
|
|
|
+ ],
|
|
|
types: [],
|
|
types: [],
|
|
|
lines: []
|
|
lines: []
|
|
|
});
|
|
});
|
|
@@ -190,7 +189,7 @@ function getList() {
|
|
|
|
|
|
|
|
// 导出工艺参数
|
|
// 导出工艺参数
|
|
|
function exportProcessParams() {
|
|
function exportProcessParams() {
|
|
|
- proxy.download('dye/process/export', {
|
|
|
|
|
|
|
+ proxy.download('dye/process/exportProc', {
|
|
|
date: processParams.date,
|
|
date: processParams.date,
|
|
|
hour: processParams.hour,
|
|
hour: processParams.hour,
|
|
|
types: processParams.types,
|
|
types: processParams.types,
|
|
@@ -200,9 +199,8 @@ function exportProcessParams() {
|
|
|
|
|
|
|
|
// 导出电量
|
|
// 导出电量
|
|
|
function exportElectricity() {
|
|
function exportElectricity() {
|
|
|
- proxy.download('dye/electricity/export', {
|
|
|
|
|
- date: electricityParams.date,
|
|
|
|
|
- hour: electricityParams.hour,
|
|
|
|
|
|
|
+ proxy.download('dye/process/exportPower', {
|
|
|
|
|
+ date: electricityParams.date.join(","),
|
|
|
types: electricityParams.types,
|
|
types: electricityParams.types,
|
|
|
lines: electricityParams.lines
|
|
lines: electricityParams.lines
|
|
|
}, `前整车间电量_${new Date().getTime()}.xlsx`)
|
|
}, `前整车间电量_${new Date().getTime()}.xlsx`)
|