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"
|
||||
@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>
|
||||
|
@ -91,13 +91,8 @@
|
|||
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 size="mini" type="text" @click="rePublish(scope.row)">
|
||||
{{ $t("system:event:button:rePublish") }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -114,21 +109,21 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getEventStoreRecordList, rePublishEvent } from '@/api/admin'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import moment from 'moment'
|
||||
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: '',
|
||||
SortField: "",
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'event',
|
||||
name: "event",
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
@ -139,61 +134,63 @@ export default {
|
|||
loading: false,
|
||||
PublishVersionList: [],
|
||||
selectTableList: [],
|
||||
}
|
||||
};
|
||||
},
|
||||
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.$message.success(
|
||||
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;
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.event {
|
||||
|
|
Loading…
Reference in New Issue