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/designer.es.js +47 -41
- package/dist/designer.style.css +2 -2
- package/dist/designer.umd.js +4 -4
- package/dist/render.es.js +47 -41
- package/dist/render.style.css +2 -2
- package/dist/render.umd.js +5 -5
- package/package.json +1 -1
package/dist/designer.es.js
CHANGED
|
@@ -10247,7 +10247,6 @@ var fieldMixin = {
|
|
|
10247
10247
|
},
|
|
10248
10248
|
initEventHandler() {
|
|
10249
10249
|
this.on$("setFormData", (newFormData) => {
|
|
10250
|
-
console.log("formModel of globalModel----------", this.globalModel.formModel);
|
|
10251
10250
|
if (!this.subFormItemFlag) {
|
|
10252
10251
|
this.setValue(newFormData[this.field.options.name]);
|
|
10253
10252
|
}
|
|
@@ -10505,16 +10504,12 @@ var fieldMixin = {
|
|
|
10505
10504
|
},
|
|
10506
10505
|
setColHidden(colName, hidden) {
|
|
10507
10506
|
const hiddenVal = !!hidden;
|
|
10508
|
-
console.log("colName", colName);
|
|
10509
10507
|
if (Array.isArray(colName)) {
|
|
10510
10508
|
let anySet = false;
|
|
10511
10509
|
colName.forEach((cName) => {
|
|
10512
|
-
console.log("cName", cName);
|
|
10513
10510
|
const col2 = this.findColByName(cName);
|
|
10514
|
-
console.log("col", col2);
|
|
10515
10511
|
if (col2 && col2.options) {
|
|
10516
|
-
col2.options.hidden =
|
|
10517
|
-
console.log("col.options.hidden", col2.options.hidden);
|
|
10512
|
+
col2.options.hidden = hiddenVa;
|
|
10518
10513
|
anySet = true;
|
|
10519
10514
|
}
|
|
10520
10515
|
});
|
|
@@ -10536,13 +10531,11 @@ var fieldMixin = {
|
|
|
10536
10531
|
}
|
|
10537
10532
|
}
|
|
10538
10533
|
if (!foundRef && (!this.subFormItemFlag || this.designState)) {
|
|
10539
|
-
console.log(2222222);
|
|
10540
10534
|
foundRef = this.refList[widgetName];
|
|
10541
10535
|
}
|
|
10542
10536
|
if (!foundRef && !!showError) {
|
|
10543
10537
|
this.$message.error(this.i18nt("render.hint.refNotFound") + widgetName);
|
|
10544
10538
|
}
|
|
10545
|
-
console.log(foundRef, "foundRef");
|
|
10546
10539
|
return foundRef;
|
|
10547
10540
|
},
|
|
10548
10541
|
getFieldEditor() {
|
|
@@ -12312,29 +12305,10 @@ function _sfc_render$37(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12312
12305
|
"on-exceed": $options.handleFileExceed,
|
|
12313
12306
|
"before-upload": $options.beforeFileUpload,
|
|
12314
12307
|
"on-progress": $options.handleProgress
|
|
12315
|
-
}, {
|
|
12308
|
+
}, createSlots({
|
|
12316
12309
|
tip: withCtx(() => [
|
|
12317
12310
|
!!$props.field.options.uploadTip ? (openBlock(), createElementBlock("div", _hoisted_2$m, toDisplayString($props.field.options.uploadTip), 1)) : createCommentVNode("", true)
|
|
12318
12311
|
]),
|
|
12319
|
-
default: withCtx(() => [
|
|
12320
|
-
$props.field.options.allowDrag ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
12321
|
-
createVNode(_component_el_icon, { class: "el-icon--upload" }, {
|
|
12322
|
-
default: withCtx(() => [
|
|
12323
|
-
createVNode(_component_upload_filled)
|
|
12324
|
-
]),
|
|
12325
|
-
_: 1
|
|
12326
|
-
}),
|
|
12327
|
-
_cache[0] || (_cache[0] = createElementVNode("div", { class: "el-upload__text" }, " \u70B9\u51FB\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4E0A\u4F20 ", -1))
|
|
12328
|
-
], 64)) : (openBlock(), createBlock(_component_el_button, {
|
|
12329
|
-
key: 1,
|
|
12330
|
-
type: "primary"
|
|
12331
|
-
}, {
|
|
12332
|
-
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
12333
|
-
createTextVNode(" \u9009\u62E9\u6587\u4EF6", -1)
|
|
12334
|
-
])]),
|
|
12335
|
-
_: 1
|
|
12336
|
-
}))
|
|
12337
|
-
]),
|
|
12338
12312
|
file: withCtx(({ file }) => [
|
|
12339
12313
|
createElementVNode("div", _hoisted_3$i, [
|
|
12340
12314
|
createElementVNode("div", _hoisted_4$g, [
|
|
@@ -12358,8 +12332,32 @@ function _sfc_render$37(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12358
12332
|
])
|
|
12359
12333
|
])
|
|
12360
12334
|
]),
|
|
12361
|
-
_:
|
|
12362
|
-
},
|
|
12335
|
+
_: 2
|
|
12336
|
+
}, [
|
|
12337
|
+
!$props.field.options.disabled ? {
|
|
12338
|
+
name: "default",
|
|
12339
|
+
fn: withCtx(() => [
|
|
12340
|
+
$props.field.options.allowDrag ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
12341
|
+
createVNode(_component_el_icon, { class: "el-icon--upload" }, {
|
|
12342
|
+
default: withCtx(() => [
|
|
12343
|
+
createVNode(_component_upload_filled)
|
|
12344
|
+
]),
|
|
12345
|
+
_: 1
|
|
12346
|
+
}),
|
|
12347
|
+
_cache[0] || (_cache[0] = createElementVNode("div", { class: "el-upload__text" }, " \u70B9\u51FB\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4E0A\u4F20 ", -1))
|
|
12348
|
+
], 64)) : (openBlock(), createBlock(_component_el_button, {
|
|
12349
|
+
key: 1,
|
|
12350
|
+
type: "primary"
|
|
12351
|
+
}, {
|
|
12352
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
12353
|
+
createTextVNode(" \u9009\u62E9\u6587\u4EF6", -1)
|
|
12354
|
+
])]),
|
|
12355
|
+
_: 1
|
|
12356
|
+
}))
|
|
12357
|
+
]),
|
|
12358
|
+
key: "0"
|
|
12359
|
+
} : void 0
|
|
12360
|
+
]), 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"]),
|
|
12363
12361
|
createVNode(_component_el_progress, {
|
|
12364
12362
|
style: normalizeStyle({
|
|
12365
12363
|
display: $data.showProgress ? "inline-flex" : "none",
|
|
@@ -12372,7 +12370,7 @@ function _sfc_render$37(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12372
12370
|
_: 1
|
|
12373
12371
|
}, 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"]);
|
|
12374
12372
|
}
|
|
12375
|
-
var fileUploadWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$37, [["render", _sfc_render$37], ["__scopeId", "data-v-
|
|
12373
|
+
var fileUploadWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$37, [["render", _sfc_render$37], ["__scopeId", "data-v-06821a9a"]]);
|
|
12376
12374
|
var __glob_0_7$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12377
12375
|
__proto__: null,
|
|
12378
12376
|
"default": fileUploadWidget
|
|
@@ -24968,6 +24966,7 @@ function _sfc_render$2Z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
24968
24966
|
"sub-form-row-id": $props.subFormRowId
|
|
24969
24967
|
}, {
|
|
24970
24968
|
default: withCtx(() => [
|
|
24969
|
+
createTextVNode(toDisplayString($data.fieldModel) + " ", 1),
|
|
24971
24970
|
createVNode(_component_el_select, {
|
|
24972
24971
|
ref: "fieldEditor",
|
|
24973
24972
|
modelValue: $data.fieldModel,
|
|
@@ -25005,7 +25004,7 @@ function _sfc_render$2Z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25005
25004
|
_: 1
|
|
25006
25005
|
}, 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"]);
|
|
25007
25006
|
}
|
|
25008
|
-
var selectWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$2Z, [["render", _sfc_render$2Z], ["__scopeId", "data-v-
|
|
25007
|
+
var selectWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$2Z, [["render", _sfc_render$2Z], ["__scopeId", "data-v-42d4e5c2"]]);
|
|
25009
25008
|
var __glob_0_17$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
25010
25009
|
__proto__: null,
|
|
25011
25010
|
"default": selectWidget
|
|
@@ -68033,13 +68032,13 @@ function registerIcon(app) {
|
|
|
68033
68032
|
if (typeof window !== "undefined") {
|
|
68034
68033
|
let loadSvg = function() {
|
|
68035
68034
|
var body = document.body;
|
|
68036
|
-
var svgDom = document.getElementById("
|
|
68035
|
+
var svgDom = document.getElementById("__svg__icons__dom__1773796332141__");
|
|
68037
68036
|
if (!svgDom) {
|
|
68038
68037
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
68039
68038
|
svgDom.style.position = "absolute";
|
|
68040
68039
|
svgDom.style.width = "0";
|
|
68041
68040
|
svgDom.style.height = "0";
|
|
68042
|
-
svgDom.id = "
|
|
68041
|
+
svgDom.id = "__svg__icons__dom__1773796332141__";
|
|
68043
68042
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
68044
68043
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
68045
68044
|
}
|
|
@@ -74177,8 +74176,9 @@ const _sfc_main$d = {
|
|
|
74177
74176
|
if (handler) {
|
|
74178
74177
|
try {
|
|
74179
74178
|
if (eventName === "onConfirm" && args.length > 0) {
|
|
74180
|
-
const
|
|
74181
|
-
fn
|
|
74179
|
+
const nodes = args[0];
|
|
74180
|
+
const fn = new Function("checkedNodes", "selectedNodes", "selectedValue", handler);
|
|
74181
|
+
fn.call(this, nodes, nodes, nodes);
|
|
74182
74182
|
} else if (args.length > 0) {
|
|
74183
74183
|
const paramNames = args.map((_, index2) => `arg${index2}`).join(", ");
|
|
74184
74184
|
const fn = new Function(paramNames, handler);
|
|
@@ -74316,7 +74316,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
74316
74316
|
_: 1
|
|
74317
74317
|
}, 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"]);
|
|
74318
74318
|
}
|
|
74319
|
-
var PersonTreeWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-
|
|
74319
|
+
var PersonTreeWidget = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-824e8a98"]]);
|
|
74320
74320
|
const _sfc_main$c = {
|
|
74321
74321
|
name: "radio-other-widget",
|
|
74322
74322
|
componentName: "FieldWidget",
|
|
@@ -77932,18 +77932,21 @@ const _sfc_main = {
|
|
|
77932
77932
|
}
|
|
77933
77933
|
},
|
|
77934
77934
|
methods: {
|
|
77935
|
+
hasExistingValue() {
|
|
77936
|
+
var _a2;
|
|
77937
|
+
const v = (_a2 = this.fieldModel) != null ? _a2 : this.oldFieldValue;
|
|
77938
|
+
return v !== void 0 && v !== null && v !== "";
|
|
77939
|
+
},
|
|
77935
77940
|
async getCurrentUser() {
|
|
77936
77941
|
const { data: data2 } = await service({
|
|
77937
77942
|
method: "get",
|
|
77938
77943
|
url: "unified-system/employee/loginInfo?accessType=0"
|
|
77939
77944
|
});
|
|
77940
|
-
console.log(this.currentUserType, "data");
|
|
77941
77945
|
if (this.currentUserType === "username") {
|
|
77942
77946
|
this.fieldModel = data2.username;
|
|
77943
77947
|
} else if (this.currentUserType === "deptName") {
|
|
77944
77948
|
this.fieldModel = data2.deptName;
|
|
77945
77949
|
}
|
|
77946
|
-
console.log(this.oldFieldValue, this.fieldModel, "this.oldFieldValue");
|
|
77947
77950
|
this.syncUpdateFormModel(this.fieldModel);
|
|
77948
77951
|
this.emitFieldDataChange(this.fieldModel, this.oldFieldValue);
|
|
77949
77952
|
}
|
|
@@ -77960,7 +77963,8 @@ const _sfc_main = {
|
|
|
77960
77963
|
},
|
|
77961
77964
|
"field.options.type": {
|
|
77962
77965
|
handler(newVal, oldVal) {
|
|
77963
|
-
|
|
77966
|
+
if (oldVal === void 0)
|
|
77967
|
+
return;
|
|
77964
77968
|
this.getCurrentUser();
|
|
77965
77969
|
},
|
|
77966
77970
|
immediate: false
|
|
@@ -77974,6 +77978,8 @@ const _sfc_main = {
|
|
|
77974
77978
|
this.handleOnCreated();
|
|
77975
77979
|
},
|
|
77976
77980
|
mounted() {
|
|
77981
|
+
if (this.hasExistingValue())
|
|
77982
|
+
return;
|
|
77977
77983
|
this.getCurrentUser();
|
|
77978
77984
|
}
|
|
77979
77985
|
};
|
|
@@ -78053,7 +78059,7 @@ const loadExtension = function(app) {
|
|
|
78053
78059
|
registerCPEditor(app, "person-tree-cancelText", "person-tree-cancelText-editor", createInputTextEditor("cancelText", "extension.setting.personTreeCancelText"));
|
|
78054
78060
|
registerCPEditor(app, "person-tree-hideFooter", "person-tree-hideFooter-editor", createBooleanEditor("hideFooter", "extension.setting.personTreeHideFooter"));
|
|
78055
78061
|
registerEPEditor(app, "person-tree-onOpen", "person-tree-onOpen-editor", createEventHandlerEditor("onOpen", []));
|
|
78056
|
-
registerEPEditor(app, "person-tree-onConfirm", "person-tree-onConfirm-editor", createEventHandlerEditor("onConfirm", []));
|
|
78062
|
+
registerEPEditor(app, "person-tree-onConfirm", "person-tree-onConfirm-editor", createEventHandlerEditor("onConfirm", ["checkedNodes"]));
|
|
78057
78063
|
registerEPEditor(app, "person-tree-onCancel", "person-tree-onCancel-editor", createEventHandlerEditor("onCancel", []));
|
|
78058
78064
|
registerEPEditor(app, "person-tree-onClose", "person-tree-onClose-editor", createEventHandlerEditor("onClose", []));
|
|
78059
78065
|
addCustomWidgetSchema(radioOtherSchema);
|