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