Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JINRUN-PERPOSITION
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
xinzhedeai
JINRUN-PERPOSITION
Commits
825aa82a
Commit
825aa82a
authored
Nov 27, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:员工字典获取name处理
parent
ec13edd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
7 deletions
+35
-7
yuangong.vue
src/views/person/yuangong.vue
+35
-7
No files found.
src/views/person/yuangong.vue
View file @
825aa82a
...
...
@@ -150,10 +150,10 @@
clearable
>
<el-option
v-for=
"item in
cardId
Options"
:key=
"item.
cardId
"
:label=
"item.
cardId
"
:value=
"item.
cardId
"
v-for=
"item in
dept
Options"
:key=
"item.
value
"
:label=
"item.
label
"
:value=
"item.
value
"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -305,6 +305,16 @@ export default {
name
:
"
Info
"
,
data
()
{
return
{
deptOptions
:
[
{
label
:
"
部门1
"
,
value
:
"
1
"
,
},
{
label
:
"
部门2
"
,
value
:
"
2
"
,
},
],
// 绑定卡对话框
bindOpen
:
false
,
// 绑定卡表单
...
...
@@ -616,14 +626,32 @@ export default {
this
.
$refs
[
"
form
"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
form
.
personType
=
"
staff
"
;
if
(
this
.
form
.
personId
!=
null
)
{
updateInfo
(
this
.
form
).
then
((
response
)
=>
{
// 创建一个表单数据的副本,避免直接修改原表单
const
formData
=
{
...
this
.
form
};
// 根据 deptId 查找对应的部门名称
if
(
formData
.
deptId
&&
this
.
deptOptions
&&
this
.
deptOptions
.
length
>
0
)
{
const
deptItem
=
this
.
deptOptions
.
find
(
(
item
)
=>
item
.
value
===
formData
.
deptId
);
if
(
deptItem
)
{
formData
.
deptName
=
deptItem
.
label
;
// 添加部门名称参数
}
}
if
(
formData
.
personId
!=
null
)
{
updateInfo
(
formData
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addInfo
(
this
.
form
).
then
((
response
)
=>
{
addInfo
(
formData
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
...
...
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