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
bdba6fdf
Commit
bdba6fdf
authored
Apr 18, 2025
by
祁正
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ccap项目管理-查看维护项目管理
parent
251320bd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
19 deletions
+54
-19
list.js
src/api/CCAPProjectManagement/list.js
+7
-0
index.vue
src/views/controlPlan/baseConfig/ccapProjectManage/index.vue
+47
-19
No files found.
src/api/CCAPProjectManagement/list.js
View file @
bdba6fdf
...
...
@@ -49,3 +49,10 @@ export function updateCcap(data) {
data
:
data
})
}
// 获取所有事业部(除了奇瑞,除了列表里面的出现的)
export
function
getBusinessExclude
()
{
return
request
({
url
:
'/control/ccapProjectManagement/getBusinessExclude'
,
method
:
'get'
})
}
src/views/controlPlan/baseConfig/ccapProjectManage/index.vue
View file @
bdba6fdf
...
...
@@ -26,7 +26,7 @@
<el-table-column
label=
"事业部"
align=
"center"
prop=
"applicableBrand"
/>
<el-table-column
label=
"项目情况"
align=
"center"
prop=
"listCode"
>
<template
#
default=
"scope"
>
<span
style=
"text-decoration: underline;text-decoration-color: #2f9bfe;color: #2f9bfe;cursor: pointer"
>
共
{{
scope
.
row
.
relatedCount
}}
个
</span>
<span
@
click=
"projectView(scope.row)"
style=
"text-decoration: underline;text-decoration-color: #2f9bfe;color: #2f9bfe;cursor: pointer"
>
共
{{
scope
.
row
.
relatedCount
}}
个
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"创建人"
align=
"center"
prop=
"createUserName"
/>
...
...
@@ -56,10 +56,10 @@
/>
<!-- 抽屉-->
<el-drawer
@
close=
"closeDrawer"
v-model=
"drawer2"
size=
'40%'
>
<el-drawer
@
close=
"closeDrawer"
v-model=
"drawer2"
:size=
"!isDrawer?'40%':'32%'"
>
<
template
#
header
>
<div
style=
"font-weight: bold;font-size: 14px"
>
维护项目(奇瑞、星途、智界)
{{
drawerTitle
}}
</div>
</
template
>
<
template
#
default
>
...
...
@@ -89,18 +89,18 @@
</el-form-item>
</el-form>
<div
class=
"top-btn"
>
<div
class=
"top-btn"
v-if=
"!isDrawer"
>
<el-button
type=
"primary"
plain
@
click=
"handleAdd"
>
新增
</el-button>
<el-button
type=
"danger"
plain
@
click=
"piliangDel"
>
批量删除
</el-button>
</div>
</div>
<el-table
border
style=
"margin-top: 10px"
:data=
"drawer2TableList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
v-if=
"!isDrawer"
/>
<el-table-column
type=
"index"
width=
"55"
align=
"center"
label=
"序号"
/>
<el-table-column
label=
"项目"
align=
"center"
prop=
"project"
width=
"300"
/>
<el-table-column
label=
"分组"
align=
"center"
prop=
"groupName"
/>
<el-table-column
label=
"操作"
align=
"center"
>
<el-table-column
label=
"操作"
align=
"center"
v-if=
"!isDrawer"
>
<template
#
default=
"scope"
align=
"center"
>
<div
>
<el-button
type=
"text"
style=
"color: rgb(0,0,255)"
@
click=
"handleDrawerEdit(scope.row)"
>
编辑
</el-button>
...
...
@@ -168,14 +168,14 @@
<el-form
:model=
"tableDialogForm"
>
<el-form-item
label=
"事业部:"
prop=
"project"
>
<el-select
v-model=
"
dialogForm.business
"
v-model=
"
tableDialogForm.businessUnitName
"
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"dict in
groupList
"
:label=
"dict"
:value=
"dict"
v-for=
"dict in
businessListExclude
"
:label=
"dict
.business_unit_name
"
:value=
"dict
.id
"
/>
</el-select>
</el-form-item>
...
...
@@ -185,8 +185,8 @@
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
""
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"
(dialogForm)
"
>
<el-button
@
click=
"
dialog2Cancel
"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"
dialog2Sure
"
>
确定
</el-button>
</div>
...
...
@@ -204,13 +204,18 @@ import {
getProjectListById
,
inserTableData
,
deleteBatch
,
updateCcap
updateCcap
,
getBusinessExclude
}
from
"@/api/CCAPProjectManagement/list"
;
const
tableDialogForm
=
ref
({
business
:
null
,
id
:
null
})
//抽屉标题
const
drawerTitle
=
ref
(
''
)
//是否查看抽屉
const
isDrawer
=
ref
(
false
)
const
{
proxy
}
=
getCurrentInstance
();
const
tableList
=
ref
([]);
const
drawer2
=
ref
(
false
)
...
...
@@ -232,6 +237,9 @@ const dialogRules = {
groupName
:
[{
required
:
true
,
message
:
'分组不能为空'
,
trigger
:
'change'
}]
};
//所有事业部(除了奇瑞,除了列表里面的出现的)
const
businessListExclude
=
ref
([])
const
dialogForm
=
ref
({
projectStatusId
:
null
,
project
:
null
,
...
...
@@ -274,7 +282,6 @@ function handleSelectionChange(arr){
//获取抽屉里面的表格数据
function
getDataProjectListById
()
{
getProjectListById
(
drawerQueryParams
.
value
).
then
(
res
=>
{
console
.
log
(
res
);
drawer2TableList
.
value
=
res
.
data
;
});
}
...
...
@@ -298,10 +305,15 @@ function piliangDel(){
}
//添加事业部
function
addBusiness
(
row
){
console
.
log
(
row
)
tableDialogTitle
.
value
=
'添加事业部'
tableDialogVisible
.
value
=
true
}
//获取所有事业部(除了奇瑞,除了列表里面的出现的)
function
getBusinessListExclude
(){
getBusinessExclude
().
then
(
res
=>
{
businessListExclude
.
value
=
res
.
data
})
}
//删除
function
handleDrawerDel
(
row
){
...
...
@@ -332,6 +344,22 @@ function del(id){
})
}
//添加事业部等对话框的取消
function
dialog2Cancel
(){
tableDialogForm
.
value
=
{}
tableDialogVisible
.
value
=
false
}
function
projectView
(
row
){
console
.
log
(
row
)
drawerQueryParams
.
value
.
id
=
row
.
id
;
drawer2
.
value
=
true
;
drawerTitle
.
value
=
"查看项目("
+
row
.
applicableBrand
+
")"
isDrawer
.
value
=
true
getDataProjectListById
();
}
function
handleDrawerEdit
(
row
){
dialogVisible
.
value
=
true
;
addTitle
.
value
=
'编辑'
;
...
...
@@ -343,7 +371,6 @@ function handleDrawerEdit(row){
function
getBusinessList
()
{
getAllBusinessUnitList
().
then
(
res
=>
{
console
.
log
(
res
);
businessList
.
value
=
res
.
data
;
});
}
...
...
@@ -357,13 +384,11 @@ function handleAdd() {
//对话框里面的保存
function
dialogSave
()
{
console
.
log
(
dialogForm
.
value
);
dialogQueryRef
.
value
.
validate
((
valid
)
=>
{
if
(
valid
)
{
//判断是新增还是保存
if
(
addTitle
.
value
===
'新增'
){
inserTableData
(
dialogForm
.
value
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
ElMessage
.
success
(
"新增成功"
)
dialogCencal
()
...
...
@@ -372,7 +397,6 @@ function dialogSave() {
})
}
else
{
updateCcap
(
dialogForm
.
value
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
ElMessage
.
success
(
"修改成功"
)
dialogCencal
()
...
...
@@ -461,8 +485,11 @@ function resetQuery() {
}
function
handleMaintain
(
row
)
{
console
.
log
(
row
)
drawerQueryParams
.
value
.
id
=
row
.
id
;
drawer2
.
value
=
true
;
drawerTitle
.
value
=
"维护项目("
+
row
.
applicableBrand
+
")"
isDrawer
.
value
=
false
getDataProjectListById
();
}
...
...
@@ -475,6 +502,7 @@ function handleExport() {
getList
();
getBusinessList
();
getBusinessListExclude
();
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
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