create-jnrs-template-vue 1.1.5 → 1.1.6

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 (34) hide show
  1. package/jnrs-template-vue/.prettierrc.json +1 -1
  2. package/jnrs-template-vue/auto-imports.d.ts +1 -0
  3. package/jnrs-template-vue/components.d.ts +10 -0
  4. package/jnrs-template-vue/package.json +1 -1
  5. package/jnrs-template-vue/public/system/menu.json +29 -9
  6. package/jnrs-template-vue/src/App.vue +2 -2
  7. package/jnrs-template-vue/src/api/{base → system}/index.ts +30 -6
  8. package/jnrs-template-vue/src/layout/RouterTabs.vue +1 -1
  9. package/jnrs-template-vue/src/layout/SideMenuItem.vue +1 -1
  10. package/jnrs-template-vue/src/layout/TopHeader.vue +11 -23
  11. package/jnrs-template-vue/src/layout/index.vue +35 -5
  12. package/jnrs-template-vue/src/main.ts +0 -2
  13. package/jnrs-template-vue/src/router/index.ts +10 -4
  14. package/jnrs-template-vue/src/types/index.d.ts +6 -0
  15. package/jnrs-template-vue/src/views/common/403.vue +2 -2
  16. package/jnrs-template-vue/src/views/common/404.vue +2 -2
  17. package/jnrs-template-vue/src/views/home/index.vue +2 -2
  18. package/jnrs-template-vue/src/views/login/index.vue +12 -17
  19. package/jnrs-template-vue/src/views/system/dict/index.vue +176 -0
  20. package/jnrs-template-vue/src/views/system/menu/index.vue +67 -0
  21. package/jnrs-template-vue/src/views/system/mine/baseInfo.vue +38 -30
  22. package/jnrs-template-vue/src/views/system/mine/securitySettings.vue +11 -19
  23. package/jnrs-template-vue/src/views/system/role/editDialog.vue +94 -0
  24. package/jnrs-template-vue/src/views/system/role/index.vue +30 -3
  25. package/jnrs-template-vue/vite.config.ts +2 -1
  26. package/jnrs-template-vue/viteMockServe/dictItemRes.json +27 -0
  27. package/jnrs-template-vue/viteMockServe/dictRes.json +141 -0
  28. package/jnrs-template-vue/viteMockServe/fail.ts +26 -0
  29. package/jnrs-template-vue/viteMockServe/index.ts +18 -25
  30. package/jnrs-template-vue/viteMockServe/{login.json → loginRes.json} +1 -0
  31. package/jnrs-template-vue/viteMockServe/success.ts +31 -0
  32. package/package.json +1 -1
  33. package/jnrs-template-vue/src/types/index.ts +0 -2
  34. package/jnrs-template-vue/src/views/system/user/index.vue +0 -9
@@ -0,0 +1,141 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "id": 1,
5
+ "dictName": "defectiveWorkHourStatus",
6
+ "describe": null
7
+ },
8
+ {
9
+ "id": 2,
10
+ "dictName": "factoryManagerDefectiveWorkHourReviewStatus",
11
+ "describe": null
12
+ },
13
+ {
14
+ "id": 3,
15
+ "dictName": "productionDepartmentDefectiveWorkHourReviewStatus",
16
+ "describe": null
17
+ },
18
+ {
19
+ "id": 4,
20
+ "dictName": "workHourType",
21
+ "describe": null
22
+ },
23
+ {
24
+ "id": 5,
25
+ "dictName": "workHourStatue",
26
+ "describe": null
27
+ },
28
+ {
29
+ "id": 6,
30
+ "dictName": "assignmentStatus",
31
+ "describe": null
32
+ },
33
+ {
34
+ "id": 7,
35
+ "dictName": "planExecutionStatus",
36
+ "describe": null
37
+ },
38
+ {
39
+ "id": 8,
40
+ "dictName": "jobTitle",
41
+ "describe": null
42
+ },
43
+ {
44
+ "id": 9,
45
+ "dictName": "userLogType",
46
+ "describe": null
47
+ },
48
+ {
49
+ "id": 10,
50
+ "dictName": "rectificationNoticeStatus",
51
+ "describe": null
52
+ },
53
+ {
54
+ "id": 11,
55
+ "dictName": "attendanceStatus",
56
+ "describe": null
57
+ },
58
+ {
59
+ "id": 12,
60
+ "dictName": "weekday",
61
+ "describe": null
62
+ },
63
+ {
64
+ "id": 13,
65
+ "dictName": "factoryManagerWorkHourReduceApplicationReviewStatus",
66
+ "describe": null
67
+ },
68
+ {
69
+ "id": 14,
70
+ "dictName": "productionDepartmentWorkHourReduceApplicationReviewStatus",
71
+ "describe": null
72
+ },
73
+ {
74
+ "id": 15,
75
+ "dictName": "role",
76
+ "describe": null
77
+ },
78
+ {
79
+ "id": 16,
80
+ "dictName": "attendanceRequestStatus",
81
+ "describe": null
82
+ },
83
+ {
84
+ "id": 17,
85
+ "dictName": "abilityCoefficientFilter",
86
+ "describe": null
87
+ },
88
+ {
89
+ "id": 18,
90
+ "dictName": "groupRemainWorkHourFilterType",
91
+ "describe": null
92
+ },
93
+ {
94
+ "id": 19,
95
+ "dictName": "workHourReduceApplicationStatus",
96
+ "describe": null
97
+ },
98
+ {
99
+ "id": 20,
100
+ "dictName": "workHourModifyApplicationReviewStatus",
101
+ "describe": null
102
+ },
103
+ {
104
+ "id": 21,
105
+ "dictName": "firstThenReviewStatus",
106
+ "describe": null
107
+ },
108
+ {
109
+ "id": 22,
110
+ "dictName": "planExecutionDateFilter",
111
+ "describe": null
112
+ },
113
+ {
114
+ "id": 23,
115
+ "dictName": "overtimeWorkHourFilter",
116
+ "describe": null
117
+ },
118
+ {
119
+ "id": 24,
120
+ "dictName": "statisticWorkHourUserDataOrderByType",
121
+ "describe": null
122
+ },
123
+ {
124
+ "id": 25,
125
+ "dictName": "jobStatus",
126
+ "describe": null
127
+ },
128
+ {
129
+ "id": 26,
130
+ "dictName": "reviewType",
131
+ "describe": null
132
+ },
133
+ {
134
+ "id": 27,
135
+ "dictName": "rectificationNoticeTaskStatus",
136
+ "describe": null
137
+ }
138
+ ],
139
+ "code": 0,
140
+ "msg": "操作成功"
141
+ }
@@ -0,0 +1,26 @@
1
+ const res_fail = {
2
+ code: 1,
3
+ msg: '操作失败'
4
+ }
5
+
6
+ export default [
7
+ // 权限不足
8
+ {
9
+ url: '/mock/auth/no',
10
+ method: 'post',
11
+ response: () => {
12
+ return {
13
+ code: 3,
14
+ msg: '暂无权限'
15
+ }
16
+ }
17
+ },
18
+ // 操作失败
19
+ {
20
+ url: '/mock/auth/fail',
21
+ method: 'post',
22
+ response: () => {
23
+ return res_fail
24
+ }
25
+ }
26
+ ]
@@ -1,17 +1,13 @@
1
- import loginRes from './login.json'
1
+ import successMock from './success'
2
+ import failMock from './fail'
3
+ import loginRes from './loginRes.json'
4
+ import dictRes from './dictRes.json'
5
+ import dictItemRes from './dictItemRes.json'
2
6
  import menuRes from '../public/system/menu.json'
3
7
 
4
- const res_success = {
5
- code: 0,
6
- msg: '操作成功'
7
- }
8
-
9
- const res_fail = {
10
- code: 1,
11
- msg: '操作失败'
12
- }
13
-
14
8
  export default [
9
+ ...successMock,
10
+ ...failMock,
15
11
  // 获取菜单
16
12
  {
17
13
  url: '/mock/menu',
@@ -20,7 +16,7 @@ export default [
20
16
  return menuRes
21
17
  }
22
18
  },
23
- // 模拟登录
19
+ // 登录
24
20
  {
25
21
  url: '/mock/api/auth/login',
26
22
  method: 'post',
@@ -28,31 +24,28 @@ export default [
28
24
  return loginRes
29
25
  }
30
26
  },
31
- // 模拟退出登录
27
+ // 获取个人信息
32
28
  {
33
- url: '/mock/api/auth/logout',
29
+ url: '/mock/api/auth/user-info',
34
30
  method: 'get',
35
31
  response: () => {
36
- return res_success
32
+ return loginRes
37
33
  }
38
34
  },
39
- // 模拟获取个人信息
35
+ // 获取字典
40
36
  {
41
- url: '/mock/api/auth/user-info',
37
+ url: '/mock/api/dict-manager',
42
38
  method: 'get',
43
39
  response: () => {
44
- return loginRes
40
+ return dictRes
45
41
  }
46
42
  },
47
- // 模拟权限不足
43
+ // 获取单个字典
48
44
  {
49
- url: '/mock/auth/no',
50
- method: 'post',
45
+ url: /\/mock\/api\/dict-manager\/detail\/\d+/,
46
+ method: 'get',
51
47
  response: () => {
52
- return {
53
- code: 3,
54
- msg: '暂无权限'
55
- }
48
+ return dictItemRes
56
49
  }
57
50
  }
58
51
  ]
@@ -8,6 +8,7 @@
8
8
  "workgroup": null,
9
9
  "jobTitle": 0,
10
10
  "role": 6,
11
+ "permissions": ["system:view", "mine:view", "mine:edit"],
11
12
  "abilityCoefficient": 0.0,
12
13
  "dict": {
13
14
  "defectiveWorkHourStatus": [
@@ -0,0 +1,31 @@
1
+ const res_success = {
2
+ code: 0,
3
+ msg: '操作成功'
4
+ }
5
+
6
+ export default [
7
+ // 退出登录
8
+ {
9
+ url: '/mock/api/auth/logout',
10
+ method: 'get',
11
+ response: () => {
12
+ return res_success
13
+ }
14
+ },
15
+ // 修改密码
16
+ {
17
+ url: '/mock/api/auth/change-password',
18
+ method: 'post',
19
+ response: () => {
20
+ return res_success
21
+ }
22
+ },
23
+ // 修改单个字典
24
+ {
25
+ url: '/mock/api/dict-manager/detail',
26
+ method: 'post',
27
+ response: () => {
28
+ return res_success
29
+ }
30
+ }
31
+ ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-jnrs-template-vue",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "巨能前端工程化开发,Vue 项目模板脚手架",
5
5
  "keywords": [
6
6
  "vue",
@@ -1,2 +0,0 @@
1
- export type * from '@jnrs/shared'
2
- export type * from '@jnrs/vue-core'
@@ -1,9 +0,0 @@
1
- <script setup lang="ts">
2
- import { ref } from 'vue'
3
- </script>
4
-
5
- <template>
6
- <div>user</div>
7
- </template>
8
-
9
- <style lang="scss" scoped></style>