fix : 文件表格高度, 组织机构管理
This commit is contained in:
@@ -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