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
123f282c
Commit
123f282c
authored
Sep 04, 2023
by
xioln
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建人自动带入
parent
afe533db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
0 deletions
+75
-0
index.vue
...ee-mes/src/privateComponents/components/Creator/index.vue
+75
-0
No files found.
applications/dee-mes/src/privateComponents/components/Creator/index.vue
0 → 100644
View file @
123f282c
/**
* @Description: 获取当前用户
* @author xioln
* @date 2023-09-04
* @FilePath: applications/dee-mes/src/privateComponents/components/Creator/index.vue
*/
<
template
>
<div
class=
"creator"
>
<el-select
v-model=
"creatorId"
:disabled=
"disabledVal"
>
<el-option
:label=
"option.name"
:value=
"option.id"
/>
</el-select>
</div>
</
template
>
<
script
>
export
default
{
componentName
:
'创建人'
,
name
:
'Creator'
,
components
:
{},
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
null
},
itemObj
:
{
type
:
Object
,
default
:
null
},
form
:
{
type
:
Object
}
},
data
()
{
return
{
creatorId
:
null
,
disabledVal
:
false
,
option
:
{
id
:
localStorage
.
getItem
(
'userId'
),
name
:
localStorage
.
getItem
(
'user'
)
}
}
},
computed
:
{},
watch
:
{
itemObj
:
{
immediate
:
true
,
deep
:
true
,
handler
(
v
)
{
if
(
v
.
component
.
hasOwnProperty
(
'disabled'
))
{
this
.
disabledVal
=
v
.
component
.
disabled
}
}
}
},
created
()
{
// 初始化数据
},
mounted
()
{
this
.
$nextTick
(()
=>
{
if
(
!
this
.
form
.
creatorId
)
{
this
.
creatorId
=
localStorage
.
getItem
(
'userId'
)
}
else
{
this
.
creatorId
=
this
.
form
.
creator
.
userName
}
})
this
.
$emit
(
'input'
,
this
.
creatorId
)
},
methods
:
{
}
}
</
script
>
<
style
lang=
'scss'
>
</
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