From 39ebbb6f7f047e37536067ed4c1670a3017071aa Mon Sep 17 00:00:00 2001 From: Yuanjianghong Date: Tue, 31 Aug 2021 17:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/router.config.js | 26 +-- src/utils/request.js | 2 +- src/views/project/ProjectForm.vue | 132 ------------ src/views/project/ProjectList.vue | 4 +- .../project/form/ProjectCourseSelect.vue | 38 ++++ src/views/project/form/ProjectForm.vue | 188 ++++++++++++++++++ .../project/{ => form}/ProjectStepForm.vue | 12 +- .../project/{ => form}/ProjectUnitSelect.vue | 16 +- 8 files changed, 263 insertions(+), 155 deletions(-) delete mode 100644 src/views/project/ProjectForm.vue create mode 100644 src/views/project/form/ProjectCourseSelect.vue create mode 100644 src/views/project/form/ProjectForm.vue rename src/views/project/{ => form}/ProjectStepForm.vue (77%) rename src/views/project/{ => form}/ProjectUnitSelect.vue (92%) diff --git a/src/config/router.config.js b/src/config/router.config.js index f77bb4c..b128734 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -84,24 +84,24 @@ export const asyncRouterMap = [ component: () => import('@/views/project/ProjectList'), meta: { title: '自主项目', keepAlive: true, permission: ['form'] }, }, - { - path: '/project/add', - name: 'ProjectForm', - component: () => import('@/views/project/ProjectForm'), - meta: { title: '新增项目', keepAlive: true, permission: ['form'], show: false } - }, + // { + // path: '/project/add', + // name: 'ProjectForm', + // component: () => import('@/views/project/ProjectForm'), + // meta: { title: '新增项目', keepAlive: true, permission: ['form'], show: false } + // }, { path: '/project/projectStepForm', name: 'projectStepForm', - component: () => import('@/views/project/ProjectStepForm'), + component: () => import('@/views/project/form/ProjectStepForm'), meta: { title: '新增项目-分布', keepAlive: true, permission: ['form'] } }, - { - path: '/project/unitSelect', - name: 'unitSelect', - component: () => import('@/views/project/ProjectUnitSelect'), - 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/utils/request.js b/src/utils/request.js index 69201e9..aa5f63f 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -49,7 +49,7 @@ const errorHandler = (error) => { request.interceptors.request.use(config => { // const token = storage.get(ACCESS_TOKEN) // 由于登录接口待联调,token使用默认值 - const token = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImY1ODZhMzc5LWQ3MjYtNDYxZS04MmFiLTUyNWRhNzI1ZjBhZCJ9.4AsSbHaR9W7dz1wBJ-u6-dL8VS5Su12eoXPnFriX-nn-CIiOMtSctMciECijN4F7uYrzUU8KP8jwkCJbPlMaQA' + const token = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjIwMzU2Nzg5LWYyOGEtNDYxYi1iNTRhLTM2MWYzZjdhZjg2NSJ9.4vGoaj9KK8aYp9gEz2cnRM8MBWPrqIo8O5wNgbYK4-JUE3naeEuejjr3JfZ57TLbMYWqG1MkJ0kAT-2GMgreGQ' // 如果 token 存在,让每个请求携带自定义 token 请根据实际情况自行修改 if (token) { config.headers[ACCESS_TOKEN] = token diff --git a/src/views/project/ProjectForm.vue b/src/views/project/ProjectForm.vue deleted file mode 100644 index 0b8b54a..0000000 --- a/src/views/project/ProjectForm.vue +++ /dev/null @@ -1,132 +0,0 @@ - - diff --git a/src/views/project/ProjectList.vue b/src/views/project/ProjectList.vue index c8af6b3..d8bd0cc 100644 --- a/src/views/project/ProjectList.vue +++ b/src/views/project/ProjectList.vue @@ -75,7 +75,7 @@ import moment from 'moment' import { STable } from '@/components' import { getProjectList } from '@/api/project/project' -import ProjectForm from '@/views/project/ProjectForm' +import ProjectForm from '@/views/project/form/ProjectForm' import router from '@/router/index.js' export default { @@ -107,7 +107,6 @@ export default { { title: '项目状态', dataIndex: 'status', - key: 'status', customRender: (text, record, index) => { //项目状态 1-未发布 2-未开始 3-进行中 4-已完成 5-已中止 if (text == 1) { @@ -132,7 +131,6 @@ export default { { title: '操作', width: 200, - key: 'status', align: 'center', scopedSlots: { customRender: 'action' }, }, diff --git a/src/views/project/form/ProjectCourseSelect.vue b/src/views/project/form/ProjectCourseSelect.vue new file mode 100644 index 0000000..f542728 --- /dev/null +++ b/src/views/project/form/ProjectCourseSelect.vue @@ -0,0 +1,38 @@ + + + + \ No newline at end of file diff --git a/src/views/project/form/ProjectForm.vue b/src/views/project/form/ProjectForm.vue new file mode 100644 index 0000000..6a4c936 --- /dev/null +++ b/src/views/project/form/ProjectForm.vue @@ -0,0 +1,188 @@ + + diff --git a/src/views/project/ProjectStepForm.vue b/src/views/project/form/ProjectStepForm.vue similarity index 77% rename from src/views/project/ProjectStepForm.vue rename to src/views/project/form/ProjectStepForm.vue index 1a22ad2..80df7b0 100644 --- a/src/views/project/ProjectStepForm.vue +++ b/src/views/project/form/ProjectStepForm.vue @@ -8,12 +8,16 @@ + +
- + + +
@@ -22,20 +26,20 @@