gaoshp
2024-06-03 6f1ac1da6b6cba5c74f2fb6be82f7e472c4116ee
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
<template>
    <el-container>
        <el-aside width="40%">
            <el-container>
                <el-header>
                    <div class="left-panel">
                        <el-button type="primary" icon="el-icon-plus"></el-button>
                        <el-button type="danger" plain icon="el-icon-delete"></el-button>
                    </div>
                </el-header>
                <el-main class="nopadding">
                    <scTable ref="table" :apiObj="list.apiObj" row-key="id" stripe highlightCurrentRow @row-click="rowClick">
                        <el-table-column type="selection" width="50"></el-table-column>
                        <el-table-column label="ID" prop="id" width="200"></el-table-column>
                        <el-table-column label="评分" prop="num" width="80"></el-table-column>
                        <el-table-column label="进度" prop="progress" width="250" sortable>
                            <template #default="scope">
                                <el-progress :percentage="scope.row.progress" />
                            </template>
                        </el-table-column>
                        <el-table-column label="创建日期" prop="datetime" width="150" sortable></el-table-column>
                    </scTable>
                </el-main>
            </el-container>
        </el-aside>
        <el-container>
            <el-header>
                <div class="left-panel">
                    <el-button type="primary" icon="el-icon-plus"></el-button>
                    <el-button type="danger" plain icon="el-icon-delete"></el-button>
                </div>
            </el-header>
            <el-main class="nopadding">
                <scTable ref="sontable" :apiObj="list.apiObj" row-key="id" stripe>
                    <el-table-column type="selection" width="50"></el-table-column>
                    <el-table-column label="姓名" prop="name" width="180"></el-table-column>
                    <el-table-column label="状态" prop="type" width="60">
                        <template #default="scope">
                            <sc-status-indicator v-if="scope.row.type==0" type="success"></sc-status-indicator>
                            <sc-status-indicator v-if="scope.row.type==1" pulse type="danger"></sc-status-indicator>
                        </template>
                    </el-table-column>
                    <el-table-column label="邮箱" prop="email" width="250"></el-table-column>
                    <el-table-column label="评分" prop="num" width="150"></el-table-column>
                    <el-table-column label="注册时间" prop="datetime" width="150" sortable></el-table-column>
                </scTable>
            </el-main>
        </el-container>
    </el-container>
</template>
 
<script>
    export default {
        name: 'listSon',
        data() {
            return {
                list: {
                    apiObj: this.$API.demo.list
                },
            }
        },
        methods: {
            rowClick(row){
                var params = {
                    groupId: row.id
                }
                this.$refs.sontable.reload(params)
            }
        }
    }
</script>
 
<style>
</style>