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
5f330e67
Commit
5f330e67
authored
Oct 19, 2023
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
履历本附件类型单一性校验
parent
6fc32c3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
index.vue
...ivateComponents/components/BiographicDataUpload/index.vue
+31
-1
No files found.
applications/dee-mes/src/privateComponents/components/BiographicDataUpload/index.vue
View file @
5f330e67
...
...
@@ -19,6 +19,7 @@
:key=
"i.value"
:label=
"i.label"
:value=
"i.value"
:disabled=
"disabledOptions.includes(i.value)"
/>
</el-select>
<span
v-else
>
{{
scope
.
row
.
contentType
}}
</span>
...
...
@@ -118,7 +119,8 @@ export default {
}],
extension
:
[],
options
:
[],
currentSelection
:
[]
currentSelection
:
[],
disabledOptions
:
[]
}
},
computed
:
{
...
...
@@ -144,6 +146,21 @@ export default {
})
}
}
},
tableData
:
{
immediate
:
true
,
deep
:
true
,
handler
(
val
)
{
if
(
val
)
{
this
.
disabledOptions
=
val
.
map
(
item
=>
{
if
(
item
.
id
)
{
return
this
.
$utils
.
getParamsFromLists
(
this
.
options
,
'label'
,
item
.
contentType
,
'value'
)
}
else
{
return
item
.
contentType
}
})
}
}
}
},
created
()
{
...
...
@@ -232,6 +249,11 @@ export default {
submitUpload
()
{
const
flag
=
this
.
tableData
.
find
(
item
=>
!
item
.
fileName
||
!
item
.
contentType
)
if
(
flag
)
return
this
.
$utils
.
showMessageWarning
(
'请完成列表内数据的填写!'
)
const
contentTypeArr
=
this
.
tableData
.
map
(
r
=>
r
.
contentType
&&
this
.
$utils
.
getParamsFromLists
(
this
.
options
,
'value'
,
r
.
contentType
,
'label'
))
if
(
this
.
isRepeat
(
contentTypeArr
))
{
this
.
$utils
.
showMessageError
(
'附件类型不能重复!'
)
return
}
this
.
loading
=
true
const
fileExtVOS
=
[]
// 新增文件的名称和附件类型
const
objFileLinkIds
=
[]
// 已有的文件
...
...
@@ -289,6 +311,14 @@ export default {
handleClose
()
{
this
.
showBtns
=
false
this
.
getTableData
()
},
isRepeat
(
arr
)
{
const
hash
=
{}
for
(
const
i
in
arr
)
{
if
(
hash
[
arr
[
i
]])
{
return
true
}
hash
[
arr
[
i
]]
=
true
}
return
false
}
}
...
...
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