Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qr-consistency-vue3
Project
Project
Details
Activity
Releases
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
刘怀志
qr-consistency-vue3
Commits
dabb2d32
Commit
dabb2d32
authored
Apr 29, 2025
by
祁正
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通知单管理-编辑新增
parent
52b626fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
11 deletions
+42
-11
index.vue
...olPlan/controlPlanNotice/notificationManagement/index.vue
+42
-11
No files found.
src/views/controlPlan/controlPlanNotice/notificationManagement/index.vue
View file @
dabb2d32
...
@@ -379,7 +379,7 @@
...
@@ -379,7 +379,7 @@
:before-close=
"beforeClose"
:before-close=
"beforeClose"
>
>
<div>
<div>
<el-button
type=
"primary"
class=
"btn-C"
>
添加人员
</el-button>
<el-button
type=
"primary"
@
click=
"editPersonAdd"
class=
"btn-C"
>
添加人员
</el-button>
<el-table
style=
"margin-top: 20px"
:data=
"personTableList"
>
<el-table
style=
"margin-top: 20px"
:data=
"personTableList"
>
<el-table-column
type=
"index"
width=
"55"
align=
"center"
label=
"序号"
/>
<el-table-column
type=
"index"
width=
"55"
align=
"center"
label=
"序号"
/>
<el-table-column
label=
"人员"
align=
"center"
prop=
"userName"
/>
<el-table-column
label=
"人员"
align=
"center"
prop=
"userName"
/>
...
@@ -426,7 +426,10 @@ const undoDialogVisible = ref(false)
...
@@ -426,7 +426,10 @@ const undoDialogVisible = ref(false)
const
personTableList
=
ref
([])
const
personTableList
=
ref
([])
// 获取当前组件实例的代理对象,用于访问全局属性和方法
// 获取当前组件实例的代理对象,用于访问全局属性和方法
const
{
proxy
}
=
getCurrentInstance
();
const
{
proxy
}
=
getCurrentInstance
();
const
tObj
=
ref
({})
const
tObj
=
ref
({
id
:
null
,
endArrStr
:
null
})
const
dialogTitle
=
ref
(
''
)
const
dialogTitle
=
ref
(
''
)
const
dialogVisible
=
ref
(
false
)
const
dialogVisible
=
ref
(
false
)
const
Prompt
=
ref
(
''
)
const
Prompt
=
ref
(
''
)
...
@@ -479,6 +482,10 @@ const queryParams = ref({
...
@@ -479,6 +482,10 @@ const queryParams = ref({
number
:
""
number
:
""
});
});
function
editPersonAdd
(){
openDialog
()
}
function
addNotifiction
(){
function
addNotifiction
(){
drawer
.
value
=
true
drawer
.
value
=
true
getALLModelCodeList
()
getALLModelCodeList
()
...
@@ -559,7 +566,7 @@ const beforeClose = (done) => {
...
@@ -559,7 +566,7 @@ const beforeClose = (done) => {
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
pageSize
:
10
};
};
drawerQueryRef
.
value
.
resetFields
()
getList
()
getList
()
};
};
...
@@ -605,7 +612,7 @@ function getBrandDataList(){
...
@@ -605,7 +612,7 @@ function getBrandDataList(){
brandList
.
value
=
res
.
rows
brandList
.
value
=
res
.
rows
})
})
}
}
//移除
function
remove
(
row
){
function
remove
(
row
){
let
arr
=
personTableList
.
value
.
filter
(
item
=>
item
.
userId
!==
row
.
userId
)
let
arr
=
personTableList
.
value
.
filter
(
item
=>
item
.
userId
!==
row
.
userId
)
tObj
.
value
.
endArrStr
=
arr
.
map
(
item
=>
{
tObj
.
value
.
endArrStr
=
arr
.
map
(
item
=>
{
...
@@ -686,15 +693,39 @@ function cancelClick(){
...
@@ -686,15 +693,39 @@ function cancelClick(){
const
handleSelectionSubmit
=
(
selectedItems
)
=>
{
const
handleSelectionSubmit
=
(
selectedItems
)
=>
{
const
t
=
toRaw
(
selectedItems
)
const
t
=
toRaw
(
selectedItems
)
console
.
log
(
'已选中的项:'
,
t
);
// 处理已选择的用户
console
.
log
(
'已选中的项:'
,
t
);
// 处理已选择的用户
if
(
selectType
.
value
===
'single'
){
if
(
dialogVisible
.
value
){
//单选 approvalPerson
//添加人员-编辑人员对话框的时候-多选
drawerQueryParams
.
value
.
approvalPerson
=
t
[
0
].
userId
}
else
{
// 简化箭头函数
//多选 certificationResponsiblePerson
const
list
=
t
.
map
(
item
=>
item
.
userId
);
drawerQueryParams
.
value
.
certificationResponsiblePerson
=
t
.
map
(
item
=>
{
const
yuanList
=
personTableList
.
value
.
map
(
item
=>
item
.
userId
);
return
item
.
userId
// 去重处理
const
combinedArray
=
[...
new
Set
([...
yuanList
,
...
list
])];
tObj
.
value
.
endArrStr
=
combinedArray
.
join
(
","
);
updateCertificationManager
(
tObj
.
value
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
===
200
){
ElMessage
.
success
(
"添加成功"
)
getPersonnelInfoByIdsInfoByIds
(
tObj
.
value
.
endArrStr
).
then
(
res
=>
{
console
.
log
(
res
)
personTableList
.
value
=
res
.
data
})
}
})
})
}
else
{
//新增的时候
if
(
selectType
.
value
===
'single'
){
//单选 approvalPerson
drawerQueryParams
.
value
.
approvalPerson
=
t
[
0
].
userId
}
else
{
//多选 certificationResponsiblePerson
drawerQueryParams
.
value
.
certificationResponsiblePerson
=
t
.
map
(
item
=>
{
return
item
.
userId
})
}
}
}
};
};
//获取所有人员
//获取所有人员
...
...
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