@oinone/kunlun-vue-admin-base 6.2.13 → 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.
@@ -33210,9 +33210,10 @@ class BaseTableWidget extends BaseElementListViewWidget {
33210
33210
  return false;
33211
33211
  }
33212
33212
  const data = yield this.rowEditorClosedForSubmit(context);
33213
+ const useDiffUpdate = [RelationUpdateType.diff, RelationUpdateType.batch].includes(this.relationUpdateType);
33213
33214
  if (this.inline) {
33214
33215
  if (res && data) {
33215
- if (this.createMode) {
33216
+ if (this.createMode && useDiffUpdate) {
33216
33217
  this.createSubviewFieldWidget(context, data);
33217
33218
  }
33218
33219
  else {
@@ -53506,6 +53507,9 @@ var script$2r = defineComponent({
53506
53507
  richTextToolbarExcludeKeys: {
53507
53508
  type: Array,
53508
53509
  default: () => []
53510
+ },
53511
+ readonly: {
53512
+ type: Boolean
53509
53513
  }
53510
53514
  },
53511
53515
  setup(props) {
@@ -53530,7 +53534,7 @@ var script$2r = defineComponent({
53530
53534
  const editorConfig = computed(() => {
53531
53535
  return {
53532
53536
  placeholder: `${translateValueByKey('请输入内容')}...`,
53533
- EXTEND_CONF: { contextItems: props.contextItems }
53537
+ EXTEND_CONF: { contextItems: props.contextItems },
53534
53538
  };
53535
53539
  });
53536
53540
  const editorStyle = computed(() => {
@@ -53584,6 +53588,12 @@ var script$2r = defineComponent({
53584
53588
  dom.remove();
53585
53589
  });
53586
53590
  };
53591
+ onMounted(() => __awaiter(this, void 0, void 0, function* () {
53592
+ yield nextTick();
53593
+ if (props.readonly) {
53594
+ editorRef.value.disable();
53595
+ }
53596
+ }));
53587
53597
  // 组件销毁时,也及时销毁编辑器
53588
53598
  onBeforeUnmount(() => {
53589
53599
  var _a, _b;
@@ -66807,7 +66817,7 @@ function queryWorkScope() {
66807
66817
  }
66808
66818
  }
66809
66819
  `;
66810
- const result = yield http$c.mutate('base', body);
66820
+ const result = yield http$c.mutate(SYSTEM_MODULE_NAME.EIP, body);
66811
66821
  return result.data.eipConnGroupQuery.queryListByWrapper;
66812
66822
  });
66813
66823
  }
@@ -66822,7 +66832,7 @@ function queryOpenInterface() {
66822
66832
  }
66823
66833
  }
66824
66834
  }`;
66825
- const result = yield http$c.mutate('base', body);
66835
+ const result = yield http$c.mutate(SYSTEM_MODULE_NAME.EIP, body);
66826
66836
  return result.data.eipOpenInterfaceQuery.queryListByWrapper;
66827
66837
  });
66828
66838
  }
@@ -67638,11 +67648,12 @@ let ExportFieldTransfer = class ExportFieldTransfer extends FormTransferFieldWid
67638
67648
  return [];
67639
67649
  }
67640
67650
  const tableFields = (_b = this.metadataRuntimeContext.parentContext) === null || _b === void 0 ? void 0 : _b.model.modelFields.map((f) => {
67651
+ var _a;
67641
67652
  const target = this.options.find((o) => `${o.model}+${o.field}` === `${f.model}+${f.data}`);
67642
67653
  if (!target) {
67643
67654
  return undefined;
67644
67655
  }
67645
- 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 });
67646
67657
  }).filter((v) => !!v && BooleanHelper.isFalse(v.invisible));
67647
67658
  return (tableFields || []);
67648
67659
  }
@@ -67653,11 +67664,12 @@ let ExportFieldTransfer = class ExportFieldTransfer extends FormTransferFieldWid
67653
67664
  }
67654
67665
  const tableFields = (_a = this.metadataRuntimeContext.parentContext) === null || _a === void 0 ? void 0 : _a.model.modelFields;
67655
67666
  return super.generatorFullOptions(content.map((o) => {
67667
+ var _a;
67656
67668
  const target = tableFields === null || tableFields === void 0 ? void 0 : tableFields.find((f) => `${o.model}+${o.field}` === `${f.model}+${f.data}`);
67657
67669
  if (!target) {
67658
67670
  return o;
67659
67671
  }
67660
- 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 });
67661
67673
  }));
67662
67674
  }
67663
67675
  backfillSelectedValues() {
@@ -95747,54 +95759,62 @@ let ExportWorkbookActionWidget = class ExportWorkbookActionWidget extends Abstra
95747
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);
95748
95760
  }
95749
95761
  generatorGQLByTask(task, condition) {
95750
- let queryData = '{}';
95751
- let rsql = condition;
95752
- if (condition instanceof Condition) {
95753
- const conditionBodyData = condition.getConditionBodyData();
95754
- if (conditionBodyData && Object.keys(conditionBodyData).length) {
95755
- queryData = GraphqlHelper.serializableObject(conditionBodyData);
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);
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);
95785
95769
  }
95786
- if (selectedFields === null || selectedFields === void 0 ? void 0 : selectedFields.length) {
95787
- builder.buildArrayParameter('selectedFields', selectedFields, (builder, value) => {
95788
- builder.stringParameter('field', value.field);
95789
- builder.stringParameter('displayName', value.displayName);
95790
- });
95770
+ rsql = condition.toString();
95771
+ }
95772
+ const conditionWrapper = condition
95773
+ ? {
95774
+ rsql,
95775
+ queryData
95791
95776
  }
95792
- });
95793
- })
95794
- .buildResponse((builder) => {
95795
- builder.parameter('id');
95796
- })
95797
- .toString();
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
+ });
95798
95818
  }
95799
95819
  createTask(searchRuntimeContext, task, condition) {
95800
95820
  return __awaiter(this, void 0, void 0, function* () {