form-custom-test 3.0.58 → 3.0.60

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
@@ -8609,7 +8609,6 @@ var fieldMixin = {
8609
8609
  },
8610
8610
  initEventHandler() {
8611
8611
  this.on$("setFormData", (newFormData) => {
8612
- console.log("formModel of globalModel----------", this.globalModel.formModel);
8613
8612
  if (!this.subFormItemFlag) {
8614
8613
  this.setValue(newFormData[this.field.options.name]);
8615
8614
  }
@@ -8867,16 +8866,12 @@ var fieldMixin = {
8867
8866
  },
8868
8867
  setColHidden(colName, hidden) {
8869
8868
  const hiddenVal = !!hidden;
8870
- console.log("colName", colName);
8871
8869
  if (Array.isArray(colName)) {
8872
8870
  let anySet = false;
8873
8871
  colName.forEach((cName) => {
8874
- console.log("cName", cName);
8875
8872
  const col2 = this.findColByName(cName);
8876
- console.log("col", col2);
8877
8873
  if (col2 && col2.options) {
8878
- col2.options.hidden = hiddenVal;
8879
- console.log("col.options.hidden", col2.options.hidden);
8874
+ col2.options.hidden = hiddenVa;
8880
8875
  anySet = true;
8881
8876
  }
8882
8877
  });
@@ -8898,13 +8893,11 @@ var fieldMixin = {
8898
8893
  }
8899
8894
  }
8900
8895
  if (!foundRef && (!this.subFormItemFlag || this.designState)) {
8901
- console.log(2222222);
8902
8896
  foundRef = this.refList[widgetName];
8903
8897
  }
8904
8898
  if (!foundRef && !!showError) {
8905
8899
  this.$message.error(this.i18nt("render.hint.refNotFound") + widgetName);
8906
8900
  }
8907
- console.log(foundRef, "foundRef");
8908
8901
  return foundRef;
8909
8902
  },
8910
8903
  getFieldEditor() {
@@ -10674,29 +10667,10 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
10674
10667
  "on-exceed": $options.handleFileExceed,
10675
10668
  "before-upload": $options.beforeFileUpload,
10676
10669
  "on-progress": $options.handleProgress
10677
- }, {
10670
+ }, createSlots({
10678
10671
  tip: withCtx(() => [
10679
10672
  !!$props.field.options.uploadTip ? (openBlock(), createElementBlock("div", _hoisted_2$h, toDisplayString($props.field.options.uploadTip), 1)) : createCommentVNode("", true)
10680
10673
  ]),
10681
- default: withCtx(() => [
10682
- $props.field.options.allowDrag ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
10683
- createVNode(_component_el_icon, { class: "el-icon--upload" }, {
10684
- default: withCtx(() => [
10685
- createVNode(_component_upload_filled)
10686
- ]),
10687
- _: 1
10688
- }),
10689
- _cache[0] || (_cache[0] = createElementVNode("div", { class: "el-upload__text" }, " \u70B9\u51FB\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4E0A\u4F20 ", -1))
10690
- ], 64)) : (openBlock(), createBlock(_component_el_button, {
10691
- key: 1,
10692
- type: "primary"
10693
- }, {
10694
- default: withCtx(() => [..._cache[1] || (_cache[1] = [
10695
- createTextVNode(" \u9009\u62E9\u6587\u4EF6", -1)
10696
- ])]),
10697
- _: 1
10698
- }))
10699
- ]),
10700
10674
  file: withCtx(({ file }) => [
10701
10675
  createElementVNode("div", _hoisted_3$e, [
10702
10676
  createElementVNode("div", _hoisted_4$c, [
@@ -10720,8 +10694,32 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
10720
10694
  ])
10721
10695
  ])
10722
10696
  ]),
10723
- _: 1
10724
- }, 8, ["disabled", "style", "action", "headers", "data", "with-credentials", "multiple", "file-list", "show-file-list", "class", "limit", "on-success", "on-error", "drag", "on-exceed", "before-upload", "on-progress"]),
10697
+ _: 2
10698
+ }, [
10699
+ !$props.field.options.disabled ? {
10700
+ name: "default",
10701
+ fn: withCtx(() => [
10702
+ $props.field.options.allowDrag ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
10703
+ createVNode(_component_el_icon, { class: "el-icon--upload" }, {
10704
+ default: withCtx(() => [
10705
+ createVNode(_component_upload_filled)
10706
+ ]),
10707
+ _: 1
10708
+ }),
10709
+ _cache[0] || (_cache[0] = createElementVNode("div", { class: "el-upload__text" }, " \u70B9\u51FB\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4E0A\u4F20 ", -1))
10710
+ ], 64)) : (openBlock(), createBlock(_component_el_button, {
10711
+ key: 1,
10712
+ type: "primary"
10713
+ }, {
10714
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [
10715
+ createTextVNode(" \u9009\u62E9\u6587\u4EF6", -1)
10716
+ ])]),
10717
+ _: 1
10718
+ }))
10719
+ ]),
10720
+ key: "0"
10721
+ } : void 0
10722
+ ]), 1032, ["disabled", "style", "action", "headers", "data", "with-credentials", "multiple", "file-list", "show-file-list", "class", "limit", "on-success", "on-error", "drag", "on-exceed", "before-upload", "on-progress"]),
10725
10723
  createVNode(_component_el_progress, {
10726
10724
  style: normalizeStyle({
10727
10725
  display: $data.showProgress ? "inline-flex" : "none",
@@ -10734,7 +10732,7 @@ function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
10734
10732
  _: 1
10735
10733
  }, 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"]);
10736
10734
  }
10737
- var fileUploadWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$M, [["render", _sfc_render$M], ["__scopeId", "data-v-6d3ed7e0"]]);
10735
+ var fileUploadWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$M, [["render", _sfc_render$M], ["__scopeId", "data-v-06821a9a"]]);
10738
10736
  var __glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10739
10737
  __proto__: null,
10740
10738
  "default": fileUploadWidget
@@ -23330,6 +23328,7 @@ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
23330
23328
  "sub-form-row-id": $props.subFormRowId
23331
23329
  }, {
23332
23330
  default: withCtx(() => [
23331
+ createTextVNode(toDisplayString($data.fieldModel) + " ", 1),
23333
23332
  createVNode(_component_el_select, {
23334
23333
  ref: "fieldEditor",
23335
23334
  modelValue: $data.fieldModel,
@@ -23367,7 +23366,7 @@ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
23367
23366
  _: 1
23368
23367
  }, 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"]);
23369
23368
  }
23370
- var selectWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$C, [["render", _sfc_render$C], ["__scopeId", "data-v-97221160"]]);
23369
+ var selectWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$C, [["render", _sfc_render$C], ["__scopeId", "data-v-42d4e5c2"]]);
23371
23370
  var __glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23372
23371
  __proto__: null,
23373
23372
  "default": selectWidget
@@ -25884,13 +25883,13 @@ function registerIcon(app) {
25884
25883
  if (typeof window !== "undefined") {
25885
25884
  let loadSvg = function() {
25886
25885
  var body = document.body;
25887
- var svgDom = document.getElementById("__svg__icons__dom__1773378552777__");
25886
+ var svgDom = document.getElementById("__svg__icons__dom__1773796342503__");
25888
25887
  if (!svgDom) {
25889
25888
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
25890
25889
  svgDom.style.position = "absolute";
25891
25890
  svgDom.style.width = "0";
25892
25891
  svgDom.style.height = "0";
25893
- svgDom.id = "__svg__icons__dom__1773378552777__";
25892
+ svgDom.id = "__svg__icons__dom__1773796342503__";
25894
25893
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
25895
25894
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
25896
25895
  }
@@ -32114,8 +32113,9 @@ const _sfc_main$j = {
32114
32113
  if (handler) {
32115
32114
  try {
32116
32115
  if (eventName === "onConfirm" && args.length > 0) {
32117
- const fn = new Function("checkedNodes", handler);
32118
- fn.call(this, args[0]);
32116
+ const nodes = args[0];
32117
+ const fn = new Function("checkedNodes", "selectedNodes", "selectedValue", handler);
32118
+ fn.call(this, nodes, nodes, nodes);
32119
32119
  } else if (args.length > 0) {
32120
32120
  const paramNames = args.map((_, index2) => `arg${index2}`).join(", ");
32121
32121
  const fn = new Function(paramNames, handler);
@@ -32253,7 +32253,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
32253
32253
  _: 1
32254
32254
  }, 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"]);
32255
32255
  }
32256
- var PersonTreeWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-0f7a3e8a"]]);
32256
+ var PersonTreeWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["render", _sfc_render$j], ["__scopeId", "data-v-824e8a98"]]);
32257
32257
  const _sfc_main$i = {
32258
32258
  name: "radio-other-widget",
32259
32259
  componentName: "FieldWidget",
@@ -61330,18 +61330,21 @@ const _sfc_main = {
61330
61330
  }
61331
61331
  },
61332
61332
  methods: {
61333
+ hasExistingValue() {
61334
+ var _a;
61335
+ const v = (_a = this.fieldModel) != null ? _a : this.oldFieldValue;
61336
+ return v !== void 0 && v !== null && v !== "";
61337
+ },
61333
61338
  async getCurrentUser() {
61334
61339
  const { data: data2 } = await service({
61335
61340
  method: "get",
61336
61341
  url: "unified-system/employee/loginInfo?accessType=0"
61337
61342
  });
61338
- console.log(this.currentUserType, "data");
61339
61343
  if (this.currentUserType === "username") {
61340
61344
  this.fieldModel = data2.username;
61341
61345
  } else if (this.currentUserType === "deptName") {
61342
61346
  this.fieldModel = data2.deptName;
61343
61347
  }
61344
- console.log(this.oldFieldValue, this.fieldModel, "this.oldFieldValue");
61345
61348
  this.syncUpdateFormModel(this.fieldModel);
61346
61349
  this.emitFieldDataChange(this.fieldModel, this.oldFieldValue);
61347
61350
  }
@@ -61358,7 +61361,8 @@ const _sfc_main = {
61358
61361
  },
61359
61362
  "field.options.type": {
61360
61363
  handler(newVal, oldVal) {
61361
- console.log(newVal, "currentUserType changed from", oldVal, "to", newVal);
61364
+ if (oldVal === void 0)
61365
+ return;
61362
61366
  this.getCurrentUser();
61363
61367
  },
61364
61368
  immediate: false
@@ -61372,6 +61376,8 @@ const _sfc_main = {
61372
61376
  this.handleOnCreated();
61373
61377
  },
61374
61378
  mounted() {
61379
+ if (this.hasExistingValue())
61380
+ return;
61375
61381
  this.getCurrentUser();
61376
61382
  }
61377
61383
  };
@@ -61446,7 +61452,7 @@ const loadExtension = function(app) {
61446
61452
  registerCPEditor(app, "person-tree-cancelText", "person-tree-cancelText-editor", createInputTextEditor("cancelText", "extension.setting.personTreeCancelText"));
61447
61453
  registerCPEditor(app, "person-tree-hideFooter", "person-tree-hideFooter-editor", createBooleanEditor("hideFooter", "extension.setting.personTreeHideFooter"));
61448
61454
  registerEPEditor(app, "person-tree-onOpen", "person-tree-onOpen-editor", createEventHandlerEditor("onOpen", []));
61449
- registerEPEditor(app, "person-tree-onConfirm", "person-tree-onConfirm-editor", createEventHandlerEditor("onConfirm", []));
61455
+ registerEPEditor(app, "person-tree-onConfirm", "person-tree-onConfirm-editor", createEventHandlerEditor("onConfirm", ["checkedNodes"]));
61450
61456
  registerEPEditor(app, "person-tree-onCancel", "person-tree-onCancel-editor", createEventHandlerEditor("onCancel", []));
61451
61457
  registerEPEditor(app, "person-tree-onClose", "person-tree-onClose-editor", createEventHandlerEditor("onClose", []));
61452
61458
  app.component(radioOtherItem.name, radioOtherItem);