cloud-web-corejs 1.0.54-dev.193 → 1.0.54-dev.195

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 (28) hide show
  1. package/package.json +1 -1
  2. package/src/components/wf/content.vue +2 -0
  3. package/src/components/wf/setCandidateDialog.vue +1 -0
  4. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +33 -38
  5. package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +176 -0
  6. package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +53 -0
  7. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +5 -2
  8. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +1 -0
  9. package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +53 -0
  10. package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +2 -173
  11. package/src/components/xform/form-designer/indexMixin.js +5 -1
  12. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +0 -8
  13. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +0 -8
  14. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +0 -8
  15. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +13 -11
  16. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +13 -1
  17. package/src/components/xform/form-designer/setting-panel/property-editor/multiple-editor.vue +11 -11
  18. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +18 -17
  19. package/src/components/xform/form-designer/toolbar-panel/index.vue +8 -4
  20. package/src/components/xform/form-designer/widget-panel/index.vue +19 -15
  21. package/src/components/xform/form-designer/widget-panel/indexMixin.js +3 -0
  22. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +200 -80
  23. package/src/components/xform/form-render/container-item/data-table-mixin.js +6 -10
  24. package/src/components/xform/form-render/container-item/list-h5-item.vue +1 -9
  25. package/src/components/xform/form-render/container-item/list-h5-item2.vue +1 -8
  26. package/src/components/xform/form-render/indexMixin.js +127 -8
  27. package/src/components/xform/lang/zh-CN.js +5 -2
  28. package/src/components/xform/mixins/defaultHandle.js +120 -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.54-dev.193",
4
+ "version": "1.0.54-dev.195",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -437,6 +437,7 @@
437
437
  custom-class="dialog-style wf-dialog"
438
438
  v-el-drag-dialog
439
439
  v-el-dialog-center
440
+ :append-to-body="true"
440
441
  >
441
442
  <template #title>
442
443
  <span class="el-dialog__title">{{ $t2('流程转办', 'components.wf.wfTransfer') }}<span
@@ -592,6 +593,7 @@
592
593
  custom-class="dialog-style wf-dialog"
593
594
  v-el-drag-dialog
594
595
  v-el-dialog-center
596
+ :append-to-body="true"
595
597
  >
596
598
  <template #title>
597
599
  <span class="el-dialog__title">{{ $t2('流程加签', 'components.wf.wfAddIncreaseSign') }}<span
@@ -10,6 +10,7 @@
10
10
  @close="closeWin"
11
11
  v-el-drag-dialog
12
12
  v-el-dialog-center
13
+ :append-to-body="true"
13
14
  >
14
15
  <template #title>
15
16
  <span class="el-dialog__title">
@@ -79,7 +79,7 @@ modules = {
79
79
  this.initValueWatchEvent();
80
80
  if (this.field.options.searchDialogConfig) {
81
81
  if (this.field.options.searchDialogConfig.multipleChoices === void 0) {
82
- if (this.field.type == "vabsearch") {
82
+ if (this.hasVabsearchFlag()) {
83
83
  this.$set(
84
84
  this.field.options.searchDialogConfig,
85
85
  "multipleChoices",
@@ -243,6 +243,32 @@ modules = {
243
243
  } else {
244
244
  if (!dataId) {
245
245
  //新增
246
+ if (!this.designState && this.hasVabsearchFlag() && !this.field.options.multipleChoices) {
247
+ let searchDialogConfig = this.field.options.searchDialogConfig || {};
248
+ if (this.field.options.userDefaultVabSearch) {
249
+ let userInfo = this.getFormRef().getUserInfo();
250
+ let valueSourceField = "id";
251
+ let labelSourceField = "nick_name";
252
+ if (this.field.options.clickBindEvent == "1") {
253
+ if (searchDialogConfig.valueSourceField) valueSourceField = searchDialogConfig.valueSourceField
254
+ if (searchDialogConfig.labelSourceField) labelSourceField = searchDialogConfig.labelSourceField
255
+ }
256
+ this.setValue(userInfo[valueSourceField] ?? null);
257
+ this.setShowValue(userInfo[labelSourceField] ?? null);
258
+ } else if (this.field.options.saleOrgDefaultVabSearch) {
259
+ let saleOrgDTO = this.getFormRef().getDefaultSaleOrgDTO();
260
+ if (saleOrgDTO) {
261
+ let valueSourceField = "id";
262
+ let labelSourceField = "name";
263
+ if (this.field.options.clickBindEvent == "1") {
264
+ if (searchDialogConfig.valueSourceField) valueSourceField = searchDialogConfig.valueSourceField
265
+ if (searchDialogConfig.labelSourceField) labelSourceField = searchDialogConfig.labelSourceField
266
+ }
267
+ this.setValue(saleOrgDTO[valueSourceField] ?? null);
268
+ this.setShowValue(saleOrgDTO[valueSourceField] ?? null);
269
+ }
270
+ }
271
+ }
246
272
  if (!this.tableParam) {
247
273
  //主表
248
274
  if (this.isNotNullVal(defaultValue)) {
@@ -893,7 +919,7 @@ modules = {
893
919
  let formModel = this.formModel;
894
920
 
895
921
  let rows = [];
896
- if (this.field.type == "vabsearch") {
922
+ if (this.hasVabsearchFlag()) {
897
923
  if (this.field.options.multipleChoices) {
898
924
  let fieldKeyName = this.fieldKeyName;
899
925
  let valueField = this.field.options.valueField || fieldKeyName;
@@ -910,7 +936,7 @@ modules = {
910
936
 
911
937
  // dialogQueryParam.
912
938
  let queryParam = null;
913
- if(searchDialogConfig.dialogQueryParam){
939
+ if (searchDialogConfig.dialogQueryParam) {
914
940
  queryParam = this.handleCustomEvent(searchDialogConfig.dialogQueryParam)
915
941
  }
916
942
  this.getFormRef().openSearchDialog({
@@ -920,40 +946,6 @@ modules = {
920
946
  multiple: searchDialogConfig.multipleChoices || false,
921
947
  confirm: (rows) => {
922
948
  this.handleConfirmSearchDialog(rows, false, flag);
923
- /*if(rows.length){
924
- let row = rows[0];
925
- if(this.field.type == "vabsearch"){
926
- let fieldKeyName = this.fieldKeyName;
927
- let vabSearchName = this.field.options.vabSearchName || fieldKeyName;
928
- if(tableParam){
929
- let rowData = tableParam.row;
930
- rowData[fieldKeyName] = row[searchDialogConfig.valueSourceField]
931
- if(searchDialogConfig.labelSourceField)rowData[vabSearchName] = row[searchDialogConfig.labelSourceField]
932
- tableData.forEach(item=>{
933
- rowData[item.targetField] = row[item.sourceField]
934
- })
935
- }else{
936
- this.fieldModel = row[searchDialogConfig.valueSourceField];
937
- if(searchDialogConfig.labelSourceField)this.showValue = row[searchDialogConfig.labelSourceField];
938
- tableData.forEach(item=>{
939
- // formModel[item.targetField] = row[item.sourceField]
940
- this.getWidgetRef(item.targetField).setValue(row[item.sourceField]??null)
941
- })
942
- }
943
- }else{
944
- if(searchDialogConfig.tableEnabled){
945
- if(!searchDialogConfig.tableRef || !tableData.length)return
946
- let addRows = rows.map(rowData=>{
947
- let itemData = {};
948
- tableData.forEach(item=>{
949
- itemData[item.targetField] = rowData[item.sourceField]
950
- })
951
- return itemData;
952
- });
953
- this.getWidgetRef(searchDialogConfig.tableRef).addTableData(addRows,searchDialogConfig.tableUniqueKey);
954
- }
955
- }
956
- }*/
957
949
  },
958
950
  });
959
951
  },
@@ -967,6 +959,9 @@ modules = {
967
959
  let multipleChoices = this.field.options.multipleChoices;
968
960
  return multipleChoices;
969
961
  },
962
+ hasVabsearchFlag() {
963
+ return this.field.type == "vabsearch" || this.field.type == "singerSearch" || this.field.type == "multiSearch"
964
+ },
970
965
  handleConfirmSearchDialog(rows, isClear, flag) {
971
966
  if (!isClear && !rows.length) return;
972
967
  let optionModel = !flag ? this.field.options : (this.field.options.widgetTextLinkConfig?.options || {});
@@ -979,7 +974,7 @@ modules = {
979
974
  let row = rows && rows.length ? rows[0] : null;
980
975
  let multipleChoices =
981
976
  optionModel.searchDialogConfig.multipleChoices || false;
982
- if (this.field.type == "vabsearch") {
977
+ if (this.hasVabsearchFlag()) {
983
978
  let fieldKeyName = this.fieldKeyName;
984
979
  let valueField = this.field.options.valueField || fieldKeyName;
985
980
  let vabSearchName = this.field.options.vabSearchName || fieldKeyName;
@@ -0,0 +1,176 @@
1
+ import FormItemWrapper from '@base/components/xform/form-designer/form-widget/field-widget/form-item-wrapper'
2
+ import emitter from '@base/components/xform/utils/emitter'
3
+ import i18n from "@base/components/xform/utils/i18n";
4
+ import {deepClone} from "@base/components/xform/utils/util";
5
+ import fieldMixin from "@base/components/xform/form-designer/form-widget/field-widget/fieldMixin";
6
+
7
+ export default {
8
+ mixins: [emitter, fieldMixin, i18n],
9
+ props: {
10
+ field: Object,
11
+ parentWidget: Object,
12
+ parentList: Array,
13
+ indexOfParentList: Number,
14
+ designer: Object,
15
+
16
+ designState: {
17
+ type: Boolean,
18
+ default: false
19
+ },
20
+ columnConfig: {
21
+ type: Object,
22
+ default: null
23
+ },
24
+ subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
25
+ type: Number,
26
+ default: -1
27
+ },
28
+ subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
29
+ type: Number,
30
+ default: -1
31
+ },
32
+ subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
33
+ type: String,
34
+ default: ''
35
+ }
36
+ },
37
+ components: {
38
+ FormItemWrapper
39
+ },
40
+ data() {
41
+ let multipleChoices = this.field.options.multipleChoices || false;
42
+ let defaultValue = !multipleChoices ? null : [];
43
+ return {
44
+ oldFieldValue: defaultValue, //field组件change之前的值
45
+ fieldModel: defaultValue,
46
+ showValue2: null,
47
+ rules: [],
48
+ showSearchialog: false,
49
+ dialogContent: null,
50
+ showSysSearchialog: false,
51
+ systemDialogParam: {},
52
+ showVformDialog: false,
53
+ code: null,
54
+ formDialogOption: {}
55
+ }
56
+ },
57
+ watch: {
58
+ fieldModel(val) {
59
+ this.handleChangeEvent(val);
60
+ },
61
+ showValue(val) {
62
+ this.setShowValue(val);
63
+ }
64
+ },
65
+ computed: {
66
+ showValue() {
67
+ let currentData = this.currentData;
68
+ let fieldKeyName = this.fieldKeyName;
69
+ let vabSearchName = this.field.options.vabSearchName;
70
+ let multipleChoices = this.field.options.multipleChoices || false;
71
+ let labelField = this.field.options.vabSearchName || fieldKeyName;
72
+ let value = null;
73
+ if (!multipleChoices) {
74
+ value = currentData[labelField] ?? null;
75
+ } else {
76
+ if (this.fieldModel) {
77
+ value = this.fieldModel.map(item => item[labelField]).join(",");
78
+ }
79
+ }
80
+ this.showValue2 = value;
81
+ return value
82
+ },
83
+ tableRow() {
84
+ let tableParam = this.tableParam;
85
+ return tableParam && tableParam.row ? tableParam.row : null;
86
+ },
87
+ currentData() {
88
+ let tableParam = this.tableParam;
89
+ return tableParam && tableParam.row ? tableParam.row : this.formModel;
90
+ }
91
+ },
92
+ beforeCreate() {
93
+ /* 这里不能访问方法和属性!! */
94
+ },
95
+
96
+ created() {
97
+ /* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
98
+ 需要在父组件created中初始化!! */
99
+ if (this.field.options.readonly == undefined) {
100
+ this.$set(this.field.options, "readonly", true);
101
+ }
102
+ this.initFieldModel()
103
+ this.registerToRefList()
104
+ this.initEventHandler()
105
+ this.buildFieldRules()
106
+
107
+ this.handleOnCreated()
108
+ // this.initValue();
109
+ },
110
+
111
+ mounted() {
112
+ this.handleOnMounted()
113
+
114
+ },
115
+
116
+ beforeDestroy() {
117
+ this.unregisterFromRefList()
118
+ },
119
+ methods: {
120
+ setShowValue(val = null) {
121
+ let multipleChoices = this.field.options.multipleChoices || false;
122
+ if (!multipleChoices) {
123
+ let fieldKeyName = this.fieldKeyName;
124
+ let labelField = this.field.options.vabSearchName || fieldKeyName;
125
+ // this.$set(this.currentData, labelField, val)
126
+
127
+ this.currentData[labelField] = val
128
+ this.showValue2 = val;
129
+ }
130
+ },
131
+ setValue: function (e) {
132
+ if (this.field.formItemFlag) {
133
+ let data = this.tableRow || this.formModel;
134
+ var t = deepClone(this.fieldModel);
135
+ this.fieldModel = e,
136
+ this.initFileList(),
137
+ this.syncUpdateFormModel(e),
138
+ this.emitFieldDataChange(e, t);
139
+ }
140
+ },
141
+ clearHandle() {
142
+ let multipleChoices = this.field.options.multipleChoices || false;
143
+ let defaultValue = !multipleChoices ? null : [];
144
+ this.setShowValue(null)
145
+ this.setValue(defaultValue)
146
+ if (this.field.options.onSearchClear) {
147
+ let tableParam = this.tableParam;
148
+ let eventParamNames = [];
149
+ let eventParamValues = [];
150
+ if (tableParam) {
151
+ eventParamNames = ['rowData', 'rowIndex'];
152
+ eventParamValues = [tableParam.row, tableParam.rowIndex];
153
+ }
154
+ this.handleCustomEvent(this.field.options.onSearchClear, eventParamNames, eventParamValues)
155
+
156
+ /* var e = new Function(this.field.options.onSearchClear);
157
+ e.call(this);*/
158
+ }
159
+ this.handleClearSearchDialog();
160
+ },
161
+ changeShowValue2(val) {
162
+ if (this.field.options.readonly === false) {
163
+ let multipleChoices = this.field.options.multipleChoices || false;
164
+ if (!multipleChoices) {
165
+ let fieldKeyName = this.fieldKeyName;
166
+ let vabSearchName = this.field.options.vabSearchName;
167
+ let labelField = this.field.options.vabSearchName || fieldKeyName;
168
+ this.currentData[labelField] = val;
169
+ }
170
+ }
171
+ },
172
+ fieldModelLabel() {
173
+ return this.showValue;
174
+ },
175
+ }
176
+ }
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <form-item-wrapper :designer="designer" :field="field" :rules="rules" :design-state="designState"
3
+ :parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
4
+ :sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex"
5
+ :sub-form-row-id="subFormRowId">
6
+ <el-input
7
+ class="search-input"
8
+ max="200"
9
+ v-model="showValue2"
10
+ @clear="clearHandle"
11
+ v-el-readonly="field.options.readonly"
12
+ clearable
13
+ :disabled="field.options.disabled"
14
+ @change="changeShowValue2"
15
+ >
16
+ <i slot="suffix" class="el-input__icon el-icon-search" @click="emitAppendButtonClick"></i>
17
+ <span v-show="false">{{ showValue }}</span>
18
+ </el-input>
19
+ </form-item-wrapper>
20
+ </template>
21
+
22
+ <script>
23
+ import mixins from "@base/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin";
24
+
25
+ export default {
26
+ name: "multiSearch-widget",
27
+ componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
28
+ mixins: [mixins],
29
+ }
30
+ </script>
31
+
32
+ <style lang="scss" scoped>
33
+ @import "~@/styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
34
+
35
+ .full-width-input {
36
+ width: 100% !important;
37
+ }
38
+
39
+ .hideUploadDiv {
40
+ ::v-deep div.el-upload--picture-card { /* 隐藏最后的图片上传按钮 */
41
+ display: none;
42
+ }
43
+
44
+ ::v-deep div.el-upload--text { /* 隐藏最后的文件上传按钮 */
45
+ display: none;
46
+ }
47
+
48
+ ::v-deep div.el-upload__tip { /* 隐藏最后的文件上传按钮提示 */
49
+ display: none;
50
+ }
51
+ }
52
+
53
+ </style>
@@ -152,10 +152,13 @@ export default {
152
152
  [tagFormLabelField]: item[tagLabelField] ?? null,
153
153
  }
154
154
  })*/
155
- let tagFormParam = this.handleCustomEvent(this.field.options.tagFormParam)
155
+ let queryParam = null;
156
+ if (this.field.options.tagFormParam) {
157
+ queryParam = this.handleCustomEvent(this.field.options.tagFormParam)
158
+ }
156
159
  this.getFormRef().openSearchDialog({
157
160
  formCode,
158
- param: tagFormParam,
161
+ queryParam,
159
162
  // rows: checkRows,
160
163
  multiple: true,
161
164
  confirm: (rows) => {
@@ -12,6 +12,7 @@
12
12
  :default-first-option="allowDefaultFirstOption"
13
13
  :automatic-dropdown="field.options.automaticDropdown"
14
14
  :multiple="field.options.multiple" :multiple-limit="field.options.multipleLimit"
15
+ :collapse-tags="!!field.options.multiple"
15
16
  :placeholder="getI18nLabel(field.options.placeholder || '请选择')"
16
17
  :remote="field.options.remote" :remote-method="remoteQuery"
17
18
  @focus="handleFocusCustomEvent" @blur="handleBlurCustomEvent"
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <form-item-wrapper :designer="designer" :field="field" :rules="rules" :design-state="designState"
3
+ :parent-widget="parentWidget" :parent-list="parentList" :index-of-parent-list="indexOfParentList"
4
+ :sub-form-row-index="subFormRowIndex" :sub-form-col-index="subFormColIndex"
5
+ :sub-form-row-id="subFormRowId">
6
+ <el-input
7
+ class="search-input"
8
+ max="200"
9
+ v-model="showValue2"
10
+ @clear="clearHandle"
11
+ v-el-readonly="field.options.readonly"
12
+ clearable
13
+ :disabled="field.options.disabled"
14
+ @change="changeShowValue2"
15
+ >
16
+ <i slot="suffix" class="el-input__icon el-icon-search" @click="emitAppendButtonClick"></i>
17
+ <span v-show="false">{{ showValue }}</span>
18
+ </el-input>
19
+ </form-item-wrapper>
20
+ </template>
21
+
22
+ <script>
23
+ import mixins from "@base/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin";
24
+
25
+ export default {
26
+ name: "singerSearch-widget",
27
+ componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
28
+ mixins: [mixins],
29
+ }
30
+ </script>
31
+
32
+ <style lang="scss" scoped>
33
+ @import "~@/styles/global.scss"; //* form-item-wrapper已引入,还需要重复引入吗? *//
34
+
35
+ .full-width-input {
36
+ width: 100% !important;
37
+ }
38
+
39
+ .hideUploadDiv {
40
+ ::v-deep div.el-upload--picture-card { /* 隐藏最后的图片上传按钮 */
41
+ display: none;
42
+ }
43
+
44
+ ::v-deep div.el-upload--text { /* 隐藏最后的文件上传按钮 */
45
+ display: none;
46
+ }
47
+
48
+ ::v-deep div.el-upload__tip { /* 隐藏最后的文件上传按钮提示 */
49
+ display: none;
50
+ }
51
+ }
52
+
53
+ </style>
@@ -20,183 +20,12 @@
20
20
  </template>
21
21
 
22
22
  <script>
23
- import FormItemWrapper from './form-item-wrapper'
24
- import emitter from '../../../../../components/xform/utils/emitter'
25
- import i18n from "../../../../../components/xform/utils/i18n";
26
- import {deepClone} from "../../../../../components/xform/utils/util";
27
- import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
23
+ import mixins from "@base/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin";
28
24
 
29
25
  export default {
30
26
  name: "vabsearch-widget",
31
27
  componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
32
- mixins: [emitter, fieldMixin, i18n],
33
- props: {
34
- field: Object,
35
- parentWidget: Object,
36
- parentList: Array,
37
- indexOfParentList: Number,
38
- designer: Object,
39
-
40
- designState: {
41
- type: Boolean,
42
- default: false
43
- },
44
- columnConfig: {
45
- type: Object,
46
- default: null
47
- },
48
- subFormRowIndex: { /* 子表单组件行索引,从0开始计数 */
49
- type: Number,
50
- default: -1
51
- },
52
- subFormColIndex: { /* 子表单组件列索引,从0开始计数 */
53
- type: Number,
54
- default: -1
55
- },
56
- subFormRowId: { /* 子表单组件行Id,唯一id且不可变 */
57
- type: String,
58
- default: ''
59
- }
60
- },
61
- components: {
62
- FormItemWrapper
63
- },
64
- data() {
65
- let multipleChoices = this.field.options.multipleChoices || false;
66
- let defaultValue = !multipleChoices ? null : [];
67
- return {
68
- oldFieldValue: defaultValue, //field组件change之前的值
69
- fieldModel: defaultValue,
70
- showValue2: null,
71
- rules: [],
72
- showSearchialog: false,
73
- dialogContent: null,
74
- showSysSearchialog: false,
75
- systemDialogParam: {},
76
- showVformDialog: false,
77
- code: null,
78
- formDialogOption: {}
79
- }
80
- },
81
- watch: {
82
- fieldModel(val) {
83
- this.handleChangeEvent(val);
84
- },
85
- showValue(val) {
86
- this.setShowValue(val);
87
- }
88
- },
89
- computed: {
90
- showValue() {
91
- let currentData = this.currentData;
92
- let fieldKeyName = this.fieldKeyName;
93
- let vabSearchName = this.field.options.vabSearchName;
94
- let multipleChoices = this.field.options.multipleChoices || false;
95
- let labelField = this.field.options.vabSearchName || fieldKeyName;
96
- let value = null;
97
- if (!multipleChoices) {
98
- value = currentData[labelField] ?? null;
99
- } else {
100
- if (this.fieldModel) {
101
- value = this.fieldModel.map(item => item[labelField]).join(",");
102
- }
103
- }
104
- this.showValue2 = value;
105
- return value
106
- },
107
- tableRow() {
108
- let tableParam = this.tableParam;
109
- return tableParam && tableParam.row ? tableParam.row : null;
110
- },
111
- currentData() {
112
- let tableParam = this.tableParam;
113
- return tableParam && tableParam.row ? tableParam.row : this.formModel;
114
- }
115
- },
116
- beforeCreate() {
117
- /* 这里不能访问方法和属性!! */
118
- },
119
-
120
- created() {
121
- /* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
122
- 需要在父组件created中初始化!! */
123
- if (this.field.options.readonly == undefined) {
124
- this.$set(this.field.options, "readonly", true);
125
- }
126
- this.initFieldModel()
127
- this.registerToRefList()
128
- this.initEventHandler()
129
- this.buildFieldRules()
130
-
131
- this.handleOnCreated()
132
- // this.initValue();
133
- },
134
-
135
- mounted() {
136
- this.handleOnMounted()
137
-
138
- },
139
-
140
- beforeDestroy() {
141
- this.unregisterFromRefList()
142
- },
143
- methods: {
144
- setShowValue(val = null) {
145
- let multipleChoices = this.field.options.multipleChoices || false;
146
- if (!multipleChoices) {
147
- let fieldKeyName = this.fieldKeyName;
148
- let labelField = this.field.options.vabSearchName || fieldKeyName;
149
- // this.$set(this.currentData, labelField, val)
150
-
151
- this.currentData[labelField] = val
152
- this.showValue2 = val;
153
- }
154
- },
155
- setValue: function (e) {
156
- if (this.field.formItemFlag) {
157
- let data = this.tableRow || this.formModel;
158
- var t = deepClone(this.fieldModel);
159
- this.fieldModel = e,
160
- this.initFileList(),
161
- this.syncUpdateFormModel(e),
162
- this.emitFieldDataChange(e, t);
163
- }
164
- },
165
- clearHandle() {
166
- let multipleChoices = this.field.options.multipleChoices || false;
167
- let defaultValue = !multipleChoices ? null : [];
168
- this.setShowValue(null)
169
- this.setValue(defaultValue)
170
- if (this.field.options.onSearchClear) {
171
- let tableParam = this.tableParam;
172
- let eventParamNames = [];
173
- let eventParamValues = [];
174
- if (tableParam) {
175
- eventParamNames = ['rowData', 'rowIndex'];
176
- eventParamValues = [tableParam.row, tableParam.rowIndex];
177
- }
178
- this.handleCustomEvent(this.field.options.onSearchClear, eventParamNames, eventParamValues)
179
-
180
- /* var e = new Function(this.field.options.onSearchClear);
181
- e.call(this);*/
182
- }
183
- this.handleClearSearchDialog();
184
- },
185
- changeShowValue2(val) {
186
- if (this.field.options.readonly === false) {
187
- let multipleChoices = this.field.options.multipleChoices || false;
188
- if (!multipleChoices) {
189
- let fieldKeyName = this.fieldKeyName;
190
- let vabSearchName = this.field.options.vabSearchName;
191
- let labelField = this.field.options.vabSearchName || fieldKeyName;
192
- this.currentData[labelField] = val;
193
- }
194
- }
195
- },
196
- fieldModelLabel() {
197
- return this.showValue;
198
- },
199
- }
28
+ mixins: [mixins],
200
29
  }
201
30
  </script>
202
31
 
@@ -610,7 +610,7 @@ modules = {
610
610
  tableType: 2
611
611
  };
612
612
  formTemplateTableDTOs.push(formTemplateTable);
613
- } else if (widget.tableField && widget.type == 'vabsearch') {
613
+ } else if (widget.tableField && this.isVabsearchFlagWidget(widget)) {
614
614
  fields.push({
615
615
  fieldDesc: widget.options.label + "ID",
616
616
  fieldName: widgetName
@@ -661,6 +661,10 @@ modules = {
661
661
 
662
662
  return formTemplateTableDTOs;
663
663
  },
664
+ isVabsearchFlagWidget(widget) {
665
+ let type = widget?.type;
666
+ return type == "vabsearch" || type == "singerSearch" || type == "multiSearch";
667
+ },
664
668
  getTableFileds() {
665
669
  let fields = [];
666
670
  let fJson = this.getFormJson();
@@ -879,14 +879,6 @@ export default {
879
879
  let columnEditFields = null;
880
880
 
881
881
  let type = this.columnFormatMap[row.formatS];
882
- /*if (type == 'date') {
883
- columnEditFields = ['type', 'format', 'valueFormat']
884
- } else if (type == 'select') {
885
-
886
- }
887
- if (type == 'vabsearch') {
888
- columnEditFields = ['vabSearchField', 'formCode', 'formVersion', 'required', 'showFormField', 'onSearchConfirm', 'onSearchClear']
889
- }*/
890
882
 
891
883
  if (type) {
892
884
  columnSelectedWidget = this.$baseLodash.cloneDeep(this.designer.getFieldWidgetByType(type));