fix : 文件表格高度, 组织机构管理
This commit is contained in:
@@ -29,3 +29,11 @@ export function getMosrUser(params) {
|
||||
params:params
|
||||
})
|
||||
}
|
||||
|
||||
export function getOrganizationStructure(params) {
|
||||
return request({
|
||||
url: '/admin/organizational/structure/choose',
|
||||
method: 'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
<el-form-item label="其他文件" label-width="125">
|
||||
<file-upload @getFile="getOtherFile"/>
|
||||
<!-- <el-card style="width: 100%;box-shadow: none">-->
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable" height="300" :tableConfig="tableConfig"
|
||||
<fvTable style="width: 100%;max-height: 162px;" v-if="showTable" height="162" :tableConfig="tableConfig"
|
||||
:data="allFileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
<!-- </el-card>-->
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<el-form :label-position="labelAlign">
|
||||
<el-form-item :label="title?'其他文件':''" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign" :label-width="title?95:''">
|
||||
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="processViewer" height="300" :tableConfig="tableConfig"
|
||||
<fvTable style="width: 100%;max-height: 162px;" v-if="processViewer" height="162" :tableConfig="tableConfig"
|
||||
:data="_value" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-form :model="localFormData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="title==='apply'">
|
||||
<el-form-item label="项目负责人" :required="true" prop="projectChargePerson"
|
||||
<el-form-item label="项目负责人" :required="true" prop="projectChargePerson" :rules="projectChargePersonUserList.length !== 0 ?'1':rules.projectChargePerson"
|
||||
label-width="125">
|
||||
<el-button style="margin-right: 10px" color="#DED0B2" @click="handleShowProjectChargePersonTable">
|
||||
<!-- {{ localFormData.projectChargePerson ? '更改' : '请选择' }}-->
|
||||
@@ -32,13 +32,13 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125">
|
||||
<el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px">
|
||||
{{ localFormData.preProcess ? '更改' : '请选择' }}
|
||||
</el-button>
|
||||
<div v-for="item in localFormData.preProcess" :key="item.requestId">
|
||||
<a :href="item.baseUrl" target="_blank"
|
||||
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ item.requestName }}</a>
|
||||
</div>
|
||||
<el-button color="#DED0B2" @click="handleShowPreTable">
|
||||
{{ localFormData.preProcess ? '更改' : '请选择' }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -69,8 +69,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" v-if="mode === 'submit'" @click="handleSubmit">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else-if="mode === 'resubmit'" @click="handleSubmit">重新提交</el-button>
|
||||
<el-button color="#DED0B2" v-if="mode === 'submit'" @click="handleSubmit(formRef)">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else-if="mode === 'resubmit'" @click="handleSubmit(formRef)">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
<el-dialog title="前置流程" v-model="showPreTable" width="80%">
|
||||
@@ -135,7 +135,7 @@ import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const changeDiagram = ref(false)
|
||||
const preProcessTable = ref()
|
||||
const formRef = ref()
|
||||
const showSingleTable = ref(false)
|
||||
const projectChargePersonUserList = ref([])
|
||||
const projectChargePersonUserPicker = ref()
|
||||
@@ -257,6 +257,8 @@ const handleShowProjectChargePersonTable = () => {
|
||||
projectChargePersonUserPicker.value.showUserPicker()
|
||||
}
|
||||
const projectChargePersonUserPickerOk = (userList) => {
|
||||
console.log('dsfsdfs',formRef.value,formRef.value?.validateField('projectChargePerson'))
|
||||
|
||||
projectChargePersonUserList.value = userList
|
||||
}
|
||||
const handleShowProjectPersonTable = () => {
|
||||
@@ -374,93 +376,104 @@ const getFileParam = (item) => {
|
||||
tag: item.tag
|
||||
}
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
if (deploymentData.value.deploymentName === '重大项目立项' || deploymentData.value.deploymentName === '重大项目验收') {
|
||||
if (localFormData.value.preProcess === undefined) {
|
||||
const handleSubmit = async (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid) => {
|
||||
if (!valid) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请选择前置流程!',
|
||||
message: '请完善数据,再提交!',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (deploymentData.value.deploymentName === '重大项目立项' || deploymentData.value.deploymentName === '重大项目验收') {
|
||||
if (localFormData.value.preProcess === undefined) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请选择前置流程!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
let files = []
|
||||
if (props.mode === 'resubmit') {
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
} else {
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let projectPersonIds = []
|
||||
for (const item of projectPersonUserList.value) {
|
||||
projectPersonIds.push(parseInt(item.id))
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: attachment.value.singleFile,
|
||||
projectId: projectId.value,
|
||||
preProcess: JSON.stringify(localFormData.value.preProcess)
|
||||
}
|
||||
console.log(params)
|
||||
let res
|
||||
if (props.step === '20') {
|
||||
params.projectChargePerson = parseInt(projectChargePersonUserList.value[0].id)
|
||||
params.projectPersonIds = projectPersonIds
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitApply(params)
|
||||
} else {
|
||||
res = await projectApply(params)
|
||||
}
|
||||
} else if (props.step === '40') {
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitCheck(params)
|
||||
} else {
|
||||
res = await projectCheck(params)
|
||||
}
|
||||
} else if (props.step === '50') {
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitConclusion(params)
|
||||
} else {
|
||||
res = await projectConclusion(params)
|
||||
}
|
||||
}
|
||||
}
|
||||
let files = []
|
||||
if (props.mode === 'resubmit') {
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
} else {
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let projectPersonIds = []
|
||||
for (const item of projectPersonUserList.value) {
|
||||
projectPersonIds.push(parseInt(item.id))
|
||||
}
|
||||
let params = {
|
||||
deploymentId: deploymentId.value,
|
||||
requirementId: route.query.id,
|
||||
fileList: files,
|
||||
singleFile: attachment.value.singleFile,
|
||||
projectId: projectId.value,
|
||||
preProcess: JSON.stringify(localFormData.value.preProcess)
|
||||
}
|
||||
console.log(params)
|
||||
let res
|
||||
if (props.step === '20') {
|
||||
params.projectChargePerson = parseInt(projectChargePersonUserList.value[0].id)
|
||||
params.projectPersonIds = projectPersonIds
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitApply(params)
|
||||
} else {
|
||||
res = await projectApply(params)
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
if (props.step === '20') {
|
||||
await router.push({
|
||||
name: 'Initiation'
|
||||
})
|
||||
} else if (props.step === '40') {
|
||||
await router.push({
|
||||
name: 'Implementation'
|
||||
})
|
||||
} else if (props.step === '50') {
|
||||
await router.push({
|
||||
name: 'Filing'
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if (props.step === '40') {
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitCheck(params)
|
||||
} else {
|
||||
res = await projectCheck(params)
|
||||
}
|
||||
} else if (props.step === '50') {
|
||||
if (props.mode === 'resubmit') {
|
||||
res = await resubmitConclusion(params)
|
||||
} else {
|
||||
res = await projectConclusion(params)
|
||||
}
|
||||
}
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
if (props.step === '20') {
|
||||
await router.push({
|
||||
name: 'Initiation'
|
||||
})
|
||||
} else if (props.step === '40') {
|
||||
await router.push({
|
||||
name: 'Implementation'
|
||||
})
|
||||
} else if (props.step === '50') {
|
||||
await router.push({
|
||||
name: 'Filing'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
const init = async () => {
|
||||
let id = projectId.value
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
<baseTitle title="关联项目"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height:300px" v-if="showTable" :tableConfig="projectTable"
|
||||
<fvTable style="width: 100%;max-height:162px" height="162" v-if="showTable" :tableConfig="projectTable"
|
||||
:data="formData.projects" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
@@ -41,10 +41,10 @@
|
||||
<baseTitle title="附件列表"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height: 300px;" height="300" v-if="showTable" :tableConfig="fileTable"
|
||||
<fvTable style="width: 100%;max-height: 162px;" height="162" v-if="showTable" :tableConfig="fileTable"
|
||||
:data="formData.files" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-card style="width: 100%">
|
||||
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" height="250" :tableConfig="tableConfig"
|
||||
<fvTable style="width: 100%;max-height: 162px" v-if="showTable" height="162" :tableConfig="tableConfig"
|
||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-card>
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
<baseTitle title="其他文件"></baseTitle>
|
||||
<el-card style="width: 100%;margin: 15px 0">
|
||||
<file-upload @getFile="getFiles"/>
|
||||
<fvTable style="width: 100%;max-height: 250px;height: 250px" height="250" v-if="showTable" :tableConfig="tableConfig"
|
||||
<fvTable style="width: 100%;max-height: 162px;height: 162px" height="162" v-if="showTable" :tableConfig="tableConfig"
|
||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-card>
|
||||
|
||||
154
src/components/organizationalStructure/Department.vue
Normal file
154
src/components/organizationalStructure/Department.vue
Normal file
@@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<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>
|
||||
<UserPicker ref="usrPickerDeputyIds" @ok="editdeputyIds"></UserPicker>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import UserPicker from '@/views/workflow/process/common/UserPicker.vue';
|
||||
import Ttsup from '@/views/system/department/components/ToolToShowUserPicker.vue'
|
||||
import {getInfoById,setDeptInfo} from '@/views/system/department/api'
|
||||
const props=defineProps({
|
||||
value:{
|
||||
type:String,
|
||||
default:''
|
||||
}
|
||||
})
|
||||
const form = ref()
|
||||
const usrPickershipIds = ref()
|
||||
const usrPickerHeadIds = ref()
|
||||
const usrPickerDeputyIds = ref()
|
||||
const departmentChargeLeadershipNames = ref()
|
||||
const departmentHeadNames = ref()
|
||||
const departmentalDeputyNames = ref()
|
||||
const departmentChargeLeadershipIds = ref()
|
||||
const departmentHeadIds = ref()
|
||||
const departmentalDeputyIds = ref()
|
||||
const schema = reactive([
|
||||
{
|
||||
label: '部门名字:',
|
||||
prop: 'departmentName',
|
||||
},
|
||||
{
|
||||
label: '部门标志:',
|
||||
prop: 'departmentMark'
|
||||
},
|
||||
{
|
||||
label: '部门分管领导:',
|
||||
prop: 'departmentChargeLeadershipIds',
|
||||
component: ()=><Ttsup modelValue={departmentChargeLeadershipNames.value} onClick={()=>{usrPickershipIds.value.showUserPicker()} } />
|
||||
},
|
||||
{
|
||||
label: '部门负责人:',
|
||||
prop: 'departmentHeadIds',
|
||||
component: ()=><Ttsup modelValue={departmentHeadNames.value} onClick={()=>{usrPickerHeadIds.value.showUserPicker()} } />
|
||||
},
|
||||
{
|
||||
label: '部门副职用户:',
|
||||
prop: 'departmentalDeputyIds',
|
||||
component: ()=><Ttsup modelValue={departmentalDeputyNames.value} onClick={()=>{departmentalDeputyIds.value.showUserPicker()} } />
|
||||
},
|
||||
{
|
||||
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 getInfoById(_value.value)
|
||||
const params = {
|
||||
createTime: data.createTime,
|
||||
departmentMark: data.departmentMark,
|
||||
departmentName: data.departmentName
|
||||
}
|
||||
departmentChargeLeadershipIds.value = data.departmentChargeLeadershipIds
|
||||
departmentHeadIds.value = data.departmentHeadIds
|
||||
departmentalDeputyIds.value = data.departmentalDeputyIds
|
||||
params.departmentChargeLeadershipIds = formatIdsToNames(data.departmentChargeLeadershipIds, data.departmentChargeLeadershipInfo, 'userId', 'nickName')
|
||||
departmentChargeLeadershipNames.value = params.departmentChargeLeadershipIds
|
||||
params.departmentHeadIds = formatIdsToNames(data.departmentHeadIds, data.departmentHeadInfo, 'userId', 'nickName')
|
||||
departmentHeadNames.value = params.departmentHeadIds
|
||||
params.departmentalDeputyIds = formatIdsToNames(data.departmentalDeputyIds, data.departmentalDeputyInfo, 'userId', 'nickName')
|
||||
departmentalDeputyNames.value = params.departmentalDeputyIds
|
||||
form.value.setValues(params)
|
||||
|
||||
}
|
||||
|
||||
getInfo()
|
||||
|
||||
const formatIdsToNames = (ids, infoList, key, viewKey) => {
|
||||
const resArr = []
|
||||
if(!ids?.length) return
|
||||
ids.forEach(item=>{
|
||||
infoList.forEach(v=>{
|
||||
item == v[key] && resArr.push(v[viewKey])
|
||||
})
|
||||
})
|
||||
return resArr.join(',')
|
||||
}
|
||||
|
||||
const editshipIds = (list) => {
|
||||
// console.log("🚀 ~ editshipIds ~ list:", list)
|
||||
const arr = list.map(item=>item.name)
|
||||
departmentChargeLeadershipIds.value = list.map(item=>item.id)
|
||||
departmentChargeLeadershipNames.value = arr.join(',')
|
||||
setDeptmentInfo({
|
||||
departmentChargeLeadershipIds: departmentChargeLeadershipIds.value,
|
||||
departmentalDeputyIds: departmentalDeputyIds.value,
|
||||
departmentHeadIds: departmentHeadIds.value
|
||||
})
|
||||
}
|
||||
|
||||
const editheadIds = (list) => {
|
||||
// console.log("🚀 ~ editshipIds ~ list:", list)
|
||||
const arr = list.map(item=>item.name)
|
||||
departmentHeadIds.value = list.map(item=>item.id)
|
||||
departmentHeadNames.value = arr.join(',')
|
||||
setDeptmentInfo({
|
||||
departmentChargeLeadershipIds: departmentChargeLeadershipIds.value,
|
||||
departmentalDeputyIds: departmentalDeputyIds.value,
|
||||
departmentHeadIds: departmentHeadIds.value
|
||||
})
|
||||
}
|
||||
|
||||
const editdeputyIds = (list) => {
|
||||
// console.log("🚀 ~ editshipIds ~ list:", list)
|
||||
const arr = list.map(item=>item.name)
|
||||
departmentalDeputyIds.value = list.map(item=>item.id)
|
||||
departmentalDeputyNames.value = arr.join(',')
|
||||
setDeptmentInfo({
|
||||
departmentChargeLeadershipIds: departmentChargeLeadershipIds.value,
|
||||
departmentalDeputyIds: departmentalDeputyIds.value,
|
||||
departmentHeadIds: departmentHeadIds.value
|
||||
})
|
||||
}
|
||||
|
||||
const setDeptmentInfo = async ({ departmentChargeLeadershipIds = [], departmentHeadIds = [], departmentalDeputyIds = []}) => {
|
||||
|
||||
const params = {
|
||||
departmentChargeLeadershipIds,
|
||||
departmentHeadIds,
|
||||
departmentalDeputyIds,
|
||||
departmentId: _value.value
|
||||
}
|
||||
const res = await setDeptInfo(params)
|
||||
// console.log(res.data);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
@@ -77,6 +77,7 @@ const tagsViewStore = useTagsView()
|
||||
const userInfo = ref({})
|
||||
const visitedP = ref(false)
|
||||
const accountList = ref([])
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
onMounted(() => {
|
||||
setUserInfo()
|
||||
@@ -113,8 +114,12 @@ const accountChange = (userId) => {
|
||||
visitedP.value = !visitedP.value
|
||||
authStore.userLogout()
|
||||
setToken(res.data)
|
||||
router.push('/')
|
||||
console.log('router',route)
|
||||
if(route.path!=='/'){
|
||||
|
||||
}
|
||||
location.reload()
|
||||
// router.push('/home')
|
||||
visitedP.value = false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -80,13 +80,15 @@
|
||||
type="textarea"
|
||||
placeholder="请输入征集说明"
|
||||
/>
|
||||
<baseTitle title="申请文件"></baseTitle>
|
||||
<file-upload v-if="checkFormPrem('fileList')" @getFile="getFile"/>
|
||||
<fvTable style="width: 100%;max-height: 300px;" height="300" v-if="showTable"
|
||||
<div style="display: flex;align-items: center">
|
||||
<baseTitle title="申请文件" style="margin-right: 10px"></baseTitle>
|
||||
<file-upload v-if="checkFormPrem('fileList')" @getFile="getFile"/>
|
||||
</div>
|
||||
<fvTable style="width: 100%;max-height: 162px;" height="162" v-if="showTable"
|
||||
:tableConfig="tableConfig" :data="formData.fileList"
|
||||
:isSettingCol="false" :pagination="false" perm="EDIT">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
<div class="approval-record">
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<baseTitle :title="getName()+'-上传附件'"></baseTitle>
|
||||
<el-card style="width: 100%;margin: 15px 0">
|
||||
<file-upload @getFile="getFile" />
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable" height="300" :tableConfig="tableConfig"
|
||||
<fvTable style="width: 100%;max-height: 162px;" v-if="showTable" height="162" :tableConfig="tableConfig"
|
||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-card>
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
<baseTitle title="其他文件"></baseTitle>
|
||||
<el-card style="width: 100%;margin: 15px 0">
|
||||
<file-upload @getFile="getFile" :disabled="!formData.tagName" :title="!formData.tagName?'请先选择/输入标签!':''"/>
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable" height="300" :tableConfig="tableConfig"
|
||||
<fvTable style="width: 100%;max-height: 162px;" v-if="showTable" height="162" :tableConfig="tableConfig"
|
||||
:data="fileList" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-card>
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
<baseTitle title="关联项目"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height:300px" v-if="showTable" :tableConfig="projectTable"
|
||||
<fvTable style="width: 100%;max-height:162px" height="162" v-if="showTable" :tableConfig="projectTable"
|
||||
:data="formData.projects" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
@@ -44,10 +44,10 @@
|
||||
<baseTitle title="附件列表"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height: 300px;" height="300" v-if="showTable" :tableConfig="fileTable"
|
||||
<fvTable style="width: 100%;max-height: 162px;" height="162" v-if="showTable" :tableConfig="fileTable"
|
||||
:data="formData.files" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
/>
|
||||
<baseTitle title="申请文件"></baseTitle>
|
||||
<file-upload @getFile="getFile"/>
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable"
|
||||
:tableConfig="tableConfig" height="300" :data="formData.files"
|
||||
<fvTable style="width: 100%;max-height: 162px;" v-if="showTable"
|
||||
:tableConfig="tableConfig" height="162" :data="formData.files"
|
||||
:isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
<div class="approval-record">
|
||||
|
||||
227
src/views/system/organizationalStructure/index.vue
Normal file
227
src/views/system/organizationalStructure/index.vue
Normal file
@@ -0,0 +1,227 @@
|
||||
<template>
|
||||
|
||||
<div class="layout">
|
||||
<div class="layout-left" style="width: 40%">
|
||||
<div class="candidate" v-loading="loading">
|
||||
<el-form :model="queryType" @submit.prevent="getList(1)">
|
||||
<el-form-item prop="dictName">
|
||||
<el-input v-model="queryType.chooseName" @change="getList(1)"
|
||||
clearable placeholder="输入公司或部门名称进行搜索">
|
||||
<template #append>
|
||||
<el-button @click="getList(1)">搜索</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-empty :image-size="100" description="似乎没有数据" v-show="dataList.length === 0"/>
|
||||
<el-scrollbar>
|
||||
<div class="tree scrollbar-dict">
|
||||
<el-tree :data="dataList" ref="tree" :props="defaultProps" empty-text="" node-key="value"
|
||||
:default-expanded-keys="expandedKeys" lazy accordion
|
||||
@node-click="handleChange" @node-expand="handleChange">
|
||||
<template #default="{ node, data }">
|
||||
<div class="tree-node">
|
||||
<div style="display: flex;align-items: center;padding: 3px 0">
|
||||
<el-icon v-if="data.type===0">
|
||||
<House/>
|
||||
</el-icon>
|
||||
<el-icon v-else-if="data.type===1" :color="data.matrix?'#67C23A':'#fa3534'">
|
||||
<FolderOpened/>
|
||||
</el-icon>
|
||||
{{ data.organizationalStructureName }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layout-right" style="margin-top: 15px;width:65%;margin-left: 0">
|
||||
<depart-component v-if="showDept" v-model:value="deptId"/>
|
||||
<!-- <department v-if="selectItem.type===2" :id="selectItem.value"></department>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getOrganizationStructure} from "@/api/workflow/process-user";
|
||||
import DepartComponent from "@/components/organizationalStructure/Department.vue";
|
||||
|
||||
const queryType = reactive({
|
||||
chooseName: ""
|
||||
});
|
||||
const chooseId = ref(0);
|
||||
const deptId = ref(0);
|
||||
const showDept = ref(false);
|
||||
const organizationStructureType = ref(0);
|
||||
let selectItem = reactive({
|
||||
type: -1,
|
||||
value: "0"
|
||||
});
|
||||
const loading = ref(false);
|
||||
const dataList = ref([]);
|
||||
const tree = ref([]);
|
||||
const isSearch = ref(false);
|
||||
const expandedKeys = ref([]);
|
||||
const defaultProps = {
|
||||
value: "value",
|
||||
label: "organizationalStructureName",
|
||||
children: "children",
|
||||
isLeaf: (data) => {
|
||||
// if (data.isLeaf) {
|
||||
// return true
|
||||
// }
|
||||
}
|
||||
};
|
||||
const emit = defineEmits();
|
||||
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("input", val);
|
||||
}
|
||||
});
|
||||
|
||||
const getList = (flag,type) => {
|
||||
let params = {}
|
||||
if (flag === 1) {
|
||||
isSearch.value = true;
|
||||
params = {
|
||||
chooseId: 0,
|
||||
type: 0,
|
||||
chooseName: queryType.chooseName
|
||||
}
|
||||
selectItem = {
|
||||
type: -1,
|
||||
value: "0"
|
||||
};
|
||||
} else {
|
||||
params = {
|
||||
chooseId: chooseId.value,
|
||||
type: organizationStructureType.value,
|
||||
chooseName: queryType.chooseName
|
||||
}
|
||||
}
|
||||
getOrganizationStructure(params).then(res => {
|
||||
if (selectItem.type === -1) {
|
||||
dataList.value = res.data;
|
||||
} else if (type=== 2) {
|
||||
selectItem.children = res.data;
|
||||
if (res.data.length === 0) {
|
||||
selectItem.isLeaf = true
|
||||
// selectItem.children = [{
|
||||
// type: 2
|
||||
// }
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const init = () => {
|
||||
selectItem = {
|
||||
type: -1,
|
||||
value: "0"
|
||||
};
|
||||
dataList.value = [];
|
||||
chooseId.value = 0;
|
||||
expandedKeys.value = [];
|
||||
queryType.chooseName = ""
|
||||
getList();
|
||||
};
|
||||
const handleChange = (item, data) => {
|
||||
if(item.type===1){
|
||||
showDept.value=false
|
||||
nextTick(()=>{
|
||||
showDept.value=true
|
||||
})
|
||||
deptId.value=item.organizationalStructureId
|
||||
}
|
||||
selectItem = item;
|
||||
if (isSearch.value) {
|
||||
queryType.chooseName = ""
|
||||
chooseId.value = item.organizationalStructureId;
|
||||
getList('',2);
|
||||
return;
|
||||
} else {
|
||||
//渲染子节点用户或部门及用户数据
|
||||
if (data.expanded) {
|
||||
if (expandedKeys.value.indexOf(item.value) === -1) {
|
||||
expandedKeys.value.push(item.value);
|
||||
organizationStructureType.value=item.type
|
||||
chooseId.value = item.organizationalStructureId;
|
||||
getList('',2);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
init()
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$containWidth: 480px;
|
||||
:deep(.tree) {
|
||||
.el-tree-node__content {
|
||||
height: 34px;
|
||||
|
||||
.tree-node {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
//.el-tree-node {
|
||||
// .is-leaf + .el-checkbox .el-checkbox__inner {
|
||||
// display: inline-block;
|
||||
// }
|
||||
//
|
||||
// .el-checkbox .el-checkbox__inner {
|
||||
// display: none;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
.footer {
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
||||
.candidate {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
width: $containWidth;
|
||||
//height: 80%;
|
||||
//border: 1px solid #e8e8e8;
|
||||
|
||||
:deep(.el-input) {
|
||||
height: 40px;
|
||||
|
||||
.el-input__inner, .el-input-group__append {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.el-scrollbar .el-scrollbar__wrap {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
float: right;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 16px;
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user