<!--package_A/pages/report-page/index.wxml-->
<view class="upload_container">
    <image class="head_img" mode="widthFix" src="../../img/want_report.png"></image>
    <view class="form_container">
        <!-- 河道信息 -->
        <view class="info_box">
            <view class="box_title">河道信息</view>
            <view class="form_item {{formRules.location.warning ? 'warning' : ''}}">
                <text><text style="color: red;">* </text>问题位置</text>
                <view class="value_box" bindtap="selectLocation">
                    <text class="picker_text" wx:if="{{form.location}}">{{form.location}}</text>
                    <text style="color: #a6a6a6;font-size: 28rpx;" wx:else>请选择问题位置</text>
                    <image src="../../../assets/img/location.png" style="width:54rpx;height:54rpx;position: absolute;right: 0rpx;top: 7rpx;z-index: 99;"></image>
                </view>
                <text class="tips">请选择问题位置</text>
            </view>
            <view class="use_purpose {{formRules.problemDesc.warning ? 'warning' : ''}}">
                <text><text style="color: red;">* </text>问题描述</text>
                    <textarea maxlength="500" style="width:620rpx; height: 120rpx;padding: 20rpx;" type="text" adjust-position="{{true}}" placeholder="请输入问题描述" placeholder-style="font-size: 28rpx; color: #A6A6A6;" value="{{form.problemDesc}}" data-name="problemDesc" name="problemDesc" bindblur="bindValue" />
                <text class="tips">请输入问题描述</text>
            </view>
            <view class="upload_images {{formRules.imageList.warning? 'warning': ''}}">
                <text><text style="color: red;">* </text>上传图片</text>
                <view class="image_list">
                    <view class="image_preview" wx:for="{{imagePreviewList}}" wx:key="index">
                        <image class="image_item" src="{{item}}" mode="aspectFill" data-item="{{item}}">
                        </image>
                        <div class="close" data-current="{{index}}" catchtap="deleteImage"></div>
                    </view>
                    <view class="upload_image" bindtap="uploadImage" wx:if="{{imageList.length<5}}">
                        <image style="height: 53rpx;width: 53rpx;margin-bottom: 27rpx;" mode="widthFix" src="../../../assets/img/open_upload.png"></image>
                        <text style="font-size: 28rpx;">上传图片</text>
                    </view>
                </view>
                <text class="tips">请上传图片</text>
            </view> 
        </view>

        <view class="safe_box">
            <label class="checkbox" bindtap="checkBoxChange">
                <checkbox value="{{checkAgree}}" /><text>同意</text>
            </label>
            <text style="color: #2a82e4;" bindtap="showAgree">《用户服务协议》</text>和<text style="color: #2a82e4;" bindtap="showConceal">《隐私政策》</text>
        </view>
        <!-- 按钮 -->
        <view class="{{ checkAgree ? 'btn_item submit_btn' : 'btn_item'}}" bindtap="submit">上报</view>
    </view>


</view>
