cloud-web-corejs 1.0.315 → 1.0.316

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/package.json +1 -1
  2. package/src/components/hiprint/view/json-view.vue +4 -4
  3. package/src/components/mobile/wf/content.vue +2 -2
  4. package/src/components/xform/form-designer/designer.js +1 -0
  5. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +30 -4
  6. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +27 -4
  7. package/src/components/xform/form-designer/setting-panel/form-setting.vue +60 -39
  8. package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tab-lazyRender-editor.vue +27 -0
  9. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onTabChange-editor.vue +28 -0
  10. package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onTabClick-editor.vue +28 -0
  11. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +2 -4
  12. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +8 -3
  13. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +9 -0
  14. package/src/components/xform/form-render/container-item/containerItemMixin.js +489 -404
  15. package/src/components/xform/form-render/container-item/panel-item.vue +1 -1
  16. package/src/components/xform/form-render/container-item/tab-item.vue +48 -0
  17. package/src/components/xform/form-render/indexMixin.js +17 -2
  18. package/src/components/xform/form-render/pageDialogScope.js +54 -0
  19. package/src/components/xform/icon-picker/index.vue +1 -1
  20. package/src/components/xform/lang/en-US.js +3 -0
  21. package/src/components/xform/lang/zh-CN.js +3 -0
  22. package/src/components/xform/utils/util.js +1 -0
  23. package/src/directive/el-drag-dialog/drag.js +32 -2
  24. package/src/views/user/form/view/list.vue +24 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.315",
4
+ "version": "1.0.316",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "check:package-resources": "node build/check-package-resources.js",
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <span>
3
3
  <el-button type="primary" class="button-sty" @click="show"> 查看模板json </el-button>
4
- <el-dialog :visible="visible" :maskClosable="false" @cancel="hideModal">
4
+ <el-dialog :visible.sync="visible" :close-on-click-modal="false" @close="hideModal">
5
5
  <!-- <el-spin :spinning="spinning" style="min-height: 100px"> -->
6
- <el-input type="textarea" :rows="2" style="width: 40vw" v-model:value="jsonOut" />
6
+ <el-input type="textarea" :rows="2" style="width: 40vw" v-model="jsonOut" />
7
7
  <!-- </el-spin> -->
8
8
  <template slot="title">
9
9
  <div>
@@ -11,13 +11,13 @@
11
11
  <el-switch
12
12
  active-text="tid模式"
13
13
  inactive-text="默认"
14
- v-model:checked="tidMode"
14
+ v-model="tidMode"
15
15
  @change="onModeChange"
16
16
  />
17
17
  <el-switch
18
18
  active-text="美化"
19
19
  inactive-text="压缩"
20
- v-model:checked="beautify"
20
+ v-model="beautify"
21
21
  @change="onModeChange"
22
22
  />
23
23
  </div>
@@ -16,13 +16,13 @@
16
16
  <div class="m2">
17
17
  <div class="t"><span>{{ $t2('流程图', 'components.wf.wfImage') }}</span></div>
18
18
  <div class="c">
19
- <el-button icon="" class="btn" @click="showPreviewDialog=true" icon="el-icon-view">查看流程图</el-button>
19
+ <el-button class="btn" @click="showPreviewDialog=true" icon="el-icon-view">查看流程图</el-button>
20
20
  </div>
21
21
  </div>
22
22
  <div class="m2">
23
23
  <div class="t"><span>{{ $t2('任务情况', 'components.wf.taskInfo') }}</span></div>
24
24
  <div class="c">
25
- <el-button icon="" class="btn" @click="showRenwuDialog=true" icon="iconfont icon-preview">查看任务情况
25
+ <el-button class="btn" @click="showRenwuDialog=true" icon="iconfont icon-preview">查看任务情况
26
26
  </el-button>
27
27
  </div>
28
28
  </div>
@@ -57,6 +57,7 @@ let chartContainers = [],
57
57
  },
58
58
  scriptList: [],
59
59
  formType: 0,
60
+ dialogScope: null,
60
61
  getConfig: {
61
62
  accessType: "1",
62
63
  accessUrl: null,
@@ -1,8 +1,14 @@
1
1
  <template>
2
2
  <el-dialog
3
+ ref="pageDialog"
3
4
  :visible.sync="showDialog"
4
5
  v-el-drag-dialog
5
- v-el-dialog-center
6
+ v-el-dialog-center="!isPageScope"
7
+ :class="{
8
+ 'xform-page-dialog-wrapper': isPageScope,
9
+ 'xform-page-form-dialog-wrapper': isPageScope,
10
+ 'xform-page-dialog-wrapper--top': pageDialogHasTop,
11
+ }"
6
12
  v-bind="dialogConfig"
7
13
  @close="close"
8
14
  >
@@ -13,7 +19,11 @@
13
19
  v-bind="bodyConfig"
14
20
  v-if="listHost"
15
21
  >
16
- <list-view-host :formCode="listFormCode" :param="dialogParam" />
22
+ <list-view-host
23
+ :formCode="listFormCode"
24
+ :param="dialogParam"
25
+ :dialogScope="option.dialogScope"
26
+ />
17
27
  </div>
18
28
  <div class="cont designer-view" v-bind="bodyConfig" id="containt" v-else>
19
29
  <v-form-render
@@ -30,6 +40,7 @@
30
40
  @reload="reload"
31
41
  v-bind="formConfig"
32
42
  :param="dialogParam"
43
+ :dialogScope="option.dialogScope"
33
44
  :dataTableOption="dialogDataTableOption"
34
45
  class="data-table_height"
35
46
  @hook:mounted="handleFormMounted"
@@ -75,6 +86,10 @@
75
86
 
76
87
  <script>
77
88
  import VFormRender from "../../../../../components/xform/form-render/index.vue";
89
+ import {
90
+ pageScopedDialogMixin,
91
+ pageDialogTop,
92
+ } from "@base/components/xform/form-render/pageDialogScope";
78
93
  import {
79
94
  resolveActionButtons,
80
95
  hasButtonPermission,
@@ -95,7 +110,7 @@ export default {
95
110
  visiable: Boolean,
96
111
  option: Object,
97
112
  },
98
- mixins: [],
113
+ mixins: [pageScopedDialogMixin],
99
114
  inject: ["getFormConfig"],
100
115
 
101
116
  mounted() {},
@@ -171,6 +186,15 @@ export default {
171
186
  config = Object.assign({}, config, this.option.dialogConfig, {
172
187
  customClass,
173
188
  });
189
+ if (this.isPageScope) {
190
+ Object.assign(config, {
191
+ appendToBody: false,
192
+ modalAppendToBody: false,
193
+ modal: false,
194
+ lockScroll: false,
195
+ top: pageDialogTop(this.option.dialogConfig?.top),
196
+ });
197
+ }
174
198
  config.title = this.$t1(config.title);
175
199
  return config;
176
200
  },
@@ -236,7 +260,9 @@ export default {
236
260
  method: `post`,
237
261
  data: data,
238
262
  isLoading: true,
239
- loadingTarget: document.body,
263
+ loadingTarget: this.isPageScope
264
+ ? this.option.pageDialogHost
265
+ : document.body,
240
266
  modalStrictly: true,
241
267
  success: (res) => {
242
268
  let formTemplate = res.objx || {};
@@ -1,8 +1,13 @@
1
1
  <template>
2
2
  <el-dialog
3
+ ref="pageDialog"
3
4
  :visible.sync="showDialog"
4
5
  v-el-drag-dialog
5
- v-el-dialog-center
6
+ v-el-dialog-center="!isPageScope"
7
+ :class="{
8
+ 'xform-page-dialog-wrapper': isPageScope,
9
+ 'xform-page-dialog-wrapper--top': pageDialogHasTop,
10
+ }"
6
11
  v-bind="dialogConfig"
7
12
  @close="close"
8
13
  >
@@ -22,6 +27,7 @@
22
27
  :dataTableOption="dataTableOption"
23
28
  v-bind="formConfig"
24
29
  :param="dialogParam"
30
+ :dialogScope="option.dialogScope"
25
31
  class="data-table_height labMargin"
26
32
  />
27
33
  </div>
@@ -72,12 +78,16 @@
72
78
  <script>
73
79
  import { selectDialogMixins } from "../../../../../mixins/selectDialog/index.js";
74
80
  import VFormRender from "../../../../../components/xform/form-render/index.vue";
81
+ import {
82
+ pageScopedDialogMixin,
83
+ pageDialogTop,
84
+ } from "@base/components/xform/form-render/pageDialogScope";
75
85
  import { traverseAllWidgetsNew } from "../../../../../components/xform/utils/util";
76
86
 
77
87
  export default {
78
88
  components: { VFormRender },
79
89
  props: ["visiable", "multi", "rows", "param", "widget", "option"],
80
- mixins: [selectDialogMixins],
90
+ mixins: [selectDialogMixins, pageScopedDialogMixin],
81
91
  inject: ["getFormConfig"],
82
92
  mounted() {},
83
93
  data() {
@@ -172,6 +182,15 @@ export default {
172
182
  config = Object.assign({}, config, this.option.dialogConfig, {
173
183
  customClass,
174
184
  });
185
+ if (this.isPageScope) {
186
+ Object.assign(config, {
187
+ appendToBody: false,
188
+ modalAppendToBody: false,
189
+ modal: false,
190
+ lockScroll: false,
191
+ top: pageDialogTop(this.option.dialogConfig?.top),
192
+ });
193
+ }
175
194
  config.title = this.$t1(config.title);
176
195
  return config;
177
196
  },
@@ -228,7 +247,9 @@ export default {
228
247
  method: `post`,
229
248
  data: data,
230
249
  isLoading: true,
231
- loadingTarget: document.body,
250
+ loadingTarget: this.isPageScope
251
+ ? this.option.pageDialogHost
252
+ : document.body,
232
253
  modalStrictly: true,
233
254
  success: (res) => {
234
255
  let formTemplate = res.objx || {};
@@ -300,7 +321,9 @@ export default {
300
321
  tableAlias: this.formCode,
301
322
  },
302
323
  isLoading: true,
303
- loadingTarget: document.body,
324
+ loadingTarget: this.isPageScope
325
+ ? this.option.pageDialogHost
326
+ : document.body,
304
327
  modalStrictly: true,
305
328
  success: (res) => {
306
329
  let formData = res.objx && res.objx.data ? res.objx.data : {};
@@ -54,6 +54,19 @@
54
54
  {{ i18nt("designer.setting.addCss") }}
55
55
  </el-button>
56
56
  </el-form-item>
57
+ <el-form-item
58
+ v-if="formConfig.layoutType === 'PC'"
59
+ class="form-item-label-top"
60
+ label="业务弹框作用域"
61
+ >
62
+ <el-radio-group v-model="dialogScopeValue">
63
+ <el-radio label="global">全局</el-radio>
64
+ <el-radio label="page">当前页面</el-radio>
65
+ </el-radio-group>
66
+ <div style="line-height: 1.6; color: #909399; font-size: 12px">
67
+ 列表和详情模板需分别设置。当前页面模式只遮挡表单内容,顶部页签和左侧菜单仍可操作。
68
+ </div>
69
+ </el-form-item>
57
70
  </el-collapse-item>
58
71
  <el-collapse-item name="2" title="详情表单信息">
59
72
  <el-form-item :label="i18nt('加载详情数据')">
@@ -374,7 +387,7 @@
374
387
  </el-form-item>
375
388
  <el-form-item
376
389
  v-if="formConfig.multiTabEnabled"
377
- :label="i18nt('新增打开页签')"
390
+ :label="i18nt('新增打开页签')"
378
391
  class="el-form-item-second"
379
392
  >
380
393
  <el-switch v-model="formConfig.addTabEnabled"></el-switch>
@@ -480,7 +493,7 @@
480
493
  <el-collapse-item
481
494
  v-if="showEventCollapse()"
482
495
  name="7"
483
- :title="i18nt('designer.setting.eventSetting')"
496
+ :title="i18nt('designer.setting.eventSetting')"
484
497
  class="form-item-label-red"
485
498
  >
486
499
  <!-- <el-form-item label="onBeforeCreated" label-width="150px">
@@ -1255,6 +1268,14 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
1255
1268
  });
1256
1269
  },
1257
1270
  computed: {
1271
+ dialogScopeValue: {
1272
+ get() {
1273
+ return this.formConfig.dialogScope === "page" ? "page" : "global";
1274
+ },
1275
+ set(value) {
1276
+ this.$set(this.formConfig, "dialogScope", value);
1277
+ },
1278
+ },
1258
1279
  // formDialog/formDrawer 底部操作按钮配置(存 formConfig,随模板保存)
1259
1280
  actionButtons() {
1260
1281
  return this.formConfig.actionButtons || [];
@@ -1714,23 +1735,23 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
1714
1735
 
1715
1736
  <style lang="scss" scoped>
1716
1737
  .setting-form {
1717
- ::v-deep .el-form-item{
1718
- .el-form-item__label {
1719
- font-size: 13px;
1720
- //text-overflow: ellipsis;
1721
- overflow: hidden;
1722
- white-space: nowrap;
1723
- }
1724
- &.el-form-item--mini.el-form-item {
1725
- margin-bottom: 6px;
1726
- }
1727
- &.el-form-item-second{
1728
- .el-form-item__label{
1729
- padding-left:4px;
1730
- &:before{content:"";width:5px;height:2px;background:#FF4D4F;display:inline-block;margin-right:4px;}
1731
- span{flex:1}
1732
- }
1733
- }
1738
+ ::v-deep .el-form-item{
1739
+ .el-form-item__label {
1740
+ font-size: 13px;
1741
+ //text-overflow: ellipsis;
1742
+ overflow: hidden;
1743
+ white-space: nowrap;
1744
+ }
1745
+ &.el-form-item--mini.el-form-item {
1746
+ margin-bottom: 6px;
1747
+ }
1748
+ &.el-form-item-second{
1749
+ .el-form-item__label{
1750
+ padding-left:4px;
1751
+ &:before{content:"";width:5px;height:2px;background:#FF4D4F;display:inline-block;margin-right:4px;}
1752
+ span{flex:1}
1753
+ }
1754
+ }
1734
1755
  }
1735
1756
 
1736
1757
  .radio-group-custom {
@@ -1757,29 +1778,29 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
1757
1778
 
1758
1779
  /* 折叠组内部的二级分组标题,用于把长配置组切成几段(如「流程信息」) */
1759
1780
  ::v-deep .wf-group-title {
1760
- margin: 16px 0 8px;
1761
- padding-left: 8px;
1762
- //border-left: 3px solid #0073E5;
1763
- color: rgba(0,0,0,.65);
1764
- font-size: 13px;
1765
- font-weight: 600;
1766
- line-height: 1.3;
1767
- background: rgba(0,0,0,0.04);
1781
+ margin: 16px 0 8px;
1782
+ padding-left: 8px;
1783
+ //border-left: 3px solid #0073E5;
1784
+ color: rgba(0,0,0,.65);
1785
+ font-size: 13px;
1786
+ font-weight: 600;
1787
+ line-height: 1.3;
1788
+ background: rgba(0,0,0,0.04);
1768
1789
  padding: 4px 0 4px 8px;
1769
1790
  &:first-child {
1770
1791
  margin-top: 0;
1771
- }
1772
- ~ .el-form-item{
1773
- .el-form-item__label{
1774
- padding-left:4px;
1775
- &:before{content:"";width:5px;height:2px;background:#0073e5;display:inline-block;margin-right:4px;}
1776
- span{flex:1}
1777
- }
1778
- &.form-item-label-red{
1779
- .el-form-item__label:before{
1780
- background:#FF4D4F
1781
- }
1782
- }
1792
+ }
1793
+ ~ .el-form-item{
1794
+ .el-form-item__label{
1795
+ padding-left:4px;
1796
+ &:before{content:"";width:5px;height:2px;background:#0073e5;display:inline-block;margin-right:4px;}
1797
+ span{flex:1}
1798
+ }
1799
+ &.form-item-label-red{
1800
+ .el-form-item__label:before{
1801
+ background:#FF4D4F
1802
+ }
1803
+ }
1783
1804
  }
1784
1805
  }
1785
1806
 
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <el-form-item class="form-item-label-top" :label="i18nt('designer.setting.lazyRender')">
3
+ <el-switch v-model="optionModel.lazyRender"></el-switch>
4
+ <el-tooltip placement="bottom" effect="light" :content="i18nt('designer.setting.lazyRenderHint')">
5
+ <i class="el-icon-info" style="margin-left: 4px"></i>
6
+ </el-tooltip>
7
+ </el-form-item>
8
+ </template>
9
+
10
+ <script>
11
+ import i18n from "../../../../../../components/xform/utils/i18n";
12
+
13
+ export default {
14
+ name: "tab-lazyRender-editor",
15
+ componentName: 'PropertyEditor',
16
+ mixins: [i18n],
17
+ props: {
18
+ designer: Object,
19
+ selectedWidget: Object,
20
+ optionModel: Object,
21
+ },
22
+ }
23
+ </script>
24
+
25
+ <style scoped>
26
+
27
+ </style>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <el-form-item label="onTabChange" label-width="150px">
3
+ <a href="javascript:void(0);" class="a-link link-oneLind" @click="editEventHandler('onTabChange', eventParams)">
4
+ <span>{{ optionModel.onTabChange }}</span>
5
+ <i class="el-icon-edit"></i>
6
+ </a>
7
+ </el-form-item>
8
+ </template>
9
+
10
+ <script>
11
+ import i18n from "../../../../../../components/xform/utils/i18n";
12
+ import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
13
+
14
+ export default {
15
+ name: "onTabChange-editor",
16
+ mixins: [i18n, eventMixin],
17
+ props: {
18
+ designer: Object,
19
+ selectedWidget: Object,
20
+ optionModel: Object,
21
+ },
22
+ data() {
23
+ return { eventParams: ["name", "oldName"] };
24
+ },
25
+ };
26
+ </script>
27
+
28
+ <style scoped></style>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <el-form-item label="onTabClick" label-width="150px">
3
+ <a href="javascript:void(0);" class="a-link link-oneLind" @click="editEventHandler('onTabClick', eventParams)">
4
+ <span>{{ optionModel.onTabClick }}</span>
5
+ <i class="el-icon-edit"></i>
6
+ </a>
7
+ </el-form-item>
8
+ </template>
9
+
10
+ <script>
11
+ import i18n from "../../../../../../components/xform/utils/i18n";
12
+ import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
13
+
14
+ export default {
15
+ name: "onTabClick-editor",
16
+ mixins: [i18n, eventMixin],
17
+ props: {
18
+ designer: Object,
19
+ selectedWidget: Object,
20
+ optionModel: Object,
21
+ },
22
+ data() {
23
+ return { eventParams: ["name", "index", "label"] };
24
+ },
25
+ };
26
+ </script>
27
+
28
+ <style scoped></style>
@@ -312,7 +312,7 @@ export default {
312
312
  return this.selectedWidget.type !== "data-table";
313
313
  },
314
314
  openDialog() {
315
- this.tableData = this.$baseLodash.cloneDeep(this.optionModel.tagFillConfig);
315
+ this.tableData = this.$baseLodash.cloneDeep(this.optionModel.tagFillConfig || []);
316
316
  this.showDialog = true;
317
317
  },
318
318
  confirmDialog() {
@@ -320,9 +320,7 @@ export default {
320
320
  this.showDialog = false;
321
321
  },
322
322
 
323
- openDialog() {
324
- let reportTemplate = this.getReportTemplate();
325
- let objTypeCode = reportTemplate.objTypeCode;
323
+ openWorkflowDialog() {
326
324
  let wfConfigData = this.optionModel.wfConfigData || [];
327
325
  this.dialogVisible = true;
328
326
  this.tableData = this.$baseLodash.cloneDeep(wfConfigData);
@@ -86,6 +86,7 @@ const COMMON_PROPERTIES = {
86
86
  descriptionsItems: "descriptionsItems-editor",
87
87
  isFullscreen: "isFullscreen-editor",
88
88
  tabClass: "tabClass-editor",
89
+ lazyRender: "tab-lazyRender-editor",
89
90
  censusClass: "censusClass-editor",
90
91
  // 'scriptUuid': 'script-editor',
91
92
  entityTableCode: "entityTableCode-editor",
@@ -288,6 +289,10 @@ const EVENT_PROPERTIES = {
288
289
  onLoadNode: "onLoadNode-editor",
289
290
  //tree-pane事件
290
291
  onTreeLabelClick: "onTreeLabelClick-editor",
292
+
293
+ //tab事件
294
+ onTabClick: "onTabClick-editor",
295
+ onTabChange: "onTabChange-editor",
291
296
  };
292
297
 
293
298
  /**
@@ -326,9 +331,9 @@ export function registerEventProperty(uniquePropName, propEditorName) {
326
331
  */
327
332
  export function propertyRegistered(uniquePropName) {
328
333
  return (
329
- !!COMMON_PROPERTIES[uniquePropName] ||
330
- !!ADVANCED_PROPERTIES[uniquePropName] ||
331
- !!EVENT_PROPERTIES[uniquePropName]
334
+ !!COMMON_PROPERTIES[uniquePropName]
335
+ || !!ADVANCED_PROPERTIES[uniquePropName]
336
+ || !!EVENT_PROPERTIES[uniquePropName]
332
337
  );
333
338
  }
334
339
 
@@ -97,6 +97,15 @@ export const containers = [
97
97
  height: "",
98
98
  // isFullscreen: false,
99
99
  tabClass: "tab-boxCard tabCard-sty1",
100
+ // 懒渲染:页签内容首次激活才挂载(element lazy)。默认关闭——开启前需确认表单
101
+ // 无跨页签 getWidgetRef 脚本、未访问页签字段无需参与提交校验(详情类模板适用)。
102
+ lazyRender: !1,
103
+ // 页签事件脚本:点击/切换页签时的联动入口(懒渲染后"切到页签再刷新数据"的挂钩)
104
+ onTabClick: "",
105
+ onTabChange: "",
106
+ // 容器生命周期脚本(与 detail 等容器同口径,由 containerItemMixin 的 handleOnCreated/Mounted 执行)
107
+ onCreated: "",
108
+ onMounted: "",
100
109
  customClass: "",
101
110
  ...defaultWfConfig,
102
111
  },