@gct-paas/core-web 0.1.6-dev.5 → 0.1.6-dev.7
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-DFKXqgaG.js +1 -0
- package/dist/_plugin-vue_export-helper-CGzGcWFX.js +1 -0
- 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-CQJ9TMzD.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-CXn8oAg5.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/index.d.ts +1 -0
- package/es/components/index.mjs +2 -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/ImageData.vue.mjs +2 -2
- package/es/components/label-design/panels/widget/controls/ImageData.vue_vue_type_script_setup_true_name_image-data_lang.mjs +2 -2
- package/es/components/label-design/panels/widget/controls/ImageData.vue_vue_type_style_index_0_scoped_9232a443_lang.css +3 -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/components/paas-bpmn-log/components/approval-node.vue.mjs +2 -2
- package/es/components/paas-bpmn-log/components/approval-node.vue_vue_type_script_setup_true_lang.mjs +1 -2
- package/es/components/paas-bpmn-log/components/{approval-node.vue_vue_type_style_index_0_scoped_a88d7ef9_lang.css → approval-node.vue_vue_type_style_index_0_scoped_a8065b24_lang.css} +9 -9
- package/es/components/paas-bpmn-log/paas-bpmn-log.vue.mjs +2 -2
- package/es/components/paas-bpmn-log/paas-bpmn-log.vue_vue_type_script_setup_true_lang.mjs +1 -2
- package/es/components/paas-bpmn-log/{paas-bpmn-log.vue_vue_type_style_index_0_scoped_c85122b0_lang.css → paas-bpmn-log.vue_vue_type_style_index_0_scoped_eb574523_lang.css} +9 -9
- package/es/components/select-user-modal/deptUser.vue.d.ts +9 -0
- package/es/components/select-user-modal/deptUser.vue.mjs +7 -0
- package/es/components/select-user-modal/deptUser.vue_vue_type_script_setup_true_name_deptUser_lang.mjs +296 -0
- package/es/components/select-user-modal/deptUser.vue_vue_type_style_index_0_scoped_02dff7bf_lang.css +40 -0
- package/es/components/select-user-modal/index.d.ts +2 -0
- package/es/components/select-user-modal/index.mjs +1 -0
- package/es/components/select-user-modal/range-role.vue.d.ts +9 -0
- package/es/components/select-user-modal/range-role.vue.mjs +7 -0
- package/es/components/select-user-modal/range-role.vue_vue_type_script_setup_true_name_role_lang.mjs +137 -0
- package/es/components/select-user-modal/range-role.vue_vue_type_style_index_0_scoped_1241bcdf_lang.css +34 -0
- package/es/components/select-user-modal/select-user-modal.vue.d.ts +12 -0
- package/es/components/select-user-modal/select-user-modal.vue.mjs +7 -0
- package/es/components/select-user-modal/select-user-modal.vue_vue_type_script_setup_true_name_select-user-modal_lang.mjs +123 -0
- package/es/components/select-user-modal/select-user-modal.vue_vue_type_style_index_0_scoped_2c0f184c_lang.css +14 -0
- package/es/components/select-user-modal/userGroup.vue.d.ts +9 -0
- package/es/components/select-user-modal/userGroup.vue.mjs +7 -0
- package/es/components/select-user-modal/userGroup.vue_vue_type_script_setup_true_name_userGroup_lang.mjs +149 -0
- package/es/components/select-user-modal/userGroup.vue_vue_type_style_index_0_scoped_47d1cbaa_lang.css +19 -0
- package/es/create-app-vue.d.ts +2 -2
- package/es/create-app-vue.mjs +7 -5
- package/es/index.d.ts +4 -2
- package/es/index.mjs +30 -25
- package/es/modules/color-picker/src/color-editor.vue.mjs +1 -1
- package/es/modules/data-rules-container/index.d.ts +3 -0
- package/es/modules/data-rules-container/index.mjs +2 -0
- package/es/modules/data-rules-container/src/components/header-action.vue.d.ts +10 -0
- package/es/modules/data-rules-container/src/components/header-action.vue.mjs +7 -0
- package/es/modules/data-rules-container/src/components/header-action.vue_vue_type_script_setup_true_name_header-action_lang.mjs +36 -0
- package/es/modules/data-rules-container/src/components/header-action.vue_vue_type_style_index_0_scoped_4e281013_lang.css +32 -0
- package/es/modules/data-rules-container/src/components/ndo-select-cmp.vue.d.ts +8 -0
- package/es/modules/data-rules-container/src/components/ndo-select-cmp.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/ndo-select-cmp.vue_vue_type_script_setup_true_lang.mjs +266 -0
- package/es/modules/data-rules-container/src/components/perm-action-node.vue.d.ts +22 -0
- package/es/modules/data-rules-container/src/components/perm-action-node.vue.mjs +7 -0
- package/es/modules/data-rules-container/src/components/perm-action-node.vue_vue_type_script_setup_true_name_perm-action-node_lang.mjs +384 -0
- package/es/modules/data-rules-container/src/components/perm-action-node.vue_vue_type_style_index_0_scoped_417c660f_lang.css +73 -0
- package/es/modules/data-rules-container/src/components/perm-root-node.vue.d.ts +3 -0
- package/es/modules/data-rules-container/src/components/perm-root-node.vue.mjs +7 -0
- package/es/modules/data-rules-container/src/components/perm-root-node.vue_vue_type_script_setup_true_name_perm-root-node_lang.mjs +61 -0
- package/es/modules/data-rules-container/src/components/perm-root-node.vue_vue_type_style_index_0_scoped_ca5c9d20_lang.css +74 -0
- package/es/modules/data-rules-container/src/components/rdo-select-cmp.vue.d.ts +11 -0
- package/es/modules/data-rules-container/src/components/rdo-select-cmp.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/rdo-select-cmp.vue_vue_type_script_setup_true_lang.mjs +93 -0
- package/es/modules/data-rules-container/src/components/request-select-cmp.vue.d.ts +9 -0
- package/es/modules/data-rules-container/src/components/request-select-cmp.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/request-select-cmp.vue_vue_type_script_setup_true_name_request-select-cmp_lang.mjs +117 -0
- package/es/modules/data-rules-container/src/components/request-tree-select-cmp.vue.d.ts +3 -0
- package/es/modules/data-rules-container/src/components/request-tree-select-cmp.vue.mjs +6 -0
- package/es/modules/data-rules-container/src/components/request-tree-select-cmp.vue_vue_type_script_name_gct-select_setup_true_lang.mjs +100 -0
- package/es/modules/data-rules-container/src/components/request-tree-select-cmp.vue_vue_type_style_index_0_lang.css +21 -0
- package/es/modules/data-rules-container/src/components/select-modal-cmp.vue.d.ts +32 -0
- package/es/modules/data-rules-container/src/components/select-modal-cmp.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/select-modal-cmp.vue_vue_type_script_setup_true_name_select-modal-cmp_lang.mjs +268 -0
- package/es/modules/data-rules-container/src/components/select-more.vue.d.ts +8 -0
- package/es/modules/data-rules-container/src/components/select-more.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/select-more.vue_vue_type_script_setup_true_lang.mjs +26 -0
- package/es/modules/data-rules-container/src/components/select-userdep-cmp.vue.d.ts +12 -0
- package/es/modules/data-rules-container/src/components/select-userdep-cmp.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/select-userdep-cmp.vue_vue_type_script_setup_true_name_select-userdep-cmp_lang.mjs +103 -0
- package/es/modules/data-rules-container/src/components/tree-action-node.vue.d.ts +25 -0
- package/es/modules/data-rules-container/src/components/tree-action-node.vue.mjs +7 -0
- package/es/modules/data-rules-container/src/components/tree-action-node.vue_vue_type_script_setup_true_name_tree-action-node_lang.mjs +544 -0
- package/es/modules/data-rules-container/src/components/tree-action-node.vue_vue_type_style_index_0_scoped_46368089_lang.css +67 -0
- package/es/modules/data-rules-container/src/components/tree-root-node.vue.d.ts +3 -0
- package/es/modules/data-rules-container/src/components/tree-root-node.vue.mjs +7 -0
- package/es/modules/data-rules-container/src/components/tree-root-node.vue_vue_type_script_setup_true_name_tree-root-node_lang.mjs +105 -0
- package/es/modules/data-rules-container/src/components/tree-root-node.vue_vue_type_style_index_0_scoped_37e323fb_lang.css +29 -0
- package/es/modules/data-rules-container/src/components/tree-select-cmp.vue.d.ts +3 -0
- package/es/modules/data-rules-container/src/components/tree-select-cmp.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/components/tree-select-cmp.vue_vue_type_script_name_gct-select_setup_true_lang.mjs +89 -0
- package/es/modules/data-rules-container/src/constant/config.d.ts +146 -0
- package/es/modules/data-rules-container/src/constant/config.mjs +548 -0
- package/es/modules/data-rules-container/src/constant/interface.d.ts +85 -0
- package/es/modules/data-rules-container/src/constant/interface.mjs +36 -0
- package/es/modules/data-rules-container/src/data-rules-container.vue.d.ts +45 -0
- package/es/modules/data-rules-container/src/data-rules-container.vue.mjs +6 -0
- package/es/modules/data-rules-container/src/data-rules-container.vue_vue_type_script_setup_true_name_data-rules-container_lang.mjs +234 -0
- package/es/modules/data-rules-container/src/data-rules-container.vue_vue_type_style_index_0_lang.css +149 -0
- package/es/modules/data-rules-container/src/field-role-container.vue.d.ts +14 -0
- package/es/modules/data-rules-container/src/field-role-container.vue.mjs +5 -0
- package/es/modules/data-rules-container/src/field-role-container.vue_vue_type_script_setup_true_name_field-role-container_lang.mjs +73 -0
- package/es/modules/data-rules-container/src/hooks/useDataRulesTree.d.ts +30 -0
- package/es/modules/data-rules-container/src/hooks/useDataRulesTree.mjs +317 -0
- package/es/modules/data-rules-container/src/hooks/useEmitter.d.ts +10 -0
- package/es/modules/data-rules-container/src/hooks/useRdoHooks.d.ts +37 -0
- package/es/modules/data-rules-container/src/hooks/useRdoHooks.mjs +144 -0
- package/es/modules/data-rules-container/src/hooks/useRole.d.ts +8 -0
- package/es/modules/data-rules-container/src/typing.d.ts +40 -0
- 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/print-tmpl-modal.vue_vue_type_script_setup_true_name_print-tmpl-modal_lang.mjs +2 -2
- 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/_plugin-vue_export-helper-59SbqtUR.js +0 -1
- package/dist/components-Dw_doMp_.js +0 -1
- package/dist/template-tzWsbHZE.js +0 -1
- package/es/components/label-design/panels/widget/controls/ImageData.vue_vue_type_style_index_0_scoped_3c4a9733_lang.css +0 -3
- package/es/components/paas-bpmn-log/hooks/useObserver.mjs +0 -46
- /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,317 @@
|
|
|
1
|
+
import { OperatorTypeEnum } from "../constant/interface.mjs";
|
|
2
|
+
import { reactive, ref, toRaw } from "vue";
|
|
3
|
+
import { isEmpty } from "lodash-es";
|
|
4
|
+
import { FIELD_TYPE, SEARCH_SERVICE, t, useUUid } from "@gct-paas/core";
|
|
5
|
+
//#region src/modules/data-rules-container/src/hooks/useDataRulesTree.ts
|
|
6
|
+
var editDataRulesTree = ref([]);
|
|
7
|
+
var showDataRulesTree = ref([]);
|
|
8
|
+
function useDataRulesTree(isReadyOnly) {
|
|
9
|
+
const { getUuidGenerate } = useUUid(ref([]), ref(""), {
|
|
10
|
+
needPrefix: true,
|
|
11
|
+
isString: false,
|
|
12
|
+
prefix: "t_"
|
|
13
|
+
});
|
|
14
|
+
const uuidGenerate = getUuidGenerate([]);
|
|
15
|
+
const transfromReactive = (data) => {
|
|
16
|
+
return data.map((item) => {
|
|
17
|
+
const node = reactive(Object.assign({}, {
|
|
18
|
+
key: item.key,
|
|
19
|
+
pid: item.pid,
|
|
20
|
+
level: item.level,
|
|
21
|
+
class: item.class
|
|
22
|
+
}, item.type === "group" ? {
|
|
23
|
+
operatorType: item.operatorType,
|
|
24
|
+
type: item.type,
|
|
25
|
+
children: reactive([])
|
|
26
|
+
} : {
|
|
27
|
+
firstRow: item.firstRow,
|
|
28
|
+
leftValue: item.leftValue,
|
|
29
|
+
operatorValue: item.operatorValue,
|
|
30
|
+
rightValue: item.rightValue
|
|
31
|
+
}));
|
|
32
|
+
if (Array.isArray(item.children)) node.children?.push(...transfromReactive(item.children));
|
|
33
|
+
return node;
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
const setPageTreeItem = (data, len) => {
|
|
37
|
+
return data.forEach((item, index) => {
|
|
38
|
+
if (Array.isArray(item.children)) {
|
|
39
|
+
item.type = "group";
|
|
40
|
+
item.class = "tree-group";
|
|
41
|
+
if (isEmpty(item.operatorType)) item.operatorType = OperatorTypeEnum.AND;
|
|
42
|
+
setPageTreeItem(item.children, item.children.length);
|
|
43
|
+
} else {
|
|
44
|
+
const filterData = data.filter((item) => !item.children);
|
|
45
|
+
if (index === 0 || index === filterData.length - 1) {
|
|
46
|
+
item.class = `${index === 0 ? "first-node" : ""} ${index === filterData.length - 1 ? "last-node" : ""}`;
|
|
47
|
+
item.firstRow = index === 0;
|
|
48
|
+
} else item.class = "";
|
|
49
|
+
item.dataLen = len;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
const addNode = ({ pid, insertId, data, isGroup = false, prevId = "" }) => {
|
|
54
|
+
if (pid === "init") {
|
|
55
|
+
const node = {
|
|
56
|
+
key: "root",
|
|
57
|
+
pid: "",
|
|
58
|
+
level: 1,
|
|
59
|
+
class: void 0,
|
|
60
|
+
operatorType: void 0,
|
|
61
|
+
type: void 0,
|
|
62
|
+
children: reactive([])
|
|
63
|
+
};
|
|
64
|
+
data.push(node);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
return data.forEach((item) => {
|
|
68
|
+
if (item.key === pid) {
|
|
69
|
+
const childrenNode = reactive(Object.assign({}, {
|
|
70
|
+
key: insertId,
|
|
71
|
+
pid: item.key,
|
|
72
|
+
level: Number(item.level) + 1,
|
|
73
|
+
class: ""
|
|
74
|
+
}, isGroup ? {
|
|
75
|
+
operatorType: void 0,
|
|
76
|
+
type: void 0,
|
|
77
|
+
children: reactive([])
|
|
78
|
+
} : {
|
|
79
|
+
firstRow: void 0,
|
|
80
|
+
leftValue: void 0,
|
|
81
|
+
operatorValue: void 0,
|
|
82
|
+
rightValue: void 0
|
|
83
|
+
}));
|
|
84
|
+
if (prevId) {
|
|
85
|
+
const index = item.children.findIndex((k) => k.key === prevId);
|
|
86
|
+
item.children.splice(index + 1, 0, childrenNode);
|
|
87
|
+
} else item.children.push(childrenNode);
|
|
88
|
+
item.children.forEach((i) => {
|
|
89
|
+
i.dataLen = item.children?.length;
|
|
90
|
+
});
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (item.children) addNode({
|
|
94
|
+
pid,
|
|
95
|
+
insertId,
|
|
96
|
+
data: item.children,
|
|
97
|
+
isGroup,
|
|
98
|
+
prevId
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
const deleteNode = (id, data) => {
|
|
103
|
+
return data.forEach((item, index) => {
|
|
104
|
+
if (item.key === id) {
|
|
105
|
+
data.splice(index, 1);
|
|
106
|
+
return;
|
|
107
|
+
} else if (item.children) deleteNode(id, item.children);
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
const createGroupNodes = (data, pid, isInit = false) => {
|
|
111
|
+
const uuid = uuidGenerate.next();
|
|
112
|
+
addNode({
|
|
113
|
+
pid: isInit ? "init" : pid,
|
|
114
|
+
insertId: uuid,
|
|
115
|
+
data,
|
|
116
|
+
isGroup: true
|
|
117
|
+
});
|
|
118
|
+
addNode({
|
|
119
|
+
pid: isInit ? pid : uuid,
|
|
120
|
+
insertId: isInit ? uuid : uuidGenerate.next(),
|
|
121
|
+
data
|
|
122
|
+
});
|
|
123
|
+
setPageTreeItem(data);
|
|
124
|
+
};
|
|
125
|
+
const setTree = (data) => {
|
|
126
|
+
if (!data) createGroupNodes(isReadyOnly ? showDataRulesTree.value : editDataRulesTree.value, "root", true);
|
|
127
|
+
else {
|
|
128
|
+
console.log("转换成页面想要的tree结构", JSON.parse(data));
|
|
129
|
+
if (isReadyOnly) showDataRulesTree.value = transfromReactive(JSON.parse(data));
|
|
130
|
+
else editDataRulesTree.value = transfromReactive(JSON.parse(data));
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const addNewGroup = (id) => {
|
|
134
|
+
createGroupNodes(editDataRulesTree.value, id);
|
|
135
|
+
};
|
|
136
|
+
const deleteGroup = (id) => {
|
|
137
|
+
deleteNode(id, editDataRulesTree.value);
|
|
138
|
+
setPageTreeItem(editDataRulesTree.value);
|
|
139
|
+
};
|
|
140
|
+
const addNewRow = (pid, id) => {
|
|
141
|
+
addNode({
|
|
142
|
+
pid,
|
|
143
|
+
insertId: uuidGenerate.next(),
|
|
144
|
+
data: editDataRulesTree.value,
|
|
145
|
+
isGroup: false,
|
|
146
|
+
prevId: id
|
|
147
|
+
});
|
|
148
|
+
setPageTreeItem(editDataRulesTree.value);
|
|
149
|
+
};
|
|
150
|
+
const deleteRow = (id) => {
|
|
151
|
+
deleteNode(id, editDataRulesTree.value);
|
|
152
|
+
setPageTreeItem(editDataRulesTree.value);
|
|
153
|
+
};
|
|
154
|
+
/** 递归查找是否存在树结构中的值 */
|
|
155
|
+
const findTreePathById = (leafId, nodes) => {
|
|
156
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
157
|
+
if (leafId === nodes[i].key) return nodes[i];
|
|
158
|
+
if (nodes[i].children) {
|
|
159
|
+
const findResult = findTreePathById(leafId, nodes[i].children);
|
|
160
|
+
if (findResult) return findResult;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return null;
|
|
164
|
+
};
|
|
165
|
+
const updateNodeItem = (id, attr, value, opts) => {
|
|
166
|
+
const node = findTreePathById(id, editDataRulesTree.value);
|
|
167
|
+
if (!node) return;
|
|
168
|
+
if (attr === "rightValue") {
|
|
169
|
+
if (opts?.isRest) node.rightValue = reactive(opts.defaultValues.map((val) => {
|
|
170
|
+
return { [opts.key]: val };
|
|
171
|
+
}));
|
|
172
|
+
if (opts?.key === "valueType") node[attr][opts.index] = {};
|
|
173
|
+
node[attr][opts?.index][opts?.key] = value;
|
|
174
|
+
} else node[attr] = typeof value === "object" ? reactive(value) : value;
|
|
175
|
+
if (attr === "leftValue") {
|
|
176
|
+
/** 运算符 */
|
|
177
|
+
node.operatorValue = void 0;
|
|
178
|
+
/** 右值 */
|
|
179
|
+
node.rightValue = void 0;
|
|
180
|
+
} else if (attr === "operatorValue") node.rightValue = reactive(opts?.defaultValues?.map((val) => {
|
|
181
|
+
return { [opts.key]: val };
|
|
182
|
+
}));
|
|
183
|
+
};
|
|
184
|
+
const getAllExpandedKeys = () => {
|
|
185
|
+
const list = flatten(isReadyOnly ? showDataRulesTree.value : editDataRulesTree.value, "");
|
|
186
|
+
return {
|
|
187
|
+
allExpandedKeys: list.map((item) => item.key),
|
|
188
|
+
selectFiledKeys: list.map((item) => item.leftValue?.id).filter((i) => i)
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
const flatten = (array = [], pathStr) => {
|
|
192
|
+
return [].concat(...array.map((item) => {
|
|
193
|
+
item.pathStr = `${pathStr}|${item.children ? item.operatorType : "content"}`;
|
|
194
|
+
return [].concat({
|
|
195
|
+
key: item.key,
|
|
196
|
+
pid: item.pid,
|
|
197
|
+
operatorType: item.children ? item.operatorType : "content",
|
|
198
|
+
pathStr: item.pathStr,
|
|
199
|
+
leftValue: item.leftValue,
|
|
200
|
+
operatorValue: item.operatorValue,
|
|
201
|
+
rightValue: item.rightValue
|
|
202
|
+
}, flatten(item.children || [], item.pathStr));
|
|
203
|
+
}));
|
|
204
|
+
};
|
|
205
|
+
const getExpList = (array = [], parent, type) => {
|
|
206
|
+
return [].concat(...array.map((item) => {
|
|
207
|
+
let name = "";
|
|
208
|
+
if (!item.children && item.leftValue && item.leftValue.key && item.operatorValue && item.key) {
|
|
209
|
+
name = `${item.leftValue.field_search_key || item.leftValue.key}.${item.operatorValue}:${item.key}`;
|
|
210
|
+
if (type === "filterConfig") name = `${item.leftValue.modelKey}#${item.leftValue.key}.${item.operatorValue}:${item.key}`;
|
|
211
|
+
else if (type === "businessFlow") name = `${item.leftValue.nodeKey}.${item.leftValue.modelKey}.${item.operatorValue}:${item.key}`;
|
|
212
|
+
}
|
|
213
|
+
return [].concat(item.children ? [] : item.leftValue && item.leftValue.key && item.operatorValue && item.key ? {
|
|
214
|
+
name,
|
|
215
|
+
type: parent.operatorType,
|
|
216
|
+
operatorType: item.children ? item.operatorType : "content"
|
|
217
|
+
} : [], [getExpList(item.children || [], item, type)]);
|
|
218
|
+
}));
|
|
219
|
+
};
|
|
220
|
+
const filterExpList = (array) => {
|
|
221
|
+
const list = [];
|
|
222
|
+
array.forEach((item) => {
|
|
223
|
+
if (Array.isArray(item) && item.length !== 0) list.push(filterExpList(item));
|
|
224
|
+
else if (!Array.isArray(item) && item.operatorType === "content") list.push(item);
|
|
225
|
+
});
|
|
226
|
+
return list;
|
|
227
|
+
};
|
|
228
|
+
const setExpValue = (array) => {
|
|
229
|
+
const list = [];
|
|
230
|
+
array.forEach((item, index) => {
|
|
231
|
+
if (index === 0) list.push(`#before${item.type}#`);
|
|
232
|
+
if (Array.isArray(item) && item.length !== 0) list.push(...setExpValue(item));
|
|
233
|
+
else if (!Array.isArray(item)) list.push(item.name);
|
|
234
|
+
if (index === array.length - 1) list.push("#after#");
|
|
235
|
+
});
|
|
236
|
+
return list;
|
|
237
|
+
};
|
|
238
|
+
/** 递归得到数据规则算子 */
|
|
239
|
+
const getDataRules = (type, mainModelKey) => {
|
|
240
|
+
const list = flatten(isReadyOnly ? showDataRulesTree.value : editDataRulesTree.value, "");
|
|
241
|
+
let error;
|
|
242
|
+
const query = {};
|
|
243
|
+
const varKeys = [];
|
|
244
|
+
const typeMap = {};
|
|
245
|
+
list.forEach((item) => {
|
|
246
|
+
if (item.operatorType === "content") {
|
|
247
|
+
if (isEmpty(item.leftValue) || isEmpty(item.operatorValue) || isEmpty(item.rightValue)) {
|
|
248
|
+
error = t("sys.webRender.saveTip");
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
let key = "";
|
|
252
|
+
if (type === "businessFlow") key = `${item.leftValue.nodeKey}.${item.leftValue.modelKey}.${item.operatorValue}:${item.key}`;
|
|
253
|
+
else if (type === "filterConfig") key = `${item.leftValue.modelKey}#${item.leftValue.key}.${item.operatorValue}:${item.key}`;
|
|
254
|
+
else key = `${item.leftValue.field_search_key || item.leftValue.key}.${item.operatorValue}:${item.key}`;
|
|
255
|
+
if ([SEARCH_SERVICE.ISNOTNULL, SEARCH_SERVICE.ISNULL].includes(item.operatorValue)) Object.assign(query, { [key]: null });
|
|
256
|
+
else {
|
|
257
|
+
if (item.rightValue.some((rv) => isEmpty(rv.result))) {
|
|
258
|
+
error = t("sys.webRender.saveTip");
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
const types = [];
|
|
262
|
+
const values = item.rightValue.map((kk) => {
|
|
263
|
+
types.push(kk.valueType);
|
|
264
|
+
if (kk.valueType === "SYS") varKeys.push(key);
|
|
265
|
+
if ([
|
|
266
|
+
FIELD_TYPE.USER_MULTI,
|
|
267
|
+
FIELD_TYPE.ORG_MULTI,
|
|
268
|
+
FIELD_TYPE.USER,
|
|
269
|
+
FIELD_TYPE.ORG
|
|
270
|
+
].includes(item.leftValue.type) && kk.valueType === "FIXED") {
|
|
271
|
+
const _orgs = kk?.result?.orgs?.map((org) => `ORG:${org}`) ?? [];
|
|
272
|
+
const _users = kk?.result?.users?.map((user) => `USER:${user}`) ?? [];
|
|
273
|
+
if ([FIELD_TYPE.USER, FIELD_TYPE.ORG].includes(item.leftValue.type) && [SEARCH_SERVICE.EQ, SEARCH_SERVICE.NE].includes(item.operatorValue)) return [..._orgs, ..._users]?.[0];
|
|
274
|
+
return [..._orgs, ..._users];
|
|
275
|
+
}
|
|
276
|
+
return kk?.valueType === "FIELD" ? mainModelKey ? `__F__:${mainModelKey}.${kk?.result}` : `__F__:${kk?.result.replace("$", ".")}` : kk?.result;
|
|
277
|
+
});
|
|
278
|
+
Object.assign(typeMap, { [key]: types.length === 1 ? toRaw(types[0]) : toRaw(types) });
|
|
279
|
+
Object.assign(query, { [key]: values.length === 1 ? toRaw(values[0]) : toRaw(values) });
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
if (error) return { error };
|
|
284
|
+
const explist = setExpValue(filterExpList(getExpList((isReadyOnly ? showDataRulesTree.value : editDataRulesTree.value)[0].children, (isReadyOnly ? showDataRulesTree.value : editDataRulesTree.value)[0], type)));
|
|
285
|
+
const expStr = explist.toString().replace(/#beforeAND#,/g, "AND(").replace(/#beforeOR#,/g, "OR(").replace(/,#after#/g, ")");
|
|
286
|
+
console.warn("getDataRules query", query);
|
|
287
|
+
console.warn("getDataRules varKeys", varKeys);
|
|
288
|
+
console.warn("getDataRules explist", explist);
|
|
289
|
+
console.warn("getDataRules expStr", expStr);
|
|
290
|
+
return {
|
|
291
|
+
query,
|
|
292
|
+
varKeys,
|
|
293
|
+
exp: expStr,
|
|
294
|
+
treeStr: JSON.stringify(isReadyOnly ? showDataRulesTree.value : editDataRulesTree.value),
|
|
295
|
+
typeMap
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
const resetTree = () => {
|
|
299
|
+
if (isReadyOnly) showDataRulesTree.value = [];
|
|
300
|
+
else editDataRulesTree.value = [];
|
|
301
|
+
};
|
|
302
|
+
return {
|
|
303
|
+
setTree,
|
|
304
|
+
showDataRulesTree,
|
|
305
|
+
editDataRulesTree,
|
|
306
|
+
addNewGroup,
|
|
307
|
+
addNewRow,
|
|
308
|
+
deleteGroup,
|
|
309
|
+
deleteRow,
|
|
310
|
+
updateNodeItem,
|
|
311
|
+
getDataRules,
|
|
312
|
+
resetTree,
|
|
313
|
+
getAllExpandedKeys
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
//#endregion
|
|
317
|
+
export { useDataRulesTree };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum EmitterEnum {
|
|
2
|
+
/** 打开编辑用户组弹框 */
|
|
3
|
+
on_edit_user_group = "on-edit-user-group",
|
|
4
|
+
on_refresh_detail = "on-refresh-detail",
|
|
5
|
+
on_delete_user_group = "on-delete-user-group"
|
|
6
|
+
}
|
|
7
|
+
export declare function useEmitter(): {
|
|
8
|
+
emitter: import('mitt').Emitter<Record<import('mitt').EventType, unknown>>;
|
|
9
|
+
EmitterEnum: typeof EmitterEnum;
|
|
10
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare function useAsyncOptions({ bindModelKey, modelCategory }: IObject): {
|
|
2
|
+
getChildrens: (ids?: string[]) => Promise<void>;
|
|
3
|
+
getAsyncOptions: (arg: IObject) => Promise<void>;
|
|
4
|
+
treeData: import('vue').Ref<({
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
disabled?: boolean | undefined;
|
|
7
|
+
checkable?: boolean | undefined;
|
|
8
|
+
disableCheckbox?: boolean | undefined;
|
|
9
|
+
children?: /*elided*/ any[] | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
disabled?: boolean | undefined;
|
|
13
|
+
checkable?: boolean | undefined;
|
|
14
|
+
disableCheckbox?: boolean | undefined;
|
|
15
|
+
value?: import('ant-design-vue/lib/vc-tree-select/TreeSelect').RawValueType | undefined;
|
|
16
|
+
title?: any;
|
|
17
|
+
label?: any;
|
|
18
|
+
key?: import('ant-design-vue/lib/vc-tree-select/interface').Key | undefined;
|
|
19
|
+
children?: /*elided*/ any[] | undefined;
|
|
20
|
+
})[] | undefined, (import('ant-design-vue/lib/vc-tree-select/TreeSelect').BaseOptionType | import('ant-design-vue/lib/vc-tree-select/TreeSelect').DefaultOptionType)[] | ({
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
disabled?: boolean | undefined;
|
|
23
|
+
checkable?: boolean | undefined;
|
|
24
|
+
disableCheckbox?: boolean | undefined;
|
|
25
|
+
children?: /*elided*/ any[] | undefined;
|
|
26
|
+
} | {
|
|
27
|
+
[x: string]: any;
|
|
28
|
+
disabled?: boolean | undefined;
|
|
29
|
+
checkable?: boolean | undefined;
|
|
30
|
+
disableCheckbox?: boolean | undefined;
|
|
31
|
+
value?: import('ant-design-vue/lib/vc-tree-select/TreeSelect').RawValueType | undefined;
|
|
32
|
+
title?: any;
|
|
33
|
+
label?: any;
|
|
34
|
+
key?: import('ant-design-vue/lib/vc-tree-select/interface').Key | undefined;
|
|
35
|
+
children?: /*elided*/ any[] | undefined;
|
|
36
|
+
})[] | undefined>;
|
|
37
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import select_more_default from "../components/select-more.vue.mjs";
|
|
2
|
+
import { h, ref } from "vue";
|
|
3
|
+
import { t } from "@gct-paas/core";
|
|
4
|
+
//#region src/modules/data-rules-container/src/hooks/useRdoHooks.ts
|
|
5
|
+
function useAsyncOptions({ bindModelKey, modelCategory }) {
|
|
6
|
+
const treeData = ref([]);
|
|
7
|
+
let searchField = "name_"?.split(",") || [];
|
|
8
|
+
async function getModelInfo() {
|
|
9
|
+
if (bindModelKey) {
|
|
10
|
+
const res = await _api.apaas.modelMeta.getInfo({ id: bindModelKey }) || {};
|
|
11
|
+
searchField = (res.displayField ? `${res.displayField},name_` : "name_")?.split(",") || [];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
getModelInfo();
|
|
15
|
+
const getQueryDateByKeyWord = (keyword) => {
|
|
16
|
+
return searchField?.reduce((total, filedKey) => {
|
|
17
|
+
const expkey = filedKey.split(".").length > 1 ? filedKey : filedKey + ".like";
|
|
18
|
+
total[expkey] = keyword;
|
|
19
|
+
return total;
|
|
20
|
+
}, {}) || {};
|
|
21
|
+
};
|
|
22
|
+
const getExp = () => {
|
|
23
|
+
return `OR(${searchField.map((key) => `${key}.like`).join(",")})`;
|
|
24
|
+
};
|
|
25
|
+
async function getRdoAsyncOptions(arg = {}) {
|
|
26
|
+
let complete = true;
|
|
27
|
+
let optionsData = [];
|
|
28
|
+
const queryData = arg.keyword ? getQueryDateByKeyWord(arg.keyword) : {};
|
|
29
|
+
const queryExp = getExp();
|
|
30
|
+
const res = await _api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({
|
|
31
|
+
bsKey: "rdoListByPage",
|
|
32
|
+
modelKey: bindModelKey,
|
|
33
|
+
modelCategory
|
|
34
|
+
}, {}, {
|
|
35
|
+
exp: queryExp,
|
|
36
|
+
query: queryData,
|
|
37
|
+
pageSize: 30,
|
|
38
|
+
pageNo: arg.pageNo
|
|
39
|
+
}) || {};
|
|
40
|
+
/**自定义数据源可能不存在 totalPage 默认 全部加载完成*/
|
|
41
|
+
complete = res.totalPage ? res.totalPage <= res.pageNo : true;
|
|
42
|
+
optionsData = (res?.data || []).map((i) => {
|
|
43
|
+
const rdoLabel = i.__LABEL__ || i.name_;
|
|
44
|
+
return {
|
|
45
|
+
value: i.id_,
|
|
46
|
+
title: rdoLabel,
|
|
47
|
+
_info: i.__CHILDREN__?.find((k) => k.default_),
|
|
48
|
+
full_path: h("div", [h("span", `${rdoLabel}`), h("span", { class: "gct-custom-tag ml8px" }, t("sys.default"))]),
|
|
49
|
+
children: i.__CHILDREN__?.map((j) => {
|
|
50
|
+
const versionLabel = j.__LABEL__ || j.version_;
|
|
51
|
+
return {
|
|
52
|
+
value: `${i.id_}:${j.id_}`,
|
|
53
|
+
title: h("div", [h("span", { class: "version" }, versionLabel), j.default_ ? h("span", { class: "version gct-custom-tag ml8px" }, t("sys.default")) : null]),
|
|
54
|
+
_info: { ...j },
|
|
55
|
+
full_path: h("div", [h("span", `${rdoLabel}:${versionLabel}`)])
|
|
56
|
+
};
|
|
57
|
+
})
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
return {
|
|
61
|
+
complete,
|
|
62
|
+
optionsData
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 补全查询
|
|
67
|
+
* @param v
|
|
68
|
+
*/
|
|
69
|
+
async function getChildrens({ id_ } = {}) {
|
|
70
|
+
const [_fId, _cId] = id_?.split(":") ?? ["", ""];
|
|
71
|
+
console.log("_cId", _cId);
|
|
72
|
+
const data = (await _api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({
|
|
73
|
+
bsKey: "rdoListVersionByRefIdsWithParent",
|
|
74
|
+
modelKey: bindModelKey,
|
|
75
|
+
modelCategory
|
|
76
|
+
}, { foreignFields: [] }, {
|
|
77
|
+
refIds: id_,
|
|
78
|
+
includeDeleted: 1
|
|
79
|
+
}) || {})?.data?.[0];
|
|
80
|
+
const rdoLabel = data.__LABEL__ || data.name_;
|
|
81
|
+
let children = [];
|
|
82
|
+
try {
|
|
83
|
+
children = (await _api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({
|
|
84
|
+
bsKey: "rdoListVersionById",
|
|
85
|
+
modelKey: bindModelKey,
|
|
86
|
+
modelCategory
|
|
87
|
+
}, { foreignFields: [] }, { id: _fId }) || {}).data?.map((i) => {
|
|
88
|
+
const versionLabel = i.__LABEL__ || i.version_;
|
|
89
|
+
return {
|
|
90
|
+
value: `${_fId}:${i.id_}`,
|
|
91
|
+
title: h("div", [h("span", { class: "version" }, versionLabel), i.default_ ? h("span", { class: "version gct-custom-tag ml8px" }, t("sys.default")) : null]),
|
|
92
|
+
_info: { ...i },
|
|
93
|
+
full_path: h("div", [h("span", `${rdoLabel}:${versionLabel}`)])
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
} catch (error) {
|
|
97
|
+
console.error("getChildrens 获取子节点失败:", error);
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
value: _fId,
|
|
101
|
+
title: rdoLabel,
|
|
102
|
+
full_path: h("div", [h("span", `${rdoLabel}`), h("span", { class: "gct-custom-tag ml8px" }, t("sys.default"))]),
|
|
103
|
+
children
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
async function getAsyncOptions(arg) {
|
|
107
|
+
if (!arg.pageNo) arg.pageNo = 1;
|
|
108
|
+
const { optionsData, complete } = await getRdoAsyncOptions(arg);
|
|
109
|
+
if (treeData.value?.length) if (arg.pageNo > 1) treeData.value?.pop();
|
|
110
|
+
else treeData.value = [];
|
|
111
|
+
optionsData.forEach((i) => {
|
|
112
|
+
treeData.value?.push(i);
|
|
113
|
+
});
|
|
114
|
+
if (!complete) treeData.value?.push({
|
|
115
|
+
selectable: false,
|
|
116
|
+
title: () => h(select_more_default, { onNextOnce: () => {
|
|
117
|
+
arg.pageNo += 1;
|
|
118
|
+
getAsyncOptions(arg);
|
|
119
|
+
} })
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
getChildrens: async (ids = []) => {
|
|
124
|
+
try {
|
|
125
|
+
if (!Array.isArray(ids) || ids.length === 0) return;
|
|
126
|
+
for (const id_ of ids) {
|
|
127
|
+
if (!id_) continue;
|
|
128
|
+
const [_fId, _cId] = id_.split(":");
|
|
129
|
+
console.log("_cId", _cId);
|
|
130
|
+
if (treeData.value?.some((item) => item.value === _fId)) continue;
|
|
131
|
+
const row = await getChildrens({ id_ });
|
|
132
|
+
if (treeData.value?.some((item) => item.value === _fId)) continue;
|
|
133
|
+
if (row) treeData.value?.unshift(row);
|
|
134
|
+
}
|
|
135
|
+
} catch (error) {
|
|
136
|
+
console.error("getChildrens 批量加载失败:", error);
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
getAsyncOptions,
|
|
140
|
+
treeData
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
export { useAsyncOptions };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FieldMetaDTO } from '@gct-paas/api/apaas';
|
|
2
|
+
export type LocalFieldMetaDTO = FieldMetaDTO & {
|
|
3
|
+
__bindFields: string[];
|
|
4
|
+
};
|
|
5
|
+
export interface OptionItem {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
type?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ApiParams {
|
|
12
|
+
modelKey: string;
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CompProps {
|
|
16
|
+
value?: string | string[];
|
|
17
|
+
api: (params: IObject) => Promise<IObject>;
|
|
18
|
+
apiParams: ApiParams;
|
|
19
|
+
filterType?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface TreeProps {
|
|
22
|
+
data: IObject;
|
|
23
|
+
/** 树的层级,从0开始 */
|
|
24
|
+
level?: number;
|
|
25
|
+
/** key */
|
|
26
|
+
id: string;
|
|
27
|
+
/** 操作类型 */
|
|
28
|
+
operatorType: string;
|
|
29
|
+
readonly: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface IPickerCompParams {
|
|
32
|
+
modelKey?: string;
|
|
33
|
+
fieldKey?: string;
|
|
34
|
+
multiple: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface ModalCompProps {
|
|
37
|
+
supportModalType: string;
|
|
38
|
+
pickerCompParams: IPickerCompParams;
|
|
39
|
+
value: string | string[];
|
|
40
|
+
}
|
|
@@ -10,6 +10,8 @@ import { TableITemState } from "../../state/table-item/table-item.state.mjs";
|
|
|
10
10
|
* @implements {ITableItemController}
|
|
11
11
|
*/
|
|
12
12
|
var TableItemController = class {
|
|
13
|
+
row;
|
|
14
|
+
model;
|
|
13
15
|
state = this.createState();
|
|
14
16
|
get value() {
|
|
15
17
|
return this.row.data[this.model.dataIndex];
|
|
@@ -40,7 +40,6 @@ var ModalWrapper_vue_vue_type_script_lang_default = defineComponent({
|
|
|
40
40
|
const minRealHeightRef = ref(0);
|
|
41
41
|
const ns = useNamespace("basic-modal-wrapper");
|
|
42
42
|
let realHeight = 0;
|
|
43
|
-
let stopElResizeFn = () => {};
|
|
44
43
|
const spinStyle = ref();
|
|
45
44
|
const { width, height } = useWindowSize();
|
|
46
45
|
watch([height, width], () => {
|
|
@@ -80,9 +79,7 @@ var ModalWrapper_vue_vue_type_script_lang_default = defineComponent({
|
|
|
80
79
|
const { modalHeaderHeight, modalFooterHeight } = props;
|
|
81
80
|
emit("ext-height", modalHeaderHeight + modalFooterHeight);
|
|
82
81
|
});
|
|
83
|
-
onUnmounted(() => {
|
|
84
|
-
stopElResizeFn && stopElResizeFn();
|
|
85
|
-
});
|
|
82
|
+
onUnmounted(() => {});
|
|
86
83
|
async function scrollTop() {
|
|
87
84
|
nextTick(() => {
|
|
88
85
|
if (wrapperRef.value) wrapperRef.value.getElement()?.scrollTo(0, 0);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import icon_print_folder_default from "./icon-print-folder.svg.mjs";
|
|
2
|
-
import icon_print_printer_default from "./icon-print-printer.svg.mjs";
|
|
3
1
|
import category_sider_default from "../category/category-sider.vue.mjs";
|
|
4
2
|
import "../category/index.mjs";
|
|
3
|
+
import icon_print_folder_default from "./icon-print-folder.svg.mjs";
|
|
4
|
+
import icon_print_printer_default from "./icon-print-printer.svg.mjs";
|
|
5
5
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, onMounted, openBlock, ref, renderList, resolveComponent, toDisplayString, unref, watch, withCtx, withKeys } from "vue";
|
|
6
6
|
import { isNil } from "lodash-es";
|
|
7
7
|
import { FormDesignEnum, PrintModeEnums, PrintTypeEnum, t, useModal, useNamespace } from "@gct-paas/core";
|