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
ca6aac0b
Commit
ca6aac0b
authored
Sep 12, 2024
by
ztf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建项目相关组件
parent
2a213f2d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
235 additions
and
4 deletions
+235
-4
index.vue
.../src/privateComponents/components/createProject/index.vue
+118
-0
index.vue
...ect/src/privateComponents/components/extProject/index.vue
+101
-0
index.vue
.../privateComponents/components/gotoProjectDetial/index.vue
+8
-0
index.vue
.../src/privateComponents/components/selectProject/index.vue
+8
-4
No files found.
applications/dee-project/src/privateComponents/components/createProject/index.vue
0 → 100644
View file @
ca6aac0b
<
template
>
<div
class=
"project"
>
<dee-as-com
:lay-config=
"
{
typeName: 'ExtProgram',
layKey: 'defaultCreate'
}"
:form="form"
@on-submit="toSubmit"
@on-cancel="cancel"
/>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
name
:
'CreateProject'
,
componentName
:
'新建项目'
,
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
({})
}
},
data
()
{
return
{
// eslint-disable-next-line vue/no-dupe-keys
form
:
{},
formData
:
this
.
basicData
,
subTypeName
:
'ExtProgram'
,
projectCategory
:
''
}
},
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
:
{
toSubmit
()
{
console
.
log
(
'进来了'
)
if
(
this
.
projectCategory
===
'program'
)
{
console
.
log
(
'是项目群'
)
const
params
=
this
.
form
post
(
'/ExtProgram/recursion'
,
params
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
`添加成功`
)
this
.
$emit
(
'completeEven'
)
})
}
else
if
(
this
.
projectCategory
===
'project'
)
{
console
.
log
(
'是项目'
)
const
id
=
this
.
form
.
extProgram
.
id
delete
this
.
form
.
extProgram
delete
this
.
form
.
dxType
const
params
=
{
subTypeName
:
'DxContextProject'
,
id
:
id
,
extProgramProjectLinks
:
[{
operator
:
'ADD'
,
target
:
{
dxType
:
'project'
,
...
this
.
form
,
operator
:
'ADD'
,
parentId
:
0
,
parentName
:
'Root'
,
state
:
'edit'
}
}],
operator
:
'NO_CHANGE'
}
post
(
'/ExtProgram/recursion'
,
params
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
`添加成功`
)
this
.
$emit
(
'completeEven'
)
})
}
else
if
(
this
.
projectCategory
===
'childProject'
)
{
console
.
log
(
'是子项'
)
this
.
form
.
parentId
=
this
.
form
.
extProject
.
id
delete
this
.
form
.
extProgram
delete
this
.
form
.
extProject
delete
this
.
form
.
dxType
this
.
form
.
subTypeName
=
'DxContextProject'
this
.
form
.
operator
=
'ADD'
const
params
=
Object
.
assign
(
this
.
formData
,
this
.
form
)
console
.
log
(
'params'
,
params
)
post
(
'/DxContextProject/recursion'
,
params
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
`添加成功`
)
this
.
$emit
(
'completeEven'
)
})
}
},
cancel
()
{
this
.
$emit
(
'cancel'
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.project
{
height
:
500px
;
}
</
style
>
applications/dee-project/src/privateComponents/components/extProject/index.vue
0 → 100644
View file @
ca6aac0b
<!--
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-09-11 11:05:24
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-09-11 18:30:49
-->
<
template
>
<div>
<el-select
v-model=
"project"
placeholder=
"请选择"
@
change=
"handleChange"
>
<el-option
v-for=
"item in projectList"
:key=
"item.value"
:label=
"item.name"
:value=
"item.name"
/>
</el-select></div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
name
:
'ExtProject'
,
componentName
:
'所属项目'
,
props
:
{
value
:
{
type
:
[
Object
,
Array
,
String
],
default
:
()
=>
null
},
form
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
project
:
''
,
projectList
:
[],
programId
:
''
}
},
watch
:
{
'form.extProgram.id'
:
{
immediate
:
true
,
deep
:
true
,
handler
(
val
)
{
if
(
val
)
{
console
.
log
(
'改变了'
,
val
)
this
.
getProjectList
(
val
)
}
}
}
},
methods
:
{
getProjectList
(
programId
)
{
const
params
=
{
'searchItems'
:
{
'children'
:
[],
'items'
:
[{
'fieldName'
:
'id'
,
'operator'
:
'EQ'
,
'value'
:
programId
}
],
'operator'
:
'AND'
},
'sortItem'
:
[{
'fieldName'
:
'modifyTime'
,
'sortOrder'
:
'desc'
}],
openProps
:
[{
name
:
'extProgramProjectLinks'
,
openProps
:
[{
name
:
'target'
}]
}]
}
post
(
`/ExtProgram/search`
,
params
).
then
((
res
)
=>
{
if
(
res
.
items
.
content
)
{
this
.
projectList
=
[]
res
.
items
.
content
.
forEach
(
list
=>
{
list
.
extProgramProjectLinks
.
forEach
(
item
=>
{
this
.
projectList
.
push
(
item
.
target
)
})
})
}
})
},
handleChange
(
val
)
{
console
.
log
(
'val'
,
val
)
this
.
$emit
(
'input'
,
val
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
applications/dee-project/src/privateComponents/components/gotoProjectDetial/index.vue
View file @
ca6aac0b
...
...
@@ -18,6 +18,10 @@ export default {
itemObj
:
{
type
:
Object
,
default
:
()
=>
{}
},
basicData
:
{
type
:
Object
,
default
:
()
=>
({})
}
},
layoutConfigData
:
[
...
...
@@ -39,6 +43,10 @@ export default {
}
},
mounted
()
{
console
.
log
(
'value'
,
this
.
value
)
console
.
log
(
'this.form'
,
this
.
form
)
console
.
log
(
'itemObj'
,
this
.
itemObj
)
console
.
log
(
'basicData'
,
this
.
basicData
)
},
methods
:
{
...
...
applications/dee-project/src/privateComponents/components/selectProject/index.vue
View file @
ca6aac0b
...
...
@@ -2,23 +2,23 @@
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-08-29 11:42:37
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-09-1
0 11:42:34
* @LastEditTime: 2024-09-1
2 09:21:12
-->
<
template
>
<div>
<div
class=
"select-project"
>
<!-- 这里要判断是项目还是子项,显示的是项目的关联的收入合同里面的 -->
<el-select
v-if=
"showSelect"
v-model=
"project"
placeholder=
"请选择"
@
change=
"handleChange"
>
<
!--
<
el-select
v-if=
"showSelect"
v-model=
"project"
placeholder=
"请选择"
@
change=
"handleChange"
>
<el-option
v-for=
"item in projectList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-select>
-->
<!--input输入-->
<el-input
v-
else
v-
model=
"project"
placeholder=
"请输入"
@
input=
"handleChange"
/>
<el-input
v-model=
"project"
placeholder=
"请输入"
@
input=
"handleChange"
/>
<img
v-if=
"showIcon"
class=
"icon"
...
...
@@ -63,6 +63,10 @@ export default {
}
},
watch
:
{
value
(
val
)
{
this
.
project
=
val
this
.
$emit
(
'input'
,
val
)
},
'form.projectCategory'
:
{
immediate
:
true
,
deep
:
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