提交 4233a7be authored 作者: matian's avatar matian

updates

上级 0f799277
...@@ -3,7 +3,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' ...@@ -3,7 +3,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import { getConditionList, getPostsList, delPosts, setTopPosts } from '../api' import { getConditionList, getPostsList, delPosts, setTopPosts } from '../api'
import AddPostDialog from '../components/AddPostDialog.vue' import AddPostDialog from '../components/AddPostDialog.vue'
import { useProjectList } from '@/composables/useGetProjectList' import { useProjectList } from '@/composables/useGetProjectList'
import { useUserStore } from '@/stores/user' // import { useUserStore } from '@/stores/user'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
const router = useRouter() const router = useRouter()
const store = useMapStore() const store = useMapStore()
...@@ -11,8 +11,8 @@ const typeList = store.getMapValuesByKey('learning_discussion_type') ...@@ -11,8 +11,8 @@ const typeList = store.getMapValuesByKey('learning_discussion_type')
console.log(typeList, '123') console.log(typeList, '123')
const departmentList: any = useProjectList('', '79806610719731712').departmentList const departmentList: any = useProjectList('', '79806610719731712').departmentList
// 判断当前用户是不是超级管理员 // 判断当前用户是不是超级管理员
const user = useUserStore().roles // const user = useUserStore().roles
const isAdmin = !!user.find((item: any) => item.name === '超级管理员') // const isAdmin = !!user.find((item: any) => item.name === '超级管理员')
const appList = ref() const appList = ref()
const isShowAddDialog = ref(false) const isShowAddDialog = ref(false)
const organ_id = ref('') const organ_id = ref('')
...@@ -229,7 +229,7 @@ const handleReply = (row: any) => { ...@@ -229,7 +229,7 @@ const handleReply = (row: any) => {
v-permission="'v1-teaching-discussion-create'" v-permission="'v1-teaching-discussion-create'"
>新建帖子</el-button >新建帖子</el-button
> >
<template v-if="isAdmin" #filter-department> <template #filter-department>
<div class="name" style="font-size: 14px; color: #606266; padding-right: 12px">所属部门/学校:</div> <div class="name" style="font-size: 14px; color: #606266; padding-right: 12px">所属部门/学校:</div>
<el-select @change="handleChangeOrgan" clearable v-model="organ_id" placeholder="请选择所属部门/学校"> <el-select @change="handleChangeOrgan" clearable v-model="organ_id" placeholder="请选择所属部门/学校">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id" />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论