Files
foton-laws-system-front/src/components/CustomFormComponents/ProjectRelatedPersonnel.vue
T
2021-05-26 14:15:41 +08:00

86 lines
1.8 KiB
Vue

<template>
<div>
<el-button @click="handleBtnCLick">点击查看</el-button>
<el-drawer
ref="drawer"
title="项目相关成员"
:visible.sync="drawerVisible"
:wrapperClosable="false"
size="600px"
:destroy-on-close="true"
append-to-body
>
<div class="demo-drawer-content">
<project-related-personnel-tree
:value="valueCopy"
@input="handleValueUpdate"
></project-related-personnel-tree>
</div>
<div class="demo-drawer-footer">
<el-button class="common-button-primary" icon="el-icon-check" type="primary" @click="confirmDrawer('drawer')">确定</el-button>
<el-button class="common-button-default" icon="el-icon-close" @click="closeDrawer('drawer')">取消</el-button>
</div>
</el-drawer>
</div>
</template>
<script>
import ProjectRelatedPersonnelTree from '../ProjectRelatedPersonnel/index2'
export default {
name: 'ProjectRelatedPersonnel',
components: {
ProjectRelatedPersonnelTree
},
props: ['value'],
data() {
return {
drawerVisible: false,
valueCopy: []
}
},
watch: {
value(newValue, oldValue) {
this.valueCopy = newValue
}
},
methods: {
closeDrawer(name) {
this.$refs[name].closeDrawer()
},
confirmDrawer(name) {
this.$emit('input', this.valueCopy)
this.closeDrawer(name)
},
handleValueUpdate(value) {
this.valueCopy = value
},
handleBtnCLick() {
this.valueCopy = this.value
this.drawerVisible = true
}
},
created() {
this.valueCopy = this.value
}
}
</script>
<style lang="less" scoped>
.demo-drawer-content{
overflow-y: hidden;
}
::v-deep .el-drawer__header{
&>span:first-child{
outline: none!important;
}
}
::v-deep .el-drawer{
outline: none!important;
}
</style>