cloud-web-corejs 1.0.141 → 1.0.143

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.
@@ -1,109 +1,28 @@
1
1
  <template>
2
- <vxe-grid :ref="widget.id" v-bind="vxeOption" :auto-resize="true" v-show="!widget.options.hidden"
3
- @resizable-change="$vxeTableUtil.onColumnWitchChange" @custom="$vxeTableUtil.customHandle"
4
- @checkbox-change="handleCheckboxChange" @checkbox-all="handleCheckboxAll"
5
- @cell-dblclick="handleCellDblclick" :class="dataTableConfig.class"
6
- :data="fieldModel"
2
+ <vxe-grid
3
+ :ref="widget.id"
4
+ v-bind="vxeOption"
5
+ :auto-resize="true"
6
+ v-show="!widget.options.hidden"
7
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
8
+ @custom="$vxeTableUtil.customHandle"
9
+ @checkbox-change="handleCheckboxChange"
10
+ @checkbox-all="handleCheckboxAll"
11
+ @cell-dblclick="handleCellDblclick"
12
+ :class="dataTableConfig.class"
13
+ :data="fieldModel"
14
+ v-on="eventConfig"
7
15
  >
8
16
  <template #form>
9
- <!-- <div v-if="widget.options.showSearchArea" class="clearfix screen-btns">
10
- <div class="fl">
11
- &lt;!&ndash; <vxe-button status="primary" class="button-sty" icon="el-icon-upload2"
12
- @click="$excelExport({ title: '导出', targetRef: 'grid' + widget.id })"
13
- v-if="widget.options.showExportBtn!==false">导出
14
- </vxe-button>&ndash;&gt;
15
-
16
- <template v-if="!!widget.buttons && widget.buttons.length > 0">
17
- <template v-for="(subWidget, swIdx) in widget.buttons">
18
- <template v-if="'container' === subWidget.category">
19
- <component
20
- :is="subWidget.type + '-item'"
21
- :widget="subWidget"
22
- :key="swIdx"
23
- :parent-list="widget.buttons"
24
- :index-of-parent-list="swIdx"
25
- :parent-widget="widget"
26
- >
27
- &lt;!&ndash; 递归传递插槽!!! &ndash;&gt;
28
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
29
- <slot :name="slot" v-bind="scope"/>
30
- </template>
31
- </component>
32
- </template>
33
- <template v-else>
34
- <component
35
- :is="subWidget.type + '-widget'"
36
- :field="subWidget"
37
- :designer="null"
38
- :key="swIdx"
39
- :parent-list="widget.buttons"
40
- :index-of-parent-list="swIdx"
41
- :parent-widget="widget"
42
- >
43
- &lt;!&ndash; 递归传递插槽!!! &ndash;&gt;
44
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
45
- <slot :name="slot" v-bind="scope"/>
46
- </template>
47
- </component>
48
- </template>
49
- </template>
50
- </template>
51
-
52
- </div>
53
- <div class="fr">
54
- &lt;!&ndash; <vxe-button icon="el-icon-view" class="button-sty" @click="searchEvent">显示总记录数</vxe-button> &ndash;&gt;
55
- <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
56
- plain>重置
57
- </vxe-button>
58
-
59
- <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索
60
- </vxe-button>
61
- </div>
62
- </div>
63
- <div v-if="widget.options.showSearchArea && widget.widgetList.length != 0" ref="searchForm"
64
- class="screen-box vxe-form" title-width="92px" title-align="right">
65
- <template v-if="!!widget.widgetList && widget.widgetList.length > 0">
66
- <template v-for="(subWidget, swIdx) in widget.widgetList">
67
- <template v-if="'container' === subWidget.category">
68
- <component
69
- :is="subWidget.type + '-item'"
70
- :widget="subWidget"
71
- :key="swIdx"
72
- :parent-list="widget.widgetList"
73
- :index-of-parent-list="swIdx"
74
- :parent-widget="widget"
75
- formItemType="vxe-form-item"
76
- >
77
- &lt;!&ndash; 递归传递插槽!!! &ndash;&gt;
78
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
79
- <slot :name="slot" v-bind="scope"/>
80
- </template>
81
- </component>
82
- </template>
83
- <template v-else>
84
- <component
85
- :is="subWidget.type + '-widget'"
86
- :field="subWidget"
87
- :designer="null"
88
- :key="swIdx"
89
- :parent-list="widget.widgetList"
90
- :index-of-parent-list="swIdx"
91
- :parent-widget="widget"
92
- formItemType="vxe-form-item"
93
- >
94
- &lt;!&ndash; 递归传递插槽!!! &ndash;&gt;
95
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
96
- <slot :name="slot" v-bind="scope"/>
97
- </template>
98
- </component>
99
- </template>
100
- </template>
101
- </template>
102
- </div>-->
103
-
104
- <tableForm v-if="widget.options.isQueryTable" :formData.sync="formModel" :xform="true"
105
- @searchEvent="searchEvent" @resetEvent="resetEvent" @advancedClear="advancedClear"
106
- @settingConfirm="tableFormSettingConfirm">
17
+ <tableForm
18
+ v-if="widget.options.isQueryTable"
19
+ :formData.sync="formModel"
20
+ :xform="true"
21
+ @searchEvent="searchEvent"
22
+ @resetEvent="resetEvent"
23
+ @advancedClear="advancedClear"
24
+ @settingConfirm="tableFormSettingConfirm"
25
+ >
107
26
  <template #buttonLeft>
108
27
  <template v-if="!!widget.buttons && widget.buttons.length > 0">
109
28
  <template v-for="(subWidget, swIdx) in widget.buttons">
@@ -117,8 +36,11 @@
117
36
  :parent-widget="widget"
118
37
  >
119
38
  <!-- 递归传递插槽!!! -->
120
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
121
- <slot :name="slot" v-bind="scope"/>
39
+ <template
40
+ v-for="slot in Object.keys($scopedSlots)"
41
+ v-slot:[slot]="scope"
42
+ >
43
+ <slot :name="slot" v-bind="scope" />
122
44
  </template>
123
45
  </component>
124
46
  </template>
@@ -133,8 +55,11 @@
133
55
  :parent-widget="widget"
134
56
  >
135
57
  <!-- 递归传递插槽!!! -->
136
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
137
- <slot :name="slot" v-bind="scope"/>
58
+ <template
59
+ v-for="slot in Object.keys($scopedSlots)"
60
+ v-slot:[slot]="scope"
61
+ >
62
+ <slot :name="slot" v-bind="scope" />
138
63
  </template>
139
64
  </component>
140
65
  </template>
@@ -142,15 +67,29 @@
142
67
  </template>
143
68
  </template>
144
69
  <template #buttonRight>
145
- <vxe-button icon="el-icon-brush" class="button-sty" @click="handleResetClick" type="text" status="primary"
146
- plain>{{ $t2('重置') }}
70
+ <vxe-button
71
+ icon="el-icon-brush"
72
+ class="button-sty"
73
+ @click="handleResetClick"
74
+ type="text"
75
+ status="primary"
76
+ plain
77
+ >{{ $t2("重置") }}
147
78
  </vxe-button>
148
- <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="handleSearchClick">
149
- {{ $t2('搜索') }}
79
+ <vxe-button
80
+ status="warning"
81
+ icon="el-icon-search"
82
+ class="button-sty"
83
+ @click="handleSearchClick"
84
+ >
85
+ {{ $t2("搜索") }}
150
86
  </vxe-button>
151
87
  </template>
152
88
 
153
- <template v-for="(subWidget, swIdx) in widget.widgetList" v-slot:[subWidget.options.name]>
89
+ <template
90
+ v-for="(subWidget, swIdx) in widget.widgetList"
91
+ v-slot:[subWidget.options.name]
92
+ >
154
93
  <component
155
94
  v-if="'container' !== subWidget.category"
156
95
  :key="swIdx"
@@ -162,12 +101,12 @@
162
101
  >
163
102
  <!-- 递归传递插槽!!! -->
164
103
  <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
165
- <slot :name="slot" v-bind="scope"/>
104
+ <slot :name="slot" v-bind="scope" />
166
105
  </template>
167
106
  </component>
168
107
  </template>
169
108
 
170
- <template #searchWidget="{searchColumn}">
109
+ <template #searchWidget="{ searchColumn }">
171
110
  <component
172
111
  :is="searchColumn.widget.type + '-widget'"
173
112
  :field="searchColumn.widget"
@@ -178,45 +117,41 @@
178
117
  >
179
118
  <!-- 递归传递插槽!!! -->
180
119
  <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
181
- <slot :name="slot" v-bind="scope"/>
120
+ <slot :name="slot" v-bind="scope" />
182
121
  </template>
183
122
  </component>
184
123
  </template>
185
-
186
124
  </tableForm>
187
- <treeMoveDialog v-if="showTreeMoveDialog" :visiable.sync="showTreeMoveDialog" :rows.sync="sortRows"
188
- :parent-target="_self" @confirm="confirmTreeMoveDialog"></treeMoveDialog>
125
+ <treeMoveDialog
126
+ v-if="showTreeMoveDialog"
127
+ :visiable.sync="showTreeMoveDialog"
128
+ :rows.sync="sortRows"
129
+ :parent-target="_self"
130
+ @confirm="confirmTreeMoveDialog"
131
+ ></treeMoveDialog>
189
132
  </template>
190
- <!-- <template v-for="fieldWidget in widgets" v-slot:[fieldWidget.id]="obj">
191
- <component
192
- :is="getColumnWidgetName(fieldWidget)"
193
- :field="fieldWidget"
194
- :form-model="globalModel.formModel"
195
- :designer="null"
196
- :key="fieldWidget.id+'-'+obj.rowIndex"
197
- :parent-widget="widget"
198
- :columnConfig="obj.column.params.columnConfig"
199
- :subFormRowIndex="obj.rowIndex"
200
- :formItemProp="getColumnProp(widget,obj)"
201
- :tableParam="obj"
202
- >
203
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
204
- <slot :name="slot" v-bind="scope"/>
205
- </template>
206
- </component>
207
- </template>-->
208
133
  <template #widget="obj">
209
134
  <template v-if="!!getTableColumnWidget(obj)">
210
135
  <template v-if="obj.column.params.widget.type == 'status'">
211
- <template v-for="(item,index) in getTableColumnWidget(obj).options.statusParam">
212
- <template v-if="isShowColumnStatusWidget(obj,item)">
136
+ <template
137
+ v-for="(item, index) in getTableColumnWidget(obj).options.statusParam"
138
+ >
139
+ <template v-if="isShowColumnStatusWidget(obj, item)">
213
140
  <span
214
- v-if="getTableColumnWidget(obj).options.formScriptEnabled || getTableColumnWidget(obj).options.commonAttributeEnabled"
215
- :key="getTableColumnWidget(obj).id+'-'+index">{{ getI18nLabel(item[getTableColumnStatusWidgetLabelKey(obj)]) }}</span>
141
+ v-if="
142
+ getTableColumnWidget(obj).options.formScriptEnabled ||
143
+ getTableColumnWidget(obj).options.commonAttributeEnabled
144
+ "
145
+ :key="getTableColumnWidget(obj).id + '-' + index"
146
+ >{{ getI18nLabel(item[getTableColumnStatusWidgetLabelKey(obj)]) }}</span
147
+ >
216
148
  <span
217
- v-else
218
- :key="getTableColumnWidget(obj).id+'-'+index" class="list-tag"
219
- :class="item.type">{{ getI18nLabel(item[getTableColumnStatusWidgetLabelKey(obj)]) }}</span>
149
+ v-else
150
+ :key="getTableColumnWidget(obj).id + '-' + index"
151
+ class="list-tag"
152
+ :class="item.type"
153
+ >{{ getI18nLabel(item[getTableColumnStatusWidgetLabelKey(obj)]) }}</span
154
+ >
220
155
  </template>
221
156
  </template>
222
157
  </template>
@@ -230,27 +165,26 @@
230
165
  :parent-widget="widget"
231
166
  :columnConfig="obj.column.params.columnConfig"
232
167
  :subFormRowIndex="obj.rowIndex"
233
- :formItemProp="getColumnProp(widget,obj)"
168
+ :formItemProp="getColumnProp(obj)"
234
169
  :subFormRowId="obj.row._X_ROW_KEY"
235
170
  :tableParam="obj"
236
171
  >
237
172
  <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
238
- <slot :name="slot" v-bind="scope"/>
173
+ <slot :name="slot" v-bind="scope" />
239
174
  </template>
240
175
  </component>
241
176
  </template>
242
-
243
177
  </template>
244
178
  <template #widgetList="obj">
245
179
  <div>
246
- <template v-for="(fieldWidget,index) in obj.column.params.widgetList">
180
+ <template v-for="(fieldWidget, index) in obj.column.params.widgetList">
247
181
  <component
248
182
  v-if="!!fieldSchemaMap[obj.row._X_ROW_KEY] && !!obj.row._X_ROW_KEY"
249
183
  :is="getColumnWidgetName(fieldWidget)"
250
- v-bind="getRowWidgetOption(obj,fieldWidget)"
184
+ v-bind="getRowWidgetOption(obj, fieldWidget)"
251
185
  :form-model="globalModel.formModel"
252
186
  :designer="null"
253
- :key="getRowWidgetKey(obj,fieldWidget)"
187
+ :key="getRowWidgetKey(obj, fieldWidget)"
254
188
  :parent-widget="widget"
255
189
  :columnConfig="obj.column.params.columnConfig"
256
190
  :subFormRowIndex="obj.rowIndex"
@@ -259,11 +193,10 @@
259
193
  :tableParam="obj"
260
194
  >
261
195
  <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
262
- <slot :name="slot" v-bind="scope" :tableParam="obj"/>
196
+ <slot :name="slot" v-bind="scope" :tableParam="obj" />
263
197
  </template>
264
198
  </component>
265
199
  </template>
266
-
267
200
  </div>
268
201
  </template>
269
202
  <template #editWidget="obj">
@@ -278,11 +211,11 @@
278
211
  :columnConfig="obj.column.params.columnConfig"
279
212
  :subFormRowIndex="obj.rowIndex"
280
213
  :subFormRowId="obj.row._X_ROW_KEY"
281
- :formItemProp="getColumnProp(widget, obj,true)"
214
+ :formItemProp="getColumnProp(obj, true)"
282
215
  :tableParam="obj"
283
216
  >
284
217
  <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
285
- <slot :name="slot" v-bind="scope"/>
218
+ <slot :name="slot" v-bind="scope" />
286
219
  </template>
287
220
  </component>
288
221
  </template>
@@ -290,70 +223,85 @@
290
223
  <div class="cell-operate">
291
224
  <template v-if="getGridTable().isActiveByRow(obj.row)">
292
225
  <a @click="saveEditRow(obj)" class="a-link" data-tit="保存">
293
- <el-tooltip :enterable="false" effect="dark" content="保存" placement="top"
294
- popper-class="tooltip-skin"><i class="el-icon-circle-check"></i></el-tooltip>
226
+ <el-tooltip
227
+ :enterable="false"
228
+ effect="dark"
229
+ content="保存"
230
+ placement="top"
231
+ popper-class="tooltip-skin"
232
+ ><i class="el-icon-circle-check"></i
233
+ ></el-tooltip>
295
234
  </a>
296
- <a @click="cancleRowEvent(obj)" class="a-link" data-tit="取消行编辑" v-if="hasSaveRow(obj.row)">
297
- <el-tooltip :enterable="false" effect="dark" content="取消行编辑" placement="top"
298
- popper-class="tooltip-skin"><i class="el-icon-circle-close"></i></el-tooltip>
235
+ <a
236
+ @click="cancleRowEvent(obj)"
237
+ class="a-link"
238
+ data-tit="取消行编辑"
239
+ v-if="hasSaveRow(obj.row)"
240
+ >
241
+ <el-tooltip
242
+ :enterable="false"
243
+ effect="dark"
244
+ content="取消行编辑"
245
+ placement="top"
246
+ popper-class="tooltip-skin"
247
+ ><i class="el-icon-circle-close"></i
248
+ ></el-tooltip>
299
249
  </a>
300
- <a @click="removeEditRow(obj)" class="a-link" data-tit="删除" v-if="!hasSaveRow(obj.row)">
301
- <el-tooltip :enterable="false" effect="dark" content="删除" placement="top"
302
- popper-class="tooltip-skin"><i class="el-icon-delete"></i></el-tooltip>
250
+ <a
251
+ @click="removeEditRow(obj)"
252
+ class="a-link"
253
+ data-tit="删除"
254
+ v-if="!hasSaveRow(obj.row)"
255
+ >
256
+ <el-tooltip
257
+ :enterable="false"
258
+ effect="dark"
259
+ content="删除"
260
+ placement="top"
261
+ popper-class="tooltip-skin"
262
+ ><i class="el-icon-delete"></i
263
+ ></el-tooltip>
303
264
  </a>
304
265
  </template>
305
266
  <template v-else>
306
- <a class="a-link" data-tit="新增" @click="addEditRow(null,obj)">
307
- <el-tooltip :enterable="false" effect="dark" content="新增" placement="top"
308
- popper-class="tooltip-skin"><i class="el-icon-circle-plus-outline"></i></el-tooltip>
267
+ <a class="a-link" data-tit="新增" @click="addEditRow(null, obj)">
268
+ <el-tooltip
269
+ :enterable="false"
270
+ effect="dark"
271
+ content="新增"
272
+ placement="top"
273
+ popper-class="tooltip-skin"
274
+ ><i class="el-icon-circle-plus-outline"></i
275
+ ></el-tooltip>
309
276
  </a>
310
277
  <a @click="editRowEvent(obj)" class="a-link" data-tit="行编辑">
311
- <el-tooltip :enterable="false" effect="dark" content="行编辑" placement="top"
312
- popper-class="tooltip-skin"><i class="el-icon-edit-outline"></i></el-tooltip>
278
+ <el-tooltip
279
+ :enterable="false"
280
+ effect="dark"
281
+ content="行编辑"
282
+ placement="top"
283
+ popper-class="tooltip-skin"
284
+ ><i class="el-icon-edit-outline"></i
285
+ ></el-tooltip>
313
286
  </a>
314
287
  </template>
315
288
  </div>
316
289
  </template>
317
- <!-- <template #editDelete="obj">
318
- <a
319
- href="javascript:void(0);"
320
- class="a-link"
321
- @click="deleteRow(obj.row,obj.rowIndex)"
322
- :key="obj.rowIndex+'-editDelete'"
323
- v-show="!hasWf"
324
- >
325
- <el-tooltip :enterable="false" effect="dark" content="删除" placement="top" popper-class="tooltip-skin">
326
- <i class="el-icon-delete"/>
327
- </el-tooltip>
328
- </a>
329
- </template>
330
- <template #editButton="obj">
331
- <a
332
- href="javascript:void(0);"
333
- class="a-link"
334
- @click="openEditDialog(obj.row)"
335
- >
336
- <el-tooltip :enterable="false" effect="dark" content="查看" placement="top" popper-class="tooltip-skin">
337
- <i class="el-icon-edit"/>
338
- </el-tooltip>
339
- </a>
340
- </template>-->
341
290
  </vxe-grid>
342
291
  </template>
343
292
 
344
293
  <script>
345
- import FieldComponents from '../../../../components/xform/form-designer/form-widget/field-widget/index';
346
- import dataTableMixin from './data-table-mixin.js';
294
+ import FieldComponents from "../../../../components/xform/form-designer/form-widget/field-widget/index";
295
+ import dataTableMixin from "./data-table-mixin.js";
347
296
  import tableForm from "../../../../components/table/tableForm.vue";
348
297
  import treeMoveDialog from "../../../../components/xform/form-designer/form-widget/dialog/treeMoveDialog.vue";
349
298
 
350
-
351
299
  export default {
352
- name: 'DataTableItem',
300
+ name: "DataTableItem",
353
301
  components: {
354
302
  tableForm,
355
303
  treeMoveDialog,
356
- ...FieldComponents
304
+ ...FieldComponents,
357
305
  },
358
306
  mixins: [dataTableMixin],
359
307
  computed: {
@@ -364,7 +312,7 @@ export default {
364
312
  }
365
313
  return '';
366
314
  }*/
367
- }
315
+ },
368
316
  };
369
317
  </script>
370
318