Commit adfca90b authored by sixiaofeng's avatar sixiaofeng

目录结构调整

parent 14d9286a
<template>
<div class="text-xs px-3 py-2 text-center cursor-pointer rounded my-3" :class="getSize && border" @click="eventEmit">
{{text}}
</div>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
name: 'AppIcon',
props: {
size: String,
disabled: {
type:Boolean,
default:false
},
text:{
type: String,
required: true
},
border:{
type: String,
default:'border border-app-dark-4'
}
},
methods:{
eventEmit(v:any){
if(this.disabled){
return
}
this.$emit('btnClicked',v)
}
},
computed:{
getSize(){
switch (this.size) {
case 'full':
return 'w-full'
default:
return 'w-20';
}
}
}
});
</script>
<template>
<div class="cell flex justify-between py-3 border-t border-b border-app-dark-3 px-2">
<div class="left">hahah</div>
<div class="right">
<Switch default-checked />
</div>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import { Switch } from 'ant-design-vue'
// Vue.use(Switch)
export default Vue.extend({
components:{ Switch},
props: {
size: String,
type: {
type:String,
default:'select'
},
disabled:{
type:Boolean,
default:false
},
text:{
type: String,
required: true
},
theme:{
type: String,
default:'default'
}
},
methods:{
eventEmit(v:any){
if(this.disabled){
return
}
this.$emit('btnClicked',v)
}
},
computed:{
getSize(){
switch (this.size) {
case 'full':
return 'w-full'
default:
return 'w-20';
}
}
}
});
</script>
<template>
<div class='search flex items-center bg-app-dark-2 bg-opacity-30 text-sm px-3 py-1 rounded-3xl border border-app-blue-3 hover:border-app-blue-2'>
<div class='search-input flex-grow'>
<input type="text" class=" w-full bg-transparent" placeholder="输入项目名称/ID">
</div>
<app-icon size="20px" class="flex-grow-0" color="#ffffff" type='search'></app-icon>
</div>
</template>
<script lang="ts">
import Vue,{Component} from 'vue';
import { Icon } from 'ant-design-vue';
Vue.use(Icon)
const AppIcon = Icon.createFromIconfontCN({
scriptUrl:'/iconfont.js' // generated by iconfont.cn
});
export default Vue.extend({
props: {
},
components:{
'app-icon':AppIcon as Component
}
});
</script>
<template>
<div class="text-lg">
{{text}}
</div>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
name: 'Title',
props: {
text:{
type: String,
required: true
}
},
});
</script>
......@@ -13,7 +13,14 @@
</template>
<slot name="left" />
</div>
<div class="title w-1/2 text-center font-bold truncate" :class="titleColor">{{ title }}</div>
<div
v-if="pageTitle"
class="title w-3/5 text-center font-bold truncate"
:class="titleColor"
>
{{ pageTitle }}
</div>
<slot v-else name="header" />
<div class="h-action-wrapper absolute flex justify-center items-center right-3 top-1/2 transform -translate-y-1/2">
<slot name="right" />
</div>
......@@ -42,28 +49,20 @@ export default Vue.extend({
titleColor: {
type: String,
default: 'text-text-primary'
}
},
title: String
},
components: {
'app-icon': () => import('@/components/common/Icon.vue')
},
data() {
return {
title: '导航'
}
},
watch: {
$route: {
handler() {
this.title = this.$route.meta?.title
},
immediate: true
computed: {
pageTitle(): string {
return this.title || this.$route.meta?.title
}
},
methods: {
clickLeft() {
this.$emit('click-left')
// this.$router.go(-1)
}
}
});
......
import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'
// import App from '../App.vue'
import { teamRoutes } from './team'
Vue.use(VueRouter)
......@@ -13,197 +14,7 @@ const routes: Array<RouteConfig> = [
title: '首页'
}
},
/**
* 团队管理相关路由
* 团队管理 /team-management
* 团队架构 /team-frame
* 架构部门详情 /team/:id
* 团队成员信息 /team-member/:id
* 编辑成员信息 /edit-member
* 创建团队 /team-create
* 团队二维码 /team-QRcode
* 部门管理 /department-management
* 添加部门 /add-department
* 团队权限管理 /auth-management
* 成员二维码 /two-code
* 申请管理 /request-management
* 添加成员 /file
* 选择部门 /select-team
* 搜索团队 /search-team
* 加入团队 /join-team
* 完善团队信息 /team-info
*
*/
{
path: '/team-management',
name: 'TeamManagement',
component: () => import('@/views/team-management.vue'),
meta: {
title: '团队管理'
}
},
{
path: '/team-frame',
name: 'Team',
component: () => import('@/views/team-frame.vue'),
meta: {
title: '团队架构'
}
},
{
path: '/file',
name: 'File',
component: () => import('@/views/file.vue'),
meta: {
title: '添加成员'
}
},
{
path: '/team/:id',
name: 'TeamDetail',
component: () => import('@/views/team-detail.vue'),
meta: {
title: '团队架构'
}
},
{
path: '/team-member/:id',
name: 'TeamMember',
component: () => import('@/views/member-info.vue')
},
{
path: '/team-create',
name: 'TeamCreate',
component: () => import('@/views/create-team/team-create.vue'),
meta: {
title: '创建团队'
}
},
{
path: '/team-QRcode',
name: 'TeamQRcode',
component: () => import('@/views/create-team/team-QRcode.vue'),
meta: {
title: '团队二维码'
}
},
{
path: '/edit-member/:id',
name: 'EditMember',
component: () => import('@/views/edit-member.vue'),
meta: {
title: '编辑成员'
}
},
{
path: '/department-management',
name: 'DepartmentManagement',
component: () => import('@/views/department-management.vue'),
meta: {
title: '部门管理'
}
},
{
path: '/add-department',
name: 'AddDepartment',
component: () => import('@/views/add-department.vue'),
meta: {
title: '添加部门'
}
},
{
path: '/two-code',
name: 'Two-code',
component: () => import('@/views/two-code.vue'),
meta: {
title: '成员二维码'
}
},
{
path: '/auth-management',
name: 'AuthManagement',
component: () => import('@/views/auth-management.vue'),
meta: {
title: '团队管理权限'
}
},
{
path: '/team-member/:id',
name: 'TeamMemberDetail',
component: () => import('@/views/member-info.vue')
},
{
path: '/request-management',
name: 'requestManagement',
component: () => import('@/views/request-managemant.vue'),
meta:{
title:'申请管理'
}
},
{
path: '/select-team',
name: 'SelectTeam',
component: () => import('@/views/select-team.vue'),
meta:{
title:'选择团队'
}
},
{
path: '/select-team/:id',
name: 'SelectTeamDetail',
component: () => import('@/views/select-team.vue'),
meta:{
title:'选择团队'
}
},
{
path: '/search-team',
name: 'SearchTeam',
component: () => import('@/views/search-team.vue'),
meta:{
title:'搜索团队'
}
},
{
path: '/join-team',
name: 'JoinTeam',
component: () => import('@/views/join-team.vue'),
meta:{
title:'加入团队'
}
},
{
path: '/team-info',
name: 'TeamInfo',
component: () => import('@/views/team-info/team-info.vue'),
meta:{
title:'完善团队信息'
}
},
{
path: '/team-name',
name: 'TeamName',
component: () => import('@/views/team-info/team-name.vue'),
meta:{
title:'团队名称'
}
},
{
path: '/team-description',
name: 'TeamDescription',
component: () => import('@/views/team-info/team-description.vue'),
meta:{
title:'团队描述'
}
},
{
path: '/team-avator',
name: 'TeamAvator',
component: () => import('@/views/team-info/team-avator.vue'),
meta:{
title:'团队头像'
}
}
...teamRoutes
]
const router = new VueRouter({
......
import { RouteConfig } from 'vue-router'
/**
* 团队管理相关路由
* 团队管理 /team-management
* 团队架构 /team-frame
* 架构部门详情 /team/:id
* 团队成员信息 /team-member/:id
* 编辑成员信息 /edit-member
* 创建团队 /team-create
* 团队二维码 /team-QRcode
* 部门管理 /department-management
* 添加部门 /add-department
* 团队权限管理 /auth-management
* 成员二维码 /two-code
* 申请管理 /request-management
* 添加成员 /file
* 选择部门 /select-team
* 搜索团队 /search-team
* 加入团队 /join-team
* 完善团队信息 /team-info
*
*/
export const teamRoutes: Array<RouteConfig> = [
{
path: '/team-management',
name: 'TeamManagement',
component: () => import('@/views/team/team-management.vue'),
meta: {
title: '团队管理'
}
},
{
path: '/team-frame',
name: 'Team',
component: () => import('@/views/team/team-frame.vue'),
meta: {
title: '团队架构'
}
},
{
path: '/add-member',
name: 'AddMember',
component: () => import('@/views/team/add-member.vue'),
meta: {
title: '添加成员'
}
},
{
path: '/team/:id',
name: 'TeamDetail',
component: () => import('@/views/team/team-detail.vue'),
meta: {
title: '团队架构'
}
},
{
path: '/team-member/:id',
name: 'TeamMember',
component: () => import('@/views/team/member-info.vue')
},
{
path: '/team-create',
name: 'TeamCreate',
component: () => import('@/views/team/create-team/team-create.vue'),
meta: {
title: '创建团队'
}
},
{
path: '/team-QRcode',
name: 'TeamQRcode',
component: () => import('@/views/team/create-team/team-QRcode.vue'),
meta: {
title: '团队二维码'
}
},
{
path: '/edit-member/:id',
name: 'EditMember',
component: () => import('@/views/team/edit-member.vue'),
meta: {
title: '编辑成员'
}
},
{
path: '/department-management',
name: 'DepartmentManagement',
component: () => import('@/views/team/department-management.vue'),
meta: {
title: '部门管理'
}
},
{
path: '/add-department',
name: 'AddDepartment',
component: () => import('@/views/team/add-department.vue'),
meta: {
title: '添加部门'
}
},
{
path: '/two-code',
name: 'Two-code',
component: () => import('@/views/team/two-code.vue'),
meta: {
title: '成员二维码'
}
},
{
path: '/auth-management',
name: 'AuthManagement',
component: () => import('@/views/team/auth-management.vue'),
meta: {
title: '团队管理权限'
}
},
{
path: '/team-member/:id',
name: 'TeamMemberDetail',
component: () => import('@/views/team/member-info.vue')
},
{
path: '/request-management',
name: 'requestManagement',
component: () => import('@/views/team/request-managemant.vue'),
meta:{
title:'申请管理'
}
},
{
path: '/select-team',
name: 'SelectTeam',
component: () => import('@/views/team/select-team.vue'),
meta:{
title:'选择团队'
}
},
{
path: '/select-team/:id',
name: 'SelectTeamDetail',
component: () => import('@/views/team/select-team.vue'),
meta:{
title:'选择团队'
}
},
{
path: '/search-team',
name: 'SearchTeam',
component: () => import('@/views/team/search-team.vue'),
meta:{
title:'搜索团队'
}
},
{
path: '/join-team',
name: 'JoinTeam',
component: () => import('@/views/team/join-team.vue'),
meta:{
title:'加入团队'
}
},
{
path: '/team-info',
name: 'TeamInfo',
component: () => import('@/views/team/team-info/team-info.vue'),
meta:{
title:'完善团队信息'
}
},
{
path: '/team-name',
name: 'TeamName',
component: () => import('@/views/team/team-info/team-name.vue'),
meta:{
title:'团队名称'
}
},
{
path: '/team-description',
name: 'TeamDescription',
component: () => import('@/views/team/team-info/team-description.vue'),
meta:{
title:'团队描述'
}
},
{
path: '/team-avator',
name: 'TeamAvator',
component: () => import('@/views/team/team-info/team-avator.vue'),
meta:{
title:'团队头像'
}
}
]
\ No newline at end of file
......@@ -37,7 +37,7 @@
<script lang="ts">
import Vue, { PropType } from 'vue'
import { info } from '../request-managemant.vue'
import { info } from '@/views/team/request-managemant.vue'
export default Vue.extend({
name:'request',
......
......@@ -33,11 +33,11 @@ export default Vue.extend({
components:{
// 'app-icon':()=>import('./components/common/Icon.vue'),
'main-page': () => import('@/layout/main-page.vue'),
'input-cell': () => import('./components/input-cell.vue'),
'c-cell': () => import('./components/c-cell.vue'),
'c-button': () => import('./components/c-button.vue'),
'input-cell': () => import('@/components/common/input-cell.vue'),
'c-cell': () => import('@/components/common/c-cell.vue'),
'c-button': () => import('@/components/common/c-button.vue'),
// 'switch-cell': () => import('./components/switch-cell.vue'),
'group-cell': () => import('./components/group-cell.vue')
'group-cell': () => import('@/components/common/group-cell.vue')
},
name: 'DepartmentManagement',
data() {
......
......@@ -81,10 +81,10 @@ export default Vue.extend({
name: 'File',
components: {
'main-page': () => import('@/layout/main-page.vue'),
'input-cell': () => import('./components/input-cell.vue'),
'c-cell': () => import('./components/c-cell.vue'),
'c-button': () => import('./components/c-button.vue'),
'group-cell': () => import('./components/group-cell.vue')
'input-cell': () => import('@/components/common/input-cell.vue'),
'c-cell': () => import('@/components/common/c-cell.vue'),
'c-button': () => import('@/components/common/c-button.vue'),
'group-cell': () => import('@/components/common/group-cell.vue')
},
created() {
// console.log(Mock, 'mock')
......
......@@ -69,7 +69,7 @@ export default Vue.extend({
components: {
'main-page': () => import('@/layout/main-page.vue'),
'app-icon': () => import('@/components/common/Icon.vue'),
'c-button': () => import('./components/c-button.vue')
'c-button': () => import('@/components/common/c-button.vue')
},
data() {
return {
......
......@@ -30,7 +30,7 @@ export default Vue.extend({
name:'teamQRcode',
components:{
'main-page': () => import('@/layout/main-page.vue'),
'c-button': () => import('../components/c-button.vue')
'c-button': () => import('@/components/common/c-button.vue')
},
methods: {
handleClickLeft() {
......
......@@ -40,8 +40,8 @@ export default Vue.extend({
name:'createteam',
components:{
'main-page': () => import('@/layout/main-page.vue'),
'input-cell': () => import('../components/input-cell.vue'),
'c-button': () => import('../components/c-button.vue')
'input-cell': () => import('@/components/common/input-cell.vue'),
'c-button': () => import('@/components/common/c-button.vue')
},
data(){
return{
......
......@@ -30,6 +30,7 @@
dot
title="添加成员"
class="mt-4"
@click="$router.push('/add-member')"
/>
<c-cell
dot
......@@ -53,10 +54,10 @@ export default Vue.extend({
components:{
// 'app-icon':()=>import('./components/common/Icon.vue'),
'main-page': () => import('@/layout/main-page.vue'),
'input-cell': () => import('./components/input-cell.vue'),
'c-cell': () => import('./components/c-cell.vue'),
'c-button': () => import('./components/c-button.vue'),
'switch-cell': () => import('./components/switch-cell.vue')
'input-cell': () => import('@/components/common/input-cell.vue'),
'c-cell': () => import('@/components/common/c-cell.vue'),
'c-button': () => import('@/components/common/c-button.vue'),
'switch-cell': () => import('@/components/common/switch-cell.vue')
},
name: 'DepartmentManagement',
data() {
......
......@@ -59,10 +59,10 @@ export default Vue.extend({
components:{
// 'app-icon':()=>import('./components/common/Icon.vue'),
'main-page': () => import('@/layout/main-page.vue'),
'input-cell': () => import('./components/input-cell.vue'),
'c-cell': () => import('./components/c-cell.vue'),
'c-button': () => import('./components/c-button.vue'),
'group-cell': () => import('./components/group-cell.vue')
'input-cell': () => import('@/components/common/input-cell.vue'),
'c-cell': () => import('@/components/common/c-cell.vue'),
'c-button': () => import('@/components/common/c-button.vue'),
'group-cell': () => import('@/components/common/group-cell.vue')
},
name: 'EditMember',
created() {
......
......@@ -80,8 +80,8 @@ export default Vue.extend({
components: {
'main-page': () => import('@/layout/main-page.vue'),
'app-icon': () => import('@/components/common/Icon.vue'),
'c-button': () => import('./components/c-button.vue'),
'input-cell': () => import('./components/input-cell.vue')
'c-button': () => import('@/components/common/c-button.vue'),
'input-cell': () => import('@/components/common/input-cell.vue')
},
created() {
// console.log(Mock, 'mock')
......
......@@ -88,9 +88,9 @@ export default Vue.extend({
components:{
'app-icon':()=>import('@/components/common/Icon.vue'),
'main-page': () => import('@/layout/main-page.vue'),
'c-cell': () => import('./components/c-cell.vue'),
'switch-cell': () => import('./components/switch-cell.vue'),
'c-button': () => import('./components/c-button.vue')
'c-cell': () => import('@/components/common/c-cell.vue'),
'switch-cell': () => import('@/components/common/switch-cell.vue'),
'c-button': () => import('@/components/common/c-button.vue')
},
name: 'MemberInfo',
data() {
......
......@@ -35,9 +35,9 @@ import Vue from 'vue'
export default Vue.extend({
name:'SearchTeam',
components:{
'main-page': () => import('@/layout/main-page.vue'),
// 'main-page': () => import('@/layout/main-page.vue'),
// 'app-icon': () => import('@/components/common/Icon.vue'),
'search-bar': () => import('./components/search-bar.vue')
'search-bar': () => import('@/components/common/search-bar.vue')
// 'c-button': () => import('./components/c-button.vue')
},
data() {
......
......@@ -109,7 +109,7 @@ export default Vue.extend({
components: {
'main-page': () => import('@/layout/main-page.vue'),
'app-icon': () => import('@/components/common/Icon.vue'),
'c-button': () => import('./components/c-button.vue')
'c-button': () => import('@/components/common/c-button.vue')
},
created() {
// console.log(this.team, 'team')
......
......@@ -32,7 +32,7 @@
</template>
<template v-else>
<div class="grid grid-cols-3 gap-2.5">
<c-button round @click="$router.push('/file')">添加成员</c-button>
<c-button round @click="$router.push('/add-member')">添加成员</c-button>
<c-button round @click="$router.push('/add-department')">添加部门</c-button>
<c-button round @click="$router.push('/department-management')">部门设置</c-button>
</div>
......@@ -54,7 +54,7 @@ export default Vue.extend({
'app-icon': () => import('@/components/common/Icon.vue'),
'team-tree': () => import('@/views/components/team-tree.vue'),
'team-contacts': () => import('@/views/components/team-contacts.vue'),
'c-button': () => import('./components/c-button.vue')
'c-button': () => import('@/components/common/c-button.vue')
},
created() {
this.showRadio = this.$route.query.transfer === '1'
......
......@@ -31,7 +31,7 @@
</template>
<template v-else>
<div class="grid grid-cols-3 gap-2.5">
<c-button round @click="$router.push('/file')">添加成员</c-button>
<c-button round @click="$router.push('/add-member')">添加成员</c-button>
<c-button round @click="$router.push('/add-department')">添加部门</c-button>
<c-button round @click="$router.push('/department-management')">部门设置</c-button>
</div>
......@@ -54,7 +54,7 @@ export default Vue.extend({
'app-icon': () => import('@/components/common/Icon.vue'),
'team-tree': () => import('@/views/components/team-tree.vue'),
'team-contacts': () => import('@/views/components/team-contacts.vue'),
'c-button': () => import('./components/c-button.vue')
'c-button': () => import('@/components/common/c-button.vue')
},
created() {
// console.log(Mock, 'mock')
......
......@@ -49,9 +49,7 @@ Vue.use(ActionSheet).use(Uploader)
export default Vue.extend({
components:{
'app-icon':()=>import('@/components/common/Icon.vue'),
'main-page': () => import('@/layout/main-page.vue'),
// 'input-cell': () => import('../components/input-cell.vue'),
// 'c-button': () => import('../components/c-button.vue')
'main-page': () => import('@/layout/main-page.vue')
},
name: 'TeamAvator',
data() {
......
......@@ -25,8 +25,8 @@ export default Vue.extend({
components:{
// 'app-icon':()=>import('@/components/common/Icon.vue'),
'main-page': () => import('@/layout/main-page.vue'),
'input-cell': () => import('../components/input-cell.vue'),
'c-button': () => import('../components/c-button.vue')
'input-cell': () => import('@/components/common/input-cell.vue'),
'c-button': () => import('@/components/common/c-button.vue')
},
name: 'TeamDescription',
data() {
......
......@@ -34,7 +34,7 @@ export default Vue.extend({
components:{
// 'app-icon':()=>import('@/components/common/Icon.vue'),
'main-page': () => import('@/layout/main-page.vue'),
'c-cell': () => import('../components/c-cell.vue')
'c-cell': () => import('@/components/common/c-cell.vue')
},
name: 'TeamInfo',
data() {
......
......@@ -24,8 +24,8 @@ export default Vue.extend({
components:{
// 'app-icon':()=>import('@/components/common/Icon.vue'),
'main-page': () => import('@/layout/main-page.vue'),
'input-cell': () => import('../components/input-cell.vue'),
'c-button': () => import('../components/c-button.vue')
'input-cell': () => import('@/components/common/input-cell.vue'),
'c-button': () => import('@/components/common/c-button.vue')
},
name: 'TeamName',
data() {
......
......@@ -27,7 +27,7 @@
</div>
</div>
<c-cell dot title="团队架构" @click="$router.push('/team-frame')" />
<c-cell dot title="添加成员" @click="$router.push('/file')" />
<c-cell dot title="添加成员" @click="$router.push('/add-member')" />
<c-cell dot title="添加部门" @click="$router.push('/add-department')" />
<div class="mt-4">
<c-cell dot title="团队管理权限" content="共3人" @click="$router.push('/auth-management')" />
......@@ -48,8 +48,8 @@ export default Vue.extend({
components:{
'app-icon':()=>import('@/components/common/Icon.vue'),
'main-page': () => import('@/layout/main-page.vue'),
'c-cell': () => import('./components/c-cell.vue'),
'c-button': () => import('./components/c-button.vue')
'c-cell': () => import('@/components/common/c-cell.vue'),
'c-button': () => import('@/components/common/c-button.vue')
},
name: 'TeamManagement',
data() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment