Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-psp
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-psp
Commits
3a947d95
提交
3a947d95
authored
4月 29, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates
上级
8b52866e
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
155 行增加
和
10 行删除
+155
-10
AppList.vue
src/components/base/AppList.vue
+2
-2
api.ts
src/modules/team/api.ts
+15
-2
FileList.vue
src/modules/team/components/FileList.vue
+48
-0
MemberList.vue
src/modules/team/components/MemberList.vue
+34
-0
QuestionList.vue
src/modules/team/components/QuestionList.vue
+48
-0
List.vue
src/modules/team/views/List.vue
+2
-1
View.vue
src/modules/team/views/View.vue
+6
-5
没有找到文件。
src/components/base/AppList.vue
浏览文件 @
3a947d95
...
@@ -59,9 +59,9 @@ const fetchList = (isReset = false) => {
...
@@ -59,9 +59,9 @@ const fetchList = (isReset = false) => {
loading
.
value
=
true
loading
.
value
=
true
httpRequest
(
requestParams
)
httpRequest
(
requestParams
)
.
then
((
res
:
any
)
=>
{
.
then
((
res
:
any
)
=>
{
const
{
list
=
[],
total
=
0
}
=
res
.
data
||
{}
const
{
list
=
[],
total
=
0
}
=
callback
?
callback
(
res
.
data
)
:
res
.
data
||
{}
page
.
total
=
total
page
.
total
=
total
dataList
.
value
=
callback
?
callback
(
list
)
:
list
dataList
.
value
=
list
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
page
.
total
=
0
page
.
total
=
0
...
...
src/modules/team/api.ts
浏览文件 @
3a947d95
...
@@ -6,11 +6,24 @@ export function getTeamList(params?: { name?: string; status?: string; page?: nu
...
@@ -6,11 +6,24 @@ export function getTeamList(params?: { name?: string; status?: string; page?: nu
}
}
// 团队审核
// 团队审核
export
function
submitAudit
(
data
:
{
id
:
string
;
status
:
number
})
{
export
function
submitAudit
(
data
:
{
id
:
string
;
status
:
0
|
1
})
{
return
httpRequest
.
post
(
'/api/psp/backend/team/audit'
,
data
)
return
httpRequest
.
post
(
'/api/psp/backend/team/audit'
,
data
)
}
}
// 获取团队详情
// 获取团队详情
export
function
getTeam
(
params
:
{
id
:
string
;
page
?:
number
;
page_size
?:
number
})
{
export
function
getTeam
(
params
:
{
id
:
string
members_page
?:
number
members_page_size
?:
number
files_page
?:
number
files_page_size
?:
number
questions_page
?:
number
questions_page_size
?:
number
})
{
return
httpRequest
.
get
(
'/api/psp/backend/team/view'
,
{
params
})
return
httpRequest
.
get
(
'/api/psp/backend/team/view'
,
{
params
})
}
}
// 团队管理-团队文件或者问答删除
export
function
deleteFileOrQuestion
(
data
:
{
id
:
string
;
type
:
'question'
|
'file'
})
{
return
httpRequest
.
post
(
'/api/psp/backend/team/file-or-question-delete'
,
data
)
}
src/modules/team/components/FileList.vue
0 → 100644
浏览文件 @
3a947d95
<
script
setup
lang=
"ts"
>
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
getTeam
,
deleteFileOrQuestion
}
from
'../api'
const
props
=
defineProps
<
{
id
:
string
}
>
()
const
appList
=
ref
()
const
listOptions
=
{
remote
:
{
httpRequest
:
getTeam
,
params
:
{
id
:
props
.
id
},
beforeRequest
(
params
:
any
)
{
params
.
files_page
=
params
.
page
params
.
files_page_size
=
params
.
page_size
return
params
},
callback
(
data
:
any
)
{
return
data
.
files
}
},
columns
:
[
{
label
:
'ID'
,
prop
:
'id'
},
{
label
:
'标题'
,
prop
:
'title'
},
{
label
:
'发布人'
,
prop
:
'user_info.name'
},
{
label
:
'发布时间'
,
prop
:
'created_time'
},
{
label
:
'回答数量'
,
prop
:
'comment_count'
},
{
label
:
'浏览量'
,
prop
:
'pv'
},
{
label
:
'操作'
,
slots
:
'table-operate'
,
align
:
'right'
}
]
}
const
onRemove
=
(
row
:
any
)
=>
{
ElMessageBox
.
confirm
(
'确定要删除吗?'
,
'提示'
).
then
(()
=>
{
deleteFileOrQuestion
({
id
:
row
.
id
,
type
:
'file'
}).
then
(()
=>
{
ElMessage
({
type
:
'success'
,
message
:
'删除成功'
})
appList
.
value
?.
refetch
()
})
})
}
</
script
>
<
template
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
table-operate=
"
{ row }">
<el-button
type=
"danger"
plain
@
click=
"onRemove(row)"
>
删除
</el-button>
</
template
>
</AppList>
</template>
src/modules/team/components/MemberList.vue
0 → 100644
浏览文件 @
3a947d95
<
script
setup
lang=
"ts"
>
import
{
getTeam
}
from
'../api'
const
props
=
defineProps
<
{
id
:
string
}
>
()
const
appList
=
ref
()
const
listOptions
=
{
remote
:
{
httpRequest
:
getTeam
,
params
:
{
id
:
props
.
id
},
beforeRequest
(
params
:
any
)
{
params
.
members_page
=
params
.
page
params
.
members_page_size
=
params
.
page_size
return
params
},
callback
(
data
:
any
)
{
return
data
.
members
}
},
columns
:
[
{
label
:
'头像'
,
prop
:
'user_info.avatar'
,
slots
:
'table-logo'
,
width
:
74
},
{
label
:
'姓名'
,
prop
:
'user_info.name'
},
{
label
:
'手机号'
,
prop
:
'user_info.mobile'
}
]
}
</
script
>
<
template
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
table-logo=
"
{ row }">
<el-avatar
:size=
"50"
:src=
"row.user_info.avatar + '?x-oss-process=image/resize,m_fill,h_100,w_200'"
/>
</
template
>
</AppList>
</template>
src/modules/team/components/QuestionList.vue
0 → 100644
浏览文件 @
3a947d95
<
script
setup
lang=
"ts"
>
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
getTeam
,
deleteFileOrQuestion
}
from
'../api'
const
props
=
defineProps
<
{
id
:
string
}
>
()
const
appList
=
ref
()
const
listOptions
=
{
remote
:
{
httpRequest
:
getTeam
,
params
:
{
id
:
props
.
id
},
beforeRequest
(
params
:
any
)
{
params
.
questions_page
=
params
.
page
params
.
questions_page_size
=
params
.
page_size
return
params
},
callback
(
data
:
any
)
{
return
data
.
questions
}
},
columns
:
[
{
label
:
'ID'
,
prop
:
'id'
},
{
label
:
'标题'
,
prop
:
'title'
},
{
label
:
'发布人'
,
prop
:
'user_info.name'
},
{
label
:
'发布时间'
,
prop
:
'created_time'
},
{
label
:
'回答数量'
,
prop
:
'comment_count'
},
{
label
:
'浏览量'
,
prop
:
'pv'
},
{
label
:
'操作'
,
slots
:
'table-operate'
,
align
:
'right'
}
]
}
const
onRemove
=
(
row
:
any
)
=>
{
ElMessageBox
.
confirm
(
'确定要删除吗?'
,
'提示'
).
then
(()
=>
{
deleteFileOrQuestion
({
id
:
row
.
id
,
type
:
'question'
}).
then
(()
=>
{
ElMessage
({
type
:
'success'
,
message
:
'删除成功'
})
appList
.
value
?.
refetch
()
})
})
}
</
script
>
<
template
>
<AppList
v-bind=
"listOptions"
ref=
"appList"
>
<template
#
table-operate=
"
{ row }">
<el-button
type=
"danger"
plain
@
click=
"onRemove(row)"
>
删除
</el-button>
</
template
>
</AppList>
</template>
src/modules/team/views/List.vue
浏览文件 @
3a947d95
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ArrowDown
}
from
'@element-plus/icons-vue'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
{
getTeamList
,
submitAudit
}
from
'../api'
import
{
getTeamList
,
submitAudit
}
from
'../api'
...
@@ -37,7 +38,7 @@ const listOptions = {
...
@@ -37,7 +38,7 @@ const listOptions = {
]
]
}
}
// 审核
// 审核
const
onAudit
=
(
row
:
any
,
status
:
number
)
=>
{
const
onAudit
=
(
row
:
any
,
status
:
0
|
1
)
=>
{
submitAudit
({
id
:
row
.
id
,
status
}).
then
(()
=>
{
submitAudit
({
id
:
row
.
id
,
status
}).
then
(()
=>
{
ElMessage
({
type
:
'success'
,
message
:
'审核完成'
})
ElMessage
({
type
:
'success'
,
message
:
'审核完成'
})
appList
.
value
?.
refetch
()
appList
.
value
?.
refetch
()
...
...
src/modules/team/views/View.vue
浏览文件 @
3a947d95
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
// import StarRecord from '../components/StarRecord.vue'
import
MemberList
from
'../components/MemberList.vue'
// import SignInRecord from '../components/SignInRecord.vue'
import
FileList
from
'../components/FileList.vue'
import
QuestionList
from
'../components/QuestionList.vue'
import
{
getTeam
}
from
'../api'
import
{
getTeam
}
from
'../api'
const
props
=
defineProps
<
{
id
:
string
}
>
()
const
props
=
defineProps
<
{
id
:
string
}
>
()
...
@@ -34,13 +35,13 @@ onMounted(() => {
...
@@ -34,13 +35,13 @@ onMounted(() => {
<AppCard>
<AppCard>
<el-tabs
type=
"card"
>
<el-tabs
type=
"card"
>
<el-tab-pane
label=
"成员"
lazy
>
<el-tab-pane
label=
"成员"
lazy
>
<
!--
<SignInRecord
:id=
"id"
></SignInRecord>
--
>
<
MemberList
:id=
"id"
></MemberList
>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"资料"
lazy
>
<el-tab-pane
label=
"资料"
lazy
>
<
!--
<SignInRecord
:id=
"id"
></SignInRecord>
--
>
<
FileList
:id=
"id"
></FileList
>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"问答"
lazy
>
<el-tab-pane
label=
"问答"
lazy
>
<
!--
<StarRecord
:id=
"id"
></StarRecord>
--
>
<
QuestionList
:id=
"id"
></QuestionList
>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</AppCard>
</AppCard>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论