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