Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
851673013@qq.com 2022-06-28 10:40:56 +08:00
commit be36fc8631
3 changed files with 196 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,5 +1,26 @@
<template> <template>
<div class='container'>
<div class='container-left'>
<div class='left-search'>
<div> <div>
<input type="text" class='input-style' placeholder="请输入部门关键词" v-model="inputTxt">
<div class='input-search' @click='searchBtn'>
<img src="@/assets/img/搜索.png" style='margin-top:7px;margin-left:16px' >
</div>
</div>
</div>
<el-tree
class='tree-style'
:data="treeData"
:props="defaultProps"
accordion
@node-click="handleNodeClick">
<span slot-scope="{ node }" class='tree-text-style'>
<img src="@/assets/img/一级图标.png" style="width: 16px; height: 16px" />
{{ node.label }}
</span>
</el-tree>
</div>
<el-card shadow="never" class="aui-card--fill" v-if='homeIsShow'> <el-card shadow="never" class="aui-card--fill" v-if='homeIsShow'>
<div class="mod-demand__bsdemand"> <div class="mod-demand__bsdemand">
<div class='top-box'> <div class='top-box'>
@ -79,21 +100,18 @@
<div class="block"> <div class="block">
<el-pagination <el-pagination
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="getALLTree"
:current-page="currentPage4" :current-page="currentPage4"
:page-sizes="[10, 20, 30, 40]" :page-sizes="[10, 20, 30, 40]"
layout="total, prev, pager, next, jumper" layout="total, prev, pager, next, jumper"
:total="40"> :total="50">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</el-card> </el-card>
<component-services v-if='servicesIsShow' ></component-services> <component-services v-if='servicesIsShow' ></component-services>
<application-resources v-if='resourcesIsShow'></application-resources> <application-resources v-if='resourcesIsShow'></application-resources>
</div> </div>
</template> </template>
<script> <script>
import componentServices from './componentServices.vue' import componentServices from './componentServices.vue'
@ -102,6 +120,46 @@ export default {
components:{componentServices,applicationResources}, components:{componentServices,applicationResources},
data(){ data(){
return{ return{
inputTxt:'',
treeData: [{
label: '一级 1',
children: [{
label: '二级 1-1',
children: [{
label: '三级 1-1-1'
}]
}]
}, {
label: '一级 2',
children: [{
label: '二级 2-1',
children: [{
label: '三级 2-1-1'
}]
}, {
label: '二级 2-2',
children: [{
label: '三级 2-2-1'
}]
}]
}, {
label: '一级 3',
children: [{
label: '二级 3-1',
children: [{
label: '三级 3-1-1'
}]
}, {
label: '二级 3-2',
children: [{
label: '三级 3-2-1'
}]
}]
}],
defaultProps: {
children: 'children',
label: 'name'
},
choseId:null, choseId:null,
departmentId:1, departmentId:1,
currentPage4: 4, currentPage4: 4,
@ -154,8 +212,77 @@ export default {
}, },
] ]
} }
},
created(){
this.getALLTree()
}, },
methods: { methods: {
//
searchBtn(){
this.getALLTree()
},
//
handleNodeClick(data) {
console.log(data.name);
this.getTreeName(data)
},
handleCurrentChange(val){
this.getALLTree(val)
},
getTreeName (data) {
this.$http.get('/census/center/v3/treeList/' ,{
params : {
keywords:data.name,
deptId:'1067246875800000066',
// pageNo: pageNo || 1,
// pageSize: 20
}
}).then(res => {
this.tableData =res.data.data
})
},
//
getALLTree () {
this.$http.get('/census/center/v3/treeList/' ,{
params : {
keywords:this.inputTxt,
deptId:'1067246875800000066',
// pageNo: pageNo || 1,
// pageSize: 20
}
}).then(res => {
this.treeData =res.data.data
this.tableData =res.data.data
})
},
//
getFirstTree () {
this.$http.get('/census/center/v3/resourceReleaseDetails/' ,{
params : {
limit:100,
page:1,
id:null,
resourceType:'资源类型'
}
}).then(res => {
this.tableData =res.data.data
})
},
// 使
getSecondTree () {
this.$http.get('/census/center/v3/resourceUsedDetails/' ,{
params : {
keywords:'',
deptId:'1067246875800000066',
}
}).then(res => {
this.tableData =res.data.data
console.log('2222',this.tableData)
})
},
handleClick(row) { handleClick(row) {
console.log(row); console.log(row);
}, },
@ -174,6 +301,12 @@ export default {
//or使 //or使
handleChose(index){ handleChose(index){
this.departmentId=index this.departmentId=index
if(index===1){
this.getFirstTree()
}
else{
this.getSecondTree()
}
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {
@ -187,6 +320,55 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container{
display: flex;
}
.container-left{
width:250px;
height:1000px;
// background-color: #ffffff;
margin-right:10px
}
.left-search{
width:250px;
height:76px;
background-color: #ffffff;
}
.input-style{
width:210px;
height:36px;
margin:20px 20px;
padding-left: 20px;
border-radius: 18px;
border:1px solid transparent;
background-color: #f2f4fa;
}
input::placeholder {
font-weight: 400;
font-size: 14px;
color: #b0b3ca;
}
.input-search{
width:44px;
height:30px;
background-color: #ffffff;
position: absolute;
border-radius: 15px;
top:38px;
left:196px;
}
::v-deep.tree-style {
.el-tree-node__label{
font-size:16px;
}
.el-tree-node__content{
width:240px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.top-box{ .top-box{
height:80px; height:80px;
background-color: #fafafc; background-color: #fafafc;
@ -247,4 +429,9 @@ export default {
.departmentStyle{ .departmentStyle{
color:#526aff color:#526aff
} }
::v-deep .tree-text-styleJ{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style> </style>