From a8cf610db2fd62a10bcceb9f679a49d849570dd2 Mon Sep 17 00:00:00 2001 From: Yuanjianghong Date: Mon, 23 Aug 2021 15:33:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=9F=BA=E7=A1=80Index=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/project/project.js | 3 --- src/config/router.config.js | 6 +++--- src/router/generator-routers.js | 6 +++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/api/project/project.js b/src/api/project/project.js index e918faa..380a968 100644 --- a/src/api/project/project.js +++ b/src/api/project/project.js @@ -42,9 +42,6 @@ export function getProjectList (params) { url: projectApi.list, method: 'get', data: params, - headers: { - 'Authorization':'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjdhYTViMGZiLTkyOWQtNDhhZS04ODU1LWJkNzM5MjdlOTNiZCJ9.CZzowaB-w2krGpNttPZBNLfq1mw775Lh-sx1K8onfgSwNzA6bw-P7CqC4vgH29xjDv3ey4zEFDzV9pHnrAGrDA' - } //Authorization: "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjdhYTViMGZiLTkyOWQtNDhhZS04ODU1LWJkNzM5MjdlOTNiZCJ9.CZzowaB-w2krGpNttPZBNLfq1mw775Lh-sx1K8onfgSwNzA6bw-P7CqC4vgH29xjDv3ey4zEFDzV9pHnrAGrDA" }) } diff --git a/src/config/router.config.js b/src/config/router.config.js index 2bdd8f5..6e96a91 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -69,7 +69,7 @@ export const asyncRouterMap = [ { path: '/form/base-form', name: 'BaseForm', - component: () => import('@/views/form/basicForm/index'), + component: () => import('@/views/form/basicForm/Index'), meta: { title: '基础表单', keepAlive: true, permission: [ 'form' ] } }, { @@ -154,7 +154,7 @@ export const asyncRouterMap = [ { path: '/profile/basic', name: 'ProfileBasic', - component: () => import('@/views/profile/basic/index'), + component: () => import('@/views/profile/basic/Index'), meta: { title: '基础详情页', permission: [ 'profile' ] } }, { @@ -226,7 +226,7 @@ export const asyncRouterMap = [ { path: '/account/center', name: 'center', - component: () => import('@/views/account/center/index'), + component: () => import('@/views/account/center/Index'), meta: { title: '个人中心', keepAlive: true, permission: [ 'user' ] } }, { diff --git a/src/router/generator-routers.js b/src/router/generator-routers.js index 7c8958a..4556aed 100644 --- a/src/router/generator-routers.js +++ b/src/router/generator-routers.js @@ -17,7 +17,7 @@ const constantRouterComponents = { // 你需要动态引入的页面组件 'Workplace': () => import('@/views/dashboard/Workplace'), // form - 'BasicForm': () => import('@/views/form/basicForm/index'), + 'BasicForm': () => import('@/views/form/basicForm/Index'), 'StepForm': () => import('@/views/form/stepForm/StepForm'), 'AdvanceForm': () => import('@/views/form/advancedForm/AdvancedForm'), @@ -29,7 +29,7 @@ const constantRouterComponents = { 'SearchArticles': () => import('@/views/list/search/Article'), 'SearchProjects': () => import('@/views/list/search/Projects'), 'SearchApplications': () => import('@/views/list/search/Applications'), - 'ProfileBasic': () => import('@/views/profile/basic/index'), + 'ProfileBasic': () => import('@/views/profile/basic/Index'), 'ProfileAdvanced': () => import('@/views/profile/advanced/Advanced'), // result @@ -42,7 +42,7 @@ const constantRouterComponents = { 'Exception500': () => import(/* webpackChunkName: "fail" */ '@/views/exception/500'), // account - 'AccountCenter': () => import('@/views/account/center/index'), + 'AccountCenter': () => import('@/views/account/center/Index'), 'AccountSettings': () => import('@/views/account/settings/Index'), 'BaseSettings': () => import('@/views/account/settings/BaseSetting'), 'SecuritySettings': () => import('@/views/account/settings/Security'), From 0ee2b26b2f53f2402b86b5e28f5fe3a224cca289 Mon Sep 17 00:00:00 2001 From: Yuanjianghong Date: Mon, 23 Aug 2021 16:49:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/project/project.js | 3 +-- src/config/router.config.js | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/api/project/project.js b/src/api/project/project.js index 380a968..3f4aa31 100644 --- a/src/api/project/project.js +++ b/src/api/project/project.js @@ -41,8 +41,7 @@ export function getProjectList (params) { return request({ url: projectApi.list, method: 'get', - data: params, - //Authorization: "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjdhYTViMGZiLTkyOWQtNDhhZS04ODU1LWJkNzM5MjdlOTNiZCJ9.CZzowaB-w2krGpNttPZBNLfq1mw775Lh-sx1K8onfgSwNzA6bw-P7CqC4vgH29xjDv3ey4zEFDzV9pHnrAGrDA" + data: params }) } // export function menuUpdateStatus (params) { diff --git a/src/config/router.config.js b/src/config/router.config.js index 35c941d..d513eb9 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -65,6 +65,33 @@ export const asyncRouterMap = [ } ] }, + // 项目管理 + { + path: '/project', + redirect: '/project/projectList', + component: RouteView, + meta: { title: '项目管理', icon: bxAnaalyse, permission: [ 'from' ] }, + children: [ + { + path: '/project/projectList', + name: 'projectList', + component: () => import('@/views/project/ProjectList'), + 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' ] } + } + ] + }, // forms { path: '/form', From 84761dc013c0bb20dd81e840ab474c260dd3a5ef Mon Sep 17 00:00:00 2001 From: Yuanjianghong Date: Mon, 23 Aug 2021 18:04:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=88=91=E4=B8=8D=E7=AE=A1=EF=BC=8C?= =?UTF-8?q?=E6=88=91=E8=A6=81=E4=BC=A0=E4=B8=80=E6=B3=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/project/project.js | 4 +- src/components/Table/index.js | 2 +- src/views/project/ProjectList.vue | 66 +++++++++++++++++-------------- 3 files changed, 40 insertions(+), 32 deletions(-) diff --git a/src/api/project/project.js b/src/api/project/project.js index 3f4aa31..4f99135 100644 --- a/src/api/project/project.js +++ b/src/api/project/project.js @@ -6,7 +6,7 @@ const projectApi = { // update: 'sys/menu/update', // del: 'sys/menu/delete', // updateStatus: 'sys/menu/updateStatus', - list: 'project/projectList' + list: 'project/pageList' } // export function menuAdd (params) { @@ -41,7 +41,7 @@ export function getProjectList (params) { return request({ url: projectApi.list, method: 'get', - data: params + params: params }) } // export function menuUpdateStatus (params) { diff --git a/src/components/Table/index.js b/src/components/Table/index.js index a9301ca..7b1b717 100644 --- a/src/components/Table/index.js +++ b/src/components/Table/index.js @@ -178,7 +178,7 @@ export default { // } catch (e) { // this.localPagination = false // } - this.localDataSource = r.entities // 返回结果中的数组数据 + this.localDataSource = r.rows // 返回结果中的数组数据 this.localLoading = false }) } diff --git a/src/views/project/ProjectList.vue b/src/views/project/ProjectList.vue index b9a6c66..8dad88a 100644 --- a/src/views/project/ProjectList.vue +++ b/src/views/project/ProjectList.vue @@ -74,8 +74,8 @@ class="table-page-search-submitButtons" :style="(advanced && { float: 'right', overflow: 'hidden' }) || {}" > - 查询 - 重置 + 查询 + 重置 @@ -84,6 +84,7 @@
新建 + 删除 @@ -150,58 +151,65 @@ export default { // 表头 columns: [ { - title: '#', + title: '序号', + width: 60, scopedSlots: { customRender: 'serial' }, }, { title: '项目名称', dataIndex: 'projectName', + key: 'projectName' }, { title: '时间', dataIndex: 'description', }, { - title: '服务调用次数', + title: '人数', dataIndex: 'callNo', - sorter: true, + // sorter: true, needTotal: true, - customRender: (text) => text + ' 次', + // customRender: (text) => text + ' 次', }, { - title: '状态', + title: '项目类型', + dataIndex: 'description', + }, + { + title: '项目状态', + dataIndex: 'description', + }, + { + title: '创建人员', dataIndex: 'projectStatus', - needTotal: true, }, { - title: '更新时间', + title: '创建时间', dataIndex: 'updatedAt', sorter: true, }, + // { + // title: '操作', + // dataIndex: 'action', + // width: '150px', + // scopedSlots: { customRender: 'action' }, + // }, { title: '操作', - dataIndex: 'action', - width: '150px', - scopedSlots: { customRender: 'action' }, - }, + key: 'operation', + width: 100, + align: 'center', + scopedSlots: { customRender: 'action' } + } ], - // 加载数据方法 必须为 Promise 对象 - loadData: (parameter) => { - console.log('loadData.parameter', parameter) - return getProjectList(Object.assign(parameter, this.queryParam)).then((res) => { - return res.rows - }) - }, - // // 加载数据方法 必须为 Promise 对象 - // loadData: (parameter) => { - // console.log('loadData.parameter', parameter) - // return request({ - // url: '/dawa/project/pageList', - // method: get, - // data: this.queryParam, - // }) - // }, + // 加载数据方法 必须为 Promise 对象 + loadData: parameter => { + return getProjectList(Object.assign(parameter, this.queryParam)) + .then(res => { + return res + }) + }, selectedRowKeys: [], selectedRows: [],