@94ai/nf-table 6.1.1 → 6.1.7
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 +132 -131
- package/lib/nf-table.cjs.js +66 -241
- package/lib/nf-table.esm-bundler.js +61 -236
- package/lib/nf-table.vue.d.ts +135 -34
- package/lib/types.d.ts +0 -8
- package/package/nf-table.vue +116 -265
- package/package/types.ts +0 -16
- package/package.json +8 -10
package/lib/nf-table.cjs.js
CHANGED
|
@@ -4,7 +4,6 @@ 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");
|
|
8
7
|
const NfMessage = require("@94ai/nf-message");
|
|
9
8
|
const __sfc_main$2 = vueDemi.defineComponent({
|
|
10
9
|
name: "NfColumnCheckDialog"
|
|
@@ -5057,13 +5056,13 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
5057
5056
|
};
|
|
5058
5057
|
},
|
|
5059
5058
|
getUnderlyingPotencialDraggableComponent: function getUnderlyingPotencialDraggableComponent(_ref) {
|
|
5060
|
-
var
|
|
5061
|
-
if (!
|
|
5062
|
-
if (!("realList" in
|
|
5063
|
-
return
|
|
5064
|
-
return
|
|
5059
|
+
var vue = _ref.__vue__;
|
|
5060
|
+
if (!vue || !vue.$options || !isTransitionName(vue.$options._componentTag)) {
|
|
5061
|
+
if (!("realList" in vue) && vue.$children.length === 1 && "realList" in vue.$children[0])
|
|
5062
|
+
return vue.$children[0];
|
|
5063
|
+
return vue;
|
|
5065
5064
|
}
|
|
5066
|
-
return
|
|
5065
|
+
return vue.$parent;
|
|
5067
5066
|
},
|
|
5068
5067
|
emitChanges: function emitChanges(evt) {
|
|
5069
5068
|
var _this5 = this;
|
|
@@ -5775,32 +5774,6 @@ const _sfc_render$1 = null;
|
|
|
5775
5774
|
const _sfc_staticRenderFns$1 = null;
|
|
5776
5775
|
var __component__$1 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
|
|
5777
5776
|
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
|
-
}
|
|
5804
5777
|
const __sfc_main = vueDemi.defineComponent({
|
|
5805
5778
|
name: "nf-table"
|
|
5806
5779
|
});
|
|
@@ -5859,30 +5832,6 @@ __sfc_main.props = {
|
|
|
5859
5832
|
type: Array,
|
|
5860
5833
|
default: () => []
|
|
5861
5834
|
},
|
|
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
|
-
},
|
|
5886
5835
|
dragCached: {
|
|
5887
5836
|
key: "dragCached",
|
|
5888
5837
|
required: false,
|
|
@@ -5935,13 +5884,13 @@ __sfc_main.props = {
|
|
|
5935
5884
|
key: "storageKey",
|
|
5936
5885
|
required: false,
|
|
5937
5886
|
type: String,
|
|
5938
|
-
default: ""
|
|
5887
|
+
default: "nf-table-columns-cached-key"
|
|
5939
5888
|
},
|
|
5940
5889
|
searchFormStorageKey: {
|
|
5941
5890
|
key: "searchFormStorageKey",
|
|
5942
5891
|
required: false,
|
|
5943
5892
|
type: String,
|
|
5944
|
-
default: ""
|
|
5893
|
+
default: "nf-search-form-columns-cached-key"
|
|
5945
5894
|
},
|
|
5946
5895
|
showColumn: {
|
|
5947
5896
|
key: "showColumn",
|
|
@@ -6246,7 +6195,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6246
6195
|
}
|
|
6247
6196
|
return column.operationList || [];
|
|
6248
6197
|
};
|
|
6249
|
-
const routeName = vueDemi.computed(() => useRoute().name);
|
|
6250
6198
|
const instance = (_a = vueDemi.getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
6251
6199
|
const elTableRef = vueDemi.ref();
|
|
6252
6200
|
const nfTableActionContainerRef = vueDemi.ref();
|
|
@@ -6260,28 +6208,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6260
6208
|
const columnCheckNfDrawer = vueDemi.ref();
|
|
6261
6209
|
const elTableHeight = vueDemi.ref();
|
|
6262
6210
|
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
|
-
};
|
|
6285
6211
|
const showData = vueDemi.computed(() => {
|
|
6286
6212
|
const pageSize = props.pageAttrs["page-size"];
|
|
6287
6213
|
const currentPage = props.pageAttrs["current-page"] || 1;
|
|
@@ -6302,10 +6228,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6302
6228
|
});
|
|
6303
6229
|
const loadingInstance = vueDemi.ref();
|
|
6304
6230
|
vueDemi.watch(() => {
|
|
6305
|
-
return props.loading
|
|
6231
|
+
return props.loading;
|
|
6306
6232
|
}, async () => {
|
|
6307
6233
|
var _a2, _b;
|
|
6308
|
-
if (props.loading
|
|
6234
|
+
if (props.loading) {
|
|
6309
6235
|
await vueDemi.nextTick();
|
|
6310
6236
|
const {
|
|
6311
6237
|
target,
|
|
@@ -6381,7 +6307,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6381
6307
|
index: index2
|
|
6382
6308
|
};
|
|
6383
6309
|
});
|
|
6384
|
-
return commonUtils.CachedManager.syncCachedSet(
|
|
6310
|
+
return commonUtils.CachedManager.syncCachedSet(props.storageKey, columnState);
|
|
6385
6311
|
}
|
|
6386
6312
|
};
|
|
6387
6313
|
const syncShowItemToInitHidden = () => {
|
|
@@ -6402,9 +6328,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6402
6328
|
const syncCookiesToLocalShowColumn = async () => {
|
|
6403
6329
|
if (props.columnEdit) {
|
|
6404
6330
|
try {
|
|
6405
|
-
let columnState = commonUtils.CachedManager.syncCachedGet(
|
|
6331
|
+
let columnState = commonUtils.CachedManager.syncCachedGet(props.storageKey);
|
|
6406
6332
|
if (!columnState) {
|
|
6407
|
-
columnState = await commonUtils.CachedManager.asyncCachedGet(
|
|
6333
|
+
columnState = await commonUtils.CachedManager.asyncCachedGet(props.storageKey);
|
|
6408
6334
|
}
|
|
6409
6335
|
if (columnState) {
|
|
6410
6336
|
if (typeof columnState === "string") {
|
|
@@ -6428,9 +6354,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6428
6354
|
var _a2, _b;
|
|
6429
6355
|
if (props.columnEdit) {
|
|
6430
6356
|
try {
|
|
6431
|
-
let cached = commonUtils.CachedManager.syncCachedGet(
|
|
6357
|
+
let cached = commonUtils.CachedManager.syncCachedGet(props.storageKey);
|
|
6432
6358
|
if (!cached) {
|
|
6433
|
-
cached = await commonUtils.CachedManager.asyncCachedGet(
|
|
6359
|
+
cached = await commonUtils.CachedManager.asyncCachedGet(props.storageKey);
|
|
6434
6360
|
}
|
|
6435
6361
|
const cachedPriority = props.priority === "cached";
|
|
6436
6362
|
if (cachedPriority ? cached : (_a2 = localShowColumn.value) == null ? void 0 : _a2.length) {
|
|
@@ -6443,7 +6369,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6443
6369
|
}
|
|
6444
6370
|
}
|
|
6445
6371
|
if (props.dragCached) {
|
|
6446
|
-
await commonUtils.CachedManager.asyncCachedGet(`${
|
|
6372
|
+
await commonUtils.CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`);
|
|
6447
6373
|
}
|
|
6448
6374
|
};
|
|
6449
6375
|
const getMinWidth = (column) => {
|
|
@@ -6475,7 +6401,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6475
6401
|
}
|
|
6476
6402
|
if (props.dragCached) {
|
|
6477
6403
|
const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
|
|
6478
|
-
let columnWidth = commonUtils.CachedManager.syncCachedGet(`${
|
|
6404
|
+
let columnWidth = commonUtils.CachedManager.syncCachedGet(`${props.storageKey}$drag-column-width`) || {};
|
|
6479
6405
|
if (columnWidth[prop]) {
|
|
6480
6406
|
attr.width = columnWidth[prop];
|
|
6481
6407
|
}
|
|
@@ -6490,29 +6416,13 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6490
6416
|
vueDemi.set(item, "initHidden", item.initHidden);
|
|
6491
6417
|
vueDemi.set(item, "destory", item.destory);
|
|
6492
6418
|
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
|
-
}
|
|
6509
6419
|
return item;
|
|
6510
6420
|
});
|
|
6511
6421
|
if (readCached && props.columnEdit) {
|
|
6512
6422
|
try {
|
|
6513
|
-
let columnState = commonUtils.CachedManager.syncCachedGet(
|
|
6423
|
+
let columnState = commonUtils.CachedManager.syncCachedGet(props.storageKey);
|
|
6514
6424
|
if (!columnState) {
|
|
6515
|
-
columnState = await commonUtils.CachedManager.asyncCachedGet(
|
|
6425
|
+
columnState = await commonUtils.CachedManager.asyncCachedGet(props.storageKey);
|
|
6516
6426
|
}
|
|
6517
6427
|
props.columns._skip = true;
|
|
6518
6428
|
if (columnState) {
|
|
@@ -6561,31 +6471,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6561
6471
|
}, {
|
|
6562
6472
|
deep: true
|
|
6563
6473
|
});
|
|
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;
|
|
6589
6474
|
});
|
|
6590
6475
|
const tableAttrer = vueDemi.computed(() => {
|
|
6591
6476
|
const obj = {
|
|
@@ -6602,9 +6487,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6602
6487
|
resizable: true,
|
|
6603
6488
|
border: true,
|
|
6604
6489
|
stripe: window.nfTableStripe,
|
|
6605
|
-
...props.setEasyConf ? {
|
|
6606
|
-
"row-key": "id"
|
|
6607
|
-
} : {},
|
|
6608
6490
|
...props.tableAttrs
|
|
6609
6491
|
};
|
|
6610
6492
|
delete obj.data;
|
|
@@ -6633,16 +6515,13 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6633
6515
|
initPageSizes();
|
|
6634
6516
|
const pageAttrer = vueDemi.computed(() => {
|
|
6635
6517
|
var _a2;
|
|
6636
|
-
|
|
6518
|
+
return {
|
|
6637
6519
|
background: false,
|
|
6638
6520
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
6639
6521
|
"page-sizes": pageSizes.value,
|
|
6640
6522
|
total: typeof props.pageAttrs.total === "undefined" ? (_a2 = props.data) == null ? void 0 : _a2.length : void 0,
|
|
6641
6523
|
...props.pageAttrs
|
|
6642
6524
|
};
|
|
6643
|
-
delete map["current-page"];
|
|
6644
|
-
delete map["page-size"];
|
|
6645
|
-
return map;
|
|
6646
6525
|
});
|
|
6647
6526
|
const isShow = (row) => {
|
|
6648
6527
|
if (row.type) {
|
|
@@ -6718,17 +6597,17 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6718
6597
|
column.width = minWidth;
|
|
6719
6598
|
}
|
|
6720
6599
|
if (props.dragCached) {
|
|
6721
|
-
const columnCachedData = await commonUtils.CachedManager.asyncCachedGet(`${
|
|
6600
|
+
const columnCachedData = await commonUtils.CachedManager.asyncCachedGet(`${props.storageKey}$drag-column-width`) || {};
|
|
6722
6601
|
columnCachedData[column.property] = column.width;
|
|
6723
|
-
await commonUtils.CachedManager.asyncCachedSet(`${
|
|
6602
|
+
await commonUtils.CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, columnCachedData);
|
|
6724
6603
|
}
|
|
6725
6604
|
await ((_b = (_a2 = props.tableEvents)["header-dragend"]) == null ? void 0 : _b.call(_a2, newWidth, oldWidth, column, event));
|
|
6726
6605
|
};
|
|
6727
6606
|
async function clearDragCached() {
|
|
6728
|
-
await commonUtils.CachedManager.asyncCachedSet(`${
|
|
6607
|
+
await commonUtils.CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, null);
|
|
6729
6608
|
}
|
|
6730
6609
|
async function clearColumnEditCached() {
|
|
6731
|
-
await commonUtils.CachedManager.asyncCachedSet(
|
|
6610
|
+
await commonUtils.CachedManager.asyncCachedSet(props.storageKey, null);
|
|
6732
6611
|
}
|
|
6733
6612
|
const columnCheckConfirmFeedback = (value) => {
|
|
6734
6613
|
if (!props.columnEdit) {
|
|
@@ -6774,30 +6653,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6774
6653
|
elTableHeight.value = (_b = props.tableAttrs) == null ? void 0 : _b.height;
|
|
6775
6654
|
}
|
|
6776
6655
|
};
|
|
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
|
-
};
|
|
6801
6656
|
vueDemi.onMounted(() => {
|
|
6802
6657
|
calcTableHeight();
|
|
6803
6658
|
props.columns.forEach((i) => {
|
|
@@ -6821,16 +6676,11 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6821
6676
|
columnCheckNfDrawer,
|
|
6822
6677
|
elTableHeight,
|
|
6823
6678
|
nfColumCheckDialogVisible,
|
|
6824
|
-
cStorageKey,
|
|
6825
|
-
cPageAttrs,
|
|
6826
|
-
handleSizeChange,
|
|
6827
|
-
handleCurrentChange,
|
|
6828
6679
|
showData,
|
|
6829
6680
|
hasOperationSlot,
|
|
6830
6681
|
hasActionBarSlot,
|
|
6831
6682
|
tableColumns,
|
|
6832
6683
|
elTableRefKey,
|
|
6833
|
-
searchFormAttrer,
|
|
6834
6684
|
tableAttrer,
|
|
6835
6685
|
tableEventer,
|
|
6836
6686
|
renderPage,
|
|
@@ -6839,7 +6689,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6839
6689
|
getActionBarItemStyle,
|
|
6840
6690
|
fieldsConfirm,
|
|
6841
6691
|
columnCheckConfirm,
|
|
6842
|
-
searchApi,
|
|
6843
6692
|
nfTableBorder
|
|
6844
6693
|
}, {
|
|
6845
6694
|
/**
|
|
@@ -6954,10 +6803,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6954
6803
|
* 渲染表格项数据
|
|
6955
6804
|
*/
|
|
6956
6805
|
tableColumns,
|
|
6957
|
-
/**
|
|
6958
|
-
* 表格loading
|
|
6959
|
-
*/
|
|
6960
|
-
isLoading,
|
|
6961
6806
|
/**
|
|
6962
6807
|
* 计算表格高度
|
|
6963
6808
|
*/
|
|
@@ -6994,11 +6839,8 @@ var _sfc_render = function render3() {
|
|
|
6994
6839
|
}, [_vm._t("searchBox", function() {
|
|
6995
6840
|
var _a2;
|
|
6996
6841
|
return [_c("nf-search-form", _vm._g(_vm._b({
|
|
6997
|
-
ref: "nfSearchFormRef"
|
|
6998
|
-
|
|
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) {
|
|
6842
|
+
ref: "nfSearchFormRef"
|
|
6843
|
+
}, "nf-search-form", _vm.searchFormAttrs, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
|
|
7002
6844
|
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;
|
|
7003
6845
|
return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? _vm._t(item.tooltip.slot, null, {
|
|
7004
6846
|
"slot": item.tooltip.slot
|
|
@@ -7067,11 +6909,16 @@ var _sfc_render = function render3() {
|
|
|
7067
6909
|
"height": _vm.elTableHeight
|
|
7068
6910
|
}
|
|
7069
6911
|
}, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
|
|
7070
|
-
return [
|
|
6912
|
+
return [_vm.isShow(column) ? [column.type ? [column.type !== "expand" ? _c("el-table-column", _vm._b({
|
|
6913
|
+
key: column.key || column.prop || column.type,
|
|
6914
|
+
attrs: {
|
|
6915
|
+
"type": column.type,
|
|
6916
|
+
"label": column.label
|
|
6917
|
+
}
|
|
6918
|
+
}, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
|
|
7071
6919
|
key: column.key || column.prop || column.type,
|
|
7072
6920
|
attrs: {
|
|
7073
6921
|
"type": column.type,
|
|
7074
|
-
"prop": column.prop,
|
|
7075
6922
|
"label": column.label
|
|
7076
6923
|
},
|
|
7077
6924
|
scopedSlots: _vm._u([{
|
|
@@ -7083,22 +6930,35 @@ var _sfc_render = function render3() {
|
|
|
7083
6930
|
})] : void 0;
|
|
7084
6931
|
}
|
|
7085
6932
|
}], null, true)
|
|
7086
|
-
}, "el-table-column", column.attr, false)
|
|
7087
|
-
key: column.key || column.prop
|
|
6933
|
+
}, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
|
|
6934
|
+
key: column.key || column.prop,
|
|
7088
6935
|
attrs: {
|
|
7089
|
-
"type": column.type,
|
|
7090
6936
|
"prop": column.prop,
|
|
7091
6937
|
"label": column.label
|
|
7092
6938
|
},
|
|
7093
6939
|
scopedSlots: _vm._u([{
|
|
7094
6940
|
key: "header",
|
|
7095
6941
|
fn: function(scope) {
|
|
7096
|
-
return [
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
6942
|
+
return [column.headerSlot ? [_vm._t(column.headerSlot, null, {
|
|
6943
|
+
"$index": scope.$index,
|
|
6944
|
+
"column": scope.column
|
|
6945
|
+
})] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
|
|
6946
|
+
}
|
|
6947
|
+
}], null, true)
|
|
6948
|
+
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _c("el-table-column", _vm._b({
|
|
6949
|
+
key: column.key || column.prop,
|
|
6950
|
+
attrs: {
|
|
6951
|
+
"prop": column.prop,
|
|
6952
|
+
"label": column.label
|
|
6953
|
+
},
|
|
6954
|
+
scopedSlots: _vm._u([{
|
|
6955
|
+
key: "header",
|
|
6956
|
+
fn: function(scope) {
|
|
6957
|
+
return [column.headerSlot ? [_vm._t(column.headerSlot, null, {
|
|
6958
|
+
"$index": scope.$index,
|
|
6959
|
+
"column": scope.column
|
|
6960
|
+
})] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")]), column.prop === _vm.operationPropKey && _vm.columnEdit && _vm.columnPosition === "embed" ? _vm._t("operationIconColumnCheck", function() {
|
|
6961
|
+
return [_c("el-tooltip", {
|
|
7102
6962
|
attrs: {
|
|
7103
6963
|
"popper-class": "actionTooltipRef",
|
|
7104
6964
|
"placement": "top",
|
|
@@ -7115,43 +6975,20 @@ var _sfc_render = function render3() {
|
|
|
7115
6975
|
})])];
|
|
7116
6976
|
}, {
|
|
7117
6977
|
"column": column
|
|
7118
|
-
}) :
|
|
7119
|
-
staticStyle: {
|
|
7120
|
-
"white-space": "nowrap"
|
|
7121
|
-
}
|
|
7122
|
-
}, [_vm._v(" " + _vm._s(column.label) + " ")]), _c("el-tooltip", {
|
|
7123
|
-
attrs: {
|
|
7124
|
-
"placement": "right",
|
|
7125
|
-
"effect": "light"
|
|
7126
|
-
}
|
|
7127
|
-
}, [_c("div", {
|
|
7128
|
-
attrs: {
|
|
7129
|
-
"slot": "content"
|
|
7130
|
-
},
|
|
7131
|
-
slot: "content"
|
|
7132
|
-
}, [_vm._v(_vm._s(column.labelTooltip))]), _c("i", {
|
|
7133
|
-
staticClass: "iconfont icon-bangzhuzhongxin",
|
|
7134
|
-
staticStyle: {
|
|
7135
|
-
"font-weight": "normal"
|
|
7136
|
-
}
|
|
7137
|
-
})])] : column.headerSlot ? [_vm._t(column.headerSlot, null, {
|
|
7138
|
-
"$index": scope.$index,
|
|
7139
|
-
"column": scope.column
|
|
7140
|
-
})] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
|
|
6978
|
+
}) : _vm._e()];
|
|
7141
6979
|
}
|
|
7142
6980
|
}, {
|
|
7143
6981
|
key: "default",
|
|
7144
6982
|
fn: function(scope) {
|
|
7145
|
-
|
|
7146
|
-
return [column.slot ? _vm._t(column.slot, null, {
|
|
7147
|
-
"row": scope.row,
|
|
7148
|
-
"index": scope.$index
|
|
7149
|
-
}) : column.render ? _c("render-component", {
|
|
6983
|
+
return [column.render ? _c("render-component", {
|
|
7150
6984
|
attrs: {
|
|
7151
6985
|
"render": column.render,
|
|
7152
6986
|
"row": scope.row
|
|
7153
6987
|
}
|
|
7154
|
-
}) : column.
|
|
6988
|
+
}) : [column.slot ? _vm._t(column.slot, null, {
|
|
6989
|
+
"row": scope.row,
|
|
6990
|
+
"index": scope.$index
|
|
6991
|
+
}) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
|
|
7155
6992
|
return _c("nf-button", _vm._g({
|
|
7156
6993
|
key: item.key || index2,
|
|
7157
6994
|
class: item.class,
|
|
@@ -7167,14 +7004,10 @@ var _sfc_render = function render3() {
|
|
|
7167
7004
|
"circle": item.circle
|
|
7168
7005
|
}
|
|
7169
7006
|
}, item.events), [_vm._v(_vm._s(item.text) + " ")]);
|
|
7170
|
-
}) :
|
|
7171
|
-
attrs: {
|
|
7172
|
-
"type": column.optionsTag[scope.row[column.prop]]
|
|
7173
|
-
}
|
|
7174
|
-
}, [_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) + " ")])];
|
|
7007
|
+
}) : _c("span", [_vm._v(_vm._s(scope.row[column.prop]))])]]];
|
|
7175
7008
|
}
|
|
7176
7009
|
}], null, true)
|
|
7177
|
-
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _vm._e()];
|
|
7010
|
+
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2)]] : _vm._e()];
|
|
7178
7011
|
}), _vm._t("append", null, {
|
|
7179
7012
|
"slot": "append"
|
|
7180
7013
|
}), _vm._t("empty", function() {
|
|
@@ -7568,15 +7401,7 @@ var _sfc_render = function render3() {
|
|
|
7568
7401
|
}), _vm._t("pagination", function() {
|
|
7569
7402
|
return [_vm.renderPage ? _c("el-pagination", _vm._g(_vm._b({
|
|
7570
7403
|
ref: "nfTablePaginationRef",
|
|
7571
|
-
staticClass: "nf-pagination-box nf-fr"
|
|
7572
|
-
attrs: {
|
|
7573
|
-
"current-page": _vm.cPageAttrs["current-page"],
|
|
7574
|
-
"page-size": _vm.cPageAttrs["page-size"]
|
|
7575
|
-
},
|
|
7576
|
-
on: {
|
|
7577
|
-
"size-change": _vm.handleSizeChange,
|
|
7578
|
-
"current-change": _vm.handleCurrentChange
|
|
7579
|
-
}
|
|
7404
|
+
staticClass: "nf-pagination-box nf-fr"
|
|
7580
7405
|
}, "el-pagination", _vm.pageAttrer, false), _vm.pageEvents)) : _vm._e()];
|
|
7581
7406
|
})], 2)], 2), _vm.nfColumCheckDialogVisible && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
|
|
7582
7407
|
ref: "columnCheckDialog",
|
|
@@ -7588,7 +7413,7 @@ var _sfc_render = function render3() {
|
|
|
7588
7413
|
"show": _vm.nfColumCheckDialogVisible,
|
|
7589
7414
|
"table-columns": _vm.columns,
|
|
7590
7415
|
"column-edit": _vm.columnEdit,
|
|
7591
|
-
"storage-key": _vm.
|
|
7416
|
+
"storage-key": _vm.storageKey,
|
|
7592
7417
|
"width": _vm.columnCheckWidth,
|
|
7593
7418
|
"modal-append-to-body": _vm.columnCheckModalAppendToBody,
|
|
7594
7419
|
"modal": _vm.columnCheckModal,
|
|
@@ -7652,7 +7477,7 @@ var _sfc_render = function render3() {
|
|
|
7652
7477
|
"get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
|
|
7653
7478
|
"column-edit": _vm.columnEdit,
|
|
7654
7479
|
"operation-prop-key": _vm.operationPropKey,
|
|
7655
|
-
"storage-key": _vm.
|
|
7480
|
+
"storage-key": _vm.storageKey,
|
|
7656
7481
|
"table-columns": _vm.columns
|
|
7657
7482
|
}
|
|
7658
7483
|
})], 2) : _vm._e()], 2);
|