ol-base-components 3.5.6 → 3.6.1
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.
- package/dist/index.mjs +2786 -302
- package/dist/index.umd.js +25 -25
- package/dist/style.css +1 -1
- package/package.json +1 -9
package/dist/index.mjs
CHANGED
|
@@ -20,7 +20,7 @@ function _mergeNamespaces(n2, m2) {
|
|
|
20
20
|
return Object.freeze(Object.defineProperty(n2, Symbol.toStringTag, { value: "Module" }));
|
|
21
21
|
}
|
|
22
22
|
const nodata = "data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMtaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjMxQzQ5OUFEMERGODExRTdBMjA1RTJCN0NBQ0NGMDI0IiB4bXBNTTpJbnN0YW5jZ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6n/DGrkdGRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVPqazgh6lIPAjHA++Bo63yz8vatpt1+269dhOeoVrkE+WRw+iXamR05FICAgUbVz1oelTnh8YxgcYRbW5dclSp8jCpQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQMOiupVhkHmIGYCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgf/9k=";
|
|
23
|
-
var render$
|
|
23
|
+
var render$f = function() {
|
|
24
24
|
var _vm = this;
|
|
25
25
|
var _h = _vm.$createElement;
|
|
26
26
|
var _c = _vm._self._c || _h;
|
|
@@ -108,7 +108,7 @@ var render$c = function() {
|
|
|
108
108
|
}
|
|
109
109
|
})]);
|
|
110
110
|
};
|
|
111
|
-
var staticRenderFns$
|
|
111
|
+
var staticRenderFns$f = [];
|
|
112
112
|
const printTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
113
113
|
function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
114
114
|
var options2 = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
@@ -166,7 +166,7 @@ function normalizeComponent(scriptExports, render2, staticRenderFns2, functional
|
|
|
166
166
|
options: options2
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
-
const __vue2_script$
|
|
169
|
+
const __vue2_script$f = {
|
|
170
170
|
props: {
|
|
171
171
|
printListObj: Object
|
|
172
172
|
//打印参数
|
|
@@ -247,26 +247,26 @@ const __vue2_script$c = {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
-
const __cssModules$
|
|
251
|
-
var __component__$
|
|
252
|
-
__vue2_script$
|
|
253
|
-
render$
|
|
254
|
-
staticRenderFns$
|
|
250
|
+
const __cssModules$f = {};
|
|
251
|
+
var __component__$f = /* @__PURE__ */ normalizeComponent(
|
|
252
|
+
__vue2_script$f,
|
|
253
|
+
render$f,
|
|
254
|
+
staticRenderFns$f,
|
|
255
255
|
false,
|
|
256
|
-
__vue2_injectStyles$
|
|
256
|
+
__vue2_injectStyles$f,
|
|
257
257
|
"1c21c016",
|
|
258
258
|
null,
|
|
259
259
|
null
|
|
260
260
|
);
|
|
261
|
-
function __vue2_injectStyles$
|
|
262
|
-
for (let o2 in __cssModules$
|
|
263
|
-
this[o2] = __cssModules$
|
|
261
|
+
function __vue2_injectStyles$f(context) {
|
|
262
|
+
for (let o2 in __cssModules$f) {
|
|
263
|
+
this[o2] = __cssModules$f[o2];
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
const
|
|
267
|
-
return __component__$
|
|
266
|
+
const PrintTemplate = /* @__PURE__ */ function() {
|
|
267
|
+
return __component__$f.exports;
|
|
268
268
|
}();
|
|
269
|
-
var render$
|
|
269
|
+
var render$e = function() {
|
|
270
270
|
var _vm = this;
|
|
271
271
|
var _h = _vm.$createElement;
|
|
272
272
|
var _c = _vm._self._c || _h;
|
|
@@ -307,7 +307,9 @@ var render$b = function() {
|
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
}) : _vm.column.renderSlot ? _vm._t(_vm.column.prop, null, {
|
|
310
|
-
"row": scope.row
|
|
310
|
+
"row": scope.row,
|
|
311
|
+
"$index": scope.$index,
|
|
312
|
+
"column": _vm.column
|
|
311
313
|
}) : _c("span", [_vm._v(_vm._s(scope.row[_vm.column.prop]))])];
|
|
312
314
|
}
|
|
313
315
|
} : null], null, true)
|
|
@@ -333,8 +335,8 @@ var render$b = function() {
|
|
|
333
335
|
});
|
|
334
336
|
}) : _vm._e()], 2) : _vm._e();
|
|
335
337
|
};
|
|
336
|
-
var staticRenderFns$
|
|
337
|
-
const __vue2_script$
|
|
338
|
+
var staticRenderFns$e = [];
|
|
339
|
+
const __vue2_script$e = {
|
|
338
340
|
name: "TableColumn",
|
|
339
341
|
components: {
|
|
340
342
|
renderDom: {
|
|
@@ -365,27 +367,27 @@ const __vue2_script$b = {
|
|
|
365
367
|
}
|
|
366
368
|
}
|
|
367
369
|
};
|
|
368
|
-
const __cssModules$
|
|
369
|
-
var __component__$
|
|
370
|
-
__vue2_script$
|
|
371
|
-
render$
|
|
372
|
-
staticRenderFns$
|
|
370
|
+
const __cssModules$e = {};
|
|
371
|
+
var __component__$e = /* @__PURE__ */ normalizeComponent(
|
|
372
|
+
__vue2_script$e,
|
|
373
|
+
render$e,
|
|
374
|
+
staticRenderFns$e,
|
|
373
375
|
false,
|
|
374
|
-
__vue2_injectStyles$
|
|
376
|
+
__vue2_injectStyles$e,
|
|
375
377
|
null,
|
|
376
378
|
null,
|
|
377
379
|
null
|
|
378
380
|
);
|
|
379
|
-
function __vue2_injectStyles$
|
|
380
|
-
for (let o2 in __cssModules$
|
|
381
|
-
this[o2] = __cssModules$
|
|
381
|
+
function __vue2_injectStyles$e(context) {
|
|
382
|
+
for (let o2 in __cssModules$e) {
|
|
383
|
+
this[o2] = __cssModules$e[o2];
|
|
382
384
|
}
|
|
383
385
|
}
|
|
384
386
|
const TableColumn = /* @__PURE__ */ function() {
|
|
385
|
-
return __component__$
|
|
387
|
+
return __component__$e.exports;
|
|
386
388
|
}();
|
|
387
389
|
const __$_require_772a838c__ = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNzc1NzgzOTUxNTIzIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQ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uNTg4MzY3aDQ1MS4yOTMwNjVhMzUuNzk0MTgzIDM1Ljc5NDE4MyAwIDAgMSAwIDcxLjU4ODM2N3pNNzI2LjE5MjM5NCA2ODQuMDk4NDM0SDQ3MC40Nzg3NDdhMzUuNzk0MTgzIDM1Ljc5NDE4MyAwIDEgMSAwLTcxLjU4ODM2N2gyNTcuNzE4MTIxYTM1Ljc5NDE4MyAzNS43OTQxODMgMCAwIDEgMCA3MS41ODgzNjd6TTcyNi4xOTIzOTQgODUyLjE4NzkxOUg0NzAuNDc4NzQ3YTM1Ljc5NDE4MyAzNS43OTQxODMgMCAwIDEgMC03MS41ODgzNjZoMjU3LjcxODEyMWEzNS43OTQxODMgMzUuNzk0MTgzIDAgMCAxIDAgNzEuNTg4MzY2eiIgZmlsbD0iIzU0NTQ1NCIgcC1pZD0iNDkzNSI+PC9wYXRoPjwvc3ZnPg==";
|
|
388
|
-
var render$
|
|
390
|
+
var render$d = function() {
|
|
389
391
|
var _vm = this;
|
|
390
392
|
var _h = _vm.$createElement;
|
|
391
393
|
var _c = _vm._self._c || _h;
|
|
@@ -421,9 +423,9 @@ var render$a = function() {
|
|
|
421
423
|
}, [_vm._v(" " + _vm._s(item.templeteName || "-") + " ")]);
|
|
422
424
|
}), 1)], 1);
|
|
423
425
|
};
|
|
424
|
-
var staticRenderFns$
|
|
426
|
+
var staticRenderFns$d = [];
|
|
425
427
|
const PrintTemplateSelector_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
426
|
-
const __vue2_script$
|
|
428
|
+
const __vue2_script$d = {
|
|
427
429
|
name: "dropdown-print",
|
|
428
430
|
props: {
|
|
429
431
|
menuId: {
|
|
@@ -595,24 +597,24 @@ const __vue2_script$a = {
|
|
|
595
597
|
}
|
|
596
598
|
}
|
|
597
599
|
};
|
|
598
|
-
const __cssModules$
|
|
599
|
-
var __component__$
|
|
600
|
-
__vue2_script$
|
|
601
|
-
render$
|
|
602
|
-
staticRenderFns$
|
|
600
|
+
const __cssModules$d = {};
|
|
601
|
+
var __component__$d = /* @__PURE__ */ normalizeComponent(
|
|
602
|
+
__vue2_script$d,
|
|
603
|
+
render$d,
|
|
604
|
+
staticRenderFns$d,
|
|
603
605
|
false,
|
|
604
|
-
__vue2_injectStyles$
|
|
606
|
+
__vue2_injectStyles$d,
|
|
605
607
|
"2de53864",
|
|
606
608
|
null,
|
|
607
609
|
null
|
|
608
610
|
);
|
|
609
|
-
function __vue2_injectStyles$
|
|
610
|
-
for (let o2 in __cssModules$
|
|
611
|
-
this[o2] = __cssModules$
|
|
611
|
+
function __vue2_injectStyles$d(context) {
|
|
612
|
+
for (let o2 in __cssModules$d) {
|
|
613
|
+
this[o2] = __cssModules$d[o2];
|
|
612
614
|
}
|
|
613
615
|
}
|
|
614
616
|
const OlDropdownPrint = /* @__PURE__ */ function() {
|
|
615
|
-
return __component__$
|
|
617
|
+
return __component__$d.exports;
|
|
616
618
|
}();
|
|
617
619
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
618
620
|
function getDefaultExportFromCjs(x2) {
|
|
@@ -7072,7 +7074,7 @@ function printTableElement(el, options2) {
|
|
|
7072
7074
|
);
|
|
7073
7075
|
$printEl.hide();
|
|
7074
7076
|
}
|
|
7075
|
-
var render$
|
|
7077
|
+
var render$c = function() {
|
|
7076
7078
|
var _vm = this;
|
|
7077
7079
|
var _h = _vm.$createElement;
|
|
7078
7080
|
var _c = _vm._self._c || _h;
|
|
@@ -7314,7 +7316,7 @@ var render$9 = function() {
|
|
|
7314
7316
|
}
|
|
7315
7317
|
})], 2);
|
|
7316
7318
|
};
|
|
7317
|
-
var staticRenderFns$
|
|
7319
|
+
var staticRenderFns$c = [function() {
|
|
7318
7320
|
var _vm = this;
|
|
7319
7321
|
var _h = _vm.$createElement;
|
|
7320
7322
|
var _c = _vm._self._c || _h;
|
|
@@ -7337,11 +7339,11 @@ var staticRenderFns$9 = [function() {
|
|
|
7337
7339
|
staticClass: "el-icon-printer"
|
|
7338
7340
|
})])]);
|
|
7339
7341
|
}];
|
|
7340
|
-
const index_vue_vue_type_style_index_0_scoped_true_lang$
|
|
7341
|
-
const __vue2_script$
|
|
7342
|
+
const index_vue_vue_type_style_index_0_scoped_true_lang$7 = "";
|
|
7343
|
+
const __vue2_script$c = {
|
|
7342
7344
|
name: "table",
|
|
7343
7345
|
components: {
|
|
7344
|
-
printTemplate,
|
|
7346
|
+
printTemplate: PrintTemplate,
|
|
7345
7347
|
TableColumn,
|
|
7346
7348
|
PrintTemplateSelector: OlDropdownPrint,
|
|
7347
7349
|
// 函数式组件注册
|
|
@@ -7860,24 +7862,24 @@ const __vue2_script$9 = {
|
|
|
7860
7862
|
}
|
|
7861
7863
|
}
|
|
7862
7864
|
};
|
|
7863
|
-
const __cssModules$
|
|
7864
|
-
var __component__$
|
|
7865
|
-
__vue2_script$
|
|
7866
|
-
render$
|
|
7867
|
-
staticRenderFns$
|
|
7865
|
+
const __cssModules$c = {};
|
|
7866
|
+
var __component__$c = /* @__PURE__ */ normalizeComponent(
|
|
7867
|
+
__vue2_script$c,
|
|
7868
|
+
render$c,
|
|
7869
|
+
staticRenderFns$c,
|
|
7868
7870
|
false,
|
|
7869
|
-
__vue2_injectStyles$
|
|
7871
|
+
__vue2_injectStyles$c,
|
|
7870
7872
|
"635ae588",
|
|
7871
7873
|
null,
|
|
7872
7874
|
null
|
|
7873
7875
|
);
|
|
7874
|
-
function __vue2_injectStyles$
|
|
7875
|
-
for (let o2 in __cssModules$
|
|
7876
|
-
this[o2] = __cssModules$
|
|
7876
|
+
function __vue2_injectStyles$c(context) {
|
|
7877
|
+
for (let o2 in __cssModules$c) {
|
|
7878
|
+
this[o2] = __cssModules$c[o2];
|
|
7877
7879
|
}
|
|
7878
7880
|
}
|
|
7879
7881
|
const OlTable = /* @__PURE__ */ function() {
|
|
7880
|
-
return __component__$
|
|
7882
|
+
return __component__$c.exports;
|
|
7881
7883
|
}();
|
|
7882
7884
|
OlTable.install = function(Vue) {
|
|
7883
7885
|
Vue.component("ol-table", OlTable);
|
|
@@ -7892,7 +7894,7 @@ const getEnum = (enumName) => {
|
|
|
7892
7894
|
const enumStr = enumName[0].toLowerCase() + enumName.slice(1);
|
|
7893
7895
|
return JSON.parse(local).SET_enumsSelect[enumStr].enums || [];
|
|
7894
7896
|
};
|
|
7895
|
-
var render$
|
|
7897
|
+
var render$b = function() {
|
|
7896
7898
|
var _vm = this;
|
|
7897
7899
|
var _h = _vm.$createElement;
|
|
7898
7900
|
var _c = _vm._self._c || _h;
|
|
@@ -7966,9 +7968,9 @@ var render$8 = function() {
|
|
|
7966
7968
|
}
|
|
7967
7969
|
}) : _vm._e()], 1);
|
|
7968
7970
|
};
|
|
7969
|
-
var staticRenderFns$
|
|
7970
|
-
const index_vue_vue_type_style_index_0_scoped_true_lang$
|
|
7971
|
-
const __vue2_script$
|
|
7971
|
+
var staticRenderFns$b = [];
|
|
7972
|
+
const index_vue_vue_type_style_index_0_scoped_true_lang$6 = "";
|
|
7973
|
+
const __vue2_script$b = {
|
|
7972
7974
|
name: "number-range",
|
|
7973
7975
|
props: {
|
|
7974
7976
|
value: {
|
|
@@ -8128,24 +8130,24 @@ const __vue2_script$8 = {
|
|
|
8128
8130
|
}
|
|
8129
8131
|
}
|
|
8130
8132
|
};
|
|
8131
|
-
const __cssModules$
|
|
8132
|
-
var __component__$
|
|
8133
|
-
__vue2_script$
|
|
8134
|
-
render$
|
|
8135
|
-
staticRenderFns$
|
|
8133
|
+
const __cssModules$b = {};
|
|
8134
|
+
var __component__$b = /* @__PURE__ */ normalizeComponent(
|
|
8135
|
+
__vue2_script$b,
|
|
8136
|
+
render$b,
|
|
8137
|
+
staticRenderFns$b,
|
|
8136
8138
|
false,
|
|
8137
|
-
__vue2_injectStyles$
|
|
8139
|
+
__vue2_injectStyles$b,
|
|
8138
8140
|
"653fc76e",
|
|
8139
8141
|
null,
|
|
8140
8142
|
null
|
|
8141
8143
|
);
|
|
8142
|
-
function __vue2_injectStyles$
|
|
8143
|
-
for (let o2 in __cssModules$
|
|
8144
|
-
this[o2] = __cssModules$
|
|
8144
|
+
function __vue2_injectStyles$b(context) {
|
|
8145
|
+
for (let o2 in __cssModules$b) {
|
|
8146
|
+
this[o2] = __cssModules$b[o2];
|
|
8145
8147
|
}
|
|
8146
8148
|
}
|
|
8147
8149
|
const OlNumberRange = /* @__PURE__ */ function() {
|
|
8148
|
-
return __component__$
|
|
8150
|
+
return __component__$b.exports;
|
|
8149
8151
|
}();
|
|
8150
8152
|
OlNumberRange.install = function(Vue) {
|
|
8151
8153
|
Vue.component("ol-number-range ", OlNumberRange);
|
|
@@ -9139,7 +9141,7 @@ $$2({ target: "Array", proto: true, forced: BROKEN_ON_SPARSE || BROKEN_ON_SPARSE
|
|
|
9139
9141
|
}
|
|
9140
9142
|
});
|
|
9141
9143
|
addToUnscopables("includes");
|
|
9142
|
-
var render$
|
|
9144
|
+
var render$a = function() {
|
|
9143
9145
|
var _vm = this;
|
|
9144
9146
|
var _h = _vm.$createElement;
|
|
9145
9147
|
var _c = _vm._self._c || _h;
|
|
@@ -9887,9 +9889,9 @@ var render$7 = function() {
|
|
|
9887
9889
|
}
|
|
9888
9890
|
}, [_vm._v("取消")])], 1)], 1)], 1);
|
|
9889
9891
|
};
|
|
9890
|
-
var staticRenderFns$
|
|
9892
|
+
var staticRenderFns$a = [];
|
|
9891
9893
|
const SearchConfigDialog_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
9892
|
-
const __vue2_script$
|
|
9894
|
+
const __vue2_script$a = {
|
|
9893
9895
|
name: "SearchConfigDialog",
|
|
9894
9896
|
props: {
|
|
9895
9897
|
visible: {
|
|
@@ -10425,26 +10427,26 @@ const __vue2_script$7 = {
|
|
|
10425
10427
|
}
|
|
10426
10428
|
}
|
|
10427
10429
|
};
|
|
10428
|
-
const __cssModules$
|
|
10429
|
-
var __component__$
|
|
10430
|
-
__vue2_script$
|
|
10431
|
-
render$
|
|
10432
|
-
staticRenderFns$
|
|
10430
|
+
const __cssModules$a = {};
|
|
10431
|
+
var __component__$a = /* @__PURE__ */ normalizeComponent(
|
|
10432
|
+
__vue2_script$a,
|
|
10433
|
+
render$a,
|
|
10434
|
+
staticRenderFns$a,
|
|
10433
10435
|
false,
|
|
10434
|
-
__vue2_injectStyles$
|
|
10436
|
+
__vue2_injectStyles$a,
|
|
10435
10437
|
"ebd7b070",
|
|
10436
10438
|
null,
|
|
10437
10439
|
null
|
|
10438
10440
|
);
|
|
10439
|
-
function __vue2_injectStyles$
|
|
10440
|
-
for (let o2 in __cssModules$
|
|
10441
|
-
this[o2] = __cssModules$
|
|
10441
|
+
function __vue2_injectStyles$a(context) {
|
|
10442
|
+
for (let o2 in __cssModules$a) {
|
|
10443
|
+
this[o2] = __cssModules$a[o2];
|
|
10442
10444
|
}
|
|
10443
10445
|
}
|
|
10444
10446
|
const SearchConfigDialog = /* @__PURE__ */ function() {
|
|
10445
|
-
return __component__$
|
|
10447
|
+
return __component__$a.exports;
|
|
10446
10448
|
}();
|
|
10447
|
-
var render$
|
|
10449
|
+
var render$9 = function() {
|
|
10448
10450
|
var _vm = this;
|
|
10449
10451
|
var _h = _vm.$createElement;
|
|
10450
10452
|
var _c = _vm._self._c || _h;
|
|
@@ -10738,9 +10740,9 @@ var render$6 = function() {
|
|
|
10738
10740
|
}
|
|
10739
10741
|
}, "search-config-dialog", _vm.$attrs, false)) : _vm._e()], 1);
|
|
10740
10742
|
};
|
|
10741
|
-
var staticRenderFns$
|
|
10742
|
-
const index_vue_vue_type_style_index_0_scoped_true_lang$
|
|
10743
|
-
const __vue2_script$
|
|
10743
|
+
var staticRenderFns$9 = [];
|
|
10744
|
+
const index_vue_vue_type_style_index_0_scoped_true_lang$5 = "";
|
|
10745
|
+
const __vue2_script$9 = {
|
|
10744
10746
|
name: "search",
|
|
10745
10747
|
components: {
|
|
10746
10748
|
OlNumberRange,
|
|
@@ -11232,29 +11234,29 @@ const __vue2_script$6 = {
|
|
|
11232
11234
|
}
|
|
11233
11235
|
}
|
|
11234
11236
|
};
|
|
11235
|
-
const __cssModules$
|
|
11236
|
-
var __component__$
|
|
11237
|
-
__vue2_script$
|
|
11238
|
-
render$
|
|
11239
|
-
staticRenderFns$
|
|
11237
|
+
const __cssModules$9 = {};
|
|
11238
|
+
var __component__$9 = /* @__PURE__ */ normalizeComponent(
|
|
11239
|
+
__vue2_script$9,
|
|
11240
|
+
render$9,
|
|
11241
|
+
staticRenderFns$9,
|
|
11240
11242
|
false,
|
|
11241
|
-
__vue2_injectStyles$
|
|
11243
|
+
__vue2_injectStyles$9,
|
|
11242
11244
|
"2059874a",
|
|
11243
11245
|
null,
|
|
11244
11246
|
null
|
|
11245
11247
|
);
|
|
11246
|
-
function __vue2_injectStyles$
|
|
11247
|
-
for (let o2 in __cssModules$
|
|
11248
|
-
this[o2] = __cssModules$
|
|
11248
|
+
function __vue2_injectStyles$9(context) {
|
|
11249
|
+
for (let o2 in __cssModules$9) {
|
|
11250
|
+
this[o2] = __cssModules$9[o2];
|
|
11249
11251
|
}
|
|
11250
11252
|
}
|
|
11251
11253
|
const OlSearch = /* @__PURE__ */ function() {
|
|
11252
|
-
return __component__$
|
|
11254
|
+
return __component__$9.exports;
|
|
11253
11255
|
}();
|
|
11254
11256
|
OlSearch.install = function(Vue) {
|
|
11255
11257
|
Vue.component("ol-search ", OlSearch);
|
|
11256
11258
|
};
|
|
11257
|
-
var render$
|
|
11259
|
+
var render$8 = function() {
|
|
11258
11260
|
var _vm = this;
|
|
11259
11261
|
var _h = _vm.$createElement;
|
|
11260
11262
|
var _c = _vm._self._c || _h;
|
|
@@ -11271,8 +11273,8 @@ var render$5 = function() {
|
|
|
11271
11273
|
}
|
|
11272
11274
|
}, "ol-search", _vm.$attrs, false), _vm.$listeners));
|
|
11273
11275
|
};
|
|
11274
|
-
var staticRenderFns$
|
|
11275
|
-
const __vue2_script$
|
|
11276
|
+
var staticRenderFns$8 = [];
|
|
11277
|
+
const __vue2_script$8 = {
|
|
11276
11278
|
name: "customSearch",
|
|
11277
11279
|
props: {
|
|
11278
11280
|
menuId: {
|
|
@@ -11375,29 +11377,29 @@ const __vue2_script$5 = {
|
|
|
11375
11377
|
}
|
|
11376
11378
|
}
|
|
11377
11379
|
};
|
|
11378
|
-
const __cssModules$
|
|
11379
|
-
var __component__$
|
|
11380
|
-
__vue2_script$
|
|
11381
|
-
render$
|
|
11382
|
-
staticRenderFns$
|
|
11380
|
+
const __cssModules$8 = {};
|
|
11381
|
+
var __component__$8 = /* @__PURE__ */ normalizeComponent(
|
|
11382
|
+
__vue2_script$8,
|
|
11383
|
+
render$8,
|
|
11384
|
+
staticRenderFns$8,
|
|
11383
11385
|
false,
|
|
11384
|
-
__vue2_injectStyles$
|
|
11386
|
+
__vue2_injectStyles$8,
|
|
11385
11387
|
null,
|
|
11386
11388
|
null,
|
|
11387
11389
|
null
|
|
11388
11390
|
);
|
|
11389
|
-
function __vue2_injectStyles$
|
|
11390
|
-
for (let o2 in __cssModules$
|
|
11391
|
-
this[o2] = __cssModules$
|
|
11391
|
+
function __vue2_injectStyles$8(context) {
|
|
11392
|
+
for (let o2 in __cssModules$8) {
|
|
11393
|
+
this[o2] = __cssModules$8[o2];
|
|
11392
11394
|
}
|
|
11393
11395
|
}
|
|
11394
11396
|
const OlCustomSearch = /* @__PURE__ */ function() {
|
|
11395
|
-
return __component__$
|
|
11397
|
+
return __component__$8.exports;
|
|
11396
11398
|
}();
|
|
11397
11399
|
OlCustomSearch.install = function(Vue) {
|
|
11398
11400
|
Vue.component("ol-customSearch", OlCustomSearch);
|
|
11399
11401
|
};
|
|
11400
|
-
var render$
|
|
11402
|
+
var render$7 = function() {
|
|
11401
11403
|
var _vm = this;
|
|
11402
11404
|
var _h = _vm.$createElement;
|
|
11403
11405
|
var _c = _vm._self._c || _h;
|
|
@@ -11677,9 +11679,9 @@ var render$4 = function() {
|
|
|
11677
11679
|
}
|
|
11678
11680
|
}, [_vm._v("确 定 ")]) : _vm._e()], 1)], 1)], 1);
|
|
11679
11681
|
};
|
|
11680
|
-
var staticRenderFns$
|
|
11682
|
+
var staticRenderFns$7 = [];
|
|
11681
11683
|
const index_vue_vue_type_style_index_0_lang = "";
|
|
11682
|
-
const __vue2_script$
|
|
11684
|
+
const __vue2_script$7 = {
|
|
11683
11685
|
name: "dialogTemplate",
|
|
11684
11686
|
props: {
|
|
11685
11687
|
form: Object
|
|
@@ -11821,24 +11823,24 @@ const __vue2_script$4 = {
|
|
|
11821
11823
|
}
|
|
11822
11824
|
}
|
|
11823
11825
|
};
|
|
11824
|
-
const __cssModules$
|
|
11825
|
-
var __component__$
|
|
11826
|
-
__vue2_script$
|
|
11827
|
-
render$
|
|
11828
|
-
staticRenderFns$
|
|
11826
|
+
const __cssModules$7 = {};
|
|
11827
|
+
var __component__$7 = /* @__PURE__ */ normalizeComponent(
|
|
11828
|
+
__vue2_script$7,
|
|
11829
|
+
render$7,
|
|
11830
|
+
staticRenderFns$7,
|
|
11829
11831
|
false,
|
|
11830
|
-
__vue2_injectStyles$
|
|
11832
|
+
__vue2_injectStyles$7,
|
|
11831
11833
|
null,
|
|
11832
11834
|
null,
|
|
11833
11835
|
null
|
|
11834
11836
|
);
|
|
11835
|
-
function __vue2_injectStyles$
|
|
11836
|
-
for (let o2 in __cssModules$
|
|
11837
|
-
this[o2] = __cssModules$
|
|
11837
|
+
function __vue2_injectStyles$7(context) {
|
|
11838
|
+
for (let o2 in __cssModules$7) {
|
|
11839
|
+
this[o2] = __cssModules$7[o2];
|
|
11838
11840
|
}
|
|
11839
11841
|
}
|
|
11840
11842
|
const Dialog = /* @__PURE__ */ function() {
|
|
11841
|
-
return __component__$
|
|
11843
|
+
return __component__$7.exports;
|
|
11842
11844
|
}();
|
|
11843
11845
|
Dialog.install = function(Vue) {
|
|
11844
11846
|
Vue.component("ol-dialogTemplate ", Dialog);
|
|
@@ -11929,7 +11931,7 @@ const initForm = (options2) => {
|
|
|
11929
11931
|
}
|
|
11930
11932
|
});
|
|
11931
11933
|
};
|
|
11932
|
-
var render$
|
|
11934
|
+
var render$6 = function() {
|
|
11933
11935
|
var _vm = this;
|
|
11934
11936
|
var _h = _vm.$createElement;
|
|
11935
11937
|
var _c = _vm._self._c || _h;
|
|
@@ -12222,9 +12224,9 @@ var render$3 = function() {
|
|
|
12222
12224
|
}
|
|
12223
12225
|
}, [_vm._v("确定")]) : _vm._e()], _vm._t("btnAfterSlot")], 2) : _vm._e()], 1);
|
|
12224
12226
|
};
|
|
12225
|
-
var staticRenderFns$
|
|
12226
|
-
const index_vue_vue_type_style_index_0_scoped_true_lang$
|
|
12227
|
-
const __vue2_script$
|
|
12227
|
+
var staticRenderFns$6 = [];
|
|
12228
|
+
const index_vue_vue_type_style_index_0_scoped_true_lang$4 = "";
|
|
12229
|
+
const __vue2_script$6 = {
|
|
12228
12230
|
name: "form",
|
|
12229
12231
|
components: {
|
|
12230
12232
|
OlNumberRange
|
|
@@ -12367,29 +12369,29 @@ const __vue2_script$3 = {
|
|
|
12367
12369
|
}
|
|
12368
12370
|
}
|
|
12369
12371
|
};
|
|
12370
|
-
const __cssModules$
|
|
12371
|
-
var __component__$
|
|
12372
|
-
__vue2_script$
|
|
12373
|
-
render$
|
|
12374
|
-
staticRenderFns$
|
|
12372
|
+
const __cssModules$6 = {};
|
|
12373
|
+
var __component__$6 = /* @__PURE__ */ normalizeComponent(
|
|
12374
|
+
__vue2_script$6,
|
|
12375
|
+
render$6,
|
|
12376
|
+
staticRenderFns$6,
|
|
12375
12377
|
false,
|
|
12376
|
-
__vue2_injectStyles$
|
|
12378
|
+
__vue2_injectStyles$6,
|
|
12377
12379
|
"051116b4",
|
|
12378
12380
|
null,
|
|
12379
12381
|
null
|
|
12380
12382
|
);
|
|
12381
|
-
function __vue2_injectStyles$
|
|
12382
|
-
for (let o2 in __cssModules$
|
|
12383
|
-
this[o2] = __cssModules$
|
|
12383
|
+
function __vue2_injectStyles$6(context) {
|
|
12384
|
+
for (let o2 in __cssModules$6) {
|
|
12385
|
+
this[o2] = __cssModules$6[o2];
|
|
12384
12386
|
}
|
|
12385
12387
|
}
|
|
12386
12388
|
const OlForm = /* @__PURE__ */ function() {
|
|
12387
|
-
return __component__$
|
|
12389
|
+
return __component__$6.exports;
|
|
12388
12390
|
}();
|
|
12389
12391
|
OlForm.install = function(Vue) {
|
|
12390
12392
|
Vue.component("ol-form ", OlForm);
|
|
12391
12393
|
};
|
|
12392
|
-
var render$
|
|
12394
|
+
var render$5 = function() {
|
|
12393
12395
|
var _vm = this;
|
|
12394
12396
|
var _h = _vm.$createElement;
|
|
12395
12397
|
var _c = _vm._self._c || _h;
|
|
@@ -12575,215 +12577,2677 @@ var render$2 = function() {
|
|
|
12575
12577
|
callback: function($$v) {
|
|
12576
12578
|
_vm.$set(_vm.form, "remark", $$v);
|
|
12577
12579
|
},
|
|
12578
|
-
expression: "form.remark"
|
|
12580
|
+
expression: "form.remark"
|
|
12581
|
+
}
|
|
12582
|
+
})], 1)], 1), _c("span", {
|
|
12583
|
+
staticClass: "dialog-footer",
|
|
12584
|
+
attrs: {
|
|
12585
|
+
"slot": "footer"
|
|
12586
|
+
},
|
|
12587
|
+
slot: "footer"
|
|
12588
|
+
}, [_c("el-button", {
|
|
12589
|
+
on: {
|
|
12590
|
+
"click": function($event) {
|
|
12591
|
+
_vm.dialogVisible = false;
|
|
12592
|
+
}
|
|
12593
|
+
}
|
|
12594
|
+
}, [_vm._v("取消")]), _c("el-button", {
|
|
12595
|
+
attrs: {
|
|
12596
|
+
"type": "primary"
|
|
12597
|
+
},
|
|
12598
|
+
on: {
|
|
12599
|
+
"click": _vm.handleSubmit
|
|
12600
|
+
}
|
|
12601
|
+
}, [_vm._v("确定")])], 1)], 1)], 1)]);
|
|
12602
|
+
};
|
|
12603
|
+
var staticRenderFns$5 = [];
|
|
12604
|
+
const index_vue_vue_type_style_index_0_scoped_true_lang$3 = "";
|
|
12605
|
+
const __vue2_script$5 = {
|
|
12606
|
+
name: "print-model",
|
|
12607
|
+
data() {
|
|
12608
|
+
return {
|
|
12609
|
+
menuTreeData: [],
|
|
12610
|
+
treeProps: {
|
|
12611
|
+
label: "title",
|
|
12612
|
+
children: "child"
|
|
12613
|
+
},
|
|
12614
|
+
currentMenuId: null,
|
|
12615
|
+
currentMenuName: "全部",
|
|
12616
|
+
currentItem: {},
|
|
12617
|
+
templateList: [],
|
|
12618
|
+
dialogVisible: false,
|
|
12619
|
+
dialogTitle: "新增模板",
|
|
12620
|
+
form: {
|
|
12621
|
+
id: null,
|
|
12622
|
+
templeteName: "",
|
|
12623
|
+
remark: "",
|
|
12624
|
+
templeteJson: "",
|
|
12625
|
+
sourceUrl: ""
|
|
12626
|
+
},
|
|
12627
|
+
rules: {
|
|
12628
|
+
templeteName: [{ required: true, message: "请输入模板名称", trigger: "blur" }],
|
|
12629
|
+
templeteJson: [{ required: true, message: "请输入模板JSON", trigger: "blur" }]
|
|
12630
|
+
}
|
|
12631
|
+
};
|
|
12632
|
+
},
|
|
12633
|
+
mounted() {
|
|
12634
|
+
this.initMenuTree();
|
|
12635
|
+
},
|
|
12636
|
+
methods: {
|
|
12637
|
+
initMenuTree() {
|
|
12638
|
+
const wms = JSON.parse(localStorage.getItem("wms") || "{}");
|
|
12639
|
+
const menus = wms.SET_MENUS || [];
|
|
12640
|
+
this.menuTreeData = this.buildTreeData(menus);
|
|
12641
|
+
const firstNode = this.findFirstMenuNode(this.menuTreeData);
|
|
12642
|
+
if (firstNode) {
|
|
12643
|
+
this.currentMenuId = firstNode.id;
|
|
12644
|
+
this.currentMenuName = firstNode.title;
|
|
12645
|
+
this.currentItem = firstNode;
|
|
12646
|
+
this.loadTemplates(firstNode.id);
|
|
12647
|
+
}
|
|
12648
|
+
},
|
|
12649
|
+
findFirstMenuNode(menus) {
|
|
12650
|
+
if (!menus || menus.length === 0)
|
|
12651
|
+
return null;
|
|
12652
|
+
for (const menu of menus) {
|
|
12653
|
+
if (menu.child && menu.child.length > 0) {
|
|
12654
|
+
const found = this.findFirstMenuNode(menu.child);
|
|
12655
|
+
if (found)
|
|
12656
|
+
return found;
|
|
12657
|
+
}
|
|
12658
|
+
return menu;
|
|
12659
|
+
}
|
|
12660
|
+
return null;
|
|
12661
|
+
},
|
|
12662
|
+
buildTreeData(menus) {
|
|
12663
|
+
return menus.filter((menu) => {
|
|
12664
|
+
if (menu.child && menu.child.length > 0) {
|
|
12665
|
+
menu.child = this.buildTreeData(menu.child);
|
|
12666
|
+
}
|
|
12667
|
+
return menu.type === 0;
|
|
12668
|
+
});
|
|
12669
|
+
},
|
|
12670
|
+
handleNodeClick(data2) {
|
|
12671
|
+
this.currentMenuId = data2.id;
|
|
12672
|
+
this.currentMenuName = data2.title;
|
|
12673
|
+
this.currentItem = data2;
|
|
12674
|
+
this.loadTemplates(data2.id);
|
|
12675
|
+
},
|
|
12676
|
+
async loadTemplates(menuId) {
|
|
12677
|
+
var _a2;
|
|
12678
|
+
try {
|
|
12679
|
+
const res = await this.get({
|
|
12680
|
+
url: "/api/app/print-templete/page-list",
|
|
12681
|
+
data: {
|
|
12682
|
+
MenuId: menuId,
|
|
12683
|
+
Page: 1,
|
|
12684
|
+
MaxResultCount: 1e3
|
|
12685
|
+
}
|
|
12686
|
+
});
|
|
12687
|
+
if (res.code !== 200)
|
|
12688
|
+
return;
|
|
12689
|
+
this.templateList = ((_a2 = res.result) == null ? void 0 : _a2.items) || [];
|
|
12690
|
+
} catch (error) {
|
|
12691
|
+
console.error("加载模板列表失败:", error);
|
|
12692
|
+
}
|
|
12693
|
+
},
|
|
12694
|
+
handleAdd() {
|
|
12695
|
+
this.dialogTitle = "新增模板";
|
|
12696
|
+
this.form = {
|
|
12697
|
+
id: null,
|
|
12698
|
+
templeteName: "",
|
|
12699
|
+
remark: "",
|
|
12700
|
+
templeteJson: "",
|
|
12701
|
+
sourceUrl: ""
|
|
12702
|
+
};
|
|
12703
|
+
this.dialogVisible = true;
|
|
12704
|
+
this.$nextTick(() => {
|
|
12705
|
+
this.$refs.formRef && this.$refs.formRef.clearValidate();
|
|
12706
|
+
});
|
|
12707
|
+
},
|
|
12708
|
+
handleEdit(template) {
|
|
12709
|
+
this.dialogTitle = "编辑模板";
|
|
12710
|
+
this.form = {
|
|
12711
|
+
id: template.id,
|
|
12712
|
+
templeteName: template.templeteName,
|
|
12713
|
+
remark: template.remark,
|
|
12714
|
+
templeteJson: template.templeteJson,
|
|
12715
|
+
sourceUrl: template.sourceUrl || ""
|
|
12716
|
+
};
|
|
12717
|
+
this.dialogVisible = true;
|
|
12718
|
+
},
|
|
12719
|
+
async handleDelete(template) {
|
|
12720
|
+
this.$confirm("确认删除该模板吗?", "提示", {
|
|
12721
|
+
confirmButtonText: "确定",
|
|
12722
|
+
cancelButtonText: "取消",
|
|
12723
|
+
type: "warning"
|
|
12724
|
+
}).then(async () => {
|
|
12725
|
+
try {
|
|
12726
|
+
await this.del({
|
|
12727
|
+
url: `/api/app/print-templete/print-templete/${template.id}`
|
|
12728
|
+
});
|
|
12729
|
+
this.$message.success("删除成功");
|
|
12730
|
+
this.loadTemplates(this.currentMenuId);
|
|
12731
|
+
} catch (error) {
|
|
12732
|
+
console.error("删除失败:", error);
|
|
12733
|
+
}
|
|
12734
|
+
}).catch(() => {
|
|
12735
|
+
});
|
|
12736
|
+
},
|
|
12737
|
+
async handleSubmit() {
|
|
12738
|
+
this.$refs.formRef.validate(async (valid) => {
|
|
12739
|
+
if (valid) {
|
|
12740
|
+
try {
|
|
12741
|
+
if (this.form.id) {
|
|
12742
|
+
await this.put({
|
|
12743
|
+
url: "/api/app/print-templete/print-templete",
|
|
12744
|
+
data: {
|
|
12745
|
+
id: this.form.id,
|
|
12746
|
+
templeteName: this.form.templeteName,
|
|
12747
|
+
templeteJson: this.form.templeteJson,
|
|
12748
|
+
sourceUrl: this.form.sourceUrl
|
|
12749
|
+
}
|
|
12750
|
+
});
|
|
12751
|
+
this.$message.success("编辑成功");
|
|
12752
|
+
} else {
|
|
12753
|
+
await this.post({
|
|
12754
|
+
url: "/api/app/print-templete/print-templete",
|
|
12755
|
+
data: {
|
|
12756
|
+
menuId: this.currentMenuId,
|
|
12757
|
+
templeteName: this.form.templeteName,
|
|
12758
|
+
templeteJson: this.form.templeteJson,
|
|
12759
|
+
sourceUrl: this.form.sourceUrl
|
|
12760
|
+
}
|
|
12761
|
+
});
|
|
12762
|
+
this.$message.success("新增成功");
|
|
12763
|
+
}
|
|
12764
|
+
this.dialogVisible = false;
|
|
12765
|
+
this.loadTemplates(this.currentMenuId);
|
|
12766
|
+
} catch (error) {
|
|
12767
|
+
console.error("提交失败:", error);
|
|
12768
|
+
}
|
|
12769
|
+
}
|
|
12770
|
+
});
|
|
12771
|
+
},
|
|
12772
|
+
handleCreateTemplate() {
|
|
12773
|
+
let templateData = {};
|
|
12774
|
+
if (this.form.templeteJson) {
|
|
12775
|
+
try {
|
|
12776
|
+
templateData = JSON.parse(this.form.templeteJson);
|
|
12777
|
+
} catch (e2) {
|
|
12778
|
+
console.error("解析模板JSON失败:", e2);
|
|
12779
|
+
}
|
|
12780
|
+
}
|
|
12781
|
+
this.$hiprint({
|
|
12782
|
+
defaultTemplate: templateData,
|
|
12783
|
+
onSubmit: (res) => {
|
|
12784
|
+
this.form.templeteJson = JSON.stringify(res);
|
|
12785
|
+
console.log("保存的结果", this.form);
|
|
12786
|
+
this.$message.success("模板创建成功!");
|
|
12787
|
+
}
|
|
12788
|
+
});
|
|
12789
|
+
}
|
|
12790
|
+
}
|
|
12791
|
+
};
|
|
12792
|
+
const __cssModules$5 = {};
|
|
12793
|
+
var __component__$5 = /* @__PURE__ */ normalizeComponent(
|
|
12794
|
+
__vue2_script$5,
|
|
12795
|
+
render$5,
|
|
12796
|
+
staticRenderFns$5,
|
|
12797
|
+
false,
|
|
12798
|
+
__vue2_injectStyles$5,
|
|
12799
|
+
"645d66fe",
|
|
12800
|
+
null,
|
|
12801
|
+
null
|
|
12802
|
+
);
|
|
12803
|
+
function __vue2_injectStyles$5(context) {
|
|
12804
|
+
for (let o2 in __cssModules$5) {
|
|
12805
|
+
this[o2] = __cssModules$5[o2];
|
|
12806
|
+
}
|
|
12807
|
+
}
|
|
12808
|
+
const OlPrintModel = /* @__PURE__ */ function() {
|
|
12809
|
+
return __component__$5.exports;
|
|
12810
|
+
}();
|
|
12811
|
+
OlPrintModel.install = function(Vue) {
|
|
12812
|
+
Vue.component("ol-print-model", OlPrintModel);
|
|
12813
|
+
};
|
|
12814
|
+
var render$4 = function() {
|
|
12815
|
+
var _vm = this;
|
|
12816
|
+
var _h = _vm.$createElement;
|
|
12817
|
+
var _c = _vm._self._c || _h;
|
|
12818
|
+
return _c("el-dialog", {
|
|
12819
|
+
attrs: {
|
|
12820
|
+
"title": "实体变更记录",
|
|
12821
|
+
"visible": _vm.dialogVisible,
|
|
12822
|
+
"width": "70%",
|
|
12823
|
+
"top": "5vh",
|
|
12824
|
+
"append-to-body": "",
|
|
12825
|
+
"close-on-click-modal": false
|
|
12826
|
+
},
|
|
12827
|
+
on: {
|
|
12828
|
+
"update:visible": function($event) {
|
|
12829
|
+
_vm.dialogVisible = $event;
|
|
12830
|
+
},
|
|
12831
|
+
"opened": _vm.onDialogOpened
|
|
12832
|
+
}
|
|
12833
|
+
}, [_c("div", {
|
|
12834
|
+
staticClass: "ecr-table-wrap"
|
|
12835
|
+
}, [_c("ol-table", {
|
|
12836
|
+
ref: "table",
|
|
12837
|
+
attrs: {
|
|
12838
|
+
"url": _vm.url,
|
|
12839
|
+
"table-data": _vm.tableData,
|
|
12840
|
+
"paginations": _vm.paginations,
|
|
12841
|
+
"btnlist": []
|
|
12842
|
+
},
|
|
12843
|
+
on: {
|
|
12844
|
+
"handleSizeChange": function(v2) {
|
|
12845
|
+
_vm.paginations.limit = v2;
|
|
12846
|
+
_vm.paginations.page = 1;
|
|
12847
|
+
_vm.fetch();
|
|
12848
|
+
},
|
|
12849
|
+
"handleindexChange": function(v2) {
|
|
12850
|
+
_vm.paginations.page = v2;
|
|
12851
|
+
_vm.fetch();
|
|
12852
|
+
}
|
|
12853
|
+
},
|
|
12854
|
+
scopedSlots: _vm._u([{
|
|
12855
|
+
key: "changeInfo",
|
|
12856
|
+
fn: function(_ref2) {
|
|
12857
|
+
var row = _ref2.row;
|
|
12858
|
+
return [_c("el-popover", {
|
|
12859
|
+
attrs: {
|
|
12860
|
+
"placement": "bottom",
|
|
12861
|
+
"trigger": "click",
|
|
12862
|
+
"width": "420",
|
|
12863
|
+
"popper-class": "ecr-popover"
|
|
12864
|
+
}
|
|
12865
|
+
}, [_c("el-table", {
|
|
12866
|
+
attrs: {
|
|
12867
|
+
"data": row.customPropertyChanges || [],
|
|
12868
|
+
"border": "",
|
|
12869
|
+
"size": "small",
|
|
12870
|
+
"max-height": "280"
|
|
12871
|
+
}
|
|
12872
|
+
}, [_c("el-table-column", {
|
|
12873
|
+
attrs: {
|
|
12874
|
+
"prop": "propertyName",
|
|
12875
|
+
"label": "字段",
|
|
12876
|
+
"width": "120"
|
|
12877
|
+
}
|
|
12878
|
+
}), _c("el-table-column", {
|
|
12879
|
+
attrs: {
|
|
12880
|
+
"prop": "originalValue",
|
|
12881
|
+
"label": "原数据"
|
|
12882
|
+
}
|
|
12883
|
+
}), _c("el-table-column", {
|
|
12884
|
+
attrs: {
|
|
12885
|
+
"prop": "newValue",
|
|
12886
|
+
"label": "新数据"
|
|
12887
|
+
}
|
|
12888
|
+
})], 1), _c("span", {
|
|
12889
|
+
staticClass: "ecr-link",
|
|
12890
|
+
attrs: {
|
|
12891
|
+
"slot": "reference"
|
|
12892
|
+
},
|
|
12893
|
+
slot: "reference"
|
|
12894
|
+
}, [_vm._v("查看")])], 1)];
|
|
12895
|
+
}
|
|
12896
|
+
}])
|
|
12897
|
+
})], 1), _c("div", {
|
|
12898
|
+
attrs: {
|
|
12899
|
+
"slot": "footer"
|
|
12900
|
+
},
|
|
12901
|
+
slot: "footer"
|
|
12902
|
+
}, [_c("el-button", {
|
|
12903
|
+
on: {
|
|
12904
|
+
"click": function($event) {
|
|
12905
|
+
_vm.dialogVisible = false;
|
|
12906
|
+
}
|
|
12907
|
+
}
|
|
12908
|
+
}, [_vm._v("关闭")])], 1)]);
|
|
12909
|
+
};
|
|
12910
|
+
var staticRenderFns$4 = [];
|
|
12911
|
+
const EntityChangeRecord_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
12912
|
+
const EntityChangeRecord_vue_vue_type_style_index_1_lang = "";
|
|
12913
|
+
const SWAGGER_URL = "/api/app/audit-logging/entity-change-pages";
|
|
12914
|
+
const __vue2_script$4 = {
|
|
12915
|
+
name: "EntityChangeRecord",
|
|
12916
|
+
components: { OlTable },
|
|
12917
|
+
props: {
|
|
12918
|
+
visible: Boolean,
|
|
12919
|
+
selectedRows: { type: Array, default: () => [] },
|
|
12920
|
+
pageParams: { type: Object, default: () => ({ page: "Page", limit: "MaxResultCount" }) }
|
|
12921
|
+
},
|
|
12922
|
+
data() {
|
|
12923
|
+
return {
|
|
12924
|
+
url: SWAGGER_URL,
|
|
12925
|
+
dialogVisible: false,
|
|
12926
|
+
paginations: { page: 1, limit: 20, total: 0, pagetionShow: true },
|
|
12927
|
+
tableData: {
|
|
12928
|
+
loading: false,
|
|
12929
|
+
rows: [],
|
|
12930
|
+
columns: [
|
|
12931
|
+
{ prop: "changeInfo", label: "变更详情", show: true, fixed: "right", renderSlot: true, minWidth: "" }
|
|
12932
|
+
],
|
|
12933
|
+
options: { selection: false, index: false, headTool: false, refreshBtn: false, downloadBtn: false }
|
|
12934
|
+
}
|
|
12935
|
+
};
|
|
12936
|
+
},
|
|
12937
|
+
watch: {
|
|
12938
|
+
visible: {
|
|
12939
|
+
immediate: true,
|
|
12940
|
+
handler(v2) {
|
|
12941
|
+
this.dialogVisible = v2;
|
|
12942
|
+
if (v2)
|
|
12943
|
+
this.$nextTick(() => this.fetch());
|
|
12944
|
+
}
|
|
12945
|
+
},
|
|
12946
|
+
dialogVisible(v2) {
|
|
12947
|
+
this.$emit("update:visible", v2);
|
|
12948
|
+
}
|
|
12949
|
+
},
|
|
12950
|
+
methods: {
|
|
12951
|
+
onDialogOpened() {
|
|
12952
|
+
const wrap = this.$el.querySelector(".ecr-table-wrap");
|
|
12953
|
+
if (wrap) {
|
|
12954
|
+
wrap.style.maxHeight = document.documentElement.clientHeight * 0.65 + "px";
|
|
12955
|
+
wrap.style.overflow = "auto";
|
|
12956
|
+
}
|
|
12957
|
+
},
|
|
12958
|
+
async fetch() {
|
|
12959
|
+
if (typeof this.post !== "function" || !this.selectedRows.length)
|
|
12960
|
+
return;
|
|
12961
|
+
const p2 = this.pageParams || {};
|
|
12962
|
+
this.tableData.loading = true;
|
|
12963
|
+
try {
|
|
12964
|
+
const res = await this.post({
|
|
12965
|
+
url: SWAGGER_URL,
|
|
12966
|
+
data: {
|
|
12967
|
+
FilterConditions: [
|
|
12968
|
+
{ key: "EntityId", values: this.selectedRows.map((r2) => r2.id), compare: "in" }
|
|
12969
|
+
],
|
|
12970
|
+
[p2.page || "Page"]: this.paginations.page,
|
|
12971
|
+
[p2.limit || "MaxResultCount"]: this.paginations.limit
|
|
12972
|
+
}
|
|
12973
|
+
});
|
|
12974
|
+
this.tableData.rows = res && res.result && res.result.items || [];
|
|
12975
|
+
this.paginations.total = res && res.result && res.result.totalCount || 0;
|
|
12976
|
+
} catch (err2) {
|
|
12977
|
+
console.warn("[EntityChangeRecord] 请求失败:", err2);
|
|
12978
|
+
} finally {
|
|
12979
|
+
this.tableData.loading = false;
|
|
12980
|
+
}
|
|
12981
|
+
}
|
|
12982
|
+
}
|
|
12983
|
+
};
|
|
12984
|
+
const __cssModules$4 = {};
|
|
12985
|
+
var __component__$4 = /* @__PURE__ */ normalizeComponent(
|
|
12986
|
+
__vue2_script$4,
|
|
12987
|
+
render$4,
|
|
12988
|
+
staticRenderFns$4,
|
|
12989
|
+
false,
|
|
12990
|
+
__vue2_injectStyles$4,
|
|
12991
|
+
"0011369f",
|
|
12992
|
+
null,
|
|
12993
|
+
null
|
|
12994
|
+
);
|
|
12995
|
+
function __vue2_injectStyles$4(context) {
|
|
12996
|
+
for (let o2 in __cssModules$4) {
|
|
12997
|
+
this[o2] = __cssModules$4[o2];
|
|
12998
|
+
}
|
|
12999
|
+
}
|
|
13000
|
+
const EntityChangeRecord = /* @__PURE__ */ function() {
|
|
13001
|
+
return __component__$4.exports;
|
|
13002
|
+
}();
|
|
13003
|
+
var render$3 = function() {
|
|
13004
|
+
var _vm = this;
|
|
13005
|
+
var _h = _vm.$createElement;
|
|
13006
|
+
var _c = _vm._self._c || _h;
|
|
13007
|
+
return _c("el-dialog", {
|
|
13008
|
+
attrs: {
|
|
13009
|
+
"title": "列配置",
|
|
13010
|
+
"visible": _vm.dialogVisible,
|
|
13011
|
+
"close-on-click-modal": false,
|
|
13012
|
+
"before-close": _vm.handleClose,
|
|
13013
|
+
"top": "5vh",
|
|
13014
|
+
"width": "820px",
|
|
13015
|
+
"append-to-body": ""
|
|
13016
|
+
},
|
|
13017
|
+
on: {
|
|
13018
|
+
"update:visible": function($event) {
|
|
13019
|
+
_vm.dialogVisible = $event;
|
|
13020
|
+
},
|
|
13021
|
+
"open": _vm.onDialogOpen
|
|
13022
|
+
}
|
|
13023
|
+
}, [_c("el-table", {
|
|
13024
|
+
ref: "dragTable",
|
|
13025
|
+
staticStyle: {
|
|
13026
|
+
"width": "100%"
|
|
13027
|
+
},
|
|
13028
|
+
attrs: {
|
|
13029
|
+
"data": _vm.tableData,
|
|
13030
|
+
"row-key": "prop",
|
|
13031
|
+
"max-height": "500"
|
|
13032
|
+
}
|
|
13033
|
+
}, [_c("el-table-column", {
|
|
13034
|
+
attrs: {
|
|
13035
|
+
"width": "50",
|
|
13036
|
+
"align": "center"
|
|
13037
|
+
},
|
|
13038
|
+
scopedSlots: _vm._u([{
|
|
13039
|
+
key: "default",
|
|
13040
|
+
fn: function(_ref2) {
|
|
13041
|
+
var row = _ref2.row;
|
|
13042
|
+
return [_c("i", {
|
|
13043
|
+
staticClass: "el-icon-rank drag-handle",
|
|
13044
|
+
class: {
|
|
13045
|
+
"drag-disabled": row.fixed
|
|
13046
|
+
}
|
|
13047
|
+
})];
|
|
13048
|
+
}
|
|
13049
|
+
}])
|
|
13050
|
+
}), _c("el-table-column", {
|
|
13051
|
+
attrs: {
|
|
13052
|
+
"label": "序号",
|
|
13053
|
+
"width": "60",
|
|
13054
|
+
"align": "center"
|
|
13055
|
+
},
|
|
13056
|
+
scopedSlots: _vm._u([{
|
|
13057
|
+
key: "default",
|
|
13058
|
+
fn: function(_ref2) {
|
|
13059
|
+
var $index = _ref2.$index;
|
|
13060
|
+
return [_vm._v(_vm._s($index + 1))];
|
|
13061
|
+
}
|
|
13062
|
+
}])
|
|
13063
|
+
}), _c("el-table-column", {
|
|
13064
|
+
attrs: {
|
|
13065
|
+
"label": "字段",
|
|
13066
|
+
"min-width": "130"
|
|
13067
|
+
},
|
|
13068
|
+
scopedSlots: _vm._u([{
|
|
13069
|
+
key: "default",
|
|
13070
|
+
fn: function(_ref3) {
|
|
13071
|
+
var row = _ref3.row;
|
|
13072
|
+
return [_c("div", {
|
|
13073
|
+
staticClass: "col-field-name"
|
|
13074
|
+
}, [_vm._v(_vm._s(row.label))]), _c("div", {
|
|
13075
|
+
staticClass: "col-field-prop"
|
|
13076
|
+
}, [_vm._v(_vm._s(row.prop))])];
|
|
13077
|
+
}
|
|
13078
|
+
}])
|
|
13079
|
+
}), _c("el-table-column", {
|
|
13080
|
+
attrs: {
|
|
13081
|
+
"label": "显示",
|
|
13082
|
+
"width": "70",
|
|
13083
|
+
"align": "center"
|
|
13084
|
+
},
|
|
13085
|
+
scopedSlots: _vm._u([{
|
|
13086
|
+
key: "default",
|
|
13087
|
+
fn: function(_ref4) {
|
|
13088
|
+
var row = _ref4.row;
|
|
13089
|
+
return [_c("el-checkbox", {
|
|
13090
|
+
model: {
|
|
13091
|
+
value: row.show,
|
|
13092
|
+
callback: function($$v) {
|
|
13093
|
+
_vm.$set(row, "show", $$v);
|
|
13094
|
+
},
|
|
13095
|
+
expression: "row.show"
|
|
13096
|
+
}
|
|
13097
|
+
})];
|
|
13098
|
+
}
|
|
13099
|
+
}])
|
|
13100
|
+
}), _c("el-table-column", {
|
|
13101
|
+
attrs: {
|
|
13102
|
+
"label": "固定",
|
|
13103
|
+
"width": "70",
|
|
13104
|
+
"align": "center"
|
|
13105
|
+
},
|
|
13106
|
+
scopedSlots: _vm._u([{
|
|
13107
|
+
key: "default",
|
|
13108
|
+
fn: function(_ref5) {
|
|
13109
|
+
var row = _ref5.row;
|
|
13110
|
+
return [_c("el-checkbox", {
|
|
13111
|
+
on: {
|
|
13112
|
+
"change": function(v2) {
|
|
13113
|
+
row.fixed = v2 ? "left" : false;
|
|
13114
|
+
}
|
|
13115
|
+
},
|
|
13116
|
+
model: {
|
|
13117
|
+
value: row._fixed,
|
|
13118
|
+
callback: function($$v) {
|
|
13119
|
+
_vm.$set(row, "_fixed", $$v);
|
|
13120
|
+
},
|
|
13121
|
+
expression: "row._fixed"
|
|
13122
|
+
}
|
|
13123
|
+
})];
|
|
13124
|
+
}
|
|
13125
|
+
}])
|
|
13126
|
+
}), _c("el-table-column", {
|
|
13127
|
+
attrs: {
|
|
13128
|
+
"label": "别名",
|
|
13129
|
+
"min-width": "130"
|
|
13130
|
+
},
|
|
13131
|
+
scopedSlots: _vm._u([{
|
|
13132
|
+
key: "default",
|
|
13133
|
+
fn: function(_ref6) {
|
|
13134
|
+
var row = _ref6.row;
|
|
13135
|
+
return [_c("el-input", {
|
|
13136
|
+
attrs: {
|
|
13137
|
+
"clearable": "",
|
|
13138
|
+
"size": "small",
|
|
13139
|
+
"placeholder": "留空使用原标签"
|
|
13140
|
+
},
|
|
13141
|
+
model: {
|
|
13142
|
+
value: row._alias,
|
|
13143
|
+
callback: function($$v) {
|
|
13144
|
+
_vm.$set(row, "_alias", $$v);
|
|
13145
|
+
},
|
|
13146
|
+
expression: "row._alias"
|
|
13147
|
+
}
|
|
13148
|
+
})];
|
|
13149
|
+
}
|
|
13150
|
+
}])
|
|
13151
|
+
}), _vm.effectiveShowRoleConfig ? _c("el-table-column", {
|
|
13152
|
+
attrs: {
|
|
13153
|
+
"label": "可用角色",
|
|
13154
|
+
"min-width": "180"
|
|
13155
|
+
},
|
|
13156
|
+
scopedSlots: _vm._u([{
|
|
13157
|
+
key: "default",
|
|
13158
|
+
fn: function(_ref7) {
|
|
13159
|
+
var row = _ref7.row;
|
|
13160
|
+
return [_c("el-select", {
|
|
13161
|
+
staticStyle: {
|
|
13162
|
+
"width": "100%"
|
|
13163
|
+
},
|
|
13164
|
+
attrs: {
|
|
13165
|
+
"multiple": "",
|
|
13166
|
+
"clearable": "",
|
|
13167
|
+
"size": "small"
|
|
13168
|
+
},
|
|
13169
|
+
model: {
|
|
13170
|
+
value: row._roleIds,
|
|
13171
|
+
callback: function($$v) {
|
|
13172
|
+
_vm.$set(row, "_roleIds", $$v);
|
|
13173
|
+
},
|
|
13174
|
+
expression: "row._roleIds"
|
|
13175
|
+
}
|
|
13176
|
+
}, _vm._l(_vm.roleList, function(role) {
|
|
13177
|
+
return _c("el-option", {
|
|
13178
|
+
key: role.id,
|
|
13179
|
+
attrs: {
|
|
13180
|
+
"label": role.name,
|
|
13181
|
+
"value": role.id
|
|
13182
|
+
}
|
|
13183
|
+
});
|
|
13184
|
+
}), 1)];
|
|
13185
|
+
}
|
|
13186
|
+
}], null, false, 2167182326)
|
|
13187
|
+
}) : _vm._e()], 1), _c("div", {
|
|
13188
|
+
staticClass: "dialog-footer",
|
|
13189
|
+
attrs: {
|
|
13190
|
+
"slot": "footer"
|
|
13191
|
+
},
|
|
13192
|
+
slot: "footer"
|
|
13193
|
+
}, [_c("el-button", {
|
|
13194
|
+
on: {
|
|
13195
|
+
"click": _vm.handleClose
|
|
13196
|
+
}
|
|
13197
|
+
}, [_vm._v("取消")]), _c("el-button", {
|
|
13198
|
+
attrs: {
|
|
13199
|
+
"type": "primary"
|
|
13200
|
+
},
|
|
13201
|
+
on: {
|
|
13202
|
+
"click": _vm.handleSave
|
|
13203
|
+
}
|
|
13204
|
+
}, [_vm._v("确定")])], 1)], 1);
|
|
13205
|
+
};
|
|
13206
|
+
var staticRenderFns$3 = [];
|
|
13207
|
+
const index_vue_vue_type_style_index_0_scoped_true_lang$2 = "";
|
|
13208
|
+
const __vue2_script$3 = {
|
|
13209
|
+
name: "columnConfig",
|
|
13210
|
+
props: {
|
|
13211
|
+
columns: { type: Array, default: () => [] },
|
|
13212
|
+
visible: { type: Boolean, default: false },
|
|
13213
|
+
pageKey: { type: String, default: "" },
|
|
13214
|
+
menuId: { type: [String, Number], default: "" },
|
|
13215
|
+
showRoleConfig: { type: Boolean, default: void 0 },
|
|
13216
|
+
loadApi: { type: String, default: "/api/app/user-field-config/config" },
|
|
13217
|
+
saveApi: { type: String, default: "/api/app/user-field-config/save-config" }
|
|
13218
|
+
},
|
|
13219
|
+
data() {
|
|
13220
|
+
return {
|
|
13221
|
+
dialogVisible: false,
|
|
13222
|
+
tableData: [],
|
|
13223
|
+
sortable: null,
|
|
13224
|
+
roleList: []
|
|
13225
|
+
};
|
|
13226
|
+
},
|
|
13227
|
+
computed: {
|
|
13228
|
+
effectiveShowRoleConfig() {
|
|
13229
|
+
if (this.showRoleConfig !== void 0)
|
|
13230
|
+
return this.showRoleConfig;
|
|
13231
|
+
return true;
|
|
13232
|
+
}
|
|
13233
|
+
},
|
|
13234
|
+
watch: {
|
|
13235
|
+
visible: {
|
|
13236
|
+
immediate: true,
|
|
13237
|
+
handler(val) {
|
|
13238
|
+
this.dialogVisible = val;
|
|
13239
|
+
}
|
|
13240
|
+
},
|
|
13241
|
+
dialogVisible(val) {
|
|
13242
|
+
this.$emit("update:visible", val);
|
|
13243
|
+
}
|
|
13244
|
+
},
|
|
13245
|
+
methods: {
|
|
13246
|
+
async onDialogOpen() {
|
|
13247
|
+
this.$emit("open", this.columns);
|
|
13248
|
+
this.tableData = (this.columns || []).map((col) => ({
|
|
13249
|
+
...col,
|
|
13250
|
+
_alias: col.alias || col.label || "",
|
|
13251
|
+
_fixed: !!col.fixed,
|
|
13252
|
+
_roleIds: col.roleIds || []
|
|
13253
|
+
}));
|
|
13254
|
+
await Promise.all([
|
|
13255
|
+
this.loadFromApi(),
|
|
13256
|
+
this.effectiveShowRoleConfig ? this.loadRoles() : Promise.resolve()
|
|
13257
|
+
]);
|
|
13258
|
+
this.$nextTick(() => this.initSortable());
|
|
13259
|
+
},
|
|
13260
|
+
async loadRoles() {
|
|
13261
|
+
if (typeof this.get !== "function")
|
|
13262
|
+
return;
|
|
13263
|
+
try {
|
|
13264
|
+
const res = await this.get({ url: "/api/app/identity-role/list" });
|
|
13265
|
+
const items = res && res.result || [];
|
|
13266
|
+
if (Array.isArray(items)) {
|
|
13267
|
+
this.roleList = items.map((item) => ({
|
|
13268
|
+
id: item.id,
|
|
13269
|
+
name: item.description ? `${item.name}(${item.description})` : item.name
|
|
13270
|
+
}));
|
|
13271
|
+
}
|
|
13272
|
+
} catch (err2) {
|
|
13273
|
+
console.warn("[ol-column-config] 加载角色列表失败:", err2);
|
|
13274
|
+
}
|
|
13275
|
+
},
|
|
13276
|
+
async loadFromApi() {
|
|
13277
|
+
if (typeof this.get !== "function")
|
|
13278
|
+
return;
|
|
13279
|
+
const pageKey = this.pageKey || this.$route && this.$route.path || "";
|
|
13280
|
+
const menuId = this.resolveMenuId();
|
|
13281
|
+
if (!menuId)
|
|
13282
|
+
return;
|
|
13283
|
+
try {
|
|
13284
|
+
const res = await this.get({
|
|
13285
|
+
url: this.loadApi,
|
|
13286
|
+
data: { pageKey, sysMenuId: menuId }
|
|
13287
|
+
});
|
|
13288
|
+
const fields = res && res.result && res.result.fields || [];
|
|
13289
|
+
if (!fields.length)
|
|
13290
|
+
return;
|
|
13291
|
+
const fieldMap = {};
|
|
13292
|
+
fields.forEach((f2) => {
|
|
13293
|
+
fieldMap[f2.fieldName] = f2;
|
|
13294
|
+
});
|
|
13295
|
+
this.tableData = this.tableData.map((row) => {
|
|
13296
|
+
const f2 = fieldMap[row.prop];
|
|
13297
|
+
if (!f2)
|
|
13298
|
+
return row;
|
|
13299
|
+
return {
|
|
13300
|
+
...row,
|
|
13301
|
+
label: f2.displayName || row.label,
|
|
13302
|
+
_alias: f2.alias || f2.displayName || row.label,
|
|
13303
|
+
show: f2.isVisible !== false,
|
|
13304
|
+
_fixed: !!f2.isFixed,
|
|
13305
|
+
fixed: f2.isFixed || false,
|
|
13306
|
+
_roleIds: f2.roleIds || [],
|
|
13307
|
+
roleIds: f2.roleIds || [],
|
|
13308
|
+
enumName: f2.enumName || row.enumName
|
|
13309
|
+
};
|
|
13310
|
+
});
|
|
13311
|
+
} catch (err2) {
|
|
13312
|
+
console.warn("[ol-column-config] 加载列配置失败:", err2);
|
|
13313
|
+
}
|
|
13314
|
+
},
|
|
13315
|
+
async handleSave() {
|
|
13316
|
+
const all = this.tableData.map((row) => ({
|
|
13317
|
+
...row,
|
|
13318
|
+
alias: row._alias || row.label || "",
|
|
13319
|
+
fixed: row._fixed ? "left" : false,
|
|
13320
|
+
roleIds: row._roleIds || []
|
|
13321
|
+
}));
|
|
13322
|
+
all.forEach((r2) => {
|
|
13323
|
+
delete r2._alias;
|
|
13324
|
+
delete r2._fixed;
|
|
13325
|
+
delete r2._roleIds;
|
|
13326
|
+
});
|
|
13327
|
+
await this.saveToApi(all);
|
|
13328
|
+
this.$emit("save", all);
|
|
13329
|
+
this.dialogVisible = false;
|
|
13330
|
+
},
|
|
13331
|
+
async saveToApi(columns2) {
|
|
13332
|
+
if (typeof this.post !== "function")
|
|
13333
|
+
return;
|
|
13334
|
+
const pageKey = this.pageKey || this.$route && this.$route.path || "";
|
|
13335
|
+
const menuId = this.resolveMenuId();
|
|
13336
|
+
if (!menuId)
|
|
13337
|
+
return;
|
|
13338
|
+
try {
|
|
13339
|
+
const fields = columns2.map((col) => ({
|
|
13340
|
+
fieldName: col.prop,
|
|
13341
|
+
displayName: col.alias || col.label,
|
|
13342
|
+
alias: col.alias || col.label,
|
|
13343
|
+
isVisible: col.show !== false,
|
|
13344
|
+
isFixed: !!col.fixed,
|
|
13345
|
+
roleIds: col.roleIds || [],
|
|
13346
|
+
...col.enumName ? { enumName: col.enumName } : {}
|
|
13347
|
+
}));
|
|
13348
|
+
await this.post({
|
|
13349
|
+
url: this.saveApi,
|
|
13350
|
+
data: { pageKey, fields, sysMenuId: menuId }
|
|
13351
|
+
});
|
|
13352
|
+
this.$message && this.$message.success("列配置保存成功");
|
|
13353
|
+
} catch (err2) {
|
|
13354
|
+
console.warn("[ol-column-config] 保存列配置失败:", err2);
|
|
13355
|
+
}
|
|
13356
|
+
},
|
|
13357
|
+
resolveMenuId() {
|
|
13358
|
+
if (this.menuId)
|
|
13359
|
+
return this.menuId;
|
|
13360
|
+
try {
|
|
13361
|
+
const wms = JSON.parse(localStorage.getItem("wms") || "{}");
|
|
13362
|
+
const menus = wms.SET_MENUS;
|
|
13363
|
+
if (!menus || !this.$route)
|
|
13364
|
+
return "";
|
|
13365
|
+
const find = (arr2) => {
|
|
13366
|
+
for (const item of arr2) {
|
|
13367
|
+
if (item.path === this.$route.path)
|
|
13368
|
+
return item;
|
|
13369
|
+
if (item.child && item.child.length && item.type !== 1) {
|
|
13370
|
+
const found = find(item.child);
|
|
13371
|
+
if (found)
|
|
13372
|
+
return found;
|
|
13373
|
+
}
|
|
13374
|
+
}
|
|
13375
|
+
return null;
|
|
13376
|
+
};
|
|
13377
|
+
const m2 = find(menus);
|
|
13378
|
+
return m2 && m2.id || "";
|
|
13379
|
+
} catch {
|
|
13380
|
+
return "";
|
|
13381
|
+
}
|
|
13382
|
+
},
|
|
13383
|
+
handleClose() {
|
|
13384
|
+
this.dialogVisible = false;
|
|
13385
|
+
},
|
|
13386
|
+
initSortable() {
|
|
13387
|
+
this.destroySortable();
|
|
13388
|
+
const table = this.$refs.dragTable;
|
|
13389
|
+
if (!table)
|
|
13390
|
+
return;
|
|
13391
|
+
const tbody = table.$el.querySelector(".el-table__body-wrapper tbody");
|
|
13392
|
+
if (!tbody)
|
|
13393
|
+
return;
|
|
13394
|
+
this.sortable = Sortable.create(tbody, {
|
|
13395
|
+
animation: 150,
|
|
13396
|
+
handle: ".drag-handle:not(.drag-disabled)",
|
|
13397
|
+
ghostClass: "sortable-ghost",
|
|
13398
|
+
onEnd: ({ oldIndex, newIndex }) => {
|
|
13399
|
+
if (oldIndex !== newIndex) {
|
|
13400
|
+
const moved = this.tableData.splice(oldIndex, 1)[0];
|
|
13401
|
+
this.tableData.splice(newIndex, 0, moved);
|
|
13402
|
+
}
|
|
13403
|
+
}
|
|
13404
|
+
});
|
|
13405
|
+
},
|
|
13406
|
+
destroySortable() {
|
|
13407
|
+
if (this.sortable) {
|
|
13408
|
+
this.sortable.destroy();
|
|
13409
|
+
this.sortable = null;
|
|
13410
|
+
}
|
|
13411
|
+
}
|
|
13412
|
+
},
|
|
13413
|
+
beforeDestroy() {
|
|
13414
|
+
this.destroySortable();
|
|
13415
|
+
}
|
|
13416
|
+
};
|
|
13417
|
+
const __cssModules$3 = {};
|
|
13418
|
+
var __component__$3 = /* @__PURE__ */ normalizeComponent(
|
|
13419
|
+
__vue2_script$3,
|
|
13420
|
+
render$3,
|
|
13421
|
+
staticRenderFns$3,
|
|
13422
|
+
false,
|
|
13423
|
+
__vue2_injectStyles$3,
|
|
13424
|
+
"fef761f6",
|
|
13425
|
+
null,
|
|
13426
|
+
null
|
|
13427
|
+
);
|
|
13428
|
+
function __vue2_injectStyles$3(context) {
|
|
13429
|
+
for (let o2 in __cssModules$3) {
|
|
13430
|
+
this[o2] = __cssModules$3[o2];
|
|
13431
|
+
}
|
|
13432
|
+
}
|
|
13433
|
+
const OlColumnConfig = /* @__PURE__ */ function() {
|
|
13434
|
+
return __component__$3.exports;
|
|
13435
|
+
}();
|
|
13436
|
+
var render$2 = function() {
|
|
13437
|
+
var _vm = this;
|
|
13438
|
+
var _h = _vm.$createElement;
|
|
13439
|
+
var _c = _vm._self._c || _h;
|
|
13440
|
+
return _c("div", {
|
|
13441
|
+
staticClass: "ol-crud",
|
|
13442
|
+
class: {
|
|
13443
|
+
"ol-crud--loading": _vm.fetchingData
|
|
13444
|
+
}
|
|
13445
|
+
}, [_vm.$cfg("showSearch") ? _c("div", {
|
|
13446
|
+
staticClass: "crud-search"
|
|
13447
|
+
}, [_vm.searchFields.length === 0 && _vm.$cfg("showCustomSearch") ? _c("div", {
|
|
13448
|
+
staticClass: "crud-search-empty"
|
|
13449
|
+
}, [_c("span", {
|
|
13450
|
+
staticClass: "crud-search-empty-text"
|
|
13451
|
+
}, [_vm._v("暂未配置搜索条件")]), _c("el-button", {
|
|
13452
|
+
attrs: {
|
|
13453
|
+
"plain": "",
|
|
13454
|
+
"size": "small",
|
|
13455
|
+
"icon": "el-icon-setting"
|
|
13456
|
+
},
|
|
13457
|
+
on: {
|
|
13458
|
+
"click": _vm.openConfigDialog
|
|
13459
|
+
}
|
|
13460
|
+
}, [_vm._v("配置搜索字段")])], 1) : _vm._e(), _vm.searchFields.length > 0 ? _c("el-form", {
|
|
13461
|
+
ref: "searchForm",
|
|
13462
|
+
staticClass: "crud-search-form",
|
|
13463
|
+
attrs: {
|
|
13464
|
+
"model": _vm.internalSearchModel,
|
|
13465
|
+
"inline": true,
|
|
13466
|
+
"size": "small",
|
|
13467
|
+
"label-position": "right",
|
|
13468
|
+
"rules": _vm.searchRules
|
|
13469
|
+
}
|
|
13470
|
+
}, [_c("div", {
|
|
13471
|
+
staticClass: "crud-search-fields"
|
|
13472
|
+
}, _vm._l(_vm.visibleSearchFields, function(field) {
|
|
13473
|
+
return _c("el-form-item", {
|
|
13474
|
+
key: field.prop,
|
|
13475
|
+
staticClass: "crud-search-item",
|
|
13476
|
+
style: {
|
|
13477
|
+
width: _vm.searchItemWidth
|
|
13478
|
+
},
|
|
13479
|
+
attrs: {
|
|
13480
|
+
"label": field.label,
|
|
13481
|
+
"prop": field.prop
|
|
13482
|
+
}
|
|
13483
|
+
}, [field.type === "input" ? _c("el-input", _vm._b({
|
|
13484
|
+
attrs: {
|
|
13485
|
+
"placeholder": field.placeholder || `请输入${field.label}`,
|
|
13486
|
+
"clearable": ""
|
|
13487
|
+
},
|
|
13488
|
+
nativeOn: {
|
|
13489
|
+
"keyup": function($event) {
|
|
13490
|
+
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter"))
|
|
13491
|
+
return null;
|
|
13492
|
+
return _vm.handleSearch.apply(null, arguments);
|
|
13493
|
+
}
|
|
13494
|
+
},
|
|
13495
|
+
model: {
|
|
13496
|
+
value: _vm.internalSearchModel[field.prop],
|
|
13497
|
+
callback: function($$v) {
|
|
13498
|
+
_vm.$set(_vm.internalSearchModel, field.prop, $$v);
|
|
13499
|
+
},
|
|
13500
|
+
expression: "internalSearchModel[field.prop]"
|
|
13501
|
+
}
|
|
13502
|
+
}, "el-input", field.props || {}, false)) : field.type === "number" ? _c("el-input", _vm._b({
|
|
13503
|
+
staticClass: "crud-number-input",
|
|
13504
|
+
attrs: {
|
|
13505
|
+
"placeholder": field.placeholder || `请输入${field.label}`,
|
|
13506
|
+
"clearable": ""
|
|
13507
|
+
},
|
|
13508
|
+
nativeOn: {
|
|
13509
|
+
"keyup": function($event) {
|
|
13510
|
+
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter"))
|
|
13511
|
+
return null;
|
|
13512
|
+
return _vm.handleSearch.apply(null, arguments);
|
|
13513
|
+
},
|
|
13514
|
+
"keydown": function($event) {
|
|
13515
|
+
return _vm.onNumberKeydown.apply(null, arguments);
|
|
13516
|
+
},
|
|
13517
|
+
"paste": function($event) {
|
|
13518
|
+
return _vm.onNumberPaste.apply(null, arguments);
|
|
13519
|
+
},
|
|
13520
|
+
"input": function($event) {
|
|
13521
|
+
return _vm.onNumberInput($event, field);
|
|
13522
|
+
}
|
|
13523
|
+
},
|
|
13524
|
+
model: {
|
|
13525
|
+
value: _vm.internalSearchModel[field.prop],
|
|
13526
|
+
callback: function($$v) {
|
|
13527
|
+
_vm.$set(_vm.internalSearchModel, field.prop, $$v);
|
|
13528
|
+
},
|
|
13529
|
+
expression: "internalSearchModel[field.prop]"
|
|
13530
|
+
}
|
|
13531
|
+
}, "el-input", field.props || {}, false)) : field.type === "select" ? _c("el-select", _vm._b({
|
|
13532
|
+
attrs: {
|
|
13533
|
+
"placeholder": field.placeholder || `请选择${field.label}`,
|
|
13534
|
+
"clearable": "",
|
|
13535
|
+
"multiple": field.props && field.props.multiple,
|
|
13536
|
+
"popper-append-to-body": false
|
|
13537
|
+
},
|
|
13538
|
+
on: {
|
|
13539
|
+
"change": function($event) {
|
|
13540
|
+
return _vm.onFieldChange(field);
|
|
13541
|
+
}
|
|
13542
|
+
},
|
|
13543
|
+
nativeOn: {
|
|
13544
|
+
"keyup": function($event) {
|
|
13545
|
+
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter"))
|
|
13546
|
+
return null;
|
|
13547
|
+
return _vm.handleSearch.apply(null, arguments);
|
|
13548
|
+
}
|
|
13549
|
+
},
|
|
13550
|
+
model: {
|
|
13551
|
+
value: _vm.internalSearchModel[field.prop],
|
|
13552
|
+
callback: function($$v) {
|
|
13553
|
+
_vm.$set(_vm.internalSearchModel, field.prop, $$v);
|
|
13554
|
+
},
|
|
13555
|
+
expression: "internalSearchModel[field.prop]"
|
|
13556
|
+
}
|
|
13557
|
+
}, "el-select", field.props || {}, false), _vm._l(field.options || [], function(opt) {
|
|
13558
|
+
return _c("el-option", {
|
|
13559
|
+
key: opt.key !== void 0 ? opt.key : opt.value,
|
|
13560
|
+
attrs: {
|
|
13561
|
+
"label": opt.label || opt.value || opt.key,
|
|
13562
|
+
"value": opt.key !== void 0 ? opt.key : opt.value
|
|
13563
|
+
}
|
|
13564
|
+
});
|
|
13565
|
+
}), 1) : field.type === "remoteSelect" ? _c("el-select", _vm._b({
|
|
13566
|
+
directives: [{
|
|
13567
|
+
name: "el-select-loadmore",
|
|
13568
|
+
rawName: "v-el-select-loadmore",
|
|
13569
|
+
value: function() {
|
|
13570
|
+
return _vm.handleSelectLoadMore(field);
|
|
13571
|
+
},
|
|
13572
|
+
expression: "() => handleSelectLoadMore(field)"
|
|
13573
|
+
}],
|
|
13574
|
+
attrs: {
|
|
13575
|
+
"filterable": "",
|
|
13576
|
+
"remote": "",
|
|
13577
|
+
"reserve-keyword": "",
|
|
13578
|
+
"clearable": "",
|
|
13579
|
+
"placeholder": field.placeholder || `请输入关键字搜索`,
|
|
13580
|
+
"remote-method": function(query) {
|
|
13581
|
+
return _vm.handleRemoteSearch(field, query);
|
|
13582
|
+
},
|
|
13583
|
+
"loading": field.loading,
|
|
13584
|
+
"multiple": field.props && field.props.multiple,
|
|
13585
|
+
"popper-append-to-body": false
|
|
13586
|
+
},
|
|
13587
|
+
on: {
|
|
13588
|
+
"change": function($event) {
|
|
13589
|
+
return _vm.onFieldChange(field);
|
|
13590
|
+
}
|
|
13591
|
+
},
|
|
13592
|
+
nativeOn: {
|
|
13593
|
+
"keyup": function($event) {
|
|
13594
|
+
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter"))
|
|
13595
|
+
return null;
|
|
13596
|
+
return _vm.handleSearch.apply(null, arguments);
|
|
13597
|
+
}
|
|
13598
|
+
},
|
|
13599
|
+
model: {
|
|
13600
|
+
value: _vm.internalSearchModel[field.prop],
|
|
13601
|
+
callback: function($$v) {
|
|
13602
|
+
_vm.$set(_vm.internalSearchModel, field.prop, $$v);
|
|
13603
|
+
},
|
|
13604
|
+
expression: "internalSearchModel[field.prop]"
|
|
13605
|
+
}
|
|
13606
|
+
}, "el-select", field.props || {}, false), _vm._l(field.options || [], function(opt) {
|
|
13607
|
+
return _c("el-option", {
|
|
13608
|
+
key: opt.key !== void 0 ? opt.key : opt.value,
|
|
13609
|
+
attrs: {
|
|
13610
|
+
"label": opt.label || opt.value || opt.key,
|
|
13611
|
+
"value": opt.key !== void 0 ? opt.key : opt.value
|
|
13612
|
+
}
|
|
13613
|
+
});
|
|
13614
|
+
}), 1) : field.type === "date" || field.type === "picker" ? _c("el-date-picker", _vm._b({
|
|
13615
|
+
staticStyle: {
|
|
13616
|
+
"width": "100%"
|
|
13617
|
+
},
|
|
13618
|
+
attrs: {
|
|
13619
|
+
"type": "date",
|
|
13620
|
+
"placeholder": field.placeholder || "选择日期",
|
|
13621
|
+
"clearable": ""
|
|
13622
|
+
},
|
|
13623
|
+
model: {
|
|
13624
|
+
value: _vm.internalSearchModel[field.prop],
|
|
13625
|
+
callback: function($$v) {
|
|
13626
|
+
_vm.$set(_vm.internalSearchModel, field.prop, $$v);
|
|
13627
|
+
},
|
|
13628
|
+
expression: "internalSearchModel[field.prop]"
|
|
13629
|
+
}
|
|
13630
|
+
}, "el-date-picker", field.props || {}, false)) : field.type === "datetime" ? _c("el-date-picker", _vm._b({
|
|
13631
|
+
staticStyle: {
|
|
13632
|
+
"width": "100%"
|
|
13633
|
+
},
|
|
13634
|
+
attrs: {
|
|
13635
|
+
"type": "datetime",
|
|
13636
|
+
"placeholder": field.placeholder || "选择日期时间",
|
|
13637
|
+
"clearable": ""
|
|
13638
|
+
},
|
|
13639
|
+
model: {
|
|
13640
|
+
value: _vm.internalSearchModel[field.prop],
|
|
13641
|
+
callback: function($$v) {
|
|
13642
|
+
_vm.$set(_vm.internalSearchModel, field.prop, $$v);
|
|
13643
|
+
},
|
|
13644
|
+
expression: "internalSearchModel[field.prop]"
|
|
13645
|
+
}
|
|
13646
|
+
}, "el-date-picker", field.props || {}, false)) : field.type === "daterange" ? _c("el-date-picker", _vm._b({
|
|
13647
|
+
staticStyle: {
|
|
13648
|
+
"width": "100%"
|
|
13649
|
+
},
|
|
13650
|
+
attrs: {
|
|
13651
|
+
"type": "daterange",
|
|
13652
|
+
"range-separator": "至",
|
|
13653
|
+
"start-placeholder": "开始日期",
|
|
13654
|
+
"end-placeholder": "结束日期",
|
|
13655
|
+
"clearable": ""
|
|
13656
|
+
},
|
|
13657
|
+
model: {
|
|
13658
|
+
value: _vm.internalSearchModel[field.prop],
|
|
13659
|
+
callback: function($$v) {
|
|
13660
|
+
_vm.$set(_vm.internalSearchModel, field.prop, $$v);
|
|
13661
|
+
},
|
|
13662
|
+
expression: "internalSearchModel[field.prop]"
|
|
13663
|
+
}
|
|
13664
|
+
}, "el-date-picker", field.props || {}, false)) : field.type === "datetimerange" ? _c("el-date-picker", _vm._b({
|
|
13665
|
+
staticStyle: {
|
|
13666
|
+
"width": "100%"
|
|
13667
|
+
},
|
|
13668
|
+
attrs: {
|
|
13669
|
+
"type": "datetimerange",
|
|
13670
|
+
"range-separator": "至",
|
|
13671
|
+
"start-placeholder": "开始时间",
|
|
13672
|
+
"end-placeholder": "结束时间",
|
|
13673
|
+
"clearable": "",
|
|
13674
|
+
"default-time": ["00:00:00", "23:59:59"]
|
|
13675
|
+
},
|
|
13676
|
+
model: {
|
|
13677
|
+
value: _vm.internalSearchModel[field.prop],
|
|
13678
|
+
callback: function($$v) {
|
|
13679
|
+
_vm.$set(_vm.internalSearchModel, field.prop, $$v);
|
|
13680
|
+
},
|
|
13681
|
+
expression: "internalSearchModel[field.prop]"
|
|
13682
|
+
}
|
|
13683
|
+
}, "el-date-picker", field.props || {}, false)) : field.type === "numberRange" ? _c("ol-number-range", _vm._b({
|
|
13684
|
+
model: {
|
|
13685
|
+
value: _vm.internalSearchModel[field.prop],
|
|
13686
|
+
callback: function($$v) {
|
|
13687
|
+
_vm.$set(_vm.internalSearchModel, field.prop, $$v);
|
|
13688
|
+
},
|
|
13689
|
+
expression: "internalSearchModel[field.prop]"
|
|
13690
|
+
}
|
|
13691
|
+
}, "ol-number-range", field.props || {}, false)) : _c("el-input", _vm._b({
|
|
13692
|
+
attrs: {
|
|
13693
|
+
"placeholder": field.placeholder || `请输入${field.label}`,
|
|
13694
|
+
"clearable": ""
|
|
13695
|
+
},
|
|
13696
|
+
nativeOn: {
|
|
13697
|
+
"keyup": function($event) {
|
|
13698
|
+
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter"))
|
|
13699
|
+
return null;
|
|
13700
|
+
return _vm.handleSearch.apply(null, arguments);
|
|
13701
|
+
}
|
|
13702
|
+
},
|
|
13703
|
+
model: {
|
|
13704
|
+
value: _vm.internalSearchModel[field.prop],
|
|
13705
|
+
callback: function($$v) {
|
|
13706
|
+
_vm.$set(_vm.internalSearchModel, field.prop, $$v);
|
|
13707
|
+
},
|
|
13708
|
+
expression: "internalSearchModel[field.prop]"
|
|
13709
|
+
}
|
|
13710
|
+
}, "el-input", field.props || {}, false))], 1);
|
|
13711
|
+
}), 1), _c("div", {
|
|
13712
|
+
staticClass: "crud-search-actions"
|
|
13713
|
+
}, [_c("el-button", {
|
|
13714
|
+
attrs: {
|
|
13715
|
+
"type": "primary",
|
|
13716
|
+
"size": "small",
|
|
13717
|
+
"disabled": _vm.fetchingData
|
|
13718
|
+
},
|
|
13719
|
+
on: {
|
|
13720
|
+
"click": _vm.handleSearch
|
|
13721
|
+
}
|
|
13722
|
+
}, [_vm._v("查询")]), _c("el-button", {
|
|
13723
|
+
attrs: {
|
|
13724
|
+
"plain": "",
|
|
13725
|
+
"size": "small"
|
|
13726
|
+
},
|
|
13727
|
+
on: {
|
|
13728
|
+
"click": _vm.handleReset
|
|
13729
|
+
}
|
|
13730
|
+
}, [_vm._v("重置")]), _vm.searchFields.length > _vm.columnsPerRow ? _c("el-button", {
|
|
13731
|
+
attrs: {
|
|
13732
|
+
"plain": "",
|
|
13733
|
+
"size": "small",
|
|
13734
|
+
"icon": _vm.searchExpanded ? "el-icon-arrow-up" : "el-icon-arrow-down"
|
|
13735
|
+
},
|
|
13736
|
+
on: {
|
|
13737
|
+
"click": function($event) {
|
|
13738
|
+
_vm.searchExpanded = !_vm.searchExpanded;
|
|
13739
|
+
}
|
|
13740
|
+
}
|
|
13741
|
+
}, [_vm._v(" " + _vm._s(_vm.searchExpanded ? "收起" : "展开") + " ")]) : _vm._e(), _vm.$cfg("showCustomSearch") ? _c("el-button", {
|
|
13742
|
+
attrs: {
|
|
13743
|
+
"plain": "",
|
|
13744
|
+
"size": "small",
|
|
13745
|
+
"icon": "el-icon-setting"
|
|
13746
|
+
},
|
|
13747
|
+
on: {
|
|
13748
|
+
"click": _vm.openConfigDialog
|
|
13749
|
+
}
|
|
13750
|
+
}, [_vm._v(" 配置 ")]) : _vm._e()], 1)]) : _vm._e(), _vm.searchFields.length === 0 && !_vm.$cfg("showCustomSearch") ? _c("div", {
|
|
13751
|
+
staticClass: "crud-search-actions"
|
|
13752
|
+
}, [_c("el-button", {
|
|
13753
|
+
attrs: {
|
|
13754
|
+
"type": "primary",
|
|
13755
|
+
"size": "small",
|
|
13756
|
+
"disabled": _vm.fetchingData
|
|
13757
|
+
},
|
|
13758
|
+
on: {
|
|
13759
|
+
"click": _vm.handleSearch
|
|
13760
|
+
}
|
|
13761
|
+
}, [_vm._v("查询")]), _c("el-button", {
|
|
13762
|
+
attrs: {
|
|
13763
|
+
"plain": "",
|
|
13764
|
+
"size": "small"
|
|
13765
|
+
},
|
|
13766
|
+
on: {
|
|
13767
|
+
"click": _vm.handleReset
|
|
13768
|
+
}
|
|
13769
|
+
}, [_vm._v("重置")])], 1) : _vm._e()], 1) : _vm._e(), _vm.configDialogVisible ? _c("search-config-dialog", _vm._b({
|
|
13770
|
+
attrs: {
|
|
13771
|
+
"visible": _vm.configDialogVisible,
|
|
13772
|
+
"table-search": _vm.searchFieldsForDialog,
|
|
13773
|
+
"form-search-data": _vm.formSearchDataForDialog,
|
|
13774
|
+
"form-search": _vm.searchModelForDialog,
|
|
13775
|
+
"customs": _vm.resolvedCustoms
|
|
13776
|
+
},
|
|
13777
|
+
on: {
|
|
13778
|
+
"update:visible": function($event) {
|
|
13779
|
+
_vm.configDialogVisible = $event;
|
|
13780
|
+
},
|
|
13781
|
+
"save": _vm.handleSaveConfig
|
|
13782
|
+
}
|
|
13783
|
+
}, "search-config-dialog", _vm.$attrs, false)) : _vm._e(), _vm.toolbarVisible ? _c("div", {
|
|
13784
|
+
staticClass: "crud-toolbar"
|
|
13785
|
+
}, [_c("div", {
|
|
13786
|
+
staticClass: "crud-toolbar-left"
|
|
13787
|
+
}, [_vm._t("toolbarBefore", null, null, _vm.toolbarSlotScope), _vm._l(_vm.btnlist, function(btn, index2) {
|
|
13788
|
+
return _c("el-button", {
|
|
13789
|
+
key: index2,
|
|
13790
|
+
attrs: {
|
|
13791
|
+
"size": "small",
|
|
13792
|
+
"type": btn.types ? btn.types : "primary",
|
|
13793
|
+
"disabled": btn.disabled
|
|
13794
|
+
},
|
|
13795
|
+
on: {
|
|
13796
|
+
"click": btn.method
|
|
13797
|
+
}
|
|
13798
|
+
}, [btn.icon ? _c("i", {
|
|
13799
|
+
class: btn.icon
|
|
13800
|
+
}) : _vm._e(), _vm._v(" " + _vm._s(btn.title) + " ")]);
|
|
13801
|
+
}), _vm._t("toolbarAfter", null, null, _vm.toolbarSlotScope)], 2), _c("div", {
|
|
13802
|
+
staticClass: "crud-toolbar-right"
|
|
13803
|
+
}, [_vm._t("toolbarActions", null, null, _vm.toolbarSlotScope), _vm.$cfg("showColumnFilterBtn") ? [_vm.columnConfigMode === "simple" ? _c("el-dropdown", {
|
|
13804
|
+
staticClass: "crud-toolbar-action",
|
|
13805
|
+
attrs: {
|
|
13806
|
+
"trigger": "click"
|
|
13807
|
+
}
|
|
13808
|
+
}, [_c("span", {
|
|
13809
|
+
staticClass: "crud-toolbar-icon"
|
|
13810
|
+
}, [_c("i", {
|
|
13811
|
+
staticClass: "el-icon-s-operation"
|
|
13812
|
+
})]), _c("el-dropdown-menu", {
|
|
13813
|
+
staticClass: "crud-column-filter",
|
|
13814
|
+
attrs: {
|
|
13815
|
+
"slot": "dropdown"
|
|
13816
|
+
},
|
|
13817
|
+
slot: "dropdown"
|
|
13818
|
+
}, [_c("el-checkbox-group", {
|
|
13819
|
+
model: {
|
|
13820
|
+
value: _vm.checkedColumns,
|
|
13821
|
+
callback: function($$v) {
|
|
13822
|
+
_vm.checkedColumns = $$v;
|
|
13823
|
+
},
|
|
13824
|
+
expression: "checkedColumns"
|
|
13825
|
+
}
|
|
13826
|
+
}, _vm._l(_vm.filterableColumns, function(col) {
|
|
13827
|
+
return _c("el-checkbox", {
|
|
13828
|
+
key: col.prop,
|
|
13829
|
+
staticClass: "crud-column-checkbox",
|
|
13830
|
+
attrs: {
|
|
13831
|
+
"label": col.prop
|
|
13832
|
+
}
|
|
13833
|
+
}, [_vm._v(" " + _vm._s(col.label) + " ")]);
|
|
13834
|
+
}), 1)], 1)], 1) : _c("span", {
|
|
13835
|
+
staticClass: "crud-toolbar-icon",
|
|
13836
|
+
on: {
|
|
13837
|
+
"click": _vm.openColumnConfig
|
|
13838
|
+
}
|
|
13839
|
+
}, [_c("i", {
|
|
13840
|
+
staticClass: "el-icon-s-operation"
|
|
13841
|
+
})])] : _vm._e(), _vm.$cfg("showRefreshBtn") ? _c("span", {
|
|
13842
|
+
staticClass: "crud-toolbar-icon",
|
|
13843
|
+
on: {
|
|
13844
|
+
"click": _vm.handleRefresh
|
|
13845
|
+
}
|
|
13846
|
+
}, [_c("i", {
|
|
13847
|
+
staticClass: "el-icon-refresh"
|
|
13848
|
+
})]) : _vm._e(), _vm.$cfg("showPrintBtn") ? _c("span", {
|
|
13849
|
+
staticClass: "crud-toolbar-icon",
|
|
13850
|
+
on: {
|
|
13851
|
+
"click": _vm.handlePrint
|
|
13852
|
+
}
|
|
13853
|
+
}, [_c("i", {
|
|
13854
|
+
staticClass: "el-icon-printer"
|
|
13855
|
+
})]) : _vm._e(), _vm.$cfg("showSmartPrintBtn") ? _c("span", {
|
|
13856
|
+
staticClass: "crud-toolbar-icon"
|
|
13857
|
+
}, [_c("print-template-selector", _vm._b({
|
|
13858
|
+
attrs: {
|
|
13859
|
+
"menu-id": _vm.smartPrintMenuId,
|
|
13860
|
+
"print-data": _vm.printData || _vm.displayTableData,
|
|
13861
|
+
"multiple-selection": _vm.currentSelection
|
|
13862
|
+
}
|
|
13863
|
+
}, "print-template-selector", _vm.$attrs, false))], 1) : _vm._e(), _vm.$cfg("showEntityChangeBtn") ? _c("span", {
|
|
13864
|
+
staticClass: "crud-toolbar-icon",
|
|
13865
|
+
attrs: {
|
|
13866
|
+
"title": "实体变更记录"
|
|
13867
|
+
},
|
|
13868
|
+
on: {
|
|
13869
|
+
"click": _vm.openEntityChange
|
|
13870
|
+
}
|
|
13871
|
+
}, [_c("i", {
|
|
13872
|
+
staticClass: "el-icon-receiving"
|
|
13873
|
+
})]) : _vm._e(), _vm._t("toolbarActionsAfter", null, null, _vm.toolbarSlotScope)], 2)]) : _vm._e(), _c("div", {
|
|
13874
|
+
key: _vm.tableKey,
|
|
13875
|
+
staticClass: "crud-table"
|
|
13876
|
+
}, [_c("el-table", _vm._b({
|
|
13877
|
+
directives: [{
|
|
13878
|
+
name: "loading",
|
|
13879
|
+
rawName: "v-loading",
|
|
13880
|
+
value: _vm.fetchingData,
|
|
13881
|
+
expression: "fetchingData"
|
|
13882
|
+
}],
|
|
13883
|
+
ref: "crudTable",
|
|
13884
|
+
staticStyle: {
|
|
13885
|
+
"width": "100%"
|
|
13886
|
+
},
|
|
13887
|
+
attrs: {
|
|
13888
|
+
"border": "",
|
|
13889
|
+
"data": _vm.displayTableData,
|
|
13890
|
+
"height": "100%"
|
|
13891
|
+
},
|
|
13892
|
+
on: {
|
|
13893
|
+
"selection-change": _vm.onSelectionChange,
|
|
13894
|
+
"row-click": _vm.onRowClick,
|
|
13895
|
+
"sort-change": _vm.onSortChange
|
|
13896
|
+
}
|
|
13897
|
+
}, "el-table", _vm.tableAttrs, false), [_vm.$cfg("showSelection") ? _c("el-table-column", {
|
|
13898
|
+
attrs: {
|
|
13899
|
+
"width": "55",
|
|
13900
|
+
"align": "center",
|
|
13901
|
+
"type": "selection"
|
|
13902
|
+
}
|
|
13903
|
+
}) : _vm._e(), _vm.$cfg("showIndex") ? _c("el-table-column", {
|
|
13904
|
+
attrs: {
|
|
13905
|
+
"width": "55",
|
|
13906
|
+
"align": "center",
|
|
13907
|
+
"type": "index",
|
|
13908
|
+
"label": "序号",
|
|
13909
|
+
"index": _vm.computeIndex
|
|
13910
|
+
}
|
|
13911
|
+
}) : _vm._e(), _vm.$scopedSlots.column ? [_vm._t("column", null, {
|
|
13912
|
+
"columns": _vm.visibleColumnsForSlot
|
|
13913
|
+
})] : [_vm._l(_vm.visibleColumns, function(col) {
|
|
13914
|
+
return [_c("TableColumn", {
|
|
13915
|
+
key: col.prop,
|
|
13916
|
+
attrs: {
|
|
13917
|
+
"column": col
|
|
13918
|
+
},
|
|
13919
|
+
scopedSlots: _vm._u([_vm._l(_vm.$scopedSlots, function(slotFn, slotName) {
|
|
13920
|
+
return {
|
|
13921
|
+
key: slotName,
|
|
13922
|
+
fn: function(slotProps) {
|
|
13923
|
+
return [_vm._t(slotName, null, null, slotProps)];
|
|
13924
|
+
}
|
|
13925
|
+
};
|
|
13926
|
+
})], null, true)
|
|
13927
|
+
})];
|
|
13928
|
+
})], _vm.operates && _vm.operates.length > 0 ? _c("el-table-column", _vm._b({
|
|
13929
|
+
attrs: {
|
|
13930
|
+
"label": "操作",
|
|
13931
|
+
"align": "center",
|
|
13932
|
+
"min-width": _vm.operatesMinWidth
|
|
13933
|
+
},
|
|
13934
|
+
scopedSlots: _vm._u([{
|
|
13935
|
+
key: "default",
|
|
13936
|
+
fn: function(_ref2) {
|
|
13937
|
+
var row = _ref2.row, $index = _ref2.$index;
|
|
13938
|
+
return [_c("div", {
|
|
13939
|
+
staticClass: "crud-operate-group"
|
|
13940
|
+
}, [_vm._l(_vm.operates, function(btn, idx) {
|
|
13941
|
+
return [(typeof btn.hidden === "function" ? !btn.hidden(row, $index) : !btn.hidden) ? _c("el-button", {
|
|
13942
|
+
key: idx,
|
|
13943
|
+
attrs: {
|
|
13944
|
+
"size": btn.size || "small",
|
|
13945
|
+
"type": btn.type || "text",
|
|
13946
|
+
"icon": btn.icon,
|
|
13947
|
+
"disabled": typeof btn.disabled === "function" ? btn.disabled(row, $index) : !!btn.disabled
|
|
13948
|
+
},
|
|
13949
|
+
on: {
|
|
13950
|
+
"click": function($event) {
|
|
13951
|
+
$event.stopPropagation();
|
|
13952
|
+
btn.click && btn.click(row, $index);
|
|
13953
|
+
}
|
|
13954
|
+
}
|
|
13955
|
+
}, [_vm._v(" " + _vm._s(btn.label) + " ")]) : _vm._e()];
|
|
13956
|
+
})], 2)];
|
|
13957
|
+
}
|
|
13958
|
+
}], null, false, 2917153455)
|
|
13959
|
+
}, "el-table-column", _vm.operatesAttrs || {}, false)) : _vm._e(), _c("div", {
|
|
13960
|
+
staticClass: "crud-empty",
|
|
13961
|
+
attrs: {
|
|
13962
|
+
"slot": "empty"
|
|
13963
|
+
},
|
|
13964
|
+
slot: "empty"
|
|
13965
|
+
}, [_vm._t("empty", function() {
|
|
13966
|
+
return [_c("span", [_vm._v("暂无数据")])];
|
|
13967
|
+
})], 2)], 2)], 1), _vm.displayPagination.show !== false ? _c("div", {
|
|
13968
|
+
staticClass: "crud-pagination"
|
|
13969
|
+
}, [_c("el-pagination", {
|
|
13970
|
+
attrs: {
|
|
13971
|
+
"current-page": _vm.displayPagination.page,
|
|
13972
|
+
"page-sizes": _vm.pageSizes,
|
|
13973
|
+
"page-size": _vm.displayPagination.limit,
|
|
13974
|
+
"total": _vm.displayPagination.total,
|
|
13975
|
+
"layout": "total, sizes, prev, pager, next, jumper"
|
|
13976
|
+
},
|
|
13977
|
+
on: {
|
|
13978
|
+
"size-change": _vm.onSizeChange,
|
|
13979
|
+
"current-change": _vm.onPageChange
|
|
13980
|
+
}
|
|
13981
|
+
})], 1) : _vm._e(), _vm.columnConfigMode === "persisted" ? _c("ol-column-config", {
|
|
13982
|
+
attrs: {
|
|
13983
|
+
"visible": _vm.columnConfigVisible,
|
|
13984
|
+
"columns": _vm.columnsForConfig,
|
|
13985
|
+
"page-key": _vm.pageKey,
|
|
13986
|
+
"menu-id": _vm.resolvedMenuId,
|
|
13987
|
+
"role-list": _vm.columnRoleList
|
|
13988
|
+
},
|
|
13989
|
+
on: {
|
|
13990
|
+
"update:visible": function($event) {
|
|
13991
|
+
_vm.columnConfigVisible = $event;
|
|
13992
|
+
},
|
|
13993
|
+
"save": _vm.onColumnConfigSave
|
|
12579
13994
|
}
|
|
12580
|
-
})
|
|
12581
|
-
staticClass: "dialog-footer",
|
|
13995
|
+
}) : _vm._e(), _c("entity-change-record", {
|
|
12582
13996
|
attrs: {
|
|
12583
|
-
"
|
|
13997
|
+
"visible": _vm.entityChangeVisible,
|
|
13998
|
+
"selected-rows": _vm.currentSelection,
|
|
13999
|
+
"page-params": _vm.pageParams
|
|
12584
14000
|
},
|
|
12585
|
-
slot: "footer"
|
|
12586
|
-
}, [_c("el-button", {
|
|
12587
14001
|
on: {
|
|
12588
|
-
"
|
|
12589
|
-
_vm.
|
|
14002
|
+
"update:visible": function($event) {
|
|
14003
|
+
_vm.entityChangeVisible = $event;
|
|
12590
14004
|
}
|
|
12591
14005
|
}
|
|
12592
|
-
}
|
|
14006
|
+
}), _c("print-template", {
|
|
14007
|
+
directives: [{
|
|
14008
|
+
name: "show",
|
|
14009
|
+
rawName: "v-show",
|
|
14010
|
+
value: false,
|
|
14011
|
+
expression: "false"
|
|
14012
|
+
}],
|
|
14013
|
+
ref: "printTemplate",
|
|
14014
|
+
staticClass: "crud-print-template",
|
|
12593
14015
|
attrs: {
|
|
12594
|
-
"
|
|
12595
|
-
},
|
|
12596
|
-
on: {
|
|
12597
|
-
"click": _vm.handleSubmit
|
|
14016
|
+
"print-list-obj": _vm.printListObj
|
|
12598
14017
|
}
|
|
12599
|
-
}
|
|
14018
|
+
})], 1);
|
|
12600
14019
|
};
|
|
12601
14020
|
var staticRenderFns$2 = [];
|
|
12602
14021
|
const index_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
|
|
14022
|
+
const index_vue_vue_type_style_index_1_lang$1 = "";
|
|
14023
|
+
const DATE_TYPES = ["date", "datetime", "daterange", "datetimerange", "month", "monthrange", "year"];
|
|
14024
|
+
const newFieldToOld = (field) => ({
|
|
14025
|
+
...field,
|
|
14026
|
+
value: field.prop,
|
|
14027
|
+
inputType: DATE_TYPES.includes(field.type) ? "picker" : field.type,
|
|
14028
|
+
children: field.options,
|
|
14029
|
+
dateType: DATE_TYPES.includes(field.type) ? field.type : void 0,
|
|
14030
|
+
show: !field.visible
|
|
14031
|
+
});
|
|
14032
|
+
const oldFieldToNew = (field) => {
|
|
14033
|
+
const { value, inputType, children, dateType, ...rest } = field;
|
|
14034
|
+
let type = inputType || field.type;
|
|
14035
|
+
if (type === "picker") {
|
|
14036
|
+
type = dateType || field.props && field.props.type || "date";
|
|
14037
|
+
}
|
|
14038
|
+
return {
|
|
14039
|
+
...rest,
|
|
14040
|
+
prop: value || field.prop,
|
|
14041
|
+
type,
|
|
14042
|
+
options: children || field.options
|
|
14043
|
+
};
|
|
14044
|
+
};
|
|
12603
14045
|
const __vue2_script$2 = {
|
|
12604
|
-
name: "
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
|
|
12610
|
-
|
|
14046
|
+
name: "crud",
|
|
14047
|
+
components: {
|
|
14048
|
+
OlNumberRange,
|
|
14049
|
+
SearchConfigDialog,
|
|
14050
|
+
TableColumn,
|
|
14051
|
+
PrintTemplateSelector: OlDropdownPrint,
|
|
14052
|
+
PrintTemplate,
|
|
14053
|
+
OlColumnConfig,
|
|
14054
|
+
EntityChangeRecord
|
|
14055
|
+
},
|
|
14056
|
+
directives: {
|
|
14057
|
+
/** el-select 滚动加载:滚动到接近底部时触发回调 */
|
|
14058
|
+
"el-select-loadmore": {
|
|
14059
|
+
bind(el, binding) {
|
|
14060
|
+
const tryBind = () => {
|
|
14061
|
+
const wrap = el.querySelector(".el-select-dropdown .el-select-dropdown__wrap");
|
|
14062
|
+
if (!wrap)
|
|
14063
|
+
return;
|
|
14064
|
+
wrap._loadmoreHandler = function() {
|
|
14065
|
+
if (this.scrollHeight - this.scrollTop - this.clientHeight <= 5) {
|
|
14066
|
+
binding.value();
|
|
14067
|
+
}
|
|
14068
|
+
};
|
|
14069
|
+
wrap.addEventListener("scroll", wrap._loadmoreHandler);
|
|
14070
|
+
};
|
|
14071
|
+
el._tryBindLoadmore = tryBind;
|
|
12611
14072
|
},
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
currentItem: {},
|
|
12615
|
-
templateList: [],
|
|
12616
|
-
dialogVisible: false,
|
|
12617
|
-
dialogTitle: "新增模板",
|
|
12618
|
-
form: {
|
|
12619
|
-
id: null,
|
|
12620
|
-
templeteName: "",
|
|
12621
|
-
remark: "",
|
|
12622
|
-
templeteJson: "",
|
|
12623
|
-
sourceUrl: ""
|
|
14073
|
+
inserted(el) {
|
|
14074
|
+
el._tryBindLoadmore && el._tryBindLoadmore();
|
|
12624
14075
|
},
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
14076
|
+
unbind(el) {
|
|
14077
|
+
const wrap = el.querySelector(".el-select-dropdown .el-select-dropdown__wrap");
|
|
14078
|
+
if (wrap && wrap._loadmoreHandler) {
|
|
14079
|
+
wrap.removeEventListener("scroll", wrap._loadmoreHandler);
|
|
14080
|
+
}
|
|
12628
14081
|
}
|
|
14082
|
+
}
|
|
14083
|
+
},
|
|
14084
|
+
props: {
|
|
14085
|
+
// ===== Swagger 自动映射 =====
|
|
14086
|
+
/** Swagger 接口路径(如 "/api/app/product"),自动获取列和搜索字段 */
|
|
14087
|
+
url: { type: String, default: "" },
|
|
14088
|
+
// ===== 搜索相关 =====
|
|
14089
|
+
/** 是否显示搜索栏。未传时回退到 $olBaseConfig */
|
|
14090
|
+
showSearch: { type: Boolean, default: true },
|
|
14091
|
+
/** 搜索字段配置数组 */
|
|
14092
|
+
searchFields: { type: Array, default: () => [] },
|
|
14093
|
+
/** 搜索表单初始值 */
|
|
14094
|
+
searchModel: { type: Object, default: () => ({}) },
|
|
14095
|
+
/** 每行展示的搜索字段数 */
|
|
14096
|
+
columnsPerRow: { type: Number, default: 4 },
|
|
14097
|
+
/** 搜索表单校验规则 */
|
|
14098
|
+
searchRules: { type: Object, default: () => ({}) },
|
|
14099
|
+
/** 是否显示"配置"按钮(动态勾选搜索字段)。未传时回退到 $olBaseConfig */
|
|
14100
|
+
showCustomSearch: { type: Boolean, default: false },
|
|
14101
|
+
/** 后端返回的可选搜索字段列表,用于配置弹窗 */
|
|
14102
|
+
customs: { type: Array, default: () => [] },
|
|
14103
|
+
/**
|
|
14104
|
+
* 菜单ID,用于搜索配置的持久化(加载/保存)。
|
|
14105
|
+
* 不传则自动从 localStorage.wms.SET_MENUS 根据当前路由匹配
|
|
14106
|
+
*/
|
|
14107
|
+
menuId: { type: [String, Number], default: "" },
|
|
14108
|
+
// ===== 表格相关 =====
|
|
14109
|
+
/** 列配置数组 */
|
|
14110
|
+
columns: { type: Array, default: () => [] },
|
|
14111
|
+
/** 是否显示多选列。未传时回退到 $olBaseConfig */
|
|
14112
|
+
showSelection: { type: Boolean, default: true },
|
|
14113
|
+
/** 是否显示序号列。未传时回退到 $olBaseConfig */
|
|
14114
|
+
showIndex: { type: Boolean, default: true },
|
|
14115
|
+
/** 操作列按钮 */
|
|
14116
|
+
operates: { type: Array, default: () => [] },
|
|
14117
|
+
/** 操作列配置(透传 el-table-column) */
|
|
14118
|
+
operatesAttrs: { type: Object, default: () => ({}) },
|
|
14119
|
+
/** 透传给 el-table 的属性 */
|
|
14120
|
+
tableAttrs: { type: Object, default: () => ({}) },
|
|
14121
|
+
// ===== 工具栏相关 =====
|
|
14122
|
+
/** 列配置模式:'simple'=下拉checkbox | 'persisted'=弹窗拖拽+API持久化 */
|
|
14123
|
+
columnConfigMode: { type: String, default: "simple" },
|
|
14124
|
+
/** 列配置持久化的页面标识(默认取 $route.path) */
|
|
14125
|
+
pageKey: { type: String, default: "" },
|
|
14126
|
+
/** 是否显示列过滤入口。未传时回退到 $olBaseConfig */
|
|
14127
|
+
showColumnFilterBtn: { type: Boolean, default: false },
|
|
14128
|
+
/** 是否显示刷新按钮。未传时回退到 $olBaseConfig */
|
|
14129
|
+
showRefreshBtn: { type: Boolean, default: true },
|
|
14130
|
+
/** 是否显示打印按钮。未传时回退到 $olBaseConfig */
|
|
14131
|
+
showPrintBtn: { type: Boolean, default: true },
|
|
14132
|
+
/** 是否显示智能打印按钮(模板打印),需配合 smartPrintMenuId / printData。未传时回退到 $olBaseConfig */
|
|
14133
|
+
showSmartPrintBtn: { type: Boolean, default: false },
|
|
14134
|
+
/** 智能打印的菜单 ID */
|
|
14135
|
+
smartPrintMenuId: { type: String, default: "" },
|
|
14136
|
+
/** 智能打印的数据 */
|
|
14137
|
+
printData: { type: Array, default: () => [] },
|
|
14138
|
+
/** 是否显示实体变更记录按钮(勾选行后出现)。未传时回退到 $olBaseConfig */
|
|
14139
|
+
showEntityChangeBtn: { type: Boolean, default: false },
|
|
14140
|
+
/** 菜单配置的按钮列表 [{ title, types, icon, disabled, method }] */
|
|
14141
|
+
btnlist: { type: Array, default: () => [] },
|
|
14142
|
+
// ===== 分页相关 =====
|
|
14143
|
+
/** 分页配置 { page, limit, total, show } */
|
|
14144
|
+
pagination: {
|
|
14145
|
+
type: Object,
|
|
14146
|
+
default: () => ({ page: 1, limit: 30, total: 0, show: true })
|
|
14147
|
+
},
|
|
14148
|
+
/** 每页条数选项 */
|
|
14149
|
+
pageSizes: { type: Array, default: () => [20, 30, 40, 60, 100, 200] },
|
|
14150
|
+
// ===== 钩子(对象入参,方便后期扩展) =====
|
|
14151
|
+
/** Swagger 搜索字段映射后、合并前。入参 { columns },返回 { columns } */
|
|
14152
|
+
onSearchSwagger: { type: Function, default: null },
|
|
14153
|
+
/** 搜索字段合并完成+日期识别后。入参 { columns },返回 { columns } */
|
|
14154
|
+
onSearchMerged: { type: Function, default: null },
|
|
14155
|
+
/** Swagger 表格列映射后、合并前。入参 { columns },返回 { columns } */
|
|
14156
|
+
onTableSwagger: { type: Function, default: null },
|
|
14157
|
+
/** 表格列合并完成+补标签后。入参 { columns },返回 { columns } */
|
|
14158
|
+
onTableMerged: { type: Function, default: null },
|
|
14159
|
+
// ===== 数据请求 =====
|
|
14160
|
+
/**
|
|
14161
|
+
* 自定义数据请求函数 ({ searchParams, filterConditions, page, limit, pagination }) => ({ rows, total })
|
|
14162
|
+
* 提供后走手动请求模式(父组件调接口),不传则走自动模式(crud 内部调接口)
|
|
14163
|
+
*/
|
|
14164
|
+
fetchData: { type: Function, default: null },
|
|
14165
|
+
/**
|
|
14166
|
+
* 分页参数名映射,适配不同后端命名习惯
|
|
14167
|
+
* 默认 { page: 'Page', limit: 'MaxResultCount' }(ABP 框架)
|
|
14168
|
+
*/
|
|
14169
|
+
pageParams: {
|
|
14170
|
+
type: Object,
|
|
14171
|
+
default: () => ({ page: "Page", limit: "MaxResultCount" })
|
|
14172
|
+
},
|
|
14173
|
+
/** 响应数据解析函数 (response) => ({ rows: [], total: 0 }),适配不同后端返回格式 */
|
|
14174
|
+
responseHandler: { type: Function, default: null },
|
|
14175
|
+
// ===== 其他 =====
|
|
14176
|
+
/** 请求方式 get / post,默认 get */
|
|
14177
|
+
method: { type: String, default: "get" }
|
|
14178
|
+
},
|
|
14179
|
+
data() {
|
|
14180
|
+
return {
|
|
14181
|
+
// 内部搜索模型(copy from prop + defaultValue)
|
|
14182
|
+
internalSearchModel: {},
|
|
14183
|
+
// 展开/收起
|
|
14184
|
+
searchExpanded: false,
|
|
14185
|
+
// 配置弹窗
|
|
14186
|
+
configDialogVisible: false,
|
|
14187
|
+
// autoFetch 模式下从接口返回中自动捕获的 customs
|
|
14188
|
+
fetchedCustoms: [],
|
|
14189
|
+
// 当前选中行
|
|
14190
|
+
currentSelection: [],
|
|
14191
|
+
// 列过滤
|
|
14192
|
+
checkedColumns: [],
|
|
14193
|
+
// 表格 key,用于强制重渲染
|
|
14194
|
+
tableKey: 0,
|
|
14195
|
+
// 自动请求时内部 loading 标识
|
|
14196
|
+
fetchingData: false,
|
|
14197
|
+
// 自动请求模式下的内部数据存储
|
|
14198
|
+
internalTableData: [],
|
|
14199
|
+
internalPagination: { page: 1, limit: 30, total: 0 },
|
|
14200
|
+
// 打印数据
|
|
14201
|
+
printListObj: { title: "", tableHeader: [], tableData: [] },
|
|
14202
|
+
// 列配置弹窗(persisted 模式)
|
|
14203
|
+
columnConfigVisible: false,
|
|
14204
|
+
// 实体变更记录弹窗
|
|
14205
|
+
entityChangeVisible: false,
|
|
14206
|
+
hasColumnConfig: false,
|
|
14207
|
+
showColumnRoleConfig: false,
|
|
14208
|
+
columnRoleList: []
|
|
12629
14209
|
};
|
|
12630
14210
|
},
|
|
12631
|
-
|
|
12632
|
-
|
|
14211
|
+
computed: {
|
|
14212
|
+
/** 实际请求方式 */
|
|
14213
|
+
finalMethod() {
|
|
14214
|
+
return this.method || this.$olBaseConfig && this.$olBaseConfig.method || "get";
|
|
14215
|
+
},
|
|
14216
|
+
/** 是否启用内部数据管理(自动模式有 url,手动模式有 fetchData) */
|
|
14217
|
+
shouldAutoFetch() {
|
|
14218
|
+
return !!this.url || typeof this.fetchData === "function";
|
|
14219
|
+
},
|
|
14220
|
+
/** 实际展示的表格数据(crud 内部管理) */
|
|
14221
|
+
displayTableData() {
|
|
14222
|
+
return this.internalTableData;
|
|
14223
|
+
},
|
|
14224
|
+
/** 实际使用的分页对象(crud 内部管理) */
|
|
14225
|
+
displayPagination() {
|
|
14226
|
+
return this.internalPagination;
|
|
14227
|
+
},
|
|
14228
|
+
/** 工具栏插槽统一作用域,尽可能多传数据方便用户 */
|
|
14229
|
+
toolbarSlotScope() {
|
|
14230
|
+
return {
|
|
14231
|
+
loading: this.fetchingData,
|
|
14232
|
+
selection: this.currentSelection,
|
|
14233
|
+
tableData: this.displayTableData,
|
|
14234
|
+
pagination: this.displayPagination,
|
|
14235
|
+
searchModel: this.internalSearchModel,
|
|
14236
|
+
columns: this.visibleColumns
|
|
14237
|
+
};
|
|
14238
|
+
},
|
|
14239
|
+
/** 工具栏是否显示 */
|
|
14240
|
+
toolbarVisible() {
|
|
14241
|
+
return this.btnlist.length || this.$slots.toolbarBefore || this.$slots.toolbarAfter || this.$slots.toolbarActions || this.$slots.toolbarActionsAfter || this.$cfg("showColumnFilterBtn") || this.$cfg("showRefreshBtn") || this.$cfg("showPrintBtn") || this.$cfg("showSmartPrintBtn") || this.$cfg("showEntityChangeBtn");
|
|
14242
|
+
},
|
|
14243
|
+
/** 可见的搜索字段(visible !== false) */
|
|
14244
|
+
visibleSearchFields() {
|
|
14245
|
+
const all = this.searchFields.filter((f2) => f2.visible !== false);
|
|
14246
|
+
if (!this.searchExpanded && all.length > this.columnsPerRow) {
|
|
14247
|
+
return all.slice(0, this.columnsPerRow);
|
|
14248
|
+
}
|
|
14249
|
+
return all;
|
|
14250
|
+
},
|
|
14251
|
+
/** 可见的表格列 */
|
|
14252
|
+
visibleColumns() {
|
|
14253
|
+
return this.columns.filter((col) => {
|
|
14254
|
+
if (col.children && col.children.length)
|
|
14255
|
+
return true;
|
|
14256
|
+
return col.show !== false;
|
|
14257
|
+
});
|
|
14258
|
+
},
|
|
14259
|
+
/** 传给 #column 插槽的列数据 */
|
|
14260
|
+
visibleColumnsForSlot() {
|
|
14261
|
+
return this.visibleColumns;
|
|
14262
|
+
},
|
|
14263
|
+
/** 可供过滤的列(有 prop 的叶子列) */
|
|
14264
|
+
filterableColumns() {
|
|
14265
|
+
const result = [];
|
|
14266
|
+
const walk = (cols) => {
|
|
14267
|
+
(cols || []).forEach((col) => {
|
|
14268
|
+
if (col.children && col.children.length) {
|
|
14269
|
+
walk(col.children);
|
|
14270
|
+
} else if (col.prop) {
|
|
14271
|
+
result.push(col);
|
|
14272
|
+
}
|
|
14273
|
+
});
|
|
14274
|
+
};
|
|
14275
|
+
walk(this.columns);
|
|
14276
|
+
return result;
|
|
14277
|
+
},
|
|
14278
|
+
/** 操作列最小宽度(根据按钮数量估算) */
|
|
14279
|
+
operatesMinWidth() {
|
|
14280
|
+
const len = (this.operates || []).length;
|
|
14281
|
+
if (len <= 2)
|
|
14282
|
+
return "100px";
|
|
14283
|
+
if (len <= 4)
|
|
14284
|
+
return "160px";
|
|
14285
|
+
return "200px";
|
|
14286
|
+
},
|
|
14287
|
+
/** 传给 OlColumnConfig 的列数据(全部叶子列) */
|
|
14288
|
+
columnsForConfig() {
|
|
14289
|
+
return this.filterableColumns.map((col) => ({
|
|
14290
|
+
...col,
|
|
14291
|
+
alias: col.alias || col.label,
|
|
14292
|
+
fixed: col.fixed || false,
|
|
14293
|
+
show: col.show !== false
|
|
14294
|
+
}));
|
|
14295
|
+
},
|
|
14296
|
+
/** 解析后的菜单ID(透传给 ol-column-config) */
|
|
14297
|
+
resolvedMenuId() {
|
|
14298
|
+
return this.resolveMenuId();
|
|
14299
|
+
},
|
|
14300
|
+
/** 搜索字段宽度(根据每行列数动态计算) */
|
|
14301
|
+
searchItemWidth() {
|
|
14302
|
+
const cols = this.columnsPerRow || 4;
|
|
14303
|
+
return `calc(${100 / cols}% - 4px)`;
|
|
14304
|
+
},
|
|
14305
|
+
// --- 兼容 SearchConfigDialog 的数据格式 ---
|
|
14306
|
+
/** 旧格式的 tableSearch */
|
|
14307
|
+
searchFieldsForDialog() {
|
|
14308
|
+
return (this.searchFields || []).map(newFieldToOld);
|
|
14309
|
+
},
|
|
14310
|
+
/** 旧格式的 formSearchData */
|
|
14311
|
+
formSearchDataForDialog() {
|
|
14312
|
+
return {
|
|
14313
|
+
tableSearch: this.searchFieldsForDialog,
|
|
14314
|
+
rules: this.searchRules || {},
|
|
14315
|
+
value: this.internalSearchModel || {},
|
|
14316
|
+
options: {},
|
|
14317
|
+
reset: false,
|
|
14318
|
+
customs: this.resolvedCustoms
|
|
14319
|
+
};
|
|
14320
|
+
},
|
|
14321
|
+
/** customs 解析:自动模式自动捕获,手动模式(fetchData)由父组件传入 */
|
|
14322
|
+
resolvedCustoms() {
|
|
14323
|
+
if (this.url && typeof this.fetchData !== "function") {
|
|
14324
|
+
return this.fetchedCustoms;
|
|
14325
|
+
}
|
|
14326
|
+
return this.customs;
|
|
14327
|
+
},
|
|
14328
|
+
/** 旧格式的 formSearch */
|
|
14329
|
+
searchModelForDialog() {
|
|
14330
|
+
return { ...this.internalSearchModel };
|
|
14331
|
+
}
|
|
14332
|
+
},
|
|
14333
|
+
watch: {
|
|
14334
|
+
searchModel: {
|
|
14335
|
+
handler(val) {
|
|
14336
|
+
if (val && Object.keys(val).length) {
|
|
14337
|
+
this.internalSearchModel = { ...val };
|
|
14338
|
+
}
|
|
14339
|
+
},
|
|
14340
|
+
immediate: true,
|
|
14341
|
+
deep: true
|
|
14342
|
+
},
|
|
14343
|
+
searchFields: {
|
|
14344
|
+
handler(fields) {
|
|
14345
|
+
this.initSearchDefaults();
|
|
14346
|
+
},
|
|
14347
|
+
immediate: true
|
|
14348
|
+
},
|
|
14349
|
+
columns: {
|
|
14350
|
+
handler() {
|
|
14351
|
+
this.syncColumnSlots();
|
|
14352
|
+
this.syncCheckedColumns();
|
|
14353
|
+
},
|
|
14354
|
+
immediate: true,
|
|
14355
|
+
deep: true
|
|
14356
|
+
},
|
|
14357
|
+
checkedColumns(val) {
|
|
14358
|
+
const walk = (cols) => {
|
|
14359
|
+
(cols || []).forEach((col) => {
|
|
14360
|
+
if (col.children && col.children.length) {
|
|
14361
|
+
walk(col.children);
|
|
14362
|
+
} else if (col.prop) {
|
|
14363
|
+
this.$set(col, "show", val.includes(col.prop));
|
|
14364
|
+
}
|
|
14365
|
+
});
|
|
14366
|
+
};
|
|
14367
|
+
walk(this.columns);
|
|
14368
|
+
this.tableKey++;
|
|
14369
|
+
}
|
|
14370
|
+
},
|
|
14371
|
+
created() {
|
|
14372
|
+
this.initSearchDefaults();
|
|
14373
|
+
},
|
|
14374
|
+
async mounted() {
|
|
14375
|
+
this.syncColumnSlots();
|
|
14376
|
+
if (this.$cfg("showColumnFilterBtn") && this.columnConfigMode === "persisted") {
|
|
14377
|
+
await this.loadColumnConfig();
|
|
14378
|
+
}
|
|
14379
|
+
if (this.$cfg("showCustomSearch")) {
|
|
14380
|
+
await this.loadSearchConfig();
|
|
14381
|
+
}
|
|
14382
|
+
if (this.url) {
|
|
14383
|
+
this.initFromSwagger();
|
|
14384
|
+
}
|
|
12633
14385
|
},
|
|
12634
14386
|
methods: {
|
|
12635
|
-
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
|
|
12640
|
-
|
|
12641
|
-
|
|
12642
|
-
|
|
12643
|
-
this
|
|
12644
|
-
|
|
14387
|
+
// ===================== 初始化 =====================
|
|
14388
|
+
/**
|
|
14389
|
+
* 获取配置值,优先级:prop 显式传值 > $olBaseConfig 全局 > 默认值
|
|
14390
|
+
* @param {string} key - prop 名称
|
|
14391
|
+
* @param {*} defaultVal - 兜底默认值
|
|
14392
|
+
*/
|
|
14393
|
+
$cfg(key) {
|
|
14394
|
+
if (this.$options.propsData && key in this.$options.propsData) {
|
|
14395
|
+
return this[key];
|
|
14396
|
+
}
|
|
14397
|
+
const base = this.$olBaseConfig || {};
|
|
14398
|
+
if (base[key] !== void 0)
|
|
14399
|
+
return base[key];
|
|
14400
|
+
return this[key];
|
|
14401
|
+
},
|
|
14402
|
+
/** 自动检测父组件传入的列插槽(#propName),自动设置 renderSlot */
|
|
14403
|
+
syncColumnSlots() {
|
|
14404
|
+
const slotNames = Object.keys(this.$scopedSlots || {});
|
|
14405
|
+
if (slotNames.length === 0)
|
|
14406
|
+
return;
|
|
14407
|
+
const walk = (cols) => {
|
|
14408
|
+
(cols || []).forEach((col) => {
|
|
14409
|
+
if (col.children && col.children.length) {
|
|
14410
|
+
walk(col.children);
|
|
14411
|
+
} else if (col.prop && slotNames.includes(col.prop) && !col.render) {
|
|
14412
|
+
this.$set(col, "renderSlot", true);
|
|
14413
|
+
}
|
|
14414
|
+
});
|
|
14415
|
+
};
|
|
14416
|
+
walk(this.columns);
|
|
14417
|
+
},
|
|
14418
|
+
/** 同步 checkedColumns:从 columns 的 show 状态回写到 checkedColumns */
|
|
14419
|
+
syncCheckedColumns() {
|
|
14420
|
+
const result = [];
|
|
14421
|
+
const walk = (cols) => {
|
|
14422
|
+
(cols || []).forEach((col) => {
|
|
14423
|
+
if (col.children && col.children.length) {
|
|
14424
|
+
walk(col.children);
|
|
14425
|
+
} else if (col.prop && col.show !== false) {
|
|
14426
|
+
result.push(col.prop);
|
|
14427
|
+
}
|
|
14428
|
+
});
|
|
14429
|
+
};
|
|
14430
|
+
walk(this.columns);
|
|
14431
|
+
if (result.length !== this.checkedColumns.length || result.some((v2, i2) => v2 !== this.checkedColumns[i2])) {
|
|
14432
|
+
this.checkedColumns = result;
|
|
12645
14433
|
}
|
|
12646
14434
|
},
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
if (
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
|
|
14435
|
+
/** 初始化搜索默认值 */
|
|
14436
|
+
initSearchDefaults() {
|
|
14437
|
+
const model = { ...this.searchModel };
|
|
14438
|
+
(this.searchFields || []).forEach((field) => {
|
|
14439
|
+
if (!(field.prop in model) && field.defaultValue !== void 0) {
|
|
14440
|
+
model[field.prop] = field.defaultValue;
|
|
14441
|
+
} else if (!(field.prop in model)) {
|
|
14442
|
+
model[field.prop] = null;
|
|
12655
14443
|
}
|
|
12656
|
-
|
|
14444
|
+
});
|
|
14445
|
+
this.internalSearchModel = model;
|
|
14446
|
+
},
|
|
14447
|
+
/** 从 Swagger 自动生成 searchFields 和 columns */
|
|
14448
|
+
async initFromSwagger() {
|
|
14449
|
+
try {
|
|
14450
|
+
const { getData: getData2 } = await Promise.resolve().then(() => index$2);
|
|
14451
|
+
const swaggerData = await getData2();
|
|
14452
|
+
if (!swaggerData || !swaggerData.paths)
|
|
14453
|
+
return;
|
|
14454
|
+
const apiUrl = this.url;
|
|
14455
|
+
if (!apiUrl || !swaggerData.paths[apiUrl]) {
|
|
14456
|
+
console.warn(`[ol-crud] Swagger 中未找到路径: ${apiUrl}`);
|
|
14457
|
+
return;
|
|
14458
|
+
}
|
|
14459
|
+
const pathData = swaggerData.paths[apiUrl];
|
|
14460
|
+
const method = this.finalMethod;
|
|
14461
|
+
const methodData = pathData[method];
|
|
14462
|
+
if (!methodData)
|
|
14463
|
+
return;
|
|
14464
|
+
if (!this.$cfg("showCustomSearch")) {
|
|
14465
|
+
const parameters = methodData.parameters || [];
|
|
14466
|
+
let swaggerSearchFields = parameters.map((p2) => this.mapParameterToSearchField(p2)).filter(Boolean);
|
|
14467
|
+
if (typeof this.onSearchSwagger === "function") {
|
|
14468
|
+
try {
|
|
14469
|
+
const res = await this.onSearchSwagger({ columns: [...swaggerSearchFields] });
|
|
14470
|
+
if (res && Array.isArray(res.columns))
|
|
14471
|
+
swaggerSearchFields = res.columns;
|
|
14472
|
+
} catch (err2) {
|
|
14473
|
+
}
|
|
14474
|
+
}
|
|
14475
|
+
const manualByProp = {};
|
|
14476
|
+
this.searchFields.forEach((f2) => {
|
|
14477
|
+
if (f2.prop)
|
|
14478
|
+
manualByProp[f2.prop.toLowerCase()] = f2;
|
|
14479
|
+
});
|
|
14480
|
+
swaggerSearchFields.forEach((swaggerField) => {
|
|
14481
|
+
const key = (swaggerField.prop || "").toLowerCase();
|
|
14482
|
+
const manualField = manualByProp[key];
|
|
14483
|
+
if (manualField) {
|
|
14484
|
+
const userProp = manualField.prop;
|
|
14485
|
+
Object.assign(manualField, swaggerField, manualField);
|
|
14486
|
+
manualField.prop = userProp;
|
|
14487
|
+
} else {
|
|
14488
|
+
this.searchFields.push(swaggerField);
|
|
14489
|
+
this.$set(this.internalSearchModel, swaggerField.prop, swaggerField.defaultValue ?? null);
|
|
14490
|
+
}
|
|
14491
|
+
});
|
|
14492
|
+
this.autoDetectRangeTimeFields(parameters);
|
|
14493
|
+
if (typeof this.onSearchMerged === "function") {
|
|
14494
|
+
try {
|
|
14495
|
+
const res = await this.onSearchMerged({ columns: this.searchFields.slice() });
|
|
14496
|
+
if (res && Array.isArray(res.columns))
|
|
14497
|
+
this.searchFields.splice(0, this.searchFields.length, ...res.columns);
|
|
14498
|
+
} catch (err2) {
|
|
14499
|
+
}
|
|
14500
|
+
}
|
|
14501
|
+
this.initSearchDefaults();
|
|
14502
|
+
}
|
|
14503
|
+
if (!this.hasColumnConfig) {
|
|
14504
|
+
const { responseData } = this._extractSwaggerResponse(methodData);
|
|
14505
|
+
let itemsProps = responseData ? this._extractItemsProps(responseData) : null;
|
|
14506
|
+
if (itemsProps && typeof this.onTableSwagger === "function") {
|
|
14507
|
+
try {
|
|
14508
|
+
const res = await this.onTableSwagger({ columns: { ...itemsProps } });
|
|
14509
|
+
if (res && res.columns && typeof res.columns === "object")
|
|
14510
|
+
itemsProps = res.columns;
|
|
14511
|
+
} catch (err2) {
|
|
14512
|
+
}
|
|
14513
|
+
}
|
|
14514
|
+
if (itemsProps && Object.keys(itemsProps).length) {
|
|
14515
|
+
let swaggerColumns = [];
|
|
14516
|
+
const existingColumnProps = new Set(
|
|
14517
|
+
this.columns.filter((c2) => !c2.children).map((c2) => c2.prop)
|
|
14518
|
+
);
|
|
14519
|
+
Object.keys(itemsProps).forEach((key) => {
|
|
14520
|
+
if (!existingColumnProps.has(key)) {
|
|
14521
|
+
const prop = itemsProps[key];
|
|
14522
|
+
if (prop.description) {
|
|
14523
|
+
const col = this.mapPropertyToColumn(key, prop);
|
|
14524
|
+
if (col)
|
|
14525
|
+
swaggerColumns.push(col);
|
|
14526
|
+
}
|
|
14527
|
+
}
|
|
14528
|
+
});
|
|
14529
|
+
swaggerColumns.forEach((col) => {
|
|
14530
|
+
if (!existingColumnProps.has(col.prop)) {
|
|
14531
|
+
this.columns.push(col);
|
|
14532
|
+
}
|
|
14533
|
+
});
|
|
14534
|
+
this.columns.forEach((col) => {
|
|
14535
|
+
if (col.children && col.children.length) {
|
|
14536
|
+
col.children.forEach((child) => {
|
|
14537
|
+
if (!child.label && child.prop && itemsProps[child.prop]) {
|
|
14538
|
+
this.$set(child, "label", itemsProps[child.prop].description);
|
|
14539
|
+
}
|
|
14540
|
+
});
|
|
14541
|
+
} else {
|
|
14542
|
+
if (!col.label && col.prop && itemsProps[col.prop]) {
|
|
14543
|
+
this.$set(col, "label", itemsProps[col.prop].description);
|
|
14544
|
+
}
|
|
14545
|
+
}
|
|
14546
|
+
});
|
|
14547
|
+
}
|
|
14548
|
+
}
|
|
14549
|
+
if (typeof this.onTableMerged === "function") {
|
|
14550
|
+
try {
|
|
14551
|
+
const res = await this.onTableMerged({ columns: this.columns.slice() });
|
|
14552
|
+
if (res && Array.isArray(res.columns))
|
|
14553
|
+
this.columns.splice(0, this.columns.length, ...res.columns);
|
|
14554
|
+
} catch (err2) {
|
|
14555
|
+
}
|
|
14556
|
+
}
|
|
14557
|
+
this.syncColumnSlots();
|
|
14558
|
+
console.log(`\x1B[36m\x1B[4mol-crud Swagger 初始化完成`, {
|
|
14559
|
+
searchFields: this.searchFields,
|
|
14560
|
+
columns: this.columns
|
|
14561
|
+
});
|
|
14562
|
+
if (this.shouldAutoFetch) {
|
|
14563
|
+
await this.fetchList();
|
|
14564
|
+
}
|
|
14565
|
+
} catch (err2) {
|
|
14566
|
+
console.error("[ol-crud] Swagger 初始化失败:", err2);
|
|
12657
14567
|
}
|
|
12658
|
-
return null;
|
|
12659
14568
|
},
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
14569
|
+
/** 提取 Swagger response schema */
|
|
14570
|
+
_extractSwaggerResponse(methodData) {
|
|
14571
|
+
return {
|
|
14572
|
+
responseData: methodData.responses && methodData.responses["200"] && methodData.responses["200"].content && methodData.responses["200"].content["application/json"] && methodData.responses["200"].content["application/json"].schema
|
|
14573
|
+
};
|
|
14574
|
+
},
|
|
14575
|
+
/** 提取 response 中的 items properties(支持分页包裹) */
|
|
14576
|
+
_extractItemsProps(responseData) {
|
|
14577
|
+
return responseData.properties && responseData.properties.items && responseData.properties.items.items && responseData.properties.items.items.properties || responseData.properties || {};
|
|
14578
|
+
},
|
|
14579
|
+
/** 将 Swagger parameter 映射为 searchField(组件格式) */
|
|
14580
|
+
mapParameterToSearchField(param) {
|
|
14581
|
+
const field = {
|
|
14582
|
+
prop: param.name,
|
|
14583
|
+
label: param.description || param.name,
|
|
14584
|
+
type: "input",
|
|
14585
|
+
visible: true,
|
|
14586
|
+
defaultValue: null,
|
|
14587
|
+
props: {}
|
|
14588
|
+
};
|
|
14589
|
+
if (!param.schema)
|
|
14590
|
+
return field;
|
|
14591
|
+
const schema = param.schema;
|
|
14592
|
+
if (schema.enum && Array.isArray(schema.enum)) {
|
|
14593
|
+
field.type = "select";
|
|
14594
|
+
if (schema["$$ref"]) {
|
|
14595
|
+
const refParts = schema["$$ref"].split("/");
|
|
14596
|
+
const enumName = refParts[refParts.length - 1];
|
|
14597
|
+
try {
|
|
14598
|
+
const resolvedEnum = getEnum(enumName);
|
|
14599
|
+
field.options = resolvedEnum && resolvedEnum.length ? resolvedEnum : schema.enum.map((e2) => ({ key: e2, value: e2 }));
|
|
14600
|
+
} catch {
|
|
14601
|
+
field.options = schema.enum.map((e2) => ({ key: e2, value: e2 }));
|
|
14602
|
+
}
|
|
14603
|
+
} else {
|
|
14604
|
+
field.options = schema.enum.map((e2) => ({ key: e2, value: e2 }));
|
|
12664
14605
|
}
|
|
12665
|
-
|
|
14606
|
+
} else if (schema.format === "date-time") {
|
|
14607
|
+
field.type = "date";
|
|
14608
|
+
field.props = {
|
|
14609
|
+
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
14610
|
+
format: "yyyy/MM/dd HH:mm:ss"
|
|
14611
|
+
};
|
|
14612
|
+
} else if (schema.format === "date") {
|
|
14613
|
+
field.type = "date";
|
|
14614
|
+
field.props = {
|
|
14615
|
+
valueFormat: "yyyy-MM-dd",
|
|
14616
|
+
format: "yyyy/MM/dd"
|
|
14617
|
+
};
|
|
14618
|
+
} else if (schema.type === "integer" || schema.type === "number") {
|
|
14619
|
+
field.type = "number";
|
|
14620
|
+
} else if (schema.type === "boolean") {
|
|
14621
|
+
field.type = "select";
|
|
14622
|
+
field.options = [
|
|
14623
|
+
{ key: true, value: "是" },
|
|
14624
|
+
{ key: false, value: "否" }
|
|
14625
|
+
];
|
|
14626
|
+
}
|
|
14627
|
+
return field;
|
|
14628
|
+
},
|
|
14629
|
+
/** 将 Swagger property 映射为 column */
|
|
14630
|
+
mapPropertyToColumn(key, prop) {
|
|
14631
|
+
const col = {
|
|
14632
|
+
prop: key,
|
|
14633
|
+
label: prop.description || key,
|
|
14634
|
+
sortable: false
|
|
14635
|
+
};
|
|
14636
|
+
if (prop.enum && Array.isArray(prop.enum)) {
|
|
14637
|
+
col.prop = `${key}Desc`;
|
|
14638
|
+
col.label = (prop.description || key).replace(/(枚举|枚举值)/g, "");
|
|
14639
|
+
}
|
|
14640
|
+
if (prop.type === "boolean") {
|
|
14641
|
+
col.prop = `${key}Text`;
|
|
14642
|
+
}
|
|
14643
|
+
return col;
|
|
14644
|
+
},
|
|
14645
|
+
/**
|
|
14646
|
+
* 普通模式下自动识别日期范围字段(xxxBegin + xxxEnd → xxxTime)
|
|
14647
|
+
* 因为 Element UI daterange 绑定数组,但后端需要两个独立字段
|
|
14648
|
+
* 只在非配置模式(!showCustomSearch)下执行
|
|
14649
|
+
*/
|
|
14650
|
+
autoDetectRangeTimeFields(parameters) {
|
|
14651
|
+
if (this.$cfg("showCustomSearch"))
|
|
14652
|
+
return;
|
|
14653
|
+
const searchFields = this.searchFields;
|
|
14654
|
+
const toAdd = [];
|
|
14655
|
+
const hasBeginTime = parameters.some((p2) => p2.name === "BeginTime");
|
|
14656
|
+
const hasEndTime = parameters.some((p2) => p2.name === "EndTime");
|
|
14657
|
+
const hasCreatedTime = searchFields.some((f2) => f2.prop === "createdTime");
|
|
14658
|
+
if (hasBeginTime && hasEndTime && !hasCreatedTime) {
|
|
14659
|
+
toAdd.push({
|
|
14660
|
+
prop: "createdTime",
|
|
14661
|
+
label: "创建时间",
|
|
14662
|
+
type: "datetimerange",
|
|
14663
|
+
visible: true,
|
|
14664
|
+
defaultValue: null,
|
|
14665
|
+
props: { valueFormat: "yyyy-MM-dd HH:mm:ss", format: "yyyy/MM/dd HH:mm:ss", defaultTime: ["00:00:00", "23:59:59"] },
|
|
14666
|
+
originalFields: { begin: "BeginTime", end: "EndTime" }
|
|
14667
|
+
});
|
|
14668
|
+
}
|
|
14669
|
+
const beginFields = parameters.filter((p2) => p2.name.endsWith("Begin"));
|
|
14670
|
+
const endFields = parameters.filter((p2) => p2.name.endsWith("End"));
|
|
14671
|
+
beginFields.forEach((beginParam) => {
|
|
14672
|
+
const prefix = beginParam.name.replace(/Begin$/, "");
|
|
14673
|
+
const endName = prefix + "End";
|
|
14674
|
+
const timeName = prefix + "Time";
|
|
14675
|
+
const hasEnd = endFields.some((p2) => p2.name === endName);
|
|
14676
|
+
if (!hasEnd)
|
|
14677
|
+
return;
|
|
14678
|
+
if (searchFields.some((f2) => f2.prop === timeName))
|
|
14679
|
+
return;
|
|
14680
|
+
toAdd.push({
|
|
14681
|
+
prop: timeName,
|
|
14682
|
+
label: beginParam.description || prefix,
|
|
14683
|
+
type: "datetimerange",
|
|
14684
|
+
visible: true,
|
|
14685
|
+
defaultValue: null,
|
|
14686
|
+
props: { valueFormat: "yyyy-MM-dd HH:mm:ss", format: "yyyy/MM/dd HH:mm:ss", defaultTime: ["00:00:00", "23:59:59"] },
|
|
14687
|
+
originalFields: { begin: beginParam.name, end: endName }
|
|
14688
|
+
});
|
|
14689
|
+
const rmBeginIdx = searchFields.findIndex((f2) => f2.prop === beginParam.name);
|
|
14690
|
+
const rmEndIdx = searchFields.findIndex((f2) => f2.prop === endName);
|
|
14691
|
+
if (rmBeginIdx >= 0)
|
|
14692
|
+
searchFields.splice(rmBeginIdx, 1);
|
|
14693
|
+
if (rmEndIdx >= 0)
|
|
14694
|
+
searchFields.splice(rmEndIdx, 1);
|
|
14695
|
+
delete this.internalSearchModel[beginParam.name];
|
|
14696
|
+
delete this.internalSearchModel[endName];
|
|
12666
14697
|
});
|
|
14698
|
+
toAdd.forEach((f2) => {
|
|
14699
|
+
searchFields.push(f2);
|
|
14700
|
+
this.$set(this.internalSearchModel, f2.prop, f2.defaultValue ?? null);
|
|
14701
|
+
});
|
|
14702
|
+
if (toAdd.length) {
|
|
14703
|
+
this.initSearchDefaults();
|
|
14704
|
+
console.log(`\x1B[36m\x1B[4mol-crud 自动识别日期范围字段`, toAdd.map((f2) => f2.prop));
|
|
14705
|
+
}
|
|
12667
14706
|
},
|
|
12668
|
-
|
|
12669
|
-
|
|
12670
|
-
|
|
12671
|
-
this.
|
|
12672
|
-
|
|
14707
|
+
// ===================== 搜索 =====================
|
|
14708
|
+
/** 查询 */
|
|
14709
|
+
handleSearch() {
|
|
14710
|
+
if (this.fetchingData)
|
|
14711
|
+
return;
|
|
14712
|
+
const form2 = this.$refs.searchForm;
|
|
14713
|
+
if (form2 && this.searchRules && Object.keys(this.searchRules).length) {
|
|
14714
|
+
return new Promise((resolve, reject) => {
|
|
14715
|
+
form2.validate((valid) => {
|
|
14716
|
+
if (!valid)
|
|
14717
|
+
return reject(new Error("表单验证未通过"));
|
|
14718
|
+
resolve(this.emitSearch());
|
|
14719
|
+
});
|
|
14720
|
+
});
|
|
14721
|
+
}
|
|
14722
|
+
return this.emitSearch();
|
|
12673
14723
|
},
|
|
12674
|
-
|
|
12675
|
-
|
|
14724
|
+
/**
|
|
14725
|
+
* 构建查询参数:复制搜索模型 → 拆分日期范围 → 清理空值
|
|
14726
|
+
* 供 emitSearch 和 fetchList 共用,保证日期范围拆分逻辑一致
|
|
14727
|
+
*/
|
|
14728
|
+
buildSearchParams() {
|
|
14729
|
+
const model = { ...this.internalSearchModel };
|
|
14730
|
+
if (!this.$cfg("showCustomSearch")) {
|
|
14731
|
+
(this.searchFields || []).forEach((field) => {
|
|
14732
|
+
if ((field.type === "daterange" || field.type === "datetimerange") && field.originalFields && model[field.prop]) {
|
|
14733
|
+
const { begin, end } = field.originalFields;
|
|
14734
|
+
if (Array.isArray(model[field.prop])) {
|
|
14735
|
+
model[begin] = model[field.prop][0];
|
|
14736
|
+
model[end] = model[field.prop][1];
|
|
14737
|
+
delete model[field.prop];
|
|
14738
|
+
} else {
|
|
14739
|
+
model[begin] = null;
|
|
14740
|
+
model[end] = null;
|
|
14741
|
+
delete model[field.prop];
|
|
14742
|
+
}
|
|
14743
|
+
}
|
|
14744
|
+
});
|
|
14745
|
+
}
|
|
14746
|
+
const cleanParams = {};
|
|
14747
|
+
Object.keys(model).forEach((key) => {
|
|
14748
|
+
const val = model[key];
|
|
14749
|
+
if (val !== null && val !== void 0 && val !== "") {
|
|
14750
|
+
cleanParams[key] = val;
|
|
14751
|
+
}
|
|
14752
|
+
});
|
|
14753
|
+
return { model, cleanParams };
|
|
14754
|
+
},
|
|
14755
|
+
/** 发出搜索事件 */
|
|
14756
|
+
emitSearch() {
|
|
14757
|
+
const { model, cleanParams } = this.buildSearchParams();
|
|
14758
|
+
const filterConditions = [];
|
|
14759
|
+
Object.keys(cleanParams).forEach((key) => {
|
|
14760
|
+
const field = this.searchFields.find((f2) => f2.prop === key);
|
|
14761
|
+
filterConditions.push({
|
|
14762
|
+
key,
|
|
14763
|
+
values: Array.isArray(cleanParams[key]) ? cleanParams[key] : [cleanParams[key]],
|
|
14764
|
+
compare: field && field.compare || ""
|
|
14765
|
+
});
|
|
14766
|
+
});
|
|
14767
|
+
this.$emit("search", model, { filterConditions });
|
|
14768
|
+
this.$emit("update:searchModel", model);
|
|
14769
|
+
console.log(`\x1B[36m\x1B[4mol-crud 查询`, model, { filterConditions });
|
|
14770
|
+
if (this.shouldAutoFetch) {
|
|
14771
|
+
this.internalPagination.page = 1;
|
|
14772
|
+
return this.fetchList();
|
|
14773
|
+
}
|
|
14774
|
+
},
|
|
14775
|
+
/**
|
|
14776
|
+
* 自动拉取列表数据
|
|
14777
|
+
* 通过 Swagger URL 调用后端接口,解析响应并更新 tableData / pagination
|
|
14778
|
+
*/
|
|
14779
|
+
async fetchList() {
|
|
14780
|
+
if (!this.shouldAutoFetch)
|
|
14781
|
+
return;
|
|
14782
|
+
const { page: pageKey, limit: limitKey } = this.pageParams || {};
|
|
14783
|
+
const page = this.internalPagination.page;
|
|
14784
|
+
const limit = this.internalPagination.limit;
|
|
14785
|
+
const { cleanParams } = this.buildSearchParams();
|
|
14786
|
+
const pageParams = {
|
|
14787
|
+
[pageKey || "Page"]: page,
|
|
14788
|
+
[limitKey || "MaxResultCount"]: limit
|
|
14789
|
+
};
|
|
14790
|
+
this.fetchingData = true;
|
|
14791
|
+
this.$emit("update:loading", true);
|
|
14792
|
+
try {
|
|
14793
|
+
let rows, total;
|
|
14794
|
+
let filterConditions;
|
|
14795
|
+
if (this.$cfg("showCustomSearch")) {
|
|
14796
|
+
filterConditions = [];
|
|
14797
|
+
Object.keys(cleanParams).forEach((key) => {
|
|
14798
|
+
const field = this.searchFields.find((f2) => f2.prop === key);
|
|
14799
|
+
filterConditions.push({
|
|
14800
|
+
key,
|
|
14801
|
+
values: Array.isArray(cleanParams[key]) ? cleanParams[key] : [cleanParams[key]],
|
|
14802
|
+
compare: field && field.compare || ""
|
|
14803
|
+
});
|
|
14804
|
+
});
|
|
14805
|
+
}
|
|
14806
|
+
if (typeof this.fetchData === "function") {
|
|
14807
|
+
const result = await this.fetchData({
|
|
14808
|
+
searchParams: cleanParams,
|
|
14809
|
+
filterConditions,
|
|
14810
|
+
page,
|
|
14811
|
+
limit,
|
|
14812
|
+
pagination: { ...this.internalPagination }
|
|
14813
|
+
});
|
|
14814
|
+
rows = result && result.rows || [];
|
|
14815
|
+
total = result && result.total || 0;
|
|
14816
|
+
} else {
|
|
14817
|
+
const apiUrl = this.url;
|
|
14818
|
+
if (!apiUrl)
|
|
14819
|
+
return;
|
|
14820
|
+
if (typeof this.get !== "function" && typeof this.post !== "function") {
|
|
14821
|
+
console.warn("[ol-crud] 未找到 this.get/this.post,无法自动拉取数据,请使用 fetchData 或手动传入 tableData");
|
|
14822
|
+
return;
|
|
14823
|
+
}
|
|
14824
|
+
let params;
|
|
14825
|
+
if (this.$cfg("showCustomSearch")) {
|
|
14826
|
+
params = { FilterConditions: filterConditions, ...pageParams };
|
|
14827
|
+
} else {
|
|
14828
|
+
params = { ...cleanParams, ...pageParams };
|
|
14829
|
+
}
|
|
14830
|
+
const method = this.finalMethod;
|
|
14831
|
+
let response;
|
|
14832
|
+
if (method === "post") {
|
|
14833
|
+
response = await this.post({ url: apiUrl, data: params });
|
|
14834
|
+
} else {
|
|
14835
|
+
response = await this.get({ url: apiUrl, data: params });
|
|
14836
|
+
}
|
|
14837
|
+
const parsed = this.parseResponse(response);
|
|
14838
|
+
rows = parsed.rows || [];
|
|
14839
|
+
total = parsed.total || 0;
|
|
14840
|
+
const customs = response && response.result && response.result.customs || [];
|
|
14841
|
+
if (customs.length) {
|
|
14842
|
+
this.fetchedCustoms = customs;
|
|
14843
|
+
}
|
|
14844
|
+
}
|
|
14845
|
+
this.internalTableData = rows || [];
|
|
14846
|
+
this.internalPagination = {
|
|
14847
|
+
...this.internalPagination,
|
|
14848
|
+
total: total || 0
|
|
14849
|
+
};
|
|
14850
|
+
this.$emit("update:tableData", rows || []);
|
|
14851
|
+
this.$emit("update:pagination", {
|
|
14852
|
+
...this.internalPagination,
|
|
14853
|
+
total: total || 0
|
|
14854
|
+
});
|
|
14855
|
+
this.$emit("data-loaded", { rows, total });
|
|
14856
|
+
console.log(
|
|
14857
|
+
`\x1B[36m\x1B[4mol-crud 数据加载完成`,
|
|
14858
|
+
`共 ${total} 条,当前 ${(rows || []).length} 条`
|
|
14859
|
+
);
|
|
14860
|
+
} catch (err2) {
|
|
14861
|
+
console.error("[ol-crud] 数据请求失败:", err2);
|
|
14862
|
+
this.$emit("data-error", err2);
|
|
14863
|
+
} finally {
|
|
14864
|
+
this.fetchingData = false;
|
|
14865
|
+
this.$emit("update:loading", false);
|
|
14866
|
+
}
|
|
14867
|
+
},
|
|
14868
|
+
/**
|
|
14869
|
+
* 刷新表格数据(保持当前搜索条件+分页)。
|
|
14870
|
+
* 供父组件通过 $refs.crud.refresh() 调用,如自定义按钮操作后刷新。
|
|
14871
|
+
*/
|
|
14872
|
+
refresh() {
|
|
14873
|
+
return this.fetchList();
|
|
14874
|
+
},
|
|
14875
|
+
/**
|
|
14876
|
+
* 解析后端返回的响应数据
|
|
14877
|
+
* 内置支持常见分页格式,也可通过 responseHandler prop 自定义
|
|
14878
|
+
*/
|
|
14879
|
+
parseResponse(response) {
|
|
14880
|
+
if (typeof this.responseHandler === "function") {
|
|
14881
|
+
return this.responseHandler(response);
|
|
14882
|
+
}
|
|
14883
|
+
const result = response && response.result || response || {};
|
|
14884
|
+
const rows = result.items || result.records || result.list || result.data || [];
|
|
14885
|
+
const total = result.total ?? result.totalCount ?? result.count ?? rows.length ?? 0;
|
|
14886
|
+
if (Array.isArray(result)) {
|
|
14887
|
+
return { rows: result, total: result.length };
|
|
14888
|
+
}
|
|
14889
|
+
return { rows: Array.isArray(rows) ? rows : [], total };
|
|
14890
|
+
},
|
|
14891
|
+
/** 重置:用 defaultValue 或 null 重建搜索模型,不走 resetFields(兼容动态字段) */
|
|
14892
|
+
handleReset() {
|
|
14893
|
+
const model = {};
|
|
14894
|
+
(this.searchFields || []).forEach((field) => {
|
|
14895
|
+
model[field.prop] = field.defaultValue !== void 0 ? field.defaultValue : null;
|
|
14896
|
+
});
|
|
14897
|
+
this.internalSearchModel = model;
|
|
14898
|
+
if (this.$refs.searchForm) {
|
|
14899
|
+
this.$refs.searchForm.clearValidate();
|
|
14900
|
+
}
|
|
14901
|
+
this.$emit("reset", { ...this.internalSearchModel });
|
|
14902
|
+
if (this.shouldAutoFetch) {
|
|
14903
|
+
this.internalPagination.page = 1;
|
|
14904
|
+
return this.fetchList();
|
|
14905
|
+
}
|
|
14906
|
+
},
|
|
14907
|
+
/** 搜索字段值变化 */
|
|
14908
|
+
onFieldChange(field) {
|
|
14909
|
+
if (field.onChange) {
|
|
14910
|
+
field.onChange(this.internalSearchModel[field.prop], this.internalSearchModel);
|
|
14911
|
+
}
|
|
14912
|
+
},
|
|
14913
|
+
/** remoteSelect:远程搜索,父组件通过 field.remoteMethod 实现 */
|
|
14914
|
+
handleRemoteSearch(field, query) {
|
|
14915
|
+
if (field.remoteMethod) {
|
|
14916
|
+
field.remoteMethod(query, field);
|
|
14917
|
+
}
|
|
14918
|
+
},
|
|
14919
|
+
/** remoteSelect:滚动到底加载更多,父组件通过 field.onLoadMore 实现 */
|
|
14920
|
+
handleSelectLoadMore(field) {
|
|
14921
|
+
if (field.onLoadMore) {
|
|
14922
|
+
field.onLoadMore(field);
|
|
14923
|
+
}
|
|
14924
|
+
},
|
|
14925
|
+
/** 数字输入框按键拦截 */
|
|
14926
|
+
onNumberKeydown(e2) {
|
|
14927
|
+
const key = e2.key;
|
|
14928
|
+
if (key === "e" || key === "E" || key === "-" || key === "+" || key === ".") {
|
|
14929
|
+
e2.returnValue = false;
|
|
14930
|
+
return false;
|
|
14931
|
+
}
|
|
14932
|
+
return true;
|
|
14933
|
+
},
|
|
14934
|
+
/** 数字输入框粘贴拦截:只允许数字字符 */
|
|
14935
|
+
onNumberPaste(e2) {
|
|
14936
|
+
const pasted = e2.clipboardData && e2.clipboardData.getData("text") || "";
|
|
14937
|
+
if (/[^\d]/.test(pasted)) {
|
|
14938
|
+
e2.preventDefault();
|
|
14939
|
+
}
|
|
14940
|
+
},
|
|
14941
|
+
/** 数字输入框实时过滤:去掉非数字字符(处理中文输入法等绕过 keydown 的场景) */
|
|
14942
|
+
onNumberInput(e2, field) {
|
|
14943
|
+
const raw = e2.target.value;
|
|
14944
|
+
const cleaned = raw.replace(/\D/g, "");
|
|
14945
|
+
if (raw !== cleaned) {
|
|
14946
|
+
e2.target.value = cleaned;
|
|
14947
|
+
this.internalSearchModel[field.prop] = cleaned === "" ? null : Number(cleaned);
|
|
14948
|
+
}
|
|
14949
|
+
},
|
|
14950
|
+
// ===================== 配置弹窗(仅 showCustomSearch 时走接口) =====================
|
|
14951
|
+
/** 获取菜单ID:优先 props,其次从 localStorage 自动匹配当前路由 */
|
|
14952
|
+
resolveMenuId() {
|
|
14953
|
+
if (this.menuId)
|
|
14954
|
+
return this.menuId;
|
|
14955
|
+
try {
|
|
14956
|
+
const wms = JSON.parse(localStorage.getItem("wms") || "{}");
|
|
14957
|
+
const menus = wms.SET_MENUS;
|
|
14958
|
+
if (!menus || !this.$route)
|
|
14959
|
+
return "";
|
|
14960
|
+
const findMenu = (arr2) => {
|
|
14961
|
+
for (const item of arr2) {
|
|
14962
|
+
if (item.path === this.$route.path)
|
|
14963
|
+
return item;
|
|
14964
|
+
if (item.child && item.child.length && item.type !== 1) {
|
|
14965
|
+
const found = findMenu(item.child);
|
|
14966
|
+
if (found)
|
|
14967
|
+
return found;
|
|
14968
|
+
}
|
|
14969
|
+
}
|
|
14970
|
+
return null;
|
|
14971
|
+
};
|
|
14972
|
+
const matched = findMenu(menus);
|
|
14973
|
+
return matched && matched.id || "";
|
|
14974
|
+
} catch {
|
|
14975
|
+
return "";
|
|
14976
|
+
}
|
|
14977
|
+
},
|
|
14978
|
+
/** 从后端加载已保存的搜索配置 */
|
|
14979
|
+
async loadSearchConfig() {
|
|
14980
|
+
const id2 = this.resolveMenuId();
|
|
14981
|
+
if (!id2)
|
|
14982
|
+
return;
|
|
12676
14983
|
try {
|
|
14984
|
+
if (typeof this.get !== "function")
|
|
14985
|
+
return;
|
|
12677
14986
|
const res = await this.get({
|
|
12678
|
-
url:
|
|
14987
|
+
url: `/api/app/menu-search-setting/by-menu`,
|
|
14988
|
+
data: { sysMenuId: id2 }
|
|
14989
|
+
});
|
|
14990
|
+
if (res.code !== 200 || !res.result)
|
|
14991
|
+
return;
|
|
14992
|
+
const configList = res.result.settingJson ? JSON.parse(res.result.settingJson) : [];
|
|
14993
|
+
if (!configList || !configList.length)
|
|
14994
|
+
return;
|
|
14995
|
+
const newFields = configList.map(oldFieldToNew);
|
|
14996
|
+
this.searchFields.splice(0, this.searchFields.length, ...newFields);
|
|
14997
|
+
this.initSearchDefaults();
|
|
14998
|
+
console.log(`\x1B[36m\x1B[4mol-crud 已加载搜索配置`, newFields);
|
|
14999
|
+
} catch (err2) {
|
|
15000
|
+
console.warn("[ol-crud] 加载搜索配置失败:", err2);
|
|
15001
|
+
}
|
|
15002
|
+
},
|
|
15003
|
+
/**
|
|
15004
|
+
* persisted 模式:从 API 加载列配置,以此为准构建 columns
|
|
15005
|
+
* API fields 即列定义(顺序/可见/标签/固定),合并用户手动列的 render/sortable/enumName
|
|
15006
|
+
*/
|
|
15007
|
+
async loadColumnConfig() {
|
|
15008
|
+
const id2 = this.resolveMenuId();
|
|
15009
|
+
if (!id2 || typeof this.get !== "function")
|
|
15010
|
+
return;
|
|
15011
|
+
try {
|
|
15012
|
+
const res = await this.get({
|
|
15013
|
+
url: "/api/app/user-field-config/config",
|
|
12679
15014
|
data: {
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
MaxResultCount: 1e3
|
|
15015
|
+
pageKey: this.pageKey || this.$route && this.$route.path || "",
|
|
15016
|
+
sysMenuId: id2
|
|
12683
15017
|
}
|
|
12684
15018
|
});
|
|
12685
|
-
|
|
15019
|
+
const fields = res && res.result && res.result.fields || [];
|
|
15020
|
+
if (!fields.length)
|
|
12686
15021
|
return;
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
15022
|
+
const userColMap = {};
|
|
15023
|
+
const walkUser = (cols) => {
|
|
15024
|
+
(cols || []).forEach((c2) => {
|
|
15025
|
+
if (c2.children && c2.children.length)
|
|
15026
|
+
walkUser(c2.children);
|
|
15027
|
+
else if (c2.prop)
|
|
15028
|
+
userColMap[c2.prop] = c2;
|
|
15029
|
+
});
|
|
15030
|
+
};
|
|
15031
|
+
walkUser(this.columns);
|
|
15032
|
+
const sorted = [...fields].sort((a2, b2) => (a2.order ?? 0) - (b2.order ?? 0));
|
|
15033
|
+
const apiColumns = sorted.map((f2) => {
|
|
15034
|
+
const user = userColMap[f2.fieldName];
|
|
15035
|
+
const base = { prop: f2.fieldName, label: f2.displayName || f2.fieldName, show: f2.isVisible !== false, fixed: f2.isFixed || false, sortable: false };
|
|
15036
|
+
if (user) {
|
|
15037
|
+
return { ...base, render: user.render, renderSlot: user.renderSlot, sortable: user.sortable, attrs: user.attrs, width: user.width, minWidth: user.minWidth, children: user.children, enumName: f2.enumName || user.enumName };
|
|
15038
|
+
}
|
|
15039
|
+
return { ...base, enumName: f2.enumName || void 0 };
|
|
15040
|
+
});
|
|
15041
|
+
Object.values(userColMap).forEach((c2) => {
|
|
15042
|
+
if (!apiColumns.find((a2) => a2.prop === c2.prop))
|
|
15043
|
+
apiColumns.push({ ...c2 });
|
|
15044
|
+
});
|
|
15045
|
+
this.columns.splice(0, this.columns.length, ...apiColumns);
|
|
15046
|
+
this.hasColumnConfig = true;
|
|
15047
|
+
console.log(`\x1B[36m\x1B[4mol-crud 已加载列配置`, apiColumns.length, "列");
|
|
15048
|
+
} catch (err2) {
|
|
15049
|
+
console.warn("[ol-crud] 加载列配置失败:", err2);
|
|
12690
15050
|
}
|
|
12691
15051
|
},
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
this.
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
15052
|
+
/** 打开列配置弹窗(persisted 模式) */
|
|
15053
|
+
openColumnConfig() {
|
|
15054
|
+
this.columnConfigVisible = true;
|
|
15055
|
+
},
|
|
15056
|
+
/** 打开实体变更记录(需勾选至少一条) */
|
|
15057
|
+
openEntityChange() {
|
|
15058
|
+
if (!this.currentSelection.length) {
|
|
15059
|
+
this.$message && this.$message.warning("请至少勾选一条数据");
|
|
15060
|
+
return;
|
|
15061
|
+
}
|
|
15062
|
+
this.entityChangeVisible = true;
|
|
15063
|
+
},
|
|
15064
|
+
/** 列配置保存:更新 show/fixed/label,按弹窗顺序重排 */
|
|
15065
|
+
onColumnConfigSave(result) {
|
|
15066
|
+
const resultMap = {};
|
|
15067
|
+
result.forEach((r2) => {
|
|
15068
|
+
resultMap[r2.prop] = r2;
|
|
15069
|
+
});
|
|
15070
|
+
const walk = (cols) => {
|
|
15071
|
+
(cols || []).forEach((col) => {
|
|
15072
|
+
if (col.children && col.children.length) {
|
|
15073
|
+
walk(col.children);
|
|
15074
|
+
} else {
|
|
15075
|
+
const r2 = resultMap[col.prop];
|
|
15076
|
+
if (r2) {
|
|
15077
|
+
this.$set(col, "show", r2.show !== false);
|
|
15078
|
+
this.$set(col, "fixed", r2.fixed || false);
|
|
15079
|
+
if (r2.alias)
|
|
15080
|
+
this.$set(col, "label", r2.alias);
|
|
15081
|
+
if (r2.roleIds)
|
|
15082
|
+
this.$set(col, "roleIds", r2.roleIds);
|
|
15083
|
+
}
|
|
15084
|
+
}
|
|
15085
|
+
});
|
|
12700
15086
|
};
|
|
12701
|
-
this.
|
|
12702
|
-
|
|
12703
|
-
|
|
15087
|
+
walk(this.columns);
|
|
15088
|
+
const leaves = [];
|
|
15089
|
+
const collect = (cols) => {
|
|
15090
|
+
(cols || []).forEach((c2) => {
|
|
15091
|
+
if (c2.children && c2.children.length)
|
|
15092
|
+
collect(c2.children);
|
|
15093
|
+
else
|
|
15094
|
+
leaves.push(c2);
|
|
15095
|
+
});
|
|
15096
|
+
};
|
|
15097
|
+
collect(this.columns);
|
|
15098
|
+
const ordered = [];
|
|
15099
|
+
result.forEach((r2) => {
|
|
15100
|
+
const col = leaves.find((c2) => c2.prop === r2.prop);
|
|
15101
|
+
if (col)
|
|
15102
|
+
ordered.push(col);
|
|
15103
|
+
});
|
|
15104
|
+
leaves.forEach((c2) => {
|
|
15105
|
+
if (!ordered.find((x2) => x2.prop === c2.prop))
|
|
15106
|
+
ordered.push(c2);
|
|
12704
15107
|
});
|
|
15108
|
+
this.columns.splice(0, this.columns.length, ...ordered);
|
|
15109
|
+
this.tableKey++;
|
|
15110
|
+
this.$emit("column-config-save", result);
|
|
12705
15111
|
},
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
this.
|
|
12709
|
-
id: template.id,
|
|
12710
|
-
templeteName: template.templeteName,
|
|
12711
|
-
remark: template.remark,
|
|
12712
|
-
templeteJson: template.templeteJson,
|
|
12713
|
-
sourceUrl: template.sourceUrl || ""
|
|
12714
|
-
};
|
|
12715
|
-
this.dialogVisible = true;
|
|
15112
|
+
/** 打开配置弹窗 */
|
|
15113
|
+
openConfigDialog() {
|
|
15114
|
+
this.configDialogVisible = true;
|
|
12716
15115
|
},
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
15116
|
+
/** 保存配置:更新本地 searchFields 并持久化到后端 */
|
|
15117
|
+
async handleSaveConfig(configList) {
|
|
15118
|
+
const newFields = (configList || []).map(oldFieldToNew);
|
|
15119
|
+
this.searchFields.splice(0, this.searchFields.length, ...newFields);
|
|
15120
|
+
this.initSearchDefaults();
|
|
15121
|
+
this.$emit("config-save", newFields);
|
|
15122
|
+
const id2 = this.resolveMenuId();
|
|
15123
|
+
if (id2 && typeof this.post === "function") {
|
|
12723
15124
|
try {
|
|
12724
|
-
|
|
12725
|
-
|
|
15125
|
+
const saveData = (configList || []).map((item) => ({
|
|
15126
|
+
...item,
|
|
15127
|
+
value: item.value,
|
|
15128
|
+
inputType: item.inputType,
|
|
15129
|
+
children: item.children
|
|
15130
|
+
}));
|
|
15131
|
+
const res = await this.post({
|
|
15132
|
+
url: `/api/app/menu-search-setting`,
|
|
15133
|
+
data: {
|
|
15134
|
+
sysMenuId: id2,
|
|
15135
|
+
settingJson: JSON.stringify(saveData)
|
|
15136
|
+
}
|
|
12726
15137
|
});
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
15138
|
+
if (res.code === 200) {
|
|
15139
|
+
this.$message && this.$message.success("搜索配置保存成功");
|
|
15140
|
+
}
|
|
15141
|
+
} catch (err2) {
|
|
15142
|
+
console.warn("[ol-crud] 保存搜索配置失败:", err2);
|
|
12731
15143
|
}
|
|
12732
|
-
}
|
|
12733
|
-
|
|
15144
|
+
}
|
|
15145
|
+
console.log(`\x1B[36m\x1B[4mol-crud 保存搜索配置`, newFields);
|
|
12734
15146
|
},
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
|
|
12752
|
-
|
|
12753
|
-
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
|
|
12760
|
-
|
|
12761
|
-
|
|
12762
|
-
|
|
12763
|
-
|
|
12764
|
-
|
|
12765
|
-
|
|
15147
|
+
// ===================== 表格 =====================
|
|
15148
|
+
/** 多选变化 */
|
|
15149
|
+
onSelectionChange(val) {
|
|
15150
|
+
this.currentSelection = val;
|
|
15151
|
+
this.$emit("selection-change", val);
|
|
15152
|
+
this.$emit("update:selection", val);
|
|
15153
|
+
},
|
|
15154
|
+
/** 行点击 */
|
|
15155
|
+
onRowClick(row, column2, event) {
|
|
15156
|
+
if (column2 && column2.label === "操作")
|
|
15157
|
+
return;
|
|
15158
|
+
this.$emit("row-click", row, column2, event);
|
|
15159
|
+
},
|
|
15160
|
+
/** 排序变化 */
|
|
15161
|
+
onSortChange(sort) {
|
|
15162
|
+
this.$emit("sort-change", sort);
|
|
15163
|
+
},
|
|
15164
|
+
/** 序号计算 */
|
|
15165
|
+
computeIndex(index2) {
|
|
15166
|
+
const page = this.displayPagination && this.displayPagination.page || 1;
|
|
15167
|
+
const limit = this.displayPagination && this.displayPagination.limit || 30;
|
|
15168
|
+
return (page - 1) * limit + index2 + 1;
|
|
15169
|
+
},
|
|
15170
|
+
/** 刷新 */
|
|
15171
|
+
handleRefresh() {
|
|
15172
|
+
if (this.fetchingData)
|
|
15173
|
+
return;
|
|
15174
|
+
if (this.shouldAutoFetch) {
|
|
15175
|
+
this.fetchList();
|
|
15176
|
+
}
|
|
15177
|
+
this.$emit("refresh");
|
|
15178
|
+
},
|
|
15179
|
+
/** 打印:直接调起浏览器打印,列和数据和当前表格一致 */
|
|
15180
|
+
handlePrint() {
|
|
15181
|
+
if (!this.displayTableData || this.displayTableData.length === 0)
|
|
15182
|
+
return;
|
|
15183
|
+
const current = this.$router && this.$router.history && this.$router.history.current || this.$route;
|
|
15184
|
+
this.printListObj.title = current && current.name || this.$route && this.$route.meta && this.$route.meta.title || document.title;
|
|
15185
|
+
this.printListObj.tableHeader = this.visibleColumns;
|
|
15186
|
+
this.printListObj.tableData = this.displayTableData;
|
|
15187
|
+
this.$nextTick(() => {
|
|
15188
|
+
setTimeout(() => {
|
|
15189
|
+
const printRoot = this.$refs.printTemplate && this.$refs.printTemplate.$el || this.$el.querySelector(".crud-print-template");
|
|
15190
|
+
if (!printRoot) {
|
|
15191
|
+
console.error("[ol-crud] 未找到打印区域");
|
|
15192
|
+
return;
|
|
12766
15193
|
}
|
|
12767
|
-
|
|
15194
|
+
printTableElement(printRoot);
|
|
15195
|
+
}, 50);
|
|
12768
15196
|
});
|
|
15197
|
+
this.$emit("print", this.printListObj);
|
|
12769
15198
|
},
|
|
12770
|
-
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
|
|
12776
|
-
|
|
12777
|
-
|
|
15199
|
+
// ===================== 分页 =====================
|
|
15200
|
+
/** 每页条数变化 */
|
|
15201
|
+
onSizeChange(limit) {
|
|
15202
|
+
const pg = this.internalPagination;
|
|
15203
|
+
pg.limit = limit;
|
|
15204
|
+
pg.page = 1;
|
|
15205
|
+
this.$emit("update:pagination", { ...pg });
|
|
15206
|
+
this.$emit("size-change", limit);
|
|
15207
|
+
if (this.shouldAutoFetch) {
|
|
15208
|
+
this.fetchList();
|
|
12778
15209
|
}
|
|
12779
|
-
|
|
12780
|
-
|
|
12781
|
-
|
|
12782
|
-
|
|
12783
|
-
|
|
12784
|
-
|
|
15210
|
+
},
|
|
15211
|
+
/** 页码变化 */
|
|
15212
|
+
onPageChange(page) {
|
|
15213
|
+
const pg = this.internalPagination;
|
|
15214
|
+
pg.page = page;
|
|
15215
|
+
this.$emit("update:pagination", { ...pg });
|
|
15216
|
+
this.$emit("page-change", page);
|
|
15217
|
+
if (this.shouldAutoFetch) {
|
|
15218
|
+
this.fetchList();
|
|
15219
|
+
}
|
|
15220
|
+
},
|
|
15221
|
+
// ===================== 公开方法(通过 ref 调用) =====================
|
|
15222
|
+
/** 获取搜索参数 */
|
|
15223
|
+
getSearchParams() {
|
|
15224
|
+
return { ...this.internalSearchModel };
|
|
15225
|
+
},
|
|
15226
|
+
/** 设置搜索参数 */
|
|
15227
|
+
setSearchParams(params) {
|
|
15228
|
+
Object.keys(params).forEach((key) => {
|
|
15229
|
+
if (key in this.internalSearchModel) {
|
|
15230
|
+
this.internalSearchModel[key] = params[key];
|
|
12785
15231
|
}
|
|
12786
15232
|
});
|
|
15233
|
+
},
|
|
15234
|
+
/** 获取当前选中行 */
|
|
15235
|
+
getSelection() {
|
|
15236
|
+
return this.currentSelection;
|
|
15237
|
+
},
|
|
15238
|
+
/** 清空选中 */
|
|
15239
|
+
clearSelection() {
|
|
15240
|
+
if (this.$refs.crudTable) {
|
|
15241
|
+
this.$refs.crudTable.clearSelection();
|
|
15242
|
+
}
|
|
15243
|
+
},
|
|
15244
|
+
/** 触发查询(供外部调用),返回 Promise 可 await */
|
|
15245
|
+
search() {
|
|
15246
|
+
return this.handleSearch();
|
|
15247
|
+
},
|
|
15248
|
+
/** 触发重置(供外部调用),返回 Promise 可 await */
|
|
15249
|
+
reset() {
|
|
15250
|
+
return this.handleReset();
|
|
12787
15251
|
}
|
|
12788
15252
|
}
|
|
12789
15253
|
};
|
|
@@ -12794,7 +15258,7 @@ var __component__$2 = /* @__PURE__ */ normalizeComponent(
|
|
|
12794
15258
|
staticRenderFns$2,
|
|
12795
15259
|
false,
|
|
12796
15260
|
__vue2_injectStyles$2,
|
|
12797
|
-
"
|
|
15261
|
+
"0acfdd91",
|
|
12798
15262
|
null,
|
|
12799
15263
|
null
|
|
12800
15264
|
);
|
|
@@ -12803,11 +15267,11 @@ function __vue2_injectStyles$2(context) {
|
|
|
12803
15267
|
this[o2] = __cssModules$2[o2];
|
|
12804
15268
|
}
|
|
12805
15269
|
}
|
|
12806
|
-
const
|
|
15270
|
+
const OlCrud = /* @__PURE__ */ function() {
|
|
12807
15271
|
return __component__$2.exports;
|
|
12808
15272
|
}();
|
|
12809
|
-
|
|
12810
|
-
Vue.component("ol-
|
|
15273
|
+
OlCrud.install = function(Vue) {
|
|
15274
|
+
Vue.component("ol-crud", OlCrud);
|
|
12811
15275
|
};
|
|
12812
15276
|
var vuePluginHiprint = { exports: {} };
|
|
12813
15277
|
var barcodes = {};
|
|
@@ -109149,7 +111613,8 @@ const components = [
|
|
|
109149
111613
|
OlForm,
|
|
109150
111614
|
OlNumberRange,
|
|
109151
111615
|
OlPrint,
|
|
109152
|
-
OlPrintModel
|
|
111616
|
+
OlPrintModel,
|
|
111617
|
+
OlCrud
|
|
109153
111618
|
];
|
|
109154
111619
|
const install = async function(Vue, options2) {
|
|
109155
111620
|
components.map((item) => {
|
|
@@ -109158,6 +111623,24 @@ const install = async function(Vue, options2) {
|
|
|
109158
111623
|
Vue.prototype.$olBaseConfig = options2 || {};
|
|
109159
111624
|
consoleTooltip();
|
|
109160
111625
|
};
|
|
111626
|
+
const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
111627
|
+
__proto__: null,
|
|
111628
|
+
Dialog,
|
|
111629
|
+
Hiprint,
|
|
111630
|
+
OlCrud,
|
|
111631
|
+
OlCustomSearch,
|
|
111632
|
+
OlDropdownPrint,
|
|
111633
|
+
OlForm,
|
|
111634
|
+
OlNumberRange,
|
|
111635
|
+
OlPrint,
|
|
111636
|
+
OlPrintModel,
|
|
111637
|
+
OlSearch,
|
|
111638
|
+
OlTable,
|
|
111639
|
+
default: install,
|
|
111640
|
+
getData,
|
|
111641
|
+
swaggerInstall,
|
|
111642
|
+
swaggerUnload
|
|
111643
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
109161
111644
|
var html2canvasExports = requireHtml2canvas();
|
|
109162
111645
|
const html2canvas = /* @__PURE__ */ getDefaultExportFromCjs(html2canvasExports);
|
|
109163
111646
|
const html2canvas$1 = /* @__PURE__ */ _mergeNamespaces({
|
|
@@ -110162,6 +112645,7 @@ const index$1 = /* @__PURE__ */ _mergeNamespaces({
|
|
|
110162
112645
|
export {
|
|
110163
112646
|
Dialog,
|
|
110164
112647
|
Hiprint,
|
|
112648
|
+
OlCrud,
|
|
110165
112649
|
OlCustomSearch,
|
|
110166
112650
|
OlDropdownPrint,
|
|
110167
112651
|
OlForm,
|