super-page-runtime 2.0.86 → 2.0.92

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.
Files changed (23) hide show
  1. package/dist/es/components/runtime/utils/api/api-util.js +17 -11
  2. package/dist/es/components/runtime/utils/assemblys-config.js +260 -214
  3. package/dist/es/components/runtime/utils/common-util.d.ts +1 -0
  4. package/dist/es/components/runtime/utils/common-util.js +14 -0
  5. package/dist/es/components/runtime/utils/events/standard-event.js +15 -16
  6. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -2
  7. package/dist/es/components/runtime/utils/page-init-util.js +24 -3
  8. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +36 -33
  9. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +24 -9
  10. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +16 -11
  11. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +2 -0
  12. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +22 -56
  13. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +4 -0
  14. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +4 -2
  15. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +4 -15
  16. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +4 -0
  17. package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +53 -0
  18. package/dist/es/components/runtime/views/super-page-dialog.vue.js +5 -2
  19. package/dist/es/components/runtime/views/super-page.vue.d.ts +9 -0
  20. package/dist/es/components/runtime/views/super-page.vue.js +16 -4
  21. package/dist/es/index.d.ts +2 -0
  22. package/dist/es/index.js +2 -0
  23. package/package.json +2 -2
@@ -269,7 +269,7 @@ function exportFormReport(pageContext, configureObj, templateFile, isPdf) {
269
269
  tableName,
270
270
  isPermission: isPermission + "",
271
271
  systemCode,
272
- listCodes: pageContext.listCodes,
272
+ listCodesMap: pageContext.listCodesMap,
273
273
  pageCode: pageContext.code,
274
274
  pageVersion: pageContext.version
275
275
  };
@@ -404,7 +404,7 @@ function getCommonFormRequestParam(pageContext, configureObj, isUnControlVersion
404
404
  isWorkflowEntity: isWorkflow,
405
405
  functionCode: functionCodes,
406
406
  isPermission: isPermission + "",
407
- listCodes: pageContext.listCodes,
407
+ listCodesMap: pageContext.listCodesMap,
408
408
  pageCode: pageContext.code,
409
409
  pageVersion: pageContext.version
410
410
  };
@@ -797,7 +797,7 @@ function deleteFunc(params) {
797
797
  isPermission: isPermission + "",
798
798
  systemCode,
799
799
  isWorkflowEntity: isWorkflow,
800
- listCodes: pageContext.listCodes,
800
+ listCodesMap: pageContext.listCodesMap,
801
801
  pageCode: pageContext.code,
802
802
  pageVersion: pageContext.version
803
803
  };
@@ -1096,7 +1096,7 @@ function getWorkflowSaveParams(params) {
1096
1096
  definitionId: pageContext.definitionId,
1097
1097
  functionCode: functionCodes,
1098
1098
  systemCode,
1099
- listCodes: pageContext.listCodes,
1099
+ listCodesMap: pageContext.listCodesMap,
1100
1100
  pageCode: pageContext.code,
1101
1101
  pageVersion: pageContext.version
1102
1102
  };
@@ -1204,18 +1204,17 @@ function workflowSaveFunc(params) {
1204
1204
  function dealCompleteTaskParam(commonEntity, isInit, pageContext, params, operationResult) {
1205
1205
  const pageCode = pageContext.code;
1206
1206
  const pageVersion = pageContext.version;
1207
- const formParam = commonEntity;
1208
1207
  let taskId;
1209
- if (formParam) {
1210
- if (isInit && formParam.entity) {
1211
- pageContext.entity.data = formParam.entity;
1208
+ if (commonEntity) {
1209
+ if (isInit) {
1212
1210
  pageContext.initFormNo = commonEntity.formNo;
1213
1211
  pageContext.emailTemplateCode = commonEntity.emailTemplateCode;
1214
1212
  }
1215
- if (formParam.entity) {
1216
- cacheFormDataId(formParam.entity.id || formParam.entity.ID, pageContext);
1213
+ if (commonEntity.entity) {
1214
+ pageContext.entity.data = commonEntity.entity;
1215
+ cacheFormDataId(commonEntity.entity.id || commonEntity.entity.ID, pageContext);
1217
1216
  }
1218
- const completeTaskResult = formParam.completeTaskResult;
1217
+ const completeTaskResult = commonEntity.completeTaskResult;
1219
1218
  if (completeTaskResult) {
1220
1219
  const completeTaskTipType = completeTaskResult.completeTaskTipType;
1221
1220
  if (completeTaskTipType && completeTaskTipType === "MESSAGE") {
@@ -1228,8 +1227,8 @@ function dealCompleteTaskParam(commonEntity, isInit, pageContext, params, operat
1228
1227
  return false;
1229
1228
  }
1230
1229
  }
1231
- if (formParam.completeTaskParam) {
1232
- const completeTaskParam = formParam.completeTaskParam;
1230
+ if (commonEntity.completeTaskParam) {
1231
+ const completeTaskParam = commonEntity.completeTaskParam;
1233
1232
  taskId = completeTaskParam.taskId;
1234
1233
  if (params) {
1235
1234
  params.taskId = taskId;
@@ -1243,8 +1242,8 @@ function dealCompleteTaskParam(commonEntity, isInit, pageContext, params, operat
1243
1242
  if (!pageContext.entity) {
1244
1243
  pageContext.entity = {};
1245
1244
  }
1246
- pageContext.entity.task = formParam.taskParamMap;
1247
- setStoreInfo(pageCode, pageVersion, "_currentActivityName", formParam.taskName);
1245
+ pageContext.entity.task = commonEntity.taskParamMap;
1246
+ setStoreInfo(pageCode, pageVersion, "_currentActivityName", commonEntity.taskName);
1248
1247
  }
1249
1248
  if (params) {
1250
1249
  params.operationResult = operationResult;
@@ -1368,7 +1367,7 @@ function getTransactTaskParam(params) {
1368
1367
  tableName: pageContext.tableName,
1369
1368
  functionCode: permissionPrefix + ".xxx",
1370
1369
  isWorkflowEntity: true,
1371
- listCodes: pageContext.listCodes,
1370
+ listCodesMap: pageContext.listCodesMap,
1372
1371
  pageCode: pageContext.code,
1373
1372
  pageVersion: pageContext.version
1374
1373
  };
@@ -57,7 +57,7 @@ export interface PageDesign extends Component {
57
57
  initChartServiceConfigs?: Array<any>;
58
58
  rules?: object;
59
59
  tableUuids?: Array<any>;
60
- listCodes?: Array<any>;
60
+ listCodesMap?: object;
61
61
  formNoRuleCode?: string;
62
62
  judgeHeavyList?: Array<any>;
63
63
  conversionCodes?: Array<any>;
@@ -89,7 +89,7 @@ export interface PageContext extends Component {
89
89
  workflowVersion?: number;
90
90
  rules?: object;
91
91
  tableUuids?: Array<any>;
92
- listCodes?: Array<any>;
92
+ listCodesMap?: object;
93
93
  formNoRuleCode?: string;
94
94
  judgeHeavyList?: Array<any>;
95
95
  conversionCodes?: Array<any>;
@@ -29,11 +29,11 @@ function convertToPageContext(pageDesign, pageRequest) {
29
29
  // rules: pageDesign.rules, // 表单验证规则。在runtime object-render中实时获得
30
30
  tableUuids: pageDesign.tableUuids,
31
31
  // 表格uuid集合
32
- listCodes: pageDesign.listCodes,
33
- // 当前页面中表格对应的数据表名集合,后台保存子表记录时需要
32
+ listCodesMap: pageDesign.listCodesMap,
33
+ // 列表编码和列表绑定编码对应关系,key是列表编码,value是绑定编码
34
34
  formNoRuleCode: pageDesign.props ? pageDesign.props.formNoRuleCode : null,
35
35
  // 表单编号规则
36
- judgeHeavyList: pageDesign.props && pageDesign.props.judgeHeavyList.length > 0 ? pageDesign.props.judgeHeavyList : null,
36
+ judgeHeavyList: getJudgeHeavyList(pageDesign),
37
37
  // 判重组合字段集合配置
38
38
  // conversionCodes: pageDesign.conversionCodes, // 数据转换规则。按钮上配置的,此处不需要
39
39
  pageType: pageDesign.pageType,
@@ -84,6 +84,27 @@ function convertToPageContext(pageDesign, pageRequest) {
84
84
  pageContext.events = pageDesign.runtime && pageDesign.runtime.events ? pageDesign.runtime.events : [];
85
85
  return pageContext;
86
86
  }
87
+ function getJudgeHeavyList(pageDesign) {
88
+ try {
89
+ if (pageDesign.props && pageDesign.props.judgeHeavyList.length > 0) {
90
+ pageDesign.props.judgeHeavyList.forEach((item) => {
91
+ if (item.duplicateFieldList && item.duplicateFieldList.length > 0) {
92
+ item.duplicateFieldList = item.duplicateFieldList.map((field) => {
93
+ if (typeof field === "string") {
94
+ return { propDbName: field };
95
+ }
96
+ return field;
97
+ });
98
+ }
99
+ });
100
+ return pageDesign.props.judgeHeavyList;
101
+ } else {
102
+ return null;
103
+ }
104
+ } catch (e) {
105
+ console.error("getJudgeHeavyList error:", e);
106
+ }
107
+ }
87
108
  function getPageDimensions() {
88
109
  const winWidth = window.outerWidth;
89
110
  if (!winWidth) {
@@ -1,6 +1,7 @@
1
- import { defineComponent, ref, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode } from "vue";
1
+ import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, unref, normalizeStyle, withCtx, Fragment, createTextVNode, toDisplayString, createCommentVNode, createBlock } from "vue";
2
2
  import { SuperIcon } from "agilebuilder-ui";
3
3
  import { handleEvent } from "../../../../utils/events/event-util.js";
4
+ const _hoisted_1 = { class: "page-runtime-header-btn" };
4
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
6
  __name: "button-runtime",
6
7
  props: {
@@ -21,39 +22,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
22
  }
22
23
  return (_ctx, _cache) => {
23
24
  const _component_el_button = resolveComponent("el-button");
24
- return openBlock(), createBlock(_component_el_button, {
25
- disabled: isDisable(),
26
- class: normalizeClass(unref(runtimeClass)),
27
- style: normalizeStyle(unref(runtimeStyle)),
28
- type: designProperty.value.type,
29
- size: designProperty.value.size,
30
- text: designProperty.value.text,
31
- round: designProperty.value.round,
32
- plain: designProperty.value.plain,
33
- loading: isButtongLoading(),
34
- onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
35
- }, {
36
- default: withCtx(() => [
37
- designProperty.value.title && designProperty.value.iconPosition == "right" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
38
- createTextVNode(toDisplayString(designProperty.value.title) + " ", 1),
39
- designProperty.value.iconValue ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
40
- createTextVNode("   ")
41
- ], 64)) : createCommentVNode("", true)
42
- ], 64)) : createCommentVNode("", true),
43
- designProperty.value.iconType && designProperty.value.iconValue ? (openBlock(), createBlock(unref(SuperIcon), {
44
- key: 1,
45
- iconType: designProperty.value.iconType,
46
- iconValue: designProperty.value.iconValue
47
- }, null, 8, ["iconType", "iconValue"])) : createCommentVNode("", true),
48
- designProperty.value.title && designProperty.value.iconPosition != "right" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
49
- designProperty.value.iconValue ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
50
- createTextVNode("   ")
25
+ return openBlock(), createElementBlock("span", _hoisted_1, [
26
+ createVNode(_component_el_button, {
27
+ disabled: isDisable(),
28
+ class: normalizeClass(unref(runtimeClass)),
29
+ style: normalizeStyle(unref(runtimeStyle)),
30
+ type: designProperty.value.type,
31
+ size: designProperty.value.size,
32
+ text: designProperty.value.text,
33
+ round: designProperty.value.round,
34
+ plain: designProperty.value.plain,
35
+ loading: isButtongLoading(),
36
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
37
+ }, {
38
+ default: withCtx(() => [
39
+ designProperty.value.title && designProperty.value.iconPosition == "right" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
40
+ createTextVNode(toDisplayString(designProperty.value.title) + " ", 1),
41
+ designProperty.value.iconValue ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
42
+ createTextVNode("   ")
43
+ ], 64)) : createCommentVNode("", true)
51
44
  ], 64)) : createCommentVNode("", true),
52
- createTextVNode(" " + toDisplayString(designProperty.value.title), 1)
53
- ], 64)) : createCommentVNode("", true)
54
- ]),
55
- _: 1
56
- }, 8, ["disabled", "class", "style", "type", "size", "text", "round", "plain", "loading"]);
45
+ designProperty.value.iconType && designProperty.value.iconValue ? (openBlock(), createBlock(unref(SuperIcon), {
46
+ key: 1,
47
+ iconType: designProperty.value.iconType,
48
+ iconValue: designProperty.value.iconValue
49
+ }, null, 8, ["iconType", "iconValue"])) : createCommentVNode("", true),
50
+ designProperty.value.title && designProperty.value.iconPosition != "right" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
51
+ designProperty.value.iconValue ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
52
+ createTextVNode("   ")
53
+ ], 64)) : createCommentVNode("", true),
54
+ createTextVNode(" " + toDisplayString(designProperty.value.title), 1)
55
+ ], 64)) : createCommentVNode("", true)
56
+ ]),
57
+ _: 1
58
+ }, 8, ["disabled", "class", "style", "type", "size", "text", "round", "plain", "loading"])
59
+ ]);
57
60
  };
58
61
  }
59
62
  });
@@ -18,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  const configure = props.configure;
19
19
  const listCode = getListCode(pageContext.code, pageContext.version, configure.uuid);
20
20
  const dataModel = pageContext.entity.data;
21
- const prop = listCode;
21
+ const prop = configure.code ? configure.code : listCode;
22
22
  const additionalParamMap = getAdditionalParamMap(pageContext);
23
23
  const tableEvents = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
24
24
  const selections = ref([]);
@@ -78,27 +78,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
78
78
  listViewOptions.value["showOperationButton"] = configure.props && configure.props.base ? configure.props.base.showOperation : false;
79
79
  listViewOptions.value["isPdfEditor"] = false;
80
80
  listViewOptions.value["tableRecordMaxNum"] = configure.props && configure.props.otherSettings ? configure.props.otherSettings.tableRecordMaxNum : null;
81
- if (configure.props && configure.props.size && configure.props.size.fixHeight) {
82
- listViewOptions.value["formSetHeight"] = configure.props.size.fixHeight;
81
+ const pageModeType = getPageModeType();
82
+ let sizeConfig;
83
+ if (configure.props && configure.props.size && configure.props.size[pageModeType]) {
84
+ sizeConfig = configure.props.size[pageModeType];
83
85
  }
84
- if (configure.props && configure.props.size && configure.props.size.maxHeight) {
85
- listViewOptions.value["formSetMaxHeight"] = configure.props.size.maxHeight;
86
+ if (sizeConfig && sizeConfig.fixHeight) {
87
+ listViewOptions.value["formSetHeight"] = sizeConfig.fixHeight;
86
88
  }
89
+ if (sizeConfig && sizeConfig.maxHeight) {
90
+ listViewOptions.value["formSetMaxHeight"] = sizeConfig.maxHeight;
91
+ }
92
+ }
93
+ function getPageModeType() {
94
+ let dimensions = pageContext.dimensions;
95
+ if (!dimensions) {
96
+ dimensions = "pc";
97
+ }
98
+ return dimensions;
87
99
  }
88
100
  function judgeInitializationSubTable() {
89
101
  if (!configure.props || !configure.props.otherSettings) {
90
102
  return;
91
103
  }
92
- if (configure.props.otherSettings.subtableSetting && configure.props.otherSettings.timeToInitializeSubTable && configure.props.otherSettings.subtableSetting.timeToInitializeSubTable.length > 0) {
104
+ if (configure.props.otherSettings.sourceQueryTableData && configure.props.otherSettings.timeToInitializeSubTable && configure.props.otherSettings.sourceQueryTableData.timeToInitializeSubTable.length > 0) {
93
105
  let flag = false;
94
- if (configure.props.otherSettings.subtableSetting.timeToInitializeSubTable.indexOf("create") !== -1) {
106
+ if (configure.props.otherSettings.sourceQueryTableData.timeToInitializeSubTable.indexOf("create") !== -1) {
95
107
  if (dataModel.id || dataModel.ID) {
96
108
  flag = false;
97
109
  } else {
98
110
  flag = true;
99
111
  }
100
112
  }
101
- if (configure.props.otherSettings.subtableSetting.timeToInitializeSubTable.indexOf("noData") !== -1) {
113
+ if (configure.props.otherSettings.sourceQueryTableData.timeToInitializeSubTable.indexOf("noData") !== -1) {
102
114
  const tableData = dataModel[prop];
103
115
  if (!tableData || tableData.length <= 0) {
104
116
  flag = true;
@@ -120,9 +132,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
120
132
  listViewOptions.value["isPageInfo"] = false;
121
133
  listViewOptions.value["subTableData"] = getValue();
122
134
  listViewOptions.value.extraParam["subTableListViewCode"] = listCode;
123
- listViewOptions.value.extraParam["subtableSetting"] = configure.props && configure.props.otherSettings ? JSON.stringify(configure.props.otherSettings.subtableSetting) : null;
135
+ listViewOptions.value.extraParam["subtableSetting"] = configure.props && configure.props.otherSettings ? JSON.stringify(configure.props.otherSettings) : null;
124
136
  listViewOptions.value.extraParam["additionalParamMap"] = additionalParamMap;
125
137
  listViewOptions.value.extraParam["entityMap"] = pageContext.entity.data;
138
+ listViewOptions.value.extraParam["contextMap"] = pageContext.entity.context;
139
+ listViewOptions.value.extraParam["taskMap"] = pageContext.entity.task;
126
140
  setGridDataEventOptions();
127
141
  listViewShowFlag.value = false;
128
142
  setTimeout(() => {
@@ -286,6 +300,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
286
300
  }
287
301
  function changeGridData(gridData) {
288
302
  setVariableValue(entity, dynamicFields, gridData);
303
+ console.log("changeGridData----gridData=", gridData, "entity=", entity);
289
304
  }
290
305
  function changeRowsPerpage(pageSize) {
291
306
  console.log("表单组件--Item--changeRowsPerpage==pageSize=", pageSize);
@@ -52,6 +52,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
52
52
  if (Array.isArray(value)) {
53
53
  setVariableValue(entity, dynamicFields, value[0]);
54
54
  setVariableValue(entity, dynamicFields2, value[1]);
55
+ } else if (value === null) {
56
+ setVariableValue(entity, dynamicFields, null);
57
+ setVariableValue(entity, dynamicFields2, null);
55
58
  }
56
59
  } else {
57
60
  setVariableValue(entity, dynamicFields, value);
@@ -125,9 +128,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
125
128
  size: designProperty.value.size,
126
129
  placeholder: designProperty.value.placeholder,
127
130
  "start-placeholder": designProperty.value.placeholder,
128
- "end-placeholder": designProperty.value.endPlaceholder,
131
+ "end-placeholder": designProperty.value.endPlaceholder ? designProperty.value.endPlaceholder : designProperty.value.placeholder,
129
132
  format: designProperty.value.format,
130
- "value-format": designProperty.value.valueFormat ? "x" : designProperty.value.valueFormat,
133
+ "value-format": designProperty.value.valueFormat ? designProperty.value.valueFormat : "x",
131
134
  modelValue: dynamicModelMethod.value,
132
135
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
133
136
  shortcuts: shortcuts.value,
@@ -136,7 +139,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
136
139
  onBlur: _cache[2] || (_cache[2] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
137
140
  onFocus: _cache[3] || (_cache[3] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
138
141
  onVisibleChange: _cache[4] || (_cache[4] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
139
- onPanelChange: _cache[5] || (_cache[5] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change"))
142
+ onPanelChange: _cache[5] || (_cache[5] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change")),
143
+ onClear: _cache[6] || (_cache[6] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "clear"))
140
144
  }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : (openBlock(), createBlock(_component_el_date_picker, {
141
145
  key: 1,
142
146
  clearable: designProperty.value.clearable,
@@ -145,18 +149,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
145
149
  size: designProperty.value.size,
146
150
  placeholder: designProperty.value.placeholder,
147
151
  "start-placeholder": designProperty.value.placeholder,
148
- "end-placeholder": designProperty.value.endPlaceholder,
152
+ "end-placeholder": designProperty.value.endPlaceholder ? designProperty.value.endPlaceholder : designProperty.value.placeholder,
149
153
  format: designProperty.value.format,
150
154
  modelValue: dynamicModelMethod.value,
151
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => dynamicModelMethod.value = $event),
155
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => dynamicModelMethod.value = $event),
152
156
  shortcuts: shortcuts.value,
153
157
  type: designProperty.value.dateType,
154
- "value-format": designProperty.value.valueFormat ? "x" : designProperty.value.valueFormat,
155
- onChange: _cache[7] || (_cache[7] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
156
- onBlur: _cache[8] || (_cache[8] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
157
- onFocus: _cache[9] || (_cache[9] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
158
- onVisibleChange: _cache[10] || (_cache[10] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
159
- onPanelChange: _cache[11] || (_cache[11] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change"))
158
+ "value-format": designProperty.value.valueFormat ? designProperty.value.valueFormat : "x",
159
+ onChange: _cache[8] || (_cache[8] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
160
+ onBlur: _cache[9] || (_cache[9] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
161
+ onFocus: _cache[10] || (_cache[10] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
162
+ onVisibleChange: _cache[11] || (_cache[11] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "visible-change")),
163
+ onPanelChange: _cache[12] || (_cache[12] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "panel-change")),
164
+ onClear: _cache[13] || (_cache[13] = ($event) => unref(handleFormEvent)($event, _ctx.pageContext, _ctx.configure, "clear"))
160
165
  }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "modelValue", "shortcuts", "type", "value-format"]))
161
166
  ]),
162
167
  _: 1
@@ -86,6 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
86
86
  ]),
87
87
  default: withCtx(() => [
88
88
  createVNode(unref(FsUploadNew), {
89
+ style: { "width": "100%" },
89
90
  disabled: designProperty.value.state === "disabled",
90
91
  displayType: designProperty.value.displayType,
91
92
  accept: designProperty.value.accept,
@@ -103,6 +104,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
103
104
  _: 1
104
105
  }, 8, ["required", "class", "label-width", "style"])) : (openBlock(), createBlock(unref(FsUploadNew), {
105
106
  key: 1,
107
+ style: { "width": "100%" },
106
108
  disabled: designProperty.value.state === "disabled",
107
109
  displayType: designProperty.value.displayType,
108
110
  accept: designProperty.value.accept,
@@ -6,11 +6,6 @@ import "quill/dist/quill.snow.css";
6
6
  import { handleFormEvent } from "../../../../utils/events/event-util.js";
7
7
  import http from "agilebuilder-ui/src/utils/request";
8
8
  const _hoisted_1 = { style: { "width": "100%", "height": "100%" } };
9
- const _hoisted_2 = {
10
- key: 1,
11
- style: { "width": "100%", "height": "100%" },
12
- class: "amb-widget-richtext-single"
13
- };
14
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
15
10
  __name: "richtext-runtime",
16
11
  props: {
@@ -29,8 +24,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
24
  let contentVariable = designProperty.value.value;
30
25
  const initValue = formatVariableValue(props.pageContext, contentVariable);
31
26
  const quillEditorRef = ref(null);
32
- const quill = ref(null);
33
- const fileBtn = ref(null);
27
+ let quill = null;
28
+ ref(null);
34
29
  const fontSize = [
35
30
  "12px",
36
31
  "13px",
@@ -89,41 +84,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
89
84
  if (newState != void 0 && newState !== hisState) {
90
85
  hisState = newState;
91
86
  const isReadonly = checkReadonly(hisState);
92
- if (quill.value) {
93
- quill.value.enable(!isReadonly);
94
- quill.value.root.dataset.placeholder = isReadonly ? "" : designProperty.value.placeholder;
87
+ if (quill) {
88
+ quill.enable(!isReadonly);
89
+ quill.root.dataset.placeholder = isReadonly ? "" : designProperty.value.placeholder;
95
90
  }
96
91
  }
97
92
  });
98
93
  function updateEditorHeight() {
99
- if (quill.value && quill.value.container) {
100
- const parentNode = quill.value.container.parentNode;
94
+ if (quill && quill.container) {
95
+ const parentNode = quill.container.parentNode;
101
96
  const parentRect = parentNode.getBoundingClientRect();
102
- const thisRect = quill.value.container.getBoundingClientRect();
97
+ const thisRect = quill.container.getBoundingClientRect();
103
98
  let newHeight = parentRect.height - (thisRect.top - parentRect.top);
104
99
  if (newHeight < 100) {
105
100
  newHeight = 100;
106
101
  }
107
- quill.value.container.style.height = newHeight + "px";
102
+ quill.container.style.height = newHeight + "px";
108
103
  }
109
104
  }
110
- const handleUpload = (e) => {
111
- const files = Array.prototype.slice.call(e.target.files);
112
- if (!files) {
113
- return;
114
- }
115
- const formdata = new FormData();
116
- formdata.append("file", files[0]);
117
- alert("TODO:上传图片");
118
- };
119
105
  onMounted(() => {
120
106
  var _a;
121
- quill.value = new Quill(quillEditorRef.value, option.value);
107
+ quill = new Quill(quillEditorRef.value, option.value);
108
+ const delta = quill.clipboard.convertHTML(initValue);
109
+ quill.setContents(delta.ops);
122
110
  (_a = quillEditorRef.value) == null ? void 0 : _a.addEventListener("focusout", handleFocusOut);
123
- quill.value.on("text-change", async function(delta, oldDelta, source) {
124
- if (delta.ops && delta.ops.length > 0) {
125
- for (let i = 0; i < delta.ops.length; i++) {
126
- const ops = delta.ops[i];
111
+ quill.on("text-change", async function(delta2, oldDelta, source) {
112
+ if (delta2.ops && delta2.ops.length > 0) {
113
+ for (let i = 0; i < delta2.ops.length; i++) {
114
+ const ops = delta2.ops[i];
127
115
  if (ops.insert && ops.insert.image) {
128
116
  const dataurl = ops.insert.image;
129
117
  if (!dataurl.startsWith("data:image")) {
@@ -131,10 +119,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
131
119
  }
132
120
  const file = dataURLtoFile(dataurl, "image.png");
133
121
  await uploadImage(file).then((res) => {
134
- if (!quill.value) {
122
+ if (!quill) {
135
123
  return;
136
124
  }
137
- const images = quill.value.root.getElementsByTagName("img");
125
+ const images = quill.root.getElementsByTagName("img");
138
126
  if (images && images.length > 0) {
139
127
  for (let i2 = 0; i2 < images.length; i2++) {
140
128
  const img = images[i2];
@@ -149,7 +137,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
149
137
  }
150
138
  }
151
139
  }
152
- setVariableValue(entity, dynamicFields, quill.value.root.innerHTML);
140
+ setVariableValue(entity, dynamicFields, quill.root.innerHTML);
153
141
  });
154
142
  updateEditorHeight();
155
143
  });
@@ -161,7 +149,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
161
149
  function handleFocusOut(event) {
162
150
  var _a;
163
151
  if (event.relatedTarget === null || !((_a = quillEditorRef.value) == null ? void 0 : _a.contains(event.relatedTarget))) {
164
- handleFormEvent(quill.value.root.innerHTML, props.pageContext, props.configure, "change", {
152
+ handleFormEvent(quill.root.innerHTML, props.pageContext, props.configure, "change", {
165
153
  entity
166
154
  });
167
155
  }
@@ -210,33 +198,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
210
198
  ref_key: "quillEditorRef",
211
199
  ref: quillEditorRef,
212
200
  style: { "width": "100%" }
213
- }, toDisplayString(unref(initValue)), 513),
214
- createElementVNode("input", {
215
- type: "file",
216
- hidden: "",
217
- accept: ".jpg,.png",
218
- ref_key: "fileBtn",
219
- ref: fileBtn,
220
- onChange: handleUpload
221
- }, null, 544)
201
+ }, null, 512)
222
202
  ])
223
203
  ]),
224
204
  _: 1
225
- }, 8, ["required", "class", "label-width", "style"])) : (openBlock(), createElementBlock("div", _hoisted_2, [
226
- createElementVNode("div", {
227
- ref_key: "quillEditorRef",
228
- ref: quillEditorRef,
229
- style: { "width": "100%" }
230
- }, toDisplayString(unref(initValue)), 513),
231
- createElementVNode("input", {
232
- type: "file",
233
- hidden: "",
234
- accept: ".jpg,.png",
235
- ref_key: "fileBtn",
236
- ref: fileBtn,
237
- onChange: handleUpload
238
- }, null, 544)
239
- ]));
205
+ }, 8, ["required", "class", "label-width", "style"])) : createCommentVNode("", true);
240
206
  };
241
207
  }
242
208
  });
@@ -18,12 +18,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  const dynamicModelMethod = computed({
19
19
  get() {
20
20
  let val = getVariableValue(entity, dynamicFields);
21
+ console.log("select组件----dynamicModelMethod---get-111-val", val);
21
22
  if (val !== void 0 && val !== null) {
22
23
  val = val + "";
23
24
  }
25
+ console.log("select组件----dynamicModelMethod---get222--val", val);
24
26
  return val;
25
27
  },
26
28
  set(value) {
29
+ console.log("select组件----dynamicModelMethod---set--value", value);
27
30
  setVariableValue(entity, dynamicFields, value);
28
31
  }
29
32
  });
@@ -37,6 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37
40
  if (cacheOptions.length > 0) {
38
41
  listOptions.value = cacheOptions;
39
42
  }
43
+ console.log("select组件----listOptions.value=", listOptions.value);
40
44
  const queryLoadingFlag = ref(false);
41
45
  const dataOrigin = props.configure.props && props.configure.props.dataOrigin ? props.configure.props.dataOrigin : {};
42
46
  const valueType = dataOrigin.optionValueSetType;
@@ -21,18 +21,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
21
  designProperty.value.activeValue = "1";
22
22
  }
23
23
  if (designProperty.value.inactiveValue === void 0 || designProperty.value.inactiveValue === null) {
24
- designProperty.value.activeValue = "0";
24
+ designProperty.value.inactiveValue = "0";
25
25
  }
26
26
  const switchStyle = runtimeInfo.switchStyle;
27
27
  const dynamicModelMethod = computed({
28
28
  get() {
29
+ debugger;
29
30
  let val = getVariableValue(entity, dynamicFields);
30
31
  if (val !== void 0 && val !== null) {
31
- val = val = "";
32
+ val = val + "";
32
33
  }
33
34
  return val;
34
35
  },
35
36
  set(value) {
37
+ debugger;
36
38
  setVariableValue(entity, dynamicFields, value);
37
39
  }
38
40
  });
@@ -1,7 +1,8 @@
1
- import { defineComponent, ref, openBlock, createElementBlock, Fragment, renderList, createBlock, createCommentVNode, unref, normalizeStyle, toDisplayString } from "vue";
1
+ import { defineComponent, ref, openBlock, createElementBlock, Fragment, renderList, createBlock, createCommentVNode } from "vue";
2
2
  import _sfc_main$1 from "../../object-render.vue.js";
3
3
  import { getClickEventFuncByType } from "../../../../utils/events/event-util.js";
4
4
  import { isVisibleWorkflowButton } from "../../../../utils/events/standard-event.js";
5
+ const _hoisted_1 = { class: "page-runtime-header-btn" };
5
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
7
  __name: "workflowbutton-runtime",
7
8
  props: {
@@ -16,14 +17,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
17
  const buttonInfo = props.pageContext.workflowButtonComponent;
17
18
  const completeTaskParam = props.pageContext.completeTaskParam;
18
19
  const visibleBtns = ref([]);
19
- let taskName = ref("");
20
- let activityNameColor = "";
21
- if (props.configure.props.base.showActivityName) {
22
- activityNameColor = props.configure.props.base.activityNameColor || "red";
23
- if (props.pageContext.entity && props.pageContext.entity.data) {
24
- taskName.value = props.pageContext.entity.data["CURRENT_ACTIVITY_NAME"] || props.pageContext.entity.data["current_activity_name"];
25
- }
26
- }
27
20
  props.configure.items.forEach((item) => {
28
21
  if (isVisibleBtn(item)) {
29
22
  visibleBtns.value.push(item);
@@ -49,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
49
42
  return isVisible;
50
43
  }
51
44
  return (_ctx, _cache) => {
52
- return openBlock(), createElementBlock("span", null, [
45
+ return openBlock(), createElementBlock("span", _hoisted_1, [
53
46
  (openBlock(true), createElementBlock(Fragment, null, renderList(visibleBtns.value, (element, itemIndex) => {
54
47
  return openBlock(), createElementBlock(Fragment, null, [
55
48
  element.check ? (openBlock(), createBlock(_sfc_main$1, {
@@ -58,11 +51,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
58
51
  configure: element
59
52
  }, null, 8, ["pageContext", "configure"])) : createCommentVNode("", true)
60
53
  ], 64);
61
- }), 256)),
62
- unref(taskName) ? (openBlock(), createElementBlock("span", {
63
- key: 0,
64
- style: normalizeStyle({ color: unref(activityNameColor) })
65
- }, " 当前环节: " + toDisplayString(unref(taskName)), 5)) : createCommentVNode("", true)
54
+ }), 256))
66
55
  ]);
67
56
  };
68
57
  }
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./workflownode-runtime.vue2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };