新增事件菜单
parent
4c1ed950e5
commit
7beec24a7c
|
@ -293,3 +293,19 @@ export function batchUpdateInternationalInfo(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
// 邮件事件消息列表
|
||||
export function getEventStoreRecordList(data) {
|
||||
return request({
|
||||
url: `/EventStoreRecord/getEventStoreRecordList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 重新发布事件消息
|
||||
export function rePublishEvent(param) {
|
||||
return request({
|
||||
url: `/EventStoreRecord/rePublishEvent`,
|
||||
method: 'post',
|
||||
param
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,224 @@
|
|||
<template>
|
||||
<div class="event">
|
||||
<div ref="leftContainer" class="left">
|
||||
<el-form :inline="true">
|
||||
<el-form-item :label="$t('system:event:eventTypeName')">
|
||||
<el-select
|
||||
v-model="searchData.EventTypeName"
|
||||
clearable
|
||||
filterable
|
||||
placeholder=""
|
||||
>
|
||||
<el-option
|
||||
v-for="item in $d.EventTypeName"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('system:event:eventState')">
|
||||
<el-select
|
||||
v-model="searchData.EventState"
|
||||
clearable
|
||||
filterable
|
||||
placeholder=""
|
||||
>
|
||||
<el-option
|
||||
v-for="item in $d.EventState"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="getList"
|
||||
>
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{ bottomOffset: 45 }"
|
||||
height="100"
|
||||
:data="list"
|
||||
class="table"
|
||||
@sort-change="handleSortByColumn"
|
||||
@selection-change="handleSelectionChange"
|
||||
><el-table-column type="selection" width="50" />
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
:label="$t('system:event:eventTypeName')"
|
||||
prop="EventTypeName"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ $fd('EventTypeName', scope.row.EventTypeName) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('system:event:eventState')"
|
||||
prop="EventState"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
:type="['info', 'success', 'primary'][scope.row.EventState]"
|
||||
>
|
||||
{{ $fd('EventState', scope.row.EventState) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
fixed="right"
|
||||
prop=""
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit-outline"
|
||||
@click="rePublish(scope.row)"
|
||||
>
|
||||
{{ $t('system:event:button:rePublish') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination" style="text-align: right; margin-top: 5px">
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getEventStoreRecordList, rePublishEvent } from '@/api/admin'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import moment from 'moment'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
EventState: null,
|
||||
EventTypeName: null,
|
||||
Asc: true,
|
||||
SortField: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'event',
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
moment,
|
||||
searchData: searchDataDefault(),
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
PublishVersionList: [],
|
||||
selectTableList: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
getEventStoreRecordList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async rePublish(row) {
|
||||
try {
|
||||
this.loading = true
|
||||
let res = await rePublishEvent({
|
||||
EventId: row.Id,
|
||||
})
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 重置列表查询
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 选择
|
||||
handleSelectionChange(val) {
|
||||
this.selectTableList = val
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.event {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
.left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 0;
|
||||
flex-grow: 4;
|
||||
// border-right: 1px solid #ccc;
|
||||
.filter-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
}
|
||||
.data-table {
|
||||
flex: 1;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.pagination-container {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue