feat : 组织机构管理公司详情

This commit is contained in:
2024-07-15 00:02:58 +08:00
parent 04bbedf025
commit 5342a4d891
4 changed files with 68 additions and 1 deletions

View File

@@ -14,3 +14,9 @@ export const getDepartmentList=(params)=>{
params
})
}
export const getCompanyDetail=(companyId)=>{
return request({
url:`/admin/mosr/sub/company/info/${companyId}`,
method:'get'
})
}

View File

@@ -0,0 +1,49 @@
<template>
<baseTitle title="公司详情"></baseTitle>
<fv-Form :schema="schema" @getInstance="(e)=>form = e"></fv-Form>
</template>
<script setup>
import {getCompanyDetail} from "@/api/subsidiary";
const props=defineProps({
value:{
type:String,
default:''
}
})
const form = ref()
const schema = reactive([
{
label: '公司名称:',
prop: 'companyName',
},
{
label: '公司编码:',
prop: 'companyCode'
},
{
label: '创建时间:',
prop: 'createTime'
}
])
const emit = defineEmits(['update:value'])
const _value = computed({
get() {
return props.value;
},
set(value) {
emit('update:value', value)
}
})
const getInfo = async () => {
const { data } = await getCompanyDetail(_value.value)
form.value.setValues(data)
}
getInfo()
</script>
<style scoped>
</style>

View File

@@ -1,5 +1,5 @@
<template>
<baseTitle title="基础信息"></baseTitle>
<baseTitle title="部门详情"></baseTitle>
<fv-Form :schema="schema" @getInstance="(e)=>form = e"></fv-Form>
<UserPicker ref="usrPickershipIds" @ok="editshipIds"></UserPicker>
<UserPicker ref="usrPickerHeadIds" @ok="editheadIds"></UserPicker>

View File

@@ -37,6 +37,7 @@
<div class="layout-right">
<depart-component v-if="showDept" v-model:value="deptId"/>
<company-detail v-if="showCompany" v-model:value="companyId"></company-detail>
<!-- <department v-if="selectItem.type===2" :id="selectItem.value"></department>-->
</div>
</div>
@@ -48,13 +49,16 @@ import SvgIcon from '@/components/svgIcon/index.vue'
import {ElNotification} from "element-plus";
import {getOrganizationStructure} from "@/api/workflow/process-user";
import DepartComponent from "@/components/organizationalStructure/Department.vue";
import CompanyDetail from "@/components/organizationalStructure/CompanyDetail.vue";
const queryType = reactive({
chooseName: ""
});
const chooseId = ref(0);
const deptId = ref(0);
const companyId = ref(0);
const showDept = ref(false);
const showCompany = ref(false);
const organizationStructureType = ref(0);
let selectItem = reactive({
type: -1,
@@ -135,10 +139,18 @@ const handleChange = (item, data) => {
console.log('expandedKeys.value',expandedKeys.value)
if (item.type === 1) {
showDept.value = false
showCompany.value = false
nextTick(() => {
showDept.value = true
})
deptId.value = item.organizationalStructureId
}else{
showDept.value = false
showCompany.value = false
nextTick(() => {
showCompany.value = true
})
companyId.value=item.organizationalStructureId
}
selectItem = item;
if (isSearch.value) {