renkang
2025-01-24 d492850f1cc64ddcfaf43798af9c76c2505414fd
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
<template>
    <GlobalWindow
        :title="title"
        :withFooter="false"
        :visible.sync="visible"
        width="100%">
        <div class="main">
            <div class="title">账单信息</div>
            <div class="list">
                <el-tag type="info" size="medium" effect="plain" style="margin-right: 10px; cursor: pointer;" @click="copy(item.title)" v-for="(item, index) in billTempList" :key="index">{{item.title}}</el-tag>
            </div>
            <div class="title">合同信息</div>
            <div class="list">
                <el-tag type="info" size="medium" effect="plain" style="margin-right: 10px; cursor: pointer;" @click="copy(item.title)" v-for="(item, index) in contractTempList" :key="index">{{item.title}}</el-tag>
            </div>
            <div class="title">其他信息</div>
            <div class="list">
                <el-tag type="info" size="medium" effect="plain" style="margin-right: 10px; cursor: pointer;" @click="copy(item.title)" v-for="(item, index) in otherTempList" :key="index">{{item.title}}</el-tag>
            </div>
        </div>
    </GlobalWindow>
</template>
 
<script>
  import GlobalWindow from '@/components/common/GlobalWindow'
  import BaseOpera from '@/components/base/BaseOpera'
  import { getCallTemp } from '@/api/ywTempConfig'
  export default {
    name: "templateKeywords",
    components: { GlobalWindow },
    extends: BaseOpera,
    data() {
      return {
        billTempList: [],
        contractTempList: [],
        otherTempList: []
      }
    },
    created () {
      this.getCallTempVal()
    },
    methods: {
      open (title) {
        this.title = title
        this.visible = true
      },
      getCallTempVal() {
        getCallTemp({})
          .then(res => {
            this.billTempList = res.billTempList
            this.contractTempList = res.contractTempList
            this.otherTempList = res.otherTempList
          })
      },
      copy(val) {
        this.$copyText(val).then(
          (e) => {
            this.$message.success('复制成功!')
          },
          (err) => {
            this.$message.error('复制成功!')
          }
        );
      }
    }
  }
</script>
 
<style lang="scss" scoped>
    @import '@/assets/style/variables.scss';
    .main {
        padding-top: 20px;
        box-sizing: border-box;
        .title {
            font-weight: 500;
            font-size: 18px;
            color: $primary-color;
            margin-bottom: 15px;
        }
        
        .list {
            display: flex;
            flex-wrap: wrap;
            border-radius: 2px;
            margin-bottom: 30px;
        }
    }
</style>