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
7a1daeb2
Commit
7a1daeb2
authored
Apr 17, 2025
by
祁正
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ccap项目管理-抽屉列表修改删除
parent
134265bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
12 deletions
+42
-12
index.vue
...ws/controlPlan/baseConfig/ccapProjectManagement/index.vue
+42
-12
No files found.
src/views/controlPlan/baseConfig/ccapProjectManagement/index.vue
View file @
7a1daeb2
...
@@ -103,8 +103,8 @@
...
@@ -103,8 +103,8 @@
<el-table-column
label=
"操作"
align=
"center"
>
<el-table-column
label=
"操作"
align=
"center"
>
<template
#
default=
"scope"
align=
"center"
>
<template
#
default=
"scope"
align=
"center"
>
<div
>
<div
>
<el-button
type=
"text"
style=
"color: rgb(0,0,255)"
@
click=
"handle
View
(scope.row)"
>
编辑
</el-button>
<el-button
type=
"text"
style=
"color: rgb(0,0,255)"
@
click=
"handle
DrawerEdit
(scope.row)"
>
编辑
</el-button>
<el-button
type=
"text"
style=
"color: rgb(244,93,93)"
@
click=
"handle
View
(scope.row)"
>
删除
</el-button>
<el-button
type=
"text"
style=
"color: rgb(244,93,93)"
@
click=
"handle
DrawerDel
(scope.row)"
>
删除
</el-button>
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
width=
"500"
width=
"500"
>
>
<div
style=
"width: 85%;margin-left: 7.5%"
>
<div
style=
"width: 85%;margin-left: 7.5%"
>
<el-form
v-
model=
"dialogForm"
ref=
"dialogQueryRef"
>
<el-form
:rules=
"dialogRules"
:
model=
"dialogForm"
ref=
"dialogQueryRef"
>
<el-form-item
label=
"项目:"
prop=
"project"
>
<el-form-item
label=
"项目:"
prop=
"project"
>
<el-input
v-model=
"dialogForm.project"
placeholder=
"请输入"
/>
<el-input
v-model=
"dialogForm.project"
placeholder=
"请输入"
/>
</el-form-item>
</el-form-item>
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
<
template
#
footer
>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"dialogCencal"
>
取消
</el-button>
<el-button
@
click=
"dialogCencal"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogSave"
>
<el-button
type=
"primary"
@
click=
"dialogSave
(dialogForm)
"
>
保存
保存
</el-button>
</el-button>
</div>
</div>
...
@@ -166,7 +166,9 @@ import {
...
@@ -166,7 +166,9 @@ import {
getDataList
,
getDataList
,
getAllBusinessUnitList
,
getAllBusinessUnitList
,
getProjectListById
,
getProjectListById
,
inserTableData
inserTableData
,
deleteBatch
,
updateCcap
}
from
"@/api/CCAPProjectManagement/list"
;
}
from
"@/api/CCAPProjectManagement/list"
;
const
{
proxy
}
=
getCurrentInstance
();
const
{
proxy
}
=
getCurrentInstance
();
...
@@ -192,7 +194,8 @@ const dialogRules = {
...
@@ -192,7 +194,8 @@ const dialogRules = {
const
dialogForm
=
ref
({
const
dialogForm
=
ref
({
projectStatusId
:
null
,
projectStatusId
:
null
,
project
:
null
,
project
:
null
,
groupName
:
null
groupName
:
null
,
id
:
null
});
});
const
queryParams
=
ref
({
const
queryParams
=
ref
({
...
@@ -228,6 +231,15 @@ function getDataProjectListById() {
...
@@ -228,6 +231,15 @@ function getDataProjectListById() {
});
});
}
}
function
handleDrawerEdit
(
row
){
dialogVisible
.
value
=
true
;
addTitle
.
value
=
'编辑'
;
dialogForm
.
value
.
projectStatusId
=
drawerQueryParams
.
value
.
id
;
dialogForm
.
value
.
id
=
row
.
id
dialogForm
.
value
.
groupName
=
row
.
groupName
dialogForm
.
value
.
project
=
row
.
project
}
function
getBusinessList
()
{
function
getBusinessList
()
{
getAllBusinessUnitList
().
then
(
res
=>
{
getAllBusinessUnitList
().
then
(
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
...
@@ -245,14 +257,32 @@ function handleAdd() {
...
@@ -245,14 +257,32 @@ function handleAdd() {
//对话框里面的保存
//对话框里面的保存
function
dialogSave
()
{
function
dialogSave
()
{
console
.
log
(
dialogForm
.
value
);
console
.
log
(
dialogForm
.
value
);
inserTableData
(
dialogForm
.
value
).
then
(
res
=>
{
dialogQueryRef
.
value
.
validate
((
valid
)
=>
{
console
.
log
(
res
)
if
(
valid
)
{
if
(
res
.
code
===
200
)
{
//判断是新增还是保存
ElMessage
.
success
(
"新增成功"
)
if
(
addTitle
.
value
===
'新增'
){
dialogCencal
()
inserTableData
(
dialogForm
.
value
).
then
(
res
=>
{
getDataProjectListById
()
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
ElMessage
.
success
(
"新增成功"
)
dialogCencal
()
getDataProjectListById
()
}
})
}
else
{
updateCcap
(
dialogForm
.
value
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
ElMessage
.
success
(
"修改成功"
)
dialogCencal
()
getDataProjectListById
()
}
})
}
}
}
})
})
// dialogQueryRef.value.validate((valid) => {
// dialogQueryRef.value.validate((valid) => {
// if (valid) {
// if (valid) {
// console.log(dialogForm.value);
// console.log(dialogForm.value);
...
...
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