<template>
|
<create-view id="duplicate-check-container" :body-style="{ height: '100%'}">
|
<div class="container">
|
<div class="header">
|
客户查重
|
<img
|
class="close"
|
src="@/assets/img/task_close.png"
|
@click="hidenView" >
|
</div>
|
<el-tabs
|
v-model="tabActiveName"
|
class="content">
|
<check-content :type="crmType"/>
|
</el-tabs>
|
</div>
|
</create-view>
|
</template>
|
<script type="text/javascript">
|
import CreateView from '@/components/CreateView'
|
import CheckContent from './checkContent'
|
|
export default {
|
name: 'DuplicateCheck', // 验重页面
|
components: {
|
CreateView,
|
CheckContent
|
},
|
props: {
|
crmType: {
|
type: String,
|
default: ''
|
}
|
},
|
data () {
|
return {
|
tabActiveName: 'customer',
|
tabList: []
|
}
|
},
|
computed: {},
|
watch: {},
|
mounted () {
|
// 获取title展示名称
|
document.body.appendChild(this.$el)
|
if (this.crmType === 'customer') {
|
this.tabList.push(
|
{ label: '客户', name: 'customer' }
|
)
|
} else if (this.crmType === 'contacts') {
|
this.tabList.push(
|
{ label: '联系人', name: 'contacts' }
|
)
|
this.tabActiveName = 'contacts'
|
} else {
|
this.tabList = []
|
}
|
},
|
destroyed () {
|
// remove DOM node after destroy
|
if (this.$el && this.$el.parentNode) {
|
this.$el.parentNode.removeChild(this.$el)
|
}
|
},
|
methods: {
|
/**
|
* 关闭窗口
|
*/
|
hidenView () {
|
this.$emit('hiden-view')
|
}
|
}
|
}
|
</script>
|
<style lang="scss" scoped>
|
.container {
|
overflow: hidden;
|
height: 100%;
|
|
.header {
|
padding: 0 10px;
|
height: 40px;
|
line-height: 40px;
|
font-size: 17px;
|
color: #333;
|
position: relative;
|
|
.close {
|
float: right;
|
display: block;
|
width: 40px;
|
height: 40px;
|
margin-right: -10px;
|
padding: 10px;
|
cursor: pointer;
|
}
|
}
|
|
.content {
|
height: calc(100% - 40px);
|
position: relative;
|
overflow: hidden;
|
|
/deep/ .el-tabs__header {
|
padding: 10px 20px 0;
|
margin-bottom: 0;
|
|
.el-tabs__nav-wrap::after {
|
height: 1px;
|
}
|
}
|
|
/deep/ .el-tabs__content {
|
overflow: hidden;
|
height: calc(100% - 50px);
|
|
.el-tab-pane {
|
overflow: hidden;
|
height: 100%;
|
}
|
}
|
}
|
}
|
</style>
|