Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TFMOM
TF-MOM-WEB
Commits
186cc5c5
Commit
186cc5c5
authored
Dec 15, 2023
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页修改
parent
97676d89
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
182 additions
and
63 deletions
+182
-63
lifecycleHooks.js
applications/architecture-dee/src/lifecycleHooks.js
+1
-1
index.js
applications/architecture-dee/src/router/index.js
+7
-0
apply-app.vue
.../dee-task-center/src/views/home/compontents/apply-app.vue
+171
-60
index.vue
applications/dee-task-center/src/views/home/index.vue
+3
-2
No files found.
applications/architecture-dee/src/lifecycleHooks.js
View file @
186cc5c5
...
@@ -162,7 +162,7 @@ router.beforeEach(async(to, from, next) => {
...
@@ -162,7 +162,7 @@ router.beforeEach(async(to, from, next) => {
})
})
function
findModuleRoute
(
path
,
query
)
{
function
findModuleRoute
(
path
,
query
)
{
if
(
path
===
'/'
)
return
null
if
(
path
===
'/'
||
path
===
'/home'
)
return
null
let
result
=
null
let
result
=
null
const
module
=
path
.
split
(
'/'
)[
1
]
const
module
=
path
.
split
(
'/'
)[
1
]
...
...
applications/architecture-dee/src/router/index.js
View file @
186cc5c5
...
@@ -133,6 +133,13 @@ export const constantRoutes = [
...
@@ -133,6 +133,13 @@ export const constantRoutes = [
// component: () => import('@/views/general/page/index.vue'),
// component: () => import('@/views/general/page/index.vue'),
// hidden: true
// hidden: true
// },
// },
{
path
:
'/oldCenter'
,
name
:
'oldCenter'
,
meta
:
{
disnav
:
true
},
component
:
()
=>
import
(
'@/views/navigation/index'
),
hidden
:
true
},
{
{
path
:
'/'
,
path
:
'/'
,
name
:
'navigation'
,
name
:
'navigation'
,
...
...
applications/dee-task-center/src/views/home/compontents/apply-app.vue
View file @
186cc5c5
...
@@ -5,14 +5,14 @@
...
@@ -5,14 +5,14 @@
* @FilePath: applications/dee-task-center/src/views/home/compontents/apply-app.vue
* @FilePath: applications/dee-task-center/src/views/home/compontents/apply-app.vue
*/
*/
<
template
>
<
template
>
<div
class=
"apply-app"
>
<div
v-dee-loading=
"appConLoading"
class=
"apply-app"
>
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
应用APP
</span>
<span>
应用APP
</span>
</div>
</div>
<div
class=
"text item div-card"
>
<div
class=
"text item div-card"
>
<div
v-for=
"(item, i) in cardList"
:key=
"i"
:class=
"!item.hasPermission?'no-allowed':''"
>
<div
v-for=
"(item, i) in cardList"
:key=
"i"
:class=
"!item.hasPermission?'no-allowed':''"
>
<div
:class=
"!item.hasPermission?'no-click':''"
class=
"card"
@
click=
"
handClick
(item)"
>
<div
:class=
"!item.hasPermission?'no-click':''"
class=
"card"
@
click=
"
goContent
(item)"
>
<div
class=
"icon"
>
<div
class=
"icon"
>
<img
:src=
"item.icon"
alt=
"Icon"
>
<img
:src=
"item.icon"
alt=
"Icon"
>
</div>
</div>
...
@@ -27,52 +27,36 @@
...
@@ -27,52 +27,36 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
import
{
get
}
from
'@/utils/http'
export
default
{
export
default
{
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
appConLoading
:
false
,
cardList
:
[
cardList
:
[
{
{
icon
:
'/icons/home/cangku_kucun.png'
,
icon
:
'/icons/home/cangku_kucun.png'
,
title
:
'库房管理'
,
title
:
'库房管理'
route
:
{
path
:
'/page/86a5fa19-e245-4732-aff6-c48b18e2b5c7?title=采购入库&menuRootAppId=1626781924331'
}
},
},
{
{
icon
:
'/icons/home/计划管理与执行.png'
,
icon
:
'/icons/home/计划管理与执行.png'
,
title
:
'计划与执行管理'
,
title
:
'计划与执行管理'
route
:
{
path
:
'/dee-mes/inspection-dispatch?title=检验派工&menuRootAppId=1626785745213'
}
},
},
{
{
icon
:
'/icons/home/质量单据.png'
,
icon
:
'/icons/home/质量单据.png'
,
title
:
'现场例外管理'
,
title
:
'现场例外管理'
route
:
{
path
:
'/page/ca1f328e-b591-4e29-8b48-57a5ae20870d?title=行动项管理&menuRootAppId=1626786988508'
}
},
},
{
{
icon
:
'/icons/home/物料配套管理.png'
,
icon
:
'/icons/home/物料配套管理.png'
,
title
:
'物料配套管理'
,
title
:
'物料配套管理'
route
:
{
path
:
'/page/f535277f-b636-437b-a88b-bf42b2087f5e?title=缺件明细维护&menuRootAppId=1626789048727'
}
},
},
{
{
icon
:
'/icons/home/不合格品.png'
,
icon
:
'/icons/home/不合格品.png'
,
title
:
'线边库管理'
,
title
:
'线边库管理'
route
:
{
path
:
'/page/0b6a7a64-8480-4f95-a24a-c9a480a90c10?title=工具台账管理&menuRootAppId=1626788064518'
}
},
},
{
{
icon
:
'/icons/home/报表中心.png'
,
icon
:
'/icons/home/报表中心.png'
,
title
:
'报表中心'
,
title
:
'报表中心'
route
:
{
path
:
'/page/fb9de1be-089d-44e6-9482-6afe2ebf61ad?title=台账流水&menuRootAppId=1626788424160'
}
},
},
// {
// {
// icon: '/icons/home/实物构型管理.png',
// icon: '/icons/home/实物构型管理.png',
...
@@ -80,19 +64,16 @@ export default {
...
@@ -80,19 +64,16 @@ export default {
// },
// },
{
{
icon
:
'/icons/home/基础数据管理.png'
,
icon
:
'/icons/home/基础数据管理.png'
,
title
:
'基础数据管理'
,
title
:
'基础数据管理'
route
:
{
path
:
'/page/6f1343ab-3376-4bf1-8cd6-b1f8031e9a6f?title=库房库位定义&menuRootAppId=1626781744425'
}
},
{
icon
:
'/icons/home/系统管理.png'
,
title
:
'系统管理'
,
route
:
{
path
:
'/systemHome?title=systemHome'
}
},
},
// {
// {
// icon: '/icons/home/系统管理.png',
// title: '系统管理'
// // route: {
// // path: '/systemHome?title=systemHome'
// // }
// },
// {
// icon: '/icons/home/看板.png',
// icon: '/icons/home/看板.png',
// title: '看板',
// title: '看板',
// route: {
// route: {
...
@@ -101,47 +82,177 @@ export default {
...
@@ -101,47 +82,177 @@ export default {
// },
// },
{
{
icon
:
'/icons/home/单架次MBOM.png'
,
icon
:
'/icons/home/单架次MBOM.png'
,
title
:
'单架次MBOM'
,
title
:
'单架次MBOM配置'
route
:
{
path
:
'/page/262fe280-0436-4920-a549-4c4aade22f10?title=指令标识维护&menuRootAppId=1626782294437'
}
}
}
]
]
}
}
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'permMenus'
])
...
mapGetters
([
'permMenus'
,
'activeWorkSpace'
])
},
},
watch
:
{
watch
:
{
cardList
:
{
immediate
:
true
,
deep
:
true
,
handler
(
val
)
{
val
&&
val
.
length
&&
this
.
getPermAppMenu
()
}
}
},
},
created
()
{
created
()
{
// 初始化数据
// 初始化数据
this
.
getAppGroup
()
},
},
methods
:
{
methods
:
{
handClick
(
val
)
{
/**
if
(
!
val
.
route
)
{
* @function 获取应用分组
this
.
$utils
.
showMessageWarning
(
'暂无页面'
)
* @description 通过工作空间id查询当前APP中心分组
return
*/
getAppGroup
()
{
this
.
appConLoading
=
true
get
(
'/DxWorkspace/findWorkspaceListById'
,
{
id
:
this
.
activeWorkSpace
.
id
}).
then
(
res
=>
{
let
dxAppWorkGroups
=
[]
const
allApps
=
res
.
items
.
sourceDxAppWorkLink
?
res
.
items
.
sourceDxAppWorkLink
.
map
(
r
=>
{
return
r
.
target
})
:
[]
if
(
Array
.
isArray
(
res
.
items
.
dxAppWorkGroups
)
&&
res
.
items
.
dxAppWorkGroups
.
length
>
0
)
{
dxAppWorkGroups
=
res
.
items
.
dxAppWorkGroups
||
[]
}
dxAppWorkGroups
.
forEach
((
group
,
idx
)
=>
{
if
(
group
.
sourceDxAppWorkGroupLink
&&
group
.
sourceDxAppWorkGroupLink
.
length
)
{
group
.
sourceDxAppWorkGroupLink
.
map
(
r
=>
{
allApps
.
push
(
r
.
target
)
})
}
}
this
.
$router
.
push
(
val
.
route
)
})
const
obj
=
{}
this
.
getPermAppMenu
(
allApps
.
reduce
(
function
(
item
,
next
)
{
obj
[
next
.
id
]
?
''
:
obj
[
next
.
id
]
=
true
&&
item
.
push
(
next
)
return
item
},
[]))
}).
catch
(
err
=>
{
console
.
log
(
'err: '
,
err
)
}).
finally
(()
=>
{
this
.
appConLoading
=
false
})
},
},
// 与有权限的菜单取交集
// 与有权限的菜单取交集
getPermAppMenu
()
{
getPermAppMenu
(
dxApplications
)
{
const
permMenus
=
this
.
permMenus
.
filter
(
m
=>
m
.
dxApplicationId
)
const
permMenus
=
this
.
permMenus
.
filter
(
m
=>
m
.
dxApplicationId
)
this
.
cardList
.
forEach
(
app
=>
{
dxApplications
.
forEach
(
app
=>
{
const
menuIdx
=
permMenus
.
findIndex
(
g
=>
g
.
name
===
app
.
title
)
const
menuIdx
=
permMenus
.
findIndex
(
g
=>
g
.
dxApplicationId
===
app
.
id
)
if
(
menuIdx
>
-
1
)
{
if
(
menuIdx
>
-
1
)
{
// app.hasPermission = !!permMenus.find(h => h.parentId && h.name === app.title)
app
.
dxApplicationMenus
=
permMenus
.
filter
(
h
=>
h
.
parentId
&&
h
.
dxApplicationId
===
app
.
id
)
app
.
hasPermission
=
!!
permMenus
.
find
(
h
=>
h
.
name
===
app
.
title
)
this
.
cardList
.
forEach
((
card
,
index
)
=>
{
if
(
card
.
title
===
app
.
name
)
{
const
tempCard
=
{
...
card
,
...
app
,
hasPermission
:
true
}
this
.
$set
(
this
.
cardList
,
index
,
tempCard
)
}
})
}
})
},
goContent
(
app
)
{
if
(
!
app
.
dxApplicationMenus
)
{
return
this
.
$utils
.
showMessageWarning
(
'请在应用中心配置菜单页面'
)
}
}
const
menu
=
this
.
$utils
.
generateTree
(
app
.
dxApplicationMenus
,
{
pid
:
'parentId'
})
})
if
(
this
.
activeWorkSpace
)
{
const
params
=
{
'openProps'
:
[
{
'name'
:
'dxApplicationPage'
}
],
'searchItems'
:
{
'items'
:
[
{
'fieldName'
:
'dxWorkspaceId'
,
'operator'
:
'EQ'
,
'value'
:
this
.
activeWorkSpace
.
id
},
{
'fieldName'
:
'dxApplicationId'
,
'operator'
:
'EQ'
,
'value'
:
app
.
id
}
],
'operator'
:
'AND'
}
}
this
.
$api
.
searchApi
(
'DxSpaceStartPage'
,
params
).
then
(
res
=>
{
if
(
res
.
items
.
content
&&
res
.
items
.
content
.
length
)
{
const
activePage
=
res
.
items
.
content
[
0
].
dxApplicationPage
let
toPage
if
(
activePage
.
type
===
'1'
)
{
toPage
=
{
path
:
`/page/
${
activePage
.
pageKey
}
`
,
query
:
{}
}
}
else
if
(
activePage
.
type
===
'2'
)
{
toPage
=
{
path
:
activePage
.
route
,
query
:
{}
}
}
if
(
activePage
.
name
)
{
toPage
.
query
.
title
=
activePage
.
name
}
toPage
.
query
.
menuRootAppId
=
app
.
id
localStorage
.
setItem
(
'moduleName'
,
app
.
name
)
this
.
$router
.
push
(
toPage
)
}
else
{
this
.
topage
(
menu
,
app
)
}
})
}
else
{
this
.
topage
(
menu
,
app
)
}
},
topage
(
menu
,
app
)
{
const
activePage
=
this
.
getActiveTab
(
menu
)
if
(
!
activePage
)
return
let
toPage
if
(
activePage
.
type
===
'1'
)
{
toPage
=
{
path
:
`/page/
${
activePage
.
pageKey
}
`
,
query
:
{}
}
}
else
if
(
activePage
.
type
===
'2'
)
{
toPage
=
{
path
:
activePage
.
route
,
query
:
{}
}
}
if
(
activePage
.
name
)
{
toPage
.
query
.
title
=
activePage
.
name
}
toPage
.
query
.
menuRootAppId
=
app
.
id
localStorage
.
setItem
(
'moduleName'
,
app
.
title
)
this
.
$router
.
push
(
toPage
)
},
getActiveTab
(
menus
)
{
for
(
let
i
=
0
;
i
<
menus
.
length
;
i
++
)
{
const
menu
=
menus
[
i
]
if
(
menu
.
dxApplicationPage
&&
menu
.
dxApplicationPage
.
subTypeName
===
'DxApplicationPage'
&&
menu
.
permFlag
)
{
return
menu
.
dxApplicationPage
}
else
if
(
menu
.
children
&&
menu
.
children
.
length
>
0
&&
menu
.
permFlag
)
{
for
(
let
j
=
0
;
j
<
menu
.
children
.
length
;
j
++
)
{
const
item
=
menu
.
children
[
j
]
if
(
item
.
dxApplicationPage
&&
item
.
dxApplicationPage
.
subTypeName
===
'DxApplicationPage'
)
{
return
item
.
dxApplicationPage
}
else
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
return
this
.
getActiveTab
(
item
)
}
}
}
}
}
}
}
}
}
}
...
...
applications/dee-task-center/src/views/home/index.vue
View file @
186cc5c5
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
* @FilePath: applications/dee-task-center/src/views/home/index.vue
* @FilePath: applications/dee-task-center/src/views/home/index.vue
*/
*/
<
template
>
<
template
>
<div
class=
"home-container"
>
<div
v-if=
"userInfo!=='sysadmin'&&userInfo!=='secadmin'"
class=
"home-container"
>
<dee-fold-pane
:min-percent=
"30"
:default-percent=
"33"
split=
"vertical"
class=
"detail-pane"
>
<dee-fold-pane
:min-percent=
"30"
:default-percent=
"33"
split=
"vertical"
class=
"detail-pane"
>
<template
slot=
"paneL"
>
<template
slot=
"paneL"
>
<!-- 左侧 -->
<!-- 左侧 -->
...
@@ -100,7 +100,8 @@ export default {
...
@@ -100,7 +100,8 @@ export default {
{
color
:
'#F48686'
,
name
:
'某缺件率'
,
present
:
20
}
{
color
:
'#F48686'
,
name
:
'某缺件率'
,
present
:
20
}
],
],
activeTitle
:
'我的待办'
activeTitle
:
'我的待办'
,
userInfo
:
localStorage
.
getItem
(
'user'
)
}
}
},
},
computed
:
{
computed
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment