微调
This commit is contained in:
@@ -92,7 +92,11 @@
|
|||||||
width="80%"
|
width="80%"
|
||||||
>
|
>
|
||||||
<div v-loading="detailLoading">
|
<div v-loading="detailLoading">
|
||||||
|
<div style="margin-bottom: 10px; text-align: right;">
|
||||||
|
<el-button icon="el-icon-Download" type="primary" @click="exportDetailEvent">导出</el-button>
|
||||||
|
</div>
|
||||||
<vxe-table
|
<vxe-table
|
||||||
|
ref="detailTableRef"
|
||||||
:data="detailData"
|
:data="detailData"
|
||||||
auto-resize
|
auto-resize
|
||||||
resizable
|
resizable
|
||||||
@@ -100,6 +104,7 @@
|
|||||||
height="400px"
|
height="400px"
|
||||||
>
|
>
|
||||||
<vxe-column title="序号" width="60" type="seq" align="center"></vxe-column>
|
<vxe-column title="序号" width="60" type="seq" align="center"></vxe-column>
|
||||||
|
|
||||||
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
|
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
|
||||||
<vxe-column field="devName" title="终端名称" align="center" min-width="120"></vxe-column>
|
<vxe-column field="devName" title="终端名称" align="center" min-width="120"></vxe-column>
|
||||||
<vxe-column field="devType" title="终端型号" align="center" min-width="100"></vxe-column>
|
<vxe-column field="devType" title="终端型号" align="center" min-width="100"></vxe-column>
|
||||||
@@ -137,7 +142,7 @@ const options = dictData.getBasicData('Pollution_Calc')
|
|||||||
const tableHeight = ref(500)
|
const tableHeight = ref(500)
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const tableHeaderRef = ref()
|
const tableHeaderRef = ref()
|
||||||
|
const detailTableRef = ref()
|
||||||
const selectedArea = ref()
|
const selectedArea = ref()
|
||||||
const areOptions: any = dictData.state.area
|
const areOptions: any = dictData.state.area
|
||||||
const allData = ref<PollutionItem[]>([])
|
const allData = ref<PollutionItem[]>([])
|
||||||
@@ -169,6 +174,7 @@ const loadDetailData = async (row) => {
|
|||||||
const detailList: PollutionItem[] = []
|
const detailList: PollutionItem[] = []
|
||||||
originalItem.powerFlagPollutionList.forEach((point: any) => {
|
originalItem.powerFlagPollutionList.forEach((point: any) => {
|
||||||
detailList.push({
|
detailList.push({
|
||||||
|
|
||||||
lineName: processNullValue(point.lineName),
|
lineName: processNullValue(point.lineName),
|
||||||
devName: processNullValue(point.devName),
|
devName: processNullValue(point.devName),
|
||||||
devType: processNullValue(point.devType),
|
devType: processNullValue(point.devType),
|
||||||
@@ -403,7 +409,20 @@ const exportEvent = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导出详情数据的方法
|
||||||
|
const exportDetailEvent = () => {
|
||||||
|
detailTableRef.value.exportData({
|
||||||
|
filename: detailDialogTitle.value,
|
||||||
|
sheetName: 'Sheet1',
|
||||||
|
type: 'xlsx',
|
||||||
|
useStyle: true,
|
||||||
|
data: detailData.value,
|
||||||
|
columnFilterMethod({ column }) {
|
||||||
|
// 导出所有列,包括隐藏列
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (props.active) {
|
if (props.active) {
|
||||||
|
|||||||
Reference in New Issue
Block a user