@epxing/business 0.0.0-stage → 5.3.0-beta.2
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/API.md +111 -0
- package/README.md +43 -2
- package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/_virtual/preload-helper.js +88 -0
- package/dist/assets/0-C_2vdOtO.png +0 -0
- package/dist/assets/1-CsiSr5nw.png +0 -0
- package/dist/assets/2-C9hZOTyC.png +0 -0
- package/dist/assets/ai-CcPHuAhD.jpg +0 -0
- package/dist/assets/app-DBNIokDP.png +0 -0
- package/dist/assets/approval-DGcBv-re.png +0 -0
- package/dist/assets/aurorablue-N56tat3G.png +0 -0
- package/dist/assets/basepage-BF4dvOT8.png +0 -0
- package/dist/assets/classicblue-BdgPGKXa.png +0 -0
- package/dist/assets/create_market_system-BH__UVbt.png +0 -0
- package/dist/assets/create_system-irg--ePh.png +0 -0
- package/dist/assets/custom-C-ujlHz1.png +0 -0
- package/dist/assets/data-BDvuB-m7.png +0 -0
- package/dist/assets/deepblue-B78G_DNb.png +0 -0
- package/dist/assets/default-icon-2193FMjv.png +0 -0
- package/dist/assets/ex_link-4fYPd9nh.png +0 -0
- package/dist/assets/forestgreen-B2YR4xgz.png +0 -0
- package/dist/assets/hall_banner-Dc5YRV5A.webp +0 -0
- package/dist/assets/import-tfKWbWVS.png +0 -0
- package/dist/assets/link-BeD2ZGO9.png +0 -0
- package/dist/assets/m_hall_banner-Cf1Qwhh3.webp +0 -0
- package/dist/assets/orange-wT0uHIyo.png +0 -0
- package/dist/assets/palevioletred-DZXBQKru.png +0 -0
- package/dist/assets/photo-uscRzRXF.png +0 -0
- package/dist/assets/purple-CXrRrENi.png +0 -0
- package/dist/assets/role_select-DTqRlFNz.webp +0 -0
- package/dist/assets/skyblue-DPPlKPXU.png +0 -0
- package/dist/assets/snapshot-history-BsVY9cVj.png +0 -0
- package/dist/assets/snapshot-manual-DBRfFHYI.png +0 -0
- package/dist/assets/snapshot-realtime-DjHnJI6C.png +0 -0
- package/dist/assets/sync_loading-D7LoNPFP.png +0 -0
- package/dist/assets/tiffanyblue-DkyBoUQf.png +0 -0
- package/dist/assets/topbg-C_5lVpoA.webp +0 -0
- package/dist/assets/zxmb-CkPnmDaV.png +0 -0
- package/dist/src/assets/customTranslate/customTranslate.js +11 -0
- package/dist/src/assets/customTranslate/translations.js +219 -0
- package/dist/src/assets/images/addmenu/basepage.png.js +4 -0
- package/dist/src/assets/images/addmenu/data.png.js +4 -0
- package/dist/src/assets/images/addmenu/link.png.js +4 -0
- package/dist/src/assets/images/addmenu/list.png.js +4 -0
- package/dist/src/assets/images/addmenu/menu.png.js +4 -0
- package/dist/src/assets/images/addmenu/zxmb.png.js +4 -0
- package/dist/src/assets/images/ai.jpg.js +4 -0
- package/dist/src/assets/images/app.png.js +4 -0
- package/dist/src/assets/images/approval.png.js +4 -0
- package/dist/src/assets/images/create_market_system.png.js +4 -0
- package/dist/src/assets/images/create_system.png.js +4 -0
- package/dist/src/assets/images/custom.png.js +4 -0
- package/dist/src/assets/images/default-icon.png.js +4 -0
- package/dist/src/assets/images/ex_link.png.js +4 -0
- package/dist/src/assets/images/hall_banner.webp.js +4 -0
- package/dist/src/assets/images/hr.png.js +4 -0
- package/dist/src/assets/images/import.png.js +4 -0
- package/dist/src/assets/images/m_hall_banner.webp.js +4 -0
- package/dist/src/assets/images/nav/0.png.js +4 -0
- package/dist/src/assets/images/nav/1.png.js +4 -0
- package/dist/src/assets/images/nav/2.png.js +4 -0
- package/dist/src/assets/images/nav/3.svg.js +4 -0
- package/dist/src/assets/images/photo.png.js +4 -0
- package/dist/src/assets/images/snapshot-history.png.js +4 -0
- package/dist/src/assets/images/snapshot-manual.png.js +4 -0
- package/dist/src/assets/images/snapshot-realtime.png.js +4 -0
- package/dist/src/assets/images/sync_loading.png.js +4 -0
- package/dist/src/assets/images/theme/aurorablue.png.js +4 -0
- package/dist/src/assets/images/theme/classicblue.png.js +4 -0
- package/dist/src/assets/images/theme/deepblue.png.js +4 -0
- package/dist/src/assets/images/theme/forestgreen.png.js +4 -0
- package/dist/src/assets/images/theme/orange.png.js +4 -0
- package/dist/src/assets/images/theme/palevioletred.png.js +4 -0
- package/dist/src/assets/images/theme/purple.png.js +4 -0
- package/dist/src/assets/images/theme/skyblue.png.js +4 -0
- package/dist/src/assets/images/theme/tiffanyblue.png.js +4 -0
- package/dist/src/base/AiPromptDesigner.js +685 -0
- package/dist/src/base/AiPromptView.js +363 -0
- package/dist/src/base/AiSkillEditor.js +1029 -0
- package/dist/src/base/AiSkillEditor.vue.js +1176 -0
- package/dist/src/base/AppConfigFormItem.js +8 -0
- package/dist/src/base/AppConfigFormItem.vue.js +407 -0
- package/dist/src/base/AppMarket.js +212 -0
- package/dist/src/base/AppMarketList.js +8 -0
- package/dist/src/base/AppMarketList.vue.js +214 -0
- package/dist/src/base/AppMarketSystemDetail.js +293 -0
- package/dist/src/base/AttributeSubAdd.js +26 -0
- package/dist/src/base/ChooseApplication.js +132 -0
- package/dist/src/base/ClientAppItem.js +190 -0
- package/dist/src/base/ClientApplication.js +360 -0
- package/dist/src/base/ClientApplicationList.js +126 -0
- package/dist/src/base/ClientModule.js +119 -0
- package/dist/src/base/ClientModuleIndex.js +295 -0
- package/dist/src/base/ClientSystemDetail.js +203 -0
- package/dist/src/base/ClientSystemList.js +8 -0
- package/dist/src/base/ClientSystemList.vue.js +450 -0
- package/dist/src/base/CommonFieldList.js +11 -0
- package/dist/src/base/CommonFieldList.vue.js +530 -0
- package/dist/src/base/CommonSearchList.js +5 -0
- package/dist/src/base/CommonSearchList.vue.js +253 -0
- package/dist/src/base/CompayDetail.js +116 -0
- package/dist/src/base/ComponentGlobalSet.js +8 -0
- package/dist/src/base/ComponentGlobalSet.vue.js +722 -0
- package/dist/src/base/ComponentParamsTree.js +335 -0
- package/dist/src/base/ConfigModuleIndex.js +135 -0
- package/dist/src/base/CurrentClientApplication.js +54 -0
- package/dist/src/base/CurrentVersionInfo.js +98 -0
- package/dist/src/base/EntityMatchCompare.js +533 -0
- package/dist/src/base/FieldRelationFormItem.js +8 -0
- package/dist/src/base/FieldRelationFormItem.vue.js +272 -0
- package/dist/src/base/HelpDocSet.js +363 -0
- package/dist/src/base/HelpDocSet.vue.js +685 -0
- package/dist/src/base/IndexFormItem.js +5 -0
- package/dist/src/base/IndexFormItem.vue.js +230 -0
- package/dist/src/base/JobFormItem.js +8 -0
- package/dist/src/base/JobFormItem.vue.js +131 -0
- package/dist/src/base/ManageAppNav.js +9 -0
- package/dist/src/base/ManageAppNav.vue.js +1178 -0
- package/dist/src/base/ManageMenu.js +916 -0
- package/dist/src/base/ManageMenuItem.js +551 -0
- package/dist/src/base/NoInstallSystemList.js +5 -0
- package/dist/src/base/NoInstallSystemList.vue.js +159 -0
- package/dist/src/base/PageList.js +48 -0
- package/dist/src/base/PasswordFormItem.js +8 -0
- package/dist/src/base/PasswordFormItem.vue.js +125 -0
- package/dist/src/base/ProcessFormItem.js +148 -0
- package/dist/src/base/PublishSystemApplyFormItem.js +5 -0
- package/dist/src/base/PublishSystemApplyFormItem.vue.js +104 -0
- package/dist/src/base/RequestLog.js +170 -0
- package/dist/src/base/RightRiskList.js +8 -0
- package/dist/src/base/RightRiskList.vue.js +224 -0
- package/dist/src/base/RoleAccredit.js +1087 -0
- package/dist/src/base/RoleRightList.js +8 -0
- package/dist/src/base/RoleRightList.vue.js +118 -0
- package/dist/src/base/RoleUserManage.js +8 -0
- package/dist/src/base/RoleUserManage.vue.js +146 -0
- package/dist/src/base/ServiceAccredit.js +1075 -0
- package/dist/src/base/ServiceMenu.js +399 -0
- package/dist/src/base/ServiceMenuFormItem.js +20 -0
- package/dist/src/base/ServiceOperate.js +1003 -0
- package/dist/src/base/SystemHelpTreeFind.js +44 -0
- package/dist/src/base/aiPromptMode.js +145 -0
- package/dist/src/base/data-check/DataChckDetail.js +243 -0
- package/dist/src/base/data-check/DataCheck.js +308 -0
- package/dist/src/base/data-check/DataCheckList.js +364 -0
- package/dist/src/base/data-check/DataCheckSubList.js +6 -0
- package/dist/src/base/data-check/DataCheckSubList.vue.js +195 -0
- package/dist/src/base/entity-view/EntityViewFormItem.js +5 -0
- package/dist/src/base/entity-view/EntityViewFormItem.vue.js +229 -0
- package/dist/src/base/entity-view/EntityViewSubList.js +5 -0
- package/dist/src/base/entity-view/EntityViewSubList.vue.js +181 -0
- package/dist/src/base/entity-view-config/BasicInfoDialog.js +208 -0
- package/dist/src/base/entity-view-config/FieldPanel.js +692 -0
- package/dist/src/base/entity-view-config/FieldPropForm.js +786 -0
- package/dist/src/base/entity-view-config/FormulaDialog.js +143 -0
- package/dist/src/base/entity-view-config/ObjectFieldDialog.js +271 -0
- package/dist/src/base/entity-view-config/RelationPanel.js +779 -0
- package/dist/src/base/entity-view-config/SourceManagerDialog.js +658 -0
- package/dist/src/base/entity-view-config/SqlPanel.js +62 -0
- package/dist/src/base/entity-view-config/SqlPanel.vue.js +43 -0
- package/dist/src/base/entity-view-config/UnionPanel.js +1082 -0
- package/dist/src/base/entity-view-config/ViewConfig.js +586 -0
- package/dist/src/base/entity-view-config/constants.js +146 -0
- package/dist/src/base/user-type/UserTypeFormItem.js +5 -0
- package/dist/src/base/user-type/UserTypeFormItem.vue.js +183 -0
- package/dist/src/components/AddPageFormItem.js +5 -0
- package/dist/src/components/AddPageFormItem.vue.js +92 -0
- package/dist/src/components/AddUsedInterface.js +214 -0
- package/dist/src/components/AiDocFormItem.js +6 -0
- package/dist/src/components/AiDocFormItem.vue.js +271 -0
- package/dist/src/components/AiList.js +8 -0
- package/dist/src/components/AiList.vue.js +93 -0
- package/dist/src/components/AiPermissionAssistant.js +284 -0
- package/dist/src/components/AppList.js +414 -0
- package/dist/src/components/Apply/AIApplyIndex.js +179 -0
- package/dist/src/components/Apply/ApplyIndex.js +282 -0
- package/dist/src/components/AttributeList.js +870 -0
- package/dist/src/components/Banner.js +26 -0
- package/dist/src/components/BatchAddFieldDialog.js +425 -0
- package/dist/src/components/CardO.js +47 -0
- package/dist/src/components/CheckForm.js +34 -0
- package/dist/src/components/ClientAdminFormItem.js +47 -0
- package/dist/src/components/ClientAdminList.js +9 -0
- package/dist/src/components/ClientAdminList.vue.js +221 -0
- package/dist/src/components/ClientFormItem.js +48 -0
- package/dist/src/components/ClientList.js +6 -0
- package/dist/src/components/ClientList.vue.js +216 -0
- package/dist/src/components/CodeDetail.js +454 -0
- package/dist/src/components/CodeManage.js +1030 -0
- package/dist/src/components/ComponentFind.js +210 -0
- package/dist/src/components/ComponentList.js +499 -0
- package/dist/src/components/ConfigParamFormItem.js +8 -0
- package/dist/src/components/ConfigParamFormItem.vue.js +389 -0
- package/dist/src/components/CreatePage.js +298 -0
- package/dist/src/components/DashboardCreate.js +106 -0
- package/dist/src/components/DataLog.js +169 -0
- package/dist/src/components/DataLogTimeline.js +111 -0
- package/dist/src/components/DataSnapshot.js +207 -0
- package/dist/src/components/DataSnapshotList.js +75 -0
- package/dist/src/components/DataSyncInit.js +173 -0
- package/dist/src/components/DblogList.js +6 -0
- package/dist/src/components/DblogList.vue.js +143 -0
- package/dist/src/components/DeptFind.js +8 -0
- package/dist/src/components/DeptFind.vue.js +109 -0
- package/dist/src/components/DynamicUserList.js +5 -0
- package/dist/src/components/DynamicUserList.vue.js +89 -0
- package/dist/src/components/EntityCheckboxFind.js +5 -0
- package/dist/src/components/EntityCheckboxFind.vue.js +97 -0
- package/dist/src/components/EntityRelationAdd.js +388 -0
- package/dist/src/components/EntityRelationAddFormItem.js +5 -0
- package/dist/src/components/EntityRelationAddFormItem.vue.js +284 -0
- package/dist/src/components/EntityRightFormItem.js +10 -0
- package/dist/src/components/EntityRightFormItem.vue.js +401 -0
- package/dist/src/components/EntityRightSubList.js +640 -0
- package/dist/src/components/EntityTagSubList.js +5 -0
- package/dist/src/components/EntityTagSubList.vue.js +103 -0
- package/dist/src/components/EntityTreeManage.js +865 -0
- package/dist/src/components/ExportSystemConfig.js +167 -0
- package/dist/src/components/FieldTreeFind.js +41 -0
- package/dist/src/components/FormulaEditor.js +8 -0
- package/dist/src/components/FormulaEditor.vue.js +1235 -0
- package/dist/src/components/GenTestData.js +638 -0
- package/dist/src/components/HallNav.js +6 -0
- package/dist/src/components/HallNav.vue.js +156 -0
- package/dist/src/components/HeaderNav.js +369 -0
- package/dist/src/components/IconCard.js +98 -0
- package/dist/src/components/IconFontLibrary.js +5 -0
- package/dist/src/components/IconFontLibrary.vue.js +67 -0
- package/dist/src/components/IconFontList.js +5 -0
- package/dist/src/components/IconFontList.vue.js +79 -0
- package/dist/src/components/IdentifyList.js +33 -0
- package/dist/src/components/ImportSystemConfig.js +303 -0
- package/dist/src/components/InterfaceSubList.js +320 -0
- package/dist/src/components/JsPanel.js +101 -0
- package/dist/src/components/LanguageImportPage.js +590 -0
- package/dist/src/components/LanguageSetting.js +545 -0
- package/dist/src/components/List/LinkItem.js +113 -0
- package/dist/src/components/List/List.js +18 -0
- package/dist/src/components/List/ListItem.js +31 -0
- package/dist/src/components/MenuTreeFind.js +8 -0
- package/dist/src/components/MenuTreeFind.vue.js +81 -0
- package/dist/src/components/MessageList.js +8 -0
- package/dist/src/components/MessageList.vue.js +101 -0
- package/dist/src/components/MessageRuleFormItem.js +60 -0
- package/dist/src/components/MessageRuleReceiverFormItem.js +224 -0
- package/dist/src/components/MessageTemplate.js +395 -0
- package/dist/src/components/MessageTemplate.vue.js +693 -0
- package/dist/src/components/MetaList.js +5 -0
- package/dist/src/components/MetaList.vue.js +100 -0
- package/dist/src/components/Nav.js +496 -0
- package/dist/src/components/NavFormCatalogItem.js +7 -0
- package/dist/src/components/NumList.js +60 -0
- package/dist/src/components/OperateLog.js +133 -0
- package/dist/src/components/PageCatalog.js +8 -0
- package/dist/src/components/PageCatalog.vue.js +292 -0
- package/dist/src/components/PageChart.js +213 -0
- package/dist/src/components/PageSwipes.js +132 -0
- package/dist/src/components/PersonFormItem.js +5 -0
- package/dist/src/components/PersonFormItem.vue.js +96 -0
- package/dist/src/components/Popup.js +239 -0
- package/dist/src/components/PrintFormList.js +9 -0
- package/dist/src/components/PrintFormList.vue.js +203 -0
- package/dist/src/components/PublishEntity.js +114 -0
- package/dist/src/components/RelyFieldTreeFind.js +52 -0
- package/dist/src/components/ReportFormList.js +236 -0
- package/dist/src/components/ReportList.js +9 -0
- package/dist/src/components/ReportList.vue.js +248 -0
- package/dist/src/components/RightSubList.js +8 -0
- package/dist/src/components/RightSubList.vue.js +150 -0
- package/dist/src/components/RoleAddUser.js +55 -0
- package/dist/src/components/RoleApplicationCard.js +138 -0
- package/dist/src/components/RoleApplicationList.js +937 -0
- package/dist/src/components/RoleApplicationSet.js +1001 -0
- package/dist/src/components/Search.js +254 -0
- package/dist/src/components/ServiceFormItem.js +33 -0
- package/dist/src/components/SnapshotDataList.js +73 -0
- package/dist/src/components/SystemAdminList.js +8 -0
- package/dist/src/components/SystemAdminList.vue.js +198 -0
- package/dist/src/components/SystemFormItem.js +8 -0
- package/dist/src/components/SystemFormItem.vue.js +170 -0
- package/dist/src/components/SystemNav.js +30 -0
- package/dist/src/components/TaskNumCard.js +23 -0
- package/dist/src/components/TimerRuleFormItem.js +333 -0
- package/dist/src/components/TodoList.js +8 -0
- package/dist/src/components/TodoList.vue.js +327 -0
- package/dist/src/components/UpdateSystemConfig.js +241 -0
- package/dist/src/components/UserCard.js +83 -0
- package/dist/src/components/UserFind.js +6 -0
- package/dist/src/components/UserFind.vue.js +592 -0
- package/dist/src/components/UserFormItem.js +9 -0
- package/dist/src/components/UserFormItem.vue.js +609 -0
- package/dist/src/components/UserList.js +5 -0
- package/dist/src/components/UserList.vue.js +23 -0
- package/dist/src/components/UserManage.js +802 -0
- package/dist/src/components/UserRoleList.js +579 -0
- package/dist/src/components/ValidateRuleFormItem.js +109 -0
- package/dist/src/components/ViewFieldDefine.js +747 -0
- package/dist/src/components/WikiSpaceList.js +5 -0
- package/dist/src/components/WikiSpaceList.vue.js +330 -0
- package/dist/src/components/WikiWorkbench.js +647 -0
- package/dist/src/components/authorization/AddApiPermiss.js +231 -0
- package/dist/src/components/authorization/AddAuthorization.js +161 -0
- package/dist/src/components/authorization/AddEntityFind.js +62 -0
- package/dist/src/components/authorization/AddNoApi.js +191 -0
- package/dist/src/components/authorization/AddRoleScope.js +337 -0
- package/dist/src/components/authorization/AiRolePlan.js +672 -0
- package/dist/src/components/authorization/ApiShareOtherList.js +397 -0
- package/dist/src/components/authorization/ApiSystemList.js +242 -0
- package/dist/src/components/authorization/AuthorizationInterface.js +622 -0
- package/dist/src/components/authorization/AuthorizationRoleSystem.js +850 -0
- package/dist/src/components/authorization/EntityConstraintFormItem.js +284 -0
- package/dist/src/components/authorization/OtherShareApiList.js +247 -0
- package/dist/src/components/authorization/PermissCommonRoleTabs.js +114 -0
- package/dist/src/components/authorization/PermissRoleAuthorization.js +1286 -0
- package/dist/src/components/authorization/PermissRoleTabs.js +113 -0
- package/dist/src/components/authorization/RoleLevel.js +5 -0
- package/dist/src/components/authorization/RoleLevel.vue.js +110 -0
- package/dist/src/components/authorization/RoleLevelScope.js +270 -0
- package/dist/src/components/authorization/SystemAddNoApi.js +187 -0
- package/dist/src/components/card/CardList.js +65 -0
- package/dist/src/components/card/CardListItem.js +97 -0
- package/dist/src/components/card/Title.js +42 -0
- package/dist/src/components/custom-bpmn/CustomContextPad.js +54 -0
- package/dist/src/components/custom-bpmn/CustomPalette.js +5 -0
- package/dist/src/components/custom-bpmn/CustomRenderer.js +5 -0
- package/dist/src/components/custom-bpmn/CustomRendererBpmn.js +88 -0
- package/dist/src/components/custom-bpmn/PropertiesView.js +12560 -0
- package/dist/src/components/custom-bpmn/components/AiModel.js +353 -0
- package/dist/src/components/custom-bpmn/components/Api.js +376 -0
- package/dist/src/components/custom-bpmn/components/BatchOperation.js +209 -0
- package/dist/src/components/custom-bpmn/components/Copy.js +653 -0
- package/dist/src/components/custom-bpmn/components/DataTransform.js +442 -0
- package/dist/src/components/custom-bpmn/components/Demo.js +63 -0
- package/dist/src/components/custom-bpmn/components/EditDiv.js +358 -0
- package/dist/src/components/custom-bpmn/components/GenScope.js +259 -0
- package/dist/src/components/custom-bpmn/components/GlobalParamsTree.js +76 -0
- package/dist/src/components/custom-bpmn/components/Knowledges.js +238 -0
- package/dist/src/components/custom-bpmn/components/Login.js +591 -0
- package/dist/src/components/custom-bpmn/components/MessageQueue.js +221 -0
- package/dist/src/components/custom-bpmn/components/MetaSelect.js +160 -0
- package/dist/src/components/custom-bpmn/components/NumStatistic.js +408 -0
- package/dist/src/components/custom-bpmn/components/ObjectTransform.js +789 -0
- package/dist/src/components/custom-bpmn/components/OutPut.js +395 -0
- package/dist/src/components/custom-bpmn/components/ParamsMachining.js +889 -0
- package/dist/src/components/custom-bpmn/components/ParamsOutput.js +161 -0
- package/dist/src/components/custom-bpmn/components/ProcessAudit.js +796 -0
- package/dist/src/components/custom-bpmn/components/SingleMultipleFind.js +1040 -0
- package/dist/src/components/custom-bpmn/components/TestDialog.js +861 -0
- package/dist/src/components/custom-bpmn/img/chaxun.png.js +4 -0
- package/dist/src/components/custom-bpmn/img/fasong.png.js +4 -0
- package/dist/src/components/custom-bpmn/img/gengxin.png.js +4 -0
- package/dist/src/components/custom-bpmn/img/jiagong.png.js +4 -0
- package/dist/src/components/custom-bpmn/img/jiekou.png.js +4 -0
- package/dist/src/components/custom-bpmn/img/shanchu.png.js +4 -0
- package/dist/src/components/custom-bpmn/img/tongbu.png.js +4 -0
- package/dist/src/components/custom-bpmn/img/xinzeng.png.js +4 -0
- package/dist/src/components/custom-bpmn/img/xunhuanend.png.js +4 -0
- package/dist/src/components/custom-bpmn/img/xunhuanstart.png.js +4 -0
- package/dist/src/components/custom-bpmn/img/ywgz.png.js +4 -0
- package/dist/src/components/custom-bpmn/index.js +5 -0
- package/dist/src/components/custom-bpmn/palette.js +13 -0
- package/dist/src/components/custom-bpmn/util.js +7 -0
- package/dist/src/components/dashboard-create.js +20 -0
- package/dist/src/components/entity-relation-diagram/Er.js +340 -0
- package/dist/src/components/entity-relation-diagram/renderErNode.js +36 -0
- package/dist/src/components/expand/AddForm.js +86 -0
- package/dist/src/components/expand/AddFormItem.js +149 -0
- package/dist/src/components/filter/Filter.js +720 -0
- package/dist/src/components/filter/FilterItem.js +493 -0
- package/dist/src/components/hall/AppCollect.js +121 -0
- package/dist/src/components/hall/AppList.js +480 -0
- package/dist/src/components/hall/AppVisitRecord.js +113 -0
- package/dist/src/components/hall/Banner.js +33 -0
- package/dist/src/components/hall/ServiceCard.js +124 -0
- package/dist/src/components/hall/UserCard.js +81 -0
- package/dist/src/components/permiss/AddApi.js +143 -0
- package/dist/src/components/permiss/AddNoEntityApi.js +180 -0
- package/dist/src/components/permiss/AddSystemPermiss.js +131 -0
- package/dist/src/components/permiss/AllocateRole.js +131 -0
- package/dist/src/components/permiss/ApiSubList.js +151 -0
- package/dist/src/components/permiss/CommonRoleMenu.js +591 -0
- package/dist/src/components/permiss/FieldScope.js +200 -0
- package/dist/src/components/permiss/PermissManage.js +88 -0
- package/dist/src/components/permiss/RoleAppList.js +36 -0
- package/dist/src/components/permiss/RoleMenu.js +518 -0
- package/dist/src/components/permiss/RoleSubList.js +5 -0
- package/dist/src/components/permiss/RoleSubList.vue.js +300 -0
- package/dist/src/components/permiss/jurisdiction.js +359 -0
- package/dist/src/components/process-healthcheck/HealthcheckChart.js +234 -0
- package/dist/src/components/process-healthcheck/HealthcheckChart.vue.js +348 -0
- package/dist/src/components/process-healthcheck/HealthcheckRenderer.js +36 -0
- package/dist/src/components/process-healthcheck/index.js +8 -0
- package/dist/src/components/report/Config.js +1708 -0
- package/dist/src/components/report/Design.js +4632 -0
- package/dist/src/components/report/StatList.js +217 -0
- package/dist/src/components/right/EntityOtherSystemList.js +82 -0
- package/dist/src/components/right/SystemInterfaceList.js +418 -0
- package/dist/src/components/right/SystemList.js +1017 -0
- package/dist/src/components/upLoad.js +71 -0
- package/dist/src/components/viewport/LookViewList.js +22 -0
- package/dist/src/components/viewport/ViewAddForm.js +142 -0
- package/dist/src/components/viewport/ViewDefineList.js +50 -0
- package/dist/src/components/viewport/ViewFiedList.js +723 -0
- package/dist/src/components/viewport/ViewScope.js +116 -0
- package/dist/src/components/wiki-workbench/WikiCites.js +301 -0
- package/dist/src/components/wiki-workbench/WikiIntake.js +308 -0
- package/dist/src/components/wiki-workbench/WikiIntake.vue.js +309 -0
- package/dist/src/components/wiki-workbench/WikiJobs.js +195 -0
- package/dist/src/components/wiki-workbench/WikiRevisions.js +229 -0
- package/dist/src/components/wiki-workbench/WikiSpaceSettings.js +59 -0
- package/dist/src/components/wiki-workbench/WikiSpaceSettings.vue.js +127 -0
- package/dist/src/components/wiki-workbench/codes.js +27 -0
- package/dist/src/components/wiki-workbench/index.js +13 -0
- package/dist/src/index.js +42 -0
- package/dist/src/popup.js +68 -0
- package/dist/src/public-components.js +20 -0
- package/dist/src/remote.entry.js +31 -0
- package/dist/src/route-components.js +12 -0
- package/dist/src/system.component.index.js +5 -0
- package/dist/src/system.component.js +342 -0
- package/dist/src/system.component.lazy.js +50 -0
- package/dist/src/views/Add.js +8 -0
- package/dist/src/views/Add.vue.js +734 -0
- package/dist/src/views/AiToolManager.js +2530 -0
- package/dist/src/views/App.js +48 -0
- package/dist/src/views/AppRoleSelect.js +233 -0
- package/dist/src/views/BatchEdit.js +256 -0
- package/dist/src/views/Bpmn.js +319 -0
- package/dist/src/views/Bpmn.vue.js +1196 -0
- package/dist/src/views/EntityCheckPage.js +49 -0
- package/dist/src/views/EntityDetailPage.js +5 -0
- package/dist/src/views/EntityDetailPage.vue.js +73 -0
- package/dist/src/views/EntityEditPage.js +10 -0
- package/dist/src/views/EntitySubListPage.js +41 -0
- package/dist/src/views/EntityTreePage.js +32 -0
- package/dist/src/views/Error.js +210 -0
- package/dist/src/views/ExcelDesign.js +2730 -0
- package/dist/src/views/ExcelDesign.vue.js +2165 -0
- package/dist/src/views/ExcelPreviewPage.js +166 -0
- package/dist/src/views/ExcelPreviewPage.vue.js +572 -0
- package/dist/src/views/ExportFilePage.js +21 -0
- package/dist/src/views/ExportPage.js +21 -0
- package/dist/src/views/FormDesign.js +1033 -0
- package/dist/src/views/FormDesign.vue.js +1564 -0
- package/dist/src/views/I18nWorkbench.js +521 -0
- package/dist/src/views/ImportFilePage.js +21 -0
- package/dist/src/views/ImportPage.js +21 -0
- package/dist/src/views/MEntityListPage.js +66 -0
- package/dist/src/views/MEntitySubListPage.js +41 -0
- package/dist/src/views/MinePage.js +16 -0
- package/dist/src/views/Module.js +173 -0
- package/dist/src/views/PageAttributeTreePage.js +421 -0
- package/dist/src/views/PageConfig.js +177 -0
- package/dist/src/views/Permission.js +742 -0
- package/dist/src/views/PersonalInfo.js +792 -0
- package/dist/src/views/QyWechat.js +62 -0
- package/dist/src/views/ReportFormListPage.js +77 -0
- package/dist/src/views/TaskPage.js +180 -0
- package/dist/src/views/WikiBinding.js +614 -0
- package/dist/src/views/client/AddForm.js +55 -0
- package/dist/src/views/client/AppMarket.js +290 -0
- package/dist/src/views/client/ClientIndex.js +209 -0
- package/dist/src/views/client/ClientModuleIndexPage.js +5 -0
- package/dist/src/views/client/ClientModuleIndexPage.vue.js +30 -0
- package/dist/src/views/client/CopySystem.js +136 -0
- package/dist/src/views/client/CreateAppFormItem.js +8 -0
- package/dist/src/views/client/CreateAppFormItem.vue.js +232 -0
- package/dist/src/views/client/CreateMethod.js +76 -0
- package/dist/src/views/client/InstallSystem.js +309 -0
- package/dist/src/views/client/ManageList.js +5 -0
- package/dist/src/views/client/ManageList.vue.js +211 -0
- package/dist/src/views/client/OpenClientManage.js +51 -0
- package/dist/src/views/client/OpenSystemManage.js +56 -0
- package/dist/src/views/client/PageTabsCyclic.js +92 -0
- package/dist/src/views/client/SelfBuiltSystem.js +444 -0
- package/dist/src/views/client/StandardProduct.js +233 -0
- package/dist/src/views/client/SystemAppAccredit.js +561 -0
- package/dist/src/views/client/SystemAppManager.js +293 -0
- package/dist/src/views/client/SystemAppManager.vue.js +559 -0
- package/dist/src/views/client/SystemManager.js +452 -0
- package/dist/src/views/client/SystemManager.vue.js +522 -0
- package/dist/src/views/i18n/I18nAiTaskHistoryDialog.js +230 -0
- package/dist/src/views/i18n/I18nPublishDialog.js +451 -0
- package/dist/src/views/i18n/I18nTranslationList.js +8 -0
- package/dist/src/views/i18n/I18nTranslationList.vue.js +247 -0
- package/dist/src/views/i18n/i18n-workbench-text.js +11 -0
- package/dist/src/views/layout/CardList.js +96 -0
- package/dist/src/views/layout/Grid.js +138 -0
- package/dist/src/views/match/AddTargetField.js +8 -0
- package/dist/src/views/match/AddTargetField.vue.js +127 -0
- package/dist/src/views/match/MatchAddFormItem.js +5 -0
- package/dist/src/views/match/MatchAddFormItem.vue.js +84 -0
- package/dist/src/views/match/conversion.js +805 -0
- package/dist/src/views/match/customize.js +391 -0
- package/dist/src/views/match/fieldMatch.js +8 -0
- package/dist/src/views/match/fieldMatch.vue.js +610 -0
- package/dist/src/views/report/AddFormItem.js +60 -0
- package/dist/src/views/report/DesignReport.js +1392 -0
- package/dist/src/views/report/ReportTreeFind.js +8 -0
- package/dist/src/views/report/ReportTreeFind.vue.js +166 -0
- package/dist/style.css +33364 -0
- package/package.json +133 -3
- package/src/base/AiPromptDesigner.vue +653 -0
- package/src/base/AiPromptView.vue +467 -0
- package/src/base/AiSkillEditor.vue +2125 -0
- package/src/base/AppConfigFormItem.vue +404 -0
- package/src/base/AppMarket.vue +264 -0
- package/src/base/AppMarketList.vue +233 -0
- package/src/base/AppMarketSystemDetail.vue +380 -0
- package/src/base/AttributeSubAdd.vue +29 -0
- package/src/base/ChooseApplication.vue +176 -0
- package/src/base/ClientAppItem.vue +247 -0
- package/src/base/ClientApplication.vue +447 -0
- package/src/base/ClientApplicationList.vue +180 -0
- package/src/base/ClientModule.vue +69 -0
- package/src/base/ClientModuleIndex.vue +437 -0
- package/src/base/ClientSystemDetail.vue +319 -0
- package/src/base/ClientSystemList.vue +435 -0
- package/src/base/CommonFieldList.vue +1397 -0
- package/src/base/CommonSearchList.vue +191 -0
- package/src/base/CompayDetail.vue +199 -0
- package/src/base/ComponentGlobalSet.vue +842 -0
- package/src/base/ComponentParamsTree.vue +310 -0
- package/src/base/ConfigModuleIndex.vue +121 -0
- package/src/base/CurrentClientApplication.vue +37 -0
- package/src/base/CurrentVersionInfo.vue +107 -0
- package/src/base/EntityMatchCompare.vue +442 -0
- package/src/base/FieldRelationFormItem.vue +260 -0
- package/src/base/HelpDocSet.vue +1217 -0
- package/src/base/IndexFormItem.vue +197 -0
- package/src/base/JobFormItem.vue +101 -0
- package/src/base/ManageAppNav.vue +1190 -0
- package/src/base/ManageMenu.vue +935 -0
- package/src/base/ManageMenuItem.vue +399 -0
- package/src/base/NoInstallSystemList.vue +114 -0
- package/src/base/PageList.vue +47 -0
- package/src/base/PasswordFormItem.vue +94 -0
- package/src/base/ProcessFormItem.vue +129 -0
- package/src/base/PublishSystemApplyFormItem.vue +87 -0
- package/src/base/RequestLog.vue +198 -0
- package/src/base/RightRiskList.vue +212 -0
- package/src/base/RoleAccredit.vue +961 -0
- package/src/base/RoleRightList.vue +159 -0
- package/src/base/RoleUserManage.vue +186 -0
- package/src/base/ServiceAccredit.vue +956 -0
- package/src/base/ServiceMenu.vue +420 -0
- package/src/base/ServiceMenuFormItem.vue +22 -0
- package/src/base/ServiceOperate.vue +929 -0
- package/src/base/SystemHelpTreeFind.vue +50 -0
- package/src/base/aiPromptMode.js +153 -0
- package/src/base/data-check/DataChckDetail.vue +281 -0
- package/src/base/data-check/DataCheck.vue +261 -0
- package/src/base/data-check/DataCheckList.vue +327 -0
- package/src/base/data-check/DataCheckSubList.vue +160 -0
- package/src/base/entity-view/EntityViewFormItem.vue +170 -0
- package/src/base/entity-view/EntityViewSubList.vue +149 -0
- package/src/base/entity-view-config/BasicInfoDialog.vue +156 -0
- package/src/base/entity-view-config/FieldPanel.vue +742 -0
- package/src/base/entity-view-config/FieldPropForm.vue +687 -0
- package/src/base/entity-view-config/FormulaDialog.vue +153 -0
- package/src/base/entity-view-config/ObjectFieldDialog.vue +367 -0
- package/src/base/entity-view-config/RelationPanel.vue +951 -0
- package/src/base/entity-view-config/SourceManagerDialog.vue +428 -0
- package/src/base/entity-view-config/SqlPanel.vue +138 -0
- package/src/base/entity-view-config/UnionPanel.vue +1037 -0
- package/src/base/entity-view-config/ViewConfig.vue +661 -0
- package/src/base/entity-view-config/constants.js +139 -0
- package/src/base/user-type/UserTypeFormItem.vue +134 -0
- package/src/components/AddPageFormItem.vue +82 -0
- package/src/components/AddUsedInterface.vue +154 -0
- package/src/components/AiDocFormItem.vue +293 -0
- package/src/components/AiList.vue +132 -0
- package/src/components/AiPermissionAssistant.vue +304 -0
- package/src/components/AppList.vue +330 -0
- package/src/components/Apply/AIApplyIndex.vue +458 -0
- package/src/components/Apply/ApplyIndex.vue +358 -0
- package/src/components/AttributeList.vue +667 -0
- package/src/components/Banner.vue +24 -0
- package/src/components/BatchAddFieldDialog.vue +590 -0
- package/src/components/CardO.vue +112 -0
- package/src/components/CheckForm.vue +32 -0
- package/src/components/ClientAdminFormItem.vue +49 -0
- package/src/components/ClientAdminList.vue +434 -0
- package/src/components/ClientFormItem.vue +49 -0
- package/src/components/ClientList.vue +155 -0
- package/src/components/CodeDetail.vue +465 -0
- package/src/components/CodeManage.vue +1004 -0
- package/src/components/ComponentFind.vue +222 -0
- package/src/components/ComponentList.vue +526 -0
- package/src/components/ConfigParamFormItem.vue +383 -0
- package/src/components/CreatePage.vue +348 -0
- package/src/components/DashboardCreate.vue +73 -0
- package/src/components/DataLog.vue +181 -0
- package/src/components/DataLogTimeline.vue +202 -0
- package/src/components/DataSnapshot.vue +264 -0
- package/src/components/DataSnapshotList.vue +79 -0
- package/src/components/DataSyncInit.vue +97 -0
- package/src/components/DblogList.vue +163 -0
- package/src/components/DeptFind.vue +203 -0
- package/src/components/DynamicUserList.vue +72 -0
- package/src/components/EntityCheckboxFind.vue +90 -0
- package/src/components/EntityRelationAdd.vue +201 -0
- package/src/components/EntityRelationAddFormItem.vue +235 -0
- package/src/components/EntityRightFormItem.vue +618 -0
- package/src/components/EntityRightSubList.vue +740 -0
- package/src/components/EntityTagSubList.vue +72 -0
- package/src/components/EntityTreeManage.vue +988 -0
- package/src/components/ExportSystemConfig.vue +131 -0
- package/src/components/FieldTreeFind.vue +48 -0
- package/src/components/FormulaEditor.vue +1220 -0
- package/src/components/GenTestData.vue +787 -0
- package/src/components/HallNav.vue +539 -0
- package/src/components/HeaderNav.vue +447 -0
- package/src/components/IconCard.vue +158 -0
- package/src/components/IconFontLibrary.vue +61 -0
- package/src/components/IconFontList.vue +75 -0
- package/src/components/IdentifyList.vue +33 -0
- package/src/components/ImportSystemConfig.vue +234 -0
- package/src/components/InterfaceSubList.vue +295 -0
- package/src/components/JsPanel.vue +111 -0
- package/src/components/LanguageImportPage.vue +601 -0
- package/src/components/LanguageSetting.vue +451 -0
- package/src/components/List/LinkItem.vue +98 -0
- package/src/components/List/List.vue +17 -0
- package/src/components/List/ListItem.vue +52 -0
- package/src/components/MenuTreeFind.vue +128 -0
- package/src/components/MessageList.vue +198 -0
- package/src/components/MessageRuleFormItem.vue +60 -0
- package/src/components/MessageRuleReceiverFormItem.vue +179 -0
- package/src/components/MessageTemplate.vue +949 -0
- package/src/components/MetaList.vue +108 -0
- package/src/components/Nav.vue +604 -0
- package/src/components/NavFormCatalogItem.vue +9 -0
- package/src/components/NumList.vue +108 -0
- package/src/components/OperateLog.vue +168 -0
- package/src/components/PageCatalog.vue +458 -0
- package/src/components/PageChart.vue +339 -0
- package/src/components/PageSwipes.vue +234 -0
- package/src/components/PersonFormItem.vue +94 -0
- package/src/components/Popup.vue +393 -0
- package/src/components/PrintFormList.vue +529 -0
- package/src/components/PublishEntity.vue +87 -0
- package/src/components/RelyFieldTreeFind.vue +57 -0
- package/src/components/ReportFormList.vue +247 -0
- package/src/components/ReportList.vue +647 -0
- package/src/components/RightSubList.vue +256 -0
- package/src/components/RoleAddUser.vue +56 -0
- package/src/components/RoleApplicationCard.vue +299 -0
- package/src/components/RoleApplicationList.vue +766 -0
- package/src/components/RoleApplicationSet.vue +845 -0
- package/src/components/Search.vue +272 -0
- package/src/components/ServiceFormItem.vue +35 -0
- package/src/components/SnapshotDataList.vue +78 -0
- package/src/components/SystemAdminList.vue +497 -0
- package/src/components/SystemFormItem.vue +125 -0
- package/src/components/SystemNav.vue +29 -0
- package/src/components/TaskNumCard.vue +26 -0
- package/src/components/TimerRuleFormItem.vue +227 -0
- package/src/components/TodoList.vue +424 -0
- package/src/components/UpdateSystemConfig.vue +200 -0
- package/src/components/UserCard.vue +110 -0
- package/src/components/UserFind.vue +702 -0
- package/src/components/UserFormItem.vue +762 -0
- package/src/components/UserList.vue +19 -0
- package/src/components/UserManage.vue +758 -0
- package/src/components/UserRoleList.vue +497 -0
- package/src/components/ValidateRuleFormItem.vue +90 -0
- package/src/components/ViewFieldDefine.vue +703 -0
- package/src/components/WikiSpaceList.vue +270 -0
- package/src/components/WikiWorkbench.vue +717 -0
- package/src/components/authorization/AddApiPermiss.vue +179 -0
- package/src/components/authorization/AddAuthorization.vue +135 -0
- package/src/components/authorization/AddEntityFind.vue +68 -0
- package/src/components/authorization/AddNoApi.vue +143 -0
- package/src/components/authorization/AddRoleScope.vue +291 -0
- package/src/components/authorization/AiRolePlan.vue +751 -0
- package/src/components/authorization/ApiShareOtherList.vue +353 -0
- package/src/components/authorization/ApiSystemList.vue +314 -0
- package/src/components/authorization/AuthorizationInterface.vue +668 -0
- package/src/components/authorization/AuthorizationRoleSystem.vue +713 -0
- package/src/components/authorization/EntityConstraintFormItem.vue +257 -0
- package/src/components/authorization/OtherShareApiList.vue +248 -0
- package/src/components/authorization/PermissCommonRoleTabs.vue +122 -0
- package/src/components/authorization/PermissRoleAuthorization.vue +1097 -0
- package/src/components/authorization/PermissRoleTabs.vue +121 -0
- package/src/components/authorization/RoleLevel.vue +113 -0
- package/src/components/authorization/RoleLevelScope.vue +247 -0
- package/src/components/authorization/SystemAddNoApi.vue +139 -0
- package/src/components/card/CardList.vue +78 -0
- package/src/components/card/CardListItem.vue +147 -0
- package/src/components/card/Title.vue +38 -0
- package/src/components/custom-bpmn/CustomContextPad.js +58 -0
- package/src/components/custom-bpmn/CustomPalette.js +1 -0
- package/src/components/custom-bpmn/CustomRenderer.js +1 -0
- package/src/components/custom-bpmn/CustomRendererBpmn.js +84 -0
- package/src/components/custom-bpmn/PropertiesView.vue +7879 -0
- package/src/components/custom-bpmn/components/AiModel.vue +373 -0
- package/src/components/custom-bpmn/components/Api.vue +290 -0
- package/src/components/custom-bpmn/components/BatchOperation.vue +145 -0
- package/src/components/custom-bpmn/components/Copy.vue +440 -0
- package/src/components/custom-bpmn/components/DataTransform.vue +260 -0
- package/src/components/custom-bpmn/components/Demo.vue +64 -0
- package/src/components/custom-bpmn/components/EditDiv.vue +466 -0
- package/src/components/custom-bpmn/components/GenScope.vue +252 -0
- package/src/components/custom-bpmn/components/GlobalParamsTree.vue +61 -0
- package/src/components/custom-bpmn/components/Knowledges.vue +182 -0
- package/src/components/custom-bpmn/components/Login.vue +372 -0
- package/src/components/custom-bpmn/components/MessageQueue.vue +167 -0
- package/src/components/custom-bpmn/components/MetaSelect.vue +136 -0
- package/src/components/custom-bpmn/components/NumStatistic.vue +245 -0
- package/src/components/custom-bpmn/components/ObjectTransform.vue +454 -0
- package/src/components/custom-bpmn/components/OutPut.vue +412 -0
- package/src/components/custom-bpmn/components/ParamsMachining.vue +644 -0
- package/src/components/custom-bpmn/components/ParamsOutput.vue +130 -0
- package/src/components/custom-bpmn/components/ProcessAudit.vue +443 -0
- package/src/components/custom-bpmn/components/SingleMultipleFind.vue +637 -0
- package/src/components/custom-bpmn/components/TestDialog.vue +1068 -0
- package/src/components/custom-bpmn/img/chaxun.png +0 -0
- package/src/components/custom-bpmn/img/fasong.png +0 -0
- package/src/components/custom-bpmn/img/gengxin.png +0 -0
- package/src/components/custom-bpmn/img/jiagong.png +0 -0
- package/src/components/custom-bpmn/img/jiekou.png +0 -0
- package/src/components/custom-bpmn/img/shanchu.png +0 -0
- package/src/components/custom-bpmn/img/tongbu.png +0 -0
- package/src/components/custom-bpmn/img/xinzeng.png +0 -0
- package/src/components/custom-bpmn/img/xunhuanend.png +0 -0
- package/src/components/custom-bpmn/img/xunhuanstart.png +0 -0
- package/src/components/custom-bpmn/img/ywgz.png +0 -0
- package/src/components/custom-bpmn/index.js +1 -0
- package/src/components/custom-bpmn/palette.js +18 -0
- package/src/components/custom-bpmn/util.js +5 -0
- package/src/components/dashboard-create.js +17 -0
- package/src/components/entity-relation-diagram/Er.vue +360 -0
- package/src/components/entity-relation-diagram/renderErNode.js +32 -0
- package/src/components/expand/AddForm.vue +91 -0
- package/src/components/expand/AddFormItem.vue +150 -0
- package/src/components/filter/Filter.vue +739 -0
- package/src/components/filter/FilterItem.vue +516 -0
- package/src/components/hall/AppCollect.vue +190 -0
- package/src/components/hall/AppList.vue +513 -0
- package/src/components/hall/AppVisitRecord.vue +171 -0
- package/src/components/hall/Banner.vue +21 -0
- package/src/components/hall/ServiceCard.vue +204 -0
- package/src/components/hall/UserCard.vue +114 -0
- package/src/components/permiss/AddApi.vue +119 -0
- package/src/components/permiss/AddNoEntityApi.vue +131 -0
- package/src/components/permiss/AddSystemPermiss.vue +107 -0
- package/src/components/permiss/AllocateRole.vue +107 -0
- package/src/components/permiss/ApiSubList.vue +193 -0
- package/src/components/permiss/CommonRoleMenu.vue +631 -0
- package/src/components/permiss/FieldScope.vue +138 -0
- package/src/components/permiss/PermissManage.vue +96 -0
- package/src/components/permiss/RoleAppList.vue +52 -0
- package/src/components/permiss/RoleMenu.vue +547 -0
- package/src/components/permiss/RoleSubList.vue +263 -0
- package/src/components/permiss/jurisdiction.vue +425 -0
- package/src/components/process-healthcheck/HealthcheckChart.vue +529 -0
- package/src/components/process-healthcheck/HealthcheckRenderer.js +41 -0
- package/src/components/process-healthcheck/index.js +8 -0
- package/src/components/report/Config.vue +1654 -0
- package/src/components/report/Design.vue +3528 -0
- package/src/components/report/StatList.vue +234 -0
- package/src/components/right/EntityOtherSystemList.vue +73 -0
- package/src/components/right/SystemInterfaceList.vue +413 -0
- package/src/components/right/SystemList.vue +848 -0
- package/src/components/upLoad.vue +69 -0
- package/src/components/viewport/LookViewList.vue +28 -0
- package/src/components/viewport/ViewAddForm.vue +151 -0
- package/src/components/viewport/ViewDefineList.vue +53 -0
- package/src/components/viewport/ViewFiedList.vue +646 -0
- package/src/components/viewport/ViewScope.vue +112 -0
- package/src/components/wiki-workbench/WikiCites.vue +234 -0
- package/src/components/wiki-workbench/WikiIntake.vue +505 -0
- package/src/components/wiki-workbench/WikiJobs.vue +175 -0
- package/src/components/wiki-workbench/WikiRevisions.vue +208 -0
- package/src/components/wiki-workbench/WikiSpaceSettings.vue +137 -0
- package/src/components/wiki-workbench/codes.js +43 -0
- package/src/components/wiki-workbench/index.js +15 -0
- package/src/index.js +20 -0
- package/src/popup.js +86 -0
- package/src/public-components.js +8 -0
- package/src/remote.entry.js +42 -0
- package/src/route-components.js +8 -0
- package/src/system.component.index.js +3 -0
- package/src/system.component.js +46 -0
- package/src/system.component.lazy.js +68 -0
- package/src/system.component.visual.js +18 -0
- package/src/views/Add.vue +827 -0
- package/src/views/AiToolManager.vue +2372 -0
- package/src/views/App.vue +53 -0
- package/src/views/AppRoleSelect.vue +334 -0
- package/src/views/BatchEdit.vue +238 -0
- package/src/views/Bpmn.vue +1713 -0
- package/src/views/EntityCheckPage.vue +52 -0
- package/src/views/EntityDetailPage.vue +79 -0
- package/src/views/EntityEditPage.vue +13 -0
- package/src/views/EntitySubListPage.vue +44 -0
- package/src/views/EntityTreePage.vue +37 -0
- package/src/views/Error.vue +63 -0
- package/src/views/ExcelDesign.vue +3350 -0
- package/src/views/ExcelPreviewPage.vue +590 -0
- package/src/views/ExportFilePage.vue +19 -0
- package/src/views/ExportPage.vue +19 -0
- package/src/views/FormDesign.vue +2301 -0
- package/src/views/I18nWorkbench.vue +508 -0
- package/src/views/ImportFilePage.vue +19 -0
- package/src/views/ImportPage.vue +19 -0
- package/src/views/MEntityListPage.vue +83 -0
- package/src/views/MEntitySubListPage.vue +44 -0
- package/src/views/MinePage.vue +18 -0
- package/src/views/Module.vue +210 -0
- package/src/views/PageAttributeTreePage.vue +437 -0
- package/src/views/PageConfig.vue +259 -0
- package/src/views/Permission.vue +695 -0
- package/src/views/PersonalInfo.vue +693 -0
- package/src/views/QyWechat.vue +69 -0
- package/src/views/ReportFormListPage.vue +82 -0
- package/src/views/TaskPage.vue +199 -0
- package/src/views/WikiBinding.vue +740 -0
- package/src/views/client/AddForm.vue +64 -0
- package/src/views/client/AppMarket.vue +380 -0
- package/src/views/client/ClientIndex.vue +261 -0
- package/src/views/client/ClientModuleIndexPage.vue +35 -0
- package/src/views/client/CopySystem.vue +179 -0
- package/src/views/client/CreateAppFormItem.vue +285 -0
- package/src/views/client/CreateMethod.vue +114 -0
- package/src/views/client/InstallSystem.vue +295 -0
- package/src/views/client/ManageList.vue +178 -0
- package/src/views/client/OpenClientManage.vue +54 -0
- package/src/views/client/OpenSystemManage.vue +57 -0
- package/src/views/client/PageTabsCyclic.vue +121 -0
- package/src/views/client/SelfBuiltSystem.vue +497 -0
- package/src/views/client/StandardProduct.vue +325 -0
- package/src/views/client/SystemAppAccredit.vue +607 -0
- package/src/views/client/SystemAppManager.vue +967 -0
- package/src/views/client/SystemManager.vue +998 -0
- package/src/views/i18n/I18nAiTaskHistoryDialog.vue +173 -0
- package/src/views/i18n/I18nPublishDialog.vue +360 -0
- package/src/views/i18n/I18nTranslationList.vue +195 -0
- package/src/views/i18n/i18n-workbench-text.js +7 -0
- package/src/views/layout/CardList.vue +122 -0
- package/src/views/layout/Grid.vue +176 -0
- package/src/views/match/AddTargetField.vue +136 -0
- package/src/views/match/MatchAddFormItem.vue +87 -0
- package/src/views/match/conversion.vue +740 -0
- package/src/views/match/customize.vue +374 -0
- package/src/views/match/fieldMatch.vue +734 -0
- package/src/views/report/AddFormItem.vue +66 -0
- package/src/views/report/DesignReport.vue +1229 -0
- package/src/views/report/ReportTreeFind.vue +195 -0
- package/types/dept-find.d.ts +1 -0
- package/types/entity-tree-manage.d.ts +1 -0
- package/types/excel-preview-page.d.ts +1 -0
- package/types/header-nav.d.ts +1 -0
- package/types/index.d.ts +14 -0
- package/types/page-catalog.d.ts +1 -0
- package/types/popup.d.ts +2 -0
- package/types/report-form-list-page.d.ts +1 -0
- package/types/report-form-list.d.ts +1 -0
- package/types/route-components.d.ts +1 -0
- package/types/user-find.d.ts +1 -0
|
@@ -0,0 +1,2125 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ai-skill-editor">
|
|
3
|
+
<div class="editor-header" v-if="!isFullscreen">
|
|
4
|
+
<span class="editor-title">{{ componentTitle }} :</span>
|
|
5
|
+
<span class="editor-header-right">
|
|
6
|
+
<el-button-group class="mode-btn-group" v-if="!isDetailMode">
|
|
7
|
+
<el-button size="small" :type="editorMode === 'edit' ? 'primary' : 'default'" @click="setEditorMode('edit')">编辑</el-button>
|
|
8
|
+
<el-button size="small" :type="editorMode === 'split' ? 'primary' : 'default'" @click="setEditorMode('split')">分屏</el-button>
|
|
9
|
+
<el-button size="small" :type="editorMode === 'preview' ? 'primary' : 'default'" @click="setEditorMode('preview')">预览</el-button>
|
|
10
|
+
</el-button-group>
|
|
11
|
+
<el-button v-if="!isDetailMode && isSingleSave" size="small" type="primary" :loading="saving" @click="saveContent">保存</el-button>
|
|
12
|
+
<el-button type="primary" link size="small" class="fullscreen-btn" @click="toggleFullscreen">
|
|
13
|
+
<i class="el-icon-full-screen"></i> 全屏
|
|
14
|
+
</el-button>
|
|
15
|
+
</span>
|
|
16
|
+
</div>
|
|
17
|
+
<div :class="['editor-wrap', { 'is-fullscreen': isFullscreen }]">
|
|
18
|
+
<div class="editor-header editor-header--inner" v-if="isFullscreen">
|
|
19
|
+
<span class="editor-title">{{ componentTitle }} :</span>
|
|
20
|
+
<span class="editor-header-right">
|
|
21
|
+
<el-button-group class="mode-btn-group" v-if="!isDetailMode">
|
|
22
|
+
<el-button size="small" :type="editorMode === 'edit' ? 'primary' : 'default'" @click="setEditorMode('edit')">编辑</el-button>
|
|
23
|
+
<el-button size="small" :type="editorMode === 'split' ? 'primary' : 'default'" @click="setEditorMode('split')">分屏</el-button>
|
|
24
|
+
<el-button size="small" :type="editorMode === 'preview' ? 'primary' : 'default'" @click="setEditorMode('preview')">预览</el-button>
|
|
25
|
+
</el-button-group>
|
|
26
|
+
<el-button v-if="!isDetailMode && isSingleSave" size="small" type="primary" :loading="saving" @click="saveContent">保存</el-button>
|
|
27
|
+
<el-button type="primary" link size="small" class="fullscreen-btn" @click="toggleFullscreen">
|
|
28
|
+
<i class="epx-icon-compress"></i> 退出
|
|
29
|
+
</el-button>
|
|
30
|
+
</span>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="editor-container" :class="['mode-' + (isDetailMode ? 'preview' : editorMode)]">
|
|
33
|
+
<div class="editor-pane editor-pane--input">
|
|
34
|
+
<textarea ref="textarea"></textarea>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="editor-pane editor-pane--preview" ref="previewPane" @scroll="handlePreviewScroll">
|
|
37
|
+
<div class="markdown-preview markdown" ref="preview"></div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="editor-fx-icon">
|
|
41
|
+
<i class="epx-icon-bianliang"></i>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<!-- 快捷插入弹窗 -->
|
|
46
|
+
<!-- 流程节点场景下编辑器嵌套在外层弹窗中,需 append-to-body 让遮罩/层级正确,避免被遮罩盖住;原技能编辑器(无动态参数)保持原行为 -->
|
|
47
|
+
<el-dialog
|
|
48
|
+
title="快捷插入"
|
|
49
|
+
v-model="quickInsertVisible"
|
|
50
|
+
width="860px"
|
|
51
|
+
:append-to-body="hasDynamicParam"
|
|
52
|
+
:close-on-click-modal="false"
|
|
53
|
+
class="quick-insert-dialog"
|
|
54
|
+
@close="onDialogClose"
|
|
55
|
+
>
|
|
56
|
+
<el-tabs v-model="quickInsertTab" class="quick-insert-tabs">
|
|
57
|
+
<!-- 动态参数 -->
|
|
58
|
+
<el-tab-pane v-if="hasDynamicParam" label="动态参数" name="dynamicParam">
|
|
59
|
+
<div class="dynamic-param-pane">
|
|
60
|
+
<el-tree
|
|
61
|
+
:data="globalParamsData"
|
|
62
|
+
node-key="code"
|
|
63
|
+
:props="{ label: 'text', children: 'children' }"
|
|
64
|
+
@node-click="insertDynamicParam"
|
|
65
|
+
>
|
|
66
|
+
<template #default="{ node, data }">
|
|
67
|
+
<span class="custom-tree-node">
|
|
68
|
+
<span v-if="data.leaf" class="param-leaf-mark">{x}</span>
|
|
69
|
+
<span :title="node.label">{{ node.label }}</span>
|
|
70
|
+
</span>
|
|
71
|
+
</template>
|
|
72
|
+
</el-tree>
|
|
73
|
+
</div>
|
|
74
|
+
</el-tab-pane>
|
|
75
|
+
|
|
76
|
+
<!-- 公式 -->
|
|
77
|
+
<el-tab-pane v-if="showFormula" label="公式" name="formula">
|
|
78
|
+
<div class="formula-pane">
|
|
79
|
+
<p class="formula-pane__tip">使用公式编辑器构造表达式,插入后以表达式文本形式保存在提示词中(插入后不可再次点开编辑)。</p>
|
|
80
|
+
<el-button type="primary" icon="el-icon-edit-outline" @click="openFormulaEditor">打开公式编辑器</el-button>
|
|
81
|
+
</div>
|
|
82
|
+
</el-tab-pane>
|
|
83
|
+
|
|
84
|
+
<!-- 提示词函数 -->
|
|
85
|
+
<el-tab-pane label="提示词函数" name="function">
|
|
86
|
+
<el-table
|
|
87
|
+
:data="functionList"
|
|
88
|
+
height="380"
|
|
89
|
+
>
|
|
90
|
+
<el-table-column type="index" label="序号" width="70" align="center" />
|
|
91
|
+
<el-table-column label="操作" width="80" align="center">
|
|
92
|
+
<template v-slot="scope">
|
|
93
|
+
<el-link type="primary" :underline="false" @click="insertFunction(scope.row)">选择</el-link>
|
|
94
|
+
</template>
|
|
95
|
+
</el-table-column>
|
|
96
|
+
<el-table-column prop="NAME" label="函数名称" min-width="200" show-overflow-tooltip />
|
|
97
|
+
</el-table>
|
|
98
|
+
</el-tab-pane>
|
|
99
|
+
|
|
100
|
+
<!-- 提示词模板 -->
|
|
101
|
+
<el-tab-pane label="提示词模板" name="template">
|
|
102
|
+
<el-table
|
|
103
|
+
:data="templateList"
|
|
104
|
+
height="380"
|
|
105
|
+
>
|
|
106
|
+
<el-table-column type="index" label="序号" width="70" align="center" />
|
|
107
|
+
<el-table-column label="操作" width="80" align="center">
|
|
108
|
+
<template v-slot="scope">
|
|
109
|
+
<el-link type="primary" :underline="false" @click="insertTemplate(scope.row)">选择</el-link>
|
|
110
|
+
</template>
|
|
111
|
+
</el-table-column>
|
|
112
|
+
<el-table-column prop="TITLE" label="模板名称" min-width="200" show-overflow-tooltip />
|
|
113
|
+
</el-table>
|
|
114
|
+
</el-tab-pane>
|
|
115
|
+
|
|
116
|
+
<!-- 对象接口 -->
|
|
117
|
+
<el-tab-pane label="对象接口" name="interface">
|
|
118
|
+
<el-tabs v-model="apiActiveTab" class="inner-tabs" @tab-click="handleApiTabChange">
|
|
119
|
+
<!-- 通用接口 -->
|
|
120
|
+
<el-tab-pane label="通用接口" name="frame">
|
|
121
|
+
<el-table
|
|
122
|
+
:data="frameApiList"
|
|
123
|
+
height="330"
|
|
124
|
+
>
|
|
125
|
+
<el-table-column type="index" label="序号" width="70" align="center" />
|
|
126
|
+
<el-table-column label="操作" width="140" align="center">
|
|
127
|
+
<template v-slot="scope">
|
|
128
|
+
<el-link type="primary" :underline="false" @click="insertFrameApi(scope.row)">选择</el-link>
|
|
129
|
+
<el-link type="success" :underline="false" style="margin-left: 8px" @click="insertFrameApiName(scope.row)">选择工具名</el-link>
|
|
130
|
+
</template>
|
|
131
|
+
</el-table-column>
|
|
132
|
+
<el-table-column prop="LABEL" label="接口名称" min-width="140" show-overflow-tooltip />
|
|
133
|
+
<el-table-column prop="NAME" label="接口命令" width="120" show-overflow-tooltip />
|
|
134
|
+
<el-table-column prop="ENTITY#" label="所属对象" width="120" show-overflow-tooltip />
|
|
135
|
+
<el-table-column prop="PARAM_EXPLAIN" label="接口说明" min-width="220" show-overflow-tooltip />
|
|
136
|
+
</el-table>
|
|
137
|
+
<el-pagination
|
|
138
|
+
v-if="frameApiTotal > frameApiPageSize"
|
|
139
|
+
v-model:current-page="frameApiCurrentPage"
|
|
140
|
+
:page-size="frameApiPageSize"
|
|
141
|
+
layout="total, prev, pager, next"
|
|
142
|
+
:total="frameApiTotal"
|
|
143
|
+
@current-change="handleFrameApiPageChange"
|
|
144
|
+
style="margin-top: 10px; text-align: right;"
|
|
145
|
+
/>
|
|
146
|
+
</el-tab-pane>
|
|
147
|
+
|
|
148
|
+
<!-- 对象接口 -->
|
|
149
|
+
<el-tab-pane label="对象接口" name="entity">
|
|
150
|
+
<div class="tab-filter">
|
|
151
|
+
<label>选择对象:</label>
|
|
152
|
+
<epx-object
|
|
153
|
+
v-model="selectedEntity"
|
|
154
|
+
:fieldConfigs="{
|
|
155
|
+
attriLabel: '',
|
|
156
|
+
codeKey: 'FM_ENTITY',
|
|
157
|
+
state: 'EDIT',
|
|
158
|
+
placeholder: '请选择对象',
|
|
159
|
+
isMultiple: '0'
|
|
160
|
+
}"
|
|
161
|
+
@change="handleEntityChange"
|
|
162
|
+
/>
|
|
163
|
+
</div>
|
|
164
|
+
<el-table
|
|
165
|
+
v-if="selectedEntity"
|
|
166
|
+
:data="apiList"
|
|
167
|
+
height="330"
|
|
168
|
+
>
|
|
169
|
+
<el-table-column type="index" label="序号" width="70" align="center" />
|
|
170
|
+
<el-table-column label="操作" width="140" align="center">
|
|
171
|
+
<template v-slot="scope">
|
|
172
|
+
<el-link type="primary" :underline="false" @click="insertApi(scope.row)">选择</el-link>
|
|
173
|
+
<el-link type="success" :underline="false" style="margin-left: 8px" @click="insertApiName(scope.row)">选择工具名</el-link>
|
|
174
|
+
</template>
|
|
175
|
+
</el-table-column>
|
|
176
|
+
<el-table-column prop="LABEL" label="接口名称" min-width="140" show-overflow-tooltip />
|
|
177
|
+
<el-table-column prop="NAME" label="接口命令" width="120" show-overflow-tooltip />
|
|
178
|
+
<el-table-column prop="PARAM_EXPLAIN" label="接口说明" min-width="220" show-overflow-tooltip />
|
|
179
|
+
</el-table>
|
|
180
|
+
<div v-else class="empty-tip">
|
|
181
|
+
<i class="el-icon-info"></i>
|
|
182
|
+
<p>请先选择对象</p>
|
|
183
|
+
</div>
|
|
184
|
+
</el-tab-pane>
|
|
185
|
+
</el-tabs>
|
|
186
|
+
</el-tab-pane>
|
|
187
|
+
|
|
188
|
+
<!-- 外部接口 -->
|
|
189
|
+
<el-tab-pane label="外部接口" name="external">
|
|
190
|
+
<el-table
|
|
191
|
+
:data="externalApiList"
|
|
192
|
+
height="380"
|
|
193
|
+
>
|
|
194
|
+
<el-table-column type="index" label="序号" width="70" align="center" />
|
|
195
|
+
<el-table-column label="操作" width="140" align="center">
|
|
196
|
+
<template v-slot="scope">
|
|
197
|
+
<el-link type="primary" :underline="false" @click="insertExternalApi(scope.row)">选择</el-link>
|
|
198
|
+
<el-link type="success" :underline="false" style="margin-left: 8px" @click="insertExternalApiName(scope.row)">选择工具名</el-link>
|
|
199
|
+
</template>
|
|
200
|
+
</el-table-column>
|
|
201
|
+
<el-table-column prop="NAME" label="接口名称" min-width="180" show-overflow-tooltip />
|
|
202
|
+
<el-table-column prop="NOTICE" label="接口说明" min-width="300" show-overflow-tooltip />
|
|
203
|
+
</el-table>
|
|
204
|
+
<el-pagination
|
|
205
|
+
v-if="externalApiTotal > externalApiPageSize"
|
|
206
|
+
v-model:current-page="externalApiCurrentPage"
|
|
207
|
+
:page-size="externalApiPageSize"
|
|
208
|
+
layout="total, prev, pager, next"
|
|
209
|
+
:total="externalApiTotal"
|
|
210
|
+
@current-change="handleExternalApiPageChange"
|
|
211
|
+
style="margin-top: 10px; text-align: right;"
|
|
212
|
+
/>
|
|
213
|
+
</el-tab-pane>
|
|
214
|
+
|
|
215
|
+
<!-- 内置工具 -->
|
|
216
|
+
<el-tab-pane label="内置工具" name="systool">
|
|
217
|
+
<el-table
|
|
218
|
+
:data="sysToolList"
|
|
219
|
+
height="380"
|
|
220
|
+
>
|
|
221
|
+
<el-table-column type="index" label="序号" width="70" align="center" />
|
|
222
|
+
<el-table-column label="操作" width="140" align="center">
|
|
223
|
+
<template v-slot="scope">
|
|
224
|
+
<el-link type="primary" :underline="false" @click="insertSysTool(scope.row)">选择</el-link>
|
|
225
|
+
<el-link type="success" :underline="false" style="margin-left: 8px" @click="insertSysToolName(scope.row)">选择工具名</el-link>
|
|
226
|
+
</template>
|
|
227
|
+
</el-table-column>
|
|
228
|
+
<el-table-column prop="NAME" label="名称" min-width="140" show-overflow-tooltip />
|
|
229
|
+
<el-table-column prop="CODE" label="工具标识" width="160" show-overflow-tooltip />
|
|
230
|
+
<el-table-column prop="DESC" label="工具描述" min-width="220" show-overflow-tooltip />
|
|
231
|
+
</el-table>
|
|
232
|
+
<el-pagination
|
|
233
|
+
v-if="sysToolTotal > sysToolPageSize"
|
|
234
|
+
v-model:current-page="sysToolCurrentPage"
|
|
235
|
+
:page-size="sysToolPageSize"
|
|
236
|
+
layout="total, prev, pager, next"
|
|
237
|
+
:total="sysToolTotal"
|
|
238
|
+
@current-change="handleSysToolPageChange"
|
|
239
|
+
style="margin-top: 10px; text-align: right;"
|
|
240
|
+
/>
|
|
241
|
+
</el-tab-pane>
|
|
242
|
+
|
|
243
|
+
<!-- 子智能体 -->
|
|
244
|
+
<el-tab-pane label="子智能体" name="subagent">
|
|
245
|
+
<el-table
|
|
246
|
+
:data="subAgentList"
|
|
247
|
+
height="380"
|
|
248
|
+
>
|
|
249
|
+
<el-table-column type="index" label="序号" width="70" align="center" />
|
|
250
|
+
<el-table-column label="操作" width="140" align="center">
|
|
251
|
+
<template v-slot="scope">
|
|
252
|
+
<el-link type="primary" :underline="false" @click="insertSubAgent(scope.row)">选择</el-link>
|
|
253
|
+
<el-link type="success" :underline="false" style="margin-left: 8px" @click="insertSubAgentName(scope.row)">选择工具名</el-link>
|
|
254
|
+
</template>
|
|
255
|
+
</el-table-column>
|
|
256
|
+
<el-table-column prop="NAME" label="应用名称" min-width="140" show-overflow-tooltip />
|
|
257
|
+
<el-table-column prop="CODE" label="应用编号" width="120" show-overflow-tooltip />
|
|
258
|
+
<el-table-column prop="NOTE" label="应用简介" min-width="220" show-overflow-tooltip />
|
|
259
|
+
</el-table>
|
|
260
|
+
<el-pagination
|
|
261
|
+
v-if="subAgentTotal > subAgentPageSize"
|
|
262
|
+
v-model:current-page="subAgentCurrentPage"
|
|
263
|
+
:page-size="subAgentPageSize"
|
|
264
|
+
layout="total, prev, pager, next"
|
|
265
|
+
:total="subAgentTotal"
|
|
266
|
+
@current-change="handleSubAgentPageChange"
|
|
267
|
+
style="margin-top: 10px; text-align: right;"
|
|
268
|
+
/>
|
|
269
|
+
</el-tab-pane>
|
|
270
|
+
|
|
271
|
+
<!-- 技能(仅单个保存模式下可用) -->
|
|
272
|
+
<el-tab-pane v-if="isSingleSave" label="技能" name="skill">
|
|
273
|
+
<el-tabs v-model="skillActiveTab" class="inner-tabs" @tab-click="handleSkillTabChange">
|
|
274
|
+
<el-tab-pane label="系统技能" name="system">
|
|
275
|
+
<el-table
|
|
276
|
+
:data="skillList"
|
|
277
|
+
height="330"
|
|
278
|
+
>
|
|
279
|
+
<el-table-column type="index" label="序号" width="70" align="center" />
|
|
280
|
+
<el-table-column label="操作" width="80" align="center">
|
|
281
|
+
<template v-slot="scope">
|
|
282
|
+
<el-link type="primary" :underline="false" @click="insertSkill(scope.row)">选择</el-link>
|
|
283
|
+
</template>
|
|
284
|
+
</el-table-column>
|
|
285
|
+
<el-table-column prop="NAME" label="技能名称" min-width="160" show-overflow-tooltip />
|
|
286
|
+
<el-table-column prop="CODE" label="技能编号" width="160" show-overflow-tooltip />
|
|
287
|
+
<el-table-column prop="DESC" label="技能描述" min-width="220" show-overflow-tooltip />
|
|
288
|
+
</el-table>
|
|
289
|
+
<el-pagination
|
|
290
|
+
v-if="skillTotal > skillPageSize"
|
|
291
|
+
v-model:current-page="skillCurrentPage"
|
|
292
|
+
:page-size="skillPageSize"
|
|
293
|
+
layout="total, prev, pager, next"
|
|
294
|
+
:total="skillTotal"
|
|
295
|
+
@current-change="handleSkillPageChange"
|
|
296
|
+
style="margin-top: 10px; text-align: right;"
|
|
297
|
+
/>
|
|
298
|
+
</el-tab-pane>
|
|
299
|
+
<el-tab-pane label="平台技能" name="platform">
|
|
300
|
+
<el-table
|
|
301
|
+
:data="skillList"
|
|
302
|
+
height="330"
|
|
303
|
+
>
|
|
304
|
+
<el-table-column type="index" label="序号" width="70" align="center" />
|
|
305
|
+
<el-table-column label="操作" width="80" align="center">
|
|
306
|
+
<template v-slot="scope">
|
|
307
|
+
<el-link type="primary" :underline="false" @click="insertSkill(scope.row)">选择</el-link>
|
|
308
|
+
</template>
|
|
309
|
+
</el-table-column>
|
|
310
|
+
<el-table-column prop="NAME" label="技能名称" min-width="160" show-overflow-tooltip />
|
|
311
|
+
<el-table-column prop="CODE" label="技能编号" width="160" show-overflow-tooltip />
|
|
312
|
+
<el-table-column prop="DESC" label="技能描述" min-width="220" show-overflow-tooltip />
|
|
313
|
+
</el-table>
|
|
314
|
+
<el-pagination
|
|
315
|
+
v-if="skillTotal > skillPageSize"
|
|
316
|
+
v-model:current-page="skillCurrentPage"
|
|
317
|
+
:page-size="skillPageSize"
|
|
318
|
+
layout="total, prev, pager, next"
|
|
319
|
+
:total="skillTotal"
|
|
320
|
+
@current-change="handleSkillPageChange"
|
|
321
|
+
style="margin-top: 10px; text-align: right;"
|
|
322
|
+
/>
|
|
323
|
+
</el-tab-pane>
|
|
324
|
+
</el-tabs>
|
|
325
|
+
</el-tab-pane>
|
|
326
|
+
|
|
327
|
+
<!-- 配置文档(树形,点击文档节点作为工具插入) -->
|
|
328
|
+
<el-tab-pane label="配置文档" name="configDoc">
|
|
329
|
+
<div class="config-doc-pane">
|
|
330
|
+
<el-input
|
|
331
|
+
v-model="docFilterText"
|
|
332
|
+
size="small"
|
|
333
|
+
clearable
|
|
334
|
+
prefix-icon="el-icon-search"
|
|
335
|
+
placeholder="输入文档名称过滤"
|
|
336
|
+
class="config-doc-pane__filter"
|
|
337
|
+
/>
|
|
338
|
+
<div class="config-doc-pane__tree">
|
|
339
|
+
<el-tree
|
|
340
|
+
ref="docTree"
|
|
341
|
+
:data="docTree"
|
|
342
|
+
node-key="id"
|
|
343
|
+
:props="{ label: 'text', children: 'children' }"
|
|
344
|
+
:filter-node-method="filterDocNode"
|
|
345
|
+
:expand-on-click-node="true"
|
|
346
|
+
@node-click="onDocNodeClick"
|
|
347
|
+
>
|
|
348
|
+
<template #default="{ node, data }">
|
|
349
|
+
<span class="config-doc-node">
|
|
350
|
+
<i :class="data.leaf ? 'el-icon-document' : 'el-icon-folder'"></i>
|
|
351
|
+
<span :title="node.label">{{ node.label }}</span>
|
|
352
|
+
</span>
|
|
353
|
+
</template>
|
|
354
|
+
</el-tree>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
</el-tab-pane>
|
|
358
|
+
</el-tabs>
|
|
359
|
+
</el-dialog>
|
|
360
|
+
|
|
361
|
+
<!-- 公式编辑器(隐藏触发,通过 setting() 唤起弹窗)-->
|
|
362
|
+
<epx-rule
|
|
363
|
+
v-if="showFormula"
|
|
364
|
+
:key="ruleInfo"
|
|
365
|
+
ref="rule"
|
|
366
|
+
style="display: none;"
|
|
367
|
+
:model-value="ruleInfo"
|
|
368
|
+
@update:model-value="onFormulaChange"
|
|
369
|
+
:selfStyle="false"
|
|
370
|
+
:fieldConfigs="{ attriName: 'value', attriLabel: '公式', dataType: 'rule', rows: 2, state: 'EDIT' }"
|
|
371
|
+
:variableList="[]"
|
|
372
|
+
:functionList="formulaLibrary"
|
|
373
|
+
:extendVariable="globalParamsData"
|
|
374
|
+
>
|
|
375
|
+
<span></span>
|
|
376
|
+
</epx-rule>
|
|
377
|
+
</div>
|
|
378
|
+
</template>
|
|
379
|
+
|
|
380
|
+
<script>
|
|
381
|
+
import { component } from '@epxing/core/src/mixins'
|
|
382
|
+
import 'highlight.js/styles/base16/atelier-forest.min.css'
|
|
383
|
+
import { loadMarkdownDeps, escapeFallback } from '@epxing/components/src/ai-chat-page/markdown'
|
|
384
|
+
|
|
385
|
+
// 给块级元素注入源码行号(0 基),供分屏滚动「按行」精确联动
|
|
386
|
+
function injectSourceLine (tokens, idx, options, _env, slf) {
|
|
387
|
+
const token = tokens[idx]
|
|
388
|
+
if (token.map && token.nesting >= 0) {
|
|
389
|
+
token.attrSet('data-source-line', String(token.map[0]))
|
|
390
|
+
}
|
|
391
|
+
return slf.renderToken(tokens, idx, options)
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// markdown-it / hljs 懒加载:库到达前 md 为 null,renderMd() 兜底转义纯文本,库就绪后重建实例并重渲染预览
|
|
395
|
+
let md = null
|
|
396
|
+
function buildMd (markdownit, hljs) {
|
|
397
|
+
const md = markdownit({
|
|
398
|
+
highlight (str, lang) {
|
|
399
|
+
if (lang && hljs.getLanguage(lang)) {
|
|
400
|
+
try {
|
|
401
|
+
return '<pre><code class="hljs">' +
|
|
402
|
+
hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
|
|
403
|
+
'</code></pre>'
|
|
404
|
+
} catch (__) {}
|
|
405
|
+
}
|
|
406
|
+
return '<pre><code class="hljs">' + md.utils.escapeHtml(str) + '</code></pre>'
|
|
407
|
+
}
|
|
408
|
+
})
|
|
409
|
+
|
|
410
|
+
md.renderer.rules.link_open = function (tokens, idx, options, _env, self) {
|
|
411
|
+
if (tokens[idx].attrIndex('target') === -1) {
|
|
412
|
+
tokens[idx].attrPush(['target', '_blank'])
|
|
413
|
+
tokens[idx].attrPush(['rel', 'noopener noreferrer'])
|
|
414
|
+
}
|
|
415
|
+
return self.renderToken(tokens, idx, options)
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
md.renderer.rules.paragraph_open = injectSourceLine
|
|
419
|
+
md.renderer.rules.heading_open = injectSourceLine
|
|
420
|
+
md.renderer.rules.blockquote_open = injectSourceLine
|
|
421
|
+
md.renderer.rules.bullet_list_open = injectSourceLine
|
|
422
|
+
md.renderer.rules.ordered_list_open = injectSourceLine
|
|
423
|
+
md.renderer.rules.list_item_open = injectSourceLine
|
|
424
|
+
md.renderer.rules.table_open = injectSourceLine
|
|
425
|
+
md.renderer.rules.hr = injectSourceLine
|
|
426
|
+
|
|
427
|
+
return md
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
function renderMd (text) {
|
|
431
|
+
return md ? md.render(text) : escapeFallback(text)
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export default {
|
|
435
|
+
name: 'epx-base-ai-skill-editor',
|
|
436
|
+
mixins: [component],
|
|
437
|
+
props: {
|
|
438
|
+
value: {
|
|
439
|
+
type: String,
|
|
440
|
+
default: ''
|
|
441
|
+
},
|
|
442
|
+
formData: {
|
|
443
|
+
type: Object,
|
|
444
|
+
default () {
|
|
445
|
+
return {}
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
title: {
|
|
449
|
+
type: String,
|
|
450
|
+
default: ''
|
|
451
|
+
},
|
|
452
|
+
// 关联的 agent id,用于加载工具列表
|
|
453
|
+
agentId: {
|
|
454
|
+
type: String,
|
|
455
|
+
default: ''
|
|
456
|
+
},
|
|
457
|
+
pageType: String,
|
|
458
|
+
// 单个保存模式:显示保存按钮,点击后保存当前内容
|
|
459
|
+
singleSave: {
|
|
460
|
+
type: Boolean,
|
|
461
|
+
default: false
|
|
462
|
+
},
|
|
463
|
+
// 动态参数树(流程节点变量等)。传入后快捷插入弹窗显示「动态参数」tab,预览中将 {{code}} 渲染为参数标签
|
|
464
|
+
globalParamsData: {
|
|
465
|
+
type: Array,
|
|
466
|
+
default () {
|
|
467
|
+
return []
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
// 是否启用「公式」插入(复用 epx-rule)
|
|
471
|
+
showFormula: {
|
|
472
|
+
type: Boolean,
|
|
473
|
+
default: false
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
computed: {
|
|
477
|
+
// 组件标题:优先使用 prop title,其次使用 $configs.attriLabel,最后使用 compTitle
|
|
478
|
+
componentTitle () {
|
|
479
|
+
return this.title || this.$configs.attriLabel || this.compTitle || '技能编辑器'
|
|
480
|
+
},
|
|
481
|
+
// 组件类型:从 $configs 获取
|
|
482
|
+
componentType () {
|
|
483
|
+
return this.$configs.componentType || this.pageType
|
|
484
|
+
},
|
|
485
|
+
// 是否为详情/只读模式
|
|
486
|
+
isDetailMode () {
|
|
487
|
+
return this.componentType === 'DETAIL' || this.componentType === 'READONLY'
|
|
488
|
+
},
|
|
489
|
+
// 是否启用单个保存模式:优先 prop,其次 $configs 配置
|
|
490
|
+
isSingleSave () {
|
|
491
|
+
return this.singleSave || this.$configs.singleSave === true
|
|
492
|
+
},
|
|
493
|
+
// 是否有可插入的动态参数
|
|
494
|
+
hasDynamicParam () {
|
|
495
|
+
return Array.isArray(this.globalParamsData) && this.globalParamsData.length > 0
|
|
496
|
+
},
|
|
497
|
+
// 动态参数 code -> 显示名 映射(用于预览渲染)
|
|
498
|
+
paramNameMap () {
|
|
499
|
+
const map = {}
|
|
500
|
+
const walk = (list) => {
|
|
501
|
+
(list || []).forEach(node => {
|
|
502
|
+
if (node.code) map[node.code] = node.text
|
|
503
|
+
if (node.children && node.children.length) walk(node.children)
|
|
504
|
+
})
|
|
505
|
+
}
|
|
506
|
+
walk(this.globalParamsData)
|
|
507
|
+
return map
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
data () {
|
|
511
|
+
return {
|
|
512
|
+
editor: null,
|
|
513
|
+
hasContent: false,
|
|
514
|
+
isFullscreen: false,
|
|
515
|
+
editorMode: 'split', // edit | split | preview
|
|
516
|
+
saving: false, // 保存中状态
|
|
517
|
+
contentChanged: false, // 内容是否已修改
|
|
518
|
+
lastSavedContent: '', // 上次保存的内容
|
|
519
|
+
// 快捷插入弹窗
|
|
520
|
+
quickInsertVisible: false,
|
|
521
|
+
quickInsertTab: 'function',
|
|
522
|
+
// 记录触发 / 时的光标位置,用于插入后删除 /
|
|
523
|
+
slashCursor: null,
|
|
524
|
+
// 提示词函数
|
|
525
|
+
functionList: [],
|
|
526
|
+
// 提示词模板
|
|
527
|
+
templateList: [],
|
|
528
|
+
// 对象接口
|
|
529
|
+
apiActiveTab: 'frame',
|
|
530
|
+
selectedEntity: null,
|
|
531
|
+
apiList: [],
|
|
532
|
+
apiTotal: 0,
|
|
533
|
+
// 通用接口
|
|
534
|
+
frameApiList: [],
|
|
535
|
+
frameApiTotal: 0,
|
|
536
|
+
frameApiCurrentPage: 1,
|
|
537
|
+
frameApiPageSize: 10,
|
|
538
|
+
// 外部接口
|
|
539
|
+
externalApiList: [],
|
|
540
|
+
externalApiTotal: 0,
|
|
541
|
+
externalApiCurrentPage: 1,
|
|
542
|
+
externalApiPageSize: 10,
|
|
543
|
+
// 子智能体
|
|
544
|
+
subAgentList: [],
|
|
545
|
+
subAgentTotal: 0,
|
|
546
|
+
subAgentCurrentPage: 1,
|
|
547
|
+
subAgentPageSize: 10,
|
|
548
|
+
// 内置工具
|
|
549
|
+
sysToolList: [],
|
|
550
|
+
sysToolTotal: 0,
|
|
551
|
+
sysToolCurrentPage: 1,
|
|
552
|
+
sysToolPageSize: 10,
|
|
553
|
+
// 技能
|
|
554
|
+
skillActiveTab: 'system',
|
|
555
|
+
skillList: [],
|
|
556
|
+
skillTotal: 0,
|
|
557
|
+
skillCurrentPage: 1,
|
|
558
|
+
skillPageSize: 10,
|
|
559
|
+
// 配置文档(树形)
|
|
560
|
+
docTree: [],
|
|
561
|
+
docFilterText: '',
|
|
562
|
+
// 公式(epx-rule)
|
|
563
|
+
ruleInfo: '',
|
|
564
|
+
formulaLibrary: [],
|
|
565
|
+
formulaCursor: null,
|
|
566
|
+
mdReady: false
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
created () {
|
|
570
|
+
loadMarkdownDeps().then(d => {
|
|
571
|
+
if (!md) md = buildMd(d.markdownit, d.hljs)
|
|
572
|
+
this.mdReady = true
|
|
573
|
+
// 库就绪前预览用的是转义纯文本兜底,就绪后用当前内容重新渲染一次
|
|
574
|
+
this.updatePreview(this.editor ? this.editor.getValue() : (this.value || ''))
|
|
575
|
+
})
|
|
576
|
+
},
|
|
577
|
+
watch: {
|
|
578
|
+
// 外部 value prop 变化时同步
|
|
579
|
+
value (val) {
|
|
580
|
+
if (this.editor && !this._emitting && val !== this.editor.getValue()) {
|
|
581
|
+
this.editor.setValue(val || '')
|
|
582
|
+
this.hasContent = (val || '').length > 0
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
// formData 变化时,从 updateField 字段同步到编辑器
|
|
586
|
+
formData: {
|
|
587
|
+
deep: true,
|
|
588
|
+
handler (val) {
|
|
589
|
+
if (!this.editor || this._emitting) return
|
|
590
|
+
const field = this.$configs.updateField || this.$configs.fieldKey
|
|
591
|
+
if (!field) return
|
|
592
|
+
const newVal = (val && val[field]) || ''
|
|
593
|
+
if (newVal !== this.editor.getValue()) {
|
|
594
|
+
this.editor.setValue(newVal)
|
|
595
|
+
this.hasContent = newVal.length > 0
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
// 配置文档树过滤
|
|
600
|
+
docFilterText (val) {
|
|
601
|
+
if (this.$refs.docTree) this.$refs.docTree.filter(val)
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
mounted () {
|
|
605
|
+
this.initEditor()
|
|
606
|
+
this.loadFunctionList()
|
|
607
|
+
this.loadTemplateList()
|
|
608
|
+
this.loadFrameApiList()
|
|
609
|
+
this.loadExternalApiList()
|
|
610
|
+
this.loadSubAgentList()
|
|
611
|
+
this.loadSysToolList()
|
|
612
|
+
if (this.isSingleSave) this.loadSkillList()
|
|
613
|
+
if (this.showFormula) this.loadFormulaLibrary()
|
|
614
|
+
this.loadDocTree()
|
|
615
|
+
},
|
|
616
|
+
beforeUnmount () {
|
|
617
|
+
clearTimeout(this._scrollLockTimer)
|
|
618
|
+
window.removeEventListener('resize', this.invalidateAnchorCache)
|
|
619
|
+
if (this.editor) {
|
|
620
|
+
this.editor.toTextArea()
|
|
621
|
+
this.editor = null
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
methods: {
|
|
625
|
+
// ─── 初始化编辑器 ────────────────────────────────────────────
|
|
626
|
+
initEditor () {
|
|
627
|
+
require.ensure([], () => {
|
|
628
|
+
const CodeMirror = require('codemirror')
|
|
629
|
+
globalThis.codemirror = CodeMirror
|
|
630
|
+
require('codemirror/lib/codemirror.css')
|
|
631
|
+
require('codemirror/mode/markdown/markdown.js')
|
|
632
|
+
require('codemirror/addon/display/placeholder.js')
|
|
633
|
+
|
|
634
|
+
this.editor = CodeMirror.fromTextArea(this.$refs.textarea, {
|
|
635
|
+
mode: 'markdown',
|
|
636
|
+
lineWrapping: true,
|
|
637
|
+
lineNumbers: false,
|
|
638
|
+
autofocus: false,
|
|
639
|
+
inputStyle: 'contenteditable',
|
|
640
|
+
placeholder: '输入 "/" 可快捷插入工具和函数'
|
|
641
|
+
})
|
|
642
|
+
|
|
643
|
+
// 设置初始值:优先从 formData[updateField] 取,其次 value prop
|
|
644
|
+
const field = this.$configs.updateField || this.$configs.fieldKey
|
|
645
|
+
const initialValue = (field && this.formData && this.formData[field]) || this.value || ''
|
|
646
|
+
if (initialValue) {
|
|
647
|
+
this.editor.setValue(initialValue)
|
|
648
|
+
this.hasContent = true
|
|
649
|
+
}
|
|
650
|
+
// 记录初始内容
|
|
651
|
+
this.lastSavedContent = this.editor.getValue()
|
|
652
|
+
|
|
653
|
+
// 监听输入,检测 /
|
|
654
|
+
this.editor.on('change', (editor, change) => {
|
|
655
|
+
const val = editor.getValue()
|
|
656
|
+
this.hasContent = val.length > 0
|
|
657
|
+
this.contentChanged = val !== this.lastSavedContent
|
|
658
|
+
|
|
659
|
+
this.emitChange(val)
|
|
660
|
+
this.updatePreview(val)
|
|
661
|
+
|
|
662
|
+
// 检测输入了 /
|
|
663
|
+
if (change.origin === '+input' && change.text && change.text[0] === '/') {
|
|
664
|
+
// 记录 / 的位置
|
|
665
|
+
this.slashCursor = {
|
|
666
|
+
line: change.from.line,
|
|
667
|
+
ch: change.from.ch
|
|
668
|
+
}
|
|
669
|
+
this.$nextTick(() => {
|
|
670
|
+
this.openQuickInsert()
|
|
671
|
+
})
|
|
672
|
+
}
|
|
673
|
+
})
|
|
674
|
+
|
|
675
|
+
// 单个保存模式:失去焦点时若内容有修改则自动保存(静默),作为忘记保存的兜底
|
|
676
|
+
if (this.isSingleSave) {
|
|
677
|
+
this.editor.on('blur', () => {
|
|
678
|
+
if (this.contentChanged && !this.saving) {
|
|
679
|
+
this.saveContent(true)
|
|
680
|
+
}
|
|
681
|
+
})
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
// 分屏模式:编辑区滚动时联动预览区;窗口尺寸变化时预览锚点需重建
|
|
685
|
+
this.editor.on('scroll', this.handleEditorScroll)
|
|
686
|
+
window.addEventListener('resize', this.invalidateAnchorCache)
|
|
687
|
+
|
|
688
|
+
// 初始化预览
|
|
689
|
+
this.updatePreview(this.editor.getValue())
|
|
690
|
+
// 在弹窗/动画容器内挂载时,刷新布局以正确计算尺寸
|
|
691
|
+
this.$nextTick(() => {
|
|
692
|
+
if (this.editor) this.editor.refresh()
|
|
693
|
+
})
|
|
694
|
+
}, (err) => {
|
|
695
|
+
console.error('CodeMirror load error', err)
|
|
696
|
+
}, 'codemirror')
|
|
697
|
+
},
|
|
698
|
+
|
|
699
|
+
// 保存(点击保存按钮触发;silent=true 时为失焦自动保存,不弹成功提示)
|
|
700
|
+
saveContent (silent = false) {
|
|
701
|
+
const field = this.$configs.updateField || this.$configs.fieldKey
|
|
702
|
+
if (!field || !this.$metaId || !this.formData.ID) {
|
|
703
|
+
if (!silent) this.$message.warning('保存配置不完整')
|
|
704
|
+
return
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
const value = this.editor ? this.editor.getValue() : ''
|
|
708
|
+
this.saving = true
|
|
709
|
+
this.$http.save({
|
|
710
|
+
action: 'update',
|
|
711
|
+
entityId: this.$metaId,
|
|
712
|
+
bean: {
|
|
713
|
+
ID: this.formData.ID,
|
|
714
|
+
[field]: value
|
|
715
|
+
}
|
|
716
|
+
}).then(() => {
|
|
717
|
+
this.lastSavedContent = value
|
|
718
|
+
this.contentChanged = false
|
|
719
|
+
// 保存成功后再把内容同步给父级(singleSave 模式下平时不实时传播)
|
|
720
|
+
this.emitChange(value, true)
|
|
721
|
+
if (!silent) this.$message.success('保存成功')
|
|
722
|
+
}).catch(err => {
|
|
723
|
+
this.$message.error(err.message || '保存失败')
|
|
724
|
+
}).finally(() => {
|
|
725
|
+
this.saving = false
|
|
726
|
+
})
|
|
727
|
+
},
|
|
728
|
+
|
|
729
|
+
// ─── 全屏切换 ────────────────────────────────────────────────
|
|
730
|
+
// --- emit change with formData
|
|
731
|
+
// singleSave 模式:编辑过程中不向父级实时传播(避免外层表单实时写回/保存),
|
|
732
|
+
// 仅在保存成功后通过 force=true 显式同步一次
|
|
733
|
+
emitChange (val, force = false) {
|
|
734
|
+
if (this.isSingleSave && !force) return
|
|
735
|
+
this._emitting = true
|
|
736
|
+
const field = this.$configs.updateField || this.$configs.fieldKey
|
|
737
|
+
if (field) {
|
|
738
|
+
this.$emit('change', { ...this.formData, [field]: val })
|
|
739
|
+
} else {
|
|
740
|
+
this.$emit('change', val)
|
|
741
|
+
}
|
|
742
|
+
this.$emit('input', val)
|
|
743
|
+
this.$nextTick(() => { this._emitting = false })
|
|
744
|
+
},
|
|
745
|
+
|
|
746
|
+
toggleFullscreen () {
|
|
747
|
+
this.isFullscreen = !this.isFullscreen
|
|
748
|
+
this.invalidateAnchorCache()
|
|
749
|
+
this.$nextTick(() => {
|
|
750
|
+
if (this.editor) this.editor.refresh()
|
|
751
|
+
})
|
|
752
|
+
},
|
|
753
|
+
|
|
754
|
+
// ─── 编辑模式切换 ────────────────────────────────────────────────
|
|
755
|
+
setEditorMode (mode) {
|
|
756
|
+
this.editorMode = mode
|
|
757
|
+
this.invalidateAnchorCache()
|
|
758
|
+
this.$nextTick(() => {
|
|
759
|
+
if (this.editor) this.editor.refresh()
|
|
760
|
+
})
|
|
761
|
+
},
|
|
762
|
+
|
|
763
|
+
// ─── 分屏滚动联动(按源码行号精确对齐) ──────────────────────────
|
|
764
|
+
handleEditorScroll () {
|
|
765
|
+
this.syncScroll('editor')
|
|
766
|
+
},
|
|
767
|
+
|
|
768
|
+
handlePreviewScroll () {
|
|
769
|
+
this.syncScroll('preview')
|
|
770
|
+
},
|
|
771
|
+
|
|
772
|
+
invalidateAnchorCache () {
|
|
773
|
+
this._anchorCache = null
|
|
774
|
+
},
|
|
775
|
+
|
|
776
|
+
// 用带来源标记的短时锁,避免左右互相触发形成回环
|
|
777
|
+
syncScroll (source) {
|
|
778
|
+
if (this.isDetailMode || this.editorMode !== 'split' || !this.editor) return
|
|
779
|
+
const previewEl = this.$refs.previewPane
|
|
780
|
+
if (!previewEl) return
|
|
781
|
+
if (this._scrollLock && this._scrollLock !== source) return
|
|
782
|
+
this._scrollLock = source
|
|
783
|
+
|
|
784
|
+
if (source === 'editor') this.syncPreviewFromEditor(previewEl)
|
|
785
|
+
else this.syncEditorFromPreview(previewEl)
|
|
786
|
+
|
|
787
|
+
clearTimeout(this._scrollLockTimer)
|
|
788
|
+
this._scrollLockTimer = setTimeout(() => { this._scrollLock = null }, 60)
|
|
789
|
+
},
|
|
790
|
+
|
|
791
|
+
// 编辑区 → 预览区:取编辑区顶部对应的源码行,插值到预览区对应锚点位置
|
|
792
|
+
syncPreviewFromEditor (previewEl) {
|
|
793
|
+
const anchors = this.buildScrollAnchors(previewEl)
|
|
794
|
+
const line = this.editorLineAtPixel(this.editor.getScrollInfo().top)
|
|
795
|
+
const { before, after } = this.bracketAnchors(anchors, line, 'line')
|
|
796
|
+
const span = after.line - before.line
|
|
797
|
+
const frac = span > 0 ? (line - before.line) / span : 0
|
|
798
|
+
previewEl.scrollTop = before.top + frac * (after.top - before.top)
|
|
799
|
+
},
|
|
800
|
+
|
|
801
|
+
// 预览区 → 编辑区:取预览区顶部对应的源码行,换算回编辑区像素
|
|
802
|
+
syncEditorFromPreview (previewEl) {
|
|
803
|
+
const anchors = this.buildScrollAnchors(previewEl)
|
|
804
|
+
const top = previewEl.scrollTop
|
|
805
|
+
const { before, after } = this.bracketAnchors(anchors, top, 'top')
|
|
806
|
+
const span = after.top - before.top
|
|
807
|
+
const frac = span > 0 ? (top - before.top) / span : 0
|
|
808
|
+
const line = before.line + frac * (after.line - before.line)
|
|
809
|
+
this.editor.scrollTo(null, this.editorPixelAtLine(line))
|
|
810
|
+
},
|
|
811
|
+
|
|
812
|
+
// 构建预览区锚点:[{ line(编辑器行号), top(内容内绝对像素) }],含首尾哨兵;带缓存
|
|
813
|
+
buildScrollAnchors (previewEl) {
|
|
814
|
+
if (this._anchorCache) return this._anchorCache
|
|
815
|
+
const offset = this._previewLineOffset || 0
|
|
816
|
+
const containerTop = previewEl.getBoundingClientRect().top
|
|
817
|
+
const anchors = [{ line: offset, top: 0 }]
|
|
818
|
+
const contentEl = this.$refs.preview
|
|
819
|
+
if (contentEl) {
|
|
820
|
+
const nodes = contentEl.querySelectorAll('[data-source-line]')
|
|
821
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
822
|
+
const line = parseInt(nodes[i].getAttribute('data-source-line'), 10)
|
|
823
|
+
if (isNaN(line)) continue
|
|
824
|
+
const top = nodes[i].getBoundingClientRect().top - containerTop + previewEl.scrollTop
|
|
825
|
+
anchors.push({ line: line + offset, top })
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
anchors.push({ line: this.editor.lineCount(), top: previewEl.scrollHeight })
|
|
829
|
+
this._anchorCache = anchors
|
|
830
|
+
return anchors
|
|
831
|
+
},
|
|
832
|
+
|
|
833
|
+
// 在锚点数组里按 key(line/top) 找到夹住 value 的前后两个锚点
|
|
834
|
+
bracketAnchors (anchors, value, key) {
|
|
835
|
+
let before = anchors[0]
|
|
836
|
+
let after = anchors[anchors.length - 1]
|
|
837
|
+
for (let i = 0; i < anchors.length; i++) {
|
|
838
|
+
if (anchors[i][key] <= value) {
|
|
839
|
+
before = anchors[i]
|
|
840
|
+
} else {
|
|
841
|
+
after = anchors[i]
|
|
842
|
+
break
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
return { before, after }
|
|
846
|
+
},
|
|
847
|
+
|
|
848
|
+
// 编辑区局部像素 → 分数行号
|
|
849
|
+
editorLineAtPixel (px) {
|
|
850
|
+
const lineCount = this.editor.lineCount()
|
|
851
|
+
const line = this.editor.lineAtHeight(px, 'local')
|
|
852
|
+
const top = this.editor.heightAtLine(line, 'local')
|
|
853
|
+
const bottom = this.editor.heightAtLine(Math.min(line + 1, lineCount), 'local')
|
|
854
|
+
const frac = bottom > top ? (px - top) / (bottom - top) : 0
|
|
855
|
+
return line + Math.max(0, Math.min(1, frac))
|
|
856
|
+
},
|
|
857
|
+
|
|
858
|
+
// 分数行号 → 编辑区局部像素
|
|
859
|
+
editorPixelAtLine (line) {
|
|
860
|
+
const lineCount = this.editor.lineCount()
|
|
861
|
+
const intLine = Math.max(0, Math.min(Math.floor(line), lineCount - 1))
|
|
862
|
+
const top = this.editor.heightAtLine(intLine, 'local')
|
|
863
|
+
const bottom = this.editor.heightAtLine(Math.min(intLine + 1, lineCount), 'local')
|
|
864
|
+
return top + (line - intLine) * (bottom - top)
|
|
865
|
+
},
|
|
866
|
+
|
|
867
|
+
// ─── 更新预览 ────────────────────────────────────────────────────
|
|
868
|
+
updatePreview (val) {
|
|
869
|
+
if (!this.$refs.preview) return
|
|
870
|
+
|
|
871
|
+
const processed = val || ''
|
|
872
|
+
|
|
873
|
+
// 检测并剥离 frontmatter(预览中不显示,仅用于解析 tools 映射)
|
|
874
|
+
const fmMatch = processed.match(/^\n*---\n([\s\S]*?)\n---(?:\n|$)/)
|
|
875
|
+
let contentWithoutFm = processed
|
|
876
|
+
let toolsMap = {} // id -> name 映射
|
|
877
|
+
|
|
878
|
+
if (fmMatch) {
|
|
879
|
+
toolsMap = this.parseFrontmatterToolsMap(fmMatch[1])
|
|
880
|
+
contentWithoutFm = processed.slice(fmMatch[0].length)
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
// 记录 frontmatter 占用的行数:预览行号(0 基,剥离 frontmatter 后)加此偏移即编辑器行号
|
|
884
|
+
this._previewLineOffset = fmMatch ? (fmMatch[0].match(/\n/g) || []).length : 0
|
|
885
|
+
// 内容变化后预览锚点失效,下次滚动时重建
|
|
886
|
+
this.invalidateAnchorCache()
|
|
887
|
+
|
|
888
|
+
// 先把自定义标签替换成占位符(避免被 markdown 处理)
|
|
889
|
+
// 处理 tool-card 标签(只需要 id)
|
|
890
|
+
contentWithoutFm = contentWithoutFm.replace(/<tool-card\s+id="([^"]+)"\s*\/?>/gi, (match, id) => {
|
|
891
|
+
return `[[TOOL_CARD:${id}]]`
|
|
892
|
+
})
|
|
893
|
+
|
|
894
|
+
// 处理 tool-name 标签(只需要 id)
|
|
895
|
+
contentWithoutFm = contentWithoutFm.replace(/<tool-name\s+id="([^"]+)"\s*\/?>/gi, (match, id) => {
|
|
896
|
+
return `[[TOOL_NAME:${id}]]`
|
|
897
|
+
})
|
|
898
|
+
|
|
899
|
+
// 处理 doc-name 标签(配置文档,支持单/双引号)
|
|
900
|
+
contentWithoutFm = contentWithoutFm.replace(/<doc-name\s+id=["']([^"']*)["']\s*\/?>/gi, (match, id) => {
|
|
901
|
+
return `[[DOC_NAME:${id}]]`
|
|
902
|
+
})
|
|
903
|
+
|
|
904
|
+
// 处理 #{xxx()} 函数引用
|
|
905
|
+
contentWithoutFm = contentWithoutFm.replace(/#\{([^}]+)\}/g, (match, func) => {
|
|
906
|
+
return `[[FUNC:${func}]]`
|
|
907
|
+
})
|
|
908
|
+
|
|
909
|
+
// 处理 {{code}} 动态参数(仅在传入了 globalParamsData 时)
|
|
910
|
+
if (this.hasDynamicParam) {
|
|
911
|
+
contentWithoutFm = contentWithoutFm.replace(/\{\{([^{}]+)\}\}/g, (match, code) => {
|
|
912
|
+
return `[[PARAM:${code.trim()}]]`
|
|
913
|
+
})
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
// 渲染 markdown
|
|
917
|
+
let html = renderMd(contentWithoutFm)
|
|
918
|
+
|
|
919
|
+
// 把占位符替换成最终的 HTML 标签,从 toolsMap 获取 name
|
|
920
|
+
html = html.replace(/\[\[TOOL_CARD:([^\]]+)\]\]/g, (match, id) => {
|
|
921
|
+
const displayName = toolsMap[id] || id || ''
|
|
922
|
+
return `<span class="tool-tag tool-tag--card">${displayName}</span>`
|
|
923
|
+
})
|
|
924
|
+
|
|
925
|
+
html = html.replace(/\[\[TOOL_NAME:([^\]]+)\]\]/g, (match, id) => {
|
|
926
|
+
const displayName = toolsMap[id] || id || ''
|
|
927
|
+
return `<span class="tool-tag tool-tag--name">${displayName}</span>`
|
|
928
|
+
})
|
|
929
|
+
|
|
930
|
+
html = html.replace(/\[\[DOC_NAME:([^\]]*)\]\]/g, (match, id) => {
|
|
931
|
+
const displayName = toolsMap[id] || id || ''
|
|
932
|
+
return `<span class="tool-tag tool-tag--doc">${displayName}</span>`
|
|
933
|
+
})
|
|
934
|
+
|
|
935
|
+
html = html.replace(/\[\[FUNC:([^\]]+)\]\]/g, (match, func) => {
|
|
936
|
+
const funcName = func.replace(/\(\)$/, '').replace(/\(.*\)$/, '')
|
|
937
|
+
return `<span class="tool-tag tool-tag--func">${funcName}</span>`
|
|
938
|
+
})
|
|
939
|
+
|
|
940
|
+
html = html.replace(/\[\[PARAM:([^\]]+)\]\]/g, (match, code) => {
|
|
941
|
+
const displayName = this.paramNameMap[code] || code
|
|
942
|
+
return `<span class="tool-tag tool-tag--param">${displayName}</span>`
|
|
943
|
+
})
|
|
944
|
+
|
|
945
|
+
this.$refs.preview.innerHTML = html
|
|
946
|
+
},
|
|
947
|
+
|
|
948
|
+
// 解析 frontmatter 中所有区块(tools/docs)的 id -> name 映射
|
|
949
|
+
parseFrontmatterToolsMap (fmContent) {
|
|
950
|
+
const toolsMap = {}
|
|
951
|
+
let current = null
|
|
952
|
+
fmContent.split('\n').forEach(line => {
|
|
953
|
+
const idMatch = line.match(/^\s*-\s+id:\s*(.+)$/)
|
|
954
|
+
const nameMatch = line.match(/^\s+name:\s*(.+)$/)
|
|
955
|
+
|
|
956
|
+
if (idMatch) {
|
|
957
|
+
current = { id: idMatch[1].trim() }
|
|
958
|
+
} else if (current && nameMatch) {
|
|
959
|
+
toolsMap[current.id] = nameMatch[1].trim()
|
|
960
|
+
current = null
|
|
961
|
+
}
|
|
962
|
+
})
|
|
963
|
+
return toolsMap
|
|
964
|
+
},
|
|
965
|
+
|
|
966
|
+
// ─── 快捷插入弹窗 ────────────────────────────────────────────
|
|
967
|
+
openQuickInsert () {
|
|
968
|
+
this.quickInsertVisible = true
|
|
969
|
+
// 流程节点场景下优先展示动态参数
|
|
970
|
+
this.quickInsertTab = this.hasDynamicParam ? 'dynamicParam' : 'function'
|
|
971
|
+
},
|
|
972
|
+
|
|
973
|
+
onDialogClose () {
|
|
974
|
+
// 弹窗关闭时,如果没有插入内容,删除触发的 /
|
|
975
|
+
if (this.slashCursor && this.editor) {
|
|
976
|
+
const from = this.slashCursor
|
|
977
|
+
const to = { line: from.line, ch: from.ch + 1 }
|
|
978
|
+
// 检查该位置是否还是 /
|
|
979
|
+
const ch = this.editor.getRange(from, to)
|
|
980
|
+
if (ch === '/') {
|
|
981
|
+
this.editor.replaceRange('', from, to)
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
this.slashCursor = null
|
|
985
|
+
this.editor && this.editor.focus()
|
|
986
|
+
},
|
|
987
|
+
|
|
988
|
+
// --- 删除触发 / 并关闭弹窗
|
|
989
|
+
closeAndCleanSlash () {
|
|
990
|
+
if (this.slashCursor && this.editor) {
|
|
991
|
+
const from = this.slashCursor
|
|
992
|
+
const to = { line: from.line, ch: from.ch + 1 }
|
|
993
|
+
const ch = this.editor.getRange(from, to)
|
|
994
|
+
if (ch === '/') {
|
|
995
|
+
this.editor.replaceRange('', from, to)
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
this.slashCursor = null
|
|
999
|
+
this.quickInsertVisible = false
|
|
1000
|
+
},
|
|
1001
|
+
|
|
1002
|
+
// --- 解析 frontmatter,返回 { hasFrontmatter, tools, docs, fmLength }
|
|
1003
|
+
// 支持 tools(工具)与 docs(配置文档)多个区块
|
|
1004
|
+
parseFrontmatter () {
|
|
1005
|
+
const value = this.editor.getValue()
|
|
1006
|
+
// 支持开头有换行符的情况
|
|
1007
|
+
const fmMatch = value.match(/^\n*---\n([\s\S]*?)\n---\n*/)
|
|
1008
|
+
if (!fmMatch) {
|
|
1009
|
+
return { hasFrontmatter: false, tools: [], docs: [], fmLength: 0 }
|
|
1010
|
+
}
|
|
1011
|
+
const fmText = fmMatch[1]
|
|
1012
|
+
const fmLength = fmMatch[0].length
|
|
1013
|
+
const sections = { tools: [], docs: [] }
|
|
1014
|
+
let section = null
|
|
1015
|
+
let current = null
|
|
1016
|
+
fmText.split('\n').forEach(line => {
|
|
1017
|
+
// 顶层区块名:tools: / docs:(无缩进)
|
|
1018
|
+
const sectionMatch = line.match(/^([A-Za-z_]\w*):\s*$/)
|
|
1019
|
+
if (sectionMatch) {
|
|
1020
|
+
section = sectionMatch[1]
|
|
1021
|
+
if (!sections[section]) sections[section] = []
|
|
1022
|
+
current = null
|
|
1023
|
+
return
|
|
1024
|
+
}
|
|
1025
|
+
// 列表项起始: - id: xxx
|
|
1026
|
+
const idMatch = line.match(/^\s*-\s+id:\s*(.+)$/)
|
|
1027
|
+
if (idMatch && section) {
|
|
1028
|
+
current = { id: idMatch[1].trim() }
|
|
1029
|
+
sections[section].push(current)
|
|
1030
|
+
return
|
|
1031
|
+
}
|
|
1032
|
+
// 列表项子字段: key: value
|
|
1033
|
+
if (current && section) {
|
|
1034
|
+
const kv = line.match(/^\s+([A-Za-z_]\w*):\s*(.*)$/)
|
|
1035
|
+
if (kv) current[kv[1]] = kv[2].trim()
|
|
1036
|
+
}
|
|
1037
|
+
})
|
|
1038
|
+
return { hasFrontmatter: true, tools: sections.tools || [], docs: sections.docs || [], fmLength }
|
|
1039
|
+
},
|
|
1040
|
+
|
|
1041
|
+
// --- 生成 frontmatter 文本(标准 YAML 格式,列表项前两个空格缩进)
|
|
1042
|
+
buildFrontmatter (tools, docs) {
|
|
1043
|
+
const hasTools = tools && tools.length > 0
|
|
1044
|
+
const hasDocs = docs && docs.length > 0
|
|
1045
|
+
if (!hasTools && !hasDocs) return ''
|
|
1046
|
+
let fm = '---\n'
|
|
1047
|
+
if (hasTools) {
|
|
1048
|
+
fm += 'tools:\n'
|
|
1049
|
+
tools.forEach(t => {
|
|
1050
|
+
fm += ` - id: ${t.id}\n`
|
|
1051
|
+
fm += ` type: ${t.type}\n`
|
|
1052
|
+
fm += ` name: ${t.name}\n`
|
|
1053
|
+
if (t.meta) fm += ` meta: ${t.meta}\n`
|
|
1054
|
+
})
|
|
1055
|
+
}
|
|
1056
|
+
if (hasDocs) {
|
|
1057
|
+
fm += 'docs:\n'
|
|
1058
|
+
docs.forEach(d => {
|
|
1059
|
+
fm += ` - id: ${d.id}\n`
|
|
1060
|
+
fm += ` name: ${d.name}\n`
|
|
1061
|
+
})
|
|
1062
|
+
}
|
|
1063
|
+
fm += '---\n'
|
|
1064
|
+
return fm
|
|
1065
|
+
},
|
|
1066
|
+
|
|
1067
|
+
// --- 将工具写入 frontmatter 并在光标处插入 tool-card 标签
|
|
1068
|
+
insertTool (toolEntry) {
|
|
1069
|
+
if (!this.editor) return
|
|
1070
|
+
this.closeAndCleanSlash()
|
|
1071
|
+
|
|
1072
|
+
const { hasFrontmatter, tools, docs, fmLength } = this.parseFrontmatter()
|
|
1073
|
+
const value = this.editor.getValue()
|
|
1074
|
+
|
|
1075
|
+
// 避免重复插入相同 id
|
|
1076
|
+
const exists = tools.some(t => t.id === toolEntry.id)
|
|
1077
|
+
if (!exists) tools.push(toolEntry)
|
|
1078
|
+
|
|
1079
|
+
const newFm = this.buildFrontmatter(tools, docs)
|
|
1080
|
+
const newValue = hasFrontmatter
|
|
1081
|
+
? newFm + value.slice(fmLength)
|
|
1082
|
+
: newFm + value
|
|
1083
|
+
|
|
1084
|
+
// 计算光标行偏移(frontmatter 行数变化)
|
|
1085
|
+
const cursor = this.editor.getCursor()
|
|
1086
|
+
const fmLineCount = newFm.split('\n').length - 1
|
|
1087
|
+
const oldFmLineCount = hasFrontmatter
|
|
1088
|
+
? value.slice(0, fmLength).split('\n').length - 1
|
|
1089
|
+
: 0
|
|
1090
|
+
const lineDelta = fmLineCount - oldFmLineCount
|
|
1091
|
+
|
|
1092
|
+
this.editor.setValue(newValue)
|
|
1093
|
+
|
|
1094
|
+
// 恢复光标并插入 tool-card 标签(不带 name)
|
|
1095
|
+
const newLine = Math.max(0, cursor.line + lineDelta)
|
|
1096
|
+
this.editor.setCursor({ line: newLine, ch: cursor.ch })
|
|
1097
|
+
const tagCursor = this.editor.getCursor()
|
|
1098
|
+
const tag = `<tool-card id="${toolEntry.id}" />`
|
|
1099
|
+
this.editor.replaceRange(tag, tagCursor)
|
|
1100
|
+
this.editor.setCursor({ line: tagCursor.line, ch: tagCursor.ch + tag.length })
|
|
1101
|
+
this.editor.focus()
|
|
1102
|
+
|
|
1103
|
+
const val = this.editor.getValue()
|
|
1104
|
+
this.emitChange(val)
|
|
1105
|
+
this.updatePreview(val)
|
|
1106
|
+
},
|
|
1107
|
+
|
|
1108
|
+
// --- 将工具写入 frontmatter 并在光标处插入 tool-name 标签
|
|
1109
|
+
insertToolName (toolEntry) {
|
|
1110
|
+
if (!this.editor) return
|
|
1111
|
+
this.closeAndCleanSlash()
|
|
1112
|
+
|
|
1113
|
+
const { hasFrontmatter, tools, docs, fmLength } = this.parseFrontmatter()
|
|
1114
|
+
const value = this.editor.getValue()
|
|
1115
|
+
|
|
1116
|
+
// 避免重复插入相同 id
|
|
1117
|
+
const exists = tools.some(t => t.id === toolEntry.id)
|
|
1118
|
+
if (!exists) tools.push(toolEntry)
|
|
1119
|
+
|
|
1120
|
+
const newFm = this.buildFrontmatter(tools, docs)
|
|
1121
|
+
const newValue = hasFrontmatter
|
|
1122
|
+
? newFm + value.slice(fmLength)
|
|
1123
|
+
: newFm + value
|
|
1124
|
+
|
|
1125
|
+
// 计算光标行偏移(frontmatter 行数变化)
|
|
1126
|
+
const cursor = this.editor.getCursor()
|
|
1127
|
+
const fmLineCount = newFm.split('\n').length - 1
|
|
1128
|
+
const oldFmLineCount = hasFrontmatter
|
|
1129
|
+
? value.slice(0, fmLength).split('\n').length - 1
|
|
1130
|
+
: 0
|
|
1131
|
+
const lineDelta = fmLineCount - oldFmLineCount
|
|
1132
|
+
|
|
1133
|
+
this.editor.setValue(newValue)
|
|
1134
|
+
|
|
1135
|
+
// 恢复光标并插入 tool-name 标签(不带 name)
|
|
1136
|
+
const newLine = Math.max(0, cursor.line + lineDelta)
|
|
1137
|
+
this.editor.setCursor({ line: newLine, ch: cursor.ch })
|
|
1138
|
+
const tagCursor = this.editor.getCursor()
|
|
1139
|
+
const tag = `<tool-name id="${toolEntry.id}" />`
|
|
1140
|
+
this.editor.replaceRange(tag, tagCursor)
|
|
1141
|
+
this.editor.setCursor({ line: tagCursor.line, ch: tagCursor.ch + tag.length })
|
|
1142
|
+
this.editor.focus()
|
|
1143
|
+
|
|
1144
|
+
const val = this.editor.getValue()
|
|
1145
|
+
this.emitChange(val)
|
|
1146
|
+
this.updatePreview(val)
|
|
1147
|
+
},
|
|
1148
|
+
|
|
1149
|
+
// --- 插入函数:生成 {{ code }} 格式文本
|
|
1150
|
+
insertFunction (item) {
|
|
1151
|
+
if (!this.editor) return
|
|
1152
|
+
this.closeAndCleanSlash()
|
|
1153
|
+
const cursor = this.editor.getCursor()
|
|
1154
|
+
const code = item.FUNC_VAR || item.METHOD || item.CODE || item.NAME
|
|
1155
|
+
const text = `#{${code}()}`
|
|
1156
|
+
this.editor.replaceRange(text, cursor)
|
|
1157
|
+
this.editor.focus()
|
|
1158
|
+
this.editor.setCursor({ line: cursor.line, ch: cursor.ch + text.length })
|
|
1159
|
+
const val = this.editor.getValue()
|
|
1160
|
+
this.emitChange(val)
|
|
1161
|
+
},
|
|
1162
|
+
|
|
1163
|
+
// --- 插入模板(直接插入内容文本)
|
|
1164
|
+
insertTemplate (item) {
|
|
1165
|
+
if (!this.editor) return
|
|
1166
|
+
this.closeAndCleanSlash()
|
|
1167
|
+
const cursor = this.editor.getCursor()
|
|
1168
|
+
this.editor.replaceRange(item.CONTENT || item.TITLE, cursor)
|
|
1169
|
+
this.editor.focus()
|
|
1170
|
+
const val = this.editor.getValue()
|
|
1171
|
+
this.emitChange(val)
|
|
1172
|
+
},
|
|
1173
|
+
|
|
1174
|
+
// --- 插入对象接口
|
|
1175
|
+
insertApi (item) {
|
|
1176
|
+
const entityId = item.ENTITY || (this.selectedEntity && (this.selectedEntity.id || this.selectedEntity))
|
|
1177
|
+
this.insertTool({
|
|
1178
|
+
id: `${entityId}:${item.ID}`,
|
|
1179
|
+
type: 'function',
|
|
1180
|
+
name: this.buildApiToolName(item),
|
|
1181
|
+
meta: entityId || undefined
|
|
1182
|
+
})
|
|
1183
|
+
},
|
|
1184
|
+
|
|
1185
|
+
// --- 插入外部接口
|
|
1186
|
+
insertExternalApi (item) {
|
|
1187
|
+
this.insertTool({
|
|
1188
|
+
id: item.ID,
|
|
1189
|
+
type: 'api',
|
|
1190
|
+
name: item.NAME
|
|
1191
|
+
})
|
|
1192
|
+
},
|
|
1193
|
+
|
|
1194
|
+
// --- 插入子智能体
|
|
1195
|
+
insertSubAgent (item) {
|
|
1196
|
+
this.insertTool({
|
|
1197
|
+
id: item.ID,
|
|
1198
|
+
type: 'subagent',
|
|
1199
|
+
name: item.NAME
|
|
1200
|
+
})
|
|
1201
|
+
},
|
|
1202
|
+
|
|
1203
|
+
// --- 插入通用接口名称
|
|
1204
|
+
insertFrameApiName (item) {
|
|
1205
|
+
this.insertToolName({
|
|
1206
|
+
id: `${item.ENTITY}:${item.ID}`,
|
|
1207
|
+
type: 'function',
|
|
1208
|
+
name: this.buildApiToolName(item),
|
|
1209
|
+
meta: item.ENTITY || undefined
|
|
1210
|
+
})
|
|
1211
|
+
},
|
|
1212
|
+
|
|
1213
|
+
// --- 插入对象接口名称
|
|
1214
|
+
insertApiName (item) {
|
|
1215
|
+
const entityId = item.ENTITY || (this.selectedEntity && (this.selectedEntity.id || this.selectedEntity))
|
|
1216
|
+
this.insertToolName({
|
|
1217
|
+
id: `${entityId}:${item.ID}`,
|
|
1218
|
+
type: 'function',
|
|
1219
|
+
name: this.buildApiToolName(item),
|
|
1220
|
+
meta: entityId || undefined
|
|
1221
|
+
})
|
|
1222
|
+
},
|
|
1223
|
+
|
|
1224
|
+
// 构造对象接口的工具名:对象名_接口名(防止重名)
|
|
1225
|
+
buildApiToolName (item) {
|
|
1226
|
+
const entityName = item['ENTITY#'] || (this.selectedEntity && this.selectedEntity.name) || ''
|
|
1227
|
+
const apiName = item.LABEL || item.NAME || ''
|
|
1228
|
+
return entityName ? `${entityName}_${apiName}` : apiName
|
|
1229
|
+
},
|
|
1230
|
+
|
|
1231
|
+
// --- 插入外部接口名称
|
|
1232
|
+
insertExternalApiName (item) {
|
|
1233
|
+
this.insertToolName({
|
|
1234
|
+
id: item.ID,
|
|
1235
|
+
type: 'api',
|
|
1236
|
+
name: item.NAME
|
|
1237
|
+
})
|
|
1238
|
+
},
|
|
1239
|
+
|
|
1240
|
+
// --- 插入子智能体名称
|
|
1241
|
+
insertSubAgentName (item) {
|
|
1242
|
+
this.insertToolName({
|
|
1243
|
+
id: item.ID,
|
|
1244
|
+
type: 'subagent',
|
|
1245
|
+
name: item.NAME
|
|
1246
|
+
})
|
|
1247
|
+
},
|
|
1248
|
+
|
|
1249
|
+
// --- 插入内置工具
|
|
1250
|
+
insertSysTool (item) {
|
|
1251
|
+
this.insertTool({
|
|
1252
|
+
id: item.CODE,
|
|
1253
|
+
type: 'sys_tool',
|
|
1254
|
+
name: item.NAME
|
|
1255
|
+
})
|
|
1256
|
+
},
|
|
1257
|
+
|
|
1258
|
+
// --- 插入内置工具名称
|
|
1259
|
+
insertSysToolName (item) {
|
|
1260
|
+
this.insertToolName({
|
|
1261
|
+
id: item.CODE,
|
|
1262
|
+
type: 'sys_tool',
|
|
1263
|
+
name: item.NAME
|
|
1264
|
+
})
|
|
1265
|
+
},
|
|
1266
|
+
|
|
1267
|
+
// ─── 动态参数 ────────────────────────────────────────────────
|
|
1268
|
+
// 插入动态参数:以 {{code}} 文本插入到光标处
|
|
1269
|
+
insertDynamicParam (node) {
|
|
1270
|
+
if (!node || !node.leaf) return
|
|
1271
|
+
this.insertTextAtSlash(`{{${node.code}}}`)
|
|
1272
|
+
},
|
|
1273
|
+
|
|
1274
|
+
// 删除触发的 / 后,在该位置插入纯文本
|
|
1275
|
+
insertTextAtSlash (text) {
|
|
1276
|
+
if (!this.editor) return
|
|
1277
|
+
this.closeAndCleanSlash()
|
|
1278
|
+
const cursor = this.editor.getCursor()
|
|
1279
|
+
this.editor.replaceRange(text, cursor)
|
|
1280
|
+
this.editor.setCursor({ line: cursor.line, ch: cursor.ch + text.length })
|
|
1281
|
+
this.editor.focus()
|
|
1282
|
+
const val = this.editor.getValue()
|
|
1283
|
+
this.emitChange(val)
|
|
1284
|
+
this.updatePreview(val)
|
|
1285
|
+
},
|
|
1286
|
+
|
|
1287
|
+
// ─── 公式 ────────────────────────────────────────────────────
|
|
1288
|
+
loadFormulaLibrary () {
|
|
1289
|
+
this.$http.$request({
|
|
1290
|
+
action: 'getDesignFunction',
|
|
1291
|
+
entityId: 'FM_EL_DESIGN',
|
|
1292
|
+
node: 'root',
|
|
1293
|
+
systemId: this.SYSTEM,
|
|
1294
|
+
enable: '1'
|
|
1295
|
+
}).then(data => {
|
|
1296
|
+
this.formulaLibrary = data
|
|
1297
|
+
}).catch(() => {})
|
|
1298
|
+
},
|
|
1299
|
+
|
|
1300
|
+
// 打开公式编辑器(先清掉触发的 / 并记录插入位置)
|
|
1301
|
+
openFormulaEditor () {
|
|
1302
|
+
if (!this.editor) return
|
|
1303
|
+
this.closeAndCleanSlash()
|
|
1304
|
+
this.formulaCursor = this.editor.getCursor()
|
|
1305
|
+
this.ruleInfo = '{}'
|
|
1306
|
+
this.$nextTick(() => {
|
|
1307
|
+
if (this.$refs.rule) this.$refs.rule.setting()
|
|
1308
|
+
})
|
|
1309
|
+
},
|
|
1310
|
+
|
|
1311
|
+
// 公式确认:插入表达式文本(与原编辑器存储格式保持一致)
|
|
1312
|
+
// val 来自 epx-rule 的 update:model-value(仅在用户点击确认时触发,不受本组件自身重置 ruleInfo 影响)
|
|
1313
|
+
onFormulaChange (val) {
|
|
1314
|
+
this.ruleInfo = val
|
|
1315
|
+
let param = {}
|
|
1316
|
+
try {
|
|
1317
|
+
param = JSON.parse(val)
|
|
1318
|
+
} catch (error) {
|
|
1319
|
+
param = { el: val }
|
|
1320
|
+
}
|
|
1321
|
+
const text = param.el || ''
|
|
1322
|
+
this.ruleInfo = ''
|
|
1323
|
+
if (!text || !this.editor) {
|
|
1324
|
+
this.formulaCursor = null
|
|
1325
|
+
return
|
|
1326
|
+
}
|
|
1327
|
+
const cursor = this.formulaCursor || this.editor.getCursor()
|
|
1328
|
+
this.editor.replaceRange(text, cursor)
|
|
1329
|
+
this.editor.setCursor({ line: cursor.line, ch: cursor.ch + text.length })
|
|
1330
|
+
this.editor.focus()
|
|
1331
|
+
this.formulaCursor = null
|
|
1332
|
+
const newVal = this.editor.getValue()
|
|
1333
|
+
this.emitChange(newVal)
|
|
1334
|
+
this.updatePreview(newVal)
|
|
1335
|
+
},
|
|
1336
|
+
|
|
1337
|
+
// ─── 数据加载 ────────────────────────────────────────────────
|
|
1338
|
+
loadFunctionList () {
|
|
1339
|
+
Promise.all([
|
|
1340
|
+
this.$http.$post({
|
|
1341
|
+
action: 'list',
|
|
1342
|
+
entityId: 'FM_FUNCTION',
|
|
1343
|
+
'scope.TYPE': 'AI_FUN'
|
|
1344
|
+
}),
|
|
1345
|
+
this.$http.$post({
|
|
1346
|
+
action: 'list',
|
|
1347
|
+
entityId: 'FM_AI_FUNCTION',
|
|
1348
|
+
'scope.ENABLE#not': '0',
|
|
1349
|
+
'scope.TYPE': 'static_var'
|
|
1350
|
+
})
|
|
1351
|
+
]).then(([fnData, varData]) => {
|
|
1352
|
+
this.functionList = [
|
|
1353
|
+
...(fnData.entitys || []),
|
|
1354
|
+
...(varData.entitys || [])
|
|
1355
|
+
]
|
|
1356
|
+
}).catch(() => {})
|
|
1357
|
+
},
|
|
1358
|
+
|
|
1359
|
+
loadTemplateList () {
|
|
1360
|
+
this.$http.list({
|
|
1361
|
+
entityId: 'FM_AI_PROMPT',
|
|
1362
|
+
'scope.IS_COMMON_USE': '1'
|
|
1363
|
+
}).then(data => {
|
|
1364
|
+
this.templateList = data.entitys || []
|
|
1365
|
+
}).catch(() => {})
|
|
1366
|
+
},
|
|
1367
|
+
|
|
1368
|
+
// 标签页切换
|
|
1369
|
+
handleApiTabChange (tab) {
|
|
1370
|
+
if (tab.name === 'frame' && this.frameApiList.length === 0) {
|
|
1371
|
+
this.loadFrameApiList()
|
|
1372
|
+
}
|
|
1373
|
+
},
|
|
1374
|
+
|
|
1375
|
+
// 加载通用接口列表
|
|
1376
|
+
loadFrameApiList () {
|
|
1377
|
+
this.$http.list({
|
|
1378
|
+
action: 'list',
|
|
1379
|
+
entityId: 'FM_ENTITY_API',
|
|
1380
|
+
page: this.frameApiCurrentPage,
|
|
1381
|
+
limit: this.frameApiPageSize,
|
|
1382
|
+
'scope.FRAME_API': '1',
|
|
1383
|
+
columnFieldNames: 'ID,ENTITY,ENTITY#,NAME,LABEL#,PARAM_EXPLAIN,FRAME_API'
|
|
1384
|
+
}).then(data => {
|
|
1385
|
+
this.frameApiList = data.entitys || []
|
|
1386
|
+
this.frameApiTotal = data.total || 0
|
|
1387
|
+
}).catch(() => {})
|
|
1388
|
+
},
|
|
1389
|
+
|
|
1390
|
+
// 通用接口分页切换
|
|
1391
|
+
handleFrameApiPageChange (page) {
|
|
1392
|
+
this.frameApiCurrentPage = page
|
|
1393
|
+
this.loadFrameApiList()
|
|
1394
|
+
},
|
|
1395
|
+
|
|
1396
|
+
// 插入通用接口
|
|
1397
|
+
insertFrameApi (item) {
|
|
1398
|
+
this.insertTool({
|
|
1399
|
+
id: `${item.ENTITY}:${item.ID}`,
|
|
1400
|
+
type: 'function',
|
|
1401
|
+
name: this.buildApiToolName(item),
|
|
1402
|
+
meta: item.ENTITY || undefined
|
|
1403
|
+
})
|
|
1404
|
+
},
|
|
1405
|
+
|
|
1406
|
+
handleEntityChange (value) {
|
|
1407
|
+
this.selectedEntity = value
|
|
1408
|
+
this.loadApiList()
|
|
1409
|
+
},
|
|
1410
|
+
|
|
1411
|
+
loadApiList () {
|
|
1412
|
+
if (!this.selectedEntity) {
|
|
1413
|
+
this.apiList = []
|
|
1414
|
+
this.apiTotal = 0
|
|
1415
|
+
return
|
|
1416
|
+
}
|
|
1417
|
+
const entityId = this.selectedEntity.id || this.selectedEntity
|
|
1418
|
+
this.$http.list({
|
|
1419
|
+
action: 'getEntityAllApi',
|
|
1420
|
+
entityId: 'FM_ENTITY_API',
|
|
1421
|
+
metaId: entityId,
|
|
1422
|
+
columnFieldNames: 'ID,ENTITY#,NAME,LABEL#,PARAM_EXPLAIN'
|
|
1423
|
+
}).then(data => {
|
|
1424
|
+
this.apiList = data.entitys || []
|
|
1425
|
+
this.apiTotal = data.entitys ? data.entitys.length : 0
|
|
1426
|
+
}).catch(() => {})
|
|
1427
|
+
},
|
|
1428
|
+
|
|
1429
|
+
loadExternalApiList () {
|
|
1430
|
+
this.$http.list({
|
|
1431
|
+
action: 'list',
|
|
1432
|
+
entityId: 'FM_API_IN',
|
|
1433
|
+
page: this.externalApiCurrentPage,
|
|
1434
|
+
limit: this.externalApiPageSize,
|
|
1435
|
+
columnFieldNames: 'ID,NAME#,URL,NOTICE,METHOD'
|
|
1436
|
+
}).then(data => {
|
|
1437
|
+
this.externalApiList = data.entitys || []
|
|
1438
|
+
this.externalApiTotal = data.total || 0
|
|
1439
|
+
}).catch(() => {})
|
|
1440
|
+
},
|
|
1441
|
+
|
|
1442
|
+
handleExternalApiPageChange (page) {
|
|
1443
|
+
this.externalApiCurrentPage = page
|
|
1444
|
+
this.loadExternalApiList()
|
|
1445
|
+
},
|
|
1446
|
+
|
|
1447
|
+
loadSubAgentList () {
|
|
1448
|
+
this.$http.list({
|
|
1449
|
+
action: 'list',
|
|
1450
|
+
entityId: 'FM_SERVICE',
|
|
1451
|
+
page: this.subAgentCurrentPage,
|
|
1452
|
+
limit: this.subAgentPageSize,
|
|
1453
|
+
'scope.TYPE': 'agent',
|
|
1454
|
+
columnFieldNames: 'ID,NAME#,CODE,NOTE,IMAGE'
|
|
1455
|
+
}).then(data => {
|
|
1456
|
+
this.subAgentList = data.entitys || []
|
|
1457
|
+
this.subAgentTotal = data.total || 0
|
|
1458
|
+
}).catch(() => {})
|
|
1459
|
+
},
|
|
1460
|
+
|
|
1461
|
+
handleSubAgentPageChange (page) {
|
|
1462
|
+
this.subAgentCurrentPage = page
|
|
1463
|
+
this.loadSubAgentList()
|
|
1464
|
+
},
|
|
1465
|
+
|
|
1466
|
+
// ─── 内置工具 ────────────────────────────────────────────────
|
|
1467
|
+
loadSysToolList () {
|
|
1468
|
+
this.$http.list({
|
|
1469
|
+
action: 'list',
|
|
1470
|
+
entityId: 'FM_AI_SYS_TOOL',
|
|
1471
|
+
page: this.sysToolCurrentPage,
|
|
1472
|
+
limit: this.sysToolPageSize,
|
|
1473
|
+
'scope.ENABLE': '1',
|
|
1474
|
+
columnFieldNames: 'ID,NAME,CODE,DESC,ENABLE'
|
|
1475
|
+
}).then(data => {
|
|
1476
|
+
this.sysToolList = data.entitys || []
|
|
1477
|
+
this.sysToolTotal = data.total || 0
|
|
1478
|
+
}).catch(() => {})
|
|
1479
|
+
},
|
|
1480
|
+
|
|
1481
|
+
handleSysToolPageChange (page) {
|
|
1482
|
+
this.sysToolCurrentPage = page
|
|
1483
|
+
this.loadSysToolList()
|
|
1484
|
+
},
|
|
1485
|
+
|
|
1486
|
+
// ─── 技能 ────────────────────────────────────────────────────
|
|
1487
|
+
loadSkillList () {
|
|
1488
|
+
const params = {
|
|
1489
|
+
action: 'list',
|
|
1490
|
+
entityId: 'FM_AI_SKILL',
|
|
1491
|
+
page: this.skillCurrentPage,
|
|
1492
|
+
limit: this.skillPageSize,
|
|
1493
|
+
'scope.STATUS': '1',
|
|
1494
|
+
columnFieldNames: 'ID,NAME#,CODE,DESC,STATUS'
|
|
1495
|
+
}
|
|
1496
|
+
if (this.skillActiveTab === 'platform') {
|
|
1497
|
+
params['scope.SYSTEM|CODE'] = window.BASE_SYSTEM_ID
|
|
1498
|
+
} else {
|
|
1499
|
+
params['scope.SYSTEM'] = this.SYSTEM
|
|
1500
|
+
}
|
|
1501
|
+
this.$http.list(params).then(data => {
|
|
1502
|
+
this.skillList = data.entitys || []
|
|
1503
|
+
this.skillTotal = data.total || 0
|
|
1504
|
+
}).catch(() => {})
|
|
1505
|
+
},
|
|
1506
|
+
|
|
1507
|
+
handleSkillTabChange () {
|
|
1508
|
+
this.skillCurrentPage = 1
|
|
1509
|
+
this.loadSkillList()
|
|
1510
|
+
},
|
|
1511
|
+
|
|
1512
|
+
handleSkillPageChange (page) {
|
|
1513
|
+
this.skillCurrentPage = page
|
|
1514
|
+
this.loadSkillList()
|
|
1515
|
+
},
|
|
1516
|
+
|
|
1517
|
+
// 插入技能:以 `技能编号` 形式插入到光标处
|
|
1518
|
+
insertSkill (item) {
|
|
1519
|
+
if (!this.editor) return
|
|
1520
|
+
this.closeAndCleanSlash()
|
|
1521
|
+
const code = item.CODE || item.NAME
|
|
1522
|
+
const text = '`' + code + '`'
|
|
1523
|
+
const cursor = this.editor.getCursor()
|
|
1524
|
+
this.editor.replaceRange(text, cursor)
|
|
1525
|
+
this.editor.focus()
|
|
1526
|
+
this.editor.setCursor({ line: cursor.line, ch: cursor.ch + text.length })
|
|
1527
|
+
const val = this.editor.getValue()
|
|
1528
|
+
this.emitChange(val)
|
|
1529
|
+
this.updatePreview(val)
|
|
1530
|
+
},
|
|
1531
|
+
|
|
1532
|
+
// ─── 配置文档(树形) ─────────────────────────────────────────
|
|
1533
|
+
loadDocTree () {
|
|
1534
|
+
this.$http.$post({
|
|
1535
|
+
action: 'getTree',
|
|
1536
|
+
entityId: 'FM_AI_DOC',
|
|
1537
|
+
up_field: 'UP',
|
|
1538
|
+
scopeParams: JSON.stringify([]),
|
|
1539
|
+
node: 'root',
|
|
1540
|
+
order_field: '',
|
|
1541
|
+
order_mode: ''
|
|
1542
|
+
}).then(data => {
|
|
1543
|
+
this.docTree = data || []
|
|
1544
|
+
}).catch(() => {})
|
|
1545
|
+
},
|
|
1546
|
+
|
|
1547
|
+
filterDocNode (value, data) {
|
|
1548
|
+
if (!value) return true
|
|
1549
|
+
return (data.text || data.title || '').indexOf(value) !== -1
|
|
1550
|
+
},
|
|
1551
|
+
|
|
1552
|
+
// 点击树节点:叶子节点(文档)作为工具插入;目录节点由 el-tree 自动展开
|
|
1553
|
+
onDocNodeClick (data) {
|
|
1554
|
+
if (data.leaf) this.insertDoc(data)
|
|
1555
|
+
},
|
|
1556
|
+
|
|
1557
|
+
// 插入配置文档:写入 frontmatter 的 docs 区块,并在光标处插入 doc-name 标签
|
|
1558
|
+
insertDoc (item) {
|
|
1559
|
+
if (!this.editor) return
|
|
1560
|
+
this.closeAndCleanSlash()
|
|
1561
|
+
const docEntry = {
|
|
1562
|
+
id: item.ID || item.id,
|
|
1563
|
+
name: item.TITLE || item.text || item.title || ''
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
const { hasFrontmatter, tools, docs, fmLength } = this.parseFrontmatter()
|
|
1567
|
+
const value = this.editor.getValue()
|
|
1568
|
+
|
|
1569
|
+
// 避免重复写入相同 id
|
|
1570
|
+
const exists = docs.some(d => d.id === docEntry.id)
|
|
1571
|
+
if (!exists) docs.push(docEntry)
|
|
1572
|
+
|
|
1573
|
+
const newFm = this.buildFrontmatter(tools, docs)
|
|
1574
|
+
const newValue = hasFrontmatter
|
|
1575
|
+
? newFm + value.slice(fmLength)
|
|
1576
|
+
: newFm + value
|
|
1577
|
+
|
|
1578
|
+
// 计算光标行偏移(frontmatter 行数变化)
|
|
1579
|
+
const cursor = this.editor.getCursor()
|
|
1580
|
+
const fmLineCount = newFm.split('\n').length - 1
|
|
1581
|
+
const oldFmLineCount = hasFrontmatter
|
|
1582
|
+
? value.slice(0, fmLength).split('\n').length - 1
|
|
1583
|
+
: 0
|
|
1584
|
+
const lineDelta = fmLineCount - oldFmLineCount
|
|
1585
|
+
|
|
1586
|
+
this.editor.setValue(newValue)
|
|
1587
|
+
|
|
1588
|
+
// 恢复光标并插入 doc-name 标签
|
|
1589
|
+
const newLine = Math.max(0, cursor.line + lineDelta)
|
|
1590
|
+
this.editor.setCursor({ line: newLine, ch: cursor.ch })
|
|
1591
|
+
const tagCursor = this.editor.getCursor()
|
|
1592
|
+
const tag = `<doc-name id="${docEntry.id}" />`
|
|
1593
|
+
this.editor.replaceRange(tag, tagCursor)
|
|
1594
|
+
this.editor.setCursor({ line: tagCursor.line, ch: tagCursor.ch + tag.length })
|
|
1595
|
+
this.editor.focus()
|
|
1596
|
+
|
|
1597
|
+
const val = this.editor.getValue()
|
|
1598
|
+
this.emitChange(val)
|
|
1599
|
+
this.updatePreview(val)
|
|
1600
|
+
},
|
|
1601
|
+
|
|
1602
|
+
// ─── 对外暴露:获取内容 ──────────────────────────────────────
|
|
1603
|
+
getValue () {
|
|
1604
|
+
//
|
|
1605
|
+
return this.editor ? this.editor.getValue() : ''
|
|
1606
|
+
},
|
|
1607
|
+
|
|
1608
|
+
setValue (val) {
|
|
1609
|
+
if (this.editor) {
|
|
1610
|
+
this.editor.setValue(val || '')
|
|
1611
|
+
this.hasContent = (val || '').length > 0
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
</script>
|
|
1617
|
+
|
|
1618
|
+
<style lang="scss" scoped>
|
|
1619
|
+
.ai-skill-editor {
|
|
1620
|
+
display: flex;
|
|
1621
|
+
flex-direction: column;
|
|
1622
|
+
background: var(--epx-bg-card);
|
|
1623
|
+
overflow: hidden;
|
|
1624
|
+
border-radius: var(--epx-radius-l);
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
.editor-header {
|
|
1628
|
+
display: flex;
|
|
1629
|
+
align-items: center;
|
|
1630
|
+
justify-content: space-between;
|
|
1631
|
+
padding: 12px 16px;
|
|
1632
|
+
height: auto;
|
|
1633
|
+
border-bottom: none;
|
|
1634
|
+
background: transparent;
|
|
1635
|
+
flex-shrink: 0;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
.editor-title {
|
|
1639
|
+
font-size: var(--epx-font-size-base);
|
|
1640
|
+
font-weight: 400;
|
|
1641
|
+
color: var(--epx-text);
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
.editor-header-right {
|
|
1645
|
+
display: flex;
|
|
1646
|
+
align-items: center;
|
|
1647
|
+
gap: 8px;
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
.editor-header--inner {
|
|
1651
|
+
flex-shrink: 0;
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
.editor-wrap {
|
|
1655
|
+
position: relative;
|
|
1656
|
+
flex: 1;
|
|
1657
|
+
min-height: 300px;
|
|
1658
|
+
display: flex;
|
|
1659
|
+
flex-direction: column;
|
|
1660
|
+
|
|
1661
|
+
&.is-fullscreen {
|
|
1662
|
+
position: fixed;
|
|
1663
|
+
top: 0;
|
|
1664
|
+
left: 0;
|
|
1665
|
+
right: 0;
|
|
1666
|
+
bottom: 0;
|
|
1667
|
+
z-index: 9999;
|
|
1668
|
+
background: var(--epx-bg-card);
|
|
1669
|
+
display: flex;
|
|
1670
|
+
flex-direction: column;
|
|
1671
|
+
|
|
1672
|
+
.editor-container {
|
|
1673
|
+
flex: 1;
|
|
1674
|
+
overflow: hidden;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
.mode-split {
|
|
1678
|
+
margin: 8px;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
.editor-pane--input,
|
|
1682
|
+
.editor-pane--preview {
|
|
1683
|
+
margin: 8px;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
:deep(.CodeMirror) {
|
|
1687
|
+
height: 100%;
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
.editor-container {
|
|
1693
|
+
display: flex;
|
|
1694
|
+
flex: 1;
|
|
1695
|
+
min-height: 300px;
|
|
1696
|
+
overflow: hidden;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
.editor-pane {
|
|
1700
|
+
flex: 1;
|
|
1701
|
+
overflow: hidden;
|
|
1702
|
+
min-width: 0;
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
.editor-pane--input {
|
|
1706
|
+
display: flex;
|
|
1707
|
+
flex-direction: column;
|
|
1708
|
+
border: 1px solid var(--epx-border);
|
|
1709
|
+
border-radius: var(--epx-radius-base);
|
|
1710
|
+
margin: 8px 8px 8px 8px;
|
|
1711
|
+
|
|
1712
|
+
:deep(.CodeMirror) {
|
|
1713
|
+
height: 100%;
|
|
1714
|
+
min-height: 300px;
|
|
1715
|
+
font-size: var(--epx-font-size-base);
|
|
1716
|
+
line-height: 1.8;
|
|
1717
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
1718
|
+
padding: 0 16px 16px 16px;
|
|
1719
|
+
box-sizing: border-box;
|
|
1720
|
+
border: none;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
:deep(.CodeMirror-scroll) {
|
|
1724
|
+
padding-top: 0;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
:deep(.CodeMirror-placeholder) {
|
|
1728
|
+
color: var(--epx-text-secondary);
|
|
1729
|
+
padding-left: 0;
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
.editor-pane--preview {
|
|
1734
|
+
border: 1px solid var(--epx-border);
|
|
1735
|
+
border-radius: var(--epx-radius-base);
|
|
1736
|
+
margin: 8px 8px 8px 8px;
|
|
1737
|
+
overflow-y: auto;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
// 编辑模式:只显示编辑区
|
|
1741
|
+
.mode-edit .editor-pane--preview {
|
|
1742
|
+
display: none;
|
|
1743
|
+
border: none;
|
|
1744
|
+
margin: 0;
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
// 预览模式:只显示预览区
|
|
1748
|
+
.mode-preview .editor-pane--input {
|
|
1749
|
+
display: none;
|
|
1750
|
+
border: none;
|
|
1751
|
+
margin: 0;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
// 分屏模式:整体边框 + 分割线
|
|
1755
|
+
.mode-split {
|
|
1756
|
+
border: 1px solid var(--epx-border);
|
|
1757
|
+
border-radius: var(--epx-radius-base);
|
|
1758
|
+
margin: 8px;
|
|
1759
|
+
|
|
1760
|
+
.editor-pane--input {
|
|
1761
|
+
border: none;
|
|
1762
|
+
border-radius: 0;
|
|
1763
|
+
margin: 0;
|
|
1764
|
+
border-right: 1px solid var(--epx-border);
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
.editor-pane--preview {
|
|
1768
|
+
border: none;
|
|
1769
|
+
border-radius: 0;
|
|
1770
|
+
margin: 0;
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
// 预览区 markdown 样式
|
|
1775
|
+
.markdown-preview {
|
|
1776
|
+
padding: 16px;
|
|
1777
|
+
font-size: var(--epx-font-size-base);
|
|
1778
|
+
line-height: 1.8;
|
|
1779
|
+
color: var(--epx-text);
|
|
1780
|
+
word-break: break-word;
|
|
1781
|
+
|
|
1782
|
+
:deep(h1),
|
|
1783
|
+
:deep(h2),
|
|
1784
|
+
:deep(h3),
|
|
1785
|
+
:deep(h4),
|
|
1786
|
+
:deep(h5),
|
|
1787
|
+
:deep(h6) {
|
|
1788
|
+
margin: 16px 0 8px;
|
|
1789
|
+
font-weight: 600;
|
|
1790
|
+
color: var(--epx-text);
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
:deep(h1) { font-size: 24px; }
|
|
1794
|
+
:deep(h2) { font-size: var(--epx-font-size-xl); }
|
|
1795
|
+
:deep(h3) { font-size: 18px; }
|
|
1796
|
+
|
|
1797
|
+
:deep(p) {
|
|
1798
|
+
white-space: pre-wrap;
|
|
1799
|
+
margin: 8px 0;
|
|
1800
|
+
}
|
|
1801
|
+
:deep(ul),
|
|
1802
|
+
:deep(ol) {
|
|
1803
|
+
margin: 8px 0;
|
|
1804
|
+
padding-left: 24px;
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
:deep(li) {
|
|
1808
|
+
margin: 4px 0;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
:deep(code) {
|
|
1812
|
+
background: var(--epx-bg);
|
|
1813
|
+
padding: 2px 6px;
|
|
1814
|
+
border-radius: 3px;
|
|
1815
|
+
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
1816
|
+
font-size: 13px;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
:deep(pre) {
|
|
1820
|
+
margin: 12px 0;
|
|
1821
|
+
padding: 12px;
|
|
1822
|
+
border-radius: 6px;
|
|
1823
|
+
overflow-x: auto;
|
|
1824
|
+
white-space: pre-wrap;
|
|
1825
|
+
|
|
1826
|
+
code {
|
|
1827
|
+
background: transparent;
|
|
1828
|
+
padding: 0;
|
|
1829
|
+
color: #abb2bf;
|
|
1830
|
+
font-size: 13px;
|
|
1831
|
+
line-height: 1.5;
|
|
1832
|
+
white-space: pre-wrap;
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
// frontmatter 区块样式(使用 ::v-deep 穿透 scoped)
|
|
1837
|
+
:deep( :deep(.frontmatter-block)) {
|
|
1838
|
+
margin-bottom: 16px;
|
|
1839
|
+
padding: 12px;
|
|
1840
|
+
background: var(--epx-bg);
|
|
1841
|
+
border: 1px solid var(--epx-border);
|
|
1842
|
+
border-radius: 6px;
|
|
1843
|
+
|
|
1844
|
+
pre {
|
|
1845
|
+
margin: 0;
|
|
1846
|
+
background: transparent;
|
|
1847
|
+
padding: 0;
|
|
1848
|
+
white-space: pre-wrap;
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
code {
|
|
1852
|
+
background: transparent;
|
|
1853
|
+
padding: 0;
|
|
1854
|
+
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
1855
|
+
font-size: 13px;
|
|
1856
|
+
color: var(--epx-text);
|
|
1857
|
+
line-height: 1.6;
|
|
1858
|
+
white-space: pre-wrap;
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
// highlight.js 代码高亮样式
|
|
1863
|
+
.hljs {
|
|
1864
|
+
background: transparent;
|
|
1865
|
+
color: #abb2bf;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
blockquote {
|
|
1869
|
+
margin: 12px 0;
|
|
1870
|
+
padding: 8px 16px;
|
|
1871
|
+
border-left: 4px solid #409eff;
|
|
1872
|
+
background: var(--epx-bg);
|
|
1873
|
+
color: var(--epx-text);
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
table {
|
|
1877
|
+
margin: 12px 0;
|
|
1878
|
+
border-collapse: collapse;
|
|
1879
|
+
width: 100%;
|
|
1880
|
+
|
|
1881
|
+
th, td {
|
|
1882
|
+
border: 1px solid var(--epx-border);
|
|
1883
|
+
padding: 8px 12px;
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
th {
|
|
1887
|
+
background: var(--epx-bg);
|
|
1888
|
+
font-weight: 600;
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
a {
|
|
1893
|
+
color: #409eff;
|
|
1894
|
+
text-decoration: none;
|
|
1895
|
+
|
|
1896
|
+
&:hover {
|
|
1897
|
+
text-decoration: underline;
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
img {
|
|
1902
|
+
max-width: 100%;
|
|
1903
|
+
border-radius: var(--epx-radius-base);
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
hr {
|
|
1907
|
+
margin: 16px 0;
|
|
1908
|
+
border: none;
|
|
1909
|
+
border-top: 1px solid var(--epx-border);
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
// 工具标签样式(使用 ::v-deep 穿透 scoped)
|
|
1913
|
+
:deep(.tool-tag) {
|
|
1914
|
+
display: inline-block;
|
|
1915
|
+
padding: 4px 10px;
|
|
1916
|
+
border-radius: var(--epx-radius-base);
|
|
1917
|
+
font-size: 13px;
|
|
1918
|
+
margin: 2px 4px;
|
|
1919
|
+
vertical-align: middle;
|
|
1920
|
+
line-height: 1.4;
|
|
1921
|
+
border: 1px solid;
|
|
1922
|
+
font-style: normal;
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
// 工具卡片 - 橙色
|
|
1926
|
+
:deep(.tool-tag--card) {
|
|
1927
|
+
background: #fdf6ec;
|
|
1928
|
+
border-color: #faecd8;
|
|
1929
|
+
color: #e6a23c;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
// 工具引用 - 绿色
|
|
1933
|
+
:deep(.tool-tag--name) {
|
|
1934
|
+
background: #f0f9eb;
|
|
1935
|
+
border-color: #e1f3d8;
|
|
1936
|
+
color: #67c23a;
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
// 函数 - 蓝色
|
|
1940
|
+
:deep(.tool-tag--func) {
|
|
1941
|
+
background: #ecf5ff;
|
|
1942
|
+
border-color: #d9ecff;
|
|
1943
|
+
color: #409eff;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
// 动态参数 - 紫色
|
|
1947
|
+
:deep(.tool-tag--param) {
|
|
1948
|
+
background: #f4ecfd;
|
|
1949
|
+
border-color: #e9d8fd;
|
|
1950
|
+
color: #5f0cb2;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
// 配置文档 - 青色
|
|
1954
|
+
:deep(.tool-tag--doc) {
|
|
1955
|
+
background: #e8f8f5;
|
|
1956
|
+
border-color: #d1f2eb;
|
|
1957
|
+
color: #16a085;
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
// 编辑器按钮组
|
|
1962
|
+
.mode-btn-group {
|
|
1963
|
+
margin-right: 8px;
|
|
1964
|
+
|
|
1965
|
+
.el-button {
|
|
1966
|
+
padding: 5px 10px;
|
|
1967
|
+
font-size: var(--epx-font-size-s);
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
.editor-fx-icon {
|
|
1972
|
+
position: absolute;
|
|
1973
|
+
bottom: 12px;
|
|
1974
|
+
right: 16px;
|
|
1975
|
+
width: 24px;
|
|
1976
|
+
height: 24px;
|
|
1977
|
+
display: flex;
|
|
1978
|
+
align-items: center;
|
|
1979
|
+
justify-content: center;
|
|
1980
|
+
color: var(--epx-text-secondary);
|
|
1981
|
+
font-size: var(--epx-font-size-l);
|
|
1982
|
+
pointer-events: none;
|
|
1983
|
+
opacity: 0.6;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
.fullscreen-btn {
|
|
1987
|
+
color: var(--epx-text-secondary) !important;
|
|
1988
|
+
font-size: var(--epx-font-size-s) !important;
|
|
1989
|
+
padding: 0 !important;
|
|
1990
|
+
|
|
1991
|
+
&:hover {
|
|
1992
|
+
color: var(--epx-text) !important;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
i {
|
|
1996
|
+
font-size: 13px;
|
|
1997
|
+
margin-right: 2px;
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
// 快捷插入弹窗
|
|
2002
|
+
.ai-skill-editor :deep(.quick-insert-dialog) {
|
|
2003
|
+
.el-dialog__body {
|
|
2004
|
+
padding: 0 20px 16px;
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
.quick-insert-tabs {
|
|
2009
|
+
:deep(.el-tabs__header) {
|
|
2010
|
+
margin-bottom: 12px;
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
:deep(.el-tabs__item) {
|
|
2014
|
+
font-size: var(--epx-font-size-base);
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
.inner-tabs {
|
|
2019
|
+
:deep(.el-tabs__header) {
|
|
2020
|
+
margin-bottom: 12px;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
:deep(.el-tabs__item) {
|
|
2024
|
+
font-size: 13px;
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
.tab-filter {
|
|
2029
|
+
display: flex;
|
|
2030
|
+
align-items: center;
|
|
2031
|
+
margin-bottom: 12px;
|
|
2032
|
+
|
|
2033
|
+
label {
|
|
2034
|
+
font-size: var(--epx-font-size-base);
|
|
2035
|
+
color: var(--epx-text);
|
|
2036
|
+
margin-right: 8px;
|
|
2037
|
+
white-space: nowrap;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
:deep(.epx-object) {
|
|
2041
|
+
width: 260px;
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
.empty-tip {
|
|
2046
|
+
display: flex;
|
|
2047
|
+
flex-direction: column;
|
|
2048
|
+
align-items: center;
|
|
2049
|
+
justify-content: center;
|
|
2050
|
+
height: 330px;
|
|
2051
|
+
color: var(--epx-text-secondary);
|
|
2052
|
+
|
|
2053
|
+
i {
|
|
2054
|
+
font-size: 40px;
|
|
2055
|
+
margin-bottom: 10px;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
p {
|
|
2059
|
+
font-size: var(--epx-font-size-base);
|
|
2060
|
+
margin: 0;
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
// 动态参数树
|
|
2065
|
+
.dynamic-param-pane {
|
|
2066
|
+
height: 380px;
|
|
2067
|
+
overflow-y: auto;
|
|
2068
|
+
|
|
2069
|
+
.param-leaf-mark {
|
|
2070
|
+
@include font_color_primary;
|
|
2071
|
+
margin-right: 5px;
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
.custom-tree-node {
|
|
2075
|
+
display: inline-flex;
|
|
2076
|
+
align-items: center;
|
|
2077
|
+
font-size: 13px;
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
// 公式 tab
|
|
2082
|
+
.formula-pane {
|
|
2083
|
+
height: 380px;
|
|
2084
|
+
display: flex;
|
|
2085
|
+
flex-direction: column;
|
|
2086
|
+
align-items: center;
|
|
2087
|
+
justify-content: center;
|
|
2088
|
+
|
|
2089
|
+
&__tip {
|
|
2090
|
+
max-width: 460px;
|
|
2091
|
+
margin: 0 0 16px;
|
|
2092
|
+
font-size: 13px;
|
|
2093
|
+
line-height: 1.7;
|
|
2094
|
+
color: var(--epx-text-secondary);
|
|
2095
|
+
text-align: center;
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
// 配置文档树
|
|
2100
|
+
.config-doc-pane {
|
|
2101
|
+
&__filter {
|
|
2102
|
+
margin-bottom: 10px;
|
|
2103
|
+
}
|
|
2104
|
+
&__tree {
|
|
2105
|
+
height: 380px;
|
|
2106
|
+
overflow: auto;
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
.config-doc-node {
|
|
2110
|
+
display: inline-flex;
|
|
2111
|
+
align-items: center;
|
|
2112
|
+
font-size: 13px;
|
|
2113
|
+
i {
|
|
2114
|
+
margin-right: 6px;
|
|
2115
|
+
color: var(--epx-text-secondary);
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
</style>
|
|
2119
|
+
|
|
2120
|
+
<!-- append-to-body 后弹窗脱离 scoped 作用域,这里用全局样式补回内边距 -->
|
|
2121
|
+
<style lang="scss">
|
|
2122
|
+
.quick-insert-dialog .el-dialog__body {
|
|
2123
|
+
padding: 0 20px 16px;
|
|
2124
|
+
}
|
|
2125
|
+
</style>
|