super-page-designer 2.1.38 → 2.1.41-tmp1
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/dist/es/components/design/utils/assemblys-config.js +67 -1
- package/dist/es/components/design/utils/container-design-util.js +4 -0
- package/dist/es/components/design/utils/form-design-util.d.ts +1 -1
- package/dist/es/components/design/utils/form-design-util.js +10 -1
- package/dist/es/components/design/utils/page-event-util.js +10 -6
- package/dist/es/components/design/utils/page-table-util.js +26 -4
- package/dist/es/components/design/views/assemblys/chart/common/common-attr-data.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/chart/gauge/gauge-attr-data.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/chart/radar/radar-attr-data.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/chart/scatter/scatter-attr-data.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/data-origin.vue.js +7 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/data-origin.vue2.js +542 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/data-origin.vue3.js +1 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/font-style-dialog.vue.js +230 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/font-style-dialog.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/link-table.vue.js +205 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/link-table.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/style-table.vue.js +198 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/style-table.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/table-showcondition.vue.js +507 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/component/table-showcondition.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-attr-advanced.vue.js +285 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-attr-advanced.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-attr-base.vue.js +1177 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-attr-base.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-attr-style.vue.js +97 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-attr-style.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-attr.vue.js +5 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-attr.vue2.js +62 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-attr.vue3.js +1 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-design.vue.js +8 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-design.vue2.js +358 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-design.vue3.js +1 -0
- package/dist/es/components/design/views/assemblys/chart/statistical-table/statisticalTable-design.vue4.js +1 -0
- package/dist/es/components/design/views/assemblys/common/common-function-code.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/common/common-i18n-key-input.vue.js +3 -1
- package/dist/es/components/design/views/assemblys/common/common-style-background.vue.js +3 -2
- package/dist/es/components/design/views/assemblys/common/common-variable-bind-option.js +1 -2
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue3.js +18 -13
- package/dist/es/components/design/views/assemblys/data/component/data-origin-tree.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/data-origin-tree.vue2.js +4 -4
- package/dist/es/components/design/views/assemblys/data/component/data-origin.vue2.js +1 -1
- package/dist/es/components/design/views/assemblys/data/component/table-children-column.vue.js +12 -10
- package/dist/es/components/design/views/assemblys/data/table/table-attr-base.vue.js +1 -0
- package/dist/es/components/design/views/assemblys/data/table/table-design.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/table/table-design.vue2.js +2 -0
- package/dist/es/components/design/views/assemblys/data/table/tablecolumn-attr-base.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/table/tablecolumn-attr-base.vue2.js +5 -5
- package/dist/es/components/design/views/assemblys/data/table/tablecolumn-dynamic-column.vue.js +4 -4
- package/dist/es/components/design/views/assemblys/form/checkbox/checkbox-attr-base.vue.js +42 -4
- package/dist/es/components/design/views/assemblys/form/checkbox/checkbox-design.vue2.js +4 -2
- package/dist/es/components/design/views/assemblys/form/common/data-format.vue.js +5 -4
- package/dist/es/components/design/views/assemblys/form/common/data-origin.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/common/data-origin.vue2.js +4 -4
- package/dist/es/components/design/views/assemblys/form/common/dataorigin-input-table.vue.js +1 -152
- package/dist/es/components/design/views/assemblys/form/common/dataorigin-input-table.vue2.js +152 -1
- package/dist/es/components/design/views/assemblys/form/common/icon-set-dialog.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/form/common/icon-set-dialog.vue2.js +2 -1
- package/dist/es/components/design/views/assemblys/form/common/pre-suffix.vue.js +11 -8
- package/dist/es/components/design/views/assemblys/form/common/uploading.vue.js +32 -0
- package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-attr-base.vue.js +54 -16
- package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-design.vue2.js +4 -2
- package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-attr-base.vue.js +46 -8
- package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-design.vue2.js +4 -3
- package/dist/es/components/design/views/assemblys/form/file-upload/fileupload-attr-base.vue.js +42 -4
- package/dist/es/components/design/views/assemblys/form/file-upload/fileupload-design.vue2.js +15 -2
- package/dist/es/components/design/views/assemblys/form/input-number/input-number-attr-base.vue.js +48 -10
- package/dist/es/components/design/views/assemblys/form/input-number/input-number-design.vue2.js +4 -3
- package/dist/es/components/design/views/assemblys/form/input-text/inputtext-attr-base.vue.js +46 -8
- package/dist/es/components/design/views/assemblys/form/input-text/inputtext-design.vue2.js +4 -2
- package/dist/es/components/design/views/assemblys/form/label/label-attr-base.vue.js +39 -1
- package/dist/es/components/design/views/assemblys/form/label/label-design.vue2.js +4 -2
- package/dist/es/components/design/views/assemblys/form/radio/radio-attr-base.vue.js +42 -4
- package/dist/es/components/design/views/assemblys/form/radio/radio-design.vue2.js +4 -2
- package/dist/es/components/design/views/assemblys/form/rich-text/richtext-attr-base.vue.js +42 -4
- package/dist/es/components/design/views/assemblys/form/rich-text/richtext-design.vue2.js +4 -2
- package/dist/es/components/design/views/assemblys/form/select/select-attr-base.vue.js +48 -10
- package/dist/es/components/design/views/assemblys/form/select/select-design.vue2.js +4 -2
- package/dist/es/components/design/views/assemblys/form/switch/switch-attr-base.vue.js +49 -11
- package/dist/es/components/design/views/assemblys/form/switch/switch-design.vue2.js +4 -2
- package/dist/es/components/design/views/assemblys/form/tag/tag-attr-base.vue.js +42 -4
- package/dist/es/components/design/views/assemblys/form/tag/tag-design.vue2.js +4 -2
- package/dist/es/components/design/views/assemblys/form/textarea/textarea-attr-base.vue.js +52 -14
- package/dist/es/components/design/views/assemblys/form/textarea/textarea-design.vue2.js +4 -2
- package/dist/es/components/design/views/assemblys/object-design.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/page/component/weight-field-input.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/page/page-attr-advanced.vue.js +21 -2
- package/dist/es/components/design/views/assemblys/page/page-attr-base.vue.js +14 -7
- package/dist/es/components/design/views/design/page-event/config.vue.js +2 -2
- package/dist/es/components/design/views/design/page-event/config.vue2.js +1 -336
- package/dist/es/components/design/views/design/page-event/config.vue3.js +336 -1
- package/dist/es/components/design/views/design/view/page-switch.vue.js +1 -1
- package/dist/es/components/design/views/design/view/page-switch.vue2.js +10 -0
- package/dist/es/components/design/views/design/view/view-design-display.vue.js +1 -1
- package/dist/es/stores/page-store.d.ts +1 -1
- package/dist/es/stores/page-store.js +1 -1
- package/dist/es/stores/statistics-table-store.d.ts +10 -0
- package/dist/es/stores/statistics-table-store.js +20 -0
- package/dist/es/style.css +775 -102
- package/package.json +6 -5
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode } from "vue";
|
|
2
|
+
import _sfc_main$1 from "./component/style-table.vue.js";
|
|
3
|
+
const _hoisted_1 = { style: { "padding": "8px 0px 0px 0px" } };
|
|
4
|
+
const _hoisted_2 = { style: { "padding": "8px 0px 0px 0px" } };
|
|
5
|
+
const _hoisted_3 = { style: { "padding": "8px 0px 0px 0px" } };
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "statisticalTable-attr-style",
|
|
8
|
+
props: {
|
|
9
|
+
configure: Object
|
|
10
|
+
},
|
|
11
|
+
setup(__props) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
function titleStyleChange(tableData) {
|
|
14
|
+
props.configure.style.titleStyle = tableData;
|
|
15
|
+
}
|
|
16
|
+
function contentStyleChange(tableData) {
|
|
17
|
+
props.configure.style.titleContent = tableData;
|
|
18
|
+
}
|
|
19
|
+
function collectStyleChange(tableData) {
|
|
20
|
+
props.configure.style.collectStyle = tableData;
|
|
21
|
+
}
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
const _component_el_collapse_item = resolveComponent("el-collapse-item");
|
|
24
|
+
const _component_el_collapse = resolveComponent("el-collapse");
|
|
25
|
+
const _component_el_form = resolveComponent("el-form");
|
|
26
|
+
return openBlock(), createBlock(_component_el_form, {
|
|
27
|
+
"label-width": "80px",
|
|
28
|
+
size: "small"
|
|
29
|
+
}, {
|
|
30
|
+
default: withCtx(() => [
|
|
31
|
+
createVNode(_component_el_collapse, { style: { "margin-top": "6px" } }, {
|
|
32
|
+
default: withCtx(() => [
|
|
33
|
+
createVNode(_component_el_collapse_item, {
|
|
34
|
+
title: "标题",
|
|
35
|
+
name: "titleStyle",
|
|
36
|
+
class: "amb-design-attr-group-header"
|
|
37
|
+
}, {
|
|
38
|
+
default: withCtx(() => [
|
|
39
|
+
createElementVNode("div", _hoisted_1, [
|
|
40
|
+
createVNode(_sfc_main$1, {
|
|
41
|
+
configure: __props.configure,
|
|
42
|
+
showField: true,
|
|
43
|
+
data: __props.configure.style.titleStyle,
|
|
44
|
+
onDataChange: titleStyleChange
|
|
45
|
+
}, null, 8, ["configure", "data"])
|
|
46
|
+
])
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
}),
|
|
50
|
+
createVNode(_component_el_collapse_item, {
|
|
51
|
+
title: "内容",
|
|
52
|
+
name: "contentStyle",
|
|
53
|
+
class: "amb-design-attr-group-header"
|
|
54
|
+
}, {
|
|
55
|
+
default: withCtx(() => [
|
|
56
|
+
createElementVNode("div", _hoisted_2, [
|
|
57
|
+
createVNode(_sfc_main$1, {
|
|
58
|
+
paramTypes: ["data", "task", "page", "request", "row"],
|
|
59
|
+
configure: __props.configure,
|
|
60
|
+
showCondition: true,
|
|
61
|
+
data: __props.configure.style.titleContent,
|
|
62
|
+
onDataChange: contentStyleChange
|
|
63
|
+
}, null, 8, ["configure", "data"])
|
|
64
|
+
])
|
|
65
|
+
]),
|
|
66
|
+
_: 1
|
|
67
|
+
}),
|
|
68
|
+
createVNode(_component_el_collapse_item, {
|
|
69
|
+
title: "汇总行",
|
|
70
|
+
name: "collectStyle",
|
|
71
|
+
class: "amb-design-attr-group-header"
|
|
72
|
+
}, {
|
|
73
|
+
default: withCtx(() => [
|
|
74
|
+
createElementVNode("div", _hoisted_3, [
|
|
75
|
+
createVNode(_sfc_main$1, {
|
|
76
|
+
paramTypes: ["data", "task", "page", "request", "row"],
|
|
77
|
+
configure: __props.configure,
|
|
78
|
+
showCondition: true,
|
|
79
|
+
data: __props.configure.style.collectStyle,
|
|
80
|
+
onDataChange: collectStyleChange
|
|
81
|
+
}, null, 8, ["configure", "data"])
|
|
82
|
+
])
|
|
83
|
+
]),
|
|
84
|
+
_: 1
|
|
85
|
+
})
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
})
|
|
89
|
+
]),
|
|
90
|
+
_: 1
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
export {
|
|
96
|
+
_sfc_main as default
|
|
97
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineComponent, ref, openBlock, createElementBlock, createVNode, unref, isRef, createElementVNode, withDirectives, vShow } from "vue";
|
|
2
|
+
import _sfc_main$2 from "./statisticalTable-attr-base.vue.js";
|
|
3
|
+
import _sfc_main$3 from "./statisticalTable-attr-advanced.vue.js";
|
|
4
|
+
import _sfc_main$4 from "./statisticalTable-attr-style.vue.js";
|
|
5
|
+
import _sfc_main$1 from "../../data/component/attr-header.vue.js";
|
|
6
|
+
import eventBus from "../../../../utils/eventBus.js";
|
|
7
|
+
const _hoisted_1 = { class: "amb-design-attr-content" };
|
|
8
|
+
const _hoisted_2 = { class: "amb-design-attr-list" };
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "statisticalTable-attr",
|
|
11
|
+
props: {
|
|
12
|
+
// 页面设置对象
|
|
13
|
+
pageDesign: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default: () => {
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
configure: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => ({ title: "Text", props: { type: "input-text" } })
|
|
21
|
+
// 设置默认值
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(__props) {
|
|
25
|
+
let currentConfigType = ref("base");
|
|
26
|
+
const columnData = ref({});
|
|
27
|
+
const tableConfigure = ref({});
|
|
28
|
+
eventBus.$on("selectColumn", (val) => {
|
|
29
|
+
columnData.value = val.columnData;
|
|
30
|
+
tableConfigure.value = val.tableConfigure;
|
|
31
|
+
});
|
|
32
|
+
return (_ctx, _cache) => {
|
|
33
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
34
|
+
createVNode(_sfc_main$1, {
|
|
35
|
+
modelValue: unref(currentConfigType),
|
|
36
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(currentConfigType) ? currentConfigType.value = $event : currentConfigType = $event)
|
|
37
|
+
}, null, 8, ["modelValue"]),
|
|
38
|
+
createElementVNode("div", _hoisted_2, [
|
|
39
|
+
withDirectives(createVNode(_sfc_main$2, {
|
|
40
|
+
pageDesign: __props.pageDesign,
|
|
41
|
+
configure: __props.configure
|
|
42
|
+
}, null, 8, ["pageDesign", "configure"]), [
|
|
43
|
+
[vShow, unref(currentConfigType) === "base"]
|
|
44
|
+
]),
|
|
45
|
+
withDirectives(createVNode(_sfc_main$3, {
|
|
46
|
+
pageDesign: __props.pageDesign,
|
|
47
|
+
configure: __props.configure,
|
|
48
|
+
tableConfigure: tableConfigure.value
|
|
49
|
+
}, null, 8, ["pageDesign", "configure", "tableConfigure"]), [
|
|
50
|
+
[vShow, unref(currentConfigType) === "advanced"]
|
|
51
|
+
]),
|
|
52
|
+
withDirectives(createVNode(_sfc_main$4, { configure: __props.configure }, null, 8, ["configure"]), [
|
|
53
|
+
[vShow, unref(currentConfigType) === "style"]
|
|
54
|
+
])
|
|
55
|
+
])
|
|
56
|
+
]);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
_sfc_main as default
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _sfc_main from "./statisticalTable-design.vue2.js";
|
|
2
|
+
import "./statisticalTable-design.vue3.js";
|
|
3
|
+
import "./statisticalTable-design.vue4.js";
|
|
4
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const statisticalTableDesign = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ad6b7f2d"]]);
|
|
6
|
+
export {
|
|
7
|
+
statisticalTableDesign as default
|
|
8
|
+
};
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { defineComponent, ref, onMounted, onUnmounted, watch, resolveComponent, openBlock, createElementBlock, createVNode, normalizeClass, normalizeStyle, withCtx, Fragment, renderList, createBlock, createElementVNode, withDirectives, unref, createTextVNode, createCommentVNode, vShow } from "vue";
|
|
2
|
+
import eventBus from "../../../../utils/eventBus.js";
|
|
3
|
+
import { useDraggable } from "vue-draggable-plus";
|
|
4
|
+
import { caculateComponentProps } from "../../../../utils/form-design-util.js";
|
|
5
|
+
import { getTableColumnConf } from "../../../../utils/assemblys-config.js";
|
|
6
|
+
import { Plus, Delete } from "@element-plus/icons-vue";
|
|
7
|
+
import { ElMessageBox } from "element-plus";
|
|
8
|
+
import { getColumnsWithGroupHeader, addColumnToGroupHeaders } from "../../../../utils/data-table-util.js";
|
|
9
|
+
import "uuid";
|
|
10
|
+
import "@element-plus/icons";
|
|
11
|
+
import "agilebuilder-ui/src/utils/auth";
|
|
12
|
+
import "super-page-runtime";
|
|
13
|
+
import "../../../../../../stores/page-store.js";
|
|
14
|
+
import _sfc_main$1 from "../../data/component/table-children-column.vue.js";
|
|
15
|
+
import { queryTableFields, changeFeieldToMap } from "../../../../utils/page-table-util.js";
|
|
16
|
+
import { removComponentDataConfig, initComponentDataConfig } from "../../../../utils/chart-design-util.js";
|
|
17
|
+
import { statisticsTable } from "../../../../../../stores/statistics-table-store.js";
|
|
18
|
+
const _hoisted_1 = {
|
|
19
|
+
id: "tableDesignMenu",
|
|
20
|
+
ref: "headerMenu",
|
|
21
|
+
class: "context-menu"
|
|
22
|
+
};
|
|
23
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
24
|
+
__name: "statisticalTable-design",
|
|
25
|
+
props: {
|
|
26
|
+
pageDesign: {},
|
|
27
|
+
configure: {},
|
|
28
|
+
selectWidget: {},
|
|
29
|
+
indexObj: {}
|
|
30
|
+
},
|
|
31
|
+
emits: ["selectColumn", "onSelectWidget"],
|
|
32
|
+
setup(__props, { emit: __emit }) {
|
|
33
|
+
const props = __props;
|
|
34
|
+
const emit = __emit;
|
|
35
|
+
const tableData = ref([{}]);
|
|
36
|
+
const designStyle = ref({});
|
|
37
|
+
const designClass = ref("");
|
|
38
|
+
ref({});
|
|
39
|
+
const designProperty = ref({});
|
|
40
|
+
const menuVisible = ref(false);
|
|
41
|
+
props.configure.props.groupHeaders;
|
|
42
|
+
const listColumns = ref([]);
|
|
43
|
+
const tableRef = ref();
|
|
44
|
+
const hiddenColumsName = ref([]);
|
|
45
|
+
const statisticsTableStore = statisticsTable();
|
|
46
|
+
function getRestsParameter() {
|
|
47
|
+
let defineProps = props.configure.props;
|
|
48
|
+
if (!defineProps["base"]) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const tempProps = {};
|
|
52
|
+
if (defineProps["base"]["layout"]) {
|
|
53
|
+
tempProps["layout"] = defineProps["base"]["layout"].join(",");
|
|
54
|
+
}
|
|
55
|
+
if (defineProps["base"]["alignTittle"]) {
|
|
56
|
+
tempProps["alignTittle"] = defineProps["base"]["alignTittle"];
|
|
57
|
+
}
|
|
58
|
+
if (defineProps["base"]["alignContent"]) {
|
|
59
|
+
tempProps["alignContent"] = defineProps["base"]["alignContent"];
|
|
60
|
+
}
|
|
61
|
+
if (tempProps != {}) {
|
|
62
|
+
for (const tempPropsKey in tempProps) {
|
|
63
|
+
designProperty.value[tempPropsKey] = tempProps[tempPropsKey];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (props.configure) {
|
|
68
|
+
queryMyTableFields();
|
|
69
|
+
}
|
|
70
|
+
onMounted(() => {
|
|
71
|
+
listColumns.value = getColumnsWithGroupHeader(props.configure);
|
|
72
|
+
});
|
|
73
|
+
onUnmounted(() => {
|
|
74
|
+
removComponentDataConfig(props.configure);
|
|
75
|
+
});
|
|
76
|
+
eventBus.$on("setHiddenColumsName", (data) => {
|
|
77
|
+
if (!data.value) {
|
|
78
|
+
hiddenColumsName.value.push(data.name);
|
|
79
|
+
} else {
|
|
80
|
+
hiddenColumsName.value = hiddenColumsName.value.filter((item) => item != data.name);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
watch(
|
|
84
|
+
props.configure.style,
|
|
85
|
+
() => {
|
|
86
|
+
props.configure.runtime.style = props.configure.style;
|
|
87
|
+
},
|
|
88
|
+
{ immediate: true }
|
|
89
|
+
);
|
|
90
|
+
function updateDataConfig() {
|
|
91
|
+
const dataConfig = initComponentDataConfig(props.configure, null);
|
|
92
|
+
props.configure.runtime.dataConfig = dataConfig;
|
|
93
|
+
}
|
|
94
|
+
watch(
|
|
95
|
+
props.configure.props,
|
|
96
|
+
() => {
|
|
97
|
+
caculateComponentProps(props.configure, designProperty);
|
|
98
|
+
getRestsParameter();
|
|
99
|
+
props.configure.runtime.props = designProperty.value;
|
|
100
|
+
updateDataConfig();
|
|
101
|
+
},
|
|
102
|
+
{ immediate: true }
|
|
103
|
+
);
|
|
104
|
+
watch(props.configure.items, (newVal) => {
|
|
105
|
+
statisticsTableStore.addFieldList(newVal);
|
|
106
|
+
props.configure.runtime.items = props.configure.items;
|
|
107
|
+
console.log("%c描述-152233", "color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px", props.configure.items);
|
|
108
|
+
}, { immediate: true });
|
|
109
|
+
watch(
|
|
110
|
+
() => props.configure.props.isChangeGroupHeader,
|
|
111
|
+
() => {
|
|
112
|
+
if (props.configure.props.isChangeGroupHeader) {
|
|
113
|
+
listColumns.value = getColumnsWithGroupHeader(props.configure);
|
|
114
|
+
if (tableRef.value) {
|
|
115
|
+
tableRef.value.doLayout();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
eventBus.$on("reloadTable-" + props.configure.uuid, (columns) => {
|
|
121
|
+
if (columns) {
|
|
122
|
+
props.configure.items = columns;
|
|
123
|
+
listColumns.value = getColumnsWithGroupHeader(props.configure);
|
|
124
|
+
}
|
|
125
|
+
if (tableRef.value) {
|
|
126
|
+
tableRef.value.doLayout();
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
watch(
|
|
130
|
+
() => listColumns.value,
|
|
131
|
+
(newVal) => {
|
|
132
|
+
newVal.forEach((item) => {
|
|
133
|
+
if (item.props && item.props.base && !item.props.base.visible) {
|
|
134
|
+
hiddenColumsName.value.push(item.props.base.name);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
{ deep: true }
|
|
139
|
+
);
|
|
140
|
+
function onSelectWidget(selIndex, objConfigure) {
|
|
141
|
+
emit("onSelectWidget", selIndex, objConfigure);
|
|
142
|
+
}
|
|
143
|
+
function queryMyTableFields() {
|
|
144
|
+
const systemCode = props.configure.tableSysCode ? props.configure.tableSysCode : props.pageDesign.systemCode;
|
|
145
|
+
const systemVersion = props.configure.tableSysVersion ? props.configure.tableSysVersion : props.pageDesign.version;
|
|
146
|
+
const tableName = props.configure.props.dataOrigin.tableName;
|
|
147
|
+
queryTableFields(systemCode, systemVersion, tableName).then((tableFields) => {
|
|
148
|
+
props.configure.modelFieldsMap = changeFeieldToMap(props.configure.modelFieldsMap, tableFields);
|
|
149
|
+
props.configure.modelFields = tableFields;
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
const headerLabel = ref("");
|
|
153
|
+
function rowClick() {
|
|
154
|
+
headerLabel.value = "";
|
|
155
|
+
columnData.value = {};
|
|
156
|
+
closeMenuVisible();
|
|
157
|
+
let obj = {
|
|
158
|
+
columnData: {}
|
|
159
|
+
};
|
|
160
|
+
eventBus.$emit("selectColumn", obj);
|
|
161
|
+
}
|
|
162
|
+
function headerContextmenu(column, event) {
|
|
163
|
+
var evt = event || window.event;
|
|
164
|
+
evt.preventDefault();
|
|
165
|
+
getColumnData(column);
|
|
166
|
+
menuVisible.value = true;
|
|
167
|
+
const menu = document.querySelector("#tableDesignMenu");
|
|
168
|
+
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
169
|
+
menu.style.display = "block";
|
|
170
|
+
menu.style.left = event.clientX + 30 + "px";
|
|
171
|
+
menu.style.top = event.clientY + scrollTop - 22 + "px";
|
|
172
|
+
}
|
|
173
|
+
function closeMenuVisible() {
|
|
174
|
+
menuVisible.value = false;
|
|
175
|
+
}
|
|
176
|
+
function getColumnData(columnInfo) {
|
|
177
|
+
props.configure.items.forEach((Ttime, index) => {
|
|
178
|
+
if (Ttime.props.base.name == columnInfo.label) {
|
|
179
|
+
columnData.value = Ttime;
|
|
180
|
+
columnDataIndex.value = index;
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function operationalMenuFun(type) {
|
|
185
|
+
var _a;
|
|
186
|
+
closeMenuVisible();
|
|
187
|
+
if (type === "createCombinedHeader") {
|
|
188
|
+
const fieldInfo = {
|
|
189
|
+
alias: "字段名称",
|
|
190
|
+
displayOrder: columnData.value.props.base.displayOrder + 1
|
|
191
|
+
};
|
|
192
|
+
let newObj = getTableColumnConf(fieldInfo);
|
|
193
|
+
props.configure.items.splice(columnDataIndex.value + 1, 0, newObj);
|
|
194
|
+
(_a = props.configure.items) == null ? void 0 : _a.forEach((item, index) => {
|
|
195
|
+
if (!item.props.base.displayOrder || item.props.base.displayOrder != index) {
|
|
196
|
+
item.props.base.displayOrder = index;
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
if (props.configure.props.base.isEnableGroupHeader) {
|
|
200
|
+
addColumnToGroupHeaders(
|
|
201
|
+
props.configure.items[columnDataIndex.value + 1],
|
|
202
|
+
null,
|
|
203
|
+
props.configure.props.groupHeaders
|
|
204
|
+
);
|
|
205
|
+
listColumns.value = getColumnsWithGroupHeader(props.configure);
|
|
206
|
+
eventBus.$emit("synchroGroupHeadersData");
|
|
207
|
+
}
|
|
208
|
+
} else if (type === "deleteNode") {
|
|
209
|
+
ElMessageBox.confirm("当前操作会删除当前列", "确认", {
|
|
210
|
+
confirmButtonText: "确定",
|
|
211
|
+
cancelButtonText: "取消",
|
|
212
|
+
type: "warning"
|
|
213
|
+
}).then(() => {
|
|
214
|
+
console.log(
|
|
215
|
+
"%c描述-173127",
|
|
216
|
+
"color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px",
|
|
217
|
+
props.configure.props
|
|
218
|
+
);
|
|
219
|
+
console.log("%c描述-173140", "color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px", columnData.value);
|
|
220
|
+
props.configure.items.splice(columnDataIndex.value, 1);
|
|
221
|
+
}).catch(() => {
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
const columnData = ref({});
|
|
226
|
+
const columnDataIndex = ref(null);
|
|
227
|
+
function setColumnData(item) {
|
|
228
|
+
columnData.value = item;
|
|
229
|
+
}
|
|
230
|
+
function headerDragend(newWidth, oldWidth, column, event) {
|
|
231
|
+
let data = getColumnsConfigure(listColumns.value, column.columnKey);
|
|
232
|
+
data.props.base.columnWidth = newWidth;
|
|
233
|
+
}
|
|
234
|
+
function getColumnsConfigure(columnData2, uuid) {
|
|
235
|
+
let dataObj = {};
|
|
236
|
+
columnData2.forEach((item) => {
|
|
237
|
+
if (item.uuid && item.uuid === uuid) {
|
|
238
|
+
console.log("%c描述-193228", "color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px", item);
|
|
239
|
+
return dataObj = item;
|
|
240
|
+
}
|
|
241
|
+
if (item.children && item.children.length > 0) {
|
|
242
|
+
dataObj = getColumnsConfigure(item.children, uuid);
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
return dataObj;
|
|
246
|
+
}
|
|
247
|
+
function addClass({ row, column, rowIndex, columnIndex }) {
|
|
248
|
+
let className = "";
|
|
249
|
+
if (hiddenColumsName.value.includes(column.label)) {
|
|
250
|
+
className = "hiddenBorder";
|
|
251
|
+
}
|
|
252
|
+
if (column.label === headerLabel.value) {
|
|
253
|
+
className = "addBorder";
|
|
254
|
+
}
|
|
255
|
+
return className;
|
|
256
|
+
}
|
|
257
|
+
function setHeaderLabel(labelValue) {
|
|
258
|
+
headerLabel.value = labelValue;
|
|
259
|
+
}
|
|
260
|
+
function cellMouseEnter(row, column) {
|
|
261
|
+
var selrange = document.getElementsByClassName(column.id);
|
|
262
|
+
for (var i = 0; i < selrange.length; i++) {
|
|
263
|
+
selrange[i].style.backgroundColor = "rgba(88, 147, 239,.1)";
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
function cellMouseLeave(row, column) {
|
|
267
|
+
var selrange = document.getElementsByClassName(column.id);
|
|
268
|
+
for (var i = 0; i < selrange.length; i++) {
|
|
269
|
+
selrange[i].style.backgroundColor = "";
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
useDraggable(".el-table__header-wrapper tr", props.configure.items, {
|
|
273
|
+
animation: 150,
|
|
274
|
+
ghostClass: "ghost",
|
|
275
|
+
onStart(event) {
|
|
276
|
+
console.log(event);
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
return (_ctx, _cache) => {
|
|
280
|
+
const _component_el_table = resolveComponent("el-table");
|
|
281
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
282
|
+
return openBlock(), createElementBlock("div", null, [
|
|
283
|
+
createVNode(_component_el_table, {
|
|
284
|
+
ref_key: "tableRef",
|
|
285
|
+
ref: tableRef,
|
|
286
|
+
"cell-class-name": addClass,
|
|
287
|
+
"header-cell-class-name": addClass,
|
|
288
|
+
border: "",
|
|
289
|
+
class: normalizeClass(designClass.value),
|
|
290
|
+
data: tableData.value,
|
|
291
|
+
onHeaderDragend: headerDragend,
|
|
292
|
+
onHeaderContextmenu: headerContextmenu,
|
|
293
|
+
onRowClick: rowClick,
|
|
294
|
+
onCellMouseEnter: cellMouseEnter,
|
|
295
|
+
onCellMouseLeave: cellMouseLeave,
|
|
296
|
+
style: normalizeStyle(designStyle.value)
|
|
297
|
+
}, {
|
|
298
|
+
default: withCtx(() => [
|
|
299
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(listColumns.value, (item) => {
|
|
300
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
301
|
+
key: item,
|
|
302
|
+
listColumns: item,
|
|
303
|
+
designProperty: designProperty.value,
|
|
304
|
+
configure: _ctx.configure,
|
|
305
|
+
pageDesign: _ctx.pageDesign,
|
|
306
|
+
indexObj: _ctx.indexObj,
|
|
307
|
+
onSetHeaderLabel: setHeaderLabel,
|
|
308
|
+
onOnSelectWidget: onSelectWidget,
|
|
309
|
+
onSetColumnData: setColumnData,
|
|
310
|
+
onCloseMenuVisible: closeMenuVisible,
|
|
311
|
+
selectWidget: _ctx.selectWidget
|
|
312
|
+
}, null, 8, ["listColumns", "designProperty", "configure", "pageDesign", "indexObj", "selectWidget"]);
|
|
313
|
+
}), 128))
|
|
314
|
+
]),
|
|
315
|
+
_: 1
|
|
316
|
+
}, 8, ["class", "data", "style"]),
|
|
317
|
+
createElementVNode("div", {
|
|
318
|
+
onClick: rowClick,
|
|
319
|
+
style: { "width": "100%", "height": "30px" }
|
|
320
|
+
}),
|
|
321
|
+
withDirectives(createElementVNode("div", null, [
|
|
322
|
+
createElementVNode("ul", _hoisted_1, [
|
|
323
|
+
createElementVNode("li", {
|
|
324
|
+
tabindex: "-1",
|
|
325
|
+
onClick: _cache[0] || (_cache[0] = () => operationalMenuFun("createCombinedHeader"))
|
|
326
|
+
}, [
|
|
327
|
+
createVNode(_component_el_icon, null, {
|
|
328
|
+
default: withCtx(() => [
|
|
329
|
+
createVNode(unref(Plus))
|
|
330
|
+
]),
|
|
331
|
+
_: 1
|
|
332
|
+
}),
|
|
333
|
+
createTextVNode(" 创建 ")
|
|
334
|
+
]),
|
|
335
|
+
columnData.value.props && columnData.value.props.base && columnData.value.props.base.prop !== "$selection" && columnData.value.props.base.prop !== "$index" ? (openBlock(), createElementBlock("li", {
|
|
336
|
+
key: 0,
|
|
337
|
+
tabindex: "-1",
|
|
338
|
+
onClick: _cache[1] || (_cache[1] = () => operationalMenuFun("deleteNode"))
|
|
339
|
+
}, [
|
|
340
|
+
createVNode(_component_el_icon, null, {
|
|
341
|
+
default: withCtx(() => [
|
|
342
|
+
createVNode(unref(Delete))
|
|
343
|
+
]),
|
|
344
|
+
_: 1
|
|
345
|
+
}),
|
|
346
|
+
createTextVNode(" 删除 ")
|
|
347
|
+
])) : createCommentVNode("", true)
|
|
348
|
+
], 512)
|
|
349
|
+
], 512), [
|
|
350
|
+
[vShow, menuVisible.value]
|
|
351
|
+
])
|
|
352
|
+
]);
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
export {
|
|
357
|
+
_sfc_main as default
|
|
358
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -9,9 +9,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
setup(__props) {
|
|
12
|
-
const
|
|
12
|
+
const pageDesignContextUtil = usePageContextStore();
|
|
13
13
|
const props = __props;
|
|
14
|
-
const permissionOptions =
|
|
14
|
+
const permissionOptions = pageDesignContextUtil.getPagePermissionOptions();
|
|
15
15
|
const pMap = {};
|
|
16
16
|
for (let p of permissionOptions) {
|
|
17
17
|
pMap[p.value] = p;
|
|
@@ -33,7 +33,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
(_a = pageDesignUtil.pageContext.i18nKeys) == null ? void 0 : _a.push(value);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
if (enableI18n && localI18nKey.value && localI18nKey.value.trim() !== "") {
|
|
37
|
+
setI18nKey(localI18nKey.value);
|
|
38
|
+
}
|
|
37
39
|
const systemCode = ref(pageDesignUtil.pageContext.systemCode);
|
|
38
40
|
if (props.systemCode) {
|
|
39
41
|
systemCode.value = props.systemCode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, createElementBlock, createCommentVNode, withModifiers
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, unref, createElementBlock, createCommentVNode, withModifiers } from "vue";
|
|
2
2
|
import { Plus } from "@element-plus/icons-vue";
|
|
3
3
|
import { getToken } from "agilebuilder-ui/src/utils/auth";
|
|
4
4
|
const _hoisted_1 = { style: { "padding": "8px 0px 0px 0px" } };
|
|
@@ -74,6 +74,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
74
74
|
class: "avatar-uploader",
|
|
75
75
|
accept: "image/png, image/jpeg",
|
|
76
76
|
"with-credentials": true,
|
|
77
|
+
headers: { "Authorization": unref(token) },
|
|
77
78
|
action: uploadAction.value,
|
|
78
79
|
"show-file-list": false,
|
|
79
80
|
"on-success": handleAvatarSuccess,
|
|
@@ -107,7 +108,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
107
108
|
}))
|
|
108
109
|
]),
|
|
109
110
|
_: 1
|
|
110
|
-
}, 8, ["action"])
|
|
111
|
+
}, 8, ["headers", "action"])
|
|
111
112
|
]),
|
|
112
113
|
_: 1
|
|
113
114
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./common-variable-bind.vue3.js";
|
|
2
2
|
import "./common-variable-bind.vue2.js";
|
|
3
3
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const BindVariable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const BindVariable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8d11abea"]]);
|
|
5
5
|
export {
|
|
6
6
|
BindVariable as default
|
|
7
7
|
};
|