This commit is contained in:
shijingjing
2022-08-17 18:46:03 +08:00
parent 0df75a6dfa
commit 78d6d9d52d
3 changed files with 8 additions and 14 deletions

View File

@@ -20,6 +20,8 @@
</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="page.total" :current.sync="current" :size.sync="page.size"
@getList="getTableData()" :col-configs="colConfigs" :dict="dict" @sort-change="changeTableSort"> @getList="getTableData()" :col-configs="colConfigs" :dict="dict" @sort-change="changeTableSort">
<el-table-column slot="options" label="操作" align="center"> <el-table-column slot="options" label="操作" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" @click="changeIntegral(row,1)">调整积分</el-button> <el-button type="text" @click="changeIntegral(row,1)">调整积分</el-button>
@@ -163,7 +165,6 @@ export default {
} }
}, },
changeIntegral(row,type) { changeIntegral(row,type) {
console.log(row);
if(type==0) { if(type==0) {
this.dialog = true this.dialog = true
} else if(type ==1) { } else if(type ==1) {

View File

@@ -16,10 +16,10 @@
@getList="getList()"> @getList="getList()">
<el-table-column slot="integral" label="分值" align="center"> <el-table-column slot="integral" label="分值" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span v-if="row.integralValueType == 1"> <!-- <span v-if="row.integralValueType == 1">
{{ row.integralStart > 0 ? "+" + row.integralStart : row.integralStart }}~{{ row.integralEnd > 0 ? "+" + row.integralEnd : row.integralEnd }} {{ row.integralStart > 0 ? "+" + row.integralStart : row.integralStart }}~{{ row.integralEnd > 0 ? "+" + row.integralEnd : row.integralEnd }}
</span> </span> -->
<span v-else>{{ row.integral > 0 ? "+" : "" }}{{ row.integral }}</span> <span>{{ row.integral > 0 ? "+" : "" }}{{ row.integral }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column slot="options" label="操作" align="center" fixed="right" width="200"> <el-table-column slot="options" label="操作" align="center" fixed="right" width="200">
@@ -247,7 +247,6 @@ export default {
"integralRuleEvent", "integralRuleEventType").then(() => { "integralRuleEvent", "integralRuleEventType").then(() => {
this.getList(); this.getList();
this.getRulesList(); this.getRulesList();
// this.getList12()
}); });
}, },
methods: { methods: {
@@ -318,13 +317,6 @@ export default {
}); });
}); });
}, },
onReset() {
this.page.current = 1;
this.search.classification = "";
this.search.integralType = "";
this.search.ruleStatus = "";
this.getList();
},
onConfirm() { onConfirm() {
this.$refs.DialogForm.validate((valid) => { this.$refs.DialogForm.validate((valid) => {
if (valid) { if (valid) {
@@ -338,8 +330,9 @@ export default {
this.$message.success( this.$message.success(
`${this.isEdit ? "编辑成功" : "添加成功"}` `${this.isEdit ? "编辑成功" : "添加成功"}`
); );
this.onReset();
this.dialog = false; this.dialog = false;
this.getList();
this.closed();
} }
}); });
} else { } else {

View File

@@ -86,7 +86,7 @@
</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>{{ row.integralCalcType == 1 ? '+' : '-' }}{{ row.changeIntegral }}</span> <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">