act-plus 1.1.2 → 1.1.4
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/act-plus.js +3 -2
- package/act-plus.umd.cjs +17 -17
- package/lib/{configBtns-930e1f41.js → configBtns-3e0e1684.js} +14 -14
- package/lib/{configFileds-cb40d54d.js → configFileds-c1d4ce56.js} +19 -19
- package/lib/{configTable-dab2bbe5.js → configTable-e9118be0.js} +3 -3
- package/lib/dashboardTest-ff000df5.js +10 -0
- package/lib/{dialogAddField-2763fb68.js → dialogAddField-d3143ae7.js} +28 -28
- package/lib/{dialogConfigBtn-37e737c3.js → dialogConfigBtn-deb51609.js} +217 -215
- package/lib/enum-d971526b.js +18 -0
- package/lib/index-1c82879a.js +95 -0
- package/lib/index-4ecc8bcf.js +162 -0
- package/lib/{index-fe5fbd14.js → index-89b17cda.js} +1738 -2089
- package/lib/index-b53782e5.js +286 -0
- package/lib/index-c44f99dd.js +138 -0
- package/lib/index-efdc0568.js +89 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/lib/index-4c95799f.js +0 -26
- package/svg/btn-add-241f3e4f.js +0 -4
- package/svg/btn-back-93621853.js +0 -4
- package/svg/btn-bohui-b0a206a4.js +0 -4
- package/svg/btn-daochu-7b5b32e2.js +0 -4
- package/svg/btn-daoru-8ba48f49.js +0 -4
- package/svg/btn-delete-65a52caf.js +0 -4
- package/svg/btn-edit-e5232a18.js +0 -4
- package/svg/btn-fenpei-4bba16c2.js +0 -4
- package/svg/btn-lianjie-bdc679ea.js +0 -4
- package/svg/btn-lishitianbao-eb1212d2.js +0 -4
- package/svg/btn-liuchengtu-9591bcdb.js +0 -4
- package/svg/btn-mulu-0bbcf3d6.js +0 -4
- package/svg/btn-peizhi-d53bd4b5.js +0 -4
- package/svg/btn-qianshou-1acd18d0.js +0 -4
- package/svg/btn-quanxian-4607f51a.js +0 -4
- package/svg/btn-reset-1b0db495.js +0 -4
- package/svg/btn-rizhi-8836492c.js +0 -4
- package/svg/btn-search-54ecb613.js +0 -4
- package/svg/btn-shenpi-22b55f3c.js +0 -4
- package/svg/btn-start-173d3cfb.js +0 -4
- package/svg/btn-stop-d76fb767.js +0 -4
- package/svg/btn-tianbao-d57c7020.js +0 -4
- package/svg/btn-tianjiachengyuan-a613c5da.js +0 -4
- package/svg/btn-xiangqing-89b17590.js +0 -4
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const Y = {
|
|
2
|
+
year: "YYYY",
|
|
3
|
+
month: "YYYY-MM",
|
|
4
|
+
date: "YYYY-MM-DD",
|
|
5
|
+
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
6
|
+
yearrange: "YYYY",
|
|
7
|
+
monthrange: "YYYY-MM",
|
|
8
|
+
daterange: "YYYY-MM-DD",
|
|
9
|
+
datetimerange: "YYYY-MM-DD HH:mm:ss"
|
|
10
|
+
}, e = {
|
|
11
|
+
label: "name",
|
|
12
|
+
value: "code",
|
|
13
|
+
children: "children"
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
e as P,
|
|
17
|
+
Y as T
|
|
18
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ref, inject, watch, resolveComponent, openBlock, createElementBlock, Fragment, renderList, unref, createBlock, resolveDynamicComponent, withCtx, createVNode, createCommentVNode, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { _ as _export_sfc } from "./index-89b17cda.js";
|
|
3
|
+
import "vue-router";
|
|
4
|
+
const index_vue_vue_type_style_index_0_scoped_efdfad22_lang = "", _hoisted_1 = { class: "header-operate-container" }, _sfc_main = {
|
|
5
|
+
__name: "index",
|
|
6
|
+
props: {
|
|
7
|
+
data: { type: Object, default: () => ({}) }
|
|
8
|
+
},
|
|
9
|
+
emits: ["operate"],
|
|
10
|
+
setup(__props, { emit: __emit }) {
|
|
11
|
+
const emits = __emit, props = __props;
|
|
12
|
+
let queryButtons = ref([]);
|
|
13
|
+
const globalProps = inject("globalProps"), menuPermissionBtns = inject("menuPermissionBtns"), stringToBoolean = inject("stringToBoolean"), matchCondition = inject("matchCondition"), getTableData = inject("getTableData"), tableBtnRefs = inject("tableBtnRefs"), constructConditionArray = (dataItem) => {
|
|
14
|
+
if (!dataItem.matchFields.length)
|
|
15
|
+
return !0;
|
|
16
|
+
const matchFields = dataItem.matchFields.filter((t) => t.matchType != "default"), getMatchFileds = (t) => globalProps.matchData[t.matchType][t.matchFieldName];
|
|
17
|
+
let newStr = matchFields.reduce((t, n, o) => {
|
|
18
|
+
const r = getMatchFileds(n);
|
|
19
|
+
return t += matchCondition(n.matchCondition, r, n.fieldValue == "" ? null : n.fieldValue == "true" ? stringToBoolean(n.fieldValue) : n.fieldValue), o !== matchFields.length - 1 && (t += n.spliceCondition || "&&"), t;
|
|
20
|
+
}, ""), newSplitArray = newStr.split("||"), newSplitStr = newSplitArray.reduce((t, n, o) => (t += `(${n})`, o < newSplitArray.length - 1 && (t += "||"), t), "");
|
|
21
|
+
return eval(newSplitStr);
|
|
22
|
+
}, verTableBtn = (t) => menuPermissionBtns.value.some((n) => n.unique == t.permissionCode) && constructConditionArray(t), disposeHeaderButtons = (t) => {
|
|
23
|
+
queryButtons.value = (t || []).filter((n) => n.permissionCode !== 1001 && n.btnPostion.includes("header")).sort((n, o) => n.sort - o.sort);
|
|
24
|
+
};
|
|
25
|
+
watch(
|
|
26
|
+
() => props.data,
|
|
27
|
+
(t, n) => {
|
|
28
|
+
disposeHeaderButtons(t.buttons);
|
|
29
|
+
},
|
|
30
|
+
{ immediate: !0 }
|
|
31
|
+
);
|
|
32
|
+
const onOperate = (t) => {
|
|
33
|
+
emits("operate", t, {});
|
|
34
|
+
};
|
|
35
|
+
return (t, n) => {
|
|
36
|
+
const o = resolveComponent("a-svg-icon"), r = resolveComponent("el-button");
|
|
37
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
38
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(queryButtons), (e, s) => (openBlock(), createElementBlock(Fragment, { key: s }, [
|
|
39
|
+
e.isCustomBtn && e.customType == "component" && verTableBtn(e) ? (openBlock(), createBlock(resolveDynamicComponent(e[e.customComponentName]), {
|
|
40
|
+
key: 0,
|
|
41
|
+
ref_for: !0,
|
|
42
|
+
ref: (a) => unref(tableBtnRefs)[`${e.customComponentName}-${e.permissionCode}`] = a,
|
|
43
|
+
buttonData: e,
|
|
44
|
+
onRefresh: n[0] || (n[0] = (a) => unref(getTableData)())
|
|
45
|
+
}, {
|
|
46
|
+
default: withCtx(() => [
|
|
47
|
+
createVNode(r, {
|
|
48
|
+
class: "el-btn",
|
|
49
|
+
type: e.btnColor,
|
|
50
|
+
onClick: (a) => onOperate(e)
|
|
51
|
+
}, {
|
|
52
|
+
default: withCtx(() => [
|
|
53
|
+
e.btnIcon ? (openBlock(), createBlock(o, {
|
|
54
|
+
key: 0,
|
|
55
|
+
class: "mr4",
|
|
56
|
+
name: e.btnIcon,
|
|
57
|
+
width: "12",
|
|
58
|
+
height: "12",
|
|
59
|
+
color: "#fff"
|
|
60
|
+
}, null, 8, ["name"])) : createCommentVNode("", !0),
|
|
61
|
+
createTextVNode(" " + toDisplayString(e.btnName), 1)
|
|
62
|
+
]),
|
|
63
|
+
_: 2
|
|
64
|
+
}, 1032, ["type", "onClick"])
|
|
65
|
+
]),
|
|
66
|
+
_: 2
|
|
67
|
+
}, 1064, ["buttonData"])) : createCommentVNode("", !0),
|
|
68
|
+
!e.isCustomBtn && verTableBtn(e) ? (openBlock(), createBlock(r, {
|
|
69
|
+
key: 1,
|
|
70
|
+
class: "el-btn",
|
|
71
|
+
type: e.btnColor,
|
|
72
|
+
loading: e.opeateLoading,
|
|
73
|
+
onClick: (a) => onOperate(e)
|
|
74
|
+
}, {
|
|
75
|
+
default: withCtx(() => [
|
|
76
|
+
e.btnIcon ? (openBlock(), createBlock(o, {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: "mr4",
|
|
79
|
+
name: e.btnIcon,
|
|
80
|
+
width: "12",
|
|
81
|
+
height: "12",
|
|
82
|
+
color: "#fff"
|
|
83
|
+
}, null, 8, ["name"])) : createCommentVNode("", !0),
|
|
84
|
+
createTextVNode(" " + toDisplayString(e.opeateLoading ? e.btnName + "中..." : e.btnName), 1)
|
|
85
|
+
]),
|
|
86
|
+
_: 2
|
|
87
|
+
}, 1032, ["type", "loading", "onClick"])) : createCommentVNode("", !0)
|
|
88
|
+
], 64))), 128))
|
|
89
|
+
]);
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}, index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-efdfad22"]]);
|
|
93
|
+
export {
|
|
94
|
+
index as default
|
|
95
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { ref as T, watch as O, resolveComponent as u, openBlock as a, createElementBlock as p, unref as d, createBlock as o, withCtx as c, Fragment as i, renderList as f, createCommentVNode as y, createTextVNode as $, toDisplayString as L } from "vue";
|
|
2
|
+
import { P, T as U } from "./enum-d971526b.js";
|
|
3
|
+
import { _ as R } from "./index-89b17cda.js";
|
|
4
|
+
import "vue-router";
|
|
5
|
+
const A = { class: "search-module-container" }, D = {
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
data: { type: Object, default: () => ({}) }
|
|
9
|
+
},
|
|
10
|
+
emits: ["reset", "search"],
|
|
11
|
+
setup(g, { emit: x }) {
|
|
12
|
+
const b = x, N = g;
|
|
13
|
+
let s = T([]), h = T([]);
|
|
14
|
+
const w = (n) => {
|
|
15
|
+
s.value = (n || []).filter((t) => t.useScenes.includes("tableSearch"));
|
|
16
|
+
}, I = (n) => {
|
|
17
|
+
const t = (n || []).filter((r) => r.permissionCode === 1001);
|
|
18
|
+
h.value = [...t, { btnName: "重置", permissionCode: "9999", btnColor: "info", btnIcon: "btn-reset" }];
|
|
19
|
+
};
|
|
20
|
+
O(
|
|
21
|
+
() => N.data,
|
|
22
|
+
(n, t) => {
|
|
23
|
+
w(n.fields), I(n.buttons);
|
|
24
|
+
},
|
|
25
|
+
{ immediate: !0 }
|
|
26
|
+
);
|
|
27
|
+
const _ = (n) => {
|
|
28
|
+
switch (n.permissionCode) {
|
|
29
|
+
case "9999":
|
|
30
|
+
s.value.forEach((r) => {
|
|
31
|
+
r.fieldType.includes("&") ? r.queryValue = [] : r.queryValue = void 0;
|
|
32
|
+
}), b("reset", []);
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
const t = s.value.filter((r) => !!r.queryValue);
|
|
36
|
+
b("search", t);
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return (n, t) => {
|
|
41
|
+
const r = u("el-input"), k = u("el-option"), v = u("el-select"), S = u("el-cascader"), C = u("el-date-picker"), q = u("el-form-item"), B = u("a-svg-icon"), E = u("el-button"), F = u("el-form");
|
|
42
|
+
return a(), p("div", A, [
|
|
43
|
+
d(s) && d(s).length ? (a(), o(F, {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "form-content",
|
|
46
|
+
ref: "elForm",
|
|
47
|
+
"label-suffix": ":",
|
|
48
|
+
"label-position": "right",
|
|
49
|
+
"label-width": "80px"
|
|
50
|
+
}, {
|
|
51
|
+
default: c(() => [
|
|
52
|
+
(a(!0), p(i, null, f(d(s), (e, m) => (a(), o(q, {
|
|
53
|
+
class: "search-form-item",
|
|
54
|
+
key: m,
|
|
55
|
+
label: e.fieldName
|
|
56
|
+
}, {
|
|
57
|
+
default: c(() => [
|
|
58
|
+
e.fieldType === "input" ? (a(), o(r, {
|
|
59
|
+
key: 0,
|
|
60
|
+
modelValue: e.queryValue,
|
|
61
|
+
"onUpdate:modelValue": (l) => e.queryValue = l,
|
|
62
|
+
placeholder: `请输入${e.fieldName}`,
|
|
63
|
+
clearable: ""
|
|
64
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : e.fieldType === "select" || e.fieldType === "switch" ? (a(), o(v, {
|
|
65
|
+
key: 1,
|
|
66
|
+
modelValue: e.queryValue,
|
|
67
|
+
"onUpdate:modelValue": (l) => e.queryValue = l,
|
|
68
|
+
placeholder: `请选择${e.fieldName}`,
|
|
69
|
+
clearable: "",
|
|
70
|
+
filterable: "",
|
|
71
|
+
onChange: t[0] || (t[0] = (l) => _({ permissionCode: 1001 }))
|
|
72
|
+
}, {
|
|
73
|
+
default: c(() => [
|
|
74
|
+
(a(!0), p(i, null, f(e.dataList, (l, V) => (a(), o(k, {
|
|
75
|
+
key: V,
|
|
76
|
+
label: l.key,
|
|
77
|
+
value: l.value
|
|
78
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
79
|
+
]),
|
|
80
|
+
_: 2
|
|
81
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : e.fieldType === "multipleSelect" ? (a(), o(v, {
|
|
82
|
+
key: 2,
|
|
83
|
+
modelValue: e.queryValue,
|
|
84
|
+
"onUpdate:modelValue": (l) => e.queryValue = l,
|
|
85
|
+
placeholder: "请选择" + e.fieldName,
|
|
86
|
+
clearable: "",
|
|
87
|
+
filterable: "",
|
|
88
|
+
onChange: t[1] || (t[1] = (l) => _({ permissionCode: 1001 }))
|
|
89
|
+
}, {
|
|
90
|
+
default: c(() => [
|
|
91
|
+
(a(!0), p(i, null, f(e.dataList, (l, V) => (a(), o(k, {
|
|
92
|
+
key: V,
|
|
93
|
+
label: l.key,
|
|
94
|
+
value: l.value
|
|
95
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
96
|
+
]),
|
|
97
|
+
_: 2
|
|
98
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : e.fieldType === "provinceCascade" ? (a(), o(S, {
|
|
99
|
+
key: 3,
|
|
100
|
+
modelValue: e.queryValue,
|
|
101
|
+
"onUpdate:modelValue": (l) => e.queryValue = l,
|
|
102
|
+
options: e.selectList,
|
|
103
|
+
props: { ...d(P), [e.fieldUiType]: !0 },
|
|
104
|
+
clearable: "",
|
|
105
|
+
filterable: "",
|
|
106
|
+
placeholder: "请选择" + e.fieldName
|
|
107
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder"])) : e.fieldType === "date" ? (a(), o(C, {
|
|
108
|
+
key: 4,
|
|
109
|
+
modelValue: e.queryValue,
|
|
110
|
+
"onUpdate:modelValue": (l) => e.queryValue = l,
|
|
111
|
+
type: e.fieldUiType,
|
|
112
|
+
placeholder: "请选择时间",
|
|
113
|
+
"value-format": d(U)[e.fieldUiType]
|
|
114
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "value-format"])) : e.fieldType === "dateRange" ? (a(), o(C, {
|
|
115
|
+
key: 5,
|
|
116
|
+
modelValue: e.queryValue,
|
|
117
|
+
"onUpdate:modelValue": (l) => e.queryValue = l,
|
|
118
|
+
type: e.fieldUiType,
|
|
119
|
+
"start-placeholder": "开始时间",
|
|
120
|
+
"end-placeholder": "结束时间",
|
|
121
|
+
"value-format": d(U)[e.fieldUiType]
|
|
122
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "value-format"])) : y("", !0)
|
|
123
|
+
]),
|
|
124
|
+
_: 2
|
|
125
|
+
}, 1032, ["label"]))), 128)),
|
|
126
|
+
d(s).length ? (a(), o(q, {
|
|
127
|
+
key: 0,
|
|
128
|
+
class: "search-form-btn",
|
|
129
|
+
"label-width": "0"
|
|
130
|
+
}, {
|
|
131
|
+
default: c(() => [
|
|
132
|
+
(a(!0), p(i, null, f(d(h), (e, m) => (a(), o(E, {
|
|
133
|
+
key: m,
|
|
134
|
+
type: e.btnColor,
|
|
135
|
+
onClick: (l) => _(e)
|
|
136
|
+
}, {
|
|
137
|
+
default: c(() => [
|
|
138
|
+
e.btnIcon ? (a(), o(B, {
|
|
139
|
+
key: 0,
|
|
140
|
+
class: "mr6",
|
|
141
|
+
name: e.btnIcon,
|
|
142
|
+
width: "12",
|
|
143
|
+
height: "12",
|
|
144
|
+
color: "#fff"
|
|
145
|
+
}, null, 8, ["name"])) : y("", !0),
|
|
146
|
+
$(" " + L(e.btnName), 1)
|
|
147
|
+
]),
|
|
148
|
+
_: 2
|
|
149
|
+
}, 1032, ["type", "onClick"]))), 128))
|
|
150
|
+
]),
|
|
151
|
+
_: 1
|
|
152
|
+
})) : y("", !0)
|
|
153
|
+
]),
|
|
154
|
+
_: 1
|
|
155
|
+
}, 512)) : y("", !0)
|
|
156
|
+
]);
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
}, G = /* @__PURE__ */ R(D, [["__scopeId", "data-v-26568f9a"]]);
|
|
160
|
+
export {
|
|
161
|
+
G as default
|
|
162
|
+
};
|