lambo-design-bi 0.0.201 → 0.0.204
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
|
}
|
|
@@ -284,10 +308,11 @@ export default {
|
|
|
284
308
|
ajax.request(options).then(function (resp) {
|
|
285
309
|
if (self.requestSuccessCodes.includes(resp.data.code)) {
|
|
286
310
|
let resultData = deepCopy(resp.data.data.rows)
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
311
|
+
// 这里的合计整合过,是总合计不是页合计,暂时隐藏
|
|
312
|
+
// if (self.showSummary && resultData) {
|
|
313
|
+
// let sum = self.summaryData(resultData)
|
|
314
|
+
// resultData.push(sum)
|
|
315
|
+
// }
|
|
291
316
|
self.exportExcel(resultData)
|
|
292
317
|
} else {
|
|
293
318
|
self.$Message.error(resp.data.data)
|
|
@@ -359,7 +384,7 @@ export default {
|
|
|
359
384
|
key: keys,
|
|
360
385
|
data: data,
|
|
361
386
|
autoWidth: true,
|
|
362
|
-
filename: this.form.fileName +
|
|
387
|
+
filename: this.form.fileName + this.formatCurrentTime('yyyyMMddHHmmss', new Date()),
|
|
363
388
|
format: this.form.fileFormat,
|
|
364
389
|
spanColumns: this.exportSpanColumns,
|
|
365
390
|
}
|
|
@@ -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"
|