<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->
    
    <!-- 操作按钮区域 -->
    <div class="table-operator">

    </div>

    <!-- table区域-begin -->
    <div>


      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        class="j-table-force-nowrap"
        @change="handleTableChange">


        <span slot="action" slot-scope="text, record">
          <a @click="viewSubcontract(record)">合同管理</a>


        </span>

      </a-table>
    </div>


    <hlw-cp-sub-subcontract-list ref="viewSubcontractForm" @ok="modalFormOk"></hlw-cp-sub-subcontract-list>
  </a-card>
</template>

<script>

  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import HlwCpSubSubcontractList from './modules/HlwCpSubSubcontractList'

  export default {
    name: "HlwCpSubcontractorList",
    mixins:[JeecgListMixin, mixinDevice],
    components: {
      HlwCpSubSubcontractList,
    },
    data () {
      return {
        description: 'hlw_cp_subcontractor管理页面',
        // 表头
        columns: [
          {
            title:'服务商名称',
            align:"center",
            dataIndex: 'name'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            // fixed:"right",
            scopedSlots: { customRender: 'action' }
          }
        ],
        url: {
          list: "/wisdom/hlwSubcontractor/list",
        },
        dictOptions:{},
      }
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      },
    },
    methods: {
      initDictConfig(){
      },

      viewSubcontract(record){
        this.$refs.viewSubcontractForm.edit(record);
        this.$refs.viewSubcontractForm.title = '合同管理'
        this.$refs.viewSubcontractForm.disableSubmit = false
      }

    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
</style>