form-custom-test 3.0.219 → 3.0.221

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/dist/render.es.js CHANGED
@@ -26644,13 +26644,13 @@ function registerIcon(app) {
26644
26644
  if (typeof window !== "undefined") {
26645
26645
  let loadSvg = function() {
26646
26646
  var body = document.body;
26647
- var svgDom = document.getElementById("__svg__icons__dom__1783060851654__");
26647
+ var svgDom = document.getElementById("__svg__icons__dom__1783062051755__");
26648
26648
  if (!svgDom) {
26649
26649
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
26650
26650
  svgDom.style.position = "absolute";
26651
26651
  svgDom.style.width = "0";
26652
26652
  svgDom.style.height = "0";
26653
- svgDom.id = "__svg__icons__dom__1783060851654__";
26653
+ svgDom.id = "__svg__icons__dom__1783062051755__";
26654
26654
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
26655
26655
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
26656
26656
  }
@@ -63373,7 +63373,7 @@ const _sfc_main$c = {
63373
63373
  size: this.pageSize,
63374
63374
  current: this.currentPage,
63375
63375
  title: this.form.title,
63376
- createdByCompanyId: "1933058214390362114",
63376
+ createdByCompanyId: sessionStorage.getItem("companyId"),
63377
63377
  dataJson: {
63378
63378
  form_titleName: this.form.title
63379
63379
  },
@@ -63704,7 +63704,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
63704
63704
  _: 1
63705
63705
  }, 8, ["modelValue", "onClose"]);
63706
63706
  }
63707
- var DocumentDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-6ee0ef30"]]);
63707
+ var DocumentDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-3988fe48"]]);
63708
63708
  var documentDetailDialog_vue_vue_type_style_index_0_scoped_true_lang = "";
63709
63709
  var documentDetailDialog_vue_vue_type_style_index_1_lang = "";
63710
63710
  const DEFAULT_FORM_JSON = {
@@ -63810,15 +63810,28 @@ const _sfc_main$b = {
63810
63810
  getFormConfigCode(item) {
63811
63811
  return (item == null ? void 0 : item.subCategoryCode) || (item == null ? void 0 : item.formCode) || this.documentTypeValue;
63812
63812
  },
63813
+ buildReadonlyFormJson(formJson) {
63814
+ const json = lodash.exports.cloneDeep(formJson);
63815
+ if (json == null ? void 0 : json.widgetList) {
63816
+ traverseFieldWidgets(json.widgetList, (widget) => {
63817
+ if (widget == null ? void 0 : widget.options) {
63818
+ widget.options.disabled = true;
63819
+ widget.options.readonly = true;
63820
+ }
63821
+ });
63822
+ }
63823
+ return json;
63824
+ },
63813
63825
  applyFormToRender(parsed, formData) {
63814
- this.formJson = parsed;
63826
+ const disabledJson = this.buildReadonlyFormJson(parsed);
63827
+ this.formJson = disabledJson;
63815
63828
  this.showForm = true;
63816
63829
  this.$nextTick(() => {
63817
63830
  const ref2 = this.$refs.detailFormRender;
63818
63831
  if (!ref2 || typeof ref2.setFormJson !== "function") {
63819
63832
  return;
63820
63833
  }
63821
- ref2.setFormJson(lodash.exports.cloneDeep(parsed));
63834
+ ref2.setFormJson(lodash.exports.cloneDeep(disabledJson));
63822
63835
  this.$nextTick(() => {
63823
63836
  if (typeof ref2.setFormData === "function") {
63824
63837
  ref2.setFormData(lodash.exports.cloneDeep(formData));
@@ -63835,7 +63848,7 @@ const _sfc_main$b = {
63835
63848
  }
63836
63849
  };
63837
63850
  this.$nextTick(disable);
63838
- setTimeout(disable, 300);
63851
+ [300, 800, 1500].forEach((delay) => setTimeout(disable, delay));
63839
63852
  },
63840
63853
  async loadDocumentDetail(item) {
63841
63854
  const formConfigCode = this.getFormConfigCode(item);
@@ -63881,7 +63894,7 @@ const _hoisted_1$9 = {
63881
63894
  };
63882
63895
  const _hoisted_2$7 = {
63883
63896
  key: 1,
63884
- class: "detail-form"
63897
+ class: "detail-form detail-form--readonly"
63885
63898
  };
63886
63899
  const _hoisted_3$5 = {
63887
63900
  key: 2,
@@ -63945,7 +63958,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
63945
63958
  _: 1
63946
63959
  }, 8, ["modelValue", "onClose"]);
63947
63960
  }
63948
- var DocumentDetailDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-6eaf8455"]]);
63961
+ var DocumentDetailDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-ddc7afce"]]);
63949
63962
  var index_vue_vue_type_style_index_0_lang$1 = "";
63950
63963
  const _sfc_main$a = {
63951
63964
  name: "document-select-widget",