<!--
  @description: 招标项目-归档目录管理列表-归档变更记录
  @Modifier: 肖文龙
  @routerPath: /bidArchived/archivedTOCChangeRecord-detail
  @date: 2019/12/05
-->
<template>
  <div>
    <section class="title p0-16 clearfix">
      <template>
        <div class="title-back pointer" @click="back">
          <i class="iconfont icon-fanhui mr10" />查看变更信息
        </div>
      </template>
    </section>
    <section class="p0-16">
      <el-table
        ref="smallTable"
        v-loading="loading"
        :data="tableData"
      >
        <el-table-column
          type="index"
          label="序号"
          width="60px"
          align="center"
        />
        <el-table-column
          prop="tenderNo"
          align="center"
          label="记录人"
          min-width="100"
        />
        <el-table-column
          prop="tenderName"
          align="center"
          label="变更时间"
          width="160"
        />
        <el-table-column
          :formatter="formatTenderMethod"
          header-align="center"
          prop="tenderMethod"
          label="变更类型"
          width="160"
          align="left"
        />
        <el-table-column
          header-align="center"
          align="left"
          prop="managerName"
          label="原变更内容"
          min-width="300"
        />
        <el-table-column
          header-align="center"
          align="left"
          prop="managerName"
          label="变更后内容"
          min-width="300"
        />
      </el-table>
    </section>
  </div>
</template>
<script>
/* 接口*/
// import { listTenderProjectPages, removeProjectPackage } from '@/api/bidding/biddingProject'// 项目列表 项目删除
/* 公用方法*/
import { filterDictText } from '@/assets/js/utils'// 常用方法
/* 混入-字典信息 */
import { bidArchiveddGroup } from './../mixins/bidArchivedGroupMixin'// 字典信息

export default {
  name: 'BidArchivedTOCList',
  data() {
    return {
      loading: true,
      // 搜索
      /* 字典信息-start */
      ...bidArchiveddGroup,
      bidTypeList: [], // 招标类型
      /* 字典信息-end */
      createTime: [], // 创建时间 不传给后端只做回显
      tableData: [{}]
    }
  },
  created() {
    // 字典信息
    this.initGroup()
  },
  methods: {
    filterDictText, // 字典值替换文本通用方法
    // 获取字典方法
    initGroup() {
      const data = ['bidType']
      this.$store.dispatch('getGroupType', data).then(res => {
        Object.keys(res.bidTypeData).forEach((key) => {
          this[key] = res.bidTypeData[key]
        })
      })
    },
    // 表格字典值替换文本-招标方式
    formatTenderMethod(row, column, cellValue) {
      return filterDictText(this.bidTypeList, cellValue)
    },
    // 返回
    back() {
      this.$router.push({
        path: '/bidArchived/bidArchivedTOC-list'
      })
    },
    // 获取数据
    loadData(params, callback) {
      // listTenderProjectPages(params).then(response => {
      //   this.loading = false
      //   this.tableData = response.data.records
      //   callback(response.data.total)
      // }).catch(() => {
      this.loading = false
      // })
    }
  }
}
</script>
<style lang="less" scoped>

</style>
