feat(小功能建设): 15团队空间问卷列表页优化 (#334)

This commit is contained in:
Jiangchunfu 2024-07-10 16:20:31 +08:00 committed by GitHub
parent eaa1abda82
commit 9afb23c08e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,7 +17,9 @@
<SliderBar :menus="spaceMenus" @select="handleSpaceSelect" /> <SliderBar :menus="spaceMenus" @select="handleSpaceSelect" />
<div class="list-content"> <div class="list-content">
<div class="top"> <div class="top">
<h2>{{ spaceType === SpaceType.Group ? '团队空间' : '问卷' }}列表</h2> <h2>
{{ spaceType === SpaceType.Group ? '团队空间' : currentTeamSpace?.name || '问卷列表' }}
</h2>
<div class="operation"> <div class="operation">
<el-button <el-button
class="btn space-btn" class="btn space-btn"
@ -28,6 +30,10 @@
<i class="iconfont icon-chuangjian"></i> <i class="iconfont icon-chuangjian"></i>
<span>创建团队空间</span> <span>创建团队空间</span>
</el-button> </el-button>
<el-button type="default" @click="onSetGroup" v-if="workSpaceId">
<i class="iconfont icon-shujuliebiao"></i>
<span>团队管理</span>
</el-button>
<el-button <el-button
class="btn create-btn" class="btn create-btn"
type="default" type="default"
@ -141,6 +147,17 @@ const fetchSurveyList = async (params?: any) => {
const modifyType = ref('add') const modifyType = ref('add')
const showSpaceModify = ref(false) const showSpaceModify = ref(false)
//
const currentTeamSpace = computed(() => {
return store.state.list.teamSpaceList.find((item: any) => item._id === workSpaceId.value)
})
const onSetGroup = async () => {
await store.dispatch('list/getSpaceDetail', workSpaceId.value)
modifyType.value = 'edit'
showSpaceModify.value = true
}
const onCloseModify = (type: string) => { const onCloseModify = (type: string) => {
showSpaceModify.value = false showSpaceModify.value = false
if (type === 'update') fetchSpaceList() if (type === 'update') fetchSpaceList()