form-custom-test 3.0.156 → 3.0.158

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
@@ -26300,13 +26300,13 @@ function registerIcon(app) {
26300
26300
  if (typeof window !== "undefined") {
26301
26301
  let loadSvg = function() {
26302
26302
  var body = document.body;
26303
- var svgDom = document.getElementById("__svg__icons__dom__1779189435625__");
26303
+ var svgDom = document.getElementById("__svg__icons__dom__1779190007524__");
26304
26304
  if (!svgDom) {
26305
26305
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
26306
26306
  svgDom.style.position = "absolute";
26307
26307
  svgDom.style.width = "0";
26308
26308
  svgDom.style.height = "0";
26309
- svgDom.id = "__svg__icons__dom__1779189435625__";
26309
+ svgDom.id = "__svg__icons__dom__1779190007524__";
26310
26310
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
26311
26311
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
26312
26312
  }
@@ -63489,9 +63489,25 @@ const _sfc_main$1 = {
63489
63489
  hasExistingValue() {
63490
63490
  var _a;
63491
63491
  const v = (_a = this.fieldModel) != null ? _a : this.oldFieldValue;
63492
- return v !== void 0 && v !== null && v !== "";
63492
+ if (v === void 0 || v === null || v === "") {
63493
+ return false;
63494
+ }
63495
+ if (typeof v === "object") {
63496
+ return !!(v.companyName || v.id || v.companyId);
63497
+ }
63498
+ return true;
63499
+ },
63500
+ tryLoadCurrentUserSecondCompany() {
63501
+ console.log(this.designState, this.hasExistingValue(), "222222222");
63502
+ if (this.designState || this.hasExistingValue()) {
63503
+ return;
63504
+ }
63505
+ this.getCurrentUserSecondCompany();
63493
63506
  },
63494
63507
  async getCurrentUserSecondCompany() {
63508
+ if (this.hasExistingValue()) {
63509
+ return;
63510
+ }
63495
63511
  const { data: data2 } = await service$1({
63496
63512
  method: "get",
63497
63513
  url: "unified-system/sysCompany/targetCompany",
@@ -63499,6 +63515,9 @@ const _sfc_main$1 = {
63499
63515
  id: sessionStorage.getItem("companyId")
63500
63516
  }
63501
63517
  });
63518
+ if (this.hasExistingValue()) {
63519
+ return;
63520
+ }
63502
63521
  this.fieldModel = data2;
63503
63522
  this.syncUpdateFormModel(this.fieldModel);
63504
63523
  this.emitFieldDataChange(this.fieldModel, this.oldFieldValue);
@@ -63523,9 +63542,9 @@ const _sfc_main$1 = {
63523
63542
  this.handleOnCreated();
63524
63543
  },
63525
63544
  mounted() {
63526
- if (this.hasExistingValue())
63527
- return;
63528
- this.getCurrentUserSecondCompany();
63545
+ this.$nextTick(() => {
63546
+ this.tryLoadCurrentUserSecondCompany();
63547
+ });
63529
63548
  }
63530
63549
  };
63531
63550
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
@@ -63544,7 +63563,6 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
63544
63563
  "sub-form-row-id": $props.subFormRowId
63545
63564
  }, {
63546
63565
  default: withCtx(() => [
63547
- createTextVNode(toDisplayString($options.hasExistingValue()) + " ", 1),
63548
63566
  createVNode(_component_el_input, {
63549
63567
  modelValue: $options.displayModel,
63550
63568
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.displayModel = $event),