cloud-web-corejs 1.0.54-dev.651 → 1.0.54-dev.652

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.651",
4
+ "version": "1.0.54-dev.652",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -22,20 +22,33 @@
22
22
  </template>
23
23
  <template
24
24
  v-else-if="
25
- field.options.widgetTextFlag === 3 && field.options.widgetTextLinkConfig
25
+ field.options.widgetTextFlag === 3 &&
26
+ field.options.widgetTextLinkConfig
26
27
  "
27
28
  >
28
29
  <div class="ellipsis">
29
- <a class="a-link" :class="getWidgetClass()" @click.native="handleClick">
30
+ <a
31
+ class="a-link"
32
+ :class="getWidgetClass()"
33
+ @click.native="handleClick"
34
+ >
30
35
  <span>
31
36
  <i
32
- :class="field.options.widgetTextLinkConfig.options.prefixIcon"
33
- v-if="!!field.options.widgetTextLinkConfig.options.prefixIcon"
37
+ :class="
38
+ field.options.widgetTextLinkConfig.options.prefixIcon
39
+ "
40
+ v-if="
41
+ !!field.options.widgetTextLinkConfig.options.prefixIcon
42
+ "
34
43
  ></i>
35
44
  <span>{{ getWidgetValue() }}</span>
36
45
  <i
37
- :class="field.options.widgetTextLinkConfig.options.suffixIcon"
38
- v-if="!!field.options.widgetTextLinkConfig.options.suffixIcon"
46
+ :class="
47
+ field.options.widgetTextLinkConfig.options.suffixIcon
48
+ "
49
+ v-if="
50
+ !!field.options.widgetTextLinkConfig.options.suffixIcon
51
+ "
39
52
  ></i>
40
53
  </span>
41
54
  </a>
@@ -48,10 +61,12 @@
48
61
  </template>
49
62
  <template v-else>
50
63
  <el-form-item
51
- v-if="!!field.formItemFlag && (!field.options.hidden || designState === true)"
64
+ v-if="
65
+ !!field.formItemFlag &&
66
+ (!field.options.hidden || designState === true)
67
+ "
52
68
  :label="label"
53
69
  :label-width="labelWidth"
54
- :title="field.options.labelTooltip"
55
70
  :rules="getRules()"
56
71
  :prop="getPropName()"
57
72
  :class="[
@@ -66,31 +81,46 @@
66
81
  v-if="!!field.options.labelIconClass"
67
82
  slot="label"
68
83
  class="custom-label"
69
- :style="{ color: field.options.labelColor }"
70
84
  >
71
85
  <template v-if="field.options.labelIconPosition === 'front'">
72
86
  <template v-if="!!field.options.labelTooltip">
73
- <el-tooltip :content="field.options.labelTooltip" effect="light">
87
+ <el-tooltip
88
+ :content="field.options.labelTooltip"
89
+ effect="light"
90
+ >
74
91
  <i :class="field.options.labelIconClass"></i></el-tooltip
75
- >{{ label }}</template
92
+ ><span :style="{ color: field.options.labelColor }">{{
93
+ label
94
+ }}</span></template
76
95
  >
77
96
  <template v-else>
78
- <i :class="field.options.labelIconClass"></i>{{ label }}</template
97
+ <i :class="field.options.labelIconClass"></i
98
+ ><span :style="{ color: field.options.labelColor }">{{
99
+ label
100
+ }}</span></template
79
101
  >
80
102
  </template>
81
103
  <template v-else-if="field.options.labelIconPosition === 'rear'">
82
104
  <template v-if="!!field.options.labelTooltip">
83
- {{ label
84
- }}<el-tooltip :content="field.options.labelTooltip" effect="light">
105
+ <span :style="{ color: field.options.labelColor }">{{
106
+ label
107
+ }}</span
108
+ ><el-tooltip
109
+ :content="field.options.labelTooltip"
110
+ effect="light"
111
+ >
85
112
  <i :class="field.options.labelIconClass"></i></el-tooltip
86
113
  ></template>
87
114
  <template v-else>
88
- {{ label }}<i :class="field.options.labelIconClass"></i
115
+ <span :style="{ color: field.options.labelColor }">{{
116
+ label
117
+ }}</span
118
+ ><i :class="field.options.labelIconClass"></i
89
119
  ></template>
90
120
  </template>
91
121
  </span>
92
122
  <span
93
- v-if="!!field.options.labelColor"
123
+ v-else-if="!!field.options.labelColor"
94
124
  slot="label"
95
125
  :style="{ color: field.options.labelColor }"
96
126
  >
@@ -101,20 +131,29 @@
101
131
  </template>
102
132
  <template
103
133
  v-else-if="
104
- field.options.widgetTextFlag === 3 && field.options.widgetTextLinkConfig
134
+ field.options.widgetTextFlag === 3 &&
135
+ field.options.widgetTextLinkConfig
105
136
  "
106
137
  >
107
138
  <div class="ellipsis">
108
139
  <a class="a-link" :class="getWidgetClass()" @click="handleClick">
109
140
  <span>
110
141
  <i
111
- :class="field.options.widgetTextLinkConfig.options.prefixIcon"
112
- v-if="!!field.options.widgetTextLinkConfig.options.prefixIcon"
142
+ :class="
143
+ field.options.widgetTextLinkConfig.options.prefixIcon
144
+ "
145
+ v-if="
146
+ !!field.options.widgetTextLinkConfig.options.prefixIcon
147
+ "
113
148
  ></i>
114
149
  <span>{{ getWidgetValue() }}</span>
115
150
  <i
116
- :class="field.options.widgetTextLinkConfig.options.suffixIcon"
117
- v-if="!!field.options.widgetTextLinkConfig.options.suffixIcon"
151
+ :class="
152
+ field.options.widgetTextLinkConfig.options.suffixIcon
153
+ "
154
+ v-if="
155
+ !!field.options.widgetTextLinkConfig.options.suffixIcon
156
+ "
118
157
  ></i>
119
158
  </span>
120
159
  </a>
@@ -330,7 +369,10 @@ export default {
330
369
  }
331
370
 
332
371
  this.$nextTick(() => {
333
- const l = getSubFormNameByFieldId(this.designer.widgetList, selectedId);
372
+ const l = getSubFormNameByFieldId(
373
+ this.designer.widgetList,
374
+ selectedId
375
+ );
334
376
  this.parentList.splice(this.indexOfParentList, 1);
335
377
  //if (!!nextSelected) {
336
378
  this.designer.setSelected(nextSelected);
@@ -342,7 +384,9 @@ export default {
342
384
  }
343
385
  },
344
386
  getIsFormItemUnabled() {
345
- return this.field.type == "vabUpload" || this.field.type == "baseAttachment";
387
+ return (
388
+ this.field.type == "vabUpload" || this.field.type == "baseAttachment"
389
+ );
346
390
  },
347
391
  getRules() {
348
392
  if (this.getIsFormItemUnabled()) {
@@ -351,15 +395,26 @@ export default {
351
395
  return this.rules;
352
396
  },
353
397
  getPropName() {
354
- if (this.getIsFormItemUnabled()) {
398
+ if (this.formItemProp === "false" || this.getIsFormItemUnabled()) {
355
399
  return null;
356
400
  }
357
- if (this.formItemProp) {
358
- return this.formItemProp;
401
+ // if (this.formItemProp) {
402
+ // return this.formItemProp;
403
+ // }
404
+ if (this.tableParam && !this.tableParam.$table?.$parent?.$parent) {
405
+ if (this.formItemProp) {
406
+ return this.formItemProp;
407
+ }
408
+ return null;
409
+ }
410
+ if (this.tableParam && !!this.tableParam.$table?.$parent?.$parent) {
411
+ return this.getColumnProp(this.field, this.tableParam);
359
412
  }
360
413
  let o = this.field.options.name;
361
414
  let propName =
362
- ((o = (this.field.options.keyNameEnabled && this.field.options.keyName) || o),
415
+ ((o =
416
+ (this.field.options.keyNameEnabled && this.field.options.keyName) ||
417
+ o),
363
418
  this.subFormItemFlag && !this.designState
364
419
  ? this.subFormName + "." + this.subFormRowIndex + "." + o
365
420
  : this.getObjectFieldFlag() && !this.designState
@@ -368,6 +423,46 @@ export default {
368
423
 
369
424
  return propName;
370
425
  },
426
+ getFieldKeyName(widget) {
427
+ let o = widget.options.name;
428
+ return (widget.options.keyNameEnabled && widget.options.keyName) || o;
429
+ },
430
+ isVabsearchFlagWidget(widget) {
431
+ let type = widget?.type;
432
+ return (
433
+ type === "vabsearch" ||
434
+ type === "singerSearch" ||
435
+ type === "multiSearch"
436
+ );
437
+ },
438
+ getColumnProp(rowWidget, obj) {
439
+ let required = rowWidget.options.required || false;
440
+
441
+ let tableRef = obj.$table.$parent.$parent;
442
+ let tableWidget = tableRef.widget;
443
+ let fieldKeyName = this.getFieldKeyName(tableWidget);
444
+ let property = this.getFieldKeyName(rowWidget);
445
+ if (this.isVabsearchFlagWidget(rowWidget)) {
446
+ property = rowWidget.options.vabSearchName || property;
447
+ }
448
+ let rowIndex = Math.max(obj.rowIndex, 0);
449
+
450
+ let isTreeTable = tableWidget.options.isTreeTable || false;
451
+ if (isTreeTable) {
452
+ rowIndex = tableRef
453
+ .getValue()
454
+ .findIndex((item) => item._X_ROW_KEY === obj.row._X_ROW_KEY);
455
+ if (rowIndex < 0) {
456
+ return "false";
457
+ }
458
+ }
459
+
460
+ let propName = fieldKeyName + "." + rowIndex + "." + property;
461
+ if (!required) {
462
+ propName = "false";
463
+ }
464
+ return propName;
465
+ },
371
466
  getI18nLabel(label, path, param) {
372
467
  return !this.designState && label ? this.$t2(label, path, param) : label;
373
468
  },
@@ -509,7 +604,8 @@ export default {
509
604
  : [];
510
605
 
511
606
  let flag1 = !item.serveName || item.serveName == bdService;
512
- let flag2 = !companyCodes.length || companyCodes.includes(companyCode);
607
+ let flag2 =
608
+ !companyCodes.length || companyCodes.includes(companyCode);
513
609
  // let flag3 = !loginAccounts.length || loginAccounts.includes(loginAccount)
514
610
  // let flag4 = this.compareToList(saleOrgCodes, saleOrgCodeList)
515
611
  if (flag1 && flag2) {
@@ -543,13 +639,16 @@ export default {
543
639
  isShowWidget() {
544
640
  let widgetTextFlag = this.field.options.widgetTextFlag;
545
641
  return (
546
- widgetTextFlag === undefined || widgetTextFlag === null || widgetTextFlag === 0
642
+ widgetTextFlag === undefined ||
643
+ widgetTextFlag === null ||
644
+ widgetTextFlag === 0
547
645
  );
548
646
  },
549
647
  getShowValue() {
550
648
  let widgetTextFlag = this.field.options.widgetTextFlag;
551
649
  let fieldModel = this.$parent.fieldModel;
552
- if (this.$parent.fieldModelLabel) fieldModel = this.$parent.fieldModelLabel();
650
+ if (this.$parent.fieldModelLabel)
651
+ fieldModel = this.$parent.fieldModelLabel();
553
652
  let showValue = fieldModel;
554
653
  if (widgetTextFlag == 2) {
555
654
  showValue = this.getProcessText(showValue, this.encryptFormula);
@@ -568,13 +667,17 @@ export default {
568
667
  handleClick(event) {
569
668
  if (this.field.options.disabled) return;
570
669
  this.$parent.handleButtonWidgetClick(event, true);
571
- if (!this.designState && this.field.options.widgetTextLinkConfig?.options.href) {
670
+ if (
671
+ !this.designState &&
672
+ this.field.options.widgetTextLinkConfig?.options.href
673
+ ) {
572
674
  window.open(this.field.options.widgetTextLinkConfig?.options.href);
573
675
  }
574
676
  },
575
677
  getWidgetValue() {
576
678
  let fieldModel = this.$parent.fieldModel;
577
- if (this.$parent.fieldModelLabel) fieldModel = this.$parent.fieldModelLabel();
679
+ if (this.$parent.fieldModelLabel)
680
+ fieldModel = this.$parent.fieldModelLabel();
578
681
  return fieldModel;
579
682
  },
580
683
  },
@@ -1,23 +1,22 @@
1
1
  <template>
2
2
  <el-form-item :label="i18nt('designer.setting.appendButtonIcon')">
3
- <el-input type="text" v-model="optionModel.buttonIcon"></el-input>
3
+ <icon-picker v-model="optionModel.buttonIcon"></icon-picker>
4
4
  </el-form-item>
5
5
  </template>
6
6
 
7
7
  <script>
8
- import i18n from "../../../../../components/xform/utils/i18n"
9
-
10
- export default {
11
- name: "buttonIcon-editor",
12
- mixins: [i18n],
13
- props: {
14
- designer: Object,
15
- selectedWidget: Object,
16
- optionModel: Object,
17
- },
18
- }
8
+ import i18n from "@base/components/xform/utils/i18n";
9
+ import IconPicker from "@base/components/xform/icon-picker/index.vue";
10
+ export default {
11
+ name: "buttonIcon-editor",
12
+ components: { IconPicker },
13
+ mixins: [i18n],
14
+ props: {
15
+ designer: Object,
16
+ selectedWidget: Object,
17
+ optionModel: Object,
18
+ },
19
+ };
19
20
  </script>
20
21
 
21
- <style scoped>
22
-
23
- </style>
22
+ <style scoped></style>
@@ -1,23 +1,22 @@
1
1
  <template>
2
2
  <el-form-item :label="i18nt('designer.setting.buttonIcon')">
3
- <el-input type="text" v-model="optionModel.icon"></el-input>
3
+ <icon-picker v-model="optionModel.icon"></icon-picker>
4
4
  </el-form-item>
5
5
  </template>
6
6
 
7
7
  <script>
8
- import i18n from "../../../../../../components/xform/utils/i18n"
9
-
10
- export default {
11
- name: "icon-editor",
12
- mixins: [i18n],
13
- props: {
14
- designer: Object,
15
- selectedWidget: Object,
16
- optionModel: Object,
17
- },
18
- }
8
+ import i18n from "@base/components/xform/utils/i18n";
9
+ import IconPicker from "@base/components/xform/icon-picker/index.vue";
10
+ export default {
11
+ name: "icon-editor",
12
+ components: { IconPicker },
13
+ mixins: [i18n],
14
+ props: {
15
+ designer: Object,
16
+ selectedWidget: Object,
17
+ optionModel: Object,
18
+ },
19
+ };
19
20
  </script>
20
21
 
21
- <style scoped>
22
-
23
- </style>
22
+ <style scoped></style>
@@ -1,28 +1,29 @@
1
1
  <template>
2
- <div v-show="false">
2
+ <div>
3
3
  <el-form-item label-width="0">
4
- <el-divider class="custom-divider">{{i18nt('designer.setting.customLabelIcon')}}</el-divider>
4
+ <el-divider class="custom-divider">{{
5
+ i18nt("designer.setting.customLabelIcon")
6
+ }}</el-divider>
5
7
  </el-form-item>
6
8
  <el-form-item :label="i18nt('designer.setting.labelIconClass')">
7
- <el-input type="text" v-model="optionModel.labelIconClass"></el-input>
9
+ <icon-picker v-model="optionModel.labelIconClass"></icon-picker>
8
10
  </el-form-item>
9
11
  </div>
10
12
  </template>
11
13
 
12
14
  <script>
13
- import i18n from "../../../../../components/xform/utils/i18n"
14
-
15
- export default {
16
- name: "labelIconClass-editor",
17
- mixins: [i18n],
18
- props: {
19
- designer: Object,
20
- selectedWidget: Object,
21
- optionModel: Object,
22
- },
23
- }
15
+ import i18n from "@base/components/xform/utils/i18n";
16
+ import IconPicker from "@base/components/xform/icon-picker/index.vue";
17
+ export default {
18
+ name: "labelIconClass-editor",
19
+ components: { IconPicker },
20
+ mixins: [i18n],
21
+ props: {
22
+ designer: Object,
23
+ selectedWidget: Object,
24
+ optionModel: Object,
25
+ },
26
+ };
24
27
  </script>
25
28
 
26
- <style scoped>
27
-
28
- </style>
29
+ <style scoped></style>
@@ -1,37 +1,37 @@
1
1
  <template>
2
- <el-form-item :label="i18nt('designer.setting.labelIconPosition')" v-show="false">
2
+ <el-form-item :label="i18nt('designer.setting.labelIconPosition')">
3
3
  <el-select v-model="optionModel.labelIconPosition">
4
- <el-option v-for="item in labelIconPosition" :key="item.value" :label="item.label"
5
- :value="item.value">
4
+ <el-option
5
+ v-for="item in labelIconPosition"
6
+ :key="item.value"
7
+ :label="item.label"
8
+ :value="item.value"
9
+ >
6
10
  </el-option>
7
11
  </el-select>
8
12
  </el-form-item>
9
13
  </template>
10
14
 
11
15
  <script>
12
- import i18n from "../../../../../components/xform/utils/i18n"
16
+ import i18n from "../../../../../components/xform/utils/i18n";
13
17
 
14
- export default {
15
- name: "labelIconPosition-editor",
16
- mixins: [i18n],
17
- props: {
18
- designer: Object,
19
- selectedWidget: Object,
20
- optionModel: Object,
21
- },
22
- data() {
23
- return {
24
- labelIconPosition: [
25
- {label: 'front', value: 'front'},
26
- {label: 'rear', value: 'rear'},
27
- ],
28
-
29
- }
30
- },
31
-
32
- }
18
+ export default {
19
+ name: "labelIconPosition-editor",
20
+ mixins: [i18n],
21
+ props: {
22
+ designer: Object,
23
+ selectedWidget: Object,
24
+ optionModel: Object,
25
+ },
26
+ data() {
27
+ return {
28
+ labelIconPosition: [
29
+ { label: "front", value: "front" },
30
+ { label: "rear", value: "rear" },
31
+ ],
32
+ };
33
+ },
34
+ };
33
35
  </script>
34
36
 
35
- <style scoped>
36
-
37
- </style>
37
+ <style scoped></style>
@@ -1,23 +1,21 @@
1
1
  <template>
2
- <el-form-item :label="i18nt('designer.setting.labelTooltip')" v-show="false">
2
+ <el-form-item :label="i18nt('designer.setting.labelTooltip')">
3
3
  <el-input type="text" v-model="optionModel.labelTooltip"></el-input>
4
4
  </el-form-item>
5
5
  </template>
6
6
 
7
7
  <script>
8
- import i18n from "../../../../../components/xform/utils/i18n"
8
+ import i18n from "../../../../../components/xform/utils/i18n";
9
9
 
10
- export default {
11
- name: "labelTooltip-editor",
12
- mixins: [i18n],
13
- props: {
14
- designer: Object,
15
- selectedWidget: Object,
16
- optionModel: Object,
17
- },
18
- }
10
+ export default {
11
+ name: "labelTooltip-editor",
12
+ mixins: [i18n],
13
+ props: {
14
+ designer: Object,
15
+ selectedWidget: Object,
16
+ optionModel: Object,
17
+ },
18
+ };
19
19
  </script>
20
20
 
21
- <style scoped>
22
-
23
- </style>
21
+ <style scoped></style>
@@ -1,23 +1,22 @@
1
1
  <template>
2
2
  <el-form-item :label="i18nt('designer.setting.prefixIcon')">
3
- <el-input type="text" v-model="optionModel.prefixIcon"></el-input>
3
+ <icon-picker v-model="optionModel.prefixIcon"></icon-picker>
4
4
  </el-form-item>
5
5
  </template>
6
6
 
7
7
  <script>
8
- import i18n from "../../../../../components/xform/utils/i18n";
9
-
10
- export default {
11
- name: "prefixIcon-editor",
12
- mixins: [i18n],
13
- props: {
14
- designer: Object,
15
- selectedWidget: Object,
16
- optionModel: Object,
17
- },
18
- }
8
+ import i18n from "@base/components/xform/utils/i18n";
9
+ import IconPicker from "@base/components/xform/icon-picker/index.vue";
10
+ export default {
11
+ name: "prefixIcon-editor",
12
+ components: { IconPicker },
13
+ mixins: [i18n],
14
+ props: {
15
+ designer: Object,
16
+ selectedWidget: Object,
17
+ optionModel: Object,
18
+ },
19
+ };
19
20
  </script>
20
21
 
21
- <style scoped>
22
-
23
- </style>
22
+ <style scoped></style>
@@ -1,23 +1,22 @@
1
1
  <template>
2
2
  <el-form-item :label="i18nt('designer.setting.suffixIcon')">
3
- <el-input type="text" v-model="optionModel.suffixIcon"></el-input>
3
+ <icon-picker v-model="optionModel.suffixIcon"></icon-picker>
4
4
  </el-form-item>
5
5
  </template>
6
6
 
7
7
  <script>
8
- import i18n from "../../../../../components/xform/utils/i18n";
9
-
10
- export default {
11
- name: "suffixIcon-editor",
12
- mixins: [i18n],
13
- props: {
14
- designer: Object,
15
- selectedWidget: Object,
16
- optionModel: Object,
17
- },
18
- }
8
+ import i18n from "@base/components/xform/utils/i18n";
9
+ import IconPicker from "@base/components/xform/icon-picker/index.vue";
10
+ export default {
11
+ name: "suffixIcon-editor",
12
+ components: { IconPicker },
13
+ mixins: [i18n],
14
+ props: {
15
+ designer: Object,
16
+ selectedWidget: Object,
17
+ optionModel: Object,
18
+ },
19
+ };
19
20
  </script>
20
21
 
21
- <style scoped>
22
-
23
- </style>
22
+ <style scoped></style>