@94ai/nf-table 6.1.7 → 6.1.9
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 +239 -73
- package/lib/nf-table.esm-bundler.js +234 -68
- package/lib/nf-table.vue.d.ts +34 -135
- package/lib/types.d.ts +8 -0
- package/package/nf-table.vue +262 -116
- package/package/types.ts +16 -0
- package/package.json +10 -8
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent, getCurrentInstance, ref, computed, onMounted, onBeforeMount, watch, nextTick, set } from "vue-demi";
|
|
1
|
+
import { defineComponent, getCurrentInstance, ref, computed, onMounted, onBeforeMount, reactive, watch, nextTick, set } from "vue-demi";
|
|
2
2
|
import { CachedManager, deepClone } from "@94ai/common-utils";
|
|
3
3
|
import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
|
|
4
4
|
import { Loading } from "element-ui";
|
|
5
|
+
import { getCurrentInstance as getCurrentInstance$1, effectScope, shallowReactive } from "vue";
|
|
5
6
|
import NfMessage from "@94ai/nf-message";
|
|
6
7
|
const __sfc_main$2 = defineComponent({
|
|
7
8
|
name: "NfColumnCheckDialog"
|
|
@@ -5772,6 +5773,32 @@ const _sfc_render$1 = null;
|
|
|
5772
5773
|
const _sfc_staticRenderFns$1 = null;
|
|
5773
5774
|
var __component__$1 = /* @__PURE__ */ normalizeComponent(_sfc_main, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
|
|
5774
5775
|
const RenderComponent = __component__$1.exports;
|
|
5776
|
+
/*!
|
|
5777
|
+
* vue-router v3.6.4
|
|
5778
|
+
* (c) 2022 Evan You
|
|
5779
|
+
* @license MIT
|
|
5780
|
+
*/
|
|
5781
|
+
function throwNoCurrentInstance(method) {
|
|
5782
|
+
if (!getCurrentInstance$1()) {
|
|
5783
|
+
throw new Error("[vue-router]: Missing current instance. " + method + "() must be called inside <script setup> or setup().");
|
|
5784
|
+
}
|
|
5785
|
+
}
|
|
5786
|
+
function useRoute() {
|
|
5787
|
+
if (process.env.NODE_ENV !== "production") {
|
|
5788
|
+
throwNoCurrentInstance("useRoute");
|
|
5789
|
+
}
|
|
5790
|
+
var root = getCurrentInstance$1().proxy.$root;
|
|
5791
|
+
if (!root._$route) {
|
|
5792
|
+
var route = effectScope(true).run(function() {
|
|
5793
|
+
return shallowReactive(Object.assign({}, root.$router.currentRoute));
|
|
5794
|
+
});
|
|
5795
|
+
root._$route = route;
|
|
5796
|
+
root.$router.afterEach(function(to) {
|
|
5797
|
+
Object.assign(route, to);
|
|
5798
|
+
});
|
|
5799
|
+
}
|
|
5800
|
+
return root._$route;
|
|
5801
|
+
}
|
|
5775
5802
|
const __sfc_main = defineComponent({
|
|
5776
5803
|
name: "nf-table"
|
|
5777
5804
|
});
|
|
@@ -5830,6 +5857,30 @@ __sfc_main.props = {
|
|
|
5830
5857
|
type: Array,
|
|
5831
5858
|
default: () => []
|
|
5832
5859
|
},
|
|
5860
|
+
initSearchApi: {
|
|
5861
|
+
key: "initSearchApi",
|
|
5862
|
+
required: false,
|
|
5863
|
+
type: [Boolean, null],
|
|
5864
|
+
default: void 0
|
|
5865
|
+
},
|
|
5866
|
+
pageChangeSearchApi: {
|
|
5867
|
+
key: "pageChangeSearchApi",
|
|
5868
|
+
required: false,
|
|
5869
|
+
type: [Boolean, null],
|
|
5870
|
+
default: void 0
|
|
5871
|
+
},
|
|
5872
|
+
pageKeys: {
|
|
5873
|
+
key: "pageKeys",
|
|
5874
|
+
required: false,
|
|
5875
|
+
type: Array,
|
|
5876
|
+
default: () => ["pageNo", "pageSize"]
|
|
5877
|
+
},
|
|
5878
|
+
setEasyConf: {
|
|
5879
|
+
key: "setEasyConf",
|
|
5880
|
+
required: false,
|
|
5881
|
+
type: Boolean,
|
|
5882
|
+
default: false
|
|
5883
|
+
},
|
|
5833
5884
|
dragCached: {
|
|
5834
5885
|
key: "dragCached",
|
|
5835
5886
|
required: false,
|
|
@@ -5882,13 +5933,13 @@ __sfc_main.props = {
|
|
|
5882
5933
|
key: "storageKey",
|
|
5883
5934
|
required: false,
|
|
5884
5935
|
type: String,
|
|
5885
|
-
default: "
|
|
5936
|
+
default: ""
|
|
5886
5937
|
},
|
|
5887
5938
|
searchFormStorageKey: {
|
|
5888
5939
|
key: "searchFormStorageKey",
|
|
5889
5940
|
required: false,
|
|
5890
5941
|
type: String,
|
|
5891
|
-
default: "
|
|
5942
|
+
default: ""
|
|
5892
5943
|
},
|
|
5893
5944
|
showColumn: {
|
|
5894
5945
|
key: "showColumn",
|
|
@@ -6193,6 +6244,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6193
6244
|
}
|
|
6194
6245
|
return column.operationList || [];
|
|
6195
6246
|
};
|
|
6247
|
+
const routeName = computed(() => useRoute().name);
|
|
6196
6248
|
const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
6197
6249
|
const elTableRef = ref();
|
|
6198
6250
|
const nfTableActionContainerRef = ref();
|
|
@@ -6206,6 +6258,28 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6206
6258
|
const columnCheckNfDrawer = ref();
|
|
6207
6259
|
const elTableHeight = ref();
|
|
6208
6260
|
const nfColumCheckDialogVisible = ref(false);
|
|
6261
|
+
const preSearchFormData = ref({});
|
|
6262
|
+
const cPageChangeSearchApi = ref(props.pageChangeSearchApi ?? props.setEasyConf);
|
|
6263
|
+
const cInitSearchApi = ref(props.initSearchApi ?? props.setEasyConf);
|
|
6264
|
+
const cStorageKey = ref(props.storageKey || `nf-table-columns-cached-key-${routeName.value}`);
|
|
6265
|
+
const cPageAttrs = reactive({
|
|
6266
|
+
// 页码,没有props时 & 允许分页时;默认 = 1
|
|
6267
|
+
"current-page": props.pageAttrs["current-page"] || (props.alwaysShowPage ? 1 : void 0),
|
|
6268
|
+
"page-size": props.pageAttrs["page-size"] || 10,
|
|
6269
|
+
pageKeys: props.pageKeys
|
|
6270
|
+
});
|
|
6271
|
+
const tableLoading = ref(false);
|
|
6272
|
+
const isLoading = computed(() => props.loading || tableLoading.value);
|
|
6273
|
+
const handleSizeChange = (val) => {
|
|
6274
|
+
cPageAttrs["page-size"] = val;
|
|
6275
|
+
if (cPageChangeSearchApi.value)
|
|
6276
|
+
onNfSearchFormSearch();
|
|
6277
|
+
};
|
|
6278
|
+
const handleCurrentChange = (val, isSearch = true) => {
|
|
6279
|
+
cPageAttrs["current-page"] = val;
|
|
6280
|
+
if (isSearch && cPageChangeSearchApi.value)
|
|
6281
|
+
onNfSearchFormSearch();
|
|
6282
|
+
};
|
|
6209
6283
|
const showData = computed(() => {
|
|
6210
6284
|
const pageSize = props.pageAttrs["page-size"];
|
|
6211
6285
|
const currentPage = props.pageAttrs["current-page"] || 1;
|
|
@@ -6226,10 +6300,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6226
6300
|
});
|
|
6227
6301
|
const loadingInstance = ref();
|
|
6228
6302
|
watch(() => {
|
|
6229
|
-
return props.loading;
|
|
6303
|
+
return props.loading || tableLoading.value;
|
|
6230
6304
|
}, async () => {
|
|
6231
6305
|
var _a2, _b;
|
|
6232
|
-
if (props.loading) {
|
|
6306
|
+
if (props.loading || tableLoading.value) {
|
|
6233
6307
|
await nextTick();
|
|
6234
6308
|
const {
|
|
6235
6309
|
target,
|
|
@@ -6305,7 +6379,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6305
6379
|
index: index2
|
|
6306
6380
|
};
|
|
6307
6381
|
});
|
|
6308
|
-
return CachedManager.syncCachedSet(
|
|
6382
|
+
return CachedManager.syncCachedSet(cStorageKey.value, columnState);
|
|
6309
6383
|
}
|
|
6310
6384
|
};
|
|
6311
6385
|
const syncShowItemToInitHidden = () => {
|
|
@@ -6326,9 +6400,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6326
6400
|
const syncCookiesToLocalShowColumn = async () => {
|
|
6327
6401
|
if (props.columnEdit) {
|
|
6328
6402
|
try {
|
|
6329
|
-
let columnState = CachedManager.syncCachedGet(
|
|
6403
|
+
let columnState = CachedManager.syncCachedGet(cStorageKey.value);
|
|
6330
6404
|
if (!columnState) {
|
|
6331
|
-
columnState = await CachedManager.asyncCachedGet(
|
|
6405
|
+
columnState = await CachedManager.asyncCachedGet(cStorageKey.value);
|
|
6332
6406
|
}
|
|
6333
6407
|
if (columnState) {
|
|
6334
6408
|
if (typeof columnState === "string") {
|
|
@@ -6352,9 +6426,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6352
6426
|
var _a2, _b;
|
|
6353
6427
|
if (props.columnEdit) {
|
|
6354
6428
|
try {
|
|
6355
|
-
let cached = CachedManager.syncCachedGet(
|
|
6429
|
+
let cached = CachedManager.syncCachedGet(cStorageKey.value);
|
|
6356
6430
|
if (!cached) {
|
|
6357
|
-
cached = await CachedManager.asyncCachedGet(
|
|
6431
|
+
cached = await CachedManager.asyncCachedGet(cStorageKey.value);
|
|
6358
6432
|
}
|
|
6359
6433
|
const cachedPriority = props.priority === "cached";
|
|
6360
6434
|
if (cachedPriority ? cached : (_a2 = localShowColumn.value) == null ? void 0 : _a2.length) {
|
|
@@ -6367,7 +6441,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6367
6441
|
}
|
|
6368
6442
|
}
|
|
6369
6443
|
if (props.dragCached) {
|
|
6370
|
-
await CachedManager.asyncCachedGet(`${
|
|
6444
|
+
await CachedManager.asyncCachedGet(`${cStorageKey.value}$drag-column-width`);
|
|
6371
6445
|
}
|
|
6372
6446
|
};
|
|
6373
6447
|
const getMinWidth = (column) => {
|
|
@@ -6399,7 +6473,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6399
6473
|
}
|
|
6400
6474
|
if (props.dragCached) {
|
|
6401
6475
|
const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
|
|
6402
|
-
let columnWidth = CachedManager.syncCachedGet(`${
|
|
6476
|
+
let columnWidth = CachedManager.syncCachedGet(`${cStorageKey.value}$drag-column-width`) || {};
|
|
6403
6477
|
if (columnWidth[prop]) {
|
|
6404
6478
|
attr.width = columnWidth[prop];
|
|
6405
6479
|
}
|
|
@@ -6414,13 +6488,29 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6414
6488
|
set(item, "initHidden", item.initHidden);
|
|
6415
6489
|
set(item, "destory", item.destory);
|
|
6416
6490
|
item.__index = index2;
|
|
6491
|
+
set(item, "optionsTag", {});
|
|
6492
|
+
if (item.getOptions) {
|
|
6493
|
+
set(item, "optionsEnum", {});
|
|
6494
|
+
item.getOptions((list) => {
|
|
6495
|
+
list.forEach((o) => {
|
|
6496
|
+
item.optionsEnum[o.value] = o.label;
|
|
6497
|
+
item.optionsTag[o.value] = o.tagType;
|
|
6498
|
+
});
|
|
6499
|
+
});
|
|
6500
|
+
} else if (item.options) {
|
|
6501
|
+
set(item, "optionsEnum", {});
|
|
6502
|
+
item.options.forEach((o) => {
|
|
6503
|
+
item.optionsEnum[o.value] = o.label;
|
|
6504
|
+
item.optionsTag[o.value] = o.tagType;
|
|
6505
|
+
});
|
|
6506
|
+
}
|
|
6417
6507
|
return item;
|
|
6418
6508
|
});
|
|
6419
6509
|
if (readCached && props.columnEdit) {
|
|
6420
6510
|
try {
|
|
6421
|
-
let columnState = CachedManager.syncCachedGet(
|
|
6511
|
+
let columnState = CachedManager.syncCachedGet(cStorageKey.value);
|
|
6422
6512
|
if (!columnState) {
|
|
6423
|
-
columnState = await CachedManager.asyncCachedGet(
|
|
6513
|
+
columnState = await CachedManager.asyncCachedGet(cStorageKey.value);
|
|
6424
6514
|
}
|
|
6425
6515
|
props.columns._skip = true;
|
|
6426
6516
|
if (columnState) {
|
|
@@ -6469,6 +6559,31 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6469
6559
|
}, {
|
|
6470
6560
|
deep: true
|
|
6471
6561
|
});
|
|
6562
|
+
watch(() => props.pageAttrs, (val) => {
|
|
6563
|
+
if ("current-page" in val) {
|
|
6564
|
+
cPageAttrs["current-page"] = Number(val["current-page"]);
|
|
6565
|
+
}
|
|
6566
|
+
if ("page-size" in val) {
|
|
6567
|
+
cPageAttrs["page-size"] = Number(val["page-size"]);
|
|
6568
|
+
}
|
|
6569
|
+
}, {
|
|
6570
|
+
deep: true
|
|
6571
|
+
});
|
|
6572
|
+
if (cInitSearchApi.value)
|
|
6573
|
+
onNfSearchFormSearch();
|
|
6574
|
+
});
|
|
6575
|
+
const searchFormAttrer = computed(() => {
|
|
6576
|
+
const obj = {
|
|
6577
|
+
...props.setEasyConf ? {
|
|
6578
|
+
labelWidth: 80,
|
|
6579
|
+
columns: 4,
|
|
6580
|
+
btnModel: "inline",
|
|
6581
|
+
columnEdit: true
|
|
6582
|
+
} : {},
|
|
6583
|
+
storageKey: props.searchFormStorageKey,
|
|
6584
|
+
...props.searchFormAttrs
|
|
6585
|
+
};
|
|
6586
|
+
return obj;
|
|
6472
6587
|
});
|
|
6473
6588
|
const tableAttrer = computed(() => {
|
|
6474
6589
|
const obj = {
|
|
@@ -6485,6 +6600,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6485
6600
|
resizable: true,
|
|
6486
6601
|
border: true,
|
|
6487
6602
|
stripe: window.nfTableStripe,
|
|
6603
|
+
...props.setEasyConf ? {
|
|
6604
|
+
"row-key": "id"
|
|
6605
|
+
} : {},
|
|
6488
6606
|
...props.tableAttrs
|
|
6489
6607
|
};
|
|
6490
6608
|
delete obj.data;
|
|
@@ -6513,13 +6631,16 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6513
6631
|
initPageSizes();
|
|
6514
6632
|
const pageAttrer = computed(() => {
|
|
6515
6633
|
var _a2;
|
|
6516
|
-
|
|
6634
|
+
const map = {
|
|
6517
6635
|
background: false,
|
|
6518
6636
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
6519
6637
|
"page-sizes": pageSizes.value,
|
|
6520
6638
|
total: typeof props.pageAttrs.total === "undefined" ? (_a2 = props.data) == null ? void 0 : _a2.length : void 0,
|
|
6521
6639
|
...props.pageAttrs
|
|
6522
6640
|
};
|
|
6641
|
+
delete map["current-page"];
|
|
6642
|
+
delete map["page-size"];
|
|
6643
|
+
return map;
|
|
6523
6644
|
});
|
|
6524
6645
|
const isShow = (row) => {
|
|
6525
6646
|
if (row.type) {
|
|
@@ -6595,17 +6716,17 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6595
6716
|
column.width = minWidth;
|
|
6596
6717
|
}
|
|
6597
6718
|
if (props.dragCached) {
|
|
6598
|
-
const columnCachedData = await CachedManager.asyncCachedGet(`${
|
|
6719
|
+
const columnCachedData = await CachedManager.asyncCachedGet(`${cStorageKey.value}$drag-column-width`) || {};
|
|
6599
6720
|
columnCachedData[column.property] = column.width;
|
|
6600
|
-
await CachedManager.asyncCachedSet(`${
|
|
6721
|
+
await CachedManager.asyncCachedSet(`${cStorageKey.value}$drag-column-width`, columnCachedData);
|
|
6601
6722
|
}
|
|
6602
6723
|
await ((_b = (_a2 = props.tableEvents)["header-dragend"]) == null ? void 0 : _b.call(_a2, newWidth, oldWidth, column, event));
|
|
6603
6724
|
};
|
|
6604
6725
|
async function clearDragCached() {
|
|
6605
|
-
await CachedManager.asyncCachedSet(`${
|
|
6726
|
+
await CachedManager.asyncCachedSet(`${cStorageKey.value}$drag-column-width`, null);
|
|
6606
6727
|
}
|
|
6607
6728
|
async function clearColumnEditCached() {
|
|
6608
|
-
await CachedManager.asyncCachedSet(
|
|
6729
|
+
await CachedManager.asyncCachedSet(cStorageKey.value, null);
|
|
6609
6730
|
}
|
|
6610
6731
|
const columnCheckConfirmFeedback = (value) => {
|
|
6611
6732
|
if (!props.columnEdit) {
|
|
@@ -6651,6 +6772,30 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6651
6772
|
elTableHeight.value = (_b = props.tableAttrs) == null ? void 0 : _b.height;
|
|
6652
6773
|
}
|
|
6653
6774
|
};
|
|
6775
|
+
const searchApi = async (formData = {}) => {
|
|
6776
|
+
var _a2, _b, _c;
|
|
6777
|
+
(_b = (_a2 = props.searchFormEvents) == null ? void 0 : _a2["onSearch"]) == null ? void 0 : _b.call(_a2, formData);
|
|
6778
|
+
if (!((_c = instance == null ? void 0 : instance.$listeners) == null ? void 0 : _c.searchApi))
|
|
6779
|
+
return;
|
|
6780
|
+
tableLoading.value = true;
|
|
6781
|
+
if (JSON.stringify(preSearchFormData.value) !== JSON.stringify(formData)) {
|
|
6782
|
+
handleCurrentChange(1, false);
|
|
6783
|
+
}
|
|
6784
|
+
preSearchFormData.value = formData;
|
|
6785
|
+
await nextTick();
|
|
6786
|
+
emit("searchApi", {
|
|
6787
|
+
data: {
|
|
6788
|
+
...formData,
|
|
6789
|
+
...props.alwaysShowPage ? {
|
|
6790
|
+
[cPageAttrs.pageKeys[0]]: cPageAttrs["current-page"],
|
|
6791
|
+
[cPageAttrs.pageKeys[1]]: cPageAttrs["page-size"]
|
|
6792
|
+
} : {}
|
|
6793
|
+
},
|
|
6794
|
+
callback: () => {
|
|
6795
|
+
tableLoading.value = false;
|
|
6796
|
+
}
|
|
6797
|
+
});
|
|
6798
|
+
};
|
|
6654
6799
|
onMounted(() => {
|
|
6655
6800
|
calcTableHeight();
|
|
6656
6801
|
props.columns.forEach((i) => {
|
|
@@ -6674,11 +6819,16 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6674
6819
|
columnCheckNfDrawer,
|
|
6675
6820
|
elTableHeight,
|
|
6676
6821
|
nfColumCheckDialogVisible,
|
|
6822
|
+
cStorageKey,
|
|
6823
|
+
cPageAttrs,
|
|
6824
|
+
handleSizeChange,
|
|
6825
|
+
handleCurrentChange,
|
|
6677
6826
|
showData,
|
|
6678
6827
|
hasOperationSlot,
|
|
6679
6828
|
hasActionBarSlot,
|
|
6680
6829
|
tableColumns,
|
|
6681
6830
|
elTableRefKey,
|
|
6831
|
+
searchFormAttrer,
|
|
6682
6832
|
tableAttrer,
|
|
6683
6833
|
tableEventer,
|
|
6684
6834
|
renderPage,
|
|
@@ -6687,6 +6837,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6687
6837
|
getActionBarItemStyle,
|
|
6688
6838
|
fieldsConfirm,
|
|
6689
6839
|
columnCheckConfirm,
|
|
6840
|
+
searchApi,
|
|
6690
6841
|
nfTableBorder
|
|
6691
6842
|
}, {
|
|
6692
6843
|
/**
|
|
@@ -6801,6 +6952,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6801
6952
|
* 渲染表格项数据
|
|
6802
6953
|
*/
|
|
6803
6954
|
tableColumns,
|
|
6955
|
+
/**
|
|
6956
|
+
* 表格loading
|
|
6957
|
+
*/
|
|
6958
|
+
isLoading,
|
|
6804
6959
|
/**
|
|
6805
6960
|
* 计算表格高度
|
|
6806
6961
|
*/
|
|
@@ -6837,8 +6992,11 @@ var _sfc_render = function render3() {
|
|
|
6837
6992
|
}, [_vm._t("searchBox", function() {
|
|
6838
6993
|
var _a2;
|
|
6839
6994
|
return [_c("nf-search-form", _vm._g(_vm._b({
|
|
6840
|
-
ref: "nfSearchFormRef"
|
|
6841
|
-
|
|
6995
|
+
ref: "nfSearchFormRef",
|
|
6996
|
+
on: {
|
|
6997
|
+
"onSearch": _vm.searchApi
|
|
6998
|
+
}
|
|
6999
|
+
}, "nf-search-form", _vm.searchFormAttrer, false), _vm.searchFormEvents), [_vm._l(((_a2 = _vm.nfSearchFormRef) == null ? void 0 : _a2.renderSearchFormItemOptions) || [], function(item) {
|
|
6842
7000
|
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;
|
|
6843
7001
|
return [((_a3 = item.tooltip) == null ? void 0 : _a3.slot) ? _vm._t(item.tooltip.slot, null, {
|
|
6844
7002
|
"slot": item.tooltip.slot
|
|
@@ -6907,56 +7065,29 @@ var _sfc_render = function render3() {
|
|
|
6907
7065
|
"height": _vm.elTableHeight
|
|
6908
7066
|
}
|
|
6909
7067
|
}, "el-table", _vm.tableAttrer, false), _vm.tableEventer), [_vm._l(_vm.tableColumns, function(column) {
|
|
6910
|
-
return [_vm.isShow(column) ?
|
|
7068
|
+
return [column.type && _vm.isShow(column) ? _c("el-table-column", _vm._b({
|
|
6911
7069
|
key: column.key || column.prop || column.type,
|
|
6912
7070
|
attrs: {
|
|
6913
7071
|
"type": column.type,
|
|
7072
|
+
"prop": column.prop,
|
|
6914
7073
|
"label": column.label
|
|
6915
7074
|
}
|
|
6916
|
-
}, "el-table-column", column.attr, false)) : _c("el-table-column", _vm._b({
|
|
7075
|
+
}, "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({
|
|
6917
7076
|
key: column.key || column.prop || column.type,
|
|
6918
7077
|
attrs: {
|
|
6919
7078
|
"type": column.type,
|
|
6920
|
-
"label": column.label
|
|
6921
|
-
},
|
|
6922
|
-
scopedSlots: _vm._u([{
|
|
6923
|
-
key: "default",
|
|
6924
|
-
fn: function(scope) {
|
|
6925
|
-
return column.slot ? [_vm._t(column.slot, null, {
|
|
6926
|
-
"row": scope.row,
|
|
6927
|
-
"index": scope.$index
|
|
6928
|
-
})] : void 0;
|
|
6929
|
-
}
|
|
6930
|
-
}], null, true)
|
|
6931
|
-
}, "el-table-column", column.attr, false))] : [column.attr && column.attr.formatter ? _c("el-table-column", _vm._b({
|
|
6932
|
-
key: column.key || column.prop,
|
|
6933
|
-
attrs: {
|
|
6934
|
-
"prop": column.prop,
|
|
6935
|
-
"label": column.label
|
|
6936
|
-
},
|
|
6937
|
-
scopedSlots: _vm._u([{
|
|
6938
|
-
key: "header",
|
|
6939
|
-
fn: function(scope) {
|
|
6940
|
-
return [column.headerSlot ? [_vm._t(column.headerSlot, null, {
|
|
6941
|
-
"$index": scope.$index,
|
|
6942
|
-
"column": scope.column
|
|
6943
|
-
})] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
|
|
6944
|
-
}
|
|
6945
|
-
}], null, true)
|
|
6946
|
-
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _c("el-table-column", _vm._b({
|
|
6947
|
-
key: column.key || column.prop,
|
|
6948
|
-
attrs: {
|
|
6949
7079
|
"prop": column.prop,
|
|
6950
7080
|
"label": column.label
|
|
6951
7081
|
},
|
|
6952
7082
|
scopedSlots: _vm._u([{
|
|
6953
7083
|
key: "header",
|
|
6954
7084
|
fn: function(scope) {
|
|
6955
|
-
return [column.
|
|
6956
|
-
"
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
7085
|
+
return [_vm.columnEdit && column.prop === _vm.operationPropKey && _vm.columnPosition === "embed" ? _vm._t("operationIconColumnCheck", function() {
|
|
7086
|
+
return [_c("span", {
|
|
7087
|
+
staticStyle: {
|
|
7088
|
+
"white-space": "nowrap"
|
|
7089
|
+
}
|
|
7090
|
+
}, [_vm._v(" " + _vm._s(column.label) + " ")]), _c("el-tooltip", {
|
|
6960
7091
|
attrs: {
|
|
6961
7092
|
"popper-class": "actionTooltipRef",
|
|
6962
7093
|
"placement": "top",
|
|
@@ -6973,20 +7104,43 @@ var _sfc_render = function render3() {
|
|
|
6973
7104
|
})])];
|
|
6974
7105
|
}, {
|
|
6975
7106
|
"column": column
|
|
6976
|
-
}) :
|
|
7107
|
+
}) : column.labelTooltip ? [_c("span", {
|
|
7108
|
+
staticStyle: {
|
|
7109
|
+
"white-space": "nowrap"
|
|
7110
|
+
}
|
|
7111
|
+
}, [_vm._v(" " + _vm._s(column.label) + " ")]), _c("el-tooltip", {
|
|
7112
|
+
attrs: {
|
|
7113
|
+
"placement": "right",
|
|
7114
|
+
"effect": "light"
|
|
7115
|
+
}
|
|
7116
|
+
}, [_c("div", {
|
|
7117
|
+
attrs: {
|
|
7118
|
+
"slot": "content"
|
|
7119
|
+
},
|
|
7120
|
+
slot: "content"
|
|
7121
|
+
}, [_vm._v(_vm._s(column.labelTooltip))]), _c("i", {
|
|
7122
|
+
staticClass: "iconfont icon-bangzhuzhongxin",
|
|
7123
|
+
staticStyle: {
|
|
7124
|
+
"font-weight": "normal"
|
|
7125
|
+
}
|
|
7126
|
+
})])] : column.headerSlot ? [_vm._t(column.headerSlot, null, {
|
|
7127
|
+
"$index": scope.$index,
|
|
7128
|
+
"column": scope.column
|
|
7129
|
+
})] : _c("span", [_vm._v(" " + _vm._s(column.label) + " ")])];
|
|
6977
7130
|
}
|
|
6978
7131
|
}, {
|
|
6979
7132
|
key: "default",
|
|
6980
7133
|
fn: function(scope) {
|
|
6981
|
-
|
|
7134
|
+
var _a2;
|
|
7135
|
+
return [column.slot ? _vm._t(column.slot, null, {
|
|
7136
|
+
"row": scope.row,
|
|
7137
|
+
"index": scope.$index
|
|
7138
|
+
}) : column.render ? _c("render-component", {
|
|
6982
7139
|
attrs: {
|
|
6983
7140
|
"render": column.render,
|
|
6984
7141
|
"row": scope.row
|
|
6985
7142
|
}
|
|
6986
|
-
}) :
|
|
6987
|
-
"row": scope.row,
|
|
6988
|
-
"index": scope.$index
|
|
6989
|
-
}) : [column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
|
|
7143
|
+
}) : column.prop === _vm.operationPropKey && !_vm.hasOperationSlot ? _vm._l(_vm.getOperationListLocal(column, scope), function(item, index2) {
|
|
6990
7144
|
return _c("nf-button", _vm._g({
|
|
6991
7145
|
key: item.key || index2,
|
|
6992
7146
|
class: item.class,
|
|
@@ -7002,10 +7156,14 @@ var _sfc_render = function render3() {
|
|
|
7002
7156
|
"circle": item.circle
|
|
7003
7157
|
}
|
|
7004
7158
|
}, item.events), [_vm._v(_vm._s(item.text) + " ")]);
|
|
7005
|
-
}) : _c("span", [_vm._v(_vm._s(scope.row[column.prop]))])]]
|
|
7159
|
+
}) : ((_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", {
|
|
7160
|
+
attrs: {
|
|
7161
|
+
"type": column.optionsTag[scope.row[column.prop]]
|
|
7162
|
+
}
|
|
7163
|
+
}, [_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) + " ")])];
|
|
7006
7164
|
}
|
|
7007
7165
|
}], null, true)
|
|
7008
|
-
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2)
|
|
7166
|
+
}, "el-table-column", column.attr, false), [column.singleHeadMutiColSlot ? _vm._t(column.singleHeadMutiColSlot) : _vm._e()], 2) : _vm._e()];
|
|
7009
7167
|
}), _vm._t("append", null, {
|
|
7010
7168
|
"slot": "append"
|
|
7011
7169
|
}), _vm._t("empty", function() {
|
|
@@ -7399,7 +7557,15 @@ var _sfc_render = function render3() {
|
|
|
7399
7557
|
}), _vm._t("pagination", function() {
|
|
7400
7558
|
return [_vm.renderPage ? _c("el-pagination", _vm._g(_vm._b({
|
|
7401
7559
|
ref: "nfTablePaginationRef",
|
|
7402
|
-
staticClass: "nf-pagination-box nf-fr"
|
|
7560
|
+
staticClass: "nf-pagination-box nf-fr",
|
|
7561
|
+
attrs: {
|
|
7562
|
+
"current-page": _vm.cPageAttrs["current-page"],
|
|
7563
|
+
"page-size": _vm.cPageAttrs["page-size"]
|
|
7564
|
+
},
|
|
7565
|
+
on: {
|
|
7566
|
+
"size-change": _vm.handleSizeChange,
|
|
7567
|
+
"current-change": _vm.handleCurrentChange
|
|
7568
|
+
}
|
|
7403
7569
|
}, "el-pagination", _vm.pageAttrer, false), _vm.pageEvents)) : _vm._e()];
|
|
7404
7570
|
})], 2)], 2), _vm.nfColumCheckDialogVisible && _vm.checkMode === "dialog" ? _c("column-check-dialog", {
|
|
7405
7571
|
ref: "columnCheckDialog",
|
|
@@ -7411,7 +7577,7 @@ var _sfc_render = function render3() {
|
|
|
7411
7577
|
"show": _vm.nfColumCheckDialogVisible,
|
|
7412
7578
|
"table-columns": _vm.columns,
|
|
7413
7579
|
"column-edit": _vm.columnEdit,
|
|
7414
|
-
"storage-key": _vm.
|
|
7580
|
+
"storage-key": _vm.cStorageKey,
|
|
7415
7581
|
"width": _vm.columnCheckWidth,
|
|
7416
7582
|
"modal-append-to-body": _vm.columnCheckModalAppendToBody,
|
|
7417
7583
|
"modal": _vm.columnCheckModal,
|
|
@@ -7475,7 +7641,7 @@ var _sfc_render = function render3() {
|
|
|
7475
7641
|
"get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
|
|
7476
7642
|
"column-edit": _vm.columnEdit,
|
|
7477
7643
|
"operation-prop-key": _vm.operationPropKey,
|
|
7478
|
-
"storage-key": _vm.
|
|
7644
|
+
"storage-key": _vm.cStorageKey,
|
|
7479
7645
|
"table-columns": _vm.columns
|
|
7480
7646
|
}
|
|
7481
7647
|
})], 2) : _vm._e()], 2);
|