|
@ -36,13 +36,19 @@ |
|
|
v-loading="loading" :data="dataList" border="true" highlight-current-row="true" |
|
|
v-loading="loading" :data="dataList" border="true" highlight-current-row="true" |
|
|
header-row-style="height: 50px; text-align: center" :span-method="arraySpanMethod" |
|
|
header-row-style="height: 50px; text-align: center" :span-method="arraySpanMethod" |
|
|
:row-class-name="tableRowClassName" :cell-class-name="tableCellClassName"> |
|
|
:row-class-name="tableRowClassName" :cell-class-name="tableCellClassName"> |
|
|
<el-table-column label="" prop="name" align="right" :show-overflow-tooltip="true" width="150" /> |
|
|
<el-table-column label="生产单位" prop="name" align="right" :show-overflow-tooltip="true" width="150" /> |
|
|
<el-table-column label="00:00-08:00" prop="num0008" align="center" :show-overflow-tooltip="true" /> |
|
|
<el-table-column label="班组" prop="tiemFrame" align="center" :show-overflow-tooltip="true" /> |
|
|
<el-table-column label="08:00-16:00" prop="num0816" align="center" :show-overflow-tooltip="true" /> |
|
|
<el-table-column label="生产水耗1" prop="fields" align="center" :show-overflow-tooltip="true" /> |
|
|
<el-table-column label="16:00-24:00" prop="num1624" align="center" :show-overflow-tooltip="true" /> |
|
|
<el-table-column label="生产水耗2" prop="fields1" align="center" :show-overflow-tooltip="true" /> |
|
|
<el-table-column label="00:00-12:00" prop="num0012" align="center" :show-overflow-tooltip="true" /> |
|
|
<el-table-column label="循环水" prop="fields2" align="center" :show-overflow-tooltip="true" /> |
|
|
<el-table-column label="12:00-24:00" prop="num1224" align="center" :show-overflow-tooltip="true" /> |
|
|
<el-table-column label="煤量" prop="fields3" align="center" :show-overflow-tooltip="true" /> |
|
|
<el-table-column label="总(00:00-24:00)" prop="num0024" align="center" :show-overflow-tooltip="true" /> |
|
|
<el-table-column label="天然气" prop="fields4" align="center" :show-overflow-tooltip="true" /> |
|
|
|
|
|
<!-- <el-table-column label="班组用电量" prop="fields5" align="center" :show-overflow-tooltip="true" /> --> |
|
|
|
|
|
<el-table-column label="峰期电量" prop="fields6" align="center" :show-overflow-tooltip="true" /> |
|
|
|
|
|
<el-table-column label="谷期电量" prop="fields7" align="center" :show-overflow-tooltip="true" /> |
|
|
|
|
|
<el-table-column label="平期电量" prop="fields8" align="center" :show-overflow-tooltip="true" /> |
|
|
|
|
|
<el-table-column label="尖峰电量" prop="fields8" align="center" :show-overflow-tooltip="true" /> |
|
|
|
|
|
<el-table-column label="合计电量" prop="fields5" align="center" :show-overflow-tooltip="true" /> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
@ -66,13 +72,16 @@ const dataList = ref([]) |
|
|
const names = ref(''); |
|
|
const names = ref(''); |
|
|
const queryParams = reactive({ |
|
|
const queryParams = reactive({ |
|
|
dateRange: [], |
|
|
dateRange: [], |
|
|
flag: '1' |
|
|
flag: '0', |
|
|
|
|
|
iname:'' |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
const flagList =ref([]) |
|
|
const flagList =ref([]) |
|
|
const handleQuery = async () => { |
|
|
const handleQuery = async () => { |
|
|
const ll = flagList.value.find(map=>map.value == queryParams.flag); |
|
|
const ll = flagList.value.find(map=>map.value == queryParams.flag); |
|
|
names.value = ll?.label |
|
|
names.value = ll?.label |
|
|
|
|
|
queryParams.iname= ll?.label |
|
|
dataList.value = []; |
|
|
dataList.value = []; |
|
|
getList() |
|
|
getList() |
|
|
} |
|
|
} |
|
@ -99,7 +108,8 @@ const resetQuery = async () => { |
|
|
|
|
|
|
|
|
const getList = async () => { |
|
|
const getList = async () => { |
|
|
const res = await TjanalysisApi.queryEnergyConsumption(queryParams) |
|
|
const res = await TjanalysisApi.queryEnergyConsumption(queryParams) |
|
|
dataList.value = res.dataList |
|
|
|
|
|
|
|
|
dataList.value = res |
|
|
loading.value = false |
|
|
loading.value = false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -138,13 +148,13 @@ function tableCellClassName({row, column, rowIndex, columnIndex}) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const exportElecTotal = async () => { |
|
|
const exportElecTotal = async () => { |
|
|
const res = await TjanalysisApi.exportHrpuncherDay(queryParams) |
|
|
const res = await TjanalysisApi.exportEnergyConsumption(queryParams) |
|
|
if (res != null) { |
|
|
if (res != null) { |
|
|
let url = window.URL.createObjectURL(new Blob([res])); |
|
|
let url = window.URL.createObjectURL(new Blob([res])); |
|
|
let link = document.createElement("a"); |
|
|
let link = document.createElement("a"); |
|
|
link.style.display = "none"; |
|
|
link.style.display = "none"; |
|
|
link.href = url; |
|
|
link.href = url; |
|
|
link.setAttribute("download", "热轧穿孔机日统计.xlsx"); |
|
|
link.setAttribute("download", "能耗日统计.xlsx"); |
|
|
document.body.appendChild(link); |
|
|
document.body.appendChild(link); |
|
|
link.click(); |
|
|
link.click(); |
|
|
} |
|
|
} |
|
@ -167,6 +177,7 @@ onMounted(async () => { |
|
|
if (res != null && res.length>0) { |
|
|
if (res != null && res.length>0) { |
|
|
flagList.value = res |
|
|
flagList.value = res |
|
|
queryParams.flag= flagList.value[0].value; |
|
|
queryParams.flag= flagList.value[0].value; |
|
|
|
|
|
queryParams.iname= flagList.value[0].label; |
|
|
const ll = flagList.value.find(map=>map.value == queryParams.flag); |
|
|
const ll = flagList.value.find(map=>map.value == queryParams.flag); |
|
|
names.value = ll?.label |
|
|
names.value = ll?.label |
|
|
} |
|
|
} |
|
|