@fecp/designer 5.4.76 → 5.4.78
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/es/designer/package.json.mjs +1 -1
- package/es/designer/src/components/DocumentParam.vue.mjs +1 -1
- package/es/designer/src/components/ParamsConfig.vue2.mjs +1 -1
- package/es/designer/src/layout/aside/HiddenFieldDialog.vue.mjs +1 -1
- package/es/designer/src/packages/advancedFilter/ValueInput.vue2.mjs +1 -1
- package/es/designer/src/packages/dataLinkage/index.vue.mjs +1 -1
- package/es/designer/src/packages/dialog/index.vue.mjs +1 -1
- package/es/designer/src/packages/dialog/index.vue2.mjs +1 -1
- package/es/designer/src/packages/dialog/useDialogDialog.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/index.vue.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
- package/es/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.mjs +1 -1
- package/es/designer/src/packages/form/property/approvalHistory.vue.mjs +9 -18
- package/es/designer/src/packages/form/property/contract.vue.mjs +14 -23
- package/es/designer/src/packages/form/property/document.vue.mjs +11 -20
- package/es/designer/src/packages/form/property/subForm.vue.mjs +17 -26
- package/es/designer/src/packages/form/property/subTable.vue.mjs +17 -26
- package/es/designer/src/packages/form/property/subTitleH2.vue.mjs +5 -14
- package/es/designer/src/packages/form/property/widgets.vue.mjs +83 -92
- package/es/designer/src/packages/prod/index.vue.mjs +1 -1
- package/es/designer/src/packages/table/headerBtn.vue.mjs +1 -1
- package/es/designer/src/packages/table/property/widgets.vue.mjs +25 -34
- package/es/designer.css +139 -139
- package/es/packages/mobile/src/components/navigation/navBar/NavBar.vue.mjs +22 -1
- package/es/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.mjs +18 -1
- package/es/packages/vue/index.mjs +2 -0
- package/es/packages/vue/src/components/details/footer/Footer.vue.mjs +7 -4
- package/es/packages/vue/src/components/details/header/Header.vue.mjs +7 -4
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +25 -29
- package/es/packages/vue/src/components/table/CustomButtons.vue.mjs +11 -6
- package/es/packages/vue/src/components/table/DynamicQuery.vue.mjs +7 -4
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +43 -7
- package/es/packages/vue/src/directive/auth.mjs +29 -0
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/components/DocumentParam.vue.js +1 -1
- package/lib/designer/src/components/ParamsConfig.vue2.js +1 -1
- package/lib/designer/src/layout/aside/HiddenFieldDialog.vue.js +1 -1
- package/lib/designer/src/packages/advancedFilter/ValueInput.vue2.js +1 -1
- package/lib/designer/src/packages/dataLinkage/index.vue.js +1 -1
- package/lib/designer/src/packages/dialog/index.vue.js +1 -1
- package/lib/designer/src/packages/dialog/index.vue2.js +1 -1
- package/lib/designer/src/packages/dialog/useDialogDialog.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/index.vue.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
- package/lib/designer/src/packages/eventFlow/dialog/action/RiskSch.vue.js +1 -1
- package/lib/designer/src/packages/form/property/approvalHistory.vue.js +9 -18
- package/lib/designer/src/packages/form/property/contract.vue.js +14 -23
- package/lib/designer/src/packages/form/property/document.vue.js +11 -20
- package/lib/designer/src/packages/form/property/subForm.vue.js +17 -26
- package/lib/designer/src/packages/form/property/subTable.vue.js +17 -26
- package/lib/designer/src/packages/form/property/subTitleH2.vue.js +5 -14
- package/lib/designer/src/packages/form/property/widgets.vue.js +83 -92
- package/lib/designer/src/packages/prod/index.vue.js +1 -1
- package/lib/designer/src/packages/table/headerBtn.vue.js +1 -1
- package/lib/designer/src/packages/table/property/widgets.vue.js +25 -34
- package/lib/designer.css +139 -139
- package/lib/packages/mobile/src/components/navigation/navBar/NavBar.vue.js +22 -1
- package/lib/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.js +17 -0
- package/lib/packages/vue/index.js +2 -0
- package/lib/packages/vue/src/components/details/footer/Footer.vue.js +6 -3
- package/lib/packages/vue/src/components/details/header/Header.vue.js +6 -3
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +25 -29
- package/lib/packages/vue/src/components/table/CustomButtons.vue.js +10 -5
- package/lib/packages/vue/src/components/table/DynamicQuery.vue.js +6 -3
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +43 -7
- package/lib/packages/vue/src/directive/auth.js +29 -0
- package/package.json +1 -1
|
@@ -8,11 +8,32 @@ const vue = require("vue");
|
|
|
8
8
|
const index = require("../../../../../../node_modules/vant/es/nav-bar/index.js");
|
|
9
9
|
const _sfc_main = {
|
|
10
10
|
__name: "NavBar",
|
|
11
|
+
props: {
|
|
12
|
+
isLeftBack: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
leftBackText: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
isRightButton: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
rightButtonText: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ""
|
|
27
|
+
}
|
|
28
|
+
},
|
|
11
29
|
setup(__props) {
|
|
12
30
|
const onClickLeft = () => history.back();
|
|
13
31
|
return (_ctx, _cache) => {
|
|
14
32
|
const _component_van_nav_bar = index.NavBar;
|
|
15
33
|
return vue.openBlock(), vue.createBlock(_component_van_nav_bar, vue.mergeProps(_ctx.$attrs, {
|
|
34
|
+
"left-arrow": __props.isLeftBack,
|
|
35
|
+
"left-text": __props.isLeftBack ? __props.leftBackText : "",
|
|
36
|
+
"right-text": __props.isRightButton ? __props.rightButtonText : "",
|
|
16
37
|
fixed: false,
|
|
17
38
|
"safe-area-inset-top": "",
|
|
18
39
|
clickable: "",
|
|
@@ -26,7 +47,7 @@ const _sfc_main = {
|
|
|
26
47
|
])
|
|
27
48
|
};
|
|
28
49
|
})
|
|
29
|
-
]), 1040);
|
|
50
|
+
]), 1040, ["left-arrow", "left-text", "right-text"]);
|
|
30
51
|
};
|
|
31
52
|
}
|
|
32
53
|
};
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
;/* empty css */
|
|
4
4
|
;/* empty css */
|
|
5
|
+
;/* empty css */
|
|
6
|
+
;/* empty css */
|
|
7
|
+
;/* empty css */
|
|
5
8
|
const vue = require("vue");
|
|
6
9
|
const index = require("../../../../../../node_modules/vant/es/tabbar/index.js");
|
|
10
|
+
const index$1 = require("../../../../../../node_modules/vant/es/tabbar-item/index.js");
|
|
7
11
|
const _sfc_main = {
|
|
8
12
|
__name: "Tabbar",
|
|
9
13
|
props: {
|
|
@@ -14,12 +18,25 @@ const _sfc_main = {
|
|
|
14
18
|
},
|
|
15
19
|
setup(__props) {
|
|
16
20
|
return (_ctx, _cache) => {
|
|
21
|
+
const _component_van_tabbar_item = index$1.TabbarItem;
|
|
17
22
|
const _component_van_tabbar = index.Tabbar;
|
|
18
23
|
return vue.openBlock(), vue.createBlock(_component_van_tabbar, vue.mergeProps(_ctx.$attrs, {
|
|
19
24
|
route: "",
|
|
20
25
|
fixed: false
|
|
21
26
|
}), {
|
|
22
27
|
default: vue.withCtx(() => [
|
|
28
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.tabbarOptions, (item) => {
|
|
29
|
+
return vue.openBlock(), vue.createBlock(_component_van_tabbar_item, {
|
|
30
|
+
icon: item.icon,
|
|
31
|
+
replace: "",
|
|
32
|
+
to: item.to
|
|
33
|
+
}, {
|
|
34
|
+
default: vue.withCtx(() => [
|
|
35
|
+
vue.createTextVNode(vue.toDisplayString(item.title), 1)
|
|
36
|
+
]),
|
|
37
|
+
_: 2
|
|
38
|
+
}, 1032, ["icon", "to"]);
|
|
39
|
+
}), 256)),
|
|
23
40
|
vue.renderSlot(_ctx.$slots, "default")
|
|
24
41
|
]),
|
|
25
42
|
_: 3
|
|
@@ -8,6 +8,7 @@ const components = require("../../node_modules/vxe-pc-ui/es/components.js");
|
|
|
8
8
|
;/* empty css */
|
|
9
9
|
;/* empty css */
|
|
10
10
|
const layout = require("./src/directive/layout.js");
|
|
11
|
+
const auth = require("./src/directive/auth.js");
|
|
11
12
|
const fecVue = {
|
|
12
13
|
install: (app) => {
|
|
13
14
|
for (let c in all) {
|
|
@@ -23,6 +24,7 @@ const fecVue = {
|
|
|
23
24
|
});
|
|
24
25
|
app.use(components);
|
|
25
26
|
app.use(layout.default);
|
|
27
|
+
app.use(auth.default);
|
|
26
28
|
}
|
|
27
29
|
};
|
|
28
30
|
exports.default = fecVue;
|
|
@@ -34,6 +34,7 @@ const _sfc_main = {
|
|
|
34
34
|
var _a;
|
|
35
35
|
const _component_el_button = index$1.ElButton;
|
|
36
36
|
const _component_el_footer = index.ElFooter;
|
|
37
|
+
const _directive_fec_auth = vue.resolveDirective("fec-auth");
|
|
37
38
|
return __props.pageFooterConfig.enabled && ((_a = __props.pageFooterConfig.actions) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createBlock(_component_el_footer, {
|
|
38
39
|
key: 0,
|
|
39
40
|
class: "form-details-footer"
|
|
@@ -43,7 +44,7 @@ const _sfc_main = {
|
|
|
43
44
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
44
45
|
key: button.id
|
|
45
46
|
}, [
|
|
46
|
-
button.btnType == "default" || button.btnType == "primary" && __props.formMode == "edit" ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
47
|
+
button.btnType == "default" || button.btnType == "primary" && __props.formMode == "edit" ? vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
47
48
|
key: 0,
|
|
48
49
|
type: button.btnType,
|
|
49
50
|
onClick: ($event) => handleButtonClick(button)
|
|
@@ -52,7 +53,9 @@ const _sfc_main = {
|
|
|
52
53
|
vue.createTextVNode(vue.toDisplayString(button.label), 1)
|
|
53
54
|
]),
|
|
54
55
|
_: 2
|
|
55
|
-
}, 1032, ["type", "onClick"]))
|
|
56
|
+
}, 1032, ["type", "onClick"])), [
|
|
57
|
+
[_directive_fec_auth, button.permission]
|
|
58
|
+
]) : vue.createCommentVNode("", true)
|
|
56
59
|
], 64);
|
|
57
60
|
}), 128))
|
|
58
61
|
]),
|
|
@@ -61,5 +64,5 @@ const _sfc_main = {
|
|
|
61
64
|
};
|
|
62
65
|
}
|
|
63
66
|
};
|
|
64
|
-
const component = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
67
|
+
const component = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-97973006"]]);
|
|
65
68
|
exports.default = component;
|
|
@@ -74,6 +74,7 @@ const _sfc_main = {
|
|
|
74
74
|
var _a, _b, _c, _d, _e;
|
|
75
75
|
const _component_el_button = index$2.ElButton;
|
|
76
76
|
const _component_el_page_header = index.ElPageHeader;
|
|
77
|
+
const _directive_fec_auth = vue.resolveDirective("fec-auth");
|
|
77
78
|
return ((_a = __props.pageHeaderConfig) == null ? void 0 : _a.enabled) && (vue.unref(canBack) || ((_c = (_b = __props.pageHeaderConfig) == null ? void 0 : _b.actions) == null ? void 0 : _c.length) > 0) ? (vue.openBlock(), vue.createBlock(_component_el_page_header, {
|
|
78
79
|
key: 0,
|
|
79
80
|
icon: vue.unref(canBack) ? vue.unref(index$1.ArrowLeftBold) : null,
|
|
@@ -95,7 +96,7 @@ const _sfc_main = {
|
|
|
95
96
|
var _a2;
|
|
96
97
|
return [
|
|
97
98
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList((_a2 = __props.pageHeaderConfig) == null ? void 0 : _a2.actions, (action) => {
|
|
98
|
-
return vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
99
|
+
return vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
99
100
|
key: action.id,
|
|
100
101
|
type: getButtonType(action.btnStyle),
|
|
101
102
|
onClick: ($event) => handleActionClick(action)
|
|
@@ -104,7 +105,9 @@ const _sfc_main = {
|
|
|
104
105
|
vue.createTextVNode(vue.toDisplayString(action.label), 1)
|
|
105
106
|
]),
|
|
106
107
|
_: 2
|
|
107
|
-
}, 1032, ["type", "onClick"])
|
|
108
|
+
}, 1032, ["type", "onClick"])), [
|
|
109
|
+
[_directive_fec_auth, action.permission]
|
|
110
|
+
]);
|
|
108
111
|
}), 128))
|
|
109
112
|
];
|
|
110
113
|
}),
|
|
@@ -114,5 +117,5 @@ const _sfc_main = {
|
|
|
114
117
|
};
|
|
115
118
|
}
|
|
116
119
|
};
|
|
117
|
-
const component = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
120
|
+
const component = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-a55fc4ab"]]);
|
|
118
121
|
exports.default = component;
|
|
@@ -863,6 +863,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
863
863
|
const updatedLayoutData = common.cloneDeep(oriGridLayoutData.value || []);
|
|
864
864
|
relevantConfigs.visibility.forEach((item) => {
|
|
865
865
|
const dataLinkFieldList = item.dataLinkFieldList || [];
|
|
866
|
+
dataLinkFieldList.forEach((fieldId) => {
|
|
867
|
+
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
868
|
+
if (layoutFieldItem) {
|
|
869
|
+
layoutFieldItem.hidden = true;
|
|
870
|
+
}
|
|
871
|
+
});
|
|
866
872
|
if (parseFilterConfig.checkFilterMatch(item.filterConfig, formData.value, fields)) {
|
|
867
873
|
dataLinkFieldList.forEach((fieldId) => {
|
|
868
874
|
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
@@ -870,17 +876,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
870
876
|
layoutFieldItem.hidden = false;
|
|
871
877
|
}
|
|
872
878
|
});
|
|
873
|
-
} else {
|
|
874
|
-
dataLinkFieldList.forEach((fieldId) => {
|
|
875
|
-
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
876
|
-
if (layoutFieldItem) {
|
|
877
|
-
layoutFieldItem.hidden = true;
|
|
878
|
-
}
|
|
879
|
-
});
|
|
880
879
|
}
|
|
881
880
|
});
|
|
882
881
|
relevantConfigs.required.forEach((item) => {
|
|
883
882
|
const dataLinkFieldList = item.dataLinkFieldList || [];
|
|
883
|
+
dataLinkFieldList.forEach((fieldId) => {
|
|
884
|
+
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
885
|
+
if (layoutFieldItem) {
|
|
886
|
+
layoutFieldItem.component.required = false;
|
|
887
|
+
}
|
|
888
|
+
});
|
|
884
889
|
if (parseFilterConfig.checkFilterMatch(item.filterConfig, formData.value, fields)) {
|
|
885
890
|
dataLinkFieldList.forEach((fieldId) => {
|
|
886
891
|
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
@@ -888,13 +893,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
888
893
|
layoutFieldItem.component.required = true;
|
|
889
894
|
}
|
|
890
895
|
});
|
|
891
|
-
} else {
|
|
892
|
-
dataLinkFieldList.forEach((fieldId) => {
|
|
893
|
-
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
894
|
-
if (layoutFieldItem) {
|
|
895
|
-
layoutFieldItem.component.required = false;
|
|
896
|
-
}
|
|
897
|
-
});
|
|
898
896
|
}
|
|
899
897
|
});
|
|
900
898
|
const rules = {};
|
|
@@ -912,6 +910,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
912
910
|
formRules.value = rules;
|
|
913
911
|
relevantConfigs.readonly.forEach((item) => {
|
|
914
912
|
const dataLinkFieldList = item.dataLinkFieldList || [];
|
|
913
|
+
dataLinkFieldList.forEach((fieldId) => {
|
|
914
|
+
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
915
|
+
if (layoutFieldItem) {
|
|
916
|
+
layoutFieldItem.component.readOnly = false;
|
|
917
|
+
}
|
|
918
|
+
});
|
|
915
919
|
if (parseFilterConfig.checkFilterMatch(item.filterConfig, formData.value, fields)) {
|
|
916
920
|
dataLinkFieldList.forEach((fieldId) => {
|
|
917
921
|
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
@@ -919,17 +923,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
919
923
|
layoutFieldItem.component.readOnly = true;
|
|
920
924
|
}
|
|
921
925
|
});
|
|
922
|
-
} else {
|
|
923
|
-
dataLinkFieldList.forEach((fieldId) => {
|
|
924
|
-
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
925
|
-
if (layoutFieldItem) {
|
|
926
|
-
layoutFieldItem.component.readOnly = false;
|
|
927
|
-
}
|
|
928
|
-
});
|
|
929
926
|
}
|
|
930
927
|
});
|
|
931
928
|
relevantConfigs.disabled.forEach((item) => {
|
|
932
929
|
const dataLinkFieldList = item.dataLinkFieldList || [];
|
|
930
|
+
dataLinkFieldList.forEach((fieldId) => {
|
|
931
|
+
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
932
|
+
if (layoutFieldItem) {
|
|
933
|
+
layoutFieldItem.component.disabled = false;
|
|
934
|
+
}
|
|
935
|
+
});
|
|
933
936
|
if (parseFilterConfig.checkFilterMatch(item.filterConfig, formData.value, fields)) {
|
|
934
937
|
dataLinkFieldList.forEach((fieldId) => {
|
|
935
938
|
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
@@ -937,13 +940,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
937
940
|
layoutFieldItem.component.disabled = true;
|
|
938
941
|
}
|
|
939
942
|
});
|
|
940
|
-
} else {
|
|
941
|
-
dataLinkFieldList.forEach((fieldId) => {
|
|
942
|
-
const layoutFieldItem = updatedLayoutData.find((g) => g.id == fieldId);
|
|
943
|
-
if (layoutFieldItem) {
|
|
944
|
-
layoutFieldItem.component.disabled = false;
|
|
945
|
-
}
|
|
946
|
-
});
|
|
947
943
|
}
|
|
948
944
|
});
|
|
949
945
|
gridLayoutFieldsData.value = updatedLayoutData.filter((item) => !item.hidden);
|
|
@@ -1102,5 +1098,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1102
1098
|
};
|
|
1103
1099
|
}
|
|
1104
1100
|
});
|
|
1105
|
-
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
1101
|
+
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-48d4542c"]]);
|
|
1106
1102
|
exports.default = _Form;
|
|
@@ -111,6 +111,7 @@ const _sfc_main = {
|
|
|
111
111
|
return (_ctx, _cache) => {
|
|
112
112
|
const _component_el_icon = index.ElIcon;
|
|
113
113
|
const _component_el_button = index$3.ElButton;
|
|
114
|
+
const _directive_fec_auth = vue.resolveDirective("fec-auth");
|
|
114
115
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
115
116
|
__props.localConfig.showReturn ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
116
117
|
key: 0,
|
|
@@ -132,7 +133,7 @@ const _sfc_main = {
|
|
|
132
133
|
}, {
|
|
133
134
|
buttons: vue.withCtx(() => [
|
|
134
135
|
leftButtons.value.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(leftButtons.value, (btn) => {
|
|
135
|
-
return vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
136
|
+
return vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
136
137
|
key: btn.id,
|
|
137
138
|
type: getBtnType(btn),
|
|
138
139
|
icon: getBtnIcon(btn.btnType),
|
|
@@ -142,12 +143,14 @@ const _sfc_main = {
|
|
|
142
143
|
vue.createTextVNode(vue.toDisplayString(btn.label), 1)
|
|
143
144
|
]),
|
|
144
145
|
_: 2
|
|
145
|
-
}, 1032, ["type", "icon", "onClick"])
|
|
146
|
+
}, 1032, ["type", "icon", "onClick"])), [
|
|
147
|
+
[_directive_fec_auth, btn.permission]
|
|
148
|
+
]);
|
|
146
149
|
}), 128)) : vue.createCommentVNode("", true)
|
|
147
150
|
]),
|
|
148
151
|
tools: vue.withCtx(() => [
|
|
149
152
|
rightButtons.value.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(rightButtons.value, (btn) => {
|
|
150
|
-
return vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
153
|
+
return vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
151
154
|
key: btn.id,
|
|
152
155
|
type: getBtnType(btn),
|
|
153
156
|
icon: getBtnIcon(btn.btnType),
|
|
@@ -157,7 +160,9 @@ const _sfc_main = {
|
|
|
157
160
|
vue.createTextVNode(vue.toDisplayString(btn.label), 1)
|
|
158
161
|
]),
|
|
159
162
|
_: 2
|
|
160
|
-
}, 1032, ["type", "icon", "onClick"])
|
|
163
|
+
}, 1032, ["type", "icon", "onClick"])), [
|
|
164
|
+
[_directive_fec_auth, btn.permission]
|
|
165
|
+
]);
|
|
161
166
|
}), 128)) : vue.createCommentVNode("", true)
|
|
162
167
|
]),
|
|
163
168
|
_: 1
|
|
@@ -166,5 +171,5 @@ const _sfc_main = {
|
|
|
166
171
|
};
|
|
167
172
|
}
|
|
168
173
|
};
|
|
169
|
-
const CustomButtons = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
174
|
+
const CustomButtons = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-7610c2d4"]]);
|
|
170
175
|
exports.default = CustomButtons;
|
|
@@ -267,6 +267,7 @@ const _sfc_main = {
|
|
|
267
267
|
const _component_el_form_item = index$7.ElFormItem;
|
|
268
268
|
const _component_el_form = index$7.ElForm;
|
|
269
269
|
const _component_el_collapse_transition = index$6.ElCollapseTransition;
|
|
270
|
+
const _directive_fec_auth = vue.resolveDirective("fec-auth");
|
|
270
271
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
271
272
|
vue.createElementVNode("div", _hoisted_2, [
|
|
272
273
|
__props.localConfig.showReturn ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
@@ -329,7 +330,7 @@ const _sfc_main = {
|
|
|
329
330
|
}, {
|
|
330
331
|
tools: vue.withCtx(() => [
|
|
331
332
|
!__props.isSubTable && rightButtons.value.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(rightButtons.value, (btn) => {
|
|
332
|
-
return vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
333
|
+
return vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
333
334
|
key: btn.id,
|
|
334
335
|
type: getBtnType(btn),
|
|
335
336
|
icon: getBtnIcon(btn.btnType),
|
|
@@ -339,7 +340,9 @@ const _sfc_main = {
|
|
|
339
340
|
vue.createTextVNode(vue.toDisplayString(btn.label), 1)
|
|
340
341
|
]),
|
|
341
342
|
_: 2
|
|
342
|
-
}, 1032, ["type", "icon", "onClick"])
|
|
343
|
+
}, 1032, ["type", "icon", "onClick"])), [
|
|
344
|
+
[_directive_fec_auth, btn.permission]
|
|
345
|
+
]);
|
|
343
346
|
}), 128)) : vue.createCommentVNode("", true)
|
|
344
347
|
]),
|
|
345
348
|
_: 1
|
|
@@ -452,5 +455,5 @@ const _sfc_main = {
|
|
|
452
455
|
};
|
|
453
456
|
}
|
|
454
457
|
};
|
|
455
|
-
const DynamicQuery = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
458
|
+
const DynamicQuery = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-d11a831a"]]);
|
|
456
459
|
exports.default = DynamicQuery;
|
|
@@ -264,8 +264,24 @@ const _sfc_main = {
|
|
|
264
264
|
if (!item.showCondition) return true;
|
|
265
265
|
return parseFilterConfig.checkFilterMatch(item.showCondition, row, props.fieldsData);
|
|
266
266
|
});
|
|
267
|
-
return btnList
|
|
267
|
+
return btnList.filter((item) => {
|
|
268
|
+
return hasPerm(item.permission);
|
|
269
|
+
});
|
|
268
270
|
};
|
|
271
|
+
function hasPerm(permission) {
|
|
272
|
+
if (permission === true || permission === void 0 || permission === "") {
|
|
273
|
+
return true;
|
|
274
|
+
}
|
|
275
|
+
let btnFlag = false;
|
|
276
|
+
const myBtns = window.$store.getters.funcAuthList;
|
|
277
|
+
for (let i in myBtns) {
|
|
278
|
+
if (myBtns[i] == permission) {
|
|
279
|
+
btnFlag = true;
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return btnFlag;
|
|
284
|
+
}
|
|
269
285
|
const shouldShowOptColumn = vue.computed(() => {
|
|
270
286
|
if (!props.isOptBtns || !props.optBtns.length) return false;
|
|
271
287
|
if (!props.tableData || props.tableData.length === 0) return true;
|
|
@@ -276,15 +292,35 @@ const _sfc_main = {
|
|
|
276
292
|
return parseFilterConfig.checkFilterMatch(item.disableCondition, row, props.fieldsData);
|
|
277
293
|
};
|
|
278
294
|
const optColumnWidth = vue.computed(() => {
|
|
279
|
-
const padding =
|
|
280
|
-
const
|
|
295
|
+
const padding = 12;
|
|
296
|
+
const labelWidth = 14;
|
|
297
|
+
const labelMargin = 18;
|
|
281
298
|
if (!props.tableData || props.tableData.length === 0) {
|
|
282
|
-
|
|
299
|
+
let labelLength = 0;
|
|
300
|
+
props.optBtns.forEach((btn) => {
|
|
301
|
+
labelLength += btn.label.length;
|
|
302
|
+
});
|
|
303
|
+
if (labelLength > 0) {
|
|
304
|
+
return labelLength * labelWidth + (props.optBtns.length - 1) * labelMargin + padding * 2 + 6;
|
|
305
|
+
}
|
|
306
|
+
return 0;
|
|
283
307
|
}
|
|
308
|
+
let maxBtnLength = 0;
|
|
284
309
|
const maxVisibleBtns = Math.max(
|
|
285
|
-
...props.tableData.map((row) =>
|
|
310
|
+
...props.tableData.map((row) => {
|
|
311
|
+
const btnList = getVisibleOptBtns(row);
|
|
312
|
+
if (btnList.length > maxBtnLength) {
|
|
313
|
+
maxBtnLength = btnList.length;
|
|
314
|
+
}
|
|
315
|
+
let labelLength = 0;
|
|
316
|
+
btnList.forEach((btn) => {
|
|
317
|
+
labelLength += btn.label.length;
|
|
318
|
+
});
|
|
319
|
+
return labelLength;
|
|
320
|
+
})
|
|
286
321
|
);
|
|
287
|
-
|
|
322
|
+
const maxLength = Math.max(maxVisibleBtns, 1);
|
|
323
|
+
return maxLength * labelWidth + (maxBtnLength - 1) * labelMargin + padding * 2 + 6;
|
|
288
324
|
});
|
|
289
325
|
const { handleEvent } = eventFlowHandler.useEventFlow({
|
|
290
326
|
fields: props.fieldsData,
|
|
@@ -411,5 +447,5 @@ const _sfc_main = {
|
|
|
411
447
|
};
|
|
412
448
|
}
|
|
413
449
|
};
|
|
414
|
-
const TableColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
450
|
+
const TableColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-77be03fc"]]);
|
|
415
451
|
exports.default = TableColumn;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const auth = {
|
|
4
|
+
mounted(el, binding, vnode, prevVnode) {
|
|
5
|
+
const permission = binding.value;
|
|
6
|
+
const btnFlag = auth.hasPerm(permission);
|
|
7
|
+
if (!btnFlag) {
|
|
8
|
+
el.parentNode.removeChild(el);
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
hasPerm(permission) {
|
|
12
|
+
if (permission === true || permission === void 0 || permission === "") {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
let btnFlag = false;
|
|
16
|
+
const myBtns = window.$store.getters.funcAuthList;
|
|
17
|
+
for (let i in myBtns) {
|
|
18
|
+
if (myBtns[i] === permission) {
|
|
19
|
+
btnFlag = true;
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return btnFlag;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
auth.install = function(Vue) {
|
|
27
|
+
Vue.directive("fec-auth", auth);
|
|
28
|
+
};
|
|
29
|
+
exports.default = auth;
|