<!--
  @description:录入委员会信息-基本信息-查看标段信息弹框
  @Modifier: 肖文龙
  @routerPath:
  @date: 2020-3-24-15:27
-->
<template>
  <el-dialog
    :visible.sync="dialogData.dialog"
    :close-on-click-modal="false"
    title="查看标段（包）列表"
    width="1180px"
    height="400px"
    custom-class="el-dialog__body-p8"
  >
    <div>
      <el-table
        ref="singleTable"
        :data="list"
        class="pointer"
        size="mini"
      >
        <el-table-column
          type="index"
          label="序号"
          align="center"
          width="45"
        />
        <el-table-column

          label="项目名称"
          header-align="center"
          prop="tenderName"
          min-width="200"
        />
        <el-table-column
          label="项目编号"
          align="center"
          prop="tenderNo"
          min-width="160"
        />
        <el-table-column

          label="标段（包）名称"
          header-align="center"
          prop="packName"
          min-width="200"
        />
        <el-table-column
          label="标段（包）编号"
          header-align="center"
          prop="packNo"
          min-width="160"
        />
        <el-table-column
          header-align="center"
          label="业务部门"
          align="center"
          prop="department"
          min-width="160"
        />
        <el-table-column label="项目经理" align="center" prop="tenderManager" width="100" />
        <el-table-column label="联系方式" align="center" prop="linkPhone" width="120" />
      </el-table>
    </div>
    <!--分页组件-->
    <pagination :pagination-data="paginationData" @change="loadData" />
  </el-dialog>
</template>

<script>
/* 接口*/
import { queryPlanListByBatchNumberPages } from '@/api/intensiveeval/intensiveeval'
/* 混合开发方法-参数字段*/
import { groupMixin } from '@/views/intensiveeval/mixins/intensiveevalGroupMixin'// 字典信息
import { ListMixin } from '@/mixins/ListMixin'// 分页
/* 组件*/
import pagination from '@comp/common/pagination/pagination'// 分页
export default {
  name: 'PackageInfoDialog',
  components: {
    pagination// 分页
  },
  mixins: [ListMixin, groupMixin],
  props: {
    dialogData: {
      type: Object,
      default: function() {
        return {
          groupId: '', // 分组id
          dialog: false // 弹窗状态
        }
      }
    }
  },
  data() {
    return {
      list: [] // 列表数据
    }
  },
  watch: {
    'dialogData.groupId'(val) {
      if (val) {
        this.loadData(val)// 加载数据
      }
    }
  },
  mounted() {
  },
  methods: {
    // 加载数据
    loadData(val) {
      const stageId = this.$route.query.juryId ? '' : this.$store.getters.groupId.stageId
      const params = {
        groupId: val, // 分组Id
        batchNumber: this.$route.query.batchNumber, // 批次号-组建评标委员会时用的
        stageId: stageId, // 阶段Id>在项目驱动里用的
        pageNo: this.paginationData.pageNo,
        pageSize: this.paginationData.pageSize
      }
      queryPlanListByBatchNumberPages(params).then(response => {
        this.list = response.data.records
        this.paginationData.total = response.data.total
      }).catch(() => {

      })
    }
  }
}
</script>
<style lang="less" scoped>

</style>
