1
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
bc15ac1cd3
commit
9c98cfb668
|
@ -39,14 +39,14 @@
|
|||
size="mini"
|
||||
@click="getList"
|
||||
>
|
||||
{{ $t("common:button:search") }}
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t("common:button:reset") }}
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -67,7 +67,7 @@
|
|||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ $fd("EventTypeName", scope.row.EventTypeName) }}</span>
|
||||
<span>{{ $fd('EventTypeName', scope.row.EventTypeName) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -80,7 +80,7 @@
|
|||
<el-tag
|
||||
:type="['info', 'success', 'primary'][scope.row.EventState]"
|
||||
>
|
||||
{{ $fd("EventState", scope.row.EventState) }}
|
||||
{{ $fd('EventState', scope.row.EventState) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -98,10 +98,10 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="view(scope.row)">
|
||||
{{ $t("common:button:view") }}
|
||||
{{ $t('common:button:view') }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" @click="rePublish(scope.row)">
|
||||
{{ $t("system:event:button:rePublish") }}
|
||||
{{ $t('system:event:button:rePublish') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -123,21 +123,21 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getEventStoreRecordList, rePublishEvent } from "@/api/admin";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import BaseModel from "@/components/BaseModel";
|
||||
import { getEventStoreRecordList, rePublishEvent } from '@/api/admin'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
EventState: null,
|
||||
EventTypeName: null,
|
||||
Asc: true,
|
||||
SortField: "",
|
||||
SortField: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: "event",
|
||||
name: 'event',
|
||||
components: { Pagination, BaseModel },
|
||||
data() {
|
||||
return {
|
||||
|
@ -147,70 +147,79 @@ export default {
|
|||
loading: false,
|
||||
PublishVersionList: [],
|
||||
selectTableList: [],
|
||||
model_cfg: { visible: false, title: "", width: "500px" },
|
||||
model_cfg: { visible: false, title: '', width: '500px' },
|
||||
info: null,
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
getEventStoreRecordList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async rePublish(row) {
|
||||
try {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
let res = await rePublishEvent({
|
||||
EventId: row.Id,
|
||||
});
|
||||
})
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(
|
||||
this.$t("system:event:message:rePublishSuccess")
|
||||
);
|
||||
this.getList();
|
||||
this.$t('system:event:message:rePublishSuccess')
|
||||
)
|
||||
this.getList()
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false;
|
||||
console.log(err);
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 重置列表查询
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false;
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 选择
|
||||
handleSelectionChange(val) {
|
||||
this.selectTableList = val;
|
||||
this.selectTableList = val
|
||||
},
|
||||
// 查看
|
||||
view(row) {
|
||||
this.info = row.EventData;
|
||||
this.model_cfg.visible = true;
|
||||
let info = JSON.parse(row.EventData)
|
||||
let message = ''
|
||||
if (info) {
|
||||
Object.keys(info).forEach((key) => {
|
||||
message += `<div style="margin-bottom:10px">
|
||||
<span style="color:#F56C6C">${key}</span>:<span style="color:#67C23A">${info[key]}</span>
|
||||
</div>`
|
||||
})
|
||||
}
|
||||
this.info = message
|
||||
this.model_cfg.visible = true
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.event {
|
||||
|
|
Loading…
Reference in New Issue