x-php-Admin/copy backup/template/list/son.vue

75 lines
2.4 KiB
Vue
Raw Normal View History

2023-06-07 10:48:30 +00:00
<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">
2023-07-10 16:41:24 +00:00
<xTable ref="table" :apiObj="list.apiObj" row-key="id" stripe highlightCurrentRow @row-click="rowClick">
2023-06-07 10:48:30 +00:00
<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>
2023-07-10 16:41:24 +00:00
</xTable>
2023-06-07 10:48:30 +00:00
</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">
2023-07-10 16:41:24 +00:00
<xTable ref="sontable" :apiObj="list.apiObj" row-key="id" stripe>
2023-06-07 10:48:30 +00:00
<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">
2023-07-10 16:41:24 +00:00
<x-status-indicator v-if="scope.row.type==0" type="success"></x-status-indicator>
<x-status-indicator v-if="scope.row.type==1" pulse type="danger"></x-status-indicator>
2023-06-07 10:48:30 +00:00
</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>
2023-07-10 16:41:24 +00:00
</xTable>
2023-06-07 10:48:30 +00:00
</el-main>
</el-container>
</el-container>
</template>
<script>
export default {
name: 'listSon',
data() {
return {
list: {
2023-06-11 14:57:10 +00:00
apiObj: this.$api.demo.list
2023-06-07 10:48:30 +00:00
},
}
},
methods: {
rowClick(row){
var params = {
groupId: row.id
}
this.$refs.sontable.reload(params)
}
}
}
</script>
<style>
</style>