|
@@ -6,7 +6,7 @@
|
|
|
<div class="safety-platform-container__main">
|
|
<div class="safety-platform-container__main">
|
|
|
<OrgChart :treeData="treeData" @node-click="handleNodeClick" @canvas-click="handleCanvasClick" />
|
|
<OrgChart :treeData="treeData" @node-click="handleNodeClick" @canvas-click="handleCanvasClick" />
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="safety-platform-container__footer">
|
|
|
|
|
|
|
+ <div class="safety-platform-container__footer" v-if="showOperationBar">
|
|
|
<el-button @click="router.push('team-management')"> 编辑 </el-button>
|
|
<el-button @click="router.push('team-management')"> 编辑 </el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -18,7 +18,9 @@
|
|
|
import { useRouter } from 'vue-router';
|
|
import { useRouter } from 'vue-router';
|
|
|
import OrgChart from '../components/OrgChart.vue';
|
|
import OrgChart from '../components/OrgChart.vue';
|
|
|
import TeamDetailDrawer from './components/TeamDetailDrawer.vue';
|
|
import TeamDetailDrawer from './components/TeamDetailDrawer.vue';
|
|
|
|
|
+ import { useUserInfoHook } from '@/views/disaster/hooks';
|
|
|
import useTeamStore from './team-management/store/userTeam';
|
|
import useTeamStore from './team-management/store/userTeam';
|
|
|
|
|
+ import { EMERGENCY_PERMISSIONS } from '@/views/emergency/constant';
|
|
|
|
|
|
|
|
type OrganizationTreeType = {
|
|
type OrganizationTreeType = {
|
|
|
id: string;
|
|
id: string;
|
|
@@ -47,6 +49,9 @@
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
|
|
+ const showOperationBar = ref(false);
|
|
|
|
|
+
|
|
|
|
|
+ const { permissions } = useUserInfoHook();
|
|
|
const { getLeaderTeams } = useTeamStore();
|
|
const { getLeaderTeams } = useTeamStore();
|
|
|
|
|
|
|
|
const teamDetailDrawerRef = ref<InstanceType<typeof TeamDetailDrawer>>();
|
|
const teamDetailDrawerRef = ref<InstanceType<typeof TeamDetailDrawer>>();
|
|
@@ -79,6 +84,10 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
|
|
+ showOperationBar.value = Boolean(
|
|
|
|
|
+ permissions.find((item: { code: string }) => item.code === EMERGENCY_PERMISSIONS.ORGANIZATION_MANAGEMENT),
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
const res = await getLeaderTeams();
|
|
const res = await getLeaderTeams();
|
|
|
|
|
|
|
|
treeData.value = convertData(res);
|
|
treeData.value = convertData(res);
|