From 031e016105499ebd270eabdb15c64ea48cb1600d Mon Sep 17 00:00:00 2001 From: 18571350067 Date: Tue, 24 Aug 2021 17:37:44 +0800 Subject: [PATCH 01/20] 1111 --- src/api/course/course.js | 53 ++++++ src/config/router.config.js | 111 ++++++++----- src/views/course/CourseList.vue | 286 ++++++++++++++++++++++++++++++++ 3 files changed, 408 insertions(+), 42 deletions(-) create mode 100644 src/api/course/course.js create mode 100644 src/views/course/CourseList.vue diff --git a/src/api/course/course.js b/src/api/course/course.js new file mode 100644 index 0000000..161d7ed --- /dev/null +++ b/src/api/course/course.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +const projectApi = { +// add: 'sys/menu/add', +// get: 'sys/menu/get', +// update: 'sys/menu/update', +// del: 'sys/menu/delete', +// updateStatus: 'sys/menu/updateStatus', + list: 'course/pageList' +} + +// export function menuAdd (params) { +// return request({ +// url: menuApi.add, +// method: 'post', +// data: params +// }) +// } +// export function menuGet (params) { +// return request({ +// url: menuApi.get, +// method: 'post', +// data: params +// }) +// } +// export function menuUpdate (params) { +// return request({ +// url: menuApi.update, +// method: 'post', +// data: params +// }) +// } +// export function menuDelete (params) { +// return request({ +// url: menuApi.del, +// method: 'post', +// data: params +// }) +// } +export function getCourseList (params) { + return request({ + url: courseApi.list, + method: 'get', + params: params + }) +} +// export function menuUpdateStatus (params) { +// return request({ +// url: menuApi.updateStatus, +// method: 'post', +// data: params +// }) +// } diff --git a/src/config/router.config.js b/src/config/router.config.js index 056420c..43424b5 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -21,13 +21,13 @@ export const asyncRouterMap = [ name: 'dashboard', redirect: '/dashboard/workplace', component: RouteView, - meta: { title: 'menu.dashboard', keepAlive: true, icon: bxAnaalyse, permission: [ 'dashboard' ] }, + meta: { title: 'menu.dashboard', keepAlive: true, icon: bxAnaalyse, permission: ['dashboard'] }, children: [ { path: '/dashboard/workplace', name: 'Workplace', component: () => import('@/views/dashboard/Workplace'), - meta: { title: 'menu.dashboard.workplace', keepAlive: true, permission: [ 'dashboard' ] } + meta: { title: 'menu.dashboard.workplace', keepAlive: true, permission: ['dashboard'] } } ] }, @@ -37,13 +37,13 @@ export const asyncRouterMap = [ name: 'security', redirect: '/security/user', component: RouteView, - meta: { title: '系统设置', keepAlive: true, icon: bxAnaalyse, permission: [ 'security' ] }, + meta: { title: '系统设置', keepAlive: true, icon: bxAnaalyse, permission: ['security'] }, children: [ { path: '/security/user', name: 'SecurityUser', component: () => import('@/views/security/user/UserList'), - meta: { title: '用户管理', keepAlive: true, permission: [ 'security' ] } + meta: { title: '用户管理', keepAlive: true, permission: ['security'] } }, { path: '/security/role', @@ -76,25 +76,52 @@ export const asyncRouterMap = [ path: '/project', redirect: '/project/projectList', component: RouteView, - meta: { title: '项目管理', icon: bxAnaalyse, permission: [ 'from' ] }, + meta: { title: '项目管理', icon: bxAnaalyse, permission: ['from'] }, children: [ { path: '/project/projectList', name: 'projectList', component: () => import('@/views/project/ProjectList'), - meta: { title: '自主项目', keepAlive: true, permission: [ 'form' ] } + meta: { title: '自主项目', keepAlive: true, permission: ['form'] } }, { path: '/form/step-form', name: 'StepForm', component: () => import('@/views/form/stepForm/StepForm'), - meta: { title: '系统推荐', keepAlive: true, permission: [ 'form' ] } + meta: { title: '系统推荐', keepAlive: true, permission: ['form'] } }, { path: '/form/advanced-form', name: 'AdvanceForm', component: () => import('@/views/form/advancedForm/AdvancedForm'), - meta: { title: '终端培训', keepAlive: true, permission: [ 'form' ] } + meta: { title: '终端培训', keepAlive: true, permission: ['form'] } + } + ] + }, + // 课程管理 + { + path: '/course', + redirect: '/course/courseList', + component: RouteView, + meta: { title: '课程管理', icon: bxAnaalyse, permission: ['from'] }, + children: [ + { + path: '/course/courseList', + name: 'courseList', + component: () => import('@/views/course/CourseList'), + meta: { title: '课程项目', keepAlive: true, permission: ['form'] } + }, + { + path: '/form/step-form', + name: 'StepForm', + component: () => import('@/views/form/stepForm/StepForm'), + meta: { title: '系统推荐', keepAlive: true, permission: ['form'] } + }, + { + path: '/form/advanced-form', + name: 'AdvanceForm', + component: () => import('@/views/form/advancedForm/AdvancedForm'), + meta: { title: '终端培训', keepAlive: true, permission: ['form'] } } ] }, @@ -103,25 +130,25 @@ export const asyncRouterMap = [ path: '/form', redirect: '/form/base-form', component: RouteView, - meta: { title: '表单页', icon: 'form', permission: [ 'form' ] }, + meta: { title: '表单页', icon: 'form', permission: ['form'] }, children: [ { path: '/form/base-form', name: 'BaseForm', component: () => import('@/views/form/basicForm/Index'), - meta: { title: '基础表单', keepAlive: true, permission: [ 'form' ] } + meta: { title: '基础表单', keepAlive: true, permission: ['form'] } }, { path: '/form/step-form', name: 'StepForm', component: () => import('@/views/form/stepForm/StepForm'), - meta: { title: '分步表单', keepAlive: true, permission: [ 'form' ] } + meta: { title: '分步表单', keepAlive: true, permission: ['form'] } }, { path: '/form/advanced-form', name: 'AdvanceForm', component: () => import('@/views/form/advancedForm/AdvancedForm'), - meta: { title: '高级表单', keepAlive: true, permission: [ 'form' ] } + meta: { title: '高级表单', keepAlive: true, permission: ['form'] } } ] }, @@ -132,51 +159,51 @@ export const asyncRouterMap = [ name: 'list', component: RouteView, redirect: '/list/table-list', - meta: { title: '列表页', icon: 'table', permission: [ 'table' ] }, + meta: { title: '列表页', icon: 'table', permission: ['table'] }, children: [ { path: '/list/table-list/:pageNo([1-9]\\d*)?', name: 'TableListWrapper', hideChildrenInMenu: true, // 强制显示 MenuItem 而不是 SubMenu component: () => import('@/views/list/TableList'), - meta: { title: '查询表格', keepAlive: true, permission: [ 'table' ] } + meta: { title: '查询表格', keepAlive: true, permission: ['table'] } }, { path: '/list/basic-list', name: 'BasicList', component: () => import('@/views/list/BasicList'), - meta: { title: '标准列表', keepAlive: true, permission: [ 'table' ] } + meta: { title: '标准列表', keepAlive: true, permission: ['table'] } }, { path: '/list/card', name: 'CardList', component: () => import('@/views/list/CardList'), - meta: { title: '卡片列表', keepAlive: true, permission: [ 'table' ] } + meta: { title: '卡片列表', keepAlive: true, permission: ['table'] } }, { path: '/list/search', name: 'SearchList', component: () => import('@/views/list/search/SearchLayout'), redirect: '/list/search/article', - meta: { title: '搜索列表', keepAlive: true, permission: [ 'table' ] }, + meta: { title: '搜索列表', keepAlive: true, permission: ['table'] }, children: [ { path: '/list/search/article', name: 'SearchArticles', component: () => import('../views/list/search/Article'), - meta: { title: '搜索列表(文章)', permission: [ 'table' ] } + meta: { title: '搜索列表(文章)', permission: ['table'] } }, { path: '/list/search/project', name: 'SearchProjects', component: () => import('../views/list/search/Projects'), - meta: { title: '搜索列表(项目)', permission: [ 'table' ] } + meta: { title: '搜索列表(项目)', permission: ['table'] } }, { path: '/list/search/application', name: 'SearchApplications', component: () => import('../views/list/search/Applications'), - meta: { title: '搜索列表(应用)', permission: [ 'table' ] } + meta: { title: '搜索列表(应用)', permission: ['table'] } } ] } @@ -188,19 +215,19 @@ export const asyncRouterMap = [ name: 'profile', component: RouteView, redirect: '/profile/basic', - meta: { title: '详情页', icon: 'profile', permission: [ 'profile' ] }, + meta: { title: '详情页', icon: 'profile', permission: ['profile'] }, children: [ { path: '/profile/basic', name: 'ProfileBasic', component: () => import('@/views/profile/basic/Index'), - meta: { title: '基础详情页', permission: [ 'profile' ] } + meta: { title: '基础详情页', permission: ['profile'] } }, { path: '/profile/advanced', name: 'ProfileAdvanced', component: () => import('@/views/profile/advanced/Advanced'), - meta: { title: '高级详情页', permission: [ 'profile' ] } + meta: { title: '高级详情页', permission: ['profile'] } } ] }, @@ -210,19 +237,19 @@ export const asyncRouterMap = [ name: 'result', component: RouteView, redirect: '/result/success', - meta: { title: '结果页', icon: 'check-circle-o', permission: [ 'result' ] }, + meta: { title: '结果页', icon: 'check-circle-o', permission: ['result'] }, children: [ { path: '/result/success', name: 'ResultSuccess', component: () => import(/* webpackChunkName: "result" */ '@/views/result/Success'), - meta: { title: '成功', keepAlive: false, hiddenHeaderContent: true, permission: [ 'result' ] } + meta: { title: '成功', keepAlive: false, hiddenHeaderContent: true, permission: ['result'] } }, { path: '/result/fail', name: 'ResultFail', component: () => import(/* webpackChunkName: "result" */ '@/views/result/Error'), - meta: { title: '失败', keepAlive: false, hiddenHeaderContent: true, permission: [ 'result' ] } + meta: { title: '失败', keepAlive: false, hiddenHeaderContent: true, permission: ['result'] } } ] }, @@ -232,25 +259,25 @@ export const asyncRouterMap = [ name: 'exception', component: RouteView, redirect: '/exception/403', - meta: { title: '异常页', icon: 'warning', permission: [ 'exception' ] }, + meta: { title: '异常页', icon: 'warning', permission: ['exception'] }, children: [ { path: '/exception/403', name: 'Exception403', component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/403'), - meta: { title: '403', permission: [ 'exception' ] } + meta: { title: '403', permission: ['exception'] } }, { path: '/exception/404', name: 'Exception404', component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404'), - meta: { title: '404', permission: [ 'exception' ] } + meta: { title: '404', permission: ['exception'] } }, { path: '/exception/500', name: 'Exception500', component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/500'), - meta: { title: '500', permission: [ 'exception' ] } + meta: { title: '500', permission: ['exception'] } } ] }, @@ -260,19 +287,19 @@ export const asyncRouterMap = [ component: RouteView, redirect: '/account/center', name: 'account', - meta: { title: '个人页', icon: 'user', keepAlive: true, permission: [ 'user' ] }, + meta: { title: '个人页', icon: 'user', keepAlive: true, permission: ['user'] }, children: [ { path: '/account/center', name: 'center', component: () => import('@/views/account/center/Index'), - meta: { title: '个人中心', keepAlive: true, permission: [ 'user' ] } + meta: { title: '个人中心', keepAlive: true, permission: ['user'] } }, { path: '/account/settings', name: 'settings', component: () => import('@/views/account/settings/Index'), - meta: { title: '个人设置', hideHeader: true, permission: [ 'user' ] }, + meta: { title: '个人设置', hideHeader: true, permission: ['user'] }, redirect: '/account/settings/base', hideChildrenInMenu: true, children: [ @@ -280,31 +307,31 @@ export const asyncRouterMap = [ path: '/account/settings/base', name: 'BaseSettings', component: () => import('@/views/account/settings/BaseSetting'), - meta: { title: '基本设置', hidden: true, permission: [ 'user' ] } + meta: { title: '基本设置', hidden: true, permission: ['user'] } }, { path: '/account/settings/security', name: 'SecuritySettings', component: () => import('@/views/account/settings/Security'), - meta: { title: '安全设置', hidden: true, keepAlive: true, permission: [ 'user' ] } + meta: { title: '安全设置', hidden: true, keepAlive: true, permission: ['user'] } }, { path: '/account/settings/custom', name: 'CustomSettings', component: () => import('@/views/account/settings/Custom'), - meta: { title: '个性化设置', hidden: true, keepAlive: true, permission: [ 'user' ] } + meta: { title: '个性化设置', hidden: true, keepAlive: true, permission: ['user'] } }, { path: '/account/settings/binding', name: 'BindingSettings', component: () => import('@/views/account/settings/Binding'), - meta: { title: '账户绑定', hidden: true, keepAlive: true, permission: [ 'user' ] } + meta: { title: '账户绑定', hidden: true, keepAlive: true, permission: ['user'] } }, { path: '/account/settings/notification', name: 'NotificationSettings', component: () => import('@/views/account/settings/Notification'), - meta: { title: '新消息通知', hidden: true, keepAlive: true, permission: [ 'user' ] } + meta: { title: '新消息通知', hidden: true, keepAlive: true, permission: ['user'] } } ] } @@ -314,19 +341,19 @@ export const asyncRouterMap = [ path: '/other', name: 'otherPage', component: RouteView, - meta: { title: '其他组件', icon: 'slack', permission: [ 'dashboard' ] }, + meta: { title: '其他组件', icon: 'slack', permission: ['dashboard'] }, redirect: '/other/icon-selector', children: [ { path: '/other/icon-selector', name: 'TestIconSelect', component: () => import('@/views/other/IconSelectorView'), - meta: { title: 'IconSelector', icon: 'tool', keepAlive: true, permission: [ 'dashboard' ] } + meta: { title: 'IconSelector', icon: 'tool', keepAlive: true, permission: ['dashboard'] } }, { path: '/other/list', component: RouteView, - meta: { title: '业务布局', icon: 'layout', permission: [ 'support' ] }, + meta: { title: '业务布局', icon: 'layout', permission: ['support'] }, redirect: '/other/list/tree-list', children: [ { @@ -423,7 +450,7 @@ export const constantRouterMap = [ path: 'dictionaryItem/list/:id', name: 'DictionaryItemList', component: () => import('@/views/sys/dictionaryItem/DictionaryItemList'), - meta: { title: '词典项', keepAlive: true, permission: [ 'dictionaryItem' ] } + meta: { title: '词典项', keepAlive: true, permission: ['dictionaryItem'] } } ] }, diff --git a/src/views/course/CourseList.vue b/src/views/course/CourseList.vue new file mode 100644 index 0000000..61b642b --- /dev/null +++ b/src/views/course/CourseList.vue @@ -0,0 +1,286 @@ + + + + + \ No newline at end of file From 3386f62590f42d760059dcbc6c236a6da7f78ffc Mon Sep 17 00:00:00 2001 From: 18571350067 Date: Wed, 25 Aug 2021 15:34:46 +0800 Subject: [PATCH 02/20] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/router.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/router.config.js b/src/config/router.config.js index 43424b5..24474fe 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -100,13 +100,13 @@ export const asyncRouterMap = [ }, // 课程管理 { - path: '/course', - redirect: '/course/courseList', + path: '/courseManagement', + redirect: '/course/courseManagement/courseList', component: RouteView, meta: { title: '课程管理', icon: bxAnaalyse, permission: ['from'] }, children: [ { - path: '/course/courseList', + path: '/course/courseManagement/courseList', name: 'courseList', component: () => import('@/views/course/CourseList'), meta: { title: '课程项目', keepAlive: true, permission: ['form'] } From ece8691b16388fa2875399b289928bcc902c3140 Mon Sep 17 00:00:00 2001 From: 18571350067 Date: Wed, 25 Aug 2021 15:45:24 +0800 Subject: [PATCH 03/20] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/course/course.js | 20 +- src/api/course/customCourse.js | 53 ++++++ src/config/router.config.js | 16 +- src/views/course/CourseList.vue | 150 +++------------ src/views/course/courseDetail.vue | 27 +++ src/views/course/customCourseList.vue | 265 ++++++++++++++++++++++++++ 6 files changed, 401 insertions(+), 130 deletions(-) create mode 100644 src/api/course/customCourse.js create mode 100644 src/views/course/courseDetail.vue create mode 100644 src/views/course/customCourseList.vue diff --git a/src/api/course/course.js b/src/api/course/course.js index 161d7ed..1c6d574 100644 --- a/src/api/course/course.js +++ b/src/api/course/course.js @@ -1,12 +1,12 @@ import request from '@/utils/request' -const projectApi = { +const courseApi = { // add: 'sys/menu/add', -// get: 'sys/menu/get', + get: '/courseManagement/course/details', // update: 'sys/menu/update', // del: 'sys/menu/delete', // updateStatus: 'sys/menu/updateStatus', - list: 'course/pageList' + list: '/courseManagement/course/listPage' } // export function menuAdd (params) { @@ -37,6 +37,8 @@ const projectApi = { // data: params // }) // } + +// 查询课程列表 export function getCourseList (params) { return request({ url: courseApi.list, @@ -44,6 +46,18 @@ export function getCourseList (params) { params: params }) } + +// 查看课程详情 +export function getCourseDetails (params) { + return request({ + url:courseApi.get, + method:'get', + params:params + }) +} + + + // export function menuUpdateStatus (params) { // return request({ // url: menuApi.updateStatus, diff --git a/src/api/course/customCourse.js b/src/api/course/customCourse.js new file mode 100644 index 0000000..b2dc4e7 --- /dev/null +++ b/src/api/course/customCourse.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +const projectApi = { +// add: 'sys/menu/add', +// get: 'sys/menu/get', +// update: 'sys/menu/update', +// del: 'sys/menu/delete', +// updateStatus: 'sys/menu/updateStatus', + list: 'courseManagement/customCourse/listPage' +} + +// export function menuAdd (params) { +// return request({ +// url: menuApi.add, +// method: 'post', +// data: params +// }) +// } +// export function menuGet (params) { +// return request({ +// url: menuApi.get, +// method: 'post', +// data: params +// }) +// } +// export function menuUpdate (params) { +// return request({ +// url: menuApi.update, +// method: 'post', +// data: params +// }) +// } +// export function menuDelete (params) { +// return request({ +// url: menuApi.del, +// method: 'post', +// data: params +// }) +// } +export function getcustomCourseList (params) { + return request({ + url: customApi.list, + method: 'get', + params: params + }) +} +// export function menuUpdateStatus (params) { +// return request({ +// url: menuApi.updateStatus, +// method: 'post', +// data: params +// }) +// } diff --git a/src/config/router.config.js b/src/config/router.config.js index 24474fe..bc54d7f 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -101,27 +101,27 @@ export const asyncRouterMap = [ // 课程管理 { path: '/courseManagement', - redirect: '/course/courseManagement/courseList', + redirect: '/courseManagement/course/courseList', component: RouteView, meta: { title: '课程管理', icon: bxAnaalyse, permission: ['from'] }, children: [ { - path: '/course/courseManagement/courseList', + path: '/courseManagement/course/courseList', name: 'courseList', component: () => import('@/views/course/CourseList'), - meta: { title: '课程项目', keepAlive: true, permission: ['form'] } + meta: { title: '系统课程', keepAlive: true, permission: ['form'] } }, { - path: '/form/step-form', - name: 'StepForm', - component: () => import('@/views/form/stepForm/StepForm'), - meta: { title: '系统推荐', keepAlive: true, permission: ['form'] } + path: '/courseManagement/customCourseList', + name: 'customCourse', + component: () => import('@/views/course/customCourseList'), + meta: { title: '自制课程', keepAlive: true, permission: ['form'] } }, { path: '/form/advanced-form', name: 'AdvanceForm', component: () => import('@/views/form/advancedForm/AdvancedForm'), - meta: { title: '终端培训', keepAlive: true, permission: ['form'] } + meta: { title: '资源库', keepAlive: true, permission: ['form'] } } ] }, diff --git a/src/views/course/CourseList.vue b/src/views/course/CourseList.vue index 61b642b..ed1966b 100644 --- a/src/views/course/CourseList.vue +++ b/src/views/course/CourseList.vue @@ -3,72 +3,11 @@
- - - + + + - - - - 全部 - 运行中 - 已结束 - 未发布 - - - - - - - - - - - - - - - - - 全部 - 培训 - 考试 - 培训-练习 - 培训-练习-考试 - - - - 删除 - 锁定 批量操作 @@ -104,29 +42,19 @@ :alert="options.alert" :rowSelection="options.rowSelection" > - - {{ index + 1 }} - - - @@ -152,52 +80,36 @@ export default { columns: [ { title: '序号', + dataIndex: 'index', width: 60, - scopedSlots: { customRender: 'serial' }, + customRender: (text, record, index) => { + return index + 1 + } }, { - title: '项目名称', - dataIndex: 'projectName', - key: 'projectName' + title: '课程编号', + dataIndex: 'id', + align: 'center', }, { - title: '时间', - dataIndex: 'description', + title:'课程名称', + dataIndex:'courseName', + align:'center' }, { - title: '人数', - dataIndex: 'callNo', - // sorter: true, - needTotal: true, - // customRender: (text) => text + ' 次', + title: '课时/分', + dataIndex: 'hour', + align:'center' }, { - title: '项目类型', - dataIndex: 'description', + title: '数量', + dataIndex: 'questionCount', + align:'center' }, - { - title: '项目状态', - dataIndex: 'description', - }, - { - title: '创建人员', - dataIndex: 'projectStatus', - }, - { - title: '创建时间', - dataIndex: 'updatedAt', - sorter: true, - }, - // { - // title: '操作', - // dataIndex: 'action', - // width: '150px', - // scopedSlots: { customRender: 'action' }, - // }, { title: '操作', key: 'operation', - width: 100, + width: 300, align: 'center', scopedSlots: { customRender: 'action' } } diff --git a/src/views/course/courseDetail.vue b/src/views/course/courseDetail.vue new file mode 100644 index 0000000..d5f01d2 --- /dev/null +++ b/src/views/course/courseDetail.vue @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/src/views/course/customCourseList.vue b/src/views/course/customCourseList.vue new file mode 100644 index 0000000..06fcab8 --- /dev/null +++ b/src/views/course/customCourseList.vue @@ -0,0 +1,265 @@ + + + + + \ No newline at end of file From 0303c91ca39f20dec3cc735d5406d4ae40fab0ad Mon Sep 17 00:00:00 2001 From: Yuanjianghong Date: Wed, 25 Aug 2021 16:52:11 +0800 Subject: [PATCH 04/20] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/project/project.js | 17 ++-- src/config/router.config.js | 12 ++- src/views/project/ProjectForm.vue | 38 +++++++ src/views/project/ProjectList.vue | 163 +++++++++++++----------------- 4 files changed, 127 insertions(+), 103 deletions(-) create mode 100644 src/views/project/ProjectForm.vue diff --git a/src/api/project/project.js b/src/api/project/project.js index 4f99135..6edb944 100644 --- a/src/api/project/project.js +++ b/src/api/project/project.js @@ -1,7 +1,7 @@ import request from '@/utils/request' const projectApi = { -// add: 'sys/menu/add', + add: 'project/add', // get: 'sys/menu/get', // update: 'sys/menu/update', // del: 'sys/menu/delete', @@ -9,13 +9,13 @@ const projectApi = { list: 'project/pageList' } -// export function menuAdd (params) { -// return request({ -// url: menuApi.add, -// method: 'post', -// data: params -// }) -// } +export function projectAdd (params) { + return request({ + url: projectApi.add, + method: 'post', + data: params + }) +} // export function menuGet (params) { // return request({ // url: menuApi.get, @@ -38,6 +38,7 @@ const projectApi = { // }) // } export function getProjectList (params) { + console.log("------------{}",params) return request({ url: projectApi.list, method: 'get', diff --git a/src/config/router.config.js b/src/config/router.config.js index bc54d7f..bbb8161 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -74,15 +74,21 @@ export const asyncRouterMap = [ // 项目管理 { path: '/project', - redirect: '/project/projectList', + redirect: '/project/list', component: RouteView, meta: { title: '项目管理', icon: bxAnaalyse, permission: ['from'] }, children: [ { - path: '/project/projectList', + path: '/project/list', name: 'projectList', component: () => import('@/views/project/ProjectList'), - meta: { title: '自主项目', keepAlive: true, permission: ['form'] } + meta: { title: '自主项目', keepAlive: true, permission: ['form'] }, + }, + { + path: '/project/add', + name: 'ProjectForm', + component: () => import('@/views/project/ProjectForm'), + meta: { title: '新增项目', keepAlive: true, permission: ['form'] } }, { path: '/form/step-form', diff --git a/src/views/project/ProjectForm.vue b/src/views/project/ProjectForm.vue new file mode 100644 index 0000000..9352c05 --- /dev/null +++ b/src/views/project/ProjectForm.vue @@ -0,0 +1,38 @@ + + + + \ No newline at end of file diff --git a/src/views/project/ProjectList.vue b/src/views/project/ProjectList.vue index d1cba82..cb36494 100644 --- a/src/views/project/ProjectList.vue +++ b/src/views/project/ProjectList.vue @@ -1,6 +1,6 @@ @@ -70,102 +65,91 @@ import moment from 'moment' import { STable } from '@/components' import { getProjectList } from '@/api/project/project' +import ProjectForm from '@/views/project/ProjectForm' +import router from '@/router/index.js' export default { - name: 'TableList', + name: 'ProjectList', + props: { }, components: { STable, + ProjectForm, + router }, data() { return { - mdl: {}, - // 高级搜索 展开/关闭 - advanced: false, // 查询参数 queryParam: {}, // 表头 columns: [ - { - title: '序号', - width: 60, - scopedSlots: { customRender: 'serial' }, - }, - { - title: '项目名称', - dataIndex: 'projectName', - key: 'projectName' - }, + { title: '序号', width: 60, scopedSlots: { customRender: 'serial' } }, + { title: '项目名称', dataIndex: 'projectName', key: 'projectName' }, { title: '时间', - dataIndex: 'description', - }, - { - title: '人数', - dataIndex: 'callNo', - // sorter: true, - needTotal: true, - // customRender: (text) => text + ' 次', - }, - { - title: '项目类型', - dataIndex: 'description', + dataIndex: 'startDate', + customRender: (text, record, index) => { + return record.startDate + ' - ' + record.endDate + }, }, + { title: '人数', dataIndex: 'personNum', customRender: (text) => text + '人' }, + { title: '项目类型', dataIndex: 'projectType' }, { title: '项目状态', - dataIndex: 'description', + dataIndex: 'status', + customRender: (text, record, index) => { + //项目状态 1-未发布 2-未开始 3-进行中 4-已完成 5-已中止 + if (text == 1) { + return '未发布' + } + if (text == 2) { + return '未开始' + } + if (text == 3) { + return '进行中' + } + if (text == 4) { + return '已完成' + } + if (text == 5) { + return '已中止' + } + }, }, - { - title: '创建人员', - dataIndex: 'projectStatus', - }, - { - title: '创建时间', - dataIndex: 'updatedAt', - sorter: true, - }, - // { - // title: '操作', - // dataIndex: 'action', - // width: '150px', - // scopedSlots: { customRender: 'action' }, - // }, + { title: '创建人员', dataIndex: 'createBy' }, + { title: '创建时间', dataIndex: 'createDate' }, { title: '操作', key: 'operation', - width: 100, + width: 200, align: 'center', - scopedSlots: { customRender: 'action' } - } + scopedSlots: { customRender: 'action' }, + }, ], // 加载数据方法 必须为 Promise 对象 - loadData: parameter => { - return getProjectList(Object.assign(parameter, this.queryParam)).then(res => { return res; }) + loadData: (parameter) => { + return getProjectList(Object.assign(parameter, this.queryParam)).then((res) => { + return res + }) }, + selectedRowKeys: [], selectedRows: [], - - // custom table alert & rowSelection - options: { - alert: { - show: true, - clear: () => { - this.selectedRowKeys = [] - }, - }, - rowSelection: { - selectedRowKeys: this.selectedRowKeys, - onChange: this.onSelectChange, - }, - }, - optionAlertShow: false, } }, created() { this.tableOption() - getRoleList({ t: new Date() }) }, methods: { + // 增 + handledCreate() { + return this.$router.push( + // {name: 'ProjectForm'} + {path: 'project/project/add',} + ) + // router.push() + }, + tableOption() { if (!this.optionAlertShow) { this.options = { @@ -190,11 +174,6 @@ export default { } }, - handleEdit(record) { - this.$emit('onEdit', record) - }, - handleOk() { }, - onSelectChange(selectedRowKeys, selectedRows) { this.selectedRowKeys = selectedRowKeys this.selectedRows = selectedRows From 39d96927b2e98b880152eb66c31106913f1c8732 Mon Sep 17 00:00:00 2001 From: Yuanjianghong Date: Wed, 25 Aug 2021 18:13:09 +0800 Subject: [PATCH 05/20] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/project/ProjectDetail.vue | 359 ++++++++++++++++++++++++++++ src/views/project/ProjectForm.vue | 138 ++++++++--- 2 files changed, 467 insertions(+), 30 deletions(-) create mode 100644 src/views/project/ProjectDetail.vue diff --git a/src/views/project/ProjectDetail.vue b/src/views/project/ProjectDetail.vue new file mode 100644 index 0000000..3240ab7 --- /dev/null +++ b/src/views/project/ProjectDetail.vue @@ -0,0 +1,359 @@ + + + + + diff --git a/src/views/project/ProjectForm.vue b/src/views/project/ProjectForm.vue index 9352c05..726162d 100644 --- a/src/views/project/ProjectForm.vue +++ b/src/views/project/ProjectForm.vue @@ -1,38 +1,116 @@ - - \ No newline at end of file From 86d80a3b1a768441af65dfd2321b65c606b1d322 Mon Sep 17 00:00:00 2001 From: Yuanjianghong Date: Thu, 26 Aug 2021 16:30:04 +0800 Subject: [PATCH 06/20] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=A7=86=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/project/project.js | 8 ++ src/config/router.config.js | 6 ++ src/views/project/ProjectForm.vue | 97 ++++++++++++++----------- src/views/project/ProjectList.vue | 1 + src/views/project/ProjectUnitSelect.vue | 38 ++++++++++ 5 files changed, 109 insertions(+), 41 deletions(-) create mode 100644 src/views/project/ProjectUnitSelect.vue diff --git a/src/api/project/project.js b/src/api/project/project.js index 6edb944..5dcef94 100644 --- a/src/api/project/project.js +++ b/src/api/project/project.js @@ -2,6 +2,7 @@ import request from '@/utils/request' const projectApi = { add: 'project/add', + getDict:'projecct/getDict', // get: 'sys/menu/get', // update: 'sys/menu/update', // del: 'sys/menu/delete', @@ -16,6 +17,13 @@ export function projectAdd (params) { data: params }) } +export function dictGet (params) { + return request({ + url: projectApi.getDict, + method: 'get', + params: params + }) +} // export function menuGet (params) { // return request({ // url: menuApi.get, diff --git a/src/config/router.config.js b/src/config/router.config.js index bbb8161..5681c28 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -90,6 +90,12 @@ export const asyncRouterMap = [ component: () => import('@/views/project/ProjectForm'), meta: { title: '新增项目', keepAlive: true, permission: ['form'] } }, + { + path: '/project/unitSelect', + name: 'unitSelect', + component: () => import('@/views/project/ProjectUnitSelect'), + meta: { title: '部门选择', keepAlive: true, permission: ['form'] } + }, { path: '/form/step-form', name: 'StepForm', diff --git a/src/views/project/ProjectForm.vue b/src/views/project/ProjectForm.vue index 726162d..12eaf19 100644 --- a/src/views/project/ProjectForm.vue +++ b/src/views/project/ProjectForm.vue @@ -2,10 +2,15 @@ - + - + Zone one Zone two @@ -26,90 +31,100 @@ - Zone one - Zone two + {{ item.name }} - + - - + - + - + - - + - + - + - - + - - - - - - - - - Online - Promotion - Offline - - - - - Sponsor - Venue + + + + + + 补考次数: + + + + + 随机补考 + + + + + + 允许 + 不允许 - - + + - 提交 + 下一步 取消 + diff --git a/src/views/project/ProjectUnitSelect.vue b/src/views/project/ProjectUnitSelect.vue new file mode 100644 index 0000000..0b04684 --- /dev/null +++ b/src/views/project/ProjectUnitSelect.vue @@ -0,0 +1,38 @@ + + + + \ No newline at end of file From ece529ec0626a3f65870b7a64e20159555e0d480 Mon Sep 17 00:00:00 2001 From: Yuanjianghong Date: Fri, 27 Aug 2021 17:52:21 +0800 Subject: [PATCH 07/20] =?UTF-8?q?=E7=A9=BF=E6=A2=AD=E6=A1=86=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/router.config.js | 2 +- src/core/lazy_use.js | 6 +- src/views/project/ProjectList.vue | 50 +++++---- src/views/project/ProjectUnitSelect.vue | 132 ++++++++++++++++++------ 4 files changed, 138 insertions(+), 52 deletions(-) diff --git a/src/config/router.config.js b/src/config/router.config.js index 5681c28..da4b3a5 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -88,7 +88,7 @@ export const asyncRouterMap = [ path: '/project/add', name: 'ProjectForm', component: () => import('@/views/project/ProjectForm'), - meta: { title: '新增项目', keepAlive: true, permission: ['form'] } + meta: { title: '新增项目', keepAlive: true, permission: ['form'], show: false} }, { path: '/project/unitSelect', diff --git a/src/core/lazy_use.js b/src/core/lazy_use.js index 709faa4..2cbaf09 100644 --- a/src/core/lazy_use.js +++ b/src/core/lazy_use.js @@ -45,7 +45,9 @@ import { Descriptions, message, notification, - space + space, + Transfer, + Tree } from 'ant-design-vue' import Viser from 'viser-vue' @@ -99,6 +101,8 @@ Vue.use(Result) Vue.use(Statistic) Vue.use(Descriptions) Vue.use(space) +Vue.use(Tree) +Vue.use(Transfer) Vue.prototype.$confirm = Modal.confirm Vue.prototype.$message = message diff --git a/src/views/project/ProjectList.vue b/src/views/project/ProjectList.vue index af4e099..5c2a7f4 100644 --- a/src/views/project/ProjectList.vue +++ b/src/views/project/ProjectList.vue @@ -9,12 +9,22 @@ 全部 运行中 已结束 - 未发布 + 未发布 开始时间: - + 结束时间: - + 培训方式: 全部 @@ -36,7 +46,7 @@ { return record.startDate + ' - ' + record.endDate }, }, - { title: '人数', dataIndex: 'personNum', customRender: (text) => text + '人' }, - { title: '项目类型', dataIndex: 'projectType' }, + { title: '人数', key: 'personNum', dataIndex: 'personNum', customRender: (text) => text + '人' }, + { title: '项目类型', dataIndex: 'projectType', key: 'projectType' }, { title: '项目状态', dataIndex: 'status', + key: 'status', customRender: (text, record, index) => { //项目状态 1-未发布 2-未开始 3-进行中 4-已完成 5-已中止 if (text == 1) { @@ -115,15 +127,15 @@ export default { } }, }, - { title: '创建人员', dataIndex: 'createBy' }, - { title: '创建时间', dataIndex: 'createDate' }, - { - title: '操作', - key: 'operation', - width: 200, - align: 'center', - scopedSlots: { customRender: 'action' }, - }, + { title: '创建人员', key: 'createBy', dataIndex: 'createBy' }, + { title: '创建时间', key: 'createDate', dataIndex: 'createDate' }, + // { + // title: '操作', + // width: 200, + // key: 'status', + // align: 'center', + // scopedSlots: { customRender: 'action' }, + // }, ], // 加载数据方法 必须为 Promise 对象 @@ -145,7 +157,7 @@ export default { handledCreate() { return this.$router.push( // {name: 'ProjectForm'} - {path: 'project/project/add',} + { path: 'project/project/add' } ) // router.push() }, diff --git a/src/views/project/ProjectUnitSelect.vue b/src/views/project/ProjectUnitSelect.vue index 0b04684..e694179 100644 --- a/src/views/project/ProjectUnitSelect.vue +++ b/src/views/project/ProjectUnitSelect.vue @@ -1,38 +1,108 @@ - + + \ No newline at end of file +.tree-transfer .ant-transfer-list:first-child { + width: 50%; + flex: none; + height: 100%; +} + From ee198908383a75144bbeba87bdb811b8919480ee Mon Sep 17 00:00:00 2001 From: qinjie Date: Fri, 27 Aug 2021 18:01:25 +0800 Subject: [PATCH 08/20] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E6=96=B9=E6=A1=88=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E7=AE=A1=E7=90=86=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/defaultSettings.js | 2 +- src/config/router.config.js | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/config/defaultSettings.js b/src/config/defaultSettings.js index 91268d5..6801019 100644 --- a/src/config/defaultSettings.js +++ b/src/config/defaultSettings.js @@ -14,7 +14,7 @@ export default { navTheme: 'dark', // theme for nav menu - primaryColor: '#5555ff', // primary color of ant design + primaryColor: '#1890ff', // primary color of ant design layout: 'topmenu', // nav menu position: `sidemenu` or `topmenu` contentWidth: 'Fluid', // layout of content: `Fluid` or `Fixed`, only works when layout is topmenu fixedHeader: false, // sticky header diff --git a/src/config/router.config.js b/src/config/router.config.js index da4b3a5..9dc1933 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -88,7 +88,7 @@ export const asyncRouterMap = [ path: '/project/add', name: 'ProjectForm', component: () => import('@/views/project/ProjectForm'), - meta: { title: '新增项目', keepAlive: true, permission: ['form'], show: false} + meta: { title: '新增项目', keepAlive: true, permission: ['form'], show: false } }, { path: '/project/unitSelect', @@ -137,6 +137,21 @@ export const asyncRouterMap = [ } ] }, + // 档案管理 + { + path: "/archives", + redirect: "/archives/user", + component: RouteView, + meta: { title: '档案管理', icon: 'profile', permission: ['form'] }, + children: [ + { + path: "/archives/user", + name: "archivesUser", + component: () => import('@/views/archives/user/Index'), + meta: { title: '人员档案', keepAlive: true, permission: ['form'] } + } + ] + }, // forms { path: '/form', From 7c2c95b74fe8624956b4619ea28c421729a96bca Mon Sep 17 00:00:00 2001 From: qinjie Date: Fri, 27 Aug 2021 18:02:02 +0800 Subject: [PATCH 09/20] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=9C=BA=E6=9E=84=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/public/index.html b/public/index.html index b523e40..7e795d1 100644 --- a/public/index.html +++ b/public/index.html @@ -103,6 +103,20 @@ opacity: 1 } } + + /* 组织机构数选择组件样式修改 start */ + .popover-tree>.ant-popover-content { + margin-top: -15px; + border: 1px solid #1890ff; + max-height: 400px; + overflow-y: auto; + } + + .popover-tree>.ant-popover-content>.ant-popover-arrow { + display: none; + } + + /* 组织机构数选择组件样式修改 end */ <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %> From cded48a4e63c6db941e12b6afef027f86754f742 Mon Sep 17 00:00:00 2001 From: qinjie Date: Sat, 28 Aug 2021 08:37:30 +0800 Subject: [PATCH 10/20] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=9C=BA=E6=9E=84=E6=95=B0=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/OrgTree/Index.vue | 175 +++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 src/components/OrgTree/Index.vue diff --git a/src/components/OrgTree/Index.vue b/src/components/OrgTree/Index.vue new file mode 100644 index 0000000..039ff09 --- /dev/null +++ b/src/components/OrgTree/Index.vue @@ -0,0 +1,175 @@ + + + + + \ No newline at end of file From 8ed75d939c8fdc5ee9b3e64951a67a20e1ebf0e8 Mon Sep 17 00:00:00 2001 From: qinjie Date: Sat, 28 Aug 2021 09:09:04 +0800 Subject: [PATCH 11/20] =?UTF-8?q?=E4=BA=BA=E5=91=98=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/archives/user/Index.vue | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/views/archives/user/Index.vue diff --git a/src/views/archives/user/Index.vue b/src/views/archives/user/Index.vue new file mode 100644 index 0000000..2df4e90 --- /dev/null +++ b/src/views/archives/user/Index.vue @@ -0,0 +1,52 @@ + + + + + \ No newline at end of file From 64631ef5d0bfe722740d180746f5d0a8768c049e Mon Sep 17 00:00:00 2001 From: qinjie Date: Sat, 28 Aug 2021 10:42:15 +0800 Subject: [PATCH 12/20] =?UTF-8?q?=E5=BC=95=E5=85=A5=E5=B9=B6=E6=B3=A8?= =?UTF-8?q?=E5=86=8CEmpty=EF=BC=8C=E7=BB=84=E7=BB=87=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E6=A0=91=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=B5=B7=E5=A7=8B=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/OrgTree/Index.vue | 75 ++++++++++++++++++++------------ src/core/lazy_use.js | 4 +- 2 files changed, 49 insertions(+), 30 deletions(-) diff --git a/src/components/OrgTree/Index.vue b/src/components/OrgTree/Index.vue index 039ff09..3574225 100644 --- a/src/components/OrgTree/Index.vue +++ b/src/components/OrgTree/Index.vue @@ -1,9 +1,12 @@ From 59048cc4cb5796a5498e5e68d1f564037e8c08a8 Mon Sep 17 00:00:00 2001 From: qinjie Date: Mon, 30 Aug 2021 16:12:07 +0800 Subject: [PATCH 17/20] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20webpack=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2176fb1..dc5cd07 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "opencollective-postinstall": "^2.0.2", "vue-svg-icon-loader": "^2.1.1", "vue-template-compiler": "^2.6.10", - "webpack-theme-color-replacer": "^1.3.12" + "webpack-theme-color-replacer": "^1.3.12", + "webpack": "^4.44.2" } -} +} \ No newline at end of file From ee079657fec48afdfb2077b8cffe5df0d25ad7ba Mon Sep 17 00:00:00 2001 From: qinjie Date: Mon, 30 Aug 2021 16:38:11 +0800 Subject: [PATCH 18/20] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=93=E5=8C=85?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E8=B7=AF=E5=BE=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vue.config.js b/vue.config.js index 5422b82..1d22342 100644 --- a/vue.config.js +++ b/vue.config.js @@ -32,6 +32,8 @@ const assetsCDN = { // vue.config.js const vueConfig = { configureWebpack: { + // 打包资源路径 + publicPath: './', // webpack plugins plugins: [ // Ignore all locale files of moment.js From 0212dfe7b3958fe9638ef623f695217206f20cab Mon Sep 17 00:00:00 2001 From: qinjie Date: Mon, 30 Aug 2021 16:48:09 +0800 Subject: [PATCH 19/20] =?UTF-8?q?=E6=89=93=E5=8C=85=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue.config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vue.config.js b/vue.config.js index 1d22342..af8906a 100644 --- a/vue.config.js +++ b/vue.config.js @@ -31,9 +31,11 @@ const assetsCDN = { // vue.config.js const vueConfig = { + // 打包资源路径 + publicPath: './', + // 输出文件目录 + outputDir: 'dist', configureWebpack: { - // 打包资源路径 - publicPath: './', // webpack plugins plugins: [ // Ignore all locale files of moment.js From cb2d422f193f6fcf82071d1b4fe2afbd4fe468d3 Mon Sep 17 00:00:00 2001 From: qinjie Date: Mon, 30 Aug 2021 17:42:30 +0800 Subject: [PATCH 20/20] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E6=94=B9=E4=B8=BAhash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 8b53d4d..db8bc1b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -4,7 +4,7 @@ import { constantRouterMap, asyncRouterMap } from '@/config/router.config' // hack router push callback const originalPush = Router.prototype.push -Router.prototype.push = function push (location, onResolve, onReject) { +Router.prototype.push = function push(location, onResolve, onReject) { if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject) return originalPush.call(this, location).catch(err => err) } @@ -12,8 +12,8 @@ Router.prototype.push = function push (location, onResolve, onReject) { Vue.use(Router) export default new Router({ - mode: 'history', - base: process.env.BASE_URL, + mode: 'hash', // history + // base: process.env.BASE_URL, scrollBehavior: () => ({ y: 0 }), routes: constantRouterMap.concat(asyncRouterMap) })