Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust_web
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
张伯涛
cust_web
Commits
62be76e8
Commit
62be76e8
authored
Jan 16, 2025
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改活动发布
parent
1353b6a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
28 deletions
+31
-28
activity.js
src/api/contentManagement/activity.js
+9
-1
index.vue
src/views/contentManagement/activity/index.vue
+7
-7
index.vue
src/views/contentManagement/activity/info/index.vue
+15
-20
No files found.
src/api/contentManagement/activity.js
View file @
62be76e8
import
request
from
'@/utils/request'
import
Qs
from
'qs'
import
{
parseTime
}
from
'@/utils/common'
;
import
{
parseTime
}
from
'@/utils/common'
/**
* 1. 列表查询
...
...
@@ -77,3 +77,11 @@ export function updateStatus(data) {
data
:
data
})
}
// 7. 修改活动发布状态
export
function
updatePushStatus
(
data
)
{
return
request
({
url
:
'/cmsActivity/pushActivityInfo'
,
method
:
'put'
,
params
:
{
businessId
:
data
.
businessId
,
status
:
data
.
publishStatus
}
})
}
src/views/contentManagement/activity/index.vue
View file @
62be76e8
...
...
@@ -121,10 +121,10 @@
{{
scope
.
row
.
weight
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"
releaseStatus"
label=
"
状态"
min-width=
"80"
show-overflow-tooltip
>
<el-table-column
align=
"center"
prop=
"
publishStatus"
label=
"发布
状态"
min-width=
"80"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.
flag
"
v-model=
"scope.row.
publishStatus
"
class=
"switchDisabledStyle"
inactive-value=
"0"
active-value=
"1"
...
...
@@ -309,7 +309,7 @@
import
commonField
from
'@/utils/commonField'
import
{
delCmsActivity
,
listCmsActivity
,
updateStatus
listCmsActivity
,
update
PushStatus
,
update
Status
}
from
'@/api/contentManagement/activity'
import
{
parseTime
}
from
'@/utils'
import
{
getDataCache
,
setDataCache
}
from
'@/assets/js/filterData'
...
...
@@ -626,24 +626,24 @@ export default {
},
// 修改状态
handleStatusChange
(
row
)
{
const
text
=
row
.
flag
===
'1'
?
'启用'
:
'停用
'
const
text
=
row
.
publishStatus
===
'1'
?
'发布'
:
'取消发布
'
const
params
=
{
businessId
:
row
.
businessId
,
flag
:
row
.
flag
publishStatus
:
row
.
publishStatus
}
this
.
$confirm
(
'是否确认操作?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
updateStatus
(
params
)
return
update
Push
Status
(
params
)
}).
then
(()
=>
{
this
.
$message
({
message
:
text
+
'成功'
,
type
:
'success'
})
}).
catch
(
function
()
{
row
.
flag
=
row
.
flag
===
'0'
?
'1'
:
'0'
row
.
publishStatus
=
row
.
publishStatus
===
'0'
?
'1'
:
'0'
})
},
handleExamination
(
data
)
{
...
...
src/views/contentManagement/activity/info/index.vue
View file @
62be76e8
...
...
@@ -165,7 +165,7 @@
:rules=
"[
{ required: !(controls.isOperation === '3'), message: '请选择结束时间', trigger: 'blur' },
{ validator: validateEndTime, trigger: 'blur' }
]"
]"
>
<el-date-picker
v-model=
"form.endTime"
...
...
@@ -337,17 +337,14 @@
</div>
</div>
<el-dialog
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<div
v-if=
"form.details"
class=
"preview-content"
v-html=
"form.details"
></div
>
<div
v-if=
"form.details"
class=
"preview-content"
v-html=
"form.details"
/
>
<div
v-else
>
暂无预览内容
</div>
</el-dialog>
<!-- 按钮区 -->
<div
class=
"btn-box"
>
<el-button
v-if=
"controls.isOperation !== '3'"
style=
"width: 80px; height: 40px;font-size: 16px; width: 138px;height: 38px "
@
click=
"submit"
>
保存
</el-button>
<el-button
v-if=
"controls.isOperation !== '3'"
style=
"width: 80px; height: 40px;font-size: 16px; width: 138px;height: 38px "
type=
"primary"
:loading=
"pubLoading"
@
click=
"publish"
>
发布
<el-button
v-if=
"controls.isOperation !== '3'"
type=
"primary"
style=
"width: 80px; height: 40px;font-size: 16px; width: 138px;height: 38px "
@
click=
"submit"
>
保存
</el-button>
<el-button
v-if=
"controls.isOperation === '3'"
style=
"width: 80px; height: 40px;font-size: 16px; width: 138px;height: 38px "
@
click=
"goBack"
>
返回
...
...
@@ -453,20 +450,20 @@ export default {
this
.
setFormDefaults
()
},
methods
:
{
//时间填写验证
//
时间填写验证
validateEndTime
(
rule
,
value
,
callback
)
{
if
(
value
&&
this
.
form
.
startTime
)
{
const
startTime
=
new
Date
(
this
.
form
.
startTime
);
const
endTime
=
new
Date
(
value
);
if
(
endTime
<
startTime
)
{
callback
(
new
Error
(
'结束时间不能早于开始时间'
));
if
(
value
&&
this
.
form
.
startTime
)
{
const
startTime
=
new
Date
(
this
.
form
.
startTime
)
const
endTime
=
new
Date
(
value
)
if
(
endTime
<
startTime
)
{
callback
(
new
Error
(
'结束时间不能早于开始时间'
))
}
else
{
callback
()
}
}
else
{
callback
()
;
callback
()
}
}
else
{
callback
();
}
},
},
// 活动内容预览
contentPreview
()
{
this
.
open
=
true
...
...
@@ -564,7 +561,7 @@ export default {
if
(
response
.
code
===
200
)
{
this
.
form
=
response
.
data
this
.
imageUrl
=
response
.
data
.
url
console
.
log
(
'this.imageUrl:'
,
this
.
imageUrl
)
console
.
log
(
'this.imageUrl:'
,
this
.
imageUrl
)
}
})
}
...
...
@@ -604,8 +601,6 @@ export default {
this
.
$refs
.
deviceFormRef
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
businessId
!==
null
)
{
// 编辑
console
.
log
(
'编辑打印'
,
this
.
form
)
updateCmsActivity
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
({
...
...
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