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.
@@ -69279,13 +69279,13 @@ function registerIcon(app) {
69279
69279
  if (typeof window !== "undefined") {
69280
69280
  let loadSvg = function() {
69281
69281
  var body = document.body;
69282
- var svgDom = document.getElementById("__svg__icons__dom__1783060841122__");
69282
+ var svgDom = document.getElementById("__svg__icons__dom__1783062042423__");
69283
69283
  if (!svgDom) {
69284
69284
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
69285
69285
  svgDom.style.position = "absolute";
69286
69286
  svgDom.style.width = "0";
69287
69287
  svgDom.style.height = "0";
69288
- svgDom.id = "__svg__icons__dom__1783060841122__";
69288
+ svgDom.id = "__svg__icons__dom__1783062042423__";
69289
69289
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
69290
69290
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
69291
69291
  }
@@ -80462,7 +80462,7 @@ const _sfc_main$c = {
80462
80462
  size: this.pageSize,
80463
80463
  current: this.currentPage,
80464
80464
  title: this.form.title,
80465
- createdByCompanyId: "1933058214390362114",
80465
+ createdByCompanyId: sessionStorage.getItem("companyId"),
80466
80466
  dataJson: {
80467
80467
  form_titleName: this.form.title
80468
80468
  },
@@ -80793,7 +80793,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
80793
80793
  _: 1
80794
80794
  }, 8, ["modelValue", "onClose"]);
80795
80795
  }
80796
- var DocumentDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-6ee0ef30"]]);
80796
+ var DocumentDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["render", _sfc_render$c], ["__scopeId", "data-v-3988fe48"]]);
80797
80797
  var documentDetailDialog_vue_vue_type_style_index_0_scoped_true_lang = "";
80798
80798
  var documentDetailDialog_vue_vue_type_style_index_1_lang = "";
80799
80799
  const DEFAULT_FORM_JSON = {
@@ -80899,15 +80899,28 @@ const _sfc_main$b = {
80899
80899
  getFormConfigCode(item) {
80900
80900
  return (item == null ? void 0 : item.subCategoryCode) || (item == null ? void 0 : item.formCode) || this.documentTypeValue;
80901
80901
  },
80902
+ buildReadonlyFormJson(formJson) {
80903
+ const json = lodash.exports.cloneDeep(formJson);
80904
+ if (json == null ? void 0 : json.widgetList) {
80905
+ traverseFieldWidgets(json.widgetList, (widget) => {
80906
+ if (widget == null ? void 0 : widget.options) {
80907
+ widget.options.disabled = true;
80908
+ widget.options.readonly = true;
80909
+ }
80910
+ });
80911
+ }
80912
+ return json;
80913
+ },
80902
80914
  applyFormToRender(parsed, formData) {
80903
- this.formJson = parsed;
80915
+ const disabledJson = this.buildReadonlyFormJson(parsed);
80916
+ this.formJson = disabledJson;
80904
80917
  this.showForm = true;
80905
80918
  this.$nextTick(() => {
80906
80919
  const ref2 = this.$refs.detailFormRender;
80907
80920
  if (!ref2 || typeof ref2.setFormJson !== "function") {
80908
80921
  return;
80909
80922
  }
80910
- ref2.setFormJson(lodash.exports.cloneDeep(parsed));
80923
+ ref2.setFormJson(lodash.exports.cloneDeep(disabledJson));
80911
80924
  this.$nextTick(() => {
80912
80925
  if (typeof ref2.setFormData === "function") {
80913
80926
  ref2.setFormData(lodash.exports.cloneDeep(formData));
@@ -80924,7 +80937,7 @@ const _sfc_main$b = {
80924
80937
  }
80925
80938
  };
80926
80939
  this.$nextTick(disable);
80927
- setTimeout(disable, 300);
80940
+ [300, 800, 1500].forEach((delay) => setTimeout(disable, delay));
80928
80941
  },
80929
80942
  async loadDocumentDetail(item) {
80930
80943
  const formConfigCode = this.getFormConfigCode(item);
@@ -80970,7 +80983,7 @@ const _hoisted_1$9 = {
80970
80983
  };
80971
80984
  const _hoisted_2$7 = {
80972
80985
  key: 1,
80973
- class: "detail-form"
80986
+ class: "detail-form detail-form--readonly"
80974
80987
  };
80975
80988
  const _hoisted_3$5 = {
80976
80989
  key: 2,
@@ -81034,7 +81047,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
81034
81047
  _: 1
81035
81048
  }, 8, ["modelValue", "onClose"]);
81036
81049
  }
81037
- var DocumentDetailDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-6eaf8455"]]);
81050
+ var DocumentDetailDialog = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-ddc7afce"]]);
81038
81051
  var index_vue_vue_type_style_index_0_lang$1 = "";
81039
81052
  const _sfc_main$a = {
81040
81053
  name: "document-select-widget",