212
This commit is contained in:
@@ -7,16 +7,12 @@
|
|||||||
<template slot="content">
|
<template slot="content">
|
||||||
<ai-search-bar class="search-bar">
|
<ai-search-bar class="search-bar">
|
||||||
<template #left>
|
<template #left>
|
||||||
<el-cascader
|
<ai-select
|
||||||
size="small"
|
v-model="search.applyItemId"
|
||||||
v-model="search.ids"
|
@change="(search.current = 1), getList()"
|
||||||
:options="rulesOps"
|
|
||||||
placeholder="请选择事件/类型"
|
placeholder="请选择事件/类型"
|
||||||
clearable
|
:selectList="dictList">
|
||||||
:props="rulesProps"
|
</ai-select>
|
||||||
@change="search.current = 1, getList()"
|
|
||||||
ref="eventTypeSearch">
|
|
||||||
</el-cascader>
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="search.createTimeStart"
|
v-model="search.createTimeStart"
|
||||||
type="date"
|
type="date"
|
||||||
@@ -108,19 +104,14 @@
|
|||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
areaId: '',
|
areaId: '',
|
||||||
ids: '',
|
applyItemId: '',
|
||||||
girdId: '',
|
girdId: '',
|
||||||
createTimeStart: '',
|
createTimeStart: '',
|
||||||
createTimeEnd: '',
|
createTimeEnd: '',
|
||||||
girdName: ''
|
girdName: ''
|
||||||
},
|
},
|
||||||
userList: [],
|
userList: [],
|
||||||
rulesProps: {
|
dictList: [],
|
||||||
label: 'ruleName',
|
|
||||||
value: 'id',
|
|
||||||
checkStrictly: true
|
|
||||||
},
|
|
||||||
rulesOps: [],
|
|
||||||
total: 10,
|
total: 10,
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{ prop: 'applyItemName', label: '事件类型', align: 'left' },
|
{ prop: 'applyItemName', label: '事件类型', align: 'left' },
|
||||||
@@ -153,12 +144,13 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getRulesList () {
|
getRulesList () {
|
||||||
this.instance.post(`/app/appintegralsystemrule/listByAppletFD?current=1&size=3000`).then((res) => {
|
this.instance.post(`/app/appintegralrule/listByAppletFD?current=1&size=3000`).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.rulesOps = this.toTree(res.data.records)
|
this.dictList = res.data.records.map(v => {
|
||||||
this.rulesOps.push({
|
return {
|
||||||
ruleName: '积分申请',
|
dictName: v.ruleName,
|
||||||
id: '积分申请'
|
dictValue: v.id
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -173,31 +165,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
toTree (data) {
|
|
||||||
let result = []
|
|
||||||
if (!Array.isArray(data)) {
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
let map = {}
|
|
||||||
data.forEach((item) => {
|
|
||||||
map[item.id] = item
|
|
||||||
})
|
|
||||||
data.forEach((item) => {
|
|
||||||
let parent = map[item.parentRuleId]
|
|
||||||
if (parent) {
|
|
||||||
(parent.children || (parent.children = [])).push(item)
|
|
||||||
} else {
|
|
||||||
result.push(item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return result
|
|
||||||
},
|
|
||||||
|
|
||||||
getList () {
|
getList () {
|
||||||
this.instance.post(`/app/appintegraluserapply/list`, null, {
|
this.instance.post(`/app/appintegraluserapply/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
...this.search,
|
...this.search
|
||||||
// areaId: this.search.areaId
|
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user