feat : 组织机构管理公司详情
This commit is contained in:
@@ -14,3 +14,9 @@ export const getDepartmentList=(params)=>{
|
||||
params
|
||||
})
|
||||
}
|
||||
export const getCompanyDetail=(companyId)=>{
|
||||
return request({
|
||||
url:`/admin/mosr/sub/company/info/${companyId}`,
|
||||
method:'get'
|
||||
})
|
||||
}
|
||||
|
||||
49
src/components/organizationalStructure/CompanyDetail.vue
Normal file
49
src/components/organizationalStructure/CompanyDetail.vue
Normal 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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user