<template>
  <div  style="width: 100%;background: #fff;min-height: 700px;" class="userCenterAuthenticationPersonal">
    <div v-show="$i18n.locale == 'zh'" style="height: 80px;line-height: 80px;margin-top: 20px;margin: 0 20px; color: #666;font-size: 15px; border-bottom: 1px solid #bcbcbc;">
      添加数据
      <!-- <span style="float: right;margin-top: 27px;"> <i class="el-icon-edit"></i> 修改</span> -->
    </div>
    <el-form v-show="$i18n.locale == 'zh'" ref="form" :model="geiAppDataWbTemp" label-width="160px" class="demo-ruleForm"  style="margin-left: 100px;margin-top: 20px;width: 700px;" :rules="formrules">
      <el-form-item label="地区:" prop='countryId'>
        <el-select v-model="geiAppDataWbTemp.countryId" placeholder="请选择地区类型" :disabled="false"  style="width: 70%;">
          <el-option
              v-for="item in originalCountryData"
              :key="item.value"
              :label="item.label"
              :value="item.value"
              :disabled="false">
          </el-option>
        </el-select>
      </el-form-item>

      <el-form-item :required="true" label="年份">
        <el-col :span="11">
          <el-date-picker  type="year"
                           placeholder="选择日期"
                           format="yyyy 年"
                           value-format="yyyy" v-model="geiAppDataWbTemp.dataYear" style="width: 100%;"></el-date-picker>
        </el-col>
      </el-form-item>

      <el-form-item  label="数值:" prop='dataValue' >
        <el-input v-model="geiAppDataWbTemp.dataValue" onkeyup="value=value.replace(/[^\d]/g,'')" :disabled="false" style="width: 70%;"  maxlength="15" show-word-limit></el-input>
      </el-form-item>
      <el-form-item  label="单位:" prop='unitCnName'  >
        <el-input v-model="geiAppDataWbTemp.unitCnName" :readonly="true" style="width: 70%;"   show-word-limit></el-input>
      </el-form-item>

      <div v-show="$i18n.locale == 'zh'" style="height: 200px;">
        <div style="margin-top: 100px;">
          <el-button type="warning" style="margin-left: 300px;" @click="save">保存</el-button>
          <el-button type="primary" style="margin-left: 30px;" @click="close">关闭</el-button>
        </div>
      </div>
    </el-form>
    <div v-show="$i18n.locale == 'en'" style="height: 80px;line-height: 80px;margin-top: 20px;margin: 0 20px; color: #666;font-size: 15px; border-bottom: 1px solid #bcbcbc;">
      Add data
      <!-- <span style="float: right;margin-top: 27px;"> <i class="el-icon-edit"></i> 修改</span> -->
    </div>
    <el-form v-show="$i18n.locale == 'en'" ref="form" :model="geiAppDataWbTemp" label-width="160px" class="demo-ruleForm"  style="margin-left: 100px;margin-top: 20px;width: 700px;" :rules="formrules">
      <el-form-item  label="Region:" prop='countryId' >
        <el-select v-model="geiAppDataWbTemp.countryId" placeholder="Please select region type" :disabled="false"  style="width: 70%;">
          <el-option
              v-for="item in originalCountryData"
              :key="item.label"
              :label="$i18n.locale=='en'?item.value:item.label"
              :value="item.value"
              :disabled="false">
          </el-option>
        </el-select>
      </el-form-item>

      <el-form-item :required="true" label="Year">
        <el-col :span="11">
          <el-date-picker  type="year"
                           placeholder="Select a date"
                           format="yyyy 年"
                           value-format="yyyy" v-model="geiAppDataWbTemp.dataYear" style="width: 100%;"></el-date-picker>
        </el-col>
      </el-form-item>

      <el-form-item label="Value:" prop='dataValue'>
        <el-input v-model="geiAppDataWbTemp.dataValue" onkeyup="value=value.replace(/[^\d]/g,'')" :disabled="false" style="width: 70%;"  maxlength="15" show-word-limit></el-input>
      </el-form-item>
      <el-form-item  label="Unit:" prop='unitCnName' >
        <el-input v-model="geiAppDataWbTemp.unitEnName" :readonly="true" style="width: 70%;"   show-word-limit></el-input>
      </el-form-item>

      <div v-show="$i18n.locale == 'en'" style="height: 200px;">
        <div style="margin-top: 100px;">
          <el-button type="warning" style="margin-left: 300px;" @click="save">save</el-button>
          <el-button type="primary" style="margin-left: 30px;" @click="close">close</el-button>
        </div>
      </div>
    </el-form>
  </div>

</template>
<script>
import { getDicts } from '@/api/dict'
import { saveOrUpdate, get } from '@/api/operation/gei/geiAppDataWbTemp'
import Base from "@/views/base/Base"

export default {
  name: 'geiAppDataWbForm',
  extends: Base,
  data () {
    return {
      yearList: [],
      canEdit: this.$route?.params?.canEdit??'',
      node:this.$route?.params?.key??'',
      geiAppDataWbTemp: {
        // id: 'd986ccfea40911eb8f108cec4bc03c2d',
        id: this.$route.query.key,
        countryId: '',
        countryCnName: '',
        countryEnName: '',
        countryType: '',
        indexId: '',
        indexCnName: '',
        indexEnName: '',
        indexCode: '',
        dataYear: '',
        dataQuarter: '',
        dataMonth: '',
        dataWeek: '',
        dataValue: '',
        dataFormattedValue: '',
        unitId: '',
        unitCnName: this.$route?.params?.key?.unitCnName??'',
        unitEnName: this.$route?.params?.key?.unitEnName??'',
        sourceId: '',
        sourceName: '',
        areaName: '',
        continentName: '',
        remark: '',
        createBy: '',
        createDate: '',
        updateBy: '',
        updateDate: '',
        isDelete: '',
      },
      countryName:'',
      originalCountryData: [
        {
          "id":"93BC2730ED0A402186F596F6A01C007E",
          "label":"世界",
          "value":"WORLD"
        },
        {
          "id":"A4E96E974CAF4406A81769A9B2D8C0AA",
          "label":"亚洲",
          "value":"ASIA"
        },
        {
          "id":"A213A97331144E96B8449F7E47812623",
          "label":"欧洲",
          "value":"EUROPE"
        },
        {
          "id":"BDD62BA9E4E7464FBD7F0613BDA83C4C",
          "label":"非洲",
          "value":"AFRICA"
        },
        {
          "id":"E2274D0DBF85416E88FD2829D27FDB7F",
          "label":"北美洲",
          "value":"NORTH AMERICA"
        },
        {
          "id":"5CAAB32FCD64433791D0781D04EC09A3",
          "label":"南美洲",
          "value":"SORTH AMERICA"
        },
        {
          "id":"BCFDB5A302004E918371A7C0CD4AB38A",
          "label":"大洋洲",
          "value":"OCEANIA"
        },
        {
          "id":"573E2688972E470C98FA49D58E664B1D",
          "label":"瑞士",
          "value":"SWITZERLAND",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"6C73289BCC8E431DA513809CD6FF54F0",
          "label":"泰国",
          "value":"THAILAND",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"6540E122473D4BCF9AF94B1A5B03662E",
          "label":"伊拉克",
          "value":"IRAQ",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"2CAD815A7FB24B60B6823B1C64F47887",
          "label":"加蓬",
          "value":"GABON",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"75A8933D5C114E9FB6C1FDD75DAE4D93",
          "label":"朝鲜",
          "value":"KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"31EF3623A17B41FB98EABD1DBB8881EB",
          "label":"巴基斯坦",
          "value":"PAKISTAN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"0500DDEFB8FD4E069DD93908EE437B64",
          "label":"塞内加尔",
          "value":"SENEGAL",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"5840498FF59F4821A1B06BC9B2E74772",
          "label":"哥伦比亚",
          "value":"COLOMBIA",
          "CONTINENT_NAME":"南美洲",
          "CONTINENT_EN_NAME":"SORTH AMERICA"
        },
        {
          "id":"504DCBD075DE4346BE742D6BA6706786",
          "label":"捷克",
          "value":"CZECH REPUBLIC",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"A1DBCF5A91474280837F1F5EAB3AA948",
          "label":"科威特",
          "value":"KUWAIT",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"85541C1FFEC94087B379D05D6DEA7581",
          "label":"科特迪瓦共和国",
          "value":"COTE O IVOIRE",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"CCAC8141A0734F7CB8FEA0989E064482",
          "label":"智利",
          "value":"CHILE",
          "CONTINENT_NAME":"南美洲",
          "CONTINENT_EN_NAME":"SORTH AMERICA"
        },
        {
          "id":"6428A41E57144447B77882B529D3BFC3",
          "label":"科索沃",
          "value":"KOSOVO",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"6B7C13CB91DF46C7BE5CCAD407785B19",
          "label":"俄罗斯",
          "value":"RUSSIAN FEDERATION",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"E2FDEEDD7D2E4966BF87CEA19B3E888D",
          "label":"苏里南",
          "value":"SURINAME",
          "CONTINENT_NAME":"南美洲",
          "CONTINENT_EN_NAME":"SORTH AMERICA"
        },
        {
          "id":"3E2C85B97438490D916C1A88A0250798",
          "label":"黎巴嫩",
          "value":"LEBANON",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"3662AC0D4DFB4DCC95260BDC27D4C77B",
          "label":"巴拿马",
          "value":"PANAMA",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        // 原数据名 台北
        // {
        //     "id":"B53640DF37884CB9B727F76FED8DA447",
        //     "label":"中国台湾",
        //     "value":"Taiwan",
        //     "CONTINENT_NAME":"亚洲",
        //     "CONTINENT_EN_NAME":"EAST ASIA"
        // },
        {
          "id":"601D2C141BA64255A544F4047D59D580",
          "label":"波黑",
          "value":"BOSNIA AND HERZEGOVINA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"71D343C6B78B4B7B8B959E1EC066DEA3",
          "label":"澳大利亚",
          "value":"AUSTRALIA",
          "CONTINENT_NAME":"大洋洲",
          "CONTINENT_EN_NAME":"OCEANIA"
        },
        {
          "id":"CF9663D63AC44462AC6E78A3755D897F",
          "label":"韩国",
          "value":"REPUBLIC OF KOREA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"C9F6A50A5F2449A5A23920409625217E",
          "label":"罗马尼亚",
          "value":"ROMANIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"C6562C7E36594E51A57DCCC9AAA23DB8",
          "label":"卡塔尔",
          "value":"QATAR",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"93DC3293ED88455B9B2B8CE24EB60282",
          "label":"马其顿",
          "value":"MACEDONIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"7183FA714DBC4BFBB01FC97799F65267",
          "label":"哈萨克斯坦",
          "value":"KAZAKHSTAN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"4059DE83E8964F579DCDE9ED1A1C6E3A",
          "label":"肯尼亚",
          "value":"KENYA",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"FFFDA84B71064EDE97A02B53FC89B792",
          "label":"柬埔寨",
          "value":"KAMPUCHEA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"826C1EEB979F4008A215AEA36B61A036",
          "label":"克罗地亚",
          "value":"CROATIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"AD3C438089A343DBA5B71F9CF2060E48",
          "label":"喀麦隆",
          "value":"CAMEROON",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"31CE0DC98D664A839B58108A804EA7E8",
          "label":"中国大陆和香港",
          "value":"CHINA(PR OF CHINA AND HONG KONG, CHINA);PR OF CHIN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"F7BA1D0893F540DC81C79097A9C99E0E",
          "label":"葡萄牙",
          "value":"PORTUGAL",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"6A66D8372B3646F9BF346A30710399F7",
          "label":"约旦",
          "value":"JORDAN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"EB35DC64AEB64D01B81B90CD6DF01FEB",
          "label":"波兰",
          "value":"POLAND",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"55447768ACF1476D84BD65D21363CC7E",
          "label":"日本",
          "value":"JAPAN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"93BC2730ED0A402186F596F6A01C007E",
          "label":"世界",
          "value":"WORLD",
          "CONTINENT_NAME":""
        },
        {
          "id":"710238915D5F46F3B3973DB3051FB354",
          "label":"文莱",
          "value":"BRUNEI DARUSSALAM",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"0D04802B8018451CBCE93D5D4072998C",
          "label":"秘鲁",
          "value":"PERU",
          "CONTINENT_NAME":"南美洲",
          "CONTINENT_EN_NAME":"SORTH AMERICA"
        },
        {
          "id":"96AF033A4CBC49A98C23316ED421723B",
          "label":"巴西",
          "value":"BRAZIL",
          "CONTINENT_NAME":"南美洲",
          "CONTINENT_EN_NAME":"SORTH AMERICA"
        },
        {
          "id":"67346E748C7F455EB31DBCB37FAF7061",
          "label":"斯洛伐克",
          "value":"SLOVAKIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"F573F9D0643E43D591E0BC08848C991E",
          "label":"中国以外亚洲市场",
          "value":"ASIA EXCLUDING CHINA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"4251645C24D747E7BFA987A6B9FCA988",
          "label":"牙买加",
          "value":"JAMAICA",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"8165E46817D34D789F33DE571C237724",
          "label":"巴拉圭",
          "value":"PARAGUAY",
          "CONTINENT_NAME":"南美洲",
          "CONTINENT_EN_NAME":"SORTH AMERICA"
        },
        {
          "id":"BE3891DF57034772A7411A5CF3E0DB6E",
          "label":"博茨瓦纳",
          "value":"BOTSWANA",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"7EC68C73841D405E8A3AA2F9F6D3149E",
          "label":"玻利维亚",
          "value":"BOLIVIA",
          "CONTINENT_NAME":"南美洲",
          "CONTINENT_EN_NAME":"SORTH AMERICA"
        },
        {
          "id":"4C247A0DED184FA9A6AFED7451A1CB06",
          "label":"津巴布韦",
          "value":"ZIMBABWE",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"75ECA6B7C8254E9DA989FE4BB90EBBE9",
          "label":"赞比亚",
          "value":"ZAMBIA",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"85E103B2FCD04CE097DB6342F4A61D52",
          "label":"以色列",
          "value":"ISRAEL",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"5C5AC3793AD34A71BA89648A3ACAFF9E",
          "label":"越南",
          "value":"VIET NAM",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"FB7269961C92407B9932A6731047C837",
          "label":"贝宁",
          "value":"BENIN",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"D90A752B8BA04765B556696B92119687",
          "label":"阿曼",
          "value":"OMAN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"EBF209BD8C0D4212B5D2C0A51F8F5276",
          "label":"也门",
          "value":"YEMEN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"2B73B93D4BE240D79AD72F3AE4B33724",
          "label":"爱尔兰",
          "value":"IRELAND",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"23F5A0AA5AA04270826A4CF2E191D58F",
          "label":"乌兹别克斯坦",
          "value":"UZBEKISTAN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"B585704CE5B44FE29F58F1B2D5150F13",
          "label":"尼日利亚",
          "value":"NIGERIA",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"064D469D7CA34893942004558B4B77BB",
          "label":"白俄罗斯",
          "value":"BYELORUSSIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"E93A5E4B9D3741898108A12DFB1A9E89",
          "label":"孟加拉",
          "value":"BANGLADESH",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"08BC3E6A97544AEA83D10CAF1902E86D",
          "label":"哥斯达黎加",
          "value":"COSTA RICA",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"DB7178FEF68D4197B2AE6EA539DD51C2",
          "label":"比利时",
          "value":"BELGIUM",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"57EAF14DE10847CEAF66AD7C4263A714",
          "label":"印度尼西亚",
          "value":"INDONESIA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"C231A60CF5EE4687BF8E724D86863F98",
          "label":"尼加拉瓜",
          "value":"NICARAGUA",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"8F9EAAC655AA481BBFB21F9D6690529F",
          "label":"伊朗",
          "value":"IRAN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"1AC7E0D3C61A4529BBBFF99B40589440",
          "label":"委内瑞拉",
          "value":"VENEZUELA",
          "CONTINENT_NAME":"南美洲",
          "CONTINENT_EN_NAME":"SORTH AMERICA"
        },
        {
          "id":"683CC8CE05674135BEFEA0315F52DA56",
          "label":"印度",
          "value":"INDIA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"282E0055E83A43DBA1E62F4747CA9CF5",
          "label":"尼泊尔",
          "value":"NEPAL",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"E5B5B0FD36F24F6B9527FA838BF1720E",
          "label":"乌克兰",
          "value":"UKRAINE",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"39B74F54EBDC436C90CA9120FF282CAC",
          "label":"冰岛",
          "value":"ICELAND",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"6A04D5C225624153A5F8743E87127DAF",
          "label":"纳米比亚",
          "value":"NAMIBIA",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"DB5BF878A2CA4D4F83AB0F2D8B48562E",
          "label":"乌拉圭",
          "value":"URUGUAY",
          "CONTINENT_NAME":"南美洲",
          "CONTINENT_EN_NAME":"SORTH AMERICA"
        },
        {
          "id":"F8F138EB29C74A09AB3038B22320B4AB",
          "label":"尼日尔",
          "value":"NIGER",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"FD4675360F974647BE3E1D8A06553219",
          "label":"巴林",
          "value":"BAHREIN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"A72EA3DA57AE43B69EC274C6E54842F0",
          "label":"阿塞拜疆",
          "value":"AZERBAIJAN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"28AC3A1EAFFC44508BDCE47C9C20AC17",
          "label":"土耳其",
          "value":"TURKEY",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"95EA9657BAB340B48DC4B2BBC82C9624",
          "label":"奥地利",
          "value":"AUSTRIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"F88D0F80BC584CC3AAAD58CF8B9BA291",
          "label":"突尼斯",
          "value":"TUNISIA",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"55646C38D9354B4287ACB15B50F03110",
          "label":"多哥",
          "value":"TOGO",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"CF93974467D640B4A8B76950002365A3",
          "label":"保加利亚",
          "value":"BULGARIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"F40486BE70634019AFD8EB8594F0F91D",
          "label":"意大利",
          "value":"ITALY",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"FA25AE6C5693447D8E27DEC06894D599",
          "label":"沙特阿拉伯",
          "value":"SAUDI ARABIA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"1BB9739B78B34830B14F61E35D42E923",
          "label":"亚美尼亚",
          "value":"ARMENIA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"D9107761819C49B093F3239BB5F192CF",
          "label":"匈牙利",
          "value":"HUNGARY",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"60496E7F128F459DB9B7797A275813B9",
          "label":"缅甸",
          "value":"BURMA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"25DA41161A154BAEAE82A039420345B3",
          "label":"阿根廷",
          "value":"ARGENTINA",
          "CONTINENT_NAME":"南美洲",
          "CONTINENT_EN_NAME":"SORTH AMERICA"
        },
        {
          "id":"88807A5531614B70A6CBC94C8126604F",
          "label":"海地",
          "value":"HAITI",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"4A40DB25F392452C9907B07356282A23",
          "label":"摩洛哥",
          "value":"MOROCCO",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"65C21B3F9BB34C848B24A89818141981",
          "label":"塔吉克斯坦",
          "value":"TAJIKISTAN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"7FE5A7B6F3F44BCEBAE6704AA84EAD0B",
          "label":"危地马拉",
          "value":"GUATEMALA",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"F7FBA0B8C73242C498F989D95C6D72F1",
          "label":"安哥拉",
          "value":"ANGOLA",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"D174B60B201C4EF8A5305E70E5CD4699",
          "label":"丹麦",
          "value":"DENMARK",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"4ECE66FF63FE4A5E8BBA87118C523517",
          "label":"黑山",
          "value":"MONTENEGRO",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"66FAF9C46E1A462AB79AB60473B9ED55",
          "label":"叙利亚",
          "value":"SYRIAN ARAB REPUBLIC",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"8AE75FE9DB624ED4B777ED6B86351CB0",
          "label":"蒙古",
          "value":"MONGOLIA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"888A6D8503CB421BB9BE67F7968D4DCC",
          "label":"阿尔及利亚",
          "value":"ALGERIA",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"C07CF7B5A78546BCBAFE6FDEE0FC285A",
          "label":"摩尔多瓦",
          "value":"MOLDOVA,REPUBLIC OF",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"5C8A46C7AE7A4D66B2C3B5E90FD14B43",
          "label":"挪威",
          "value":"NORWAY",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"6277A53FF128412A98884171E80ECA2E",
          "label":"洪都拉斯",
          "value":"HONDURAS",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"EF974A499A7746BFBF6C9FA18E854765",
          "label":"希腊",
          "value":"GREECE",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"D21D6859F1F64CCF9E5422418BA710E8",
          "label":"瑞典",
          "value":"SWEDEN",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"0FFDD7861F96483E919BA4F8D0042705",
          "label":"墨西哥",
          "value":"MEXICO",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"FB37D1383ED949EEA1B8C64FB06F14E3",
          "label":"菲律宾",
          "value":"PHILIPPINES",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"68E102BD0B2F4F98A2E7449925776745",
          "label":"直布罗陀",
          "value":"GIBRALTAR",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"F57CE016EB194C9C84AC11E79000F1E2",
          "label":"中国",
          "value":"CHINA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"133A39E02941482184F28E3EB045BCD0",
          "label":"莫桑比克",
          "value":"MOZAMBIQUE",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"FF9DBF83690A4DA0BAC417288CC09891",
          "label":"阿尔巴尼亚",
          "value":"ALBANIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"C63837CD0905411EBDBE97904DDE4892",
          "label":"加纳",
          "value":"GHANA",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"75944689DB4A433EB59CBC03E2C1B796",
          "label":"加拿大",
          "value":"CANADA",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"033B4F9368774A31A8FB79BF74EA3ECB",
          "label":"德国",
          "value":"GERMANY",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"5464E78A9045469C8A2604E557F23D9F",
          "label":"中国香港",
          "value":"CHINA, HONG KONG SAR",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"4F3BD0B96CE64E9BBC550195A19E4695",
          "label":"美国",
          "value":"UNITED STATES",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"D41AD0AE0DD4449C8F378396EFAD1AC1",
          "label":"斯洛文尼亚",
          "value":"SLOVENIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"D2B8A6E8EAAA40EFB69A94FEA48F4E06",
          "label":"西班牙",
          "value":"SPAIN",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"3CE7ECE54D48486FAE41FBE8F0B88F50",
          "label":"格鲁吉亚",
          "value":"GEORGIA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"B7EF71A5044D41EDB28472446BA0B1FE",
          "label":"苏丹",
          "value":"SUDAN",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"0106EFEF2B9F43D99853026B78913C7D",
          "label":"斯里兰卡",
          "value":"SRI LANKA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"4CC58F5C37BB4B6A975CDDAB0732301B",
          "label":"马耳他",
          "value":"MALTA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"1986F802AA6F4EF4B5C20299200FFBB2",
          "label":"毛里求斯",
          "value":"MAURITIUS",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"56D1B4B794844D95A25B12AC9B9587EF",
          "label":"利比亚",
          "value":"LIBYAN",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"1B09858256034996891E261549D6F962",
          "label":"立陶宛",
          "value":"LITHUANIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"6F6E1C215122498F80B6559773D73317",
          "label":"英国",
          "value":"UNITED KINGDOM",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"A2406263362743D1B93B28A08933CA12",
          "label":"新加坡",
          "value":"SINGAPORE",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"C6E0BA9A2B5A48EA8EF8F6F76E59ED6F",
          "label":"埃塞俄比亚",
          "value":"ETHIOPIA",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"B548BC0390BF4834B8A306E279433591",
          "label":"塞尔维亚",
          "value":"SERBIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"6D8790D8BB0641E1B927409C8E7BC8D9",
          "label":"芬兰",
          "value":"FINLAND",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"437D0BD487124B43831D7D279C51C824",
          "label":"荷兰",
          "value":"NETHERLANDS",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"C9C3C67866AE4028B89A2B27F07A94F8",
          "label":"土库曼",
          "value":"TURKMENISTAN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"305A245F80B540C7B48D4C2AC09E5675",
          "label":"拉脱维亚",
          "value":"LATVIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"0F134F079E98443E9DA6E842D64853AD",
          "label":"法国",
          "value":"FRANCE",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"74ADC96987484DAAAB8BF864FECF88DA",
          "label":"吉尔吉斯斯坦",
          "value":"KYRGYZSTAN",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"6CB68429BC814594BFAAADE429F732E2",
          "label":"爱沙尼亚",
          "value":"ESTONIA",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"996BA12B087540EAB395DFFD7CD698F6",
          "label":"南苏丹",
          "value":"SOUTH SUDAN",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"56F4F085B95447EB92605188EB2AF409",
          "label":"南非",
          "value":"SOUTH AFRICA",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"C4775AC98D094DE5A79C5181BA695861",
          "label":"萨尔瓦多",
          "value":"EL SALVADOR",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"84E1EF5BDDA54EED8E923B1044A19B5E",
          "label":"厄立特里亚",
          "value":"ERITREA",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"DF5D5A979CE041178C5392451CA06EF2",
          "label":"厄瓜多尔",
          "value":"ECUADOR",
          "CONTINENT_NAME":"南美洲",
          "CONTINENT_EN_NAME":"SORTH AMERICA"
        },
        {
          "id":"7DCDEEF1D9BA44F3B38958BC5AC53B3A",
          "label":"马来西亚",
          "value":"MALAYSIA",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"D8A5935CA71F406EA68F0C447AE74736",
          "label":"阿拉伯国家联盟",
          "value":"UNITED ARAB REPUBLIC",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"040291C6F4A74740942E4D3CA92DD9F7",
          "label":"塞浦路斯",
          "value":"CYPRUS",
          "CONTINENT_NAME":"亚洲",
          "CONTINENT_EN_NAME":"ASIA"
        },
        {
          "id":"7937BBCADC0C4298AC661BED1F453FDB",
          "label":"埃及",
          "value":"EGYPT",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"0B42850460F64B50BED332C5B78B817F",
          "label":"库拉索岛",
          "value":"CURA?AO",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"0AF5D192B4994F808F6D44971565A443",
          "label":"古巴",
          "value":"CUBA",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"6F5627761D924143BD176F52B18C9489",
          "label":"新西兰",
          "value":"NEW ZEALAND",
          "CONTINENT_NAME":"大洋洲",
          "CONTINENT_EN_NAME":"OCEANIA"
        },
        {
          "id":"0D0E50EFC34F47D584B1E46E2D82A0ED",
          "label":"卢森堡",
          "value":"LUXEMBOURG",
          "CONTINENT_NAME":"欧洲",
          "CONTINENT_EN_NAME":"EUROPE"
        },
        {
          "id":"654D1C80ACDB43A48597EF4182356DEE",
          "label":"刚果（布）",
          "value":"CONGO (REP. OF)",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        },
        {
          "id":"E45AA5CCD966471F8EB34198C6148EFB",
          "label":"多米尼加共和国",
          "value":"DOMINICAN REPUBLIC",
          "CONTINENT_NAME":"北美洲",
          "CONTINENT_EN_NAME":"NORTH AMERICA"
        },
        {
          "id":"A73835319E7A48699FEF95BC1059CE18",
          "label":"刚果（金）",
          "value":"CONGO (DEM. REP. OF)",
          "CONTINENT_NAME":"非洲",
          "CONTINENT_EN_NAME":"AFRICA"
        }
      ],
      sourceData:[
        {
          "id":4,
          "value":"世界银行"
        },
        {
          "id":4,
          "value":"英国石油公司(BP)"
        },
        {
          "id":12,
          "value":"EIA"
        },
        {
          "id":9,
          "value":"IEA"
        },
      ]
    }
  },
  computed: {
    originalCountryDataMap: function() {
      return this.originalCountryData.array2Obj("value", "label");
    },
    originalENCountryDataMap: function() {
      return this.originalCountryData.array2Obj("value", "value");
    },
    originalCountrysDataMap: function() {
      return this.originalCountryData.array2Obj("value", "id");
    },
    originalContinentDataMap: function() {
      return this.originalCountryData.array2Obj("value", "CONTINENT_NAME");
    },
    originalDataMap: function() {
      return this.originalCountryData.array2Obj("id", "value");
    },
    sourceDataMap:function (){
      return this.sourceData.array2Obj("value", "id");
    },
    formrules(){
      return{
        dataValue:[
          {required:true,message:this.$i18n.locale=='zh'?"请输入有效数值":"Please enter a valid value", trigger: 'blur'}
        ],
        countryId:[
          {
            required:true,message:this.$i18n.locale=='zh'?"请选择有效值":"Please enter a valid value"
          }
        ]
      }
    }
  },
  watch: {

  },
  mounted () {
    this.initData();
    this.$nextTick(() => {
      // this.layuiInit();
    });
  },
  methods: {
    save: function(){
      debugger
      if (this.geiAppDataWbTemp.id){
        this.geiAppDataWbTemp.id=this.geiAppDataWbTemp.id
      }

      if (this.node){
        let sources = JSON.parse( this.node.treeNodeData.source);
        let sourceKeys = Object.keys(sources);
        let aa;
        function tra(el){
          Object.keys(el).forEach((Key)=>{
            if(el[Key] instanceof Object){
              tra(el[Key])
            }else{
              aa = Key
            }
          })
        }
        tra(sources)
        this.geiAppDataWbTemp.sourceName=sourceKeys[0];
        this.geiAppDataWbTemp.sourceId=this.sourceDataMap[this.geiAppDataWbTemp.sourceName];
        this.geiAppDataWbTemp.indexCnName=aa;
        this.geiAppDataWbTemp.indexId=this.node.treeNodeData.id

      }else {
        this.geiAppDataWbTemp.indexId = this.node?.treeNodeData?.id ?? this.geiAppDataWbTemp.indexId;
        this.geiAppDataWbTemp.indexCnName = this.node?.treeNodeData?.indexName ?? this.geiAppDataWbTemp.indexCnName;
        this.geiAppDataWbTemp.sourceId = this.geiAppDataWbTemp.sourceId
        this.geiAppDataWbTemp.sourceName = this.geiAppDataWbTemp.sourceName;
      }
      this.geiAppDataWbTemp.indexEnName = this.node?.treeNodeData?.indexEnName ?? this.geiAppDataWbTemp.indexEnName;
      if (this.$i18n.locale == 'zh'){
        this.geiAppDataWbTemp.countryCnName = this.originalCountryDataMap[this.geiAppDataWbTemp.countryId];
        this.geiAppDataWbTemp.countryEnName = this.geiAppDataWbTemp.countryId;
        this.geiAppDataWbTemp.remark = this.originalCountrysDataMap[this.geiAppDataWbTemp.countryId];

      }else {
        this.geiAppDataWbTemp.countryCnName =  this.originalCountryData.filter(item=>item.id==this.geiAppDataWbTemp.countryId||item.value==this.geiAppDataWbTemp.countryId)[0].label;
        this.geiAppDataWbTemp.countryEnName = this.originalCountryData.filter(item=>item.id==this.geiAppDataWbTemp.countryId||item.value==this.geiAppDataWbTemp.countryId)[0].value;
        // this.geiAppDataWbTemp.ContinentTName = this.originalContinentDataMap[this.geiAppDataWbTemp.countryId];
        this.geiAppDataWbTemp.countryId = this.geiAppDataWbTemp.countryId
        this.geiAppDataWbTemp.remark = this.originalCountrysDataMap[this.geiAppDataWbTemp.countryId];
      }
      this.geiAppDataWbTemp.continentName = this.originalContinentDataMap[this.geiAppDataWbTemp.countryId];
// if (this.node){
//   let sources = JSON.parse( this.node.treeNodeData.source);
//   let sourceKeys = Object.keys(sources);
//   this.geiAppDataWbTemp.sourceName=sourceKeys[0];
//
// }
      this.geiAppDataWbTemp.countryType = "11";
      // this.geiAppDataWbTemp.sourceId = "4";
      // this.geiAppDataWbTemp.sourceName="世界银行";
      this.geiAppDataWbTemp.isDelete=0
      this.submitHandler((token) => {

        saveOrUpdate(JSON.stringify(this.geiAppDataWbTemp), token).then(res => {
          debugger
          this.$message({
            message: this.$i18n.locale.toUpperCase()=="ZH"?'提交成功':'Submitted successfully',
            type: 'success'
          });
          this.$router.go(-1);//返回上一层
        })

            .catch((error) => {
              this.$notify.error({
                title: 'common.Error',
                message: error.msg
              });

            })

      });
    },
    initData: function(){
      console.log('geiAppDataWbTemp',this.geiAppDataWbTemp.id)
      let date = new Date();
      let endYear = date.getFullYear();
      for(let i = 1900; i <= endYear; i++){
        let year = {
          "label":i.toString(),
          "value":i.toString()
        }
        this.yearList.push(year);
      }
      this.yearList.reverse();
      if(this.geiAppDataWbTemp.id){
        get(this.geiAppDataWbTemp.id).then(result => {
          var data = result.data;
          if(data) {
            this.geiAppDataWbTemp =  data.geiAppDataWbTemp || this.geiAppDataWbTemp;
            this.geiAppDataWbTemp.countryId = this.geiAppDataWbTemp.countryEnName;
          }
        });
      }

      getDicts('').then(result => {
        var data = result.data;
        if(data){
        }
      });
    },
    close(){
      this.$router.go(-1);
    },
    getCountryData(lang){
      let area = []
      if(lang == 'zh'){
        area=["世界","欧洲","亚洲","非洲","南美洲","北美洲","大洋洲"];
      }else{
        area=["WORLD","EUROPE","ASIA","AFRICA","SORTH AMERICA","NORTH AMERICA", "OCEANIA"];
      }
      area.forEach((item, i)=>{
        let unit = {};
        unit.label = item;
        unit.value = i;
        unit.children = [];
        this.countryData.push(unit)
      })
      if(lang=='zh'){
        this.countryData.forEach(item=>{
          this.originalCountryData.forEach(_item=>{
            if(_item.label== item.label){
              item.value = _item.id;
              item.disabled = false;
            };
            if(_item.CONTINENT_NAME == item.label){
              _item.label = _item.label;
              _item.value = _item.id;
              _item.disabled = false;
              item.children.push(_item);
            }
          })
        })
        // console.log('使用中文');
      }else{
        this.countryData.forEach(item=>{
          this.originalCountryData.forEach(_item=>{
            if(_item.value== item.label){
              item.value = _item.id;
              item.disabled = false;
            };
            if(_item.CONTINENT_EN_NAME == item.label){
              _item.label = _item.value;
              _item.value = _item.id;
              _item.disabled = false;
              item.children.push(_item);
            }
          })
        })
        // console.log('使用英文');
      }
      this.countryData[0].children=undefined
      let op = this.countryData
      // console.log(op,'已分组的144个国家和地区')
    },
    /*layuiInit: function(){
      var _this = this;
      layui.use(['element', 'form'], function(){
        var element = element
            ,form = layui.form;

        //自定义验证规则
        form.verify({
          title: function(value){
            if(value.length < 10){
              return '标题至少得10个字符哟';
            }
          }
          ,content: function(value){
            layedit.sync(editIndex);
          }
        });

        form.on('submit(savegeiAppDataWbTemp)', function(data){
          _this.save();
          return false;
        });
      });
    }*/
  }
}
</script>

<style scoped>

</style>