worsoft-frontend-codegen-local-mcp 0.1.82 → 0.1.84

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.
@@ -21,18 +21,22 @@
21
21
  <SchemaListTable
22
22
  v-bind="tableProps"
23
23
  row-id-key="{{PK_ATTR}}"
24
- :action-column-width="200"
24
+ :action-column-width="320"
25
25
  @selection-change="handleTableSelectionChange"
26
26
  @sort-change="handleTableSortChange"
27
27
  @size-change="handleTableSizeChange"
28
28
  @current-change="handleTableCurrentChange"
29
29
  >
30
- <!-- 行操作按钮:查看、编辑、删除 -->
30
+ <!-- 行操作按钮:查看、编辑、提交、流转、删除 -->
31
31
  <template #actions="{ row }">
32
32
  <!-- 查看{{FEATURE_TITLE}}详情 -->
33
33
  <el-button text type="primary" icon="view" v-auth="'{{PERMISSION_PREFIX}}_view'" @click="handleDetail(row.{{PK_ATTR}})">{{ t('common.viewBtn') }}</el-button>
34
34
  <!-- 编辑{{FEATURE_TITLE}}:业务单据编辑态控制按需生效 -->
35
35
  <el-button{{BUSINESS_EDIT_IF}} icon="edit-pen" text type="primary" v-auth="'{{PERMISSION_PREFIX}}_edit'" @click="handleEdit(row.{{PK_ATTR}})">{{ t('common.editBtn') }}</el-button>
36
+ <!-- 提交{{FEATURE_TITLE}} -->
37
+ <el-button text type="primary" icon="check" @click="handleQuickAction(row, 'submit')">{{ commonActionLabel('submit') }}</el-button>
38
+ <!-- 流转{{FEATURE_TITLE}} -->
39
+ <el-button text type="success" icon="position" @click="handleQuickAction(row, 'flow')">{{ commonActionLabel('flow') }}</el-button>
36
40
  <!-- 删除{{FEATURE_TITLE}} -->
37
41
  <el-button{{BUSINESS_DELETE_IF}} icon="delete" text type="primary" v-auth="'{{PERMISSION_PREFIX}}_del'" @click="handleDelete([row.{{PK_ATTR}}]{{BUSINESS_DELETE_ROW_ARG}})">{{ t('common.delBtn') }}</el-button>
38
42
  </template>
@@ -90,7 +94,7 @@ const { state, getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHan
90
94
  });
91
95
 
92
96
  // 提供字段标签、字典选项和查询区描述
93
- const { resolveLabel, getDictOptions, visibleTableColumns, searchKeywordTooltip, queryableDictFields } = useCrudPageMeta(dataMasterEntity, dictRefs);
97
+ const { resolveLabel, getDictOptions, commonActionLabel, visibleTableColumns, searchKeywordTooltip, queryableDictFields } = useCrudPageMeta(dataMasterEntity, dictRefs);
94
98
 
95
99
  // 自定义查询区的字典字段配置
96
100
  const queryableDictOptions = computed(() =>
@@ -152,6 +156,22 @@ const handleEdit = (id: string) => {
152
156
  router.push({ path: getFormPath(), query: { id, tagsViewName: t('common.editBtn') } });
153
157
  };
154
158
 
159
+ // 列表页快捷提交流转占位
160
+ const handleQuickAction = async (_row: any, actionType: string) => {
161
+ const actionName = commonActionLabel(actionType);
162
+ try {
163
+ await useMessageBox().confirm(t('common.messages.quickActionConfirm', { action: actionName }));
164
+ useMessage().success(
165
+ actionType === 'submit'
166
+ ? t('common.messages.quickSubmitSuccess')
167
+ : t('common.messages.quickFlowSuccess')
168
+ );
169
+ getDataList();
170
+ } catch {
171
+ return;
172
+ }
173
+ };
174
+
155
175
  // 业务状态按钮控制(按需生成)
156
176
  {{BUSINESS_STATUS_HELPERS}}
157
177
 
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.82';
8
+ const SERVER_VERSION = '0.1.84';
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');
@@ -2779,13 +2779,12 @@ ${moduleModel.visibleFields.map(renderMultiLevelFormField).join('\n')}
2779
2779
  // 表单响应式数据
2780
2780
  const form = reactive(createDefaultFormState());
2781
2781
 
2782
- // 设置父级关联字段
2783
- const setParentFieldValue = (parentId: string | number) => {
2784
- const parentField = moduleConfig.queryParentField as keyof typeof form | undefined;
2785
- if (!parentField) return;
2786
- const currentValue = form[parentField];
2787
- (form as Record<string, string | number>)[parentField as string] = typeof currentValue === 'number' ? Number(parentId) : String(parentId);
2788
- };
2782
+ // 设置父级关联字段
2783
+ const setParentFieldValue = (parentId: string | number) => {
2784
+ const parentField = moduleConfig.queryParentField;
2785
+ if (!parentField) return;
2786
+ (form as Record<string, unknown>)[parentField] = parentId;
2787
+ };
2789
2788
 
2790
2789
  // 表单校验规则
2791
2790
  const dataRules = ref({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worsoft-frontend-codegen-local-mcp",
3
- "version": "0.1.82",
3
+ "version": "0.1.84",
4
4
  "description": "Worsoft frontend local-template code generation MCP server.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "worsoft <sw@worsoft.vip>",