@agile-team/wl-skills-kit 2.1.2 → 2.1.4
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/CHANGELOG.md +24 -0
- package/README.md +73 -5
- package/bin/wl-skills.js +35 -1
- package/files/.github/guides/README.md +13 -13
- package/files/.github/guides/architecture.md +555 -555
- package/files/.github/guides/usage.md +166 -166
- package/files/.github/reports/README.md +65 -65
- package/files/.github/reports/SYS_DICT_INFO.md +19 -19
- package/files/.github/reports/SYS_MENU_INFO.md +247 -247
- package/files/.github/reports/SYS_PERMISSION_INFO.md +20 -20
- package/files/.github/reports//347/273/204/344/273/266/346/217/220/345/217/226/345/273/272/350/256/256.md +33 -33
- package/files/.github/reports//350/247/204/350/214/203/345/256/241/346/237/245/346/212/245/345/221/212.md +44 -44
- package/files/.github/skills/_compat/README.md +108 -108
- package/files/.github/skills/_compat/headers/agents.txt +8 -8
- package/files/.github/skills/_compat/headers/claude-code.txt +7 -7
- package/files/.github/skills/_compat/headers/cline.txt +7 -7
- package/files/.github/skills/_compat/headers/cursor-mdc.txt +16 -16
- package/files/.github/skills/_compat/headers/cursor-rules.txt +7 -7
- package/files/.github/skills/_compat/headers/github-copilot.txt +1 -1
- package/files/.github/skills/_compat/headers/kiro.txt +10 -10
- package/files/.github/skills/_compat/headers/trae.txt +11 -11
- package/files/.github/skills/_compat/headers/windsurf.txt +7 -7
- package/files/.github/skills/_registry.md +81 -81
- package/files/.github/skills/core/api-contract/SKILL.md +344 -344
- package/files/.github/skills/core/api-contract/USAGE.md +110 -110
- package/files/.github/skills/core/convention-audit/SKILL.md +189 -189
- package/files/.github/skills/core/convention-audit/USAGE.md +99 -99
- package/files/.github/skills/core/page-codegen/SKILL.md +973 -973
- package/files/.github/skills/core/page-codegen/USAGE.md +102 -102
- package/files/.github/skills/core/page-codegen/templates/_index.md +46 -46
- package/files/.github/skills/core/page-codegen/templates/domains/_CONTRIBUTING.md +107 -107
- package/files/.github/skills/core/page-codegen/templates/domains/produce/TPL-OPERATION-STATION.md +442 -442
- package/files/.github/skills/core/page-codegen/templates/domains/sale/README.md +26 -26
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-CHANGE-HISTORY.md +276 -276
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-DETAIL-TABS.md +1145 -1145
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-DRIVEN.md +124 -124
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-FORM-ROUTE.md +436 -436
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-LIST.md +191 -191
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-MASTER-DETAIL.md +148 -148
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-RECORD-FORM.md +371 -371
- package/files/.github/skills/core/page-codegen/templates/universal/TPL-TREE-LIST.md +186 -186
- package/files/.github/skills/core/prototype-scan/SKILL.md +498 -498
- package/files/.github/skills/core/prototype-scan/USAGE.md +95 -95
- package/files/.github/skills/core/template-extract/SKILL.md +139 -139
- package/files/.github/skills/core/template-extract/USAGE.md +93 -93
- package/files/.github/skills/domain/README.md +51 -51
- package/files/.github/skills/ops/code-fix/SKILL.draft.md +108 -108
- package/files/.github/skills/sync/dict-sync/SKILL.draft.md +100 -100
- package/files/.github/skills/sync/menu-sync/SKILL.md +258 -258
- package/files/.github/skills/sync/menu-sync/USAGE.md +104 -104
- package/files/.github/skills/sync/menu-sync/env/env.local.json +6 -6
- package/files/.github/skills/sync/menu-sync/env/guide.md +83 -83
- package/files/.github/skills/sync/permission-sync/SKILL.draft.md +91 -91
- package/files/.github/standards/01-toolchain.md +57 -57
- package/files/.github/standards/02-code-structure.md +111 -111
- package/files/.github/standards/03-comments.md +53 -53
- package/files/.github/standards/04-coding-basics.md +33 -33
- package/files/.github/standards/05-logging.md +38 -38
- package/files/.github/standards/06-security.md +44 -44
- package/files/.github/standards/07-config.md +52 -52
- package/files/.github/standards/08-git.md +60 -60
- package/files/.github/standards/09-typescript.md +71 -71
- package/files/.github/standards/10-pinia.md +57 -57
- package/files/.github/standards/11-form-validation.md +81 -81
- package/files/.github/standards/12-base-table.md +116 -116
- package/files/.github/standards/13-platform-components.md +123 -123
- package/files/.github/standards/index.md +89 -89
- package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/data.ts +196 -196
- package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.scss +150 -150
- package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.vue +79 -79
- package/files/docs/jh-date-range.md +257 -257
- package/files/docs/jh-date.md +222 -222
- package/files/docs/jh-dept-picker.md +190 -190
- package/files/docs/jh-drag-row.md +590 -590
- package/files/docs/jh-file-upload.md +216 -216
- package/files/docs/jh-picker.md +218 -218
- package/files/docs/jh-select.md +148 -148
- package/files/docs/jh-text.md +248 -248
- package/files/docs/jh-user-picker.md +197 -197
- package/package.json +2 -4
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
# TEMPLATE_DRIVEN:配置驱动模板页(识别参考)
|
|
2
|
-
|
|
3
|
-
> ⚠️ **本文件为识别参考,不是代码生成模板。**
|
|
4
|
-
> 配置驱动页面已由现有业务模板组件封装,AI **只需生成 config 配置对象**,不得套用 TPL-A 至 TPL-G 的结构重新手写页面逻辑。
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## 什么是配置驱动模板页
|
|
9
|
-
|
|
10
|
-
这类页面的 `index.vue` 极为简单,只有 1-3 行:
|
|
11
|
-
|
|
12
|
-
```vue
|
|
13
|
-
<template>
|
|
14
|
-
<div class="app-container app-page-container">
|
|
15
|
-
<XxxTemplate :config="xxxConfig" />
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script setup lang="ts">
|
|
20
|
-
import { xxxConfig } from "./data";
|
|
21
|
-
</script>
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
所有业务逻辑(查询、表格列、导出、翻译等)全部由模板组件内部处理,`data.ts` 只需导出一个 `config` 对象。
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## 已知配置驱动模板一览
|
|
29
|
-
|
|
30
|
-
> ⚠️ **以下模板是基于高度相似的特定业务场景提炼的**,仅适用于列出的具体页面类型。不得因为"看起来相似"就套用到其他业务场景,否则会出现功能异常。
|
|
31
|
-
|
|
32
|
-
### 1. ResultQueryTemplate(轧钢实绩查询类)
|
|
33
|
-
|
|
34
|
-
**适用范围**:`production-mmwr/sjtj/` 下的各工序实绩查询页(查询+表格+导出,无新增/编辑/删除)
|
|
35
|
-
|
|
36
|
-
**识别特征**:
|
|
37
|
-
- 原型中只有查询区 + 数据表格 + 导出按钮
|
|
38
|
-
- 无 CRUD 操作,纯查询
|
|
39
|
-
- 字段较多,表格列数 10+
|
|
40
|
-
|
|
41
|
-
**生成规则**:
|
|
42
|
-
|
|
43
|
-
```typescript
|
|
44
|
-
// data.ts — 只导出一个 config 对象
|
|
45
|
-
import type { ResultQueryConfig } from "@/components/template/ResultQueryTemplate/types";
|
|
46
|
-
import { BusLogicDataType } from "@/types/page";
|
|
47
|
-
|
|
48
|
-
export const [pageName]Config: ResultQueryConfig = {
|
|
49
|
-
api: {
|
|
50
|
-
list: "/[服务缩写]/[资源名]/list",
|
|
51
|
-
export: "/[服务缩写]/[资源名]/export" // 有导出时才加
|
|
52
|
-
},
|
|
53
|
-
queryItems: [
|
|
54
|
-
// 同 Template A 的 queryDef 格式
|
|
55
|
-
{ name: "[field]", label: "[中文名]", placeholder: "请输入" },
|
|
56
|
-
{
|
|
57
|
-
name: "[dateField]",
|
|
58
|
-
type: "range",
|
|
59
|
-
startName: "[startDate]",
|
|
60
|
-
endName: "[endDate]",
|
|
61
|
-
label: "[日期名]",
|
|
62
|
-
logicType: BusLogicDataType.date,
|
|
63
|
-
rangeSeparator: "至"
|
|
64
|
-
}
|
|
65
|
-
],
|
|
66
|
-
columns: [
|
|
67
|
-
// 同 Template A 的 columnsDef 格式(无 selection/index/操作列)
|
|
68
|
-
{ label: "[列名]", name: "[fieldName]", minWidth: 120 }
|
|
69
|
-
]
|
|
70
|
-
};
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
```vue
|
|
74
|
-
<!-- index.vue -->
|
|
75
|
-
<template>
|
|
76
|
-
<ResultQueryTemplate :config="[pageName]Config" />
|
|
77
|
-
</template>
|
|
78
|
-
|
|
79
|
-
<script setup lang="ts">
|
|
80
|
-
import ResultQueryTemplate from "@/components/template/ResultQueryTemplate/index.vue";
|
|
81
|
-
import { [pageName]Config } from "./data";
|
|
82
|
-
</script>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
### 2. FinishingAchievementTemplate(精整实绩类)
|
|
88
|
-
|
|
89
|
-
**适用范围**:`production-mmwr/jzsj/` 下的各精整工序实绩管理页(喷砂、倒棱、矫直、剥皮、检验、酸洗、包装)
|
|
90
|
-
|
|
91
|
-
**识别特征**:
|
|
92
|
-
- 原型标题含"实绩"二字且在精整工序列表中
|
|
93
|
-
- 有固定的查询区 + 实绩录入 + 汇总数据结构
|
|
94
|
-
- 字段结构高度统一(同一套模板 7 个页面共用)
|
|
95
|
-
|
|
96
|
-
**生成规则**:参考 `src/components/template/FinishingAchievementTemplate/` 内的 `types.ts` 定义,只生成对应的 config 配置。
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
### 3. ApplicationDeterminationTemplate(申请判定类)
|
|
101
|
-
|
|
102
|
-
**适用范围**:`production-mmwr/` 下的申请判定类页面(如 mmwr-application-determination-jz、mmwr-application-determination-sj)
|
|
103
|
-
|
|
104
|
-
**识别特征**:原型中有"申请"列表 + "判定"操作的双状态工作流页面
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
### 4. SamplingCommissionTemplate(取样委托类)
|
|
109
|
-
|
|
110
|
-
**适用范围**:`production-mmwr/jhgl/` 下的取样委托管理页(如 mmwr-sampling-commission-jz、mmwr-sampling-commission-sj)
|
|
111
|
-
|
|
112
|
-
**识别特征**:原型中有"委托单"列表 + 取样记录结构
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## AI 操作规范
|
|
117
|
-
|
|
118
|
-
1. **识别阶段**:在 page-spec 前置检查时,若页面落入以上任一范围,将交互模式标记为 `TEMPLATE_DRIVEN` 并注明具体模板名
|
|
119
|
-
2. **生成阶段**:只生成 `data.ts`(config 对象)+ `index.vue`(2-3行)+ `index.scss`(空或极少样式)
|
|
120
|
-
3. **禁止行为**:
|
|
121
|
-
- ❌ 不得手写 `createPage()` + `AbstractPageQueryHook` 结构
|
|
122
|
-
- ❌ 不得添加独立的 `BaseQuery` / `BaseTable` / `jh-pagination`(模板内部已处理)
|
|
123
|
-
- ❌ 不得将其他业务场景的页面识别为 TEMPLATE_DRIVEN 并套用以上 config 格式
|
|
124
|
-
4. **不确定时**:如果不确定是否适用配置驱动模板,使用 Template A(LIST)代替,更安全
|
|
1
|
+
# TEMPLATE_DRIVEN:配置驱动模板页(识别参考)
|
|
2
|
+
|
|
3
|
+
> ⚠️ **本文件为识别参考,不是代码生成模板。**
|
|
4
|
+
> 配置驱动页面已由现有业务模板组件封装,AI **只需生成 config 配置对象**,不得套用 TPL-A 至 TPL-G 的结构重新手写页面逻辑。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 什么是配置驱动模板页
|
|
9
|
+
|
|
10
|
+
这类页面的 `index.vue` 极为简单,只有 1-3 行:
|
|
11
|
+
|
|
12
|
+
```vue
|
|
13
|
+
<template>
|
|
14
|
+
<div class="app-container app-page-container">
|
|
15
|
+
<XxxTemplate :config="xxxConfig" />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import { xxxConfig } from "./data";
|
|
21
|
+
</script>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
所有业务逻辑(查询、表格列、导出、翻译等)全部由模板组件内部处理,`data.ts` 只需导出一个 `config` 对象。
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 已知配置驱动模板一览
|
|
29
|
+
|
|
30
|
+
> ⚠️ **以下模板是基于高度相似的特定业务场景提炼的**,仅适用于列出的具体页面类型。不得因为"看起来相似"就套用到其他业务场景,否则会出现功能异常。
|
|
31
|
+
|
|
32
|
+
### 1. ResultQueryTemplate(轧钢实绩查询类)
|
|
33
|
+
|
|
34
|
+
**适用范围**:`production-mmwr/sjtj/` 下的各工序实绩查询页(查询+表格+导出,无新增/编辑/删除)
|
|
35
|
+
|
|
36
|
+
**识别特征**:
|
|
37
|
+
- 原型中只有查询区 + 数据表格 + 导出按钮
|
|
38
|
+
- 无 CRUD 操作,纯查询
|
|
39
|
+
- 字段较多,表格列数 10+
|
|
40
|
+
|
|
41
|
+
**生成规则**:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
// data.ts — 只导出一个 config 对象
|
|
45
|
+
import type { ResultQueryConfig } from "@/components/template/ResultQueryTemplate/types";
|
|
46
|
+
import { BusLogicDataType } from "@/types/page";
|
|
47
|
+
|
|
48
|
+
export const [pageName]Config: ResultQueryConfig = {
|
|
49
|
+
api: {
|
|
50
|
+
list: "/[服务缩写]/[资源名]/list",
|
|
51
|
+
export: "/[服务缩写]/[资源名]/export" // 有导出时才加
|
|
52
|
+
},
|
|
53
|
+
queryItems: [
|
|
54
|
+
// 同 Template A 的 queryDef 格式
|
|
55
|
+
{ name: "[field]", label: "[中文名]", placeholder: "请输入" },
|
|
56
|
+
{
|
|
57
|
+
name: "[dateField]",
|
|
58
|
+
type: "range",
|
|
59
|
+
startName: "[startDate]",
|
|
60
|
+
endName: "[endDate]",
|
|
61
|
+
label: "[日期名]",
|
|
62
|
+
logicType: BusLogicDataType.date,
|
|
63
|
+
rangeSeparator: "至"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
columns: [
|
|
67
|
+
// 同 Template A 的 columnsDef 格式(无 selection/index/操作列)
|
|
68
|
+
{ label: "[列名]", name: "[fieldName]", minWidth: 120 }
|
|
69
|
+
]
|
|
70
|
+
};
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```vue
|
|
74
|
+
<!-- index.vue -->
|
|
75
|
+
<template>
|
|
76
|
+
<ResultQueryTemplate :config="[pageName]Config" />
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<script setup lang="ts">
|
|
80
|
+
import ResultQueryTemplate from "@/components/template/ResultQueryTemplate/index.vue";
|
|
81
|
+
import { [pageName]Config } from "./data";
|
|
82
|
+
</script>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### 2. FinishingAchievementTemplate(精整实绩类)
|
|
88
|
+
|
|
89
|
+
**适用范围**:`production-mmwr/jzsj/` 下的各精整工序实绩管理页(喷砂、倒棱、矫直、剥皮、检验、酸洗、包装)
|
|
90
|
+
|
|
91
|
+
**识别特征**:
|
|
92
|
+
- 原型标题含"实绩"二字且在精整工序列表中
|
|
93
|
+
- 有固定的查询区 + 实绩录入 + 汇总数据结构
|
|
94
|
+
- 字段结构高度统一(同一套模板 7 个页面共用)
|
|
95
|
+
|
|
96
|
+
**生成规则**:参考 `src/components/template/FinishingAchievementTemplate/` 内的 `types.ts` 定义,只生成对应的 config 配置。
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### 3. ApplicationDeterminationTemplate(申请判定类)
|
|
101
|
+
|
|
102
|
+
**适用范围**:`production-mmwr/` 下的申请判定类页面(如 mmwr-application-determination-jz、mmwr-application-determination-sj)
|
|
103
|
+
|
|
104
|
+
**识别特征**:原型中有"申请"列表 + "判定"操作的双状态工作流页面
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
### 4. SamplingCommissionTemplate(取样委托类)
|
|
109
|
+
|
|
110
|
+
**适用范围**:`production-mmwr/jhgl/` 下的取样委托管理页(如 mmwr-sampling-commission-jz、mmwr-sampling-commission-sj)
|
|
111
|
+
|
|
112
|
+
**识别特征**:原型中有"委托单"列表 + 取样记录结构
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## AI 操作规范
|
|
117
|
+
|
|
118
|
+
1. **识别阶段**:在 page-spec 前置检查时,若页面落入以上任一范围,将交互模式标记为 `TEMPLATE_DRIVEN` 并注明具体模板名
|
|
119
|
+
2. **生成阶段**:只生成 `data.ts`(config 对象)+ `index.vue`(2-3行)+ `index.scss`(空或极少样式)
|
|
120
|
+
3. **禁止行为**:
|
|
121
|
+
- ❌ 不得手写 `createPage()` + `AbstractPageQueryHook` 结构
|
|
122
|
+
- ❌ 不得添加独立的 `BaseQuery` / `BaseTable` / `jh-pagination`(模板内部已处理)
|
|
123
|
+
- ❌ 不得将其他业务场景的页面识别为 TEMPLATE_DRIVEN 并套用以上 config 格式
|
|
124
|
+
4. **不确定时**:如果不确定是否适用配置驱动模板,使用 Template A(LIST)代替,更安全
|