<!-- 前台导入wxmlUtil.wxs -->
<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
<loading wx:if="{{loading}}"></loading>
<dk-form id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" bind:chooseData="chooseData">
</dk-form>

<view class="dk-card-outer-class">
  <view class="dk-card-class" wx:if="{{measureRoomList.length > 0}}">
    <view style="border-width: 1px;margin: 1.5vw;" wx:key="index" wx:for="{{measureRoomList}}">
      <van-swipe-cell right-width="{{ 65 }}" >
        <view>
          <van-field value="{{ item.roomName }}" custom-style="background:#F8F9FD;border-radius:15rpx 15rpx 0 0;" label="{{$t['spaceName']}}"  label-class="nomal-label" data-index="{{index}}" placeholder="{{$t['pleaseEnterTheSpaceName']}}" input-align="right" bind:change="onRoomNameChange" errorMessage="{{item.errMsg}}" />
          <view style=" width:100%;">
            <view style="padding:38rpx;background: #F8F9FD;border-radius:0 0 15rpx 15rpx;">
              <!-- <van-uploader prefix="{{prefixUrl}}" preview-size="15vw" accept="image" file-list="{{ item.annexPaths}}" bind:delete="deleteImg" bind:after-read="afterRead" data-index="{{index}}" multiple="true" imageFit="cover">
                <view slot="preview-cover">
                </view>
                <view class="upload-view">
                  <van-icon name="plus" color="#606EB2" style="font-family: 'PingFang SC';font-size: 20px;font-weight: 600;" />
                  <view>{{$t['uploadDrawings']}}</view>
                </view>
              </van-uploader> -->

              <van-uploader max-count="5" disabled="{{item.readonly}}" accept="image" style="margin-left: 4%;border-radius: 15rpx;" preview-size="160rpx;" file-list="{{ item.measureAnnex }}" bind:delete="deleteImg" bind:after-read="afterRead" data-index="{{index}}" multiple="true" imageFit="aspectFit" max-size="{{maxSize}}" bind:oversize="overSize" >
                <view slot="preview-cover">
                </view>
                <view class="upload-view">
                  <van-icon name="plus" color="#606EB2" style="font-family: 'PingFang SC';font-size: 20px;font-weight: 600;" />
                  <view>{{$t['uploadDrawings']}}</view>
                </view>
              </van-uploader>
            </view>
          </view>
        </view>
        <view slot="right" data-index="{{index}}" bind:tap="deleteItem">{{$t['delete']}}</view>
      </van-swipe-cell>
    </view>
  </view>


  <view style="margin-top: 30rpx;"  wx:if="{{formType !=='detail'}}">
    <van-button size="small" custom-style="font-weight: 400;font-family: 'PingFang SC';font-size: 14px;color:#606EB2;border:0;border-radius:15rpx;box-shadow: 0rpx 10rpx 20rpx rgba(225, 229, 238, 0.6);height:70rpx;" icon="plus" bind:click="addItem" block>
      {{$t['addDrawings']}}
    </van-button>
  </view>
</view>




<view style="height: 200rpx;"></view>



<!-- <view style="position: fixed;bottom: 230rpx;right: 30rpx;" wx:if="{{formType =='detail'}}">
  <view bind:tap="toEdit" class="btn-add-class-2">
    <van-icon name="edit" color="#FFFFFF" size="60rpx" />
  </view>
</view> -->
<!-- 编辑  -->
<view wx:if="{{formType =='detail'}}" style="position: fixed;bottom: 230rpx;right: 30rpx;z-index: 99;" bindtap="toEdit">
  <image src="{{imageUrl + 'edit.png'}} " class="edit-class"  />
</view>



<dk-save-button wx:if="{{formType !=='detail'}}"  model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="save"></dk-save-button>