完成 电能质量问题管理页面 修改 谐波普测管理页面
This commit is contained in:
@@ -28,8 +28,8 @@
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addList">新增</el-button>
|
||||
|
||||
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
||||
|
||||
<el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
@@ -47,9 +47,11 @@ import { mainHeight } from '@/utils/layout'
|
||||
import Add from './add.vue'
|
||||
import Audit from './audit.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||
const dictData = useDictData()
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
|
||||
const istatusList = dictData.getBasicData('On-network_Status')
|
||||
@@ -102,7 +104,7 @@ const tableStore = new TableStore({
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '上传',
|
||||
title: '审核',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return !(
|
||||
@@ -152,13 +154,25 @@ provide('tableStore', tableStore)
|
||||
const addList = () => {
|
||||
addRef.value.open()
|
||||
}
|
||||
// 提交
|
||||
const submit = () => {
|
||||
console.log(123, fileList.value)
|
||||
}
|
||||
// 保存
|
||||
const preservation = () => {}
|
||||
|
||||
// 导出
|
||||
const exportEvent = () => {
|
||||
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||
form.pageNum = 1
|
||||
form.pageSize = tableStore.table.total
|
||||
getLoadTypeUserList(form).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '未建档非线性用户', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||
columnFilterMethod: function (column: any) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user