act-plus 1.1.42 → 1.1.44

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.
@@ -1,5 +1,5 @@
1
1
  import { reactive as m, watch as b, resolveComponent as s, openBlock as v, createBlock as g, withCtx as o, createElementVNode as i, createVNode as x, createTextVNode as y, toDisplayString as h, unref as C } from "vue";
2
- import { _ as k, u as w } from "./index-bbca6b2b.js";
2
+ import { _ as k, u as w } from "./index-4e6030dd.js";
3
3
  import "vue-router";
4
4
  import "js-base64";
5
5
  import "element-plus";
@@ -1,5 +1,5 @@
1
1
  import { ref as d, watch as h, resolveComponent as m, openBlock as r, createElementBlock as _, createVNode as v, unref as u, isRef as w, withCtx as f, createElementVNode as g, createBlock as C, createCommentVNode as N, createTextVNode as $, Fragment as B, renderList as E, normalizeClass as L } from "vue";
2
- import { _ as P } from "./index-bbca6b2b.js";
2
+ import { _ as P } from "./index-4e6030dd.js";
3
3
  import "vue-router";
4
4
  import "js-base64";
5
5
  import "element-plus";
@@ -1,5 +1,5 @@
1
1
  import { ref as j, inject as l, watch as q, resolveComponent as y, resolveDirective as O, openBlock as a, createElementBlock as u, Fragment as f, renderList as E, unref as d, createBlock as i, resolveDynamicComponent as H, withCtx as _, withDirectives as C, createCommentVNode as b, createTextVNode as k, toDisplayString as B } from "vue";
2
- import { _ as M, u as z } from "./index-bbca6b2b.js";
2
+ import { _ as M, u as z } from "./index-4e6030dd.js";
3
3
  import "vue-router";
4
4
  import "js-base64";
5
5
  import "element-plus";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "act-plus",
3
- "version": "1.1.42",
3
+ "version": "1.1.44",
4
4
  "private": false,
5
5
  "description": "act config",
6
6
  "main": "act-plus.js",
package/style.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.form-card .el-card__header{font-size:16px;font-weight:700}.rotate180{transform:rotate(180deg)}.cp{cursor:pointer}.cp:hover{opacity:.8}.ml12{margin-left:12px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mt24{margin-top:24px}.ml6{margin-left:6px!important}.ml4{margin-left:4px!important}.mr6{margin-right:6px}.mr2{margin-right:2px}.mr4{margin-right:4px}.el-table{font-size:14px}.el-select,.el-cascader,.el-form--inline .el-form-item{display:block;width:100%}.el-card{height:100%;--el-card-padding: 12px}.el-card__body{height:100%;box-sizing:border-box}.el-date-editor{--el-date-editor-width: 100%}.a-loading[data-v-048c6c03]{display:flex;align-items:center;justify-content:center;width:100%;height:50px;font-size:32px}.a-loading .dot[data-v-048c6c03]{animation:antRotate-048c6c03 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;width:28px;height:28px;box-sizing:border-box}.a-loading .dot i[data-v-048c6c03]{width:12px;height:12px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove-048c6c03 1s infinite linear alternate}.a-loading .dot i[data-v-048c6c03]:nth-child(1){top:0;left:0}.a-loading .dot i[data-v-048c6c03]:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.a-loading .dot i[data-v-048c6c03]:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.a-loading .dot i[data-v-048c6c03]:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate-048c6c03{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate-048c6c03{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove-048c6c03{to{opacity:1}}@-webkit-keyframes antSpinMove-048c6c03{to{opacity:1}}[data-v-fa6cf45b] .el-empty__image{width:100%}.table-link[data-v-fa6cf45b]{cursor:pointer;color:#409eff;text-decoration:underline}.file-image[data-v-fa6cf45b]{display:block;width:32px;height:32px;margin:0 auto;border-radius:4px;line-height:32px!important}.no-image[data-v-fa6cf45b]{width:100%;height:100%;font-size:12px;background-color:#f5f7fa}.act-module[data-v-fa6cf45b]{padding:0;margin:0;border:none}.add-icon-btn[data-v-ada54450]{cursor:pointer;width:24px;height:24px;margin-left:6px}.table-post-params[data-v-ada54450]{position:relative;margin-bottom:12px}.table-post-params .submit-operate[data-v-ada54450]{position:absolute;top:-20px;right:-10px;display:flex;align-items:center}.table-post-params .submit-operate .match-opreate[data-v-ada54450]{cursor:pointer;width:12px;height:12px}.card-header[data-v-3e5e9347]{display:flex;align-items:center}.card-header -operate[data-v-3e5e9347]{margin-left:auto}.form-list[data-v-3e5e9347]{margin-bottom:24px;border-bottom:1px solid var(--el-color-primary)}.form-list[data-v-3e5e9347]:last-child{border:none}.config-list-operate[data-v-3e5e9347]{display:flex;align-items:center;justify-content:flex-end}.card-header[data-v-3440b427]{display:flex;align-items:center}.card-header-operate[data-v-3440b427]{margin-left:auto}.form-list[data-v-3440b427]{margin-bottom:24px;border-bottom:1px solid var(--el-color-primary)}.form-list[data-v-3440b427]:last-child{border:none}.config-list-operate[data-v-3440b427]{display:flex;align-items:center;justify-content:flex-end}.submit-operate[data-v-c63f456e]{display:flex;align-items:center;height:32px;padding-left:12px}.submit-operate .match-opreate[data-v-c63f456e]{cursor:pointer;width:20px;height:20px}.page-container[data-v-4ec549a6]{position:relative}.page-container .header-operate[data-v-4ec549a6]{position:sticky;top:0;z-index:999}.page-container .submit-box[data-v-4ec549a6]{display:flex;align-items:center;justify-content:space-between}.page-container .submit-box-r[data-v-4ec549a6]{display:flex;align-items:center}.page-container .submit-box-r .menu-select[data-v-4ec549a6]{width:360px;margin:0 24px}.act-table .table-pagination[data-v-92f0fcb4]{padding:12px 4px;justify-content:flex-end}.tox-tinymce-aux{z-index:99999!important}.tinymce.ui.FloatPanel{z-index:99}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks):before{color:#a8abb2}.upload-container[data-v-f839bee6]{width:100%}.upload-container[data-v-f839bee6] .el-upload-list--picture-card{display:flex;flex:1}.upload-container[data-v-f839bee6] .el-upload.is-drag{width:100%;height:100%}.upload-container .tip-text[data-v-f839bee6]{margin:0;padding:0;font-size:12px;color:#999}.upload-container .file-list[data-v-f839bee6]{display:flex;align-items:center;justify-content:space-between;margin:6px 0;padding:6px 12px;font-size:14px;border-radius:4px;border:1px solid #dcdfe6}.upload-container .file-list[data-v-f839bee6]:hover{cursor:pointer;opacity:.8}.upload-container .file-list:hover .el-file-name[data-v-f839bee6]{text-decoration:underline}.upload-container .file-list-l[data-v-f839bee6]{display:flex;align-items:center;flex:1;width:500px}.upload-container .file-list-image[data-v-f839bee6]{flex-shrink:0;width:40px;height:40px;border-radius:4px}.upload-container .file-list-icon[data-v-f839bee6]{flex-shrink:0;width:40px;height:40px}.upload-container .file-list .el-file-name[data-v-f839bee6]{flex:1;padding:0 12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.upload-container .file-list .el-file-operate[data-v-f839bee6]{display:flex;justify-content:flex-end;flex-shrink:0;min-width:82px;margin-left:auto}.upload-container .file-list .el-file-operate>i[data-v-f839bee6]{cursor:pointer;margin-left:12px}.upload-container .file-list .el-file-operate>i[data-v-f839bee6]:hover{opacity:.8}.search-module-container[data-v-e748430f] .el-form-item{margin-bottom:8px}.search-module-container[data-v-e748430f] .el-select__selection{flex-wrap:nowrap}.search-module-container .form-content[data-v-e748430f]{display:grid;grid-template-columns:repeat(var(--table-query-row),1fr);gap:6px;padding:6px 6px 0}.search-module-container .form-content .search-form-btn[data-v-e748430f]{justify-self:end;align-self:start;grid-column-start:var(--table-query-row);grid-column-end:var(--table-query-row)}.search-module-container .expand[data-v-e748430f]{display:flex;margin:0 auto;color:#a4a2a2}.header-operate-container[data-v-7d9574aa]{display:flex;align-items:center;justify-content:flex-end}.header-operate-container .el-btn[data-v-7d9574aa]{margin:6px}.no-config[data-v-37b49f83]{line-height:32px;font-weight:700}.no-config-field[data-v-37b49f83]{color:red}.card-header[data-v-be1c5be6]{display:flex;align-items:center}.card-header-operate[data-v-be1c5be6]{margin-left:auto}.add-icon-btn[data-v-75eab9b4]{cursor:pointer;width:24px;height:24px;margin-left:6px}.condition-box[data-v-75eab9b4]{display:flex;justify-content:center}.condition-box[data-v-75eab9b4] .el-form-item__content{flex:0;min-width:300px}.submit-operate[data-v-75eab9b4]{display:flex;align-items:center;height:32px;padding-left:12px}.submit-operate .match-opreate[data-v-75eab9b4]{cursor:pointer;width:20px;height:20px}.add-icon-btn[data-v-2aab2179]{cursor:pointer;width:24px;height:24px;margin-left:6px}.submit-operate[data-v-2aab2179]{display:flex;align-items:center;height:32px;padding-left:12px}.submit-operate .match-opreate[data-v-2aab2179]{cursor:pointer;width:20px;height:20px}.select-icon-popover .icon-list{display:grid;grid-template-columns:repeat(8,1fr)}.select-icon-popover .icon-list .icon-item{display:flex;align-items:center;justify-content:center;margin:4px 0;border:1px solid transparent}.select-icon-popover .icon-list .icon-item .icon-svg{cursor:pointer}.select-icon-popover .icon-list .icon-item-checked{border:1px solid #000}.select-icon-container .icon-value[data-v-308d02d4]{display:flex;align-items:center}.select-icon-container .icon-value .icon-btn[data-v-308d02d4]{margin-left:12px}
1
+ @charset "UTF-8";.form-card .el-card__header{font-size:16px;font-weight:700}.rotate180{transform:rotate(180deg)}.cp{cursor:pointer}.cp:hover{opacity:.8}.ml12{margin-left:12px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mt24{margin-top:24px}.ml6{margin-left:6px!important}.ml4{margin-left:4px!important}.mr6{margin-right:6px}.mr2{margin-right:2px}.mr4{margin-right:4px}.el-table{font-size:14px}.el-select,.el-cascader,.el-form--inline .el-form-item{display:block;width:100%}.el-card{height:100%;--el-card-padding: 12px}.el-card__body{height:100%;box-sizing:border-box}.el-date-editor{--el-date-editor-width: 100%}.month-range .el-date-range-picker{width:320px}.month-range .el-date-range-picker .el-picker-panel__body{min-width:320px}.month-range .is-left{width:100%}.month-range .el-date-range-picker__header,.month-range .is-right{display:none}.a-loading[data-v-048c6c03]{display:flex;align-items:center;justify-content:center;width:100%;height:50px;font-size:32px}.a-loading .dot[data-v-048c6c03]{animation:antRotate-048c6c03 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;width:28px;height:28px;box-sizing:border-box}.a-loading .dot i[data-v-048c6c03]{width:12px;height:12px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove-048c6c03 1s infinite linear alternate}.a-loading .dot i[data-v-048c6c03]:nth-child(1){top:0;left:0}.a-loading .dot i[data-v-048c6c03]:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.a-loading .dot i[data-v-048c6c03]:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.a-loading .dot i[data-v-048c6c03]:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate-048c6c03{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate-048c6c03{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove-048c6c03{to{opacity:1}}@-webkit-keyframes antSpinMove-048c6c03{to{opacity:1}}[data-v-3470fb6b] .el-empty__image{width:100%}.table-link[data-v-3470fb6b]{cursor:pointer;color:#409eff;text-decoration:underline}.file-image[data-v-3470fb6b]{display:block;width:32px;height:32px;margin:0 auto;border-radius:4px;line-height:32px!important}.no-image[data-v-3470fb6b]{width:100%;height:100%;font-size:12px;background-color:#f5f7fa}.act-module[data-v-3470fb6b]{padding:0;margin:0;border:none}.add-icon-btn[data-v-ada54450]{cursor:pointer;width:24px;height:24px;margin-left:6px}.table-post-params[data-v-ada54450]{position:relative;margin-bottom:12px}.table-post-params .submit-operate[data-v-ada54450]{position:absolute;top:-20px;right:-10px;display:flex;align-items:center}.table-post-params .submit-operate .match-opreate[data-v-ada54450]{cursor:pointer;width:12px;height:12px}.card-header[data-v-3e5e9347]{display:flex;align-items:center}.card-header -operate[data-v-3e5e9347]{margin-left:auto}.form-list[data-v-3e5e9347]{margin-bottom:24px;border-bottom:1px solid var(--el-color-primary)}.form-list[data-v-3e5e9347]:last-child{border:none}.config-list-operate[data-v-3e5e9347]{display:flex;align-items:center;justify-content:flex-end}.card-header[data-v-64426d42]{display:flex;align-items:center}.card-header-operate[data-v-64426d42]{margin-left:auto}.form-list[data-v-64426d42]{margin-bottom:24px;border-bottom:1px solid var(--el-color-primary)}.form-list[data-v-64426d42]:last-child{border:none}.config-list-operate[data-v-64426d42]{display:flex;align-items:center;justify-content:flex-end}[data-v-64426d42] .el-badge__content.is-fixed{transform:translateY(-50%) translate(100%) scale(.7)}.submit-operate[data-v-c63f456e]{display:flex;align-items:center;height:32px;padding-left:12px}.submit-operate .match-opreate[data-v-c63f456e]{cursor:pointer;width:20px;height:20px}.page-container[data-v-4ec549a6]{position:relative}.page-container .header-operate[data-v-4ec549a6]{position:sticky;top:0;z-index:999}.page-container .submit-box[data-v-4ec549a6]{display:flex;align-items:center;justify-content:space-between}.page-container .submit-box-r[data-v-4ec549a6]{display:flex;align-items:center}.page-container .submit-box-r .menu-select[data-v-4ec549a6]{width:360px;margin:0 24px}.act-table .table-pagination[data-v-92f0fcb4]{padding:12px 4px;justify-content:flex-end}.tox-tinymce-aux{z-index:99999!important}.tinymce.ui.FloatPanel{z-index:99}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks):before{color:#a8abb2}.upload-container[data-v-f839bee6]{width:100%}.upload-container[data-v-f839bee6] .el-upload-list--picture-card{display:flex;flex:1}.upload-container[data-v-f839bee6] .el-upload.is-drag{width:100%;height:100%}.upload-container .tip-text[data-v-f839bee6]{margin:0;padding:0;font-size:12px;color:#999}.upload-container .file-list[data-v-f839bee6]{display:flex;align-items:center;justify-content:space-between;margin:6px 0;padding:6px 12px;font-size:14px;border-radius:4px;border:1px solid #dcdfe6}.upload-container .file-list[data-v-f839bee6]:hover{cursor:pointer;opacity:.8}.upload-container .file-list:hover .el-file-name[data-v-f839bee6]{text-decoration:underline}.upload-container .file-list-l[data-v-f839bee6]{display:flex;align-items:center;flex:1;width:500px}.upload-container .file-list-image[data-v-f839bee6]{flex-shrink:0;width:40px;height:40px;border-radius:4px}.upload-container .file-list-icon[data-v-f839bee6]{flex-shrink:0;width:40px;height:40px}.upload-container .file-list .el-file-name[data-v-f839bee6]{flex:1;padding:0 12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.upload-container .file-list .el-file-operate[data-v-f839bee6]{display:flex;justify-content:flex-end;flex-shrink:0;min-width:82px;margin-left:auto}.upload-container .file-list .el-file-operate>i[data-v-f839bee6]{cursor:pointer;margin-left:12px}.upload-container .file-list .el-file-operate>i[data-v-f839bee6]:hover{opacity:.8}.search-module-container[data-v-48cac85a] .el-form-item{margin-bottom:8px}.search-module-container[data-v-48cac85a] .el-select__selection{flex-wrap:nowrap}.search-module-container .form-content[data-v-48cac85a]{display:grid;grid-template-columns:repeat(var(--table-query-row),1fr);gap:6px;padding:6px 6px 0}.search-module-container .form-content .search-form-btn[data-v-48cac85a]{justify-self:end;align-self:start;grid-column-start:var(--table-query-row);grid-column-end:var(--table-query-row)}.search-module-container .expand[data-v-48cac85a]{display:flex;margin:0 auto;color:#a4a2a2}.header-operate-container[data-v-7d9574aa]{display:flex;align-items:center;justify-content:flex-end}.header-operate-container .el-btn[data-v-7d9574aa]{margin:6px}.no-config[data-v-89469827]{line-height:32px;font-weight:700}.no-config-field[data-v-89469827]{color:red}.card-header[data-v-be1c5be6]{display:flex;align-items:center}.card-header-operate[data-v-be1c5be6]{margin-left:auto}.add-icon-btn[data-v-75eab9b4]{cursor:pointer;width:24px;height:24px;margin-left:6px}.condition-box[data-v-75eab9b4]{display:flex;justify-content:center}.condition-box[data-v-75eab9b4] .el-form-item__content{flex:0;min-width:300px}.submit-operate[data-v-75eab9b4]{display:flex;align-items:center;height:32px;padding-left:12px}.submit-operate .match-opreate[data-v-75eab9b4]{cursor:pointer;width:20px;height:20px}.add-icon-btn[data-v-9133e0b0]{cursor:pointer;width:24px;height:24px;margin-left:6px}.submit-operate[data-v-9133e0b0]{display:flex;align-items:center;height:32px;padding-left:12px}.submit-operate .match-opreate[data-v-9133e0b0]{cursor:pointer;width:20px;height:20px}.select-icon-popover .icon-list{display:grid;grid-template-columns:repeat(8,1fr)}.select-icon-popover .icon-list .icon-item{display:flex;align-items:center;justify-content:center;margin:4px 0;border:1px solid transparent}.select-icon-popover .icon-list .icon-item .icon-svg{cursor:pointer}.select-icon-popover .icon-list .icon-item-checked{border:1px solid #000}.select-icon-container .icon-value[data-v-308d02d4]{display:flex;align-items:center}.select-icon-container .icon-value .icon-btn[data-v-308d02d4]{margin-left:12px}
@@ -1,404 +0,0 @@
1
- import { defineAsyncComponent as $, inject as T, ref as K, watch as Te, resolveComponent as _, resolveDirective as ee, openBlock as n, createBlock as p, withCtx as C, createElementVNode as le, createVNode as ae, createTextVNode as W, toDisplayString as A, unref as i, withDirectives as oe, createElementBlock as k, Fragment as O, renderList as G, mergeProps as v, createCommentVNode as te, resolveDynamicComponent as De, toRaw as Ke } from "vue";
2
- import { _ as we, u as Ne, P as Ue, a as ke, b as Pe } from "./index-bbca6b2b.js";
3
- import { ElNotification as Se } from "element-plus";
4
- import "vue-router";
5
- import "js-base64";
6
- import "monaco-editor";
7
- const Re = { class: "no-config-field" }, Le = { class: "dialog-footer" }, $e = {
8
- __name: "index",
9
- props: {
10
- visible: { type: Boolean, default: !1 },
11
- title: { type: String, default: "" },
12
- data: { type: Object, default: () => ({}) }
13
- },
14
- emits: ["update:visible", "refresh"],
15
- setup(w, { emit: se }) {
16
- const re = $(() => import("./index-bbca6b2b.js").then((l) => l.t)), de = $(() => import("./index-2ae88f18.js")), ie = $(() => import("./index-bbca6b2b.js").then((l) => l.s)), ne = $(() => import("./index-bbca6b2b.js").then((l) => l.r)), { t: m } = Ne(), q = T("request"), ue = T("loadComponents"), P = T("formatDataType"), J = T("globalProps"), ce = T("stringToBoolean"), b = T("getFieldUiProps"), fe = T("disposeRequestData"), Q = se, f = w, S = K(!1), R = K(!1), x = K(null), L = K([]), o = K({}), M = K({}), pe = (l) => l.formColumnCol == null || l.customFiledsComponentes[l.customFiledsComponentes.customComponentName] ? 24 : l.formColumnCol ? l.formColumnCol : 24 / l.formRow, me = (l) => ["input", "textarea"].includes(l.fieldType) ? "blur" : (["select", "multipleSelect", "datetimerange", "treeSelect", "provinceCascade"].includes(l.fieldType), "change"), ye = async ({ node: l, resolve: c }, a) => {
17
- const d = b(a), { label: t, value: h, children: F, isLeaf: s } = { ...Pe, ...d.treeProps || {} };
18
- if (l[s])
19
- return c([]);
20
- const u = a.postRequestParams.filter((y) => y.submitType === "default").reduce((y, D) => (y[D.submitName] = P(D.paramsType, D.submitValue), y), {}), g = a.postRequestParams.filter((y) => y.submitType === "dynamic").map((y) => ({
21
- field: y.submitName,
22
- operate: y.submitMatchType,
23
- value: d.loadCode ? l == null ? void 0 : l.data.value : P(y.paramsType, y.submitValue)
24
- }));
25
- let V = {};
26
- Object.keys(u).length && (V = { ...V, ...u }), g.length && (V.dynamicFilters = g), d.loadCode && Reflect.has(V, d.loadCode) && (V[d.loadCode] = l == null ? void 0 : l.data.value);
27
- const { data: N } = await q({
28
- url: a.fieldRequestUrl,
29
- method: a.fieldRequestType || "GET",
30
- data: V
31
- }), B = (N || []).map((y) => ({ label: y[t], value: y[h], children: [], isLeaf: y[s] }));
32
- c(B);
33
- }, E = (l) => {
34
- if (!["input", "textarea"].includes(l)) {
35
- if (["multipleSelect", "dateRange"].includes(l))
36
- return [];
37
- if (["switch"].includes(l))
38
- return !1;
39
- }
40
- }, j = (l, c) => {
41
- if (["string"].includes(c))
42
- return l.sort((a, d) => a.sort - d.sort).join(";");
43
- if (["number"].includes(c))
44
- return Number(l);
45
- if (["array"].includes(c))
46
- return l.sort((a, d) => a.sort - d.sort);
47
- }, Y = (l, c = !1) => {
48
- if (["multipleSelect"].includes(l.fieldType))
49
- return f.data.rowData[l.fieldKey] ? f.data.rowData[l.fieldKey].split(";").map((d) => c ? { value: d } : d) : [];
50
- if (["virtualizedMultipleSelect"].includes(l.fieldType))
51
- return f.data.rowData[l.fieldKey] ? f.data.rowData[l.fieldKey].split(";") : [];
52
- if (["dateRange"].includes(l.fieldType)) {
53
- const d = l.fieldKey.split("&");
54
- return f.data.rowData[l.fieldKey] = d.map((t) => f.data.rowData[t]), f.data.rowData[l.fieldKey];
55
- }
56
- let a = f.data.rowData[l.fieldKey];
57
- if (["select"].includes(l.fieldType)) {
58
- const d = b(l);
59
- l.dataList && typeof l.dataList[0][d["value-key"] ? d["value-key"] : "value"] == "string" && a !== null && (a = c ? { value: a.toString() } : a.toString());
60
- }
61
- if (["virtualizedSelect"].includes(l.fieldType)) {
62
- const d = b(l);
63
- l.dataList && typeof l.dataList[0][d["value-key"] ? d["value-key"] : "value"] == "string" && a !== null && (a = a.toString());
64
- }
65
- return (a === "true" || a === "false") && (a = ce(a)), a;
66
- }, be = (l) => q({ url: f.data.dataItem.requestUrl, method: "post", data: l });
67
- Te(
68
- () => f.visible,
69
- async (l, c) => {
70
- var a;
71
- if (l)
72
- try {
73
- S.value = !0;
74
- const d = await fe(f.data.formList, f.data.rowData, !1, !0);
75
- L.value = await Promise.all(
76
- (((a = f.data) == null ? void 0 : a.formList) ?? []).sort((t, h) => t.sort - h.sort).map(async (t) => {
77
- const h = d.find((g) => t.fieldName == g.fieldName && t.fieldKey == g.fieldKey);
78
- h && (t.dataList = (h == null ? void 0 : h.dataList) ?? []), ["select", "multipleSelect"].includes(t.fieldType) && (o.value[`${t.fieldKey}ActImplicit`] = Object.keys(f.data.rowData).length && t.isFormSetValue ? Y(t, !0) : E(t.fieldType)), o.value[t.fieldKey] = Object.keys(f.data.rowData).length && t.isFormSetValue ? Y(t) : E(t.fieldType);
79
- const { isFiledCustom: F, customComponentName: s, customComponentUrl: u } = t.customFiledsComponentes;
80
- if (F && !t.customFiledsComponentes[s]) {
81
- const g = await ue(u, s);
82
- t.customFiledsComponentes[s] = g;
83
- }
84
- return t;
85
- })
86
- ), S.value = !1;
87
- } catch (d) {
88
- console.error(d), S.value = !1;
89
- }
90
- }
91
- );
92
- const he = (l) => {
93
- z(), l();
94
- }, z = () => {
95
- L.value = [], x.value.resetFields(), Q("update:visible", !1);
96
- }, _e = (l, c) => {
97
- const a = b(c), { fieldKey: d, fieldType: t } = c;
98
- if (t === "multipleSelect") {
99
- const h = l.filter((s) => typeof s == "string"), F = l.filter((s) => typeof s != "string").map((s) => s.value);
100
- o.value[a.createFieldKey] = h.length ? j(h, "string") : void 0, o.value[d] = F.length ? j(F, "string") : void 0;
101
- } else
102
- typeof l == "string" ? (o.value[a.createFieldKey] = l, o.value[d] = void 0) : (o.value[d] = l.value, delete o.value[a.createFieldKey]);
103
- }, ge = (l) => {
104
- l && l.validate((c) => {
105
- if (c) {
106
- const { dataItem: a, rowData: d } = f.data;
107
- let t = { ...Ke(o.value) };
108
- Object.keys(t).forEach((s) => {
109
- if (s.includes("ActImplicit")) {
110
- delete t[s];
111
- return;
112
- }
113
- const u = L.value.find((g) => g.fieldKey === s);
114
- s.includes("&") ? s.split("&").forEach((V, N) => {
115
- t[V] = t[s][N];
116
- }) : Array.isArray(t[s]) && u.fieldSubmitType == "string" && (t[s] = j(t[s], "string"));
117
- });
118
- const h = a.submitFields.filter((s) => s.matchType == "default").reduce((s, u) => (u.submitFieldType === "string" && (s[u.submitFieldName] = u.matchFieldName.toString()), s), {}), F = a.submitFields.filter((s) => s.matchType == "match").reduce((s, u) => (Reflect.has(u, "submitFieldMatchOrigin") && u.submitFieldMatchOrigin != "rowData" ? Reflect.has(J.matchData, u.submitFieldMatchOrigin) && (s[u.submitFieldName] = P(u.submitFieldType, J.matchData[u.submitFieldMatchOrigin][u.matchFieldName])) : s[u.submitFieldName] = P(u.submitFieldType, d[u.matchFieldName]), s), {});
119
- be({
120
- ...t,
121
- ...h,
122
- ...F
123
- }).then((s) => {
124
- try {
125
- Se({ title: m("act.tip"), message: m("act.saveSuccessfully"), type: "success", duration: 2500 }), z(), Q("refresh");
126
- } catch (u) {
127
- console.error(u);
128
- }
129
- R.value = !1;
130
- }).catch((s) => {
131
- console.error(s), R.value = !1;
132
- });
133
- }
134
- });
135
- }, ve = (l) => {
136
- const c = Object.keys(M.value).map((a) => {
137
- var d;
138
- return (d = M.value[a]) == null ? void 0 : d.updateFormData(o.value);
139
- }).filter((a) => a);
140
- Promise.all([l.validate(), ...c]).then((a) => {
141
- a.every((d) => d) && ge(l);
142
- }).catch((a) => (console.error(a), a));
143
- };
144
- return (l, c) => {
145
- var X;
146
- const a = _("el-input"), d = _("el-option"), t = _("el-select"), h = _("el-select-v2"), F = _("el-tree-select"), s = _("el-date-picker"), u = _("el-cascader"), g = _("el-switch"), V = _("el-form-item"), N = _("el-col"), B = _("el-row"), y = _("el-form"), D = _("el-button"), Ve = _("el-dialog"), Ce = ee("loading"), Fe = ee("debounce");
147
- return n(), p(Ve, {
148
- "model-value": f.visible,
149
- title: f.title,
150
- top: "5vh",
151
- width: (X = w.data.formConfig) == null ? void 0 : X.dialogWidth,
152
- draggable: "",
153
- overflow: "",
154
- "append-to-body": "",
155
- "destroy-on-close": "",
156
- "close-on-click-modal": !1,
157
- "before-close": he
158
- }, {
159
- footer: C(() => [
160
- le("span", Le, [
161
- ae(D, {
162
- loading: R.value,
163
- onClick: z
164
- }, {
165
- default: C(() => [
166
- W(A(i(m)("act.cancel")), 1)
167
- ]),
168
- _: 1
169
- }, 8, ["loading"]),
170
- oe((n(), p(D, {
171
- type: "primary",
172
- loading: R.value,
173
- onClick: c[1] || (c[1] = (H) => ve(x.value))
174
- }, {
175
- default: C(() => [
176
- W(A(i(m)("act.save")), 1)
177
- ]),
178
- _: 1
179
- }, 8, ["loading"])), [
180
- [Fe]
181
- ])
182
- ])
183
- ]),
184
- default: C(() => {
185
- var H, Z;
186
- return [
187
- oe((n(), p(y, {
188
- class: "a-form",
189
- ref_key: "formRef",
190
- ref: x,
191
- model: o.value,
192
- "label-suffix": ":",
193
- "label-width": (H = w.data.formConfig) == null ? void 0 : H.formLabelWidth,
194
- "label-position": (Z = w.data.formConfig) == null ? void 0 : Z.formLabelPosition
195
- }, {
196
- default: C(() => [
197
- ae(B, { gutter: 40 }, {
198
- default: C(() => [
199
- (n(!0), k(O, null, G(L.value, (e, I) => (n(), p(N, {
200
- span: pe(e),
201
- key: I
202
- }, {
203
- default: C(() => [
204
- e.customFiledsComponentes.isFiledCustom ? (n(), k(O, { key: 1 }, [
205
- e.customFiledsComponentes[e.customFiledsComponentes.customComponentName] ? (n(), p(De(e.customFiledsComponentes[e.customFiledsComponentes.customComponentName]), {
206
- key: 0,
207
- ref_for: !0,
208
- ref: (r) => M.value[e.customFiledsComponentes.customComponentName] = r,
209
- formConfig: w.data.formConfig,
210
- item: e,
211
- rowData: f.data.rowData,
212
- visible: f.visible,
213
- form: o.value,
214
- "onUpdate:form": c[0] || (c[0] = (r) => o.value = r)
215
- }, null, 40, ["formConfig", "item", "rowData", "visible", "form"])) : (n(), k("div", {
216
- class: "no-config",
217
- key: I
218
- }, [
219
- le("span", Re, "【" + A(e.fieldName) + "】", 1),
220
- W(A(i(m)("act.fieldCustom")), 1)
221
- ]))
222
- ], 64)) : (n(), p(V, {
223
- key: 0,
224
- label: e.fieldName,
225
- prop: ["select", "multipleSelect"].includes(e.fieldType) ? `${e.fieldKey}ActImplicit` : e.fieldKey,
226
- rules: [{ required: e.isFormFieldRequired, message: i(m)("act.requiredMessage"), trigger: me(e) }]
227
- }, {
228
- default: C(() => [
229
- e.fieldType === "input" ? (n(), p(a, v({
230
- key: 0,
231
- modelValue: o.value[e.fieldKey],
232
- "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
233
- placeholder: `${i(m)("act.inputPlaceholder")}${e.fieldName}`,
234
- clearable: "",
235
- ref_for: !0
236
- }, i(b)(e), {
237
- disabled: e.isFormDisabled
238
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : te("", !0),
239
- e.fieldType === "inputNumber" ? (n(), p(i(re), v({
240
- key: 1,
241
- modelValue: o.value[e.fieldKey],
242
- "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
243
- placeholder: `${i(m)("act.inputPlaceholder")}${e.fieldName}`,
244
- clearable: "",
245
- ref_for: !0
246
- }, i(b)(e), {
247
- disabled: e.isFormDisabled
248
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "textarea" ? (n(), p(a, v({
249
- key: 2,
250
- modelValue: o.value[e.fieldKey],
251
- "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
252
- placeholder: `${i(m)("act.inputPlaceholder")}${e.fieldName}`,
253
- rows: 4,
254
- ref_for: !0
255
- }, i(b)(e), {
256
- type: "textarea",
257
- disabled: e.isFormDisabled
258
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "selectIcon" ? (n(), p(i(de), v({
259
- key: 3,
260
- modelValue: o.value[e.fieldKey],
261
- "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
262
- icons: e.dataList,
263
- placeholder: `${i(m)("act.selectPlaceholder")}${e.fieldName}`,
264
- ref_for: !0
265
- }, i(b)(e), {
266
- disabled: e.isFormDisabled
267
- }), {
268
- default: C(() => [
269
- (n(!0), k(O, null, G(e.dataList, (r, U) => (n(), p(d, {
270
- key: U,
271
- label: r.key,
272
- value: r.value
273
- }, null, 8, ["label", "value"]))), 128))
274
- ]),
275
- _: 2
276
- }, 1040, ["modelValue", "onUpdate:modelValue", "icons", "placeholder", "disabled"])) : ["select", "multipleSelect"].includes(e.fieldType) ? (n(), p(t, v({
277
- key: 4,
278
- modelValue: o.value[`${e.fieldKey}ActImplicit`],
279
- "onUpdate:modelValue": (r) => o.value[`${e.fieldKey}ActImplicit`] = r,
280
- placeholder: `${i(m)("act.selectPlaceholder")}${e.fieldName}`,
281
- clearable: "",
282
- filterable: "",
283
- "value-key": "value",
284
- ref_for: !0
285
- }, i(b)(e), {
286
- multiple: e.fieldType === "multipleSelect",
287
- disabled: e.isFormDisabled,
288
- onChange: (r) => _e(r, e)
289
- }), {
290
- default: C(() => [
291
- (n(!0), k(O, null, G(e.dataList, (r, U) => (n(), p(d, {
292
- key: U,
293
- label: r.key,
294
- value: r
295
- }, null, 8, ["label", "value"]))), 128))
296
- ]),
297
- _: 2
298
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "disabled", "onChange"])) : ["virtualizedSelect", "virtualizedMultipleSelect"].includes(e.fieldType) ? (n(), p(h, v({
299
- key: 5,
300
- modelValue: o.value[e.fieldKey],
301
- "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
302
- options: e.dataList,
303
- props: { ...i(Ue) },
304
- placeholder: `${i(m)("act.selectPlaceholder")}${e.fieldName}`,
305
- clearable: "",
306
- filterable: "",
307
- ref_for: !0
308
- }, i(b)(e), {
309
- disabled: e.isFormDisabled,
310
- multiple: e.fieldType === "virtualizedMultipleSelect"
311
- }), null, 16, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled", "multiple"])) : e.fieldType === "treeSelect" ? (n(), p(F, v({
312
- key: 6,
313
- modelValue: o.value[e.fieldKey],
314
- "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
315
- placeholder: `请选择${e.fieldName}`,
316
- props: { isLeaf: "isLeaf" },
317
- "render-after-expand": !1,
318
- "collapse-tags": "",
319
- "collapse-tags-tooltip": "",
320
- multiple: "",
321
- "show-checkbox": "",
322
- clearable: "",
323
- filterable: "",
324
- lazy: "",
325
- load: (r, U) => ye({ node: r, resolve: U }, e),
326
- ref_for: !0
327
- }, i(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "load"])) : e.fieldType === "date" ? (n(), p(s, v({
328
- key: 7,
329
- modelValue: o.value[e.fieldKey],
330
- "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
331
- type: "date",
332
- placeholder: `${i(m)("act.selectPlaceholder")}${i(m)("act.time")}`,
333
- "value-format": "YYYY-MM-DD HH:mm:ss",
334
- ref_for: !0
335
- }, i(b)(e), {
336
- disabled: e.isFormDisabled
337
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "dateRange" ? (n(), p(s, v({
338
- key: 8,
339
- modelValue: o.value[e.fieldKey],
340
- "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
341
- type: "daterange",
342
- "start-placeholder": i(m)("act.startTime"),
343
- "end-placeholder": i(m)("act.endTime"),
344
- "value-format": "YYYY-MM-DD HH:mm:ss",
345
- ref_for: !0
346
- }, i(b)(e), {
347
- disabled: e.isFormDisabled
348
- }), null, 16, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "disabled"])) : e.fieldType === "provinceCascade" ? (n(), p(u, v({
349
- key: 9,
350
- modelValue: o.value[e.fieldKey],
351
- "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
352
- options: e.dataList,
353
- props: i(ke),
354
- clearable: "",
355
- filterable: "",
356
- placeholder: `${i(m)("act.selectPlaceholder")}${e.fieldName}`,
357
- ref_for: !0
358
- }, i(b)(e), {
359
- disabled: e.isFormDisabled
360
- }), null, 16, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled"])) : e.fieldType === "switch" ? (n(), p(g, {
361
- key: 10,
362
- modelValue: o.value[e.fieldKey],
363
- "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
364
- "active-value": !0,
365
- "inactive-value": !1
366
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : e.fieldType === "upload" ? (n(), p(i(ie), v({
367
- key: 11,
368
- class: "form-upload",
369
- modelValue: o.value[e.fieldKey],
370
- "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
371
- request: i(q),
372
- ref_for: !0
373
- }, i(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "request"])) : e.fieldType === "editor" ? (n(), p(i(ne), v({
374
- key: 12,
375
- modelValue: o.value[e.fieldKey],
376
- "onUpdate:modelValue": (r) => o.value[e.fieldKey] = r,
377
- disabled: e.isFormDisabled,
378
- placeholder: `${i(m)("act.inputPlaceholder")}${e.fieldName}`,
379
- ref_for: !0
380
- }, i(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])) : te("", !0)
381
- ]),
382
- _: 2
383
- }, 1032, ["label", "prop", "rules"]))
384
- ]),
385
- _: 2
386
- }, 1032, ["span"]))), 128))
387
- ]),
388
- _: 1
389
- })
390
- ]),
391
- _: 1
392
- }, 8, ["model", "label-width", "label-position"])), [
393
- [Ce, S.value]
394
- ])
395
- ];
396
- }),
397
- _: 1
398
- }, 8, ["model-value", "title", "width"]);
399
- };
400
- }
401
- }, je = /* @__PURE__ */ we($e, [["__scopeId", "data-v-37b49f83"]]);
402
- export {
403
- je as default
404
- };