Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
12843a42
Link Wechat
项目概览
仟微科技
/
Link Wechat
通知
48
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Link Wechat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
12843a42
编写于
10月 22, 2020
作者:
X
xinlaa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
部分菜单配置
上级
df539710
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
198 addition
and
169 deletion
+198
-169
linkwe-ui/src/layout/components/Sidebar/SidebarItem.vue
linkwe-ui/src/layout/components/Sidebar/SidebarItem.vue
+41
-30
linkwe-ui/src/main.js
linkwe-ui/src/main.js
+8
-5
linkwe-ui/src/router/index.js
linkwe-ui/src/router/index.js
+138
-128
linkwe-ui/src/store/modules/permission.js
linkwe-ui/src/store/modules/permission.js
+1
-1
linkwe-ui/src/styles/common.scss
linkwe-ui/src/styles/common.scss
+2
-1
linkwe-ui/src/styles/element-ui.scss
linkwe-ui/src/styles/element-ui.scss
+4
-0
linkwe-ui/src/utils/request.js
linkwe-ui/src/utils/request.js
+1
-1
linkwe-ui/src/views/contacts/organization.vue
linkwe-ui/src/views/contacts/organization.vue
+3
-3
未找到文件。
linkwe-ui/src/layout/components/Sidebar/SidebarItem.vue
浏览文件 @
12843a42
<
template
>
<div
v-if=
"!item.hidden"
>
<template
v-if=
"hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"
>
<template
v-if=
"hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow"
>
<app-link
v-if=
"onlyOneChild.meta"
:to=
"resolvePath(onlyOneChild.path)"
>
<el-menu-item
:index=
"resolvePath(onlyOneChild.path)"
:class=
"
{'submenu-title-noDropdown':!isNest}">
<item
:icon=
"onlyOneChild.meta.icon||(item.meta&&item.meta.icon)"
:title=
"onlyOneChild.meta.title"
/>
<el-menu-item
:index=
"resolvePath(onlyOneChild.path)"
:class=
"
{'submenu-title-noDropdown':!isNest}"
>
<item
:icon=
"onlyOneChild.meta.icon||(item.meta&&item.meta.icon)"
:title=
"onlyOneChild.meta.title"
/>
</el-menu-item>
</app-link>
</
template
>
...
...
@@ -25,69 +33,72 @@
</template>
<
script
>
import
path
from
'
path
'
import
{
isExternal
}
from
'
@/utils/validate
'
import
Item
from
'
./Item
'
import
AppLink
from
'
./Link
'
import
FixiOSBug
from
'
./FixiOSBug
'
import
path
from
"
path
"
;
import
{
isExternal
}
from
"
@/utils/validate
"
;
import
Item
from
"
./Item
"
;
import
AppLink
from
"
./Link
"
;
import
FixiOSBug
from
"
./FixiOSBug
"
;
export
default
{
name
:
'
SidebarItem
'
,
name
:
"
SidebarItem
"
,
components
:
{
Item
,
AppLink
},
mixins
:
[
FixiOSBug
],
props
:
{
// route object
item
:
{
type
:
Object
,
required
:
true
required
:
true
,
},
isNest
:
{
type
:
Boolean
,
default
:
false
default
:
false
,
},
basePath
:
{
type
:
String
,
default
:
''
}
default
:
""
,
}
,
},
data
()
{
this
.
onlyOneChild
=
null
return
{}
this
.
onlyOneChild
=
null
;
return
{}
;
},
methods
:
{
hasOneShowingChild
(
children
=
[],
parent
)
{
const
showingChildren
=
children
.
filter
(
item
=>
{
const
showingChildren
=
children
.
filter
(
(
item
)
=>
{
if
(
item
.
hidden
)
{
return
false
return
false
;
}
else
{
// Temp set(will be used if only has one showing child)
this
.
onlyOneChild
=
item
return
true
this
.
onlyOneChild
=
item
;
return
true
;
}
})
})
;
// When there is only one child router, the child router is displayed by default
if
(
showingChildren
.
length
===
1
)
{
return
true
return
true
;
}
// Show parent if there are no child router to display
if
(
showingChildren
.
length
===
0
)
{
this
.
onlyOneChild
=
{
...
parent
,
path
:
''
,
noShowingChildren
:
true
}
return
true
this
.
onlyOneChild
=
{
...
parent
,
path
:
""
,
noShowingChildren
:
true
};
return
true
;
}
return
false
return
false
;
},
resolvePath
(
routePath
)
{
if
(
isExternal
(
routePath
))
{
return
routePath
return
routePath
;
}
if
(
isExternal
(
this
.
basePath
))
{
return
this
.
basePath
return
this
.
basePath
;
}
if
(
/^
\/
/
.
test
(
routePath
))
{
return
routePath
;
}
return
path
.
resolve
(
this
.
basePath
,
routePath
)
}
}
}
return
path
.
resolve
(
this
.
basePath
,
routePath
)
;
}
,
}
,
}
;
</
script
>
linkwe-ui/src/main.js
浏览文件 @
12843a42
...
...
@@ -7,7 +7,10 @@ import 'normalize.css/normalize.css' // a modern alternative to CSS resets
import
Element
from
'
element-ui
'
import
'
./styles/element-variables.scss
'
Vue
.
use
(
Element
,
{
size
:
'
small
'
});
Vue
.
use
(
Element
,
{
size
:
Cookies
.
get
(
'
size
'
)
||
'
small
'
// set element-ui default size
})
import
'
@/styles/common.scss
'
// common css
import
'
@/styles/index.scss
'
// global css
...
...
@@ -18,6 +21,8 @@ import permission from './directive/permission'
import
'
./assets/icons
'
// icon
import
'
./permission
'
// permission control
import
{
getDicts
}
from
"
@/api/system/dict/data
"
;
import
{
getConfigKey
}
from
"
@/api/system/config
"
;
import
{
parseTime
,
resetForm
,
addDateRange
,
selectDictLabel
,
selectDictLabels
,
download
,
handleTree
}
from
"
@/utils/common
"
;
import
Pagination
from
"
@/components/Pagination
"
;
//自定义表格工具扩展
...
...
@@ -26,6 +31,8 @@ import config from '@/config'
// 全局方法挂载
window
.
config
=
config
Vue
.
prototype
.
getDicts
=
getDicts
Vue
.
prototype
.
getConfigKey
=
getConfigKey
Vue
.
prototype
.
parseTime
=
parseTime
Vue
.
prototype
.
resetForm
=
resetForm
Vue
.
prototype
.
addDateRange
=
addDateRange
...
...
@@ -61,10 +68,6 @@ Vue.use(permission)
* please remove it before going online! ! !
*/
Vue
.
use
(
Element
,
{
size
:
Cookies
.
get
(
'
size
'
)
||
'
medium
'
// set element-ui default size
})
Vue
.
config
.
productionTip
=
false
new
Vue
({
...
...
linkwe-ui/src/router/index.js
浏览文件 @
12843a42
...
...
@@ -55,44 +55,50 @@ export const constantRoutes = [
component
:
(
resolve
)
=>
require
([
'
@/views/login
'
],
resolve
),
hidden
:
true
},
{
path
:
'
/customerManage
'
,
component
:
Layout
,
redirect
:
'
/customerManage/customer
'
,
meta
:
{
title
:
'
客户管理
'
,
icon
:
'
user
'
},
children
:
[
{
path
:
'
customer
'
,
name
:
'
Customer
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/customerManage/customer
'
],
resolve
),
meta
:
{
title
:
'
客户
'
,
icon
:
''
}
},
{
path
:
'
group
'
,
name
:
'
CustomerGroup
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/customerManage/group
'
],
resolve
),
meta
:
{
title
:
'
客户群
'
,
icon
:
''
}
},
{
path
:
'
groupDetail
'
,
hidden
:
true
,
component
:
(
resolve
)
=>
require
([
'
@/views/customerManage/groupDetail
'
],
resolve
),
meta
:
{
hidden
:
true
,
title
:
'
客户群
'
,
icon
:
''
,
activeMenu
:
'
/customerManage/group
'
}
},
{
path
:
'
tag
'
,
name
:
'
CustomerTag
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/customerManage/tag
'
],
resolve
),
meta
:
{
title
:
'
客户标签
'
,
icon
:
''
}
},
{
path
:
'
dimission
'
,
name
:
'
Dimission
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/customerManage/dimission
'
],
resolve
),
meta
:
{
title
:
'
离职继承
'
,
icon
:
''
}
},
]
},
// {
// path: '/customerManage',
// component: Layout,
// redirect: '/customerManage/customer',
// meta: { title: '客户管理', icon: 'user' },
// children: [
// {
// path: 'customer',
// name: 'Customer',
// component: (resolve) => require(['@/views/customerManage/customer'], resolve),
// meta: { title: '客户', icon: '' }
// },
// {
// path: 'customerDetail',
// hidden: true,
// component: (resolve) => require(['@/views/customerManage/customerDetail'], resolve),
// meta: { hidden: true, title: '客户', icon: '', activeMenu: '/customerManage/customer' }
// },
// {
// path: 'group',
// name: 'CustomerGroup',
// component: (resolve) => require(['@/views/customerManage/group'], resolve),
// meta: { title: '客户群', icon: '' }
// },
// {
// path: 'groupDetail',
// hidden: true,
// component: (resolve) => require(['@/views/customerManage/groupDetail'], resolve),
// meta: { hidden: true, title: '客户群', icon: '', activeMenu: '/customerManage/group' }
// },
// {
// path: 'tag',
// name: 'CustomerTag',
// component: (resolve) => require(['@/views/customerManage/tag'], resolve),
// meta: { title: '客户标签', icon: '' }
// },
// {
// path: 'dimission',
// name: 'Dimission',
// component: (resolve) => require(['@/views/customerManage/dimission'], resolve),
// meta: { title: '离职继承', icon: '' }
// },
// ]
// },
// {
// path: '/groupMessage',
// component: Layout,
...
...
@@ -113,68 +119,68 @@ export const constantRoutes = [
// },
// ]
// },
{
path
:
'
/drainageCode
'
,
component
:
Layout
,
redirect
:
'
/drainageCode/staff
'
,
meta
:
{
title
:
'
引流码
'
,
icon
:
'
qrcode
'
},
children
:
[
{
path
:
'
staff
'
,
name
:
'
CodeStaff
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/drainageCode/staff/list
'
],
resolve
),
meta
:
{
title
:
'
员工活码
'
,
icon
:
''
}
},
{
path
:
'
staffAdd
'
,
hidden
:
true
,
component
:
(
resolve
)
=>
require
([
'
@/views/drainageCode/staff/add
'
],
resolve
),
meta
:
{
title
:
'
新建员工活码
'
,
icon
:
''
,
activeMenu
:
'
/drainageCode/staff
'
}
},
{
path
:
'
staffDetail
'
,
hidden
:
true
,
component
:
(
resolve
)
=>
require
([
'
@/views/drainageCode/staff/detail
'
],
resolve
),
meta
:
{
title
:
'
员工活码详情
'
,
icon
:
''
,
activeMenu
:
'
/drainageCode/staff
'
}
},
{
path
:
'
group
'
,
name
:
'
CodeGroup
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/drainageCode/group/list
'
],
resolve
),
meta
:
{
title
:
'
客户群活码
'
,
icon
:
''
}
},
{
path
:
'
groupAdd
'
,
hidden
:
true
,
component
:
(
resolve
)
=>
require
([
'
@/views/drainageCode/group/add
'
],
resolve
),
meta
:
{
title
:
'
新增客户群活码
'
,
icon
:
''
,
activeMenu
:
'
/drainageCode/group
'
}
},
{
path
:
'
groupDetail
'
,
hidden
:
true
,
component
:
(
resolve
)
=>
require
([
'
@/views/drainageCode/group/detail
'
],
resolve
),
meta
:
{
title
:
'
客户群活码信息
'
,
icon
:
''
,
activeMenu
:
'
/drainageCode/group
'
}
},
{
path
:
'
groupBaseInfo
'
,
hidden
:
true
,
component
:
(
resolve
)
=>
require
([
'
@/views/drainageCode/group/baseInfo
'
],
resolve
),
meta
:
{
title
:
'
客户群活码
'
,
icon
:
''
,
activeMenu
:
'
/drainageCode/group
'
}
},
{
path
:
'
welcome
'
,
name
:
'
Welcome
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/drainageCode/welcome/list
'
],
resolve
),
meta
:
{
title
:
'
欢迎语
'
,
icon
:
''
}
},
{
path
:
'
welcomeAdd
'
,
hidden
:
true
,
component
:
(
resolve
)
=>
require
([
'
@/views/drainageCode/welcome/add
'
],
resolve
),
meta
:
{
title
:
'
新建欢迎语
'
,
icon
:
''
,
activeMenu
:
'
/drainageCode/welcome
'
}
},
]
},
//
{
//
path: '/drainageCode',
//
component: Layout,
//
redirect: '/drainageCode/staff',
//
meta: { title: '引流码', icon: 'qrcode' },
//
children: [
//
{
//
path: 'staff',
//
name: 'CodeStaff',
//
component: (resolve) => require(['@/views/drainageCode/staff/list'], resolve),
//
meta: { title: '员工活码', icon: '' }
//
},
//
{
//
path: 'staffAdd',
//
hidden: true,
//
component: (resolve) => require(['@/views/drainageCode/staff/add'], resolve),
//
meta: { title: '新建员工活码', icon: '', activeMenu: '/drainageCode/staff' }
//
},
//
{
//
path: 'staffDetail',
//
hidden: true,
//
component: (resolve) => require(['@/views/drainageCode/staff/detail'], resolve),
//
meta: { title: '员工活码详情', icon: '', activeMenu: '/drainageCode/staff' }
//
},
//
{
//
path: 'group',
//
name: 'CodeGroup',
//
component: (resolve) => require(['@/views/drainageCode/group/list'], resolve),
//
meta: { title: '客户群活码', icon: '' }
//
},
//
{
//
path: 'groupAdd',
//
hidden: true,
//
component: (resolve) => require(['@/views/drainageCode/group/add'], resolve),
//
meta: { title: '新增客户群活码', icon: '', activeMenu: '/drainageCode/group' }
//
},
//
{
//
path: 'groupDetail',
//
hidden: true,
//
component: (resolve) => require(['@/views/drainageCode/group/detail'], resolve),
//
meta: { title: '客户群活码信息', icon: '', activeMenu: '/drainageCode/group' }
//
},
//
{
//
path: 'groupBaseInfo',
//
hidden: true,
//
component: (resolve) => require(['@/views/drainageCode/group/baseInfo'], resolve),
//
meta: { title: '客户群活码', icon: '', activeMenu: '/drainageCode/group' }
//
},
//
{
//
path: 'welcome',
//
name: 'Welcome',
//
component: (resolve) => require(['@/views/drainageCode/welcome/list'], resolve),
//
meta: { title: '欢迎语', icon: '' }
//
},
//
{
//
path: 'welcomeAdd',
//
hidden: true,
//
component: (resolve) => require(['@/views/drainageCode/welcome/add'], resolve),
//
meta: { title: '新建欢迎语', icon: '', activeMenu: '/drainageCode/welcome' }
//
},
//
]
//
},
// {
// path: '/material',
// component: Layout,
...
...
@@ -275,34 +281,33 @@ export const constantRoutes = [
// },
// ]
// },
{
path
:
'
/contacts
'
,
component
:
Layout
,
redirect
:
'
/contacts/organization
'
,
meta
:
{
title
:
''
,
icon
:
'
users
'
},
children
:
[
{
path
:
'
organization
'
,
name
:
'
Organization
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/contacts/organization
'
],
resolve
),
meta
:
{
title
:
'
组织架构
'
,
icon
:
'
tree
'
}
},
]
},
{
path
:
'
/_enterpriseWechat
'
,
component
:
Layout
,
redirect
:
'
/enterpriseWechat
'
,
meta
:
{
title
:
''
,
icon
:
'
wechat
'
},
children
:
[
{
path
:
'
/enterpriseWechat
'
,
name
:
'
EnterpriseWechat
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/enterpriseWechat/list
'
],
resolve
),
meta
:
{
title
:
'
企业微信管理
'
,
icon
:
''
}
},
]
},
// {
// path: '/contacts',
// component: Layout,
// redirect: '/contacts/organization',
// meta: { title: '通讯录', icon: 'users' },
// children: [
// {
// path: 'organization',
// name: 'Organization',
// component: (resolve) => require(['@/views/contacts/organization'], resolve),
// meta: { title: '组织架构', icon: 'tree' }
// },
// ]
// },
// {
// path: '/enterpriseWechat',
// component: Layout,
// meta: { title: '', icon: 'wechat' },
// children: [
// {
// path: 'index',
// name: 'EnterpriseWechat',
// component: (resolve) => require(['@/views/enterpriseWechat/list'], resolve),
// meta: { title: '企业微信管理', icon: '' }
// },
// ]
// },
{
path
:
'
/user
'
,
...
...
@@ -357,6 +362,11 @@ export const constantRoutes = [
}
]
},
// {
// path: '/test',
// component: (resolve) => require(['@/views/test'], resolve),
// hidden: true
// },
{
path
:
'
/404
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/error/404
'
],
resolve
),
...
...
linkwe-ui/src/store/modules/permission.js
浏览文件 @
12843a42
...
...
@@ -48,7 +48,7 @@ function filterAsyncRouter(asyncRouterMap) {
}
export
const
loadView
=
(
view
)
=>
{
// 路由懒加载
return
(
resolve
)
=>
require
([
`@/views/
${
view
}
`
],
resolve
)
return
(
resolve
)
=>
require
([
`@/views/
${
view
}
`
],
resolve
)
}
export
default
permission
linkwe-ui/src/styles/common.scss
浏览文件 @
12843a42
...
...
@@ -16,7 +16,8 @@
}
html
{
height
:
100%
;
height
:
100%
;
font-size
:
14px
;
}
li
{
...
...
linkwe-ui/src/styles/element-ui.scss
浏览文件 @
12843a42
...
...
@@ -6,6 +6,10 @@
}
}
.el-input--small
{
height
:
32px
;
}
.top-search
{
.el-input
,
...
...
linkwe-ui/src/utils/request.js
浏览文件 @
12843a42
...
...
@@ -8,7 +8,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
const
service
=
axios
.
create
({
// axios中请求配置有baseURL选项,表示请求URL公共部分
//
baseURL: process.env.VUE_APP_BASE_API,
baseURL
:
process
.
env
.
VUE_APP_BASE_API
,
// 超时
timeout
:
10000
})
...
...
linkwe-ui/src/views/contacts/organization.vue
浏览文件 @
12843a42
...
...
@@ -11,7 +11,7 @@ export default {
pageNum
:
1
,
pageSize
:
10
,
isActivate
:
""
,
department
:
""
,
department
:
"
1
"
,
},
dateRange
:
[],
treeData
:
[],
...
...
@@ -261,8 +261,8 @@ export default {
>
<div
class=
"custom-tree-node"
slot-scope=
"
{ node, data }">
<span>
{{
node
.
label
}}
</span>
<span
class=
"fr"
v-if=
"node.level !== 1"
>
<i
class=
"el-icon-edit"
@
click.stop=
"departEdit(data, 1)"
></i>
<span
class=
"fr"
>
<i
class=
"el-icon-edit"
v-if=
"node.level !== 1"
@
click.stop=
"departEdit(data, 1)"
></i>
<i
class=
"el-icon-plus"
@
click.stop=
"departEdit(data, 0)"
></i>
</span>
</div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录