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
6b45bc41
Commit
6b45bc41
authored
Apr 28, 2025
by
祁正
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通知单管理-新增加组件
parent
d8ec5b9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
12 deletions
+103
-12
list.js
src/api/notificationManagement/list.js
+9
-0
index.vue
...olPlan/controlPlanNotice/notificationManagement/index.vue
+94
-12
No files found.
src/api/notificationManagement/list.js
View file @
6b45bc41
...
...
@@ -59,3 +59,12 @@ export function getPersonnelInfoByIdsInfoByIds(ids) {
method
:
'get'
})
}
// 根据id修改认证负责人
export
function
updateCertificationManager
(
data
)
{
return
request
({
url
:
'/control/notificationManagement/updateCertificationManager'
,
method
:
'put'
,
data
:
data
})
}
src/views/controlPlan/controlPlanNotice/notificationManagement/index.vue
View file @
6b45bc41
...
...
@@ -298,7 +298,19 @@
<el-row
>
<el-col
:offset=
"1"
:span=
"17"
>
<el-form-item
label=
"批准人"
prop=
"approvalPerson"
>
<el-input
disabled
v-model=
"drawerQueryParams.approvalPerson"
></el-input>
<el-select
disabled
placement=
"bottom"
v-model=
"drawerQueryParams.approvalPerson"
placeholder=
"请选择批准人"
clearable
>
<el-option
v-for=
"dict in allUserList"
:label=
"dict.nickName"
:value=
"dict.userId"
/>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -310,7 +322,20 @@
<el-row
>
<el-col
:offset=
"1"
:span=
"17"
>
<el-form-item
label=
"认证负责人"
prop=
"certificationResponsiblePerson"
>
<el-input
disabled
v-model=
"drawerQueryParams.certificationResponsiblePerson"
></el-input>
<el-select
disabled
multiple
placement=
"bottom"
v-model=
"drawerQueryParams.certificationResponsiblePerson"
placeholder=
"请选择认证负责人"
clearable
>
<el-option
v-for=
"dict in allUserList"
:label=
"dict.nickName"
:value=
"dict.userId"
/>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -369,9 +394,20 @@
</template>
<
script
setup
>
import
SelectRole
from
"@/components/SelectRole/index.vue"
import
{
getUnitList
,
brandData
,
getALLManufacturerList
,
getAllModelCode
,
getALLUserList
,
insert
,
list
,
getPersonnelInfoByIdsInfoByIds
}
from
"@/api/notificationManagement/list.js"
import
{
ref
}
from
"vue"
;
import
{
ElMessage
}
from
'element-plus'
import
{
brandData
,
getALLManufacturerList
,
getAllModelCode
,
getALLUserList
,
getPersonnelInfoByIdsInfoByIds
,
getUnitList
,
insert
,
list
,
updateCertificationManager
}
from
"@/api/notificationManagement/list.js"
import
{
ref
}
from
"vue"
;
import
{
ElMessage
}
from
'element-plus'
const
allUserList
=
ref
([])
const
personTableList
=
ref
([])
const
{
proxy
}
=
getCurrentInstance
();
const
{
certification_body
...
...
@@ -386,8 +422,8 @@ const tableList =ref([])
const
modelCodeList
=
ref
([])
const
dialogVisible
=
ref
(
false
)
const
dialogTitle
=
ref
(
''
)
//临时打开
的认证负责人
const
t
PersonListStr
=
ref
(
''
)
//临时打开
认证负责人对话框的临时对象
const
t
Obj
=
ref
({}
)
//人员选择数据
const
userList
=
ref
([])
const
selectRole
=
ref
(
false
)
//组件控制,默认关闭
...
...
@@ -441,9 +477,14 @@ const rules = ref({
]
});
//新增确定
function
confirmClick
(
formRef
)
{
drawerQueryRef
.
value
.
validate
((
valid
)
=>
{
if
(
valid
)
{
drawerQueryParams
.
value
.
certificationResponsiblePerson
=
drawerQueryParams
.
value
.
certificationResponsiblePerson
.
join
(
","
)
console
.
log
(
drawerQueryParams
.
value
)
insert
(
drawerQueryParams
.
value
).
then
(
res
=>
{
console
.
log
(
"新增结果"
,
res
)
if
(
res
.
code
===
200
){
...
...
@@ -476,13 +517,20 @@ function getDictList(v){
//添加人员关闭对话框
const
beforeClose
=
(
done
)
=>
{
// 这里可以添加关闭前的确认逻辑,例如询问用户是否确认关闭
// 如果确认关闭,调用 done() 函数
done
();
tObj
.
value
=
{}
queryParams
.
value
=
{
pageNum
:
1
,
pageSize
:
10
};
drawerQueryRef
.
value
.
resetFields
()
getList
()
};
function
addPerson
(
row
){
console
.
log
(
row
)
tObj
.
value
.
id
=
row
.
id
dialogTitle
.
value
=
'维护需求人('
+
row
.
notificationNumber
+
' -'
+
row
.
businessUnitName
+
'-'
+
row
.
vehicleModelCode
+
')'
;
dialogVisible
.
value
=
true
...
...
@@ -500,8 +548,20 @@ function getBrandDataList(){
}
function
remove
(
row
){
console
.
log
(
row
)
let
arr
=
personTableList
.
value
.
filter
(
item
=>
item
.
userId
!==
row
.
userId
)
tObj
.
value
.
endArrStr
=
arr
.
map
(
item
=>
{
return
item
.
userId
}).
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
})
}
})
}
function
onChange
(){
...
...
@@ -565,14 +625,36 @@ function cancelClick(){
//提交方法
const
handleSelectionSubmit
=
(
selectedItems
)
=>
{
console
.
log
(
'已选中的项:'
,
selectedItems
);
// 处理已选择的用户
const
t
=
toRaw
(
selectedItems
)
console
.
log
(
'已选中的项:'
,
t
);
// 处理已选择的用户
if
(
selectType
.
value
===
'single'
){
//单选 approvalPerson
drawerQueryParams
.
value
.
approvalPerson
=
t
[
0
].
userId
}
else
{
//多选 certificationResponsiblePerson
drawerQueryParams
.
value
.
certificationResponsiblePerson
=
t
.
map
(
item
=>
{
return
item
.
userId
})
}
};
//获取所有人员
function
getALLUserDeptList
(){
getALLUserList
().
then
(
res
=>
{
userList
.
value
=
res
.
data
console
.
log
(
res
.
data
)
let
list
=
res
.
data
// 提取所有用户的昵称和id
for
(
let
i
in
list
){
let
list2
=
list
[
i
].
nickName
for
(
let
i2
in
list2
){
allUserList
.
value
.
push
(
list2
[
i2
])
}
}
console
.
log
(
"123"
,
allUserList
.
value
)
})
}
getList
()
getALLUserDeptList
()
...
...
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