<!--pages/informationEdit/informationEdit.wxml-->
<view class="informationEdit-page">
  <navBar bg="#ffffff" type="black">
    <!-- <view slot="left">ddd</view> -->
    <view class="dataName">{{dataName}}</view>
  </navBar>
  <view class="form">
    <view class="formItem" wx:if="{{dataName==='民族'}}">
      <view class="formLabel">{{dataName}}</view>
      <picker bindchange="bindNationChange" value="{{index}}" range="{{nationList}}" range-key="name">
        <view class="picker" style="height: 60rpx;">
          {{value?value:'请选择民族'}}
        </view>
      </picker>
    </view>

    <block wx:elif="{{dataName==='时间'}}">
      <!-- <view class="formItem">
        <view style="width:100%">
          <view class="">时间类型</view>
          <view class="radios">
            <view class="radio {{radioType===0?'active':''}}" bindtap="handleType" data-value="{{0}}">时间段</view>
            <view class="radio {{radioType===1?'active':''}}" bindtap="handleType" data-value="{{1}}">时间点</view>
          </view>
        </view>
      </view> -->

      <view class="formItem" style="display: flex;">
        <view style="width:100%">
          <view class="">开始时间</view>
          <view class="datePicker">
            <picker mode="date" model:value="{{startDate}}" start="{{now}}" bindchange="bindDateChange" data-key="startDate">
              <view wx:if="{{startDate}}" class="picker">
                {{ startDate }}
              </view>
              <view wx:else>请选择开始时间</view>
            </picker>
            <!-- <view class="to"></view>
            <picker mode="date" model:value="{{endDate}}" start="{{now}}" bindchange="bindDateChange" data-key="endDate">
              <view wx:if="{{endDate}}" class="picker">
                {{ endDate }}
              </view>
              <view wx:else>请选择</view>
            </picker> -->
          </view>
        </view>
      </view>

      <view class="formItem" style="display: flex;">
        <view style="width:100%">
          <view>结束时间</view>

          <view class="datePicker">
            <radio-group bindchange="radioChange" class="radio-group">
              <label class="weui-cell weui-check__label" wx:for="{{endDateTyeps}}" wx:key="{{item.value}}">
                <view class="weui-cell__hd">
                  <radio value="{{item.value}}" checked="{{item.checked}}" />
                </view>
                <view class="weui-cell__bd">{{item.name}}</view>
              </label>
            </radio-group>

          </view>
          <view class="datePicker" wx:if="{{endDateType===2}}">
            <picker mode="date" model:value="{{endDate}}" start="{{now}}" bindchange="bindDateChange" data-key="endDate">
              <view wx:if="{{endDate}}" class="picker">
                {{ endDate }}
              </view>
              <view wx:else>请选择结束时间</view>
            </picker>
          </view>
        </view>
      </view>

    </block>

    <view class="formItem" wx:elif="{{dataName==='政治面貌'}}">
      <view class="formLabel">{{dataName}}</view>
      <picker mode="selector" bindchange="bindZzmmChange" range="{{zzmmOptions}}" range-key="name" value="{{index}}">
        <view class="picker" style="height: 60rpx;">
          {{value?value:'请选择政治面貌'}}
        </view>
      </picker>
    </view>

    <view class="formItem" wx:elif="{{dataName==='婚姻状况'}}">
      <view class="formLabel">{{dataName}}</view>
      <picker mode="selector" bindchange="bindMarryChange" range="{{marryList}}" range-key="name" value="{{index}}">
        <view class="picker" style="height: 60rpx;">
          {{value?value:'请选择婚姻状况'}}
        </view>
      </picker>
    </view>

    <view class="formItem" wx:elif="{{dataName==='是否全日制'}}">
      <view class="formLabel">{{dataName}}</view>
      <picker mode="selector" bindchange="bindSfqrzChange" range="{{sfqrzOptions}}" range-key="name" value="{{index}}">
        <view class="picker" style="height: 60rpx;">
          {{value?value:'请选择是否全日制'}}
        </view>
      </picker>
    </view>

    <view class="formItem" wx:elif="{{dataName==='专业层次'}}">
      <view class="formLabel">{{dataName}}</view>
      <picker mode="selector" bindchange="bindZyccChange" range="{{zyccOptions}}" range-key="name" value="{{index}}">
        <view class="picker" style="height: 60rpx;">
          {{value?value:'请选择专业层次'}}
        </view>
      </picker>
    </view>

    <view class="formItem" wx:elif="{{dataName==='教育结果'&&key==='学历教育'}}">
      <view class="formLabel">{{dataName}}</view>
      <picker mode="selector" bindchange="bindJyjgChange" range="{{jyjgOptions}}" range-key="name" value="{{index}}">
        <view class="picker" style="height: 60rpx;">
          {{value?value:'请选择教育结果'}}
        </view>
      </picker>
    </view>

    <view class="formItem" wx:elif="{{dataName==='学制'}}">
      <view class="formLabel">{{dataName}}</view>
      <picker mode="selector" bindchange="bindXzChange" range="{{xzOptions}}" range-key="name" value="{{index}}">
        <view class="picker" style="height: 60rpx;">
          {{value?value:'请选择学制'}}
        </view>
      </picker>
    </view>

    <block wx:elif="{{dataName==='教育机构'||dataName==='单位名称'}}">
      <view class="formItem">
        <view class="formLabel">{{dataName}}</view>
        <input type="text" model:value="{{value}}" placeholder="{{'请输入'+ dataName}}" bindinput="inputChange" data-key="{{key}}" />
      </view>
      <view class="list" wx:if="{{resultList}}">
        <view class="item" wx:for="{{resultList}}" bindtap="handleSelect" data-name="{{item.name}}" data-authentication="{{item.authentication}}">{{item.name}}<image wx:if="{{item.authentication}}" class="icon_zheng" src="/assets/images/information/icon_zheng.png"></image>
        </view>
      </view>
    </block>

    <view wx:else class="formItem">
      <view class="formLabel">{{dataName}}</view>
      <input type="text" model:value="{{value}}" placeholder="{{'请输入'+dataName}}" />
    </view>

  </view>
  <view class="submitLayout">
    <btn width="652rpx" height="82rpx" fontSize="28rpx" wx:if="{{isAdd}}" bindtap="handleCreate">确认添加</btn>
    <btn width="652rpx" height="82rpx" fontSize="28rpx" wx:else bindtap="handleEdit">确认修改</btn>
  </view>
</view>