create-jnrs-template-vue 1.1.5 → 1.1.7

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 (45) hide show
  1. package/jnrs-template-vue/.env.development +4 -5
  2. package/jnrs-template-vue/.env.production +1 -1
  3. package/jnrs-template-vue/.prettierrc.json +1 -1
  4. package/jnrs-template-vue/auto-imports.d.ts +1 -0
  5. package/jnrs-template-vue/components.d.ts +14 -0
  6. package/jnrs-template-vue/package.json +1 -1
  7. package/jnrs-template-vue/public/system/menu.json +27 -8
  8. package/jnrs-template-vue/src/App.vue +2 -2
  9. package/jnrs-template-vue/src/api/request.ts +4 -1
  10. package/jnrs-template-vue/src/api/{base → system}/index.ts +48 -20
  11. package/jnrs-template-vue/src/directives/permissions.ts +28 -0
  12. package/jnrs-template-vue/src/layout/RouterTabs.vue +1 -1
  13. package/jnrs-template-vue/src/layout/SideMenu.vue +2 -4
  14. package/jnrs-template-vue/src/layout/SideMenuItem.vue +1 -1
  15. package/jnrs-template-vue/src/layout/TopHeader.vue +20 -28
  16. package/jnrs-template-vue/src/layout/index.vue +35 -5
  17. package/jnrs-template-vue/src/locales/index.ts +10 -3
  18. package/jnrs-template-vue/src/main.ts +3 -2
  19. package/jnrs-template-vue/src/router/index.ts +41 -6
  20. package/jnrs-template-vue/src/router/routes.ts +28 -28
  21. package/jnrs-template-vue/src/stores/mock.ts +4 -2
  22. package/jnrs-template-vue/src/utils/permissions.ts +16 -0
  23. package/jnrs-template-vue/src/views/common/403.vue +5 -9
  24. package/jnrs-template-vue/src/views/common/404.vue +5 -9
  25. package/jnrs-template-vue/src/views/home/index.vue +54 -20
  26. package/jnrs-template-vue/src/views/login/index.vue +36 -20
  27. package/jnrs-template-vue/src/views/system/dict/index.vue +174 -0
  28. package/jnrs-template-vue/src/views/system/menu/index.vue +65 -0
  29. package/jnrs-template-vue/src/views/system/mine/baseInfo.vue +38 -30
  30. package/jnrs-template-vue/src/views/system/mine/securitySettings.vue +12 -20
  31. package/jnrs-template-vue/src/views/system/role/editDialog.vue +94 -0
  32. package/jnrs-template-vue/src/views/system/role/index.vue +45 -4
  33. package/jnrs-template-vue/vite.config.ts +2 -1
  34. package/jnrs-template-vue/viteMockServe/dictItemRes.json +27 -0
  35. package/jnrs-template-vue/viteMockServe/dictRes.json +141 -0
  36. package/jnrs-template-vue/viteMockServe/fail.ts +26 -0
  37. package/jnrs-template-vue/viteMockServe/index.ts +36 -27
  38. package/jnrs-template-vue/viteMockServe/{login.json → loginRes_admin.json} +4 -3
  39. package/jnrs-template-vue/viteMockServe/loginRes_user.json +713 -0
  40. package/jnrs-template-vue/viteMockServe/roleRes.json +37 -0
  41. package/jnrs-template-vue/viteMockServe/success.ts +31 -0
  42. package/package.json +1 -1
  43. package/jnrs-template-vue/.env.example +0 -14
  44. package/jnrs-template-vue/src/types/index.ts +0 -2
  45. package/jnrs-template-vue/src/views/system/user/index.vue +0 -9
@@ -1,41 +1,32 @@
1
1
  <script setup lang="ts">
2
- import { ref } from 'vue'
2
+ import { ref, onMounted } from 'vue'
3
+ import { storeToRefs } from 'pinia'
3
4
  import { ElMessage } from 'element-plus'
4
5
  import type { UploadProps } from 'element-plus'
5
6
  import { useAuthStore } from '@/stores'
6
7
  import { useAvatar } from '@/composables/common/useAvatar'
8
+ import { getOneDictList } from '@/utils/common'
9
+ import type { User } from '@jnrs/shared'
7
10
 
8
- const { userInfo, token } = useAuthStore()
11
+ const { userInfo, token } = storeToRefs(useAuthStore())
9
12
  const { avatar } = useAvatar()
10
13
  const loading = ref(false)
11
14
  const ruleFormRef = ref()
12
- const ruleForm = ref({
15
+ const ruleForm = ref<User>({
16
+ id: 0,
13
17
  account: '',
14
18
  name: '',
15
19
  workNo: '',
16
- jobTitle: '',
20
+ jobTitle: 0,
17
21
  workgroup: '',
18
- role: ''
22
+ role: 0,
23
+ avatarFileName: ''
19
24
  })
20
25
  const rules = ref({
21
26
  // account: { required: true, message: '请输入', trigger: 'change' },
22
27
  // role: { required: true, message: '请输入', trigger: 'change' },
23
28
  // name: { required: true, message: '请输入', trigger: 'change' },
24
29
  // workNo: { required: true, message: '请输入', trigger: 'change' },
25
- // email: [
26
- // { required: false, message: '请输入', trigger: 'change' },
27
- // {
28
- // validator: (rule, value, callback) => {
29
- // if (value && !isEmail(value)) {
30
- // callback(new Error('请输入有效的邮箱!'))
31
- // } else {
32
- // callback()
33
- // }
34
- // },
35
- // required: false,
36
- // trigger: 'blur'
37
- // }
38
- // ]
39
30
  })
40
31
 
41
32
  interface ApiResponse {
@@ -44,9 +35,15 @@ interface ApiResponse {
44
35
  data: string
45
36
  }
46
37
 
38
+ onMounted(() => {
39
+ if (userInfo.value) {
40
+ ruleForm.value = userInfo.value
41
+ }
42
+ })
43
+
47
44
  const handleAvatarSuccess: UploadProps['onSuccess'] = (response: ApiResponse) => {
48
45
  loading.value = false
49
- if (response.code === 0) {
46
+ if (userInfo.value && response.code === 0) {
50
47
  userInfo.value.avatarFileName = response.data
51
48
  ElMessage.success({ message: '头像上传成功' })
52
49
  }
@@ -69,28 +66,39 @@ const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile) => {
69
66
  </script>
70
67
 
71
68
  <template>
72
- <el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="auto">
69
+ <el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="auto" disabled>
73
70
  <el-form-item label="登录账号" prop="account">
74
- <el-input v-model.trim="ruleForm.account" style="width: 200px" disabled />
71
+ <el-input v-model.trim="ruleForm.account" style="width: 200px" />
75
72
  </el-form-item>
76
73
  <el-form-item label="名称" prop="name">
77
- <el-input v-model.trim="ruleForm.name" style="width: 200px" disabled />
74
+ <el-input v-model.trim="ruleForm.name" style="width: 200px" />
78
75
  </el-form-item>
79
76
  <el-form-item label="工号" prop="workNo">
80
- <el-input v-model.trim="ruleForm.workNo" style="width: 200px" disabled />
77
+ <el-input v-model.trim="ruleForm.workNo" style="width: 200px" />
81
78
  </el-form-item>
82
79
  <el-form-item label="职称" prop="jobTitle">
83
- <el-input v-model.trim="ruleForm.jobTitle" style="width: 200px" disabled />
80
+ <el-select v-model="ruleForm.jobTitle" placeholder="" style="width: 200px">
81
+ <el-option
82
+ :label="item.label"
83
+ :value="item.value"
84
+ v-for="(item, index) in getOneDictList('jobTitle')"
85
+ :key="index"
86
+ />
87
+ </el-select>
84
88
  </el-form-item>
85
89
  <el-form-item label="部门/班组" prop="workgroup">
86
- <el-input v-model.trim="ruleForm.workgroup" style="width: 200px" disabled />
90
+ <el-input v-model.trim="ruleForm.workgroup" style="width: 200px" />
87
91
  </el-form-item>
88
92
  <el-form-item label="职位/账号权限" prop="role">
89
- <el-input v-model.trim="ruleForm.role" style="width: 200px" disabled />
93
+ <el-select v-model="ruleForm.role" placeholder="" style="width: 200px">
94
+ <el-option
95
+ :label="item.label"
96
+ :value="item.value"
97
+ v-for="(item, index) in getOneDictList('role')"
98
+ :key="index"
99
+ />
100
+ </el-select>
90
101
  </el-form-item>
91
- <!-- <el-form-item label="邮箱" prop="email">
92
- <el-input v-model.trim="ruleForm.email" style="width: 200px" />
93
- </el-form-item> -->
94
102
  <el-form-item label="头像" prop="avatarFileName" class="uploader_item">
95
103
  <el-upload
96
104
  action="/api/user/avatar"
@@ -1,14 +1,14 @@
1
1
  <script setup lang="ts">
2
2
  import { reactive, ref } from 'vue'
3
- import { LoginApi, PasswordChangeApi } from '@/api/base'
3
+ import { PasswordChangeApi } from '@/api/system'
4
4
  import { useAuthStore } from '@/stores'
5
5
  import { handleRouter } from '@jnrs/vue-core/router'
6
6
  import { isWeakPwd } from '@jnrs/shared/validator'
7
7
  import type { FormInstance, FormItemRule } from 'element-plus'
8
8
  import { ElMessage } from 'element-plus'
9
- import { LogoutApi } from '@/api/base/index'
9
+ import { LogoutApi } from '@/api/system'
10
10
 
11
- const { userInfo, asyncClearAuth } = useAuthStore()
11
+ const { userInfo, clearAuth } = useAuthStore()
12
12
  const loading = ref(false)
13
13
  const formRef = ref<FormInstance>()
14
14
  const ruleForm = ref({
@@ -45,22 +45,16 @@ const submitForm = async (formEl: FormInstance | undefined) => {
45
45
  if (!formEl) return
46
46
  try {
47
47
  const valid = await formEl.validate()
48
- if (valid) {
48
+ if (valid && userInfo?.id) {
49
49
  loading.value = true
50
- const loginRes = await LoginApi({
51
- account: userInfo.account,
52
- password: ruleForm.value.originPassword
50
+ await PasswordChangeApi({
51
+ userId: userInfo.id,
52
+ password: ruleForm.value.password
53
53
  })
54
- if (loginRes.token) {
55
- await PasswordChangeApi({
56
- userId: userInfo.id,
57
- password: ruleForm.value.password
58
- })
59
- ElMessage.success('密码修改成功,请重新登录系统')
60
- await LogoutApi()
61
- await asyncClearAuth()
62
- handleRouter({ name: 'Login' }, 'replace')
63
- }
54
+ ElMessage.success('密码修改成功,请重新登录系统')
55
+ await LogoutApi()
56
+ await clearAuth()
57
+ handleRouter({ name: 'Login' }, 'replace')
64
58
  }
65
59
  } catch {
66
60
  } finally {
@@ -99,9 +93,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
99
93
  />
100
94
  </el-form-item>
101
95
  <el-form-item>
102
- <el-button class="form_submit" type="primary" @click="submitForm(formRef)">
103
- 保存修改
104
- </el-button>
96
+ <el-button class="form_submit" type="primary" @click="submitForm(formRef)">保存修改</el-button>
105
97
  </el-form-item>
106
98
  </el-form>
107
99
  </template>
@@ -0,0 +1,94 @@
1
+ <script setup lang="ts">
2
+ import type { FormInstance } from 'element-plus'
3
+ import { ref, nextTick } from 'vue'
4
+ defineOptions({
5
+ name: 'editDialog'
6
+ })
7
+
8
+ const loading = ref(false)
9
+ const dialogVisible = ref(false)
10
+ const ruleFormRef = ref<FormInstance>()
11
+ const ruleForm = ref({
12
+ id: '',
13
+ name: '',
14
+ enname: '',
15
+ remark: '',
16
+ usable: '1'
17
+ })
18
+ const rules = ref({
19
+ name: { required: true, message: '请输入角色名称', trigger: 'change' },
20
+ enname: { required: true, message: '请输入英文名称', trigger: 'change' },
21
+ usable: { required: true, message: '请选择是否可用', trigger: 'change' }
22
+ })
23
+
24
+ const toggleVisible = () => {
25
+ dialogVisible.value = !dialogVisible.value
26
+ nextTick(() => {
27
+ ruleFormRef.value?.resetFields()
28
+ })
29
+ }
30
+
31
+ const submitForm = () => {
32
+ if (!ruleFormRef.value) return
33
+ ruleFormRef.value.validate(async (valid) => {
34
+ if (!valid) return
35
+ })
36
+ }
37
+
38
+ defineExpose({
39
+ toggleVisible
40
+ })
41
+ </script>
42
+
43
+ <template>
44
+ <el-dialog
45
+ v-model="dialogVisible"
46
+ width="600"
47
+ :append-to-body="true"
48
+ :close-on-click-modal="true"
49
+ :close-on-press-escape="true"
50
+ >
51
+ <template #header>
52
+ <h3>{{ ruleForm.id ? '修改' : '添加' }}角色</h3>
53
+ </template>
54
+ <el-form
55
+ ref="ruleFormRef"
56
+ :model="ruleForm"
57
+ :rules="rules"
58
+ label-width="auto"
59
+ v-loading="loading"
60
+ style="width: 80%; margin: 0 auto"
61
+ >
62
+ <el-form-item prop="id" v-show="false">
63
+ <el-input v-model="ruleForm.id" />
64
+ </el-form-item>
65
+ <el-form-item label="角色名称" prop="name">
66
+ <el-input v-model="ruleForm.name" maxlength="20" />
67
+ </el-form-item>
68
+ <el-form-item label="英文名称" prop="enname">
69
+ <el-input v-model="ruleForm.enname" maxlength="20" />
70
+ </el-form-item>
71
+ <el-form-item label="说明" prop="remark">
72
+ <el-input v-model="ruleForm.remark" maxlength="200" type="textarea" :rows="5" />
73
+ </el-form-item>
74
+ <el-form-item label="是否可用" prop="usable">
75
+ <el-switch
76
+ v-model="ruleForm.usable"
77
+ inline-prompt
78
+ active-text="是"
79
+ inactive-text="否"
80
+ :active-value="true"
81
+ :inactive-value="false"
82
+ width="50"
83
+ style="--el-switch-on-color: #67c23a; --el-switch-off-color: #f56c6c"
84
+ />
85
+ </el-form-item>
86
+ </el-form>
87
+ <template #footer>
88
+ <div class="dialog-footer">
89
+ <el-button @click="toggleVisible()" :loading="loading">取消</el-button>
90
+ <el-button type="primary" @click="submitForm()" :loading="loading">提交</el-button>
91
+ </div>
92
+ </template>
93
+ </el-dialog>
94
+ </template>
@@ -1,9 +1,50 @@
1
1
  <script setup lang="ts">
2
- import { ref } from 'vue'
2
+ import { ref, onMounted } from 'vue'
3
+ import { RoleApi } from '@/api/system'
4
+
5
+ const loading = ref(false)
6
+ const tableData = ref()
7
+
8
+ const handleRoleApi = async () => {
9
+ try {
10
+ const res = await RoleApi()
11
+ tableData.value = res
12
+ } catch {}
13
+ }
14
+
15
+ onMounted(() => {
16
+ handleRoleApi()
17
+ })
3
18
  </script>
4
19
 
5
20
  <template>
6
- <div>role</div>
21
+ <div class="main">
22
+ <el-card shadow="never">
23
+ <template #header>
24
+ <div class="card_header">
25
+ <h3>角色管理</h3>
26
+ </div>
27
+ </template>
28
+ <el-table
29
+ class="el_table_role"
30
+ header-cell-class-name="tableData_header_cell"
31
+ :data="tableData"
32
+ scrollbar-always-on
33
+ border
34
+ v-loading="loading"
35
+ >
36
+ <el-table-column prop="label" label="角色名称" width="200" align="center" />
37
+ <el-table-column prop="value" label="值" width="200" align="center">
38
+ <template #default="{ row }">
39
+ {{ row.value + ' [' + typeof row.value + ']' }}
40
+ </template>
41
+ </el-table-column>
42
+ <el-table-column prop="permissions" label="可用权限" header-align="center">
43
+ <template #default="{ row }">
44
+ {{ row.permissions }}
45
+ </template>
46
+ </el-table-column>
47
+ </el-table>
48
+ </el-card>
49
+ </div>
7
50
  </template>
8
-
9
- <style lang="scss" scoped></style>
@@ -33,8 +33,9 @@ export default defineConfig({
33
33
  }),
34
34
  viteMockServe({
35
35
  mockPath: 'viteMockServe', // mock 文件目录
36
+ watchFiles: true, // mock 文件热更新
36
37
  enable: isMock, // 是否开启
37
- logger: isMock // 打印 mock 日志
38
+ logger: isMock // 是否在终端显示请求日志
38
39
  })
39
40
  ],
40
41
  resolve: {
@@ -0,0 +1,27 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "id": 7,
5
+ "value": 0,
6
+ "label": "未审批",
7
+ "displayColor": "#FEA822",
8
+ "sequence": 1
9
+ },
10
+ {
11
+ "id": 8,
12
+ "value": 1,
13
+ "label": "未通过",
14
+ "displayColor": "#E43634",
15
+ "sequence": 2
16
+ },
17
+ {
18
+ "id": 9,
19
+ "value": 2,
20
+ "label": "已通过",
21
+ "displayColor": "#65DC79",
22
+ "sequence": 3
23
+ }
24
+ ],
25
+ "code": 0,
26
+ "msg": "操作成功"
27
+ }
@@ -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,15 @@
1
- import loginRes from './login.json'
2
1
  import menuRes from '../public/system/menu.json'
3
-
4
- const res_success = {
5
- code: 0,
6
- msg: '操作成功'
7
- }
8
-
9
- const res_fail = {
10
- code: 1,
11
- msg: '操作失败'
12
- }
2
+ import successMock from './success'
3
+ import failMock from './fail'
4
+ import loginRes_admin from './loginRes_admin.json'
5
+ import loginRes_user from './loginRes_user.json'
6
+ import dictRes from './dictRes.json'
7
+ import dictItemRes from './dictItemRes.json'
8
+ import roleRes from './roleRes.json'
13
9
 
14
10
  export default [
11
+ ...successMock,
12
+ ...failMock,
15
13
  // 获取菜单
16
14
  {
17
15
  url: '/mock/menu',
@@ -20,39 +18,50 @@ export default [
20
18
  return menuRes
21
19
  }
22
20
  },
23
- // 模拟登录
21
+ // 登录
24
22
  {
25
23
  url: '/mock/api/auth/login',
26
24
  method: 'post',
27
- response: () => {
28
- return loginRes
25
+ response: ({ body }) => {
26
+ if (body.account === 'admin') {
27
+ return loginRes_admin
28
+ }
29
+ return loginRes_user
30
+ }
31
+ },
32
+ // 获取个人信息
33
+ {
34
+ url: '/mock/api/auth/user-info',
35
+ method: 'get',
36
+ response: ({ headers }) => {
37
+ if (headers.authorization.includes('admin')) {
38
+ return loginRes_admin
39
+ }
40
+ return loginRes_user
29
41
  }
30
42
  },
31
- // 模拟退出登录
43
+ // 获取字典
32
44
  {
33
- url: '/mock/api/auth/logout',
45
+ url: '/mock/api/dict-manager',
34
46
  method: 'get',
35
47
  response: () => {
36
- return res_success
48
+ return dictRes
37
49
  }
38
50
  },
39
- // 模拟获取个人信息
51
+ // 获取单个字典
40
52
  {
41
- url: '/mock/api/auth/user-info',
53
+ url: /\/mock\/api\/dict-manager\/detail\/\d+/,
42
54
  method: 'get',
43
55
  response: () => {
44
- return loginRes
56
+ return dictItemRes
45
57
  }
46
58
  },
47
- // 模拟权限不足
59
+ // 获取角色
48
60
  {
49
- url: '/mock/auth/no',
50
- method: 'post',
61
+ url: '/mock/api/role-manager',
62
+ method: 'get',
51
63
  response: () => {
52
- return {
53
- code: 3,
54
- msg: '暂无权限'
55
- }
64
+ return roleRes
56
65
  }
57
66
  }
58
67
  ]
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "data": {
3
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
3
+ "token": "***admin***token***",
4
4
  "id": 1,
5
5
  "name": "管理员",
6
6
  "workNo": "000000",
7
- "avatarFilenName": "20251014181230905-b2bd246f-4174-4804-8122-37c826c56a7d.png",
7
+ "avatarFileName": "20251014181230905-b2bd246f-4174-4804-8122-37c826c56a7d.png",
8
8
  "workgroup": null,
9
- "jobTitle": 0,
9
+ "jobTitle": 1,
10
10
  "role": 6,
11
+ "permissions": [],
11
12
  "abilityCoefficient": 0.0,
12
13
  "dict": {
13
14
  "defectiveWorkHourStatus": [