季度
This commit is contained in:
@@ -46,6 +46,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
/* 导入本地excel文件 */
|
/* 导入本地excel文件 */
|
||||||
importFile(file) {
|
importFile(file) {
|
||||||
|
const hide = this.$message.loading('导入中..', 0);
|
||||||
try {
|
try {
|
||||||
let reader = new FileReader();
|
let reader = new FileReader();
|
||||||
reader.onload = (e) => {
|
reader.onload = (e) => {
|
||||||
@@ -105,8 +106,10 @@
|
|||||||
// 上传到服务器
|
// 上传到服务器
|
||||||
|
|
||||||
Promise.all(tasks).then(() => {
|
Promise.all(tasks).then(() => {
|
||||||
this.$refs.noise.reload()
|
this.$refs.noise&&this.$refs.noise.reload()
|
||||||
this.$refs.place.reload()
|
this.$refs.place&&this.$refs.place.reload()
|
||||||
|
}).finally(()=>{
|
||||||
|
hide();
|
||||||
})
|
})
|
||||||
|
|
||||||
// console.log(billData);
|
// console.log(billData);
|
||||||
|
|||||||
@@ -1,5 +1,80 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="">
|
<div class="">
|
||||||
|
<a-form :model="where" :rules="whereRules" :labelCol="{ offset: 1 }">
|
||||||
|
<a-row>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
|
<a-form-item label="统计模块:">
|
||||||
|
<a-select
|
||||||
|
:options="groupModelOptions"
|
||||||
|
v-model:value="where.groupModel"
|
||||||
|
placeholder="统计模块"
|
||||||
|
>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
|
<a-form-item label="时间细度:">
|
||||||
|
<a-select
|
||||||
|
:options="groupTimeLengthOptions"
|
||||||
|
v-model:value="where.groupTimeLength"
|
||||||
|
placeholder=""
|
||||||
|
>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
|
<a-form-item name="timeRange" label="时间范围:">
|
||||||
|
<a-range-picker
|
||||||
|
@panelChange="timeRangePanelChange"
|
||||||
|
v-model:value="timeRange"
|
||||||
|
format="YYYY"
|
||||||
|
:mode="['year', 'year']"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
|
<a-form-item label="昼夜:">
|
||||||
|
<a-select
|
||||||
|
:options="timeSlotOptions"
|
||||||
|
v-model:value="where.timeSlot"
|
||||||
|
placeholder="昼夜"
|
||||||
|
>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :lg="12" :md="12" :sm="24" :xs="24">
|
||||||
|
<a-form-item label="类型:">
|
||||||
|
<a-select
|
||||||
|
v-model:value="where.valueType"
|
||||||
|
:options="valueTypeOptions"
|
||||||
|
mode="multiple"
|
||||||
|
placeholder="至少选择一项"
|
||||||
|
>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<!-- <a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
|
<a-form-item label="时间范围:">
|
||||||
|
<a-range-picker @change="reportTimeScopeChange" :mode="['year','year']" separator="~" v-model:value="where.reportTimeScope" ><a-range-picker>
|
||||||
|
<template #renderExtraFooter>
|
||||||
|
extra footer
|
||||||
|
</template>
|
||||||
|
</a-range-picker>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col> -->
|
||||||
|
|
||||||
|
<a-col :lg="12" :md="12" :sm="24" :xs="24">
|
||||||
|
<a-form-item class="ele-text-right" :wrapper-col="{ span: 24 }">
|
||||||
|
<a-space>
|
||||||
|
<a-button type="primary" @click="reload">查询</a-button>
|
||||||
|
<a-button @click="reset">重置</a-button>
|
||||||
|
<a-button @click="exportFile">导出Excel</a-button>
|
||||||
|
</a-space>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
v-if="hisYears.length > 0"
|
v-if="hisYears.length > 0"
|
||||||
ref="table"
|
ref="table"
|
||||||
@@ -11,78 +86,14 @@
|
|||||||
:initLoad="false"
|
:initLoad="false"
|
||||||
:scroll="{ x: 'max-content' }"
|
:scroll="{ x: 'max-content' }"
|
||||||
:method="'POST'"
|
:method="'POST'"
|
||||||
@done="d=>data = d.data"
|
@done="(d) => (data = d.data)"
|
||||||
>
|
>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<a-form :model="where" layout="inline" :labelCol="{ offset: 1 }">
|
|
||||||
<a-row>
|
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
|
||||||
<a-form-item label="统计模块:">
|
|
||||||
<a-select
|
|
||||||
:options="groupModelOptions"
|
|
||||||
v-model:value="where.groupModel"
|
|
||||||
placeholder="统计模块"
|
|
||||||
>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
|
||||||
<a-form-item label="时间细度:">
|
|
||||||
<a-select
|
|
||||||
:options="groupTimeLengthOptions"
|
|
||||||
v-model:value="where.groupTimeLength"
|
|
||||||
placeholder=""
|
|
||||||
>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
|
||||||
<a-form-item label="昼夜:">
|
|
||||||
<a-select
|
|
||||||
:options="timeSlotOptions"
|
|
||||||
v-model:value="where.timeSlot"
|
|
||||||
placeholder="昼夜"
|
|
||||||
>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
|
||||||
<a-form-item label="类型:">
|
|
||||||
<a-select
|
|
||||||
v-model:value="where.valueType"
|
|
||||||
:options="valueTypeOptions"
|
|
||||||
mode="multiple"
|
|
||||||
placeholder="Please select"
|
|
||||||
style="width: 400px"
|
|
||||||
>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<!-- <a-col :lg="6" :md="12" :sm="24" :xs="24">
|
|
||||||
<a-form-item label="时间范围:">
|
|
||||||
<a-range-picker @change="reportTimeScopeChange" :mode="['year','year']" separator="~" v-model:value="where.reportTimeScope" ><a-range-picker>
|
|
||||||
<template #renderExtraFooter>
|
|
||||||
extra footer
|
|
||||||
</template>
|
|
||||||
</a-range-picker>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col> -->
|
|
||||||
|
|
||||||
<a-col :lg="4" :md="12" :sm="24" :xs="24">
|
|
||||||
<a-form-item class="ele-text-right" :wrapper-col="{ span: 24 }">
|
|
||||||
<a-space>
|
|
||||||
<a-button type="primary" @click="reload">查询</a-button>
|
|
||||||
<a-button @click="reset">重置</a-button>
|
|
||||||
<a-button @click="exportFile">导出excel</a-button>
|
|
||||||
</a-space>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
<!-- <a-space>
|
<!-- <a-space>
|
||||||
|
|
||||||
</a-space> -->
|
</a-space> -->
|
||||||
</template>
|
</template>
|
||||||
</ele-pro-table>
|
</ele-pro-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -101,9 +112,9 @@ export default {
|
|||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
const groupModelOptions = [
|
const groupModelOptions = [
|
||||||
{label: "测点",value: "place"},
|
{ label: "测点", value: "place" },
|
||||||
{label: "城区",value: "area"},
|
{ label: "城区", value: "area" },
|
||||||
{label: "市",value: "city"},
|
{ label: "市", value: "city" },
|
||||||
];
|
];
|
||||||
const groupTimeLengthOptions = [
|
const groupTimeLengthOptions = [
|
||||||
{
|
{
|
||||||
@@ -124,7 +135,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "SD",
|
label: "SD",
|
||||||
value: "index_Sd",
|
value: "index_SD",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "L10",
|
label: "L10",
|
||||||
@@ -147,19 +158,23 @@ export default {
|
|||||||
value: "index_Lmax",
|
value: "index_Lmax",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const whereRules = {};
|
||||||
return {
|
return {
|
||||||
url: pageRoadNoiseCompare,
|
url: pageRoadNoiseCompare,
|
||||||
data: [],
|
data: [],
|
||||||
where: {
|
where: {
|
||||||
groupModel: "area",
|
groupModel: "area",
|
||||||
groupTimeLength: "monitor_year",
|
groupTimeLength: "monitor_year",
|
||||||
timeSlot: "昼",
|
|
||||||
reportTimeScope: [],
|
reportTimeScope: [],
|
||||||
valueType: ["index_Leq"],
|
valueType: ["index_Leq"],
|
||||||
|
timeRange:[]
|
||||||
},
|
},
|
||||||
|
timeRange: [],
|
||||||
|
whereRules,
|
||||||
hisYears: [],
|
hisYears: [],
|
||||||
timeScope: [],
|
timeScope: [],
|
||||||
columns: [{title:'年',dataIndex: 'year'}],
|
columns: [{ title: "年", dataIndex: "year" }],
|
||||||
groupModelOptions,
|
groupModelOptions,
|
||||||
groupTimeLengthOptions,
|
groupTimeLengthOptions,
|
||||||
valueTypeOptions: ref(valueTypeOptions),
|
valueTypeOptions: ref(valueTypeOptions),
|
||||||
@@ -178,15 +193,27 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
getHistoryyears().then((res) => {
|
getHistoryyears().then((res) => {
|
||||||
this.hisYears = res.data.data;
|
this.hisYears = res.data.data;
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(() => {
|
||||||
this.reload()
|
this.reload();
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/* 刷新表格 */
|
/* 刷新表格 */
|
||||||
reload() {
|
reload() {
|
||||||
this.stableDone()
|
if (this.where.valueType.length == 0) {
|
||||||
|
this.$message.error("请至少选择一个类型");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 结束时间必须大于开始时间
|
||||||
|
if (this.where.timeRange && this.where.timeRange.length == 2) {
|
||||||
|
if (this.where.timeRange[0] > this.where.timeRange[1]) {
|
||||||
|
this.$message.error("结束时间必须大于起始时间");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.stableDone();
|
||||||
this.$refs.table.reload({
|
this.$refs.table.reload({
|
||||||
where: this.where,
|
where: this.where,
|
||||||
});
|
});
|
||||||
@@ -195,15 +222,19 @@ export default {
|
|||||||
reset() {
|
reset() {
|
||||||
this.where = {
|
this.where = {
|
||||||
model: "place",
|
model: "place",
|
||||||
timeSlot: "昼",
|
|
||||||
};
|
};
|
||||||
this.this.timeScope = [];
|
this.this.timeScope = [];
|
||||||
|
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
},
|
||||||
reportTimeScopeChange(d, dstr) {
|
reportTimeScopeChange(d, dstr) {
|
||||||
console.log(d, dstr);
|
console.log(d, dstr);
|
||||||
},
|
},
|
||||||
|
timeRangePanelChange(val) {
|
||||||
|
val[0]&&(this.where.timeRange[0] = val[0].year());
|
||||||
|
val[1]&&(this.where.timeRange[1] = val[1].year());
|
||||||
|
this.timeRange = val;
|
||||||
|
},
|
||||||
|
// 数据加载完成
|
||||||
stableDone() {
|
stableDone() {
|
||||||
const columns = [];
|
const columns = [];
|
||||||
if (this.where.groupModel == "area") {
|
if (this.where.groupModel == "area") {
|
||||||
@@ -226,122 +257,203 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.where.groupTimeLength == "quarter") {
|
|
||||||
columns.push({
|
|
||||||
title: "季度",
|
|
||||||
dataIndex: "quarter",
|
|
||||||
sorter: true,
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
switch (text) {
|
|
||||||
case 1:
|
|
||||||
return "第一季度";
|
|
||||||
case 2:
|
|
||||||
return "第二季度";
|
|
||||||
case 3:
|
|
||||||
return "第三季度";
|
|
||||||
case 4:
|
|
||||||
return "第四季度";
|
|
||||||
|
|
||||||
default:
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.hisYears.forEach((item) => {
|
this.hisYears.forEach((item) => {
|
||||||
if (this.where.valueType.includes("index_Leq")) {
|
if (this.where.groupTimeLength == "quarter") {
|
||||||
columns.push({
|
columns.push({
|
||||||
title: item + "年Leq",
|
title: item + "年第一季度Leq",
|
||||||
dataIndex: item + "Leq",
|
dataIndex: item+'1'+"Leq",
|
||||||
customRender: ({ text }) => {
|
});
|
||||||
const val = text ? Number(text).toFixed(2) : "";
|
columns.push({
|
||||||
console.log(val);
|
title: item + "年第二季度Leq",
|
||||||
return val;
|
dataIndex: item+'2'+"Leq",
|
||||||
},
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第三季度Leq",
|
||||||
|
dataIndex: item+'3'+"Leq",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第四季度Leq",
|
||||||
|
dataIndex: item+'4'+"Leq",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第一季度SD",
|
||||||
|
dataIndex: item+'1'+"Sd",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第二季度SD",
|
||||||
|
dataIndex: item+'2'+"Sd",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第三季度SD",
|
||||||
|
dataIndex: item+'3'+"Sd",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第四季度SD",
|
||||||
|
dataIndex: item+'4'+"Sd",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第一季度L10",
|
||||||
|
dataIndex: item+'1'+"L10",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第二季度L10",
|
||||||
|
dataIndex: item+'2'+"L10",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第三季度L10",
|
||||||
|
dataIndex: item+'3'+"L10",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第四季度L10",
|
||||||
|
dataIndex: item+'4'+"L10",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第一季度L50",
|
||||||
|
dataIndex: item+'1'+"L50",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第二季度L50",
|
||||||
|
dataIndex: item+'2'+"L50",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第三季度L50",
|
||||||
|
dataIndex: item+'3'+"L50",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第四季度L50",
|
||||||
|
dataIndex: item+'4'+"L50",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第一季度L90",
|
||||||
|
dataIndex: item+'1'+"L90",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第二季度L90",
|
||||||
|
dataIndex: item+'2'+"L90",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第三季度L90",
|
||||||
|
dataIndex: item+'3'+"L90",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第四季度L90",
|
||||||
|
dataIndex: item+'4'+"L90",
|
||||||
});
|
});
|
||||||
}
|
|
||||||
if (this.where.valueType.includes("index_SD")) {
|
|
||||||
columns.push({
|
columns.push({
|
||||||
title: item + "年SD",
|
title: item + "年第一季度Lmin",
|
||||||
dataIndex: item + "Sd",
|
dataIndex: item+'1'+"Lmin",
|
||||||
customRender: ({ text }) => {
|
});
|
||||||
const val = text ? Number(text).toFixed(2) : "";
|
columns.push({
|
||||||
console.log(val);
|
title: item + "年第二季度Lmin",
|
||||||
return val;
|
dataIndex: item+'2'+"Lmin",
|
||||||
},
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第三季度Lmin",
|
||||||
|
dataIndex: item+'3'+"Lmin",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第四季度Lmin",
|
||||||
|
dataIndex: item+'4'+"Lmin",
|
||||||
});
|
});
|
||||||
}
|
|
||||||
if (this.where.valueType.includes("index_L10")) {
|
|
||||||
columns.push({
|
columns.push({
|
||||||
title: item + "年L10",
|
title: item + "年第一季度Lmax",
|
||||||
dataIndex: item + "L10",
|
dataIndex: item+'1'+"Lmax",
|
||||||
customRender: ({ text }) => {
|
|
||||||
const val = text ? Number(text).toFixed(2) : "";
|
|
||||||
console.log(val);
|
|
||||||
return val;
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
columns.push({
|
||||||
|
title: item + "年第二季度Lmax",
|
||||||
|
dataIndex: item+'2'+"Lmax",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第三季度Lmax",
|
||||||
|
dataIndex: item+'3'+"Lmax",
|
||||||
|
});
|
||||||
|
columns.push({
|
||||||
|
title: item + "年第四季度Lmax",
|
||||||
|
dataIndex: item+'4'+"Lmax",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (this.where.valueType.includes("index_Leq")) {
|
||||||
|
columns.push({
|
||||||
|
title: item + "年Leq",
|
||||||
|
dataIndex: item + "Leq",
|
||||||
|
customRender: ({ text }) => {
|
||||||
|
const val = text ? Number(text).toFixed(2) : "";
|
||||||
|
return val;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (this.where.valueType.includes("index_SD")) {
|
||||||
|
columns.push({
|
||||||
|
title: item + "年SD",
|
||||||
|
dataIndex: item + "Sd",
|
||||||
|
customRender: ({ text }) => {
|
||||||
|
const val = text ? Number(text).toFixed(2) : "";
|
||||||
|
return val;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (this.where.valueType.includes("index_L10")) {
|
||||||
|
columns.push({
|
||||||
|
title: item + "年L10",
|
||||||
|
dataIndex: item + "L10",
|
||||||
|
customRender: ({ text }) => {
|
||||||
|
const val = text ? Number(text).toFixed(2) : "";
|
||||||
|
return val;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (this.where.valueType.includes("index_L50")) {
|
if (this.where.valueType.includes("index_L50")) {
|
||||||
columns.push({
|
columns.push({
|
||||||
title: item + "年L50",
|
title: item + "年L50",
|
||||||
dataIndex: item + "L50",
|
dataIndex: item + "L50",
|
||||||
customRender: ({ text }) => {
|
customRender: ({ text }) => {
|
||||||
const val = text ? Number(text).toFixed(2) : "";
|
const val = text ? Number(text).toFixed(2) : "";
|
||||||
console.log(val);
|
return val;
|
||||||
return val;
|
},
|
||||||
},
|
});
|
||||||
});
|
}
|
||||||
}
|
if (this.where.valueType.includes("index_L90")) {
|
||||||
if (this.where.valueType.includes("index_L90")) {
|
columns.push({
|
||||||
columns.push({
|
title: item + "年L90",
|
||||||
title: item + "年L90",
|
dataIndex: item + "L90",
|
||||||
dataIndex: item + "L90",
|
customRender: ({ text }) => {
|
||||||
customRender: ({ text }) => {
|
const val = text ? Number(text).toFixed(2) : "";
|
||||||
const val = text ? Number(text).toFixed(2) : "";
|
return val;
|
||||||
console.log(val);
|
},
|
||||||
return val;
|
});
|
||||||
},
|
}
|
||||||
});
|
if (this.where.valueType.includes("index_Lmin")) {
|
||||||
}
|
columns.push({
|
||||||
if (this.where.valueType.includes("index_Lmin")) {
|
title: item + "年Lmin",
|
||||||
columns.push({
|
dataIndex: item + "Lmin",
|
||||||
title: item + "年Lmin",
|
customRender: ({ text }) => {
|
||||||
dataIndex: item + "Lmin",
|
const val = text ? Number(text).toFixed(2) : "";
|
||||||
customRender: ({ text }) => {
|
return val;
|
||||||
const val = text ? Number(text).toFixed(2) : "";
|
},
|
||||||
console.log(val);
|
});
|
||||||
return val;
|
}
|
||||||
},
|
if (this.where.valueType.includes("index_Lmax")) {
|
||||||
});
|
columns.push({
|
||||||
}
|
title: item + "年Lmax",
|
||||||
if (this.where.valueType.includes("index_Lmax")) {
|
dataIndex: item + "Lmax",
|
||||||
columns.push({
|
customRender: ({ text }) => {
|
||||||
title: item + "年Lmax",
|
const val = text ? Number(text).toFixed(2) : "";
|
||||||
dataIndex: item + "Lmax",
|
return val;
|
||||||
customRender: ({ text }) => {
|
},
|
||||||
const val = text ? Number(text).toFixed(2) : "";
|
});
|
||||||
console.log(val);
|
}
|
||||||
return val;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
console.log(columns);
|
|
||||||
|
|
||||||
this.columns = columns;
|
this.columns = columns;
|
||||||
},
|
},
|
||||||
exportFile() {
|
exportFile() {
|
||||||
const arr = [];
|
const arr = [];
|
||||||
const th = this.columns.map(item=>item.title);
|
const th = this.columns.map((item) => item.title);
|
||||||
|
arr.push(th);
|
||||||
arr.push(th)
|
|
||||||
this.data.forEach((d) => {
|
this.data.forEach((d) => {
|
||||||
const td = this.columns.map(item=>d[item.dataIndex]);
|
const td = this.columns.map((item) => d[item.dataIndex]);
|
||||||
arr.push(td);
|
arr.push(td);
|
||||||
});
|
});
|
||||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||||
|
|||||||
@@ -11,14 +11,11 @@
|
|||||||
<!-- <a-tab-pane key="quarter" tab="季度报告">
|
<!-- <a-tab-pane key="quarter" tab="季度报告">
|
||||||
<quarter-statistic></quarter-statistic>
|
<quarter-statistic></quarter-statistic>
|
||||||
</a-tab-pane> -->
|
</a-tab-pane> -->
|
||||||
<a-tab-pane key="year-compare" tab="报告">
|
<a-tab-pane key="year-compare" tab="年度报告">
|
||||||
<compare></compare>
|
<compare></compare>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
|
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user