lambo-design-bi 0.0.201 → 0.0.202
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<LamboPageContainer :has-footer="false" :has-header="pageTitle ? true : false">
|
|
4
4
|
<template #page-title>{{ pageTitle }}</template>
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
<LamboIndicatorCardBiSearch v-if="shouldShowLamboIndicator" :has-extend="false" :has-title="false">
|
|
7
7
|
<BiSearchForm :widget="pageWidget.search" @on-search="doSearch">
|
|
8
8
|
</BiSearchForm>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div style="width: 100%">
|
|
3
3
|
<LamboPagingTableBi ref="table" :auto-search="false" :columns="columns" :dataUrl="widget.options.url"
|
|
4
|
-
:export-batch-size="
|
|
4
|
+
:export-batch-size="200" :show-table-option="true" :exportName="widget.name"
|
|
5
5
|
:page-disable="widget.options.isPaging === '0'" :page-size="widget.options.pageSize" :export-request-limit="200"
|
|
6
6
|
:isSingleSelectModel="true" :showSummary="widget.options.isAllSum === '1'" :summary-method="handleSummary"
|
|
7
7
|
@on-data-load="onDataLoad" :searchParams="tableSearchParams">
|
package/package.json
CHANGED
|
@@ -238,11 +238,35 @@ export default {
|
|
|
238
238
|
self.dealWithStream(params)
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
|
+
formatCurrentTime(format = 'yyyyMMddHHmmss', date = new Date()) {
|
|
242
|
+
const d = date instanceof Date ? date : new Date(date);
|
|
243
|
+
|
|
244
|
+
const year = d.getFullYear();
|
|
245
|
+
const month = (d.getMonth() + 1).toString().padStart(2, '0');
|
|
246
|
+
const day = d.getDate().toString().padStart(2, '0');
|
|
247
|
+
const hours = d.getHours().toString().padStart(2, '0');
|
|
248
|
+
const minutes = d.getMinutes().toString().padStart(2, '0');
|
|
249
|
+
const seconds = d.getSeconds().toString().padStart(2, '0');
|
|
250
|
+
|
|
251
|
+
const map = {
|
|
252
|
+
'yyyy': year,
|
|
253
|
+
'MM': month,
|
|
254
|
+
'dd': day,
|
|
255
|
+
'HH': hours,
|
|
256
|
+
'mm': minutes,
|
|
257
|
+
'ss': seconds
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
return format.replace(
|
|
261
|
+
/(yyyy|MM|dd|HH|mm|ss)/g,
|
|
262
|
+
match => map[match]
|
|
263
|
+
);
|
|
264
|
+
},
|
|
241
265
|
dealWithStream(params) {
|
|
242
266
|
let self = this;
|
|
243
267
|
let exportParams = {
|
|
244
268
|
fileFormat: self.form.fileFormat,
|
|
245
|
-
fileName: self.form.fileName +
|
|
269
|
+
fileName: self.form.fileName + this.formatCurrentTime('yyyyMMddHHmmss', new Date()),
|
|
246
270
|
exportType: self.form.exportType,
|
|
247
271
|
tableColumns: self.tableParsedColumns
|
|
248
272
|
}
|
|
@@ -359,7 +383,7 @@ export default {
|
|
|
359
383
|
key: keys,
|
|
360
384
|
data: data,
|
|
361
385
|
autoWidth: true,
|
|
362
|
-
filename: this.form.fileName +
|
|
386
|
+
filename: this.form.fileName + this.formatCurrentTime('yyyyMMddHHmmss', new Date()),
|
|
363
387
|
format: this.form.fileFormat,
|
|
364
388
|
spanColumns: this.exportSpanColumns,
|
|
365
389
|
}
|
|
@@ -135,7 +135,7 @@ export default {
|
|
|
135
135
|
exportIndex(index) {
|
|
136
136
|
let self = this;
|
|
137
137
|
let file = self.getFile(index);
|
|
138
|
-
|
|
138
|
+
self.exportFile(file).then(() => {
|
|
139
139
|
if (index < self.fileList.length && self.showFileList) {
|
|
140
140
|
self.exportIndex(++index);
|
|
141
141
|
}
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
<Tabs type="card" name="export-tab" class="drop-down-tabs">
|
|
139
139
|
<TabPane label="导出" tab="export-tab">
|
|
140
140
|
<export-data ref="exportPart" :dataUrl="dataUrl" :exportUrl="exportUrl" :exportMode="exportMode"
|
|
141
|
-
:exportName="exportTableName" :export-batch-size="
|
|
141
|
+
:exportName="exportTableName" :export-batch-size="totalNumber"
|
|
142
142
|
:export-request-limit="exportRequestLimit" :requestMethod="reqMethod"
|
|
143
143
|
:request-success-codes="requestSuccessCodes" :paginationParams="paginationParams"
|
|
144
144
|
:parsedColumns="parsedColumns" :searchParams="searchParams" :show-summary="tableShowSummary"
|