<template>
  <div class="detail-container">
    <head-form
      title="拟建项目"
      :form-data="formData"
      :query-params="queryParams"
      :total="tableDataTotal"
      :isExcel="true"
      @handle-search="handleSearch"
    />

    <tables
      :indexFixed="true"
      :tableLoading="tableLoading"
      :tableData="tableData"
      :forData="forData"
      :tableDataTotal="tableDataTotal"
      :queryParams="queryParams"
      @handle-current-change="handleCurrentChange"
    >
      <template slot="porjectName" slot-scope="scope">
        <router-link to="" tag="a" class="a-link">{{ scope.row.porjectName }}</router-link>
      </template>
    </tables>

  </div>
</template>

<script>
import mixin from '../mixins/mixin'
import { getList } from '@/api/detail/party-a/opport'
export default {
  name: 'Proposed',
  props: ['companyId'],
  mixins: [mixin],
  components: {
  },
  data() {
    return {
      queryParams: {
        companyId: this.companyId,
        pageNum: 1,
        pageSize: 10
      },
      forData: [
        {label: '项目名称', prop: 'porjectName', minWidth: '300', slot: true},
        {label: '成交金额（万元）', prop: 'use', sortable: true, width: '150'},
        {label: '项目类别', prop: 'type', width: '100'},
        {label: '计划开工日期', prop: 'way', sortable: true, width: '130'},
        {label: '计划完工日期', prop: 'state', sortable: true, width: '130'},
        {label: '审批结果', prop: 'money', width: '100'},
        {label: '是否为民间推介项目', prop: 'scale', width: '150'}
      ],
      formData: [
        { type: 3, fieldName: 'keys', value: '', placeholder: '输入项目名称关键词查询', options: []},
      ],
      //列表
      tableLoading:false,
      tableData:[],
      tableDataTotal:0,
      showList:[],
    }
  },
  computed: {
  },
  created() {
    this.handleQuery()
  },
  methods: {
    handleQuery(params) {
      this.tableLoading = true
      let param = params?params:this.queryParams
      getList(param).then((res) => {
        this.tableLoading = false
        this.tableData = [
          {
            projectId: '1',
            porjectName:'滨州医学院口腔医学大楼铝合金门窗供货及安装',
            use:'城镇住宅用地',
            type:'房地产业',
            way:'挂牌出让',
            state:'重庆',
            money:'11234万元',
            scale:'222平米',
            unit:'江苏省住房和城乡建设厅',
            date:'2015-08-06',
          }
        ]
        this.tableDataTotal = 100
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.detail-container{
  background: #ffffff;
  border-radius: 4px;
  padding: 16px;
}
</style>
