Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-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
TFMOM
TF-MOM-WEB
Commits
e5459b0b
Commit
e5459b0b
authored
Apr 24, 2024
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
问题进展组件修改
parent
856f5a21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
+27
-27
index.vue
...privateComponents/components/ProblemProgressCom/index.vue
+27
-27
No files found.
applications/dee-mes/src/privateComponents/components/ProblemProgressCom/index.vue
View file @
e5459b0b
<
template
>
<div
class=
"problemProgressCom"
>
<el-form
ref=
"form"
class=
"processForm"
:inline=
"true"
:model=
"formData"
label-width=
"40px"
>
<el-row
v-for=
"(item, index) in
formData.progresss
"
:key=
"index"
>
<el-row
v-for=
"(item, index) in
resultFormData
"
:key=
"index"
>
<el-col
:span=
"5"
>
<el-form-item
label=
"日期"
:prop=
"'progresss.' + index + '.
create
Time'"
:prop=
"'progresss.' + index + '.
progress
Time'"
>
<!-- :rules="
{
required: true, message: '该项必填', trigger: 'blur'
}" -->
<el-date-picker
v-model=
"item.
create
Time"
v-model=
"item.
progress
Time"
size=
"small"
type=
"date"
value-format=
"yyyy-MM-dd HH:mm:ss"
...
...
@@ -28,15 +28,15 @@
<!-- :rules="[
{required: true, message: '该项必填', trigger: 'blur'},
]" -->
<el-input
v-model=
"item.progressItem"
autosize
type=
"textarea"
size=
"small"
/>
<el-input
v-model=
"item.progressItem"
autosize
type=
"textarea"
size=
"small"
@
change=
"changeVal"
/>
</el-form-item>
</el-col>
<el-col
:span=
"2"
>
<el-form-item
class=
"btn-box"
>
<span
v-if=
"index+1 ==
formData.progresss.length"
class=
"btn-item"
title=
"新增"
@
click=
"addItem
"
>
<span
v-if=
"index+1 ==
resultFormData.length"
class=
"btn-item"
title=
"新增"
@
click=
"addItem"
@
change=
"changeVal
"
>
<img
src=
"/icons/c-add.png"
alt=
""
>
</span>
<span
v-if=
"index !== 0"
class=
"btn-item"
title=
"删除"
@
click
.
stop=
"() => deleteItem(data
)"
>
<span
v-if=
"index !== 0"
class=
"btn-item"
title=
"删除"
@
click
=
"deleteItem(item,index
)"
>
<img
src=
"/icons/c-creatbackups.png"
alt=
""
>
</span>
</el-form-item>
...
...
@@ -76,7 +76,7 @@ export default {
formData
:
{
progresss
:
[
{
create
Time
:
moment
(
new
Date
()).
format
(
'YYYY-MM-DD HH:mm:ss'
),
progress
Time
:
moment
(
new
Date
()).
format
(
'YYYY-MM-DD HH:mm:ss'
),
progressItem
:
''
,
operator
:
'ADD'
}
...
...
@@ -85,31 +85,29 @@ export default {
}
},
computed
:
{},
computed
:
{
resultFormData
()
{
return
this
.
formData
.
progresss
.
filter
(
item
=>
item
.
operator
!==
'REMOVE'
)
}
},
watch
:
{
value
:
{
immediate
:
true
,
deep
:
true
,
handler
(
v
)
{
if
(
v
)
{
// this.selVal = this.value
this
.
$set
(
this
.
formData
,
'progresss'
,
this
.
value
)
this
.
$set
(
this
.
formData
,
'progresss'
,
this
.
value
.
map
(
item
=>
{
if
(
!
item
.
operator
)
{
if
(
item
.
id
)
{
item
.
operator
=
'MODIFY'
}
else
{
item
.
operator
=
'ADD'
}
}
return
item
}))
}
}
},
formData
:
{
immediate
:
true
,
deep
:
true
,
handler
()
{
this
.
$emit
(
'input'
,
this
.
formData
.
progresss
.
map
(
item
=>
{
if
(
item
.
id
)
{
item
.
operator
=
'MODIFY'
}
else
{
item
.
operator
=
'ADD'
}
return
item
}))
}
}
},
created
()
{
...
...
@@ -118,16 +116,18 @@ export default {
methods
:
{
addItem
()
{
this
.
formData
.
progresss
.
push
({
createTime
:
moment
(
new
Date
()).
format
(
'YYYY-MM-DD
'
),
progressTime
:
moment
(
new
Date
()).
format
(
'YYYY-MM-DD HH:mm:ss
'
),
progressItem
:
''
,
operator
:
'ADD'
})
this
.
changeVal
()
},
deleteItem
(
item
,
index
)
{
this
.
formData
.
progresss
.
splice
(
index
,
1
)
item
.
operator
=
'REMOVE'
this
.
changeVal
()
},
changeVal
()
{
this
.
$emit
(
'input'
,
this
.
selVal
)
this
.
$emit
(
'input'
,
this
.
formData
.
progresss
)
}
}
}
...
...
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