@gct-paas/core-web 0.1.6-dev.4 → 0.1.6-dev.6
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/ColorPicker-DGQQb8I7.js +1 -0
- package/dist/{_plugin-vue_export-helper-59SbqtUR.js → _plugin-vue_export-helper-C9hXqKoS.js} +1 -1
- package/dist/{de_DE-BnwOalCV.js → de_DE-B3f8kAv-.js} +1 -1
- package/dist/diagram-config-item-C5Ha2XJq.js +1 -0
- package/dist/diagram-config-item-reverse-ChoxnW-Z.js +1 -0
- package/dist/diagram-config-item-virtual-Cbmggfwt.js +1 -0
- package/dist/{en_US-6Hw6WWah.js → en_US-BSG3Kz6v.js} +1 -1
- package/dist/{es_ES-tAqXFGrR.js → es_ES-BGP8IOmQ.js} +1 -1
- package/dist/{fr_FR-BkDgVS_P.js → fr_FR-Y-6CzjUq.js} +1 -1
- package/dist/hooks-yX21uJ6d.js +1 -0
- package/dist/index.min.css +1 -1
- package/dist/{ja_JP-AsmV92nC.js → ja_JP-CDlH1v8M.js} +1 -1
- package/dist/loader.esm.min.js +1 -1
- package/dist/{monaco-editor-CgESUPw_.js → monaco-editor-BTqXEIZI.js} +1 -1
- package/dist/{pt_PT-CCVWOJzE.js → pt_PT-N-iIoE2_.js} +1 -1
- package/dist/relationship-diagram-config-DstwwXCO.js +1 -0
- package/dist/{ru_RU-w4sUgbzL.js → ru_RU--ESLRHrj.js} +1 -1
- package/dist/template-1ZQd8Z1w.js +1 -0
- package/dist/{tr_TR-CGZch3eB.js → tr_TR-BOIykdZO.js} +1 -1
- package/dist/{vi_VN-DONxIDR7.js → vi_VN-CmVoM2Rw.js} +1 -1
- package/dist/{zh_CN-BxdD8hqG.js → zh_CN-DhsO5Qwx.js} +1 -1
- package/dist/{zh_TW-D5Y8j-oG.js → zh_TW-DWdp2kVo.js} +1 -1
- package/es/components/UserPick/src/user-pick.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/components/base-button/base-button.vue.mjs +1 -1
- package/es/components/field-cascader/src/hooks.d.ts +1 -0
- package/es/components/label-design/modal/template.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/components/label-design/panels/modals/diff-modal.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/components/label-design/panels/panel.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/label-design/panels/widget/controls/labelTemplate.vue.mjs +2 -2
- package/es/components/label-design/panels/widget/controls/labelTemplate.vue_vue_type_script_setup_true_lang.mjs +1 -16
- package/es/components/label-design/panels/widget/controls/labelTemplate.vue_vue_type_style_index_0_scoped_c628d318_lang.css +10 -0
- package/es/components/label-design/stage/stage.vue.d.ts +9 -0
- package/es/components/label-design/stage/stage.vue.mjs +2 -2
- package/es/components/label-design/stage/stage.vue_vue_type_script_setup_true_lang.mjs +2 -1
- package/es/components/label-design/stage/{stage.vue_vue_type_style_index_0_scoped_53b1f897_lang.css → stage.vue_vue_type_style_index_0_scoped_9275e9fb_lang.css} +8 -8
- package/es/components/layout/view-container/view-container.d.ts +1 -11
- package/es/components/layout/view-container/view-container.mjs +10 -14
- package/es/create-app-vue.mjs +4 -2
- package/es/index.d.ts +4 -1
- package/es/index.mjs +31 -25
- package/es/modules/category/category-modal.vue.d.ts +11 -0
- package/es/modules/category/category-modal.vue.mjs +7 -0
- package/es/modules/category/category-modal.vue_vue_type_script_setup_true_name_category-modal_lang.mjs +53 -0
- package/es/modules/category/category-modal.vue_vue_type_style_index_0_scoped_b560615c_lang.css +67 -0
- package/es/modules/category/category-sider.vue.d.ts +337 -0
- package/es/modules/category/category-sider.vue.mjs +7 -0
- package/es/modules/category/category-sider.vue_vue_type_script_setup_true_name_category-sider_lang.mjs +239 -0
- package/es/modules/category/category-sider.vue_vue_type_style_index_0_scoped_5af8c1ba_lang.css +211 -0
- package/es/modules/category/hooks/useCategory.d.ts +20 -0
- package/es/modules/category/hooks/useCategory.mjs +139 -0
- package/es/modules/category/index.d.ts +2 -0
- package/es/modules/category/index.mjs +2 -0
- package/es/modules/category/type.d.ts +8 -0
- package/es/modules/color-picker/src/color-editor.vue.mjs +1 -1
- package/es/modules/gct-form/controller/form-item-basic/form-item-basic.controller.mjs +2 -0
- package/es/modules/gct-form/controller/gct-form/gct-form.controller.mjs +1 -0
- package/es/modules/gct-table/controller/gct-table/gct-table.controller.mjs +1 -0
- package/es/modules/gct-table/controller/table-item/table-item.controller.mjs +2 -0
- package/es/modules/gct-table/controller/table-row/table-row.controller.mjs +3 -0
- package/es/modules/global-modal/src/components/ModalWrapper.vue_vue_type_script_lang.mjs +1 -4
- package/es/modules/print-tmpl/icon-print-folder.svg.mjs +4 -0
- package/es/modules/print-tmpl/icon-print-printer.svg.mjs +4 -0
- package/es/modules/print-tmpl/index.d.ts +2 -0
- package/es/modules/print-tmpl/index.mjs +1 -0
- package/es/modules/print-tmpl/print-tmpl-modal.vue.d.ts +31 -0
- package/es/modules/print-tmpl/print-tmpl-modal.vue.mjs +7 -0
- package/es/modules/print-tmpl/print-tmpl-modal.vue_vue_type_script_setup_true_name_print-tmpl-modal_lang.mjs +593 -0
- package/es/modules/print-tmpl/print-tmpl-modal.vue_vue_type_style_index_0_scoped_c60841b8_lang.css +143 -0
- package/es/modules/relationship-diagram-config/cache.controller.d.ts +70 -0
- package/es/modules/relationship-diagram-config/cache.controller.mjs +128 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.css +123 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.d.ts +381 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.mjs +98 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.css +71 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.d.ts +28 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.mjs +53 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-info/diagram-config-item-info.d.ts +27 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-info/diagram-config-item-info.mjs +2 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.css +107 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.d.ts +34 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.mjs +198 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.css +68 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.d.ts +31 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.mjs +53 -0
- package/es/modules/relationship-diagram-config/components/index.d.ts +5 -0
- package/es/modules/relationship-diagram-config/components/index.mjs +5 -0
- package/es/modules/relationship-diagram-config/constant/index.d.ts +72 -0
- package/es/modules/relationship-diagram-config/constant/index.mjs +70 -0
- package/es/modules/relationship-diagram-config/hooks/index.d.ts +10 -0
- package/es/modules/relationship-diagram-config/hooks/index.mjs +19 -0
- package/es/modules/relationship-diagram-config/index.d.ts +6 -0
- package/es/modules/relationship-diagram-config/index.mjs +28 -0
- package/es/modules/relationship-diagram-config/interface/i-link-provider/i-link-provider.d.ts +57 -0
- package/es/modules/relationship-diagram-config/interface/i-node-provider/i-node-provider.d.ts +18 -0
- package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-link/i-relationship-diagram-link.d.ts +80 -0
- package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-node/i-relationship-diagram-node.d.ts +82 -0
- package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-options/i-relationship-diagram-options.d.ts +51 -0
- package/es/modules/relationship-diagram-config/interface/i-rule-config/i-rule-config.d.ts +135 -0
- package/es/modules/relationship-diagram-config/interface/index.d.ts +6 -0
- package/es/modules/relationship-diagram-config/link.controller.d.ts +75 -0
- package/es/modules/relationship-diagram-config/link.controller.mjs +121 -0
- package/es/modules/relationship-diagram-config/node.controller.d.ts +102 -0
- package/es/modules/relationship-diagram-config/node.controller.mjs +189 -0
- package/es/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.d.ts +23 -0
- package/es/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.mjs +33 -0
- package/es/modules/relationship-diagram-config/plumb-plugin/blank-endpoint-renderer.d.ts +1 -0
- package/es/modules/relationship-diagram-config/plumb-plugin/blank-endpoint-renderer.mjs +27 -0
- package/es/modules/relationship-diagram-config/plumb-plugin/index.d.ts +3 -0
- package/es/modules/relationship-diagram-config/plumb-plugin/index.mjs +2 -0
- package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.css +132 -0
- package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.d.ts +21 -0
- package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.mjs +184 -0
- package/es/modules/relationship-diagram-config/providers/default-node-provider/default-node-provider.d.ts +14 -0
- package/es/modules/relationship-diagram-config/providers/default-node-provider/default-node-provider.mjs +17 -0
- package/es/modules/relationship-diagram-config/providers/index.d.ts +5 -0
- package/es/modules/relationship-diagram-config/providers/index.mjs +5 -0
- package/es/modules/relationship-diagram-config/providers/reverse-node-provider/reverse-node-provider.d.ts +14 -0
- package/es/modules/relationship-diagram-config/providers/reverse-node-provider/reverse-node-provider.mjs +17 -0
- package/es/modules/relationship-diagram-config/providers/virtual-link-provider/virtual-link-provider.d.ts +16 -0
- package/es/modules/relationship-diagram-config/providers/virtual-link-provider/virtual-link-provider.mjs +26 -0
- package/es/modules/relationship-diagram-config/providers/virtual-node-provider/virtual-node-provider.d.ts +14 -0
- package/es/modules/relationship-diagram-config/providers/virtual-node-provider/virtual-node-provider.mjs +17 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.controller.d.ts +119 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.controller.mjs +199 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.css +113 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.d.ts +102 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.mjs +104 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.state.d.ts +44 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.state.mjs +46 -0
- package/es/modules/relationship-diagram-config/utils/index.d.ts +1 -0
- package/es/modules/relationship-diagram-config/utils/register/register.d.ts +71 -0
- package/es/modules/relationship-diagram-config/utils/register/register.mjs +81 -0
- package/es/utils/recursive.mjs +1 -0
- package/package.json +10 -9
- package/dist/components-4-8OfvJi.js +0 -1
- package/dist/template-Cf-wq8-9.js +0 -1
- package/es/components/label-design/panels/widget/controls/labelTemplate.vue_vue_type_style_index_0_scoped_992e00bb_lang.css +0 -10
- /package/dist/{JsBarcode-DlXSdlvD.js → JsBarcode-DY53cVJ6.js} +0 -0
- /package/dist/{cropper-tw7tUDDe.js → cropper-DK_hFgpO.js} +0 -0
- /package/dist/{icon-next-picker-B_S_yInJ.js → icon-next-picker-DYiHqnNR.js} +0 -0
- /package/dist/{objectSpread2-DxfE1S3_.js → objectSpread2-DARadIQB.js} +0 -0
- /package/dist/{overlayscrollbars-vue-DtKFrHnA.js → overlayscrollbars-vue-Df-3wShc.js} +0 -0
- /package/dist/{rich-editor-K2Pv0Uja.js → rich-editor-DVOriJH0.js} +0 -0
- /package/dist/{useMonacoEditor-BO2ALW-7.js → useMonacoEditor-DqSQTg7b.js} +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
3
|
+
/* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
|
|
4
|
+
/**
|
|
5
|
+
* 定义 Block 块
|
|
6
|
+
* @param {String} $block - Block 块名称
|
|
7
|
+
* @example
|
|
8
|
+
* @include b('button') {
|
|
9
|
+
* padding: 10px;
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 定义 Element 元素
|
|
14
|
+
* @param {String|List} $element - Element 元素名称,支持单个或多个
|
|
15
|
+
* @example
|
|
16
|
+
* @include b('button') {
|
|
17
|
+
* @include e('text') {
|
|
18
|
+
* color: #000;
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* // 或传入多个元素
|
|
22
|
+
* @include b('button') {
|
|
23
|
+
* @include e(('text', 'icon')) {
|
|
24
|
+
* margin: 5px;
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* 定义 Modifier 修饰符
|
|
30
|
+
* @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
|
|
31
|
+
* @example
|
|
32
|
+
* @include b('button') {
|
|
33
|
+
* @include m('primary') {
|
|
34
|
+
* background: blue;
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* // 或传入多个修饰符
|
|
38
|
+
* @include b('button') {
|
|
39
|
+
* @include m(('primary', 'large')) {
|
|
40
|
+
* background: blue;
|
|
41
|
+
* font-size: 16px;
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* 定义状态选择器
|
|
47
|
+
* @param {String} $state - 状态名称
|
|
48
|
+
* @example
|
|
49
|
+
* @include b('button') {
|
|
50
|
+
* @include when('disabled') {
|
|
51
|
+
* opacity: 0.5;
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* 深色主题样式
|
|
57
|
+
* @param {String} $block - Block 块名称
|
|
58
|
+
* @example
|
|
59
|
+
* @include dark('button') {
|
|
60
|
+
* background: #333;
|
|
61
|
+
* color: #fff;
|
|
62
|
+
* }
|
|
63
|
+
*/
|
|
64
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
65
|
+
.gct-diagram-config-item-reverse {
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
border: 1px solid #E8EBF0;
|
|
69
|
+
border-radius: 4px;
|
|
70
|
+
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.06);
|
|
71
|
+
}
|
|
72
|
+
.gct-diagram-config-item-reverse__title {
|
|
73
|
+
height: 32px;
|
|
74
|
+
padding: 8px 12px;
|
|
75
|
+
font-size: 14px;
|
|
76
|
+
line-height: 22px;
|
|
77
|
+
color: #212528;
|
|
78
|
+
}
|
|
79
|
+
.gct-diagram-config-item-reverse__title .ant-select {
|
|
80
|
+
min-width: 100px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.gct-diagram-config-item-reverse__select {
|
|
84
|
+
height: 50px;
|
|
85
|
+
padding: 7px 12px;
|
|
86
|
+
}
|
|
87
|
+
.gct-diagram-config-item-reverse__select .ant-select {
|
|
88
|
+
width: 152px;
|
|
89
|
+
}
|
|
90
|
+
.gct-diagram-config-item-reverse__select .ant-select .ant-select-selector {
|
|
91
|
+
background-color: #F7F8FA;
|
|
92
|
+
}
|
|
93
|
+
.gct-diagram-config-item-reverse__select .ant-select .ant-select-selector .ant-select-selection-placeholder {
|
|
94
|
+
color: #C3C3C3;
|
|
95
|
+
}
|
|
96
|
+
.gct-diagram-config-item-reverse__select.is-select .ant-select-selector {
|
|
97
|
+
border-color: #3168EC !important;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.gct-diagram-config-item-reverse__model-select {
|
|
101
|
+
padding: 4.5px 8px;
|
|
102
|
+
background-color: #F7F8FA;
|
|
103
|
+
}
|
|
104
|
+
.gct-diagram-config-item-reverse__model-select .ant-select .ant-select-selector {
|
|
105
|
+
background-color: transparent;
|
|
106
|
+
border: 0;
|
|
107
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IRelationshipDiagramNode } from '../../interface';
|
|
3
|
+
/**
|
|
4
|
+
* 节点容器
|
|
5
|
+
*/
|
|
6
|
+
export declare const DiagramConfigItemReverse: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
7
|
+
i: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
data: {
|
|
12
|
+
type: PropType<IRelationshipDiagramNode>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}>, {
|
|
16
|
+
ns: import('@gct-paas/core').Namespace;
|
|
17
|
+
modelSelect: import('vue').Ref<string | null, string | null>;
|
|
18
|
+
select: import('vue').Ref<string | null, string | null>;
|
|
19
|
+
modelOptions: import('vue').Ref<IData[], IData[]>;
|
|
20
|
+
options: import('vue').Ref<IData[], IData[]>;
|
|
21
|
+
onModelChange: (value: string | null, _: IObject) => void;
|
|
22
|
+
onChange: (value: string | null, _: IObject) => void;
|
|
23
|
+
onModelFocus: () => Promise<void>;
|
|
24
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
25
|
+
i: {
|
|
26
|
+
type: NumberConstructor;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
data: {
|
|
30
|
+
type: PropType<IRelationshipDiagramNode>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
34
|
+
export default DiagramConfigItemReverse;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { LinkType, NodeType } from "../../constant/index.mjs";
|
|
2
|
+
import { useRootController } from "../../hooks/index.mjs";
|
|
3
|
+
import './diagram-config-item-reverse.css';/* empty css */
|
|
4
|
+
import { createVNode, defineComponent, ref, resolveComponent, watch } from "vue";
|
|
5
|
+
import { clone } from "lodash-es";
|
|
6
|
+
import { t, useNamespace } from "@gct-paas/core";
|
|
7
|
+
//#region src/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.tsx
|
|
8
|
+
/**
|
|
9
|
+
* 节点容器
|
|
10
|
+
*/
|
|
11
|
+
var DiagramConfigItemReverse = /* @__PURE__ */ defineComponent({
|
|
12
|
+
name: "DiagramConfigItemReverse",
|
|
13
|
+
props: {
|
|
14
|
+
i: {
|
|
15
|
+
type: Number,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
data: {
|
|
19
|
+
type: Object,
|
|
20
|
+
required: true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(props) {
|
|
24
|
+
const ns = useNamespace("diagram-config-item-reverse");
|
|
25
|
+
const c = useRootController();
|
|
26
|
+
const models = ref([]);
|
|
27
|
+
const modelSelect = ref(props.data.modelKey || null);
|
|
28
|
+
const select = ref(props.data.value || null);
|
|
29
|
+
const modelOptions = ref([]);
|
|
30
|
+
const options = ref([]);
|
|
31
|
+
watch(props.data, () => {
|
|
32
|
+
modelSelect.value = props.data.modelKey || null;
|
|
33
|
+
select.value = props.data.value || null;
|
|
34
|
+
redrawConnect();
|
|
35
|
+
});
|
|
36
|
+
const onModelChange = (value, _) => {
|
|
37
|
+
options.value = [];
|
|
38
|
+
modelSelect.value = value;
|
|
39
|
+
select.value = null;
|
|
40
|
+
const cloneData = clone(props.data);
|
|
41
|
+
c.node.cache.reverseClear(cloneData);
|
|
42
|
+
c.node.update(Object.assign(cloneData, {
|
|
43
|
+
modelKey: value ?? null,
|
|
44
|
+
modelCategory: _ ? _.data.modelCategory ?? "entity" : "entity",
|
|
45
|
+
value: null,
|
|
46
|
+
label: null
|
|
47
|
+
}));
|
|
48
|
+
if (value) c.node.cache.reverseReset(cloneData);
|
|
49
|
+
options.value = [];
|
|
50
|
+
fillFieldsOptions(_);
|
|
51
|
+
updateBeforeState();
|
|
52
|
+
updateAfterState();
|
|
53
|
+
redrawConnect();
|
|
54
|
+
};
|
|
55
|
+
const fillFieldsOptions = (_) => {
|
|
56
|
+
if (_) {
|
|
57
|
+
const data = _.data;
|
|
58
|
+
if (data.fieldMetaList) options.value = data.fieldMetaList.map((item) => {
|
|
59
|
+
return {
|
|
60
|
+
label: item.name,
|
|
61
|
+
value: item.key,
|
|
62
|
+
data: item
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const onChange = (value, _) => {
|
|
68
|
+
select.value = value;
|
|
69
|
+
const cloneData = clone(props.data);
|
|
70
|
+
if (cloneData.value) c.node.cache.clear(cloneData);
|
|
71
|
+
if (value) c.node.update(Object.assign(cloneData, {
|
|
72
|
+
value,
|
|
73
|
+
label: _.label
|
|
74
|
+
}));
|
|
75
|
+
else c.node.update(Object.assign(cloneData, {
|
|
76
|
+
value: null,
|
|
77
|
+
label: null
|
|
78
|
+
}));
|
|
79
|
+
if (value) c.node.cache.reset(cloneData);
|
|
80
|
+
updateBeforeState();
|
|
81
|
+
updateAfterState();
|
|
82
|
+
redrawConnect();
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* 更新后一个节点的状态
|
|
86
|
+
*
|
|
87
|
+
* @author zhanghanrui
|
|
88
|
+
* @date 2024-06-28 15:06:19
|
|
89
|
+
*/
|
|
90
|
+
const updateAfterState = async () => {
|
|
91
|
+
if (select.value) {
|
|
92
|
+
if (c.link.getByTarget(props.data.id)) return;
|
|
93
|
+
const items = await c.getModelList(modelSelect.value, select.value);
|
|
94
|
+
if (items && items.length > 0) c.node.create({
|
|
95
|
+
type: NodeType.REVERSE,
|
|
96
|
+
reverse: true
|
|
97
|
+
}, {
|
|
98
|
+
type: LinkType.VIRTUAL,
|
|
99
|
+
reverse: true,
|
|
100
|
+
dashed: true
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* 更新前一个节点的状态
|
|
106
|
+
*
|
|
107
|
+
* @author zhanghanrui
|
|
108
|
+
* @date 2024-06-28 14:06:53
|
|
109
|
+
*/
|
|
110
|
+
const updateBeforeState = () => {
|
|
111
|
+
const link = c.link.getBySource(props.data.id);
|
|
112
|
+
if (link) {
|
|
113
|
+
const node = c.node.get(link.target, 0, true);
|
|
114
|
+
if (node && node.type === NodeType.DEFAULT) if (select.value) c.node.update(Object.assign(node, {
|
|
115
|
+
value: null,
|
|
116
|
+
label: null,
|
|
117
|
+
noSelectField: true
|
|
118
|
+
}));
|
|
119
|
+
else c.node.update(Object.assign(node, {
|
|
120
|
+
value: null,
|
|
121
|
+
label: null,
|
|
122
|
+
noSelectField: false
|
|
123
|
+
}));
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
const redrawConnect = () => {
|
|
127
|
+
const link = c.link.getBySource(props.data.id);
|
|
128
|
+
if (link) {
|
|
129
|
+
const l = clone(link);
|
|
130
|
+
if (select.value) l.type = LinkType.DEFAULT;
|
|
131
|
+
else l.type = LinkType.VIRTUAL;
|
|
132
|
+
c.link.update(l);
|
|
133
|
+
const node = c.node.get(link.target);
|
|
134
|
+
if (node) c.node.update({
|
|
135
|
+
...node,
|
|
136
|
+
noSelectField: true
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
const onModelFocus = async () => {
|
|
141
|
+
const link = c.link.getBySource(props.data.id);
|
|
142
|
+
if (link) {
|
|
143
|
+
const targetNode = c.node.get(link.target);
|
|
144
|
+
if (targetNode) {
|
|
145
|
+
models.value = await c.getModelList(targetNode.modelKey, targetNode.value);
|
|
146
|
+
modelOptions.value = models.value.map((item) => {
|
|
147
|
+
return {
|
|
148
|
+
value: item.key,
|
|
149
|
+
label: item.name,
|
|
150
|
+
data: item
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
const load = async () => {
|
|
157
|
+
if (props.data.modelKey) {
|
|
158
|
+
await onModelFocus();
|
|
159
|
+
const opt = modelOptions.value.find((item) => {
|
|
160
|
+
return item.value === props.data.modelKey;
|
|
161
|
+
});
|
|
162
|
+
if (opt) fillFieldsOptions(opt);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
load();
|
|
166
|
+
return {
|
|
167
|
+
ns,
|
|
168
|
+
modelSelect,
|
|
169
|
+
select,
|
|
170
|
+
modelOptions,
|
|
171
|
+
options,
|
|
172
|
+
onModelChange,
|
|
173
|
+
onChange,
|
|
174
|
+
onModelFocus
|
|
175
|
+
};
|
|
176
|
+
},
|
|
177
|
+
render() {
|
|
178
|
+
return createVNode("div", { "class": this.ns.b() }, [createVNode("div", { "class": [this.ns.e("title"), this.ns.e("model-select")] }, [createVNode(resolveComponent("a-select"), {
|
|
179
|
+
"size": "small",
|
|
180
|
+
"allowClear": true,
|
|
181
|
+
"placeholder": t("sys.pageDesigner.selectModel"),
|
|
182
|
+
"value": this.modelSelect,
|
|
183
|
+
"options": this.modelOptions,
|
|
184
|
+
"onChange": (val, o) => this.onModelChange(val, o),
|
|
185
|
+
"onFocus": () => this.onModelFocus()
|
|
186
|
+
}, null)]), createVNode("div", { "class": [this.ns.e("select")] }, [createVNode(resolveComponent("a-select"), {
|
|
187
|
+
"class": "handle-select",
|
|
188
|
+
"allowClear": true,
|
|
189
|
+
"placeholder": t("sys.pageDesigner.dataLinkage.selectPlaceholder"),
|
|
190
|
+
"value": this.select,
|
|
191
|
+
"options": this.options,
|
|
192
|
+
"onChange": (val, o) => this.onChange(val, o),
|
|
193
|
+
"disabled": !this.modelSelect
|
|
194
|
+
}, null)])]);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
//#endregion
|
|
198
|
+
export { DiagramConfigItemReverse, DiagramConfigItemReverse as default };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
3
|
+
/* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
|
|
4
|
+
/**
|
|
5
|
+
* 定义 Block 块
|
|
6
|
+
* @param {String} $block - Block 块名称
|
|
7
|
+
* @example
|
|
8
|
+
* @include b('button') {
|
|
9
|
+
* padding: 10px;
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 定义 Element 元素
|
|
14
|
+
* @param {String|List} $element - Element 元素名称,支持单个或多个
|
|
15
|
+
* @example
|
|
16
|
+
* @include b('button') {
|
|
17
|
+
* @include e('text') {
|
|
18
|
+
* color: #000;
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* // 或传入多个元素
|
|
22
|
+
* @include b('button') {
|
|
23
|
+
* @include e(('text', 'icon')) {
|
|
24
|
+
* margin: 5px;
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* 定义 Modifier 修饰符
|
|
30
|
+
* @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
|
|
31
|
+
* @example
|
|
32
|
+
* @include b('button') {
|
|
33
|
+
* @include m('primary') {
|
|
34
|
+
* background: blue;
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* // 或传入多个修饰符
|
|
38
|
+
* @include b('button') {
|
|
39
|
+
* @include m(('primary', 'large')) {
|
|
40
|
+
* background: blue;
|
|
41
|
+
* font-size: 16px;
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* 定义状态选择器
|
|
47
|
+
* @param {String} $state - 状态名称
|
|
48
|
+
* @example
|
|
49
|
+
* @include b('button') {
|
|
50
|
+
* @include when('disabled') {
|
|
51
|
+
* opacity: 0.5;
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* 深色主题样式
|
|
57
|
+
* @param {String} $block - Block 块名称
|
|
58
|
+
* @example
|
|
59
|
+
* @include dark('button') {
|
|
60
|
+
* background: #333;
|
|
61
|
+
* color: #fff;
|
|
62
|
+
* }
|
|
63
|
+
*/
|
|
64
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
65
|
+
.gct-diagram-config-item-virtual {
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 最后一个虚拟节点
|
|
3
|
+
*/
|
|
4
|
+
export declare const DiagramConfigItemVirtual: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
|
+
i: {
|
|
6
|
+
type: NumberConstructor;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
beforeNodeId: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
id: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
18
|
+
i: {
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
beforeNodeId: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
id: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
31
|
+
export default DiagramConfigItemVirtual;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { LinkType } from "../../constant/index.mjs";
|
|
2
|
+
import { useRootController } from "../../hooks/index.mjs";
|
|
3
|
+
import './diagram-config-item-virtual.css';/* empty css */
|
|
4
|
+
import { createVNode, defineComponent, nextTick, onMounted, onUnmounted } from "vue";
|
|
5
|
+
import { createUUID } from "qx-util";
|
|
6
|
+
import { useNamespace } from "@gct-paas/core";
|
|
7
|
+
//#region src/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.tsx
|
|
8
|
+
/**
|
|
9
|
+
* 最后一个虚拟节点
|
|
10
|
+
*/
|
|
11
|
+
var DiagramConfigItemVirtual = /* @__PURE__ */ defineComponent({
|
|
12
|
+
name: "DiagramConfigItemVirtual",
|
|
13
|
+
props: {
|
|
14
|
+
i: {
|
|
15
|
+
type: Number,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
beforeNodeId: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true
|
|
21
|
+
},
|
|
22
|
+
id: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: true
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
setup(props) {
|
|
28
|
+
const ns = useNamespace("diagram-config-item-virtual");
|
|
29
|
+
const c = useRootController();
|
|
30
|
+
const link = {
|
|
31
|
+
id: createUUID(),
|
|
32
|
+
i: props.i - 1,
|
|
33
|
+
source: props.beforeNodeId,
|
|
34
|
+
target: props.id,
|
|
35
|
+
type: LinkType.VIRTUAL,
|
|
36
|
+
return: props.i % c.config.lineCount === 0,
|
|
37
|
+
startLine: Math.floor((props.i - 1) / 3) + 1
|
|
38
|
+
};
|
|
39
|
+
onMounted(() => {
|
|
40
|
+
nextTick(() => {
|
|
41
|
+
c.connect(link);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
onUnmounted(() => {
|
|
45
|
+
c.disconnect(link);
|
|
46
|
+
});
|
|
47
|
+
return () => {
|
|
48
|
+
return createVNode("div", { "class": ns.b() }, null);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
//#endregion
|
|
53
|
+
export { DiagramConfigItemVirtual, DiagramConfigItemVirtual as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DiagramConfigItem } from './diagram-config-item/diagram-config-item';
|
|
2
|
+
export { DiagramConfigItemContainer } from './diagram-config-item-container/diagram-config-item-container';
|
|
3
|
+
export { DiagramConfigItemReverse } from './diagram-config-item-reverse/diagram-config-item-reverse';
|
|
4
|
+
export { DiagramConfigItemInfo } from './diagram-config-item-info/diagram-config-item-info';
|
|
5
|
+
export { DiagramConfigItemVirtual } from './diagram-config-item-virtual/diagram-config-item-virtual';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "./diagram-config-item/diagram-config-item.mjs";
|
|
2
|
+
import "./diagram-config-item-container/diagram-config-item-container.mjs";
|
|
3
|
+
import "./diagram-config-item-reverse/diagram-config-item-reverse.mjs";
|
|
4
|
+
import "./diagram-config-item-info/diagram-config-item-info.mjs";
|
|
5
|
+
import "./diagram-config-item-virtual/diagram-config-item-virtual.mjs";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 连线方向
|
|
3
|
+
*
|
|
4
|
+
* @author zhanghanrui
|
|
5
|
+
* @date 2024-06-30 13:06:37
|
|
6
|
+
* @export
|
|
7
|
+
*/
|
|
8
|
+
export declare const ConnectionDirection: {
|
|
9
|
+
/**
|
|
10
|
+
* 正向
|
|
11
|
+
*/
|
|
12
|
+
readonly FORWARD: "forward";
|
|
13
|
+
/**
|
|
14
|
+
* 反向
|
|
15
|
+
*/
|
|
16
|
+
readonly REVERSE: "reverse";
|
|
17
|
+
};
|
|
18
|
+
export type ConnectionDirection = (typeof ConnectionDirection)[keyof typeof ConnectionDirection];
|
|
19
|
+
/**
|
|
20
|
+
* 控制器标识
|
|
21
|
+
*
|
|
22
|
+
* @author zhanghanrui
|
|
23
|
+
* @date 2024-06-25 09:06:57
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
export declare const ControllerTag: {
|
|
27
|
+
/**
|
|
28
|
+
* 根节点控制器标识
|
|
29
|
+
*/
|
|
30
|
+
readonly ROOT: "root-controller";
|
|
31
|
+
};
|
|
32
|
+
export type ControllerTag = (typeof ControllerTag)[keyof typeof ControllerTag];
|
|
33
|
+
/**
|
|
34
|
+
* 连线类型
|
|
35
|
+
*
|
|
36
|
+
* @author zhanghanrui
|
|
37
|
+
* @date 2024-06-25 19:06:26
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const LinkType: {
|
|
41
|
+
/**
|
|
42
|
+
* 默认连线
|
|
43
|
+
*/
|
|
44
|
+
readonly DEFAULT: "default";
|
|
45
|
+
/**
|
|
46
|
+
* 虚拟连线
|
|
47
|
+
*/
|
|
48
|
+
readonly VIRTUAL: "virtual";
|
|
49
|
+
};
|
|
50
|
+
export type LinkType = (typeof LinkType)[keyof typeof LinkType];
|
|
51
|
+
/**
|
|
52
|
+
* 节点类型
|
|
53
|
+
*
|
|
54
|
+
* @author zhanghanrui
|
|
55
|
+
* @date 2024-06-25 20:06:44
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export declare const NodeType: {
|
|
59
|
+
/**
|
|
60
|
+
* 默认节点
|
|
61
|
+
*/
|
|
62
|
+
readonly DEFAULT: "default";
|
|
63
|
+
/**
|
|
64
|
+
* 虚拟节点
|
|
65
|
+
*/
|
|
66
|
+
readonly VIRTUAL: "virtual";
|
|
67
|
+
/**
|
|
68
|
+
* 反转节点
|
|
69
|
+
*/
|
|
70
|
+
readonly REVERSE: "reverse";
|
|
71
|
+
};
|
|
72
|
+
export type NodeType = (typeof NodeType)[keyof typeof NodeType];
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
//#region src/modules/relationship-diagram-config/constant/index.ts
|
|
2
|
+
/**
|
|
3
|
+
* 连线方向
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-06-30 13:06:37
|
|
7
|
+
* @export
|
|
8
|
+
*/
|
|
9
|
+
var ConnectionDirection = {
|
|
10
|
+
/**
|
|
11
|
+
* 正向
|
|
12
|
+
*/
|
|
13
|
+
FORWARD: "forward",
|
|
14
|
+
/**
|
|
15
|
+
* 反向
|
|
16
|
+
*/
|
|
17
|
+
REVERSE: "reverse"
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 控制器标识
|
|
21
|
+
*
|
|
22
|
+
* @author zhanghanrui
|
|
23
|
+
* @date 2024-06-25 09:06:57
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
var ControllerTag = {
|
|
27
|
+
/**
|
|
28
|
+
* 根节点控制器标识
|
|
29
|
+
*/
|
|
30
|
+
ROOT: "root-controller" };
|
|
31
|
+
/**
|
|
32
|
+
* 连线类型
|
|
33
|
+
*
|
|
34
|
+
* @author zhanghanrui
|
|
35
|
+
* @date 2024-06-25 19:06:26
|
|
36
|
+
* @export
|
|
37
|
+
*/
|
|
38
|
+
var LinkType = {
|
|
39
|
+
/**
|
|
40
|
+
* 默认连线
|
|
41
|
+
*/
|
|
42
|
+
DEFAULT: "default",
|
|
43
|
+
/**
|
|
44
|
+
* 虚拟连线
|
|
45
|
+
*/
|
|
46
|
+
VIRTUAL: "virtual"
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* 节点类型
|
|
50
|
+
*
|
|
51
|
+
* @author zhanghanrui
|
|
52
|
+
* @date 2024-06-25 20:06:44
|
|
53
|
+
* @export
|
|
54
|
+
*/
|
|
55
|
+
var NodeType = {
|
|
56
|
+
/**
|
|
57
|
+
* 默认节点
|
|
58
|
+
*/
|
|
59
|
+
DEFAULT: "default",
|
|
60
|
+
/**
|
|
61
|
+
* 虚拟节点
|
|
62
|
+
*/
|
|
63
|
+
VIRTUAL: "virtual",
|
|
64
|
+
/**
|
|
65
|
+
* 反转节点
|
|
66
|
+
*/
|
|
67
|
+
REVERSE: "reverse"
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
export { ConnectionDirection, ControllerTag, LinkType, NodeType };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RelationshipDiagramConfigController } from '../relationship-diagram-config.controller';
|
|
2
|
+
/**
|
|
3
|
+
* 获取根控制器实例
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-06-25 09:06:08
|
|
7
|
+
* @export
|
|
8
|
+
* @return {*} {RelationshipDiagramConfigController}
|
|
9
|
+
*/
|
|
10
|
+
export declare function useRootController(): RelationshipDiagramConfigController;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ControllerTag } from "../constant/index.mjs";
|
|
2
|
+
import "../relationship-diagram-config.controller.mjs";
|
|
3
|
+
import { inject } from "vue";
|
|
4
|
+
//#region src/modules/relationship-diagram-config/hooks/index.ts
|
|
5
|
+
/**
|
|
6
|
+
* 获取根控制器实例
|
|
7
|
+
*
|
|
8
|
+
* @author zhanghanrui
|
|
9
|
+
* @date 2024-06-25 09:06:08
|
|
10
|
+
* @export
|
|
11
|
+
* @return {*} {RelationshipDiagramConfigController}
|
|
12
|
+
*/
|
|
13
|
+
function useRootController() {
|
|
14
|
+
const rootController = inject(ControllerTag.ROOT);
|
|
15
|
+
if (!rootController) throw new Error("root controller not found");
|
|
16
|
+
return rootController;
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { useRootController };
|