@agile-team/wl-skills-kit 2.11.1 → 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.
Files changed (85) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +1 -1
  3. package/bin/wl-skills.js +27 -3
  4. package/files/.wl-skills/docs/jh-pagination.md +505 -505
  5. package/files/.wl-skills/docs/request.md +940 -940
  6. package/files/.wl-skills/guides/architecture.md +1 -1
  7. package/files/.wl-skills/skills/core/convention-audit/SKILL.md +3 -3
  8. package/files/.wl-skills/skills/core/spec-doc-parse/SKILL.md +332 -332
  9. package/files/.wl-skills/skills/core/spec-doc-parse/USAGE.md +97 -97
  10. package/files/.wl-skills/skills/sync/permission-sync/USAGE.md +107 -107
  11. package/files/.wl-skills/src/components/global/C_ParentView/index.vue +3 -3
  12. package/files/.wl-skills/src/components/global/C_RightToolbar/index.vue +157 -157
  13. package/files/.wl-skills/src/components/global/C_SvgIcon/index.vue +31 -31
  14. package/files/.wl-skills/src/components/global/C_SvgIcon/svgicon.js +10 -10
  15. package/files/.wl-skills/src/components/global/C_TagStatus/README.md +264 -264
  16. package/files/.wl-skills/src/components/global/C_TagStatus/config.ts +192 -192
  17. package/files/.wl-skills/src/components/global/C_TagStatus/index.vue +106 -106
  18. package/files/.wl-skills/src/components/global/C_TagStatus/types.ts +64 -64
  19. package/files/.wl-skills/src/components/global/C_Tree/README.md +153 -153
  20. package/files/.wl-skills/src/components/global/C_Tree/index.scss +42 -42
  21. package/files/.wl-skills/src/components/global/C_Tree/index.vue +78 -78
  22. package/files/.wl-skills/src/components/global/C_Tree/types.ts +59 -59
  23. package/files/.wl-skills/src/components/local/c_formModal/README.md +235 -235
  24. package/files/.wl-skills/src/components/local/c_formModal/data.ts +95 -95
  25. package/files/.wl-skills/src/components/local/c_formModal/index.scss +8 -8
  26. package/files/.wl-skills/src/components/local/c_formModal/index.vue +107 -107
  27. package/files/.wl-skills/src/components/local/c_formSections/data.ts +175 -175
  28. package/files/.wl-skills/src/components/local/c_formSections/index.scss +280 -280
  29. package/files/.wl-skills/src/components/local/c_formSections/index.vue +429 -429
  30. package/files/.wl-skills/src/components/local/c_listModal/data.ts +41 -41
  31. package/files/.wl-skills/src/components/local/c_listModal/index.vue +136 -136
  32. package/files/.wl-skills/src/components/local/c_spliterTitle/index.scss +25 -25
  33. package/files/.wl-skills/src/components/local/c_spliterTitle/index.vue +21 -21
  34. package/files/.wl-skills/src/components/remote/AGGrid/README.md +530 -530
  35. package/files/.wl-skills/src/components/remote/BaseForm/README.md +508 -508
  36. package/files/.wl-skills/src/components/remote/BaseQuery/README.md +865 -865
  37. package/files/.wl-skills/src/components/remote/BaseTable/README.md +941 -941
  38. package/files/.wl-skills/src/components/remote/BaseToolbar/README.md +496 -496
  39. package/files/.wl-skills/src/types/page.ts +24 -24
  40. package/files/.wl-skills/standards/04-coding-basics.md +39 -1
  41. package/files/.wl-skills/standards/09-typescript.md +26 -3
  42. package/files/.wl-skills/standards/index.md +2 -2
  43. package/files/.wl-skills/templates/README.md +44 -44
  44. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/api.md +54 -54
  45. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/data.ts +346 -346
  46. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/index.scss +1 -1
  47. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/index.vue +28 -28
  48. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/data.ts +115 -115
  49. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/index.scss +44 -44
  50. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/index.vue +43 -43
  51. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/data.ts +338 -338
  52. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/index.scss +1 -1
  53. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/index.vue +28 -28
  54. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/data.ts +115 -115
  55. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/index.scss +44 -44
  56. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/index.vue +43 -43
  57. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/api.md +88 -88
  58. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/data.ts +601 -601
  59. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/index.scss +1 -1
  60. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/index.vue +64 -64
  61. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/api.md +67 -67
  62. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/data.ts +286 -286
  63. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/index.scss +139 -139
  64. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/index.vue +318 -318
  65. package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/api.md +98 -98
  66. package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/data.ts +543 -543
  67. package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/index.scss +1 -1
  68. package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/index.vue +52 -52
  69. package/files/.wl-skills/templates/sale/demo/add-demo/data.ts +518 -518
  70. package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/data.ts +524 -524
  71. package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/index.scss +154 -154
  72. package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/index.vue +117 -117
  73. package/files/.wl-skills/templates/sale/demo/domestic-trade-order/data.ts +308 -308
  74. package/files/.wl-skills/templates/sale/demo/domestic-trade-order/index.scss +99 -99
  75. package/files/.wl-skills/templates/sale/demo/domestic-trade-order/index.vue +77 -77
  76. package/files/.wl-skills/templates/sale/demo/heat-batch-return/data.ts +367 -367
  77. package/files/.wl-skills/templates/sale/demo/heat-batch-return/index.scss +100 -100
  78. package/files/.wl-skills/templates/sale/demo/heat-batch-return/index.vue +170 -170
  79. package/files/.wl-skills/templates/sale/demo/heat-batch-return/meltDialog.vue +320 -320
  80. package/files/.wl-skills/templates/sale/demo/metallurgical-spec/data.ts +824 -824
  81. package/lib/ast-rules.js +304 -9
  82. package/mcp/config.js +46 -46
  83. package/mcp/registry.js +6 -1
  84. package/mcp/tools/projectTools.js +9 -1
  85. package/package.json +2 -2
@@ -1 +1 @@
1
- // 新增申请列表页样式
1
+ // 新增申请列表页样式
@@ -1,28 +1,28 @@
1
- <template>
2
- <div class="app-container app-page-container">
3
- <BaseQuery :form="queryParam" :items="queryItems" @select="select" @reset="select" />
4
- <BaseToolbar :items="toolbars" />
5
- <BaseTable ref="tableRef" :data="list" :columns="columns" showToolbar />
6
- <jh-pagination
7
- v-show="page.total && page.total > 0"
8
- :total="page.total || 0"
9
- v-model:currentPage="page.current"
10
- v-model:pageSize="page.size"
11
- @current-change="select"
12
- @size-change="select"
13
- />
14
- </div>
15
- </template>
16
-
17
- <script setup lang="ts">
18
- import { createPage } from "./data";
19
-
20
- const Page = createPage();
21
- const { tableRef, page, queryParam, list, queryItems, columns, toolbars, select } = Page;
22
-
23
- onMounted(() => select());
24
- </script>
25
-
26
- <style scoped lang="scss">
27
- @import "./index.scss";
28
- </style>
1
+ <template>
2
+ <div class="app-container app-page-container">
3
+ <BaseQuery :form="queryParam" :items="queryItems" @select="select" @reset="select" />
4
+ <BaseToolbar :items="toolbars" />
5
+ <BaseTable ref="tableRef" :data="list" :columns="columns" showToolbar />
6
+ <jh-pagination
7
+ v-show="page.total && page.total > 0"
8
+ :total="page.total || 0"
9
+ v-model:currentPage="page.current"
10
+ v-model:pageSize="page.size"
11
+ @current-change="select"
12
+ @size-change="select"
13
+ />
14
+ </div>
15
+ </template>
16
+
17
+ <script setup lang="ts">
18
+ import { createPage } from "./data";
19
+
20
+ const Page = createPage();
21
+ const { tableRef, page, queryParam, list, queryItems, columns, toolbars, select } = Page;
22
+
23
+ onMounted(() => select());
24
+ </script>
25
+
26
+ <style scoped lang="scss">
27
+ @import "./index.scss";
28
+ </style>
@@ -1,115 +1,115 @@
1
- import { postAction, getAction } from "@jhlc/common-core/src/api/action";
2
- import { ElMessage } from "element-plus";
3
- import { useRouter } from "vue-router";
4
- import { createAddMockData } from "@/components/local/c_customerTabs/data";
5
- import envConfig from "@jhlc/common-core/src/store/env-config";
6
-
7
- export const API_CONFIG = {
8
- getById: "/sale/customerApply/getById",
9
- save: "/sale/customerApply/save",
10
- submit: "/sale/customerApply/submit",
11
- changeHistory: "/sale/customerApply/changeHistory"
12
- } as const;
13
-
14
- export function useApplyAddForm(tabsRef: any) {
15
- const router = useRouter();
16
- const loading = ref(false);
17
- const isEdit = ref(false);
18
- const currentId = ref<string>("");
19
-
20
- async function loadDetail(id: string) {
21
- loading.value = true;
22
- isEdit.value = true;
23
- currentId.value = id;
24
- try {
25
- const res = await getAction(API_CONFIG.getById, { id });
26
- if (res?.data) tabsRef.value?.loadData(res.data);
27
- } finally {
28
- loading.value = false;
29
- }
30
- }
31
-
32
- function loadMockData() {
33
- tabsRef.value?.loadData(createAddMockData());
34
- }
35
-
36
- async function handleSave() {
37
- const valid = await tabsRef.value?.validate();
38
- if (!valid) {
39
- ElMessage.warning("请完善必填项");
40
- return;
41
- }
42
- loading.value = true;
43
- try {
44
- const formData = tabsRef.value?.collectFormData();
45
- const payload = isEdit.value
46
- ? { ...formData, id: currentId.value }
47
- : formData;
48
- const res = await postAction(API_CONFIG.save, payload);
49
- if (res?.code === 200) {
50
- ElMessage.success("保存成功");
51
- if (!isEdit.value && res.data?.id) {
52
- currentId.value = res.data.id;
53
- isEdit.value = true;
54
- }
55
- }
56
- } finally {
57
- loading.value = false;
58
- }
59
- }
60
-
61
- async function handleSaveAndChange() {
62
- const valid = await tabsRef.value?.validate();
63
- if (!valid) {
64
- ElMessage.warning("请完善必填项");
65
- return;
66
- }
67
- loading.value = true;
68
- try {
69
- const formData = tabsRef.value?.collectFormData();
70
- const payload = isEdit.value
71
- ? { ...formData, id: currentId.value }
72
- : formData;
73
- const saveRes = await postAction(API_CONFIG.save, payload);
74
- if (saveRes?.code === 200) {
75
- const id = currentId.value || saveRes.data?.id;
76
- const submitRes = await postAction(API_CONFIG.submit, { ids: [id] });
77
- if (submitRes?.code === 200) ElMessage.success("保存并变更成功");
78
- }
79
- } finally {
80
- loading.value = false;
81
- }
82
- }
83
-
84
- const HISTORY_ROUTE = "/aiflow/mmwrCustomerApplyChangeHistory";
85
- function handleChangeHistory() {
86
- if (!currentId.value) {
87
- ElMessage.warning("请先保存申请后再查看变更历史");
88
- return;
89
- }
90
- const router = envConfig()?.router;
91
- if (!router) {
92
- ElMessage.error("路由未初始化,请刷新页面重试");
93
- return;
94
- }
95
- location.href = router.resolve({
96
- path: HISTORY_ROUTE,
97
- query: { id: currentId.value }
98
- }).href;
99
- }
100
-
101
- function handleCancel() {
102
- router.back();
103
- }
104
-
105
- return {
106
- loading,
107
- isEdit,
108
- loadDetail,
109
- loadMockData,
110
- handleSave,
111
- handleSaveAndChange,
112
- handleChangeHistory,
113
- handleCancel
114
- };
115
- }
1
+ import { postAction, getAction } from "@jhlc/common-core/src/api/action";
2
+ import { ElMessage } from "element-plus";
3
+ import { useRouter } from "vue-router";
4
+ import { createAddMockData } from "@/components/local/c_customerTabs/data";
5
+ import envConfig from "@jhlc/common-core/src/store/env-config";
6
+
7
+ export const API_CONFIG = {
8
+ getById: "/sale/customerApply/getById",
9
+ save: "/sale/customerApply/save",
10
+ submit: "/sale/customerApply/submit",
11
+ changeHistory: "/sale/customerApply/changeHistory"
12
+ } as const;
13
+
14
+ export function useApplyAddForm(tabsRef: any) {
15
+ const router = useRouter();
16
+ const loading = ref(false);
17
+ const isEdit = ref(false);
18
+ const currentId = ref<string>("");
19
+
20
+ async function loadDetail(id: string) {
21
+ loading.value = true;
22
+ isEdit.value = true;
23
+ currentId.value = id;
24
+ try {
25
+ const res = await getAction(API_CONFIG.getById, { id });
26
+ if (res?.data) tabsRef.value?.loadData(res.data);
27
+ } finally {
28
+ loading.value = false;
29
+ }
30
+ }
31
+
32
+ function loadMockData() {
33
+ tabsRef.value?.loadData(createAddMockData());
34
+ }
35
+
36
+ async function handleSave() {
37
+ const valid = await tabsRef.value?.validate();
38
+ if (!valid) {
39
+ ElMessage.warning("请完善必填项");
40
+ return;
41
+ }
42
+ loading.value = true;
43
+ try {
44
+ const formData = tabsRef.value?.collectFormData();
45
+ const payload = isEdit.value
46
+ ? { ...formData, id: currentId.value }
47
+ : formData;
48
+ const res = await postAction(API_CONFIG.save, payload);
49
+ if (res?.code === 200) {
50
+ ElMessage.success("保存成功");
51
+ if (!isEdit.value && res.data?.id) {
52
+ currentId.value = res.data.id;
53
+ isEdit.value = true;
54
+ }
55
+ }
56
+ } finally {
57
+ loading.value = false;
58
+ }
59
+ }
60
+
61
+ async function handleSaveAndChange() {
62
+ const valid = await tabsRef.value?.validate();
63
+ if (!valid) {
64
+ ElMessage.warning("请完善必填项");
65
+ return;
66
+ }
67
+ loading.value = true;
68
+ try {
69
+ const formData = tabsRef.value?.collectFormData();
70
+ const payload = isEdit.value
71
+ ? { ...formData, id: currentId.value }
72
+ : formData;
73
+ const saveRes = await postAction(API_CONFIG.save, payload);
74
+ if (saveRes?.code === 200) {
75
+ const id = currentId.value || saveRes.data?.id;
76
+ const submitRes = await postAction(API_CONFIG.submit, { ids: [id] });
77
+ if (submitRes?.code === 200) ElMessage.success("保存并变更成功");
78
+ }
79
+ } finally {
80
+ loading.value = false;
81
+ }
82
+ }
83
+
84
+ const HISTORY_ROUTE = "/aiflow/mmwrCustomerApplyChangeHistory";
85
+ function handleChangeHistory() {
86
+ if (!currentId.value) {
87
+ ElMessage.warning("请先保存申请后再查看变更历史");
88
+ return;
89
+ }
90
+ const router = envConfig()?.router;
91
+ if (!router) {
92
+ ElMessage.error("路由未初始化,请刷新页面重试");
93
+ return;
94
+ }
95
+ location.href = router.resolve({
96
+ path: HISTORY_ROUTE,
97
+ query: { id: currentId.value }
98
+ }).href;
99
+ }
100
+
101
+ function handleCancel() {
102
+ router.back();
103
+ }
104
+
105
+ return {
106
+ loading,
107
+ isEdit,
108
+ loadDetail,
109
+ loadMockData,
110
+ handleSave,
111
+ handleSaveAndChange,
112
+ handleChangeHistory,
113
+ handleCancel
114
+ };
115
+ }
@@ -1,44 +1,44 @@
1
- .app-page-container {
2
- overflow-y: auto;
3
- padding-bottom: 24px;
4
- }
5
-
6
- .page-header {
7
- display: flex;
8
- align-items: center;
9
- margin-bottom: 8px;
10
-
11
- .page-title {
12
- font-size: 18px;
13
- font-weight: 600;
14
- margin-right: 12px;
15
- }
16
-
17
- .page-tag {
18
- display: inline-block;
19
- padding: 2px 8px;
20
- font-size: 12px;
21
- border-radius: 4px;
22
- margin-right: 8px;
23
-
24
- &--add {
25
- background-color: var(--el-color-primary-light-9);
26
- color: var(--el-color-primary);
27
- border: 1px solid var(--el-color-primary-light-7);
28
- }
29
-
30
- &--status {
31
- background-color: var(--el-color-warning-light-9);
32
- color: var(--el-color-warning);
33
- border: 1px solid var(--el-color-warning-light-7);
34
- }
35
- }
36
-
37
- .only-required-check {
38
- margin-left: 8px;
39
- }
40
- }
41
-
42
- .page-toolbar {
43
- margin-bottom: 12px;
44
- }
1
+ .app-page-container {
2
+ overflow-y: auto;
3
+ padding-bottom: 24px;
4
+ }
5
+
6
+ .page-header {
7
+ display: flex;
8
+ align-items: center;
9
+ margin-bottom: 8px;
10
+
11
+ .page-title {
12
+ font-size: 18px;
13
+ font-weight: 600;
14
+ margin-right: 12px;
15
+ }
16
+
17
+ .page-tag {
18
+ display: inline-block;
19
+ padding: 2px 8px;
20
+ font-size: 12px;
21
+ border-radius: 4px;
22
+ margin-right: 8px;
23
+
24
+ &--add {
25
+ background-color: var(--el-color-primary-light-9);
26
+ color: var(--el-color-primary);
27
+ border: 1px solid var(--el-color-primary-light-7);
28
+ }
29
+
30
+ &--status {
31
+ background-color: var(--el-color-warning-light-9);
32
+ color: var(--el-color-warning);
33
+ border: 1px solid var(--el-color-warning-light-7);
34
+ }
35
+ }
36
+
37
+ .only-required-check {
38
+ margin-left: 8px;
39
+ }
40
+ }
41
+
42
+ .page-toolbar {
43
+ margin-bottom: 12px;
44
+ }
@@ -1,43 +1,43 @@
1
- <template>
2
- <div class="app-container app-page-container" v-loading="loading">
3
- <div class="page-header">
4
- <span class="page-title">客户申请详情</span>
5
- <span class="page-tag page-tag--add">新增</span>
6
- <span class="page-tag page-tag--status">未审核</span>
7
- <el-checkbox v-model="onlyRequired" class="only-required-check">只看必填项</el-checkbox>
8
- </div>
9
- <div class="page-toolbar">
10
- <el-button type="danger" @click="handleSaveAndChange">保存并变更</el-button>
11
- <el-button type="warning" @click="handleSave">保存</el-button>
12
- <el-button type="primary" plain @click="handleChangeHistory">变更历史查询</el-button>
13
- <el-button @click="handleCancel">取消</el-button>
14
- </div>
15
- <c_customerTabs ref="tabsRef" mode="add" :only-required="onlyRequired" />
16
- </div>
17
- </template>
18
-
19
- <script setup lang="ts">
20
- import { useRoute } from "vue-router";
21
- import { useApplyAddForm } from "./data";
22
- import c_customerTabs from "@/components/local/c_customerTabs/index.vue";
23
-
24
- const tabsRef = ref();
25
- const route = useRoute();
26
- const onlyRequired = ref(false);
27
-
28
- const { loading, loadDetail, loadMockData, handleSave, handleSaveAndChange, handleChangeHistory, handleCancel } =
29
- useApplyAddForm(tabsRef);
30
-
31
- onMounted(() => {
32
- const id = route.query.id as string;
33
- if (id) {
34
- loadDetail(id);
35
- } else {
36
- loadMockData();
37
- }
38
- });
39
- </script>
40
-
41
- <style scoped lang="scss">
42
- @import "./index.scss";
43
- </style>
1
+ <template>
2
+ <div class="app-container app-page-container" v-loading="loading">
3
+ <div class="page-header">
4
+ <span class="page-title">客户申请详情</span>
5
+ <span class="page-tag page-tag--add">新增</span>
6
+ <span class="page-tag page-tag--status">未审核</span>
7
+ <el-checkbox v-model="onlyRequired" class="only-required-check">只看必填项</el-checkbox>
8
+ </div>
9
+ <div class="page-toolbar">
10
+ <el-button type="danger" @click="handleSaveAndChange">保存并变更</el-button>
11
+ <el-button type="warning" @click="handleSave">保存</el-button>
12
+ <el-button type="primary" plain @click="handleChangeHistory">变更历史查询</el-button>
13
+ <el-button @click="handleCancel">取消</el-button>
14
+ </div>
15
+ <c_customerTabs ref="tabsRef" mode="add" :only-required="onlyRequired" />
16
+ </div>
17
+ </template>
18
+
19
+ <script setup lang="ts">
20
+ import { useRoute } from "vue-router";
21
+ import { useApplyAddForm } from "./data";
22
+ import c_customerTabs from "@/components/local/c_customerTabs/index.vue";
23
+
24
+ const tabsRef = ref();
25
+ const route = useRoute();
26
+ const onlyRequired = ref(false);
27
+
28
+ const { loading, loadDetail, loadMockData, handleSave, handleSaveAndChange, handleChangeHistory, handleCancel } =
29
+ useApplyAddForm(tabsRef);
30
+
31
+ onMounted(() => {
32
+ const id = route.query.id as string;
33
+ if (id) {
34
+ loadDetail(id);
35
+ } else {
36
+ loadMockData();
37
+ }
38
+ });
39
+ </script>
40
+
41
+ <style scoped lang="scss">
42
+ @import "./index.scss";
43
+ </style>