<!--pageage/safetyManagement/problemRectification/index.wxml-->
<view>
  
    <view class="inspect_overview_max">
    
        <view class="inspect_overview">
            <view class="module_title module_title_padding">
                <view>检查概况</view>
            </view>
            <view class="inspect_overview_list_max">
                <view class="inspect_overview_list">
                    <van-row>
                        <van-col span="8"><text class="color_purple">检查类型</text></van-col>
                        <van-col span="16">{{checkTypeName}}</van-col>
                    </van-row>
                </view>
                <view class="inspect_overview_list">
                    <van-row>
                        <van-col span="8"><text class="color_purple">检查部位</text></van-col>
                        <van-col span="16">{{checkSiteName}}</van-col>
                    </van-row>
                </view>
                <view class="inspect_overview_list">
                    <van-row>
                        <van-col span="8"><text class="color_purple">检查时间</text></van-col>
                        <van-col span="16">{{checkTime}}</van-col>
                    </van-row>
                </view>
                <view class="inspect_overview_list">
                    <van-row>
                        <van-col span="8"><text class="color_purple">限期整改时间</text></van-col>
                        <van-col span="16">{{checkImposeTime}}</van-col>
                    </van-row>
                </view>
            </view>
        </view>
    </view>

    <view class="problem_list_max">
        <view class="problem_list_for" wx:for="{{problemData}}" wx:key="index">
            <view class="problem_list_title" bindtap="onExpandDetails" data-index="{{index}}">
                <view class="module_title module_title_flex">
                    <view class="module_title_text">{{item.title}}</view>
                    <view class="inspect_list_title_state">
                        <text class="state_colour_0" wx:if="{{item.state == 0}}">待我整改</text>
                        <text class="state_colour_1" wx:if="{{item.state == 1}}">我已整改</text>
                        <text class="state_colour_2" wx:if="{{item.state == 2}}">无需整改</text>
                    </view>
                </view>
            </view>
            <view class="problem_list_content" wx:if="{{item.overall_state}}">
                <view>
                    <view class="problem_list_module">
                        <view class="problem_list_content_title">存在问题</view>
                        <view class="problem_list_info">
                            <view class="problem_list_info_title">存在问题</view>
                            <view class="problem_list_info_con">{{item.existing_problems}}</view>
                        </view>
                        <view class="problem_list_info">
                            <view class="problem_list_info_title">整改前</view>
                            <view class="problem_list_info_con">
                                <van-uploader file-list="{{item.rectify_front}}" show-upload="{{fales}}" deletable="{{fales}}"/>
                            </view>
                        </view>
                        <view class="problem_list_info">
                            <view class="problem_list_info_title">整改责任人</view>
                            <view class="problem_list_info_con">{{item.rectify_person}}</view>
                        </view>
                    </view>
                </view>
                <view class="problem_list_module_border" wx:if="{{item.state != 2}}">
                    <view class="problem_list_btn_max"  wx:if="{{!item.problem_btn}}">
                        <view class="problem_list_btn" bindtap="onProblemRectification" data-index="{{index}}">问题整改</view>
                    </view>
                </view>
                
                <view wx:if="{{item.state != 2}}">
                    <view wx:if="{{item.problem_btn}}">
                        <view class="problem_list_content_title">问题整改</view>
                        <view class="problem_list_info">
                            <view class="problem_list_info_title">整改情况</view>
                            <view class="problem_list_info_input" wx:if="{{item.state == 0}}">
                                <textarea  class="add_textarea" placeholder="请填写整改情况" value="{{item.rectify_situation}}"
                                placeholder-style="color:#6777aa;" bindinput="onRectificationSituation"  data-index="{{index}}"/>
                            </view>
                            <view class="problem_list_info_con" wx:if="{{item.state == 1}}">{{item.rectify_situation}}</view>
                        </view>
                        <view class="problem_list_info">
                            <view class="problem_list_info_title">整改照片</view>
                            <view class="problem_list_info_con" wx:if="{{item.state == 0}}">
                                <file-uploader  bindimages="onImagesArr" data-index="{{index}}"></file-uploader>
                            </view>
                            <view class="problem_list_info_con" wx:if="{{item.state == 1}}">
                                <van-uploader file-list="{{item.rectify_photo}}" show-upload="{{fales}}" deletable="{{fales}}"/>
                            </view>
                        </view>
                        <view class="problem_list_info" wx:if="{{item.state == 1}}">
                            <view class="problem_list_info_title">整改时间</view>
                            <view class="problem_list_info_con">{{item.rectify_time}}</view>
                        </view>
                        <view class="problem_list_btn_max" wx:if="{{item.state == 0}}">
                            <view class="problem_list_btn" bindtap="onCancellation" data-index="{{index}}">取消</view>
                            <view class="problem_list_btn problem_list_btn_confirm" bindtap="onConfirm" data-set="{{item}}" data-index="{{index}}">确认</view>
                        </view>
                    </view>
                </view>
                
            </view>
        </view>
       
    </view>
    <!-- <view class="problem_submit_to">
        <view class="problem_submit_to_btn">取消</view>
        <view class="problem_submit_to_btn problem_submit_to_save"  bindtap="onProblemSubmitSave">保存</view>
    </view> -->

    <van-overlay show="{{loadShow}}">
    <view class="gif">
        <image src="../../../images/loding2.gif"></image>
        <view>数据加载中！请稍后...</view>
    </view>
    </van-overlay>  



</view>
