cloud-web-corejs 1.0.54-dev.457 → 1.0.54-dev.459

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.
@@ -21,6 +21,10 @@ export default {
21
21
  type: String,
22
22
  default: () => "id",
23
23
  },
24
+ tabNameEnable: {
25
+ type: Boolean,
26
+ default: () => false,
27
+ },
24
28
  },
25
29
  data() {
26
30
  return {
@@ -75,13 +79,20 @@ export default {
75
79
  }, 200);
76
80
  },
77
81
  removeTab(targetName) {
82
+ let tabNameEnable = this.tabNameEnable;
78
83
  let paneKeyName = this.paneKeyName;
79
- let tabIndex = this.tabs.findIndex(
80
- (tab) => tab.data[paneKeyName] + "" === targetName
81
- );
84
+ let tabIndex = this.tabs.findIndex((tab) => {
85
+ if (tabNameEnable) {
86
+ return tab.tabName === targetName;
87
+ } else {
88
+ return tab.data[paneKeyName] + "" === targetName;
89
+ }
90
+ });
82
91
  if (this.activeName === targetName) {
83
92
  if (tabIndex > 0) {
84
- this.activeName = this.tabs[tabIndex - 1].data[paneKeyName] + "";
93
+ this.activeName = tabNameEnable
94
+ ? tab.tabName
95
+ : this.tabs[tabIndex - 1].data[paneKeyName] + "";
85
96
  } else {
86
97
  this.activeName = "second";
87
98
  }
@@ -10,8 +10,9 @@
10
10
  >
11
11
  <el-dropdown trigger="hover" v-if="designState" :disabled="field.options.disabled">
12
12
  <el-button type="primary" class="button-sty" size="mini">
13
- <span>{{ $t1("导出/打印") }}</span
14
- ><span class="line"></span> <i class="el-icon-arrow-down el-icon--right"></i>
13
+ <span>{{ getI18nLabel(field.options.label) }}</span
14
+ ><span class="line"></span>
15
+ <i class="el-icon-arrow-down el-icon--right"></i>
15
16
  </el-button>
16
17
  </el-dropdown>
17
18
  <base-input-export
@@ -78,12 +79,17 @@ export default {
78
79
  let codes = this.field.options.printItems
79
80
  .filter((item) => !!item.code)
80
81
  .map((item) => item.code);
82
+ let label = null;
83
+ if (this.field.options.customLabelEnabled && this.field.options.label) {
84
+ label = this.$t1(this.field.options.label);
85
+ }
81
86
  let option = {
82
87
  prefix: prefix,
83
88
  tableTarget: () => {
84
89
  return this.getWidgetRef(this.field.options.printTableRef).getGridTable();
85
90
  },
86
91
  codes,
92
+ label,
87
93
  // codes: ["USEREXCEL", "USERPDF", "USERPRINT", "USERHIPRINT", "USERJDPRINT", "USERPDDPRINT", "USERVIPPRINT"],
88
94
  // ...printOption
89
95
  };
@@ -10,7 +10,7 @@
10
10
  >
11
11
  <el-dropdown trigger="hover" v-if="designState" :disabled="field.options.disabled">
12
12
  <el-button type="primary" class="button-sty" size="mini">
13
- <span>{{ $t1("导出/打印") }}</span
13
+ <span>{{ getI18nLabel(field.options.label) }}</span
14
14
  ><span class="line"></span>
15
15
  <i class="el-icon-arrow-down el-icon--right"></i>
16
16
  </el-button>
@@ -79,9 +79,14 @@ export default {
79
79
  let codes = this.field.options.printItems
80
80
  .filter((item) => !!item.code)
81
81
  .map((item) => item.code);
82
+ let label = null;
83
+ if (this.field.options.customLabelEnabled && this.field.options.label) {
84
+ label = this.$t1(this.field.options.label);
85
+ }
82
86
  let option = {
83
87
  prefix: prefix,
84
88
  codes,
89
+ label,
85
90
  customCondition: (exportTemplate) => {
86
91
  let param = {
87
92
  formData: this.formModel,
@@ -3,6 +3,9 @@
3
3
  <el-form-item label-width="0">
4
4
  <el-divider class="custom-divider">打印设置</el-divider>
5
5
  </el-form-item>
6
+ <el-form-item label="启用自定义按钮名称">
7
+ <el-switch v-model="optionModel.customLabelEnabled"></el-switch>
8
+ </el-form-item>
6
9
  <el-form-item label="表格唯一名称">
7
10
  <el-input v-model="optionModel.printTableRef"></el-input>
8
11
  </el-form-item>
@@ -15,18 +18,38 @@
15
18
  </el-form-item> -->
16
19
  <el-form-item label="输出模板编码"></el-form-item>
17
20
  <el-form-item label-width="0">
18
- <draggable tag="ul" class="draggable-box" :list="optionModel.printItems"
19
- v-bind="{ group: 'optionsGroup', ghostClass: 'ghost', handle: '.drag-option' }">
21
+ <draggable
22
+ tag="ul"
23
+ class="draggable-box"
24
+ :list="optionModel.printItems"
25
+ v-bind="{ group: 'optionsGroup', ghostClass: 'ghost', handle: '.drag-option' }"
26
+ >
20
27
  <li v-for="(item, index) in optionModel.printItems" :key="index" class="col-item">
21
28
  <i class="el-icon-s-operation drag-option"></i>
22
- <el-input v-model="item.code" class="cell-span-input" style="width: 160px !important;"></el-input>
23
- <el-button circle plain size="mini" type="danger" @click="deleteItem(index)"
24
- icon="el-icon-minus" class="col-delete-button" style="position: unset;"></el-button>
29
+ <el-input
30
+ v-model="item.code"
31
+ class="cell-span-input"
32
+ style="width: 160px !important"
33
+ ></el-input>
34
+ <el-button
35
+ circle
36
+ plain
37
+ size="mini"
38
+ type="danger"
39
+ @click="deleteItem(index)"
40
+ icon="el-icon-minus"
41
+ class="col-delete-button"
42
+ style="position: unset"
43
+ ></el-button>
25
44
  </li>
26
45
  </draggable>
27
46
  <div>
28
- <el-button type="text" @click="addItem" icon="el-icon-circle-plus-outline"
29
- class="add-option">
47
+ <el-button
48
+ type="text"
49
+ @click="addItem"
50
+ icon="el-icon-circle-plus-outline"
51
+ class="add-option"
52
+ >
30
53
  新增
31
54
  </el-button>
32
55
  </div>
@@ -36,9 +59,8 @@
36
59
 
37
60
  <script>
38
61
  import i18n from "../../../../../../components/xform/utils/i18n";
39
- import eventMixin
40
- from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
41
- import Draggable from 'vuedraggable';
62
+ import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
63
+ import Draggable from "vuedraggable";
42
64
 
43
65
  export default {
44
66
  name: "print-button-editor",
@@ -54,17 +76,17 @@ export default {
54
76
  data() {
55
77
  return {
56
78
  eventParams: [],
57
- printConditionParams: ["dataId", "formCode", "exportTemplate"]
79
+ printConditionParams: ["dataId", "formCode", "exportTemplate"],
58
80
  };
59
81
  },
60
82
  methods: {
61
83
  deleteItem(index) {
62
- this.optionModel.printItems.splice(index, 1)
84
+ this.optionModel.printItems.splice(index, 1);
63
85
  },
64
86
  addItem() {
65
- this.optionModel.printItems.push({code: null});
66
- }
67
- }
87
+ this.optionModel.printItems.push({ code: null });
88
+ },
89
+ },
68
90
  };
69
91
  </script>
70
92
 
@@ -91,4 +113,3 @@ li.ghost {
91
113
  width: 100px;
92
114
  }
93
115
  </style>
94
-
@@ -3,27 +3,53 @@
3
3
  <el-form-item label-width="0">
4
4
  <el-divider class="custom-divider">详情打印设置</el-divider>
5
5
  </el-form-item>
6
+ <el-form-item label="启用自定义按钮名称">
7
+ <el-switch v-model="optionModel.customLabelEnabled"></el-switch>
8
+ </el-form-item>
6
9
  <el-form-item label="打印自定义条件参数">
7
- <a href="javascript:void(0);" class="a-link link-oneLind"
8
- @click="editEventHandler('printCustomCondition', printConditionParams)">
10
+ <a
11
+ href="javascript:void(0);"
12
+ class="a-link link-oneLind"
13
+ @click="editEventHandler('printCustomCondition', printConditionParams)"
14
+ >
9
15
  <span>{{ optionModel.printCustomCondition }}</span>
10
16
  <i class="el-icon-edit"></i>
11
17
  </a>
12
18
  </el-form-item>
13
19
  <el-form-item label="输出模板编码"></el-form-item>
14
20
  <el-form-item label-width="0">
15
- <draggable tag="ul" class="draggable-box" :list="optionModel.printItems"
16
- v-bind="{ group: 'optionsGroup', ghostClass: 'ghost', handle: '.drag-option' }">
21
+ <draggable
22
+ tag="ul"
23
+ class="draggable-box"
24
+ :list="optionModel.printItems"
25
+ v-bind="{ group: 'optionsGroup', ghostClass: 'ghost', handle: '.drag-option' }"
26
+ >
17
27
  <li v-for="(item, index) in optionModel.printItems" :key="index" class="col-item">
18
28
  <i class="el-icon-s-operation drag-option"></i>
19
- <el-input v-model="item.code" class="cell-span-input" style="width: 160px !important;"></el-input>
20
- <el-button circle plain size="mini" type="danger" @click="deleteItem(index)"
21
- icon="el-icon-minus" class="col-delete-button" style="position: unset;"></el-button>
29
+ <el-input
30
+ v-model="item.code"
31
+ class="cell-span-input"
32
+ style="width: 160px !important"
33
+ ></el-input>
34
+ <el-button
35
+ circle
36
+ plain
37
+ size="mini"
38
+ type="danger"
39
+ @click="deleteItem(index)"
40
+ icon="el-icon-minus"
41
+ class="col-delete-button"
42
+ style="position: unset"
43
+ ></el-button>
22
44
  </li>
23
45
  </draggable>
24
46
  <div>
25
- <el-button type="text" @click="addItem" icon="el-icon-circle-plus-outline"
26
- class="add-option">
47
+ <el-button
48
+ type="text"
49
+ @click="addItem"
50
+ icon="el-icon-circle-plus-outline"
51
+ class="add-option"
52
+ >
27
53
  新增
28
54
  </el-button>
29
55
  </div>
@@ -33,9 +59,8 @@
33
59
 
34
60
  <script>
35
61
  import i18n from "../../../../../../components/xform/utils/i18n";
36
- import eventMixin
37
- from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
38
- import Draggable from 'vuedraggable';
62
+ import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
63
+ import Draggable from "vuedraggable";
39
64
 
40
65
  export default {
41
66
  name: "print-detail-button-editor",
@@ -51,17 +76,17 @@ export default {
51
76
  data() {
52
77
  return {
53
78
  eventParams: [],
54
- printConditionParams: ["dataId", "formCode", "exportTemplate"]
79
+ printConditionParams: ["dataId", "formCode", "exportTemplate"],
55
80
  };
56
81
  },
57
82
  methods: {
58
83
  deleteItem(index) {
59
- this.optionModel.printItems.splice(index, 1)
84
+ this.optionModel.printItems.splice(index, 1);
60
85
  },
61
86
  addItem() {
62
- this.optionModel.printItems.push({code: null});
63
- }
64
- }
87
+ this.optionModel.printItems.push({ code: null });
88
+ },
89
+ },
65
90
  };
66
91
  </script>
67
92
 
@@ -88,4 +113,3 @@ li.ghost {
88
113
  width: 100px;
89
114
  }
90
115
  </style>
91
-
@@ -3147,6 +3147,7 @@ export const advancedFields = [
3147
3147
  ...defaultWfConfig,
3148
3148
  ...defaultWidgetShowRuleConfig,
3149
3149
 
3150
+ customLabelEnabled: false,
3150
3151
  printButtonFlag:1,
3151
3152
  printTableRef: "",
3152
3153
  printItems: [],
@@ -3188,6 +3189,7 @@ export const advancedFields = [
3188
3189
  ...defaultWidgetShowRuleConfig,
3189
3190
 
3190
3191
  printDetailButtonFlag:1,
3192
+ customLabelEnabled: false,
3191
3193
  printItems: [],
3192
3194
  printCustomCondition: "return {\n id:[dataId]\n}",
3193
3195
 
@@ -540,10 +540,20 @@ modules = {
540
540
  },
541
541
  openEditDialog(row, param, option) {
542
542
  let formRef = this.getFormRef();
543
+ let formConfig = this.formConfig;
544
+ let formCode = null;
545
+ if(row?.id){
546
+ formCode = formConfig.editFormCode;
547
+ }else{
548
+ formCode = formConfig.addFormCode || formConfig.editFormCode
549
+ }
543
550
  let parentTarget = formRef.$attrs["parent-target"];
544
551
  parentTarget &&
545
552
  parentTarget.$attrs.openEditDialog &&
546
- parentTarget.$attrs.openEditDialog(row, param, option);
553
+ parentTarget.$attrs.openEditDialog(row, param, {
554
+ formCode,
555
+ ...option
556
+ });
547
557
  },
548
558
  importExcel() {},
549
559
  getGrid(that, tableRef) {
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="containt">
3
3
  <template v-if="layoutType == 'PC'">
4
- <x-tabs ref="xTabs" v-model="activeName" class="tab-box">
4
+ <x-tabs ref="xTabs" v-model="activeName" class="tab-box" :tabNameEnable="true">
5
5
  <el-tab-pane :label="$t2('常规')" name="first">
6
6
  <vFormRender
7
7
  ref="edit"
@@ -51,15 +51,15 @@
51
51
  reloadAutoContent(...args);
52
52
  }
53
53
  "
54
- :openEditDialog="openEditDialog"
54
+ :openEditDialog="openEditDialog1"
55
55
  ></vFormRender>
56
56
  </div>
57
57
  </el-tab-pane>
58
58
  <template #editTab="{ tab, index, reloadTabContent }">
59
59
  <el-tab-pane
60
- :key="tab.data.id"
61
- :label="tab.data[multiTabLabelField]"
62
- :name="tab.data.id + ''"
60
+ :key="tab.tabName"
61
+ :label="tab.data[tab.tabLabelField]"
62
+ :name="tab.tabName"
63
63
  :closable="true"
64
64
  >
65
65
  <vFormRender
@@ -214,7 +214,16 @@ export default {
214
214
  return;
215
215
  }
216
216
  let formConfig = this.formJson.formConfig;
217
- let multiTabEnabled = formConfig.multiTabEnabled && formConfig.multiTabLabelField;
217
+ let tabLabelField = option?.multiTabLabelField || formConfig.multiTabLabelField;
218
+ let multiTabEnabled = false;
219
+ if (tabLabelField) {
220
+ if (option?.multiTabEnabled) {
221
+ multiTabEnabled = true;
222
+ } else if (formConfig.multiTabEnabled && option?.multiTabEnabled !== false) {
223
+ multiTabEnabled = true;
224
+ }
225
+ }
226
+
218
227
  let dataId = row && row.id ? row.id : null;
219
228
  this.dataId = dataId;
220
229
  let formCode = null;
@@ -227,6 +236,8 @@ export default {
227
236
  this.$refs.xTabs.openEditTab(row, param, {
228
237
  tabParam: {
229
238
  formCode,
239
+ tabLabelField,
240
+ tabName: formCode + row[dataId],
230
241
  },
231
242
  });
232
243
  } else {
@@ -239,6 +250,9 @@ export default {
239
250
  this.$openEditView("showEdit");
240
251
  }
241
252
  },
253
+ openEditDialog1(row, param, option) {
254
+ this.openEditDialog(row, param, { multiTabEnabled: false, ...option });
255
+ },
242
256
  openEditH5Dialog(row) {
243
257
  this.formCode1 = this.addFormCode;
244
258
  this.dataId = row && row.id ? row.id : null;