cloud-web-corejs 1.0.54-dev.743 → 1.0.54-dev.745

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.
@@ -0,0 +1,408 @@
1
+ <template>
2
+ <el-dialog
3
+ title="单据列表"
4
+ :append-to-body="true"
5
+ :modal-append-to-body="true"
6
+ :close-on-click-modal="falseValue"
7
+ :visible.sync="showDialog"
8
+ :modal="falseValue"
9
+ custom-class="dialog-style list-dialog dialog-checkbox pd_0"
10
+ width="1200px"
11
+ @close="dialogClose"
12
+ v-el-drag-dialog
13
+ v-el-dialog-center
14
+ >
15
+ <div class="cont" style="height:450px">
16
+ <vxe-grid
17
+ class="is-pointer"
18
+ ref="table-m1"
19
+ v-bind="vxeOption"
20
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
21
+ @custom="$vxeTableUtil.customHandle"
22
+ @checkbox-change="addDataTable"
23
+ @checkbox-all="checkAll"
24
+ @cell-dblclick="checkWithSubmit"
25
+ >
26
+ <template #form>
27
+ <div class="clearfix screen-btns">
28
+ <div class="fr">
29
+ <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
30
+ plain>重置
31
+ </vxe-button>
32
+ <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索</vxe-button>
33
+ </div>
34
+ </div>
35
+ <template v-if="searchFields.length>0">
36
+ <vxe-form ref="form" class="screen-box" title-width="92px" title-align="right" :data="formData"
37
+ @submit="searchEvent" @reset="searchEvent">
38
+ <vxe-form-item v-for="(item,index) in searchFields"
39
+ :key="index" :title="item.label+':'">
40
+ <template v-slot>
41
+ <el-input v-model="formData[item.prop]" size="small" clearable/>
42
+ </template>
43
+ </vxe-form-item>
44
+ </vxe-form>
45
+ </template>
46
+ </template>
47
+ </vxe-grid>
48
+ </div>
49
+ <label id="labBtn" class="transverse">
50
+ <div class="icon">
51
+ <i class="el-icon-more"></i>
52
+ <i class="el-icon-more"></i>
53
+ </div>
54
+ </label>
55
+ <div class="multipleChoice">
56
+ <el-tooltip :enterable="false" effect="dark" :content="$t1('全部删除')" placement="top"><a class="allDel icon-quanbushanchu"
57
+ @click="clearChecked()"></a>
58
+ </el-tooltip>
59
+ <div class="list">
60
+ <div class="item" v-for="(checkRow, index) in checkRows" :key="'c'+index">
61
+ <p>{{ checkRow[showFormField] }}</p>
62
+ <a class="el-icon-close" @click="clearTable1Select(index)"></a>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ <span slot="footer" class="dialog-footer">
67
+ <span class="fl tips" v-if="!selectMulti">{{ $t1('注:双击确认选择(单选)') }}</span>
68
+ <el-button type="primary" plain class="button-sty" @click="dialogClose">
69
+ <i class="el-icon-close el-icon"></i>
70
+ {{ $t2('取 消', 'system.button.cancel2') }}
71
+ </el-button>
72
+ <el-button type="primary" @click="dialogPrimary" class="button-sty">
73
+ <i class="el-icon-check el-icon"></i>
74
+ {{ $t2('确 定', 'system.button.confirm2') }}
75
+ </el-button>
76
+ </span>
77
+ </el-dialog>
78
+ </template>
79
+
80
+ <script>
81
+ import {selectDialogMixins} from '../../../../../mixins/selectDialog/index.js';
82
+
83
+ export default {
84
+ name: "vabSearchDialog",
85
+ props: ['visiable', 'multi', 'rows', 'param', 'formCode', 'showFormField', 'widget'],
86
+ mixins: [selectDialogMixins],
87
+ inject: ['scriptHttp'],
88
+ created() {
89
+ this.initSetting();
90
+ this.checkField = this.showFormField;
91
+ },
92
+ mounted() {
93
+ this.initTableM1();
94
+ },
95
+ data() {
96
+ var that = this;
97
+ return {
98
+ showDialog: true,
99
+ falseValue: false,
100
+ selectMulti: true,
101
+ formData: {},
102
+ vxeOption: {},
103
+ formInsListField0DTOs: [],
104
+ formInsListField1DTOs: [],
105
+ targetFormTemplate: null,
106
+ formJson: null,
107
+ tableColumns: [],
108
+ searchFields: [],
109
+ tableConfig: {},
110
+ checkField: null,
111
+ filedKey: 'dialogConfig'
112
+ };
113
+ },
114
+ methods: {
115
+ searchEvent() {
116
+ this.$refs['table-m1'].commitProxy('reload');
117
+ },
118
+ resetEvent() {
119
+ this.formData = {};
120
+ this.$refs['table-m1'].commitProxy('reload');
121
+ },
122
+ async initTableM1() {
123
+ let that = this;
124
+ let tableRef = 'table-m1';
125
+ let syncColumns = [];
126
+ await this.createColumns().then(res => {
127
+ syncColumns = res;
128
+ });
129
+ this.checkField = this.tableConfig.showFormField || this.showFormField || 'id';
130
+ let defaultPath = USER_PREFIX + '/form_ins/listPage';
131
+ let path = this.tableConfig.url || defaultPath;
132
+
133
+ let optionModel = this.widget.options;
134
+ let targetFormConfig = this.targetFormConfig;
135
+ let isScriptEnabled = false;
136
+ let scriptUuid = null;
137
+ let scriptUuid2 = null;
138
+ let returnType = 0;
139
+ if (this.targetFormTemplate) {
140
+ let gridConfig = targetFormConfig[this.filedKey] || {};
141
+ isScriptEnabled = !!gridConfig.isLoadDataByAccess && !!gridConfig.scriptUuid;
142
+ scriptUuid = gridConfig.scriptUuid;
143
+ scriptUuid2 = gridConfig.scriptUuid2;
144
+ returnType = isScriptEnabled ? gridConfig.accessReturnType : 1;
145
+ } else {
146
+ isScriptEnabled = !!optionModel.isLoadDataByAccess && !!optionModel.scriptUuid;
147
+ scriptUuid = optionModel.scriptUuid;
148
+ scriptUuid2 = optionModel.scriptUuid2;
149
+ returnType = isScriptEnabled ? optionModel.accessReturnType : 1;
150
+ }
151
+ if(returnType===null || returnType===undefined){
152
+ returnType = 1;
153
+ }
154
+
155
+ let tableOption = {
156
+ vue: that,
157
+ tableRef: tableRef,
158
+ tableName: 'user-form_form_ins_dialog-m1',
159
+ path: path,
160
+ param: () => {
161
+ let customParam = this.getCustomParam();
162
+ let condition = {
163
+ ...this.formData,
164
+ ...this.param,
165
+ ...customParam
166
+ }
167
+ Object.keys(condition).forEach(key => {
168
+ if (condition[key] === "" || condition[key] === null) {
169
+ delete condition[key]
170
+ }
171
+ })
172
+ if (path == defaultPath) {
173
+ return {
174
+ formCode: this.formCode,
175
+ condition: condition
176
+ };
177
+ } else {
178
+ return {
179
+ ...condition
180
+ };
181
+ }
182
+
183
+ },
184
+ columns: [
185
+ {type: 'checkbox', fixed: 'left', width: 48, resizable: false},
186
+ ...syncColumns,
187
+ {
188
+ width: 47,
189
+ fixed: 'right',
190
+ title: '',
191
+ sortable: false
192
+ }
193
+ ],
194
+ config: {
195
+ checkboxConfig: {
196
+ checkStrictly: true,
197
+ showHeader: this.selectMulti,
198
+ trigger: 'row'
199
+ },
200
+ proxyConfig: {
201
+ props: {
202
+ result: returnType === 1 ? 'objx.records' : 'objx', // 配置响应结果列表字段
203
+ total: returnType === 1 ? 'objx.total' : 'objx.length' // 配置响应结果总页数字段
204
+ },
205
+ ajax: {
206
+ // 接收 Promise 对象
207
+ query: ({page, sorts, filters, form}) => {
208
+ if (!path) {
209
+ return;
210
+ }
211
+
212
+ let formData = tableOption.param ? tableOption.param() || {} : {};
213
+ const queryParams = Object.assign({}, formData);
214
+ if (isScriptEnabled) {
215
+ let condition = queryParams.condition
216
+ delete queryParams.condition;
217
+ delete queryParams.formCode;
218
+ Object.assign(queryParams, condition);
219
+ }
220
+
221
+ // 处理排序条件
222
+ const firstSort = sorts[0];
223
+ if (firstSort) {
224
+ queryParams.sort = firstSort.property;
225
+ queryParams.order = firstSort.order;
226
+ }
227
+ // 处理筛选条件
228
+ filters.forEach(({property, values}) => {
229
+ queryParams[property] = values.join(",");
230
+ });
231
+ if (page.pageSize !== undefined) {
232
+ queryParams["size"] = `${page.pageSize}`;
233
+ queryParams["current"] = `${page.currentPage}`;
234
+ }
235
+
236
+ var $grid = this.$refs[tableRef];
237
+ let isQueryAllPage = $grid.isQueryAllPage;
238
+ let pathStr1 = "";
239
+ if (isQueryAllPage === false) {
240
+ queryParams.searchCount = false;
241
+ }
242
+
243
+ var reqPath = typeof path == "function" ? path() : path;
244
+
245
+ let toDo = (res) => {
246
+ let rows = res.objx ? res.objx.records || res.objx || [] : [];
247
+ if (tableOption.callback) {
248
+ that.$nextTick(() => {
249
+ setTimeout(function () {
250
+ tableOption.callback(rows);
251
+ }, 0);
252
+ });
253
+ }
254
+ }
255
+
256
+ return new Promise((resolve, reject) => {
257
+ if (isScriptEnabled) {
258
+ let option1 = this.$baseLodash.cloneDeep(optionModel);
259
+ option1.scriptUuid = scriptUuid;
260
+ option1.scriptUuid2 = scriptUuid2;
261
+ this.scriptHttp({
262
+ options: option1,
263
+ params: queryParams,
264
+ targetFormTemplate: this.targetFormTemplate,
265
+ isLoading: false,
266
+ callback: (res) => {
267
+ resolve(res);
268
+ if (res.type == "success") {
269
+ toDo(res);
270
+ }
271
+ }
272
+ });
273
+ } else {
274
+ that.$http({
275
+ url: reqPath,
276
+ method: "post",
277
+ data: queryParams,
278
+ callback: (res) => {
279
+ resolve(res);
280
+ if (res.type == "success") {
281
+ toDo(res);
282
+ }
283
+ },
284
+ error: (error) => {
285
+ reject(error);
286
+ },
287
+ });
288
+ }
289
+ });
290
+ }
291
+ },
292
+ }
293
+ }
294
+ };
295
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
296
+ that.vxeOption = opts;
297
+ });
298
+ },
299
+ async createColumns() {
300
+ await this.getFormTemplate();
301
+ await this.getListFields();
302
+
303
+ let formField = this.formField;
304
+ return this.tableColumns.map((row, index) => {
305
+ let column = {
306
+ title: row.label,
307
+ field: row.prop,
308
+ width: 150
309
+ }
310
+ if (index === 0) {
311
+ column.fixed = 'left';
312
+ }
313
+ return column;
314
+ })
315
+ },
316
+ async getListFields() {
317
+ if (!this.formCode) return;
318
+ return this.$http({
319
+ url: USER_PREFIX + '/form_ins/getListFields',
320
+ method: `post`,
321
+ data: {stringOne: this.formCode},
322
+ isLoading: true,
323
+ loadingTarget: document.body,
324
+ // modalStrictly: true,
325
+ success: res => {
326
+ let formInsListFieldDTOs = res.objx || [];
327
+ this.formInsListField0DTOs = formInsListFieldDTOs.filter(item => item.fieldType === 0);
328
+ this.formInsListField1DTOs = formInsListFieldDTOs.filter(item => item.fieldType === 1);
329
+
330
+ if (!this.tableColumns.length) {
331
+ this.tableColumns = this.formInsListField0DTOs.map(row => {
332
+ return {
333
+ label: row.fieldDesc,
334
+ prop: row.fieldName,
335
+ width: 150
336
+ }
337
+ });
338
+ }
339
+ if (!this.searchFields.length) {
340
+ this.searchFields = this.formInsListField1DTOs.map(row => {
341
+ return {
342
+ label: row.fieldDesc,
343
+ prop: row.fieldName
344
+ }
345
+ });
346
+ }
347
+ }
348
+ });
349
+ },
350
+ async getFormTemplate() {
351
+ let options = this.widget.options;
352
+ let customGridConfig = options[this.filedKey] || {};
353
+ this.customGridConfig = customGridConfig
354
+ let searchField0s = customGridConfig && customGridConfig.searchFields ? customGridConfig.searchFields : [];
355
+ let tableColumn0s = customGridConfig && customGridConfig.tableColumns ? customGridConfig.tableColumns : [];
356
+ if (!this.formCode) {
357
+ this.searchFields = searchField0s;
358
+ this.tableColumns = tableColumn0s;
359
+ this.tableConfig = customGridConfig;
360
+ this.targetFormTemplate = null
361
+ this.targetFormConfig = null;
362
+ return;
363
+ }
364
+ return this.$http({
365
+ url: USER_PREFIX + `/formTemplate/getByFormCode`,
366
+ method: `post`,
367
+ data: {
368
+ stringOne: this.formCode
369
+ },
370
+ isLoading: true,
371
+ loadingTarget: document.body,
372
+ success: res => {
373
+ let targetFormTemplate = res.objx || {};
374
+ let formJson = targetFormTemplate.formViewContent ? JSON.parse(targetFormTemplate.formViewContent) : {};
375
+ let formConfig = formJson.formConfig;
376
+ this.targetFormTemplate = res.objx ? targetFormTemplate : null
377
+ this.targetFormConfig = formConfig;
378
+
379
+ let gridConfig = formConfig[this.filedKey] || {}
380
+
381
+ let searchFields = gridConfig.searchFields || []
382
+ let tableColumns = gridConfig.tableColumns || [];
383
+ searchFields = searchFields.filter(item => {
384
+ return !!item.prop && !!item.label;
385
+ });
386
+ this.tableColumns = tableColumns;
387
+ this.searchFields = searchFields;
388
+
389
+ let tableConfig = {};
390
+ Object.assign(tableConfig, gridConfig, customGridConfig)
391
+ this.tableConfig = tableConfig;
392
+ }
393
+ });
394
+ },
395
+ getCustomParam() {
396
+ let tableConfig = this.tableConfig
397
+ if (!!tableConfig.searchParams) {
398
+ var e = new Function(tableConfig.searchParams);
399
+ return e.call(this);
400
+ }
401
+ }
402
+ }
403
+ }
404
+ </script>
405
+
406
+ <style scoped>
407
+
408
+ </style>
@@ -44,7 +44,7 @@
44
44
  </toolbar-panel>
45
45
  </el-header>
46
46
  <el-main class="form-widget-main">
47
- <el-scrollbar class="container-scroll-bar xform-designer-scroll">
47
+ <el-scrollbar class="container-scroll-bar" style="height:100%">
48
48
  <v-form-widget :designer="designer" :form-config="designer.formConfig" ref="formRef"></v-form-widget>
49
49
  </el-scrollbar>
50
50
  </el-main>
@@ -86,7 +86,7 @@ export default {
86
86
  .el-aside {
87
87
  font-family: inherit !important;
88
88
  }
89
-
89
+ //.xform-designer-scroll{height:100%}
90
90
  .xform-designer-scroll {
91
91
  height: calc(100vh - var(--xform-designer-scroll-offset, 125px));
92
92
  }
@@ -185,10 +185,10 @@ modules = {
185
185
  mounted() {
186
186
  this.initLocale();
187
187
 
188
- this.scrollerHeight = window.innerHeight - 85 + "px";
188
+ this.scrollerHeight = window.innerHeight - 42 + "px";
189
189
  baseRefUtil.addWindowResizeHandler(() => {
190
190
  this.$nextTick(() => {
191
- this.scrollerHeight = window.innerHeight - 85 + "px";
191
+ this.scrollerHeight = window.innerHeight - 42 + "px";
192
192
  });
193
193
  });
194
194
 
@@ -2,7 +2,7 @@
2
2
  <el-container class="panel-container">
3
3
  <el-tabs v-model="activeTab" style="height: 100%; overflow: hidden">
4
4
  <el-tab-pane :label="i18nt('designer.hint.widgetSetting')" name="1">
5
- <el-scrollbar class="setting-scrollbar" :style="{ height: scrollerHeight }">
5
+
6
6
  <template v-if="!!designer.selectedWidget && !designer.selectedWidget.category">
7
7
  <el-form :model="optionModel" size="mini" label-position="left" label-width="120px" class="setting-form" @submit.native.prevent>
8
8
  <el-collapse v-model="widgetActiveCollapseNames" class="setting-collapse">
@@ -103,10 +103,9 @@
103
103
  </el-collapse>
104
104
  </el-form>
105
105
  </template>
106
- </el-scrollbar>
107
106
  </el-tab-pane>
108
107
  <el-tab-pane v-if="!!designer" :label="i18nt('designer.hint.formSetting')" name="2">
109
- <el-scrollbar class="setting-scrollbar" :style="{ height: scrollerHeight }"><form-setting :designer="designer" :form-config="formConfig"></form-setting></el-scrollbar>
108
+ <form-setting :designer="designer" :form-config="formConfig"></form-setting>
110
109
  </el-tab-pane>
111
110
  <!-- <el-tab-pane v-if="!!designer" label="数据源" name="3">
112
111
  <el-scrollbar class="setting-scrollbar" :style="{ height: scrollerHeight }">
@@ -102,23 +102,23 @@ export default {
102
102
  top: 0;
103
103
  }
104
104
 
105
- ::v-deep .tab-boxOnly > .el-tabs__content .el-tab-pane .el-tab-pane {
106
- .detail-wrap .d-cont {
107
- height: calc(100vh - 158px) !important
108
- }
105
+ // ::v-deep .tab-boxOnly > .el-tabs__content .el-tab-pane .el-tab-pane {
106
+ // .detail-wrap .d-cont {
107
+ // height: calc(100vh - 158px) !important
108
+ // }
109
109
 
110
- .grid-height {
111
- height: calc(100vh - 126px) !important
112
- }
113
- }
110
+ // .grid-height {
111
+ // height: calc(100vh - 126px) !important
112
+ // }
113
+ // }
114
114
 
115
- ::v-deep .designer-drawer1.is-fullscreen .tab-boxOnly > .el-tabs__content .el-tab-pane .el-tab-pane {
116
- .detail-wrap .d-cont {
117
- height: calc(100vh - 116px) !important
118
- }
115
+ // ::v-deep .designer-drawer1.is-fullscreen .tab-boxOnly > .el-tabs__content .el-tab-pane .el-tab-pane {
116
+ // .detail-wrap .d-cont {
117
+ // height: calc(100vh - 116px) !important
118
+ // }
119
119
 
120
- .grid-height {
121
- height: calc(100vh - var(--xform-column-grid-offset, 84px)) !important
122
- }
123
- }
120
+ // .grid-height {
121
+ // height: calc(100vh - var(--xform-column-grid-offset, 84px)) !important
122
+ // }
123
+ // }
124
124
  </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <el-scrollbar class="side-scroll-bar" :style="{height: scrollerHeight}">
2
+
3
3
  <div class="panel-container">
4
4
 
5
5
  <el-tabs v-model="firstTab" class="no-bottom-margin indent-left-margin">
@@ -14,7 +14,7 @@
14
14
  <li v-for="(ctn, index) in containers" :key="index" class="container-widget-item"
15
15
  :title="ctn.displayName"
16
16
  @dblclick="addContainerByDbClick(ctn)">
17
- <span><svg-icon :icon-class="ctn.icon" class-name="color-svg-icon"/>
17
+ <span><widget-icon :icon="ctn.icon"/>
18
18
  <span>{{ i18n2t(`designer.widgetLabel.${ctn.type}`, `extension.widgetLabel.${ctn.type}`) }}</span>
19
19
  </span>
20
20
  </li>
@@ -27,8 +27,7 @@
27
27
  :clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
28
28
  <li v-for="(fld, index) in basicFields" :key="index" class="field-widget-item" :title="fld.displayName"
29
29
  @dblclick="addFieldByDbClick(fld)">
30
- <span><svg-icon :icon-class="fld.icon"
31
- class-name="color-svg-icon"/><span>{{
30
+ <span><widget-icon :icon="fld.icon"/><span>{{
32
31
  i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`)
33
32
  }}</span></span>
34
33
  </li>
@@ -42,7 +41,7 @@
42
41
  <li v-for="(fld, index) in advancedFields" :key="index" class="field-widget-item"
43
42
  :title="fld.displayName"
44
43
  @dblclick="addFieldByDbClick(fld)">
45
- <span><svg-icon :icon-class="fld.icon" class-name="color-svg-icon"/>
44
+ <span><widget-icon :icon="fld.icon"/>
46
45
  <span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
47
46
  </span>
48
47
  </li>
@@ -57,7 +56,7 @@
57
56
  <li v-for="(fld, index) in customFields" :key="index" class="field-widget-item" :title="fld.displayName"
58
57
  @dblclick="addFieldByDbClick(fld)">
59
58
  <span>
60
- <svg-icon :icon-class="fld.icon" class-name="color-svg-icon"/>
59
+ <widget-icon :icon="fld.icon"/>
61
60
  <span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
62
61
  </span>
63
62
  </li>
@@ -80,7 +79,7 @@
80
79
  <li v-for="(ctn, index) in commonContainers" :key="index" class="container-widget-item"
81
80
  :title="ctn.displayName"
82
81
  @dblclick="addContainerByDbClick(ctn)">
83
- <span><svg-icon :icon-class="ctn.icon" class-name="color-svg-icon"/>
82
+ <span><widget-icon :icon="ctn.icon"/>
84
83
  <span>{{ i18n2t(`designer.widgetLabel.${ctn.type}`, `extension.widgetLabel.${ctn.type}`) }}</span>
85
84
  </span>
86
85
  </li>
@@ -92,8 +91,7 @@
92
91
  :clone="handleFieldWidgetClone" ghost-class="ghost" :sort="false">
93
92
  <li v-for="(fld, index) in basicFields" :key="index" class="field-widget-item" :title="fld.displayName"
94
93
  @dblclick="addFieldByDbClick(fld)">
95
- <span><svg-icon :icon-class="fld.icon"
96
- class-name="color-svg-icon"/><span>{{
94
+ <span><widget-icon :icon="fld.icon"/><span>{{
97
95
  i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`)
98
96
  }}</span></span>
99
97
  </li>
@@ -106,7 +104,7 @@
106
104
  <li v-for="(fld, index) in commonAdvancedFields" :key="index" class="field-widget-item"
107
105
  :title="fld.displayName"
108
106
  @dblclick="addFieldByDbClick(fld)">
109
- <span><svg-icon :icon-class="fld.icon" class-name="color-svg-icon"/>
107
+ <span><widget-icon :icon="fld.icon"/>
110
108
  <span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
111
109
  </span>
112
110
  </li>
@@ -123,8 +121,7 @@
123
121
  <li v-for="(fld, index) in metaFields.main.fieldList" :key="index" class="field-widget-item"
124
122
  :title="fld.displayName"
125
123
  @dblclick="addFieldByDbClick(fld)">
126
- <span><svg-icon :icon-class="fld.icon"
127
- class-name="color-svg-icon"/><span>{{ getMetaFieldLabel(fld) }}</span></span>
124
+ <span><widget-icon :icon="fld.icon"/><span>{{ getMetaFieldLabel(fld) }}</span></span>
128
125
  </li>
129
126
  </draggable>
130
127
  </el-collapse-item>
@@ -138,7 +135,7 @@
138
135
  <li v-for="(fld, index) in item.fieldList" :key="index" class="field-widget-item"
139
136
  :title="fld.displayName"
140
137
  @dblclick="addFieldByDbClick(fld)">
141
- <span><svg-icon :icon-class="fld.icon" class-name="color-svg-icon"/>
138
+ <span><widget-icon :icon="fld.icon"/>
142
139
  <span>{{ getMetaFieldLabel(fld) }}</span>
143
140
  </span>
144
141
  </li>
@@ -157,7 +154,7 @@
157
154
  <li v-for="(fld, index) in businessFields" :key="index" class="field-widget-item"
158
155
  :title="fld.displayName"
159
156
  @dblclick="addFieldByDbClick(fld)">
160
- <span><svg-icon :icon-class="fld.icon" class-name="color-svg-icon"/>
157
+ <span><widget-icon :icon="fld.icon"/>
161
158
  <span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
162
159
  </span>
163
160
  </li>
@@ -170,7 +167,7 @@
170
167
  <li v-for="(fld, index) in compareFields" :key="index" class="field-widget-item"
171
168
  :title="fld.displayName"
172
169
  @dblclick="addFieldByDbClick(fld)">
173
- <span><svg-icon :icon-class="fld.icon" class-name="color-svg-icon"/>
170
+ <span><widget-icon :icon="fld.icon"/>
174
171
  <span>{{ i18n2t(`designer.widgetLabel.${fld.type}`, `extension.widgetLabel.${fld.type}`) }}</span>
175
172
  </span>
176
173
  </li>
@@ -199,7 +196,7 @@
199
196
  </el-tabs>
200
197
 
201
198
  </div>
202
- </el-scrollbar>
199
+
203
200
  </template>
204
201
 
205
202
  <script>
@@ -212,6 +209,21 @@ export default {
212
209
  mixins: [indexMixin],
213
210
  components: {
214
211
  Draggable,
212
+ /* 面板组件图标:el-icon- 前缀渲染 element 字体图标,否则渲染 svg-icon */
213
+ WidgetIcon: {
214
+ name: "WidgetIcon",
215
+ functional: true,
216
+ props: { icon: String },
217
+ render(h, ctx) {
218
+ const icon = ctx.props.icon || "";
219
+ if (icon.indexOf("el-icon-") === 0) {
220
+ return h("i", { class: [icon, "color-svg-icon", "panel-el-icon"] });
221
+ }
222
+ return h("svg-icon", {
223
+ props: { iconClass: icon, className: "color-svg-icon" },
224
+ });
225
+ },
226
+ },
215
227
  },
216
228
  data() {
217
229
  return {
@@ -289,7 +301,7 @@ export default {
289
301
  display: inline-block;
290
302
  height: 35px;
291
303
  line-height: 35px;
292
- width: 117px;
304
+ width: calc(50% - 7px);
293
305
  float: left;
294
306
  margin: 2px 6px 3px 0;
295
307
  cursor: move;
@@ -310,6 +322,13 @@ export default {
310
322
 
311
323
  }
312
324
 
325
+ i.panel-el-icon {
326
+ display: inline-block;
327
+ font-size: 1.25em;
328
+ vertical-align: middle;
329
+ margin-right: 5px;
330
+ }
331
+
313
332
  span > span {
314
333
  vertical-align: middle;
315
334
  }