yuanjia-form-pro-standard 1.1.6-beta6.7 → 1.1.6-beta6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/designer.es.js CHANGED
@@ -210793,11 +210793,10 @@ const _sfc_main$46 = {
210793
210793
  data() {
210794
210794
  return {
210795
210795
  optionList: [],
210796
- headers: {}
210796
+ headers: {},
210797
+ loading: false
210797
210798
  };
210798
210799
  },
210799
- created() {
210800
- },
210801
210800
  mounted() {
210802
210801
  const token = almLocalStorage.getItem("token");
210803
210802
  const rToken = almLocalStorage.getItem("rToken");
@@ -210809,23 +210808,39 @@ const _sfc_main$46 = {
210809
210808
  headers["X-Authorization"] = "Bearer " + rToken;
210810
210809
  }
210811
210810
  this.headers = headers;
210812
- const url = commonGETUrlTranslation("formset/formset_construct_manage", { PageIndex: 1, PageSize: 100 });
210813
- axios$1.get(url, { headers }).then((res) => {
210814
- var _a2, _b2, _c2;
210815
- this.optionList = (_c2 = (_b2 = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.Data) == null ? void 0 : _b2.Items) == null ? void 0 : _c2.map((item) => ({
210816
- label: item == null ? void 0 : item.name,
210817
- value: item == null ? void 0 : item.id
210818
- }));
210819
- }).catch((error2) => {
210820
- this.$message.error(this.i18nt("designer.hint.loadFormTemplateFailed") + ":" + error2);
210821
- });
210822
210811
  },
210823
210812
  methods: {
210813
+ loadFormList(keywords2 = "") {
210814
+ const params = { PageIndex: 1, PageSize: 100 };
210815
+ if (keywords2) {
210816
+ params.keywords = keywords2;
210817
+ }
210818
+ const url = commonGETUrlTranslation("formset/formset_construct_manage", params);
210819
+ this.loading = true;
210820
+ axios$1.get(url, { headers: this.headers }).then((res) => {
210821
+ var _a2, _b2, _c2;
210822
+ this.optionList = ((_c2 = (_b2 = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.Data) == null ? void 0 : _b2.Items) == null ? void 0 : _c2.map((item) => ({
210823
+ label: `${item == null ? void 0 : item.name} - ${item == null ? void 0 : item.id}`,
210824
+ value: item == null ? void 0 : item.id,
210825
+ name: item == null ? void 0 : item.name
210826
+ }))) || [];
210827
+ this.loading = false;
210828
+ }).catch((error2) => {
210829
+ this.$message.error(this.i18nt("designer.hint.loadFormTemplateFailed") + ":" + error2);
210830
+ this.loading = false;
210831
+ });
210832
+ },
210833
+ remoteSearch: _.debounce(function(query) {
210834
+ if (query && query.trim()) {
210835
+ this.loadFormList(query.trim());
210836
+ } else {
210837
+ this.optionList = [];
210838
+ }
210839
+ }, 300),
210824
210840
  handleChange(val) {
210825
- var _a2;
210826
210841
  console.log(this.optionModel, val, "optionModel");
210827
- const label = (_a2 = this.optionList.find((item) => item.value === val)) == null ? void 0 : _a2.label;
210828
- this.optionModel.childFormName = label;
210842
+ const selectedItem = this.optionList.find((item) => item.value === val);
210843
+ this.optionModel.childFormName = (selectedItem == null ? void 0 : selectedItem.name) || "";
210829
210844
  this.optionModel.childFormKey = val;
210830
210845
  this.optionModel.childFormExpand = false;
210831
210846
  }
@@ -210843,6 +210858,9 @@ function _sfc_render$46(_ctx, _cache, $props, $setup, $data, $options) {
210843
210858
  modelValue: $props.optionModel.childFormKey,
210844
210859
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $props.optionModel.childFormKey = $event),
210845
210860
  filterable: "",
210861
+ remote: "",
210862
+ "remote-method": $options.remoteSearch,
210863
+ loading: $data.loading,
210846
210864
  "allow-create": "",
210847
210865
  onChange: $options.handleChange
210848
210866
  }, {
@@ -210856,7 +210874,7 @@ function _sfc_render$46(_ctx, _cache, $props, $setup, $data, $options) {
210856
210874
  }), 128))
210857
210875
  ]),
210858
210876
  _: 1
210859
- }, 8, ["modelValue", "onChange"])
210877
+ }, 8, ["modelValue", "remote-method", "loading", "onChange"])
210860
210878
  ]),
210861
210879
  _: 1
210862
210880
  }, 8, ["label"]);
@@ -236451,13 +236469,13 @@ var Draggable = /* @__PURE__ */ getDefaultExportFromCjs(vuedraggable_umd.exports
236451
236469
  if (typeof window !== "undefined") {
236452
236470
  let loadSvg = function() {
236453
236471
  var body = document.body;
236454
- var svgDom = document.getElementById("__svg__icons__dom__1767775095580__");
236472
+ var svgDom = document.getElementById("__svg__icons__dom__1768267827599__");
236455
236473
  if (!svgDom) {
236456
236474
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
236457
236475
  svgDom.style.position = "absolute";
236458
236476
  svgDom.style.width = "0";
236459
236477
  svgDom.style.height = "0";
236460
- svgDom.id = "__svg__icons__dom__1767775095580__";
236478
+ svgDom.id = "__svg__icons__dom__1768267827599__";
236461
236479
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
236462
236480
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
236463
236481
  }