<style>
.domesticScenicSpotInfoManage .imgtag{
 height: 40px;
 color: #000;
}
  .domesticScenicSpotInfoManage .resourceImgAdd {
    width: 620px;
    margin: auto;
  }

  .domesticScenicSpotInfoManage .clearfix:after {
    content: "\0020";
    display: block;
    height: 0;
    clear: both;
  }

  .domesticScenicSpotInfoManage .resource-content {
    width: 100%;
    margin-top: 30px;
    font-size: 12px;
    min-width: 1200px;
  }

  .domesticScenicSpotInfoManage .resource-baseinfo {
    float: left;
    height: auto;
    width: 600px;
    margin: 0 0 20px 30px;
  }

  .domesticScenicSpotInfoManage .resource-imginfo {
    float: left;
    width: 510px;
    margin-top: 35px;
  }
/* .domesticScenicSpotInfoManage .open-time {
    float: left;
    min-height: 100vh;
    background-color: #000;
    margin-top: 35px;
  } */
  .domesticScenicSpotInfoManage .resource-lititle {
    display: block;
    border-left: 4px solid #e95252;
    padding-left: 10px;
    margin-bottom: 20px;
  }

  .domesticScenicSpotInfoManage .resource-baseinfo span {
    display: inline-block;
  }

  .domesticScenicSpotInfoManage .resource-name {
    width: 300px;
    height: 34px;
    background: rgba(255, 255, 255, 1);
    border-radius: 17px;
    outline: none;
    border: 1px solid #d6d6d6;
    padding-left: 10px;
  }

  .domesticScenicSpotInfoManage .common-lefttit {
    width: 80px;
    text-align: right;
    margin: 0 7px 0 8px;
    display: inline-block;
  }

  .domesticScenicSpotInfoManage .resource-net {
    position: relative;
  }

  .domesticScenicSpotInfoManage .resource-http {
    position: absolute;
    color: #999999;
    width: 70px !important;
    background-color: #f5f7fa;
    border-right: 1px solid #d1d1d1;
    height: 32px;
    border-top-left-radius: 17px;
    border-bottom-left-radius: 17px;
    top: 5px;
    left: 1px;
    text-align: center;
    line-height: 32px;
    text-align: center;
  }

  .domesticScenicSpotInfoManage .R1 {
    width: 300px;
    padding: 0 15px 0 80px;
    transition: all 0.3s ease-in-out;
  }

  .domesticScenicSpotInfoManage .areaInput {
    width: 300px;
    padding-right: 120px;
  }

  .domesticScenicSpotInfoManage .areaInput:focus {
    border: 1px solid #e95252;
  }

  .domesticScenicSpotInfoManage .map-icon {
    position: absolute;
    right: 1px;
    top: 1px;
    line-height: 32px;
    text-align: center;
    border-left: 1px solid #cccccc;
    border-top-right-radius: 17px;
    border-bottom-right-radius: 17px;
    padding-right: 15px;
    padding-left: 10px;
    cursor: pointer;
    display: inline-block;
    height: 32px;
    background-color: #f5f7fa;
  }

  .domesticScenicSpotInfoManage .map-icon i {
    margin: 0 5px;
    position: relative;
    top: 1px;
  }

  .domesticScenicSpotInfoManage .save-Btn {
    width: 90px;
    height: 30px;
    background: rgba(233, 82, 82, 1);
    border-radius: 15px;
    color: #fff;
    outline: none;
    cursor: pointer;
    margin-right: 20px;
  }

  .domesticScenicSpotInfoManage .cancel-Btn,
  .save-Btn:hover {
    opacity: 0.8;
  }

  .domesticScenicSpotInfoManage .cancel-Btn {
    width: 90px;
    height: 30px;
    background: rgba(255, 255, 255, 1);
    border-radius: 15px;
    color: #e95252;
    outline: none;
    cursor: pointer;
    border: 1px solid #e95252;
  }

  .domesticScenicSpotInfoManage .re-img {
    width: 140px;
    height: 93px;
    border-radius: 10px;
    float: left;
    margin: 0 30px 50px 0;
    position: relative;
  }

  .domesticScenicSpotInfoManage .re-img:first-child {
    margin-left: 0;
  }

  .domesticScenicSpotInfoManage .resource-imglist {
    width: 100%;
    height: auto;
    margin-top: 20px;
  }

  .domesticScenicSpotInfoManage .resource-imglist img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
  }

  .domesticScenicSpotInfoManage .add-img {
    margin-top: 20px;
  }

  .domesticScenicSpotInfoManage .reimg-add {
    width: 140px;
    height: 93px;
    background: rgba(236, 236, 236, 1);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
  }

  .domesticScenicSpotInfoManage .ad-one {
    display: none;
    background: rgba(0, 0, 0, 0.4);
    width: 100%;
    height: 100%;
    border-radius: 10px;
    position: absolute;
    top: 0;
    z-index: 999;
  }

  .domesticScenicSpotInfoManage .bigAdd {
    font-size: 50px;
    color: #d1d1d1;
    position: absolute;
    left: 45px;
    top: 10px;
  }

  .domesticScenicSpotInfoManage .imgzhe {
    display: none;
    background: rgba(0, 0, 0, 0.4);
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 93px;
    border-radius: 10px;
    position: absolute;
    top: 0;
  }

  .domesticScenicSpotInfoManage .reimg-add:hover .ad-one {
    display: block;
  }

  .domesticScenicSpotInfoManage .re-img:hover .imgzhe {
    display: block;
  }

  .domesticScenicSpotInfoManage .ad-one div {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    line-height: 32px;
    text-align: center;
    background: gray;
    color: #fff;
  }

  .domesticScenicSpotInfoManage .ad-one div:hover {
    background-color: #fff;
    color: #e95252;
  }

  .domesticScenicSpotInfoManage .re-upload {
    position: absolute;
    top: 30px;
    left: 30px;
  }

  .domesticScenicSpotInfoManage .re-find {
    position: absolute;
    top: 30px;
    right: 30px;
  }

  .domesticScenicSpotInfoManage .search-imgicon {
    padding-right: 20px;
    margin-left: -40px;
  }

  .domesticScenicSpotInfoManage .resAddImg {
    width: 520px;
    padding-right: 45px;
  }

  .domesticScenicSpotInfoManage .addimgContent {
    height: 290px;
    overflow: auto;
    margin: 30px 0 30px 25px;
    width: 545px;
  }

  .domesticScenicSpotInfoManage .addimgDiv {
    width: 160px;
    height: 155px;
    float: left;
    margin: 0 20px 15px 0;
    overflow: hidden;
  }

  .domesticScenicSpotInfoManage .addimgContent div:first-child {
    margin-left: 0;
  }

  .addimgContent div:nth-child(3n) {
    margin-right: 0;
  }

  .domesticScenicSpotInfoManage .itemImgdiv {
    width: 160px;
    height: 106px;
    position: relative;
  }

  .domesticScenicSpotInfoManage .itemImgdiv img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
  }

  .domesticScenicSpotInfoManage .imgseclet {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    position: absolute;
    top: 0;
    text-align: center;
    line-height: 106px;
    color: #e95252;
  }

  .icon-dagouyouquan {
    font-size: 25px;
  }

  .domesticScenicSpotInfoManage .test-1::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    background-color: #f5f5f5;
  }

  .domesticScenicSpotInfoManage .test-1::-webkit-scrollbar-track {
    background-color: #f5f5f5;
  }

  .domesticScenicSpotInfoManage .test-1::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background-color: #aaa;
    margin-bottom: 24px;
  }

  .domesticScenicSpotInfoManage .test-1:hover::-webkit-scrollbar {
    width: 4px;
    height: 4px;
    background-color: #f5f5f5;
  }

  .domesticScenicSpotInfoManage .addimg-btnlist {
    text-align: center;
  }

  .domesticScenicSpotInfoManage .addimg-select {
    font-size: 14px;
    color: #999999;
    float: right;
    margin-bottom: 10px;
    position: relative;
    bottom: 20px;
  }

  .domesticScenicSpotInfoManage .re-delte {
    width: 32px;
    height: 32px;
    background: gray;
    border-radius: 50%;
    text-align: center;
    display: inline-block;
    line-height: 32px;
    color: #fff;
    cursor: pointer;
  }

  .domesticScenicSpotInfoManage .re-delte:hover {
    color: #e95252;
    background: #fff;
  }

  .domesticScenicSpotInfoManage .imgDescription {
    font-size: 12px;
    margin-top: 12px;
    color: #333333;
    width: 100%;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .domesticScenicSpotInfoManage .el-upload-dragger {
    border: none;
  }

  .domesticScenicSpotInfoManage .res-span span:last-child {
    display: inline;
  }

  .domesticScenicSpotInfoManage .resourcerightTop span {
    display: inline-block;
  }

  .domesticScenicSpotInfoManage .sheshi {
    margin-bottom: 20px;
  }

  .domesticScenicSpotInfoManage .dialog-footer {
    padding-bottom: 30px;
  }

  .domesticScenicSpotInfoManage .btn-list {
    margin: 0 0 40px 30px;
  }

  .domesticScenicSpotInfoManage .input-with-select .el-input-group__prepend {
    background-color: #fff;
  }

  .domesticScenicSpotInfoManage .el-textarea__inner {
    resize: none;
    height: 120px;
    font-family: "微软雅黑";
  }

  .domesticScenicSpotInfoManage .R1:focus {
    border: 1px solid #e95252;
  }

  .domesticScenicSpotInfoManage .el-form-item__label {
    width: 96px;
    font-size: 12px;
  }

  .domesticScenicSpotInfoManage .el-form-item__error {
    left: 100px;
  }

  .domesticScenicSpotInfoManage .hotelDay {
    margin-left: 10px;
  }

  .domesticScenicSpotInfoManage .searchImgIcon {
    cursor: pointer;
  }

  .domesticScenicSpotInfoManage .el-dialog--center .el-dialog__body {
    padding: 25px 25px 0;
  }

  .domesticScenicSpotInfoManage .addressInput .el-input-group__append {
    border-top-right-radius: 17px;
    border-bottom-right-radius: 17px;
  }

  .domesticScenicSpotInfoManage ::-webkit-input-placeholder {
    color: #d1d1d1;
  }

  .domesticScenicSpotInfoManage :-moz-placeholder {
    color: #d1d1d1;
  }

  .domesticScenicSpotInfoManage ::-moz-placeholder {
    color: #d1d1d1;
  }

  .domesticScenicSpotInfoManage :-ms-input-placeholder {
    color: #d1d1d1;
  }

  .domesticScenicSpotInfoManage .el-switch.is-checked .el-switch__core {
    border-color: #4bca81;
    background-color: #4bca81;
  }

  .domesticScenicSpotInfoManage .orderAdd {
    position: relative;
    width: 340px;
  }

  .domesticScenicSpotInfoManage .minus:hover {
    background-color: #cccccc;
    cursor: pointer;
  }

  .domesticScenicSpotInfoManage .minus {
    width: 34px;
    height: 32px;
    border: #dcdfe6;
    color: #fff;
    text-align: center;
    line-height: 34px;
    position: absolute;
    left: 101px;
    border-radius: 50%;
    z-index: 999;
    top: 4px;
    background-color: #dcdfe6;
  }

  .domesticScenicSpotInfoManage .addPeople {
    width: 34px;
    height: 32px;
    top: 4px;
    background-color: #dcdfe6;
    color: #fff;
    text-align: center;
    line-height: 34px;
    position: absolute;
    right: 41px;
    border-radius: 50%;
    z-index: 999;
  }

  .domesticScenicSpotInfoManage .addPeople:hover {
    background-color: #cccccc;
    cursor: pointer;
  }

  .domesticScenicSpotInfoManage .orderAdd .el-input__inner {
    padding-left: 90px;
  }

  .domesticScenicSpotInfoManage .littleadd {
    font-size: 12px !important;
    color: #fff;
    display: inline-block;
  }

  .domesticScenicSpotInfoManage .footabs {
    width: 300px;
    min-height: 34px;
    border: 1px solid #d1d1d1;
    margin-left: 10px;
    display: inline-block;
    background-color: #fff;
    padding: 5px 10px;
    display: flex;
    flex-wrap: wrap;
  }

  .domesticScenicSpotInfoManage .foodtips {
    display: inline-block;
    padding: 3px 5px;
    background-color: #efefef;
    margin: 3px;
    position: relative;
  }

  .domesticScenicSpotInfoManage .toolOne {
    margin: 0 0 28px 38px;
    display: flex;
  }

  .domesticScenicSpotInfoManage .foodTipsDiv {
    max-width: 200px;
    display: inline;
  }

  .domesticScenicSpotInfoManage .wInput {
    border: none;
    height: 30px;
  }

  .domesticScenicSpotInfoManage .wInput .el-input__inner {
    border: none !important;
    height: 28px;
    padding: 0;
    border-radius: 0;
    margin-top: 2px;
  }

  .domesticScenicSpotInfoManage .delTips {
    position: absolute;
    right: -5px;
    top: -5px;
    cursor: pointer;
    color: #999;
    font-size: 14px;
  }

  .domesticScenicSpotInfoManage .delTips:hover {
    color: #e95252;
  }

  .domesticScenicSpotInfoManage .fanyong {
    font-size: 12px;
    color: #666666;
    margin-right: 10px;
  }

  .domesticScenicSpotInfoManage .footabs .el-tag {
    margin: 0 5px 5px 0;
  }

  .domesticScenicSpotInfoManage .footabs .el-input__inner {
    height: 30px;
    position: relative;
  }

  .domesticScenicSpotInfoManage .button-new-tag {
    height: 30px;
    line-height: 30px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .domesticScenicSpotInfoManage .input-new-tag {
    width: 90px;
    margin-left: 10px;
    vertical-align: bottom;
  }

  .domesticScenicSpotInfoManage .el-dialog--center .el-dialog__body {
    padding: 15px 25px 0 !important;
  }

  .domesticScenicSpotInfoManage .mapList {
    width: 850px !important;
    /* height: 510px !important; */
  }

  .domesticScenicSpotInfoManage .fanbili {
    margin-top: 8px;
  }

  .domesticScenicSpotInfoManage .RabateDiv {
    margin-left: 10px;
  }

  .domesticScenicSpotInfoManage .RebateCount {
    height: 34px;
    border-radius: 17px;
    float: left;
  }

  .domesticScenicSpotInfoManage .reOne,
  .domesticScenicSpotInfoManage .reTwo,
  .domesticScenicSpotInfoManage .dayNum {
    position: relative;
  }

  .domesticScenicSpotInfoManage .leftPnum {
    float: left;
    width: 50px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-right: 1px solid #cccccc;
    position: absolute;
    left: 1px;
    top: 1px;
    border-top-left-radius: 17px;
    border-bottom-left-radius: 17px;
  }

  .domesticScenicSpotInfoManage .toolInput {
    height: 34px;
    padding-left: 5px;
    border: none;
  }

  .domesticScenicSpotInfoManage .inpuOne {
    width: 135px;
    padding-left: 55px;
    border: 1px solid #d1d1d1;
    border-right: none;
  }

  .domesticScenicSpotInfoManage .inpuTwo {
    width: 166px;
    padding: 0 45px 0 55px;
    border: 1px solid #d1d1d1;
  }

  .domesticScenicSpotInfoManage .percentCon {
    float: right;
    width: 40px;
    height: 32px;
    text-align: center;
    border-left: 1px solid #cccccc;
    line-height: 32px;
    border-top-right-radius: 17px;
    border-bottom-right-radius: 17px;
    position: absolute;
    right: 1px;
    top: 1px;
  }

  .domesticScenicSpotInfoManage .fanNum {
    float: left;
    width: 50px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-right: 1px solid #cccccc;
    position: absolute;
    left: 1px;
    top: 1px;
  }

  .domesticScenicSpotInfoManage .fdTag {
    margin-top: 13px;
  }

  .domesticScenicSpotInfoManage .addAddress .el-input__inner {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border: 1px solid #d1d1d1 !important;
  }

  .domesticScenicSpotInfoManage .el-input-group__append {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }
.domesticScenicSpotInfoManage #imageUploader{
    display: none !important;
}
</style>
<template>
  <div class="flexOne domesticScenicSpotInfoManage">
    <div class="resource-content clearfix">
      <el-form :model="addMsg" :rules="rules" ref="addMsg">
        <div class="resource-baseinfo">
          <span class="resource-lititle">{{$t('hotel.hotel_baseinfo')}}</span>
          <el-form-item :label="$t('scen.sc_resName')" prop="Name">
            <el-input type="text" v-model="addMsg.Name" maxlength="100" class="w300"></el-input>
          </el-form-item>
          <!-- <el-form-item :label="$t('objFill.v101.jinqufenl')" prop="FoodType">
               <el-cascader
                style="width:300px"
                 @change="handleChange"
                 v-model="addMsg.FoodType"
                 :show-all-levels='false'
                 :options="scenicList"
                 :props="{
                   checkStrictly: true,
                   label:'Name',
                   value:'ID',
                   children:'ChildrenList',
                   emitPath:false
                  }"
                 clearable>
                </el-cascader>
          </el-form-item> -->
          <el-form-item :label="$t('objFill.v101.jinqufenl')" prop="FoodType">
            <el-select v-model="addMsg.FoodType" class='w300' :placeholder="$t('pub.pleaseSel')">
              <el-option v-for="item in scenicList" :key="item.ID" :label="item.Name" :value="item.ID">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="$t('objFill.v101.Rest.shifoushangj')" prop="IsShelves">
              <el-radio v-model="addMsg.IsShelves" :label="0">{{$t('Operation.Op_shangjia')}}</el-radio>
              <el-radio v-model="addMsg.IsShelves" :label="1">{{$t('Operation.Op_xiajia')}}</el-radio>
          </el-form-item>

          <el-form-item :label="$t('hotel.hotel_province')">
            <el-select :placeholder="$t('objFill.qxzshen')" filterable class='multiple_input w300' v-model="addMsg.Province"
              @change="GetSubAreaList(addMsg.Province,2),addMsg.City=0,addMsg.District=0">
              <el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
              <el-option v-for="childItem in ProvinceList" :key="childItem.ID" :label="childItem.Name"
                :value="childItem.ID">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="$t('hotel.hotel_city')">
            <el-select :placeholder="$t('objFill.qxzshi')" filterable @change="GetSubAreaList(addMsg.City,3),addMsg.District=0" class='multiple_input w300' v-model="addMsg.City">
              <el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
              <el-option v-for="childItem in CityList" :key="childItem.ID" :label="childItem.Name"
                :value="childItem.ID">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item :label="$t('hotel.hotel_area')">
            <el-select v-model="addMsg.District" class="w300" @change="getArea" filterable :placeholder="$t('hotel.hotel_area')">
              <el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
              <el-option v-for="item in district" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
            </el-select>
          </el-form-item>

          <el-form-item :label="$t('hotel.hotel_detailinfo')" prop="Address">
            <el-input :placeholder="$t('fnc.qsrneirong')" class="w300 addAddress" v-model="addMsg.Address">
              <el-button slot="append" @click="selectAddress = true" icon="iconfont icon-img_dw"></el-button>
            </el-input>
          </el-form-item>
          <div class="toolOne">
            <span class="fanbili">{{$t('objFill.diliweizhi')}}</span>
            <div class="RabateDiv clearfix">
              <div class="RebateCount reOne">
                <div class="leftPnum">{{$t('objFill.jingdu')}}</div>
                <input type="text" class="toolInput inpuOne" v-model="addMsg.Lng" maxlength="20">
              </div>
              <div class="RebateCount reTwo">
                <div class="fanNum">{{$t('objFill.weidu')}}</div>
                <input type="text" class="toolInput inpuTwo" v-model="addMsg.Lat" maxlength="20">
              </div>
            </div>
          </div>

          <el-form-item :label="$t('scen.sc_tel')" prop="Tel">
            <el-input type="text" maxlength="20" v-model="addMsg.Tel" class="w300"></el-input>
          </el-form-item>
           <el-form-item :label="$t('restaurant.res_salePlatform')">
            <el-select v-model="openplatString" class='multiple_input w300' multiple :placeholder="$t('pub.pleaseSel')">
              <el-option v-for="item in openplatform" :key="item.ID" :label="item.Name" :value="item.ID">
              </el-option>
            </el-select>
          </el-form-item>
           <span class="resource-lititle">{{$t('objFill.kaifangtime')}}
               <el-tooltip
              class="item"
              effect="dark"
              :content="$t('objFill.v101.Rest.tianjiakfshij')"
              placement="top-end"
            >
              <el-button
                type="primary"
                icon="el-icon-plus"
                circle
                style="margin-left: 10px"
                @click="addOpenTime"
              ></el-button>
            </el-tooltip>
           </span>
          <div v-for="(item,index) in addMsg.OpenTimeList" :key="index">
              <template v-if="index!=0">
                   <el-form-item :label="$t('system.table_operation')" prop="StartDay">
                   <el-tooltip
                   class="item"
                   effect="dark"
                   :content="$t('objFill.v101.Rest.shanchukfsj')"
                   placement="top-end"
                  >
                <el-button
                  type="danger"
                  icon="el-icon-delete"
                  circle
                  size="small"

                  @click="delOpenTime(index)"
                  ></el-button>
                  </el-tooltip>
               </el-form-item>
              </template>
              <template>
                 <el-form-item :label="$t('objFill.v101.kaifanksriq')" prop="StartDay">
                     <el-date-picker
                         v-model="item.StartDay"
                         type="date"
                         :placeholder="$t('objFill.v101.kaifanksriq')"
                         format="MM - dd "
                         value-format="MM-dd"
                         :picker-options="{
                             disabledDate: (time) => {
                                if (item.EndDay != '') {
                                  return time.getTime() >= new Date(new Date().getFullYear()+'-'+item.EndDay).getTime()
                                }
                             }
                         }">
                    </el-date-picker>
                </el-form-item>
                <el-form-item :label="$t('objFill.v101.kaifanjsriq')" prop="EndDay">
                    <el-date-picker
                         v-model="item.EndDay"
                         type="date"
                         :placeholder="$t('objFill.v101.kaifanjsriq')"
                         format="MM - dd "
                         value-format="MM-dd"
                         :picker-options="{
                             disabledDate: (time) => {
                                if (item.StartDay != '') {
                                  return time.getTime() <= new Date(new Date().getFullYear()+'-'+item.StartDay).getTime()
                                }
                             }
                         }">
                    </el-date-picker>
                 </el-form-item>
              </template>
              <template>
                 <el-form-item :label="$t('objFill.v101.shifouscin')" prop="OpeningHours">
                    <el-radio v-model="item.IsNextYear" :label="1">{{$t('pub.yes')}}</el-radio>
                    <el-radio v-model="item.IsNextYear" :label="0">{{$t('pub.no')}}</el-radio>
                </el-form-item>
              </template>
              <template>
                 <el-form-item :label="$t('objFill.v101.Rest.yinyekaiszhou')" prop="OpeningHours">
                    <el-select
                    v-model="item.BusinessStartWeek"
                    filterable
                    allow-create
                    :placeholder="$t('pub.pleaseSel')"
                    >
                    <el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
                    <el-option
                    v-for="item in weekEnumList"
                    :key="item.ID"
                    :label="item.Name"
                    :value="item.ID"
                    >
                    </el-option>
                    </el-select>
                </el-form-item>
                <el-form-item :label="$t('objFill.v101.Rest.yinyejieszhou')" prop="OpeningHours">
                    <el-select
                    v-model="item.BusinessEndWeek"
                    filterable
                    allow-create
                    :placeholder="$t('pub.pleaseSel')"
                    >
                    <el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
                    <el-option
                    v-for="item in weekEnumList"
                    :key="item.ID"
                    :label="item.Name"
                    :value="item.ID"
                    >
                    </el-option>
                    </el-select>
                 </el-form-item>
              </template>
              <template>
                 <el-form-item :label="$t('objFill.v101.Rest.yinyekaissj')"prop="OpeningHours">
                    <el-time-select
                        v-model="item.StartTime"
                        :picker-options="{
                        start: '00:00',
                        step: '00:15',
                        end: '23:45',
                        maxTime:item.EndTime
                        }"
                        :placeholder="$t('pub.ChoiceTime')">
                    </el-time-select>
                </el-form-item>
                <el-form-item :label="$t('objFill.v101.Rest.yinyejiessj')" prop="OpeningHours">
                    <el-time-select
                        v-model="item.EndTime"
                        :picker-options="{
                        start: '00:00',
                        step: '00:15',
                        end: '23:45',
                        minTime:item.StartTime
                        }"
                        :placeholder="$t('pub.ChoiceTime')">
                     </el-time-select>
                 </el-form-item>
              </template>
              <template>
                 <el-form-item :label="$t('objFill.v101.jinzhirysj')" prop="OpeningHours">
                    <el-time-select
                        v-model="item.StopTime"
                        :picker-options="{
                        start: '00:00',
                        step: '00:15',
                        end: '23:45'
                        }"
                     :placeholder="$t('pub.ChoiceTime')">
                     </el-time-select>
                </el-form-item>
                <el-form-item :label="$t('advmanager.v_free')">
                  <el-select v-model="addMsg.IsFree" class='multiple_input' :placeholder="$t('pub.pleaseSel')">
                    <el-option v-for="item in IsFreeList" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </template>

          </div>
          <!-- <span class="resource-lititle sheshi">{{$t('restaurant.res_detailInformation')}}</span> -->

          <!-- <el-form-item :label="$t('restaurant.res_advanceDays')" prop="DieLine">
            <el-input type="text" maxlength="10" class="w300" v-model="addMsg.DieLine"
              @keyup.native="checkInteger(addMsg,'DieLine')"></el-input>&nbsp;{{$t('hotel.hotel_day')}}
          </el-form-item> -->
          <!-- <el-form-item :label="$t('objFill.shifouyuyue')">
            <el-switch v-model="addMsg.AppointmentStyle" :active-value="inActive" :inactive-value="notInActive">
            </el-switch>
          </el-form-item> -->
          <!-- <el-form-item :label="$t('objFill.zffs')">
            <el-select v-model="addMsg.PayStyle" class='multiple_input w300' :placeholder="$t('pub.pleaseSel')"
              :disabled="IsHaveAuth==1?false:true">
              <el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
              <el-option v-for="item in PayList" :key="item.Id" :label="item.Name" :value="item.Id">
              </el-option>
            </el-select>
          </el-form-item> -->
          <!-- <el-form-item label="是否免费">
            <el-select v-model="addMsg.IsFree" class='multiple_input w300' :placeholder="$t('pub.pleaseSel')">
              <el-option v-for="item in IsFreeList" :key="item.value" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
          </el-form-item> -->
          <!-- <div class="toolOne">
            <span class="fanbili">{{$t('scen.sc_etTime')}}</span>
            <div class="RabateDiv clearfix">
              <div class="RebateCount reOne">
                <div class="leftPnum">{{$t('salesModule.Hour')}}</div>
                <input type="text" class="toolInput inpuOne" v-model="addMsg.PlayTimeHour" maxlength="20">
              </div>
              <div class="RebateCount reTwo">
                <div class="fanNum">{{$t('objFill.fenzhong')}}</div>
                <input type="text" class="toolInput inpuTwo" v-model="addMsg.PlayTimeMinutes" maxlength="20">
              </div>
            </div>
          </div> -->
        </div>
        <div class="resource-imginfo">
          <div class="resourcerightTop">
            <!-- <div class="toolOne">
              <span class="fanbili">{{$t('restaurant.res_commissionColumn')}}</span>
              <div class="RabateDiv clearfix">
                <div class="RebateCount reOne">
                  <div class="leftPnum">{{$t('admin.admin_personNumber')}}</div>
                  <input type="text" class="toolInput inpuOne" v-model="addMsg.RebateCount"
                    onkeyup="value=value.replace(/[^\d]/g,'')" maxlength="20">
                </div>
                <div class="RebateCount reTwo">
                  <div class="fanNum">{{$t('restaurant.res_return')}}</div>
                  <input type="text" class="toolInput inpuTwo" v-model="addMsg.RebateRatio"
                    onkeyup="value=value.replace(/[^\d]/g,'')" maxlength="20">
                  <div class="percentCon">%</div>
                </div>
              </div>
            </div> -->

            <div class="toolOne">
              <span class="fdTag">{{$t('scen.sc_foodLabels')}}</span>
              <div class="footabs">
                <el-tag :key="tag" v-for="tag in tipsList" closable :disable-transitions="false"
                  @close="handleClose(tag)">{{tag}}</el-tag>
                <el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" maxlength="6"
                  ref="saveTagInput" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm">
                </el-input>
                <el-button v-else class="button-new-tag" size="small" @click="showInput">+ {{$t('pub.addBtn')}}
                </el-button>
              </div>
            </div>
            <div class="toolOne">
              <span class="fdTag">{{$t('scen.sc_dlTag')}}</span>
              <div class="footabs">
                <el-tag :key="tag" v-for="tag in Geographic" closable :disable-transitions="false"
                  @close="handleClose2(tag)">{{tag}}</el-tag>
                <el-input class="input-new-tag" v-if="inputVisible2" v-model="inputValue2"
                  ref="saveTagInput" size="small" @keyup.enter.native="handleInputConfirm2" @blur="handleInputConfirm2">
                </el-input>
                <el-button v-else class="button-new-tag" size="small" @click="showInput2">+ {{$t('pub.addBtn')}}
                </el-button>
              </div>
            </div>
            <el-form-item :label="$t('restaurant.res_special')">
              <!-- <el-input type="textarea" class="w300" maxlength="1000" v-model="addMsg.Feature"></el-input> -->
                <div class="w300" style="margin-left:96px">
                  <my-edit  v-on:edit-value="addMsg.Feature  = arguments[0]" v-bind:editValue="addMsg.Feature"
                    v-bind:toolbarShow="toolbar"  v-bind:referenceList="DefaultList" v-bind:placeholder="placeholder"></my-edit>
                </div>
            </el-form-item>
            <el-form-item :label="$t('objFill.v101.guanfanggg')" prop="TicketNotice">
              <!-- <el-input type="textarea" maxlength="1000" v-model="addMsg.TicketNotice" class="w300"></el-input> -->
                <div class="w300" style="margin-left:96px">
                  <my-edit  v-on:edit-value="addMsg.TicketNotice  = arguments[0]" v-bind:editValue="addMsg.TicketNotice"
                    v-bind:toolbarShow="toolbar"  v-bind:referenceList="DefaultList" v-bind:placeholder="placeholder"></my-edit>
                </div>
            </el-form-item>
            <el-form-item :label="$t('Operation.Op_Warmprompt')" prop="About">
              <!-- <el-input type="textarea" maxlength="1000" v-model="addMsg.About" class="w300"></el-input> -->
                <div class="w300" style="margin-left:96px">
                  <my-edit  v-on:edit-value="addMsg.About  = arguments[0]" v-bind:editValue="addMsg.About"
                    v-bind:toolbarShow="toolbar"  v-bind:referenceList="DefaultList" v-bind:placeholder="placeholder"></my-edit>
                </div>
            </el-form-item>
            <el-form-item :label="$t('objFill.v101.goupiaoxuzhi')" prop="BookingInfo">
              <!-- <el-input type="textarea" maxlength="1000" v-model="addMsg.BookingInfo" class="w300"></el-input> -->
                <div class="w300" style="margin-left:96px">
                  <my-edit  v-on:edit-value="addMsg.BookingInfo  = arguments[0]" v-bind:editValue="addMsg.BookingInfo"
                    v-bind:toolbarShow="toolbar"  v-bind:referenceList="DefaultList" v-bind:placeholder="placeholder"></my-edit>
                </div>
            </el-form-item>
            <!-- <el-form-item :label="$t('restaurant.res_WhetherToConfirm')">
              <el-switch v-model="addMsg.Sure" active-value="1" inactive-value="0"></el-switch>
            </el-form-item> -->

            <!-- <el-form-item>
              <el-switch v-model="isBook" active-color="#13ce66" inactive-color="#ff4949" :active-text="$t('hotel.hotel_Supplier')"
                :inactive-text="$t('objFill.ziding')"></el-switch>
            </el-form-item>
            <el-form-item :label="$t('objFill.shifoubhld')">
              <el-switch v-model="addMsg.IsIncludeLeader" :active-value="0" :inactive-value="1"></el-switch>
            </el-form-item> -->
          </div>
          <span class="resource-lititle">{{$t('hotel.hotel_imgintroduce')}}</span>
          <div class="resource-list">
            <div class="resource-imglist clearfix">
              <div class="re-img" v-for="(item,index) in TicketCouponsImageArray" :key="item.subCode">
                <img v-if="!item" src="../../assets/img/bg_c3@3x.png">
                <img :src="item.ShowPath" :onerror='defaultImg' />
                 <div class="imgtag resTypeList">
                  <el-input v-model="item.TagName"
                    ><div slot="prepend">{{$t('objFill.biaoqian')}}</div></el-input>
                 </div>
                <div class="imgzhe">
                  <div class="re-delte"><i @click.stop="showImg(item.ShowPath)" class="iconfont icon-img_cz"></i></div>
                  <div class="re-delte" @click="delImg(index)"><i class="iconfont icon-xingzhuang"></i></div>
                  <div class="re-delte" @click.stop="ExchangeImg(index,0)" v-if="index!=0&&item.ShowPath">
                    <i class="iconfont icon-zuoyi"></i>
                  </div>
                  <div class="re-delte" @click.stop="ExchangeImg(index,1)"
                    v-if="index!=TicketCouponsImageArray.length-1&&item.ShowPath">
                    <i class="iconfont icon-youyi"></i>
                  </div>
                </div>
              </div>
            </div>
            <div class="add-img">
              <div class="reimg-add">
                <i class="iconfont icon-img_haha bigAdd"></i>
                <div class="ad-one">
                  <div class="re-upload">
                    <el-upload :file-list="fileList" :http-request="UploadImage" :multiple="true"
                      accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
                      <i class="iconfont icon-img_bdsc"></i>
                    </el-upload>
                  </div>
                  <div class="re-find" @click="addImgOpen"><i class="iconfont icon-img_cz"></i></div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- <div class="open-time"></div> -->
      </el-form>
    </div>
    <el-dialog custom-class="resourceImgAdd" :title="$t('pub.addImg')" center :visible.sync="addimg">
      <DMCchooseImg @closeImg="closeDMCchooseImg" ref="DMCchooseImg1" @headCallBack="getDMCimg" v-bind:imgType="3">
      </DMCchooseImg>
    </el-dialog>

    <el-dialog custom-class="mapList" :title="$t('hotel.hotel_mapLocation')" center :visible.sync="selectAddress">
      <!-- <googleMap @refList="googleMap" v-on:headCallBack="headCall" v-bind:address="addMsg.Address"></googleMap> -->
      <tencentMap @map-submit="mapEvent" :address="addMsg.Address"></tencentMap>
    </el-dialog>

    <div class="btn-list">
      <span class="common-lefttit"></span>
      <button class="save-Btn" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button>
      <button class="cancel-Btn" @click="goUrl('domesticScenicSpotList')">{{$t('pub.cancelBtn')}}</button>
    </div>
    <viewer :images="images" :options='imageOptions' @inited="inited" class="viewer" ref="viewer">
      <img v-for="src in images" :src="src" :key="src">
    </viewer>
  </div>
</template>
<script>
  // import googleMap from "../commonPage/googleMap.vue";
  import DMCchooseImg from "../commonPage/DMCchooseImg.vue";
  import MyEdit from "@/components/EditTemplate.vue";
  import tencentMap from "../commonPage/tencentMap.vue";
  export default {
    data() {
      return {
        imageOptions: {
          navbar: false,
          title: false
        },
        //是否有权限操作支付方式
        IsHaveAuth: 0,
        images: [],
        selectAddress: false,
        addimg: false,
        imgKeyword: "",
        imglistArry: [],
        openplatform: "",
        totalimg: "",
        selecnum: 0,
        ID: "",
        tipsList: [],
        tipsItem: "",
        Geographic: [],
        GeoItem: "",
        value1: "true",
        value2: "false",
        defaultImg: 'this.src="' + require("../../assets/img/bg_z1@2x.png") + '"',
        openplatString: "",
        OpenPlatformStrings: "",
        inputVisible: false,
        inputValue: "",
        inputVisible2: false,
        inputValue2: "",
        IsFreeList: [{
            value: 0,
            label: this.$t('pub.yes')
          },
          {
            value: 1,
            label: this.$t('pub.no')
          }
        ],
        isBook: true,
        fileList: [],
        //下拉框默认值
        SelectDefaultValue: 0,
        //国家列表
        CountryList: [],
        //省份列表
        ProvinceList: [],
        //城市列表
        CityList: [],
        //区域
        district: [],
        inActive: 1, //已选中
        notInActive: 0, //未选中
        //支付方式
        PayList: [],
        //上传的文件数组
        TicketCouponsImageArray: [],
        //删除的图片文件数组
        DeleteImageArray: [],
        addMsg: {
          ID: 0,
          Name: "",
          ScenicSpotTag: "",
          GeographicTag: "",
          OpeningHours: "",
          Tel: "",
          TrafficInfo: "",
          IsFree: 0,
          Feature: "",
          FoodType:"",
          About: "",
          BookingInfo: "",
          Sure: "",
          OpenPlatform: "",
          DieLine: "",
          QCountry: "",
          QProvince: "",
          QCity: "",
          District: 5572,
          Address: "",
          Lng: "",
          Lat: "",
          PicPath: "",
          RebateCount: "",
          RebateRatio: "",
          Url: "",
          IsSelfBook: "",
          Country: 2,
          Province: 261,
          City: 5571,
          TicketCouponsImageList: [], //现在的图片
          DeleteImageList: [], //要删除的图片
          //是否预约
          AppointmentStyle: 0,
          //支付方式
          PayStyle: 0,
          PlayTimeHour: "", //游玩小时
          PlayTimeMinutes: "", //游玩分钟
          IsIncludeLeader: 0, //是否包含领队:0-包含,1-不包含
          TicketNotice:"",//官方公告
          OpenTimeList:[//开放时间
              {
                  StartDay:"",
                  EndDay:"",
                  IsNextYear:0,
                  BusinessStartWeek:0,
                  BusinessEndWeek:0,
                  StartTime:"",
                  EndTime:"",
                  StopTime:"",
              }
          ],
          IsShelves:0,

        },
        rules: {
          //表单必填验证
          Name: [{
            required: true,
            message: this.$t('objFill.qingtianxmc'),
            trigger: "change"
          }],
          FoodType: [{
            required: true,
            message: this.$t('objFill.v101.qingxzjqlex'),
            trigger: "change"
          }],
          Address: [{
            required: true,
            message: this.$t('objFill.qingxuanzhedz'),
            trigger: "change"
          }],
          Descriptions: [{
            required: true,
            message: this.$t('objFill.qinghuruwzms'),
            trigger: "change"
          }],
          DieLine: [{
            pattern: this.$commonUtils.Regex.el_isInteger,
            message: this.$t('objFill.qingshuruzqdz')
          }],
          RebateCount: [{
            pattern: this.$commonUtils.Regex.el_isInteger,
            message: this.$t('objFill.qingshuruzqdz')
          }],
          RebateRatio: [{
            pattern: this.$commonUtils.Regex.el_isInteger,
            message: this.$t('objFill.qingshuruzqdz')
          }],
          SupportCount: [{
            required: true,
            message: this.$t('objFill.qingtianxiekydrs'),
            trigger: "change"
          }]
        },
        weekEnumList:[],//营业周长枚举
        scenicList:[],//景区类型列表
        toolbar: {
          clean: true,
          font: false, //字体
          narrative: false, //叙述,
          image:false,
          bold: true, //加粗
          underline: true, //下划线
          header1: true, //H1
          header2: true, //H2
          fontColor: false, //字体颜色
          fontBackgroundColor: false, //背景颜色
        },
        DefaultList: [],
        placeholder: this.$t('pub.pleaseImport'),
        type:[]
      };
    },
    components: {
      // googleMap: googleMap,
      DMCchooseImg: DMCchooseImg,
      MyEdit,
      tencentMap
    },
    methods: {
       handleChange(value) {
      },
       //得到地图信息
      mapEvent(e) {
        this.addMsg.Lat = e.lat;
        this.addMsg.Lng = e.long;
        this.selectAddress = false;
      },
      inited(viewer) {
        this.$viewer = viewer
      },
      showImg: function (src) {
        let srcArr = src.split('?')
        src = srcArr[0]
        let isExsit = false
        this.images.forEach(x => {
          if (x === src)
            isExsit = true
        })
        if (!isExsit)
          this.images.push(src)
        this.$viewer.show()
        this.$viewer.view(this.images.indexOf(src))
      },
      //上传景点图片
      UploadImage(file) {
        let newArr = [];
        newArr.push(file.file);
        let fileName = file.file.name;
        var path = "/Upload/DMC/";
        this.UploadSelfFileT(path, newArr, x => {
          //统一图片处理
          var obj = this.$DMCUtils.DMCImageObj();
          var str = x.data.FilePath;
          var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
          obj.Path = str;
          obj.ShowPath = imgUrl;
          this.TicketCouponsImageArray.push(obj);
        });
      },
      //更新景点图片
      updatePic() {
        if (this.ID > 0) {
          var postMsg = {
            ID: this.ID,
            PicPath: this.PicPathArray.toString(),
            HotelImageList: this.HotelImageArray, //新增修改
            DeleteImageList: this.DeleteImageArray //删除的图片
          };
          this.apipost(
            "ticketcoupons_post_UpdateTicketCouponsPic",
            postMsg,
            res => {},
            null
          );
        }
      },
      //删除图片
      delImg(index) {
        //更新图片
        var item = this.TicketCouponsImageArray[index];
        this.DeleteImageArray.push(item);
        this.TicketCouponsImageArray.splice(index, 1);
      },
      addImgOpen() {
        this.addimg = true;
        this.initimgList();
      },
      closeDMCchooseImg() {
        this.addimg = false;
      },
      saveResource() {
        //保存餐厅信息
        if (this.isBook) {
          this.addMsg.IsSelfBook = 1;
        } else {
          this.addMsg.IsSelfBook = 0;
        }
        this.addMsg.OpenPlatform = this.openplatString.toString();
        if (this.ID != "undefined") {
          this.addMsg.ID = this.ID;
        }
        let picPathArr = [];
        this.TicketCouponsImageArray.forEach(x => {
          picPathArr.push(x.Path);
        });
        this.addMsg.PicPath = picPathArr.join(",");
        this.addMsg.ScenicSpotTag = this.tipsList.join(",");
        this.addMsg.GeographicTag = this.Geographic.join(",");
        this.addMsg.TicketCouponsImageList = this.TicketCouponsImageArray;
        this.addMsg.DeleteImageList = this.DeleteImageArray;
        this.apipost(
          "appletsticketcoupons_post_Set",
          this.addMsg,
          res => {
            //修改添加接口
            if (res.data.resultCode == 1) {
              this.tips(this.$t('tips.saveYes'), "success");
              this.goUrl("domesticScenicSpotList");
            } else {
              this.tips(res.data.message, "error");
            }
          },
          null
        );
      },
      init() {
        var msg = {};
        this.apipost("hotel_post_GetPlatform", msg, res => {
          //获取开放平台
          this.openplatform = res.data.data;
        });
      },
      initimgList() {
        //初始化弹窗图片列表
        var keyWord = this.imgKeyword;
        this.imglistArry = [];
        let msg = {
          Name: keyWord,
          Type: 4
        };
        this.apipost(
          "hotel_post_GetPicList",
          msg,
          res => {
            if (res.data.resultCode == 1) {
              this.imglistArry = res.data.data;
              this.totalimg = this.imglistArry.length;
            }
          },
          null
        );
      },
      selectImg(index) {
        //选取弹窗图片
        this.imglistArry[index].isShow = !this.imglistArry[index].isShow;
        let num = 0;
        this.imglistArry.forEach(x => {
          if (x.isShow == true) {
            num++;
          }
          this.selecnum = num;
        });
      },
      initHotelData() {
        //获取信息
        var msg = {
          ID: this.ID
        };
        this.apipost(
          "appletsticketcoupons_post_Get",
          msg,
          res => {
            if (res.data.resultCode == 1) {
              this.addMsg = res.data.data;
              // if (this.addMsg.Country > 0) {
                // this.GetSubAreaList(this.addMsg.Country, 1);
              // }
              if (this.addMsg.Province > 0) {
                this.GetSubAreaList(this.addMsg.Province, 2);
              }
              if(this.addMsg.City > 0){
                this.GetSubAreaList(this.addMsg.City, 3);
              }
              if (this.addMsg.OpenPlatform) {
                this.OpenPlatformStrings = this.addMsg.OpenPlatform.split(",");
                this.OpenPlatformStrings.forEach(x => {
                  this.openplatString.push(Number(x));
                });
              }
              if (res.data.data.ScenicSpotTag) {
                this.tipsList = res.data.data.ScenicSpotTag.split(",");
              }
              if (res.data.data.GeographicTag) {
                this.Geographic = res.data.data.GeographicTag.split(",");
              }
              if (res.data.data.Sure != null) {
                this.addMsg.Sure = res.data.data.Sure.toString();
              }
              this.isBook = this.addMsg.IsSelfBook;
              res.data.data.TicketCouponsPicList.forEach(x => {
                if (x != "") {
                  var obj = this.$DMCUtils.DMCImageObj();
                  obj.ID = x.ID;
                  obj.Path = x.Path;
                  obj.PicID = x.Pic;
                  obj.ShowPath =
                    this.domainManager().ViittoFileUrl +
                    x.Path +
                    "?x-oss-process=image/resize,l_140";
                  obj.TagName=x.TagName
                  this.TicketCouponsImageArray.push(obj);
                }
              });
            } else {
              this.tips(res.data.message, "error");
            }
          },
          null
        );
      },
      goUrl(path) {
        this.$router.push({
          path: path,
          query: {
            cache: true
          }
        });
      },
      submitForm(addMsg) {
        //提交创建、修改表单
        let that = this;
        that.$refs[addMsg].validate(valid => {
          if (valid) {
            that.saveResource();
          } else {
            return false;
          }
        });
      },
      checkImgList() {
        this.imglistArry.forEach(x => {
          if (x.isShow == true) {
            this.imgArray.push(x.Path);
            let arr = x.Path.split(".com");
            this.PicPathArray.push(arr[1]);
          }
          x.isShow = false;
          this.selecnum = 0;
        });
        this.addimg = false;
      },
      resetImg() {
        this.imglistArry.forEach(x => {
          if (x.isShow == true) {
            x.isShow = false;
          }
          this.selecnum = 0;
        });
      },
      tips(msg, type) {
        this.$message({
          message: msg,
          duration: 2000,
          type: type
        });
      },
      minusCount() {
        let SupportCount = parseInt(this.addMsg.SupportCount);
        if (SupportCount > 0) {
          SupportCount--;
        }
        this.addMsg.SupportCount = SupportCount;
      },
      addCount() {
        let SupportCount = parseInt(this.addMsg.SupportCount);
        SupportCount++;
        this.addMsg.SupportCount = SupportCount;
      },
      getItemList(type) {
        if (type == 1) {
          this.tipsList.push(this.tipsItem);
          this.tipsItem = "";
        } else {
          this.Geographic.push(this.GeoItem);
          this.GeoItem = "";
        }
      },
      handleClose(tag) {
        this.tipsList.splice(this.tipsList.indexOf(tag), 1);
      },

      showInput() {
        this.inputVisible = true;
        this.$nextTick(_ => {
          this.$refs.saveTagInput.$refs.input.focus();
        });
      },

      handleInputConfirm() {
        let inputValue = this.inputValue;
        if (inputValue) {
          this.tipsList.push(inputValue);
        }
        this.inputVisible = false;
        this.inputValue = "";
      },
      handleClose2(tag) {
        this.Geographic.splice(this.Geographic.indexOf(tag), 1);
      },

      showInput2() {
        this.inputVisible2 = true;
        this.$nextTick(_ => {
          this.$refs.saveTagInput.$refs.input.focus();
        });
      },

      handleInputConfirm2() {
        let inputValue = this.inputValue2;
        if (inputValue) {
          this.Geographic.push(inputValue);
        }
        this.inputVisible2 = false;
        this.inputValue2 = "";
      },
      googleMap() {
        this.selectAddress = false;
      },
      headCall(msg) {
        // this.addMsg.QCountry = msg.country;
        // this.addMsg.QProvince = msg.province;
        // this.addMsg.QCity = msg.city;
        // this.addMsg.Address = msg.address;
        this.addMsg.Lng = msg.lng;
        this.addMsg.Lat = msg.lat;
      },
      //获取国家
      GetCounrty() {
        this.apipost(
          "dict_post_Destination_GetCountry", {},
          res => {
            this.CountryList = res.data.data;
          },
          err => {}
        );
      },
      //获取省份和城市
      GetSubAreaList(ID, type) {
        let msg = {
          Id: ID
        };
        // if (this.addMsg.Country != 0) {
          this.apipost(
            "dict_post_Destination_GetChildList",
            msg,
            res => {
              if (type == 1) {
                this.ProvinceList = res.data.data;
                this.CityList=[];
                this.district=[];
              } else if (type == 2) {
                this.CityList = res.data.data;
                this.district=[];
              }else if (type == 3) {
                this.district = res.data.data;
              }
            },
            err => {}
          );
        // }
      },
      getDMCimg(imgArr) {
        imgArr.forEach(imgItem => {
          var obj = this.$DMCUtils.DMCImageObj();
          obj.ID = 0;
          obj.Path = "/" + this.$commonUtils.removeDomain(imgItem.Path);
          obj.PicID = imgItem.ID;
          obj.ShowPath = imgItem.Path + "?x-oss-process=image/resize,l_140";
          this.TicketCouponsImageArray.push(obj);
        });
      },
      //获取支付方式列表
      GetPayList() {
        this.apipost(
          "dmc_post_Get_GetPayStyleList", {},
          res => {
            if (res.data.resultCode == 1) {
              this.PayList = res.data.data;
            }
          },
          err => {}
        );
      },
      //图片左移右移
      ExchangeImg(index, IsMove) {
        var imgItem = this.TicketCouponsImageArray[index];
        //左移
        if (IsMove == 0) {
          var upItem = this.TicketCouponsImageArray[index - 1];
          this.$set(this.TicketCouponsImageArray, index - 1, imgItem);
          this.$set(this.TicketCouponsImageArray, index, upItem);
        } else {
          //右移动
          var downItem = this.TicketCouponsImageArray[index + 1];
          this.$set(this.TicketCouponsImageArray, index + 1, imgItem);
          this.$set(this.TicketCouponsImageArray, index, downItem);
        }
      },
      getArea(){
        this.$forceUpdate();
      },
      //获取周长枚举
      getweekenum() {
      this.apipost(
        "appletsdining_Post_GetBusinessWeekEnumType",
        {},
        (res) => {
          if (res.data.resultCode == 1) {
            this.weekEnumList = res.data.data;
          }
        },
        (err) => {}
      );
      },
    //   添加开放时间
      addOpenTime(){
          let obj={
              BusinessEndWeek: 0,
              BusinessStartWeek: 0,
              EndDay: "",
              EndTime: "",
              IsNextYear: 0,
              StartDay: "",
              StartTime: "",
              StopTime: "",
          }
          this.addMsg.OpenTimeList.push(obj)
      },
      delOpenTime(index){
          this.addMsg.OpenTimeList.splice(index,1)
      },
      //获取景区类型列表
      getScenicList(){
         this.apipost(
        "foodtype_post_GetDropDownFoodType",
        {ParentID:0,ClassType:1},
        (res) => {
          if (res.data.resultCode == 1) {
           let newData= this.getTreeData(res.data.data,'ChildrenList')
           this.scenicList = newData;
          }
        },
        (err) => {}
      );
      },
      //递归景区类型列表级联菜单
      getTreeData(data,childrenField){
                // 循环遍历json数据
                for(var i=0;i<data.length;i++){
                    if(data[i][childrenField]===undefined||data[i][childrenField].length===0){
                        // children若为空数组,则将children设为undefined
                        data[i][childrenField]=undefined;
                    }else {
                        // children若不为空数组,则继续 递归调用 本方法
                        this.getTreeData(data[i][childrenField],childrenField);
                    }
                }
                return data;
            }
    },
    mounted() {
      let userInfo = this.getLocalStorage()
      //有权限操作的部门
      if (userInfo.RB_Department_Id == 240 || userInfo.RB_Department_Id == 1 || userInfo.RB_Department_Id == 3 ||
        userInfo.RB_Branch_id == 49) {
        this.IsHaveAuth = 1;
      }
      this.GetPayList();
      this.ID = this.$route.query.id;
      this.init(); //开放平台
      // this.GetCounrty();
      if (typeof this.ID != "undefined") {
        this.initHotelData();
      }
      this.getweekenum();
      this.getScenicList();
      this.GetSubAreaList(2,1);
      if(this.addMsg.Province>0){
        this.GetSubAreaList(this.addMsg.Province, 2, 1);
      }
      if(this.addMsg.City>0){
        this.GetSubAreaList(this.addMsg.City, 3, 1);
      }
    }
  };

</script>