Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
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
INET-TWO
web
Commits
7ba666f1
Commit
7ba666f1
authored
Aug 14, 2024
by
ztf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并代码
parent
2c7ea38c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
47 deletions
+13
-47
jumpDetailsPage.vue
...rchitecture-dee/src/customCompontents/jumpDetailsPage.vue
+13
-47
No files found.
applications/architecture-dee/src/customCompontents/jumpDetailsPage.vue
View file @
7ba666f1
<
template
>
<div>
<span
:class=
"[showLink?'link':'']"
@
click=
"click"
>
{{
linkLabel
}}
</span>
<span
:class=
"[showLink?'link':'']"
@
click=
"click"
>
{{
linkLabel
}}
</span>
</div>
</
template
>
<
script
>
import
_get
from
'lodash.get'
export
default
{
// import引入的组件需要注入到对象中才能使用
components
:
{},
export
default
{
props
:
{
scope
:
{
type
:
Object
,
...
...
@@ -39,12 +34,6 @@ export default {
default
:
()
=>
'subTypeName'
}
},
data
()
{
// 这里存放数据
return
{}
},
// 监听属性 类似于data概念
computed
:
{
showLink
()
{
if
(
this
.
scope
&&
this
.
scope
.
row
&&
_get
(
this
.
scope
.
row
,
this
.
showAttr
)
&&
this
.
perm
)
{
...
...
@@ -58,62 +47,39 @@ export default {
return
_get
(
row
,
filedName
)
},
linkName
()
{
if
(
this
.
scope
.
column
.
property
.
split
(
'.'
).
length
>
1
)
{
return
this
.
scope
.
column
.
property
.
split
(
'.'
)[
0
]
}
else
{
return
''
const
property
=
this
.
scope
.
column
.
property
.
split
(
'.'
)
return
property
.
length
>
1
?
property
[
0
]
:
''
}
}
},
// 监控data中的数据变化
watch
:
{
},
// 生命周期 - 创建完成(可以访问当前this实例)
created
()
{
},
// 生命周期 - 挂载完成(可以访问DOM元素)
mounted
()
{
},
activated
()
{
},
// 方法集合
methods
:
{
click
()
{
if
(
!
this
.
showLink
)
{
return
}
let
subTypeName
=
''
// let modelName = ''
let
id
=
''
if
(
this
.
linkName
)
{
id
=
this
.
scope
.
row
[
this
.
linkName
].
id
||
this
.
scope
.
row
.
targetId
// const list = this.scope.row[this.linkName].dxClassname.split('.')
// modelName = list.slice(list.length - 1)[0].slice(0, list.slice(list.length - 1)[0].length - 2)
subTypeName
=
this
.
scope
.
row
[
this
.
linkName
].
subTypeName
const
data
=
this
.
scope
.
row
[
this
.
linkName
]
id
=
data
.
id
||
this
.
scope
.
row
.
targetId
subTypeName
=
data
.
subTypeName
this
.
$router
.
push
({
path
:
`/configured-page/cd/
${
subTypeName
}
/defaultInfo/
${
id
}
`
,
query
:
{
title
:
`
${
data
.
name
}
_
${
data
.
number
||
data
.
id
}
详情`
}
})
return
}
else
{
// const list = _get(this.scope.row, this.dxClassname)
subTypeName
=
_get
(
this
.
scope
.
row
,
this
.
subTypeName
)
// modelName = this.$utils.getModelName4dxClassName(list)
id
=
_get
(
this
.
scope
.
row
,
this
.
idName
)
||
this
.
scope
.
row
.
targetId
}
this
.
$router
.
push
({
path
:
`/configured-page/cd/
${
subTypeName
}
/defaultInfo/
${
id
}
`
,
query
:
{
title
:
`
${
this
.
scope
.
row
.
name
}
_
${
this
.
scope
.
row
.
number
||
this
.
scope
.
row
.
id
}
详情`
}
})
// this.$router.push({
// name: 'generalDetail',
// params: {
// id: id,
// subTypeName: subTypeName,
// modelName: modelName
// }
// })
}
}
}
</
script
>
<
style
lang=
"scss"
>
@import
"../styles/variables"
;
...
...
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