form-custom-test 3.0.183 → 3.0.184

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.
@@ -56659,7 +56659,7 @@ const _sfc_main$2k = {
56659
56659
  const dictCode = this.optionModel.dictCode.trim();
56660
56660
  this.loadingDict = true;
56661
56661
  try {
56662
- let dictManager = null;
56662
+ let dictManager2 = null;
56663
56663
  if (typeof window !== "undefined" && window.getDictData) {
56664
56664
  const dictItems = window.getDictData(dictCode);
56665
56665
  if (dictItems && Array.isArray(dictItems) && dictItems.length > 0) {
@@ -69039,13 +69039,13 @@ function registerIcon(app) {
69039
69039
  if (typeof window !== "undefined") {
69040
69040
  let loadSvg = function() {
69041
69041
  var body = document.body;
69042
- var svgDom = document.getElementById("__svg__icons__dom__1780390679488__");
69042
+ var svgDom = document.getElementById("__svg__icons__dom__1780448201529__");
69043
69043
  if (!svgDom) {
69044
69044
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
69045
69045
  svgDom.style.position = "absolute";
69046
69046
  svgDom.style.width = "0";
69047
69047
  svgDom.style.height = "0";
69048
- svgDom.id = "__svg__icons__dom__1780390679488__";
69048
+ svgDom.id = "__svg__icons__dom__1780448201529__";
69049
69049
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
69050
69050
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
69051
69051
  }
@@ -78488,7 +78488,7 @@ const _sfc_main$b = {
78488
78488
  const dictCode = col.dictCode.trim();
78489
78489
  col._loadingDict = true;
78490
78490
  try {
78491
- let dictManager = null;
78491
+ let dictManager2 = null;
78492
78492
  if (typeof window !== "undefined" && window.getDictData) {
78493
78493
  const dictItems = window.getDictData(dictCode);
78494
78494
  if (dictItems && Array.isArray(dictItems) && dictItems.length > 0) {
@@ -80827,6 +80827,63 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
80827
80827
  }, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]);
80828
80828
  }
80829
80829
  var ResolutionTableWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-6f782e71"]]);
80830
+ class DictManager {
80831
+ constructor() {
80832
+ this.dictCache = {};
80833
+ this.loading = false;
80834
+ }
80835
+ init(dictData) {
80836
+ this.dictCache = dictData || {};
80837
+ if (typeof window !== "undefined") {
80838
+ window.dictCache = this.dictCache;
80839
+ window.getDictData = (dictCode) => this.getDictData(dictCode);
80840
+ }
80841
+ }
80842
+ getDictData(dictCode) {
80843
+ if (!dictCode) {
80844
+ return [];
80845
+ }
80846
+ return this.dictCache[dictCode] || [];
80847
+ }
80848
+ getDictLabel(dictCode, value2, labelField = "label", valueField = "value") {
80849
+ const items = this.getDictData(dictCode);
80850
+ const item = items.find((item2) => String(item2[valueField]) === String(value2));
80851
+ return item ? item[labelField] : value2;
80852
+ }
80853
+ getDictValue(dictCode, label, labelField = "dictLabel", valueField = "dictValue") {
80854
+ const items = this.getDictData(dictCode);
80855
+ const item = items.find((item2) => item2[labelField] === label);
80856
+ return item ? item[valueField] : null;
80857
+ }
80858
+ getDictOptions(dictCode, options = {}) {
80859
+ const {
80860
+ labelField = "dictLabel",
80861
+ valueField = "dictValue",
80862
+ disabledField = "disabled"
80863
+ } = options;
80864
+ const items = this.getDictData(dictCode);
80865
+ return items.map((item) => __spreadValues({
80866
+ label: item[labelField] || "",
80867
+ value: item[valueField] || "",
80868
+ disabled: item[disabledField] || false
80869
+ }, item));
80870
+ }
80871
+ clear() {
80872
+ this.dictCache = {};
80873
+ if (typeof window !== "undefined") {
80874
+ window.dictCache = {};
80875
+ }
80876
+ }
80877
+ updateDict(dictCode, items) {
80878
+ if (dictCode && Array.isArray(items)) {
80879
+ this.dictCache[dictCode] = items;
80880
+ if (typeof window !== "undefined") {
80881
+ window.dictCache[dictCode] = items;
80882
+ }
80883
+ }
80884
+ }
80885
+ }
80886
+ const dictManager = new DictManager();
80830
80887
  var index_vue_vue_type_style_index_0_scoped_true_lang$2 = "";
80831
80888
  const _sfc_main$4 = {
80832
80889
  name: "fixed-table-widget",
@@ -80923,6 +80980,9 @@ const _sfc_main$4 = {
80923
80980
  }
80924
80981
  return { rowspan: 1, colspan: 1 };
80925
80982
  },
80983
+ getlabel(row) {
80984
+ return (dictManager == null ? void 0 : dictManager.getDictLabel("project_stage", row.projectStage)) || "-";
80985
+ },
80926
80986
  getSameCompanyRows(currentIndex) {
80927
80987
  const currentCompany = this.fieldModel[currentIndex].enterpriseName;
80928
80988
  const sameRows = [currentIndex];
@@ -81107,12 +81167,9 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
81107
81167
  label: "\u9879\u76EE\u9636\u6BB5",
81108
81168
  width: "90"
81109
81169
  }, {
81110
- default: withCtx(({ row }) => {
81111
- var _a2;
81112
- return [
81113
- createTextVNode(toDisplayString((_a2 = _ctx.dictManager) == null ? void 0 : _a2.getDictLabel("project_stage", row.projectStage)), 1)
81114
- ];
81115
- }),
81170
+ default: withCtx(({ row }) => [
81171
+ createTextVNode(toDisplayString($options.getlabel(row)), 1)
81172
+ ]),
81116
81173
  _: 1
81117
81174
  }),
81118
81175
  createVNode(_component_el_table_column, {
@@ -81183,7 +81240,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
81183
81240
  _: 1
81184
81241
  }, 8, ["designer", "field", "rules", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]);
81185
81242
  }
81186
- var FixedTableWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-40e3d0ce"]]);
81243
+ var FixedTableWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-7e005307"]]);
81187
81244
  var index_vue_vue_type_style_index_0_scoped_true_lang$1 = "";
81188
81245
  const _sfc_main$3 = {
81189
81246
  name: "equity-table-widget",