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
89766cb2
Commit
89766cb2
authored
Oct 11, 2024
by
wangdanlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基线
parent
5c2556f5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
204 additions
and
7 deletions
+204
-7
util.js
applications/architecture-dee/src/utils/util.js
+18
-1
baselineSelect.vue
...eComponents/components/baselineCompare/baselineSelect.vue
+89
-0
index.vue
...rc/privateComponents/components/baselineCompare/index.vue
+97
-6
No files found.
applications/architecture-dee/src/utils/util.js
View file @
89766cb2
...
@@ -1628,6 +1628,22 @@ export function findByNameVnode(obj, targetName) {
...
@@ -1628,6 +1628,22 @@ export function findByNameVnode(obj, targetName) {
return findByNameVnode(obj.$parent, targetName)
return findByNameVnode(obj.$parent, targetName)
}
}
}
}
function addQueryParams(url, params) {
let queryString = ''
if (!(params && typeof params === 'object') || !Object.keys(params).length) {
return url
}
for (const key in params) {
if (params.hasOwnProperty(key)) {
let val = params[key]
val = Array.isArray(val) ? val.join(',') : val
queryString += `${queryString.length > 0? '&' : ''}${key}=${val}`
}
}
return `${url}${queryString.length > 0? '?' : ''}${queryString}`
}
export default {
export default {
treeSetProp,
treeSetProp,
treeFindBackArray,
treeFindBackArray,
...
@@ -1715,5 +1731,6 @@ export default {
...
@@ -1715,5 +1731,6 @@ export default {
getUserRoleInfo,
getUserRoleInfo,
loadThirdJs,
loadThirdJs,
utilsList,
utilsList,
findByNameVnode
findByNameVnode,
addQueryParams
}
}
applications/dee-project/src/privateComponents/components/baselineCompare/baselineSelect.vue
0 → 100644
View file @
89766cb2
<
template
>
<div
class=
"choose_baseline"
>
<span
style=
"color: #4a4a4a; font-size: 14px;"
>
请选择基线:
</span>
<el-select
v-model=
"chooseVal"
size=
"small"
placeholder=
"请选择基线"
@
change=
"getChoosed"
>
<el-option
v-for=
"item in options"
:key=
"item.baselineId"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
</
template
>
<
script
>
export
default
{
name
:
'BaselineDiffHeader'
,
props
:
{
value
:
{
type
:
[
Number
,
String
],
default
:
-
1
}
},
data
()
{
return
{
chooseVal
:
this
.
value
,
options
:
[]
}
},
computed
:
{
},
watch
:
{
value
(
val
)
{
this
.
chooseVal
=
val
}
},
mounted
()
{
this
.
getBaselineDate
()
},
methods
:
{
getBaselineDate
()
{
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
10
,
'searchItems'
:
{
'children'
:
[],
'items'
:
[],
'operator'
:
'AND'
},
'openProps'
:
[
{
'name'
:
'creator'
,
'pageFrom'
:
1
,
'pageSize'
:
9999
}
],
'sortItem'
:
[
{
'fieldName'
:
'modifyTime'
,
'sortOrder'
:
'desc'
}
]
}
this
.
$api
.
searchApi
(
'ExtPlanBaseLine'
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
options
=
res
.
items
.
content
.
map
(
item
=>
{
return
{
label
:
item
.
name
+
'('
+
item
.
planDisPlayName
+
')'
,
value
:
item
.
id
}
})
}
})
},
getChoosed
(
val
)
{
if
(
val
)
{
this
.
$emit
(
'chooseBaseline'
,
val
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
>
.choose_baseline
{
padding
:
10px
;
}
</
style
>
applications/dee-project/src/privateComponents/components/baselineCompare/index.vue
View file @
89766cb2
...
@@ -28,21 +28,21 @@
...
@@ -28,21 +28,21 @@
</div>
</div>
<div
class=
"flex-start"
>
<div
class=
"flex-start"
>
<div
class=
"compare-item"
>
<div
class=
"compare-item"
>
<
div
class=
"title"
>
{{
`原始基线: ${originalForm.name || ''
}
(${originalForm.planName || ''
}
)`
}}
<
/div
>
<
baselineSelect
:value=
"leftDefault"
@
chooseBaseline=
"getLeftChoose"
/
>
<dee-up-table
<dee-up-table
table-height=
"auto"
table-height=
"auto"
:columns=
"showColumns"
:columns=
"showColumns"
:
data
=
"
righ
tTableData"
:data=
"
lef
tTableData"
:row-style=
"set_right_row_style"
:row-style=
"set_right_row_style"
:cell-style=
"set_cell_style"
:cell-style=
"set_cell_style"
/>
/>
</div>
</div>
<div
class=
"compare-item left-item"
>
<div
class=
"compare-item left-item"
>
<
div
class
=
"title"
>
{{
`目标基线: ${targetForm.name || ''
}
(${targetForm.planName || ''
}
)`
}}
<
/div
>
<
baselineSelect
:value=
"rightDefault"
@
chooseBaseline=
"getRightChoose"
/
>
<dee-up-table
<dee-up-table
table-height=
"auto"
table-height=
"auto"
:columns=
"showColumns"
:columns=
"showColumns"
:
data
=
"
lef
tTableData"
:data=
"
righ
tTableData"
:row-style=
"set_left_row_style"
:row-style=
"set_left_row_style"
:cell-style=
"set_cell_style"
:cell-style=
"set_cell_style"
/>
/>
...
@@ -56,10 +56,12 @@
...
@@ -56,10 +56,12 @@
import
FilterColumn
from
'./filterColumn'
import
FilterColumn
from
'./filterColumn'
import
{
getLayOut
}
from
'@/api/config'
import
{
getLayOut
}
from
'@/api/config'
import
{
getPlanTreeAndTask
}
from
'@/api/plan'
import
{
getPlanTreeAndTask
}
from
'@/api/plan'
import
baselineSelect
from
'./baselineSelect.vue'
import
{
post
}
from
'@/utils/http'
export
default
{
export
default
{
name
:
'BaselineCompare'
,
name
:
'BaselineCompare'
,
componentName
:
'基线对比'
,
componentName
:
'基线对比'
,
components
:
{
FilterColumn
}
,
components
:
{
FilterColumn
,
baselineSelect
},
props
:
{
props
:
{
selectedData
:
{
selectedData
:
{
type
:
Array
,
type
:
Array
,
...
@@ -85,7 +87,10 @@ export default {
...
@@ -85,7 +87,10 @@ export default {
changedDataObj
:
{},
changedDataObj
:
{},
leftTableData
:
[],
leftTableData
:
[],
rightTableData
:
[],
rightTableData
:
[],
showColumns
:
[]
showColumns
:
[],
baselineData
:
[],
leftDefault
:
''
,
rightDefault
:
''
}
}
},
},
computed
:
{
computed
:
{
...
@@ -191,6 +196,92 @@ export default {
...
@@ -191,6 +196,92 @@ export default {
})
})
return
data
return
data
},
},
getLeftChoose
(
id
)
{
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
9999
,
'searchItems'
:
{
'items'
:
[
{
'fieldName'
:
'id'
,
'operator'
:
'EQ'
,
'value'
:
id
}
],
'operator'
:
'AND'
},
'openProps'
:
[
{
'name'
:
'extPlanBaseLineLinks'
,
'openProps'
:
[
{
'name'
:
'target'
}
]
}
],
'sortItem'
:
[
{
'fieldName'
:
'modifyTime'
,
'sortOrder'
:
'desc'
}
]
}
post
(
`/ExtPlanBaseLine/find/recursion`
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
res
.
items
.
content
.
map
(
item
=>
{
if
(
item
.
extPlanBaseLineLinks
)
{
item
.
extPlanBaseLineLinks
.
forEach
(
x
=>
{
this
.
leftTableData
.
push
(
x
.
target
)
})
}
})
}
})
},
getRightChoose
(
id
)
{
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
9999
,
'searchItems'
:
{
'items'
:
[
{
'fieldName'
:
'id'
,
'operator'
:
'EQ'
,
'value'
:
id
}
],
'operator'
:
'AND'
},
'openProps'
:
[
{
'name'
:
'extPlanBaseLineLinks'
,
'openProps'
:
[
{
'name'
:
'target'
}
]
}
],
'sortItem'
:
[
{
'fieldName'
:
'modifyTime'
,
'sortOrder'
:
'desc'
}
]
}
post
(
`/ExtPlanBaseLine/find/recursion`
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
res
.
items
.
content
.
map
(
item
=>
{
if
(
item
.
extPlanBaseLineLinks
)
{
item
.
extPlanBaseLineLinks
.
forEach
(
x
=>
{
this
.
rightTableData
.
push
(
x
.
target
)
})
}
})
}
})
},
// 查询原始基线相关的任务
// 查询原始基线相关的任务
getOriginalData
(
leftArr
,
tarIsOrigPlan
)
{
getOriginalData
(
leftArr
,
tarIsOrigPlan
)
{
const
origId
=
this
.
selectedDataDisplay
[
0
].
targetId
const
origId
=
this
.
selectedDataDisplay
[
0
].
targetId
...
...
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