|
@@ -28,6 +28,10 @@
|
|
class="btnAn"
|
|
class="btnAn"
|
|
@click="dialogShow"
|
|
@click="dialogShow"
|
|
>高级搜索</button>
|
|
>高级搜索</button>
|
|
|
|
+ <button
|
|
|
|
+ class="btnAn"
|
|
|
|
+ @click="exportHandler('table', '高级查询结果')"
|
|
|
|
+ >导出</button>
|
|
<button
|
|
<button
|
|
class="btnAn"
|
|
class="btnAn"
|
|
@click="toOldAdvance"
|
|
@click="toOldAdvance"
|
|
@@ -51,6 +55,7 @@
|
|
:cell-class-name="cellClass"
|
|
:cell-class-name="cellClass"
|
|
:formatter="tableFormatter"
|
|
:formatter="tableFormatter"
|
|
show-summary
|
|
show-summary
|
|
|
|
+ @mounted="tableMountedHandler"
|
|
@load="load"
|
|
@load="load"
|
|
@cell-click="cellClickHandler"
|
|
@cell-click="cellClickHandler"
|
|
/>
|
|
/>
|
|
@@ -222,9 +227,9 @@
|
|
import Search from '@/components/SearchWithTooltip'
|
|
import Search from '@/components/SearchWithTooltip'
|
|
import SimpleTable from '@/components/SimpleTable'
|
|
import SimpleTable from '@/components/SimpleTable'
|
|
import Dialog from '@/layout/components/Dialog'
|
|
import Dialog from '@/layout/components/Dialog'
|
|
-import { mapGetters } from 'vuex'
|
|
|
|
import { parseTime } from '@/utils/index'
|
|
import { parseTime } from '@/utils/index'
|
|
import { Query } from '@/api/dataIntegration'
|
|
import { Query } from '@/api/dataIntegration'
|
|
|
|
+import { throttledExportToExcel } from '@/utils/table'
|
|
|
|
|
|
const comparisonOperatorOptions = [
|
|
const comparisonOperatorOptions = [
|
|
{
|
|
{
|
|
@@ -922,6 +927,18 @@ export default {
|
|
this.$message.error('失败')
|
|
this.$message.error('失败')
|
|
}
|
|
}
|
|
this.loading = false
|
|
this.loading = false
|
|
|
|
+ },
|
|
|
|
+ tableMountedHandler(refName, ref) {
|
|
|
|
+ this.$refs[refName] = ref
|
|
|
|
+ },
|
|
|
|
+ exportHandler(refName, tableName) {
|
|
|
|
+ if (!this.tableData.length) {
|
|
|
|
+ this.$message.info('无数据')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const table = this.$refs[refName].$el.cloneNode(true)
|
|
|
|
+ const fileName = `${tableName}.xlsx`
|
|
|
|
+ throttledExportToExcel(table, tableName, fileName)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|