1
This commit is contained in:
57
admin/src/router/component-map.js
Normal file
57
admin/src/router/component-map.js
Normal file
@@ -0,0 +1,57 @@
|
||||
// 组件映射表 - 将后端返回的组件路径映射到实际的 Vue 组件
|
||||
// 后端返回的 component 字段需要与这里的 key 对应
|
||||
|
||||
// 导入所有页面组件
|
||||
// 工作管理模块 - 这两个文件在 work/ 和 job/ 两个目录都存在,优先使用 work/
|
||||
import ApplyRecords from '@/views/work/apply_records.vue'
|
||||
import JobPostings from '@/views/work/job_postings.vue'
|
||||
// 账号简历模块
|
||||
import PlaAccount from '@/views/account/pla_account.vue'
|
||||
import PlaAccountDetail from '@/views/account/pla_account_detail.vue'
|
||||
import ResumeInfo from '@/views/account/resume_info.vue'
|
||||
|
||||
|
||||
|
||||
// 任务聊天模块
|
||||
import ChatRecords from '@/views/chat/chat_records.vue'
|
||||
import ChatList from '@/views/chat/chat_list.vue'
|
||||
import TaskStatus from '@/views/task/task_status.vue'
|
||||
|
||||
// 系统设置模块
|
||||
import SystemConfig from '@/views/system/system_config.vue'
|
||||
import JobTypes from '@/views/work/job_types.vue'
|
||||
|
||||
// 首页模块
|
||||
import HomeIndex from '@/views/home/index.vue'
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 组件映射对象
|
||||
* key: 后端返回的组件路径(去掉 .vue 后缀或保留都可以)
|
||||
* value: 实际的 Vue 组件
|
||||
*/
|
||||
const componentMap = {
|
||||
// 工作管理模块
|
||||
'work/apply_records': ApplyRecords,
|
||||
'work/job_postings': JobPostings,
|
||||
|
||||
// 账号简历模块
|
||||
'account/pla_account': PlaAccount,
|
||||
'account/pla_account_detail': PlaAccountDetail,
|
||||
'account/resume_info': ResumeInfo,
|
||||
|
||||
|
||||
// 任务聊天模块
|
||||
'task/chat_records': ChatList, // 使用聊天列表组件
|
||||
'chat/chat_list': ChatList,
|
||||
'task/task_status': TaskStatus,
|
||||
|
||||
// 系统设置模块
|
||||
'system/system_config': SystemConfig,
|
||||
'work/job_types': JobTypes,
|
||||
'home/index': HomeIndex,
|
||||
}
|
||||
|
||||
export default componentMap
|
||||
|
||||
Reference in New Issue
Block a user