田源
2023-07-17 d7f731c2672c6af00065fcbd1c1164b8789442b8
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
<template>
<el-dialog :visible.sync="dialogPush" append-to-body  :close-on-click-modal="false"  @close="recoverPage" title="导出">
  <div style="margin-bottom: 10px">
    <el-radio-group v-model="radio">
      <el-radio :label="0">选择</el-radio>
      <el-radio :label="1">全部</el-radio>
      <el-radio :label="2">页码</el-radio>
    </el-radio-group>
  </div>
  <div style="text-align: center">
  <el-transfer
    style="text-align: left; display: inline-block"
    filterable
    :filter-method="filterMethod"
    filter-placeholder="请输入城市拼音"
    v-model="value"
    :data="data">
  </el-transfer>
  </div>
</el-dialog>
</template>
 
<script>
export default {
name: "MasterTransfer",
  props:['visible','tableHeadData'],
  data(){
    const generateData = () => {
      const data = [];
      const cities = ['上海', '北京', '广州', '深圳', '南京', '西安', '成都'];
      cities.forEach((city, index) => {
        data.push({
          label: city,
          key: index,
        });
      });
      return data;
    };
    return {
      data: generateData(),
      value: [],
      filterMethod(query, item) {
        return item.label.indexOf(query) > -1;
      },
      dialogPush:this.visible,
      radio:0,
      tableHeadFindData:[]
    };
  },
  watch:{
    //监听初始化
    visible (){
      this.dialogPush = this.visible;
    },
    tableHeadData(){
      this.tableHeadFindData=this.tableHeadData;
 
    }
  },
  computed:{
 
  },
  mounted() {
    console.log(this.tableHeadData)
  },
  methods:{
    //关闭页面
    recoverPage(){
      this.$emit('update:visible', false);
    }
  }
}
</script>
 
<style scoped lang="scss">
 
</style>