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
13ac7392
Commit
13ac7392
authored
Sep 12, 2024
by
ztf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改项目状态,项目跳转至项目要素页面相关组件修改
parent
ab2b5e19
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
209 additions
and
100 deletions
+209
-100
index.vue
...teComponents/components/changeProjectState copy/index.vue
+50
-0
index.vue
...privateComponents/components/changeProjectState/index.vue
+79
-0
index.vue
...ct/src/privateComponents/components/editProject/index.vue
+38
-51
index.vue
.../privateComponents/components/gotoProjectDetial/index.vue
+19
-31
index.vue
...rc/privateComponents/components/leftProjectTree/index.vue
+4
-3
view.js
.../src/privateComponents/components/leftProjectTree/view.js
+11
-11
index.vue
.../privateComponents/components/selectProjectName/index.vue
+8
-4
No files found.
applications/dee-project/src/privateComponents/components/changeProjectState copy/index.vue
0 → 100644
View file @
13ac7392
<
template
>
<div
class=
"project"
>
<dee-as-com
:lay-config=
"layConfig"
:basic-data=
"projectObj"
/>
</div>
</
template
>
<
script
>
export
default
{
name
:
'ChangeProjectState'
,
componentName
:
'修改项目状态333'
,
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
({})
}
},
data
()
{
return
{
}
},
computed
:
{
projectObj
()
{
return
this
.
basicData
&&
this
.
basicData
.
id
?
this
.
basicData
:
{
id
:
''
}
},
currentModelName
()
{
return
this
.
basicData
.
subTypeName
},
layConfig
()
{
const
configMap
=
{
'ExtProgram'
:
{
typeName
:
'ExtProgram'
,
layKey
:
'updateState'
},
'DxContext'
:
{
typeName
:
'DxContext'
,
layKey
:
'updateState'
},
'DxContextProject'
:
{
typeName
:
'DxContextProject'
,
layKey
:
'updateState'
}
}
return
configMap
[
this
.
currentModelName
]
||
{}
}
},
mounted
()
{
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
applications/dee-project/src/privateComponents/components/changeProjectState/index.vue
0 → 100644
View file @
13ac7392
<
template
>
<div
class=
"project"
>
<dee-as-com
:lay-config=
"
{
typeName: 'ExtProgram',
layKey: 'updateState'
}"
:form="form"
@on-submit="toSubmit"
@on-cancel="cancel"
/>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
name
:
'ChangeProjectState'
,
componentName
:
'修改项目状态'
,
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
({})
}
},
data
()
{
return
{
form
:
{},
subTypeName
:
this
.
basicData
.
subTypeName
}
},
mounted
()
{
this
.
getInitData
()
},
methods
:
{
getInitData
()
{
const
subTypeName
=
this
.
basicData
.
subTypeName
const
id
=
this
.
basicData
.
id
const
params
=
{
'searchItems'
:
{
'children'
:
[],
'items'
:
[{
'fieldName'
:
'id'
,
'operator'
:
'EQ'
,
'value'
:
id
}],
'operator'
:
'AND'
}
}
post
(
`/
${
subTypeName
}
/search`
,
params
).
then
(
res
=>
{
this
.
form
=
res
.
items
.
content
[
0
]
})
},
toSubmit
()
{
const
id
=
this
.
form
.
id
const
status
=
this
.
form
.
state
if
(
this
.
subTypeName
===
'ExtProgram'
)
{
post
(
`/ExtProgram/lifecycle/changeStatus?id=
${
id
}
&status=
${
status
}
&isValid=true`
).
then
(
res
=>
{
this
.
$emit
(
'completeEven'
)
})
}
else
if
(
this
.
subTypeName
===
'DxContext'
||
this
.
subTypeName
===
'DxContextProject'
)
{
post
(
`/DxContextProject/lifecycle/changeStatus?id=
${
id
}
&status=
${
status
}
&isValid=true`
).
then
(
res
=>
{
// this.$utils.showMessageSuccess(`修改状态成功`)
this
.
$emit
(
'completeEven'
)
})
}
},
cancel
()
{
this
.
$emit
(
'cancel'
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
applications/dee-project/src/privateComponents/components/editProject/index.vue
View file @
13ac7392
...
...
@@ -6,10 +6,10 @@
layKey: 'defaultEdit'
}"
:form="form"
:basic-data="basicDataCmp"
@on-submit="toSubmit"
@on-cancel="cancel"
/>
<!-- -->
</div>
...
...
@@ -28,68 +28,55 @@ export default {
},
data
()
{
return
{
// eslint-disable-next-line vue/no-dupe-keys
form
:
{},
subTypeName
:
'ExtProgram'
,
subTypeName
:
this
.
basicData
.
subTypeName
,
projectCategory
:
''
}
},
computed
:
{
basicDataCmp
()
{
return
{
secretCode
:
this
.
basicData
.
secretCode
,
id
:
this
.
basicData
.
id
,
subTypeName
:
this
.
basicData
.
subTypeName
,
// dxPlanId: this.basicData.dxPlanId,
// dxContextId: this.basicData.dxProjectItem && this.basicData.dxProjectItem.dxContextId,
// lifecycleTemplateId: this.basicData.lifecycleTemplateId,
state
:
this
.
basicData
.
state
}
}
mounted
()
{
this
.
getInitData
()
},
watch
:
{
'form.projectCategory'
:
{
immediate
:
true
,
deep
:
true
,
handler
(
val
)
{
//
console
.
log
(
'监听项目分类'
,
val
)
if
(
val
)
{
if
(
val
===
'program'
)
{
this
.
projectCategory
=
'program'
}
else
if
(
val
===
'project'
)
{
this
.
projectCategory
=
'project'
}
else
if
(
val
===
'childProject'
)
{
this
.
projectCategory
=
'childProject'
}
}
}
methods
:
{
getInitData
()
{
const
id
=
this
.
basicData
.
id
const
params
=
{
'searchItems'
:
{
'children'
:
[],
'items'
:
[{
'fieldName'
:
'id'
,
'operator'
:
'EQ'
,
'value'
:
id
}],
'operator'
:
'AND'
},
'openProps'
:
[
{
'name'
:
'extProgramProjectLinks'
,
'openProps'
:
[{
'name'
:
'target'
}]
}]
}
post
(
`/
${
this
.
subTypeName
}
/search`
,
params
).
then
(
res
=>
{
this
.
form
=
res
.
items
.
content
[
0
]
console
.
log
(
'this.form'
,
this
.
form
)
})
},
methods
:
{
toSubmit
()
{
console
.
log
(
'进来了'
)
if
(
this
.
projectCategory
===
'program'
)
{
console
.
log
(
'是项目群'
)
const
params
=
this
.
form
if
(
this
.
subTypeName
===
'ExtProgram'
)
{
const
params
=
{
...
this
.
form
,
operator
:
'MODIFY'
}
post
(
'/ExtProgram/recursion'
,
params
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
`
添加
成功`
)
this
.
$utils
.
showMessageSuccess
(
`
编辑
成功`
)
this
.
$emit
(
'completeEven'
)
})
}
else
if
(
this
.
projectCategory
===
'project'
)
{
console
.
log
(
'是项目'
)
const
id
=
this
.
form
.
extProgram
.
id
delete
this
.
form
.
extProgram
}
else
if
(
this
.
subTypeName
===
'DxContext'
)
{
const
id
=
this
.
form
.
extProgramProjectLinks
[
0
].
id
delete
this
.
form
.
extProgramProjectLinks
delete
this
.
form
.
dxType
const
params
=
{
subTypeName
:
'DxContextProject'
,
id
:
id
,
extProgramProjectLinks
:
[{
operator
:
'
ADD
'
,
operator
:
'
MODIFY
'
,
target
:
{
dxType
:
'project'
,
...
this
.
form
,
operator
:
'ADD'
,
dxType
:
'project'
,
operator
:
'MODIFY'
,
parentId
:
0
,
parentName
:
'Root'
,
state
:
'edit'
...
...
@@ -98,12 +85,12 @@ export default {
operator
:
'NO_CHANGE'
}
post
(
'/ExtProgram/recursion'
,
params
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
`
添加
成功`
)
this
.
$utils
.
showMessageSuccess
(
`
编辑
成功`
)
this
.
$emit
(
'completeEven'
)
})
}
else
if
(
this
.
projectCategory
===
'child
Project'
)
{
}
else
if
(
this
.
subTypeName
===
'DxContext
Project'
)
{
console
.
log
(
'是子项'
)
const
parentId
=
this
.
form
.
extProject
.
i
d
const
parentId
=
this
.
form
.
parentI
d
delete
this
.
form
.
extProgram
delete
this
.
form
.
extProject
delete
this
.
form
.
dxType
...
...
@@ -111,13 +98,13 @@ export default {
const
params
=
{
parentId
:
parentId
,
subTypeName
:
'DxContextProject'
,
operator
:
'
ADD
'
,
operator
:
'
MODIFY
'
,
state
:
'edit'
,
modelName
:
'DxContextProject'
,
...
this
.
form
}
post
(
'/DxContextProject/recursion'
,
params
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
`
添加
成功`
)
this
.
$utils
.
showMessageSuccess
(
`
编辑
成功`
)
this
.
$emit
(
'completeEven'
)
})
}
...
...
applications/dee-project/src/privateComponents/components/gotoProjectDetial/index.vue
View file @
13ac7392
<
template
>
<div
:class=
"c
urrentValue.class"
@
click=
"ToRelatedPage"
>
{{
currentValue
.
nam
e
}}
</div>
<div
:class=
"c
lassName"
@
click=
"ToRelatedPage"
>
{{
currentValu
e
}}
</div>
</
template
>
<
script
>
...
...
@@ -32,22 +32,24 @@ export default {
data
()
{
return
{
//
currentValue
:
this
.
value
?
this
.
value
.
number
||
this
.
value
:
null
,
className
:
this
.
scope
.
row
.
subTypeName
===
'ExtProgram'
?
'default'
:
'link'
,
form
:
null
}
},
computed
:
{
currentValue
()
{
if
(
!
this
.
form
)
{
return
{
name
:
null
,
class
:
'link'
}
}
const
isExtProgram
=
this
.
form
.
subTypeName
===
'ExtProgram'
const
className
=
isExtProgram
?
'default'
:
'link'
const
name
=
this
.
value
?
this
.
value
.
number
||
this
.
value
:
null
return
{
name
,
class
:
className
}
}
//
currentValue() {
//
if (!this.form) {
//
return { name: null, class: 'link' }
//
}
//
const isExtProgram = this.form.subTypeName === 'ExtProgram'
//
const className = isExtProgram ? 'default' : 'link'
//
const name = this.value ? this.value.number || this.value : null
//
return {
//
name,
//
class: className
//
}
//
}
},
watch
:
{
'scope.row'
:
{
...
...
@@ -55,37 +57,23 @@ export default {
deep
:
true
,
handler
(
val
)
{
this
.
form
=
val
console
.
log
(
'this.form'
,
this
.
form
)
//
console.log('this.form', this.form)
}
}
},
mounted
()
{
// this.getCurrentValue()
},
methods
:
{
// getCurrentValue() {
// if (this.form.subTypeName !== 'ExtProgram') {
// this.currentValue = {
// name: this.value ? this.value.number || this.value : null,
// class: 'link'
// }
// } else {
// this.currentValue = {
// name: this.value ? this.value.number || this.value : null,
// class: 'default'
// }
// }
// },
ToRelatedPage
()
{
if
(
this
.
form
.
subTypeName
!==
'ExtProgram'
)
{
console
.
log
(
'this.form列表数据'
,
this
.
form
)
//
console.log('this.form列表数据', this.form)
const
name
=
this
.
form
.
name
const
id
=
this
.
form
.
id
const
pageNumber
=
'7cbdc38f-0122-4e78-b162-57601a33bb7a'
const
title
=
'项目要素'
const
subTypeName
=
this
.
form
.
subTypeName
this
.
$router
.
push
({
path
:
`/page/
${
pageNumber
}
/
${
id
}
?title=
${
title
}
&id=
${
id
}
&name=
${
name
}
`
,
path
:
`/page/
${
pageNumber
}
/
${
id
}
?t
ype=
${
subTypeName
}
&t
itle=
${
title
}
&id=
${
id
}
&name=
${
name
}
`
,
query
:
{
name
:
name
,
id
:
id
}
})
}
...
...
applications/dee-project/src/privateComponents/components/leftProjectTree/index.vue
View file @
13ac7392
...
...
@@ -59,15 +59,16 @@ export default {
treeData
:
[],
isEdit
:
false
,
basicData
:
null
,
projectTitle
:
`
${
this
.
$route
.
query
.
projectCode
}
-
${
this
.
$route
.
query
.
name
}
`
,
projectTitle
:
`
${
this
.
$route
.
query
.
name
}
`
,
isShowTooltip
:
false
,
planDetail
:
{
subTypeName
:
this
.
$route
.
query
.
type
,
name
:
this
.
projectTitle
,
disabled
:
false
,
planI
d
:
this
.
$route
.
query
.
id
,
i
d
:
this
.
$route
.
query
.
id
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
pageKey
:
'1cab3884-adf2-4b58-acab-2b3d50df78e3
'
pageKey
:
this
.
$route
.
query
.
type
===
'DxContext'
?
'79edd06e-3a7d-440e-bb4f-4b7691f7a641'
:
'e32bab11-07c1-42b9-9ce7-d00d12c3b680
'
}
}
},
...
...
applications/dee-project/src/privateComponents/components/leftProjectTree/view.js
View file @
13ac7392
...
...
@@ -2,7 +2,7 @@
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-09-02 09:44:58
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-09-
06 17:35:03
* @LastEditTime: 2024-09-
12 18:44:44
*/
export
default
{
props
:
{},
...
...
@@ -17,7 +17,7 @@ export default {
{
disabled
:
false
,
name
:
'计划'
,
planI
d
:
this
.
$route
.
query
.
id
,
i
d
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/plan.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
...
...
@@ -25,7 +25,7 @@ export default {
children
:
[
{
name
:
'进度计划'
,
planI
d
:
this
.
$route
.
query
.
id
,
i
d
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
...
...
@@ -34,7 +34,7 @@ export default {
},
{
name
:
'采购计划'
,
planI
d
:
this
.
$route
.
query
.
id
,
i
d
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
...
...
@@ -43,7 +43,7 @@ export default {
},
{
name
:
'IED计划'
,
planI
d
:
this
.
$route
.
query
.
id
,
i
d
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
...
...
@@ -52,7 +52,7 @@ export default {
},
{
name
:
'接口计划'
,
planI
d
:
this
.
$route
.
query
.
id
,
i
d
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
...
...
@@ -62,7 +62,7 @@ export default {
},
{
name
:
'团队'
,
planI
d
:
this
.
$route
.
query
.
id
,
i
d
:
this
.
$route
.
query
.
id
,
componentName
:
'PlanTeam'
,
icon
:
'/icons/dee-project/team.png'
,
componentType
:
'formConfig'
,
...
...
@@ -72,7 +72,7 @@ export default {
},
{
name
:
'经费'
,
planI
d
:
this
.
$route
.
query
.
id
,
i
d
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
...
...
@@ -80,7 +80,7 @@ export default {
},
{
name
:
'基线'
,
planI
d
:
this
.
$route
.
query
.
id
,
i
d
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
...
...
@@ -89,7 +89,7 @@ export default {
{
name
:
'文档'
,
planI
d
:
this
.
$route
.
query
.
id
,
i
d
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
...
...
@@ -97,7 +97,7 @@ export default {
},
{
name
:
'归档'
,
planI
d
:
this
.
$route
.
query
.
id
,
i
d
:
this
.
$route
.
query
.
id
,
icon
:
'/icons/dee-project/baseline.png'
,
componentType
:
'formConfig'
,
formConfigType
:
'page'
,
...
...
applications/dee-project/src/privateComponents/components/selectProject/index.vue
→
applications/dee-project/src/privateComponents/components/selectProject
Name
/index.vue
View file @
13ac7392
...
...
@@ -2,7 +2,7 @@
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-08-29 11:42:37
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-09-12
09:21:12
* @LastEditTime: 2024-09-12
18:59:27
-->
<
template
>
<div>
...
...
@@ -18,7 +18,7 @@
/>
</el-select>
-->
<!--input输入-->
<el-input
v-model=
"
project
"
placeholder=
"请输入"
@
input=
"handleChange"
/>
<el-input
v-model=
"
form.name
"
placeholder=
"请输入"
@
input=
"handleChange"
/>
<img
v-if=
"showIcon"
class=
"icon"
...
...
@@ -55,7 +55,7 @@ export default {
},
data
()
{
return
{
project
:
''
,
//
project: '',
dialogShow
:
false
,
showIcon
:
false
,
projectList
:
[],
...
...
@@ -64,7 +64,8 @@ export default {
},
watch
:
{
value
(
val
)
{
this
.
project
=
val
// this.project = val
console
.
log
(
'val'
,
val
)
this
.
$emit
(
'input'
,
val
)
},
'form.projectCategory'
:
{
...
...
@@ -79,6 +80,9 @@ export default {
}
},
mounted
()
{
console
.
log
(
'form'
,
this
.
form
)
},
methods
:
{
handleClickOpen
()
{
this
.
dialogShow
=
true
...
...
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