|
@@ -0,0 +1,67 @@
|
|
|
+<template>
|
|
|
+ <div id="result">
|
|
|
+ <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @download="toDownload"></data-table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: mission } = createNamespacedHelpers('mission');
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'result',
|
|
|
+ props: {},
|
|
|
+ components: { dataTable },
|
|
|
+ data: function() {
|
|
|
+ return {
|
|
|
+ list: [],
|
|
|
+ total: 0,
|
|
|
+ opera: [
|
|
|
+ {
|
|
|
+ label: '下载',
|
|
|
+ method: 'download',
|
|
|
+ display: i => i.status === '2',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ fields: [
|
|
|
+ { label: '标题', prop: 'title' },
|
|
|
+ { label: '导出数据时间', prop: 'create_time' },
|
|
|
+ {
|
|
|
+ label: '状态',
|
|
|
+ prop: 'status',
|
|
|
+ format: i => (i == '0' ? '未开始' : i == '1' ? '进行中' : i == '2' ? '导出完成' : i == '3' ? '导出失败' : '未知状态'),
|
|
|
+ },
|
|
|
+ { label: '进度', prop: 'progress' },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mission(['query']),
|
|
|
+ async search({ skip = 0, limit = 10 } = {}) {
|
|
|
+ const res = await this.query({ skip, limit });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, 'list', res.data);
|
|
|
+ this.$set(this, 'total', res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ toDownload({ data }) {
|
|
|
+ console.log(data);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user', 'menuParams']),
|
|
|
+ pageTitle() {
|
|
|
+ return `${this.$route.meta.title}`;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped></style>
|