|
@@ -14,6 +14,7 @@
|
|
|
<m-button type="orange" icon="el-icon-plus" @click="onAdd">新增</m-button>
|
|
|
</template>
|
|
|
<template #actions="{ row }">
|
|
|
+ <m-button type="primary" text @click="onDetails(row)">查看</m-button>
|
|
|
<m-button type="primary" text @click="onEdit(row)">编辑</m-button>
|
|
|
<m-button type="danger" text @click="onDelete(row)">删除</m-button>
|
|
|
</template>
|
|
@@ -23,7 +24,7 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
-// getAccumulatePointList,
|
|
|
+ getAccumulatePointRulesList
|
|
|
} from '@/api/accumulatePoint'
|
|
|
export default {
|
|
|
name: 'AccumulatePointRules',
|
|
@@ -43,8 +44,9 @@ export default {
|
|
|
name: null
|
|
|
},
|
|
|
headers: [
|
|
|
- { label: '名称', prop: 'name' },
|
|
|
- { label: '状态', prop: 'status' },
|
|
|
+ { label: '模块名称', prop: 'ruleCategory' },
|
|
|
+ { label: '积分最大值', prop: 'maxScore' },
|
|
|
+ { label: '创建时间', prop: 'createDate' },
|
|
|
{ label: '操作', prop: 'actions', fixed: 'right', width: 300 }
|
|
|
],
|
|
|
items: [],
|
|
@@ -53,6 +55,12 @@ export default {
|
|
|
current: 1,
|
|
|
size: 10
|
|
|
},
|
|
|
+ orders: [
|
|
|
+ {
|
|
|
+ column: 'create_date',
|
|
|
+ asc: false
|
|
|
+ }
|
|
|
+ ],
|
|
|
loading: false
|
|
|
}
|
|
|
},
|
|
@@ -63,9 +71,17 @@ export default {
|
|
|
async onInit () {
|
|
|
this.loading = true
|
|
|
try {
|
|
|
- // const { data } = await getAccumulatePointList()
|
|
|
- // this.items = data.records
|
|
|
- // this.total = data.total
|
|
|
+ const { data } = await getAccumulatePointRulesList({
|
|
|
+ page: {
|
|
|
+ ...this.pageInfo,
|
|
|
+ orders: this.orders
|
|
|
+ },
|
|
|
+ entity: {
|
|
|
+ ...this.searchValues
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.items = data.records
|
|
|
+ this.total = data.total
|
|
|
} catch (error) {
|
|
|
this.$message.error(error)
|
|
|
} finally {
|
|
@@ -78,6 +94,7 @@ export default {
|
|
|
onEdit (item) {
|
|
|
this.$refs.accumulatePointRefs.open(item)
|
|
|
},
|
|
|
+ onDetails () {},
|
|
|
onDelete (row) {
|
|
|
this.$confirm('确定删除吗?', '提示')
|
|
|
.then(async () => {
|