super-page-runtime 2.0.91 → 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 (24) hide show
  1. package/dist/es/components/runtime/utils/api/api-util.js +18 -13
  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 +5 -5
  6. package/dist/es/components/runtime/utils/events/validator-util.js +6 -26
  7. package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -2
  8. package/dist/es/components/runtime/utils/page-helper-util.js +1 -2
  9. package/dist/es/components/runtime/utils/page-init-util.js +3 -4
  10. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +36 -33
  11. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +18 -5
  12. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +2 -0
  13. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
  14. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +22 -56
  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 +17 -6
  21. package/dist/es/index.d.ts +2 -0
  22. package/dist/es/index.js +2 -0
  23. package/package.json +2 -2
  24. package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +0 -1
@@ -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
  };
@@ -1367,7 +1367,7 @@ function getTransactTaskParam(params) {
1367
1367
  tableName: pageContext.tableName,
1368
1368
  functionCode: permissionPrefix + ".xxx",
1369
1369
  isWorkflowEntity: true,
1370
- listCodes: pageContext.listCodes,
1370
+ listCodesMap: pageContext.listCodesMap,
1371
1371
  pageCode: pageContext.code,
1372
1372
  pageVersion: pageContext.version
1373
1373
  };
@@ -75,25 +75,10 @@ function getEndObjectRule(rule, props, currentProp) {
75
75
  }
76
76
  function getValidator(columns) {
77
77
  const rules = {};
78
- if (columns) {
79
- columns.forEach((editField) => {
80
- const prop = editField.model;
81
- if (prop && editField.validations) {
82
- const validations = editField.validations;
83
- if (prop.indexOf(".") > 0) {
84
- setObjectPropRule(editField.prop, rules, validations);
85
- } else {
86
- if (validations && validations.length > 0) {
87
- rules[prop] = [...validations];
88
- }
89
- }
90
- }
91
- });
92
- }
93
78
  return rules;
94
79
  }
95
80
  function validator(entity, rules, columns, rowIndex, isSql) {
96
- return validatorEntity(entity, rules, columns, rowIndex, true, isSql);
81
+ return validatorEntity(entity, rules, columns, rowIndex, true);
97
82
  }
98
83
  function sublistVerify(rules) {
99
84
  if (!rules) {
@@ -119,7 +104,7 @@ function sublistVerify(rules) {
119
104
  function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdate, isSql) {
120
105
  let validateRules = sublistVerify(rules);
121
106
  if ((!rules || rules === null) && columns) {
122
- validateRules = getValidator(columns);
107
+ validateRules = getValidator();
123
108
  }
124
109
  if (!validateRules || Object.keys(validateRules).length === 0) {
125
110
  entity["validateErrorField"] = "";
@@ -137,11 +122,6 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
137
122
  if (errors) {
138
123
  result = errors[0].message;
139
124
  fieldName = errors[0]["field"];
140
- if (typeof rowIndex !== "undefined" && rowIndex !== null) {
141
- result = getI18n().t("superPageRuntimeMessage.recordLine", {
142
- row: rowIndex + 1
143
- }) + "," + result;
144
- }
145
125
  ElMessage({
146
126
  message: result,
147
127
  showClose: true,
@@ -154,11 +134,11 @@ function validatorEntity(entity, rules, columns, rowIndex, isShouldRepeateValdat
154
134
  }
155
135
  if (fieldName && isShouldRepeateValdate === true) {
156
136
  const reg1 = /[A-Z]+/;
157
- if (isSql !== void 0 && isSql === true && reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
137
+ if (reg1.test(fieldName) && entity[fieldName.toLowerCase()] !== void 0) {
158
138
  const copyEntity = JSON.parse(JSON.stringify(entity));
159
139
  copyEntity[fieldName.toUpperCase()] = entity[fieldName.toLowerCase()];
160
140
  delete copyEntity[fieldName.toLowerCase()];
161
- result = validatorEntity(copyEntity, rules, columns, rowIndex, false, isSql);
141
+ result = validatorEntity(copyEntity, rules, columns, rowIndex, false);
162
142
  }
163
143
  }
164
144
  }
@@ -206,7 +186,7 @@ function validateWorkflowFormDataModel(dataModel, pageContext) {
206
186
  if (!rules || Object.keys(rules).length === 0) {
207
187
  result = true;
208
188
  } else {
209
- result = validator(handleModels, rules, null, null, true);
189
+ result = validator(handleModels, rules, null, null);
210
190
  }
211
191
  if (result === true) {
212
192
  const workflowFieldPermissionRules = pageContext.workflowRules;
@@ -270,7 +250,7 @@ function validateCommonFormDataModel(dataModel, pageContext, rules) {
270
250
  if (!rules || Object.keys(rules).length === 0) {
271
251
  resolve(handleModels);
272
252
  } else {
273
- const validateEntityResult = validator(handleModels, rules, null, null, true);
253
+ const validateEntityResult = validator(handleModels, rules, null, null);
274
254
  if (validateEntityResult === true) {
275
255
  const validateResult = validateSubTables(pageContext);
276
256
  if (validateResult === true) {
@@ -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>;
@@ -77,8 +77,7 @@ function getTableQueryInfo(dataOriginInfo, pageContext2) {
77
77
  }
78
78
  }
79
79
  }
80
- if (f.propValue)
81
- ;
80
+ if (f.propValue) ;
82
81
  searchForm.push(tempObj);
83
82
  }
84
83
  infoObj.props.searchForm = searchForm;
@@ -29,8 +29,8 @@ 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
36
  judgeHeavyList: getJudgeHeavyList(pageDesign),
@@ -137,8 +137,7 @@ function getRequestObject(pageRequest) {
137
137
  requestObj[paramStrs[0]] = paramStrs.length > 1 ? paramStrs[1] : "";
138
138
  }
139
139
  }
140
- if (requestObj["_t_"])
141
- ;
140
+ if (requestObj["_t_"]) ;
142
141
  return requestObj;
143
142
  }
144
143
  function packageAdditionalMapWithRoute(route, requestObj) {
@@ -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,12 +78,24 @@ 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) {
@@ -288,6 +300,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
288
300
  }
289
301
  function changeGridData(gridData) {
290
302
  setVariableValue(entity, dynamicFields, gridData);
303
+ console.log("changeGridData----gridData=", gridData, "entity=", entity);
291
304
  }
292
305
  function changeRowsPerpage(pageSize) {
293
306
  console.log("表单组件--Item--changeRowsPerpage==pageSize=", pageSize);
@@ -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,
@@ -1,5 +1,5 @@
1
1
  import _sfc_main from "./placeholder-runtime.vue2.js";
2
- import "./placeholder-runtime.vue3.js";
2
+ /* empty css */
3
3
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
4
  const placeholderRuntime = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a0860ff0"]]);
5
5
  export {
@@ -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
  });
@@ -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
+ };
@@ -0,0 +1,53 @@
1
+ import { defineComponent, ref, onMounted, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, toDisplayString } from "vue";
2
+ import { getFormModelFields } from "../../../../utils/page-init-util.js";
3
+ import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "workflownode-runtime",
6
+ props: {
7
+ pageContext: {},
8
+ configure: {}
9
+ },
10
+ setup(__props, { expose: __expose }) {
11
+ const props = __props;
12
+ const entity = props.pageContext.entity ? props.pageContext.entity : {};
13
+ let dynamicFields = getFormModelFields(props.pageContext, props.configure);
14
+ const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
15
+ const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
16
+ const runtimeClass = runtimeInfo.class;
17
+ const headerStyle = runtimeInfo.headerStyle;
18
+ let taskName = ref("");
19
+ ref(false);
20
+ if (props.pageContext.pageType === "form") {
21
+ if (props.pageContext.entity && props.pageContext.entity.data) {
22
+ taskName.value = props.pageContext.entity.data["CURRENT_ACTIVITY_NAME"] || props.pageContext.entity.data["current_activity_name"];
23
+ }
24
+ }
25
+ onMounted(() => {
26
+ });
27
+ function getValue() {
28
+ return getVariableValue(entity, dynamicFields);
29
+ }
30
+ function setValue(value) {
31
+ return setVariableValue(entity, dynamicFields, value);
32
+ }
33
+ __expose({
34
+ getValue,
35
+ setValue
36
+ });
37
+ return (_ctx, _cache) => {
38
+ return openBlock(), createElementBlock("div", {
39
+ class: normalizeClass(unref(runtimeClass))
40
+ }, [
41
+ createElementVNode("div", {
42
+ style: normalizeStyle(unref(headerStyle))
43
+ }, [
44
+ createElementVNode("span", null, toDisplayString(designProperty.value.title), 1),
45
+ createElementVNode("span", null, toDisplayString(unref(taskName)), 1)
46
+ ], 4)
47
+ ], 2);
48
+ };
49
+ }
50
+ });
51
+ export {
52
+ _sfc_main as default
53
+ };
@@ -24,6 +24,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
24
  const draggable = ref(false);
25
25
  const overflow = ref(false);
26
26
  const showPosition = ref("rtl");
27
+ const contentHeight = ref(null);
27
28
  if (myJumpPageSetting) {
28
29
  dialogType.value = myJumpPageSetting && myJumpPageSetting["dialogType"] ? myJumpPageSetting["dialogType"] : "dialog";
29
30
  draggable.value = myJumpPageSetting && myJumpPageSetting["draggable"] ? myJumpPageSetting["draggable"] : false;
@@ -31,6 +32,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
32
  showPosition.value = myJumpPageSetting && myJumpPageSetting["showPosition"] ? myJumpPageSetting["showPosition"] : "rtl";
32
33
  title.value = myJumpPageSetting && myJumpPageSetting["jumpPageTitle"] ? myJumpPageSetting["jumpPageTitle"] : null;
33
34
  width.value = myJumpPageSetting && myJumpPageSetting["jumpPageWidth"] ? myJumpPageSetting["jumpPageWidth"] : "100%";
35
+ contentHeight.value = myJumpPageSetting && myJumpPageSetting["jumpPageHeight"] ? myJumpPageSetting["jumpPageHeight"] : null;
34
36
  pageCode.value = myJumpPageSetting && myJumpPageSetting["pageCode"];
35
37
  dataId.value = myJumpPageSetting && myJumpPageSetting["dataId"] ? myJumpPageSetting["dataId"] : null;
36
38
  taskId.value = myJumpPageSetting && myJumpPageSetting["taskId"] ? myJumpPageSetting["taskId"] : null;
@@ -98,8 +100,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
98
100
  pageCode.value ? (openBlock(), createBlock(_sfc_main$1, {
99
101
  key: 0,
100
102
  pageCode: pageCode.value,
101
- pageRequest: pageRequest.value
102
- }, null, 8, ["pageCode", "pageRequest"])) : createCommentVNode("", true)
103
+ pageRequest: pageRequest.value,
104
+ contentHeight: contentHeight.value
105
+ }, null, 8, ["pageCode", "pageRequest", "contentHeight"])) : createCommentVNode("", true)
103
106
  ]),
104
107
  _: 1
105
108
  }, 8, ["title", "width", "draggable", "overflow"]));
@@ -42,6 +42,10 @@ declare const _default: import('vue').DefineComponent<{
42
42
  type: ObjectConstructor;
43
43
  required: false;
44
44
  };
45
+ contentHeight: {
46
+ type: (NumberConstructor | StringConstructor)[];
47
+ default: any;
48
+ };
45
49
  }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
46
50
  close: (...args: any[]) => void;
47
51
  open: (...args: any[]) => void;
@@ -88,6 +92,10 @@ declare const _default: import('vue').DefineComponent<{
88
92
  type: ObjectConstructor;
89
93
  required: false;
90
94
  };
95
+ contentHeight: {
96
+ type: (NumberConstructor | StringConstructor)[];
97
+ default: any;
98
+ };
91
99
  }>> & {
92
100
  onClose?: (...args: any[]) => any;
93
101
  onOpen?: (...args: any[]) => any;
@@ -95,5 +103,6 @@ declare const _default: import('vue').DefineComponent<{
95
103
  onOpened?: (...args: any[]) => any;
96
104
  }, {
97
105
  isTest: boolean;
106
+ contentHeight: string | number;
98
107
  }, {}>;
99
108
  export default _default;