Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
6
608-pdm-web-5g
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
pdm
608-pdm-web-5g
Commits
5a44b68a
Commit
5a44b68a
authored
Jun 06, 2024
by
xioln
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
行动项信息查看
parent
680a80c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
137 additions
and
7 deletions
+137
-7
index.vue
src/components/actionItem/index.vue
+124
-0
index.vue
src/views/InfoDetail/index.vue
+13
-7
No files found.
src/components/actionItem/index.vue
0 → 100644
View file @
5a44b68a
<
template
>
<div
class=
"action-item"
>
<van-collapse
v-if=
"historyInfo.length > 0"
v-model=
"activeNames"
>
<van-collapse-item
v-for=
"(item, index) in historyInfo"
:key=
"index"
:title=
"item.deliverName"
:name=
"item.id"
icon=
"orders-o"
>
<b>
工作类型:
</b>
{{
dictObj
[
'WorkType'
]
&&
findDictValue
(
'WorkType'
,
item
.
workType
)
}}
<br
/>
<b>
交付物名称:
</b>
{{
item
.
deliverName
}}
<br
/>
<b>
产品名称:
</b>
{{
item
.
productName
}}
<br
/>
<b>
责任单位:
</b>
{{
item
.
responsibleUnitName
}}
<br
/>
<b>
计划完成日期:
</b>
{{
item
.
planCompleteTime
}}
<br
/>
<b>
任务完成日期:
</b>
{{
item
.
taskCompleteTime
}}
<br
/>
<b>
状态:
</b>
{{
dictObj
[
'ObjStatus'
]
&&
findDictValue
(
'ObjStatus'
,
item
.
state
)
}}
<br
/>
<b>
工作内容:
</b>
{{
item
.
workContent
}}
<br
/>
</van-collapse-item>
</van-collapse>
<van-empty
v-else
description=
"数据为空"
/>
</div>
</
template
>
<
script
>
import
{
getDictListByCode
}
from
'@/api/taskDetail'
export
default
{
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
{}
},
flowType
:
{
type
:
String
,
default
:
''
}
},
components
:
{},
data
()
{
return
{
historyInfo
:
[],
activeNames
:
[],
dictObj
:
{}
}
},
watch
:
{
},
created
()
{
this
.
getData
()
this
.
getDictListByCode
(
'WorkType'
)
this
.
getDictListByCode
(
'ObjStatus'
)
},
mounted
()
{
},
computed
:
{},
methods
:
{
getData
()
{
const
params
=
{
searchItems
:
{
children
:
[],
items
:
[
{
fieldName
:
'sourceId'
,
operator
:
'EQ'
,
value
:
this
.
basicData
.
id
}
],
operator
:
'AND'
},
openProps
:
[{
name
:
'source'
},
{
name
:
'target'
,
openProps
:
[{
name
:
'responsibleUnit'
}]
}]
}
this
.
$api
.
searchApi
(
'ExtActionInfoItemLink'
,
params
).
then
(
res
=>
{
this
.
$nextTick
(()
=>
{
const
datas
=
res
.
items
.
content
.
map
(
items
=>
{
return
{
id
:
items
.
targetId
,
workType
:
items
.
target
.
workType
,
workContent
:
items
.
target
.
workContent
,
deliverName
:
items
.
target
.
deliverName
,
productName
:
items
.
target
.
productName
,
responsibleUnitName
:
items
.
target
?.
responsibleUnit
?.
name
,
planCompleteTime
:
items
.
target
.
planCompleteTime
,
taskCompleteTime
:
items
.
target
.
taskCompleteTime
,
state
:
items
.
target
.
state
}
})
this
.
historyInfo
=
datas
})
})
},
async
getDictListByCode
(
code
)
{
const
res
=
await
getDictListByCode
(
code
)
if
(
!
res
||
!
res
.
items
)
{
return
''
}
this
.
$set
(
this
.
dictObj
,
code
,
res
.
items
.
content
)
},
findDictValue
(
dict
,
value
)
{
// 在对象数组中查找对应的字典值
return
this
.
dictObj
[
dict
].
find
(
item
=>
item
.
dictKey
===
value
)?.
dictValue
||
''
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.action-item
{
.van-cell
{
font-size
:
14px
;
}
.van-collapse-item__content
{
// padding: 2.2vw 8.266667vw;
}
.van-collapse-item__content
{
font-size
:
12px
;
}
}
</
style
>
src/views/InfoDetail/index.vue
View file @
5a44b68a
...
...
@@ -15,6 +15,9 @@
<div
v-if=
"activeTab === 'pdf'"
class=
"pdf-detail"
>
<pdf
:basicData=
"form"
/>
</div>
<div
v-if=
"activeTab === 'ActionItem'"
>
<ActionItem
:basicData=
"form"
/>
</div>
</van-tab>
</van-tabs>
</div>
...
...
@@ -22,13 +25,15 @@
<
script
>
import
Pdf
from
'@/components/pdf/index'
import
ActionItem
from
'@/components/actionItem/index'
import
{
getInstancePbo
,
getLayOut
}
from
'@/api/taskDetail'
import
DeeForm
from
'@/components/form/form'
export
default
{
components
:
{
Pdf
,
DeeForm
DeeForm
,
ActionItem
},
data
()
{
return
{
...
...
@@ -47,13 +52,15 @@ export default {
},
async
mounted
()
{
console
.
log
(
'this.$route.query.type'
,
this
.
$route
.
query
.
type
)
if
(
this
.
$route
.
query
.
type
===
'ISTART'
)
{
this
.
tabs
=
[{
title
:
'基本信息'
,
key
:
'baseInfo'
}]
this
.
activeTab
=
'baseInfo'
await
this
.
getIstartFormData
()
}
else
if
([
'ExtActionItem'
,
'ExtActionInfo'
].
includes
(
this
.
$route
.
query
.
dxClassname
))
{
this
.
tabs
=
[{
title
:
'基本信息'
,
key
:
'baseInfo'
}]
this
.
tabs
=
[
{
title
:
'基本信息'
,
key
:
'baseInfo'
},
{
title
:
'行动项信息'
,
key
:
'ActionItem'
}
]
this
.
activeTab
=
'baseInfo'
await
this
.
getFormData
()
await
this
.
getForm
()
...
...
@@ -160,7 +167,6 @@ export default {
fiiterData
(
formData
)
{
console
.
log
(
'formData'
,
formData
)
formData
.
forEach
(
item
=>
{
console
.
log
(
'item.title'
,
item
.
title
)
if
(
item
.
title
&&
item
.
title
!==
'关联文档'
&&
item
.
title
!==
'附件'
)
{
// eslint-disable-next-line no-unused-vars
const
that
=
this
...
...
@@ -305,8 +311,8 @@ export default {
padding-right
:
8px
;
}
}
.van-icon-arrow
{
display
:
none
;
}
//
.van-icon-arrow {
//
display: none;
//
}
}
</
style
>
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