ylwl-cpscoms 1.0.0 → 1.1.0

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,379 @@
1
+ import script from './index.vue2.js';
2
+ import './index.vue3.js';
3
+ import normalizeComponent from '../node_modules/vue-runtime-helpers/dist/normalize-component.js';
4
+
5
+ /* script */
6
+ var __vue_script__ = script;
7
+ /* template */
8
+ var __vue_render__ = function __vue_render__() {
9
+ var _vm = this;
10
+ var _h = _vm.$createElement;
11
+ var _c = _vm._self._c || _h;
12
+ return _c("div", {
13
+ staticClass: "dt_table"
14
+ }, [_c("el-form", {
15
+ ref: "formRef",
16
+ attrs: {
17
+ model: _vm.formModel,
18
+ rules: _vm.formRules,
19
+ "validate-on-rule-change": false,
20
+ size: "small"
21
+ }
22
+ }, [_c("el-table", _vm._b({
23
+ ref: "tableRef",
24
+ style: {
25
+ width: _vm.gridOptions.scroll && _vm.gridOptions.scroll.x ? "" + _vm.gridOptions.scroll.x : "100%",
26
+ minWidth: "100%"
27
+ },
28
+ attrs: {
29
+ data: _vm.formModel.tableData,
30
+ size: "small",
31
+ border: "",
32
+ "max-height": _vm.gridOptions.scroll && _vm.gridOptions.scroll.y || 400,
33
+ "min-height": _vm.gridOptions.scroll && _vm.gridOptions.scroll.y || 400
34
+ },
35
+ on: {
36
+ "selection-change": _vm.handleSelectionChange
37
+ }
38
+ }, "el-table", _vm.$attrs, false), [_c("template", {
39
+ slot: "empty"
40
+ }, [_c("el-empty", {
41
+ attrs: {
42
+ description: "暂无数据"
43
+ }
44
+ })], 1), _vm._v(" "), _vm.hasSelectionColumn ? _c("el-table-column", {
45
+ attrs: {
46
+ type: "selection",
47
+ width: "55",
48
+ align: "center"
49
+ }
50
+ }) : _vm._e(), _vm._v(" "), _vm._l(_vm.gridOptions.columns, function (column) {
51
+ return !column.hidden && column.field !== "selection" ? _c("el-table-column", _vm._b({
52
+ key: column.field,
53
+ attrs: {
54
+ label: column.title,
55
+ prop: column.field
56
+ },
57
+ scopedSlots: _vm._u([{
58
+ key: "default",
59
+ fn: function fn(scope) {
60
+ return [column.editor === "custom" && column.render ? [_vm.isVNode(_vm.callRender(column, scope)) ? [_c("vnode-component", {
61
+ attrs: {
62
+ vnode: _vm.callRender(column, scope)
63
+ }
64
+ })] : [_vm._v("\n " + _vm._s(_vm.callRender(column, scope)) + "\n ")]] : [_c("el-form-item", {
65
+ attrs: {
66
+ prop: "tableData." + scope.$index + "." + column.field,
67
+ rules: column.rules
68
+ }
69
+ }, [column.editor === "select" ? _c("el-select", _vm._b({
70
+ attrs: {
71
+ placeholder: column.placeholder || "请选择",
72
+ disabled: _vm.getFieldDisabled(column, scope.row, scope.$index),
73
+ remote: column.remote,
74
+ loading: scope.row[column.field + "Loading"],
75
+ filterable: true
76
+ },
77
+ on: {
78
+ change: function change(value) {
79
+ return _vm.handleSelectChange(column, value, scope.row, scope.$index);
80
+ },
81
+ focus: function focus(event) {
82
+ return _vm.handleFocus(column, event, scope.row);
83
+ },
84
+ blur: function blur(event) {
85
+ return _vm.handleBlur(column, event, scope.row, scope.$index);
86
+ },
87
+ clear: function clear($event) {
88
+ _vm.handleClear(column, scope.row, scope.$index);
89
+ }
90
+ },
91
+ model: {
92
+ value: scope.row[column.field],
93
+ callback: function callback($$v) {
94
+ _vm.$set(scope.row, column.field, $$v);
95
+ },
96
+ expression: "scope.row[column.field]"
97
+ }
98
+ }, "el-select", column.attrs || {}, false), _vm._l(_vm.getOptions(column, scope.row), function (option) {
99
+ return _c("el-option", {
100
+ key: option.value,
101
+ attrs: {
102
+ label: column.labelKey ? option[column.labelKey] : option.label,
103
+ value: column.valueKey ? option[column.valueKey] : option.value
104
+ }
105
+ });
106
+ })) : column.editor === "input" ? _c("el-input", _vm._b({
107
+ attrs: {
108
+ placeholder: column.placeholder || "请输入",
109
+ disabled: _vm.getFieldDisabled(column, scope.row, scope.$index)
110
+ },
111
+ on: {
112
+ change: function change(value) {
113
+ return _vm.handleInputChange(column, value, scope.row, scope.$index);
114
+ },
115
+ focus: function focus(event) {
116
+ return _vm.handleFocus(column, event, scope.row);
117
+ },
118
+ blur: function blur(event) {
119
+ return _vm.handleBlur(column, event, scope.row, scope.$index);
120
+ }
121
+ },
122
+ model: {
123
+ value: scope.row[column.field],
124
+ callback: function callback($$v) {
125
+ _vm.$set(scope.row, column.field, $$v);
126
+ },
127
+ expression: "scope.row[column.field]"
128
+ }
129
+ }, "el-input", column.attrs || {}, false)) : column.editor === "input-number" ? _c("div", {
130
+ staticStyle: {
131
+ display: "flex",
132
+ "justify-content": "space-between",
133
+ "align-items": "center"
134
+ }
135
+ }, [_c("el-input-number", _vm._b({
136
+ staticStyle: {
137
+ width: "100%"
138
+ },
139
+ attrs: {
140
+ placeholder: column.placeholder || "请输入数字",
141
+ disabled: _vm.getFieldDisabled(column, scope.row, scope.$index),
142
+ min: _vm.getMinValue(column, scope.row, scope.$index),
143
+ max: _vm.getMaxValue(column, scope.row, scope.$index),
144
+ step: column.step || 1,
145
+ precision: column.precision,
146
+ "controls-position": column.controlsPosition || ""
147
+ },
148
+ on: {
149
+ change: function change(value) {
150
+ return _vm.handleInputNumberChange(column, value, scope.row, scope.$index);
151
+ },
152
+ focus: function focus(event) {
153
+ return _vm.handleFocus(column, event, scope.row);
154
+ },
155
+ blur: function blur(event) {
156
+ return _vm.handleBlur(column, event, scope.row, scope.$index);
157
+ }
158
+ },
159
+ model: {
160
+ value: scope.row[column.field],
161
+ callback: function callback($$v) {
162
+ _vm.$set(scope.row, column.field, $$v);
163
+ },
164
+ expression: "scope.row[column.field]"
165
+ }
166
+ }, "el-input-number", column.attrs || {}, false)), _vm._v(" "), _c(_vm.getAppendComponent(column, scope), {
167
+ tag: "component"
168
+ })], 1) : column.editor === "switch" ? _c("el-switch", {
169
+ attrs: {
170
+ disabled: _vm.getFieldDisabled(column, scope.row, scope.$index)
171
+ },
172
+ on: {
173
+ change: function change(value) {
174
+ return _vm.handleSwitchChange(column, value, scope.row, scope.$index);
175
+ }
176
+ },
177
+ model: {
178
+ value: scope.row[column.field],
179
+ callback: function callback($$v) {
180
+ _vm.$set(scope.row, column.field, $$v);
181
+ },
182
+ expression: "scope.row[column.field]"
183
+ }
184
+ }) : column.editor === "time" ? _c("el-time-picker", _vm._b({
185
+ attrs: {
186
+ placeholder: column.placeholder || "选择时间",
187
+ disabled: _vm.getFieldDisabled(column, scope.row, scope.$index)
188
+ },
189
+ on: {
190
+ change: function change(value) {
191
+ return _vm.handleTimeChange(column, value, scope.row, scope.$index);
192
+ },
193
+ focus: function focus(event) {
194
+ return _vm.handleFocus(column, event, scope.row);
195
+ },
196
+ blur: function blur(event) {
197
+ return _vm.handleBlur(column, event, scope.row, scope.$index);
198
+ },
199
+ clear: function clear($event) {
200
+ _vm.handleClear(column, scope.row, scope.$index);
201
+ }
202
+ },
203
+ model: {
204
+ value: scope.row[column.field],
205
+ callback: function callback($$v) {
206
+ _vm.$set(scope.row, column.field, $$v);
207
+ },
208
+ expression: "scope.row[column.field]"
209
+ }
210
+ }, "el-time-picker", column.attrs || {}, false)) : column.editor === "date" ? _c("el-date-picker", _vm._b({
211
+ attrs: {
212
+ placeholder: column.placeholder || "选择日期",
213
+ disabled: _vm.getFieldDisabled(column, scope.row, scope.$index)
214
+ },
215
+ on: {
216
+ change: function change(value) {
217
+ return _vm.handleDateChange(column, value, scope.row, scope.$index);
218
+ },
219
+ focus: function focus(event) {
220
+ return _vm.handleFocus(column, event, scope.row);
221
+ },
222
+ blur: function blur(event) {
223
+ return _vm.handleBlur(column, event, scope.row, scope.$index);
224
+ },
225
+ clear: function clear($event) {
226
+ _vm.handleClear(column, scope.row, scope.$index);
227
+ }
228
+ },
229
+ model: {
230
+ value: scope.row[column.field],
231
+ callback: function callback($$v) {
232
+ _vm.$set(scope.row, column.field, $$v);
233
+ },
234
+ expression: "scope.row[column.field]"
235
+ }
236
+ }, "el-date-picker", column.attrs || {}, false)) : column.editor === "datetime" ? _c("el-date-picker", _vm._b({
237
+ attrs: {
238
+ type: "datetime",
239
+ placeholder: column.placeholder || "选择日期时间",
240
+ disabled: _vm.getFieldDisabled(column, scope.row, scope.$index)
241
+ },
242
+ on: {
243
+ change: function change(value) {
244
+ return _vm.handleDateTimeChange(column, value, scope.row, scope.$index);
245
+ },
246
+ focus: function focus(event) {
247
+ return _vm.handleFocus(column, event, scope.row);
248
+ },
249
+ blur: function blur(event) {
250
+ return _vm.handleBlur(column, event, scope.row, scope.$index);
251
+ },
252
+ clear: function clear($event) {
253
+ _vm.handleClear(column, scope.row, scope.$index);
254
+ }
255
+ },
256
+ model: {
257
+ value: scope.row[column.field],
258
+ callback: function callback($$v) {
259
+ _vm.$set(scope.row, column.field, $$v);
260
+ },
261
+ expression: "scope.row[column.field]"
262
+ }
263
+ }, "el-date-picker", column.attrs || {}, false)) : column.editor === "daterange" ? _c("el-date-picker", _vm._b({
264
+ attrs: {
265
+ type: "daterange",
266
+ "range-separator": "至",
267
+ "start-placeholder": "开始日期",
268
+ "end-placeholder": "结束日期",
269
+ placeholder: column.placeholder || "选择日期范围",
270
+ disabled: _vm.getFieldDisabled(column, scope.row, scope.$index),
271
+ "value-format": "yyyy-MM-dd"
272
+ },
273
+ on: {
274
+ change: function change(value) {
275
+ return _vm.handleDateRangeChange(column, value, scope.row, scope.$index);
276
+ },
277
+ focus: function focus(event) {
278
+ return _vm.handleFocus(column, event, scope.row);
279
+ },
280
+ blur: function blur(event) {
281
+ return _vm.handleBlur(column, event, scope.row, scope.$index);
282
+ },
283
+ clear: function clear($event) {
284
+ _vm.handleClear(column, scope.row, scope.$index);
285
+ }
286
+ },
287
+ model: {
288
+ value: scope.row[column.field],
289
+ callback: function callback($$v) {
290
+ _vm.$set(scope.row, column.field, $$v);
291
+ },
292
+ expression: "scope.row[column.field]"
293
+ }
294
+ }, "el-date-picker", column.attrs || {}, false)) : _c("span", [_vm._v("\n " + _vm._s(scope.row[column.field] ? scope.row[column.field] : "-") + "\n ")])], 1)]];
295
+ }
296
+ }])
297
+ }, "el-table-column", column.attrs || {}, false), [_c("template", {
298
+ slot: "header"
299
+ }, [_c("span", {
300
+ staticClass: "dt_table_header"
301
+ }, [column.rules ? _c("span", {
302
+ staticClass: "dt_required_dot"
303
+ }, [_vm._v("*")]) : _vm._e(), _vm._v("\n " + _vm._s(column.title) + "\n ")])])], 2) : _vm._e();
304
+ }), _vm._v(" "), _vm.gridOptions.actions && _vm.gridOptions.actions.length > 0 ? _c("el-table-column", {
305
+ attrs: {
306
+ label: "操作",
307
+ width: _vm.gridOptions.actionWidth || "100px",
308
+ align: _vm.gridOptions.actionAlign || "left",
309
+ fixed: _vm.gridOptions.actionFixed
310
+ },
311
+ scopedSlots: _vm._u([{
312
+ key: "default",
313
+ fn: function fn(scope) {
314
+ return [_c("div", {
315
+ staticClass: "action-buttons"
316
+ }, _vm._l(_vm.gridOptions.actions, function (button) {
317
+ return _vm.getButtonShow(button, scope.row, scope.$index) ? _c("el-button", {
318
+ key: button.text,
319
+ staticStyle: {
320
+ margin: "0 5px"
321
+ },
322
+ style: button.style,
323
+ attrs: {
324
+ type: button.type || "primary",
325
+ size: "small",
326
+ disabled: _vm.getButtonDisabled(button, scope.row),
327
+ icon: button.icon
328
+ },
329
+ on: {
330
+ click: function click(e) {
331
+ return _vm.handleActionClick(button, scope.row, scope.$index, e);
332
+ }
333
+ }
334
+ }, [_vm._v("\n " + _vm._s(button.text) + "\n ")]) : _c("span", [_vm._v("-")]);
335
+ }))];
336
+ }
337
+ }])
338
+ }) : _vm._e()], 2)], 1), _vm._v(" "), _vm.apiFunction ? _c("el-pagination", {
339
+ attrs: {
340
+ "current-page": _vm.localPagination.currentPage,
341
+ "page-size": _vm.localPagination.pageSize,
342
+ total: _vm.localPagination.total,
343
+ "page-sizes": _vm.localPagination.pageSizes,
344
+ layout: _vm.localPagination.layout,
345
+ background: _vm.localPagination.background,
346
+ small: _vm.localPagination.small,
347
+ disabled: _vm.localPagination.disabled,
348
+ "hide-on-single-page": _vm.localPagination.hideOnSinglePage
349
+ },
350
+ on: {
351
+ "current-change": _vm.handleCurrentChange,
352
+ "size-change": _vm.handleSizeChange
353
+ }
354
+ }) : _vm._e()], 1);
355
+ };
356
+ var __vue_staticRenderFns__ = [];
357
+ __vue_render__._withStripped = true;
358
+
359
+ /* style */
360
+ var __vue_inject_styles__ = undefined;
361
+ /* scoped */
362
+ var __vue_scope_id__ = "data-v-2447cdc6";
363
+ /* module identifier */
364
+ var __vue_module_identifier__ = undefined;
365
+ /* functional template */
366
+ var __vue_is_functional_template__ = false;
367
+ /* style inject */
368
+
369
+ /* style inject SSR */
370
+
371
+ /* style inject shadow dom */
372
+
373
+ var __vue_component__ = /*#__PURE__*/normalizeComponent({
374
+ render: __vue_render__,
375
+ staticRenderFns: __vue_staticRenderFns__
376
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
377
+ var DtTable = __vue_component__;
378
+
379
+ export { DtTable as default };