create-jnrs-vue 1.2.33 → 1.2.34

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/README.md CHANGED
@@ -1,13 +1,17 @@
1
1
  # create-jnrs-vue
2
2
 
3
3
  ## ✨ 介绍
4
+
4
5
  巨能前端工程化开发,Vue 项目模板脚手架
5
6
 
6
7
  ## 💻 技术栈
8
+
7
9
  TypeScript、Vue3 生态
8
10
 
9
11
  ## 🧩 安装使用说明
12
+
10
13
  新项目默认名称为 jnrs-vue
14
+
11
15
  ```shell
12
16
  # ✅ 正确用法
13
17
  # 创建新项目
@@ -27,9 +31,23 @@ pnpm build
27
31
  pnpm add create-jnrs-vue
28
32
  ```
29
33
 
34
+ ## 🤖 AI Agent 使用说明
35
+
36
+ - 前置准备
37
+ - 将业务功能原型图作为生成前端代码的参考图
38
+ - 从 api 工具(如 ApiFox) 中导出 openapi 文档,或接入其提供的 MCP 服务
39
+ - 使用 AI Agent 读取并分析当前 `README.md` 文件及 `/agentic/RULES_BASE.md` 文件并作为 IDE AI Agent 的记忆
40
+ - 预置提示词
41
+ - 保存记忆:`读取并分析当前 README.md 文件及 /agentic/RULES_BASE.md 文件并作为 IDE AI Agent 的记忆`
42
+ - 生成菜单:`根据提供的菜单原型图,生成菜单`
43
+ - 生成服务文件:`根据提供的 openapi 文档或 MCP 服务,生成API 服务文件`
44
+ - 生成增删改查页面文件:`根据提供的界面原型图,生成增删改查页面文件`
45
+
30
46
  ## 📂 模板项目主要结构
47
+
31
48
  ```Text
32
49
  jnrs-vue/
50
+ ├── agentic/ # AI Agent 规则与提示词
33
51
  ├── viteMockServe/ # Mock 服务配置
34
52
  ├── public/ # 静态资源
35
53
  ├── src/ # 源码目录
@@ -58,5 +76,3 @@ jnrs-vue/
58
76
  ├── .prettierrc.json # Prettier 格式化配置
59
77
  ├── .cspell.json # Cspell 拼写检查
60
78
  ```
61
-
62
-
@@ -6,13 +6,13 @@
6
6
 
7
7
  作用:作为上下文权重数组的索引表,基于权重数据来决定下列文件作为上下文的相关性,权重值区间:[-1, 1]。
8
8
 
9
- | 特征文件路径 | 特征描述 | 特征索引 |
10
- | --------------------------------------------------------------------------- | ---------------------------------------------------------------- | -------- |
11
- | /agentic/RULES_BASE.md | 基础规则 | 0 |
12
- | /agentic/RULES_DEPENDENCIES.md | 工程外部依赖包提供的能力 | 1 |
13
- | /agentic/RULES_COMMON.md | 工程内部提供的通用能力 | 2 |
14
- | /src/views/agentic/crud/index.vue 和 /src/views/agentic/crud/EditDialog.vue | 具体的业务功能:数据列表页、新增&修改弹窗面 | 3 |
15
- | /src/api/agentic/project.ts | API 服务文件(Service Layer),即具体的业务功能 API 函数及类型系统 | 4 |
9
+ | 特征文件路径 | 特征描述 | 特征索引 |
10
+ | ----------------------------------------------------------------------- | ---------------------------------------------------------------- | -------- |
11
+ | /agentic/RULES_BASE.md | 基础规则 | 0 |
12
+ | /agentic/RULES_DEPENDENCIES.md | 工程外部依赖包提供的能力 | 1 |
13
+ | /agentic/RULES_COMMON.md | 工程内部提供的通用能力 | 2 |
14
+ | /src/views/demos/crud/index.vue 和 /src/views/demos/crud/EditDialog.vue | 具体的业务功能:数据列表页、新增&修改弹窗面 | 3 |
15
+ | /src/api/demos/project.ts | API 服务文件(Service Layer),即具体的业务功能 API 函数及类型系统 | 4 |
16
16
 
17
17
  ## 通用规则约束
18
18
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jnrs-vue",
3
- "version": "1.2.33",
3
+ "version": "1.2.34",
4
4
  "description": "JNRS 信息化管理系统",
5
5
  "author": "talia_tan",
6
6
  "private": true,
@@ -19,9 +19,9 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@element-plus/icons-vue": "^2.3.2",
22
- "@jnrs/lingshu-smart": "2.2.19",
23
- "@jnrs/shared": "1.1.24",
24
- "@jnrs/vue-core": "1.2.17",
22
+ "@jnrs/lingshu-smart": "2.2.20",
23
+ "@jnrs/shared": "1.1.25",
24
+ "@jnrs/vue-core": "1.2.18",
25
25
  "@vueuse/core": "^14.1.0",
26
26
  "element-plus": "^2.13.3",
27
27
  "pinia": "^3.0.4",
@@ -6,115 +6,33 @@
6
6
  "meta": {
7
7
  "title": "面向智能体开发",
8
8
  "icon": "ChatDotRound",
9
- "todoCount":2
10
- },
11
- "children": [
12
- {
13
- "path": "/agenticCrud",
14
- "name": "agenticCrud",
15
- "meta": {
16
- "title": "项目管理",
17
- "todoCount": 0
18
- },
19
- "component": "/agentic/crud/index"
20
- }]
21
- },
22
- {
23
- "meta": {
24
- "title": "功能演示",
25
- "icon": "StarFilled",
26
- "todoCount": 4
9
+ "todoCount": 2
27
10
  },
28
11
  "children": [
29
12
  {
30
- "path": "/unitTest",
31
- "name": "unitTest",
13
+ "path": "/playground",
14
+ "name": "playground",
32
15
  "meta": {
33
16
  "title": "基础功能测试",
34
17
  "todoCount": 8
35
18
  },
36
- "component": "/demos/unitTest/index"
37
- },
38
- {
39
- "path": "/simpleTable",
40
- "name": "simpleTable",
41
- "meta": {
42
- "title": "智能体表格模板",
43
- "todoCount": 0
44
- },
45
- "component": "/demos/agenticTable/index"
46
- },
47
- {
48
- "path": "/simpleTable",
49
- "name": "simpleTableData",
50
- "meta": {
51
- "title": "简单数据表格模板",
52
- "todoCount": 0
53
- },
54
- "component": "/demos/simpleTable/index"
55
- },
56
- {
57
- "path": "/compositionTable",
58
- "name": "compositionTable",
59
- "meta": {
60
- "title": "简单数据表格 - 组合式",
61
- "todoCount": 0
62
- },
63
- "component": "/demos/compositionTable/index"
64
- },
65
- {
66
- "path": "/crud",
67
- "name": "crud",
68
- "meta": {
69
- "title": "完整增删改查模板",
70
- "todoCount": 0
71
- },
72
- "component": "/demos/crud/index"
19
+ "component": "/demos/playground/index"
73
20
  },
74
21
  {
75
- "path": "/compositionCrud",
76
- "name": "compositionCrud",
22
+ "path": "/agenticCrud",
23
+ "name": "agenticCrud",
77
24
  "meta": {
78
- "title": "完整增删改查 - 组合式",
25
+ "title": "项目管理",
79
26
  "todoCount": 0
80
27
  },
81
- "component": "/demos/compositionCrud/index"
82
- },
83
- {
84
- "path": "/testRedirect",
85
- "name": "testRedirect",
86
- "meta": {
87
- "title": "重定向测试"
88
- },
89
- "redirect": "/crud"
90
- },
91
- {
92
- "path": "/testAlias",
93
- "name": "testAlias",
94
- "meta": {
95
- "title": "相同component不同path",
96
- "testId": 1
97
- },
98
28
  "component": "/demos/crud/index"
99
29
  }
100
30
  ]
101
31
  },
102
- {
103
- "path": "/visual",
104
- "name": "visual",
105
- "meta": {
106
- "title": "可视化看板",
107
- "icon": "Platform",
108
- "noAuth": true,
109
- "global": true
110
- },
111
- "component": "/visual/index"
112
- },
113
32
  {
114
33
  "meta": {
115
34
  "title": "灵枢智造系统",
116
- "icon": "Promotion",
117
- "todoCount": 2
35
+ "icon": "Promotion"
118
36
  },
119
37
  "children": [
120
38
  {
@@ -141,11 +59,21 @@
141
59
  }
142
60
  ]
143
61
  },
62
+ {
63
+ "path": "/visual",
64
+ "name": "visual",
65
+ "meta": {
66
+ "title": "通用可视化看板",
67
+ "icon": "Platform",
68
+ "noAuth": true,
69
+ "global": true
70
+ },
71
+ "component": "/visual/index"
72
+ },
144
73
  {
145
74
  "meta": {
146
75
  "title": "系统管理",
147
- "icon": "Tools",
148
- "todoCount": 99
76
+ "icon": "Tools"
149
77
  },
150
78
  "children": [
151
79
  {
@@ -153,7 +81,6 @@
153
81
  "name": "systemMine",
154
82
  "meta": {
155
83
  "title": "个人中心",
156
- "todoCount": 999,
157
84
  "permissions": ["mine:view", "mine:edit"]
158
85
  },
159
86
  "component": "/system/mine/index"
@@ -163,7 +90,6 @@
163
90
  "name": "systemUser",
164
91
  "meta": {
165
92
  "title": "用户管理",
166
- "todoCount": 0,
167
93
  "permissions": ["user:view", "user:edit"]
168
94
  },
169
95
  "component": "/system/user/index"
@@ -178,3 +178,35 @@ export const exportProjectApi = (data: Record<string, unknown>): Promise<Blob> =
178
178
  data
179
179
  })
180
180
  }
181
+
182
+ /**
183
+ * 测试 404 错误
184
+ */
185
+ export const NotFoundApi = () => {
186
+ return axiosRequest({
187
+ url: '/notFound',
188
+ method: 'get'
189
+ })
190
+ }
191
+
192
+ /**
193
+ * 测试 不需要权限
194
+ */
195
+ export const NoNeedAuthApi = () => {
196
+ return axiosRequest({
197
+ url: '/auth/no',
198
+ method: 'post',
199
+ noAuth: true // 是否需要权限,默认为 false
200
+ })
201
+ }
202
+
203
+ /**
204
+ * 测试 无权限
205
+ */
206
+ export const NoAuthApi = (showErrorMsg: boolean) => {
207
+ return axiosRequest({
208
+ url: '/auth/no',
209
+ method: 'post',
210
+ showErrorMsg // 是否显示错误信息,默认为 true
211
+ })
212
+ }
@@ -7,7 +7,7 @@
7
7
  -->
8
8
 
9
9
  <script setup lang="ts">
10
- import { ManagerListApi } from '@/api/agentic/manager'
10
+ import { ManagerListApi } from '@/api/demos/manager'
11
11
  import { JnSelectTemplate } from '@jnrs/vue-core/components'
12
12
  </script>
13
13
 
@@ -9,12 +9,12 @@
9
9
 
10
10
  <script setup lang="ts">
11
11
  import type { FormInstance, FormRules } from 'element-plus'
12
- import type { Project, AddProject, UpdateProject } from '@/api/agentic/project'
12
+ import type { Project, AddProject, UpdateProject } from '@/api/demos/project'
13
13
  import { ref, nextTick } from 'vue'
14
14
  import { ElMessage } from 'element-plus'
15
15
  import { objectMatchAssign, verifyNumberGtZero } from '@jnrs/shared'
16
16
  import { getDictList, downloadFile, extractFieldId } from '@/utils'
17
- import { addProjectApi, editProjectApi } from '@/api/agentic/project'
17
+ import { addProjectApi, editProjectApi } from '@/api/demos/project'
18
18
  import { JnDialog, JnFileUpload } from '@jnrs/vue-core/components'
19
19
  import SelectManager from '@/components/select/SelectManager.vue'
20
20