1
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2024-10-18 11:08:59 +08:00
parent 93c64e04f2
commit 6288770c26
1 changed files with 39 additions and 42 deletions

View File

@ -39,14 +39,14 @@
size="mini" size="mini"
@click="getList" @click="getList"
> >
{{ $t('common:button:search') }} {{ $t("common:button:search") }}
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"
icon="el-icon-refresh-left" icon="el-icon-refresh-left"
@click="handleReset" @click="handleReset"
> >
{{ $t('common:button:reset') }} {{ $t("common:button:reset") }}
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -67,7 +67,7 @@
sortable="custom" sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ $fd('EventTypeName', scope.row.EventTypeName) }}</span> <span>{{ $fd("EventTypeName", scope.row.EventTypeName) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -80,7 +80,7 @@
<el-tag <el-tag
:type="['info', 'success', 'primary'][scope.row.EventState]" :type="['info', 'success', 'primary'][scope.row.EventState]"
> >
{{ $fd('EventState', scope.row.EventState) }} {{ $fd("EventState", scope.row.EventState) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -91,13 +91,8 @@
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" type="text" @click="rePublish(scope.row)">
size="mini" {{ $t("system:event:button:rePublish") }}
type="text"
icon="el-icon-edit-outline"
@click="rePublish(scope.row)"
>
{{ $t('system:event:button:rePublish') }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -114,21 +109,21 @@
</div> </div>
</template> </template>
<script> <script>
import { getEventStoreRecordList, rePublishEvent } from '@/api/admin' import { getEventStoreRecordList, rePublishEvent } from "@/api/admin";
import Pagination from '@/components/Pagination' import Pagination from "@/components/Pagination";
import moment from 'moment' import moment from "moment";
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
EventState: null, EventState: null,
EventTypeName: null, EventTypeName: null,
Asc: true, Asc: true,
SortField: '', SortField: "",
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
} };
} };
export default { export default {
name: 'event', name: "event",
components: { Pagination }, components: { Pagination },
data() { data() {
return { return {
@ -139,61 +134,63 @@ export default {
loading: false, loading: false,
PublishVersionList: [], PublishVersionList: [],
selectTableList: [], selectTableList: [],
} };
}, },
mounted() { mounted() {
this.getList() this.getList();
}, },
methods: { methods: {
getList() { getList() {
this.loading = true this.loading = true;
getEventStoreRecordList(this.searchData) getEventStoreRecordList(this.searchData)
.then((res) => { .then((res) => {
this.loading = false this.loading = false;
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount this.total = res.Result.TotalCount;
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
}) });
}, },
async rePublish(row) { async rePublish(row) {
try { try {
this.loading = true this.loading = true;
let res = await rePublishEvent({ let res = await rePublishEvent({
EventId: row.Id, EventId: row.Id,
}) });
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message.success(this.$t('system:event:message:rePublishSuccess')) this.$message.success(
this.getList() this.$t("system:event:message:rePublishSuccess")
);
this.getList();
} }
} catch (err) { } catch (err) {
this.loading = false this.loading = false;
console.log(err) console.log(err);
} }
}, },
// //
handleReset() { handleReset() {
this.searchData = searchDataDefault() this.searchData = searchDataDefault();
this.getList() this.getList();
}, },
// //
handleSortByColumn(column) { handleSortByColumn(column) {
if (column.order === 'ascending') { if (column.order === "ascending") {
this.searchData.Asc = true this.searchData.Asc = true;
} else { } else {
this.searchData.Asc = false this.searchData.Asc = false;
} }
this.searchData.SortField = column.prop this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1;
this.getList() this.getList();
}, },
// //
handleSelectionChange(val) { handleSelectionChange(val) {
this.selectTableList = val this.selectTableList = val;
}, },
}, },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.event { .event {