This commit is contained in:
shijingjing
2022-08-17 20:22:25 +08:00
parent 7e974c8de3
commit 371ec0c8dd

View File

@@ -70,24 +70,25 @@
v-throttle="() => {(current = 1), getTableData();}" /> v-throttle="() => {(current = 1), getTableData();}" />
</template> </template>
</ai-search-bar> </ai-search-bar>
<ai-table :tableData="tableData" :total="page.total" :current.sync="current" :size.sync="page.size" <ai-table :tableData="tableData" :total="total" :current.sync="current" :size.sync="size"
@getList="getTableData" :col-configs="colConfigs" :dict="dict"> @getList="getTableData" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="eventDesc" label='事件' align="center" width="400px" show-overflow-tooltip> <el-table-column slot="eventDesc" label='事件' align="center" width="400px" show-overflow-tooltip>
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span v-if="row.integralRuleId.length">{{ row.integralRuleName }}</span> <span v-if="row.integralRuleId">{{ row.integralRuleName }}</span>
<span v-else>{{ row.eventDesc }}</span> <span v-else>{{ row.eventDesc }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column slot="integralType" label="类型" align="center"> <el-table-column slot="integralType" label="类型" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span v-if="row.integralRuleId.length">{{ row.eventType }}</span> <span v-if="row.integralRuleId">{{ row.eventType }}</span>
<span v-else>{{ row.integralRuleName }}</span> <span v-else>{{ row.integralRuleName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column slot="changeIntegral" label="积分变动" align="center"> <el-table-column slot="changeIntegral" label="积分变动" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span v-if="row.integralType == 3">{{ row.changeIntegral | format }}</span> <!-- <span v-if="row.integralType == 3">{{ row.changeIntegral | format }}</span> -->
<span v-if="row.integralType == 0">{{ row.changeIntegral > 0 ? '-' : '+' }}{{ row.changeIntegral }}</span> <!-- v-if="row.integralType == 0" -->
<span>{{ row.changeIntegral > 0 ? '-' : '+' }}{{ row.changeIntegral }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column slot="options" label="操作" align="center"> <el-table-column slot="options" label="操作" align="center">
@@ -154,10 +155,8 @@ export default {
endTime: '', endTime: '',
}, },
girdIdArr:[], girdIdArr:[],
page: {
size: 10,
total: 0, total: 0,
}, size: 10,
current: 1, current: 1,
girdList: [], girdList: [],
time: [], time: [],
@@ -250,14 +249,15 @@ export default {
getTableData() { getTableData() {
this.instance.post('/app/appintegraluser/girdIntegralDetail',null,{ this.instance.post('/app/appintegraluser/girdIntegralDetail',null,{
params: { params: {
...this.page,
...this.search, ...this.search,
current: this.current current: this.current,
size: this.size,
total: this.total,
} }
}).then(res => { }).then(res => {
if(res?.data) { if(res?.data) {
this.tableData = res.data.records this.tableData = res.data.records
this.page.total = res.data.total this.total = res.data.total
} }
}) })
}, },