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