Compare commits
5 Commits
b39ef26930
...
aaa2ea6c54
Author | SHA1 | Date | |
---|---|---|---|
aaa2ea6c54 | |||
f166717873 | |||
a0991d6d3c | |||
![]() |
3f12fda7f3 | ||
![]() |
d27b1ebe10 |
1
auto-imports.d.ts
vendored
1
auto-imports.d.ts
vendored
@ -2,5 +2,4 @@
|
|||||||
export {}
|
export {}
|
||||||
declare global {
|
declare global {
|
||||||
const ElMessage: typeof import('element-plus/es')['ElMessage']
|
const ElMessage: typeof import('element-plus/es')['ElMessage']
|
||||||
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
|
|
||||||
}
|
}
|
||||||
|
6
components.d.ts
vendored
6
components.d.ts
vendored
@ -13,6 +13,7 @@ declare module '@vue/runtime-core' {
|
|||||||
DropdownMenu: typeof import('./src/components/Share/DropdownMenu.vue')['default']
|
DropdownMenu: typeof import('./src/components/Share/DropdownMenu.vue')['default']
|
||||||
Dropzone: typeof import('./src/components/Dropzone/index.vue')['default']
|
Dropzone: typeof import('./src/components/Dropzone/index.vue')['default']
|
||||||
EditorImage: typeof import('./src/components/Tinymce/components/EditorImage.vue')['default']
|
EditorImage: typeof import('./src/components/Tinymce/components/EditorImage.vue')['default']
|
||||||
|
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
|
||||||
ElBadge: typeof import('element-plus/es')['ElBadge']
|
ElBadge: typeof import('element-plus/es')['ElBadge']
|
||||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||||
@ -21,10 +22,14 @@ declare module '@vue/runtime-core' {
|
|||||||
ElCard: typeof import('element-plus/es')['ElCard']
|
ElCard: typeof import('element-plus/es')['ElCard']
|
||||||
ElCol: typeof import('element-plus/es')['ElCol']
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||||
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||||
|
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||||
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||||
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
||||||
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
||||||
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
@ -40,6 +45,7 @@ declare module '@vue/runtime-core' {
|
|||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
ErrorLog: typeof import('./src/components/ErrorLog/index.vue')['default']
|
ErrorLog: typeof import('./src/components/ErrorLog/index.vue')['default']
|
||||||
GithubCorner: typeof import('./src/components/GithubCorner/index.vue')['default']
|
GithubCorner: typeof import('./src/components/GithubCorner/index.vue')['default']
|
||||||
Hamburger: typeof import('./src/components/Hamburger/index.vue')['default']
|
Hamburger: typeof import('./src/components/Hamburger/index.vue')['default']
|
||||||
|
@ -2,24 +2,28 @@ import request from '@/utils/request';
|
|||||||
function getCurrentTimestamp() {
|
function getCurrentTimestamp() {
|
||||||
return new Date().getTime();
|
return new Date().getTime();
|
||||||
}
|
}
|
||||||
export function SystemGetByProjId(projectId, token) {
|
export function GetProject(projectId, token) {
|
||||||
return request({
|
return request({
|
||||||
url: '/module/get',
|
url: '/project/get/' + projectId,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { projectId },
|
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization':'Bearer '+token,
|
'Authorization':'Bearer '+ token,
|
||||||
'content-type': 'application/json;charset=utf-8',
|
'content-type': 'application/json;charset=utf-8',
|
||||||
'Timestamp': getCurrentTimestamp()
|
'Timestamp': getCurrentTimestamp()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function fetchArticle(id) {
|
export function GetProjectInfo(token,id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/vue-element-admin/article/detail',
|
url: '/project/get/id/',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { id }
|
params: { id },
|
||||||
|
headers: {
|
||||||
|
'Authorization':'Bearer '+ token,
|
||||||
|
'content-type': 'application/json;charset=utf-8',
|
||||||
|
'Timestamp': getCurrentTimestamp()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -89,8 +89,8 @@ export default defineComponent({
|
|||||||
async logout() {
|
async logout() {
|
||||||
console.log('5989569898')
|
console.log('5989569898')
|
||||||
// store.user().login()
|
// store.user().login()
|
||||||
await store.user().logout();
|
// await store.user().logout();
|
||||||
console.log('hhhh')
|
await store.user().logout();
|
||||||
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
|
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,11 @@ import NProgress from 'nprogress'; // progress bar
|
|||||||
import 'nprogress/nprogress.css'; // progress bar style
|
import 'nprogress/nprogress.css'; // progress bar style
|
||||||
import { getToken } from '@/utils/auth'; // get token from cookie
|
import { getToken } from '@/utils/auth'; // get token from cookie
|
||||||
import getPageTitle from '@/utils/get-page-title';
|
import getPageTitle from '@/utils/get-page-title';
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false }); // NProgress Configuration
|
NProgress.configure({ showSpinner: false }); // NProgress Configuration
|
||||||
|
|
||||||
const whiteList = ['/login', '/auth-redirect']; // no redirect whitelist
|
const whiteList = ['/login', '/auth-redirect', '/register']; // no redirect whitelist
|
||||||
|
|
||||||
//每次路由变动,都会调用这个路由守卫
|
//每次路由变动,都会调用这个路由守卫
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import { markRaw } from 'vue';
|
// import { markRaw } from 'vue';
|
||||||
import { createRouter, createWebHistory } from 'vue-router'; // createWebHashHistory, createWebHistory
|
import { createRouter, createWebHistory } from 'vue-router'; // createWebHashHistory, createWebHistory
|
||||||
import type { Router, RouteRecordRaw, RouteComponent } from 'vue-router';
|
import type { Router, RouteRecordRaw, RouteComponent } from 'vue-router';
|
||||||
import { Help as IconHelp } from '@element-plus/icons-vue';
|
// import { Help as IconHelp } from '@element-plus/icons-vue';
|
||||||
|
|
||||||
/* Layout */
|
/* Layout */
|
||||||
const Layout = ():RouteComponent => import('@/layout/index.vue');
|
const Layout = ():RouteComponent => import('@/layout/index.vue');
|
||||||
|
|
||||||
/* Router Modules */
|
/* Router Modules */
|
||||||
import componentsRouter from './modules/components';
|
// import componentsRouter from './modules/components';
|
||||||
import chartsRouter from './modules/charts';
|
// import chartsRouter from './modules/charts';
|
||||||
import nestedRouter from './modules/nested';
|
// import nestedRouter from './modules/nested';
|
||||||
import tableRouter from './modules/table';
|
// import tableRouter from './modules/table';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* constantRoutes
|
* constantRoutes
|
||||||
@ -60,35 +60,35 @@ export const constantRoutes:RouteRecordRaw[] = [
|
|||||||
path: 'dashboard',
|
path: 'dashboard',
|
||||||
component: () => import('@/views/dashboard/index.vue'),
|
component: () => import('@/views/dashboard/index.vue'),
|
||||||
name: 'Dashboard',
|
name: 'Dashboard',
|
||||||
meta: { title: '我管理的', icon: 'dashboard', affix: true }
|
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/documentation',
|
|
||||||
component: Layout,
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: 'index',
|
|
||||||
component: () => import('@/views/documentation/index.vue'),
|
|
||||||
name: 'Documentation',
|
|
||||||
meta: { title: 'Documentation', icon: 'documentation', affix: true }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/guide',
|
|
||||||
component: Layout,
|
|
||||||
redirect: '/guide/index',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: 'index',
|
|
||||||
component: () => import('@/views/guide/index.vue'),
|
|
||||||
name: 'Guide',
|
|
||||||
meta: { title: 'Guide', icon: 'guide', noCache: true }
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// path: '/documentation',
|
||||||
|
// component: Layout,
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: 'index',
|
||||||
|
// component: () => import('@/views/documentation/index.vue'),
|
||||||
|
// name: 'Documentation',
|
||||||
|
// meta: { title: 'Documentation', icon: 'documentation', affix: true }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/guide',
|
||||||
|
// component: Layout,
|
||||||
|
// redirect: '/guide/index',
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: 'index',
|
||||||
|
// component: () => import('@/views/guide/index.vue'),
|
||||||
|
// name: 'Guide',
|
||||||
|
// meta: { title: 'Guide', icon: 'guide', noCache: true }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
path: '/profile',
|
path: '/profile',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
@ -112,288 +112,329 @@ export const constantRoutes:RouteRecordRaw[] = [
|
|||||||
* 注意:hidden、alwaysShow 属性配置移动到了meta中!!!
|
* 注意:hidden、alwaysShow 属性配置移动到了meta中!!!
|
||||||
*/
|
*/
|
||||||
export const asyncRoutes:RouteRecordRaw[] = [
|
export const asyncRoutes:RouteRecordRaw[] = [
|
||||||
|
// {
|
||||||
|
// path: '/permission',
|
||||||
|
// component: Layout,
|
||||||
|
// redirect: '/permission/page',
|
||||||
|
// name: 'Permission',
|
||||||
|
// meta: {
|
||||||
|
// alwaysShow: true, // will always show the root menu
|
||||||
|
// title: 'Permission',
|
||||||
|
// icon: 'lock',
|
||||||
|
// roles: ['admin', 'editor','teacher_user'] // you can set roles in root nav
|
||||||
|
// },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: 'page',
|
||||||
|
// component: () => import('@/views/permission/page.vue'),
|
||||||
|
// name: 'PagePermission',
|
||||||
|
// meta: {
|
||||||
|
// title: 'Page Permission',
|
||||||
|
// roles: ['admin','teacher_user'] // or you can only set roles in sub nav
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'directive',
|
||||||
|
// component: () => import('@/views/permission/directive.vue'),
|
||||||
|
// name: 'DirectivePermission',
|
||||||
|
// meta: {
|
||||||
|
// title: 'Directive Permission'
|
||||||
|
// // if do not set roles, means: this page does not require permission
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'role',
|
||||||
|
// component: () => import('@/views/permission/role.vue'),
|
||||||
|
// name: 'RolePermission',
|
||||||
|
// meta: {
|
||||||
|
// title: 'Role Permission',
|
||||||
|
// roles: ['admin','teacher']
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
|
||||||
|
// 个人项目
|
||||||
{
|
{
|
||||||
path: '/permission',
|
path: '/myself',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/permission/page',
|
redirect: '/myself',
|
||||||
name: 'Permission',
|
|
||||||
meta: {
|
meta: {
|
||||||
alwaysShow: true, // will always show the root menu
|
alwaysShow: true, // will always show the root menu
|
||||||
title: 'Permission',
|
title: '个人项目',
|
||||||
icon: 'lock',
|
icon: 'nested',
|
||||||
roles: ['admin', 'editor','teacher_user', 'xiao_lfeng'] // you can set roles in root nav
|
roles: ['admin', 'teacher_user']
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'page',
|
// 我负责的
|
||||||
component: () => import('@/views/permission/page.vue'),
|
path: 'charge',
|
||||||
name: 'PagePermission',
|
component: () => import('@/views/personal/project/charge.vue'),
|
||||||
meta: {
|
name: 'Charge',
|
||||||
title: 'Page Permission',
|
meta: { title: '我负责的', icon: 'user', affix: true }
|
||||||
roles: ['admin','teacher_user'] // or you can only set roles in sub nav
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'directive',
|
// 我管理的
|
||||||
component: () => import('@/views/permission/directive.vue'),
|
path: 'manage',
|
||||||
name: 'DirectivePermission',
|
component: () => import('@/views/personal/project/manage.vue'),
|
||||||
meta: {
|
name: 'Manage',
|
||||||
title: 'Directive Permission'
|
meta: { title: '我管理的', icon: 'user', affix: true }
|
||||||
// if do not set roles, means: this page does not require permission
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'role',
|
// 我参与的
|
||||||
component: () => import('@/views/permission/role.vue'),
|
path: 'participate',
|
||||||
name: 'RolePermission',
|
component: () => import('@/views/personal/project/participate.vue'),
|
||||||
meta: {
|
name: 'Participate',
|
||||||
title: 'Role Permission',
|
meta: { title: '我参与的', icon: 'user', affix: true }
|
||||||
roles: ['admin','teacher']
|
},
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
path: '/icon',
|
// {
|
||||||
component: Layout,
|
// path: '/icon',
|
||||||
children: [
|
// component: Layout,
|
||||||
{
|
// children: [
|
||||||
path: 'index',
|
// {
|
||||||
component: () => import('@/views/icons/index.vue'),
|
// path: 'index',
|
||||||
name: 'Icons',
|
// component: () => import('@/views/icons/index.vue'),
|
||||||
meta: { title: 'Icons', icon: 'icon', noCache: true }
|
// name: 'Icons',
|
||||||
}
|
// meta: { title: 'Icons', icon: 'icon', noCache: true }
|
||||||
]
|
// }
|
||||||
},
|
// ]
|
||||||
|
// },
|
||||||
|
|
||||||
// /** when your routing map is too long, you can split it into small modules **/
|
// /** when your routing map is too long, you can split it into small modules **/
|
||||||
componentsRouter,
|
// componentsRouter,
|
||||||
chartsRouter,
|
// chartsRouter,
|
||||||
nestedRouter,
|
// nestedRouter,
|
||||||
tableRouter,
|
// tableRouter,
|
||||||
|
|
||||||
|
// {
|
||||||
|
// path: '/example',
|
||||||
|
// component: Layout,
|
||||||
|
// redirect: '/example/list',
|
||||||
|
// name: 'Example',
|
||||||
|
// meta: {
|
||||||
|
// title: 'Example',
|
||||||
|
// icon: markRaw(IconHelp)
|
||||||
|
// },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: 'create',
|
||||||
|
// component: () => import('@/views/example/create.vue'),
|
||||||
|
// name: 'CreateArticle',
|
||||||
|
// meta: { title: 'Create Article', icon: 'edit' }
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'edit/:id(\\d+)',
|
||||||
|
// component: () => import('@/views/example/edit.vue'),
|
||||||
|
// name: 'EditArticle',
|
||||||
|
// meta: { hidden: true, title: 'Edit Article', noCache: true, activeMenu: '/example/list' }
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'list',
|
||||||
|
// component: () => import('@/views/example/list.vue'),
|
||||||
|
// name: 'ArticleList',
|
||||||
|
// meta: { title: 'Article List', icon: 'list' }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/example',
|
path: '/daily',
|
||||||
component: Layout,
|
|
||||||
redirect: '/example/list',
|
|
||||||
name: 'Example',
|
|
||||||
meta: {
|
|
||||||
title: 'Example',
|
|
||||||
icon: markRaw(IconHelp)
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: 'create',
|
|
||||||
component: () => import('@/views/example/create.vue'),
|
|
||||||
name: 'CreateArticle',
|
|
||||||
meta: { title: 'Create Article', icon: 'edit' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'edit/:id(\\d+)',
|
|
||||||
component: () => import('@/views/example/edit.vue'),
|
|
||||||
name: 'EditArticle',
|
|
||||||
meta: { hidden: true, title: 'Edit Article', noCache: true, activeMenu: '/example/list' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'list',
|
|
||||||
component: () => import('@/views/example/list.vue'),
|
|
||||||
name: 'ArticleList',
|
|
||||||
meta: { title: 'Article List', icon: 'list' }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
path: '/tab',
|
|
||||||
component: Layout,
|
component: Layout,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'index',
|
path: 'd',
|
||||||
component: () => import('@/views/tab/index.vue'),
|
component: () => import('@/views/tab/index.vue'),
|
||||||
name: 'Tab',
|
name: 'Tab',
|
||||||
meta: { title: 'Tab', icon: 'tab' }
|
meta: { title: '日报', icon: 'tab' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
// {
|
||||||
path: '/error',
|
// path: '/error',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
redirect: 'noRedirect',
|
// redirect: 'noRedirect',
|
||||||
name: 'ErrorPages',
|
// name: 'ErrorPages',
|
||||||
meta: {
|
// meta: {
|
||||||
title: 'Error Pages',
|
// title: 'Error Pages',
|
||||||
icon: '404'
|
// icon: '404'
|
||||||
},
|
// },
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: '401',
|
// path: '401',
|
||||||
component: () => import('@/views/error-page/401.vue'),
|
// component: () => import('@/views/error-page/401.vue'),
|
||||||
name: 'Page401',
|
// name: 'Page401',
|
||||||
meta: { title: '401', noCache: true }
|
// meta: { title: '401', noCache: true }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '404',
|
// path: '404',
|
||||||
component: () => import('@/views/error-page/404.vue'),
|
// component: () => import('@/views/error-page/404.vue'),
|
||||||
name: 'Page404',
|
// name: 'Page404',
|
||||||
meta: { title: '404', noCache: true }
|
// meta: { title: '404', noCache: true }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/error-log',
|
path: '/message',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'log',
|
path: 'ms',
|
||||||
component: () => import('@/views/error-log/index.vue'),
|
component: () => import('@/views/error-log/index.vue'),
|
||||||
name: 'ErrorLog',
|
name: 'ErrorLog',
|
||||||
meta: { title: 'Error Log', icon: 'bug' }
|
meta: { title: '信息', icon: 'bug' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
// {
|
||||||
path: '/excel',
|
// path: '/excel',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
redirect: '/excel/export-excel',
|
// redirect: '/excel/export-excel',
|
||||||
name: 'Excel',
|
// name: 'Excel',
|
||||||
meta: {
|
// meta: {
|
||||||
title: 'Excel',
|
// title: 'Excel',
|
||||||
icon: 'excel'
|
// icon: 'excel'
|
||||||
},
|
// },
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: 'export-excel',
|
// path: 'export-excel',
|
||||||
component: () => import('@/views/excel/export-excel.vue'),
|
// component: () => import('@/views/excel/export-excel.vue'),
|
||||||
name: 'ExportExcel',
|
// name: 'ExportExcel',
|
||||||
meta: { title: 'Export Excel' }
|
// meta: { title: 'Export Excel' }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: 'export-selected-excel',
|
// path: 'export-selected-excel',
|
||||||
component: () => import('@/views/excel/select-excel.vue'),
|
// component: () => import('@/views/excel/select-excel.vue'),
|
||||||
name: 'SelectExcel',
|
// name: 'SelectExcel',
|
||||||
meta: { title: 'Export Selected' }
|
// meta: { title: 'Export Selected' }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: 'export-merge-header',
|
// path: 'export-merge-header',
|
||||||
component: () => import('@/views/excel/merge-header.vue'),
|
// component: () => import('@/views/excel/merge-header.vue'),
|
||||||
name: 'MergeHeader',
|
// name: 'MergeHeader',
|
||||||
meta: { title: 'Merge Header' }
|
// meta: { title: 'Merge Header' }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: 'upload-excel',
|
// path: 'upload-excel',
|
||||||
component: () => import('@/views/excel/upload-excel.vue'),
|
// component: () => import('@/views/excel/upload-excel.vue'),
|
||||||
name: 'UploadExcel',
|
// name: 'UploadExcel',
|
||||||
meta: { title: 'Upload Excel' }
|
// meta: { title: 'Upload Excel' }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
// {
|
||||||
path: '/zip',
|
// path: '/zip',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
redirect: '/zip/download',
|
// redirect: '/zip/download',
|
||||||
name: 'Zip',
|
// name: 'Zip',
|
||||||
meta: { alwaysShow: true, title: 'Zip', icon: 'zip' },
|
// meta: { alwaysShow: true, title: 'Zip', icon: 'zip' },
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: 'download',
|
// path: 'download',
|
||||||
component: () => import('@/views/zip/index.vue'),
|
// component: () => import('@/views/zip/index.vue'),
|
||||||
name: 'ExportZip',
|
// name: 'ExportZip',
|
||||||
meta: { title: 'Export Zip' }
|
// meta: { title: 'Export Zip' }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
// {
|
||||||
path: '/pdf',
|
// path: '/pdf',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
redirect: '/pdf/index',
|
// redirect: '/pdf/index',
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: 'index',
|
// path: 'index',
|
||||||
component: () => import('@/views/pdf/index.vue'),
|
// component: () => import('@/views/pdf/index.vue'),
|
||||||
name: 'PDF',
|
// name: 'PDF',
|
||||||
meta: { title: 'PDF', icon: 'pdf' }
|
// meta: { title: 'PDF', icon: 'pdf' }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/pdf/download',
|
// path: '/pdf/download',
|
||||||
component: () => import('@/views/pdf/download.vue'),
|
// component: () => import('@/views/pdf/download.vue'),
|
||||||
meta: { hidden: true }
|
// meta: { hidden: true }
|
||||||
},
|
// },
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// path: '/theme',
|
||||||
|
// component: Layout,
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: 'index',
|
||||||
|
// component: () => import('@/views/theme/index.vue'),
|
||||||
|
// name: 'Theme',
|
||||||
|
// meta: { title: 'Theme', icon: 'theme' }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
|
||||||
{
|
// {
|
||||||
path: '/theme',
|
// path: '/clipboard',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: 'index',
|
// path: 'index',
|
||||||
component: () => import('@/views/theme/index.vue'),
|
// component: () => import('@/views/clipboard/index.vue'),
|
||||||
name: 'Theme',
|
// name: 'ClipboardDemo',
|
||||||
meta: { title: 'Theme', icon: 'theme' }
|
// meta: { title: 'Clipboard', icon: 'clipboard' }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
// {
|
||||||
path: '/clipboard',
|
// path: '/external-link',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: 'index',
|
// path: 'https://element-plus.midfar.com',
|
||||||
component: () => import('@/views/clipboard/index.vue'),
|
// meta: { title: 'External Link', icon: 'link' },
|
||||||
name: 'ClipboardDemo',
|
// redirect: ''
|
||||||
meta: { title: 'Clipboard', icon: 'clipboard' }
|
// }
|
||||||
}
|
// ]
|
||||||
]
|
// },
|
||||||
},
|
|
||||||
|
|
||||||
{
|
// {
|
||||||
path: '/external-link',
|
// path: '/my-demo',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
children: [
|
// name: 'MyDemo',
|
||||||
{
|
// meta: {
|
||||||
path: 'https://element-plus.midfar.com',
|
// title: 'MyDemo',
|
||||||
meta: { title: 'External Link', icon: 'link' },
|
// icon: 'component'
|
||||||
redirect: ''
|
// },
|
||||||
}
|
// children: [
|
||||||
]
|
// {
|
||||||
},
|
// path: 'element-demo',
|
||||||
|
// component: () => import('@/views/mydemo/ElementDemo.vue'),
|
||||||
{
|
// name: 'ElementDemo',
|
||||||
path: '/my-demo',
|
// meta: { title: 'ElementDemo', icon: 'skill' }
|
||||||
component: Layout,
|
// },
|
||||||
name: 'MyDemo',
|
// {
|
||||||
meta: {
|
// path: 'store-demo',
|
||||||
title: 'MyDemo',
|
// component: () => import('@/views/mydemo/StoreDemo.vue'),
|
||||||
icon: 'component'
|
// name: 'StoreDemo',
|
||||||
},
|
// meta: { title: 'StoreDemo', icon: 'lock' }
|
||||||
children: [
|
// },
|
||||||
{
|
// {
|
||||||
path: 'element-demo',
|
// path: 'webSocket-demo',
|
||||||
component: () => import('@/views/mydemo/ElementDemo.vue'),
|
// component: () => import('@/views/mydemo/WebSocketDemo.vue'),
|
||||||
name: 'ElementDemo',
|
// name: 'WebSocketDemo',
|
||||||
meta: { title: 'ElementDemo', icon: 'skill' }
|
// meta: { title: 'WebSocketDemo', icon: 'lock' }
|
||||||
},
|
// }
|
||||||
{
|
// ]
|
||||||
path: 'store-demo',
|
// },
|
||||||
component: () => import('@/views/mydemo/StoreDemo.vue'),
|
|
||||||
name: 'StoreDemo',
|
|
||||||
meta: { title: 'StoreDemo', icon: 'lock' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'webSocket-demo',
|
|
||||||
component: () => import('@/views/mydemo/WebSocketDemo.vue'),
|
|
||||||
name: 'WebSocketDemo',
|
|
||||||
meta: { title: 'WebSocketDemo', icon: 'lock' }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
// 404 page must be placed at the end !!!
|
// 404 page must be placed at the end !!!
|
||||||
{ path: '/:pathMatch(.*)*', redirect: '/404', meta: { hidden: true }}
|
{ path: '/:pathMatch(.*)*', redirect: '/404', meta: { hidden: true }}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const Layout = () => import('@/layout/index.vue');
|
const Layout = () => import('@/layout/index.vue');
|
||||||
|
|
||||||
|
//侧边栏
|
||||||
const tableRouter = {
|
const tableRouter = {
|
||||||
path: '/table',
|
path: '/table',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
@ -4,6 +4,7 @@ import { getToken, setToken, removeToken } from '@/utils/auth';
|
|||||||
import router, { resetRouter } from '@/router';
|
import router, { resetRouter } from '@/router';
|
||||||
import tagsViewStore from './tagsView';
|
import tagsViewStore from './tagsView';
|
||||||
import permissionStore from './permission';
|
import permissionStore from './permission';
|
||||||
|
// import {response} from "express";
|
||||||
|
|
||||||
export interface IUserState {
|
export interface IUserState {
|
||||||
token: string;
|
token: string;
|
||||||
@ -57,12 +58,18 @@ export default defineStore({
|
|||||||
const { data } = response;
|
const { data } = response;
|
||||||
this.token = data.token;
|
this.token = data.token;
|
||||||
setToken(data.token);
|
setToken(data.token);
|
||||||
console.log("token", this.token)
|
// console.log("token", this.token)
|
||||||
|
console.log("response", response)
|
||||||
|
// @ts-ignore
|
||||||
|
ElMessage.success(response.message)
|
||||||
router.push('/')
|
router.push('/')
|
||||||
resolve();
|
resolve();
|
||||||
console.log('2222',response)
|
// console.log('2222',response)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log('3333',error)
|
//@ts-ignore
|
||||||
|
// ElMessage.error(response.message)
|
||||||
|
console.log("login ERROR:", error)
|
||||||
|
// console.log('3333',error)
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -77,13 +84,13 @@ export default defineStore({
|
|||||||
if (!data) {
|
if (!data) {
|
||||||
reject('Verification failed, please Login again.');
|
reject('Verification failed, please Login again.');
|
||||||
}
|
}
|
||||||
const { id,username,address,phone,email,age,signature,avatar,nickname,sex,description } = data;
|
const { id,username,address,phone,email,age,signature,avatar,nickname,sex,description,role } = data;
|
||||||
// roles must be a non-empty array
|
// roles must be a non-empty array
|
||||||
// if (!roles || roles.length <= 0) {
|
// if (!roles || roles.length <= 0) {
|
||||||
// reject('getInfo: roles must be a non-null array!');
|
// reject('getInfo: roles must be a non-null array!');
|
||||||
// }
|
// }
|
||||||
this.id = id;
|
this.id = id;
|
||||||
// this.roles = roles;
|
this.roles = role.name;
|
||||||
// this.roles =['admin'];
|
// this.roles =['admin'];
|
||||||
this.username = username;
|
this.username = username;
|
||||||
this.avatar = avatar;
|
this.avatar = avatar;
|
||||||
@ -96,6 +103,7 @@ export default defineStore({
|
|||||||
this.signature = signature;
|
this.signature = signature;
|
||||||
this.nickname = nickname;
|
this.nickname = nickname;
|
||||||
resolve(data);
|
resolve(data);
|
||||||
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
@ -109,9 +117,27 @@ export default defineStore({
|
|||||||
apiLogout(this.token).then(() => {
|
apiLogout(this.token).then(() => {
|
||||||
this.token = '';
|
this.token = '';
|
||||||
this.roles = [];
|
this.roles = [];
|
||||||
console.log('退出',this.token)
|
// console.log('退出',this.token)
|
||||||
removeToken();
|
removeToken();
|
||||||
resetRouter();
|
resetRouter();
|
||||||
|
ElMessage.success("退出成功")
|
||||||
|
// reset visited views and cached views
|
||||||
|
// to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485
|
||||||
|
tagsViewStore().delAllViews();
|
||||||
|
resolve();
|
||||||
|
}).catch(error => {
|
||||||
|
reject(error);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
logoutBug():Promise<void> {
|
||||||
|
console.log("token",this.token)
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
apiLogout(this.token).then(() => {
|
||||||
|
this.token = '';
|
||||||
|
this.roles = [];
|
||||||
|
resetRouter();
|
||||||
// reset visited views and cached views
|
// reset visited views and cached views
|
||||||
// to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485
|
// to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485
|
||||||
tagsViewStore().delAllViews();
|
tagsViewStore().delAllViews();
|
||||||
@ -119,8 +145,30 @@ export default defineStore({
|
|||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
logoutTest(): void {
|
||||||
|
removeToken();
|
||||||
|
console.log("removeTokenTestSuccess");
|
||||||
|
// console.log("token",this.token)
|
||||||
|
// return new Promise((resolve, reject) => {
|
||||||
|
// apiLogout(this.token).then(() => {
|
||||||
|
// this.token = '';
|
||||||
|
// this.roles = [];
|
||||||
|
// console.log('退出',this.token)
|
||||||
|
// // removeToken();
|
||||||
|
// resetRouter();
|
||||||
|
// // reset visited views and cached views
|
||||||
|
// // to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485
|
||||||
|
// tagsViewStore().delAllViews();
|
||||||
|
// resolve();
|
||||||
|
// }).catch(error => {
|
||||||
|
// reject(error);
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
|
||||||
// remove token
|
// remove token
|
||||||
resetToken() {
|
resetToken() {
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
|
import {useRouter} from 'vue-router'
|
||||||
import {getToken, removeToken} from '@/utils/auth';
|
import {getToken, removeToken} from '@/utils/auth';
|
||||||
|
import {resetRouter} from "@/router";
|
||||||
|
|
||||||
const BaseURL ='https://nbxt.oa.x-lf.cn'
|
const BaseURL ='https://nbxt.oa.x-lf.cn'
|
||||||
|
const router = useRouter();
|
||||||
// create an axios instance
|
// create an axios instance
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: BaseURL, // url = base url + request url
|
baseURL: BaseURL, // url = base url + request url
|
||||||
@ -47,31 +50,42 @@ service.interceptors.response.use(
|
|||||||
response => {
|
response => {
|
||||||
const res = response.data;
|
const res = response.data;
|
||||||
// console.log("removeToken:",removeToken())
|
// console.log("removeToken:",removeToken())
|
||||||
console.log('999999',response)
|
console.log('999999',res)
|
||||||
// if the custom code is not 20000, it is judged as an error.
|
if (res.code === 40103) {
|
||||||
if (res.code !== 20000 && res.code !== 200) {
|
store.user().logoutTest();
|
||||||
ElMessage({
|
console.log("返回登录成功")
|
||||||
message: res.message || 'Error',
|
location.reload();
|
||||||
type: 'error',
|
|
||||||
duration: 5 * 1000
|
|
||||||
});
|
|
||||||
|
|
||||||
// 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
|
// resetRouter()
|
||||||
if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
|
// router.push("/login")
|
||||||
// to re-login
|
} else if (res.code !== 200) {
|
||||||
ElMessageBox.confirm('You have been logged out, you can cancel to stay on this page, or log in again', 'Confirm logout', {
|
ElMessage.error(res.message)
|
||||||
confirmButtonText: 'Re-Login',
|
|
||||||
cancelButtonText: 'Cancel',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
store.user().resetToken();
|
|
||||||
location.reload();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error(res.message || 'Error'));
|
|
||||||
} else {
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
// if the custom code is not 20000, it is judged as an error.
|
||||||
|
// if (res.code !== 20000 && res.code !== 200) {
|
||||||
|
// ElMessage({
|
||||||
|
// message: res.message || 'Error',
|
||||||
|
// type: 'error',
|
||||||
|
// duration: 5 * 1000
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
|
||||||
|
// if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
|
||||||
|
// // to re-login
|
||||||
|
// ElMessageBox.confirm('You have been logged out, you can cancel to stay on this page, or log in again', 'Confirm logout', {
|
||||||
|
// confirmButtonText: 'Re-Login',
|
||||||
|
// cancelButtonText: 'Cancel',
|
||||||
|
// type: 'warning'
|
||||||
|
// }).then(() => {
|
||||||
|
// store.user().resetToken();
|
||||||
|
// location.reload();
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// return Promise.reject(new Error(res.message || 'Error'));
|
||||||
|
// } else {
|
||||||
|
// return res;
|
||||||
|
// }
|
||||||
|
return res;
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log('err' + error); // for debug
|
console.log('err' + error); // for debug
|
||||||
|
@ -15,7 +15,7 @@ export function isExternal(path) {
|
|||||||
* @returns {Boolean}
|
* @returns {Boolean}
|
||||||
*/
|
*/
|
||||||
export function validUsername(str) {
|
export function validUsername(str) {
|
||||||
const valid_map = ['admin', 'editor', 'teacher_user', 'xiao_lfeng'];
|
const valid_map = ['admin', 'editor', 'teacher_user', 'teacher_demo', 'demo', 'xiao_lfeng', 'yangna'];
|
||||||
return valid_map.indexOf(str.trim()) >= 0;
|
return valid_map.indexOf(str.trim()) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ import Upload from '@/components/Upload/SingleImage3';
|
|||||||
import MDinput from '@/components/MDinput';
|
import MDinput from '@/components/MDinput';
|
||||||
import Sticky from '@/components/Sticky'; // 粘性header组件
|
import Sticky from '@/components/Sticky'; // 粘性header组件
|
||||||
import { validURL } from '@/utils/validate';
|
import { validURL } from '@/utils/validate';
|
||||||
import { fetchArticle } from '@/api/article';
|
import { fetchArticle } from '@/api/project';
|
||||||
import { searchUser } from '@/api/remote-search';
|
import { searchUser } from '@/api/remote-search';
|
||||||
import Warning from './Warning';
|
import Warning from './Warning';
|
||||||
import { CommentDropdown, PlatformDropdown, SourceUrlDropdown } from './Dropdown';
|
import { CommentDropdown, PlatformDropdown, SourceUrlDropdown } from './Dropdown';
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { parseTime } from '@/utils';
|
import { parseTime } from '@/utils';
|
||||||
import { fetchList } from '@/api/article';
|
import { fetchList } from '@/api/project';
|
||||||
import Pagination from '@/components/Pagination'; // Secondary package based on el-pagination
|
import Pagination from '@/components/Pagination'; // Secondary package based on el-pagination
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { defineComponent, markRaw } from 'vue';
|
import { defineComponent, markRaw } from 'vue';
|
||||||
import { fetchList } from '@/api/article';
|
import { fetchList } from '@/api/project';
|
||||||
import { parseTime } from '@/utils';
|
import { parseTime } from '@/utils';
|
||||||
// options components
|
// options components
|
||||||
import FilenameOption from './components/FilenameOption';
|
import FilenameOption from './components/FilenameOption';
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { defineComponent, markRaw } from 'vue';
|
import { defineComponent, markRaw } from 'vue';
|
||||||
import { fetchList } from '@/api/article';
|
import { fetchList } from '@/api/project';
|
||||||
import { parseTime } from '@/utils';
|
import { parseTime } from '@/utils';
|
||||||
import { Document as IconDocument, Timer as IconTimer } from '@element-plus/icons-vue';
|
import { Document as IconDocument, Timer as IconTimer } from '@element-plus/icons-vue';
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { defineComponent, markRaw } from 'vue';
|
import { defineComponent, markRaw } from 'vue';
|
||||||
import { fetchList } from '@/api/article';
|
import { fetchList } from '@/api/project';
|
||||||
import { Document as IconDocument, Timer as IconTimer } from '@element-plus/icons-vue';
|
import { Document as IconDocument, Timer as IconTimer } from '@element-plus/icons-vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
417
src/views/login/Register.vue
Normal file
417
src/views/login/Register.vue
Normal file
@ -0,0 +1,417 @@
|
|||||||
|
<!--<template>-->
|
||||||
|
<!-- <div>-->
|
||||||
|
<!-- <div class="container">-->
|
||||||
|
<!-- <div class="forms-container">-->
|
||||||
|
<!-- <div class="signin-signup">-->
|
||||||
|
<!-- <a-card style="width: 25vw; display: flex; margin-left: 10vw; justify-content: center; background-color: #f9f9f9">-->
|
||||||
|
<!-- <h1 style="display: flex; justify-content: center; font-weight: bold; font-size: large; margin-top:2vh">用户注册</h1>-->
|
||||||
|
<!-- <a-form-->
|
||||||
|
<!-- :label-col="{ span: 6 }"-->
|
||||||
|
<!-- :model="formState"-->
|
||||||
|
<!-- autocomplete="off"-->
|
||||||
|
<!-- name="basic"-->
|
||||||
|
<!-- style="margin-top: 3vh"-->
|
||||||
|
<!-- @finish="onFinish"-->
|
||||||
|
<!-- @finishFailed="onFinishFailed"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <a-form-item-->
|
||||||
|
<!-- :rules="[{ required: true, message: '请输入您的用户名!' }]"-->
|
||||||
|
<!-- label="用户名"-->
|
||||||
|
<!-- name="username"-->
|
||||||
|
<!-- style="margin-top: 20px;"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <a-input v-model:value="formState.username" class="h-10 w-64 border-gray-300 rounded-md" type="text"/>-->
|
||||||
|
<!-- </a-form-item>-->
|
||||||
|
<!-- <a-form-item-->
|
||||||
|
<!-- :rules="[{ required: true, message: '请输入您的密码!' }]"-->
|
||||||
|
<!-- label="用户密码"-->
|
||||||
|
<!-- name="password"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <a-input v-model:value="formState.password" class="h-10 w-64 border-gray-300 rounded-md" type="password" />-->
|
||||||
|
<!-- </a-form-item>-->
|
||||||
|
<!-- <a-form-item-->
|
||||||
|
<!-- :rules="[{ required: true, message: '请输入家庭地址!' }]"-->
|
||||||
|
<!-- label="家庭地址"-->
|
||||||
|
<!-- name="address"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <a-input v-model:value="formState.address" class="h-10 w-64 border-gray-300 rounded-md" type="text" />-->
|
||||||
|
<!-- </a-form-item>-->
|
||||||
|
<!-- <a-form-item-->
|
||||||
|
<!-- :rules="[{ required: true, message: '请输入手机号码!' }]"-->
|
||||||
|
<!-- label="手机号"-->
|
||||||
|
<!-- name="phone"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <a-input v-model:value="formState.phone" class="h-10 w-64 border-gray-300 rounded-md" type="text" />-->
|
||||||
|
<!-- </a-form-item>-->
|
||||||
|
<!-- <a-form-item-->
|
||||||
|
<!-- :rules="[{ required: true, message: '请输入邮箱!' }]"-->
|
||||||
|
<!-- label="邮箱"-->
|
||||||
|
<!-- name="email"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <a-input v-model:value="formState.email" class="h-10 w-64 border-gray-300 rounded-md" type="email" />-->
|
||||||
|
<!-- </a-form-item>-->
|
||||||
|
<!-- <a-form-item-->
|
||||||
|
<!-- :rules="[{ required: true, message: '请输入年龄!' }]"-->
|
||||||
|
<!-- label="年龄"-->
|
||||||
|
<!-- name="age"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <a-input-number v-model:value="formState.age" class="h-10 w-64 border-gray-300 rounded-md" />-->
|
||||||
|
<!-- </a-form-item>-->
|
||||||
|
<!-- <a-form-item-->
|
||||||
|
<!-- :rules="[{ required: true, message: '请输入性别!' }]"-->
|
||||||
|
<!-- label="性别"-->
|
||||||
|
<!-- name="sex"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <a-radio-group v-model:value="formState.sex">-->
|
||||||
|
<!-- <a-radio :value="0">保密</a-radio>-->
|
||||||
|
<!-- <a-radio :value="1">男</a-radio>-->
|
||||||
|
<!-- <a-radio :value="2">女</a-radio>-->
|
||||||
|
<!-- </a-radio-group>-->
|
||||||
|
<!-- </a-form-item>-->
|
||||||
|
<!-- <a-form-item :wrapper-col="{ offset: 6, span: 16 }" style="margin-top: 4vh">-->
|
||||||
|
<!-- <a-button html-type="submit" style="background-color: dodgerblue; color: white;width: 10vw" type="primary" @click="registerUser">立即注册</a-button>-->
|
||||||
|
<!-- </a-form-item>-->
|
||||||
|
<!-- </a-form>-->
|
||||||
|
<!-- </a-card>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
<!-- <div class="panels-container">-->
|
||||||
|
<!-- <div class="panel left-panel">-->
|
||||||
|
<!-- <div class="content">-->
|
||||||
|
<!-- <h3>加入我们</h3>-->
|
||||||
|
<!-- <p>-->
|
||||||
|
<!-- 加入我们,成为团队的一份子。-->
|
||||||
|
<!-- </p>-->
|
||||||
|
<!-- <button id="sign-up-btn" class="btn transparent" @click="$router.push('/login')">-->
|
||||||
|
<!-- 去登录-->
|
||||||
|
<!-- </button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <!– <img src="log.svg" class="image" alt="" />–>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
|
||||||
|
<!--</template>-->
|
||||||
|
<template>
|
||||||
|
注册
|
||||||
|
</template>
|
||||||
|
<!--<script setup>-->
|
||||||
|
<!--import {reactive} from 'vue';-->
|
||||||
|
<!--import requests from '@/js/request.js'-->
|
||||||
|
<!--// import {message} from "ant-design-vue";-->
|
||||||
|
<!--import {useRouter} from "vue-router";-->
|
||||||
|
|
||||||
|
<!--const router = useRouter()-->
|
||||||
|
|
||||||
|
<!--message.config({-->
|
||||||
|
<!-- background: true-->
|
||||||
|
<!--})-->
|
||||||
|
|
||||||
|
<!--const formState = reactive({-->
|
||||||
|
<!-- username: '',-->
|
||||||
|
<!-- password: '',-->
|
||||||
|
<!-- address:'',-->
|
||||||
|
<!-- phone:'',-->
|
||||||
|
<!-- email:'',-->
|
||||||
|
<!-- sex:'',-->
|
||||||
|
<!-- age:0,-->
|
||||||
|
<!--});-->
|
||||||
|
<!--const onFinish = values => {-->
|
||||||
|
<!-- console.log('Success:', values);-->
|
||||||
|
<!--};-->
|
||||||
|
<!--const onFinishFailed = errorInfo => {-->
|
||||||
|
<!-- console.log('Failed:', errorInfo);-->
|
||||||
|
<!--};-->
|
||||||
|
|
||||||
|
<!--function registerUser() {-->
|
||||||
|
|
||||||
|
<!-- formState.sex = parseInt(formState.sex)-->
|
||||||
|
<!-- console.log("registerData:",formState)-->
|
||||||
|
<!-- requests.register(formState).then((res) => {-->
|
||||||
|
<!-- console.log("registerData:",formState)-->
|
||||||
|
<!-- console.log("registerResult:",res)-->
|
||||||
|
<!-- if (res.data.code === 200) {-->
|
||||||
|
<!-- //注册成功,提示+跳转页面-->
|
||||||
|
<!-- console.log('注册成功')-->
|
||||||
|
<!-- message.success('注册成功')-->
|
||||||
|
<!-- router.push("/login")-->
|
||||||
|
<!-- } else {-->
|
||||||
|
<!-- //注册失败,消息提示-->
|
||||||
|
<!-- console.log('注册失败')-->
|
||||||
|
<!-- }-->
|
||||||
|
<!-- console.log(res)-->
|
||||||
|
<!-- })-->
|
||||||
|
<!--}-->
|
||||||
|
|
||||||
|
<!--</script>-->
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body,
|
||||||
|
input {
|
||||||
|
font-family: "Poppins", sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.signin-signup {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
left: 75%;
|
||||||
|
width: 50%;
|
||||||
|
transition: 1s 0.7s ease-in-out;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width: 150px;
|
||||||
|
background-color: #5995fd;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
height: 49px;
|
||||||
|
border-radius: 49px;
|
||||||
|
color: #fff;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: 600;
|
||||||
|
margin: 10px 0;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:hover {
|
||||||
|
background-color: #4d84e2;
|
||||||
|
}
|
||||||
|
.panels-container {
|
||||||
|
position: absolute;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container:before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
height: 2000px;
|
||||||
|
width: 2000px;
|
||||||
|
top: -10%;
|
||||||
|
right: 48%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
background-image: linear-gradient(-45deg, #4481eb 0%, #04befe 100%);
|
||||||
|
transition: 1.8s ease-in-out;
|
||||||
|
border-radius: 50%;
|
||||||
|
z-index: 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
width: 100%;
|
||||||
|
transition: transform 1.1s ease-in-out;
|
||||||
|
transition-delay: 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-end;
|
||||||
|
justify-content: space-around;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-panel {
|
||||||
|
pointer-events: all;
|
||||||
|
padding: 3rem 17% 2rem 12%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.panel .content {
|
||||||
|
color: #fff;
|
||||||
|
transition: transform 0.9s ease-in-out;
|
||||||
|
transition-delay: 0.6s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel h3 {
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel p {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
padding: 0.7rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.transparent {
|
||||||
|
margin: 0;
|
||||||
|
background: none;
|
||||||
|
border: 2px solid #fff;
|
||||||
|
width: 130px;
|
||||||
|
height: 41px;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-panel .image,
|
||||||
|
.right-panel .content {
|
||||||
|
transform: translateX(800px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ANIMATION */
|
||||||
|
|
||||||
|
.container.sign-up-mode .left-panel .image,
|
||||||
|
.container.sign-up-mode .left-panel .content {
|
||||||
|
transform: translateX(-800px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.sign-up-mode .signin-signup {
|
||||||
|
left: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.sign-up-mode form.sign-in-form {
|
||||||
|
opacity: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.sign-up-mode .right-panel .image,
|
||||||
|
.container.sign-up-mode .right-panel .content {
|
||||||
|
transform: translateX(0%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.sign-up-mode .left-panel {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (max-width: 870px) {
|
||||||
|
.container {
|
||||||
|
min-height: 800px;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
.signin-signup {
|
||||||
|
width: 100%;
|
||||||
|
top: 95%;
|
||||||
|
transform: translate(-50%, -100%);
|
||||||
|
transition: 1s 0.8s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signin-signup,
|
||||||
|
.container.sign-up-mode .signin-signup {
|
||||||
|
left: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panels-container {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
grid-template-rows: 1fr 2fr 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
padding: 2.5rem 8%;
|
||||||
|
grid-column: 1 / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.left-panel {
|
||||||
|
grid-row: 1 / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
width: 200px;
|
||||||
|
transition: transform 0.9s ease-in-out;
|
||||||
|
transition-delay: 0.6s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel .content {
|
||||||
|
padding-right: 15%;
|
||||||
|
transition: transform 0.9s ease-in-out;
|
||||||
|
transition-delay: 0.8s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel h3 {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel p {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
padding: 0.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.transparent {
|
||||||
|
width: 110px;
|
||||||
|
height: 35px;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container:before {
|
||||||
|
width: 1500px;
|
||||||
|
height: 1500px;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
left: 30%;
|
||||||
|
bottom: 68%;
|
||||||
|
right: initial;
|
||||||
|
top: initial;
|
||||||
|
transition: 2s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.container.sign-up-mode .left-panel .image,
|
||||||
|
.container.sign-up-mode .left-panel .content {
|
||||||
|
transform: translateY(-300px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.sign-up-mode .right-panel .image,
|
||||||
|
.container.sign-up-mode .right-panel .content {
|
||||||
|
transform: translateY(0px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-panel .image,
|
||||||
|
.right-panel .content {
|
||||||
|
transform: translateY(300px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.sign-up-mode .signin-signup {
|
||||||
|
top: 5%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 570px) {
|
||||||
|
form {
|
||||||
|
padding: 0 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.panel .content {
|
||||||
|
padding: 0.5rem 1rem;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
padding: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container:before {
|
||||||
|
bottom: 72%;
|
||||||
|
left: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,65 +1,92 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login-container">
|
<div>
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" autocomplete="on"
|
<div class="container">
|
||||||
label-position="left">
|
<div class="forms-container">
|
||||||
|
<div class="signin-signup">
|
||||||
|
<a-card class="sign-in-form" style="width: 25vw;margin-left: 10vw; display: flex; justify-content: center; align-items: center; background-color: #f9f9f9" >
|
||||||
|
<div class="login-container">
|
||||||
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" autocomplete="on"
|
||||||
|
label-position="left">
|
||||||
|
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<h3 class="title">Login Form</h3>
|
<h3 class="title">Login Form</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username" style="margin-bottom: 20px; margin-top: 20px; background-color: #C5C5C53C ">
|
||||||
<span class="svg-container">
|
<span class="svg-container">
|
||||||
<svg-icon icon-class="user" />
|
<svg-icon icon-class="user" />
|
||||||
</span>
|
</span>
|
||||||
<el-input ref="username" v-model="loginForm.username" placeholder="Username" name="username" type="text"
|
<el-input ref="username" v-model="loginForm.username" placeholder="Username" name="username" type="text"
|
||||||
tabindex="1" autocomplete="on" />
|
tabindex="1" autocomplete="on" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-tooltip v-model="capsTooltip" content="Caps lock is On" placement="right" manual>
|
<el-tooltip v-model="capsTooltip" content="Caps lock is On" placement="right" manual>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password" style="margin-bottom: 20px; background-color: rgba(197,197,197,0.24)">
|
||||||
<span class="svg-container">
|
<span class="svg-container">
|
||||||
<svg-icon icon-class="password" />
|
<svg-icon icon-class="password" />
|
||||||
</span>
|
</span>
|
||||||
<el-input :key="passwordType" ref="password" v-model="loginForm.password" :type="passwordType"
|
<el-input :key="passwordType" ref="password" v-model="loginForm.password" :type="passwordType"
|
||||||
placeholder="Password" name="password" tabindex="2" autocomplete="on" @keyup="checkCapslock"
|
placeholder="Password" name="password" tabindex="2" autocomplete="on" @keyup="checkCapslock"
|
||||||
@blur="capsTooltip = false" @keyup.enter="handleLogin" />
|
@blur="capsTooltip = false" @keyup.enter="handleLogin" />
|
||||||
<span class="show-pwd" @click="showPwd">
|
<span class="show-pwd" @click="showPwd">
|
||||||
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
|
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.prevent="handleLogin">
|
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.prevent="handleLogin">
|
||||||
Login</el-button>
|
Login</el-button>
|
||||||
|
|
||||||
<div style="position:relative">
|
<div style="position:relative; margin-top: 20px">
|
||||||
<div class="tips">
|
<!-- <div class="tips">-->
|
||||||
<span>Username : admin</span>
|
<!-- <span>Username : admin</span>-->
|
||||||
<span>Password : any</span>
|
<!-- <span>Password : any</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="tips">
|
<!-- <div class="tips">-->
|
||||||
<span style="margin-right:18px;">Username : editor</span>
|
<!-- <span style="margin-right:18px;">Username : editor</span>-->
|
||||||
<span>Password : any</span>
|
<!-- <span>Password : any</span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
<el-button class="thirdparty-button" type="primary" @click="showDialog = true">
|
||||||
|
Or connect with
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-dialog title="Or connect with" v-model="showDialog">
|
||||||
|
Can not be simulated on local, so please combine you own business simulation! ! !
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<social-sign />
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</a-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panels-container">
|
||||||
|
<div class="panel left-panel">
|
||||||
|
<div class="content">
|
||||||
|
<h3>加入我们</h3>
|
||||||
|
<p>
|
||||||
|
加入我们,成为团队的一份子。
|
||||||
|
</p>
|
||||||
|
<button class="btn transparent" id="sign-up-btn" @click="SendRegister">
|
||||||
|
去注册
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!-- <img src="log.svg" class="image" alt="" />-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-button class="thirdparty-button" type="primary" @click="showDialog = true">
|
|
||||||
Or connect with
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-dialog title="Or connect with" v-model="showDialog">
|
|
||||||
Can not be simulated on local, so please combine you own business simulation! ! !
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<social-sign />
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { validUsername } from '@/utils/validate';
|
// import { validUsername } from '@/utils/validate';
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import SocialSign from './components/SocialSignin.vue';
|
import SocialSign from './components/SocialSignin.vue';
|
||||||
import type { FormItemRule } from 'element-plus';
|
import type { FormItemRule } from 'element-plus';
|
||||||
@ -71,11 +98,11 @@ export default defineComponent({
|
|||||||
components: { SocialSign },
|
components: { SocialSign },
|
||||||
data() {
|
data() {
|
||||||
const validateUsername: FormItemRule['validator'] = (_rule, value, callback) => {
|
const validateUsername: FormItemRule['validator'] = (_rule, value, callback) => {
|
||||||
if (!validUsername(value)) {
|
// if (!validUsername(value)) {
|
||||||
callback(new Error('Please enter the correct user name'));
|
// callback(new Error('Please enter the correct user name'));
|
||||||
} else {
|
// } else {
|
||||||
callback();
|
callback();
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
const validatePassword: FormItemRule['validator'] = (_rule, value, callback) => {
|
const validatePassword: FormItemRule['validator'] = (_rule, value, callback) => {
|
||||||
if (value.length < 6) {
|
if (value.length < 6) {
|
||||||
@ -166,7 +193,10 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
}
|
},
|
||||||
|
SendRegister(){
|
||||||
|
this.$router.push("/register")
|
||||||
|
}
|
||||||
// afterQRScan() {
|
// afterQRScan() {
|
||||||
// if (e.key === 'x-admin-oauth-code') {
|
// if (e.key === 'x-admin-oauth-code') {
|
||||||
// const code = getQueryObject(e.newValue)
|
// const code = getQueryObject(e.newValue)
|
||||||
@ -193,7 +223,7 @@ export default defineComponent({
|
|||||||
/* 修复input 背景不协调 和光标变色 */
|
/* 修复input 背景不协调 和光标变色 */
|
||||||
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
|
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
|
||||||
|
|
||||||
$bg: #283443;
|
$bg: #ffffff;
|
||||||
$light_gray: #fff;
|
$light_gray: #fff;
|
||||||
$cursor: #fff;
|
$cursor: #fff;
|
||||||
|
|
||||||
@ -214,12 +244,12 @@ $cursor: #fff;
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
border-radius: 0px;
|
border-radius: 20px;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
padding: 12px 5px 12px 15px;
|
padding: 7px 0px 0px 10px;
|
||||||
color: $light_gray;
|
color: $light_gray;
|
||||||
height: 47px;
|
height: 47px;
|
||||||
caret-color: $cursor;
|
caret-color: $cursor;
|
||||||
@ -233,17 +263,17 @@ $cursor: #fff;
|
|||||||
|
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
background: rgba(0, 0, 0, 0.1);
|
background: rgba(213, 23, 23, 0.1);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
color: #454545;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$bg: #2d3a4b;
|
$bg: rgba(110, 103, 103, 0.02);
|
||||||
$dark_gray: #889aa4;
|
$dark_gray: #889aa4;
|
||||||
$light_gray: #eee;
|
$light_gray: rgb(64, 158, 255);
|
||||||
|
|
||||||
.login-container {
|
.login-container {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
@ -255,7 +285,7 @@ $light_gray: #eee;
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: 520px;
|
width: 520px;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
padding: 160px 35px 0;
|
padding: 50px 35px 50px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
@ -286,7 +316,7 @@ $light_gray: #eee;
|
|||||||
.title {
|
.title {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
color: $light_gray;
|
color: $light_gray;
|
||||||
margin: 0px auto 40px auto;
|
margin: 0px auto 0px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@ -315,3 +345,270 @@ $light_gray: #eee;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body,
|
||||||
|
input {
|
||||||
|
font-family: "Poppins", sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signin-signup {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
left: 75%;
|
||||||
|
width: 50%;
|
||||||
|
transition: 1s 0.7s ease-in-out;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
z-index: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width: 150px;
|
||||||
|
background-color: #5995fd;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
height: 49px;
|
||||||
|
border-radius: 49px;
|
||||||
|
color: #fff;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: 600;
|
||||||
|
margin: 10px 0;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:hover {
|
||||||
|
background-color: #4d84e2;
|
||||||
|
}
|
||||||
|
.panels-container {
|
||||||
|
position: absolute;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container:before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
height: 1500px;
|
||||||
|
width: 1500px;
|
||||||
|
top: -10%;
|
||||||
|
right: 48%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
background-image: linear-gradient(-45deg, #4481eb 0%, #04befe 100%);
|
||||||
|
transition: 1.8s ease-in-out;
|
||||||
|
border-radius: 50%;
|
||||||
|
z-index: 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
width: 100%;
|
||||||
|
transition: transform 1.1s ease-in-out;
|
||||||
|
transition-delay: 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-end;
|
||||||
|
justify-content: space-around;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-panel {
|
||||||
|
pointer-events: all;
|
||||||
|
padding: 3rem 17% 2rem 12%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.panel .content {
|
||||||
|
color: #fff;
|
||||||
|
transition: transform 0.9s ease-in-out;
|
||||||
|
transition-delay: 0.6s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel h3 {
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 1;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel p {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
padding: 0.7rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.transparent {
|
||||||
|
margin: 0;
|
||||||
|
background: none;
|
||||||
|
border: 2px solid #fff;
|
||||||
|
width: 130px;
|
||||||
|
height: 41px;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-panel .image,
|
||||||
|
.right-panel .content {
|
||||||
|
transform: translateX(800px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ANIMATION */
|
||||||
|
|
||||||
|
.container.sign-up-mode .left-panel .image,
|
||||||
|
.container.sign-up-mode .left-panel .content {
|
||||||
|
transform: translateX(-800px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.sign-up-mode .signin-signup {
|
||||||
|
left: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.sign-up-mode form.sign-in-form {
|
||||||
|
opacity: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.sign-up-mode .right-panel .image,
|
||||||
|
.container.sign-up-mode .right-panel .content {
|
||||||
|
transform: translateX(0%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.sign-up-mode .left-panel {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (max-width: 870px) {
|
||||||
|
.container {
|
||||||
|
min-height: 800px;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
.signin-signup {
|
||||||
|
width: 100%;
|
||||||
|
top: 95%;
|
||||||
|
transform: translate(-50%, -100%);
|
||||||
|
transition: 1s 0.8s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signin-signup,
|
||||||
|
.container.sign-up-mode .signin-signup {
|
||||||
|
left: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panels-container {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
grid-template-rows: 1fr 2fr 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
padding: 2.5rem 8%;
|
||||||
|
grid-column: 1 / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.left-panel {
|
||||||
|
grid-row: 1 / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
width: 200px;
|
||||||
|
transition: transform 0.9s ease-in-out;
|
||||||
|
transition-delay: 0.6s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel .content {
|
||||||
|
padding-right: 15%;
|
||||||
|
transition: transform 0.9s ease-in-out;
|
||||||
|
transition-delay: 0.8s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel h3 {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel p {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
padding: 0.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn.transparent {
|
||||||
|
width: 110px;
|
||||||
|
height: 35px;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container:before {
|
||||||
|
width: 1500px;
|
||||||
|
height: 1500px;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
left: 30%;
|
||||||
|
bottom: 68%;
|
||||||
|
right: initial;
|
||||||
|
top: initial;
|
||||||
|
transition: 2s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.container.sign-up-mode .left-panel .image,
|
||||||
|
.container.sign-up-mode .left-panel .content {
|
||||||
|
transform: translateY(-300px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.sign-up-mode .right-panel .image,
|
||||||
|
.container.sign-up-mode .right-panel .content {
|
||||||
|
transform: translateY(0px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-panel .image,
|
||||||
|
.right-panel .content {
|
||||||
|
transform: translateY(300px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.sign-up-mode .signin-signup {
|
||||||
|
top: 5%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 570px) {
|
||||||
|
form {
|
||||||
|
padding: 0 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.panel .content {
|
||||||
|
padding: 0.5rem 1rem;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
padding: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container:before {
|
||||||
|
bottom: 72%;
|
||||||
|
left: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
565
src/views/personal/project/charge.vue
Normal file
565
src/views/personal/project/charge.vue
Normal file
@ -0,0 +1,565 @@
|
|||||||
|
<template>
|
||||||
|
<el-card style="max-width: 100vw;margin: 1.5vw;">
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<span>项目1</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div style="display: flex; gap: 100px">
|
||||||
|
<el-input
|
||||||
|
v-model="input1"
|
||||||
|
style="width: 550px"
|
||||||
|
placeholder="请输入"
|
||||||
|
>
|
||||||
|
<template #prepend>名称</template>
|
||||||
|
</el-input>
|
||||||
|
<el-input
|
||||||
|
v-model="input2"
|
||||||
|
style="width: 550px"
|
||||||
|
placeholder="请输入"
|
||||||
|
>
|
||||||
|
<template #prepend>状态</template>
|
||||||
|
</el-input>
|
||||||
|
<div>
|
||||||
|
<el-button-group>
|
||||||
|
<el-button type="primary">查询</el-button>
|
||||||
|
<el-button>重置</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<template #footer>Footer content</template>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="max-width: 100vw;margin: 1.5vw;">
|
||||||
|
<div>
|
||||||
|
<el-table :data="tableData" ref="multipleTableRef" style="width: 100%">
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column prop="id" label="序号">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ row.id }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="name" label="项目名称">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ row.name }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="address" label="工作量">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ row.id }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="cycle" label="周期">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ row.cycle }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="principal_id" label="负责人">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ row.principal_id }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="status" label="状态">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ row.status }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="tags" label="标签">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ row.tags }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="file" label="文档(点击下载">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ row.file }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="address" label="项目简介">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ row.id }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="deadline" label="截止时间">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ row.deadline }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="address" label="操作">
|
||||||
|
<el-button text>
|
||||||
|
查看详情
|
||||||
|
</el-button>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; justify-content: center;margin-top: 2vh">
|
||||||
|
<el-pagination background layout="prev, pager, next" :total="1000" />
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { ElTable } from 'element-plus';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
import {
|
||||||
|
GetProject,
|
||||||
|
GetProjectInfo
|
||||||
|
} from '@/api/project';
|
||||||
|
|
||||||
|
const input1 = ref('');
|
||||||
|
const input2 = ref('');
|
||||||
|
/* interface User {
|
||||||
|
date: string
|
||||||
|
name: string
|
||||||
|
address: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const multipleTableRef = ref<InstanceType<typeof ElTable>>();
|
||||||
|
const multipleSelection = ref<User[]>([]);
|
||||||
|
|
||||||
|
const handleSelectionChange = (val: User[]) => {
|
||||||
|
multipleSelection.value = val;
|
||||||
|
};
|
||||||
|
const tableData = [
|
||||||
|
{
|
||||||
|
date: '2016-05-03',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-02',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-04',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-01',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles',
|
||||||
|
},
|
||||||
|
]; */
|
||||||
|
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name:'projectTable',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableData:[],
|
||||||
|
listLoading: false,
|
||||||
|
token: window.localStorage.getItem('token'),
|
||||||
|
projId:''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true;
|
||||||
|
GetProject(this.projId,this.token).then(response => {
|
||||||
|
this.tableData = response.data.data;
|
||||||
|
// Just to simulate the time of the request
|
||||||
|
setTimeout(() => {
|
||||||
|
this.listLoading = false;
|
||||||
|
}, 1.5 * 1000);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<div class="filter-container">
|
||||||
|
<el-input v-model="listQuery.title" placeholder="Title" style="width: 200px;" class="filter-item" @keyup.enter="handleFilter" />
|
||||||
|
<el-select v-model="listQuery.importance" placeholder="Imp" clearable style="width: 90px" class="filter-item">
|
||||||
|
<el-option v-for="item in importanceOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
<el-select v-model="listQuery.type" placeholder="Type" clearable class="filter-item" style="width: 130px">
|
||||||
|
<el-option v-for="item in calendarTypeOptions" :key="item.key" :label="item.display_name+'('+item.key+')'" :value="item.key" />
|
||||||
|
</el-select>
|
||||||
|
<el-select v-model="listQuery.sort" style="width: 140px" class="filter-item" @change="handleFilter">
|
||||||
|
<el-option v-for="item in sortOptions" :key="item.key" :label="item.label" :value="item.key" />
|
||||||
|
</el-select>
|
||||||
|
<el-button class="filter-item" type="primary" :icon="iconSearch" @click="handleFilter">
|
||||||
|
<span v-waves>Search</span>
|
||||||
|
</el-button>
|
||||||
|
<el-button class="filter-item" style="margin-left: 10px;" type="primary" :icon="iconEdit" @click="handleCreate">
|
||||||
|
Add
|
||||||
|
</el-button>
|
||||||
|
<el-button :loading="downloadLoading" class="filter-item" type="primary" :icon="iconDownload" @click="handleDownload">
|
||||||
|
<span v-waves>Export</span>
|
||||||
|
</el-button>
|
||||||
|
<el-checkbox v-model="showReviewer" class="filter-item" style="margin-left:15px;" @change="tableKey=tableKey+1">
|
||||||
|
reviewer
|
||||||
|
</el-checkbox>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:key="tableKey"
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="list"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
highlight-current-row
|
||||||
|
style="width: 100%;"
|
||||||
|
@sort-change="sortChange"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" prop="id" sortable="custom" align="center" width="80" :class-name="getSortClass('id')">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ row.id }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="子系统名称" width="150px" align="center">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ parseTime(row.timestamp, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="工作量" min-width="150px">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span class="link-type" @click="handleUpdate(row)">{{ row.title }}</span>
|
||||||
|
<el-tag>{{ typeFilter(row.type) }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="周期" width="110px" align="center">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span>{{ row.author }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-if="showReviewer" label="负责人" width="110px" align="center">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span style="color:red;">{{ row.reviewer }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" width="80px">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<svg-icon v-for="n in row.importance" :key="n" icon-class="star" class="meta-item__icon" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="子系统简介" align="center" width="95">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<span v-if="row.pageviews" class="link-type" @click="handleFetchPv(row.pageviews)">{{ row.pageviews }}</span>
|
||||||
|
<span v-else>0</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="截止时间" class-name="status-col" width="100">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-tag :type="statusFilter(row.status)">
|
||||||
|
{{ row.status }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="230" class-name="small-padding fixed-width">
|
||||||
|
<template v-slot="{row,$index}">
|
||||||
|
<el-button type="primary" size="small" @click="handleUpdate(row)">
|
||||||
|
Edit
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="row.status!='published'" size="small" type="success" @click="handleModifyStatus(row,'published')">
|
||||||
|
Publish
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="row.status!='draft'" size="small" @click="handleModifyStatus(row,'draft')">
|
||||||
|
Draft
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="row.status!='deleted'" size="small" type="danger" @click="handleDelete(row,$index)">
|
||||||
|
Delete
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total>0" :total="total" v-model:page="listQuery.page" v-model:limit="listQuery.limit" @pagination="getList" />
|
||||||
|
|
||||||
|
<el-dialog :title="textMap[dialogStatus]" v-model="dialogFormVisible">
|
||||||
|
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="70px" style="width: 400px; margin-left:50px;">
|
||||||
|
<el-form-item label="Type" prop="type">
|
||||||
|
<el-select v-model="temp.type" class="filter-item" placeholder="Please select">
|
||||||
|
<el-option v-for="item in calendarTypeOptions" :key="item.key" :label="item.display_name" :value="item.key" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Date" prop="timestamp">
|
||||||
|
<el-date-picker v-model="temp.timestamp" type="datetime" placeholder="Please pick a date" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Title" prop="title">
|
||||||
|
<el-input v-model="temp.title" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Status">
|
||||||
|
<el-select v-model="temp.status" class="filter-item" placeholder="Please select">
|
||||||
|
<el-option v-for="item in statusOptions" :key="item" :label="item" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Imp">
|
||||||
|
<el-rate v-model="temp.importance" :colors="['#99A9BF', '#F7BA2A', '#FF9900']" :max="3" style="margin-top:8px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Remark">
|
||||||
|
<el-input v-model="temp.remark" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" placeholder="Please input" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">
|
||||||
|
Cancel
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">
|
||||||
|
Confirm
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog v-model="dialogPvVisible" title="Reading statistics">
|
||||||
|
<el-table :data="pvData" border fit highlight-current-row style="width: 100%">
|
||||||
|
<el-table-column prop="key" label="Channel" />
|
||||||
|
<el-table-column prop="pv" label="Pv" />
|
||||||
|
</el-table>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="dialogPvVisible = false">Confirm</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { defineComponent, markRaw } from 'vue';
|
||||||
|
import { Search, Edit, Download } from '@element-plus/icons-vue';
|
||||||
|
import {
|
||||||
|
GetProject,
|
||||||
|
fetchPv,
|
||||||
|
createArticle,
|
||||||
|
updateArticle,
|
||||||
|
} from '@/api/article';
|
||||||
|
import waves from '@/directive/waves'; // waves directive
|
||||||
|
import { parseTime } from '@/utils';
|
||||||
|
import Pagination from '@/components/Pagination'; // secondary package based on el-pagination
|
||||||
|
|
||||||
|
const calendarTypeOptions = [
|
||||||
|
{ key: 'CN', display_name: 'China' },
|
||||||
|
{ key: 'US', display_name: 'USA' },
|
||||||
|
{ key: 'JP', display_name: 'Japan' },
|
||||||
|
{ key: 'EU', display_name: 'Eurozone' }
|
||||||
|
];
|
||||||
|
|
||||||
|
// arr to obj, such as { CN : "China", US : "USA" }
|
||||||
|
const calendarTypeKeyValue = calendarTypeOptions.reduce((acc, cur) => {
|
||||||
|
acc[cur.key] = cur.display_name;
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'ComplexTable',
|
||||||
|
components: { Pagination },
|
||||||
|
directives: { waves },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
iconSearch: markRaw(Search),
|
||||||
|
iconEdit: markRaw(Edit),
|
||||||
|
iconDownload: markRaw(Download),
|
||||||
|
tableKey: 0,
|
||||||
|
list: null,
|
||||||
|
total: 0,
|
||||||
|
listLoading: true,
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
},
|
||||||
|
importanceOptions: [1, 2, 3],
|
||||||
|
calendarTypeOptions,
|
||||||
|
sortOptions: [{ label: 'ID Ascending', key: '+id' }, { label: 'ID Descending', key: '-id' }],
|
||||||
|
statusOptions: ['published', 'draft', 'deleted'],
|
||||||
|
showReviewer: false,
|
||||||
|
temp: {
|
||||||
|
id: undefined,
|
||||||
|
importance: 1,
|
||||||
|
remark: '',
|
||||||
|
timestamp: new Date(),
|
||||||
|
title: '',
|
||||||
|
type: '',
|
||||||
|
status: 'published'
|
||||||
|
},
|
||||||
|
dialogFormVisible: false,
|
||||||
|
dialogStatus: '',
|
||||||
|
textMap: {
|
||||||
|
update: 'Edit',
|
||||||
|
create: 'Create'
|
||||||
|
},
|
||||||
|
dialogPvVisible: false,
|
||||||
|
pvData: [],
|
||||||
|
rules: {
|
||||||
|
type: [{ required: true, message: 'type is required', trigger: 'change' }],
|
||||||
|
timestamp: [{ type: 'date', required: true, message: 'timestamp is required', trigger: 'change' }],
|
||||||
|
title: [{ required: true, message: 'title is required', trigger: 'blur' }]
|
||||||
|
},
|
||||||
|
downloadLoading: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
parseTime,
|
||||||
|
statusFilter(status) {
|
||||||
|
const statusMap = {
|
||||||
|
published: 'success',
|
||||||
|
draft: 'info',
|
||||||
|
deleted: 'danger'
|
||||||
|
};
|
||||||
|
return statusMap[status];
|
||||||
|
},
|
||||||
|
typeFilter(type) {
|
||||||
|
return calendarTypeKeyValue[type];
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true;
|
||||||
|
GetProject(this.listQuery).then(response => {
|
||||||
|
this.list = response.data.items;
|
||||||
|
this.total = response.data.total;
|
||||||
|
|
||||||
|
// Just to simulate the time of the request
|
||||||
|
setTimeout(() => {
|
||||||
|
this.listLoading = false;
|
||||||
|
}, 1.5 * 1000);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleModifyStatus(row, status) {
|
||||||
|
ElMessage({
|
||||||
|
message: '操作Success',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
row.status = status;
|
||||||
|
},
|
||||||
|
sortChange(data) {
|
||||||
|
const { prop, order } = data;
|
||||||
|
if (prop === 'id') {
|
||||||
|
this.sortByID(order);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sortByID(order) {
|
||||||
|
if (order === 'ascending') {
|
||||||
|
this.listQuery.sort = '+id';
|
||||||
|
} else {
|
||||||
|
this.listQuery.sort = '-id';
|
||||||
|
}
|
||||||
|
this.handleFilter();
|
||||||
|
},
|
||||||
|
resetTemp() {
|
||||||
|
this.temp = {
|
||||||
|
id: undefined,
|
||||||
|
importance: 1,
|
||||||
|
remark: '',
|
||||||
|
timestamp: new Date(),
|
||||||
|
title: '',
|
||||||
|
status: 'published',
|
||||||
|
type: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
handleCreate() {
|
||||||
|
this.resetTemp();
|
||||||
|
this.dialogStatus = 'create';
|
||||||
|
this.dialogFormVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
createData() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.temp.id = parseInt(Math.random() * 100) + 1024; // mock a id
|
||||||
|
this.temp.author = 'vue-element-admin';
|
||||||
|
createArticle(this.temp).then(() => {
|
||||||
|
this.list.unshift(this.temp);
|
||||||
|
this.dialogFormVisible = false;
|
||||||
|
ElNotification({
|
||||||
|
title: 'Success',
|
||||||
|
message: 'Created Successfully',
|
||||||
|
type: 'success',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.temp = Object.assign({}, row); // copy obj
|
||||||
|
this.temp.timestamp = new Date(this.temp.timestamp);
|
||||||
|
this.dialogStatus = 'update';
|
||||||
|
this.dialogFormVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
updateData() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const tempData = Object.assign({}, this.temp);
|
||||||
|
tempData.timestamp = +new Date(tempData.timestamp); // change Thu Nov 30 2017 16:41:05 GMT+0800 (CST) to 1512031311464
|
||||||
|
updateArticle(tempData).then(() => {
|
||||||
|
const index = this.list.findIndex(v => v.id === this.temp.id);
|
||||||
|
this.list.splice(index, 1, this.temp);
|
||||||
|
this.dialogFormVisible = false;
|
||||||
|
ElNotification({
|
||||||
|
title: 'Success',
|
||||||
|
message: 'Update Successfully',
|
||||||
|
type: 'success',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete(row, index) {
|
||||||
|
ElNotification({
|
||||||
|
title: 'Success',
|
||||||
|
message: 'Delete Successfully',
|
||||||
|
type: 'success',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
this.list.splice(index, 1);
|
||||||
|
},
|
||||||
|
handleFetchPv(pv) {
|
||||||
|
fetchPv(pv).then(response => {
|
||||||
|
this.pvData = response.data.pvData;
|
||||||
|
this.dialogPvVisible = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDownload() {
|
||||||
|
this.downloadLoading = true;
|
||||||
|
import('@/vendor/Export2Excel').then(excel => {
|
||||||
|
const tHeader = ['timestamp', 'title', 'type', 'importance', 'status'];
|
||||||
|
const filterVal = ['timestamp', 'title', 'type', 'importance', 'status'];
|
||||||
|
const data = this.formatJson(filterVal);
|
||||||
|
excel.export_json_to_excel({
|
||||||
|
header: tHeader,
|
||||||
|
data,
|
||||||
|
filename: 'table-list'
|
||||||
|
});
|
||||||
|
this.downloadLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
formatJson(filterVal) {
|
||||||
|
return this.list.map(v => filterVal.map(j => {
|
||||||
|
if (j === 'timestamp') {
|
||||||
|
return parseTime(v[j]);
|
||||||
|
} else {
|
||||||
|
return v[j];
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
getSortClass: function(key) {
|
||||||
|
const sort = this.listQuery.sort;
|
||||||
|
return sort === `+${key}` ? 'ascending' : 'descending';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
-->
|
124
src/views/personal/project/manage.vue
Normal file
124
src/views/personal/project/manage.vue
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
<template>
|
||||||
|
<div style=" width:100%">
|
||||||
|
<el-card style="max-width: 100vw;margin: 1.5vw;">
|
||||||
|
<template #header><strong >项目1</strong></template>
|
||||||
|
<div style="display:flex;flex-direction:row;justify-content: space-around ">
|
||||||
|
<div>
|
||||||
|
名称
|
||||||
|
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
状态
|
||||||
|
<el-input v-model="input" style="width: 240px;margin-left:0.5vw" placeholder="请输入" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" style="width:80px">查询</el-button>
|
||||||
|
<el-button style="width:80px">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="max-width: 100vw;height:60vh;margin:1.3vw">
|
||||||
|
<div style="display:flex;flex-direction: row;justify-content: space-between">
|
||||||
|
<el-button
|
||||||
|
text
|
||||||
|
type=''
|
||||||
|
>子系统列表</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
ref="multipleTableRef"
|
||||||
|
:data="tableData"
|
||||||
|
style="max-width: 100vw;"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<!-- <el-table-column type="selection" width="55" />-->
|
||||||
|
<el-table-column label="序号" width="120">
|
||||||
|
<template #default="scope">{{ scope.row.date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column property="name" label="子系统名称" width="120" />
|
||||||
|
<el-table-column property="address" label="工作量" show-overflow-tooltip />
|
||||||
|
<el-table-column property="address" label="周期" />
|
||||||
|
<el-table-column property="address" label="负责人" />
|
||||||
|
<el-table-column property="address" label="状态" />
|
||||||
|
<el-table-column property="address" label="子系统简介" />
|
||||||
|
<el-table-column property="address" label="截止时间" />
|
||||||
|
<el-table-column property="address" label="操作" >
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
style="color:deepskyblue"
|
||||||
|
>查看详情</el-button
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
larger
|
||||||
|
background
|
||||||
|
layout="prev, pager, next"
|
||||||
|
:total="50"
|
||||||
|
class="mt-4"
|
||||||
|
style="display: flex;flex-direction: row;justify-content: center;margin-top:5vh"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { ElTable } from 'element-plus';
|
||||||
|
interface User {
|
||||||
|
date: string
|
||||||
|
name: string
|
||||||
|
address: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const multipleTableRef = ref<InstanceType<typeof ElTable>>();
|
||||||
|
const multipleSelection = ref<User[]>([]);
|
||||||
|
|
||||||
|
const handleSelectionChange = (val: User[]) => {
|
||||||
|
multipleSelection.value = val;
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableData: User[] = [
|
||||||
|
{
|
||||||
|
date: '2016-05-03',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-02',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-04',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: '2016-05-01',
|
||||||
|
name: 'Tom',
|
||||||
|
address: 'No. 189, Grove St, Los Angeles'
|
||||||
|
}
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.my-autocomplete li {
|
||||||
|
line-height: normal;
|
||||||
|
padding: 7px;
|
||||||
|
}
|
||||||
|
.my-autocomplete li .name {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.my-autocomplete li .addr {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #b4b4b4;
|
||||||
|
}
|
||||||
|
.my-autocomplete li .highlighted .addr {
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
</style>
|
3
src/views/personal/project/participate.vue
Normal file
3
src/views/personal/project/participate.vue
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<template>
|
||||||
|
hi
|
||||||
|
</template>
|
@ -56,7 +56,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { parseTime } from '@/utils';
|
import { parseTime } from '@/utils';
|
||||||
import { fetchList } from '@/api/article';
|
import { fetchList } from '@/api/project';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<template>
|
<!--<template>
|
||||||
<el-card style="max-width: 100vw;margin: 1.5vw;">
|
<el-card style="max-width: 100vw;margin: 1.5vw;">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
@ -123,9 +123,9 @@ const tableData = [
|
|||||||
address: 'No. 189, Grove St, Los Angeles',
|
address: 'No. 189, Grove St, Los Angeles',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
</script>
|
</script>-->
|
||||||
|
|
||||||
<!--<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!– Note that row-key is necessary to get a correct row order. –>
|
<!– Note that row-key is necessary to get a correct row order. –>
|
||||||
<el-table ref="dragTable" v-loading="listLoading" :data="list" row-key="id" border fit highlight-current-row style="width: 100%">
|
<el-table ref="dragTable" v-loading="listLoading" :data="list" row-key="id" border fit highlight-current-row style="width: 100%">
|
||||||
@ -190,7 +190,7 @@ const tableData = [
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { SystemGetByProjId } from '@/api/article';
|
import { SystemGetByProjId } from '@/api/project';
|
||||||
import Sortable from "sortablejs";
|
import Sortable from "sortablejs";
|
||||||
import { parseTime } from '@/utils';
|
import { parseTime } from '@/utils';
|
||||||
const token: string | null = window.localStorage.getItem('token')
|
const token: string | null = window.localStorage.getItem('token')
|
||||||
@ -258,7 +258,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>-->
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.sortable-ghost{
|
.sortable-ghost{
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { defineComponent, markRaw } from 'vue';
|
import { defineComponent, markRaw } from 'vue';
|
||||||
import { fetchList } from '@/api/article';
|
import { fetchList } from '@/api/project';
|
||||||
import { parseTime } from '@/utils';
|
import { parseTime } from '@/utils';
|
||||||
import { Refresh, CircleCheck, Edit } from '@element-plus/icons-vue';
|
import { Refresh, CircleCheck, Edit } from '@element-plus/icons-vue';
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { fetchList } from '@/api/article';
|
import { fetchList } from '@/api/project';
|
||||||
import { Timer as IconTimer, Document as IconDocument } from '@element-plus/icons-vue';
|
import { Timer as IconTimer, Document as IconDocument } from '@element-plus/icons-vue';
|
||||||
import { markRaw } from 'vue';
|
import { markRaw } from 'vue';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user