index.html
4.1 KB
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
<link rel="stylesheet" href="__CDN__/assets/addons/groupon/libs/element/element.css">
<link rel="stylesheet" href="__CDN__/assets/addons/groupon/libs/common.css">
<style>
#groupIndex {
background: #fff;
}
.status-normal {
color: #6ACAA5;
}
.status-hidden {
color: #C4C4C4;
}
[v-cloak] {
display: none
}
</style>
<script src="__CDN__/assets/addons/groupon/libs/vue.js"></script>
<script src="__CDN__/assets/addons/groupon/libs/element/element.js"></script>
<script src="__CDN__/assets/addons/groupon/libs/moment.js"></script>
<div id="groupIndex" v-cloak>
<div class="common-header-container">
<div>
用户分组
</div>
</div>
<div class="common-button-container">
<div class="common-refresh-button" @click="getData">
<i class="el-icon-refresh"></i>
</div>
<el-button type="primary" size="small" @click="operation('create',null)"><i class="el-icon-plus"></i> 新建分组
</el-button>
</div>
<div>
<div class="common-table-container">
<el-table ref="multipleTable" :data="data" tooltip-effect="dark" style="width: 100%" border
:row-class-name="tableRowClassName" :cell-class-name="tableCellClassName"
:header-cell-class-name="tableCellClassName" @row-dblclick="operation">
<el-table-column label="ID" prop="id" width="80">
</el-table-column>
<el-table-column label="组名" min-width="240">
<template slot-scope="scope">
<div class="ellipsis-item">
{{scope.row.name}}
</div>
</template>
</el-table-column>
<el-table-column label="更新时间" width="180">
<template slot-scope="scope">
<div>
{{moment(scope.row.updatetime*1000).format("YYYY-MM-DD HH:mm:ss")}}
</div>
</template>
</el-table-column>
<el-table-column label="状态" width="80">
<template slot-scope="scope">
<div class="display-flex">
<span v-if="scope.row.status=='normal'" class="display-flex">
<span class="common-status-dot common-status-normal-dot"></span>
<span class="common-status-normal">{{scope.row.status_text}}</span>
</span>
<span v-else class="display-flex">
<span class="common-status-dot common-status-default-dot"></span>
<span class="common-status-default">{{scope.row.status_text}}</span>
</span>
</div>
</template>
</el-table-column>
<el-table-column label="操作" min-width="130">
<template slot-scope="scope">
<div>
{if condition = "$auth->check('groupon/user/group/edit')"}
<span class="table-edit-text" @click="operation('edit',scope.row.id)">编辑</span>
{/if}
{if condition = "$auth->check('groupon/user/group/del')"}
<span class="table-delete-text" @click="operation('del',scope.row.id)">删除</span>
{/if}
</div>
</template>
</el-table-column>
</el-table>
</div>
<div class="common-pagination-container">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="limit"
layout="total, sizes, prev, pager, next, jumper" :total="totalPage">
</el-pagination>
</div>
</div>
</div>