diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 08908ed..8139ac9 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -1,5 +1,5 @@ // Generated by 'unplugin-auto-import' export {} declare global { - + const ElMessage: typeof import('element-plus/es')['ElMessage'] } diff --git a/components.d.ts b/components.d.ts index 3521563..b350e78 100644 --- a/components.d.ts +++ b/components.d.ts @@ -13,6 +13,7 @@ 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'] ElBadge: typeof import('element-plus/es')['ElBadge'] ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] @@ -21,6 +22,8 @@ declare module '@vue/runtime-core' { ElCol: typeof import('element-plus/es')['ElCol'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] + ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] + ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDivider: typeof import('element-plus/es')['ElDivider'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] @@ -44,8 +47,10 @@ 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'] + ElTableRow: typeof import('element-plus/es')['ElTableRow'] ElTag: typeof import('element-plus/es')['ElTag'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] + 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'] diff --git a/src/api/manage.js b/src/api/manage.js new file mode 100644 index 0000000..6691ec5 --- /dev/null +++ b/src/api/manage.js @@ -0,0 +1,275 @@ +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 pageSize 页面大小 + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getManageList = (params ,token ,) => { + + const {pageSize ,is ,page} = params; + return axios({ + url: `${api}/project/child/get?is=${is}&pageSize=${pageSize}&page=${page}` , + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + + + } + + + }) +} + +// 我管理的所有接口 + + + +/** + * 获取我管理的页面的项目列表 + * + * @param projectId 项目id + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getManageProjectList = (token) => { + return axios({ + url: api +'/project/child/get' , + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + } + + }) + +} + + + + + + +/** + * 获取我管理的页面的子系统项目列表 + * @param projectId 项目id + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getProjectSysList = (projectId,token) => { + return axios({ + url: api +"/module/get?projectId=" + projectId , + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + } + + + }) +} +/** + * 获取我管理的页面的子模块项目列表(接口没数据) + * @param sysId 子系统id + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getProjectModList = (sysId,token) => { + return axios({ + url: api +"/module/get/min?sysId=" + sysId , + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + } + + + }) +} +/** + * 获取我管理的页面的子模块详细信息 + * @param id 子模块id + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getProjectModDetail = (id,token) => { + return axios({ + url: api +"/project/module/id?id=" + id , + method: "get", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + } + + + }) +} +//功能接口 + + +//删除项目 + +/** + * 选择项目删除 + * @param id 项目id + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const deleteProject = (id,token) => { + return axios({ + url: api +"/project/delete?id=" + id , + method: "delete", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + } + + + }) +} +/** + * 修改项目信息 + * @param {Object} body 包含项目更新信息的对象 + * @param {number} id 项目ID + * @param {string} token 访问令牌 + * @returns {Promise>} + */ +export const editProject = (body ,id,token) => { + return axios({ + url: api +"/project/edit?id=" + id , + method: "put", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + }, + data:body + + + }) +} + +/** + * + * 新增子模块 + * @param {Object} body 包含项目更新信息的对象 + * @param {string} token 访问令牌 + * @returns {Promise>} + * + */ +export const addModule = (body,token) => { + return axios({ + url: api +"/project/module/add" , + method: "post", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + }, + data:body + + + }) +} +/** + * + * 删除子模块 + * @param {number} id 子模块ID + * @param {string} token 访问令牌 + * @returns {Promise>} + * + */ +export const deleteModule = (id,token) => { + return axios({ + url: api +"/project/module/delete?id=" +id , + method: "delete", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + }, + + + + }) +} +/** + * + * 修改子模块 + * @param {number} id 子模块ID + * @param {Object} body 包含子模块更新信息的对象 + * @param {string} token 访问令牌 + * @returns {Promise>} + * + */ +export const editModule = ( body,id,token) => { + return axios({ + url: api +"/project/module/edit?id=" +id , + method: "put", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + }, + data:body + + + + }) +} + + + + + + + + + + diff --git a/src/api/participate.js b/src/api/participate.js new file mode 100644 index 0000000..d00797a --- /dev/null +++ b/src/api/participate.js @@ -0,0 +1,76 @@ +import axios from "axios"; + +function getCurrentTimestamp() { + return new Date().getTime(); +} + +const api = 'http://nbxt.oa.x-lf.cn' + +/** + * 获取我参与的项目列表 + * + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getParticipateProjectList = (token)=> { + return axios({ + method: 'get', + url: `${api}/project/participate/get`, + headers: { + 'Authorization': `Bearer ${token}`, + 'Timestamp':getCurrentTimestamp() + } + }) +} +/** + * 获取我参与的项目的子系统列表 + * @param projectId 项目ID + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getParticipateSystemList = ( projectId,token)=> { + return axios({ + method: 'get', + url: `${api}/module/get?projectId=${projectId}`, + headers: { + 'Authorization': `Bearer ${token}`, + 'Timestamp':getCurrentTimestamp() + } + }) +} +/** + * 获取我参与的项目的子模块列表 + * @param SysId 项目ID + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getParticipateModuleList = ( SysId,token)=> { + return axios({ + method: 'get', + url: `${api}/module/get/min?sysId=${SysId}`, + headers: { + 'Authorization': `Bearer ${token}`, + 'Timestamp':getCurrentTimestamp() + } + }) +} +/** + * 获取我参与的项目的子模块的详细信息 + * @param ModId 项目ID + * @param token 访问令牌 + * @returns {Promise> | *} + */ +export const getParticipateDetail = ( ModId,token)=> { + return axios({ + method: 'get', + url: `${api}/project/module/id?id=${ModId}`, + headers: { + 'Authorization': `Bearer ${token}`, + 'Timestamp':getCurrentTimestamp() + } + }) +} + + + + diff --git a/src/api/user.js b/src/api/user.js index 9c199f3..ab887fe 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -1,12 +1,13 @@ import request from '@/utils/request'; +const api = 'http://nbxt.oa.x-lf.cn' function getCurrentTimestamp() { return new Date().getTime(); } export function login(data) { return request({ - url: '/auth/login', + url: api+ '/auth/login', method: 'post', data, headers: { @@ -17,7 +18,7 @@ export function login(data) { export function getInfo(token) { return request({ - url: '/user/profile/get', + url: api +'/user/profile/get', method: 'get', // params: {token}, headers: { @@ -30,7 +31,7 @@ export function getInfo(token) { export function logout(token) { return request({ - url: '/auth/logout', + url: api +'/auth/logout', method: 'get', headers: { 'Authorization':'Bearer '+token, 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/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 576b838..52ae2b2 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -2,7 +2,7 @@