@94ai/nf-search-form 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.
@@ -6,6 +6,7 @@ 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");
9
10
  const NfMessage = require("@94ai/nf-message");
10
11
  const __sfc_main$5 = vueDemi.defineComponent({
11
12
  name: "NfNumberRange"
@@ -324,6 +325,14 @@ __sfc_main$3.props = {
324
325
  required: false,
325
326
  type: Number,
326
327
  default: 227
328
+ },
329
+ nfSearchFormModel: {
330
+ key: "nfSearchFormModel",
331
+ required: false,
332
+ type: Object,
333
+ default: () => {
334
+ return {};
335
+ }
327
336
  }
328
337
  };
329
338
  __sfc_main$3.setup = (__props, __ctx) => {
@@ -538,9 +547,12 @@ __sfc_main$3.setup = (__props, __ctx) => {
538
547
  return props.itemOptions.element === "nf-transfer-select";
539
548
  });
540
549
  const handleChange = (event) => {
541
- var _a2, _b;
550
+ var _a2, _b, _c;
542
551
  if ((_b = (_a2 = props.itemOptions) == null ? void 0 : _a2.events) == null ? void 0 : _b.change) {
543
- props.itemOptions.events.change(event, instance);
552
+ props.itemOptions.events.change(event, instance, props.nfSearchFormModel);
553
+ }
554
+ if ((_c = props.itemOptions) == null ? void 0 : _c.changeProps) {
555
+ emit("handleChangeProps", props.itemOptions.changeProps);
544
556
  }
545
557
  };
546
558
  const handleInput = (event) => {
@@ -603,10 +615,7 @@ var _sfc_render$3 = function render3() {
603
615
  style: {
604
616
  width: _vm.width
605
617
  }
606
- }, [_vm.slotName ? [_vm._t(_vm.slotName)] : [_vm.isInput ? _c("el-input", _vm._g(_vm._b({
607
- attrs: {
608
- "placeholder": _vm.itemOptions.placeholder
609
- },
618
+ }, [_vm.slotName ? [_vm._t(_vm.slotName)] : [_vm.isInput ? _c("nf-input", _vm._g(_vm._b({
610
619
  on: {
611
620
  "input": _vm.handleInput
612
621
  },
@@ -617,7 +626,7 @@ var _sfc_render$3 = function render3() {
617
626
  },
618
627
  expression: "currentVal"
619
628
  }
620
- }, "el-input", _vm.bindProps, false), _vm.bindEvents), [_vm._t(_vm.inputSlotPrepend, null, {
629
+ }, "nf-input", _vm.bindProps, false), _vm.bindEvents), [_vm._t(_vm.inputSlotPrepend, null, {
621
630
  "slot": _vm.inputSlotPrepend
622
631
  }), _vm._t(_vm.inputSlotAppend, null, {
623
632
  "slot": _vm.inputSlotAppend
@@ -6688,10 +6697,50 @@ var _sfc_render$1 = function render5() {
6688
6697
  var _sfc_staticRenderFns$1 = [];
6689
6698
  var __component__$1 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(__sfc_main$1, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
6690
6699
  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
+ }
6691
6726
  const __sfc_main = vueDemi.defineComponent({
6692
6727
  name: "nf-search-form"
6693
6728
  });
6694
6729
  __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
+ },
6695
6744
  upIcon: {
6696
6745
  key: "upIcon",
6697
6746
  required: false,
@@ -6867,7 +6916,7 @@ __sfc_main.props = {
6867
6916
  labelWidth: {
6868
6917
  key: "labelWidth",
6869
6918
  required: false,
6870
- type: Number,
6919
+ type: [Number, String],
6871
6920
  default: 150
6872
6921
  },
6873
6922
  formOptions: {
@@ -6904,7 +6953,7 @@ __sfc_main.props = {
6904
6953
  key: "storageKey",
6905
6954
  required: false,
6906
6955
  type: String,
6907
- default: "nf-search-form-columns-cached-key"
6956
+ default: ""
6908
6957
  },
6909
6958
  checkMode: {
6910
6959
  key: "checkMode",
@@ -7325,13 +7374,98 @@ __sfc_main.setup = (__props, __ctx) => {
7325
7374
  var _a;
7326
7375
  const props = __props;
7327
7376
  const emit = __ctx.emit;
7377
+ const routeName = vueDemi.computed(() => useRoute().name);
7328
7378
  const instance = (_a = vueDemi.getCurrentInstance()) == null ? void 0 : _a.proxy;
7329
7379
  const defaultButtonSlot = vueDemi.ref();
7330
7380
  const nfSearchFormRef = vueDemi.ref();
7331
7381
  const columnCheckNfDrawer = vueDemi.ref();
7332
7382
  const columnCheckDrawer = vueDemi.ref();
7333
7383
  const columnCheckDialog = vueDemi.ref();
7334
- const nfSearchFormModel = vueDemi.ref({});
7384
+ const useLabelWidth = vueDemi.ref(commonUtils.validate.isNumber(props.labelWidth) ? `${props.labelWidth}px` : props.labelWidth);
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
+ };
7335
7469
  const initLocalShow = (init = false) => {
7336
7470
  if (!init) {
7337
7471
  props.formOptions._skip = true;
@@ -7354,15 +7488,17 @@ __sfc_main.setup = (__props, __ctx) => {
7354
7488
  return props.formOptions.map((item) => item.prop);
7355
7489
  };
7356
7490
  const localShowItems = vueDemi.ref(initLocalShow(true));
7357
- vueDemi.watch(() => {
7491
+ vueDemi.watch(() => localShowItems.value, async (newVal, oldVal) => {
7358
7492
  var _a2;
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);
7493
+ emit("update:showItems", newVal);
7494
+ if (commonUtils.deepClone(newVal).sort().join(",") !== ((_a2 = commonUtils.deepClone(oldVal)) == null ? void 0 : _a2.sort().join(","))) {
7495
+ emit("itemsChange", localShowItems.value);
7496
+ if (Object.keys(nfSearchFormModel.value).length) {
7497
+ refreshNfSearchFormModel();
7498
+ }
7364
7499
  }
7365
7500
  }, {
7501
+ deep: true,
7366
7502
  immediate: true
7367
7503
  });
7368
7504
  const syncLocalShowColumnToCookies = () => {
@@ -7376,7 +7512,7 @@ __sfc_main.setup = (__props, __ctx) => {
7376
7512
  index: index2
7377
7513
  };
7378
7514
  });
7379
- commonUtils.CachedManager.syncCachedSet(props.storageKey, columnState);
7515
+ commonUtils.CachedManager.syncCachedSet(cStorageKey.value, columnState);
7380
7516
  }
7381
7517
  };
7382
7518
  const syncShowItemToInitHidden = () => {
@@ -7404,9 +7540,9 @@ __sfc_main.setup = (__props, __ctx) => {
7404
7540
  const syncCookiesToLocalShowColumn = async (refreshModel = false) => {
7405
7541
  if (props.columnEdit) {
7406
7542
  try {
7407
- let columnState = commonUtils.CachedManager.syncCachedGet(props.storageKey);
7543
+ let columnState = commonUtils.CachedManager.syncCachedGet(cStorageKey.value);
7408
7544
  if (!columnState) {
7409
- columnState = await commonUtils.CachedManager.asyncCachedGet(props.storageKey);
7545
+ columnState = await commonUtils.CachedManager.asyncCachedGet(cStorageKey.value);
7410
7546
  }
7411
7547
  if (columnState) {
7412
7548
  if (typeof columnState === "string") {
@@ -7431,9 +7567,9 @@ __sfc_main.setup = (__props, __ctx) => {
7431
7567
  const initCachedData = async () => {
7432
7568
  var _a2, _b;
7433
7569
  if (props.columnEdit) {
7434
- let cached = commonUtils.CachedManager.syncCachedGet(props.storageKey);
7570
+ let cached = commonUtils.CachedManager.syncCachedGet(cStorageKey.value);
7435
7571
  if (!cached) {
7436
- cached = await commonUtils.CachedManager.asyncCachedGet(props.storageKey);
7572
+ cached = await commonUtils.CachedManager.asyncCachedGet(cStorageKey.value);
7437
7573
  }
7438
7574
  const cachedPriority = props.priority === "cached";
7439
7575
  if (cachedPriority ? cached : (_a2 = localShowItems.value) == null ? void 0 : _a2.length) {
@@ -7449,23 +7585,12 @@ __sfc_main.setup = (__props, __ctx) => {
7449
7585
  const isShowBtnBoxSlot = vueDemi.computed(() => {
7450
7586
  return instance == null ? void 0 : instance.$slots.btnBox;
7451
7587
  });
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) {
7588
+ const handleColumnsInitHideAndSort = async (columns) => {
7589
+ if (props.columnEdit) {
7465
7590
  try {
7466
- let columnState = commonUtils.CachedManager.syncCachedGet(props.storageKey);
7591
+ let columnState = commonUtils.CachedManager.syncCachedGet(cStorageKey.value);
7467
7592
  if (!columnState) {
7468
- columnState = await commonUtils.CachedManager.asyncCachedGet(props.storageKey);
7593
+ columnState = await commonUtils.CachedManager.asyncCachedGet(cStorageKey.value);
7469
7594
  }
7470
7595
  props.formOptions._skip = true;
7471
7596
  if (columnState) {
@@ -7488,6 +7613,24 @@ __sfc_main.setup = (__props, __ctx) => {
7488
7613
  console.log(e);
7489
7614
  }
7490
7615
  }
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
+ }
7491
7634
  renderSearchFormItemOptions.value = columns.sort((a, b) => a._index - b._index < 0 ? -1 : a._index - b._index > 0 ? 1 : 0);
7492
7635
  vueDemi.nextTick(() => {
7493
7636
  if (initSearchForm) {
@@ -7499,7 +7642,11 @@ __sfc_main.setup = (__props, __ctx) => {
7499
7642
  };
7500
7643
  syncCookiesToSearchFormItemOptions();
7501
7644
  const itemIsShow = (item) => {
7502
- return !item.initHidden && !item.destory;
7645
+ var _a2;
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;
7503
7650
  };
7504
7651
  vueDemi.watch(() => nfSearchFormModel.value, () => {
7505
7652
  emit("onChange", nfSearchFormModel.value);
@@ -7526,30 +7673,26 @@ __sfc_main.setup = (__props, __ctx) => {
7526
7673
  }, {
7527
7674
  deep: true
7528
7675
  });
7529
- refreshNfSearchFormModel(false, true);
7676
+ btnItemsInit();
7677
+ formsInit();
7530
7678
  });
7531
- const refreshNfSearchFormModel = (outEmit = true, init = false) => {
7532
- const obj = {};
7679
+ const refreshNfSearchFormModel = () => {
7533
7680
  props.formOptions.filter((item) => !item.destory).forEach((v) => {
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
- }
7681
+ if (!localShowItems.value.includes(v.prop)) {
7682
+ commonUtils.mapDispose.setValue(nfSearchFormModel.value, v.key, void 0);
7683
+ } else if (nfSearchFormModel.value[v.prop] === void 0) {
7684
+ setDefaultVal(v);
7545
7685
  }
7546
7686
  });
7547
- if (JSON.stringify(nfSearchFormModel.value) !== JSON.stringify(obj)) {
7548
- nfSearchFormModel.value = obj;
7549
- if (outEmit) {
7550
- emit("itemsChange", localShowItems.value);
7551
- }
7552
- }
7687
+ };
7688
+ const formsInit = () => {
7689
+ getChangePropKeys();
7690
+ props.formOptions.forEach((item) => {
7691
+ if (item.destory || !localShowItems.value.includes(item.prop))
7692
+ return;
7693
+ setDefaultVal(item, true);
7694
+ triggerGetOptions(item);
7695
+ });
7553
7696
  };
7554
7697
  const isCollapseChange = async (val) => {
7555
7698
  emit("isCollapseChange", val);
@@ -7627,14 +7770,25 @@ __sfc_main.setup = (__props, __ctx) => {
7627
7770
  };
7628
7771
  const onNfSearchFormSearch = () => {
7629
7772
  onNfSearchFormValidate(() => {
7630
- emit("onSearch", nfSearchFormModel.value);
7773
+ emit("onSearch", getFormData());
7631
7774
  });
7632
7775
  };
7633
7776
  const onNfSearchFormExport = () => {
7634
7777
  onNfSearchFormValidate(() => {
7635
- emit("onExport", nfSearchFormModel.value);
7778
+ emit("onExport", getFormData());
7636
7779
  });
7637
7780
  };
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
+ };
7638
7792
  const hiddenNfSearchFormItemOptionField = async (prop) => {
7639
7793
  prop.formOptions._skip = true;
7640
7794
  prop.formOptions.every((item) => {
@@ -7682,10 +7836,10 @@ __sfc_main.setup = (__props, __ctx) => {
7682
7836
  }
7683
7837
  };
7684
7838
  async function clearDragCached() {
7685
- await commonUtils.CachedManager.asyncCachedSet(`${props.storageKey}$drag-column-width`, null);
7839
+ await commonUtils.CachedManager.asyncCachedSet(`${cStorageKey.value}$drag-column-width`, null);
7686
7840
  }
7687
7841
  async function clearColumnEditCached() {
7688
- await commonUtils.CachedManager.asyncCachedSet(props.storageKey, null);
7842
+ await commonUtils.CachedManager.asyncCachedSet(cStorageKey.value, null);
7689
7843
  }
7690
7844
  const nfSearchFormItemOptionFieldsSave = async (value) => {
7691
7845
  columnCheckConfirmFeedback(value);
@@ -7694,28 +7848,64 @@ __sfc_main.setup = (__props, __ctx) => {
7694
7848
  await vueDemi.nextTick();
7695
7849
  refreshLabel();
7696
7850
  };
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
+ };
7697
7877
  return Object.assign({
7698
7878
  defaultButtonSlot,
7699
7879
  nfSearchFormRef,
7700
7880
  columnCheckNfDrawer,
7701
7881
  columnCheckDrawer,
7702
7882
  columnCheckDialog,
7883
+ useLabelWidth,
7884
+ cBtnItems,
7885
+ cStorageKey,
7703
7886
  nfSearchFormModel,
7887
+ handleChangeProps,
7704
7888
  configNfSearchItemVisibleDialog,
7705
7889
  newColumns,
7706
7890
  isShowBtnBoxSlot,
7707
7891
  renderSearchFormItemOptions,
7708
7892
  itemIsShow,
7893
+ btnIsShow,
7709
7894
  showBtnBoxLabel,
7710
7895
  isCollapseChange,
7711
7896
  topDom,
7712
7897
  resetNfSearchFormModel,
7713
7898
  onNfSearchFormSearch,
7714
7899
  onNfSearchFormExport,
7900
+ onNfSearchFormClick,
7715
7901
  hiddenNfSearchFormItemOptionField,
7716
7902
  columnCheckConfirm,
7717
7903
  nfSearchFormItemOptionFieldsSave
7718
7904
  }, {
7905
+ /**
7906
+ * 获取表单实时数据(已深拷贝)
7907
+ */
7908
+ getFormData,
7719
7909
  /**
7720
7910
  * 列编辑显示的列prop
7721
7911
  */
@@ -7811,6 +8001,9 @@ var _sfc_render = function render6() {
7811
8001
  "model": _vm.nfSearchFormModel,
7812
8002
  "inline": _vm.inline,
7813
8003
  "label-position": _vm.labelPosition,
8004
+ "label-width": _vm.useLabelWidth,
8005
+ "size": _vm.size,
8006
+ "disabled": _vm.disabled,
7814
8007
  "rules": _vm.rules,
7815
8008
  "label-suffix": _vm.labelSuffix,
7816
8009
  "hide-required-asterisk": _vm.hideRequiredAsterisk,
@@ -7818,9 +8011,6 @@ var _sfc_render = function render6() {
7818
8011
  "inline-message": _vm.inlineMessage,
7819
8012
  "status-icon": _vm.statusIcon,
7820
8013
  "validate-on-rule-change": _vm.validateOnRuleChange,
7821
- "size": _vm.size,
7822
- "disabled": _vm.disabled,
7823
- "label-width": _vm.labelWidth + "px",
7824
8014
  "expand-btn-type": _vm.expandBtnType,
7825
8015
  "expand-btn-icon": _vm.expandBtnIcon,
7826
8016
  "expand-btn-plain": _vm.expandBtnPlain,
@@ -7863,7 +8053,11 @@ var _sfc_render = function render6() {
7863
8053
  key: item.key,
7864
8054
  attrs: {
7865
8055
  "item-width": _vm.itemWidth,
7866
- "item-options": item
8056
+ "item-options": item,
8057
+ "nfSearchFormModel": _vm.nfSearchFormModel
8058
+ },
8059
+ on: {
8060
+ "handleChangeProps": _vm.handleChangeProps
7867
8061
  },
7868
8062
  model: {
7869
8063
  value: _vm.nfSearchFormModel[item.prop],
@@ -7875,7 +8069,8 @@ var _sfc_render = function render6() {
7875
8069
  }, [item.tooltip ? _vm._t(item.tooltip.slot, null, {
7876
8070
  "slot": item.tooltip.slot
7877
8071
  }) : _vm._e(), item.slot ? _vm._t(item.slot, null, {
7878
- "slot": item.slot
8072
+ "slot": item.slot,
8073
+ "formData": _vm.nfSearchFormModel
7879
8074
  }) : _vm._e(), ((_a = item.inputSlot) == null ? void 0 : _a.prepend) ? _vm._t((_b = item.inputSlot) == null ? void 0 : _b.prepend, null, {
7880
8075
  "slot": (_c2 = item.inputSlot) == null ? void 0 : _c2.prepend
7881
8076
  }) : _vm._e(), ((_d = item.inputSlot) == null ? void 0 : _d.append) ? _vm._t((_e = item.inputSlot) == null ? void 0 : _e.append, null, {
@@ -7912,52 +8107,76 @@ var _sfc_render = function render6() {
7912
8107
  }
7913
8108
  }, [_c("div", {
7914
8109
  staticClass: "nf-flex nf-flex-align-items-start"
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", {
8110
+ }, [_vm.isShowBtnBoxSlot && !_vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e(), _vm._l(_vm.cBtnItems, function(item, idx) {
8111
+ var _a, _b, _c2;
8112
+ return [((_a = item.btnType) == null ? void 0 : _a.includes("search")) ? _c("nf-button", {
8113
+ key: "btn-" + idx,
8114
+ class: (_vm.queryBtnClass || "") + " nf-btn-search",
8115
+ attrs: {
8116
+ "type": _vm.queryBtnType,
8117
+ "icon": _vm.queryBtnIcon,
8118
+ "plain": _vm.queryBtnPlain,
8119
+ "size": _vm.queryBtnSize || _vm.size,
8120
+ "round": _vm.queryBtnRound,
8121
+ "circle": _vm.queryBtnCircle,
8122
+ "loading": _vm.queryBtnLoading,
8123
+ "disabled": _vm.queryBtnDisabled
8124
+ },
8125
+ on: {
8126
+ "click": _vm.onNfSearchFormSearch
8127
+ }
8128
+ }, [_vm._v(_vm._s(_vm.queryBtnText) + " ")]) : ((_b = item.btnType) == null ? void 0 : _b.includes("export")) ? _c("nf-button", {
8129
+ key: "btn-" + idx,
8130
+ class: (_vm.exportBtnClass || "") + " nf-btn-export",
8131
+ attrs: {
8132
+ "type": _vm.exportBtnType,
8133
+ "icon": _vm.exportBtnIcon,
8134
+ "plain": _vm.exportBtnPlain,
8135
+ "size": _vm.exportBtnSize || _vm.size,
8136
+ "round": _vm.exportBtnRound,
8137
+ "circle": _vm.exportBtnCircle,
8138
+ "loading": _vm.exportBtnLoading,
8139
+ "disabled": _vm.exportBtnDisabled
8140
+ },
8141
+ on: {
8142
+ "click": _vm.onNfSearchFormExport
8143
+ }
8144
+ }, [_vm._v(_vm._s(_vm.exportBtnText) + " ")]) : ((_c2 = item.btnType) == null ? void 0 : _c2.includes("reset")) ? _c("nf-button", {
8145
+ key: "btn-" + idx,
8146
+ class: (_vm.resetBtnClass || "") + " nf-btn-reset",
8147
+ attrs: {
8148
+ "type": _vm.resetBtnType,
8149
+ "icon": _vm.resetBtnIcon,
8150
+ "plain": _vm.resetBtnPlain,
8151
+ "size": _vm.resetBtnSize || _vm.size,
8152
+ "round": _vm.resetBtnRound,
8153
+ "circle": _vm.resetBtnCircle,
8154
+ "loading": _vm.resetBtnLoading,
8155
+ "disabled": _vm.resetBtnDisabled
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", {
7961
8180
  class: (_vm.checkBtnClass || "") + " nf-btn-check",
7962
8181
  attrs: {
7963
8182
  "type": _vm.checkBtnType,
@@ -7984,52 +8203,76 @@ var _sfc_render = function render6() {
7984
8203
  staticClass: "iconfont icon-shaixuan1 nf-fs12"
7985
8204
  })])])], 1) : _vm._e(), _vm.isShowBtnBoxSlot && _vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e()], 2)]) : _vm._e()], 2), _vm.btnModel === "block" ? _c("div", {
7986
8205
  staticClass: "nf-flex nf-flex-align-items nf-mt10"
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", {
8206
+ }, [_vm.isShowBtnBoxSlot && !_vm.reverseBtnSlot ? _vm._t("btnBox") : _vm._e(), _vm._l(_vm.cBtnItems, function(item, idx) {
8207
+ var _a, _b, _c2;
8208
+ return [((_a = item.btnType) == null ? void 0 : _a.includes("search")) ? _c("nf-button", {
8209
+ key: "btn-" + idx,
8210
+ class: (_vm.queryBtnClass || "") + " nf-btn-search",
8211
+ attrs: {
8212
+ "type": _vm.queryBtnType,
8213
+ "icon": _vm.queryBtnIcon,
8214
+ "plain": _vm.queryBtnPlain,
8215
+ "size": _vm.queryBtnSize || _vm.size,
8216
+ "round": _vm.queryBtnRound,
8217
+ "circle": _vm.queryBtnCircle,
8218
+ "loading": _vm.queryBtnLoading,
8219
+ "disabled": _vm.queryBtnDisabled
8220
+ },
8221
+ on: {
8222
+ "click": _vm.onNfSearchFormSearch
8223
+ }
8224
+ }, [_vm._v(_vm._s(_vm.queryBtnText) + " ")]) : ((_b = item.btnType) == null ? void 0 : _b.includes("export")) ? _c("nf-button", {
8225
+ key: "btn-" + idx,
8226
+ class: (_vm.exportBtnClass || "") + " nf-btn-export",
8227
+ attrs: {
8228
+ "type": _vm.exportBtnType,
8229
+ "icon": _vm.exportBtnIcon,
8230
+ "plain": _vm.exportBtnPlain,
8231
+ "size": _vm.exportBtnSize || _vm.size,
8232
+ "round": _vm.exportBtnRound,
8233
+ "circle": _vm.exportBtnCircle,
8234
+ "loading": _vm.exportBtnLoading,
8235
+ "disabled": _vm.exportBtnDisabled
8236
+ },
8237
+ on: {
8238
+ "click": _vm.onNfSearchFormExport
8239
+ }
8240
+ }, [_vm._v(_vm._s(_vm.exportBtnText) + " ")]) : ((_c2 = item.btnType) == null ? void 0 : _c2.includes("reset")) ? _c("nf-button", {
8241
+ key: "btn-" + idx,
8242
+ class: (_vm.resetBtnClass || "") + " nf-btn-reset",
8243
+ attrs: {
8244
+ "type": _vm.resetBtnType,
8245
+ "icon": _vm.resetBtnIcon,
8246
+ "plain": _vm.resetBtnPlain,
8247
+ "size": _vm.resetBtnSize || _vm.size,
8248
+ "round": _vm.resetBtnRound,
8249
+ "circle": _vm.resetBtnCircle,
8250
+ "loading": _vm.resetBtnLoading,
8251
+ "disabled": _vm.resetBtnDisabled
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", {
8033
8276
  class: (_vm.checkBtnClass || "") + " nf-btn-check",
8034
8277
  attrs: {
8035
8278
  "type": _vm.checkBtnType,
@@ -8063,7 +8306,7 @@ var _sfc_render = function render6() {
8063
8306
  "basic-field-desc": _vm.columnCheckBasicFieldDesc,
8064
8307
  "show": _vm.configNfSearchItemVisibleDialog,
8065
8308
  "modal-append-to-body": _vm.modalAppendToBody,
8066
- "storage-key": _vm.storageKey,
8309
+ "storage-key": _vm.cStorageKey,
8067
8310
  "table-columns": _vm.formOptions,
8068
8311
  "width": _vm.moreDialogWidth,
8069
8312
  "modal": _vm.modal,
@@ -8136,7 +8379,7 @@ var _sfc_render = function render6() {
8136
8379
  "select-empty-warning-tips": _vm.selectEmptyWarningTips,
8137
8380
  "get-checked-length-desc": _vm.columnCheckGetCheckedLengthDesc,
8138
8381
  "get-all-check-desc": _vm.columnCheckGetAllCheckDesc,
8139
- "storage-key": _vm.storageKey,
8382
+ "storage-key": _vm.cStorageKey,
8140
8383
  "table-columns": _vm.formOptions,
8141
8384
  "column-edit": _vm.columnEdit
8142
8385
  }