|
@@ -1,33 +1,23 @@
|
|
|
<template>
|
|
<template>
|
|
|
<el-drawer v-model="showDrawer" direction="rtl" @close="clearData">
|
|
<el-drawer v-model="showDrawer" direction="rtl" @close="clearData">
|
|
|
<div class="team-detail__info">
|
|
<div class="team-detail__info">
|
|
|
- <div class="team-detail__info__team-name">{{ teamAndPersonInfo?.teamName }}</div>
|
|
|
|
|
|
|
+ <div class="team-detail__info__team-name">{{ organization?.orgName }}</div>
|
|
|
<div class="team-detail__info__member-count">
|
|
<div class="team-detail__info__member-count">
|
|
|
- 共 <span>{{ teamAndPersonInfo?.memberCount || 0 }}</span> 人
|
|
|
|
|
|
|
+ 共 <span>{{ organization?.userNum || 0 }}</span> 人
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <div class="team-detail__level" v-for="level in levelAndPersonList" :key="level.positionLevel">
|
|
|
|
|
- <div class="team-detail__level__title">
|
|
|
|
|
- {{ level.title }}
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="team-detail__level__content">
|
|
|
|
|
- <div v-for="(person, index) in level.personList" :key="index">{{ person }}</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
<div class="team-detail__description">
|
|
<div class="team-detail__description">
|
|
|
<div class="team-detail__description__title"> 队伍职责 </div>
|
|
<div class="team-detail__description__title"> 队伍职责 </div>
|
|
|
- <div class="team-detail__description__content"> {{ teamAndPersonInfo?.description }} </div>
|
|
|
|
|
|
|
+ <div class="team-detail__description__content"> {{ organization?.depResp }} </div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-drawer>
|
|
</el-drawer>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { ref, watch } from 'vue';
|
|
import { ref, watch } from 'vue';
|
|
|
- import { queryEmergencyTeamDetail } from '@/api/emergency-organization/teams';
|
|
|
|
|
- import { TeamAndPersonInfoType } from '../team-management/type';
|
|
|
|
|
-
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ safetyOrgUserDetail,
|
|
|
|
|
+ } from '@/api/safety-organization-management';
|
|
|
const props = defineProps<{ selectedTeamId: number | null }>();
|
|
const props = defineProps<{ selectedTeamId: number | null }>();
|
|
|
|
|
|
|
|
type LevelAndPersonType = {
|
|
type LevelAndPersonType = {
|
|
@@ -35,43 +25,35 @@
|
|
|
title: string;
|
|
title: string;
|
|
|
personList: string[];
|
|
personList: string[];
|
|
|
};
|
|
};
|
|
|
|
|
+ interface OrganizationInfoType {
|
|
|
|
|
+ createdAt: Date;
|
|
|
|
|
+ createdBy: number;
|
|
|
|
|
+ depResp: string;
|
|
|
|
|
+ id: number;
|
|
|
|
|
+ isDeleted: number;
|
|
|
|
|
+ orgName: string;
|
|
|
|
|
+ parentId: number;
|
|
|
|
|
+ updatedAt: Date;
|
|
|
|
|
+ userNum: number;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
|
|
|
const showDrawer = ref(false);
|
|
const showDrawer = ref(false);
|
|
|
- const teamAndPersonInfo = ref<TeamAndPersonInfoType>();
|
|
|
|
|
- const levelAndPersonList = ref<LevelAndPersonType[]>([]);
|
|
|
|
|
|
|
+ const organization = ref<OrganizationInfoType>();
|
|
|
|
|
|
|
|
function drawerShow() {
|
|
function drawerShow() {
|
|
|
showDrawer.value = true;
|
|
showDrawer.value = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function clearData() {
|
|
function clearData() {
|
|
|
- teamAndPersonInfo.value = undefined;
|
|
|
|
|
- levelAndPersonList.value = [];
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 按照职位等级排序队伍人员
|
|
|
|
|
- function setLevelAndPerson() {
|
|
|
|
|
- const levelMap: { [key: number]: LevelAndPersonType } = {};
|
|
|
|
|
-
|
|
|
|
|
- teamAndPersonInfo.value?.personnelList.map((person) => {
|
|
|
|
|
- if (!(person.positionLevel in levelMap)) {
|
|
|
|
|
- levelMap[person.positionLevel] = { positionLevel: person.positionLevel, title: person.title, personList: [] };
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- levelMap[person.positionLevel].personList.push(person.realname);
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- for (let level in levelMap) {
|
|
|
|
|
- levelAndPersonList.value.push(levelMap[level]);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ organization.value = undefined;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
watch(
|
|
watch(
|
|
|
() => showDrawer.value,
|
|
() => showDrawer.value,
|
|
|
async () => {
|
|
async () => {
|
|
|
if (showDrawer.value) {
|
|
if (showDrawer.value) {
|
|
|
- teamAndPersonInfo.value = await queryEmergencyTeamDetail(props.selectedTeamId!);
|
|
|
|
|
- setLevelAndPerson();
|
|
|
|
|
|
|
+ organization.value = await safetyOrgUserDetail(props.selectedTeamId!);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
);
|
|
);
|
|
@@ -130,7 +112,7 @@
|
|
|
margin-top: 20px;
|
|
margin-top: 20px;
|
|
|
&__title {
|
|
&__title {
|
|
|
margin-bottom: 10px;
|
|
margin-bottom: 10px;
|
|
|
- font-size: 20px;
|
|
|
|
|
|
|
+ font-size: 16px;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
}
|
|
}
|
|
|
&__content {
|
|
&__content {
|