|
|
|
@ -8,6 +8,7 @@ import PopPut from "@/components/popPut/popPut"; |
|
|
|
|
import folder from '@/static/img/folder.png' |
|
|
|
|
import {getCurrentInstance} from "@tarojs/runtime"; |
|
|
|
|
import ShowModel from "@/components/showModel/showModel"; |
|
|
|
|
import Empty from "@/components/empty/empty"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const DepAdmin: FC = () => { |
|
|
|
@ -71,7 +72,7 @@ const DepAdmin: FC = () => { |
|
|
|
|
Taro.navigateTo({url: `/pages/manage/depCur/depCur?id=${item.id}`}) |
|
|
|
|
break |
|
|
|
|
case 1: |
|
|
|
|
Taro.navigateTo({url: `/pages/manage/depAdmin/depAdmin?dep_id=${item.id}&name=${item.name}&id=${item.id}`}) |
|
|
|
|
Taro.navigateTo({url: `/pages/manage/depAdmin/depAdmin?dep_id=${item.id}&name=${encodeURI(item.name)}&id=${item.id}`}) |
|
|
|
|
break |
|
|
|
|
case 2: |
|
|
|
|
showPop(item) |
|
|
|
@ -186,17 +187,19 @@ const DepAdmin: FC = () => { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Taro.useDidShow(getData) |
|
|
|
|
// Taro.useDidShow()
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
getData() |
|
|
|
|
Taro.setNavigationBarTitle({ |
|
|
|
|
title: params.name ?? '部门管理' |
|
|
|
|
}) |
|
|
|
|
title: decodeURI(params.name) || '部门管理' |
|
|
|
|
}) |
|
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
<View> |
|
|
|
|
|
|
|
|
|
{manages.map(d => <PopPut |
|
|
|
|
key={d.id} |
|
|
|
|
title={d.name} |
|
|
|
@ -213,6 +216,8 @@ const DepAdmin: FC = () => { |
|
|
|
|
content={['学员', '管理员', '超级管理员'][d.role_type]} |
|
|
|
|
/>)} |
|
|
|
|
|
|
|
|
|
{!manages.length && !users.length && <Empty name='暂无数据'/>} |
|
|
|
|
|
|
|
|
|
<View className='operation'> |
|
|
|
|
<View className='safeAreaInsetBottom'> |
|
|
|
|
<View onClick={jumpAddStudent}>添加学员</View> |
|
|
|
|