@94ai/nf-table 5.0.38 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +131 -132
- package/lib/nf-table.cjs.js +244 -75
- package/lib/nf-table.esm-bundler.js +239 -70
- package/lib/nf-table.vue.d.ts +34 -135
- package/lib/style/css.d.ts +0 -1
- package/lib/style/index.d.ts +0 -1
- package/lib/types.d.ts +8 -0
- package/package/nf-table.vue +265 -117
- package/package/types.ts +16 -0
- package/package.json +10 -8
package/lib/nf-table.cjs.js
CHANGED
|
@@ -4,6 +4,7 @@ const vueDemi = require("vue-demi");
|
|
|
4
4
|
const commonUtils = require("@94ai/common-utils");
|
|
5
5
|
const vue2RuntimeHelpers = require("@94ai/vue2-runtime-helpers");
|
|
6
6
|
const elementUi = require("element-ui");
|
|
7
|
+
const vue = require("vue");
|
|
7
8
|
const NfMessage = require("@94ai/nf-message");
|
|
8
9
|
const __sfc_main$2 = vueDemi.defineComponent({
|
|
9
10
|
name: "NfColumnCheckDialog"
|
|
@@ -5056,13 +5057,13 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
5056
5057
|
};
|
|
5057
5058
|
},
|
|
5058
5059
|
getUnderlyingPotencialDraggableComponent: function getUnderlyingPotencialDraggableComponent(_ref) {
|
|
5059
|
-
var
|
|
5060
|
-
if (!
|
|
5061
|
-
if (!("realList" in
|
|
5062
|
-
return
|
|
5063
|
-
return
|
|
5060
|
+
var vue2 = _ref.__vue__;
|
|
5061
|
+
if (!vue2 || !vue2.$options || !isTransitionName(vue2.$options._componentTag)) {
|
|
5062
|
+
if (!("realList" in vue2) && vue2.$children.length === 1 && "realList" in vue2.$children[0])
|
|
5063
|
+
return vue2.$children[0];
|
|
5064
|
+
return vue2;
|
|
5064
5065
|
}
|
|
5065
|
-
return
|
|
5066
|
+
return vue2.$parent;
|
|
5066
5067
|
},
|
|
5067
5068
|
emitChanges: function emitChanges(evt) {
|
|
5068
5069
|
var _this5 = this;
|
|
@@ -5774,6 +5775,32 @@ const _sfc_render$1 = null;
|
|
|
5774
5775
|
const _sfc_staticRenderFns$1 = null;
|
|
5775
5776
|
var __component__$1 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
|
|
5776
5777
|
const RenderComponent = __component__$1.exports;
|
|
5778
|
+
/*!
|
|
5779
|
+
* vue-router v3.6.4
|
|
5780
|
+
* (c) 2022 Evan You
|
|
5781
|
+
* @license MIT
|
|
5782
|
+
*/
|
|
5783
|
+
function throwNoCurrentInstance(method) {
|
|
5784
|
+
if (!vue.getCurrentInstance()) {
|
|
5785
|
+
throw new Error("[vue-router]: Missing current instance. " + method + "() must be called inside <script setup> or setup().");
|
|
5786
|
+
}
|
|
5787
|
+
}
|
|
5788
|
+
function useRoute() {
|
|
5789
|
+
if (process.env.NODE_ENV !== "production") {
|
|
5790
|
+
throwNoCurrentInstance("useRoute");
|
|
5791
|
+
}
|
|
5792
|
+
var root = vue.getCurrentInstance().proxy.$root;
|
|
5793
|
+
if (!root._$route) {
|
|
5794
|
+
var route = vue.effectScope(true).run(function() {
|
|
5795
|
+
return vue.shallowReactive(Object.assign({}, root.$router.currentRoute));
|
|
5796
|
+
});
|
|
5797
|
+
root._$route = route;
|
|
5798
|
+
root.$router.afterEach(function(to) {
|
|
5799
|
+
Object.assign(route, to);
|
|
5800
|
+
});
|
|
5801
|
+
}
|
|
5802
|
+
return root._$route;
|
|
5803
|
+
}
|
|
5777
5804
|
const __sfc_main = vueDemi.defineComponent({
|
|
5778
5805
|
name: "nf-table"
|
|
5779
5806
|
});
|
|
@@ -5832,6 +5859,30 @@ __sfc_main.props = {
|
|
|
5832
5859
|
type: Array,
|
|
5833
5860
|
default: () => []
|
|
5834
5861
|
},
|
|
5862
|
+
initSearchApi: {
|
|
5863
|
+
key: "initSearchApi",
|
|
5864
|
+
required: false,
|
|
5865
|
+
type: [Boolean, null],
|
|
5866
|
+
default: void 0
|
|
5867
|
+
},
|
|
5868
|
+
pageChangeSearchApi: {
|
|
5869
|
+
key: "pageChangeSearchApi",
|
|
5870
|
+
required: false,
|
|
5871
|
+
type: [Boolean, null],
|
|
5872
|
+
default: void 0
|
|
5873
|
+
},
|
|
5874
|
+
pageKeys: {
|
|
5875
|
+
key: "pageKeys",
|
|
5876
|
+
required: false,
|
|
5877
|
+
type: Array,
|
|
5878
|
+
default: () => ["pageNo", "pageSize"]
|
|
5879
|
+
},
|
|
5880
|
+
setEasyConf: {
|
|
5881
|
+
key: "setEasyConf",
|
|
5882
|
+
required: false,
|
|
5883
|
+
type: Boolean,
|
|
5884
|
+
default: false
|
|
5885
|
+
},
|
|
5835
5886
|
dragCached: {
|
|
5836
5887
|
key: "dragCached",
|
|
5837
5888
|
required: false,
|
|
@@ -5884,13 +5935,13 @@ __sfc_main.props = {
|
|
|
5884
5935
|
key: "storageKey",
|
|
5885
5936
|
required: false,
|
|
5886
5937
|
type: String,
|
|
5887
|
-
default: "
|
|
5938
|
+
default: ""
|
|
5888
5939
|
},
|
|
5889
5940
|
searchFormStorageKey: {
|
|
5890
5941
|
key: "searchFormStorageKey",
|
|
5891
5942
|
required: false,
|
|
5892
5943
|
type: String,
|
|
5893
|
-
default: "
|
|
5944
|
+
default: ""
|
|
5894
5945
|
},
|
|
5895
5946
|
showColumn: {
|
|
5896
5947
|
key: "showColumn",
|
|
@@ -6195,6 +6246,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6195
6246
|
}
|
|
6196
6247
|
return column.operationList || [];
|
|
6197
6248
|
};
|
|
6249
|
+
const routeName = vueDemi.computed(() => useRoute().name);
|
|
6198
6250
|
const instance = (_a = vueDemi.getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
6199
6251
|
const elTableRef = vueDemi.ref();
|
|
6200
6252
|
const nfTableActionContainerRef = vueDemi.ref();
|
|
@@ -6208,6 +6260,28 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6208
6260
|
const columnCheckNfDrawer = vueDemi.ref();
|
|
6209
6261
|
const elTableHeight = vueDemi.ref();
|
|
6210
6262
|
const nfColumCheckDialogVisible = vueDemi.ref(false);
|
|
6263
|
+
const preSearchFormData = vueDemi.ref({});
|
|
6264
|
+
const cPageChangeSearchApi = vueDemi.ref(props.pageChangeSearchApi ?? props.setEasyConf);
|
|
6265
|
+
const cInitSearchApi = vueDemi.ref(props.initSearchApi ?? props.setEasyConf);
|
|
6266
|
+
const cStorageKey = vueDemi.ref(props.storageKey || `nf-table-columns-cached-key-${routeName.value}`);
|
|
6267
|
+
const cPageAttrs = vueDemi.reactive({
|
|
6268
|
+
// 页码,没有props时 & 允许分页时;默认 = 1
|
|
6269
|
+
"current-page": props.pageAttrs["current-page"] || (props.alwaysShowPage ? 1 : void 0),
|
|
6270
|
+
"page-size": props.pageAttrs["page-size"] || 10,
|
|
6271
|
+
pageKeys: props.pageKeys
|
|
6272
|
+
});
|
|
6273
|
+
const tableLoading = vueDemi.ref(false);
|
|
6274
|
+
const isLoading = vueDemi.computed(() => props.loading || tableLoading.value);
|
|
6275
|
+
const handleSizeChange = (val) => {
|
|
6276
|
+
cPageAttrs["page-size"] = val;
|
|
6277
|
+
if (cPageChangeSearchApi.value)
|
|
6278
|
+
onNfSearchFormSearch();
|
|
6279
|
+
};
|
|
6280
|
+
const handleCurrentChange = (val, isSearch = true) => {
|
|
6281
|
+
cPageAttrs["current-page"] = val;
|
|
6282
|
+
if (isSearch && cPageChangeSearchApi.value)
|
|
6283
|
+
onNfSearchFormSearch();
|
|
6284
|
+
};
|
|
6211
6285
|
const showData = vueDemi.computed(() => {
|
|
6212
6286
|
const pageSize = props.pageAttrs["page-size"];
|
|
6213
6287
|
const currentPage = props.pageAttrs["current-page"] || 1;
|
|
@@ -6228,10 +6302,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6228
6302
|
});
|
|
6229
6303
|
const loadingInstance = vueDemi.ref();
|
|
6230
6304
|
vueDemi.watch(() => {
|
|
6231
|
-
return props.loading;
|
|
6305
|
+
return props.loading || tableLoading.value;
|
|
6232
6306
|
}, async () => {
|
|
6233
6307
|
var _a2, _b;
|
|
6234
|
-
if (props.loading) {
|
|
6308
|
+
if (props.loading || tableLoading.value) {
|
|
6235
6309
|
await vueDemi.nextTick();
|
|
6236
6310
|
const {
|
|
6237
6311
|
target,
|
|
@@ -6307,7 +6381,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6307
6381
|
index: index2
|
|
6308
6382
|
};
|
|
6309
6383
|
});
|
|
6310
|
-
return commonUtils.CachedManager.syncCachedSet(
|
|
6384
|
+
return commonUtils.CachedManager.syncCachedSet(cStorageKey.value, columnState);
|
|
6311
6385
|
}
|
|
6312
6386
|
};
|
|
6313
6387
|
const syncShowItemToInitHidden = () => {
|
|
@@ -6328,9 +6402,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6328
6402
|
const syncCookiesToLocalShowColumn = async () => {
|
|
6329
6403
|
if (props.columnEdit) {
|
|
6330
6404
|
try {
|
|
6331
|
-
let columnState = commonUtils.CachedManager.syncCachedGet(
|
|
6405
|
+
let columnState = commonUtils.CachedManager.syncCachedGet(cStorageKey.value);
|
|
6332
6406
|
if (!columnState) {
|
|
6333
|
-
columnState = await commonUtils.CachedManager.asyncCachedGet(
|
|
6407
|
+
columnState = await commonUtils.CachedManager.asyncCachedGet(cStorageKey.value);
|
|
6334
6408
|
}
|
|
6335
6409
|
if (columnState) {
|
|
6336
6410
|
if (typeof columnState === "string") {
|
|
@@ -6354,9 +6428,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6354
6428
|
var _a2, _b;
|
|
6355
6429
|
if (props.columnEdit) {
|
|
6356
6430
|
try {
|
|
6357
|
-
let cached = commonUtils.CachedManager.syncCachedGet(
|
|
6431
|
+
let cached = commonUtils.CachedManager.syncCachedGet(cStorageKey.value);
|
|
6358
6432
|
if (!cached) {
|
|
6359
|
-
cached = await commonUtils.CachedManager.asyncCachedGet(
|
|
6433
|
+
cached = await commonUtils.CachedManager.asyncCachedGet(cStorageKey.value);
|
|
6360
6434
|
}
|
|
6361
6435
|
const cachedPriority = props.priority === "cached";
|
|
6362
6436
|
if (cachedPriority ? cached : (_a2 = localShowColumn.value) == null ? void 0 : _a2.length) {
|
|
@@ -6369,7 +6443,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6369
6443
|
}
|
|
6370
6444
|
}
|
|
6371
6445
|
if (props.dragCached) {
|
|
6372
|
-
await commonUtils.CachedManager.asyncCachedGet(`${
|
|
6446
|
+
await commonUtils.CachedManager.asyncCachedGet(`${cStorageKey.value}$drag-column-width`);
|
|
6373
6447
|
}
|
|
6374
6448
|
};
|
|
6375
6449
|
const getMinWidth = (column) => {
|
|
@@ -6401,7 +6475,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6401
6475
|
}
|
|
6402
6476
|
if (props.dragCached) {
|
|
6403
6477
|
const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
|
|
6404
|
-
let columnWidth = commonUtils.CachedManager.syncCachedGet(`${
|
|
6478
|
+
let columnWidth = commonUtils.CachedManager.syncCachedGet(`${cStorageKey.value}$drag-column-width`) || {};
|
|
6405
6479
|
if (columnWidth[prop]) {
|
|
6406
6480
|
attr.width = columnWidth[prop];
|
|
6407
6481
|
}
|
|
@@ -6416,13 +6490,29 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6416
6490
|
vueDemi.set(item, "initHidden", item.initHidden);
|
|
6417
6491
|
vueDemi.set(item, "destory", item.destory);
|
|
6418
6492
|
item.__index = index2;
|
|
6493
|
+
vueDemi.set(item, "optionsTag", {});
|
|
6494
|
+
if (item.getOptions) {
|
|
6495
|
+
vueDemi.set(item, "optionsEnum", {});
|
|
6496
|
+
item.getOptions((list) => {
|
|
6497
|
+
list.forEach((o) => {
|
|
6498
|
+
item.optionsEnum[o.value] = o.label;
|
|
6499
|
+
item.optionsTag[o.value] = o.tagType;
|
|
6500
|
+
});
|
|
6501
|
+
});
|
|
6502
|
+
} else if (item.options) {
|
|
6503
|
+
vueDemi.set(item, "optionsEnum", {});
|
|
6504
|
+
item.options.forEach((o) => {
|
|
6505
|
+
item.optionsEnum[o.value] = o.label;
|
|
6506
|
+
item.optionsTag[o.value] = o.tagType;
|
|
6507
|
+
});
|
|
6508
|
+
}
|
|
6419
6509
|
return item;
|
|
6420
6510
|
});
|
|
6421
6511
|
if (readCached && props.columnEdit) {
|
|
6422
6512
|
try {
|
|
6423
|
-
let columnState = commonUtils.CachedManager.syncCachedGet(
|
|
6513
|
+
let columnState = commonUtils.CachedManager.syncCachedGet(cStorageKey.value);
|
|
6424
6514
|
if (!columnState) {
|
|
6425
|
-
columnState = await commonUtils.CachedManager.asyncCachedGet(
|
|
6515
|
+
columnState = await commonUtils.CachedManager.asyncCachedGet(cStorageKey.value);
|
|
6426
6516
|
}
|
|
6427
6517
|
props.columns._skip = true;
|
|
6428
6518
|
if (columnState) {
|
|
@@ -6471,6 +6561,31 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6471
6561
|
}, {
|
|
6472
6562
|
deep: true
|
|
6473
6563
|
});
|
|
6564
|
+
vueDemi.watch(() => props.pageAttrs, (val) => {
|
|
6565
|
+
if ("current-page" in val) {
|
|
6566
|
+
cPageAttrs["current-page"] = Number(val["current-page"]);
|
|
6567
|
+
}
|
|
6568
|
+
if ("page-size" in val) {
|
|
6569
|
+
cPageAttrs["page-size"] = Number(val["page-size"]);
|
|
6570
|
+
}
|
|
6571
|
+
}, {
|
|
6572
|
+
deep: true
|
|
6573
|
+
});
|
|
6574
|
+
if (cInitSearchApi.value)
|
|
6575
|
+
onNfSearchFormSearch();
|
|
6576
|
+
});
|
|
6577
|
+
const searchFormAttrer = vueDemi.computed(() => {
|
|
6578
|
+
const obj = {
|
|
6579
|
+
...props.setEasyConf ? {
|
|
6580
|
+
labelWidth: 80,
|
|
6581
|
+
columns: 4,
|
|
6582
|
+
btnModel: "inline",
|
|
6583
|
+
columnEdit: true
|
|
6584
|
+
} : {},
|
|
6585
|
+
storageKey: props.searchFormStorageKey,
|
|
6586
|
+
...props.searchFormAttrs
|
|
6587
|
+
};
|
|
6588
|
+
return obj;
|
|
6474
6589
|
});
|
|
6475
6590
|
const tableAttrer = vueDemi.computed(() => {
|
|
6476
6591
|
const obj = {
|
|
@@ -6486,6 +6601,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6486
6601
|
},
|
|
6487
6602
|
resizable: true,
|
|
6488
6603
|
border: true,
|
|
6604
|
+
stripe: window.nfTableStripe,
|
|
6605
|
+
...props.setEasyConf ? {
|
|
6606
|
+
"row-key": "id"
|
|
6607
|
+
} : {},
|
|
6489
6608
|
...props.tableAttrs
|
|
6490
6609
|
};
|
|
6491
6610
|
delete obj.data;
|
|
@@ -6514,13 +6633,16 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6514
6633
|
initPageSizes();
|
|
6515
6634
|
const pageAttrer = vueDemi.computed(() => {
|
|
6516
6635
|
var _a2;
|
|
6517
|
-
|
|
6636
|
+
const map = {
|
|
6518
6637
|
background: false,
|
|
6519
6638
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
6520
6639
|
"page-sizes": pageSizes.value,
|
|
6521
6640
|
total: typeof props.pageAttrs.total === "undefined" ? (_a2 = props.data) == null ? void 0 : _a2.length : void 0,
|
|
6522
6641
|
...props.pageAttrs
|
|
6523
6642
|
};
|
|
6643
|
+
delete map["current-page"];
|
|
6644
|
+
delete map["page-size"];
|
|
6645
|
+
return map;
|
|
6524
6646
|
});
|
|
6525
6647
|
const isShow = (row) => {
|
|
6526
6648
|
if (row.type) {
|
|
@@ -6596,17 +6718,17 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6596
6718
|
column.width = minWidth;
|
|
6597
6719
|
}
|
|
6598
6720
|
if (props.dragCached) {
|
|
6599
|
-
const columnCachedData = await commonUtils.CachedManager.asyncCachedGet(`${
|
|
6721
|
+
const columnCachedData = await commonUtils.CachedManager.asyncCachedGet(`${cStorageKey.value}$drag-column-width`) || {};
|
|
6600
6722
|
columnCachedData[column.property] = column.width;
|
|
6601
|
-
await commonUtils.CachedManager.asyncCachedSet(`${
|
|
6723
|
+
await commonUtils.CachedManager.asyncCachedSet(`${cStorageKey.value}$drag-column-width`, columnCachedData);
|
|
6602
6724
|
}
|
|
6603
6725
|
await ((_b = (_a2 = props.tableEvents)["header-dragend"]) == null ? void 0 : _b.call(_a2, newWidth, oldWidth, column, event));
|
|
6604
6726
|
};
|
|
6605
6727
|
async function clearDragCached() {
|
|
6606
|
-
await commonUtils.CachedManager.asyncCachedSet(`${
|
|
6728
|
+
await commonUtils.CachedManager.asyncCachedSet(`${cStorageKey.value}$drag-column-width`, null);
|
|
6607
6729
|
}
|
|
6608
6730
|
async function clearColumnEditCached() {
|
|
6609
|
-
await commonUtils.CachedManager.asyncCachedSet(
|
|
6731
|
+
await commonUtils.CachedManager.asyncCachedSet(cStorageKey.value, null);
|
|
6610
6732
|
}
|
|
6611
6733
|
const columnCheckConfirmFeedback = (value) => {
|
|
6612
6734
|
if (!props.columnEdit) {
|
|
@@ -6652,6 +6774,30 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6652
6774
|
elTableHeight.value = (_b = props.tableAttrs) == null ? void 0 : _b.height;
|
|
6653
6775
|
}
|
|
6654
6776
|
};
|
|
6777
|
+
const searchApi = async (formData = {}) => {
|
|
6778
|
+
var _a2, _b, _c;
|
|
6779
|
+
(_b = (_a2 = props.searchFormEvents) == null ? void 0 : _a2["onSearch"]) == null ? void 0 : _b.call(_a2, formData);
|
|
6780
|
+
if (!((_c = instance == null ? void 0 : instance.$listeners) == null ? void 0 : _c.searchApi))
|
|
6781
|
+
return;
|
|
6782
|
+
tableLoading.value = true;
|
|
6783
|
+
if (JSON.stringify(preSearchFormData.value) !== JSON.stringify(formData)) {
|
|
6784
|
+
handleCurrentChange(1, false);
|
|
6785
|
+
}
|
|
6786
|
+
preSearchFormData.value = formData;
|
|
6787
|
+
await vueDemi.nextTick();
|
|
6788
|
+
emit("searchApi", {
|
|
6789
|
+
data: {
|
|
6790
|
+
...formData,
|
|
6791
|
+
...props.alwaysShowPage ? {
|
|
6792
|
+
[cPageAttrs.pageKeys[0]]: cPageAttrs["current-page"],
|
|
6793
|
+
[cPageAttrs.pageKeys[1]]: cPageAttrs["page-size"]
|
|
6794
|
+
} : {}
|
|
6795
|
+
},
|
|
6796
|
+
callback: () => {
|
|
6797
|
+
tableLoading.value = false;
|
|
6798
|
+
}
|
|
6799
|
+
});
|
|
6800
|
+
};
|
|
6655
6801
|
vueDemi.onMounted(() => {
|
|
6656
6802
|
calcTableHeight();
|
|
6657
6803
|
props.columns.forEach((i) => {
|
|
@@ -6660,6 +6806,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6660
6806
|
}
|
|
6661
6807
|
});
|
|
6662
6808
|
});
|
|
6809
|
+
const nfTableBorder = window.nfTableBorder;
|
|
6663
6810
|
return Object.assign({
|
|
6664
6811
|
getOperationListLocal,
|
|
6665
6812
|
elTableRef,
|
|
@@ -6674,11 +6821,16 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6674
6821
|
columnCheckNfDrawer,
|
|
6675
6822
|
elTableHeight,
|
|
6676
6823
|
nfColumCheckDialogVisible,
|
|
6824
|
+
cStorageKey,
|
|
6825
|
+
cPageAttrs,
|
|
6826
|
+
handleSizeChange,
|
|
6827
|
+
handleCurrentChange,
|
|
6677
6828
|
showData,
|
|
6678
6829
|
hasOperationSlot,
|
|
6679
6830
|
hasActionBarSlot,
|
|
6680
6831
|
tableColumns,
|
|
6681
6832
|
elTableRefKey,
|
|
6833
|
+
searchFormAttrer,
|
|
6682
6834
|
tableAttrer,
|
|
6683
6835
|
tableEventer,
|
|
6684
6836
|
renderPage,
|
|
@@ -6686,7 +6838,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6686
6838
|
isShow,
|
|
6687
6839
|
getActionBarItemStyle,
|
|
6688
6840
|
fieldsConfirm,
|
|
6689
|
-
columnCheckConfirm
|
|
6841
|
+
columnCheckConfirm,
|
|
6842
|
+
searchApi,
|
|
6843
|
+
nfTableBorder
|
|
6690
6844
|
}, {
|
|
6691
6845
|
/**
|
|
6692
6846
|
* 表格clearFilter
|
|
@@ -6800,6 +6954,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6800
6954
|
* 渲染表格项数据
|
|
6801
6955
|
*/
|
|
6802
6956
|
tableColumns,
|
|
6957
|
+
/**
|
|
6958
|
+
* 表格loading
|
|
6959
|
+
*/
|
|
6960
|
+
isLoading,
|
|
6803
6961
|
/**
|
|
6804
6962
|
* 计算表格高度
|
|
6805
6963
|
*/
|
|
@@ -6836,8 +6994,11 @@ var _sfc_render = function render3() {
|
|
|
6836
6994
|
}, [_vm._t("searchBox", function() {
|
|
6837
6995
|
var _a2;
|
|
6838
6996
|
return [_c("nf-search-form", _vm._g(_vm._b({
|
|
6839
|
-
ref: "nfSearchFormRef"
|
|
6840
|
-
|
|
6997
|
+
ref: "nfSearchFormRef",
|
|
6998
|
+
on: {
|
|
6999
|
+
"onSearch": _vm.searchApi
|
|
7000
|
+
}
|
|
7001
|
+
}, "nf-search-form", _vm.searchFormAttrer, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
|
|
6841
7002
|
var _a3, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
|
|
6842
7003
|
return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? _vm._t(item.tooltip.slot, null, {
|
|
6843
7004
|
"slot": item.tooltip.slot
|
|
@@ -6898,7 +7059,7 @@ var _sfc_render = function render3() {
|
|
|
6898
7059
|
ref: "elTableRef",
|
|
6899
7060
|
class: {
|
|
6900
7061
|
"nf-table-container": true,
|
|
6901
|
-
"nf-default-table-border": !((_a = _vm.tableAttrs) == null ? void 0 : _a.border)
|
|
7062
|
+
"nf-default-table-border": !_vm.nfTableBorder && !((_a = _vm.tableAttrs) == null ? void 0 : _a.border)
|
|
6902
7063
|
},
|
|
6903
7064
|
attrs: {
|
|
6904
7065
|
"data": _vm.showData,
|
|
@@ -6906,56 +7067,29 @@ var _sfc_render = function render3() {
|
|
|
6906
7067
|
"height": _vm.elTableHeight
|
|
6907
7068
|
}
|
|
6908
7069
|
}, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
|
|
6909
|
-
return [_vm.isShow(column) ?
|
|
7070
|
+
return [column.type && _vm.isShow(column) ? _c("el-table-column", _vm._b({
|
|
6910
7071
|
key: column.key || column.prop || column.type,
|
|
6911
7072
|
attrs: {
|
|
6912
7073
|
"type": column.type,
|
|
7074
|
+
"prop": column.prop,
|
|
6913
7075
|
"label": column.label
|
|
6914
7076
|
}
|
|
6915
|
-
}, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
|
|
7077
|
+
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : !column.type && _vm.isShow(column) ? _c("el-table-column", _vm._b({
|
|
6916
7078
|
key: column.key || column.prop || column.type,
|
|
6917
7079
|
attrs: {
|
|
6918
7080
|
"type": column.type,
|
|
6919
|
-
"label": column.label
|
|
6920
|
-
},
|
|
6921
|
-
scopedSlots: _vm._u([{
|
|
6922
|
-
key: "default",
|
|
6923
|
-
fn: function(scope) {
|
|
6924
|
-
return column.slot ? [_vm._t(column.slot, null, {
|
|
6925
|
-
"row": scope.row,
|
|
6926
|
-
"index": scope.$index
|
|
6927
|
-
})] : void 0;
|
|
6928
|
-
}
|
|
6929
|
-
}], null, true)
|
|
6930
|
-
}, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
|
|
6931
|
-
key: column.key || column.prop,
|
|
6932
|
-
attrs: {
|
|
6933
|
-
"prop": column.prop,
|
|
6934
|
-
"label": column.label
|
|
6935
|
-
},
|
|
6936
|
-
scopedSlots: _vm._u([{
|
|
6937
|
-
key: "header",
|
|
6938
|
-
fn: function(scope) {
|
|
6939
|
-
return [column.headerSlot ? [_vm._t(column.headerSlot, null, {
|
|
6940
|
-
"$index": scope.$index,
|
|
6941
|
-
"column": scope.column
|
|
6942
|
-
})] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
|
|
6943
|
-
}
|
|
6944
|
-
}], null, true)
|
|
6945
|
-
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _c("el-table-column", _vm._b({
|
|
6946
|
-
key: column.key || column.prop,
|
|
6947
|
-
attrs: {
|
|
6948
7081
|
"prop": column.prop,
|
|
6949
7082
|
"label": column.label
|
|
6950
7083
|
},
|
|
6951
7084
|
scopedSlots: _vm._u([{
|
|
6952
7085
|
key: "header",
|
|
6953
7086
|
fn: function(scope) {
|
|
6954
|
-
return [column.
|
|
6955
|
-
"
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
7087
|
+
return [_vm.columnEdit && column.prop === _vm.operationPropKey && _vm.columnPosition === "embed" ? _vm._t("operationIconColumnCheck", function() {
|
|
7088
|
+
return [_c("span", {
|
|
7089
|
+
staticStyle: {
|
|
7090
|
+
"white-space": "nowrap"
|
|
7091
|
+
}
|
|
7092
|
+
}, [_vm._v(" " + _vm._s(column.label) + " ")]), _c("el-tooltip", {
|
|
6959
7093
|
attrs: {
|
|
6960
7094
|
"popper-class": "actionTooltipRef",
|
|
6961
7095
|
"placement": "top",
|
|
@@ -6972,20 +7106,43 @@ var _sfc_render = function render3() {
|
|
|
6972
7106
|
})])];
|
|
6973
7107
|
}, {
|
|
6974
7108
|
"column": column
|
|
6975
|
-
}) :
|
|
7109
|
+
}) : column.labelTooltip ? [_c("span", {
|
|
7110
|
+
staticStyle: {
|
|
7111
|
+
"white-space": "nowrap"
|
|
7112
|
+
}
|
|
7113
|
+
}, [_vm._v(" " + _vm._s(column.label) + " ")]), _c("el-tooltip", {
|
|
7114
|
+
attrs: {
|
|
7115
|
+
"placement": "right",
|
|
7116
|
+
"effect": "light"
|
|
7117
|
+
}
|
|
7118
|
+
}, [_c("div", {
|
|
7119
|
+
attrs: {
|
|
7120
|
+
"slot": "content"
|
|
7121
|
+
},
|
|
7122
|
+
slot: "content"
|
|
7123
|
+
}, [_vm._v(_vm._s(column.labelTooltip))]), _c("i", {
|
|
7124
|
+
staticClass: "iconfont icon-bangzhuzhongxin",
|
|
7125
|
+
staticStyle: {
|
|
7126
|
+
"font-weight": "normal"
|
|
7127
|
+
}
|
|
7128
|
+
})])] : column.headerSlot ? [_vm._t(column.headerSlot, null, {
|
|
7129
|
+
"$index": scope.$index,
|
|
7130
|
+
"column": scope.column
|
|
7131
|
+
})] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
|
|
6976
7132
|
}
|
|
6977
7133
|
}, {
|
|
6978
7134
|
key: "default",
|
|
6979
7135
|
fn: function(scope) {
|
|
6980
|
-
|
|
7136
|
+
var _a2;
|
|
7137
|
+
return [column.slot ? _vm._t(column.slot, null, {
|
|
7138
|
+
"row": scope.row,
|
|
7139
|
+
"index": scope.$index
|
|
7140
|
+
}) : column.render ? _c("render-component", {
|
|
6981
7141
|
attrs: {
|
|
6982
7142
|
"render": column.render,
|
|
6983
7143
|
"row": scope.row
|
|
6984
7144
|
}
|
|
6985
|
-
}) :
|
|
6986
|
-
"row": scope.row,
|
|
6987
|
-
"index": scope.$index
|
|
6988
|
-
}) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
|
|
7145
|
+
}) : column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
|
|
6989
7146
|
return _c("nf-button", _vm._g({
|
|
6990
7147
|
key: item.key || index2,
|
|
6991
7148
|
class: item.class,
|
|
@@ -7001,10 +7158,14 @@ var _sfc_render = function render3() {
|
|
|
7001
7158
|
"circle": item.circle
|
|
7002
7159
|
}
|
|
7003
7160
|
}, item.events), [_vm._v(_vm._s(item.text) + " ")]);
|
|
7004
|
-
}) : _c("span", [_vm._v(_vm._s(scope.row[column.prop]))])]]
|
|
7161
|
+
}) : ((_a2 = column.attr) == null ? void 0 : _a2.formatter) ? _c("span", [_vm._v(" " + _vm._s(column.attr.formatter(scope.row, column, scope.row[column.prop], scope.$index)) + " ")]) : column.optionsEnum ? [column.optionsTag[scope.row[column.prop]] ? _c("nf-tag", {
|
|
7162
|
+
attrs: {
|
|
7163
|
+
"type": column.optionsTag[scope.row[column.prop]]
|
|
7164
|
+
}
|
|
7165
|
+
}, [_vm._v(_vm._s(column.optionsEnum[scope.row[column.prop]]))]) : _c("span", [_vm._v(" " + _vm._s(column.optionsEnum[scope.row[column.prop]]) + " ")])] : _c("span", [_vm._v(" " + _vm._s(scope.row[column.prop]) + _vm._s(column.unit) + " ")])];
|
|
7005
7166
|
}
|
|
7006
7167
|
}], null, true)
|
|
7007
|
-
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2)
|
|
7168
|
+
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _vm._e()];
|
|
7008
7169
|
}), _vm._t("append", null, {
|
|
7009
7170
|
"slot": "append"
|
|
7010
7171
|
}), _vm._t("empty", function() {
|
|
@@ -7398,7 +7559,15 @@ var _sfc_render = function render3() {
|
|
|
7398
7559
|
}), _vm._t("pagination", function() {
|
|
7399
7560
|
return [_vm.renderPage ? _c("el-pagination", _vm._g(_vm._b({
|
|
7400
7561
|
ref: "nfTablePaginationRef",
|
|
7401
|
-
staticClass: "nf-pagination-box nf-fr"
|
|
7562
|
+
staticClass: "nf-pagination-box nf-fr",
|
|
7563
|
+
attrs: {
|
|
7564
|
+
"current-page": _vm.cPageAttrs["current-page"],
|
|
7565
|
+
"page-size": _vm.cPageAttrs["page-size"]
|
|
7566
|
+
},
|
|
7567
|
+
on: {
|
|
7568
|
+
"size-change": _vm.handleSizeChange,
|
|
7569
|
+
"current-change": _vm.handleCurrentChange
|
|
7570
|
+
}
|
|
7402
7571
|
}, "el-pagination", _vm.pageAttrer, false), _vm.pageEvents)) : _vm._e()];
|
|
7403
7572
|
})], 2)], 2), _vm.nfColumCheckDialogVisible && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
|
|
7404
7573
|
ref: "columnCheckDialog",
|
|
@@ -7410,7 +7579,7 @@ var _sfc_render = function render3() {
|
|
|
7410
7579
|
"show": _vm.nfColumCheckDialogVisible,
|
|
7411
7580
|
"table-columns": _vm.columns,
|
|
7412
7581
|
"column-edit": _vm.columnEdit,
|
|
7413
|
-
"storage-key": _vm.
|
|
7582
|
+
"storage-key": _vm.cStorageKey,
|
|
7414
7583
|
"width": _vm.columnCheckWidth,
|
|
7415
7584
|
"modal-append-to-body": _vm.columnCheckModalAppendToBody,
|
|
7416
7585
|
"modal": _vm.columnCheckModal,
|
|
@@ -7474,7 +7643,7 @@ var _sfc_render = function render3() {
|
|
|
7474
7643
|
"get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
|
|
7475
7644
|
"column-edit": _vm.columnEdit,
|
|
7476
7645
|
"operation-prop-key": _vm.operationPropKey,
|
|
7477
|
-
"storage-key": _vm.
|
|
7646
|
+
"storage-key": _vm.cStorageKey,
|
|
7478
7647
|
"table-columns": _vm.columns
|
|
7479
7648
|
}
|
|
7480
7649
|
})], 2) : _vm._e()], 2);
|