<!--pages/informationEventCreate/informationEventCreate.wxml-->
<view class="informationEventCreate-page">
  <navBar bg="#ffffff" type="black">
    <!-- <view slot="left">ddd</view> -->
    <view class="dataName">{{eventName}}</view>
  </navBar>
  <view class="white-box">
    <view class="form">

      <view class="formItem" wx:if="{{eventName==='岗位记录'}}">
        <view class="formLabel">岗位名称</view>
        <input type="text" model:value="{{gwmc}}" placeholder="请输入岗位名称" />
      </view>

      <!-- <view class="formItem">
        <view>
          <view class="">时间类型</view>
          <view class="radios">
            <view class="radio {{type===0?'active':''}}" bindtap="handleType" data-type="{{0}}">时间段</view>
            <view class="radio {{type===1?'active':''}}" bindtap="handleType" data-type="{{1}}">时间点</view>
          </view>
        </view>
      </view> -->

      <view class="formItem">
        <view style="width:100%">
          <view class="">开始时间</view>
          <view class="datePicker" wx:if="{{type===0}}">
            <picker mode="date" value="{{date}}" 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" value="{{date}}" start="{{now}}" bindchange="bindDateChange" data-key="endDate">
              <view wx:if="{{endDate}}" class="picker">
                {{ endDate }}
              </view>
              <view wx:else>请选择结束时间</view>
            </picker> -->
          </view>

          <view class="datePicker" wx:else>
            <picker mode="date" value="{{date}}" start="{{now}}" bindchange="bindDateChange" data-key="startDate">
              <view wx:if="{{startDate}}" class="picker">
                {{ startDate }}
              </view>
              <view wx:else>请选择</view>
            </picker>
          </view>
        </view>
      </view>

      <view class="formItem">
        <view style="width:100%">
          <view class="">结束时间</view>
          <view class="datePicker" wx:if="{{type===0}}">
            <!-- <picker mode="date" value="{{date}}" start="{{now}}" bindchange="bindDateChange" data-key="startDate">
              <view wx:if="{{startDate}}" class="picker">
                {{ startDate }}
              </view>
              <view wx:else>请选择开始时间</view>
            </picker> -->
            <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}}" />
                </view>
                <view class="weui-cell__bd">{{item.name}}</view>
              </label>
            </radio-group>
            <!-- <view class="to"></view>
            <picker mode="date" value="{{date}}" start="{{now}}" bindchange="bindDateChange" data-key="endDate">
              <view wx:if="{{endDate}}" class="picker">
                {{ endDate }}
              </view>
              <view wx:else>请选择结束时间</view>
            </picker> -->
          </view>

          <view class="datePicker" wx:if="{{endDateType===2}}">
            <picker mode="date" value="{{date}}" 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">
        <view style="width: 100%;">
          <view class="formLabel">{{eventName==='岗位记录'?'岗位描述':'事件描述'}}</view>
          <textarea wx:if="{{eventName==='岗位记录'}}" model:value="{{sjms}}" auto-height placeholder="请输入岗位描述" maxlength="-1" style="margin-top:29rpx" />
          <textarea wx:else model:value="{{sjms}}" auto-height placeholder="{{eventName==='社会活动经历'?'您可以添加参与的社会事件/活动记录。如“2022年 参与某选秀节目获得全国六强成绩':'请输入事件描述'}}" maxlength="-1" style="margin-top:29rpx;padding-bottom: 80rpx;" />
        </view>
      </view>

      <view class="formItem">
        <view class="formLabel">附件</view>
        <uploadImages bindmyevent="myEventListener" isText="{{true}}"></uploadImages>
      </view>

      <view class="fileList">
        <view class="fileItem" wx:for="{{fileList}}" wx:key="index">
          <view class="fileItem_bottom">
            <view>
              <image class="icon_img" src="/assets/images/information/icon_img.png"></image> 附件{{index+1}}
            </view>
            <image class="icon_delete" src="/assets/images/information/icon_delete1.png" bindtap="handleDeleteFile" data-index="{{index}}"></image>
          </view>
        </view>
      </view>
    </view>

    <view class="submitLayout">
      <btn width="652rpx" height="82rpx" fontSize="28rpx" bindtap="handleCreate">确认添加</btn>
    </view>
  </view>
</view>