@oinone/kunlun-vue-admin-base 6.2.13 → 6.2.14
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.
- package/dist/oinone-kunlun-vue-admin-base.css +1 -1
- package/dist/oinone-kunlun-vue-admin-base.esm.js +58 -48
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/file/excel/typing/index.d.ts +3 -1
- package/package.json +8 -8
- package/src/field/transfer/ExportFieldTransfer.ts +4 -2
- package/src/file/excel/action/ExportWorkbookActionWidget.ts +18 -4
- package/src/file/excel/typing/index.ts +1 -1
|
@@ -67638,11 +67638,12 @@ let ExportFieldTransfer = class ExportFieldTransfer extends FormTransferFieldWid
|
|
|
67638
67638
|
return [];
|
|
67639
67639
|
}
|
|
67640
67640
|
const tableFields = (_b = this.metadataRuntimeContext.parentContext) === null || _b === void 0 ? void 0 : _b.model.modelFields.map((f) => {
|
|
67641
|
+
var _a;
|
|
67641
67642
|
const target = this.options.find((o) => `${o.model}+${o.field}` === `${f.model}+${f.data}`);
|
|
67642
67643
|
if (!target) {
|
|
67643
67644
|
return undefined;
|
|
67644
67645
|
}
|
|
67645
|
-
return Object.assign(Object.assign({}, target), { displayName: f.label || target.displayName, invisible: f.invisible });
|
|
67646
|
+
return Object.assign(Object.assign({}, target), { displayName: f.label || target.displayName, invisible: f.invisible, optionLabel: (_a = f.template) === null || _a === void 0 ? void 0 : _a.optionLabel });
|
|
67646
67647
|
}).filter((v) => !!v && BooleanHelper.isFalse(v.invisible));
|
|
67647
67648
|
return (tableFields || []);
|
|
67648
67649
|
}
|
|
@@ -67653,11 +67654,12 @@ let ExportFieldTransfer = class ExportFieldTransfer extends FormTransferFieldWid
|
|
|
67653
67654
|
}
|
|
67654
67655
|
const tableFields = (_a = this.metadataRuntimeContext.parentContext) === null || _a === void 0 ? void 0 : _a.model.modelFields;
|
|
67655
67656
|
return super.generatorFullOptions(content.map((o) => {
|
|
67657
|
+
var _a;
|
|
67656
67658
|
const target = tableFields === null || tableFields === void 0 ? void 0 : tableFields.find((f) => `${o.model}+${o.field}` === `${f.model}+${f.data}`);
|
|
67657
67659
|
if (!target) {
|
|
67658
67660
|
return o;
|
|
67659
67661
|
}
|
|
67660
|
-
return Object.assign(Object.assign({}, o), { displayName: target.label || o.displayName });
|
|
67662
|
+
return Object.assign(Object.assign({}, o), { displayName: target.label || o.displayName, optionLabel: (_a = target.template) === null || _a === void 0 ? void 0 : _a.optionLabel });
|
|
67661
67663
|
}));
|
|
67662
67664
|
}
|
|
67663
67665
|
backfillSelectedValues() {
|
|
@@ -95747,54 +95749,62 @@ let ExportWorkbookActionWidget = class ExportWorkbookActionWidget extends Abstra
|
|
|
95747
95749
|
return BooleanHelper.isTrue((_b = (_a = this.metadataRuntimeContext.viewAction) === null || _a === void 0 ? void 0 : _a.template) === null || _b === void 0 ? void 0 : _b.sync);
|
|
95748
95750
|
}
|
|
95749
95751
|
generatorGQLByTask(task, condition) {
|
|
95750
|
-
|
|
95751
|
-
|
|
95752
|
-
|
|
95753
|
-
|
|
95754
|
-
|
|
95755
|
-
|
|
95756
|
-
|
|
95757
|
-
rsql = condition.toString();
|
|
95758
|
-
}
|
|
95759
|
-
const conditionWrapper = condition
|
|
95760
|
-
? {
|
|
95761
|
-
rsql,
|
|
95762
|
-
queryData
|
|
95763
|
-
}
|
|
95764
|
-
: undefined;
|
|
95765
|
-
const modelName = this.model.name || 'excelExportTask';
|
|
95766
|
-
return GQL.mutation(`${modelName}Mutation`, 'createExportTask')
|
|
95767
|
-
.buildRequest((builder) => {
|
|
95768
|
-
builder.buildObjectParameter('data', (builder) => {
|
|
95769
|
-
const { workbookDefinition, exportMethod, selectedFields } = task;
|
|
95770
|
-
builder.stringParameter('model', task.model);
|
|
95771
|
-
builder.booleanParameter('sync', true);
|
|
95772
|
-
if (workbookDefinition) {
|
|
95773
|
-
builder.buildObjectParameter('workbookDefinition', (builder) => {
|
|
95774
|
-
builder.stringParameter('id', workbookDefinition.id);
|
|
95775
|
-
});
|
|
95776
|
-
}
|
|
95777
|
-
if (conditionWrapper) {
|
|
95778
|
-
builder.buildObjectParameter('conditionWrapper', (builder) => {
|
|
95779
|
-
builder.stringParameter('rsql', conditionWrapper.rsql);
|
|
95780
|
-
builder.stringParameter('queryData', conditionWrapper.queryData);
|
|
95781
|
-
});
|
|
95782
|
-
}
|
|
95783
|
-
if (exportMethod) {
|
|
95784
|
-
builder.enumerationParameter('exportMethod', exportMethod);
|
|
95752
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95753
|
+
let queryData = '{}';
|
|
95754
|
+
let rsql = condition;
|
|
95755
|
+
if (condition instanceof Condition) {
|
|
95756
|
+
const conditionBodyData = condition.getConditionBodyData();
|
|
95757
|
+
if (conditionBodyData && Object.keys(conditionBodyData).length) {
|
|
95758
|
+
queryData = GraphqlHelper.serializableObject(conditionBodyData);
|
|
95785
95759
|
}
|
|
95786
|
-
|
|
95787
|
-
|
|
95788
|
-
|
|
95789
|
-
|
|
95790
|
-
|
|
95760
|
+
rsql = condition.toString();
|
|
95761
|
+
}
|
|
95762
|
+
const conditionWrapper = condition
|
|
95763
|
+
? {
|
|
95764
|
+
rsql,
|
|
95765
|
+
queryData
|
|
95791
95766
|
}
|
|
95792
|
-
|
|
95793
|
-
|
|
95794
|
-
.
|
|
95795
|
-
|
|
95796
|
-
|
|
95797
|
-
.
|
|
95767
|
+
: undefined;
|
|
95768
|
+
const modelName = this.model.name || 'excelExportTask';
|
|
95769
|
+
const excelExportTaskModel = yield ModelCache.get('file.ExcelExportTask');
|
|
95770
|
+
const selectedFieldsField = excelExportTaskModel === null || excelExportTaskModel === void 0 ? void 0 : excelExportTaskModel.modelFields.find((v) => v.data === 'selectedFields');
|
|
95771
|
+
const hasOptionLabel = selectedFieldsField.references === 'file.ExcelModelField';
|
|
95772
|
+
return GQL.mutation(`${modelName}Mutation`, 'createExportTask')
|
|
95773
|
+
.buildRequest((builder) => {
|
|
95774
|
+
builder.buildObjectParameter('data', (builder) => {
|
|
95775
|
+
const { workbookDefinition, exportMethod, selectedFields } = task;
|
|
95776
|
+
builder.stringParameter('model', task.model);
|
|
95777
|
+
builder.booleanParameter('sync', true);
|
|
95778
|
+
if (workbookDefinition) {
|
|
95779
|
+
builder.buildObjectParameter('workbookDefinition', (builder) => {
|
|
95780
|
+
builder.stringParameter('id', workbookDefinition.id);
|
|
95781
|
+
});
|
|
95782
|
+
}
|
|
95783
|
+
if (conditionWrapper) {
|
|
95784
|
+
builder.buildObjectParameter('conditionWrapper', (builder) => {
|
|
95785
|
+
builder.stringParameter('rsql', conditionWrapper.rsql);
|
|
95786
|
+
builder.stringParameter('queryData', conditionWrapper.queryData);
|
|
95787
|
+
});
|
|
95788
|
+
}
|
|
95789
|
+
if (exportMethod) {
|
|
95790
|
+
builder.enumerationParameter('exportMethod', exportMethod);
|
|
95791
|
+
}
|
|
95792
|
+
if (selectedFields === null || selectedFields === void 0 ? void 0 : selectedFields.length) {
|
|
95793
|
+
builder.buildArrayParameter('selectedFields', selectedFields, (builder, value) => {
|
|
95794
|
+
builder.stringParameter('field', value.data);
|
|
95795
|
+
builder.stringParameter('displayName', value.displayName);
|
|
95796
|
+
if (hasOptionLabel) {
|
|
95797
|
+
builder.stringParameter('optionLabel', value.optionLabel);
|
|
95798
|
+
}
|
|
95799
|
+
});
|
|
95800
|
+
}
|
|
95801
|
+
});
|
|
95802
|
+
})
|
|
95803
|
+
.buildResponse((builder) => {
|
|
95804
|
+
builder.parameter('id');
|
|
95805
|
+
})
|
|
95806
|
+
.toString();
|
|
95807
|
+
});
|
|
95798
95808
|
}
|
|
95799
95809
|
createTask(searchRuntimeContext, task, condition) {
|
|
95800
95810
|
return __awaiter(this, void 0, void 0, function* () {
|