<template>
  <form novalidate class="form-horizontal" style="width: 95%;margin: auto">
    <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 style="color:red;">注意：请严格按照提示依据顺序拍摄相关图片</li>
          <li>1、用户燃气本（用户名信息页）</li>
          <li>2、燃气表底数</li>
          <li>3、燃气表剩余</li>
          <li>4、室内燃气管道全貌</li>
          <li>5、所有用气设备</li>
        </ol>
      </div>
    </div>
    <div class="form-group col-sm-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">-->
    <!--<label class="text-left font">总体安检照片2</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-self  :src="paper.f_overall2_path" alt="总体安检照片2" 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_overall2_path', '总体安检照片2')">拍照</button>-->
    <!--&nbsp;&nbsp;&nbsp;&nbsp;<img src="../../../assets/remove.png" :class="style__"  @click="delfile('f_overall2_path', paper.f_overall2_path)" style="width: 25%;"></img>-->
    <!--</div>-->
    <!--</div>-->
    <!--</div>-->
    <!--</div>-->
    <!--</div>-->
    <div class="form-group col-sm-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" :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" :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-sm-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__">
      <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 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">
        <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 class="form-group col-md-12 col-sm-12 col-xs-12">-->
      <!--        <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>
  </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>
          <!--<input type="text" v-show="false" v-model="serviceacitivity.f_reciever"-->
          <!--v-validate:f_reciever='{ required: true }'>-->
          <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
  //   console.log('===================')
  //   console.log(data)
  //   let res
  //   let errString = self.$parent.  $parent.errorVerify()
  //   if(errString){
  //     console.log(errString)
  //     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
  //       }
  //       console.log("转维修数据1：==》"+JSON.stringify(data))
  //       let checkResult = '正常'
  //       let options = [{"data": "已处理"},{"data": "未处理"}]
  //       let value = ''
  //       let codata = JSON.parse(JSON.stringify(self.paper))
  //       for(let device in codata){
  //         console.log('转维修codata[device]'+JSON.stringify(codata[device]))
  //         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
  //             }
  //             // console.log('codata[device][item]=>',codata[device][item])
  //             let details = []
  //             for(let i in codata[device][item].f_items){
  //               let items = codata[device][item].f_items[i]
  //               console.log('items',items)
  //               if(items.f_is_defect == true || items.f_is_defect == 'true'){
  //                 checkResult = '有隐患'
  //                 console.log('类型----',f_device_type)
  //                 let res = yield self.$resetpost(`${self.Url}/api/af-safecheck/sql/getDeviceItem`,{data:{f_device_id:codata[device][item].f_device_id,f_item_name:items.f_item_name}})
  //                 console.log('获取安检设备信息结果=》'+JSON.stringify(res))
  //                 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 = {}
  //             }
  //             console.log('details',details)
  //             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 = {}
  //             console.log('repairitems===>'+self.repairitems)
  //           }
  //         }
  //       }
  //       self.$set('$parent.$parent.model.f_repairitems.data',self.repairitems)
  //
  //
  //       console.log("转维修数据2：==》"+JSON.stringify(data))
  //       res = self.$androidUtil.bzLogic('safecheckToRepair',data)
  //       console.log('res==========')
  //       console.log(res.code)
  //       console.log(res.data)
  //       if(res.code == 200){
  //         self.$parent.$parent.isSafeCheckToRepair = true
  //         self.undo()
  //         self.$set('paper.f_SafeToRepair_id',res.data.f_service_id)
  //         console.log('更新维修单id')
  //         self.$resetpost(`${self.Url}/api/af-safecheck/logic/updatePaperRepair`,{data:{f_paper_id:self.paper.f_paper_id,f_SafeToRepair_id:res.data.f_service_id}}).then((ret)=>{
  //           console.log('ret==>'+ret)
  //           if(ret.data.code ==200){
  //             console.log('维修单id修改成功')
  //             self.$parent.$parent.$back()
  //           }else{
  //             self.$showMessage('安检转维修失败！')
  //           }
  //         }).catch(v=>{
  //           console.log('v=>'+JSON.stringify(v))
  //           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('getUserInfoTS',{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{
        console.log('pc')
        self.$resetpost(`${self.Url}/api/af-safecheck/sql/safeCheckgetUserInfoTS`,{data:{id:self.paper.f_userinfoid}},{resolveMsg: null, rejectMsg: null}).then((res)=>{
          console.log('res',res)
          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) {
      console.log('error',error)
    }
  }

  export default {
    title: '用户反馈',
    data() {
      return {
        images:[],
        detailAddress:{},
        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,//控制限制购气是否可选
        showmodel:false,
        showmodelthree:false,
        deleteenabled: false,
        backlistisselect:false,
        deletebacklistisselect: false,
        radios:[
          {
            label: '满意',
            value: 0,
            isChecked: false,
          },
          {
            label: '基本满意',
            value:1,
            isChecked: false,
          },
          {
            label: '不满意',
            value:2,
            isChecked: false,
          },
        ],
        repairitems:[],
        repairstypes:this.$appdata.getParam('报修类型'),
        f_repair_person: [],
        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:""
      }
    },
    props: ['idx'],
    components: {
      RadioGroup,
      Radio
    },
    methods: {
      timeSet(val){
        //console.log("我执行过了")
        if (!val){
          return
        }
        let time =new Date(val).getTime()
        let time2=new Date().getTime()
        if (time2>time) {
          return true
        }
      },
      // async isoverDate(){
      //   console.log("进入了这个方法")
      //   let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/androidGetuserinfo`, {data:{
      //       condition:"f_plan_item_id='"+this.$parent.$parent.item.id+"'"
      //     }
      //   })
      //   this.isneedDate=res.data[0]["f_subscribe_date"]
      //   console.log("打印一下=========》"+this.$parent.$parent.item.id)
      // },
      check(index) {
        console.log('index',index)
        // 先取消所有选中项
        for (let item of this.radios){
          item.isChecked = false;
        }
        //再设置当前点击项选中
        this.paper.f_client_evaluation = this.radios[index].label;
        // 设置值，以供传递
        this.radios[index].isChecked = true;
        console.log('paper.f_client_evaluation==',this.paper.f_client_evaluation);
      },
      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
        console.log("prop:" + prop)
        console.log("this.prop:" + this.paper[prop])
        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")) {
            console.log("this.prop----11")
            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.detailAddress.data
          }
        })
      },
      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) {
          console.log(errString)
          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)
        console.log(arrstr)
        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()
        console.log('==========检测结果========')
        console.log(res)
        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]
                console.log('items',items)
                if(items.f_is_defect == true || items.f_is_defect == 'true'){
                  checkResult = '有隐患'
                }
              }
            }
          }
        }
        return checkResult
      },
      uploadPaper() {
        if(this.showrepair){
          console.log('this.meading===>'+this.meading)
          console.log('this.$parent.$parent.meading===>'+this.$parent.$parent.meading)
          console.log('typeof this.$parent.$parent.meading===>'+typeof this.$parent.$parent.meading)
          console.log('this.$parent.$parent.model.f_repairtype===>'+this.$parent.$parent.model.f_repairtype)

          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) => {
          //   console.log(`res=${res}`)
          //   if(res != true){
          //     console.log('失败')
          //     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()}/api/af-safecheck/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()}/api/af-revenue/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
        console.log("vue.user:-"+JSON.stringify(Vue.user))
        let http = new HttpResetClass()
        console.log("即将进行拉黑！")
        let res1= await http.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/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})
        console.log("查询版本号---"+JSON.stringify(res1))
        console.log("打印参数---"+this.paper.f_user_name+"-"+this.paper.f_blocking_cause+"-"+Vue.user.name+"-"+ Vue.user.id+"-"+Vue.user.orgid+"-"+Vue.user.orgs+"-"+Vue.user.depids+"-"+Vue.user.deps+"-"+this.paper.f_userinfoid)
        let res2= await http.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/backlistOperate`, {
          data: {
            "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}
          }
        }, {resolveMsg:null, rejectMsg: null})

        console.log("拉黑结果---"+JSON.stringify(res2))
        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){
          console.log(val)
          this.$parent.$parent.model.serviceacitivity[0].f_reciever = val.name
          let http1 = new HttpResetClass()
          http1.load('POST',`${this.Url}/api/af-safecheck/sql/safe_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
          })
        }
      },
      getDetailAddress(){
        this.detailAddress=HostApp.getDetailAddress()
        console.log("拿到了！！！！！！！"+JSON.stringify(this.detailAddress))
        this.detailAddress.data=this.detailAddress.data!=null?this.detailAddress.data:''
        console.log("拿到了！！！！！！！"+JSON.stringify(this.detailAddress))
      }
    },

    async ready() {
      this.getDetailAddress()
      this.paper.f_read_instructions=true
      // await this.isoverDate()
      console.log(this.isneedDate)
      console.log('查询到的已办的返回内容' + JSON.stringify(this.$parent.$parent.item.f_upload_state))
      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')
        console.log('set style for ....')
      } 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;
        }
      }
      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)
      console.log('!this.paper.f_overall_imgs==>'+!this.paper.f_overall_imgs)
      if (!this.paper.f_overall_imgs){
        let imgs = []
        // imgs.push({f_overall_path:Vue.nopic})
        this.$set('paper.f_overall_imgs', imgs)
        console.log('进入setpaper.f_overall_imgs')
      }
      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
          }
        }
      }
      console.log(`this.safeCheckToRepair==========${this.safeCheckToRepair}`)
      console.log(Vue.config)
    },
    watch:{
      '$parent.$parent.isUpload'(val){
        console.log('isUpload发生变化===>'+val)
      },
      'meading'(val){
        console.log('meading发生变化===>'+val)
        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
        }
      }
    }
  }
</script>
<style>
  .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;
  }
</style>
