田源
2023-04-14 6c4d4b494ef9c8fb134ece79e3993038a0358639
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
<template>
  <basic-container>
    <avue-crud ref="crud"
               v-model="form"
               :data="data"
               :option="option"
               @on-load="getList"
               @refresh-change="refreshChange"
               @search-change="searchChange"
               @current-row-change="handleCurrentRowChange"
    >
    </avue-crud>
  </basic-container>
</template>
 
<script>
export default {
  name: "originalLink.vue",
  data(){
    return {
 
      data:[
        {
          name:"链接测试1",
        },
        {
          name:"链接测试2",
        },
        {
          name:"链接测试3",
        },
        {
          name:"链接测试4",
        },
      ],
      form:{},
      option:{
        highlightCurrentRow:true,
        height:300,
        headerAlign:'center',
        align: 'center',
        border: true,
        menu: false,
        index: true,
        searchMenuSpan:6,
        searchSpan:10,
        addBtn:false,
        indexFixed:false,
        menuFixed:false,
        searchLabelWidth:130,
        column:[
          {
            label:"链接类型名",
            prop:"name",
            search:true,
 
          }
        ]
      }
    }
  },
  methods:{
    handleCurrentRowChange(row){
      this.$emit("rowLinkchange",row)
    },
    // getList () {
    //   this.loading = true;
    //   const data = Object.assign({
    //     pageNum: this.page.currentPage,
    //     pageSize: this.page.pageSize,
    //   }, this.params)
    //   this.data = [];
    //   getList(data).then(res => {
    //     const data = res.data.data
    //     this.loading = false;
    //     this.page.total = data.total;
    //     const result = data.list;
    //     this.data = result;
    //   })
    // },
    //搜索
    searchChange(params, done) {
      if (done) done();
      this.params = params;
      this.page.currentPage = 1;
      this.getList();
      this.$message.success('搜索成功')
    },
  }
}
</script>
 
<style scoped>
 
</style>