index.vue 3.39 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
<template>
  <div>
    <el-page-header
      @back="goBack"
      class="header"
      :content="$t('分享统计详情')"
    ></el-page-header>
    <div class="app-container">
      <!-- 列表 -->
      <el-table v-loading="loading" :data="list">
        <el-table-column :label="$t('序号')" align="center" prop="id" />
        <el-table-column
          :label="$t('操作人')"
          align="center"
          prop="memberName"
        />
        <el-table-column
          :label="$t('分类')"
          align="center"
          :prop="isChinese ? 'typeZh' : 'typeEn'"
        />
        <el-table-column :label="$t('分享ID')" align="center" prop="code" />
        <el-table-column
          :label="$t('标题')"
          align="center"
          :prop="isChinese ? 'titleZh' : 'titleEn'"
        />
        <el-table-column
          :label="$t('操作时间')"
          align="center"
          prop="createTime"
          width="180"
        >
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.createTime) }}</span>
          </template>
        </el-table-column>
        <el-table-column
          :label="$t('点击时间')"
          align="center"
          prop="createTime"
          width="180"
        >
          <template slot-scope="scope">
chenwei's avatar
chenwei committed
45
            <span>{{ parseTime(scope.row.triggerTime) || "--" }}</span>
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
          </template>
        </el-table-column>
        <el-table-column :label="$t('积分')" align="center" prop="score" />
      </el-table>
      <!-- 分页组件 -->
      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="queryParams.page"
        :limit.sync="queryParams.rows"
        @pagination="getList"
      />
    </div>
  </div>
</template>

<script>
import { getShareRecordDetails } from "@/api/ecw/memberManagement";
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
export default {
  name: "details",
  components: {},
  data() {
    return {
      // 遮罩层
      loading: true,
      // 导出遮罩层
      exportLoading: false,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 字典类型列表
      list: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      dateRangeCreateTime: [],
      // 查询参数
      queryParams: {
        page: 1,
        rows: 10,
        id: "",
      },
      // 表单参数
      form: {},
      // 表单校验
    };
  },
  created() {
    this.queryParams.id = this.$route.query.id;
    this.getList();
  },
  computed: {
    isChinese() {
      return this.$i18n.locale === "zh_CN";
    },
  },
  methods: {
    goBack() {
      this.$router.back();
    },
    /** 查询列表 */
    getList() {
      this.loading = true;
      // 处理查询参数
      let params = { ...this.queryParams };
      // 执行查询
      getShareRecordDetails(params).then((response) => {
        this.list = response.data.list;
        this.total = response.data.total;
        this.loading = false;
      });
    },
    /** 取消按钮 */

    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.page = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.dateRangeCreateTime = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
  },
};
</script>
<style scoped>
.header {
  padding-top: 40px;
  padding-left: 20px;
}
</style>