|
|
@@ -674,10 +674,33 @@ const action: detailAction[] = [
|
|
|
label: t("common.dataTransmission"),
|
|
|
power: 72,
|
|
|
clickFunc: item => {
|
|
|
- // alert("功能维护中!");
|
|
|
- const { $table } = getCurrentRecords(vxeTableRef.value);
|
|
|
+ const $table = vxeTableRef.value.element;
|
|
|
+
|
|
|
+ const _records = $table.getCheckboxRecords() ?? [];
|
|
|
+ const _cRecords = $table.getCurrentRecord() ?? null;
|
|
|
+
|
|
|
+ let curRecords = [];
|
|
|
+ if ($table) {
|
|
|
+ if (_records.length) {
|
|
|
+ // 获取勾选列表
|
|
|
+ curRecords = _records;
|
|
|
+ } else if (_cRecords) {
|
|
|
+ // 获取当前选中数据
|
|
|
+ curRecords = [_cRecords];
|
|
|
+ } else {
|
|
|
+ // 默认获取全部数据
|
|
|
+ let fullData = $table.getTableData().fullData;
|
|
|
+ if (fullData.length) {
|
|
|
+ curRecords = fullData;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
const now = new Date();
|
|
|
- $table?.openExport({ filename: `床垫报价_${formatTime(now, "{y}-{m}-{d}", false)}` });
|
|
|
+ $table.openExport({
|
|
|
+ filename: `床垫报价_${formatTime(now, "{y}-{m}-{d}", false)}`,
|
|
|
+ data: curRecords,
|
|
|
+ isAllExpand: true
|
|
|
+ });
|
|
|
}
|
|
|
}),
|
|
|
buttonDefault({
|