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
d8ce7c37
Commit
d8ce7c37
authored
May 07, 2025
by
祁正
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(通知单管理):删除修改认证人逻辑
parent
c8415ccc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
21 deletions
+37
-21
list.js
src/api/notificationManagement/list.js
+16
-0
index.vue
...olPlan/controlPlanNotice/notificationManagement/index.vue
+21
-21
No files found.
src/api/notificationManagement/list.js
View file @
d8ce7c37
...
@@ -84,3 +84,19 @@ export function isOkDel(data) {
...
@@ -84,3 +84,19 @@ export function isOkDel(data) {
params
:
data
params
:
data
})
})
}
}
// 根据id删除认证负责人
export
function
delCertificationManager
(
data
)
{
return
request
({
url
:
'/control/notificationManagement/delCertificationManager'
,
method
:
'get'
,
params
:
data
})
}
// 根据id新增认证负责人
export
function
addCertificationManager
(
data
)
{
return
request
({
url
:
'/control/notificationManagement/addCertificationManager'
,
method
:
'post'
,
data
:
data
})
}
src/views/controlPlan/controlPlanNotice/notificationManagement/index.vue
View file @
d8ce7c37
...
@@ -203,7 +203,7 @@
...
@@ -203,7 +203,7 @@
}"
}"
>
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<span
class=
"renzheng"
>
共
{{
scope
.
row
.
certificationResponsiblePerson
.
split
(
','
).
length
}}
人
<el-icon
style=
"font-size: 16px;margin-left: 5px"
><EditPen
@
click=
"addPerson(scope.row)"
/></el-icon></span>
<span
class=
"renzheng"
>
共
{{
scope
.
row
.
certificationResponsiblePerson
}}
人
<el-icon
style=
"font-size: 16px;margin-left: 5px"
><EditPen
@
click=
"addPerson(scope.row)"
/></el-icon></span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -510,6 +510,7 @@
...
@@ -510,6 +510,7 @@
import
DeleteDialog
from
'@/components/DeleteDialog/index.vue'
;
import
DeleteDialog
from
'@/components/DeleteDialog/index.vue'
;
import
SelectRole
from
"@/components/SelectRole/index.vue"
import
SelectRole
from
"@/components/SelectRole/index.vue"
import
{
import
{
addCertificationManager
,
brandData
,
brandData
,
getALLManufacturerList
,
getALLManufacturerList
,
getAllModelCode
,
getAllModelCode
,
...
@@ -518,6 +519,7 @@ import {
...
@@ -518,6 +519,7 @@ import {
getUnitList
,
getUnitList
,
insert
,
insert
,
list
,
list
,
delCertificationManager
,
updateCertificationManager
,
updateCertificationManager
,
deleteNotificationManagementById
,
deleteNotificationManagementById
,
isOkDel
isOkDel
...
@@ -531,8 +533,7 @@ const personTableList = ref([])
...
@@ -531,8 +533,7 @@ const personTableList = ref([])
// 获取当前组件实例的代理对象,用于访问全局属性和方法
// 获取当前组件实例的代理对象,用于访问全局属性和方法
const
{
proxy
}
=
getCurrentInstance
();
const
{
proxy
}
=
getCurrentInstance
();
const
tObj
=
ref
({
const
tObj
=
ref
({
id
:
null
,
id
:
null
endArrStr
:
null
})
})
const
content
=
ref
(
''
)
const
content
=
ref
(
''
)
const
delDialog
=
ref
(
false
)
const
delDialog
=
ref
(
false
)
...
@@ -741,7 +742,7 @@ function addPerson(row){
...
@@ -741,7 +742,7 @@ function addPerson(row){
dialogTitle
.
value
=
'维护需求人('
+
row
.
notificationNumber
+
' -'
+
row
.
businessUnitName
+
'-'
+
row
.
vehicleModelCode
+
')'
;
dialogTitle
.
value
=
'维护需求人('
+
row
.
notificationNumber
+
' -'
+
row
.
businessUnitName
+
'-'
+
row
.
vehicleModelCode
+
')'
;
dialogVisible
.
value
=
true
dialogVisible
.
value
=
true
getPersonnelInfoByIdsInfoByIds
(
row
.
certificationResponsiblePerson
).
then
(
res
=>
{
getPersonnelInfoByIdsInfoByIds
(
row
.
id
).
then
(
res
=>
{
personTableList
.
value
=
res
.
data
personTableList
.
value
=
res
.
data
})
})
}
}
...
@@ -763,34 +764,33 @@ function getBrandDataList(){
...
@@ -763,34 +764,33 @@ function getBrandDataList(){
function
handleQuXiao
(){
function
handleQuXiao
(){
delDialog
.
value
=
false
delDialog
.
value
=
false
tObj
.
value
.
userId
=
null
tObj
.
value
.
userId
=
null
tObj
.
value
.
userIdList
=
null
}
}
//移除
//移除
function
remove
(
row
){
function
remove
(
row
){
console
.
log
(
row
)
console
.
log
(
row
)
console
.
log
(
tObj
.
value
)
console
.
log
(
tObj
.
value
)
tObj
.
value
.
responsiblePerson
=
parseInt
(
row
.
userId
)
tObj
.
value
.
userId
=
parseInt
(
row
.
userId
)
isOkDel
(
tObj
.
value
).
then
(
res
=>
{
isOkDel
(
tObj
.
value
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
let
arr
=
personTableList
.
value
.
filter
(
item
=>
item
.
userId
!==
row
.
userId
)
tObj
.
value
.
endArrStr
=
arr
.
map
(
item
=>
{
return
item
.
userId
}).
join
(
","
)
if
(
res
.
data
){
if
(
res
.
data
){
delDialog
.
value
=
true
delDialog
.
value
=
true
content
.
value
=
"该用户已添加变更记录,移除后相关变更记录会一同删除,请确认是否移除该人员?"
content
.
value
=
"该用户已添加变更记录,移除后相关变更记录会一同删除,请确认是否移除该人员?"
tObj
.
value
.
userId
=
parseInt
(
row
.
userId
)
tObj
.
value
.
userId
=
parseInt
(
row
.
userId
)
}
else
{
}
else
{
console
.
log
(
"无记录删除"
,
tObj
.
value
)
console
.
log
(
"无记录删除"
,
tObj
.
value
)
update
CertificationManager
(
tObj
.
value
).
then
(
res
=>
{
del
CertificationManager
(
tObj
.
value
).
then
(
res
=>
{
if
(
res
.
code
===
200
){
if
(
res
.
code
===
200
){
ElMessage
.
success
(
"移除成功"
)
ElMessage
.
success
(
"移除成功"
)
getPersonnelInfoByIdsInfoByIds
(
tObj
.
value
.
id
).
then
(
res
=>
{
getPersonnelInfoByIdsInfoByIds
(
tObj
.
value
.
endArrStr
).
then
(
res
=>
{
personTableList
.
value
=
res
.
data
personTableList
.
value
=
res
.
data
})
})
tObj
.
value
.
userId
=
null
tObj
.
value
.
userId
=
null
tObj
.
value
.
endArrStr
=
null
tObj
.
value
.
userIdList
=
null
}
}
})
})
}
}
...
@@ -800,16 +800,15 @@ function remove(row){
...
@@ -800,16 +800,15 @@ function remove(row){
function
handleYichu
(){
function
handleYichu
(){
console
.
log
(
"记录删除"
,
tObj
.
value
)
console
.
log
(
"记录删除"
,
tObj
.
value
)
update
CertificationManager
(
tObj
.
value
).
then
(
res
=>
{
del
CertificationManager
(
tObj
.
value
).
then
(
res
=>
{
if
(
res
.
code
===
200
){
if
(
res
.
code
===
200
){
ElMessage
.
success
(
"移除成功"
)
ElMessage
.
success
(
"移除成功"
)
handleQuXiao
()
handleQuXiao
()
getPersonnelInfoByIdsInfoByIds
(
tObj
.
value
.
endArrStr
).
then
(
res
=>
{
getPersonnelInfoByIdsInfoByIds
(
tObj
.
value
.
id
).
then
(
res
=>
{
personTableList
.
value
=
res
.
data
personTableList
.
value
=
res
.
data
})
})
tObj
.
value
.
userId
=
null
tObj
.
value
.
userId
=
null
tObj
.
value
.
endArrStr
=
null
tObj
.
value
.
userIdList
=
null
}
}
})
})
}
}
...
@@ -883,14 +882,15 @@ const handleSelectionSubmit = (selectedItems) => {
...
@@ -883,14 +882,15 @@ const handleSelectionSubmit = (selectedItems) => {
const
yuanList
=
personTableList
.
value
.
map
(
item
=>
item
.
userId
);
const
yuanList
=
personTableList
.
value
.
map
(
item
=>
item
.
userId
);
// 去重处理
// 去重处理
const
combinedArray
=
[...
new
Set
([...
yuanList
,
...
list
])];
const
combinedArray
=
[...
new
Set
([...
yuanList
,
...
list
])];
tObj
.
value
.
endArrStr
=
combinedArray
.
join
(
","
);
tObj
.
value
.
userIdList
=
combinedArray
.
join
(
","
);
console
.
log
(
tObj
.
value
)
update
CertificationManager
(
tObj
.
value
).
then
(
res
=>
{
add
CertificationManager
(
tObj
.
value
).
then
(
res
=>
{
if
(
res
.
code
===
200
){
if
(
res
.
code
===
200
){
ElMessage
.
success
(
"添加成功"
)
ElMessage
.
success
(
"添加成功"
)
getPersonnelInfoByIdsInfoByIds
(
tObj
.
value
.
endArrStr
).
then
(
res
=>
{
getPersonnelInfoByIdsInfoByIds
(
tObj
.
value
.
id
).
then
(
res
=>
{
personTableList
.
value
=
res
.
data
personTableList
.
value
=
res
.
data
})
})
}
}
})
})
}
else
{
}
else
{
...
...
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