  <template>
    <form novalidate class="form-horizontal" style="width: 95%;margin: auto">
      <div class="form-group col-md-12 col-sm-12 col-xs-12"  :class="style__">
        <div class="form-group col-md-12 col-sm-12 col-xs-12">
          <label class="control-label font text-left col-md-4 col-xs-4">备注</label>
          <div class="col-md-12 col-sm-12 col-xs-12">
            <textarea  v-model="paper.f_repair_approved_note" class="form-control"></textarea>
          </div>
        </div>
      </div>
      <div class="form-group col-sm-12 col-xs-12 col-md-12 info"  :class="style__">
        <div class="text-center">
          <label class="font">总体安检照片请依次拍摄：</label>
        </div>
        <div class="col-md-12 col-sm-12 col-xs-12">
          <ol class="showIi">
            <li>1.燃气设施全景</li>
            <li>2.燃气表照片</li>
            <li>3.灶具照片</li>
            <li>4.其他照片</li>
          </ol>
        </div>
      </div>
      <div class="form-group col-sm-12 col-xs-12 col-md-12 "  :class="style__">
        <label class="text-left font">总体安检照片</label>

        <div class="auto" :class="style__">
          <div class="panel" style="padding: 10px 10px 5px 10px;">
            <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
              <div class="row" style="height: 240px;overflow: scroll;top: 1px" >
                <div class="col-xs-4 col-sm-3 col-md-2" style="margin-bottom: 35px" v-for="(index,img) in paper.f_overall_imgs">
                  <img-self :src="img.f_overall_path" alt="总体安检照片" :width="140" :height="170"></img-self>
                  <img src="../../../assets/删除.png" @click="delfile('f_overall_path', img.f_overall_path,index)" style="width: 15px;margin-top: -80px" alt="">
                </div>
              </div>
              <div class="row text-right div-photo">
                <button type="button" name="button" class="btn btn-photo" @click="takePic('f_overall_path', '总体安检照片')">拍照</button>
                <!--<button type="button" name="button" class="btn btn-primary btn-photo" @click="takePic('f_overall_path', '总体安检照片1')">拍照</button>-->
                <!--&nbsp;&nbsp;&nbsp;&nbsp;<img src="../../../assets/remove.png" :class="style__" @click="delfile('f_overall_path', img.f_overall_path)" style="width: 25%;"></img>-->
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="form-group col-sm-12 col-xs-12 col-md-12 "  :class="style__">
        <label class="text-left font">总体隐患照片</label>

        <div class="auto" :class="style__">
          <div class="panel" style="padding: 10px 10px 5px 10px;">
            <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
              <div class="row" style="height: 240px;overflow: scroll;top: 1px" >
                <div class="col-xs-4 col-sm-3 col-md-2" style="margin-bottom: 35px" v-for="(index,img) in defectImgs">
                  <img-self :src="img" alt="总体隐患照片" :width="140" :height="170"></img-self>
                  <!--                <img src="../../assets/删除.png" @click="delfile('f_overall_path', img.f_overall_path,index)" style="width: 15px;margin-top: -80px" alt="">-->
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="form-group col-sm-12 col-xs-12 col-md-12 info"  :class="style__">
        <div class="text-center">
          <label class="font">隐患汇总：</label>
        </div>
        <div class="col-md-12 col-sm-12 col-xs-12">
          <ol class="showIi">
            <li v-for="item in defectReason">{{ item.deviceitem }}</li>
          </ol>
        </div>
      </div>
      <div class="form-group col-sm-12 col-xs-12 col-md-12 info"  :class="style__">
        <div class="text-center">
          <label class="font">整改建议汇总：</label>
        </div>
        <div class="col-md-12 col-sm-12 col-xs-12">
          <ol class="showIi">
            <li v-for="item in defectToolTip">{{ item }}</li>
          </ol>
        </div>
      </div>
      <div class="form-group col-md-12 col-sm-12 col-xs-12">
        <div class="row">
          <label class="text-left">是否代签：</label>
        </div>
        <div class="col-xs-4 col-sm-4" v-for="item in signature">
          <input v-model="paper.f_is_signature" :value="item.label" :checked='item.isChecked'
                 @click="checksignature(item.value)" type="radio">{{ item.label }}
        </div>
      </div>
      <div class="form-group col-md-12 col-sm-12 col-xs-12">
        <div class="row">
          <label class="text-left">是否拒签：</label>
        </div>
        <div class="col-xs-4 col-sm-4" v-for="item in Nosignature">
          <input v-model="paper.f_no_signature" :value="item.label" :checked='item.isChecked'
                 @click="checkNosignature(item.value)" type="radio">{{ item.label }}
        </div>
      </div>
      <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__">
        <label class="text-left font">用户签名</label>
        <div class="auto">
          <div class="panel">
            <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
              <div class="row" style="height: 240px;overflow: scroll;top: 1px">
                <div class="col-sm-4">
                  <img :class="style__" :src="paper.f_sign_path" :width="200" :height="150" />
                </div>
              </div>
              <div class="row text-right div-photo">
                <button type="button" name="button" class="btn btn-primary btn-photo" @click="sign">签名</button>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__">
        <input type="checkbox" v-model="paper.f_read_instructions"/><label class="text-left font">本人已认真阅读燃气安全用户手册，了解并知晓安全用气常识</label>
      </div>
      <div class="form-group col-sm-12 col-xs-12 col-md-12 " :style="timeSet(this.isneedDate)?'':'display:none'">
        <label>请输入超期原因:</label><br/>
        <textarea style="width: 100%;" v-model="paper.f_exceed_reason"></textarea>
      </div>
      <div class="form-group col-md-12 col-sm-12 col-xs-12" :class="style__">
        <div class="col-xs-6 col-sm-6">
          <input type="checkbox" v-model="backlistisselect" :readonly="enabled"/><label class="text-left font" >限制该用户购气</label>
        </div>
        <!--      <div class="col-xs-6 col-sm-6">
                <input type="checkbox" v-model="deletebacklistisselect" :readonly="deleteenabled"/><label class="text-left font" >取消该用户购气</label>
              </div>-->
      </div>
      <div class="form-group col-md-12 col-sm-12 col-xs-12" :class="style__" v-if="Vue.$appdata.getParam('安检天然气安全使用须知检查')=='是'">
        <div class="col-xs-12 col-sm-12">
          <input type="checkbox" v-model="paper.f_gas_guidelines" /><label class="text-left font" >天然气安全使用须知</label>
        </div>
        <div class="col-xs-12 col-sm-12">
          <input type="checkbox" v-model="paper.f_safety_warning" /><label class="text-left font" >天然气室内使用安全警示</label>
        </div>
        <div class="col-xs-12 col-sm-12">
          <input type="checkbox" v-model="paper.f_gas_manual" /><label class="text-left font" >安全用气手册</label>
        </div>
      </div>
      <div class="form-group col-md-12 col-sm-12 col-xs-12"  :class="style__">
        <div  class="form-group col-md-12 col-sm-12 col-xs-12">
          <input type="checkbox" v-model="paper.f_defect_notified" class="showIi" />安检通知书/隐患整改通知书
        </div>
        <div class="form-group col-md-12 col-sm-12 col-xs-12" v-if="paper.f_defect_notified">
          <div  class="form-group col-md-12 col-sm-12 col-xs-12">
            <button type="button" @click="print()">打印隐患整改单</button>
          </div>
          <div  class="form-group col-md-12 col-sm-12 col-xs-12">
            <label class="text-left font">安检通知书/隐患整改通知书照片(要求能清晰反应安检通知单和用户签字内容)：</label>
            <div class="auto" >
              <div class="panel" style="padding: 10px 10px 5px 10px;">
                <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
                  <div class="row" style="height: 240px;overflow: scroll;top: 1px">
                    <div class="col-sm-4">
                      <img-self  :src="paper.f_notified_path" alt="安检通知书/隐患整改通知书照片" width="150" height="200"></img-self>
                    </div>
                  </div>
                  <div class="row text-right div-photo">
                    <button type="button" name="button" class="btn btn-primary btn-photo" @click="takePic('f_notified_path', '安检通知书/隐患整改通知书照片')">拍照</button>
                    &nbsp;&nbsp;&nbsp;&nbsp;<img src="../../../assets/remove.png" :class="style__" @click="delfile('f_notified_path', this.paper.f_notified_path)" style="width: 25%;"></img>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="form-group col-md-12 col-sm-12 col-xs-12">
          <div class="row">
            <label class="text-left">是否现场对用户进行安全用气讲解：</label>
          </div>
          <div class="col-xs-4 col-sm-4" v-for="item in safeexplanation">
            <input v-model="paper.f_is_explanation" :value="item.label" :checked='item.isChecked'
                   @click="checkteluser(item.value)" type="radio">{{ item.label }}
          </div>
        </div>
        <div class="form-group col-md-12 col-sm-12 col-xs-12">
          <div class="row">
            <label class="text-left">请对我们的服务做出评价：</label>
          </div>
          <div class="col-xs-4 col-sm-4"  v-for="item in radios">
            <input v-model="paper.f_client_evaluation" :value="item.label"  :checked='item.isChecked'  @click="check(item.value)" type="radio">{{item.label}}
          </div>

          <!--<div class="col-sm-4">-->
          <!--<radio-group :value.sync="paper.f_client_evaluation" type="success" buttons="false">-->
          <!--<radio value="满意">满意</radio>-->
          <!--<radio value="基本满意">基本满意</radio>-->
          <!--<radio value="不满意">不满意</radio>-->
          <!--</radio-group>-->
          <!--</div>-->
        </div>

        <div class="form-group col-md-12 col-sm-12 col-xs-12" v-if="isRecodr=='false'">
          <label class="text-left font">反馈录音:</label>
          <div class="col-md-12 col-sm-12 col-xs-12">
            <button type="button" name="button" class="btn btn-primary btn-voice" @click="record">
              <img src="../../../assets/录音.png" style="width: 14%;">
              <span v-if="!paper.f_recording1_path">开始录音</span>
              <span v-if="paper.f_recording1_path">已录音</span>
            </button>
            &nbsp;&nbsp;&nbsp;&nbsp;<img src="../../../assets/remove.png" style="width: 15px;" :class="style__" @click="delAudioFile('f_recording1_path', paper.f_recording1_path)"></img>
          </div>
        </div>

        <div v-if="false">
          <div class="text-center form-group col-md-12 col-sm-12 col-xs-12">
            <button  style="width: 30%;margin:3%;margin-bottom: 0%" type="button" v-show="$parent.$parent.actionEnabled && upload_state !='已传' &&(paper.f_complete != '已完成' || paper.back_f_entry_status != '入户') " class="btn save-btn" @click="$parent.$parent.save('temp')">临时保存</button>
            <button  style="width: 30%;margin:3%;margin-bottom: 0%" type="button" v-show="$parent.$parent.actionEnabled && upload_state !='已传' && (paper.f_complete != '已完成' || paper.back_f_entry_status != '入户')" class="btn save-btn " @click="$parent.$parent.save('finish')">完成安检</button>
          </div>
          <div class="text-center form-group col-md-12 col-sm-12 col-xs-12">
            <button style="width: 30%;margin:3%;margin-bottom: 0%;margin-top: 0%" id="upload" type="button" v-show="$parent.$parent.actionEnabled && upload_state !='已传' && (paper.f_complete != '已完成' || paper.back_f_entry_status != '入户')" class="btn upload-btn " @click="$parent.$parent.uploadCheckPaper" >上传</button>
            <!--          <button style="width: 30%;margin:3%;margin-bottom: 0%;margin-top: 0%" v-if="(safeCheckToRepair == true || safeCheckToRepair == 'true') && $parent.$parent.actionEnabled" class="btn repair-btn btn-warning " type="button" @click="showToRepair">转维修</button>        </div>-->
          </div>
        </div>
      </div>
    </form>
    <!--  <modal :show.sync="showCheckToRepair" v-ref:modal :backdrop="isback">-->
    <!--    <div slot="modal-header" class="modal-header">-->
    <!--      <h4 class="modal-title">-->
    <!--        安检转维修-->
    <!--      </h4>-->
    <!--    </div>-->
    <!--    <div slot="modal-body" class="modal-body">-->
    <!--      <div v-if="showrepair">-->
    <!--        <div class="row">-->
    <!--          <label class="col-xs-4 col-md-4 control-label text-left">派单方式</label>-->
    <!--          <div class="col-xs-8 col-md-8">-->
    <!--            <label v-for="handling1 in handling" >-->
    <!--              <input type="radio"-->
    <!--                     v-model="meading"-->
    <!--                     value="{{handling1.label}}">-->
    <!--              {{handling1.label}}-->
    <!--            </label>-->
    <!--          </div>-->
    <!--        </div>-->
    <!--        <div class="row" v-if="meading == '转站点'">-->
    <!--          <label class="col-xs-4 col-md-4 control-label font text-left" for="f_reciever">站点</label>-->
    <!--          &lt;!&ndash;<input type="text" v-show="false" v-model="serviceacitivity.f_reciever"&ndash;&gt;-->
    <!--          &lt;!&ndash;v-validate:f_reciever='{ required: true }'>&ndash;&gt;-->
    <!--          <div class="col-xs-8 col-md-8">-->
    <!--            <right-tree @ready="onReady" islist :Url="Url" :userid="userid" :source="source"  v-on:re-res="reres" :textContent="选择站点管理员" :selectData="" v-ref:f_reciever>-->
    <!--            </right-tree>-->
    <!--          </div>-->
    <!--        </div>-->

    <!--        <div class="row" style="margin-top: 6px" v-if="meading == '转维修员'">-->
    <!--          <label class="col-xs-4 col-md-4 control-label font text-left">维修人</label>-->
    <!--          <div class="col-xs-8">-->
    <!--            <v-select :value="$parent.$parent.model.serviceacitivity[0].f_reciever" :value-single="true"-->
    <!--                      :options='f_repair_person' placeholder='请选择维修员'-->
    <!--                      close-on-select v-on:change="repiarmancg"></v-select>-->
    <!--          </div>-->

    <!--        </div>-->
    <!--        <div class="row" style="margin-top: 6px">-->
    <!--          <label for="f_repair" class="col-xs-4 col-md-4 control-label font text-left">报修类型</label>-->
    <!--          <div class="col-xs-8 col-md-8">-->
    <!--            <v-select :value.sync="$parent.$parent.model.f_repairtype" :value-single="true"-->
    <!--                      :options='repairstypes' placeholder='报修类型'-->
    <!--                      close-on-select>-->
    <!--            </v-select>-->
    <!--          </div>-->
    <!--        </div>-->

    <!--        <div class="row" style="margin-top: 6px">-->
    <!--          <label class="control-label font text-left col-md-4 col-xs-4">备注</label>-->
    <!--          <div class="col-xs-8 col-md-8">-->
    <!--            <input type="text" v-model="$parent.$parent.model.f_remarks"/>-->
    <!--          </div>-->

    <!--        </div>-->

    <!--      </div>-->
    <!--      <div v-if="!showrepair">-->
    <!--        暂无隐患设备信息-->
    <!--      </div>-->
    <!--    </div>-->
    <!--    <div slot="modal-footer" class="modal-footer">-->
    <!--      <button type="button" class="btn btn-default" @click="uploadPaper()">确定</button>-->
    <!--      <button type="button" class="btn btn-default" @click="undo()">取消</button>-->
    <!--    </div>-->
    <!--  </modal>-->
    <!--拉黑框-->
    <modal :show.sync="showmodel" v-ref:modal>
      <div slot="modal-header" class="modal-header">
        <h4 class="modal-title">
          限制用户购气
        </h4>
      </div>
      <div slot="modal-body" class="modal-body">
        <!--      <div class="row" style="margin-top: 6px">-->
        <!--        <label style="color: red;">注:当前页面无法取消对用户的限制购气</label>-->
        <!--      </div>-->
        <div class="row" style="margin-top: 6px">
            <textarea id="el_ca_tx" v-model.trim="cause" style="border-radius:4px;width: 100%;" placeholder="请输入限制用户购气原因" >
            </textarea>
        </div>
      </div>
      <div slot="modal-footer" class="modal-footer">
        <button  type="button" name="button" class="col-sm-3 btn btn-primary" @click="backlist()">确认</button>
        <button  type="button" name="button" class="col-sm-3 btn btn-primary" @click="cancel()">取消</button>
      </div>
    </modal>

    <modal :show.sync="showmodelthree" v-ref:modal>
      <div slot="modal-header" class="modal-header">
        <h4 class="modal-title">
          取消限制用户购气
        </h4>
      </div>
      <div slot="modal-body" class="modal-body">
        <!--      <div class="row" style="margin-top: 6px">-->
        <!--        <label style="color: red;">注:当前页面无法取消对用户的限制购气</label>-->
        <!--      </div>-->
        <div class="row" style="margin-top: 6px">
            <textarea id="el_ca_txt" v-model.trim="deletecause" style="border-radius:4px;width: 100%;" placeholder="请输入取消限制用户购气原因" >
            </textarea>
        </div>
      </div>
      <div slot="modal-footer" class="modal-footer">
        <button  type="button" name="button" class="col-sm-3 btn btn-primary" @click="deletebacklist()">确认</button>
        <button  type="button" name="button" class="col-sm-3 btn btn-primary" @click="deletecancel()">取消</button>
      </div>
    </modal>
  </template>

  <script>
  import Vue from 'vue'
  import * as Util from '../../Util'
  import {HttpResetClass} from 'vue-client'
  import RadioGroup from 'vue-client/src/vue-strap/src/radioGroup'
  import Radio from 'vue-client/src/vue-strap/src/radioBtn'
  import co from 'co'


  // let getRepairParam = function * (self){
  //   let data = {
  //     $parent.$parent.model: self.$parent.$parent.model, loginUser: {
  //       name: self.role == 'view'?self.$login.f.name:Vue.user.name,
  //       ename: self.role == 'view'?self.$login.f.ename:Vue.user.ename
  //     }, user: self.user, callObj: self.callObj
  //   }
  //   if(self.$parent.$parent.meading == '转维修员'){
  //     data.toRepair = '一级派单'
  //   }
  //   data.$parent.$parent.model.f_attendant = data.loginUser.name
  //   ////tag
  //   ////tag
  //   let res
  //   let errString = self.$parent.  $parent.errorVerify()
  //   if(errString){
  //     ////tag
  //     if (Vue.android)
  //       self.undo()
  //     this.$showMessage(errString)
  //     return
  //   } else {
  //     if(self.role == 'inspect'){
  //       if(self.$parent.$parent.meading == '转维修员' && (self.$parent.$parent.model.serviceacitivity[0].f_reciever == '' || self.$parent.$parent.model.serviceacitivity[0].f_reciever == undefined)){
  //         this.$showMessage("请选择维修员!")
  //         return
  //       }
  //       if(self.$parent.$parent.meading == '转站点' && (self.$parent.$parent.model.serviceacitivity[0].f_reciever == '' || self.$parent.$parent.model.serviceacitivity[0].f_reciever == undefined)){
  //         HostApp.alert()
  //         this.$showMessage("请选择站点!")
  //         return
  //       }
  //       if(self.$parent.$parent.model.f_repairtype == ''){
  //         this.$showMessage("请选择报修类型!")
  //         return
  //       }
  //       ////tag)
  //       let checkResult = '正常'
  //       let options = [{"data": "已处理"},{"data": "未处理"}]
  //       let value = ''
  //       let codata = JSON.parse(JSON.stringify(self.paper))
  //       for(let device in codata){
  //         ////tag)
  //         let f_device_type
  //         if(device.startsWith("device")){
  //           for(let item in codata[device]) {
  //             if(codata[device].length > 1 ){
  //               let j = Number.parseInt(item)+1
  //               f_device_type = `${codata[device][item].f_device_type}${j}`
  //             }else{
  //               f_device_type = codata[device][item].f_device_type
  //             }
  //             // ////tag
  //             let details = []
  //             for(let i in codata[device][item].f_items){
  //               let items = codata[device][item].f_items[i]
  //               ////tag
  //               if(items.f_is_defect == true || items.f_is_defect == 'true'){
  //                 checkResult = '有隐患'
  //                 ////tag
  //                 let res = yield self.$resetpost(`${self.Url}/rs/sql/getDeviceItem`,{data:{f_device_id:codata[device][item].f_device_id,f_item_name:items.f_item_name}})
  //                 ////tag)
  //                 self.$set('detail.f_defect_id', res.data[0].id)
  //                 self.$set('detail.f_project',`${items.f_item_name}：${items.f_item_value}`)
  //                 self.$set('detail.type',items.type)
  //                 self.$set('detail.options',options)
  //                 details.push(JSON.parse(JSON.stringify(self.detail)))
  //               }
  //               if(items.type == 'selector'){
  //                 items.selected = ''
  //               }
  //               self.detail = {}
  //             }
  //             ////tag
  //             self.$set('defectDevice.f_type',f_device_type)
  //             self.$set('defectDevice.details',details)
  //             if(self.defectDevice.details.length >0 ){
  //               self.repairitems.push(JSON.parse(JSON.stringify(self.defectDevice)))
  //             }
  //             self.defectDevice = {}
  //             ////tag
  //           }
  //         }
  //       }
  //       self.$set('$parent.$parent.model.f_repairitems.data',self.repairitems)
  //
  //
  //       ////tag)
  //       res = self.$androidUtil.bzLogic('safecheckToRepair',data)
  //       ////tag
  //       ////tag
  //       ////tag
  //       if(res.code == 200){
  //         self.$parent.$parent.isSafeCheckToRepair = true
  //         self.undo()
  //         self.$set('paper.f_SafeToRepair_id',res.data.f_service_id)
  //         ////tag
  //         self.$resetpost(`${self.Url}/rs/logic/updatePaperRepair`,{data:{f_paper_id:self.paper.f_paper_id,f_SafeToRepair_id:res.data.f_service_id}}).then((ret)=>{
  //           ////tag
  //           if(ret.data.code ==200){
  //             ////tag
  //             self.$parent.$parent.$back()
  //           }else{
  //             self.$showMessage('安检转维修失败！')
  //           }
  //         }).catch(v=>{
  //           ////tag)
  //           self.$showMessage('安检转维修失败！')
  //         })
  //       }else{
  //         self.$showMessage('安检转维修失败！')
  //       }
  //     }
  //   }
  // }



  // let getRepairs = async function(self,url) {
  //   // 获取配置信息
  //   try {
  //     let val = {source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1 ))', userid: `${Vue.user.id}`}
  //     let repairs =[]
  //     let res = await Vue.resetpost(`${url}/rs/search`,{data: val},{resolveMsg: null, rejectMsg: null})
  //     res.data.forEach((item) => {
  //       repairs.push({label: item.name, value: item})
  //     })
  //     self.f_repair_person = repairs
  //     if(self.$parent.$parent.role == 'inspect'){
  //       let res = self.$androidUtil.bzLogic('getUserInfo',{id:self.paper.f_userinfoid})
  //       if(res.code == 200){
  //         self.$parent.$parent.user = res.data[0]
  //         self.$parent.$parent.model.f_area = self.$parent.$parent.user.f_area
  //       }
  //     }else{
  //       ////tag
  //       self.$resetpost(`${self.Url}/rs/sql/safeCheckgetUserInfo`,{data:{id:self.paper.f_userinfoid}},{resolveMsg: null, rejectMsg: null}).then((res)=>{
  //         ////tag
  //         if(res.data.length != 0){
  //           self.$parent.$parent.user = res.data[0]
  //           self.$parent.$parent.model.f_area = self.$parent.$parent.user.f_area
  //         }
  //       })
  //       // path({alias:'getUserInfo',data:{id:this.paper.f_userinfoid}})
  //     }
  //   } catch (error) {
  //     ////tag
  //   }
  // }

  export default {
    title: '用户反馈',
    data() {
      return {
        defectImgs: [],
        defectToolTip: [],
        defectReason: [],
        images: [],
        showmodelthree: false,
        isneedDate: this.$parent.$parent.isneedDate,
        plan: this.$parent.$parent.item,
        meading: this.$parent.$parent.meading,
        paper: this.$parent.$parent.data,
        printContent: [],
        upload_state: this.$parent.$parent.item.f_upload_state,
        enabled: false,//控制限制购气是否可选
        deleteenabled: false,
        showmodel: false,
        backlistisselect: false,
        deletebacklistisselect: false,
        radios: [
          {
            label: '满意',
            value: 0,
            isChecked: false,
          },
          {
            label: '基本满意',
            value: 1,
            isChecked: false,
          },
          {
            label: '不满意',
            value: 2,
            isChecked: false,
          },
        ],
        signature: [
          {
            label: '是',
            value: 0,
            isChecked: false,
          },
          {
            label: '否',
            value: 1,
            isChecked: false,
          }
        ],
        Nosignature: [
          {
            label: '是',
            value: 0,
            isChecked: false,
          },
          {
            label: '否',
            value: 1,
            isChecked: false,
          }
        ],
        safeexplanation: [
          {
            label: '是',
            value: 0,
            isChecked: true,
          },
          {
            label: '否',
            value: 1,
            isChecked: false,
          }
        ],
        repairitems: [],
        repairstypes: this.$appdata.getParam('报修类型'),
        // f_repair_person: this.readRepair(),
        showrepair: false,
        safeCheckToRepair: '',
        showCheckToRepair: false,
        userid: '',
        source:
          'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
          'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
        isback: false,
        defectDevice: {},
        detail: {},
        callObj: null,
        user: {},
        role: this.$parent.$parent.role,
        handling: [{label: '转站点', value: '转站点'}, {label: '转维修员', value: '转维修员'}],
        Url: this.$androidUtil.getProxyUrl(),
        cause: "",
        deletecause: "",
        isRecodr: "false", //单值参数，为true则是开启全程录音
      }
    },
    props: ['idx'],
    components: {
      RadioGroup,
      Radio
    },
    methods: {
      timeSet(val) {
        //////tag
        if (!val) {
          return
        }
        let time = new Date(val).getTime()
        let time2 = new Date().getTime()
        if (time2 > time) {
          return true
        }
      },
      // async isoverDate(){
      //   ////tag
      //   let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/androidGetuserinfo`, {data:{
      //       condition:"f_plan_item_id='"+this.$parent.$parent.item.id+"'"
      //     }
      //   })
      //   this.isneedDate=res.data[0]["f_subscribe_date"]
      //   ////tag
      // },
      check(index) {
        ////tag
        // 先取消所有选中项
        for (let item of this.radios) {
          item.isChecked = false;
        }
        //再设置当前点击项选中
        this.paper.f_client_evaluation = this.radios[index].label;
        // 设置值，以供传递
        this.radios[index].isChecked = true;
        ////tag;
      },
      checkNosignature(index) {
        //tag
        // 先取消所有选中项
        for (let item of this.Nosignature) {
          item.isChecked = false;
        }
        //再设置当前点击项选中
        this.paper.f_no_signature = this.Nosignature[index].label;
        // 设置值，以供传递
        this.Nosignature[index].isChecked = true;
        //tag;
      },
      checksignature(index) {
        //tag
        // 先取消所有选中项
        for (let item of this.signature) {
          item.isChecked = false;
        }
        //再设置当前点击项选中
        this.paper.f_is_signature = this.signature[index].label;
        // 设置值，以供传递
        this.signature[index].isChecked = true;
        //tag;
      },
      checkteluser(index) {
        //tag
        // 先取消所有选中项
        for (let item of this.safeexplanation) {
          item.isChecked = false;
        }
        //再设置当前点击项选中
        this.paper.f_is_explanation = this.safeexplanation[index].label;
        // 设置值，以供传递
        this.safeexplanation[index].isChecked = true;
        //tag;
      },
      getSignValue(fileName) {
        this.f_signname = fileName
      },
      cameraCallBack(prop, fileName) {
        if (prop == 'f_overall_path') {
          let f_overall_path = fileName + '?' + Math.random()
          HostApp.__this__.paper.f_overall_imgs.push({
            f_overall_path: f_overall_path
          })
        } else {
          HostApp.__this__.paper[prop] = fileName + '?' + Math.random()
        }
        HostApp.__callback__ = null
        HostApp.__this__ = null
      },
      takePic(prop, title, index) {
        HostApp.__callback__ = this.cameraCallBack
        HostApp.__this__ = this
        ////tag
        ////tag
        let fileName
        if (prop == 'f_overall_path') {
          if (!this.paper.f_overall_imgs[index] || this.paper.f_overall_imgs[index].f_overall_path.includes("nopic.png")) {
            fileName = Util.guid() + '-' + prop + '.jpg'
          } else {
            fileName = Util.getFileName(this.paper.f_overall_imgs[index].f_overall_path)
          }
        } else {
          if (!this.paper[prop] || this.paper[prop].includes("nopic.png")) {
            fileName = Util.guid() + '-' + prop + '.jpg'
          } else {
            fileName = Util.getFileName(this.paper[prop])
          }
        }

        HostApp._open_a_page({
          type: 'boomerang',
          page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
          param: {
            file: fileName,
            requestCode: 111,
            callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
            watermark: title + '\t时间：' + Util.toStandardTimeString() + '\t' + Vue.user.name + '\t' + this.paper.f_userinfo_code+ '\t' + this.paper.f_user_name+ '\t' + this.paper.f_address
          }
        })
      },
      amrCallBack(fileName) {
        HostApp.__this__.$set('paper.f_recording1_path', fileName)
        HostApp.__callback__ = null
        HostApp.__this__ = null
      },
      record() {
        if (this.$parent.$parent.role != 'inspect') {
          if (this.paper.f_recording1_path != '') {
            window.location = this.paper.f_recording1_path
          }
        } else {
          HostApp.__callback__ = this.amrCallBack
          HostApp.__this__ = this
          let fileName
          if (!this.paper.f_recording1_path) {
            fileName = Util.guid() + '.amr'
          } else {
            fileName = Util.getFileName(this.paper.f_recording1_path)
          }
          HostApp._open_a_page({
            type: 'boomerang',
            page: 'com.aofeng.hybrid.android.peripheral.AudioClipActivity',
            param: {file: fileName, requestCode: 111, callback: 'javascript:HostApp.__callback__("%s");'}
          })
        }
      },
      // 签名回调
      signCallback(prop, fileName) {
        // HostApp.alert('绑定属性:' + prop + ' 文件全路径如file:///storage/sdcard0/safecheck/abc.jpg：' + fullFileName)
        HostApp.__this__.$set('paper.f_sign_path', fileName)
        HostApp.__callback__ = null
        HostApp.__this__ = null
      },
      // 用户签名
      sign() {
        if (!this.paper.f_read_instructions) {
          this.$showMessage('请先阅读并勾选用户须知内容后进行签名！')
          return
        }
        this.delAudioFile('f_sign_path', this.paper.f_sign_path)
        let prop = 'f_sign_path'
        let idx = 'aofeng'
        let fileName
        if (!this.paper.f_sign_path) {
          fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
        } else {
          fileName = Util.getFileName(this.paper.f_sign_path)
        }
        HostApp.__callback__ = this.signCallback
        HostApp.__this__ = this
        HostApp.getSignature({
          file: fileName,
          requestCode: 111,
          callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");'
        })
      },
      delfile(prop, fileName, index) {
        if (fileName == Vue.nopic)
          return
        else {
          if (prop == 'f_overall_path') {
            this.paper.f_overall_imgs.splice(index, 1)
            HostApp.delfile(fileName)
          } else {
            HostApp.delfile(fileName)
            this.paper[prop] = Vue.nopic
          }
        }
      },
      delAudioFile(prop, fileName) {
        if (!fileName)
          return
        else {
          HostApp.delfile(fileName)
          this.paper[prop] = null
        }
      },
      //获取打印用户信息
      getUser() {
        if (this.paper.f_user_name == undefined)
          this.paper.f_user_name = ''
        this.printContent.push({
          type: 3,
          text: '用户名称：' + this.paper.f_user_name,
          fontsize: 2,
          isbold: false,
          align: 'left'
        })
        if (this.paper.f_userinfo_code == undefined)
          this.paper.f_userinfo_code = ''
        this.printContent.push({
          type: 3,
          text: '用户编号:' + this.paper.f_userinfo_code,
          fontsize: 2,
          isbold: false,
          align: 'left'
        })
        if (this.paper.f_address == undefined)
          this.paper.f_address = ''
        this.printContent.push({type: 3, text: '地址:' + this.paper.f_address, fontsize: 2, isbold: false, align: 'left'})
        if (this.paper.f_user_phone == undefined)
          this.paper.f_user_phone = ''
        this.printContent.push({
          type: 3,
          text: '电话:' + this.paper.f_user_phone,
          fontsize: 2,
          isbold: false,
          align: 'left'
        })
      },
      verify() {
        let hasError = this.$parent.$parent.verifyUser()
        if (hasError)
          return hasError
        hasError = this.$parent.$parent.verifyDevices()
        if (hasError)
          return hasError
      },
      print() {
        let errString = this.verify()
        if (errString) {
          ////tag
          if (Vue.android)
            this.$showMessage(errString)
          return
        }
        // 文本
        let templatename = '安检结果单'
        if (Vue.config.safecheck != undefined) {
          if (Vue.config.safecheck.ApproveConfig != undefined) {
            if (Vue.config.safecheck.ApproveConfig.templatename != undefined) {
              templatename = Vue.config.safecheck.ApproveConfig.templatename
            }
          }
        }
        let textHead = {type: 3, text: templatename, fontsize: 3, isbold: true, align: 'center'}
        let feedPageHead = {type: 4, value: 2, unit: 'line'}
        let feedPageEnd = {type: 4, value: 4, unit: 'line'}
        this.printContent.push(textHead)
        this.printContent.push(feedPageHead)
        this.getUser()
        this.getDefect()
        this.getCheck()
        this.printContent.push(feedPageEnd)
        let arrstr = JSON.stringify(this.printContent)
        ////tag
        this.$androidUtil.print(arrstr)
        this.$set('printContent', [])
      },
      //打印安检信息
      getCheck() {
        let telephone = '96777'
        if (Vue.config.safecheck != undefined) {
          if (Vue.config.safecheck.ApproveConfig != undefined) {
            if (Vue.config.safecheck.ApproveConfig.checkphone != undefined) {
              telephone = Vue.config.safecheck.ApproveConfig.checkphone
            }
          }
        }
        this.printContent.push({
          type: 3,
          text: '*******************************',
          fontsize: 3,
          isbold: false,
          align: 'center'
        })
        this.printContent.push({type: 3, text: '咨询电话；' + telephone, fontsize: 2, isbold: false, align: 'left'})
        this.printContent.push({type: 3, text: '安检人：' + Vue.user.name, fontsize: 2, isbold: false, align: 'left'})
        this.printContent.push({
          type: 3,
          text: '安检时间：' + this.getNowFormatDate(),
          fontsize: 2,
          isbold: false,
          align: 'left'
        })
        this.printContent.push({type: 3, text: '用户签字：', fontsize: 2, isbold: false, align: 'left'})
        this.printContent.push({type: 4, value: 4, unit: 'line'})
      },

      getDefect() {
        let showmore = false
        if (Vue.config.safecheck != undefined) {
          if (Vue.config.safecheck.ApproveConfig != undefined) {
            if (Vue.config.safecheck.ApproveConfig.showmore != undefined) {
              showmore = Vue.config.safecheck.ApproveConfig.showmore
            }
          }
        }

        let backData = this.$parent.$parent.getAllDefect()
        // 对隐患信息进行遍历
        let res = JSON.parse(backData.f_defect_content)
        this.printContent.push({
          type: 3,
          text: '安检结果：' + res.result,
          fontsize: 2,
          isbold: false,
          align: 'left'
        })
        this.printContent.push({
          type: 3,
          text: '*******************************',
          fontsize: 3,
          isbold: false,
          align: 'center'
        })


        if (showmore) {
          //全部打印
          for (let dev in this.$parent.$parent.config) {
            for (let device in backData) {
              if (device.startsWith("device")) {
                for (let item in backData[device]) {
                  //遍历结果
                  if (backData[device].length != 0 && backData[device][item].f_device_type == dev) {
                    let error = true
                    for (let i in backData[device][item].f_items) {
                      if (backData[device][item].f_items[i].f_is_defect == true || backData[device][item].f_items[i].f_is_defect == 'true') {
                        error = false
                      }
                    }
                    if (error) {
                      this.printContent.push({
                        type: 3,
                        text: dev + (backData[device].indexOf(backData[device][item]) + 1) + '：正常',
                        fontsize: 2,
                        isbold: false,
                        align: 'left'
                      })
                    } else {
                      this.printContent.push({
                        type: 3,
                        text: dev + (backData[device].indexOf(backData[device][item]) + 1) + ':有隐患',
                        fontsize: 2,
                        isbold: true,
                        align: 'left'
                      })
                    }

                    for (let i in backData[device][item].f_items) {
                      if (backData[device][item].f_items[i].f_item_value != '' && backData[device][item].f_items[i].f_item_value != null) {
                        this.printContent.push({
                          type: 3,
                          text: backData[device][item].f_items[i].f_item_name + backData[device][item].f_items[i].f_item_value,
                          fontsize: 2,
                          isbold: false,
                          align: 'left'
                        })
                      }
                    }
                    this.printContent.push({type: 4, value: 2, unit: 'line'})
                  }
                }
              }
            }
          }

          for (let dev in this.$parent.$parent.config) {
            for (let device in backData) {
              if (device.startsWith("device")) {
                for (let item in backData[device]) {
                  //遍历结果
                  if (backData[device].length != 0 && backData[device][item].f_device_type == dev) {
                    let error = true
                    for (let i in backData[device][item].f_items) {
                      if (backData[device][item].f_items[i].f_is_defect == true || backData[device][item].f_items[i].f_is_defect == 'true') {
                        error = false
                      }
                    }
                    if (!error) {
                      this.printContent.push({
                        type: 3,
                        text: '隐患:',
                        fontsize: 2,
                        isbold: true,
                        align: 'left'
                      })
                    }
                  }
                }
              }
            }
            for (let device in backData) {
              if (device.startsWith("device")) {
                for (let item in backData[device]) {
                  if (backData[device].length != 0 && backData[device][item].f_device_type == dev) {
                    for (let i in backData[device][item].f_items) {
                      if (backData[device][item].f_items[i].f_is_defect == true || backData[device][item].f_items[i].f_is_defect == 'true') {
                        this.printContent.push({
                          type: 3,
                          text: backData[device][item].f_items[i].f_item_name + ' ' + backData[device][item].f_items[i].f_item_value,
                          fontsize: 2,
                          isbold: true,
                          align: 'left'
                        })
                      }
                    }
                  }
                }
              }
            }

          }
        } else {
          for (let dev in this.$parent.$parent.config) {
            for (let device in backData) {
              if (device.startsWith("device")) {
                for (let item in backData[device]) {
                  //遍历结果
                  if (backData[device].length != 0 && backData[device][item].f_device_type == dev) {
                    let error = true
                    for (let i in backData[device][item].f_items) {
                      if (backData[device][item].f_items[i].f_is_defect == true || backData[device][item].f_items[i].f_is_defect == 'true') {
                        error = false
                      }
                    }
                    if (error) {
                      this.printContent.push({
                        type: 3,
                        text: dev + (backData[device].indexOf(backData[device][item]) + 1) + '：正常',
                        fontsize: 2,
                        isbold: false,
                        align: 'left'
                      })
                    } else {
                      this.printContent.push({
                        type: 3,
                        text: dev + (backData[device].indexOf(backData[device][item]) + 1) + ':有隐患',
                        fontsize: 2,
                        isbold: false,
                        align: 'left'
                      })
                    }

                    for (let i in backData[device][item].f_items) {
                      if (backData[device][item].f_items[i].f_is_defect == true || backData[device][item].f_items[i].f_is_defect == 'true') {
                        this.printContent.push({
                          type: 3,
                          text: '隐患:' + backData[device][item].f_items[i].f_item_name + backData[device][item].f_items[i].f_item_value,
                          fontsize: 2,
                          isbold: false,
                          align: 'left'
                        })
                      }
                    }
                    this.printContent.push({type: 4, value: 2, unit: 'line'})
                  }
                }
              }
            }
          }
        }
      },
      //获取当前时间
      getNowFormatDate() {
        var date = new Date();
        var seperator1 = "-";
        var seperator2 = ":";
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
          month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
          strDate = "0" + strDate;
        }
        var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
          + " " + date.getHours() + seperator2 + date.getMinutes()
          + seperator2 + date.getSeconds();
        return currentdate;
      },
      readRepair() {
        let url = this.$androidUtil.getProxyUrl()
        let gen = getRepairs(this, url)
        return co(gen)
      },
      showToRepair() {
        let res = this.hasDefect()
        ////tag
        ////tag
        if (res == '正常') {
          this.showrepair = false
        } else {
          this.showrepair = true
          this.assignObj()
        }
        this.showCheckToRepair = !this.showCheckToRepair
      },
      // 选中部门
      reres(val) {
        if (val.res == undefined) {
          return
        }
        this.$parent.$parent.model.serviceacitivity[0].f_meetunit = val.res
        this.$parent.$parent.model.f_meetunit = val.res
        this.$parent.$parent.model.f_orgstr = val.resids
        var arr = val.res.split('.')
        this.$parent.$parent.model.f_outlets = arr[arr.length - 1]
        this.$parent.$parent.model.serviceacitivity[0].f_reciever = val.resids
      },
      assignObj() {
        this.$parent.$parent.model.f_contact_phone = this.paper.f_user_phone
        this.$parent.$parent.model.f_user_name = this.paper.f_user_name
        this.$parent.$parent.model.f_address = this.paper.f_address
        this.$parent.$parent.model.f_user_type = this.paper.f_check_type
        this.$parent.$parent.model.f_street = this.paper.f_street
        this.$parent.$parent.model.f_residential_area = this.paper.f_residential_area
        this.$parent.$parent.model.f_building = this.paper.f_building
        this.$parent.$parent.model.f_unit = this.paper.f_unit
        this.$parent.$parent.model.f_floor = this.paper.f_floor
        this.$parent.$parent.model.f_room = this.paper.f_room
        this.$parent.$parent.model.f_floor = this.paper.f_floor
        this.$parent.$parent.model.f_userinfo_id = this.paper.f_userinfoid
        this.$parent.$parent.model.f_userinfo_code = this.paper.f_userinfo_code
      },
      hasDefect() {
        let checkResult = '正常'
        let codata = JSON.parse(JSON.stringify(this.paper))
        for (let device in this.paper) {
          if (device.startsWith("device")) {
            for (let item in this.paper[device]) {
              for (let i in this.paper[device][item].f_items) {
                let items = this.paper[device][item].f_items[i]
                ////tag
                if (items.f_is_defect == true || items.f_is_defect == 'true') {
                  checkResult = '有隐患'
                }
              }
            }
          }
        }
        return checkResult
      },
      uploadPaper() {
        if (this.showrepair) {
          ////tag
          ////tag
          ////tag
          ////tag

          if (this.meading == '转维修员' && (this.$parent.$parent.model.serviceacitivity[0].f_reciever == '' || this.$parent.$parent.model.serviceacitivity[0].f_reciever == undefined)) {
            this.$showMessage("请选择维修员!")
            return
          }
          if (this.$parent.$parent.meading == '转站点' && (this.$parent.$parent.model.serviceacitivity[0].f_reciever == '' || this.$parent.$parent.model.serviceacitivity[0].f_reciever == undefined)) {
            this.$showMessage("请选择站点!")
            return
          }
          if (this.$parent.$parent.model.f_repairtype == '') {
            this.$showMessage("请选择报修类型!")
            return
          }
          this.$parent.$parent.isToRepair = true
          this.$parent.$parent.uploadCheckPaper()
          // this.$parent.$parent.savePaper(false).then((res) => {
          //   ////tag
          //   if(res != true){
          //     ////tag
          //     return
          //   }else{
          // this.$parent.$parent.todo()
          //   }
          // })
        } else {
          this.$parent.$parent.undo()
        }

      },
      //确认安检转维修

      undo() {
        this.showCheckToRepair = !this.showCheckToRepair
        this.$parent.$parent.model.serviceacitivity[0].f_reciever = ''
        this.$parent.$parent.model.serviceacitivity[0].f_meetunit = ''
        this.$parent.$parent.model.f_repairtype = ''
        this.meading = '转站点'
      },
      //取消拉黑
      async deletebacklist() {
        if (!this.deletecause) {
          this.$showMessage("请填写取消拉黑原因！")
          return
        }
        this.paper.f_blocking_cause = this.deletecause
        ////tag)
        let http = new HttpResetClass()
        ////tag
        let res1 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
          data: {
            items: "version",
            tablename: "t_userinfo",
            condition: "f_userinfo_id=" + this.paper.f_userinfoid,
            orderitem: "f_userinfo_id"
          }
        }, {resolveMsg: null, rejectMsg: null})
        ////tag)
        ////tag
        let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/backlistOperate`, {
          data: {
            "f_operat_type": "取消拉黑",
            "f_state": "有效",
            "f_user_name": this.paper.f_user_name,
            "f_comments": this.paper.f_delete_cause,
            "f_operator": Vue.user.name,
            "f_operatorid": Vue.user.id,
            "f_orgid": Vue.user.orgid,
            "f_orgname": Vue.user.orgs,
            "f_depid": Vue.user.depids,
            "f_depname": Vue.user.deps,
            "f_describe": `${Vue.user.name}对用户${this.paper.f_user_name}进行取消拉黑`,
            "f_userinfo_id": {
              "f_userinfo_id": this.paper.f_userinfoid,
              "f_user_state": "正常",
              "version": res1.data[0].version
            },
            "f_limit_times":"",
            "f_limit_value":""
          }
        }, {resolveMsg: null, rejectMsg: null})

        ////tag)
        if (res2.data.code == 200) {
          this.showmodelthree = false
          this.deleteenabled = true
          this.paper.f_blacklist = "否"
          this.$showMessage("取消该用户限制购气成功！")
        } else {
          this.$showMessage("网络异常，请稍后再试！")
        }
      },
      async backlist() {
        if (!this.cause) {
          this.$showMessage("请填写拉黑原因！")
          return
        }
        this.paper.f_blocking_cause = this.cause
        ////tag)
        let http = new HttpResetClass()
        ////tag
        let res1 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
          data: {
            items: "version",
            tablename: "t_userinfo",
            condition: "f_userinfo_id=" + this.paper.f_userinfoid,
            orderitem: "f_userinfo_id"
          }
        }, {resolveMsg: null, rejectMsg: null})
        let limit_times = 1
        let limit_value = 3
        let limit_amount = 54
        let limit_type = '金额'
        let safeCheckConfig = null
        if (Vue.config.safecheck && Vue.config.safecheck.ApproveConfig){
          safeCheckConfig = Vue.config.safecheck.ApproveConfig
        }
        if (safeCheckConfig && safeCheckConfig.limit_amount !== undefined && safeCheckConfig.limit_amount !== null) {
          limit_amount = safeCheckConfig.limit_amount
        }
        if (safeCheckConfig && safeCheckConfig.limit_times !== undefined && safeCheckConfig.limit_times !== null && safeCheckConfig.limit_times) {
          limit_times = Number(safeCheckConfig.limit_times) > 0 ? Number(safeCheckConfig.limit_times) : 1
        }
        if (safeCheckConfig && safeCheckConfig.limit_value !== undefined && safeCheckConfig.limit_value !== null) {
          limit_value = safeCheckConfig.limit_value
        }
        if (safeCheckConfig && safeCheckConfig.limit_type !== undefined && safeCheckConfig.limit_type !== null) {
          limit_type = safeCheckConfig.limit_type
        }

        if(this.paper.f_check_type == '民用') {
          limit_times = 1
          limit_amount = 60
        }
        let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/backlistOperate`, {
          data: {
            data:this.$parent.$parent.data,
            item:this.$parent.$parent.data.item,
            "f_operat_type": "拉黑",
            "f_state": "有效",
            "f_user_name": this.paper.f_user_name,
            "f_comments": this.paper.f_blocking_cause,
            "f_operator": Vue.user.name,
            "f_operatorid": Vue.user.id,
            "f_orgid": Vue.user.orgid,
            "f_orgname": Vue.user.orgs,
            "f_depid": Vue.user.depids,
            "f_depname": Vue.user.deps,
            "f_describe": `${Vue.user.name}对用户${this.paper.f_user_name}进行拉黑`,
            "f_userinfo_id": {
              "f_userinfo_id": this.paper.f_userinfoid,
              "f_user_state": "正常",
              "version": res1.data[0].version
            },
            "f_limit_times":limit_times,
            "f_limit_value":limit_value,
            "f_limit_amount":limit_amount,
            'f_limit_type':limit_type
          }
        }, {resolveMsg: null, rejectMsg: null})

        ////tag)
        if (res2.data.code == 200) {
          this.showmodel = false
          this.enabled = true
          this.paper.f_blacklist = "是"
          this.$showMessage("将该用户限制购气成功！")
        } else if (res2.data.msg == '数据增加重复') {
          this.showmodel = false
          this.enabled = true
          this.$showMessage("该用户已被限制购气，请勿重复提交！")
        } else {
          this.$showMessage("网络异常，请稍后再试！")
        }
      },
      cancel() {
        this.backlistisselect = false
        this.showmodel = false
      },
      deletecancel() {
        this.deletebacklistisselect = false
        this.showmodelthree = false
      },
      repiarmancg(val) {
        if (val) {
          ////tag
          this.$parent.$parent.model.serviceacitivity[0].f_reciever = val.name
          let http1 = new HttpResetClass()
          http1.load('POST', `${this.Url}/rs/sql/tel_singleTable_OrderBy`, {
            data: {
              items: 'f_user_telephone',
              tablename: 't_user',
              condition: `name  = '${val}'`,
              orderitem: 'id'
            }
          }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
            this.$parent.$parent.model.f_repairman_phone = ress.data[0].f_user_telephone
          })
        }
      },
    },
    async ready() {
      this.isRecodr = this.$appdata.getSingleValue('无限制录音');
      // await this.isoverDate()
      ////tag
      ////tag
      ////tag)
      ////tag))
      if (this.$parent.$parent.role == 'repair') {
        this.$set('style__', 'divmask')
        this.$set('style_view_', '')
      } else if (this.$parent.$parent.role == 'view' || this.$parent.$parent.item.f_upload_state == '已传') {
        this.$set('style__', 'divmask')
        this.$set('style_view_', 'divmask')
        ////tag
      } else {
        this.$set('style__', '')
        this.$set('style_view_', '')
      }

      for (let item of this.radios) {
        if (this.paper.f_client_evaluation == item.label) {
          item.isChecked = true;
        }
      }
      for (let item of this.safeexplanation) {
        if (this.paper.f_is_explanation == item.label) {
          item.isChecked = true;
        }
      }
      for (let item of this.signature) {
        if (this.paper.f_is_signature == item.label) {
          item.isChecked = true;
        }
      }
      for (let item of this.Nosignature) {
        if (this.paper.f_no_signature == item.label) {
          item.isChecked = true;
        }
      }
      if (!this.paper.f_notified_path)
        this.$set('paper.f_notified_path', Vue.nopic)
      if (!this.paper.f_sign_path)
        this.$set('paper.f_sign_path', Vue.nopic)
      ////tag
      if (!this.paper.f_overall_imgs) {
        let imgs = []
        // imgs.push({f_overall_path:Vue.nopic})
        this.$set('paper.f_overall_imgs', imgs)
        ////tag
      }
      if (!this.paper.f_overall2_path)
        this.$set('paper.f_overall2_path', Vue.nopic)

      this.userid = this.role == 'view' ? this.$login.f.id : Vue.user.id
      if (Vue.config.safecheck != undefined) {
        if (Vue.config.safecheck.ApproveConfig != undefined) {
          if (Vue.config.safecheck.ApproveConfig.safeCheckToRepair != undefined) {
            this.safeCheckToRepair = Vue.config.safecheck.ApproveConfig.safeCheckToRepair
          }
        }
      }
      let device = this.$parent.$parent.data
      for (const deviceitem in device) {
        if (deviceitem.startsWith('device')){
          //tag)
          let items = device[deviceitem][0].f_items
          let deviceType = device[deviceitem][0].f_device_type
          for (let i = 0; i < items.length; i++) {
            if (items[i].f_is_defect){
              let reason = items[i].f_item_name+":"
              if (items[i].type === 'selector' || items[i].type === 'radio' || items[i].type === 'checkbox'){
                for (let j = 0; j < items[i].f_item_value.length; j++) {
                  if (j+1 === items[i].f_item_value.length){
                    reason += items[i].f_item_value[j]
                  }else{
                    reason += items[i].f_item_value[j] + ","
                  }
                }
              }else{
                reason += items[i].f_item_value
              }
              if (items[i].f_path){
                this.defectImgs.push(items[i].f_path)
              }
              if (items[i].f_p1_path){
                this.defectImgs.push(items[i].f_p1_path)
              }
              if (items[i].f_p2_path){
                this.defectImgs.push(items[i].f_p2_path)
              }
              if (items[i].f_p3_path){
                this.defectImgs.push(items[i].f_p3_path)
              }
              if (items[i].tooltip){
                this.defectToolTip.push(items[i].tooltip)
              }
              this.defectReason.push({device:deviceType,deviceitem:reason})
            }

          }
        }
      }
      ////tag
      ////tag
      //tag
      ////tag
      //tag)
      //tag)
      //tag)
      ////tag
      ////tag
      ////tag
    },
    watch: {
      '$parent.$parent.isUpload'(val) {
        ////tag
      },
      'meading'(val) {
        ////tag
        this.$parent.$parent.meading = val
      },
      'backlistisselect'(val) {
        if (val == true) {
          this.showmodel = true
          this.deletebacklistisselect=false
        }
      },
      'deletebacklistisselect'(val) {
        if (val == true) {
          this.showmodelthree = true
          this.backlistisselect=false
        }
      },
      'isRecodr'(val) {
        if (val == 'false' || val == undefined || val == null || val == '' || val == 'undefined') {
          this.isRecodr = "false";
        }
      }
    }
  }
  </script>
  <style scoped>
  .panel-self{
    border-radius: 5px;
    border:1px solid #c5e1f7;
    background-color: #F2F6FA;
  }
  .text-left{
    text-align:left;
  }
  .font{
    font: 15px PingFang-SC-Medium;
    color: #333333;
  }
  .showIi{
    font: 14px PingFang-SC-Medium;
    color: #666666;
  }
  .info{
    margin-top: 15px;
    border-radius: 5px;
    background-color: #f3faff;
  }
  .btn-photo{
    border: 0;
    border-radius: 7px;
    background-color: #7dc1f4;
    font: 15px PingFang-SC-Bold;
    height: 20%;
  }
  .div-photo{
    width: auto;
    height: auto;
    /* margin-top: 10px; */
    position: absolute;
    bottom: 10px;
    right: 10px;
  }
  .btn-voice{
    border-radius: 7px;
    border: 1px solid #dedede;
    background-color: #f5fbff;
    font: 15px PingFang-SC-Bold;
    color: #499edf;
  }
  .save-btn{
    width: 25%;
    background-color:#499edf;
    border-radius: 6px;
    color: #FFFFFF;
    font: 15px PingFang-SC-Bold;
  }
  .upload-btn{
    width: 25%;
    background-color:#ffffff;
    border: 1px solid #499edf;
    border-radius: 6px;
    color: #499edf;
    font: 15px PingFang-SC-Bold;
  }
  .repair-btn{
    width: 25%;
    border: 1px solid #499edf;
    border-radius: 6px;
    font: 15px PingFang-SC-Bold;
  }
  #el_ca_tx{
    width: 100%;
    margin: 5px;
  }
  #el_ca_txt{
    width: 100%;
    margin: 5px;
  }
  </style>
