Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
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
marketing-web
marketing
Commits
f68906ce
Commit
f68906ce
authored
Mar 31, 2021
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 添加删除弹窗计划的功能
parent
0ac10535
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
list.vue
src/views/pop/list.vue
+18
-7
No files found.
src/views/pop/list.vue
View file @
f68906ce
...
...
@@ -27,7 +27,12 @@
<p
class=
"title"
>
计划名称:
{{
group
.
name
}}
<i>
{{
formatDateTimeByType
(
group
.
beginTime
,
'yyyy-MM-dd'
)
+
'至'
+
formatDateTimeByType
(
group
.
endTime
,
'yyyy-MM-dd'
)
}}
</i>
</p>
<p
class=
"btn"
v-if=
"5 > group.popupList.length"
@
click=
"goForm(group, 'edit')"
>
添加弹窗
</p>
<div
class=
"btn-group"
>
<el-button
type=
"text"
v-if=
"5 > group.popupList.length"
@
click=
"goForm(group, 'edit')"
>
添加弹窗
</el-button>
<dm-delete
v-if=
"group.popupList.every(el => el.activeStatus != 2)"
tips=
"是否删除此弹窗计划?"
@
confirm=
"delGroup(group)"
>
<el-button
type=
"text"
>
删除
</el-button>
</dm-delete>
</div>
</div>
<el-table
tooltipEffect=
"light"
style=
"width: 100%"
:data=
"group.popupList"
>
<el-table-column
align=
"left"
label=
"弹窗内容"
>
...
...
@@ -65,7 +70,7 @@
<el-button
type=
"text"
>
停止
</el-button>
</dm-delete>
<el-button
v-if=
"scope.row.activeStatus === 1"
type=
"text"
@
click=
"goForm(group, 'edit')"
>
编辑
</el-button>
<dm-delete
v-if=
"scope.row.activeStatus === 1 || scope.row.activeStatus === 3"
@
confirm=
"removePop(scope.row)"
tips=
"是否删除
该条数据
?"
>
<dm-delete
v-if=
"scope.row.activeStatus === 1 || scope.row.activeStatus === 3"
@
confirm=
"removePop(scope.row)"
tips=
"是否删除
此弹窗
?"
>
<el-button
type=
"text"
>
删除
</el-button>
</dm-delete>
</
template
>
...
...
@@ -77,7 +82,7 @@
</template>
<
script
>
import
{
popPlanList
,
removePopup
,
stopPopup
}
from
'@/service/api/popApi.js'
;
import
{
popPlanList
,
removePopup
,
stopPopup
,
removePopupPlan
}
from
'@/service/api/popApi.js'
;
import
{
formatDateTimeByType
}
from
'@/utils/index.js'
;
import
timeCounts
from
'@/components/timeCount/index.vue'
;
import
tableMethods
from
'@/mixins/tableMethods.js'
;
...
...
@@ -173,6 +178,14 @@ export default {
this
.
$router
.
push
(
`/pop/edit?id=
${
group
.
id
}
`
);
}
},
delGroup
(
group
)
{
removePopupPlan
({
popupPlanId
:
group
.
id
}).
then
(
res
=>
{
if
(
res
.
errorCode
==
0
)
{
this
.
$message
.
success
(
'删除成功'
);
this
.
getTableList
();
}
});
},
removePop
(
pop
)
{
removePopup
({
popupId
:
pop
.
id
}).
then
(
res
=>
{
this
.
$message
.
success
(
'删除成功'
);
...
...
@@ -257,12 +270,10 @@ export default {
line-height
:
17px
;
}
}
.btn
{
box-sizing
:
border-box
;
.btn-group
{
padding-left
:
10px
;
width
:
170px
;
color
:
#409eff
;
cursor
:
pointer
;
box-sizing
:
border-box
;
}
}
.dot
{
...
...
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