worsoft-frontend-codegen-local-mcp 0.1.44 → 0.1.45
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.
|
@@ -84,13 +84,14 @@ const toolbarProps = computed(() => ({
|
|
|
84
84
|
keyword: state.queryForm.smartVal,
|
|
85
85
|
searchPlaceholder: searchKeywordTooltip.value,
|
|
86
86
|
queryModel: state.queryForm,
|
|
87
|
-
customQueryFields:
|
|
87
|
+
customQueryFields: {{CUSTOM_QUERY_FIELDS_EXPR}},
|
|
88
88
|
selectedIds: selectObjs.value,
|
|
89
89
|
deleteDisabled: multiple.value,
|
|
90
90
|
addPermission: '{{PERMISSION_PREFIX}}_add',
|
|
91
91
|
importPermission: '{{PERMISSION_PREFIX}}_add',
|
|
92
92
|
deletePermission: '{{PERMISSION_PREFIX}}_del',
|
|
93
93
|
exportPermission: '{{PERMISSION_PREFIX}}_export',
|
|
94
|
+
showRightTools: {{SHOW_RIGHT_TOOLS}},
|
|
94
95
|
}));
|
|
95
96
|
|
|
96
97
|
const tableProps = computed(() => ({
|
package/mcp_server.js
CHANGED
|
@@ -5,7 +5,7 @@ const fs = require('fs');
|
|
|
5
5
|
const path = require('path');
|
|
6
6
|
|
|
7
7
|
const SERVER_NAME = 'worsoft-codegen-local';
|
|
8
|
-
const SERVER_VERSION = '0.1.
|
|
8
|
+
const SERVER_VERSION = '0.1.45';
|
|
9
9
|
const PROTOCOL_VERSION = '2024-11-05';
|
|
10
10
|
const TOOL_NAME = 'worsoft_codegen_local_generate_frontend';
|
|
11
11
|
const STYLE_CATALOG_PATH = path.join(__dirname, 'assets', 'style-catalog.json');
|
|
@@ -2388,7 +2388,13 @@ function renderMultiLevelSchemaListSlot(levelVarName, activeKeyVarName, activeMo
|
|
|
2388
2388
|
' </el-tabs>',
|
|
2389
2389
|
' <div class="multi-level-panel" v-if="' + `${activeModuleVarName}` + `">`,
|
|
2390
2390
|
' <div class="layout-padding-auto layout-padding-view flex h-full flex-col">',
|
|
2391
|
-
` <SchemaListToolbar
|
|
2391
|
+
` <SchemaListToolbar`,
|
|
2392
|
+
` v-bind="getPanelToolbarProps(${activeModuleVarName}.key)"`,
|
|
2393
|
+
` @update:keyword="handlePanelKeywordChange(${activeModuleVarName}.key, $event)"`,
|
|
2394
|
+
` @add="openCreate(${activeModuleVarName}.key)"`,
|
|
2395
|
+
` @query="handlePanelQuery(${activeModuleVarName}.key)"`,
|
|
2396
|
+
` @reset="handlePanelReset(${activeModuleVarName}.key)"`,
|
|
2397
|
+
` />`,
|
|
2392
2398
|
` <SchemaListTable`,
|
|
2393
2399
|
` v-bind="getPanelTableProps(${activeModuleVarName}.key)"`,
|
|
2394
2400
|
` @row-current-change="handlePanelCurrentChange(${activeModuleVarName}.key, $event.row)"`,
|
|
@@ -2579,11 +2585,15 @@ const {
|
|
|
2579
2585
|
tableStyle,
|
|
2580
2586
|
getParentIdForModule,
|
|
2581
2587
|
getListFields,
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2588
|
+
getSmartFields,
|
|
2589
|
+
isAddDisabled,
|
|
2590
|
+
loadModuleData,
|
|
2591
|
+
handleKeywordChange,
|
|
2592
|
+
handleQuery,
|
|
2593
|
+
handleResetQuery,
|
|
2594
|
+
handleSelectRow,
|
|
2595
|
+
handleCurrentPageChange,
|
|
2596
|
+
handlePageSizeChange,
|
|
2587
2597
|
handleFormRefresh,
|
|
2588
2598
|
} = useMultiLevelDictPage(
|
|
2589
2599
|
levelConfigs,
|
|
@@ -2607,14 +2617,23 @@ const getPanelColumns = (moduleKey: string) =>
|
|
|
2607
2617
|
options: column.dictType ? getDictOptions(column.dictType) : [],
|
|
2608
2618
|
}));
|
|
2609
2619
|
|
|
2620
|
+
const getPanelSearchPlaceholder = (moduleKey: string) => {
|
|
2621
|
+
const labels = getSmartFields(moduleKey)
|
|
2622
|
+
.map((field: any) => resolveLabel(field.labelKey, field.key || ''))
|
|
2623
|
+
.filter(Boolean);
|
|
2624
|
+
return t('common.placeholders.searchKeywords', {
|
|
2625
|
+
label: labels.join(' / ') || 'keyword',
|
|
2626
|
+
});
|
|
2627
|
+
};
|
|
2628
|
+
|
|
2610
2629
|
const getPanelToolbarProps = (moduleKey: string) => ({
|
|
2611
|
-
keyword:
|
|
2612
|
-
searchPlaceholder:
|
|
2613
|
-
queryModel:
|
|
2630
|
+
keyword: moduleStateMap[moduleKey].queryForm.smartVal,
|
|
2631
|
+
searchPlaceholder: getPanelSearchPlaceholder(moduleKey),
|
|
2632
|
+
queryModel: moduleStateMap[moduleKey].queryForm,
|
|
2614
2633
|
selectedIds: [],
|
|
2615
2634
|
showImport: false,
|
|
2616
2635
|
showDelete: false,
|
|
2617
|
-
showQueryTools:
|
|
2636
|
+
showQueryTools: true,
|
|
2618
2637
|
showRightTools: false,
|
|
2619
2638
|
deleteDisabled: true,
|
|
2620
2639
|
addText: t('common.addBtn'),
|
|
@@ -2649,6 +2668,18 @@ const handlePanelCurrentChange = (moduleKey: string, row: any) => {
|
|
|
2649
2668
|
if (row) handleSelectRow(moduleKey, row);
|
|
2650
2669
|
};
|
|
2651
2670
|
|
|
2671
|
+
const handlePanelKeywordChange = (moduleKey: string, keyword: string) => {
|
|
2672
|
+
handleKeywordChange(moduleKey, keyword);
|
|
2673
|
+
};
|
|
2674
|
+
|
|
2675
|
+
const handlePanelQuery = (moduleKey: string) => {
|
|
2676
|
+
handleQuery(moduleKey);
|
|
2677
|
+
};
|
|
2678
|
+
|
|
2679
|
+
const handlePanelReset = (moduleKey: string) => {
|
|
2680
|
+
handleResetQuery(moduleKey);
|
|
2681
|
+
};
|
|
2682
|
+
|
|
2652
2683
|
const handleDelete = async (moduleKey: string, row: any) => {
|
|
2653
2684
|
try {
|
|
2654
2685
|
await useMessageBox().confirm(t('common.delConfirmText'));
|
|
@@ -2832,6 +2863,8 @@ function buildReplacements(model, sharedSupport) {
|
|
|
2832
2863
|
DICT_API_IMPORTS: model.pageType === 'dict' && model.statusField ? ', enableObj, disableObj' : '',
|
|
2833
2864
|
DICT_LIST_HELPERS: renderSingleTableDialogDictHelpers(model),
|
|
2834
2865
|
DICT_API_FUNCTIONS: renderSingleTableDialogDictApiFunctions(model),
|
|
2866
|
+
CUSTOM_QUERY_FIELDS_EXPR: model.pageType === 'dict' ? '[]' : 'queryableDictOptions.value',
|
|
2867
|
+
SHOW_RIGHT_TOOLS: model.pageType === 'dict' ? 'false' : 'true',
|
|
2835
2868
|
MENU_BASE_ID: menuBaseId,
|
|
2836
2869
|
MENU_BASE_ID_PLUS_1: menuBaseId + 1,
|
|
2837
2870
|
MENU_BASE_ID_PLUS_2: menuBaseId + 2,
|
package/package.json
CHANGED