zjf
2023-03-08 92b359a6458fb985b78431e0a2f54b548e01b1ca
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<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>