<template>
  <div class="construction-situation-container">
    <head-form-new title="在施工程情况" :query-params="queryParams" :total="tableDataTotal" :isExcel="false" @handle-search="handleSearch"
      ref="searchFormNew" />
    <skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
    <tables v-if="!isSkeleton" :indexFixed="true" :tableData="tableData" :forData="forData" :tableDataTotal="tableDataTotal"
      :queryParams="queryParams" @handle-current-change="handleCurrentChange">
    </tables>
  </div>
</template>
<script>
import skeleton from '../component/skeleton';
import mixin from '@/views/detail/party-a/mixins/mixin';
import { } from "@/api/internalCooperation";
import { } from "@/api/common";
export default {
  name: "constructionSituation",
  mixins: [mixin],
  components: {
    skeleton
  },
  props: ['companyId'],
  data() {
    return {
      queryParams: {
        advisoryBodyCid: this.companyId,
        pageNum: 1,
        pageSize: 10,
      },
      forData: [
        { label: '工程名称', prop: 'gcmc', width: '245', showOverflowTooltip: true },
        { label: '施工承包范围', prop: 'sgcbfw', width: '101' },
        { label: '建筑平面（㎡）', prop: 'szqy', width: '109' },
        { label: '队长名称', prop: 'dzmc', width: '73' },
        { label: '管理人员数量（人）', prop: 'glrysl', width: '130' },
        { label: '施工人员数量（人）', prop: 'sgrysl', width: '130' },
        { label: '质量目标', prop: 'zlmb', width: '121' },
        { label: '考察项目', prop: 'kcxm', minWidth: '245', showOverflowTooltip: true },
        { label: '考察公司', prop: 'kcgs', minWidth: '192', showOverflowTooltip: true },
      ],
      //列表
      tableLoading: false,
      tableData: [
        {
          gcmc: "黄阁水厂二期扩建工程设计咨询服务项目",
          sgcbfw: "2023年",
          szqy: "233.33",
          dzmc: "张林",
          glrysl: "32",
          sgrysl: "21233",
          zlmb: "优质工程",
          kcxm: "黄阁水厂二期扩建工程设计咨询服务项目",
          kcgs: "中国建筑一局第二建筑有限公司"
        },
        {
          gcmc: "黄阁水厂二期扩建工程设计咨询服务项目",
          sgcbfw: "2023年",
          szqy: "233.33",
          dzmc: "张林",
          glrysl: "32",
          sgrysl: "21233",
          zlmb: "优质工程",
          kcxm: "黄阁水厂二期扩建工程设计咨询服务项目",
          kcgs: "中国建筑一局第二建筑有限公司"
        },
      ],
      tableDataTotal: 2,
      isSkeleton: true,
    };
  },
  //可访问data属性
  created() {
    this.initDetail();
  },
  //计算集
  computed: {

  },
  //方法集
  methods: {
    async initDetail() {
      try {
        await this.handleQuery();
      } catch (error) {

      }
    },
    async handleQuery(params) {
      try {
        // let data = params ? params : this.queryParams;
        // this.isSkeleton = true;
        // const res = await getConsultingAgencyCooperationListApi(data);
        // this.tableData = res.rows ? res.rows : [];
        // this.tableDataTotal = res.total ? res.total : 0;
      } catch (error) {
        console.log(error);
      } finally {
        this.isSkeleton = false;
      }
    },
    async handleSearch() {
      try {

      } catch (error) {

      }
    }
  },
}
</script>
<style lang="scss" scoped>
.construction-situation-container {
  background: #ffffff;
  border-radius: 4px;
  padding: 16px;
  input {
    border: 1px solid #efefef;
  }
  ::v-deep .el-form-item {
    margin-right: 8px !important;
  }

  .query-box {
    margin: 10px 0 20px;
  }
  .cell-span {
    display: inline-block;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    cursor: pointer;

    > span {
      display: inline-block;
      width: 37px;
      position: absolute;
      right: 0;
      bottom: 0;
      background-color: #fff;
      z-index: 1;
    }
  }
  @import "@/assets/styles/search-common.scss";
}
</style>
