super-page-runtime 2.0.85 → 2.0.91

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.
@@ -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;
@@ -33,7 +33,7 @@ function convertToPageContext(pageDesign, pageRequest) {
33
33
  // 当前页面中表格对应的数据表名集合,后台保存子表记录时需要
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) {
@@ -89,16 +89,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
89
89
  if (!configure.props || !configure.props.otherSettings) {
90
90
  return;
91
91
  }
92
- if (configure.props.otherSettings.subtableSetting && configure.props.otherSettings.timeToInitializeSubTable && configure.props.otherSettings.subtableSetting.timeToInitializeSubTable.length > 0) {
92
+ if (configure.props.otherSettings.sourceQueryTableData && configure.props.otherSettings.timeToInitializeSubTable && configure.props.otherSettings.sourceQueryTableData.timeToInitializeSubTable.length > 0) {
93
93
  let flag = false;
94
- if (configure.props.otherSettings.subtableSetting.timeToInitializeSubTable.indexOf("create") !== -1) {
94
+ if (configure.props.otherSettings.sourceQueryTableData.timeToInitializeSubTable.indexOf("create") !== -1) {
95
95
  if (dataModel.id || dataModel.ID) {
96
96
  flag = false;
97
97
  } else {
98
98
  flag = true;
99
99
  }
100
100
  }
101
- if (configure.props.otherSettings.subtableSetting.timeToInitializeSubTable.indexOf("noData") !== -1) {
101
+ if (configure.props.otherSettings.sourceQueryTableData.timeToInitializeSubTable.indexOf("noData") !== -1) {
102
102
  const tableData = dataModel[prop];
103
103
  if (!tableData || tableData.length <= 0) {
104
104
  flag = true;
@@ -120,9 +120,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
120
120
  listViewOptions.value["isPageInfo"] = false;
121
121
  listViewOptions.value["subTableData"] = getValue();
122
122
  listViewOptions.value.extraParam["subTableListViewCode"] = listCode;
123
- listViewOptions.value.extraParam["subtableSetting"] = configure.props && configure.props.otherSettings ? JSON.stringify(configure.props.otherSettings.subtableSetting) : null;
123
+ listViewOptions.value.extraParam["subtableSetting"] = configure.props && configure.props.otherSettings ? JSON.stringify(configure.props.otherSettings) : null;
124
124
  listViewOptions.value.extraParam["additionalParamMap"] = additionalParamMap;
125
125
  listViewOptions.value.extraParam["entityMap"] = pageContext.entity.data;
126
+ listViewOptions.value.extraParam["contextMap"] = pageContext.entity.context;
127
+ listViewOptions.value.extraParam["taskMap"] = pageContext.entity.task;
126
128
  setGridDataEventOptions();
127
129
  listViewShowFlag.value = false;
128
130
  setTimeout(() => {
@@ -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
@@ -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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.0.85",
3
+ "version": "2.0.91",
4
4
  "description": "AgileBuilder super page runtime",
5
5
  "license": "ISC",
6
6
  "main": "dist/es/index.js",
@@ -48,7 +48,7 @@
48
48
  "@vitejs/plugin-vue-jsx": "^3.1.0",
49
49
  "@vue/eslint-config-prettier": "^8.0.0",
50
50
  "@vue/test-utils": "^2.4.4",
51
- "agilebuilder-ui": "1.0.58",
51
+ "agilebuilder-ui": "1.0.59",
52
52
  "axios": "^1.6.8",
53
53
  "cypress": "^13.6.6",
54
54
  "element-plus": "^2.6.1",