Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
fb24358a
提交
fb24358a
编写于
6月 20, 2020
作者:
bo.dang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
圈子和直播
上级
64444788
变更
1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
149 行增加
和
20 行删除
+149
-20
yq-range.vue
src/views/yqrange/yq-range.vue
+149
-20
未找到文件。
src/views/yqrange/yq-range.vue
浏览文件 @
fb24358a
...
...
@@ -13,7 +13,7 @@
<el-col
:span=
"10"
>
<el-form-item
label=
"创建时间"
>
<el-date-picker
v-model=
"searchForm.
create
Time"
v-model=
"searchForm.
start
Time"
size=
"small"
type=
"datetime"
placeholder=
"请选择创建时间"
...
...
@@ -28,16 +28,20 @@
</el-row>
<el-row>
<el-col
:span=
"24"
style=
"text-align: right"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"createRange"
>
新建小圈
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"createRange"
v-if=
""
>
新建小圈
</el-button>
</el-col>
</el-row>
</el-form>
<el-table
:data=
"tableData"
class=
"item-table"
style=
"width: 100%;margin-top: 10px;"
>
<el-table-column
prop=
"id"
label=
"圈子ID"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"createTime"
label=
"创建时间"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"create
d
Time"
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=
"num"
label=
"圈子人数"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"publishRole"
label=
"内容发布权限"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"numberOfPeople"
label=
"圈子人数"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"dynamicFlag"
label=
"内容发布权限"
min-width=
"100"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
dynamicFlag
|
dynamicFlagStatus
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
label=
"圈子状态"
min-width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
status
|
rangeStatus
}}
</span>
...
...
@@ -50,7 +54,7 @@
<el-button
@
click=
"liveManage(scope.row)"
type=
"text"
size=
"small"
>
直播管理
</el-button>
<el-button
@
click=
"roleManage(scope.row)"
type=
"text"
size=
"small"
>
成员管理
</el-button>
<el-button
@
click=
"editRange(scope.row)"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"deleteRange(scope.row)"
type=
"text"
size=
"small"
>
解散圈子
</el-button>
<el-button
@
click=
"deleteRange(scope.row)"
type=
"text"
size=
"small"
v-if=
"showAllFlag"
>
解散圈子
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -70,7 +74,9 @@
</div>
</template>
<
script
>
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
{
getRangeList
,
updateRangeStatus
}
from
"../../utils/yqrange/yqrangeApi"
;
export
default
{
components
:
{
BreadCrumb
...
...
@@ -78,30 +84,115 @@ export default {
data
(){
return
{
curmbFirst
:
'云鹊小圈'
,
showAllFlag
:
false
,
searchForm
:
{
name
:
''
,
createTime
:
''
,
startTime
:
''
,
endTime
:
''
,
userType
:
""
,
// 用户标识 1:内部用户 2:外部用户,
status
:
""
,
pageNo
:
1
,
pageSize
:
10
,
},
totalRows
:
0
,
tableData
:
[
{
id
:
12
,
createTime
:
''
,
name
:
'浙江基础疾病'
,
num
:
12
,
publishRole
:
'所有人可发布动态'
,
status
:
1
,
}
],
tableData
:
[]
}
},
created
()
{
this
.
initPrivilege
();
this
.
searchList
();
},
methods
:
{
initPrivilege
(){
let
idType
=
localStorage
.
getItem
(
'storageIdType'
);
if
(
idType
==
null
||
idType
==
""
){
idType
=
1
;
}
this
.
searchForm
.
userType
=
idType
;
// 内部用户:运营人员
if
(
idType
==
"1"
){
this
.
showAllFlag
=
true
;
}
// 外部用户
else
if
(
idType
==
"2"
){
this
.
showAllFlag
=
false
;
this
.
getUserAuth
();
}
},
// 外部用户权限
getUserAuth
(){
getAuth
().
then
((
res
)
=>
{
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
)
{
}
else
{
}
}).
catch
((
error
)
=>
{
this
.
$message
({
message
:
error
,
type
:
'error'
});
})
},
searchList
()
{
console
.
log
(
'查询'
)
openLoading
(
this
);
let
params
=
this
.
searchForm
;
console
.
log
(
'查询圈子'
)
getRangeList
(
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
)
{
this
.
tableData
=
res
.
data
.
circleList
;
// 开发用
if
(
this
.
tableData
.
length
==
0
){
this
.
tableData
=
[{
"id"
:
123456
,
"createdTime"
:
"2020-06-10 00:00:00"
,
"name"
:
"第一个圈子"
,
"numberOfPeople"
:
550
,
"dynamicFlag"
:
1
,
"status"
:
1
,
"roleId"
:
1
},
{
"id"
:
123457
,
"createdTime"
:
"2020-06-19 00:00:00"
,
"name"
:
"第二个圈子"
,
"numberOfPeople"
:
560
,
"dynamicFlag"
:
1
,
"status"
:
2
,
"roleId"
:
2
}
]
}
// this.initFormData();
this
.
totalRows
=
res
.
data
.
count
;
}
else
{
this
.
tableData
=
[];
}
}).
catch
((
error
)
=>
{
this
.
$message
({
message
:
error
,
type
:
'error'
});
})
},
resetForm
()
{
this
.
searchForm
.
name
=
""
;
this
.
searchForm
.
startTime
=
""
;
console
.
log
(
'重置'
)
},
//新建小圈
...
...
@@ -120,9 +211,11 @@ export default {
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
// confirm
this
.
updateStatus
(
row
.
id
,
"3"
);
this
.
$message
.
success
(
"上线成功"
);
}).
catch
(()
=>
{
// cancel
this
.
$message
.
error
(
"上线失败"
);
});
},
//下线
...
...
@@ -133,16 +226,51 @@ export default {
type
:
'warning'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
this
.
updateStatus
(
row
.
id
,
"1"
);
// confirm
}).
catch
(()
=>
{
// cancel
});
},
// 更新圈子状态(上线,下线)
updateStatus
(
id
,
status
){
let
params
=
{
"id"
:
id
,
"status"
:
status
};
updateRangeStatus
(
params
).
then
((
res
)
=>
{
closeLoading
(
this
);
if
(
res
.
code
==
"000000"
)
{
if
(
status
==
"1"
){
this
.
$message
.
success
(
"下线成功"
);
}
else
if
(
status
==
"2"
)
{
this
.
$message
.
success
(
"上线成功"
);
}
}
else
{
if
(
status
==
"1"
){
this
.
$message
.
success
(
"下线失败,请重试"
);
}
else
if
(
status
==
"2"
)
{
this
.
$message
.
success
(
"上线失败,请重试"
);
}
}
}).
catch
((
error
)
=>
{
this
.
$message
({
message
:
error
,
type
:
'error'
});
})
},
//直播管理
liveManage
(
row
)
{
this
.
$router
.
push
({
path
:
'/live-manage
?id='
+
row
.
id
,
path
:
'/live-manage
'
,
})
},
//成员管理
...
...
@@ -170,6 +298,7 @@ export default {
type
:
'warning'
,
customClass
:
'range-make-box'
,
}).
then
(()
=>
{
this
.
updateStatus
(
row
.
id
,
"3"
);
// confirm
}).
catch
(()
=>
{
// cancel
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录