diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 07b6235..8139ac9 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -2,6 +2,4 @@ export {} declare global { const ElMessage: typeof import('element-plus/es')['ElMessage'] - const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] - const ElNotification: typeof import('element-plus/es')['ElNotification'] } diff --git a/components.d.ts b/components.d.ts index 6de8fe2..7e176cd 100644 --- a/components.d.ts +++ b/components.d.ts @@ -13,12 +13,14 @@ declare module '@vue/runtime-core' { DropdownMenu: typeof import('./src/components/Share/DropdownMenu.vue')['default'] Dropzone: typeof import('./src/components/Dropzone/index.vue')['default'] EditorImage: typeof import('./src/components/Tinymce/components/EditorImage.vue')['default'] + ElAlert: typeof import('element-plus/es')['ElAlert'] ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete'] ElBadge: typeof import('element-plus/es')['ElBadge'] ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] ElCard: typeof import('element-plus/es')['ElCard'] + ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCol: typeof import('element-plus/es')['ElCol'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] @@ -31,14 +33,15 @@ declare module '@vue/runtime-core' { ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElInput: typeof import('element-plus/es')['ElInput'] - ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElProgress: typeof import('element-plus/es')['ElProgress'] ElRadio: typeof import('element-plus/es')['ElRadio'] + ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] + ElRate: typeof import('element-plus/es')['ElRate'] ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] @@ -47,8 +50,12 @@ declare module '@vue/runtime-core' { ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTabPane: typeof import('element-plus/es')['ElTabPane'] + ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] + ElTree: typeof import('element-plus/es')['ElTree'] + ElUpload: typeof import('element-plus/es')['ElUpload'] ErrorLog: typeof import('./src/components/ErrorLog/index.vue')['default'] GithubCorner: typeof import('./src/components/GithubCorner/index.vue')['default'] Hamburger: typeof import('./src/components/Hamburger/index.vue')['default'] @@ -75,4 +82,7 @@ declare module '@vue/runtime-core' { UploadExcel: typeof import('./src/components/UploadExcel/index.vue')['default'] VueCountTo: typeof import('./src/components/vue-count-to/vue-countTo.vue')['default'] } + export interface ComponentCustomProperties { + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] + } } diff --git a/src/api/manage.js b/src/api/manage.js new file mode 100644 index 0000000..49f238c --- /dev/null +++ b/src/api/manage.js @@ -0,0 +1,71 @@ +import axios from "axios"; + +function getCurrentTimestamp() { + return new Date().getTime(); +} + +const api = 'http://nbxt.oa.x-lf.cn' + +/** + * 根据项目id获取项目信息 + * @param id 项目id + * @param token 访问令牌 + * @returns {Promise> | *} + */ +const projectGetById = (id, token) => { + return axios({ + url: api + "/project/get/id?id=" + id, + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + } + }) +} + + +/** + * 获取项目信息 + * @param projectId 项目id + * @param token 访问令牌 + * @returns {Promise> | *} + */ + +export const getproject = (projectId, token) => { + return axios({ + url: api +"/project/get?projectId=" + projectId, + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + + } + + + }) +} + + + +/** + * 获取项目信息 + * @param projectId 项目id + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const searchModel = (projectId ,token) => { + return axios({ + url: api +"/module/get?projectId=" + projectId , + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + + 'Timestamp': getCurrentTimestamp() + + + } + + + }) +} + diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index bb5074a..2e7b973 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -3,8 +3,8 @@ {{ - item.meta.title - }} + item.meta.title + }} {{ item.meta.title }} @@ -41,8 +41,9 @@ export default defineComponent({ const first = matched[0]; if (!this.isDashboard(first)) { - matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched); + matched = [{ path: '/dashboard', meta: { title: 'Dashboard' } }].concat(matched); } + this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false); }, diff --git a/src/router/index.ts b/src/router/index.ts index 3e8bd0d..0796433 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -31,6 +31,7 @@ export const constantRoutes:RouteRecordRaw[] = [ } ] }, + { path: '/login', component: () => import('@/views/login/index.vue'), @@ -158,41 +159,64 @@ export const asyncRoutes:RouteRecordRaw[] = [ { path: '/myself', component: Layout, - redirect: '/myself', + redirect: 'noRedirect', meta: { - alwaysShow: true, // will always show the root menu + alwaysShow: false, // 始终显示根菜单 title: '个人项目', icon: 'nested', roles: ['admin', 'teacher_user'] }, children: [ { - // 我负责的 - path: 'charge', - component: () => import('@/views/personal/project/charge.vue'), - name: 'Charge', + path: 'participate', + component: () => import('@/views/personal/project/participate.vue'), + name: 'participate', meta: { title: '我负责的', icon: 'user', affix: true } }, + //我管理的以及子页面 { - // 我管理的 path: 'manage', component: () => import('@/views/personal/project/manage.vue'), name: 'Manage', - meta: { title: '我管理的', icon: 'user', affix: true } + meta: { title: '我管理的', icon: 'user', affix: true, }, + }, { - // 我参与的 - path: 'participate', - component: () => import('@/views/personal/project/participate.vue'), - name: 'Participate', + path: 'childSysManage', + component: () => import('@/views/personal/project/childSystem/manage.vue'), + name: 'ChildSysManage', + meta: { title: '子系统', breadcrumb: true , hidden: true }, + + }, + { + path: 'childModManage', + component: () => import('@/views/personal/project/childModel/manage.vue'), + name: 'ChildModManage', + meta: { title: '子模块', breadcrumb: true , hidden: true } + }, + //我参与的以及子界面 + { + path: 'charge', + component: () => import('@/views/personal/project/charge.vue'), + name: 'Charge', meta: { title: '我参与的', icon: 'user', affix: true } }, - - - - + { + path: 'childSysCharge', + component: () => import('@/views/personal/project/childSystem/manage.vue'), + name: 'ChildSysCharge', + meta: { title: '子系统', breadcrumb: true , hidden: true }, + + }, + { + path: 'childModCharge', + component: () => import('@/views/personal/project/childModel/manage.vue'), + name: 'ChildModCharge', + meta: { title: '子模块', breadcrumb: true , hidden: true } + }, ] - }, + } + , // { diff --git a/src/views/personal/project/charge.vue b/src/views/personal/project/charge.vue index b8461c3..85827ce 100644 --- a/src/views/personal/project/charge.vue +++ b/src/views/personal/project/charge.vue @@ -1,3 +1,136 @@ \ No newline at end of file +
+ + +
+
+ 名称 + +
+
+ 状态 + +
+
+ 查询 + 重置 +
+
+
+ +
+ 项目列表 +
+ + + + + + + + + + + + + + 查看详情 + + + +
+ +
+ + + + \ No newline at end of file diff --git a/src/views/personal/project/childSystem/charge.vue b/src/views/personal/project/childSystem/charge.vue new file mode 100644 index 0000000..ca5b038 --- /dev/null +++ b/src/views/personal/project/childSystem/charge.vue @@ -0,0 +1,136 @@ + + + + \ No newline at end of file diff --git a/src/views/personal/project/childSystem/manage.vue b/src/views/personal/project/childSystem/manage.vue new file mode 100644 index 0000000..e177ac1 --- /dev/null +++ b/src/views/personal/project/childSystem/manage.vue @@ -0,0 +1,162 @@ + + + + \ No newline at end of file diff --git a/src/views/personal/project/childmodel/charge.vue b/src/views/personal/project/childmodel/charge.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/personal/project/childmodel/manage.vue b/src/views/personal/project/childmodel/manage.vue new file mode 100644 index 0000000..47a23ae --- /dev/null +++ b/src/views/personal/project/childmodel/manage.vue @@ -0,0 +1,135 @@ + + + + \ No newline at end of file diff --git a/src/views/personal/project/manage.vue b/src/views/personal/project/manage.vue index a704adf..6b8f7f6 100644 --- a/src/views/personal/project/manage.vue +++ b/src/views/personal/project/manage.vue @@ -1,124 +1,200 @@ - - - \ No newline at end of file +}) + .catch(err => { + console.log(err); + }); + + + +const input = ref(''); + + + + + + + + \ No newline at end of file