能源
This commit is contained in:
@@ -53,6 +53,7 @@ import { publicFormatter } from '@/utils/dict';
|
||||
import { getEnergyTypeListAll } from '@/api/base/energyType';
|
||||
import EnergyStatisticsAdd from './components/energyStatisticsAdd';
|
||||
import EnergyStatisticsDet from './components/energyStatisticsDet';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'name',
|
||||
@@ -70,9 +71,9 @@ const tableProps = [
|
||||
filter: publicFormatter('statistic_type'),
|
||||
},
|
||||
{
|
||||
prop: 'energyType',
|
||||
prop: 'energyTypeLabel',
|
||||
label: '能源类型',
|
||||
filter: publicFormatter('energy_type'),
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'paramNum',
|
||||
@@ -86,6 +87,7 @@ const tableProps = [
|
||||
export default {
|
||||
name: 'EnergyStatistics',
|
||||
components: { EnergyStatisticsAdd, EnergyStatisticsDet },
|
||||
mixins: [tableHeightMixin],
|
||||
data() {
|
||||
return {
|
||||
formConfig: [
|
||||
@@ -139,7 +141,6 @@ export default {
|
||||
}
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableH: this.tableHeight(260),
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 班次基础信息列表
|
||||
@@ -158,9 +159,6 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(260);
|
||||
});
|
||||
this.getList();
|
||||
},
|
||||
mounted() {
|
||||
@@ -187,6 +185,13 @@ export default {
|
||||
getList() {
|
||||
getEnergyStatisticsPage(this.queryParams).then((response) => {
|
||||
let arr = response.data.list || [];
|
||||
arr.map((item) => {
|
||||
this.getDictDatas('energy_type').map((subItem) => {
|
||||
if (item.energyType === subItem.value) {
|
||||
item.energyTypeLabel = subItem.label;
|
||||
}
|
||||
});
|
||||
});
|
||||
this.list = arr;
|
||||
this.total = response.data.total;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user