@94ai/nf-search-form 6.1.6 → 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 +2927 -0
- package/lib/nf-search-form-item.vue.d.ts +0 -6
- package/lib/nf-search-form.cjs.js +160 -403
- package/lib/nf-search-form.esm-bundler.js +162 -405
- package/lib/nf-search-form.vue.d.ts +666 -0
- package/lib/types.d.ts +0 -9
- package/package/nf-column-check-dialog.vue +1 -0
- package/package/nf-search-form-item.vue +4 -15
- package/package/nf-search-form.vue +155 -418
- package/package/types.ts +0 -9
- package/package.json +18 -20
|
@@ -6,7 +6,6 @@ const commonUtils = require("@94ai/common-utils");
|
|
|
6
6
|
const ResizeObserver = require("resize-observer-polyfill");
|
|
7
7
|
const vue = require("vue");
|
|
8
8
|
const lodashEs = require("lodash-es");
|
|
9
|
-
const commonConstants = require("@94ai/common-constants");
|
|
10
9
|
const NfMessage = require("@94ai/nf-message");
|
|
11
10
|
const __sfc_main$5 = vueDemi.defineComponent({
|
|
12
11
|
name: "NfNumberRange"
|
|
@@ -325,14 +324,6 @@ __sfc_main$3.props = {
|
|
|
325
324
|
required: false,
|
|
326
325
|
type: Number,
|
|
327
326
|
default: 227
|
|
328
|
-
},
|
|
329
|
-
nfSearchFormModel: {
|
|
330
|
-
key: "nfSearchFormModel",
|
|
331
|
-
required: false,
|
|
332
|
-
type: Object,
|
|
333
|
-
default: () => {
|
|
334
|
-
return {};
|
|
335
|
-
}
|
|
336
327
|
}
|
|
337
328
|
};
|
|
338
329
|
__sfc_main$3.setup = (__props, __ctx) => {
|
|
@@ -547,12 +538,9 @@ __sfc_main$3.setup = (__props, __ctx) => {
|
|
|
547
538
|
return props.itemOptions.element === "nf-transfer-select";
|
|
548
539
|
});
|
|
549
540
|
const handleChange = (event) => {
|
|
550
|
-
var _a2, _b
|
|
541
|
+
var _a2, _b;
|
|
551
542
|
if ((_b = (_a2 = props.itemOptions) == null ? void 0 : _a2.events) == null ? void 0 : _b.change) {
|
|
552
|
-
props.itemOptions.events.change(event, instance
|
|
553
|
-
}
|
|
554
|
-
if ((_c = props.itemOptions) == null ? void 0 : _c.changeProps) {
|
|
555
|
-
emit("handleChangeProps", props.itemOptions.changeProps);
|
|
543
|
+
props.itemOptions.events.change(event, instance);
|
|
556
544
|
}
|
|
557
545
|
};
|
|
558
546
|
const handleInput = (event) => {
|
|
@@ -615,7 +603,10 @@ var _sfc_render$3 = function render3() {
|
|
|
615
603
|
style: {
|
|
616
604
|
width: _vm.width
|
|
617
605
|
}
|
|
618
|
-
}, [_vm.slotName ? [_vm._t(_vm.slotName)] : [_vm.isInput ? _c("
|
|
606
|
+
}, [_vm.slotName ? [_vm._t(_vm.slotName)] : [_vm.isInput ? _c("el-input", _vm._g(_vm._b({
|
|
607
|
+
attrs: {
|
|
608
|
+
"placeholder": _vm.itemOptions.placeholder
|
|
609
|
+
},
|
|
619
610
|
on: {
|
|
620
611
|
"input": _vm.handleInput
|
|
621
612
|
},
|
|
@@ -626,7 +617,7 @@ var _sfc_render$3 = function render3() {
|
|
|
626
617
|
},
|
|
627
618
|
expression: "currentVal"
|
|
628
619
|
}
|
|
629
|
-
}, "
|
|
620
|
+
}, "el-input", _vm.bindProps, false), _vm.bindEvents), [_vm._t(_vm.inputSlotPrepend, null, {
|
|
630
621
|
"slot": _vm.inputSlotPrepend
|
|
631
622
|
}), _vm._t(_vm.inputSlotAppend, null, {
|
|
632
623
|
"slot": _vm.inputSlotAppend
|
|
@@ -6697,50 +6688,10 @@ var _sfc_render$1 = function render5() {
|
|
|
6697
6688
|
var _sfc_staticRenderFns$1 = [];
|
|
6698
6689
|
var __component__$1 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(__sfc_main$1, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
|
|
6699
6690
|
const ColumnCheckDrawer = __component__$1.exports;
|
|
6700
|
-
/*!
|
|
6701
|
-
* vue-router v3.6.4
|
|
6702
|
-
* (c) 2022 Evan You
|
|
6703
|
-
* @license MIT
|
|
6704
|
-
*/
|
|
6705
|
-
function throwNoCurrentInstance(method) {
|
|
6706
|
-
if (!vue.getCurrentInstance()) {
|
|
6707
|
-
throw new Error("[vue-router]: Missing current instance. " + method + "() must be called inside <script setup> or setup().");
|
|
6708
|
-
}
|
|
6709
|
-
}
|
|
6710
|
-
function useRoute() {
|
|
6711
|
-
if (process.env.NODE_ENV !== "production") {
|
|
6712
|
-
throwNoCurrentInstance("useRoute");
|
|
6713
|
-
}
|
|
6714
|
-
var root = vue.getCurrentInstance().proxy.$root;
|
|
6715
|
-
if (!root._$route) {
|
|
6716
|
-
var route = vue.effectScope(true).run(function() {
|
|
6717
|
-
return vue.shallowReactive(Object.assign({}, root.$router.currentRoute));
|
|
6718
|
-
});
|
|
6719
|
-
root._$route = route;
|
|
6720
|
-
root.$router.afterEach(function(to) {
|
|
6721
|
-
Object.assign(route, to);
|
|
6722
|
-
});
|
|
6723
|
-
}
|
|
6724
|
-
return root._$route;
|
|
6725
|
-
}
|
|
6726
6691
|
const __sfc_main = vueDemi.defineComponent({
|
|
6727
6692
|
name: "nf-search-form"
|
|
6728
6693
|
});
|
|
6729
6694
|
__sfc_main.props = {
|
|
6730
|
-
isMvc: {
|
|
6731
|
-
key: "isMvc",
|
|
6732
|
-
required: false,
|
|
6733
|
-
type: Boolean,
|
|
6734
|
-
default: false
|
|
6735
|
-
},
|
|
6736
|
-
defaultFormData: {
|
|
6737
|
-
key: "defaultFormData",
|
|
6738
|
-
required: false,
|
|
6739
|
-
type: Object,
|
|
6740
|
-
default: () => {
|
|
6741
|
-
return {};
|
|
6742
|
-
}
|
|
6743
|
-
},
|
|
6744
6695
|
upIcon: {
|
|
6745
6696
|
key: "upIcon",
|
|
6746
6697
|
required: false,
|
|
@@ -6916,7 +6867,7 @@ __sfc_main.props = {
|
|
|
6916
6867
|
labelWidth: {
|
|
6917
6868
|
key: "labelWidth",
|
|
6918
6869
|
required: false,
|
|
6919
|
-
type:
|
|
6870
|
+
type: Number,
|
|
6920
6871
|
default: 150
|
|
6921
6872
|
},
|
|
6922
6873
|
formOptions: {
|
|
@@ -6953,7 +6904,7 @@ __sfc_main.props = {
|
|
|
6953
6904
|
key: "storageKey",
|
|
6954
6905
|
required: false,
|
|
6955
6906
|
type: String,
|
|
6956
|
-
default: ""
|
|
6907
|
+
default: "nf-search-form-columns-cached-key"
|
|
6957
6908
|
},
|
|
6958
6909
|
checkMode: {
|
|
6959
6910
|
key: "checkMode",
|
|
@@ -7374,98 +7325,13 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7374
7325
|
var _a;
|
|
7375
7326
|
const props = __props;
|
|
7376
7327
|
const emit = __ctx.emit;
|
|
7377
|
-
const routeName = vueDemi.computed(() => useRoute().name);
|
|
7378
7328
|
const instance = (_a = vueDemi.getCurrentInstance()) == null ? void 0 : _a.proxy;
|
|
7379
7329
|
const defaultButtonSlot = vueDemi.ref();
|
|
7380
7330
|
const nfSearchFormRef = vueDemi.ref();
|
|
7381
7331
|
const columnCheckNfDrawer = vueDemi.ref();
|
|
7382
7332
|
const columnCheckDrawer = vueDemi.ref();
|
|
7383
7333
|
const columnCheckDialog = vueDemi.ref();
|
|
7384
|
-
const
|
|
7385
|
-
const changeUpdateKeys = vueDemi.ref([]);
|
|
7386
|
-
const cBtnItems = vueDemi.ref([]);
|
|
7387
|
-
const cStorageKey = vueDemi.ref(props.storageKey || `nf-search-form-columns-cached-key-${routeName.value}`);
|
|
7388
|
-
const nfSearchFormModel = vueDemi.ref(commonUtils.deepClone(props.defaultFormData));
|
|
7389
|
-
const setValue = (item, val) => {
|
|
7390
|
-
commonUtils.mapDispose.setValue(nfSearchFormModel.value, item.prop, val);
|
|
7391
|
-
};
|
|
7392
|
-
const setDefaultVal = (item, init = true) => {
|
|
7393
|
-
if (init) {
|
|
7394
|
-
if (commonUtils.mapDispose.hasKey(nfSearchFormModel.value, item.prop)) {
|
|
7395
|
-
return;
|
|
7396
|
-
}
|
|
7397
|
-
}
|
|
7398
|
-
const {
|
|
7399
|
-
element = "",
|
|
7400
|
-
multiple = false
|
|
7401
|
-
} = item;
|
|
7402
|
-
let initValue = null;
|
|
7403
|
-
if (item.hasOwnProperty("initValue")) {
|
|
7404
|
-
initValue = item.initValue;
|
|
7405
|
-
} else if (multiple) {
|
|
7406
|
-
initValue = [];
|
|
7407
|
-
} else if (commonConstants.ELEMENT_LABEL_TYPE_DEFAULT_VALUE.hasOwnProperty(element)) {
|
|
7408
|
-
initValue = commonConstants.ELEMENT_LABEL_TYPE_DEFAULT_VALUE[element];
|
|
7409
|
-
}
|
|
7410
|
-
setValue(item, commonUtils.deepClone(initValue));
|
|
7411
|
-
};
|
|
7412
|
-
const getChangePropKeys = () => {
|
|
7413
|
-
let list = [];
|
|
7414
|
-
props.formOptions.forEach((item) => {
|
|
7415
|
-
list = list.concat(item.changeProps || []);
|
|
7416
|
-
});
|
|
7417
|
-
changeUpdateKeys.value = list;
|
|
7418
|
-
};
|
|
7419
|
-
const triggerGetOptions = async (item) => {
|
|
7420
|
-
if (item.getOptions) {
|
|
7421
|
-
const canSetParams = changeUpdateKeys.value.includes(item.prop);
|
|
7422
|
-
await vueDemi.nextTick();
|
|
7423
|
-
item["options"] = [];
|
|
7424
|
-
item["loading"] = true;
|
|
7425
|
-
item.getOptions((data) => {
|
|
7426
|
-
vueDemi.nextTick(() => {
|
|
7427
|
-
item.loading = false;
|
|
7428
|
-
item.options = data;
|
|
7429
|
-
});
|
|
7430
|
-
}, canSetParams ? getFormData() : {});
|
|
7431
|
-
}
|
|
7432
|
-
};
|
|
7433
|
-
const btnItemsInit = () => {
|
|
7434
|
-
if (!props.btnItems)
|
|
7435
|
-
return;
|
|
7436
|
-
let list = commonUtils.deepClone(props.btnItems);
|
|
7437
|
-
if (commonUtils.validate.isString(props.btnItems)) {
|
|
7438
|
-
list = [...props.btnItems ? [{
|
|
7439
|
-
btnType: props.btnItems
|
|
7440
|
-
}] : []];
|
|
7441
|
-
}
|
|
7442
|
-
list = list.map((item) => {
|
|
7443
|
-
if (commonUtils.validate.isString(item)) {
|
|
7444
|
-
return {
|
|
7445
|
-
btnType: item
|
|
7446
|
-
};
|
|
7447
|
-
} else {
|
|
7448
|
-
return item;
|
|
7449
|
-
}
|
|
7450
|
-
});
|
|
7451
|
-
cBtnItems.value = list;
|
|
7452
|
-
};
|
|
7453
|
-
const handleChangeProps = (changeProps) => {
|
|
7454
|
-
if (changeProps == null ? void 0 : changeProps.length) {
|
|
7455
|
-
props.formOptions.forEach((item) => {
|
|
7456
|
-
if (!changeProps.includes(item.prop))
|
|
7457
|
-
return;
|
|
7458
|
-
setDefaultVal(item, false);
|
|
7459
|
-
triggerGetOptions(item);
|
|
7460
|
-
const list = (item.changeProps || []).filter((item2) => !changeProps.includes(item2));
|
|
7461
|
-
if (list.length) {
|
|
7462
|
-
vueDemi.nextTick(() => {
|
|
7463
|
-
handleChangeProps(list);
|
|
7464
|
-
});
|
|
7465
|
-
}
|
|
7466
|
-
});
|
|
7467
|
-
}
|
|
7468
|
-
};
|
|
7334
|
+
const nfSearchFormModel = vueDemi.ref({});
|
|
7469
7335
|
const initLocalShow = (init = false) => {
|
|
7470
7336
|
if (!init) {
|
|
7471
7337
|
props.formOptions._skip = true;
|
|
@@ -7488,17 +7354,15 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7488
7354
|
return props.formOptions.map((item) => item.prop);
|
|
7489
7355
|
};
|
|
7490
7356
|
const localShowItems = vueDemi.ref(initLocalShow(true));
|
|
7491
|
-
vueDemi.watch(() =>
|
|
7357
|
+
vueDemi.watch(() => {
|
|
7492
7358
|
var _a2;
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
}
|
|
7359
|
+
return (_a2 = localShowItems.value) == null ? void 0 : _a2.length;
|
|
7360
|
+
}, async () => {
|
|
7361
|
+
emit("update:showItems", localShowItems.value);
|
|
7362
|
+
if (Object.keys(nfSearchFormModel.value).length) {
|
|
7363
|
+
refreshNfSearchFormModel(false);
|
|
7499
7364
|
}
|
|
7500
7365
|
}, {
|
|
7501
|
-
deep: true,
|
|
7502
7366
|
immediate: true
|
|
7503
7367
|
});
|
|
7504
7368
|
const syncLocalShowColumnToCookies = () => {
|
|
@@ -7512,7 +7376,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7512
7376
|
index: index2
|
|
7513
7377
|
};
|
|
7514
7378
|
});
|
|
7515
|
-
commonUtils.CachedManager.syncCachedSet(
|
|
7379
|
+
commonUtils.CachedManager.syncCachedSet(props.storageKey, columnState);
|
|
7516
7380
|
}
|
|
7517
7381
|
};
|
|
7518
7382
|
const syncShowItemToInitHidden = () => {
|
|
@@ -7540,9 +7404,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7540
7404
|
const syncCookiesToLocalShowColumn = async (refreshModel = false) => {
|
|
7541
7405
|
if (props.columnEdit) {
|
|
7542
7406
|
try {
|
|
7543
|
-
let columnState = commonUtils.CachedManager.syncCachedGet(
|
|
7407
|
+
let columnState = commonUtils.CachedManager.syncCachedGet(props.storageKey);
|
|
7544
7408
|
if (!columnState) {
|
|
7545
|
-
columnState = await commonUtils.CachedManager.asyncCachedGet(
|
|
7409
|
+
columnState = await commonUtils.CachedManager.asyncCachedGet(props.storageKey);
|
|
7546
7410
|
}
|
|
7547
7411
|
if (columnState) {
|
|
7548
7412
|
if (typeof columnState === "string") {
|
|
@@ -7567,9 +7431,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7567
7431
|
const initCachedData = async () => {
|
|
7568
7432
|
var _a2, _b;
|
|
7569
7433
|
if (props.columnEdit) {
|
|
7570
|
-
let cached = commonUtils.CachedManager.syncCachedGet(
|
|
7434
|
+
let cached = commonUtils.CachedManager.syncCachedGet(props.storageKey);
|
|
7571
7435
|
if (!cached) {
|
|
7572
|
-
cached = await commonUtils.CachedManager.asyncCachedGet(
|
|
7436
|
+
cached = await commonUtils.CachedManager.asyncCachedGet(props.storageKey);
|
|
7573
7437
|
}
|
|
7574
7438
|
const cachedPriority = props.priority === "cached";
|
|
7575
7439
|
if (cachedPriority ? cached : (_a2 = localShowItems.value) == null ? void 0 : _a2.length) {
|
|
@@ -7585,12 +7449,23 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7585
7449
|
const isShowBtnBoxSlot = vueDemi.computed(() => {
|
|
7586
7450
|
return instance == null ? void 0 : instance.$slots.btnBox;
|
|
7587
7451
|
});
|
|
7588
|
-
const
|
|
7589
|
-
|
|
7452
|
+
const renderSearchFormItemOptions = vueDemi.ref([]);
|
|
7453
|
+
let initSearchForm = true;
|
|
7454
|
+
const syncCookiesToSearchFormItemOptions = async (readCached = true) => {
|
|
7455
|
+
props.formOptions._skip = true;
|
|
7456
|
+
const columns = props.formOptions.map((item, index2) => {
|
|
7457
|
+
item.key = item.key || commonUtils.createUniqueString();
|
|
7458
|
+
item._index = index2;
|
|
7459
|
+
item.__index = index2;
|
|
7460
|
+
vue.set(item, "initHidden", !!item.initHidden);
|
|
7461
|
+
vue.set(item, "destory", !!item.destory);
|
|
7462
|
+
return item;
|
|
7463
|
+
});
|
|
7464
|
+
if (readCached && props.columnEdit) {
|
|
7590
7465
|
try {
|
|
7591
|
-
let columnState = commonUtils.CachedManager.syncCachedGet(
|
|
7466
|
+
let columnState = commonUtils.CachedManager.syncCachedGet(props.storageKey);
|
|
7592
7467
|
if (!columnState) {
|
|
7593
|
-
columnState = await commonUtils.CachedManager.asyncCachedGet(
|
|
7468
|
+
columnState = await commonUtils.CachedManager.asyncCachedGet(props.storageKey);
|
|
7594
7469
|
}
|
|
7595
7470
|
props.formOptions._skip = true;
|
|
7596
7471
|
if (columnState) {
|
|
@@ -7613,24 +7488,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7613
7488
|
console.log(e);
|
|
7614
7489
|
}
|
|
7615
7490
|
}
|
|
7616
|
-
};
|
|
7617
|
-
const renderSearchFormItemOptions = vueDemi.ref([]);
|
|
7618
|
-
let initSearchForm = true;
|
|
7619
|
-
const syncCookiesToSearchFormItemOptions = async (readCached = true) => {
|
|
7620
|
-
props.formOptions._skip = true;
|
|
7621
|
-
const columns = props.formOptions.map((item, index2) => {
|
|
7622
|
-
item.key = item.key || commonUtils.createUniqueString();
|
|
7623
|
-
item._index = index2;
|
|
7624
|
-
item.__index = index2;
|
|
7625
|
-
vue.set(item, "initHidden", !!item.initHidden);
|
|
7626
|
-
vue.set(item, "destory", !!item.destory);
|
|
7627
|
-
if (!item.options)
|
|
7628
|
-
vue.set(item, "options", []);
|
|
7629
|
-
return item;
|
|
7630
|
-
});
|
|
7631
|
-
if (readCached) {
|
|
7632
|
-
await handleColumnsInitHideAndSort(columns);
|
|
7633
|
-
}
|
|
7634
7491
|
renderSearchFormItemOptions.value = columns.sort((a, b) => a._index - b._index < 0 ? -1 : a._index - b._index > 0 ? 1 : 0);
|
|
7635
7492
|
vueDemi.nextTick(() => {
|
|
7636
7493
|
if (initSearchForm) {
|
|
@@ -7642,11 +7499,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7642
7499
|
};
|
|
7643
7500
|
syncCookiesToSearchFormItemOptions();
|
|
7644
7501
|
const itemIsShow = (item) => {
|
|
7645
|
-
|
|
7646
|
-
return !item.initHidden && !item.destory && (commonUtils.validate.isFunction(item.show) ? (_a2 = item == null ? void 0 : item.show) == null ? void 0 : _a2.call(item, nfSearchFormModel.value) : true);
|
|
7647
|
-
};
|
|
7648
|
-
const btnIsShow = (item) => {
|
|
7649
|
-
return item.show ? item.show(nfSearchFormModel.value) : true;
|
|
7502
|
+
return !item.initHidden && !item.destory;
|
|
7650
7503
|
};
|
|
7651
7504
|
vueDemi.watch(() => nfSearchFormModel.value, () => {
|
|
7652
7505
|
emit("onChange", nfSearchFormModel.value);
|
|
@@ -7673,26 +7526,30 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7673
7526
|
}, {
|
|
7674
7527
|
deep: true
|
|
7675
7528
|
});
|
|
7676
|
-
|
|
7677
|
-
formsInit();
|
|
7529
|
+
refreshNfSearchFormModel(false, true);
|
|
7678
7530
|
});
|
|
7679
|
-
const refreshNfSearchFormModel = () => {
|
|
7531
|
+
const refreshNfSearchFormModel = (outEmit = true, init = false) => {
|
|
7532
|
+
const obj = {};
|
|
7680
7533
|
props.formOptions.filter((item) => !item.destory).forEach((v) => {
|
|
7681
|
-
if (
|
|
7682
|
-
|
|
7683
|
-
|
|
7684
|
-
|
|
7534
|
+
if (localShowItems.value.includes(v.prop)) {
|
|
7535
|
+
if (init) {
|
|
7536
|
+
if (v.initValue !== void 0) {
|
|
7537
|
+
obj[v.prop] = v.initValue;
|
|
7538
|
+
} else {
|
|
7539
|
+
obj[v.prop] = null;
|
|
7540
|
+
}
|
|
7541
|
+
} else {
|
|
7542
|
+
const value = nfSearchFormModel.value[v.prop];
|
|
7543
|
+
obj[v.prop] = typeof value === "undefined" ? null : value;
|
|
7544
|
+
}
|
|
7685
7545
|
}
|
|
7686
7546
|
});
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
|
|
7693
|
-
setDefaultVal(item, true);
|
|
7694
|
-
triggerGetOptions(item);
|
|
7695
|
-
});
|
|
7547
|
+
if (JSON.stringify(nfSearchFormModel.value) !== JSON.stringify(obj)) {
|
|
7548
|
+
nfSearchFormModel.value = obj;
|
|
7549
|
+
if (outEmit) {
|
|
7550
|
+
emit("itemsChange", localShowItems.value);
|
|
7551
|
+
}
|
|
7552
|
+
}
|
|
7696
7553
|
};
|
|
7697
7554
|
const isCollapseChange = async (val) => {
|
|
7698
7555
|
emit("isCollapseChange", val);
|
|
@@ -7770,25 +7627,14 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7770
7627
|
};
|
|
7771
7628
|
const onNfSearchFormSearch = () => {
|
|
7772
7629
|
onNfSearchFormValidate(() => {
|
|
7773
|
-
emit("onSearch",
|
|
7630
|
+
emit("onSearch", nfSearchFormModel.value);
|
|
7774
7631
|
});
|
|
7775
7632
|
};
|
|
7776
7633
|
const onNfSearchFormExport = () => {
|
|
7777
7634
|
onNfSearchFormValidate(() => {
|
|
7778
|
-
emit("onExport",
|
|
7635
|
+
emit("onExport", nfSearchFormModel.value);
|
|
7779
7636
|
});
|
|
7780
7637
|
};
|
|
7781
|
-
const onNfSearchFormClick = (item) => {
|
|
7782
|
-
var _a2;
|
|
7783
|
-
if (item.validate) {
|
|
7784
|
-
onNfSearchFormValidate(() => {
|
|
7785
|
-
var _a3;
|
|
7786
|
-
(_a3 = item.onClick) == null ? void 0 : _a3.call(item, getFormData());
|
|
7787
|
-
});
|
|
7788
|
-
} else {
|
|
7789
|
-
(_a2 = item.onClick) == null ? void 0 : _a2.call(item, getFormData());
|
|
7790
|
-
}
|
|
7791
|
-
};
|
|
7792
7638
|
const hiddenNfSearchFormItemOptionField = async (prop) => {
|
|
7793
7639
|
prop.formOptions._skip = true;
|
|
7794
7640
|
prop.formOptions.every((item) => {
|
|
@@ -7836,10 +7682,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7836
7682
|
}
|
|
7837
7683
|
};
|
|
7838
7684
|
async function clearDragCached() {
|
|
7839
|
-
await commonUtils.CachedManager.asyncCachedSet(`${
|
|
7685
|
+
await commonUtils.CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, null);
|
|
7840
7686
|
}
|
|
7841
7687
|
async function clearColumnEditCached() {
|
|
7842
|
-
await commonUtils.CachedManager.asyncCachedSet(
|
|
7688
|
+
await commonUtils.CachedManager.asyncCachedSet(props.storageKey, null);
|
|
7843
7689
|
}
|
|
7844
7690
|
const nfSearchFormItemOptionFieldsSave = async (value) => {
|
|
7845
7691
|
columnCheckConfirmFeedback(value);
|
|
@@ -7848,64 +7694,28 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7848
7694
|
await vueDemi.nextTick();
|
|
7849
7695
|
refreshLabel();
|
|
7850
7696
|
};
|
|
7851
|
-
const handleExchangeKey = (data) => {
|
|
7852
|
-
props.formOptions.forEach((item) => {
|
|
7853
|
-
var _a2, _b, _c, _d;
|
|
7854
|
-
if (!item.exchangeKey)
|
|
7855
|
-
return;
|
|
7856
|
-
const {
|
|
7857
|
-
type,
|
|
7858
|
-
value
|
|
7859
|
-
} = item.exchangeKey;
|
|
7860
|
-
const key = item.prop;
|
|
7861
|
-
if (type === commonConstants.EXCHANGE_KEY_TYPE.range) {
|
|
7862
|
-
(_a2 = value == null ? void 0 : value.forEach) == null ? void 0 : _a2.call(value, (k, i) => {
|
|
7863
|
-
var _a3;
|
|
7864
|
-
data[k] = ((_a3 = data == null ? void 0 : data[key]) == null ? void 0 : _a3[i]) || null;
|
|
7865
|
-
});
|
|
7866
|
-
delete data[key];
|
|
7867
|
-
} else if (type === commonConstants.EXCHANGE_KEY_TYPE.multiple) {
|
|
7868
|
-
data[key] = (_d = (_c = (_b = data[key]) == null ? void 0 : _b.trim()) == null ? void 0 : _c.split(value || ",")) == null ? void 0 : _d.filter((s) => s !== "");
|
|
7869
|
-
}
|
|
7870
|
-
});
|
|
7871
|
-
};
|
|
7872
|
-
const getFormData = () => {
|
|
7873
|
-
const data = commonUtils.deepClone(nfSearchFormModel.value);
|
|
7874
|
-
handleExchangeKey(data);
|
|
7875
|
-
return data;
|
|
7876
|
-
};
|
|
7877
7697
|
return Object.assign({
|
|
7878
7698
|
defaultButtonSlot,
|
|
7879
7699
|
nfSearchFormRef,
|
|
7880
7700
|
columnCheckNfDrawer,
|
|
7881
7701
|
columnCheckDrawer,
|
|
7882
7702
|
columnCheckDialog,
|
|
7883
|
-
useLabelWidth,
|
|
7884
|
-
cBtnItems,
|
|
7885
|
-
cStorageKey,
|
|
7886
7703
|
nfSearchFormModel,
|
|
7887
|
-
handleChangeProps,
|
|
7888
7704
|
configNfSearchItemVisibleDialog,
|
|
7889
7705
|
newColumns,
|
|
7890
7706
|
isShowBtnBoxSlot,
|
|
7891
7707
|
renderSearchFormItemOptions,
|
|
7892
7708
|
itemIsShow,
|
|
7893
|
-
btnIsShow,
|
|
7894
7709
|
showBtnBoxLabel,
|
|
7895
7710
|
isCollapseChange,
|
|
7896
7711
|
topDom,
|
|
7897
7712
|
resetNfSearchFormModel,
|
|
7898
7713
|
onNfSearchFormSearch,
|
|
7899
7714
|
onNfSearchFormExport,
|
|
7900
|
-
onNfSearchFormClick,
|
|
7901
7715
|
hiddenNfSearchFormItemOptionField,
|
|
7902
7716
|
columnCheckConfirm,
|
|
7903
7717
|
nfSearchFormItemOptionFieldsSave
|
|
7904
7718
|
}, {
|
|
7905
|
-
/**
|
|
7906
|
-
* 获取表单实时数据(已深拷贝)
|
|
7907
|
-
*/
|
|
7908
|
-
getFormData,
|
|
7909
7719
|
/**
|
|
7910
7720
|
* 列编辑显示的列prop
|
|
7911
7721
|
*/
|
|
@@ -8001,9 +7811,6 @@ var _sfc_render = function render6() {
|
|
|
8001
7811
|
"model": _vm.nfSearchFormModel,
|
|
8002
7812
|
"inline": _vm.inline,
|
|
8003
7813
|
"label-position": _vm.labelPosition,
|
|
8004
|
-
"label-width": _vm.useLabelWidth,
|
|
8005
|
-
"size": _vm.size,
|
|
8006
|
-
"disabled": _vm.disabled,
|
|
8007
7814
|
"rules": _vm.rules,
|
|
8008
7815
|
"label-suffix": _vm.labelSuffix,
|
|
8009
7816
|
"hide-required-asterisk": _vm.hideRequiredAsterisk,
|
|
@@ -8011,6 +7818,9 @@ var _sfc_render = function render6() {
|
|
|
8011
7818
|
"inline-message": _vm.inlineMessage,
|
|
8012
7819
|
"status-icon": _vm.statusIcon,
|
|
8013
7820
|
"validate-on-rule-change": _vm.validateOnRuleChange,
|
|
7821
|
+
"size": _vm.size,
|
|
7822
|
+
"disabled": _vm.disabled,
|
|
7823
|
+
"label-width": _vm.labelWidth + "px",
|
|
8014
7824
|
"expand-btn-type": _vm.expandBtnType,
|
|
8015
7825
|
"expand-btn-icon": _vm.expandBtnIcon,
|
|
8016
7826
|
"expand-btn-plain": _vm.expandBtnPlain,
|
|
@@ -8053,11 +7863,7 @@ var _sfc_render = function render6() {
|
|
|
8053
7863
|
key: item.key,
|
|
8054
7864
|
attrs: {
|
|
8055
7865
|
"item-width": _vm.itemWidth,
|
|
8056
|
-
"item-options": item
|
|
8057
|
-
"nfSearchFormModel": _vm.nfSearchFormModel
|
|
8058
|
-
},
|
|
8059
|
-
on: {
|
|
8060
|
-
"handleChangeProps": _vm.handleChangeProps
|
|
7866
|
+
"item-options": item
|
|
8061
7867
|
},
|
|
8062
7868
|
model: {
|
|
8063
7869
|
value: _vm.nfSearchFormModel[item.prop],
|
|
@@ -8069,8 +7875,7 @@ var _sfc_render = function render6() {
|
|
|
8069
7875
|
}, [item.tooltip ? _vm._t(item.tooltip.slot, null, {
|
|
8070
7876
|
"slot": item.tooltip.slot
|
|
8071
7877
|
}) : _vm._e(), item.slot ? _vm._t(item.slot, null, {
|
|
8072
|
-
"slot": item.slot
|
|
8073
|
-
"formData": _vm.nfSearchFormModel
|
|
7878
|
+
"slot": item.slot
|
|
8074
7879
|
}) : _vm._e(), ((_a = item.inputSlot) == null ? void 0 : _a.prepend) ? _vm._t((_b = item.inputSlot) == null ? void 0 : _b.prepend, null, {
|
|
8075
7880
|
"slot": (_c2 = item.inputSlot) == null ? void 0 : _c2.prepend
|
|
8076
7881
|
}) : _vm._e(), ((_d = item.inputSlot) == null ? void 0 : _d.append) ? _vm._t((_e = item.inputSlot) == null ? void 0 : _e.append, null, {
|
|
@@ -8107,76 +7912,52 @@ var _sfc_render = function render6() {
|
|
|
8107
7912
|
}
|
|
8108
7913
|
}, [_c("div", {
|
|
8109
7914
|
staticClass: "nf-flex nf-flex-align-items-start"
|
|
8110
|
-
}, [_vm.isShowBtnBoxSlot && !_vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e(), _vm.
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
|
|
8156
|
-
},
|
|
8157
|
-
on: {
|
|
8158
|
-
"click": _vm.resetNfSearchFormModel
|
|
8159
|
-
}
|
|
8160
|
-
}, [_vm._v(_vm._s(_vm.resetBtnText) + " ")]) : _vm.btnIsShow(item) ? _c("nf-button", {
|
|
8161
|
-
key: "btn-" + idx,
|
|
8162
|
-
class: item.class,
|
|
8163
|
-
attrs: {
|
|
8164
|
-
"type": item.type || _vm.queryBtnType,
|
|
8165
|
-
"icon": item.icon || _vm.queryBtnIcon,
|
|
8166
|
-
"plain": item.plain || _vm.queryBtnPlain,
|
|
8167
|
-
"size": item.size || _vm.size,
|
|
8168
|
-
"round": item.round || _vm.queryBtnRound,
|
|
8169
|
-
"circle": item.circle || _vm.queryBtnCircle,
|
|
8170
|
-
"loading": item.loading || _vm.queryBtnLoading,
|
|
8171
|
-
"disabled": item.disabled || _vm.queryBtnDisabled
|
|
8172
|
-
},
|
|
8173
|
-
on: {
|
|
8174
|
-
"click": function($event) {
|
|
8175
|
-
return _vm.onNfSearchFormClick(item);
|
|
8176
|
-
}
|
|
8177
|
-
}
|
|
8178
|
-
}, [_vm._v(_vm._s(item.name) + " ")]) : _vm._e()];
|
|
8179
|
-
}), _vm.columnEdit ? _c("nf-button", {
|
|
7915
|
+
}, [_vm.isShowBtnBoxSlot && !_vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e(), _vm.btnItems.includes("search") ? _c("nf-button", {
|
|
7916
|
+
class: (_vm.queryBtnClass || "") + " nf-btn-search",
|
|
7917
|
+
attrs: {
|
|
7918
|
+
"type": _vm.queryBtnType,
|
|
7919
|
+
"icon": _vm.queryBtnIcon,
|
|
7920
|
+
"plain": _vm.queryBtnPlain,
|
|
7921
|
+
"size": _vm.queryBtnSize,
|
|
7922
|
+
"round": _vm.queryBtnRound,
|
|
7923
|
+
"circle": _vm.queryBtnCircle,
|
|
7924
|
+
"loading": _vm.queryBtnLoading,
|
|
7925
|
+
"disabled": _vm.queryBtnDisabled
|
|
7926
|
+
},
|
|
7927
|
+
on: {
|
|
7928
|
+
"click": _vm.onNfSearchFormSearch
|
|
7929
|
+
}
|
|
7930
|
+
}, [_vm._v(_vm._s(_vm.queryBtnText) + " ")]) : _vm._e(), _vm.btnItems.includes("export") ? _c("nf-button", {
|
|
7931
|
+
class: (_vm.exportBtnClass || "") + " nf-btn-export",
|
|
7932
|
+
attrs: {
|
|
7933
|
+
"type": _vm.exportBtnType,
|
|
7934
|
+
"icon": _vm.exportBtnIcon,
|
|
7935
|
+
"plain": _vm.exportBtnPlain,
|
|
7936
|
+
"size": _vm.exportBtnSize,
|
|
7937
|
+
"round": _vm.exportBtnRound,
|
|
7938
|
+
"circle": _vm.exportBtnCircle,
|
|
7939
|
+
"loading": _vm.exportBtnLoading,
|
|
7940
|
+
"disabled": _vm.exportBtnDisabled
|
|
7941
|
+
},
|
|
7942
|
+
on: {
|
|
7943
|
+
"click": _vm.onNfSearchFormExport
|
|
7944
|
+
}
|
|
7945
|
+
}, [_vm._v(_vm._s(_vm.exportBtnText) + " ")]) : _vm._e(), _vm.btnItems.includes("reset") ? _c("nf-button", {
|
|
7946
|
+
class: (_vm.resetBtnClass || "") + " nf-btn-reset",
|
|
7947
|
+
attrs: {
|
|
7948
|
+
"type": _vm.resetBtnType,
|
|
7949
|
+
"icon": _vm.resetBtnIcon,
|
|
7950
|
+
"plain": _vm.resetBtnPlain,
|
|
7951
|
+
"size": _vm.resetBtnSize,
|
|
7952
|
+
"round": _vm.resetBtnRound,
|
|
7953
|
+
"circle": _vm.resetBtnCircle,
|
|
7954
|
+
"loading": _vm.resetBtnLoading,
|
|
7955
|
+
"disabled": _vm.resetBtnDisabled
|
|
7956
|
+
},
|
|
7957
|
+
on: {
|
|
7958
|
+
"click": _vm.resetNfSearchFormModel
|
|
7959
|
+
}
|
|
7960
|
+
}, [_vm._v(_vm._s(_vm.resetBtnText) + " ")]) : _vm._e(), _vm.columnEdit ? _c("nf-button", {
|
|
8180
7961
|
class: (_vm.checkBtnClass || "") + " nf-btn-check",
|
|
8181
7962
|
attrs: {
|
|
8182
7963
|
"type": _vm.checkBtnType,
|
|
@@ -8203,76 +7984,52 @@ var _sfc_render = function render6() {
|
|
|
8203
7984
|
staticClass: "iconfont icon-shaixuan1 nf-fs12"
|
|
8204
7985
|
})])])], 1) : _vm._e(), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2)]) : _vm._e()], 2), _vm.btnModel === "block" ? _c("div", {
|
|
8205
7986
|
staticClass: "nf-flex nf-flex-align-items nf-mt10"
|
|
8206
|
-
}, [_vm.isShowBtnBoxSlot && !_vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e(), _vm.
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
},
|
|
8253
|
-
on: {
|
|
8254
|
-
"click": _vm.resetNfSearchFormModel
|
|
8255
|
-
}
|
|
8256
|
-
}, [_vm._v(_vm._s(_vm.resetBtnText) + " ")]) : _vm.btnIsShow(item) ? _c("nf-button", {
|
|
8257
|
-
key: "btn-" + idx,
|
|
8258
|
-
class: item.class,
|
|
8259
|
-
attrs: {
|
|
8260
|
-
"type": item.type || _vm.queryBtnType,
|
|
8261
|
-
"icon": item.icon || _vm.queryBtnIcon,
|
|
8262
|
-
"plain": item.plain || _vm.queryBtnPlain,
|
|
8263
|
-
"size": item.size || _vm.size,
|
|
8264
|
-
"round": item.round || _vm.queryBtnRound,
|
|
8265
|
-
"circle": item.circle || _vm.queryBtnCircle,
|
|
8266
|
-
"loading": item.loading || _vm.queryBtnLoading,
|
|
8267
|
-
"disabled": item.disabled || _vm.queryBtnDisabled
|
|
8268
|
-
},
|
|
8269
|
-
on: {
|
|
8270
|
-
"click": function($event) {
|
|
8271
|
-
return _vm.onNfSearchFormClick(item);
|
|
8272
|
-
}
|
|
8273
|
-
}
|
|
8274
|
-
}, [_vm._v(_vm._s(item.name) + " ")]) : _vm._e()];
|
|
8275
|
-
}), _vm.columnEdit ? _c("nf-button", {
|
|
7987
|
+
}, [_vm.isShowBtnBoxSlot && !_vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e(), _vm.btnItems.includes("search") ? _c("nf-button", {
|
|
7988
|
+
class: (_vm.queryBtnClass || "") + " nf-btn-search",
|
|
7989
|
+
attrs: {
|
|
7990
|
+
"type": _vm.queryBtnType,
|
|
7991
|
+
"icon": _vm.queryBtnIcon,
|
|
7992
|
+
"plain": _vm.queryBtnPlain,
|
|
7993
|
+
"size": _vm.queryBtnSize || _vm.size,
|
|
7994
|
+
"round": _vm.queryBtnRound,
|
|
7995
|
+
"circle": _vm.queryBtnCircle,
|
|
7996
|
+
"loading": _vm.queryBtnLoading,
|
|
7997
|
+
"disabled": _vm.queryBtnDisabled
|
|
7998
|
+
},
|
|
7999
|
+
on: {
|
|
8000
|
+
"click": _vm.onNfSearchFormSearch
|
|
8001
|
+
}
|
|
8002
|
+
}, [_vm._v(_vm._s(_vm.queryBtnText) + " ")]) : _vm._e(), _vm.btnItems.includes("export") ? _c("nf-button", {
|
|
8003
|
+
class: (_vm.exportBtnClass || "") + " nf-btn-export",
|
|
8004
|
+
attrs: {
|
|
8005
|
+
"type": _vm.exportBtnType,
|
|
8006
|
+
"icon": _vm.exportBtnIcon,
|
|
8007
|
+
"plain": _vm.exportBtnPlain,
|
|
8008
|
+
"size": _vm.exportBtnSize || _vm.size,
|
|
8009
|
+
"round": _vm.exportBtnRound,
|
|
8010
|
+
"circle": _vm.exportBtnCircle,
|
|
8011
|
+
"loading": _vm.exportBtnLoading,
|
|
8012
|
+
"disabled": _vm.exportBtnDisabled
|
|
8013
|
+
},
|
|
8014
|
+
on: {
|
|
8015
|
+
"click": _vm.onNfSearchFormExport
|
|
8016
|
+
}
|
|
8017
|
+
}, [_vm._v(_vm._s(_vm.exportBtnText) + " ")]) : _vm._e(), _vm.btnItems.includes("reset") ? _c("nf-button", {
|
|
8018
|
+
class: (_vm.resetBtnClass || "") + " nf-btn-reset",
|
|
8019
|
+
attrs: {
|
|
8020
|
+
"type": _vm.resetBtnType,
|
|
8021
|
+
"icon": _vm.resetBtnIcon,
|
|
8022
|
+
"plain": _vm.resetBtnPlain,
|
|
8023
|
+
"size": _vm.resetBtnSize || _vm.size,
|
|
8024
|
+
"round": _vm.resetBtnRound,
|
|
8025
|
+
"circle": _vm.resetBtnCircle,
|
|
8026
|
+
"loading": _vm.resetBtnLoading,
|
|
8027
|
+
"disabled": _vm.resetBtnDisabled
|
|
8028
|
+
},
|
|
8029
|
+
on: {
|
|
8030
|
+
"click": _vm.resetNfSearchFormModel
|
|
8031
|
+
}
|
|
8032
|
+
}, [_vm._v(_vm._s(_vm.resetBtnText) + " ")]) : _vm._e(), _vm.columnEdit ? _c("nf-button", {
|
|
8276
8033
|
class: (_vm.checkBtnClass || "") + " nf-btn-check",
|
|
8277
8034
|
attrs: {
|
|
8278
8035
|
"type": _vm.checkBtnType,
|
|
@@ -8306,7 +8063,7 @@ var _sfc_render = function render6() {
|
|
|
8306
8063
|
"basic-field-desc": _vm.columnCheckBasicFieldDesc,
|
|
8307
8064
|
"show": _vm.configNfSearchItemVisibleDialog,
|
|
8308
8065
|
"modal-append-to-body": _vm.modalAppendToBody,
|
|
8309
|
-
"storage-key": _vm.
|
|
8066
|
+
"storage-key": _vm.storageKey,
|
|
8310
8067
|
"table-columns": _vm.formOptions,
|
|
8311
8068
|
"width": _vm.moreDialogWidth,
|
|
8312
8069
|
"modal": _vm.modal,
|
|
@@ -8379,7 +8136,7 @@ var _sfc_render = function render6() {
|
|
|
8379
8136
|
"select-empty-warning-tips": _vm.selectEmptyWarningTips,
|
|
8380
8137
|
"get-checked-length-desc": _vm.columnCheckGetCheckedLengthDesc,
|
|
8381
8138
|
"get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
|
|
8382
|
-
"storage-key": _vm.
|
|
8139
|
+
"storage-key": _vm.storageKey,
|
|
8383
8140
|
"table-columns": _vm.formOptions,
|
|
8384
8141
|
"column-edit": _vm.columnEdit
|
|
8385
8142
|
}
|