<template>
  <view class="ComCss">
    <cardMoudule :cardData="data1" :required="false" title="城市居民用户_新建居民用户"></cardMoudule>
    <cardMoudule :cardData="data2" :required="false" title="城市居民用户_新建居民用户"></cardMoudule>
    <cardMoudule :cardData="data3" :required="false" title="城市居民用户_新建居民用户"></cardMoudule>
    <cardMoudule :cardData="data4" :required="false" title="城市居民用户_老居民用户"></cardMoudule>
    <cardMoudule :cardData="data5" :required="false" title="城市居民用户_老居民用户"></cardMoudule>
    <cardMoudule :cardData="data5add" :required="false" title="城市居民用户_老居民用户"></cardMoudule>
    <cardMoudule :cardData="data6" :required="false" title="城市居民用户_老居民用户"></cardMoudule>
    <cardMoudule :cardData="data7" :required="false" title="城市居民用户_老居民用户"></cardMoudule>
    <cardMoudule :cardData="data8" :required="false" title="城市居民用户_老居民用户"></cardMoudule>
    <cardMoudule :cardData="data9" :required="false" title="城市居民用户_老居民用户"></cardMoudule>
    <cardMoudule :cardData="data10" :required="false" title="农村燃气居民用户_乡村燃气居民"></cardMoudule>
    <cardMoudule :cardData="data11" :required="false" title="农村燃气居民用户_乡村燃气居民"></cardMoudule>
    <cardMoudule :cardData="data12" :required="false" title="工商业用户"></cardMoudule>
    <cardMoudule :cardData="data13" :required="true" title="安装费单价情况"></cardMoudule>
    <cardMoudule :cardData="data14" :required="false" title="天燃气销售业务"></cardMoudule>
    <cardMoudule :cardData="data15" :required="false" title="天燃气销售业务"></cardMoudule>
    <cardMoudule :cardData="data16" :required="true" title="“天燃气贸易”业务"></cardMoudule>
    <cardMoudule :cardData="data17" :required="true" title="气源及燃气购销价格调研"></cardMoudule>
    <cardMoudule :cardData="data18" :required="true" title="财务确认安装且未回款户数"></cardMoudule>
  </view>
</template>

<script>
  import cardMoudule from "./cardMoudule.vue"
  export default {
    components: {
      cardMoudule
    },
    props: {
      reportData: {
        type: Object
      },
      newBuildingInfo: {
        type: Object
      },
      newBuildingItem: {
        type: Object
      },
      fiscalYear: {
        type: String
      }
    },
    data() {
      return {
        data1: [{
            cardType: 4,
            required: true,
            title: '当地近四年新建居民累计确认安装户数及政府拍卖土地、新开工/新竣工住宅房地产情况:',
          },
          //新户财务确认安装数
          {
            cardType: 3,
            required: true,
            title: '新户财务确认安装数(户)',
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear - 3}年`,
            value: "",
            key: "cityNewInstalled",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear - 2}年`,
            value: "",
            key: "cityNewInstalled",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear - 1}年`,
            value: "",
            key: "cityNewInstalled",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear}年(预计)`,
            value: "",
            key: "cityNewInstalled",
            id: "0"
          },
          //政府拍卖/转让/拆迁土地面积合计
          {
            cardType: 3,
            required: true,
            title: '政府拍卖/转让/拆迁土地面积合计',
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear - 3}年`,
            value: "",
            key: "auctionArea",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear - 2}年`,
            value: "",
            key: "auctionArea",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear - 1}年`,
            value: "",
            key: "auctionArea",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear}年(预计)`,
            value: "",
            key: "auctionArea",
            id: "0"
          },
          //新开工住宅房地面积
          {
            cardType: 3,
            required: true,
            title: '新开工住宅房地面积',
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear - 3}年`,
            value: "",
            key: "newStartArea",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear - 2}年`,
            value: "",
            key: "newStartArea",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear - 1}年`,
            value: "",
            key: "newStartArea",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear}年(预计)`,
            value: "",
            key: "newStartArea",
            id: "0"
          },
          //新竣工住宅房地产面积
          {
            cardType: 3,
            required: true,
            title: '新竣工住宅房地产面积',
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear - 3}年`,
            value: "",
            key: "newCompletedArea",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear - 2}年`,
            value: "",
            key: "newCompletedArea",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear - 1}年`,
            value: "",
            key: "newCompletedArea",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: `${this.fiscalYear == "" ? "" : this.fiscalYear}年(预计)`,
            value: "",
            key: "newCompletedArea",
            id: "0"
          },
        ],
        data2: [],
        data3: [],
        data4: [{
            cardType: 4,
            required: true,
            title: '老居民用户(按小区个数换算 )',
          },
          {
            cardType: 3,
            required: true,
            title: '户数情况',
          },
          {
            cardType: 1,
            required: true,
            title: '总老户小区个数',
            value: "",
            key: "cityOldHouseholdSituation",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: '总规模户数(A)',
            value: "",
            key: "cityOldHouseholdSituation",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: '累计财务确认安装户数(B)',
            value: "",
            key: "cityOldHouseholdSituation",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: '累计缴费报装户数',
            value: "",
            key: "cityOldHouseholdSituation",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: '累计点火通气户数',
            value: "",
            key: "cityOldHouseholdSituation",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: '累计不可开发户数(C)',
            value: "",
            key: "cityOldHouseholdSituation",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: '剩余可开发户数(=A-B-C)',
            value: "",
            key: "cityOldHouseholdSituation",
            id: "6"
          },
        ],
        data5: [{
            cardType: 4,
            required: true,
            title: '老居民用户(按常住人口换算 )',
          },
          {
            cardType: 3,
            required: true,
            title: '城区常驻人口数(人)',
          },
          {
            cardType: 1,
            required: true,
            title: '数量',
            value: "",
            key: "cityResidentNumber",
            id: '0'
          },
          {
            cardType: 1,
            required: true,
            title: '异常情况说明',
            value: "",
            key: "cityResidentNumber",
            id: '1'
          },
          {
            cardType: 3,
            required: true,
            title: '城区常驻人口户数(A)',
          },
          {
            cardType: 1,
            required: true,
            title: '数量',
            value: "",
            key: "cityResidentHousehold",
            id: '0'
          },
          {
            cardType: 1,
            required: true,
            title: '异常情况说明',
            value: "",
            key: "cityResidentHousehold",
            id: '1'
          },
          {
            cardType: 3,
            required: true,
            title: '城区累计点火通气的居民户数',
          },
          {
            cardType: 1,
            required: true,
            title: '数量',
            value: "",
            key: "cityUseHousehold",
            id: '0'
          },
          {
            cardType: 1,
            required: true,
            title: '异常情况说明',
            value: "",
            key: "cityUseHousehold",
            id: '1'
          },
          {
            cardType: 3,
            required: true,
            title: '城区连续六个月均有用气的居民数(B)',
          },
          {
            cardType: 1,
            required: true,
            title: '数量',
            value: "",
            key: "continuousUseHousehold",
            id: '0'
          },
          {
            cardType: 1,
            required: true,
            title: '异常情况说明',
            value: "",
            key: "continuousUseHousehold",
            id: '1'
          },
          {
            cardType: 3,
            required: true,
            title: '城区所有“老户”小区中有人居住但无法安装管道天燃气用户数(C)',
          },
          {
            cardType: 1,
            required: true,
            title: '数量',
            value: "",
            key: "uninstallHousehold",
            id: '0'
          },
          {
            cardType: 1,
            required: true,
            title: '异常情况说明',
            value: "",
            key: "uninstallHousehold",
            id: '1'
          },
          {
            cardType: 3,
            required: true,
            title: '城区“老户”小区中应收账款户数(D)',
          },
          {
            cardType: 1,
            required: true,
            title: '数量',
            value: "",
            key: "receivableHousehold",
            id: '0'
          },
          {
            cardType: 1,
            required: true,
            title: '异常情况说明',
            value: "",
            key: "receivableHousehold",
            id: '1'
          },
          {
            cardType: 3,
            required: true,
            title: '区剩余有效可安装确认户数(=A-B-C-D)',
          },
          {
            cardType: 1,
            required: true,
            title: '数量',
            value: "",
            key: "remainHousehold",
            id: '0'
          },
          {
            cardType: 1,
            required: true,
            title: '异常情况说明',
            value: "",
            key: "remainHousehold",
            id: '1'
          }
        ],
        data5add: [{
            cardType: 4,
            required: true,
            title: '当地瓶装液化气居民用户现状',
          },
          {
            cardType: 3,
            required: true,
            title: '居民市场',
          },
          {
            cardType: 1,
            required: true,
            title: '经营区域城区瓶装液化气居民用户总数量（户）',
            value: "",
            key: "newMarketResident",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: '已财务安装确定的瓶装液化气居民用户数量（户）',
            value: "",
            key: "newMarketResident",
            id: "1"
          },
          {
            cardType: 5,
            required: true,
            title: '目前当地针对居民用户已落实“瓶改管”主要有利政策"',
            value: "",
            key: "newMarketResident",
            id: "2"
          },
          {
            cardType: 5,
            required: true,
            title: '2024年计划落实“瓶改管”主要有利政策',
            value: "",
            key: "newMarketResident",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: '预计未来2-3年可通过“瓶改管”开发的居民户数',
            value: "",
            key: "newMarketResident",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: '预计2024年可通过“瓶改管”开发的老居民户数（户）',
            value: "",
            key: "newMarketResident",
            id: "5"
          },
        ],
        data6: [{
            cardType: 4,
            required: true,
            title: '过去及未来三年城区老居民用户财务确认安装户数及回款户数、金额情况',
          },
          {
            cardType: 3,
            required: true,
            title: '年度财务确认安装数',
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear) - 3}财年`,
            value: "",
            key: "confirmInstallNumber",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear) - 2}财年`,
            value: "",
            key: "confirmInstallNumber",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear) - 1}财年`,
            value: "",
            key: "confirmInstallNumber",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear)}财年(本年预计)`,
            value: "",
            key: "confirmInstallNumber",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear)+1}财年(预计)`,
            value: "",
            key: "confirmInstallNumber",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear)+2}财年(预计)`,
            value: "",
            key: "confirmInstallNumber",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear)+3}财年(预计)`,
            value: "",
            key: "confirmInstallNumber",
            id: "6"
          },

          {
            cardType: 3,
            required: true,
            title: '实际新增报装回款户数(含应收款户)',
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear) - 3}财年`,
            value: "",
            key: "newRefundHousehold",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear) - 2}财年`,
            value: "",
            key: "newRefundHousehold",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear) - 1}财年`,
            value: "",
            key: "newRefundHousehold",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear)}财年(本年预计)`,
            value: "",
            key: "newRefundHousehold",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear)+1}财年(预计)`,
            value: "",
            key: "newRefundHousehold",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear)+2}财年(预计)`,
            value: "",
            key: "newRefundHousehold",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear)+3}财年(预计)`,
            value: "",
            key: "newRefundHousehold",
            id: "6"
          },

          {
            cardType: 3,
            required: true,
            title: '老户安装费回款金额(万元)',
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear) - 3}财年`,
            value: "",
            key: "oldRefundAmount",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear) - 2}财年`,
            value: "",
            key: "oldRefundAmount",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear) - 1}财年`,
            value: "",
            key: "oldRefundAmount",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear)}财年(本年预计)`,
            value: "",
            key: "oldRefundAmount",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear)+1}财年(预计)`,
            value: "",
            key: "oldRefundAmount",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear)+2}财年(预计)`,
            value: "",
            key: "oldRefundAmount",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: `${parseInt(this.fiscalYear)+3}财年(预计)`,
            value: "",
            key: "oldRefundAmount",
            id: "6"
          },
        ],
        data7: [{
            cardType: 3,
            required: true,
            title: '过去及未来三年城区老居民用户情况说明',
          },
          {
            cardType: 2,
            required: true,
            title: '年度财务确认安装数',
            key: "cityOldUserSituation",
            value: ""
          },
        ],
        data8: [{
            cardType: 3,
            required: true,
            title: '目前管网已经覆盖的区域老户开发情况',
          },
          {
            cardType: 1,
            required: true,
            title: '老户规模(户)',
            value: "",
            key: "coveredOldHousehold"
          },
          {
            cardType: 1,
            required: true,
            title: '已签约户数(户)',
            value: "",
            key: "coveredSignedHousehold"
          },
          {
            cardType: 1,
            required: true,
            title: '已确认户数(户)',
            value: "",
            key: "coveredConfirmHousehold"
          },
          {
            cardType: 1,
            required: true,
            title: '不可开发户数(户)',
            value: "",
            key: "coveredUnexploitableHousehold"
          },
          {
            cardType: 1,
            required: true,
            title: '剩余可开发户数(户)',
            value: "",
            key: "coveredExploitableHousehold"
          },
        ],
        data9: [{
            cardType: 3,
            required: true,
            title: '管网未覆盖区域老户开发情况',
          },
          {
            cardType: 1,
            required: true,
            title: '老户规模(户)',
            value: "",
            key: "uncoveredOldHousehold"
          },
          {
            cardType: 1,
            required: true,
            title: '已签约户数(户)',
            value: "",
            key: "uncoveredSignedHousehold"
          },
          {
            cardType: 1,
            required: true,
            title: '已确认户数(户)',
            value: "",
            key: "uncoveredConfirmHousehold"
          },
        ],
        data10: [{
            cardType: 4,
            required: false,
            title: '乡村燃气居民',
          },
          // 管网已覆盖_镇区
          {
            cardType: 3,
            required: true,
            title: '管网已覆盖_镇区',
          },
          {
            cardType: 4,
            title: '镇区',
          },
          {
            cardType: 1,
            required: true,
            title: '个数',
            value: "",
            key: "coveredTownsSituation",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: '总规模户数',
            value: "",
            key: "coveredTownsSituation",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: '累计可开发户数',
            value: "",
            key: "coveredTownsSituation",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: '累计财务确认安装户数',
            value: "",
            key: "coveredTownsSituation",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: '累计报装户数',
            value: "",
            key: "coveredTownsSituation",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: '累计点火通气户数',
            value: "",
            key: "coveredTownsSituation",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: '累计不可开发户数',
            value: "",
            key: "coveredTownsSituation",
            id: "6"
          },
          {
            cardType: 1,
            required: true,
            title: '剩余可安装确认户数',
            value: "",
            key: "coveredTownsSituation",
            id: "7"
          },
          // 管网已覆盖_自然村
          {
            cardType: 3,
            required: true,
            title: '管网已覆盖_自然村',
          },
          {
            cardType: 4,
            title: '自然村',
          },
          {
            cardType: 1,
            required: true,
            title: '个数',
            value: "",
            key: "coveredVillageSituation",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: '总规模户数',
            value: "",
            key: "coveredVillageSituation",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: '累计可开发户数',
            value: "",
            key: "coveredVillageSituation",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: '累计财务确认安装户数',
            value: "",
            key: "coveredVillageSituation",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: '累计报装户数',
            value: "",
            key: "coveredVillageSituation",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: '累计点火通气户数',
            value: "",
            key: "coveredVillageSituation",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: '累计不可开发户数',
            value: "",
            key: "coveredVillageSituation",
            id: "6"
          },
          {
            cardType: 1,
            required: true,
            title: '剩余可安装确认户数',
            value: "",
            key: "coveredVillageSituation",
            id: "7"
          },
          // 管网未覆盖、但符合农村燃气投资标准_镇区
          {
            cardType: 3,
            required: true,
            title: '管网未覆盖、但符合农村燃气投资标准_镇区',
          },
          {
            cardType: 4,
            title: '镇区',
          },
          {
            cardType: 1,
            required: true,
            title: '个数',
            value: "",
            key: "uncoveredTownsSituation",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: '总规模户数',
            value: "",
            key: "uncoveredTownsSituation",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: '累计可开发户数',
            value: "",
            key: "uncoveredTownsSituation",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: '累计财务确认安装户数',
            value: "",
            key: "uncoveredTownsSituation",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: '累计报装户数',
            value: "",
            key: "uncoveredTownsSituation",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: '累计点火通气户数',
            value: "",
            key: "uncoveredTownsSituation",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: '累计不可开发户数',
            value: "",
            key: "uncoveredTownsSituation",
            id: "6"
          },
          {
            cardType: 1,
            required: true,
            title: '剩余可安装确认户数',
            value: "",
            key: "uncoveredTownsSituation",
            id: "7"
          },
          //管网未覆盖、但符合农村燃气投资标准_自然村
          {
            cardType: 3,
            required: true,
            title: '管网未覆盖、但符合农村燃气投资标准_自然村',
          },
          {
            cardType: 4,
            title: '自然村',
          },
          {
            cardType: 1,
            required: true,
            title: '个数',
            value: "",
            key: "uncoveredVillageSituation",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: '总规模户数',
            value: "",
            key: "uncoveredVillageSituation",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: '累计可开发户数',
            value: "",
            key: "uncoveredVillageSituation",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: '累计财务确认安装户数',
            value: "",
            key: "uncoveredVillageSituation",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: '累计报装户数',
            value: "",
            key: "uncoveredVillageSituation",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: '累计点火通气户数',
            value: "",
            key: "uncoveredVillageSituation",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: '累计不可开发户数',
            value: "",
            key: "uncoveredVillageSituation",
            id: "6"
          },
          {
            cardType: 1,
            required: true,
            title: '剩余可安装确认户数',
            value: "",
            key: "uncoveredVillageSituation",
            id: "7"
          },
          // 合计
          {
            cardType: 3,
            required: true,
            title: '合计',
          },
          {
            cardType: 1,
            required: true,
            title: '个数',
            value: "",
            key: "totalSituation",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: '总规模户数',
            value: "",
            key: "totalSituation",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: '累计可开发户数',
            value: "",
            key: "totalSituation",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: '累计财务确认安装户数',
            value: "",
            key: "totalSituation",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: '累计报装户数',
            value: "",
            key: "totalSituation",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: '累计点火通气户数',
            value: "",
            key: "totalSituation",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: '累计不可开发户数',
            value: "",
            key: "totalSituation",
            id: "6"
          },
          {
            cardType: 1,
            required: true,
            title: '剩余可安装确认户数',
            value: "",
            key: "totalSituation",
            id: "7"
          },
        ],
        data11: [{
            cardType: 3,
            required: true,
            title: '乡村燃气居民情况说明',
          },
          {
            cardType: 2,
            required: true,
            value: "",
            key: "villageGasInfo"
          },
          {
            cardType: 3,
            required: true,
            title: '乡镇新户',
          },
          {
            cardType: 2,
            required: true,
            value: "",
            key: "townsNewUserInfo"
          },
          {
            cardType: 3,
            required: true,
            title: '农村气代媒 (气代柴薪)',
          },
          {
            cardType: 2,
            required: true,
            value: "",
            key: "townsGasCoal"
          },
        ],
        data12: [{
            cardType: 3,
            required: true,
            title: '工业用户',
          },
          {
            cardType: 2,
            required: true,
            value: "",
            key: "industryUser"
          },
          {
            cardType: 3,
            required: true,
            title: '商业公福用户',
          },
          {
            cardType: 2,
            required: true,
            value: "",
            key: "industryCommerceUser"
          },
          {
            cardType: 3,
            required: true,
            title: '工商业煤改气用户',
          },
          {
            cardType: 2,
            required: true,
            value: "",
            key: "commerceCoalGas"
          },
        ],
        data13: [{
          cardType: 2,
          required: true,
          value: "",
          key: "installPrice"
        }],
        data14: [{
            cardType: 4,
            required: true,
            title: `分析现有居民、工商业用户、加气站及批发、管输等用气情况，预测${this.fiscalYear}财年销气量`,
          },
          {
            cardType: 3,
            required: true,
            title: `截至目前已通气用户在${this.fiscalYear}财年的基础用气量`,
          },
          {
            cardType: 1,
            required: true,
            title: "居民",
            value: "",
            key: "baseSales",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: "商业",
            value: "",
            key: "baseSales",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: "工业",
            value: "",
            key: "baseSales",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: "加气站",
            value: "",
            key: "baseSales",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: "批发及其它",
            value: "",
            key: "baseSales",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: "管输",
            value: "",
            key: "baseSales",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: "合计",
            value: "",
            key: "baseSales",
            id: "6"
          },

          {
            cardType: 3,
            required: true,
            title: `预计到${parseInt(this.fiscalYear)-1}财年底通气/点火的用户在${parseInt(this.fiscalYear)}财年带来气量增长`,
          },
          {
            cardType: 1,
            required: true,
            title: "居民",
            value: "",
            key: "useSalesGrowth",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: "商业",
            value: "",
            key: "useSalesGrowth",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: "工业",
            value: "",
            key: "useSalesGrowth",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: "加气站",
            value: "",
            key: "useSalesGrowth",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: "批发及其它",
            value: "",
            key: "useSalesGrowth",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: "管输",
            value: "",
            key: "useSalesGrowth",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: "合计",
            value: "",
            key: "useSalesGrowth",
            id: "6"
          },


          {
            cardType: 3,
            required: true,
            title: `${parseInt(this.fiscalYear)-1}财年签约但在${parseInt(this.fiscalYear)}财年
            点火通气的用户在${parseInt(this.fiscalYear)}财年带来气量增长`,
          },
          {
            cardType: 1,
            required: true,
            title: "居民",
            value: "",
            key: "signSalesGrowth",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: "商业",
            value: "",
            key: "signSalesGrowth",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: "工业",
            value: "",
            key: "signSalesGrowth",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: "加气站",
            value: "",
            key: "signSalesGrowth",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: "批发及其它",
            value: "",
            key: "signSalesGrowth",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: "管输",
            value: "",
            key: "signSalesGrowth",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: "合计",
            value: "",
            key: "signSalesGrowth",
            id: "6"
          },

          {
            cardType: 3,
            required: true,
            title: `预计${parseInt(this.fiscalYear)}财年新签约点火通气的用户在${parseInt(this.fiscalYear)}财年带来气量增长`,
          },
          {
            cardType: 1,
            required: true,
            title: "居民",
            value: "",
            key: "predictSalesGrowth",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: "商业",
            value: "",
            key: "predictSalesGrowth",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: "工业",
            value: "",
            key: "predictSalesGrowth",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: "加气站",
            value: "",
            key: "predictSalesGrowth",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: "批发及其它",
            value: "",
            key: "predictSalesGrowth",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: "管输",
            value: "",
            key: "predictSalesGrowth",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: "合计",
            value: "",
            key: "predictSalesGrowth",
            id: "6"
          },

          {
            cardType: 3,
            required: true,
            title: `${parseInt(this.fiscalYear)}财年销气预测合计`,
          },
          {
            cardType: 1,
            required: true,
            title: "居民",
            value: "",
            key: "predictSalesTotal",
            id: "0"
          },
          {
            cardType: 1,
            required: true,
            title: "商业",
            value: "",
            key: "predictSalesTotal",
            id: "1"
          },
          {
            cardType: 1,
            required: true,
            title: "工业",
            value: "",
            key: "predictSalesTotal",
            id: "2"
          },
          {
            cardType: 1,
            required: true,
            title: "加气站",
            value: "",
            key: "predictSalesTotal",
            id: "3"
          },
          {
            cardType: 1,
            required: true,
            title: "批发及其它",
            value: "",
            key: "predictSalesTotal",
            id: "4"
          },
          {
            cardType: 1,
            required: true,
            title: "管输",
            value: "",
            key: "predictSalesTotal",
            id: "5"
          },
          {
            cardType: 1,
            required: true,
            title: "合计",
            value: "",
            key: "predictSalesTotal",
            id: "6"
          },
        ],
        data15: [{
            cardType: 3,
            required: true,
            title: "其他说明",
          },
          {
            cardType: 2,
            required: true,
            value: "",
            key: "otherInfo"
          },
          {
            cardType: 3,
            required: true,
            title: "汽车加气量无新增原因说明",
          },
          {
            cardType: 2,
            required: true,
            value: "",
            key: "carGasInfo"
          }
        ],
        data16: [{
          cardType: 2,
          required: true,
          value: "",
          key: "gasTrade"
        }],
        data17: [{
          cardType: 2,
          required: true,
          value: "",
          key: "priceSurvey"
        }],
        data18: [{
          cardType: 2,
          required: true,
          value: "",
          key: "outstandingPaymentNumber"
        }]

      }
    },
    computed: {

    },
    mounted() {
      this.initData()
    },
    methods: {
      initData() {
        console.log("newBuildingItem", JSON.parse(JSON.stringify(this.newBuildingItem)));
        console.log("newBuildingInfo", JSON.parse(JSON.stringify(this.newBuildingInfo)));
        console.log("reportData", JSON.parse(JSON.stringify(this.reportData)));
        // 逗号分隔分配
        const updateData = (dataArray, reportData) => {
          dataArray.forEach(data => {
            if (data.key in reportData) {
              let Arr = reportData[data.key].split(",");
              data.value = Arr[data.id];
            }
          });
        };

        // key直接分配
        const updateDataByKey = (dataArray, reportData) => {
          dataArray.forEach(data => {
            if (data.key in reportData) {
              data.value = reportData[data.key];
            }
          });
        };


        updateData(this.data1, this.reportData);
        updateData(this.data4, this.reportData);
        updateData(this.data5, this.reportData);
        updateData(this.data5add, this.reportData);
        updateData(this.data6, this.reportData);
        updateData(this.data10, this.reportData);
        updateData(this.data14, this.reportData);

        updateDataByKey(this.data7, this.reportData);
        updateDataByKey(this.data8, this.reportData);
        updateDataByKey(this.data9, this.reportData);
        updateDataByKey(this.data11, this.reportData);
        updateDataByKey(this.data12, this.reportData);
        updateDataByKey(this.data13, this.reportData);
        updateDataByKey(this.data15, this.reportData);
        updateDataByKey(this.data16, this.reportData);
        updateDataByKey(this.data17, this.reportData);
        updateDataByKey(this.data18, this.reportData);

        /* 动态添加data2 标题1=>列表1=>小计1=>标题2=>列表2=>小计2=>合计  */
        //标题1
        this.data2.push({
          cardType: 4,
          required: true,
          title: `${this.fiscalYear}年楼盘户数预计在未来三年安装确认的新建楼盘信息:预计${this.fiscalYear - 2}财年-${this.fiscalYear - 1}财年已签约且在${this.fiscalYear}财年安装确认项目`,
        }, {
          cardType: 3,
          required: true,
          title: `${this.fiscalYear - 2}财年及之前签约且在${this.fiscalYear}财年安装`
        }, )
        // 类型1动态列表1
        if (this.newBuildingInfo.newBuildingInfoDetails1 && this.newBuildingInfo.newBuildingInfoDetails1.length) {
          this.newBuildingInfo.newBuildingInfoDetails1.map(info1 => {
            console.log(info1);
            if (info1.name && info1.number && info1.predict) {
              this.data2.push({
                cardType: 1,
                required: true,
                title: '小区名称',
                value: info1.name,
                key: "communityName"
              }, {
                cardType: 1,
                required: true,
                title: '总规模户数',
                value: info1.number,
                key: "householdNumber"
              }, {
                cardType: 1,
                required: true,
                title: '预计安装户数',
                value: info1.predict,
                key: "predictInstallNumber"
              }, )
            }
          })
        }
        //小计1
        this.data2.push({
          cardType: 3,
          required: true,
          title: '小计'
        }, {
          cardType: 1,
          required: true,
          title: '总规模户数',
          value: this.reportData.householdNumberSubtotalBefore || 0,
          key: "xjhouseholdNumber"
        }, {
          cardType: 1,
          required: true,
          title: '预计安装户数',
          value: this.reportData.predictInstallSubtotalBefore || 0,
          key: "xjpredictInstallNumber"
        }, )
        //标题2
        this.data2.push({
          cardType: 3,
          required: true,
          title: `${this.fiscalYear - 1}财年签约且在${this.fiscalYear}财年安装`
        }, )
        // 类型1动态列表2
        if (this.newBuildingInfo.newBuildingInfoDetails2 && this.newBuildingInfo.newBuildingInfoDetails2.length) {
          this.newBuildingInfo.newBuildingInfoDetails2.map(info2 => {
            // if (info2.name && info2.number && info2.predict) {
            this.data2.push({
              cardType: 1,
              required: true,
              title: '小区名称',
              value: info2.name || "",
              key: "communityName"
            }, {
              cardType: 1,
              required: true,
              title: '总规模户数',
              value: info2.number || "",
              key: "householdNumber"
            }, {
              cardType: 1,
              required: true,
              title: '预计安装户数',
              value: info2.predict || "",
              key: "predictInstallNumber"
            }, )
            // }
          })
        }

        //小计2
        this.data2.push({
          cardType: 3,
          required: true,
          title: '小计'
        }, {
          cardType: 1,
          required: true,
          title: '总规模户数',
          value: this.reportData.householdNumberSubtotal || 0,
          key: "xjhouseholdNumber"
        }, {
          cardType: 1,
          required: true,
          title: '预计安装户数',
          value: this.reportData.predictInstallSubtotal || 0,
          key: "xjpredictInstallNumber"
        }, )
        //合计标题
        this.data2.push({
          cardType: 3,
          required: true,
          title: '合计'
        }, {
          cardType: 1,
          required: true,
          title: '总规模户数',
          value: this.reportData.householdNumberTotal || 0,
          key: "hjhouseholdNumber"
        }, {
          cardType: 1,
          required: true,
          title: '预计安装户数',
          value: this.reportData.predictInstallTotal || 0,
          key: "hjpredictInstallNumber"
        }, )
        console.log('动态列表1', JSON.parse(JSON.stringify(this.data2)));
        // 当前财年
        this.data3.push({
          cardType: 4,
          required: true,
          title: `预计${this.fiscalYear}-${parseInt(this.fiscalYear)+2}财年安装确认项目(预计${parseInt(this.fiscalYear)}财年签约，${this.fiscalYear}财年、${parseInt(this.fiscalYear)+1}财年、${parseInt(this.fiscalYear)+2}财年安装)`,
        }, {
          cardType: 3,
          required: true,
          title: `${parseInt(this.fiscalYear)}财年`,
        }, )

        // 类型2动态列表1
        if (this.newBuildingItem.buildingItemDetail1 && this.newBuildingItem.buildingItemDetail1.length) {
          this.newBuildingItem.buildingItemDetail1.map(build1 => {
            // if (build1.devName && build1.installTime && build1.name && build1.number && build1.time && build1.type) {
            console.log(build1);
            this.data3.push({
                cardType: 1,
                required: true,
                title: '楼盘名称',
                value: build1.name || "",
                key: "buildingItemDetail1",
                id: "name"
              }, {
                cardType: 1,
                required: true,
                title: '楼盘类型',
                value: build1.type || "",
                key: "buildingItemDetail1",
                id: "type"
              }, {
                cardType: 1,
                required: true,
                title: '开发商名称',
                value: build1.devName || "",
                key: "buildingItemDetail1",
                id: "devName"
              }, {
                cardType: 1,
                required: true,
                title: '预计管道天燃气安装户数',
                value: build1.number || "",
                key: "buildingItemDetail1",
                id: "number"
              }, {
                cardType: 1,
                required: true,
                title: '签约时间(含计划签约)',
                value: build1.time || "",
                key: "buildingItemDetail1",
                id: "time"
              }, {
                cardType: 1,
                required: true,
                title: '预计燃气安装',
                value: build1.installTime || "",
                key: "buildingItemDetail1",
                id: "installTime"
              },
              // {cardType: 1,required: true,title: `${parseInt(this.fiscalYear)}财年小计`,value: this.reportData.currentInstallSubtotal || "",key: "currentInstallSubtotal"},
            )
            // }
          })
        }

        // 财年小计
        this.data3.push({
          cardType: 1,
          required: true,
          title: `${parseInt(this.fiscalYear)}财年小计`,
          value: this.reportData.currentInstallSubtotal || "",
          key: "currentInstallSubtotal"
        })
        // 下一年标题
        this.data3.push({
          cardType: 3,
          required: true,
          title: `${parseInt(this.fiscalYear)+1}财年`,
        }, )

        // 类型1动态列表2
        if (this.newBuildingItem.buildingItemDetail2 && this.newBuildingItem.buildingItemDetail2.length) {

          this.newBuildingItem.buildingItemDetail2.map(build2 => {
            // if (build2.devName && build2.installTime && build2.name && build2.number && build2.time && build2.type) {
            console.log(build2);
            this.data3.push({
              cardType: 1,
              required: true,
              title: '楼盘名称',
              value: build2.name || "",
              key: "buildingItemDetail2",
              id: "name"
            }, {
              cardType: 1,
              required: true,
              title: '楼盘类型',
              value: build2.type || "",
              key: "buildingItemDetail2",
              id: "type"
            }, {
              cardType: 1,
              required: true,
              title: '开发商名称',
              value: build2.devName || "",
              key: "buildingItemDetail2",
              id: "devName"
            }, {
              cardType: 1,
              required: true,
              title: '预计管道天燃气安装户数',
              value: build2.number || "",
              key: "buildingItemDetail2",
              id: "number"
            }, {
              cardType: 1,
              required: true,
              title: '签约时间(含计划签约)',
              value: build2.time || "",
              key: "buildingItemDetail2",
              id: "time"
            }, {
              cardType: 1,
              required: true,
              title: '预计燃气安装',
              value: build2.installTime || "",
              key: "buildingItemDetail2",
              id: "installTime"
            }, {
              cardType: 1,
              required: true,
              title: `${parseInt(this.fiscalYear)+1}财年小计`,
              value: this.reportData.afterInstallSubtotal || "",
              key: "afterInstallSubtotal"
            }, )
            // }
          })
        }

        this.data3.push({
          cardType: 1,
          required: true,
          title: `${parseInt(this.fiscalYear)+1}财年小计`,
          value: this.reportData.afterInstallSubtotal || "",
          key: "afterInstallSubtotal"
        })

        this.data3.push({
          cardType: 3,
          required: true,
          title: `${parseInt(this.fiscalYear)+2}财年`,
        }, )

        // 类型2动态列表3
        if (this.newBuildingItem.buildingItemDetail3 && this.newBuildingItem.buildingItemDetail3.length) {
          this.newBuildingItem.buildingItemDetail3.map(build2 => {
            // if (build2.devName && build2.installTime && build2.name && build2.number && build2.time && build2.type) {
            console.log(build2);
            this.data3.push({
              cardType: 1,
              required: true,
              title: '楼盘名称',
              value: build2.name || "",
              key: "buildingItemDetail3",
              id: "name"
            }, {
              cardType: 1,
              required: true,
              title: '楼盘类型',
              value: build2.type || "",
              key: "buildingItemDetail3",
              id: "type"
            }, {
              cardType: 1,
              required: true,
              title: '开发商名称',
              value: build2.devName || "",
              key: "buildingItemDetail3",
              id: "devName"
            }, {
              cardType: 1,
              required: true,
              title: '预计管道天燃气安装户数',
              value: build2.number || "",
              key: "buildingItemDetail3",
              id: "number"
            }, {
              cardType: 1,
              required: true,
              title: '签约时间(含计划签约)',
              value: build2.time || "",
              key: "buildingItemDetail3",
              id: "time"
            }, {
              cardType: 1,
              required: true,
              title: '预计燃气安装',
              value: build2.installTime || "",
              key: "buildingItemDetail3",
              id: "installTime"
            }, {
              cardType: 1,
              required: true,
              title: `${parseInt(this.fiscalYear)+2}财年小计`,
              value: this.reportData.lastInstallSubtotal || "",
              key: "lastInstallSubtotal"
            }, )
            // }
          })
        }
        this.data3.push({
          cardType: 1,
          required: true,
          title: `${parseInt(this.fiscalYear)+2}财年小计`,
          value: this.reportData.lastInstallSubtotal || "",
          key: "lastInstallSubtotal"
        })

        this.data3.push({
          cardType: 1,
          required: true,
          title: '合计',
          value: this.newBuildingItem.installTotal || 0,
          key: "installTotal"
        }, )
        console.log('动态列表2', JSON.parse(JSON.stringify(this.data3)));
      }
    }
  }
</script>

<style lang="scss" scoped>

</style>
