<!--
|
* @Date: 2024-04-09 22:18:47
|
* @LastEditors: Sneed
|
* @LastEditTime: 2024-04-09 22:52:11
|
* @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/system/component-classification.vue
|
* 分类维护
|
-->
|
<template>
|
<el-container>
|
<el-header style="justify-content: flex-start;">
|
<el-button type="primary">新增</el-button>
|
<el-button type="danger">删除</el-button>
|
</el-header>
|
<el-main>
|
<el-table ref="multipleTableRef" :data="tableData" border style="width: 100%" class="multipleTableRef" @selection-change="handleSelectionChange" row-key="id" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
|
<el-table-column type="selection" width="55" />
|
<el-table-column prop="name" label="分类名称" />
|
<el-table-column prop="icon" label="分类图标">
|
</el-table-column>
|
<el-table-column prop="type" label="分类编号" />
|
<el-table-column prop="orderNum" label="排列顺序" />
|
<el-table-column prop="status" label="状态">
|
<template #default="scope">
|
<span>{{scope.row.status === 1 ? '启用' : '停用'}}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="操作" fixed="right" align="left" width="160">
|
<template #default="scope">
|
<el-button-group>
|
<el-button text type="primary" size="small"
|
@click="table_edit(scope.row, scope.$index)">编辑</el-button>
|
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index, '0')">
|
<template #reference>
|
<el-button text type="primary" size="small">删除</el-button>
|
</template>
|
</el-popconfirm>
|
</el-button-group>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-main>
|
</el-container>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
tableData: []
|
}
|
},
|
created () {
|
this.queryList()
|
},
|
methods: {
|
queryList () {
|
this.$API.setting.getList.get().then(res => {
|
console.log(res)
|
this.tableData = res.data
|
})
|
},
|
table_edit() {
|
|
},
|
table_del() {
|
|
},
|
handleSelectionChange () {
|
|
}
|
},
|
}
|
</script>
|
|
<style lang="scss" scoped></style>
|