act-plus 1.1.38 → 1.1.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "act-plus",
3
- "version": "1.1.38",
3
+ "version": "1.1.40",
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: 16px}.el-card__body{height:100%;box-sizing:border-box}.el-date-editor{--el-date-editor-width: 100%}[data-v-fcf1be94] .el-empty__image{width:100%}.table-link[data-v-fcf1be94]{cursor:pointer;color:#409eff;text-decoration:underline}.file-image[data-v-fcf1be94]{display:block;width:32px;height:32px;margin:0 auto;border-radius:4px;line-height:32px!important}.no-image[data-v-fcf1be94]{width:100%;height:100%;font-size:12px;background-color:#f5f7fa}.act-module[data-v-fcf1be94]{padding:0;margin:0;border:none}.page-container[data-v-356e8a63]{position:relative}.page-container .header-operate[data-v-356e8a63]{position:sticky;top:0;z-index:999}.page-container .submit-box[data-v-356e8a63]{display:flex;align-items:center;justify-content:space-between}.page-container .submit-box-r[data-v-356e8a63]{display:flex;align-items:center}.page-container .submit-box-r .menu-select[data-v-356e8a63]{width:360px;margin:0 24px}.act-table .table-pagination[data-v-3f4bfffb]{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-e8e4dcb3] .el-form-item{margin-bottom:8px}.search-module-container[data-v-e8e4dcb3] .el-select__selection{flex-wrap:nowrap}.search-module-container .form-content[data-v-e8e4dcb3]{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-e8e4dcb3]{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-e8e4dcb3]{display:flex;margin:0 auto;color:#a4a2a2}.header-operate-container[data-v-b8dfe0ca]{display:flex;align-items:center;justify-content:flex-end}.header-operate-container .el-btn[data-v-b8dfe0ca]{margin:6px}.card-header[data-v-7ddb4597]{display:flex;align-items:center}.card-header-operate[data-v-7ddb4597]{margin-left:auto}.no-config[data-v-7ddb4597]{line-height:32px;font-weight:700}.no-config-field[data-v-7ddb4597]{margin-left:60px;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-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-862782ff]{display:flex;align-items:center}.card-header-operate[data-v-862782ff]{margin-left:auto}.form-list[data-v-862782ff]{margin-bottom:24px;border-bottom:1px solid var(--el-color-primary)}.form-list[data-v-862782ff]:last-child{border:none}.config-list-operate[data-v-862782ff]{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}.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}.add-icon-btn[data-v-bc91dc45]{cursor:pointer;width:24px;height:24px;margin-left:6px}.condition-box[data-v-bc91dc45]{display:flex;justify-content:center}.condition-box[data-v-bc91dc45] .el-form-item__content{flex:0;min-width:300px}.submit-operate[data-v-bc91dc45]{display:flex;align-items:center;height:32px;padding-left:12px}.submit-operate .match-opreate[data-v-bc91dc45]{cursor:pointer;width:20px;height:20px}.add-icon-btn[data-v-9f0c7bbf]{cursor:pointer;width:24px;height:24px;margin-left:6px}.submit-operate[data-v-9f0c7bbf]{display:flex;align-items:center;height:32px;padding-left:12px}.submit-operate .match-opreate[data-v-9f0c7bbf]{cursor:pointer;width:20px;height:20px}
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-780a35b0] .el-empty__image{width:100%}.table-link[data-v-780a35b0]{cursor:pointer;color:#409eff;text-decoration:underline}.file-image[data-v-780a35b0]{display:block;width:32px;height:32px;margin:0 auto;border-radius:4px;line-height:32px!important}.no-image[data-v-780a35b0]{width:100%;height:100%;font-size:12px;background-color:#f5f7fa}.act-module[data-v-780a35b0]{padding:0;margin:0;border:none}.page-container[data-v-90872094]{position:relative}.page-container .header-operate[data-v-90872094]{position:sticky;top:0;z-index:999}.page-container .submit-box[data-v-90872094]{display:flex;align-items:center;justify-content:space-between}.page-container .submit-box-r[data-v-90872094]{display:flex;align-items:center}.page-container .submit-box-r .menu-select[data-v-90872094]{width:360px;margin:0 24px}.act-table .table-pagination[data-v-3f4bfffb]{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-5dc94ebf] .el-form-item{margin-bottom:8px}.search-module-container[data-v-5dc94ebf] .el-select__selection{flex-wrap:nowrap}.search-module-container .form-content[data-v-5dc94ebf]{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-5dc94ebf]{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-5dc94ebf]{display:flex;margin:0 auto;color:#a4a2a2}.header-operate-container[data-v-1cf1f0ce]{display:flex;align-items:center;justify-content:flex-end}.header-operate-container .el-btn[data-v-1cf1f0ce]{margin:6px}.no-config[data-v-92775a28]{line-height:32px;font-weight:700}.no-config-field[data-v-92775a28]{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-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-862782ff]{display:flex;align-items:center}.card-header-operate[data-v-862782ff]{margin-left:auto}.form-list[data-v-862782ff]{margin-bottom:24px;border-bottom:1px solid var(--el-color-primary)}.form-list[data-v-862782ff]:last-child{border:none}.config-list-operate[data-v-862782ff]{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}.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}.add-icon-btn[data-v-bc91dc45]{cursor:pointer;width:24px;height:24px;margin-left:6px}.condition-box[data-v-bc91dc45]{display:flex;justify-content:center}.condition-box[data-v-bc91dc45] .el-form-item__content{flex:0;min-width:300px}.submit-operate[data-v-bc91dc45]{display:flex;align-items:center;height:32px;padding-left:12px}.submit-operate .match-opreate[data-v-bc91dc45]{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}
@@ -1,155 +0,0 @@
1
- import { inject as O, defineAsyncComponent as T, reactive as W, ref as g, provide as D, watch as j, resolveComponent as m, openBlock as F, createBlock as z, withCtx as d, createVNode as f, unref as l, isRef as E, createTextVNode as x, toDisplayString as P, pushScopeId as H, popScopeId as K, createElementVNode as L } from "vue";
2
- import { useRoute as $ } from "vue-router";
3
- import { _ as G } from "./index-f9ec4c04.js";
4
- import "js-base64";
5
- import "element-plus";
6
- import "monaco-editor";
7
- const J = (u) => (H("data-v-862782ff"), u = u(), K(), u), Q = /* @__PURE__ */ J(() => /* @__PURE__ */ L("div", { class: "card-header" }, [
8
- /* @__PURE__ */ L("div", { class: "card-header-title" }, "按钮配置")
9
- ], -1)), X = {
10
- __name: "configBtns",
11
- props: {
12
- modelValue: { type: Object, default: () => [] }
13
- },
14
- emits: ["update:modelValue"],
15
- setup(u, { expose: V, emit: Y }) {
16
- const h = $(), C = O("request"), q = T(() => import("./dialogConfigBtn-76b6fc69.js")), p = u, w = () => ({
17
- sort: 0,
18
- permissionCode: null,
19
- requestUrl: "",
20
- btnName: "",
21
- btnAlias: "",
22
- btnIcon: "",
23
- btnPostion: "",
24
- btnType: "",
25
- btnColor: "",
26
- submitWay: "",
27
- isCustomBtn: !1,
28
- customType: "",
29
- codeStr: "",
30
- customComponentName: "",
31
- customComponentUrl: "",
32
- // isBatchOperate: false,
33
- associationMenuId: "",
34
- submitFields: [],
35
- matchFields: []
36
- });
37
- let n = W((() => ({
38
- tableLoading: !1,
39
- showConfigBtnDialog: !1,
40
- dialogData: {}
41
- }))()), v = g(null), y = 0, B = [], s = g([]), M = [
42
- { prop: "checkbox", width: 60 },
43
- { prop: "serialNumber", width: 80 },
44
- { label: "按钮名称", prop: "btnName", minWidth: 200 },
45
- { label: "权限码", prop: "permissionCode", minWidth: 200 },
46
- { label: "按钮别名", prop: "btnAlias", minWidth: 120 },
47
- { label: "按钮图标", prop: "btnIcon", minWidth: 120 },
48
- { label: "是否自定义", prop: "isCustomBtn", width: 120, render: !0 },
49
- { label: "排序", prop: "sort", width: 180, render: !0 },
50
- { label: "操作", prop: "operate", width: 120, render: !0, fixed: "right" }
51
- ], b = g([]);
52
- const N = (e) => C({ url: "/api/v1/sysMenus/getAllList", method: "post", data: e }), S = (e) => C({ url: "/api/v1/sysMenus/getMenuOfOperate", method: "get", params: e }), k = (e, a) => {
53
- s.value.includes(e.permissionCode) || s.value.push(e.permissionCode), Object.assign(b.value[y], e), a(!0);
54
- }, R = async (e) => {
55
- try {
56
- n.tableLoading = !0;
57
- const a = p.id ? p.id : h.params.id, { data: i } = await S({ id: a });
58
- s.value = (i || []).filter((o) => (e || []).some((r) => r.permissionCode == o.unique)).map((o) => o.unique), b.value = (i || []).map((o, r) => {
59
- let _ = w(), c = (e || []).find((t) => t.permissionCode == o.unique) || {};
60
- return { ..._, btnIcon: o.icon || "", ...c, btnName: o.name, permissionCode: o.unique, sort: c.sort ? c.sort : (r + 1) * 10 };
61
- }).sort((o, r) => o.sort - r.sort), n.tableLoading = !1;
62
- } catch (a) {
63
- n.tableLoading = !1, console.error(a);
64
- }
65
- }, A = () => v.value.getSelectionRows() || [];
66
- D("associationMenuList", B), D("createDefaultButtonItem", w), j(
67
- () => p.modelValue,
68
- async (e, a) => {
69
- try {
70
- if (e.length) {
71
- const i = p.id ? p.id : h.params.id;
72
- B = (await N({ dynamicFilters: [{ field: "parentId", operate: "Equal", value: i }] })).data || [], await R(e);
73
- } else
74
- s.value = [], b.value = [];
75
- } catch (i) {
76
- n.tableLoading = !1, console.error(i);
77
- }
78
- },
79
- { deep: !0 }
80
- );
81
- const U = (e) => {
82
- n.dialogData = e.row, y = e.$index, n.showConfigBtnDialog = !0;
83
- };
84
- return V({ getTableSelectionRows: A }), (e, a) => {
85
- const i = m("el-tag"), o = m("el-input-number"), r = m("el-button"), _ = m("a-table"), c = m("el-card");
86
- return F(), z(c, {
87
- class: "form-card",
88
- shadow: "hover"
89
- }, {
90
- header: d(() => [
91
- Q
92
- ]),
93
- default: d(() => [
94
- f(_, {
95
- ref_key: "tableRef",
96
- ref: v,
97
- loading: l(n).tableLoading,
98
- rowKey: "permissionCode",
99
- selection: l(s),
100
- "onUpdate:selection": a[0] || (a[0] = (t) => E(s) ? s.value = t : s = t),
101
- headers: l(M),
102
- data: l(b),
103
- showPagination: !1
104
- }, {
105
- isCustomBtn: d(({ scope: t }) => [
106
- f(i, {
107
- type: "primary",
108
- effect: "dark",
109
- size: "small"
110
- }, {
111
- default: d(() => [
112
- x(P(t.row.isCustomBtn ? "是" : "否"), 1)
113
- ]),
114
- _: 2
115
- }, 1024)
116
- ]),
117
- sort: d(({ scope: t }) => [
118
- f(o, {
119
- modelValue: t.row.sort,
120
- "onUpdate:modelValue": (I) => t.row.sort = I,
121
- min: 0
122
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
123
- ]),
124
- operate: d(({ scope: t }) => [
125
- f(r, {
126
- type: "primary",
127
- text: "",
128
- size: "small",
129
- icon: "Aim",
130
- onClick: (I) => U(t)
131
- }, {
132
- default: d(() => [
133
- x(" 配置 ")
134
- ]),
135
- _: 2
136
- }, 1032, ["onClick"])
137
- ]),
138
- _: 1
139
- }, 8, ["loading", "selection", "headers", "data"]),
140
- f(l(q), {
141
- visible: l(n).showConfigBtnDialog,
142
- "onUpdate:visible": a[1] || (a[1] = (t) => l(n).showConfigBtnDialog = t),
143
- title: "配置按钮",
144
- data: l(n).dialogData,
145
- onRefresh: k
146
- }, null, 8, ["visible", "data"])
147
- ]),
148
- _: 1
149
- });
150
- };
151
- }
152
- }, ie = /* @__PURE__ */ G(X, [["__scopeId", "data-v-862782ff"]]);
153
- export {
154
- ie as default
155
- };
@@ -1,71 +0,0 @@
1
- import { defineAsyncComponent as g, ref as y, watch as C, resolveComponent as u, openBlock as h, createBlock as k, withCtx as a, createElementVNode as x, createVNode as s, createTextVNode as c, unref as p, isRef as w } from "vue";
2
- const S = { class: "dialog-footer" }, N = {
3
- __name: "dialogSiteComponentsParams",
4
- props: {
5
- visible: { type: Boolean, default: !1 },
6
- title: { type: String, default: "" },
7
- modelValue: { type: String, default: "" }
8
- },
9
- emits: ["update:visible", "refresh", "update:modelValue"],
10
- setup(m, { emit: f }) {
11
- const v = g(() => import("./index-f9ec4c04.js").then((t) => t.i)), n = f, o = m;
12
- let e = y();
13
- C(
14
- () => o.visible,
15
- async (t, l) => {
16
- t && (e.value = o.modelValue);
17
- }
18
- );
19
- const _ = (t) => {
20
- d(), t();
21
- }, d = () => {
22
- e.value = "", n("update:visible", !1);
23
- }, b = () => {
24
- n("update:modelValue", e.value), n("update:visible", !1);
25
- };
26
- return (t, l) => {
27
- const r = u("el-button"), V = u("el-dialog");
28
- return h(), k(V, {
29
- "model-value": o.visible,
30
- title: o.title,
31
- top: "5vh",
32
- width: "800",
33
- draggable: "",
34
- overflow: "",
35
- "close-on-click-modal": !1,
36
- "before-close": _
37
- }, {
38
- footer: a(() => [
39
- x("span", S, [
40
- s(r, { onClick: d }, {
41
- default: a(() => [
42
- c("取消")
43
- ]),
44
- _: 1
45
- }),
46
- s(r, {
47
- type: "primary",
48
- onClick: l[1] || (l[1] = (i) => b())
49
- }, {
50
- default: a(() => [
51
- c("保存")
52
- ]),
53
- _: 1
54
- })
55
- ])
56
- ]),
57
- default: a(() => [
58
- s(p(v), {
59
- modelValue: p(e),
60
- "onUpdate:modelValue": l[0] || (l[0] = (i) => w(e) ? e.value = i : e = i),
61
- style: { height: "600px" }
62
- }, null, 8, ["modelValue"])
63
- ]),
64
- _: 1
65
- }, 8, ["model-value", "title"]);
66
- };
67
- }
68
- };
69
- export {
70
- N as default
71
- };
@@ -1,375 +0,0 @@
1
- import { defineAsyncComponent as P, inject as D, reactive as Ce, ref as A, watch as Fe, resolveComponent as _, resolveDirective as J, openBlock as i, createBlock as c, withCtx as V, createElementVNode as Q, createVNode as X, unref as l, createTextVNode as Y, toDisplayString as R, withDirectives as Z, createElementBlock as w, Fragment as S, renderList as j, mergeProps as h, createCommentVNode as I, resolveDynamicComponent as Te, isRef as De, toRaw as Ke } from "vue";
2
- import { _ as Ne, u as Ue, P as we, a as ke, b as Le } from "./index-f9ec4c04.js";
3
- import { ElNotification as Pe } from "element-plus";
4
- import "vue-router";
5
- import "js-base64";
6
- import "monaco-editor";
7
- const Re = { class: "no-config-field" }, Se = { class: "dialog-footer" }, ve = {
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(k, { emit: ee }) {
16
- const le = P(() => import("./index-f9ec4c04.js").then((a) => a.g)), ae = P(() => import("./index-ad34a2e8.js")), oe = P(() => import("./index-f9ec4c04.js").then((a) => a.f)), te = P(() => import("./index-f9ec4c04.js").then((a) => a.e)), { t: p } = Ue(), v = D("request"), de = D("loadComponents"), L = D("formatDataType"), z = D("globalProps"), se = D("stringToBoolean"), b = D("getFieldUiProps"), re = D("disposeRequestData"), B = ee, m = k;
17
- let C = Ce((() => ({
18
- dialogLoading: !1,
19
- btnLoading: !1
20
- }))()), $ = A([]), t = A({}), q = A(null), ie = {};
21
- const ne = (a) => a.formColumnCol == null || a.customFiledsComponentes[a.customFiledsComponentes.customComponentName] ? 24 : a.formColumnCol ? a.formColumnCol : 24 / a.formRow, ce = (a) => {
22
- if (["input", "textarea"].includes(a.fieldType))
23
- return "blur";
24
- if (["select", "multipleSelect", "datetimerange", "treeSelect", "provinceCascade"].includes(a.fieldType))
25
- return "change";
26
- }, ue = async ({ node: a, resolve: n }, u) => {
27
- const d = b(u), { label: f, value: T, children: F, isLeaf: s } = { ...Le, ...d.treeProps || {} };
28
- if (a[s])
29
- return n([]);
30
- const r = u.postRequestParams.filter((y) => y.submitType === "default").reduce((y, N) => (y[N.submitName] = L(N.paramsType, N.submitValue), y), {}), K = u.postRequestParams.filter((y) => y.submitType === "dynamic").map((y) => ({
31
- field: y.submitName,
32
- operate: y.submitMatchType,
33
- value: d.loadCode ? a == null ? void 0 : a.data.value : L(y.paramsType, y.submitValue)
34
- }));
35
- console.log(u);
36
- let g = {};
37
- Object.keys(r).length && (g = { ...g, ...r }), K.length && (g.dynamicFilters = K), d.loadCode && Reflect.has(g, d.loadCode) && (g[d.loadCode] = a == null ? void 0 : a.data.value);
38
- const { data: E } = await v({
39
- url: u.fieldRequestUrl,
40
- method: u.fieldRequestType || "GET",
41
- data: g
42
- }), M = (E || []).map((y) => ({ label: y[f], value: y[T], children: [], isLeaf: y[s] }));
43
- n(M);
44
- }, fe = (a) => {
45
- if (!["input", "textarea"].includes(a) && ["multipleSelect", "dateRange"].includes(a))
46
- return [];
47
- }, pe = (a, n) => {
48
- if (["string"].includes(n))
49
- return a.join(";");
50
- if (["number"].includes(n))
51
- return Number(a);
52
- if (["array"].includes(n))
53
- return a;
54
- }, me = (a) => {
55
- if (["multipleSelect", "virtualizedMultipleSelect"].includes(a.fieldType))
56
- return m.data.rowData[a.fieldKey] ? m.data.rowData[a.fieldKey].split(";") : [];
57
- if (["dateRange"].includes(a.fieldType)) {
58
- const u = a.fieldKey.split("&");
59
- return m.data.rowData[a.fieldKey] = u.map((d) => m.data.rowData[d]), m.data.rowData[a.fieldKey];
60
- }
61
- let n = m.data.rowData[a.fieldKey];
62
- if (["select", "virtualizedSelect"].includes(a.fieldType)) {
63
- const u = b(a);
64
- a.dataList && typeof a.dataList[0][u["value-key"] ? u["value-key"] : "value"] == "string" && (n = n.toString());
65
- }
66
- return (n === "true" || n === "false") && (n = se(n)), n;
67
- }, ye = (a) => v({ url: m.data.dataItem.requestUrl, method: "post", data: a });
68
- Fe(
69
- () => m.visible,
70
- async (a, n) => {
71
- if (a)
72
- try {
73
- C.dialogLoading = !0;
74
- const u = await re(m.data.formList, m.data.rowData, !1, !0);
75
- m.data.formList.sort((d, f) => d.sort - f.sort).forEach(async (d) => {
76
- const f = u.find((r) => d.fieldName == r.fieldName && d.fieldKey == r.fieldKey);
77
- f && (d.dataList = (f == null ? void 0 : f.dataList) ?? []), ie[d.fieldKey] = { submitFieldType: d.fieldSubmitType, isFormSetValue: d.isFormSetValue }, t.value[d.fieldKey] = Object.keys(m.data.rowData).length && d.isFormSetValue ? me(d) : fe(d.fieldType);
78
- const { isFiledCustom: T, customComponentName: F, customComponentUrl: s } = d.customFiledsComponentes;
79
- if (T && !d.customFiledsComponentes[F]) {
80
- const r = await de(s, F);
81
- d.customFiledsComponentes[F] = r;
82
- }
83
- }), console.log(m.data), $.value = m.data.formList || [], C.dialogLoading = !1;
84
- } catch {
85
- C.dialogLoading = !1, ƒ;
86
- }
87
- }
88
- );
89
- const be = (a) => {
90
- x(), a();
91
- }, x = () => {
92
- $.value = [], q.value.resetFields(), B("update:visible", !1);
93
- }, _e = (a) => {
94
- a && a.validate((n) => {
95
- if (n) {
96
- C.btnLoading = !0;
97
- const { dataItem: u, rowData: d } = m.data;
98
- let f = { ...Ke(t.value) };
99
- console.log(f), Object.keys(f).forEach((s) => {
100
- s.includes("&") ? s.split("&").forEach((K, g) => {
101
- f[K] = f[s][g];
102
- }) : Array.isArray(f[s]) && (f[s] = pe(f[s], "string"));
103
- });
104
- const T = u.submitFields.filter((s) => s.matchType == "default").reduce((s, r) => (r.submitFieldType === "string" && (s[r.submitFieldName] = r.matchFieldName.toString()), s), {}), F = u.submitFields.filter((s) => s.matchType == "match").reduce((s, r) => (Reflect.has(r, "submitFieldMatchOrigin") && r.submitFieldMatchOrigin != "rowData" ? Reflect.has(z.matchData, r.submitFieldMatchOrigin) && (s[r.submitFieldName] = L(r.submitFieldType, z.matchData[r.submitFieldMatchOrigin][r.matchFieldName])) : s[r.submitFieldName] = L(r.submitFieldType, d[r.matchFieldName]), s), {});
105
- ye({
106
- ...f,
107
- ...T,
108
- ...F
109
- }).then((s) => {
110
- try {
111
- Pe({ title: p("act.tip"), message: p("act.saveSuccessfully"), type: "success", duration: 2500 }), x(), B("refresh");
112
- } catch (r) {
113
- console.error(r);
114
- }
115
- C.btnLoading = !1;
116
- }).catch((s) => {
117
- console.error(s), C.btnLoading = !1;
118
- });
119
- }
120
- });
121
- };
122
- return (a, n) => {
123
- var H;
124
- const u = _("el-input"), d = _("el-option"), f = _("el-select"), T = _("el-select-v2"), F = _("el-tree-select"), s = _("el-date-picker"), r = _("el-cascader"), K = _("el-switch"), g = _("el-form-item"), E = _("el-col"), M = _("el-row"), y = _("el-form"), N = _("el-button"), he = _("el-dialog"), ge = J("loading"), Ve = J("debounce");
125
- return i(), c(he, {
126
- "model-value": m.visible,
127
- title: m.title,
128
- top: "5vh",
129
- width: (H = k.data.formConfig) == null ? void 0 : H.dialogWidth,
130
- draggable: "",
131
- overflow: "",
132
- "append-to-body": "",
133
- "destroy-on-close": "",
134
- "close-on-click-modal": !1,
135
- "before-close": be
136
- }, {
137
- footer: V(() => [
138
- Q("span", Se, [
139
- X(N, {
140
- loading: l(C).btnLoading,
141
- onClick: x
142
- }, {
143
- default: V(() => [
144
- Y(R(l(p)("act.cancel")), 1)
145
- ]),
146
- _: 1
147
- }, 8, ["loading"]),
148
- Z((i(), c(N, {
149
- type: "primary",
150
- loading: l(C).btnLoading,
151
- onClick: n[1] || (n[1] = (O) => _e(l(q)))
152
- }, {
153
- default: V(() => [
154
- Y(R(l(p)("act.save")), 1)
155
- ]),
156
- _: 1
157
- }, 8, ["loading"])), [
158
- [Ve]
159
- ])
160
- ])
161
- ]),
162
- default: V(() => {
163
- var O, W;
164
- return [
165
- Z((i(), c(y, {
166
- ref_key: "formRef",
167
- ref: q,
168
- model: l(t),
169
- "label-suffix": ":",
170
- "label-width": (O = k.data.formConfig) == null ? void 0 : O.formLabelWidth,
171
- "label-position": (W = k.data.formConfig) == null ? void 0 : W.formLabelPosition
172
- }, {
173
- default: V(() => [
174
- X(M, { gutter: 40 }, {
175
- default: V(() => [
176
- (i(!0), w(S, null, j(l($), (e, G) => (i(), c(E, {
177
- span: ne(e),
178
- key: G
179
- }, {
180
- default: V(() => [
181
- e.customFiledsComponentes.isFiledCustom ? (i(), w(S, { key: 1 }, [
182
- e.customFiledsComponentes[e.customFiledsComponentes.customComponentName] ? (i(), c(Te(e.customFiledsComponentes[e.customFiledsComponentes.customComponentName]), {
183
- key: 0,
184
- fieldCofnigItem: e,
185
- rowData: m.data.rowData,
186
- form: l(t),
187
- "onUpdate:form": n[0] || (n[0] = (o) => De(t) ? t.value = o : t = o)
188
- }, null, 40, ["fieldCofnigItem", "rowData", "form"])) : (i(), w("div", {
189
- class: "no-config",
190
- key: G
191
- }, [
192
- Q("span", Re, "【" + R(e.fieldName) + "】", 1),
193
- Y(R(l(p)("act.fieldCustom")), 1)
194
- ]))
195
- ], 64)) : (i(), c(g, {
196
- key: 0,
197
- label: e.fieldName,
198
- prop: e.fieldKey,
199
- rules: [{ required: e.isFormFieldRequired, message: l(p)("act.requiredMessage"), trigger: ce(e) }]
200
- }, {
201
- default: V(() => [
202
- e.fieldType === "input" ? (i(), c(u, h({
203
- key: 0,
204
- modelValue: l(t)[e.fieldKey],
205
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
206
- placeholder: `${l(p)("act.inputPlaceholder")}${e.fieldName}`,
207
- clearable: "",
208
- ref_for: !0
209
- }, l(b)(e), {
210
- disabled: e.isFormDisabled
211
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : I("", !0),
212
- e.fieldType === "inputNumber" ? (i(), c(l(le), h({
213
- key: 1,
214
- modelValue: l(t)[e.fieldKey],
215
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
216
- placeholder: `${l(p)("act.inputPlaceholder")}${e.fieldName}`,
217
- clearable: "",
218
- ref_for: !0
219
- }, l(b)(e), {
220
- disabled: e.isFormDisabled
221
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "textarea" ? (i(), c(u, h({
222
- key: 2,
223
- modelValue: l(t)[e.fieldKey],
224
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
225
- placeholder: `${l(p)("act.inputPlaceholder")}${e.fieldName}`,
226
- rows: 4,
227
- ref_for: !0
228
- }, l(b)(e), {
229
- type: "textarea",
230
- disabled: e.isFormDisabled
231
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "selectIcon" ? (i(), c(l(ae), h({
232
- key: 3,
233
- modelValue: l(t)[e.fieldKey],
234
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
235
- icons: e.dataList,
236
- placeholder: `${l(p)("act.selectPlaceholder")}${e.fieldName}`,
237
- ref_for: !0
238
- }, l(b)(e), {
239
- disabled: e.isFormDisabled
240
- }), {
241
- default: V(() => [
242
- (i(!0), w(S, null, j(e.dataList, (o, U) => (i(), c(d, {
243
- key: U,
244
- label: o.key,
245
- value: o.value
246
- }, null, 8, ["label", "value"]))), 128))
247
- ]),
248
- _: 2
249
- }, 1040, ["modelValue", "onUpdate:modelValue", "icons", "placeholder", "disabled"])) : ["select", "multipleSelect"].includes(e.fieldType) ? (i(), c(f, h({
250
- key: 4,
251
- modelValue: l(t)[e.fieldKey],
252
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
253
- placeholder: `${l(p)("act.selectPlaceholder")}${e.fieldName}`,
254
- clearable: "",
255
- filterable: "",
256
- ref_for: !0
257
- }, l(b)(e), {
258
- multiple: e.fieldType === "multipleSelect",
259
- disabled: e.isFormDisabled
260
- }), {
261
- default: V(() => [
262
- (i(!0), w(S, null, j(e.dataList, (o, U) => (i(), c(d, {
263
- key: U,
264
- label: o.key,
265
- value: o.value
266
- }, null, 8, ["label", "value"]))), 128))
267
- ]),
268
- _: 2
269
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "disabled"])) : ["virtualizedSelect", "virtualizedMultipleSelect"].includes(e.fieldType) ? (i(), c(T, h({
270
- key: 5,
271
- modelValue: l(t)[e.fieldKey],
272
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
273
- options: e.dataList,
274
- props: { ...l(we) },
275
- placeholder: `${l(p)("act.selectPlaceholder")}${e.fieldName}`,
276
- clearable: "",
277
- filterable: "",
278
- ref_for: !0
279
- }, l(b)(e), {
280
- disabled: e.isFormDisabled,
281
- multiple: e.fieldType === "virtualizedMultipleSelect"
282
- }), null, 16, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled", "multiple"])) : e.fieldType === "treeSelect" ? (i(), c(F, h({
283
- key: 6,
284
- modelValue: l(t)[e.fieldKey],
285
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
286
- placeholder: `请选择${e.fieldName}`,
287
- props: { isLeaf: "isLeaf" },
288
- "render-after-expand": !1,
289
- "collapse-tags": "",
290
- "collapse-tags-tooltip": "",
291
- multiple: "",
292
- "show-checkbox": "",
293
- clearable: "",
294
- filterable: "",
295
- lazy: "",
296
- load: (o, U) => ue({ node: o, resolve: U }, e),
297
- ref_for: !0
298
- }, l(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "load"])) : e.fieldType === "date" ? (i(), c(s, h({
299
- key: 7,
300
- modelValue: l(t)[e.fieldKey],
301
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
302
- type: "date",
303
- placeholder: `${l(p)("act.selectPlaceholder")}${l(p)("act.time")}`,
304
- "value-format": "YYYY-MM-DD HH:mm:ss",
305
- ref_for: !0
306
- }, l(b)(e), {
307
- disabled: e.isFormDisabled
308
- }), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "dateRange" ? (i(), c(s, h({
309
- key: 8,
310
- modelValue: l(t)[e.fieldKey],
311
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
312
- type: "daterange",
313
- "start-placeholder": l(p)("act.startTime"),
314
- "end-placeholder": l(p)("act.endTime"),
315
- "value-format": "YYYY-MM-DD HH:mm:ss",
316
- ref_for: !0
317
- }, l(b)(e), {
318
- disabled: e.isFormDisabled
319
- }), null, 16, ["modelValue", "onUpdate:modelValue", "start-placeholder", "end-placeholder", "disabled"])) : e.fieldType === "provinceCascade" ? (i(), c(r, h({
320
- key: 9,
321
- modelValue: l(t)[e.fieldKey],
322
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
323
- options: e.dataList,
324
- props: l(ke),
325
- clearable: "",
326
- filterable: "",
327
- placeholder: `${l(p)("act.selectPlaceholder")}${e.fieldName}`,
328
- ref_for: !0
329
- }, l(b)(e), {
330
- disabled: e.isFormDisabled
331
- }), null, 16, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled"])) : e.fieldType === "switch" ? (i(), c(K, {
332
- key: 10,
333
- modelValue: l(t)[e.fieldKey],
334
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
335
- "active-value": !0,
336
- "inactive-value": !1
337
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : e.fieldType === "upload" ? (i(), c(l(oe), h({
338
- key: 11,
339
- class: "form-upload",
340
- modelValue: l(t)[e.fieldKey],
341
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
342
- request: l(v),
343
- ref_for: !0
344
- }, l(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "request"])) : e.fieldType === "editor" ? (i(), c(l(te), h({
345
- key: 12,
346
- modelValue: l(t)[e.fieldKey],
347
- "onUpdate:modelValue": (o) => l(t)[e.fieldKey] = o,
348
- disabled: e.isFormDisabled,
349
- placeholder: `${l(p)("act.inputPlaceholder")}${e.fieldName}`,
350
- ref_for: !0
351
- }, l(b)(e)), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])) : I("", !0)
352
- ]),
353
- _: 2
354
- }, 1032, ["label", "prop", "rules"]))
355
- ]),
356
- _: 2
357
- }, 1032, ["span"]))), 128))
358
- ]),
359
- _: 1
360
- })
361
- ]),
362
- _: 1
363
- }, 8, ["model", "label-width", "label-position"])), [
364
- [ge, l(C).dialogLoading]
365
- ])
366
- ];
367
- }),
368
- _: 1
369
- }, 8, ["model-value", "title", "width"]);
370
- };
371
- }
372
- }, Ye = /* @__PURE__ */ Ne(ve, [["__scopeId", "data-v-7ddb4597"]]);
373
- export {
374
- Ye as default
375
- };