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
082468d6
Commit
082468d6
authored
Oct 17, 2024
by
ztf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建、编辑项目关联合同
parent
0a491a52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
73 deletions
+71
-73
index.vue
...ect/src/privateComponents/components/extProject/index.vue
+5
-15
index.vue
.../privateComponents/components/selectProjectName/index.vue
+66
-58
No files found.
applications/dee-project/src/privateComponents/components/extProject/index.vue
View file @
082468d6
...
...
@@ -2,16 +2,16 @@
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-09-11 11:05:24
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-10-1
6 09:15:46
* @LastEditTime: 2024-10-1
7 17:22:33
-->
<
template
>
<div>
<el-select
v-model=
"project"
placeholder=
"请选择"
@
change=
"handleChange"
>
<el-option
v-for=
"item in projectList"
:key=
"item.
value
"
:key=
"item.
id
"
:label=
"item.name"
:value=
"item
.name
"
:value=
"item"
/>
</el-select></div>
</
template
>
...
...
@@ -45,7 +45,6 @@ export default {
immediate
:
true
,
deep
:
true
,
handler
(
val
)
{
console
.
log
(
'项目群id'
,
val
)
if
(
val
)
{
this
.
getProjectList
(
val
)
}
...
...
@@ -74,21 +73,12 @@ export default {
post
(
`/DxContextProject/search`
,
params
).
then
((
res
)
=>
{
if
(
res
.
items
.
content
)
{
this
.
projectList
=
res
.
items
.
content
console
.
log
(
'res.items.content'
,
res
.
items
.
content
)
// res.items.content.forEach(list => {
// list.extProgramProjectLinks.forEach(item => {
// this.projectList.push(item.target)
// })
// })
}
})
},
handleChange
(
val
)
{
console
.
log
(
'projectList'
,
this
.
projectList
)
const
valObj
=
this
.
projectList
.
find
((
item
)
=>
{
return
item
.
name
===
val
})
console
.
log
(
'点击事件'
,
valObj
)
this
.
$emit
(
'input'
,
valObj
.
id
)
console
.
log
(
' val.id'
,
valObj
.
id
)
this
.
$emit
(
'input'
,
val
)
console
.
log
(
'emit出去的值'
,
val
)
}
}
}
...
...
applications/dee-project/src/privateComponents/components/selectProjectName/index.vue
View file @
082468d6
...
...
@@ -2,7 +2,7 @@
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-08-29 11:42:37
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-10-17 1
0:32:07
* @LastEditTime: 2024-10-17 1
8:02:23
-->
<
template
>
<div>
...
...
@@ -71,9 +71,22 @@ export default {
showSelect
:
false
,
selectRow
:
{},
tableData
:
[],
itemNumber
:
null
,
programId
:
null
,
projectId
:
null
// itemsNumber: null,
projectClass
:
null
,
projectNumber
:
null
,
programNumber
:
null
,
editNumber
:
null
}
},
computed
:
{
itemNumber
()
{
if
(
this
.
projectClass
===
'project'
)
{
return
this
.
programNumber
}
if
(
this
.
projectClass
===
'childProject'
)
{
return
this
.
projectNumber
}
return
null
}
},
watch
:
{
...
...
@@ -84,83 +97,49 @@ export default {
immediate
:
true
,
deep
:
true
,
handler
(
val
)
{
console
.
log
(
'监听项目分类选择合同'
,
val
)
if
(
val
)
{
console
.
log
(
'进来了'
)
this
.
projectClass
=
val
this
.
showIcon
=
val
!==
'program'
}
}
},
// 监听这个的id,判断当前选择项目或者项目群下面的合同
'form.extProgram'
:
{
immediate
:
true
,
deep
:
true
,
handler
(
val
)
{
if
(
val
)
{
console
.
log
(
'项目群id'
,
val
)
this
.
programId
=
val
.
id
this
.
programNumber
=
this
.
form
.
extProgram
.
number
console
.
log
(
' this.programNumber'
,
this
.
programNumber
)
}
}
},
'form.extProject'
:
{
immediate
:
true
,
deep
:
true
,
handler
(
val
)
{
if
(
val
)
{
this
.
projectNumber
=
this
.
form
.
extProject
.
number
console
.
log
(
' this.projectNumber'
,
this
.
projectNumber
)
}
}
}
// 'form.extProject': {
// immediate: true,
// deep: true,
// handler(val) {
// if (val) {
// console.log('val所属项目', val)
// this.getData(val.id)
// // this.showIcon = val !== 'program'
// // this.showSelect = val === 'childProject'
// }
// }
// }
},
mounted
()
{
console
.
log
(
'basicData'
,
this
.
basicData
)
// console.log('this.basicData', this.basicData)
},
methods
:
{
getProjectNumber
()
{
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
10
,
'searchItems'
:
{
'children'
:
[],
'items'
:
[
{
'fieldName'
:
'id'
,
'operator'
:
'EQ'
,
'value'
:
this
.
programId
||
this
.
projectId
}
],
'operator'
:
'AND'
},
'openProps'
:
[],
'sortItem'
:
[
{
'fieldName'
:
'modifyTime'
,
'sortOrder'
:
'desc'
}
]
}
post
(
'/DxContextProject/search'
,
params
).
then
(
res
=>
{
if
(
res
.
items
)
{
this
.
itemNumber
=
res
.
items
.
content
[
0
].
number
console
.
log
(
'this.itemNumber'
,
this
.
itemNumber
)
}
})
},
handleClickOpen
()
{
async
handleClickOpen
()
{
this
.
dialogShow
=
true
if
(
this
.
basicData
&&
this
.
basicData
.
parentId
)
{
await
this
.
getProject
(
this
.
basicData
.
parentId
)
}
this
.
getContractList
()
},
handleChange
(
val
)
{
this
.
$emit
(
'input'
,
val
)
console
.
log
(
'val'
,
val
)
console
.
log
(
'this.form'
,
this
.
form
)
},
radioCurrentChange
(
data
)
{
this
.
selectRow
=
data
.
row
...
...
@@ -202,7 +181,7 @@ export default {
{
'fieldName'
:
'itemNumber'
,
'operator'
:
'EQ'
,
'value'
:
this
.
itemNumber
'value'
:
this
.
editNumber
||
this
.
itemNumber
}
],
'operator'
:
'AND'
...
...
@@ -220,6 +199,35 @@ export default {
this
.
tableData
=
res
.
items
.
content
}
})
},
async
getProject
(
parentId
)
{
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
10
,
'searchItems'
:
{
'children'
:
[],
'items'
:
[
{
'fieldName'
:
'id'
,
'operator'
:
'EQ'
,
'value'
:
parentId
}
],
'operator'
:
'AND'
},
'openProps'
:
[],
'sortItem'
:
[
{
'fieldName'
:
'modifyTime'
,
'sortOrder'
:
'desc'
}
]
}
await
post
(
'/DxContextProject/search'
,
params
).
then
(
res
=>
{
if
(
res
.
items
)
{
this
.
editNumber
=
res
.
items
.
content
[
0
].
number
}
})
}
}
...
...
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