|
@@ -27558,7 +27558,7 @@ var _export_sfc = (sfc, props) => {
|
|
}
|
|
}
|
|
return target;
|
|
return target;
|
|
};
|
|
};
|
|
-const _withScopeId = (n) => (pushScopeId("data-v-4dd8224f"), n = n(), popScopeId(), n);
|
|
|
|
|
|
+const _withScopeId = (n) => (pushScopeId("data-v-6f7c6df8"), n = n(), popScopeId(), n);
|
|
const _hoisted_1$6 = { key: 12 };
|
|
const _hoisted_1$6 = { key: 12 };
|
|
const _hoisted_2$5 = {
|
|
const _hoisted_2$5 = {
|
|
key: 1,
|
|
key: 1,
|
|
@@ -27575,9 +27575,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
model: null,
|
|
model: null,
|
|
updatedModel: null,
|
|
updatedModel: null,
|
|
disabled: { type: Boolean },
|
|
disabled: { type: Boolean },
|
|
- request: null
|
|
|
|
|
|
+ request: null,
|
|
|
|
+ widgetFormData: null
|
|
},
|
|
},
|
|
- setup(__props) {
|
|
|
|
|
|
+ emits: ["updateWidgetForm"],
|
|
|
|
+ setup(__props, { emit: emits }) {
|
|
const props = __props;
|
|
const props = __props;
|
|
const originData = props.model[props.element.model];
|
|
const originData = props.model[props.element.model];
|
|
const data2 = computed({
|
|
const data2 = computed({
|
|
@@ -27609,6 +27611,37 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
a2.download = `${label}.${defaultValue.split(".")[1]}`;
|
|
a2.download = `${label}.${defaultValue.split(".")[1]}`;
|
|
a2.click();
|
|
a2.click();
|
|
}
|
|
}
|
|
|
|
+ const specializedHandleSelect = (val, element) => {
|
|
|
|
+ const field = element.model;
|
|
|
|
+ if (field == "customerId") {
|
|
|
|
+ let list = JSON.parse(JSON.stringify(props.widgetFormData));
|
|
|
|
+ for (var i in list) {
|
|
|
|
+ if (list[i].model == "contactsId") {
|
|
|
|
+ let item = list[i];
|
|
|
|
+ const token = sessionStorage.getItem("token");
|
|
|
|
+ fetch(`${item.options.remoteFunc}?customerId=${val}`, {
|
|
|
|
+ headers: {
|
|
|
|
+ "Content-type": " application/x-www-form-urlencoded; charset=UTF-8",
|
|
|
|
+ "Token": token
|
|
|
|
+ }
|
|
|
|
+ }).then((resp) => resp.json()).then((json) => {
|
|
|
|
+ const res = json.data;
|
|
|
|
+ if (res instanceof Array) {
|
|
|
|
+ item.options.remoteOptions = res.map((data22) => ({
|
|
|
|
+ label: data22[item.options.props.label],
|
|
|
|
+ value: data22[item.options.props.value],
|
|
|
|
+ children: data22[item.options.props.children]
|
|
|
|
+ }));
|
|
|
|
+ }
|
|
|
|
+ list[i].options = __spreadProps(__spreadValues({}, list[i].options), { disabled: false, defaultValue: "" });
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ emits("updateWidgetForm", list);
|
|
|
|
+ }, 100);
|
|
|
|
+ }
|
|
|
|
+ };
|
|
return (_ctx, _cache) => {
|
|
return (_ctx, _cache) => {
|
|
const _component_GenerateFormItem = resolveComponent("GenerateFormItem", true);
|
|
const _component_GenerateFormItem = resolveComponent("GenerateFormItem", true);
|
|
const _component_el_table_column = ElTableColumn;
|
|
const _component_el_table_column = ElTableColumn;
|
|
@@ -27895,7 +27928,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
clearable: __props.element.options.clearable,
|
|
clearable: __props.element.options.clearable,
|
|
filterable: __props.element.options.filterable,
|
|
filterable: __props.element.options.filterable,
|
|
disabled: __props.disabled || __props.element.options.disabled,
|
|
disabled: __props.disabled || __props.element.options.disabled,
|
|
- style: normalizeStyle({ width: __props.element.options.width })
|
|
|
|
|
|
+ style: normalizeStyle({ width: __props.element.options.width }),
|
|
|
|
+ onChange: _cache[10] || (_cache[10] = (value) => specializedHandleSelect(value, __props.element))
|
|
}, {
|
|
}, {
|
|
default: withCtx(() => [
|
|
default: withCtx(() => [
|
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.element.options.remote ? __props.element.options.remoteOptions : __props.element.options.options, (item) => {
|
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.element.options.remote ? __props.element.options.remoteOptions : __props.element.options.options, (item) => {
|
|
@@ -27911,7 +27945,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
__props.element.type === "switch" ? (openBlock(), createBlock(_component_el_switch, {
|
|
__props.element.type === "switch" ? (openBlock(), createBlock(_component_el_switch, {
|
|
key: 10,
|
|
key: 10,
|
|
modelValue: unref(data2),
|
|
modelValue: unref(data2),
|
|
- "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => isRef(data2) ? data2.value = $event : null),
|
|
|
|
|
|
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => isRef(data2) ? data2.value = $event : null),
|
|
"active-text": __props.element.options.activeText,
|
|
"active-text": __props.element.options.activeText,
|
|
"inactive-text": __props.element.options.inactiveText,
|
|
"inactive-text": __props.element.options.inactiveText,
|
|
disabled: __props.disabled || __props.element.options.disabled
|
|
disabled: __props.disabled || __props.element.options.disabled
|
|
@@ -27919,7 +27953,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
__props.element.type === "slider" ? (openBlock(), createBlock(_component_el_slider, {
|
|
__props.element.type === "slider" ? (openBlock(), createBlock(_component_el_slider, {
|
|
key: 11,
|
|
key: 11,
|
|
modelValue: unref(data2),
|
|
modelValue: unref(data2),
|
|
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => isRef(data2) ? data2.value = $event : null),
|
|
|
|
|
|
+ "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => isRef(data2) ? data2.value = $event : null),
|
|
min: __props.element.options.min,
|
|
min: __props.element.options.min,
|
|
max: __props.element.options.max,
|
|
max: __props.element.options.max,
|
|
step: __props.element.options.step,
|
|
step: __props.element.options.step,
|
|
@@ -27966,7 +28000,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
key: 14,
|
|
key: 14,
|
|
style: { "margin-top": "-4px" },
|
|
style: { "margin-top": "-4px" },
|
|
type: "text",
|
|
type: "text",
|
|
- onClick: _cache[12] || (_cache[12] = ($event) => download(__props.element.options.defaultValue, __props.element.label))
|
|
|
|
|
|
+ onClick: _cache[13] || (_cache[13] = ($event) => download(__props.element.options.defaultValue, __props.element.label))
|
|
}, {
|
|
}, {
|
|
default: withCtx(() => [
|
|
default: withCtx(() => [
|
|
_hoisted_6$4
|
|
_hoisted_6$4
|
|
@@ -27976,7 +28010,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
__props.element.type === "cascader" ? (openBlock(), createBlock(_component_el_cascader, {
|
|
__props.element.type === "cascader" ? (openBlock(), createBlock(_component_el_cascader, {
|
|
key: 15,
|
|
key: 15,
|
|
modelValue: unref(data2),
|
|
modelValue: unref(data2),
|
|
- "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => isRef(data2) ? data2.value = $event : null),
|
|
|
|
|
|
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => isRef(data2) ? data2.value = $event : null),
|
|
options: __props.element.options.remoteOptions,
|
|
options: __props.element.options.remoteOptions,
|
|
placeholder: __props.element.options.placeholder,
|
|
placeholder: __props.element.options.placeholder,
|
|
filterable: __props.element.options.filterable,
|
|
filterable: __props.element.options.filterable,
|
|
@@ -28001,7 +28035,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
};
|
|
};
|
|
}
|
|
}
|
|
});
|
|
});
|
|
-var GenerateFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-4dd8224f"]]);
|
|
|
|
|
|
+var GenerateFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-6f7c6df8"]]);
|
|
const _sfc_main$7 = defineComponent({
|
|
const _sfc_main$7 = defineComponent({
|
|
name: "FormGenerate",
|
|
name: "FormGenerate",
|
|
components: {
|
|
components: {
|
|
@@ -28085,6 +28119,10 @@ const _sfc_main$7 = defineComponent({
|
|
}
|
|
}
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
+ const updateWidgetForm = (list) => {
|
|
|
|
+ state.widgetForm.list = list;
|
|
|
|
+ state.model = __spreadProps(__spreadValues({}, state.model), { contactsId: "" });
|
|
|
|
+ };
|
|
watch(() => props.data, (val) => {
|
|
watch(() => props.data, (val) => {
|
|
var _a3;
|
|
var _a3;
|
|
state.widgetForm = (_a3 = val && JSON.parse(JSON.stringify(val))) != null ? _a3 : getWidgetForm();
|
|
state.widgetForm = (_a3 = val && JSON.parse(JSON.stringify(val))) != null ? _a3 : getWidgetForm();
|
|
@@ -28110,7 +28148,8 @@ const _sfc_main$7 = defineComponent({
|
|
};
|
|
};
|
|
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
getData,
|
|
getData,
|
|
- reset
|
|
|
|
|
|
+ reset,
|
|
|
|
+ updateWidgetForm
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -28136,8 +28175,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
element: _ctx.widgetForm.list[index],
|
|
element: _ctx.widgetForm.list[index],
|
|
config: _ctx.data.config,
|
|
config: _ctx.data.config,
|
|
disabled: _ctx.disabled,
|
|
disabled: _ctx.disabled,
|
|
- request: _ctx.request
|
|
|
|
- }, null, 8, ["model", "updated-model", "element", "config", "disabled", "request"]);
|
|
|
|
|
|
+ request: _ctx.request,
|
|
|
|
+ widgetFormData: _ctx.widgetForm.list,
|
|
|
|
+ onUpdateWidgetForm: _ctx.updateWidgetForm
|
|
|
|
+ }, null, 8, ["model", "updated-model", "element", "config", "disabled", "request", "widgetFormData", "onUpdateWidgetForm"]);
|
|
}), 128))
|
|
}), 128))
|
|
]),
|
|
]),
|
|
_: 1
|
|
_: 1
|