Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
8033ed7e
提交
8033ed7e
编写于
12月 25, 2020
作者:
vino
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/dev-circle-nine-20201231' into dev-circle-nine-20201231
上级
8b1fd400
10092cff
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
110 行增加
和
85 行删除
+110
-85
baseinfo.vue
src/components/activitymanagement/baseinfo.vue
+3
-1
activitymanagementApi.js
src/utils/activitymanagement/activitymanagementApi.js
+18
-1
filter.js
src/utils/filter.js
+8
-0
activity-management.vue
src/views/activitymanagement/activity-management.vue
+79
-69
create-activity.vue
src/views/activitymanagement/create-activity.vue
+2
-14
未找到文件。
src/components/activitymanagement/baseinfo.vue
浏览文件 @
8033ed7e
...
...
@@ -238,7 +238,7 @@
created
()
{
vm
=
this
;
vm
.
getCircleList
();
//可以放在自组件优化
vm
.
getModuleData
();
},
data
()
{
let
checkProjectStr
=
(
rule
,
value
,
callback
)
=>
{
...
...
@@ -359,6 +359,7 @@
// 获取模块下拉数据
getModuleData() {
getModuleData().then(function (res) {
if(res.code == "
000000
") {
vm.moduleArray = JSON.parse(JSON.stringify(res.data));
...
...
@@ -648,6 +649,7 @@
closeLoading(vm);
if (res.code == "
000000
") {
vm.circleList = res.data
vm.getModuleData();
}
}).catch(err => {
this.$message.error('请求失败');
...
...
src/utils/activitymanagement/activitymanagementApi.js
浏览文件 @
8033ed7e
...
...
@@ -32,7 +32,24 @@ export const getActivityInfoReq = (activityId) => {
description
:
'专区活动列表与搜索'
,
})
};
export
const
removeActivity
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`circle/sso/activity/remove`
),
method
:
'delete'
,
data
:
params
,
description
:
'后台管理--专区活动删除'
,
})
};
export
const
updateActivityStatus
=
(
params
)
=>
{
return
fetch
({
headers
,
url
:
getBaseUrl
(
`circle/sso/activity/deploy`
),
method
:
'post'
,
data
:
params
,
description
:
'后台管理--专区活动上下线'
,
})
};
export
const
getActivityDocList
=
(
params
)
=>
{
...
...
src/utils/filter.js
浏览文件 @
8033ed7e
...
...
@@ -512,6 +512,14 @@ const vueFilter = {
return
'-'
}
},
//活动发布状态 1 已经发布 2未发布
activityStatus
:(
value
)
=>
{
if
(
value
==
1
)
{
return
'已发布'
}
else
if
(
value
==
2
)
{
return
'未发布'
}
},
liveStatusFilter
:
(
value
)
=>
{
if
(
value
==
1
)
{
return
'预告'
...
...
src/views/activitymanagement/activity-management.vue
浏览文件 @
8033ed7e
...
...
@@ -60,11 +60,11 @@
</el-row>
</el-form>
<el-table
:data=
"tableData"
class=
"item-table"
style=
"width: 100%;margin-top: 10px;"
>
<el-table-column
prop=
"
i
d"
label=
"活动ID"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
name
"
label=
"后台标题"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
name
"
label=
"前台主标题"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
n
ame"
label=
"创建者"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
n
ame"
label=
"最后修改"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
activityI
d"
label=
"活动ID"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
titleManager
"
label=
"后台标题"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
titleViewMain
"
label=
"前台主标题"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
createdN
ame"
label=
"创建者"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
modifiedN
ame"
label=
"最后修改"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"createdTime"
label=
"创建时间"
min-width=
"100"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
createdTime
|
liveDateFilter
}}
</span>
...
...
@@ -72,28 +72,23 @@
</el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<!--
<span>
{{
scope
.
row
.
status
|
rangeStatus
}}
</span>
-->
<span
v-if=
"scope.row.status == 10 || scope.row.status == 40"
style=
"color: #FAAD14"
>
{{
scope
.
row
.
status
|
rangeStatus
}}
</span>
<span
v-if=
"scope.row.status == 30"
style=
"color: #1890FF"
>
{{
scope
.
row
.
status
|
rangeStatus
}}
</span>
<span
v-if=
"scope.row.status == 0 || scope.row.status == 50"
style=
"color: #c7c8c9"
>
{{
scope
.
row
.
status
|
rangeStatus
}}
</span>
<span>
{{
scope
.
row
.
status
|
activityStatus
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"
numberOfPeople
"
label=
"活动成员数"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
doctorCount
"
label=
"活动成员数"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
min-width=
"370"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.status != 50"
>
<el-button
@
click=
"publishRange(scope.row)"
v-if=
"scope.row.status != 30 && scope.row.status != 0"
type=
"text"
size=
"small"
>
发布
</el-button>
<el-button
@
click=
"unPublishRange(scope.row)"
v-if=
"scope.row.status == 30 && scope.row.status != 0"
type=
"text"
size=
"small"
>
下线
</el-button>
<!--
<el-button
@
click=
"liveManage(scope.row)"
type=
"text"
size=
"small"
v-if=
"scope.row.status != 0"
>
直播管理
</el-button>
-->
<!--
<el-button
@
click=
"roleManage(scope.row)"
type=
"text"
size=
"small"
v-if=
"scope.row.status != 0"
>
成员管理
</el-button>
-->
<el-button
@
click=
"editRange(scope.row)"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"editRange(scope.row)"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"deleteActivity(scope.row)"
type=
"text"
size=
"small"
>
删除
</el-button>
<el-button
@
click=
"publishRange(scope.row)"
v-if=
"scope.row.status == 2"
type=
"text"
size=
"small"
>
发布
</el-button>
<el-button
@
click=
"unPublishRange(scope.row)"
v-if=
"scope.row.status == 1"
type=
"text"
size=
"small"
>
下线
</el-button>
<el-button
@
click=
"activityManage(scope.row)"
type=
"text"
size=
"small"
>
活动成员管理
</el-button>
<!--
<el-button
@
click=
"setting(scope.row)"
type=
"text"
size=
"small"
v-if=
"scope.row.status != 0 && showNewFlag"
>
应用配置
</el-button>
-->
<el-button
@
click=
"rangeManage(scope.row)"
type=
"text"
size=
"small"
v-if=
"scope.row.status != 0"
>
删除
</el-button>
</div>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -163,7 +158,7 @@
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
{
updateRangeStatus
,
getCircleSettingList
,
saveCircleSetting
}
from
"../../utils/yqrange/yqrangeApi"
;
import
{
getActivityList
}
from
'@/utils/activitymanagement/activitymanagementApi'
;
import
{
getActivityList
,
removeActivity
,
updateActivityStatus
}
from
'@/utils/activitymanagement/activitymanagementApi'
;
import
ElTabPane
from
"element-ui/packages/tabs/src/tab-pane"
;
import
RangeApply
from
"./range-apply"
;
export
default
{
...
...
@@ -290,7 +285,7 @@ export default {
getActivityList
(
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
)
{
this
.
tableData
=
res
.
data
.
circle
List
;
this
.
tableData
=
res
.
data
.
activityModel
List
;
this
.
totalRows
=
res
.
data
.
count
;
}
else
{
this
.
tableData
=
[];
...
...
@@ -303,7 +298,24 @@ export default {
this
.
$message
.
error
(
"请重试"
);
})
},
//删除活动
removeActivity
(
activityId
){
let
params
=
{
activityId
:
activityId
,
}
openLoading
(
this
);
removeActivity
(
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
){
this
.
$message
.
success
(
"删除成功"
);
this
.
searchList
();
}
}).
catch
((
error
)
=>
{
this
.
$message
.
error
(
"请重试"
);
}
)
},
resetForm
()
{
this
.
searchForm
.
name
=
""
;
this
.
searchForm
.
createdTime
=
""
;
...
...
@@ -317,58 +329,49 @@ export default {
path
:
`/create-activity?enterType=
${
enterType
}
`
})
},
//
上线
//
发布
publishRange
(
row
)
{
this
.
$confirm
(
`上线后圈子成员将收到入圈消息提醒(每天最多提醒一次),确定上线“
${
row
.
name
}
”吗?`
,
''
,
{
confirmButtonText
:
'上线'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
// confirm
this
.
updateStatus
(
row
.
id
,
"30"
);
}).
catch
(()
=>
{
// cancel
// this.$message.error("上线失败");
});
this
.
updateStatus
(
row
.
activityId
,
1
);
},
//下线
unPublishRange
(
row
)
{
this
.
$confirm
(
`确定下线“
${
row
.
name
}
”吗?`
,
''
,
{
var
content
=
''
;
if
(
row
.
doctorCount
==
0
){
content
=
'确认要下线该活动吗?'
}
else
if
(
row
.
doctorCount
>
0
){
content
=
'该活动的'
+
row
.
doctorCount
+
'个成员将无法参与活动,确认下线吗?'
}
this
.
$confirm
(
`
${
content
}
`
,
''
,
{
confirmButtonText
:
'下线'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
this
.
updateStatus
(
row
.
id
,
"40"
);
this
.
updateStatus
(
row
.
activityId
,
2
);
// confirm
}).
catch
(()
=>
{
// cancel
});
},
// 更新
圈子
状态(上线,下线)
// 更新
活动
状态(上线,下线)
updateStatus
(
id
,
status
){
let
params
=
{
"
id"
:
id
,
"status
"
:
status
};
update
Range
Status
(
params
).
then
((
res
)
=>
{
let
params
=
{
"
activityId"
:
id
,
"deployFlag
"
:
status
};
update
Activity
Status
(
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
)
{
if
(
status
==
"40"
){
if
(
status
==
2
){
this
.
$message
.
success
(
"下线成功"
);
}
else
if
(
status
==
"30"
)
{
this
.
$message
.
success
(
"上线成功"
);
}
else
if
(
status
==
"50"
)
{
this
.
$message
.
success
(
"解散成功"
);
}
}
else
if
(
status
==
1
)
{
this
.
$message
.
success
(
"发布成功!"
);
}
this
.
searchList
();
}
else
{
if
(
status
==
"40"
){
if
(
status
==
2
){
this
.
$message
.
error
(
"下线失败,请重试"
);
}
else
if
(
status
==
"30"
)
{
this
.
$message
.
error
(
"上线失败,请重试"
);
}
else
if
(
status
==
"50"
)
{
this
.
$message
.
error
(
"解散失败,请重试"
);
}
}
else
if
(
status
==
1
)
{
this
.
$message
.
error
(
"发布失败,请重试"
);
}
}
...
...
@@ -377,28 +380,35 @@ export default {
// message: error,
// type: 'error'
// });
if
(
status
==
"40"
){
if
(
status
==
2
){
this
.
$message
.
error
(
"下线失败,请重试"
);
}
else
if
(
status
==
"30"
)
{
this
.
$message
.
error
(
"上线失败,请重试"
);
}
else
if
(
status
==
"50"
)
{
this
.
$message
.
error
(
"解散失败,请重试"
);
}
}
else
if
(
status
==
1
)
{
this
.
$message
.
error
(
"发布失败,请重试"
);
}
})
},
rangeManage
(
row
)
{
this
.
$router
.
push
({
path
:
'/range-manage'
,
query
:
{
id
:
row
.
id
,
name
:
row
.
name
,
activeName
:
'first'
,
roleType
:
row
.
roleId
,
}
})
deleteActivity
(
row
)
{
var
content
=
''
;
if
(
row
.
doctorCount
==
0
){
content
=
'确认要删除该活动吗?'
}
else
if
(
row
.
doctorCount
>
0
){
content
=
'该活动的'
+
row
.
doctorCount
+
'个成员将无法参与活动,确认删除吗?'
}
this
.
$confirm
(
`
${
content
}
`
,
''
,
{
confirmButtonText
:
'删除'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
removeActivity
(
row
.
activityId
);
// confirm
}).
catch
(()
=>
{
// cancel
});
},
//直播管理
...
...
@@ -419,7 +429,7 @@ export default {
this
.
$router
.
push
({
path
:
`/create-activity?enterType`
,
query
:{
id
:
row
.
i
d
,
id
:
row
.
activityI
d
,
enterType
:
enterType
,
roleType
:
row
.
roleId
}
...
...
@@ -446,8 +456,8 @@ export default {
this
.
$router
.
push
({
path
:
'/activity-member'
,
query
:
{
id
:
row
.
i
d
,
name
:
row
.
name
,
id
:
row
.
activityI
d
,
name
:
row
.
titleViewMain
,
activeName
:
'first'
,
}
})
...
...
src/views/activitymanagement/create-activity.vue
浏览文件 @
8033ed7e
...
...
@@ -77,7 +77,7 @@
this
.
enterType
=
enterType
;
this
.
roleType
=
roleType
;
if
(
this
.
enterType
!=
null
&&
this
.
roleType
!=
null
){
if
(
this
.
enterType
==
2
){
this
.
curmbSecond
=
"编辑活动"
}
...
...
@@ -117,10 +117,7 @@
//完成
complete
()
{
// if(this.$refs.org.selectionList == null || this.$refs.org.selectionList == ""){
// this.$message.warning('请选择机构');
// return;
// }
console
.
log
(
this
.
formData
.
id
);
let
req
=
{
circleId
:
this
.
formData
.
id
,
...
...
@@ -168,18 +165,9 @@
},
//更新活动信息
commitActivityInfo
()
{
let
req
=
vm
.
formData
;
console
.
log
(
"commitActivityInfo() : name = "
+
req
.
titleManager
+
", headUrl = "
+
req
.
listImage
+
", coverUrl = "
+
req
.
introImage
)
vm
.
POST
(
"circle/sso/activity/save"
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
// console.log(res);
// console.log(this.$refs);
// vm.formData.id = res.data;
// // this.active = 1;
// this.stepData = [false, true];
this
.
$message
.
success
(
'保存成功'
);
const
_this
=
this
;
setTimeout
(
function
()
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录