滚动条

This commit is contained in:
shijingjing
2022-08-11 16:49:51 +08:00
parent bad3028a83
commit 23c5d65e0f
3 changed files with 27 additions and 29 deletions

View File

@@ -17,7 +17,7 @@
</div> </div>
</div> </div>
</el-row> </el-row>
<!-- <el-row class="echertsBox" style="margin-bottom: 16px"> <el-row class="echertsBox" style="margin-bottom: 16px">
<div class="title"> <div class="title">
<h4>事件汇总</h4> <h4>事件汇总</h4>
<div class="timecSelect"> <div class="timecSelect">
@@ -26,9 +26,9 @@
</div> </div>
<div class="bar_Box"> <div class="bar_Box">
<div id="chartDom" style="height: 230px; width: 100%;"></div> <div id="chartDom" style="height: 230px; width: 100%;"></div>
<ai-empty v-if="false" style="height: 230px;"></ai-empty> <ai-empty v-if="false" style="height: 200px; width: 100%;"></ai-empty>
</div> </div>
</el-row> --> </el-row>
<ai-card> <ai-card>
<ai-title slot="title" title="余额变动明细"/> <ai-title slot="title" title="余额变动明细"/>
<template #content> <template #content>
@@ -46,6 +46,12 @@
</ai-search-bar> </ai-search-bar>
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" <ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
@getList="getTableData" :col-configs="colConfigs" :dict="dict"> @getList="getTableData" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="eventDesc" label="事件" align="center">
<template slot-scope="{ row }">
<span>{{ row.integralType == 3 ? row.integralRuleName : row.integralType == 0? row.eventDesc : '' }}</span>
</template>
</el-table-column>
</ai-table> </ai-table>
</template> </template>
</ai-card> </ai-card>
@@ -75,7 +81,6 @@ export default {
data: {}, data: {},
startTime: '', startTime: '',
endTime: '', endTime: '',
} }
}, },
props: { props: {
@@ -83,23 +88,17 @@ export default {
dict: Object, dict: Object,
permissions: Function, permissions: Function,
}, },
watch: {
timeList(newVal, oldVal) {
if(!newVal) {
// this.getList()
}
}
},
computed: { computed: {
colConfigs() { colConfigs() {
return [ return [
{ prop: "doTime", label: '时间', align: "left", width: "200px" }, { prop: "doTime", label: '时间', align: "left", width: "200px" },
{ prop: "integralType", label: '类型', align: "center", width: "180px", dict:"integralDetailType"}, { prop: "integralType", label: '类型', align: "center", width: "240px", dict:"integralDetailType"},
{ prop: "changeIntegral", label: '变动积分', align: "center",width: "200px",render: (h, { row }) => { { prop: "changeIntegral", label: '变动积分', align: "center",width: "200px",render: (h, { row }) => {
return h('span', {}, `${row.integralCalcType == 1 ? '+' : '-'}${row.changeIntegral}`) return h('span', {}, `${row.integralCalcType == 1 ? '+' : '-'}${row.changeIntegral}`)
}}, }},
{ prop: "nowIntegral", label: '剩余积分', align: "center",width: "200px" }, { prop: "nowIntegral", label: '剩余积分', align: "center",width: "200px" },
{ prop: "eventDesc", label: '事件', align: "center", }, { slot: "eventDesc", label: '事件', align: "center", },
] ]
} }
}, },
@@ -124,6 +123,7 @@ export default {
// 事件汇总 暂定 // 事件汇总 暂定
// 余额变动明细 // 余额变动明细
getIntegralChange() { getIntegralChange() {
this.instance.post(`/app/appintegraluser/getChangeDetail`, null, { this.instance.post(`/app/appintegraluser/getChangeDetail`, null, {
@@ -219,7 +219,7 @@ export default {
}, },
mounted() { mounted() {
// this.getColEcherts() this.getColEcherts()
}, },
destroyed () { destroyed () {
@@ -234,6 +234,7 @@ export default {
height: 100%; height: 100%;
padding: 0 20px; padding: 0 20px;
box-sizing: border-box; box-sizing: border-box;
overflow-y: scroll;
.card_list { .card_list {
display: flex; display: flex;
.card { .card {

View File

@@ -39,12 +39,12 @@
<el-table-column slot="options" label="操作" align="center" fixed="right" width="200"> <el-table-column slot="options" label="操作" align="center" fixed="right" width="200">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<div class="table-options"> <div class="table-options">
<el-button type="text" :disabled="!permissions('app_appvillagerintegralrule_edit')" @click="changeStatus(row.id, 0)" v-if="row.status == 1"> <el-button type="text" @click="changeStatus(row.id, 0)" v-if="row.status == 1">
停用 停用
</el-button> </el-button>
<el-button type="text" :disabled="!permissions('app_appvillagerintegralrule_edit')" @click="changeStatus(row.id, 1)" v-else>启用</el-button> <el-button type="text" @click="changeStatus(row.id, 1)" v-else>启用</el-button>
<el-button type="text" :disabled="!permissions('app_appvillagerintegralrule_edit')" @click="toEdit(row)">编辑</el-button> <el-button type="text" @click="toEdit(row)">编辑</el-button>
<el-button type="text" :disabled="!permissions('app_appvillagerintegralrule_del')" @click="remove(row.id)">删除</el-button> <el-button type="text" @click="remove(row.id)">删除</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@@ -120,9 +120,8 @@ export default {
{prop: "type", label: "类型", dict: "integralRuleEventType"}, {prop: "type", label: "类型", dict: "integralRuleEventType"},
{prop: "ruleType", label: "规则", dict: "integralRuleRuleType"}, {prop: "ruleType", label: "规则", dict: "integralRuleRuleType"},
{prop: "scoringCycle", label: "周期范围", dict: "integralRuleScoringCycle"}, {prop: "scoringCycle", label: "周期范围", dict: "integralRuleScoringCycle"},
// {prop: "", label: "积分分值", dict: "integralRuleScoringCycle"},
{slot: "integral",label: "积分分值", align: "center"}, {slot: "integral",label: "积分分值", align: "center"},
{prop: "", label: "有效范围", dict: "integralRuleScoringCycle"}, {prop: "validRangeType", label: "有效范围", dict: "integralRuleScoringCycle"},
{prop: "status", label: "状态", align: "center", width: 96, dict: "integralRuleStatus"}, {prop: "status", label: "状态", align: "center", width: 96, dict: "integralRuleStatus"},
{slot: "options", label: "操作", align: "center"}, {slot: "options", label: "操作", align: "center"},
], ],
@@ -145,7 +144,7 @@ export default {
}, },
methods: { methods: {
getList() { getList() {
this.instance.post(`/app/appvillagerintegralrule/list`, null, { this.instance.post(`/app/appintegralrule/list`, null, {
params: {...this.search, ...this.page}, params: {...this.search, ...this.page},
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
@@ -176,11 +175,9 @@ export default {
this.$confirm("删除后不可恢复,是否要删除该事项?", { this.$confirm("删除后不可恢复,是否要删除该事项?", {
type: 'error' type: 'error'
}).then(() => { }).then(() => {
this.instance this.instance.post(`/app/appintegralrule/delete?ids=${id}`).then((res) => {
.post(`/app/appvillagerintegralrule/delete?ids=${id}`)
.then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.$message.success("删除成功!"); this.$message.success("删除成功!")
this.getList(); this.getList();
} }
}); });
@@ -189,7 +186,7 @@ export default {
changeStatus(id, status) { changeStatus(id, status) {
let text = status == 1 ? '启用' : '停用' let text = status == 1 ? '启用' : '停用'
this.$confirm(`确定${text}该条规则?`).then(() => { this.$confirm(`确定${text}该条规则?`).then(() => {
this.instance.post(`/app/appvillagerintegralrule/enableOrDisable?id=${id}`).then((res) => { this.instance.post(`/app/appintegralrule/enableStatus?id=${id}`).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.$message.success(`${text}成功!`) this.$message.success(`${text}成功!`)
this.getList(); this.getList();
@@ -213,7 +210,7 @@ export default {
let formData = this.$copy(this.form) let formData = this.$copy(this.form)
formData.ladderRule = JSON.stringify(formData.ladderRule) formData.ladderRule = JSON.stringify(formData.ladderRule)
formData.integral = formData.integral || 0 formData.integral = formData.integral || 0
this.instance.post(`/app/appvillagerintegralrule/addOrUpdate`, formData).then((res) => { this.instance.post(`/app/appintegralrule/addOrUpdate`, formData).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.$message.success(`${this.isEdit ? '编辑成功' : '添加成功'}`) this.$message.success(`${this.isEdit ? '编辑成功' : '添加成功'}`)
this.onReset() this.onReset()

View File

@@ -224,9 +224,9 @@ export default {
} }
}).then((res) => { }).then((res) => {
if(res?.data) { if(res?.data) {
this.userSortListX = res.data.userSortList.map(e=> e.userName).reverse(); this.userSortListX = res.data.userSortList.map(e=> e.userName).reverse()
this.userSortListY = res.data.userSortList.map(e=> e.changeIntegral).reverse() this.userSortListY = res.data.userSortList.map(e=> e.changeIntegral).reverse()
this.girdSortListX = res.data.girdSortList.map(e=> e.girdName).reverse(); this.girdSortListX = res.data.girdSortList.map(e=> e.girdName).reverse()
this.girdSortListY = res.data.girdSortList.map(e=> e.changeIntegral).reverse() this.girdSortListY = res.data.girdSortList.map(e=> e.changeIntegral).reverse()
this.getColEcherts1(this.userSortListX,this.userSortListY) this.getColEcherts1(this.userSortListX,this.userSortListY)
this.getColEcherts2(this.girdSortListX,this.girdSortListY) this.getColEcherts2(this.girdSortListX,this.girdSortListY)