1
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
93c64e04f2
commit
6288770c26
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue