@agile-team/wl-skills-kit 2.11.0 → 2.11.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/CHANGELOG.md +47 -9
- package/README.md +41 -23
- package/bin/wl-skills.js +133 -39
- package/docs/agent-pipeline-runbook.md +3 -3
- package/docs//345/205/250/347/233/230/345/210/206/346/236/220/344/270/216/346/231/272/350/203/275/344/275/223/346/220/255/345/273/272/346/214/207/345/215/227.md +4 -4
- package/files/.wl-skills/copilot-instructions-full.md +233 -233
- package/files/.wl-skills/docs/jh-pagination.md +505 -505
- package/files/.wl-skills/docs/page-spec-schema.md +109 -0
- package/files/.wl-skills/docs/request.md +940 -940
- package/files/.wl-skills/guides/architecture.md +1 -1
- package/files/.wl-skills/skills/core/convention-audit/SKILL.md +3 -3
- package/files/.wl-skills/skills/core/page-codegen/SKILL.md +10 -4
- package/files/.wl-skills/skills/core/spec-doc-parse/SKILL.md +332 -332
- package/files/.wl-skills/skills/core/spec-doc-parse/USAGE.md +97 -97
- package/files/.wl-skills/skills/sync/permission-sync/USAGE.md +107 -107
- package/files/.wl-skills/src/components/global/C_ParentView/index.vue +3 -3
- package/files/.wl-skills/src/components/global/C_RightToolbar/index.vue +157 -157
- package/files/.wl-skills/src/components/global/C_SvgIcon/index.vue +31 -31
- package/files/.wl-skills/src/components/global/C_SvgIcon/svgicon.js +10 -10
- package/files/.wl-skills/src/components/global/C_TagStatus/README.md +264 -264
- package/files/.wl-skills/src/components/global/C_TagStatus/config.ts +192 -192
- package/files/.wl-skills/src/components/global/C_TagStatus/index.vue +106 -106
- package/files/.wl-skills/src/components/global/C_TagStatus/types.ts +64 -64
- package/files/.wl-skills/src/components/global/C_Tree/README.md +153 -153
- package/files/.wl-skills/src/components/global/C_Tree/index.scss +42 -42
- package/files/.wl-skills/src/components/global/C_Tree/index.vue +78 -78
- package/files/.wl-skills/src/components/global/C_Tree/types.ts +59 -59
- package/files/.wl-skills/src/components/local/c_formModal/README.md +235 -235
- package/files/.wl-skills/src/components/local/c_formModal/data.ts +95 -95
- package/files/.wl-skills/src/components/local/c_formModal/index.scss +8 -8
- package/files/.wl-skills/src/components/local/c_formModal/index.vue +107 -107
- package/files/.wl-skills/src/components/local/c_formSections/data.ts +175 -175
- package/files/.wl-skills/src/components/local/c_formSections/index.scss +280 -280
- package/files/.wl-skills/src/components/local/c_formSections/index.vue +429 -429
- package/files/.wl-skills/src/components/local/c_listModal/data.ts +41 -41
- package/files/.wl-skills/src/components/local/c_listModal/index.vue +136 -136
- package/files/.wl-skills/src/components/local/c_spliterTitle/index.scss +25 -25
- package/files/.wl-skills/src/components/local/c_spliterTitle/index.vue +21 -21
- package/files/.wl-skills/src/components/remote/AGGrid/README.md +530 -530
- package/files/.wl-skills/src/components/remote/BaseForm/README.md +508 -508
- package/files/.wl-skills/src/components/remote/BaseQuery/README.md +865 -865
- package/files/.wl-skills/src/components/remote/BaseTable/README.md +941 -941
- package/files/.wl-skills/src/components/remote/BaseToolbar/README.md +496 -496
- package/files/.wl-skills/src/types/page.ts +24 -24
- package/files/.wl-skills/standards/04-coding-basics.md +39 -1
- package/files/.wl-skills/standards/09-typescript.md +26 -3
- package/files/.wl-skills/standards/14-layout-containers.md +6 -6
- package/files/.wl-skills/standards/index.md +2 -2
- package/files/.wl-skills/templates/README.md +44 -44
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/api.md +54 -54
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/data.ts +346 -346
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/index.scss +1 -1
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/index.vue +28 -28
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/data.ts +115 -115
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/index.scss +44 -44
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/index.vue +43 -43
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/data.ts +338 -338
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/index.scss +1 -1
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/index.vue +28 -28
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/data.ts +115 -115
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/index.scss +44 -44
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/index.vue +43 -43
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/api.md +88 -88
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/data.ts +601 -601
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/index.scss +1 -1
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/index.vue +64 -64
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/api.md +67 -67
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/data.ts +286 -286
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/index.scss +139 -139
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/index.vue +318 -318
- package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/api.md +98 -98
- package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/data.ts +543 -543
- package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/index.scss +1 -1
- package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/index.vue +52 -52
- package/files/.wl-skills/templates/sale/demo/add-demo/data.ts +518 -518
- package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/data.ts +524 -524
- package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/index.scss +154 -154
- package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/index.vue +117 -117
- package/files/.wl-skills/templates/sale/demo/domestic-trade-order/data.ts +308 -308
- package/files/.wl-skills/templates/sale/demo/domestic-trade-order/index.scss +99 -99
- package/files/.wl-skills/templates/sale/demo/domestic-trade-order/index.vue +77 -77
- package/files/.wl-skills/templates/sale/demo/heat-batch-return/data.ts +367 -367
- package/files/.wl-skills/templates/sale/demo/heat-batch-return/index.scss +100 -100
- package/files/.wl-skills/templates/sale/demo/heat-batch-return/index.vue +170 -170
- package/files/.wl-skills/templates/sale/demo/heat-batch-return/meltDialog.vue +320 -320
- package/files/.wl-skills/templates/sale/demo/metallurgical-spec/data.ts +824 -824
- package/lib/ast-rules.js +304 -9
- package/lib/page-spec.js +588 -0
- package/lib/safe-fix.js +115 -0
- package/mcp/config.js +47 -47
- package/mcp/registry.js +6 -1
- package/mcp/tools/projectTools.js +19 -1
- package/package.json +16 -11
- package/files/.wl-skills/src/components/global/C_Splitter/index.scss +0 -61
- package/files/.wl-skills/src/components/global/C_Splitter/index.vue +0 -149
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: ChenYu ycyplus@gmail.com
|
|
3
|
-
* @Date: 2026-01-02 11:00:00
|
|
4
|
-
* @LastEditors: ChenYu ycyplus@gmail.com
|
|
5
|
-
* @LastEditTime: 2026-01-02 11:00:00
|
|
6
|
-
* @FilePath: \cx-ui-sale\src\types\page.ts
|
|
7
|
-
* @Description: 页面常用类型统一导出
|
|
8
|
-
* Copyright (c) 2026 by CHENY, All Rights Reserved 😎.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
// 页面 Hook
|
|
12
|
-
export { AbstractPageQueryHook } from "@jhlc/common-core/src/page-hooks/page-query-hook";
|
|
13
|
-
|
|
14
|
-
// 查询组件类型
|
|
15
|
-
export { BaseQueryItemDesc } from "@jhlc/common-core/src/components/form/base-query/type";
|
|
16
|
-
|
|
17
|
-
// 工具栏类型
|
|
18
|
-
export { ActionButtonDesc } from "@jhlc/common-core/src/components/toolbar/type";
|
|
19
|
-
|
|
20
|
-
// 表格类型
|
|
21
|
-
export { TableColumnDesc } from "@jhlc/common-core/src/components/table/base-table/type";
|
|
22
|
-
|
|
23
|
-
// 业务逻辑数据类型
|
|
24
|
-
export { BusLogicDataType } from "@jhlc/types/src/logical-data";
|
|
1
|
+
/*
|
|
2
|
+
* @Author: ChenYu ycyplus@gmail.com
|
|
3
|
+
* @Date: 2026-01-02 11:00:00
|
|
4
|
+
* @LastEditors: ChenYu ycyplus@gmail.com
|
|
5
|
+
* @LastEditTime: 2026-01-02 11:00:00
|
|
6
|
+
* @FilePath: \cx-ui-sale\src\types\page.ts
|
|
7
|
+
* @Description: 页面常用类型统一导出
|
|
8
|
+
* Copyright (c) 2026 by CHENY, All Rights Reserved 😎.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// 页面 Hook
|
|
12
|
+
export { AbstractPageQueryHook } from "@jhlc/common-core/src/page-hooks/page-query-hook";
|
|
13
|
+
|
|
14
|
+
// 查询组件类型
|
|
15
|
+
export { BaseQueryItemDesc } from "@jhlc/common-core/src/components/form/base-query/type";
|
|
16
|
+
|
|
17
|
+
// 工具栏类型
|
|
18
|
+
export { ActionButtonDesc } from "@jhlc/common-core/src/components/toolbar/type";
|
|
19
|
+
|
|
20
|
+
// 表格类型
|
|
21
|
+
export { TableColumnDesc } from "@jhlc/common-core/src/components/table/base-table/type";
|
|
22
|
+
|
|
23
|
+
// 业务逻辑数据类型
|
|
24
|
+
export { BusLogicDataType } from "@jhlc/types/src/logical-data";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## 14 条核心约定
|
|
9
9
|
|
|
10
10
|
1. **变量声明**:优先 `const`,必须重新赋值时用 `let`,禁止 `var`
|
|
11
11
|
2. **解构赋值**:优先使用 `const { a, b } = obj`,而非 `obj.a` / `obj.b`
|
|
@@ -20,6 +20,44 @@
|
|
|
20
20
|
11. **v-for**:必须设置 `:key`,优先用业务主键 id 而非 index
|
|
21
21
|
12. **指令缩写**:统一 `:`(v-bind)、`@`(v-on)、`#`(v-slot)
|
|
22
22
|
13. **this 别名**:`<script setup>` 中无 `this`;旧 Options API 中的 `this` 别名用 `self`
|
|
23
|
+
14. **圈复杂度**:单函数圈复杂度 ≤ **10**(Mcabe),尽量小;超阈值必须拆分
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 圈复杂度(Mcabe)细则
|
|
28
|
+
|
|
29
|
+
> 对应确定性执行器 **R13**(`wl-skills validate` AST 引擎,阻断级)。
|
|
30
|
+
|
|
31
|
+
- **定义**:`复杂度 = 1 + 决策点数`,决策点 = `if` / `case` / `for` / `for-in` / `for-of` / `while` / `do-while` / `catch` / 三元 `?:` / `&&` / `||` / `??`。与 ESLint `complexity` 规则完全一致。
|
|
32
|
+
- **范围**:`index.vue <script>` 与 `data.ts` 中的**每一个**函数 / 方法 / 箭头函数独立计算(嵌套函数单独计,不叠加到父函数)。
|
|
33
|
+
- **上限**:`10`。`> 10` 由 R13 报 error 阻断提交。
|
|
34
|
+
- **豁免**:单函数加 `// wl-skills:ignore R13` 可精确豁免(仅限确有复杂第三方对接场景,需注释说明)。
|
|
35
|
+
|
|
36
|
+
**降低复杂度的手法**(按优先级):
|
|
37
|
+
|
|
38
|
+
1. **提前 return**(Guard Clause)替代嵌套 `if`
|
|
39
|
+
2. 查表驱动(`map[cond]()`)替代 `if-else` / `switch` 长链
|
|
40
|
+
3. 按职责抽取子函数(每个子函数单一职责)
|
|
41
|
+
4. 策略 / 状态机模式消除多分支
|
|
42
|
+
|
|
43
|
+
**示例**:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
// ❌ 复杂度 6,难读
|
|
47
|
+
function getLabel(type: string, v: number) {
|
|
48
|
+
if (type === "a") { if (v > 0) { return "A+" } else { return "A-" } }
|
|
49
|
+
else if (type === "b") { if (v > 0) { return "B+" } else { return "B-" } }
|
|
50
|
+
return v > 0 ? "OTHER+" : "OTHER-"
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// ✅ 复杂度 2,查表驱动
|
|
54
|
+
const LABEL_MAP = { a: ["A-", "A+"], b: ["B-", "B+"] } as const
|
|
55
|
+
function getLabel(type: string, v: number) {
|
|
56
|
+
const pair = LABEL_MAP[type as keyof typeof LABEL_MAP]
|
|
57
|
+
if (pair) return pair[v > 0 ? 1 : 0]
|
|
58
|
+
return v > 0 ? "OTHER+" : "OTHER-"
|
|
59
|
+
}
|
|
60
|
+
```
|
|
23
61
|
|
|
24
62
|
---
|
|
25
63
|
|
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
# 09 — TypeScript 类型规范
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
> 项目使用 `strict: false`
|
|
3
|
+
> **强制度**:🔴 必遵。
|
|
4
|
+
> 项目使用 `strict: false` 宽松模式起步,但**类型错误零容忍**:`vue-tsc --noEmit` 必须 0 error。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 类型错误零容忍(R14)
|
|
9
|
+
|
|
10
|
+
> 对应确定性执行器 **R14**(`wl-skills validate --typecheck` / MCP `wls_validate_page {typecheck:true}`,阻断级)。
|
|
11
|
+
|
|
12
|
+
- **基线**:`vue-tsc --noEmit`(无 `vue-tsc` 时回退 `tsc --noEmit`)必须退出码 0。
|
|
13
|
+
- **何时跑**:
|
|
14
|
+
- **CI 必跑**:流水线中 `wl-skills validate --typecheck`(与 `--strict` 组合),任何 TS error 阻断合并
|
|
15
|
+
- **pre-push / 发版前必跑**:本地 `pnpm wl-skills validate --typecheck`
|
|
16
|
+
- **pre-commit 不建议开启**:全量类型检查较慢,避免拖慢日常提交
|
|
17
|
+
- **优雅降级**:项目无 `tsconfig.json` 或未安装 `vue-tsc` / `tsc` 时,R14 输出 warn 不阻断(提示安装后纳入 CI)。
|
|
18
|
+
- **为什么必遵**:类型错误在运行时才暴露,成本高;CI 阶段拦截是 ROI 最高的质量门。
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# CI / 发版前
|
|
22
|
+
wl-skills validate --typecheck --strict
|
|
23
|
+
|
|
24
|
+
# MCP(AI 编辑器中)
|
|
25
|
+
wls_validate_page({ path: "src/views", typecheck: true })
|
|
26
|
+
```
|
|
5
27
|
|
|
6
28
|
---
|
|
7
29
|
|
|
@@ -68,4 +90,5 @@ interface Customer {
|
|
|
68
90
|
| -------------------- | ------------------------------------------ |
|
|
69
91
|
| 已有 `tsconfig.json` | ✅ 直接安装 git-standards,零冲突 |
|
|
70
92
|
| 无 TS 环境 | 先 `tsc --init` 初始化,再装 git-standards |
|
|
71
|
-
|
|
93
|
+
|
|
94
|
+
> ESLint TS 规则维持 `warn`(风格类,不阻断提交);**类型错误阻断由 R14 兜底**(`vue-tsc --noEmit` 非零退出码 → error),二者职责分离:ESLint 管风格,R14 管正确性。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 14 — 布局容器规范(C_Splitter
|
|
1
|
+
# 14 — 布局容器规范(C_Splitter 已删除 + jh-drag-col/row 唯一推荐)
|
|
2
2
|
|
|
3
3
|
> **强制度**:🔴 必遵 + 阻断式(lint 命中即报错)。
|
|
4
4
|
> **背景**:2024 年 12 月一次真实事故,左树右表页面右侧面板永不刷新,最终定位为 `C_Splitter` 在 `onMounted` 中调用 `slots.default()` 冻结 vnode 快照,导致子树所有响应式绑定与父组件 ref 脱钩。
|
|
@@ -94,13 +94,13 @@ onMounted(() => {
|
|
|
94
94
|
|
|
95
95
|
---
|
|
96
96
|
|
|
97
|
-
## 4.
|
|
97
|
+
## 4. 存量改造
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
`C_Splitter` 组件已从 kit 中**彻底删除**(不再随包分发)。若存量项目仍引用:
|
|
100
100
|
|
|
101
|
-
1.
|
|
102
|
-
2.
|
|
103
|
-
3.
|
|
101
|
+
1. **必须替换**:所有 `import C_Splitter` / `<C_Splitter>` 全量替换为 `jh-drag-col` / `jh-drag-row`
|
|
102
|
+
2. **lint 规则**:`wl-skills validate` / `wl-skills doctor-ui` / `lint-skills` 命中 `import C_Splitter` 或 `<C_Splitter` 一律报 ERROR,无任何豁免
|
|
103
|
+
3. **删除残留组件目录**:若项目 `src/components/global/C_Splitter/` 仍存在,可直接删除
|
|
104
104
|
|
|
105
105
|
---
|
|
106
106
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| 06 | `06-security.md` | 安全规范 | 🔴 必遵 |
|
|
18
18
|
| 07 | `07-config.md` | 配置管理 | 🔴 必遵 |
|
|
19
19
|
| 08 | `08-git.md` | Git 分支 & 提交 + 审计 | 🔴 必遵 |
|
|
20
|
-
| 09 | `09-typescript.md` | TypeScript 类型
|
|
20
|
+
| 09 | `09-typescript.md` | TypeScript 类型 + 类型错误零容忍 | 🔴 必遵 + 阻断 |
|
|
21
21
|
| 10 | `10-pinia.md` | Pinia 状态管理 | 🔴 必遵 |
|
|
22
22
|
| 11 | `11-form-validation.md` | 表单与校验 | 🔴 必遵 |
|
|
23
23
|
| 12 | `12-base-table.md` | BaseTable + AGGrid cid | 🔴 必遵 |
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
✅ 已读取 standards/13-platform-components.md → 平台组件对照表
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
> **不要** 一次性读取全部
|
|
82
|
+
> **不要** 一次性读取全部 14 条。错误示范:`✅ 已读取 standards/01 ~ standards/14`(浪费 token,违反懒加载原则)。
|
|
83
83
|
|
|
84
84
|
---
|
|
85
85
|
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
# demo — 领域样例索引
|
|
2
|
-
|
|
3
|
-
> AI 学习参考 + 开发者速查。每个样例均可独立运行(Mock 数据,不依赖后端)。
|
|
4
|
-
> 安装 wl-skills-kit 后自动导入此目录,**不要在此目录下放业务代码**。
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## produce/aiflow/ — 生产域(客户档案模块,8 个页面)
|
|
9
|
-
|
|
10
|
-
| 目录 | 模板类型 | 说明 |
|
|
11
|
-
| ------------------------------------- | -------------- | ----------------------------------- |
|
|
12
|
-
| `mmwr-customer-archive/` | LIST + Tabs | 客户档案列表(带 c_formModal 弹窗) |
|
|
13
|
-
| `mmwr-temp-customer-archive/` | LIST | 临时客户档案列表 |
|
|
14
|
-
| `mmwr-customer-apply-add/` | LIST | 客户新增申请列表 |
|
|
15
|
-
| `mmwr-customer-apply-add-form/` | FORM_ROUTE | 客户新增申请表单(独立路由) |
|
|
16
|
-
| `mmwr-customer-apply-change/` | LIST | 客户变更申请列表 |
|
|
17
|
-
| `mmwr-customer-apply-change-form/` | FORM_ROUTE | 客户变更申请表单(独立路由) |
|
|
18
|
-
| `mmwr-customer-apply-change-history/` | CHANGE_HISTORY | 客户变更历史比对 |
|
|
19
|
-
| `mmwr-customer-detail/` | DETAIL_TABS | 客户详情(多 Tab) |
|
|
20
|
-
|
|
21
|
-
## sale/.wl-skills/templates/ — 销售域(平台默认样例,5 个页面)
|
|
22
|
-
|
|
23
|
-
| 目录 | 模板类型 | 说明 |
|
|
24
|
-
| ------------------------ | ------------- | -------------------------------- |
|
|
25
|
-
| `domestic-trade-order/` | LIST | 标准内贸订单列表 |
|
|
26
|
-
| `metallurgical-spec/` | MASTER_DETAIL | 冶金规范(jh-drag-row 上下分栏) |
|
|
27
|
-
| `add-.wl-skills/templates/` | FORM_ROUTE | 新增表单演示(c_formSections) |
|
|
28
|
-
| `billet-flame-cut-plan/` | LIST | 坯料火焰切割计划列表 |
|
|
29
|
-
| `heat-batch-return/` | LIST + Modal | 炉批退判(含自定义弹窗) |
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## 样例标准
|
|
34
|
-
|
|
35
|
-
每个目录必须包含:
|
|
36
|
-
|
|
37
|
-
- `index.vue` — 视图层(纯模板 + createPage 解构)
|
|
38
|
-
- `data.ts` — 逻辑层(AbstractPageQueryHook 或 composable)
|
|
39
|
-
- `index.scss` — 样式层
|
|
40
|
-
- `api.md` — 接口约定(可选)
|
|
41
|
-
|
|
42
|
-
## 贡献
|
|
43
|
-
|
|
44
|
-
新增样例请放在 `.wl-skills/templates/{domain}/{submodule}/{page-name}/`,提 PR 到 wl-skills-kit 仓库。
|
|
1
|
+
# demo — 领域样例索引
|
|
2
|
+
|
|
3
|
+
> AI 学习参考 + 开发者速查。每个样例均可独立运行(Mock 数据,不依赖后端)。
|
|
4
|
+
> 安装 wl-skills-kit 后自动导入此目录,**不要在此目录下放业务代码**。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## produce/aiflow/ — 生产域(客户档案模块,8 个页面)
|
|
9
|
+
|
|
10
|
+
| 目录 | 模板类型 | 说明 |
|
|
11
|
+
| ------------------------------------- | -------------- | ----------------------------------- |
|
|
12
|
+
| `mmwr-customer-archive/` | LIST + Tabs | 客户档案列表(带 c_formModal 弹窗) |
|
|
13
|
+
| `mmwr-temp-customer-archive/` | LIST | 临时客户档案列表 |
|
|
14
|
+
| `mmwr-customer-apply-add/` | LIST | 客户新增申请列表 |
|
|
15
|
+
| `mmwr-customer-apply-add-form/` | FORM_ROUTE | 客户新增申请表单(独立路由) |
|
|
16
|
+
| `mmwr-customer-apply-change/` | LIST | 客户变更申请列表 |
|
|
17
|
+
| `mmwr-customer-apply-change-form/` | FORM_ROUTE | 客户变更申请表单(独立路由) |
|
|
18
|
+
| `mmwr-customer-apply-change-history/` | CHANGE_HISTORY | 客户变更历史比对 |
|
|
19
|
+
| `mmwr-customer-detail/` | DETAIL_TABS | 客户详情(多 Tab) |
|
|
20
|
+
|
|
21
|
+
## sale/.wl-skills/templates/ — 销售域(平台默认样例,5 个页面)
|
|
22
|
+
|
|
23
|
+
| 目录 | 模板类型 | 说明 |
|
|
24
|
+
| ------------------------ | ------------- | -------------------------------- |
|
|
25
|
+
| `domestic-trade-order/` | LIST | 标准内贸订单列表 |
|
|
26
|
+
| `metallurgical-spec/` | MASTER_DETAIL | 冶金规范(jh-drag-row 上下分栏) |
|
|
27
|
+
| `add-.wl-skills/templates/` | FORM_ROUTE | 新增表单演示(c_formSections) |
|
|
28
|
+
| `billet-flame-cut-plan/` | LIST | 坯料火焰切割计划列表 |
|
|
29
|
+
| `heat-batch-return/` | LIST + Modal | 炉批退判(含自定义弹窗) |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 样例标准
|
|
34
|
+
|
|
35
|
+
每个目录必须包含:
|
|
36
|
+
|
|
37
|
+
- `index.vue` — 视图层(纯模板 + createPage 解构)
|
|
38
|
+
- `data.ts` — 逻辑层(AbstractPageQueryHook 或 composable)
|
|
39
|
+
- `index.scss` — 样式层
|
|
40
|
+
- `api.md` — 接口约定(可选)
|
|
41
|
+
|
|
42
|
+
## 贡献
|
|
43
|
+
|
|
44
|
+
新增样例请放在 `.wl-skills/templates/{domain}/{submodule}/{page-name}/`,提 PR 到 wl-skills-kit 仓库。
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
# 新增申请列表 — 接口约定
|
|
2
|
-
|
|
3
|
-
## 服务缩写:`sale` 资源名:`customerApply`
|
|
4
|
-
|
|
5
|
-
### 1. 分页查询
|
|
6
|
-
|
|
7
|
-
- **方法**:POST
|
|
8
|
-
- **URL**:`/sale/customerApply/addList`
|
|
9
|
-
- **请求体**:`{ customerCode, approvalProduct, applyOrg, customerName, applyType, applyDept, applicant, approvalStatus, applyDateStart, applyDateEnd, verifyStatus, current, size }`
|
|
10
|
-
- **响应**:`{ code:2000, data:{ records:[], total, current, size } }`
|
|
11
|
-
|
|
12
|
-
### 2. 删除
|
|
13
|
-
|
|
14
|
-
- **方法**:POST
|
|
15
|
-
- **URL**:`/sale/customerApply/remove`
|
|
16
|
-
- **请求体**:`{ ids:[] }`
|
|
17
|
-
|
|
18
|
-
### 3. 提交审批
|
|
19
|
-
|
|
20
|
-
- **方法**:POST
|
|
21
|
-
- **URL**:`/sale/customerApply/submit`
|
|
22
|
-
- **请求体**:`{ ids:[] }`
|
|
23
|
-
|
|
24
|
-
### 4. 撤回
|
|
25
|
-
|
|
26
|
-
- **方法**:POST
|
|
27
|
-
- **URL**:`/sale/customerApply/withdraw`
|
|
28
|
-
- **请求体**:`{ ids:[] }`
|
|
29
|
-
|
|
30
|
-
### 5. 导出
|
|
31
|
-
|
|
32
|
-
- **方法**:GET
|
|
33
|
-
- **URL**:`/sale/customerApply/export`
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## 列表字段
|
|
38
|
-
|
|
39
|
-
| 字段 | 类型 | 说明 |
|
|
40
|
-
|---|---|---|
|
|
41
|
-
| id | string | 主键 |
|
|
42
|
-
| applyCode | string | 申请编码(蓝色链接列) |
|
|
43
|
-
| applyType | string | 申请类型 |
|
|
44
|
-
| customerCode | string | 客户编码 |
|
|
45
|
-
| customerName | string | 客户名称 |
|
|
46
|
-
| approvalProduct | string | 审批产品别 |
|
|
47
|
-
| applyReason | string | 申请原因 |
|
|
48
|
-
| applicant | string | 申请人 |
|
|
49
|
-
| applyDept | string | 申请部门 |
|
|
50
|
-
| applyOrg | string | 申请组织 |
|
|
51
|
-
| creator | string | 创建人 |
|
|
52
|
-
| createTime | string | 创建时间 |
|
|
53
|
-
| approvalStatus | string | 审批状态(色块)|
|
|
54
|
-
| verifyStatus | string | 核实状态(色块)|
|
|
1
|
+
# 新增申请列表 — 接口约定
|
|
2
|
+
|
|
3
|
+
## 服务缩写:`sale` 资源名:`customerApply`
|
|
4
|
+
|
|
5
|
+
### 1. 分页查询
|
|
6
|
+
|
|
7
|
+
- **方法**:POST
|
|
8
|
+
- **URL**:`/sale/customerApply/addList`
|
|
9
|
+
- **请求体**:`{ customerCode, approvalProduct, applyOrg, customerName, applyType, applyDept, applicant, approvalStatus, applyDateStart, applyDateEnd, verifyStatus, current, size }`
|
|
10
|
+
- **响应**:`{ code:2000, data:{ records:[], total, current, size } }`
|
|
11
|
+
|
|
12
|
+
### 2. 删除
|
|
13
|
+
|
|
14
|
+
- **方法**:POST
|
|
15
|
+
- **URL**:`/sale/customerApply/remove`
|
|
16
|
+
- **请求体**:`{ ids:[] }`
|
|
17
|
+
|
|
18
|
+
### 3. 提交审批
|
|
19
|
+
|
|
20
|
+
- **方法**:POST
|
|
21
|
+
- **URL**:`/sale/customerApply/submit`
|
|
22
|
+
- **请求体**:`{ ids:[] }`
|
|
23
|
+
|
|
24
|
+
### 4. 撤回
|
|
25
|
+
|
|
26
|
+
- **方法**:POST
|
|
27
|
+
- **URL**:`/sale/customerApply/withdraw`
|
|
28
|
+
- **请求体**:`{ ids:[] }`
|
|
29
|
+
|
|
30
|
+
### 5. 导出
|
|
31
|
+
|
|
32
|
+
- **方法**:GET
|
|
33
|
+
- **URL**:`/sale/customerApply/export`
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 列表字段
|
|
38
|
+
|
|
39
|
+
| 字段 | 类型 | 说明 |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| id | string | 主键 |
|
|
42
|
+
| applyCode | string | 申请编码(蓝色链接列) |
|
|
43
|
+
| applyType | string | 申请类型 |
|
|
44
|
+
| customerCode | string | 客户编码 |
|
|
45
|
+
| customerName | string | 客户名称 |
|
|
46
|
+
| approvalProduct | string | 审批产品别 |
|
|
47
|
+
| applyReason | string | 申请原因 |
|
|
48
|
+
| applicant | string | 申请人 |
|
|
49
|
+
| applyDept | string | 申请部门 |
|
|
50
|
+
| applyOrg | string | 申请组织 |
|
|
51
|
+
| creator | string | 创建人 |
|
|
52
|
+
| createTime | string | 创建时间 |
|
|
53
|
+
| approvalStatus | string | 审批状态(色块)|
|
|
54
|
+
| verifyStatus | string | 核实状态(色块)|
|