diff --git a/.eslintrc.cjs b/.eslintrc.cjs
deleted file mode 100644
index aeb48d4..0000000
--- a/.eslintrc.cjs
+++ /dev/null
@@ -1,213 +0,0 @@
-/* eslint-env node */
-module.exports = {
- 'root': true,
- 'env': {
- 'browser': true,
- 'node': true,
- 'es6': true
- },
- 'parser': 'vue-eslint-parser',
- 'parserOptions': {
- 'parser': '@typescript-eslint/parser',
- 'ecmaVersion': 2020,
- 'sourceType': 'module',
- 'jsxPragma': 'React',
- 'ecmaFeatures': {
- 'jsx': true,
- 'tsx': true
- }
- },
- 'plugins': ['@typescript-eslint', 'import'],
- 'extends': [
- 'plugin:vue/vue3-essential',
- 'plugin:@typescript-eslint/recommended',
- 'eslint:recommended'
- ],
- 'globals': {
- defineEmits: 'readonly',
- defineProps: 'readonly',
- defineExpose: 'readonly',
- withDefaults: 'readonly',
- WeixinJSBridge: 'readonly',
- ElLoading: 'readonly',
- ElMessage: 'readonly',
- ElMessageBox: 'readonly',
- ElNotification: 'readonly'
- },
- 'rules': {
- 'vue/no-multiple-template-root': 'off',
- 'vue/multi-word-component-names': 'off',
- 'vue/singleline-html-element-content-newline': 'off',
- 'vue/multiline-html-element-content-newline': 'off',
- 'vue/no-v-html': 'off',
- 'accessor-pairs': 2,
- 'arrow-spacing': [2, {
- 'before': true,
- 'after': true
- }],
- 'block-spacing': [2, 'always'],
- 'brace-style': [2, '1tbs', {
- 'allowSingleLine': true
- }],
- 'camelcase': [0, {
- 'properties': 'always'
- }],
- 'comma-dangle': [2, 'never'],
- 'comma-spacing': [2, {
- 'before': false,
- 'after': true
- }],
- 'comma-style': [2, 'last'],
- 'constructor-super': 2,
- 'curly': [2, 'multi-line'],
- 'dot-location': [2, 'property'],
- 'eol-last': 2,
- 'eqeqeq': ['error', 'always', { 'null': 'ignore' }],
- 'generator-star-spacing': [2, {
- 'before': true,
- 'after': true
- }],
- 'handle-callback-err': [2, '^(err|error)$'],
- 'indent': [2, 2, {
- 'SwitchCase': 1
- }],
- 'jsx-quotes': [2, 'prefer-single'],
- 'key-spacing': [2, {
- 'beforeColon': false,
- 'afterColon': true
- }],
- 'keyword-spacing': [2, {
- 'before': true,
- 'after': true
- }],
- 'new-cap': [2, {
- 'newIsCap': true,
- 'capIsNew': false
- }],
- 'new-parens': 2,
- 'no-array-constructor': 2,
- 'no-caller': 2,
- 'no-console': 'off',
- 'no-class-assign': 2,
- 'no-cond-assign': 2,
- 'no-const-assign': 2,
- 'no-control-regex': 0,
- 'no-delete-var': 2,
- 'no-dupe-args': 2,
- 'no-dupe-class-members': 2,
- 'no-dupe-keys': 2,
- 'no-duplicate-case': 2,
- 'no-empty-character-class': 2,
- 'no-empty-pattern': 2,
- 'no-eval': 2,
- 'no-ex-assign': 2,
- 'no-extend-native': 2,
- 'no-extra-bind': 2,
- 'no-extra-boolean-cast': 2,
- 'no-extra-parens': [2, 'functions'],
- 'no-fallthrough': 2,
- 'no-floating-decimal': 2,
- 'no-func-assign': 2,
- 'no-implied-eval': 2,
- 'no-inner-declarations': [2, 'functions'],
- 'no-invalid-regexp': 2,
- 'no-irregular-whitespace': 2,
- 'no-iterator': 2,
- 'no-label-var': 2,
- 'no-labels': [2, {
- 'allowLoop': false,
- 'allowSwitch': false
- }],
- 'no-lone-blocks': 2,
- 'no-mixed-spaces-and-tabs': 2,
- 'no-multi-spaces': 2,
- 'no-multi-str': 2,
- 'no-multiple-empty-lines': [2, {
- 'max': 1
- }],
- 'no-native-reassign': 2,
- 'no-negated-in-lhs': 2,
- 'no-new-object': 2,
- 'no-new-require': 2,
- 'no-new-symbol': 2,
- 'no-new-wrappers': 2,
- 'no-obj-calls': 2,
- 'no-octal': 2,
- 'no-octal-escape': 2,
- 'no-path-concat': 2,
- 'no-proto': 2,
- 'no-redeclare': 2,
- 'no-regex-spaces': 2,
- 'no-return-assign': [2, 'except-parens'],
- 'no-self-assign': 2,
- 'no-self-compare': 2,
- 'no-sequences': 2,
- 'no-shadow-restricted-names': 2,
- 'no-spaced-func': 2,
- 'no-sparse-arrays': 2,
- 'no-this-before-super': 2,
- 'no-throw-literal': 2,
- 'no-trailing-spaces': 2,
- 'no-undef': 2,
- 'no-undef-init': 2,
- 'no-unexpected-multiline': 2,
- 'no-unmodified-loop-condition': 2,
- 'no-unneeded-ternary': [2, {
- 'defaultAssignment': false
- }],
- 'no-unreachable': 2,
- 'no-unsafe-finally': 2,
- 'no-unused-vars': [2, {
- 'vars': 'all',
- 'args': 'none'
- }],
- 'no-useless-call': 2,
- 'no-useless-computed-key': 2,
- 'no-useless-constructor': 2,
- 'no-useless-escape': 0,
- 'no-whitespace-before-property': 2,
- 'no-with': 2,
- 'one-var': [2, {
- 'initialized': 'never'
- }],
- 'operator-linebreak': [2, 'after', {
- 'overrides': {
- '?': 'before',
- ':': 'before'
- }
- }],
- 'padded-blocks': [2, 'never'],
- 'quotes': [2, 'single', {
- 'avoidEscape': true,
- 'allowTemplateLiterals': true
- }],
- 'semi': [2, 'always'],
- 'semi-spacing': [2, {
- 'before': false,
- 'after': true
- }],
- 'space-before-blocks': [2, 'always'],
- 'space-before-function-paren': 'off',
- 'space-in-parens': [2, 'never'],
- 'space-infix-ops': 2,
- 'space-unary-ops': [2, {
- 'words': true,
- 'nonwords': false
- }],
- 'spaced-comment': [2, 'always', {
- 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
- }],
- 'template-curly-spacing': [2, 'never'],
- 'use-isnan': 2,
- 'valid-typeof': 2,
- 'wrap-iife': [2, 'any'],
- 'yield-star-spacing': [2, 'both'],
- 'yoda': [2, 'never'],
- 'prefer-const': 2,
- 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
- 'object-curly-spacing': [2, 'always', {
- objectsInObjects: false
- }],
- 'array-bracket-spacing': [2, 'never']
- }
-};
diff --git a/components.d.ts b/components.d.ts
index d685c78..0a90341 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -39,6 +39,7 @@ declare module '@vue/runtime-core' {
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
+ ElPopover: typeof import('element-plus/es')['ElPopover']
ElProgress: typeof import('element-plus/es')['ElProgress']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
diff --git a/src/api/project.js b/src/api/project.js
index e1adc9a..d2ae2c3 100644
--- a/src/api/project.js
+++ b/src/api/project.js
@@ -2,10 +2,13 @@ import request from '@/utils/request';
function getCurrentTimestamp() {
return new Date().getTime();
}
-export function GetProject(projectId, token) {
+
+//我负责的页面获取项目
+export function GetProject(page, pageSize, token) {
return request({
- url: '/project/get/' + projectId,
+ url: '/project/my/get',
method: 'get',
+ params: { page, pageSize },
headers: {
'Authorization':'Bearer '+ token,
'content-type': 'application/json;charset=utf-8',
@@ -14,11 +17,12 @@ export function GetProject(projectId, token) {
});
}
-export function GetProjectInfo(token,id) {
+//新增项目
+export function AddProject(data, token) {
return request({
- url: '/project/get/id/',
- method: 'get',
- params: { id },
+ url: '/project/add',
+ method: 'post',
+ data,
headers: {
'Authorization':'Bearer '+ token,
'content-type': 'application/json;charset=utf-8',
@@ -27,26 +31,73 @@ export function GetProjectInfo(token,id) {
});
}
-export function fetchPv(pv) {
+//删除项目
+export function DeleteProject(id, token) {
return request({
- url: '/vue-element-admin/article/pv',
+ url: '/project/delete',
+ method: 'delete',
+ params:{ id },
+ headers: {
+ 'Authorization':'Bearer '+ token,
+ 'content-type': 'application/json;charset=utf-8',
+ 'Timestamp': getCurrentTimestamp()
+ }
+ });
+}
+
+//编辑项目
+export function EditProject(projectId, data, token) {
+ return request({
+ url: '/project/edit/' + projectId,
+ method: 'put',
+ data,
+ headers: {
+ 'Authorization': 'Bearer ' + token,
+ 'content-type': 'application/json;charset=utf-8',
+ 'Timestamp': getCurrentTimestamp()
+ }
+ });
+}
+
+//根据项目名字模糊查询
+export function GetProjectByName(name, token) {
+ return request({
+ url: '/project/get/name',
method: 'get',
- params: { pv }
+ params: { name },
+ headers: {
+ 'Authorization':'Bearer '+ token,
+ 'content-type': 'application/json;charset=utf-8',
+ 'Timestamp': getCurrentTimestamp()
+ }
});
}
-export function createArticle(data) {
+//根据项目id查询子系统
+export function GetChildSysById(projectId, token) {
return request({
- url: '/vue-element-admin/article/create',
- method: 'post',
- data
+ url: '/module/get',
+ method: 'get',
+ params: { projectId },
+ headers: {
+ 'Authorization':'Bearer '+ token,
+ 'content-type': 'application/json;charset=utf-8',
+ 'Timestamp': getCurrentTimestamp()
+ }
});
}
-export function updateArticle(data) {
+//根据项目名和子系统名查询子模块
+export function GetChildModuleByName(projectName, childName, token) {
return request({
- url: '/vue-element-admin/article/update',
- method: 'post',
- data
+ url: '/project/module/get/name',
+ method: 'get',
+ params: { projectName, childName },
+ headers: {
+ 'Authorization':'Bearer '+ token,
+ 'content-type': 'application/json;charset=utf-8',
+ 'Timestamp': getCurrentTimestamp()
+ }
});
}
+
diff --git a/src/router/index.ts b/src/router/index.ts
index 0796433..e8fda07 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -31,7 +31,7 @@ export const constantRoutes:RouteRecordRaw[] = [
}
]
},
-
+
{
path: '/login',
component: () => import('@/views/login/index.vue'),
@@ -167,52 +167,52 @@ export const asyncRoutes:RouteRecordRaw[] = [
roles: ['admin', 'teacher_user']
},
children: [
+ {
+ path: 'charge',
+ component: () => import('@/views/personal/project/charge.vue'),
+ name: 'charge',
+ meta: { title: '我负责的', icon: 'user', affix: true }
+ },
{
path: 'participate',
component: () => import('@/views/personal/project/participate.vue'),
name: 'participate',
- meta: { title: '我负责的', icon: 'user', affix: true }
+ meta: { title: '我参与的', icon: 'user', affix: true }
},
- //我管理的以及子页面
{
path: 'manage',
component: () => import('@/views/personal/project/manage.vue'),
name: 'Manage',
meta: { title: '我管理的', icon: 'user', affix: true, },
-
+
},
+ //我负责的子系统和子模块
+ {
+ path: 'childSysCharge/:name',
+ component: () => import('@/views/personal/project/childSystem/charge.vue'),
+ name: 'ChildSysCharge',
+ meta: { title: '子系统', breadcrumb: true , affix: true },
+ props: true
+ },
+ {
+ path: 'childModCharge',
+ component: () => import('@/views/personal/project/childmodel/charge.vue'),
+ name: 'ChildModCharge',
+ meta: { title: '子模块', breadcrumb: true , hidden: true }
+ },
+ //我管理的子系统和子模块
{
path: 'childSysManage',
component: () => import('@/views/personal/project/childSystem/manage.vue'),
name: 'ChildSysManage',
- meta: { title: '子系统', breadcrumb: true , hidden: true },
-
+ meta: { title: '子系统', breadcrumb: true , hidden: true },
+
},
{
path: 'childModManage',
- component: () => import('@/views/personal/project/childModel/manage.vue'),
+ 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 }
+ meta: { title: '子模块', breadcrumb: true , hidden: true }
},
]
}
diff --git a/src/views/personal/project/charge.vue b/src/views/personal/project/charge.vue
index dca2d07..8dabd35 100644
--- a/src/views/personal/project/charge.vue
+++ b/src/views/personal/project/charge.vue
@@ -9,6 +9,7 @@