This commit is contained in:
yanran200730
2022-08-12 09:47:41 +08:00
5 changed files with 43 additions and 51 deletions

View File

@@ -17,7 +17,7 @@
</div>
</div>
</el-row>
<!-- <el-row class="echertsBox" style="margin-bottom: 16px">
<el-row class="echertsBox" style="margin-bottom: 16px">
<div class="title">
<h4>事件汇总</h4>
<div class="timecSelect">
@@ -26,26 +26,32 @@
</div>
<div class="bar_Box">
<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>
</el-row> -->
</el-row>
<ai-card>
<ai-title slot="title" title="余额变动明细"/>
<template #content>
<ai-search-bar>
<template #left>
<ai-select v-model="search.type" placeholder="请选择类型" @change="page.current=1,getIntegralChange()"
:selectList="dict.getDict('integralDetailType')"/>
<ai-select v-model="search.type" placeholder="请选择类型" @change="search.current=1,getIntegralChange()"
:selectList="dict.getDict('integralType')"/>
</template>
<template #right>
<ai-download :instance="instance" url="" :params="search" fileName="网格员积分"
<ai-download :instance="instance" :url="`/app/appintegraluser/changeIntegralExport?id=${$route.query.id}`" :params="search" fileName="网格员余额变动明细"
:disabled="tableData.length == 0">
<el-button size="small">导出</el-button>
</ai-download>
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
<ai-table :tableData="tableData" :total="search.total" :current.sync="search.current" :size.sync="search.size"
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="eventDesc" label="事件" align="center">
<template slot-scope="{ row }">
<span>{{ row.integralType == 3 ? row.integralRuleNamesearch : row.integralType == 0? row.eventDesc : '' }}</span>
</template>
</el-table-column>
</ai-table>
</template>
</ai-card>
@@ -64,10 +70,8 @@ export default {
name: '',
girdId: '',
type: '',
},
page: {
current: 1,
size: 10,
current: 1,
size: 10,
total: 0
},
girdList: [],
@@ -75,7 +79,6 @@ export default {
data: {},
startTime: '',
endTime: '',
}
},
props: {
@@ -83,28 +86,22 @@ export default {
dict: Object,
permissions: Function,
},
watch: {
timeList(newVal, oldVal) {
if(!newVal) {
// this.getList()
}
}
},
computed: {
colConfigs() {
return [
{ prop: "doTime", label: '时间', align: "left", width: "200px" },
{ prop: "integralType", label: '类型', align: "center", width: "180px", dict:"integralDetailType"},
{ prop: "integralType", label: '类型', align: "center", width: "240px", dict:"integralType"},
{ prop: "changeIntegral", label: '变动积分', align: "center",width: "200px",render: (h, { row }) => {
return h('span', {}, `${row.integralCalcType == 1 ? '+' : '-'}${row.changeIntegral}`)
}},
{ prop: "nowIntegral", label: '剩余积分', align: "center",width: "200px" },
{ prop: "eventDesc", label: '事件', align: "center", },
{ slot: "eventDesc", label: '事件', align: "center", },
]
}
},
created() {
this.$dict.load('integralDetailType')
this.$dict.load('integralType')
this.getDetail()
this.getIntegralChange()
},
@@ -124,12 +121,12 @@ export default {
// 事件汇总 暂定
// 余额变动明细
getIntegralChange() {
this.instance.post(`/app/appintegraluser/getChangeDetail`, null, {
params: {
...this.page,
type: this.search.type, //积分类型
...this.search, //积分类型
id: this.$route.query.id,
}
}).then(res => {
@@ -205,10 +202,6 @@ export default {
this.myChart.resize()
},
getTableData() {},
getListInit() {},
cancel(isRefresh) {
this.$emit('change', {
type: 'gridScoreManage',
@@ -219,7 +212,7 @@ export default {
},
mounted() {
// this.getColEcherts()
this.getColEcherts()
},
destroyed () {
@@ -234,6 +227,7 @@ export default {
height: 100%;
padding: 0 20px;
box-sizing: border-box;
overflow-y: scroll;
.card_list {
display: flex;
.card {

View File

@@ -12,7 +12,7 @@
<el-input size="small" placeholder="请输入居民名称或真实姓名" v-model="search.userName" clearable
@clear="page.current = 1, search.userName = '', getTableData()" suffix-icon="iconfont iconSearch"
v-throttle="() => {(page.current = 1), getTableData();}"/>
<ai-download :instance="instance" url="" :params="search" fileName="网格员积分"
<ai-download :instance="instance" url="`/app/appintegraluser/girdIntegralExport" :params="search" fileName="网格员积分"
:disabled="tableData.length == 0">
<el-button size="small">导出</el-button>
</ai-download>
@@ -96,6 +96,8 @@ export default {
search: {
userName: '',
girdId: '',
current: 1,
size: 10,
},
tableData: [],
page: {current: 1, size: 10, total: 0},

View File

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

View File

@@ -59,7 +59,7 @@
<el-cascader ref="cascader2" v-model="search.girdId" :options="girdOptions" placeholder="所属网格" size="small"
:props="defaultProps" :show-all-levels="false" clearable @change="gridChangeOpt"></el-cascader>
<ai-select v-model="search.integralType" placeholder="请选择类型" @change="page.current=1, getTableData()"
:selectList="dict.getDict('integralDetailType')"/>
:selectList="dict.getDict('integralType')"/>
<el-date-picker v-model="time" size="small" type="daterange" value-format="yyyy-MM-dd"
range-separator="" start-placeholder="开始日期" end-placeholder="结束日期" @change="onChange">
</el-date-picker>
@@ -173,7 +173,7 @@ export default {
{ prop: "integralUserName", label: '姓名', align: "left", width: "200px" },
{ prop: "girdName", label: '所属网格', align: "center", width: "180px" },
{ prop: "eventDesc", label: '事件', align: "center",width: "200px" },
{ prop: "integralType", label: '类型', align: "center",width: "200px", dict:"integralDetailType" },
{ prop: "integralType", label: '类型', align: "center",width: "200px", dict:"integralType" },
// render: (h, {row}) => {
// return h('span', {
// style: {
@@ -189,7 +189,7 @@ export default {
}
},
created() {
this.$dict.load('epidemicDangerousAreaLevel').then(() => {
this.$dict.load('epidemicDangerousAreaLevel','integralType').then(() => {
this.getStatistics()
this.getGridList()
this.getRanking()
@@ -224,9 +224,9 @@ export default {
}
}).then((res) => {
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.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.getColEcherts1(this.userSortListX,this.userSortListY)
this.getColEcherts2(this.girdSortListX,this.girdSortListY)
@@ -379,7 +379,7 @@ export default {
this.getStatistics()
this.getRanking()
},
// 所有网格
getGridList() {
this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => {
if (res.code == 0) {
@@ -468,7 +468,6 @@ export default {
<style lang="scss" scoped>
.gridScoreStatistics {
height: 100%;
box-sizing: border-box;
padding-top: 20px;

View File

@@ -17,7 +17,7 @@ module.exports = {
filename: 'index.html'
}
},
transpileDependencies: [/node_modules[/\\]dvcp-ui(.+)utils.js/, /node_modules[/\\]dvcp-ui(.+)modules.js/],
transpileDependencies: [/node_modules[/\\]dvcp-ui(.+)utils.js/, /node_modules[/\\]dvcp-ui(.+)modules.js/,/node_modules[/\\]dvcp-ui(.+)request.js/],
chainWebpack: (config) => {
config.module
.rule('js')