<!--
  @description: 集约化评标明细-查看变更信息
  @author:肖文龙
  @routerPath:/intensiveeval/intensiveevalDetailChangeInfo-detail
  @date: 2020年3月12日22:54:15
-->
<template>
  <div class="p0-16">
    <section class="title clearfix">
      <div class="title-back pointer">
        <i class="iconfont icon-fanhui pointer mr10" @click="back" />
        查看变更信息
      </div>
    </section>
    <div>
      <el-table
        ref="smallTable"
        v-loading="loading"
        :data="tableData"
      >
        <el-table-column
          type="index"
          label="序号"
          width="45px"
          align="center"
        />
        <el-table-column
          header-align="center"
          prop="tenderName"
          label="招标项目名称"
          min-width="300"
        />
        <el-table-column
          header-align="center"
          prop="packNo"
          label="标段（包）编号"
          min-width="200"
        />
        <el-table-column
          align="center"
          prop="changeTime"
          label="变更时间"
          min-width="140"
        >
          <template slot-scope="scope">
            {{ scope.row.changeTime && $Moment(scope.row.changeTime).format(momentDateTime) }}
          </template>
        </el-table-column>
        <el-table-column
          align="center"
          prop="openBidPlanStatus"
          label="变更状态"
          min-width="140"
        >
          <template slot-scope="scope">
            <span
              v-for="(item,index) in openingScheduleStatusList"
              v-if="scope.row.openBidPlanStatus===item.typecode"
              :key="index"
            >{{ item.typename }}</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="changeReson"
          align="center"
          label="变更原因"
          min-width="300"
        >
          <template slot-scope="scope">
            <span
              v-for="(item,index) in changeResonList"
              v-if="scope.row.changeReson===item.typecode"
              :key="index"
            >{{ item.typename }}</span>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
/* api*/
import { queryChangePlanInfoById } from '@/api/intensiveeval/intensiveeval'
/* 混合开发*/
import { groupMixin } from '@/views/intensiveeval/mixins/intensiveevalGroupMixin'// 字典信息
import { ListMixin } from '@/mixins/ListMixin'// 分页
export default {
  name: 'IntensiveevalDetailChangeInfoDetail',
  mixins: [groupMixin, ListMixin],
  data() {
    return {
      loading: false, // 刷新loading
      // 分组变更记录列表
      tableData: []
    }
  },
  created() {
    this.loadData()
  },
  methods: {
    // 返回按钮
    back() {
      this.$router.push({ path: '/intensiveeval/intensiveevalPlanContent/intensiveevalDetail-list' })
    },
    // 获取数据（查看变更信息）
    loadData() {
      this.loading = true
      const planId = this.$route.query.planId// 评标计划Id
      queryChangePlanInfoById(planId).then(response => {
        this.tableData = [response.data]
        this.loading = false
      }).catch(() => {

      })
    }
  }
}
</script>

<style lang="less" scoped>

</style>
