parent
31140f9318
commit
622bd47fa9
@ -1,6 +1,18 @@
|
|||||||
import { ResPage, Stage, Subject, Scheme, Structure } from "@/api/interface/index";
|
import { ResPage, Resource } from "@/api/interface/index";
|
||||||
import http from "@/api";
|
import http from "@/api";
|
||||||
|
|
||||||
export const getFileExtIcon = () => {
|
export const getFileExtIcon = () => {
|
||||||
return http.get(`/dsRes/res/getThumbs`);
|
return http.get(`/dsRes/res/getThumbs`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getUpladFileSignature = params => {
|
||||||
|
return http.get<any>(`/dsRes/res/getSignature`, params);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getResList = (params: Resource.ReqResourceParams) => {
|
||||||
|
return http.get<ResPage<Resource.ResResourceList>>(`/dsRes/res/getResourceBaseList`, params, { loading: false });
|
||||||
|
};
|
||||||
|
|
||||||
|
export const addResData = params => {
|
||||||
|
return http.post(`/dsRes/res/addResourceBase`, params, { loading: false });
|
||||||
|
};
|
||||||
|
@ -0,0 +1,44 @@
|
|||||||
|
.filter {
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 250px;
|
||||||
|
height: 100%;
|
||||||
|
padding: 15px;
|
||||||
|
margin-right: 10px;
|
||||||
|
.title {
|
||||||
|
margin: 0 0 15px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--el-color-info-dark-2);
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
}
|
||||||
|
.search {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 0 0 15px;
|
||||||
|
.el-icon {
|
||||||
|
cursor: pointer;
|
||||||
|
transform: rotate(90deg) translateY(-8px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-scrollbar {
|
||||||
|
:deep(.el-tree) {
|
||||||
|
height: 80%;
|
||||||
|
overflow: auto;
|
||||||
|
.el-tree-node__content {
|
||||||
|
height: 33px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:deep(.el-tree--highlight-current) {
|
||||||
|
.el-tree-node.is-current > .el-tree-node__content {
|
||||||
|
background-color: var(--el-color-primary);
|
||||||
|
.el-tree-node__label,
|
||||||
|
.el-tree-node__expand-icon {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.is-leaf {
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,108 @@
|
|||||||
|
<template>
|
||||||
|
<div class="main-box">
|
||||||
|
<div class="card filter">
|
||||||
|
<TreeFilter
|
||||||
|
label="structure_name"
|
||||||
|
id="structure_id"
|
||||||
|
title=""
|
||||||
|
:data="treeFilterData"
|
||||||
|
ref="treeFilterRef"
|
||||||
|
:default-value="initParam.structure_id"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="table-box"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive, onMounted } from "vue";
|
||||||
|
import TreeFilter from "@/components/TreeFilter/index.vue";
|
||||||
|
|
||||||
|
import { getStructureList, getStageList, getSubjectList, getSchemeList } from "@/api/modules/base";
|
||||||
|
import { getResList } from "@/api/modules/res";
|
||||||
|
|
||||||
|
const treeFilterData = ref<any>([]);
|
||||||
|
|
||||||
|
const initParam = reactive({ structure_id: "367554" });
|
||||||
|
|
||||||
|
const getSchemeTree = async (scheme_id: number = 500124397) => {
|
||||||
|
// const { data } = await getStructureList({ scheme_id });
|
||||||
|
const data = [
|
||||||
|
{
|
||||||
|
structure_id: "1",
|
||||||
|
structure_name: "华东分部",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
structure_id: "11",
|
||||||
|
structure_name: "研发部"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
structure_id: "12",
|
||||||
|
structure_name: "市场部"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
structure_id: "13",
|
||||||
|
structure_name: "商务部"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
structure_id: "14",
|
||||||
|
structure_name: "财务部"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
structure_id: "2",
|
||||||
|
structure_name: "华南分部",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
structure_id: "21",
|
||||||
|
structure_name: "研发部"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
structure_id: "22",
|
||||||
|
structure_name: "市场部"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
structure_id: "23",
|
||||||
|
structure_name: "商务部"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
structure_id: "24",
|
||||||
|
structure_name: "财务部"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
structure_id: "3",
|
||||||
|
structure_name: "西北分部",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
structure_id: "31",
|
||||||
|
structure_name: "研发部"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
structure_id: "32",
|
||||||
|
structure_name: "市场部"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
structure_id: "33",
|
||||||
|
structure_name: "商务部"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
structure_id: "34",
|
||||||
|
structure_name: "财务部"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
treeFilterData.value = data;
|
||||||
|
initParam.structure_id = data[0].structure_id.toString();
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getSchemeTree();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
@import "./index.scss";
|
||||||
|
</style>
|
Loading…
Reference in new issue