@oinone/kunlun-vue-admin-base 6.3.0 → 6.3.1
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
|
@@ -67648,11 +67648,12 @@ let ExportFieldTransfer = class ExportFieldTransfer extends FormTransferFieldWid
|
|
|
67648
67648
|
return [];
|
|
67649
67649
|
}
|
|
67650
67650
|
const tableFields = (_b = this.metadataRuntimeContext.parentContext) === null || _b === void 0 ? void 0 : _b.model.modelFields.map((f) => {
|
|
67651
|
+
var _a;
|
|
67651
67652
|
const target = this.options.find((o) => `${o.model}+${o.field}` === `${f.model}+${f.data}`);
|
|
67652
67653
|
if (!target) {
|
|
67653
67654
|
return undefined;
|
|
67654
67655
|
}
|
|
67655
|
-
return Object.assign(Object.assign({}, target), { displayName: f.label || target.displayName, invisible: f.invisible });
|
|
67656
|
+
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 });
|
|
67656
67657
|
}).filter((v) => !!v && BooleanHelper.isFalse(v.invisible));
|
|
67657
67658
|
return (tableFields || []);
|
|
67658
67659
|
}
|
|
@@ -67663,11 +67664,12 @@ let ExportFieldTransfer = class ExportFieldTransfer extends FormTransferFieldWid
|
|
|
67663
67664
|
}
|
|
67664
67665
|
const tableFields = (_a = this.metadataRuntimeContext.parentContext) === null || _a === void 0 ? void 0 : _a.model.modelFields;
|
|
67665
67666
|
return super.generatorFullOptions(content.map((o) => {
|
|
67667
|
+
var _a;
|
|
67666
67668
|
const target = tableFields === null || tableFields === void 0 ? void 0 : tableFields.find((f) => `${o.model}+${o.field}` === `${f.model}+${f.data}`);
|
|
67667
67669
|
if (!target) {
|
|
67668
67670
|
return o;
|
|
67669
67671
|
}
|
|
67670
|
-
return Object.assign(Object.assign({}, o), { displayName: target.label || o.displayName });
|
|
67672
|
+
return Object.assign(Object.assign({}, o), { displayName: target.label || o.displayName, optionLabel: (_a = target.template) === null || _a === void 0 ? void 0 : _a.optionLabel });
|
|
67671
67673
|
}));
|
|
67672
67674
|
}
|
|
67673
67675
|
backfillSelectedValues() {
|
|
@@ -95757,54 +95759,62 @@ let ExportWorkbookActionWidget = class ExportWorkbookActionWidget extends Abstra
|
|
|
95757
95759
|
return BooleanHelper.isTrue((_b = (_a = this.metadataRuntimeContext.viewAction) === null || _a === void 0 ? void 0 : _a.template) === null || _b === void 0 ? void 0 : _b.sync);
|
|
95758
95760
|
}
|
|
95759
95761
|
generatorGQLByTask(task, condition) {
|
|
95760
|
-
|
|
95761
|
-
|
|
95762
|
-
|
|
95763
|
-
|
|
95764
|
-
|
|
95765
|
-
|
|
95766
|
-
|
|
95767
|
-
rsql = condition.toString();
|
|
95768
|
-
}
|
|
95769
|
-
const conditionWrapper = condition
|
|
95770
|
-
? {
|
|
95771
|
-
rsql,
|
|
95772
|
-
queryData
|
|
95773
|
-
}
|
|
95774
|
-
: undefined;
|
|
95775
|
-
const modelName = this.model.name || 'excelExportTask';
|
|
95776
|
-
return GQL.mutation(`${modelName}Mutation`, 'createExportTask')
|
|
95777
|
-
.buildRequest((builder) => {
|
|
95778
|
-
builder.buildObjectParameter('data', (builder) => {
|
|
95779
|
-
const { workbookDefinition, exportMethod, selectedFields } = task;
|
|
95780
|
-
builder.stringParameter('model', task.model);
|
|
95781
|
-
builder.booleanParameter('sync', true);
|
|
95782
|
-
if (workbookDefinition) {
|
|
95783
|
-
builder.buildObjectParameter('workbookDefinition', (builder) => {
|
|
95784
|
-
builder.stringParameter('id', workbookDefinition.id);
|
|
95785
|
-
});
|
|
95786
|
-
}
|
|
95787
|
-
if (conditionWrapper) {
|
|
95788
|
-
builder.buildObjectParameter('conditionWrapper', (builder) => {
|
|
95789
|
-
builder.stringParameter('rsql', conditionWrapper.rsql);
|
|
95790
|
-
builder.stringParameter('queryData', conditionWrapper.queryData);
|
|
95791
|
-
});
|
|
95792
|
-
}
|
|
95793
|
-
if (exportMethod) {
|
|
95794
|
-
builder.enumerationParameter('exportMethod', exportMethod);
|
|
95762
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95763
|
+
let queryData = '{}';
|
|
95764
|
+
let rsql = condition;
|
|
95765
|
+
if (condition instanceof Condition) {
|
|
95766
|
+
const conditionBodyData = condition.getConditionBodyData();
|
|
95767
|
+
if (conditionBodyData && Object.keys(conditionBodyData).length) {
|
|
95768
|
+
queryData = GraphqlHelper.serializableObject(conditionBodyData);
|
|
95795
95769
|
}
|
|
95796
|
-
|
|
95797
|
-
|
|
95798
|
-
|
|
95799
|
-
|
|
95800
|
-
|
|
95770
|
+
rsql = condition.toString();
|
|
95771
|
+
}
|
|
95772
|
+
const conditionWrapper = condition
|
|
95773
|
+
? {
|
|
95774
|
+
rsql,
|
|
95775
|
+
queryData
|
|
95801
95776
|
}
|
|
95802
|
-
|
|
95803
|
-
|
|
95804
|
-
.
|
|
95805
|
-
|
|
95806
|
-
|
|
95807
|
-
.
|
|
95777
|
+
: undefined;
|
|
95778
|
+
const modelName = this.model.name || 'excelExportTask';
|
|
95779
|
+
const excelExportTaskModel = yield ModelCache.get('file.ExcelExportTask');
|
|
95780
|
+
const selectedFieldsField = excelExportTaskModel === null || excelExportTaskModel === void 0 ? void 0 : excelExportTaskModel.modelFields.find((v) => v.data === 'selectedFields');
|
|
95781
|
+
const hasOptionLabel = selectedFieldsField.references === 'file.ExcelModelField';
|
|
95782
|
+
return GQL.mutation(`${modelName}Mutation`, 'createExportTask')
|
|
95783
|
+
.buildRequest((builder) => {
|
|
95784
|
+
builder.buildObjectParameter('data', (builder) => {
|
|
95785
|
+
const { workbookDefinition, exportMethod, selectedFields } = task;
|
|
95786
|
+
builder.stringParameter('model', task.model);
|
|
95787
|
+
builder.booleanParameter('sync', true);
|
|
95788
|
+
if (workbookDefinition) {
|
|
95789
|
+
builder.buildObjectParameter('workbookDefinition', (builder) => {
|
|
95790
|
+
builder.stringParameter('id', workbookDefinition.id);
|
|
95791
|
+
});
|
|
95792
|
+
}
|
|
95793
|
+
if (conditionWrapper) {
|
|
95794
|
+
builder.buildObjectParameter('conditionWrapper', (builder) => {
|
|
95795
|
+
builder.stringParameter('rsql', conditionWrapper.rsql);
|
|
95796
|
+
builder.stringParameter('queryData', conditionWrapper.queryData);
|
|
95797
|
+
});
|
|
95798
|
+
}
|
|
95799
|
+
if (exportMethod) {
|
|
95800
|
+
builder.enumerationParameter('exportMethod', exportMethod);
|
|
95801
|
+
}
|
|
95802
|
+
if (selectedFields === null || selectedFields === void 0 ? void 0 : selectedFields.length) {
|
|
95803
|
+
builder.buildArrayParameter('selectedFields', selectedFields, (builder, value) => {
|
|
95804
|
+
builder.stringParameter('field', value.data);
|
|
95805
|
+
builder.stringParameter('displayName', value.displayName);
|
|
95806
|
+
if (hasOptionLabel) {
|
|
95807
|
+
builder.stringParameter('optionLabel', value.optionLabel);
|
|
95808
|
+
}
|
|
95809
|
+
});
|
|
95810
|
+
}
|
|
95811
|
+
});
|
|
95812
|
+
})
|
|
95813
|
+
.buildResponse((builder) => {
|
|
95814
|
+
builder.parameter('id');
|
|
95815
|
+
})
|
|
95816
|
+
.toString();
|
|
95817
|
+
});
|
|
95808
95818
|
}
|
|
95809
95819
|
createTask(searchRuntimeContext, task, condition) {
|
|
95810
95820
|
return __awaiter(this, void 0, void 0, function* () {
|