hwy vor 1 Monat
Ursprung
Commit
47e01eb4c3

+ 44 - 191
app/rehabilitation/html/device.html

@ -82,6 +82,13 @@
        transform: translateX(-50%);
        width: 400px;
      }
      .back-btn{
        position: absolute;
        bottom: 80px;
        left: 50%;
        transform: translateX(-47.5%);
        width: 400px;
      }
    </style>
  </head>
  <body>
@ -97,7 +104,7 @@
              <span>{{item.name}}</span>
            </div>
          </el-tab-pane>
          <el-tab-pane label="智能手表" name="watch"  class="box">
          <el-tab-pane label="智能手表" name="watch" class="box">
            <div v-for="item in watchList" :id="item.id" class="item" @click="selectItem(item)">
              <div class="img-box">
                <img :src="item.photo" alt="" v-if="item.photo!=''" />
@ -125,32 +132,36 @@
        <div v-if="deviceObj.categoryCode == 2">
          <div class="form-item">
            <div class="form-label">SN码</div>
            <el-input v-model="query.device_sn" placeholder="请输入设备唯一码"></el-input>
            <el-input v-model="query.deviceSn" :disabled="dataId" placeholder="请输入设备唯一码"></el-input>
          </div>
          <div class="form-item" v-if="deviceObj.deviceId == 6">
            <div class="form-label">SIM码</div>
            <el-input v-model="query.sim" placeholder="请输入SIM码"></el-input>
            <el-input v-model="query.sim" :disabled="dataId" placeholder="请输入SIM码"></el-input>
          </div>
          <div v-if="deviceObj.isMultiUser == 1">
            <div class="title">绑定快捷键</div>
            <div v-for="(value, key) in deviceObj.multiUser">
              <el-radio v-model="query.userType" :disabled="dataId" :label="key" class="ml6">{{value}}</el-radio>
            </div>
          </div>
          <div class="title">绑定快捷键</div>
          <el-radio v-model="query.userType" :label="key" class="ml6" v-for="(value, key) in deviceObj.multiUser">{{value}}</el-radio>
          <br />
          绑定后,从该快捷键上传的数据将导入您的健康记录中!
        </div>
        <div v-else-if="deviceObj.categoryCode == 4">
          <div class="form-item">
            <div class="form-label">IMEI码</div>
            <el-input v-model="query.deviceSn" placeholder="请输入设备唯一码"></el-input>
            <el-input v-model="query.deviceSn" :disabled="dataId" placeholder="请输入设备唯一码"></el-input>
          </div>
          绑定后,智能手表监测的心率数据将自动同步导入您的健康记录中!
        </div>
        <div v-else>
          <div class="form-item">
            <div class="form-label">SN码</div>
            <el-input v-model="query.device_sn" placeholder="请输入设备唯一码"></el-input>
            <el-input v-model="query.deviceSn" :disabled="dataId" placeholder="请输入设备唯一码"></el-input>
          </div>
          绑定后,血氧仪测量的数据将自动同步导入您的健康记录中!
        </div>
        <el-button class="add-device-btn" type="primary" @click="bindDeviceFn">立即绑定</el-button>
        <el-button class="back-btn" v-if="!dataId" @click="backFn">返回</el-button>
        <el-button class="add-device-btn" v-if="!dataId" type="primary"  @click="bindDeviceFn">立即绑定</el-button>
      </template>
    </div>
    <script type="text/javascript" src="../../../js/vue.js"></script>
@ -182,10 +193,22 @@
          }
        },
        methods: {
          initData(){
          initData() {
            const vm = this
            httpRequest.get('common/device/DeviceInfo', { data: { id: this.deviceId } }).then(function(res){
            httpRequest.get('common/device/DeviceInfo', { data: { id: this.deviceId } }).then(function (res) {
              vm.deviceObj = res.data
              if(vm.deviceObj.isMultiUser == 1){
                vm.deviceObj.multiUser = JSON.parse(res.data.multiUser)
              }
            })
            httpRequest.get('doctor/device/PatientDeviceInfo',{data:{id: this.dataId}}).then(function(res){
              vm.query = {
                deviceSn: res.data.deviceSn,
                sim: res.data.sim,
                userType: res.data.userType
              }
              console.log(vm.query);
              
            })
          },
          tabChange(val) {
@ -203,7 +226,7 @@
          },
          getXueyaList() {
            const vm = this
            
            httpRequest.get('common/device/DeviceList', { data: { category_code: 2 } }).then(function (res) {
              vm.xueyaList = res.data
            })
@ -225,7 +248,9 @@
            httpRequest.get('common/device/DeviceInfo', { data: { id: item.id } }).then(function (res) {
              vm.step++
              vm.deviceObj = res.data
              vm.deviceObj.multiUser = JSON.parse(res.data.multiUser) 
              if(vm.deviceObj.isMultiUser == 1){
                vm.deviceObj.multiUser = JSON.parse(res.data.multiUser)
              }
              vm.query = {}
            })
          },
@ -237,189 +262,16 @@
              this.$message.warning('对不起,您输入的SN有误,请重新输入')
            }
            let params = {
              device_sn: this.query.device_sn,
              device_sn: this.query.deviceSn,
              patient: this.patient,
              type: this.deviceObj.categoryCode
            }
            httpRequest.get('doctor/device/PatientDeviceIdcard', { data: params }).then(function (res) {
              if (res.data.length == 0) {
                checkSuccess(snCode)
                return
              }
              //遍历绑定信息
              var isbind = false //是否绑定
              var bindnum = 0
              var showTitle = ''
              var fatherData = null
              var montherData = null
              //循环取出爸爸妈妈健的数据
              for (var j in res.data) {
                var data = res.data[j] //取出设置
                var dataType = data['type'] //按键类型1.爸爸建2.妈妈键
                var others = data['others'] //others==1为被别人绑定
                if (dataType == 1) {
                  fatherData = data
                  if (others == 1) {
                    bindnum += 1
                    if (vm.userType == 1) vm.userType = 0 //被绑定
                  }
                } else {
                  montherData = data
                  if (others == 1) {
                    if (vm.userType == 2) vm.userType = 0 //被绑定
                    $('.monther').attr('data-click', '0') //设置键2无法点击
                    $('.montherbf').html('已经被' + data['name'] + '绑定') //设置绑定信息
                    $('.div-monther-band').show() //显示绑定信息
                    bindnum += 1
                    if ($('.monther').hasClass('active')) {
                      //用户已经选择了爸爸建,就重置
                      $('.monther').removeClass('active')
                      showTitle = '该快捷键已经被' + data['name'] + '绑定,若要绑定该快捷键,需' + data['name'] + '先解绑设备'
                    }
                  }
                }
              }
              if (bindnum == 2) {
                mui.confirm('该设备所有快捷键已被绑定,解绑快捷键后,方可再次绑定!', '', ['我知道了'], function (e) {
                  return
                })
                $('#bang-btn').addClass('active')
                return false
              } else if (bindnum == 1 && showTitle != '') {
                //被绑定的按键选项
                mui.confirm(showTitle, '', ['我知道了'], function (e) {
                  return
                })
                $('#bang-btn').addClass('active')
                return false
              }
              if (fatherData != null) {
                var others = fatherData['others'] //others==1为被别人绑定
                if (others != 1) {
                  //被别人绑定了
                  //被自己绑定
                  if (dataId == null) {
                    //新增的时候输入被自己绑定的SN码
                    $('.father').attr('data-click', '-1') //设置爸爸妈妈键不能点击
                    $('.monther').attr('data-click', '-1')
                    if ($('.father').hasClass('active')) {
                      //用户已经选择了爸爸建,就重置
                      $('.father').removeClass('active')
                    }
                    mui.confirm('对不起,该居民已绑定过该设备,解绑后方可继续操作', '', ['我知道了'], function (e) {
                      return
                    })
                    $('#bang-btn').addClass('active')
                    return false //直接退出不保存
                  } else {
                    if (!checkSuccess) {
                      //界面初始化的时候没有校验成功回调
                      userType = 1
                      //选中爸爸键
                      $('.father').addClass('active')
                    } else if (oldSn != snCode) {
                      $('.father').attr('data-click', '-1') //设置爸爸妈妈键不能点击
                      $('.monther').attr('data-click', '-1')
                      if ($('.father').hasClass('active')) {
                        //用户已经选择了爸爸建,就重置
                        $('.father').removeClass('active')
                      }
                      mui.confirm('对不起,该居民已绑定过该设备,解绑后方可继续操作', '', ['我知道了'], function (e) {
                        return
                      })
                      $('#bang-btn').addClass('active')
                      return false //直接退出不保存
                    }
                  }
                }
              }
              if (montherData != null) {
                var others = montherData['others'] //others==1为被别人绑定
                if (others != 1) {
                  //被自己绑定
                  if (dataId == null) {
                    //新增的时候输入被自己绑定的SN码
                    $('.father').attr('data-click', '-1') //设置爸爸妈妈键不能点击
                    $('.monther').attr('data-click', '-1')
                    //$(".monther").addClass("active");//自己绑定了的键设置高亮
                    if ($('.monther').hasClass('active')) {
                      //用户已经选择了爸爸建,就重置
                      $('.monther').removeClass('active')
                    }
                    mui.confirm('对不起,该居民已绑定过该设备,解绑后方可继续操作', '', ['我知道了'], function (e) {
                      return
                    })
                    $('#bang-btn').addClass('active')
                    return false //直接退出不保存
                  } else {
                    if (!suc) {
                      userType = 2
                      //选中妈妈键
                      $('.monther').addClass('active')
                    } else if (oldSn != snCode) {
                      $('.father').attr('data-click', '-1') //设置爸爸妈妈键不能点击
                      $('.monther').attr('data-click', '-1')
                      //$(".monther").addClass("active");//自己绑定了的键设置高亮
                      if ($('.monther').hasClass('active')) {
                        //用户已经选择了爸爸建,就重置
                        $('.monther').removeClass('active')
                      }
                      mui.confirm('对不起,该居民已绑定过该设备,解绑后方可继续操作', '', ['我知道了'], function (e) {
                        return
                      })
                      $('#bang-btn').addClass('active')
                      return false //直接退出不保存
                    }
                  }
                }
              }
                checkSuccess(snCode)
              
            })
          },
          checkSuccess(snCode) {
            if (userType == 0) {
              mui.toast('请选择要绑定的快捷键!')
              $('#bang-btn').addClass('active')
              return false
            }
            var name1 = '血压计-' + name
            var params = {}
            params.deviceId = deviceId //设备ID
            params.deviceName = name1 //设备名称
            params.deviceSn = snCode //设备SN码
            params.categoryCode = type //设备分类 血糖仪1   血压计 2
            params.userType = userType //是否多用户,1.爸爸建,2.妈妈键
            params.user = patient
            if (rowData.id) {
              params.id = rowData.id
            }
            if (deviceId == 6) {
              params.sim = $('#simcode').val()
            }
            //增加绑定信息
            var docInfo = JSON.parse(plus.storage.getItem('docInfo'))
            params.hospital = docInfo.hospital
            params.hospitalName = docInfo.hospitalName
            params.checkDoctorName = docInfo.name
            sendPost(
              'doctor/device/SavePatientDevice',
              { 'data': JSON.stringify(params) },
              function (res) {
                mui.toast('设备绑定失败!')
                $('#bang-btn').addClass('active')
              },
              function (res) {
                if (res.status == '200') {
                  mui.toast('设备绑定成功')
                  openwdsb()
                } else {
                  $('#bang-btn').addClass('active')
                  mui.toast(res.msg)
                }
              }
            )
          backFn(){
            this.step = 1
          }
        },
@ -428,8 +280,9 @@
          this.patient = GetRequest().patient
          this.deviceId = GetRequest().deviceId
          this.dataId = GetRequest().id
          if(this.deviceId){
          if (this.dataId) {
            this.step = 2
            this.initData()
          }
        }
      })

+ 163 - 203
app/rehabilitation/html/guide_the_message.html

@ -1,208 +1,168 @@
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>完成项目服务</title>
    <link rel="stylesheet" href="../../../css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
    <link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="../../../css/element-ui.css" />
    <link rel="stylesheet" href="../css/guide_the_message.css" />
  </head>
  <body>
    <div id="app" v-cloak role="tablist" aria-multiselectable="true">
      <div class="panelcurPage">
        <div class="panel-heading" style="border-bottom: 1px solid #d7dce6" role="tab">
          <h4 class="panel-title">
            <a role="button" class="flex-box">
              <div class="flex-box-item service-top">
                <p class="service-name">
                  <!--<span class="service-index">1</span>-->
                  <span>{{service.title}}</span>
                </p>
                <div v-if="islimit" class="label-group">
                  <span class="pull-right mt5" v-if="service.statusName=='已完成'">
                    <i class="icon icon-gouxuan icon-18 mr5"></i>
                    {{service.statusName}}
                  </span>
                  <span class="label-blue" v-if="service.shortExecuteTime">{{service.shortExecuteTime}}</span>
                  <span class="label-blue" v-for="doctor in service.executeDoctorList">{{doctor}}</span>
                </div>
                <div v-else class="label-group">
                  <span class="pull-right mt5" v-if="service.recordStatus==1">
                    <i class="icon icon-gouxuan icon-18 mr5"></i>
                    {{service.recordStatus==1?'已完成':'未完成'}}
                  </span>
                  <span class="label-blue" v-if="service.shortCompleteTime">{{service.shortCompleteTime}}</span>
                  <span class="label-blue" v-for="doctor in service.executeDoctorList">{{doctor}}</span>
                </div>
              </div>
              <!--<span class="icon icon-arrow-down ml50"></span>-->
            </a>
          </h4>
        </div>
        <div v-if="islimit && service.type==7" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
          <div class="panel-body">
            <div class="pb20 c-border-b">为居民提供康复后的复诊提醒或代预约服务</div>
          </div>
        </div>
        <div class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
          <div class="panel-body" style="padding-top: 0">
            <div v-if="service.type!=7" class="service-content pt20">{{service.content}}</div>
            <div class="service-address ptb20">
              <div class="flex-box">
                <div class="flex-box-item">
                  <p class="m0">服务地点:{{service.hospitalName}}</p>
                  <p class="m0">服务时间:{{service.executeTime | formatDate}}</p>
                </div>
                <div class="flex-box-item">
                  <p class="m0 yslb">
                    执行人:
                    <span v-for="(doctor,index) in service.executeDoctorList">{{doctor}}</span>
                  </p>
                  <p class="m0">服务收费:{{service.expense}}元</p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="panel-body">
        <div class="service-operation">
          <div style="border-bottom: 1px solid #d7d4f0">
            <div class="pb10">
              指导与汇报记录&emsp;
              <span class="view-detail" v-if="service.messageList && service.messageList.length" :class="{active:isCollapse}" @click="chakan">
                <i class="icon icon-check mr5 icon-16"></i>
                {{isCollapse?'收起详情':'查看详情'}}
              </span>
              <div class="pull-right" v-if="(service.isMyTask==1 || service.isCreate || service.isCK) && service.planStatus!=0">
                <span
                  class="view-detail"
                  @click="zdly(service)"
                  v-if="service.isCreate && (service.isMyTask!=1) && ((islimit&&service.status!=1)||(!islimit&&service.recordStatus!=1))">
                  指导留言
                </span>
                <span class="view-detail" @click="zdly(service)" v-if="service.isCK && service.isMyTask==1">查看留言</span>
              </div>
            </div>
            <div class="record-list mb10" :class="{active:isCollapse}">
              <div class="record-item" v-for="item in service.messageList">
                <div class="flex-box c-999 f14">
                  <div class="flex-box-item">{{item.adminTeamName}}</div>
                  <div class="flex-box-item">{{item.createTime}}</div>
                </div>
                <div class="f14 c-333" v-html="getContent(item.content,item.contentType)"></div>
              </div>
            </div>
            <p class="c-999" style="margin-top: -10px" v-if="service.messageList && !service.messageList.length">暂无记录</p>
          </div>
          <!-- 协诊信息 -->
          <div>
            <div class="setRadio mt40" v-if="showAppointHelpCheckBtn && !service.appointmentTime && service.type==7 && service.status!=1 && service.isMyTask==1">
              <el-radio-group v-model="selectCheckTyperadio">
                <el-radio :label="0">线下复诊--预约至专家医院进行复诊</el-radio>
                <el-radio :label="1">远程协诊--家庭医生与专科医生协同会诊</el-radio>
                <el-radio :label="2">线上复诊--入驻互联网医院提供线上复诊开方咨询</el-radio>
              </el-radio-group>
            </div>
            <div v-if="(selectCheckTyperadio==1 &&!showAppointHelpCheckBtn) || service.appointmentTime" class="ptb10">
              <div class="pb10 c-f14 c-333">协诊信息</div>
              <div class="flex-box-item">
                <p class="m0">预约时间:{{service.appointmentTime || appointTime}}</p>
                <p class="m0">预约医生:{{service.appointmentDoctorName || service.specialistDoctorName}}</p>
                <p class="m0">预约项目:远程协诊</p>
              </div>
            </div>
          </div>
          <div
            class="note-info pt10"
            v-if="(service.type==7 && (islimit&&service.status==1) && service.reservationType!=1 && service.reservationType!=2) ||((islimit&&service.status!=1) && service.isMyTask==1 && showRecordFinished)">
            <p class="f14 c-333">服务完成笔记</p>
            <textarea
              v-if="(islimit&&service.status!=1) && service.isMyTask==1 && showRecordFinished"
              class="form-control"
              style="resize: none"
              rows="4"
              placeholder="可备注您的服务记录"
              v-model="service.node"></textarea>
            <div v-if="service.type==7 && (islimit && service.status==1) && service.reservationType!=1 && service.reservationType!=2">{{service.node || '暂无服务记录'}}</div>
          </div>
          <div class="note-info ptb10" v-if="service.type==7 && (islimit&&service.status!=1) && service.isMyTask==1 && showRecordFinished">
            <p class="f14 c-333">相关记录</p>
            <ul class="upload-box">
              <li class="flex-box" v-for="(img,index) in upImgs">
                <div class="upload-img-box">
                  <img :src="img.baseUrl" />
                </div>
                <a class="delete-img" @click="deleteImg(index)">&times;</a>
              </li>
              <li class="flex-box" v-if="upImgs.length<5">
                <span class="add-img">+</span>
                <input type="file" @change="upLoadImgToBase64" class="upload-img" />
              </li>
            </ul>
          </div>
          <div class="note-info ptb10" v-if="service.type==7 && (islimit&&service.status==1) && service.reservationType!=1 && service.reservationType!=2">
            <p class="f14 c-333">相关记录</p>
            <ul class="upload-box" v-if="service.relationRecordImg && service.relationRecordImg.length">
              <li class="flex-box" v-for="img in service.relationRecordImg">
                <div class="upload-img-box">
                  <img :src="img | getImgUrl" />
                </div>
              </li>
            </ul>
            <div class="upload-box" v-else>
              <p>暂无相关记录</p>
            </div>
          </div>
          <!-- operate: 是否完成任务 0 未完成 1 已完成 isMyTask: 0 不是自己的任务 1是自己的任务 status: 0 未完成 1已完成 2已预约-->
          <!-- planStatus:计划的状态 0 已终止 1进行中 2已完成 -->
          <!-- type: 服务项code 1 电话/短信关怀 2康复咨询 3远程健康监测 4 上门服务 5康复指导 6 康复随访 7 复诊-->
          <!-- selectCheckTyperadio 0 线下复诊 1远程协诊 2线上复诊 -->
          <div v-if="islimit&&service.planStatus!=0" class="flex-box btns-group clearfix" style="position: relative">
            <!-- 限制频次 -->
            <button class="btn btn-yuyue" v-if="service.type==4 && service.status!=1 && service.isMyTask==1" @click="sendSpecialistWeixinMessage(4)">提醒患者</button>
            <button class="btn btn-12b7f5" v-if="service.type==4 && service.status!=1 && service.isMyTask==1" @click="qwapp">代预约</button>
            <button class="btn btn-yuyue" v-if="service.type==5 && service.status!=1 && service.isMyTask==1" @click="kfzd()">发送指导</button>
            <button class="btn btn-yuyue" v-if="service.type==6 && service.status!=1 && service.isMyTask==1 && service.operate==0" @click="sfjh()" style="width: auto">
              创建随访计划
            </button>
            <button
              class="btn btn-12b7f5"
              v-if="service.type==6 && service.status!=1 && service.isMyTask==1 && service.operate==1"
              @click="openFollowRecordForm"
              style="width: auto">
              记录随访表单
            </button>
            <button class="btn btn-12b7f5" v-if="service.type==6 && service.status==1" @click="openFollowRecordForm" style="width: auto">查看随访结果</button>
            <button
              class="btn btn-yuyue"
              v-if="service.type==7 && service.status!=1 && service.isMyTask==1 && selectCheckTyperadio!=1 && !service.appointmentTime"
              @click="sendSpecialistWeixinMessage(7)">
              提醒患者
            </button>
            <button
              class="btn btn-12b7f5"
              v-if="service.type==7 && service.status!=1 && service.isMyTask==1 && selectCheckTyperadio==0 && !service.appointmentTime"
              @click="rehabilitationReservation()">
              代预约
            </button>
            <button class="btn btn-12b7f5" v-if="selectCheckTyperadio==1 && showAppointHelpCheckBtn" @click="$refs.datePicker.pickerVisible = true">预约协诊</button>
            <div class="setPicker" style="visibility: hidden">
              <el-date-picker
                v-model="appointDate"
                type="date"
                ref="datePicker"
                @change="$refs.timePicker.pickerVisible = true"
                value-format="yyyy-MM-dd"
                :picker-options="pickerOptions"></el-date-picker>
            </div>
            <div class="setPicker" style="visibility: hidden">
              <el-time-select
                v-model="appointHour"
                :picker-options="{
	<head>
		<meta charset="UTF-8">
		<title>完成项目服务</title>
		<link rel="stylesheet" href="../../../css/bootstrap.min.css" />
	    <link rel="stylesheet" type="text/css" href="../../../css/style.min.css"/>
	    <link rel="stylesheet" type="text/css" href="../../../css/cross.css"/>
		<link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="../../../css/element-ui.css">
		<link rel="stylesheet" href="../css/guide_the_message.css" />
	</head>
	<body>
		<div id="app" v-cloak role="tablist" aria-multiselectable="true">
		  <div class="panelcurPage">
		    <div class="panel-heading" style="border-bottom: 1px solid #d7dce6;" role="tab">
		      <h4 class="panel-title">
		        <a role="button" class="flex-box">
		          <div class="flex-box-item service-top">
		          	<p class="service-name"><!--<span class="service-index">1</span>--><span>{{service.title}}</span></p>
		         	<div v-if="islimit" class="label-group">
		         		<span class="pull-right mt5" v-if="service.statusName=='已完成'"><i class="icon icon-gouxuan icon-18 mr5"></i>{{service.statusName}}</span>
		         		<span class="label-blue" v-if="service.shortExecuteTime">{{service.shortExecuteTime}}</span>
		         		<span class="label-blue" v-for="doctor in service.executeDoctorList">{{doctor}}</span>
		         	</div>
					<div v-else class="label-group">
		         		<span class="pull-right mt5" v-if="service.recordStatus==1"><i class="icon icon-gouxuan icon-18 mr5"></i>{{service.recordStatus==1?'已完成':'未完成'}}</span>
		         		<span class="label-blue" v-if="service.shortCompleteTime">{{service.shortCompleteTime}}</span>
						<span class="label-blue" v-for="doctor in service.executeDoctorList">{{doctor}}</span>
					</div>
				  </div>
		          <!--<span class="icon icon-arrow-down ml50"></span>-->
		        </a>
		      </h4>
			</div>
			<div v-if="islimit && service.type==7" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
				<div class="panel-body">
					<div class="pb20 c-border-b">
						为居民提供康复后的复诊提醒或代预约服务
					</div>
				</div>
			</div>
		    <div class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
		      	<div class="panel-body" style="padding-top: 0;">
		      		<div v-if="service.type!=7" class="service-content pt20">{{service.content}}</div>
		      		<div class="service-address ptb20">
		      			<div class="flex-box">
		      				<div class="flex-box-item">
		      					<p class="m0">服务地点:{{service.hospitalName}}</p>
		      					<p class="m0">服务时间:{{service.executeTime | formatDate}}</p>
		      				</div>
		      				<div class="flex-box-item">
		      					<p class="m0 yslb">执行人:<span v-for="(doctor,index) in service.executeDoctorList">{{doctor}}</span></p>
		      					<p class="m0">服务收费:{{service.expense}}元</p>
		      				</div>
		      			</div>
		      		</div>
		   		</div>
	       </div>
		  </div>
	   		<div class="panel-body">
	      		<div class="service-operation">
	      			<div style="border-bottom: 1px solid #D7D4F0;">
	      				<div class="pb10">
		      				指导与汇报记录&emsp;<span class="view-detail" v-if="service.messageList && service.messageList.length" :class="{active:isCollapse}" @click="chakan"><i class="icon icon-check mr5 icon-16"></i>{{isCollapse?'收起详情':'查看详情'}}</span>
		      				<div class="pull-right" v-if="(service.isMyTask==1 || service.isCreate || service.isCK) && service.planStatus!=0">
		      					<span class="view-detail" @click="zdly(service)" v-if="service.isCreate && (service.isMyTask!=1) && ((islimit&&service.status!=1)||(!islimit&&service.recordStatus!=1))">指导留言</span>
		      					<span class="view-detail" @click="zdly(service)" v-if="service.isCK && service.isMyTask==1">查看留言</span>
		      				</div>
	      				</div>
			      		<div class="record-list mb10" :class="{active:isCollapse}">
		      				<div class="record-item" v-for="item in service.messageList">
		      					<div class="flex-box c-999 f14">
			      					<div class="flex-box-item">
			      						{{item.adminTeamName}}
			      					</div>
			      					<div class="flex-box-item">
			      						{{item.createTime}}
			      					</div>
			      				</div>
				      			<div class="f14 c-333" v-html="getContent(item.content,item.contentType)"></div>
		      				</div>
		      			</div>
		      			<p class="c-999" style="margin-top: -10px;" v-if="service.messageList && !service.messageList.length">暂无记录</p>
					  </div>
					  <!-- 协诊信息 -->
					  <div>
						<div class="setRadio mt40" v-if="showAppointHelpCheckBtn && !service.appointmentTime && service.type==7 && service.status!=1 && service.isMyTask==1">
							<el-radio-group v-model="selectCheckTyperadio">
								<el-radio :label="0">线下复诊--预约至专家医院进行复诊</el-radio>
								<el-radio :label="1">远程协诊--家庭医生与专科医生协同会诊</el-radio>
								<el-radio :label="2">线上复诊--入驻互联网医院提供线上复诊开方咨询</el-radio>
							</el-radio-group>
						</div>
						<div v-if="(selectCheckTyperadio==1 &&!showAppointHelpCheckBtn) || service.appointmentTime" class="ptb10">
							<div class="pb10 c-f14 c-333">协诊信息</div>
							<div class="flex-box-item">
								<p class="m0">预约时间:{{service.appointmentTime || appointTime}}</p>
								<p class="m0">预约医生:{{service.appointmentDoctorName || service.specialistDoctorName}}</p>
								<p class="m0">预约项目:远程协诊</p>
							</div>	
						</div>
					  </div>
					<div class="note-info pt10" v-if="(service.type==7 && (islimit&&service.status==1) && service.reservationType!=1 && service.reservationType!=2) ||((islimit&&service.status!=1) && service.isMyTask==1 && showRecordFinished)">
						<p class="f14 c-333">服务完成笔记</p>
						<textarea v-if="(islimit&&service.status!=1) && service.isMyTask==1 && showRecordFinished" class="form-control" style="resize: none;" rows="4" placeholder="可备注您的服务记录" v-model="service.node"></textarea>
						<div  v-if="service.type==7 && (islimit && service.status==1) && service.reservationType!=1 && service.reservationType!=2">{{service.node || '暂无服务记录'}}</div>
					</div>
					<div class="note-info ptb10" v-if="service.type==7 && (islimit&&service.status!=1) && service.isMyTask==1 && showRecordFinished">
							<p class="f14 c-333">相关记录</p>
							<ul class="upload-box">
								<li class="flex-box" v-for="(img,index) in upImgs">
									<div class="upload-img-box">      						
										<img :src="img.baseUrl" />
									</div>
									<a class="delete-img" @click="deleteImg(index)">&times;</a>
								</li>
								<li class="flex-box" v-if="upImgs.length<5">
									<span class="add-img">+</span>
									<input type="file" @change="upLoadImgToBase64" class="upload-img" />
								</li>
							</ul>
					</div>
					<div class="note-info ptb10" v-if="service.type==7 && (islimit&&service.status==1) && service.reservationType!=1 && service.reservationType!=2">
							<p class="f14 c-333">相关记录</p>
							<ul class="upload-box" v-if="service.relationRecordImg && service.relationRecordImg.length">
								<li class="flex-box" v-for="img in service.relationRecordImg">
									<div class="upload-img-box">      						
										<img :src="img | getImgUrl" />
									</div>
								</li>
							</ul>
							<div class="upload-box" v-else>
								<p>暂无相关记录</p>
							</div>
					</div>  
					<!-- operate: 是否完成任务 0 未完成 1 已完成 isMyTask: 0 不是自己的任务 1是自己的任务 status: 0 未完成 1已完成 2已预约-->
					<!-- planStatus:计划的状态 0 已终止 1进行中 2已完成 -->
					<!-- type: 服务项code 1 电话/短信关怀 2康复咨询 3远程健康监测 4 上门服务 5康复指导 6 康复随访 7 复诊-->
					<!-- selectCheckTyperadio 0 线下复诊 1远程协诊 2线上复诊 -->
					<div v-if="islimit&&service.planStatus!=0" class="flex-box btns-group clearfix" style="position: relative;"> <!-- 限制频次 -->
						<button class="btn btn-yuyue" v-if="service.type==4 && service.status!=1 && service.isMyTask==1" @click="sendSpecialistWeixinMessage(4)">提醒患者</button>
						<button class="btn btn-12b7f5" v-if="service.type==4 && service.status!=1 && service.isMyTask==1" @click="toDoorDialog">代预约</button>
						<button class="btn btn-yuyue" v-if="service.type==5 && service.status!=1 && service.isMyTask==1" @click="kfzd()">发送指导</button>
						<button class="btn btn-yuyue" v-if="service.type==6 && service.status!=1 && service.isMyTask==1 && service.operate==0"  @click="sfjh()" style="width: auto">创建随访计划</button>
						<button class="btn btn-12b7f5" v-if="service.type==6 && service.status!=1 && service.isMyTask==1 && service.operate==1" @click="openFollowRecordForm" style="width: auto">记录随访表单</button>
						<button class="btn btn-12b7f5" v-if="service.type==6 && service.status==1" @click="openFollowResult" style="width: auto">查看随访结果</button>
						<button class="btn btn-yuyue" v-if="service.type==7 && service.status!=1 && service.isMyTask==1 && selectCheckTyperadio!=1 && !service.appointmentTime" @click="sendSpecialistWeixinMessage(7)">提醒患者</button>
						<button class="btn btn-12b7f5" v-if="service.type==7 && service.status!=1 && service.isMyTask==1 && selectCheckTyperadio==0 && !service.appointmentTime" @click="rehabilitationReservation()">代预约</button>
						<button class="btn btn-12b7f5" v-if="selectCheckTyperadio==1 && showAppointHelpCheckBtn" @click="$refs.datePicker.pickerVisible = true">预约协诊</button>
						<div class="setPicker" style="visibility: hidden;">
							<el-date-picker
								v-model="appointDate"
								type="date"
								ref="datePicker"
								@change="$refs.timePicker.pickerVisible = true"
								value-format="yyyy-MM-dd"
								:picker-options="pickerOptions"
							>
							</el-date-picker>
						</div>		
						<div class="setPicker" style="visibility: hidden;">
								<el-time-select
								v-model="appointHour"
								:picker-options="{
									step: '00:05',
									minTime:startTime,
									start:'08:00',

+ 3 - 0
app/rehabilitation/html/healthMonitor.html

@ -363,6 +363,9 @@
            })
          },
          openDeviceDetail(item){
            if(item.categoryCode=='11'){
              return
            }
            var title = ""
            switch(item.categoryCode){
              case '2':

+ 2 - 2
app/rehabilitation/html/healthProtect.html

@ -57,7 +57,7 @@
        <div class="item" v-for="(item,i) in medicineList" :key="i">
          <div>
            <div class="lheight2">{{item.medicines}}</div>
            <div class="lheight2">{{item.record_date}} {{}}</div>
            <div class="lheight2">{{item.record_date}} {{item.recordMethod}}</div>
          </div>
        </div>
      </div>
@ -137,7 +137,7 @@
                case '稍强运动':
                  return 'warning'
                case '强度运动':
                  return 'error'
                  return 'danger'
              }
            }
            const params = {

+ 105 - 0
app/rehabilitation/html/selectDoctor.html

@ -0,0 +1,105 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>选择医生</title>
    <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
    <link rel="stylesheet" href="../../../plugins/toastr/toastr.min.css" />
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <link rel="stylesheet" type="text/css" href="../css/date.css" />
    <link rel="stylesheet" href="../css/common.css" />
    <style>
      .container {
        padding: 8px;
        overflow: auto;
        height: 650px;
        font-size: 14px;
      }
      .doctor{
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 44px;
        border-bottom: 1px solid rgba(0, 0, 0, .1);
        padding: 0 6px;
        cursor: pointer;
      }
    </style>
  </head>
  <body>
    <div id="app" v-cloak>
      <div class="container" v-infinite-scroll="getDoctorList" :infinite-scroll-disabled="disabled">
        <div class="doctor" v-for="item in doctorList" :key="item.doctor" @click="selectDoctor(item)">
          <div>{{item.name}}({{item.jobName}})</div>
          <div :style="`color: #${item.status == 1? '11B7F5': 'FF0000'}`">{{getStatusName(item.status)}}</div>
        </div>
      </div>
    </div>
    <script type="text/javascript" src="../../../js/vue.js"></script>
    <script type="text/javascript" src="../../../js/jquery-2.2.4.js"></script>
    <script type="text/javascript" src="../../../js/es6-promise.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../../plugins/toastr/toastr.min.js"></script>
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script type="text/javascript" src="../../../api/http-request.js"></script>
    <script type="text/javascript" src="../../../plugins/layer/layer.min.js"></script>
    <script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
    <script type="text/javascript" src="../../../api/recover_api.js"></script>
    <script type="text/javascript" src="../../../js/underscore-1.9.1.js"></script>
    <script type="text/javascript" src="../../../js/util.js" charset="utf-8"></script>
    <script>
      new Vue({
        el: '#app',
        data() {
          return {
            patient: "",
            doctorList: [],
            disabled: false,
            page: 0
          }
        },
        mounted() {
          this.patient = GetRequest().patient
          this.getDoctorList()
        },
        methods: {
          getDoctorList(){
            const vm = this
            const params = {
              town: JSON.parse(localStorage.getItem("docInfo")).hospital,
              patient: this.patient,
              page: this.page,
              size: 15
            }
            vm.page ++ 
            if(vm.page == 1){
              vm.doctorList = []
            }
            httpRequest.get('doctor/serviceOrder/queryDoctorList',{data:params}).then(function(res){
              vm.doctorList = vm.doctorList.concat(res.data.detailModelList)
              if(res.data.detailModelList.length < 15){
                vm.disabled = true
              }
            })
          },
          getStatusName(status){
            switch(status){
              case 1:
                return '开始接单'
              case 5:
                return '停止接单'
            }
          },
          selectDoctor(item){
            sessionStorage.setItem("selectDoctor",JSON.stringify(item))
            var index = parent.layer.getFrameIndex(window.name)
            parent.layer.close(index) 
            
          }
        },
      })
    </script>
  </body>
</html>

+ 170 - 0
app/rehabilitation/html/serviceDialog.html

@ -0,0 +1,170 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>服务数据对话框</title>
    <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
    <link rel="stylesheet" href="../../../plugins/toastr/toastr.min.css" />
    <link rel="stylesheet" href="../../../plugins/element-ui/element-ui.css" />
    <link rel="stylesheet" type="text/css" href="../css/date.css" />
    <link rel="stylesheet" href="../css/common.css" />
    <style>
      #app{
        padding: 8px 16px;
      }
      .plus-icon{
        border: 1px solid rgba(0, 0, 0, .1);
        font-size: 16px;
        padding: 7px;
      }
      .list-box{
        height: 630px;
        overflow: auto;
      }
      .item{
        padding: 8px;
        border-bottom: 1px solid rgba(0, 0, 0, .1);
      }
      .item .title{
        font-weight: bold;
        font-size: 16px;
      }
      .item .bottom{
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
      .expense{
        color: #17b3ec;
      }
      .submit-btn{
        display: block;
        margin: 10px auto 0;
      }
    </style>
  </head>
  <body>
    <div id="app" v-cloak>
      <el-tabs v-model="active" type="card" @tab-click="handleClick">
        <el-tab-pane :label="tab.type" :name="tab.code" v-for="tab in tabList">
          <div class="list-box" >
            <div class="item" v-for="item in list[active]" :key="item.code">
              <div class="title">{{item.title}}</div>
              <div class="bottom">
                <div class="expense">¥{{item.expense}}</div>
                <div>
                  <el-input-number v-model="checkList[item.code].num" size="small" v-if="checkList[item.code]&&checkList[item.code].num>0" :min="0"></el-input-number>
                  <i class="el-icon-plus plus-icon" v-else  @click="addService(item)"></i>
                </div>
              </div>
            </div>
          </div>
        </el-tab-pane>
      </el-tabs>
      <el-button type="primary" @click="submit" class="submit-btn">{{setBtnText()}}</el-button>
    </div>
    <script type="text/javascript" src="../../../js/vue.js"></script>
    <script type="text/javascript" src="../../../js/jquery-2.2.4.js"></script>
    <script type="text/javascript" src="../../../js/es6-promise.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../../plugins/toastr/toastr.min.js"></script>
    <script type="text/javascript" src="../../../plugins/element-ui/element-ui.js"></script>
    <script type="text/javascript" src="../../../api/http-request.js"></script>
    <script type="text/javascript" src="../../../plugins/layer/layer.min.js"></script>
    <script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
    <script type="text/javascript" src="../../../api/recover_api.js"></script>
    <script type="text/javascript" src="../../../js/underscore-1.9.1.js"></script>
    <script type="text/javascript" src="../../../js/util.js" charset="utf-8"></script>
    <script>
      new Vue({
        el: '#app',
        data() {
          return {
            tabList: [],
            active: "",
            list: {},
            checkList: {},
            btnText: ""
          }
        },
        methods: {
          getServiceType() {
            const vm = this
            httpRequest.post('doctor/serviceOrder/selectServiceTypes', {}).then(function (res) {
              vm.tabList = res.data
              if(res.data.length>0){
                vm.active = res.data[0].code
                vm.getServiceList()
              }
            })
          },
          getServiceList(){
            const vm = this
            if(this.list[this.active]){
              return
            }
            
            var params = {
              type: this.active,
              hospital: JSON.parse(localStorage.getItem("wlyyAgent")).hospital,
            }
            httpRequest.get('doctor/serviceOrder/selectServiceByHospital', {data:params}).then(function (res) {
              vm.$set(vm.list, vm.active, res.dara)
            })
          },
          handleClick(){
            this.getServiceList()
          },
          addService(item){
            this.$set(this.checkList,item.code,{
              ...item,
              num: 1
            })
            // this.checkList[item.code] = {
            //   ...item,
            //   num: 1
            // }
            // this.$forceUpdate()
            console.log(this.checkList);
            
          },
          setBtnText(){
            let count = 0
            for(let i in this.checkList){
              count += this.checkList[i].num
            }
            return `确认(已选${count}项)`
          },
          submit(){
            const arr = []
            for(let i in this.checkList){
              arr.push(this.checkList[i])
            }
            if(arr.length == 0){
              this.$message.warning("请选择服务")
              return
            }
            
            sessionStorage.setItem("serviceList", JSON.stringify(arr))
            var index = parent.layer.getFrameIndex(window.name)
            parent.layer.close(index) 
          },
        },
        mounted() {
          this.getServiceType()
          const checkList = JSON.parse(sessionStorage.getItem("serviceList")) 
          
          for(let i of checkList){
            this.$set(this.checkList,i.code,i)
          }
          
        }
      })
    </script>
  </body>
</html>

+ 401 - 42
app/rehabilitation/html/toDoorService.html

@ -1,45 +1,404 @@
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>上门服务代预约</title>
  <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />
  <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
  <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
  <link rel="stylesheet" href="../../../plugins/toastr/toastr.min.css" />
  <link rel="stylesheet" href="../../../plugins/element-ui/element-ui.css" />
  <link rel="stylesheet" type="text/css" href="../css/date.css" />
  <link rel="stylesheet" href="../css/common.css" />
</head>
<body>
  <div id="app" v-cloak>
    <el-form>
      <el-form-item label="本次预定的服务">
        
      </el-form-item>
    </el-form>
  </div>
  <script type="text/javascript" src="../../../js/vue.js"></script>
  <script type="text/javascript" src="../../../js/jquery-2.2.4.js"></script>
  <script type="text/javascript" src="../../../js/es6-promise.js" charset="utf-8"></script>
  <script type="text/javascript" src="../../../plugins/toastr/toastr.min.js"></script>
  <script type="text/javascript" src="../../../plugins/element-ui/element-ui.js"></script>
  <script type="text/javascript" src="../../../api/http-request.js"></script>
  <script type="text/javascript" src="../../../plugins/layer/layer.min.js"></script>
  <script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
  <script type="text/javascript" src="../../../api/recover_api.js"></script>
  <script type="text/javascript" src="../../../js/underscore-1.9.1.js"></script>
  <script type="text/javascript" src="../../../js/util.js" charset="utf-8"></script>
  <script>
    new Vue({
      el: '#app',
      data() {
        return {
          
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>上门服务代预约</title>
    <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
    <link rel="stylesheet" href="../../../plugins/toastr/toastr.min.css" />
    <link rel="stylesheet" href="../../../plugins/element-ui/element-ui.css" />
    <link rel="stylesheet" type="text/css" href="../css/date.css" />
    <link rel="stylesheet" href="../css/common.css" />
    <style>
      #app {
        font-size: 14px;
      }
      .form-box {
        padding: 16px 20px 20px;
      }
      .form-item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding: 4px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 44px;
      }
      .form-label {
      }
      .service-box {
        padding: 4px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
      }
      .service-item {
        margin-left: 20px;
        margin-right: 10px;
        height: 24px;
      }
      .address-box {
        padding: 4px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
      }
      .flex {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
      .reservation-btn {
        display: block;
        width: 300px;
        margin: 20px auto;
      }
      .no-service {
        text-align: center;
        line-height: 40px;
      }
      .required-icon{
        position: relative;
      }
      .required-icon::after{
        content: "*";
        position: absolute;
        left: -10px;
        color: #ed2d2d;
        top: 50%;
        transform: translateY(-50%);
      }
    </style>
  </head>
  <body>
    <div id="app" v-cloak>
      <div class="form-box">
        <div class="service-box">
          <div class="flex">
            <div class="form-label">本次预定的服务</div>
            <div class="form-value" style="cursor: pointer" @click="toSelectService">
              (已造
              <span style="color: #11b7f5">{{serviceList.length}}</span>
              项)
              <i class="el-icon-arrow-right"></i>
            </div>
          </div>
          <div class="service-list">
            <div class="service-item flex" v-for="item in serviceList">
              <div style="width: 300px">{{item.title}}</div>
              <div style="padding-left: 20px">x{{item.num}}</div>
              <div style="color: #ed2d2d">¥{{item.expense}}</div>
            </div>
            <div v-if="serviceList.length == 0" class="no-service">暂未选择服务</div>
          </div>
        </div>
        <div class="form-item">
          <div class="form-label">服务对象</div>
          <div class="form-value">{{patientInfo.name}}</div>
        </div>
        <div class="form-item">
          <div class="form-label">签约地区</div>
          <div class="form-value">{{patientInfo.townName}}</div>
        </div>
        <div class="form-item">
          <div class="form-label">联系方式</div>
          <div class="form-value">{{patientInfo.mobile}}</div>
        </div>
        <div class="address-box ">
          <div class="flex required-icon">
            <div>上门地址</div>
            <el-input v-model="serveAddress" placeholder="请输入上门地址" size="small" style="width: 200px" @change="getAddressPoint"></el-input>
          </div>
          <div id="map2" style="height: 200px; margin: 10px"></div>
        </div>
        <div class="service-box">
          <div class="form-label" style="height: 32px; line-height: 32px">请说明居民需要什么服务?</div>
          <el-input v-model="serveDesc" placeholder="请简要描述居民的病情..." type="textarea" :maxlength="100" :rows="3" resize="none"></el-input>
        </div>
        <div class="form-item">
          <div class="form-label required-icon">希望服务时间</div>
          <div class="form-value">
            <el-date-picker v-model="time" type="datetime" size="small" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期时间"></el-date-picker>
          </div>
        </div>
        <div class="form-item">
          <div class="form-label required-icon">服务医生</div>
          <div class="form-value" style="width: 200px; text-align: right; cursor: pointer" @click="toSelectDoctor">
            {{doctor.name}}
            <i class="el-icon-arrow-right"></i>
          </div>
        </div>
      </div>
      <el-button type="primary" class="reservation-btn" @click="reservationFn">提交预约</el-button>
    </div>
    <!-- <script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=d2GXayjVT86kMvm5FRKvGgY0EjlXdRNx"></script> -->
    <script type="text/javascript" src="../../../js/api-map-baidu.lite.js"></script>
    <script type="text/javascript" src="../../../js/vue.js"></script>
    <script type="text/javascript" src="../../../js/jquery-2.2.4.js"></script>
    <script type="text/javascript" src="../../../js/es6-promise.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../../plugins/toastr/toastr.min.js"></script>
    <script type="text/javascript" src="../../../plugins/element-ui/element-ui.js"></script>
    <script type="text/javascript" src="../../../api/http-request.js"></script>
    <script type="text/javascript" src="../../../plugins/layer/layer.min.js"></script>
    <script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
    <script type="text/javascript" src="../../../api/recover_api.js"></script>
    <script type="text/javascript" src="../../../js/underscore-1.9.1.js"></script>
    <script type="text/javascript" src="../../../js/util.js" charset="utf-8"></script>
    <script>
      new Vue({
        el: '#app',
        data() {
          return {
            patient: null,
            patientInfo: {},
            serveDesc: '',
            time: null,
            serviceList: [],
            bmap: null,
            serveAddress: null,
            marker: null,
            doctor: { name: '' },
            detailId: null,
            docInfo: null,
            serveLat: null,
            serveLon: null
          }
        },
        mounted() {
          this.patient = GetRequest().patient
          this.detailId = GetRequest().detailId
          this.docInfo = JSON.parse(localStorage.getItem('docInfo'))
          this.getPatientInfo()
          this.initMap()
        },
        methods: {
          toSelectService() {
            const vm = this
            // this.$message.warning('暂无可供选择的服务,请在下方直接描述您所需的服务')
            sessionStorage.setItem('serviceList', JSON.stringify(this.serviceList))
            top.layer.open({
              type: 2,
              area: ['600px', '800px'],
              shade: 0.5,
              title: '选择服务',
              fixed: true, //不固定
              maxmin: true,
              closeBtn: 1,
              // shift: 5,
              shadeClose: false, //点击遮罩关闭层
              content: `../../rehabilitation/html/serviceDialog.html`,
              end: function () {
                const val = sessionStorage.getItem('serviceList')
                if (val) {
                  sessionStorage.removeItem('serviceList')
                  vm.serviceList = JSON.parse(val)
                }
              }
            })
          },
          getPatientInfo() {
            const vm = this
            httpRequest.post('doctor/patient_label_info/patient', { data: { patient: this.patient } }).then(function (res) {
              vm.patientInfo = res.data
            })
          },
          initMap() {
            var vm = this
            // 初始化地图, 设置中心点坐标和地图级别
            vm.bmap = new BMap.Map('map2')
            const point = new BMap.Point(116.404, 39.915) // 创建点坐标
            vm.bmap.centerAndZoom(point, 15) // 初始化地图,设置中心点坐标和缩放级别
            // 添加缩放控件
            // var zoomCtrl = new BMap.ZoomControl({
            //   anchor: BMAP_ANCHOR_BOTTOM_RIGHT
            // })
            // vm.bmap.addControl(zoomCtrl)
            vm.marker = new BMap.Marker(point)
            vm.bmap.addOverlay(vm.marker)
            // vm.bmap.enableScrollWheelZoom()
            vm.bmap.addEventListener('click', function (e) {
              console.log(2)
              return
              vm.getAddress(e.point)
              vm.bmap.clearOverlays()
              vm.marker = new BMap.Marker(e.point) //中心点坐标红点
              vm.bmap.addOverlay(vm.marker) // 增加中心点坐标红点
              vm.bmap.centerAndZoom(new BMap.Point(e.point.lng, e.point.lat)) // 设置地图中心
            })
          },
          getAddress(center) {
            var vm = this
            var params = {
              ak: 'd2GXayjVT86kMvm5FRKvGgY0EjlXdRNx',
              output: 'json',
              coordtype: 'bd09ll',
              location: center.lat + ',' + center.lng
            }
            httpRequest.get('https://api.map.baidu.com/reverse_geocoding/v3/', { data: params }, function (res) {
              if (res.status == 0) {
                vm.serveAddress = res.result.formatted_address
              } else {
                vm.$message.warning('获取地址失败')
              }
            })
          },
          getAddressPoint() {
            var vm = this
            var params = {
              ak: 'd2GXayjVT86kMvm5FRKvGgY0EjlXdRNx',
              output: 'json',
              address: vm.serveAddress,
              city: '厦门市'
            }
            httpRequest.get('third/door/findAreaMap', { data: params }).then(function (res) {
              if (res.status == 200) {
                res = JSON.parse(res.data)
                if (res.status == 0) {
                  if (res.result.location) {
                    vm.bmap.clearOverlays()
                    vm.serveLat = res.result.location.lat
                    vm.serveLon = res.result.location.lng
                    vm.marker = new BMap.Marker(res.result.location) //中心点坐标红点
                    vm.bmap.addOverlay(vm.marker)
                    vm.bmap.centerAndZoom(new BMap.Point(res.result.location.lng, res.result.location.lat), 15) // 设置地图中心
                  }
                } else {
                  vm.$message.warning('获取坐标失败')
                }
              }
            })
          },
          toSelectDoctor() {
            const vm = this
            top.layer.open({
              type: 2,
              area: ['500px', '700px'],
              shade: 0.5,
              title: '选择服务',
              fixed: true, //不固定
              maxmin: true,
              closeBtn: 1,
              // shift: 5,
              shadeClose: false, //点击遮罩关闭层
              content: `../../rehabilitation/html/selectDoctor.html?patient=${this.patient}`,
              end: function () {
                const val = sessionStorage.getItem('selectDoctor')
                if (val) {
                  sessionStorage.removeItem('selectDoctor')
                  vm.doctor = JSON.parse(val)
                }
              }
            })
          },
          reservationFn() {
            const nowDate = new Date().getTime()
            const serviceDate = new Date(this.time).getTime()
            const vm = this
            if (!vm.serveAddress) {
              vm.$message.warning('请输入上门地址')
              return
            }
            if (!vm.time) {
              vm.$message.warning('请输入希望服务时间')
              return
            }
            if (!vm.doctor.name) {
              vm.$message.warning('请选择服务医生')
              return
            }
            if (nowDate >= serviceDate) {
              this.$message.warning('服务时间不能早于当前时间')
              return
            }
            const params = {
              dataJson: JSON.stringify({
                rehabilitationDetailId: this.detailId,
                patientCode: this.patient,
                patientName: this.patientInfo.name,
                doctorCode: vm.docInfo.code,
                doctorName: vm.docInfo.name,
                relationRecordType: 4,
                relationRecordCode: '',
                status: 0,
                node: '',
                relationRecordImg: ''
              })
            }
            const packageItemArr = []
            this.serviceList.forEach(function (item) {
              packageItemArr.push({
                type: 1,
                code: item.code,
                name: item.title,
                fee: item.expense,
                feeDiscount: 0,
                number: item.num,
                status: 1
              })
            })
            var param = {
              jsonData: JSON.stringify({
                order: {
                  proxyPatient: vm.docInfo.patient,
                  proxyPatientName: vm.docInfo.name,
                  proxyPatientPhone: vm.docInfo.mobile,
                  patient: vm.patient,
                  patientName: vm.patientInfo.name,
                  patientPhone: vm.patientInfo.mobile,
                  patientExpectedServeTime: vm.time,
                  serveDesc: vm.serveDesc,
                  serveTown: vm.patientInfo.townName,
                  serveAddress: vm.serveAddress,
                  serveLat: vm.serveLat,
                  serveLon: vm.serveLon,
                  doctor: vm.docInfo.doctor,
                  doctorName: vm.docInfo.name,
                  doctorType: vm.docInfo.jobName,
                  id: null, //重新派单增加orderId
                  relationCode: vm.detailId
                },
                deleteItemArr: [], ////重新派单编辑服务项需传原来服务项id
                packageItemArr: packageItemArr, //提交的服务项
                hospital: {
                  code: vm.docInfo.hospital
                }
              })
            }
            this.saveRehabilitationOperateRecord(params, param)
          },
          saveRehabilitationOperateRecord(params, param) {
            const vm = this
            var url = 'doctor/specialist/rehabilitation/saveRehabilitationOperateRecord'
            httpRequest.post(url, { data: params }).then(function (res) {
              if (res.status == 200) {
                var jsonData = JSON.parse(param.jsonData)
                jsonData.order.relationCode = res.data.id
                param.jsonData = JSON.stringify(jsonData)
                vm.createSend(param)
              } else {
                vm.$message.error(res.msg || '服务记录失败')
              }
            })
          },
          createSend(param) {
            const vm = this
            var url = 'doctor/serviceOrder/proxyCreate'
            httpRequest.post(url, { data: param }).then(function (res) {
              if (res.status == 200) {
                vm.$message.success('预约成功!')
              } else {
                vm.$message.error(res.msg)
              }
            })
          }
        }
      },
    })
  </script>
</body>
</html>
      })
    </script>
  </body>
</html>

+ 343 - 331
app/rehabilitation/js/guide_the_message.js

@ -264,7 +264,7 @@ top.rehabilitationGuideVue = new Vue({
        title: '预约挂号',
        content: '../../jbsc/html/appointment/appoint-select.html?patient=' + this.patient + '&surveyCode='
      })
    },
		},
    openFollowRecordForm() {
      top.layer.open({
        type: 2,
@ -279,336 +279,348 @@ top.rehabilitationGuideVue = new Vue({
        content: '../../rehabilitation/html/followRecord.html?serviceInfo=' + encodeURIComponent(JSON.stringify(this.service)) + '&planDetailId=' + this.planid
      })
    },
    qwapp: function () {
      top.layer.msg('请前往app处理', {
        icon: 5
      })
    },
    viewGuidance: function (o) {
      var vm = this
      previewLayerIndex = layer.open({
        type: 2,
        area: ['380px', '600px'],
        shade: 0.5,
        title: '预览',
        fixed: true, //不固定
        maxmin: true,
        closeBtn: 1,
        shift: 5,
        shadeClose: false, //点击遮罩关闭层
        content: '../../rehabilitation/html/rehabilitation_guidance_preview.html?modelCode=' + o.article
      })
    },
    getServiceItem: function () {
      var vm = this
      var loginDoctor = JSON.parse(window.localStorage.getItem('wlyyAgent'))
      var loadding = top.layer.load(0, {
        shade: false
      }) //0代表加载的风格,支持0-2
      var params = {
        planDetailId: vm.planid
      }
      if (vm.recordId) {
        params['recordId'] = vm.recordId
      }
      rehaAPI.serviceItem(params).then(function (res) {
        top.layer.close(loadding)
        if (res.status == 200) {
          vm.service = res.data
          console.log('222222222222222', vm.service)
          var isZK = loginDoctor.doctorType == 1 ? true : false
          vm.service.isZK = isZK
          if (vm.service.completeTime) {
            var l = vm.service.completeTime.length
            vm.service.shortCompleteTime = vm.service.completeTime.substr(l - 5, l - 1)
          }
          if (vm.service.isMyTask == 1) {
            //执行者
            vm.service.isCK = true //无法显示按钮
            if (loginDoctor.uid == vm.service.specialistDoctorCode) {
              //说明我自己是创建者
              vm.service.isCK = false
              vm.service.isCreate = true
            }
          } else {
            if (loginDoctor.uid == vm.service.specialistDoctorCode) {
              //说明我自己是创建者
              vm.service.isCreate = true
            }
          }
          if (vm.service.type == 4 || vm.service.type == 5 || vm.service.type == 7) {
            vm.getRelationRecord(vm.service.type, vm.planid).then(function (result) {
              if (result.status == 200) {
                vm.service.relationList = result.data && result.data.length > 0 ? result.data : undefined
                vm.$forceUpdate()
              }
            })
          }
          if (vm.service.frequencyCode) {
            vm.islimit = true
          } else {
            vm.islimit = false
          }
        } else {
          top.layer.msg(res.msg, {
            icon: 5
          })
        }
        if (vm.service.status == 1) {
          var index = top.layer.getFrameIndex(window.name) //先得到当前iframe层的索引
          top.layer.title('服务记录详情', index) //再改变当前层的标题
        }
      })
    },
    getRelationRecord: function (type, planDetaiId) {
      // 1.电话短信 2.康复咨询 3.远程监控检测 4.上门服务 5.康复指导  6 康复随访  7.复诊)
      var vm = this
      var url = ''
      if (type == 5) {
        url = 'doctor/specialist/rehabilitation/selectByRelationCode'
      } else if (type == 7) {
        url = 'third/guahao/selectByRelationCode'
      } else if (type == 4) {
        url = '/doctor/specialist/rehabilitation/selectRelationCode'
      }
      var vm = this
      var params = {
        relationCode: vm.recordId ? vm.recordId : planDetaiId
      }
      return httpRequest.get(url, { data: params })
    },
    zdly: function (data) {
      var vm = this
      var loginDoctor = JSON.parse(window.localStorage.getItem('wlyyAgent'))
      var otherCode, otherName
      if (loginDoctor.doctorType == 1) {
        otherCode = data.familyDoctorCode
        otherName = data.familyDoctorName
      } else {
        otherCode = data.specialistDoctorCode
        otherName = data.specialistDoctorName
      }
      top.layer.open({
        type: 2,
        //				  offset: ['100px'], //右下角弹出
        area: ['660px', '600px'],
        shade: 0.5,
        title: '指导留言',
        fixed: true, //不固定
        maxmin: true,
        closeBtn: 1,
        shift: 5,
        shadeClose: false, //点击遮罩关闭层
        content: '../../consulting/html/consulting.html?otherCode=' + otherCode + '&otherName=' + encodeURI(otherName) + '&planDetailId=' + vm.planid,
        end: function () {
          // 未点击确定按钮,点击关闭按钮
          vm.getServiceItem()
        }
      })
    },
    deleteImg: function (idx) {
      console.log(idx)
      this.upImgs.splice(idx, 1)
    },
    chakan: function () {
      this.isCollapse = !this.isCollapse
    },
    upLoadImgToBase64: function () {
      var vm = this
      var img1 = event.target.files[0]
      var reader = new FileReader()
      var type = img1.type //文件的类型,判断是否是图片
      var size = img1.size //文件的大小,判断图片的大小
      if (this.imgData.accept.indexOf(type) == -1) {
        alert('请选择我们支持的图片格式!')
        return false
      }
      if (size > 3145728) {
        alert('请选择3M以内的图片!')
        return false
      }
      reader.readAsDataURL(img1)
      reader.onload = function (e) {
        vm.upImgs.push({
          baseUrl: e.target.result
        })
        vm.upImgArr.push(img1)
        console.log('e', e, 'vm.upImgs', vm.upImgs, 'vm.upImgArr', vm.upImgArr)
        //vm.uploadImg(vm.upImgArr);
      }
    },
    qrwc: function (patient, type) {
      var vm = this
      if (!vm.service.node) {
        showErrorMessage('请填写服务记录')
        return
      }
      if (!vm.upImgs.length) {
        showErrorMessage('请上传相关记录')
        return
      }
      vm.saveRehabilitationOperateRecord(vm.planid, type)
    },
    saveRehabilitationOperateRecord: function (planDetailId, type, relationCode, flag) {
      var vm = this
      var params = {
        rehabilitationDetailId: planDetailId,
        node: null,
        patientCode: vm.patient,
        doctorCode: docInfo.uid,
        relationRecordType: type,
        relationRecordCode: '',
        relationRecordImg: null,
        status: 0
      }
      rehaAPI.saveRehabilitationOperateRecord({ dataJson: JSON.stringify(params) }).then(function (res) {
        if (res.status == 200) {
          if (type == 1 || type == 7) {
            vm.uploadImg(vm.upImgArr)
          } else if (type == 6) {
            vm.updateRelationCodeByDetailId(planDetailId, relationCode)
          } else {
            vm.updateNoteAndImageRehabilitationOperate(planDetailId)
          }
        } else {
          layer.msg(res.msg, {
            icon: 5
          })
        }
      })
    },
    //上传图片
    uploadImg: function (data) {
      var vm = this
      var len = data.length
      if (len == 0) {
        vm.updateNoteAndImageRehabilitationOperate(vm.planid)
      } else {
        var file = data[len - 1]
        var formData = new FormData()
        formData.append('file', file)
        rehaAPI.upload(formData).then(function (res) {
          if (res.status == 200) {
            vm.upImgs[len - 1].img = res.data
            data.pop()
            vm.$forceUpdate()
            vm.uploadImg(data)
          } else {
            layer.msg(res.msg, {
              icon: 5
            })
          }
        })
      }
    },
    updateNoteAndImageRehabilitationOperate: function (planDetailId, relationCode) {
      var vm = this
      var _image = []
      $.each(vm.upImgs, function (index, obj) {
        _image.push(obj.img)
      })
      var params = {
        planDetailId: planDetailId,
        node: vm.service && vm.service.node ? vm.service.node : null,
        image: JSON.stringify(_image) || ''
      }
      if (relationCode) {
        params['relationCode'] = relationCode
      }
      var loadding = top.layer.load(0, {
        shade: false
      }) //0代表加载的风格,支持0-2
      rehaAPI.updateNoteAndImageRehabilitationOperate(params).then(function (res) {
        top.layer.close(loadding)
        if (res.status == 200) {
          vm.getServiceItem()
          top.rehabilitationVue.refresh()
        }
      })
    },
    updateRelationCodeByDetailId: function (planDetailId, relationCode) {
      var vm = this
      var params = {
        planDetailId: planDetailId,
        relationCode: relationCode
      }
      rehaAPI.updateRelationCodeByDetailId(params).then(function (res) {
        if (res.status == 200) {
          vm.getServiceItem()
          top.rehabilitationVue.refresh()
        } else {
          showErrorMessage(res.msg)
        }
      })
    },
    viewDetial: function (type, code) {
      var vm = this
      if (type == 3) {
        top.layer.msg('客户端暂不支持查询健康指导记录')
      } else if (type == 4) {
        top.layer.msg('客户端暂不支持查询随访记录')
      } else {
        top.layer.open({
          type: 2,
          //				  offset: ['100px'], //右下角弹出
          area: ['80%', '600px'],
          shade: 0.5,
          title: '指导教育',
          fixed: true, //不固定
          maxmin: true,
          closeBtn: 1,
          shift: 5,
          shadeClose: false, //点击遮罩关闭层
          content: '../../article/html/article-info.html?articleId=' + code,
          end: function () {
            // 未点击确定按钮,点击关闭按钮
            vm.getServiceItem()
          }
        })
      }
    },
    getContent: function (value, type) {
      var res = value
      if (type == 2 || type == 9) {
        res = "<img src='" + httpRequest.getImgUrl(res) + "'>"
      } else if (type == 3) {
        res = '【语音】'
      } else if (type == 19) {
        res = '【聊天记录】'
      } else if (type == 12) {
        res = '【视频】'
      }
      return res
    }
  },
  filters: {
    formatDate: function (value, format) {
      if (!value) return
      var fmt = format || 'yyyy-MM-dd hh:mm'
      var date = new Date(value)
      if (/(y+)/.test(fmt)) {
        fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
      }
      let o = {
        'M+': date.getMonth() + 1,
        'd+': date.getDate(),
        'h+': date.getHours(),
        'm+': date.getMinutes(),
        's+': date.getSeconds()
      }
      for (let k in o) {
        if (new RegExp(`(${k})`).test(fmt)) {
          let str = o[k] + ''
          fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : ('00' + str).substr(str.length))
        }
      }
      return fmt
    },
    getImgUrl: function (value) {
      var url = httpRequest.getImgUrl(value)
      return url
    }
  }
		qwapp: function() {
			top.layer.msg('请前往app处理', {
				icon: 5
			});
		},
		toDoorDialog(){
			top.layer.open({
				type: 2,
				area: ['850px', '700px'],
				shade: 0.5,
				title: '代预约',
				fixed: true, //不固定
				maxmin: true,
				closeBtn: 1,
				// shift: 5,
				shadeClose: false, //点击遮罩关闭层
				content: `../html/toDoorService.html?patient=${this.patient}`
			})
		},
		viewGuidance: function(o){
			var vm = this
			previewLayerIndex = layer.open({
				type: 2,
				area: ['380px', '600px'],
				shade: 0.5,
				title: '预览',
				fixed: true, //不固定
				maxmin: true,
				closeBtn:1,
				shift: 5,
				shadeClose: false, //点击遮罩关闭层
				content: '../../rehabilitation/html/rehabilitation_guidance_preview.html?modelCode='+o.article
			});
		}, 
		getServiceItem: function() {
			var vm = this;
			var loginDoctor = JSON.parse(window.localStorage.getItem('wlyyAgent'));
			var loadding = top.layer.load(0, {
				shade: false
			}); //0代表加载的风格,支持0-2
			var params = {
				planDetailId: vm.planid,
			}
			if(vm.recordId){
				params['recordId'] = vm.recordId
			}
			rehaAPI.serviceItem(params).then(function(res) {
				top.layer.close(loadding);
				if(res.status == 200) {
					vm.service = res.data;
					var isZK=loginDoctor.doctorType==1?true:false;
					vm.service.isZK=isZK;
					if(vm.service.completeTime){
						var l = vm.service.completeTime.length
						vm.service.shortCompleteTime = vm.service.completeTime.substr(l-5, l-1)
					}
					if(vm.service.isMyTask==1){//执行者										
						vm.service.isCK=true;//无法显示按钮
						if(loginDoctor.uid==vm.service.specialistDoctorCode){//说明我自己是创建者
							vm.service.isCK=false;
							vm.service.isCreate=true;
						}
					}else{
						if(loginDoctor.uid==vm.service.specialistDoctorCode){//说明我自己是创建者
							vm.service.isCreate=true;
						}
					}
					if(vm.service.type == 4 || vm.service.type == 5 || vm.service.type == 7){
						vm.getRelationRecord(vm.service.type, vm.planid).then(function(result){
							if(result.status == 200){
								vm.service.relationList = result.data&&result.data.length>0?result.data:undefined
								vm.$forceUpdate()
							}
						})
					}
					if(vm.service.frequencyCode){
						vm.islimit = true
					} else {
						vm.islimit = false
					}
				} else {
					top.layer.msg(res.msg, {
						icon: 5
					});
				}
				if(vm.service.status==1){
					var index = top.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
					top.layer.title('服务记录详情', index)  //再改变当前层的标题						
				}		
			})
		},
		getRelationRecord: function(type, planDetaiId){
			// 1.电话短信 2.康复咨询 3.远程监控检测 4.上门服务 5.康复指导  6 康复随访  7.复诊)
			var vm = this
			var url=''
			if(type==5){
				url='doctor/specialist/rehabilitation/selectByRelationCode'
			}else if(type==7){
				url='third/guahao/selectByRelationCode'
			}else if(type==4){
				url="/doctor/specialist/rehabilitation/selectRelationCode"
			}
			var vm = this
			var params = {
				relationCode: vm.recordId?vm.recordId:planDetaiId
			}
			return httpRequest.get(url, {data: params})
		},
		zdly: function(data) {
			var vm = this
			var loginDoctor = JSON.parse(window.localStorage.getItem('wlyyAgent'));
			var otherCode, otherName;
			if(loginDoctor.doctorType == 1) {
				otherCode = data.familyDoctorCode;
				otherName = data.familyDoctorName;
			} else {
				otherCode = data.specialistDoctorCode;
				otherName = data.specialistDoctorName;
			}
			top.layer.open({
				type: 2,
				//				  offset: ['100px'], //右下角弹出
				area: ['660px', '600px'],
				shade: 0.5,
				title: '指导留言',
				fixed: true, //不固定
				maxmin: true,
				closeBtn: 1,
				shift: 5,
				shadeClose: false, //点击遮罩关闭层
				content: '../../consulting/html/consulting.html?otherCode=' + otherCode + '&otherName=' + encodeURI(otherName) + '&planDetailId=' + vm.planid,
				end: function() { // 未点击确定按钮,点击关闭按钮  
					      
					vm.getServiceItem();    
				}
			});
		},
		deleteImg: function(idx) {
			console.log(idx)
			this.upImgs.splice(idx, 1)
		},
		chakan: function() {
			this.isCollapse = !this.isCollapse;
		},
		upLoadImgToBase64: function() {
			var vm = this;
			var img1 = event.target.files[0];
			var reader = new FileReader();
			var type = img1.type; //文件的类型,判断是否是图片  
			var size = img1.size; //文件的大小,判断图片的大小  
			if(this.imgData.accept.indexOf(type) == -1) {
				alert('请选择我们支持的图片格式!');
				return false;
			}
			if(size > 3145728) {
				alert('请选择3M以内的图片!');
				return false;
			}
			reader.readAsDataURL(img1);
			reader.onload = function(e) {
				vm.upImgs.push({
					baseUrl: e.target.result
				});
				vm.upImgArr.push(img1);
				console.log('e', e, 'vm.upImgs', vm.upImgs, 'vm.upImgArr', vm.upImgArr)
				//vm.uploadImg(vm.upImgArr);
			}
		},
		qrwc: function(patient,type) {
			var vm = this;
			if(!vm.service.node){
				showErrorMessage('请填写服务记录')
				return
			}
			if(!vm.upImgs.length){
				showErrorMessage('请上传相关记录')
				return
			}
			vm.saveRehabilitationOperateRecord(vm.planid,type);
		},
		saveRehabilitationOperateRecord:function(planDetailId, type, relationCode, flag){
			var vm=this;
			var params={
				rehabilitationDetailId: planDetailId,
				node: null,
				patientCode: vm.patient,
				doctorCode: docInfo.uid,
				relationRecordType: type,
				relationRecordCode: '',
				relationRecordImg: null,
				status: 0
			}
			rehaAPI.saveRehabilitationOperateRecord({dataJson:JSON.stringify(params)}).then(function(res){
				if(res.status==200){
					if(type==1 || type==7){
						vm.uploadImg(vm.upImgArr);
					}else if(type==6){
						vm.updateRelationCodeByDetailId(planDetailId, relationCode)
					} else {
						vm.updateNoteAndImageRehabilitationOperate(planDetailId)
					}
				} else {
					layer.msg(res.msg, {
						icon: 5
					});
				}
			})
			
		},
		//上传图片
		uploadImg: function(data) {
			var vm = this;
			var len = data.length;
			if(len==0) {
				vm.updateNoteAndImageRehabilitationOperate(vm.planid)
			} else {
				var file = data[len - 1];
				var formData = new FormData();
				formData.append('file', file);
				rehaAPI.upload(formData).then(function(res) {
					if(res.status == 200) {
						vm.upImgs[len - 1].img = res.data;
						data.pop();
						vm.$forceUpdate()
						vm.uploadImg(data);
					} else {
						layer.msg(res.msg, {
							icon: 5
						});
					}
				})
			}
		},
		updateNoteAndImageRehabilitationOperate: function(planDetailId, relationCode) {
			var vm = this;
			var _image = [];
			$.each(vm.upImgs, function(index, obj){
				_image.push(obj.img);
			})
			var params = {
				planDetailId: planDetailId,
				node: vm.service&&vm.service.node?vm.service.node:null,
				image:JSON.stringify(_image)||''
			}
			if(relationCode){
				params['relationCode'] = relationCode
			}
			var loadding = top.layer.load(0, {
				shade: false
			}); //0代表加载的风格,支持0-2
			rehaAPI.updateNoteAndImageRehabilitationOperate(params).then(function(res) {
				top.layer.close(loadding);
				if(res.status == 200) {
					vm.getServiceItem();
					top.rehabilitationVue.refresh()
				}
			})
		},
		updateRelationCodeByDetailId: function(planDetailId, relationCode){
			var vm = this
			var params = {
				planDetailId: planDetailId,
				relationCode: relationCode,
			}
			rehaAPI.updateRelationCodeByDetailId(params).then(function(res) {
				if(res.status == 200) {
					vm.getServiceItem();
					top.rehabilitationVue.refresh()
				} else {
					showErrorMessage(res.msg)
				}
			})
		},
		viewDetial:function(type,code){
			var vm=this;
			if(type == 3) {
				top.layer.msg('客户端暂不支持查询健康指导记录');
			} else if(type==4){
				top.layer.msg('客户端暂不支持查询随访记录');
			}else{
				top.layer.open({
					type: 2,
					//				  offset: ['100px'], //右下角弹出
					area: ['80%', '600px'],
					shade: 0.5,
					title: '指导教育',
					fixed: true, //不固定
					maxmin: true,
					closeBtn: 1,
					shift: 5,
					shadeClose: false, //点击遮罩关闭层
					content: '../../article/html/article-info.html?articleId=' + code,
					end: function() { // 未点击确定按钮,点击关闭按钮  
						vm.getServiceItem();    
					}
				});
				
			}
		},
		getContent: function(value,type) {
			var res=value;
			if(type==2 || type==9){
				res = "<img src='"+httpRequest.getImgUrl(res)+"'>";
			}else if(type==3){
				res = '【语音】';
			}else if(type==19){
				res = '【聊天记录】';
			}else if(type==12){
				res = '【视频】';
			}
			return res;
		}
	},
	filters: {
		formatDate: function(value, format) {
			if(!value) return;
			var fmt = format || "yyyy-MM-dd hh:mm";
			var date = new Date(value);
			if(/(y+)/.test(fmt)) {
				fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
			}
			let o = {
				'M+': date.getMonth() + 1,
				'd+': date.getDate(),
				'h+': date.getHours(),
				'm+': date.getMinutes(),
				's+': date.getSeconds()
			};
			for(let k in o) {
				if(new RegExp(`(${k})`).test(fmt)) {
					let str = o[k] + '';
					fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : ('00' + str).substr(str.length));
				}
			}
			return fmt;
		},
		getImgUrl: function(value) {
			var url = httpRequest.getImgUrl(value);
			return url;
		}
	}
})
$('body').on('click', 'img', function () {

+ 2 - 0
app/rehabilitation/js/rehabilitation_management.js

@ -705,6 +705,8 @@
				})
			},
			viewServerItemsDetail: function(o){
				console.log("o",o);
				
				
				if(o.code=='2'){
					showInfoMessage('请从“消息-患者消息列表”中查看患者的康复咨询记录')

+ 16 - 2
component/rehabilitation/server-items-detail.js

@ -156,7 +156,7 @@ Vue.component('server-items-detail', {
						<button v-if="service.isMyTask" class="btn btn-12b7f5" @click="zdly(service)">查看留言</button>\
						<button v-if="service.isMyTask&&service.type==\'1\'" class="btn btn-yuyue" @click="addCompleteRecord()">添加完成记录</button>\
						<button v-if="service.isMyTask&&service.type==\'4\'" class="btn btn-yuyue" @click="sendSpecialistWeixinMessage(planDetaiId,4)">发送提醒</button>\
						<button v-if="service.isMyTask&&service.type==\'4\'" class="btn btn-12b7f5" @click="qwapp">代预约</button>\
						<button v-if="service.isMyTask&&service.type==\'4\'" class="btn btn-12b7f5" @click="toDoorDialog">代预约</button>\
						<button v-if="service.isMyTask&&service.type==\'5\'" class="btn btn-yuyue" @click="kfzd()">发送康复指导</button>\
						<button v-if="service.isMyTask&&service.type==\'6\'" class="btn btn-yuyue" @click="sfjh()">创建随访计划</button>\
						<button v-if="service.isMyTask&&service.type==\'7\'" class="btn btn-yuyue" @click="sendSpecialistWeixinMessage(planDetaiId,7)">发送提醒</button>\
@ -1010,7 +1010,21 @@ Vue.component('server-items-detail', {
		},
		previewImg: function(url){
			imgShow("#outerdiv", "#innerdiv", "#bigimg", url);
		}
		},
		toDoorDialog(){
			top.layer.open({
				type: 2,
				area: ['850px', '700px'],
				shade: 0.5,
				title: '代预约',
				fixed: true, //不固定
				maxmin: true,
				closeBtn: 1,
				// shift: 5,
				shadeClose: false, //点击遮罩关闭层
				content: `/app/rehabilitation/html/toDoorService.html?patient=${this.patientcode}&detailId=${this.plandetailid}`
			})
		},
    }
})
function imgShow(outerdiv, innerdiv, bigimg, _this){  

+ 4184 - 0
js/api-map-baidu.lite.js

@ -0,0 +1,4184 @@
window.TILE_VERSION = {
	"ditu": {
		"normal": {
			"version": "088",
			"updateDate": "20190929"
		},
		"satellite": {
			"version": "009",
			"updateDate": "20190929"
		},
		"normalTraffic": {
			"version": "081",
			"updateDate": "20190929"
		},
		"satelliteTraffic": {
			"version": "083",
			"updateDate": "20190929"
		},
		"mapJS": {
			"version": "104",
			"updateDate": "20190929"
		},
		"satelliteStreet": {
			"version": "083",
			"updateDate": "20190929"
		},
		"earthVector": {
			"version": "001",
			"updateDate": "20190929"
		}
	},
	"webapp": {
		"high_normal": {
			"version": "001",
			"updateDate": "20190929"
		},
		"lower_normal": {
			"version": "002",
			"updateDate": "20190929"
		}
	},
	"api_for_mobile": {
		"vector": {
			"version": "002",
			"updateDate": "20190929"
		},
		"vectorIcon": {
			"version": "002",
			"updateDate": "20190929"
		}
	}
};
window.BMAP_AUTHENTIC_KEY = "hlDtW6AATwvq3WZ7QGMbQKSNMvM59BLZ";
(function() {
	(function() {
		var g, J = g = J || {
			version: "1.3.4"
		};
		J.guid = "$BAIDU$";
		window[J.guid] = window[J.guid] || {};
		J.object = J.object || {};
		J.extend = J.object.extend = function(N, L) {
			for (var M in L) {
				if (L.hasOwnProperty(M)) {
					N[M] = L[M]
				}
			}
			return N
		};
		J.dom = J.dom || {};
		J.dom.g = function(L) {
			if ("string" == typeof L || L instanceof String) {
				return document.getElementById(L)
			} else {
				if (L && L.nodeName && (L.nodeType == 1 || L.nodeType == 9)) {
					return L
				}
			}
			return null
		};
		J.g = J.G = J.dom.g;
		J.dom.hide = function(L) {
			L = J.dom.g(L);
			L.style.display = "none";
			return L
		};
		J.hide = J.dom.hide;
		J.lang = J.lang || {};
		J.lang.isString = function(L) {
			return "[object String]" == Object.prototype.toString.call(L)
		};
		J.isString = J.lang.isString;
		J.dom._g = function(L) {
			if (J.lang.isString(L)) {
				return document.getElementById(L)
			}
			return L
		};
		J._g = J.dom._g;
		J.dom.contains = function(L, M) {
			var N = J.dom._g;
			L = N(L);
			M = N(M);
			return L.contains ? L != M && L.contains(M) : !!(L.compareDocumentPosition(M) & 16)
		};
		J.browser = J.browser || {};
		J.dom._NAME_ATTRS = (function() {
			var L = {
				cellpadding: "cellPadding",
				cellspacing: "cellSpacing",
				colspan: "colSpan",
				rowspan: "rowSpan",
				valign: "vAlign",
				usemap: "useMap",
				frameborder: "frameBorder"
			};
			L.htmlFor = "for";
			L.className = "class";
			return L
		})();
		J.dom.setAttr = function(M, L, N) {
			M = J.dom.g(M);
			if ("style" == L) {
				M.style.cssText = N
			} else {
				L = J.dom._NAME_ATTRS[L] || L;
				M.setAttribute(L, N)
			}
			return M
		};
		J.setAttr = J.dom.setAttr;
		J.dom.setAttrs = function(N, L) {
			N = J.dom.g(N);
			for (var M in L) {
				J.dom.setAttr(N, M, L[M])
			}
			return N
		};
		J.setAttrs = J.dom.setAttrs;
		J.string = J.string || {};
		J.dom.removeClass = function(Q, R) {
			Q = J.dom.g(Q);
			var O = Q.className.split(/\s+/),
				S = R.split(/\s+/),
				M, L = S.length,
				N, P = 0;
			for (; P < L; ++P) {
				for (N = 0, M = O.length; N < M; ++N) {
					if (O[N] == S[P]) {
						O.splice(N, 1);
						break
					}
				}
			}
			Q.className = O.join(" ");
			return Q
		};
		J.removeClass = J.dom.removeClass;
		J.dom.insertHTML = function(O, L, N) {
			O = J.dom.g(O);
			var M, P;
			if (O.insertAdjacentHTML) {
				O.insertAdjacentHTML(L, N)
			} else {
				M = O.ownerDocument.createRange();
				L = L.toUpperCase();
				if (L == "AFTERBEGIN" || L == "BEFOREEND") {
					M.selectNodeContents(O);
					M.collapse(L == "AFTERBEGIN")
				} else {
					P = L == "BEFOREBEGIN";
					M[P ? "setStartBefore" : "setEndAfter"](O);
					M.collapse(P)
				}
				M.insertNode(M.createContextualFragment(N))
			}
			return O
		};
		J.insertHTML = J.dom.insertHTML;
		J.dom.show = function(L) {
			L = J.dom.g(L);
			L.style.display = "";
			return L
		};
		J.show = J.dom.show;
		J.dom.getDocument = function(L) {
			L = J.dom.g(L);
			return L.nodeType == 9 ? L : L.ownerDocument || L.document
		};
		J.dom.addClass = function(Q, R) {
			Q = J.dom.g(Q);
			var M = R.split(/\s+/),
				L = Q.className,
				P = " " + L + " ",
				O = 0,
				N = M.length;
			for (; O < N; O++) {
				if (P.indexOf(" " + M[O] + " ") < 0) {
					L += " " + M[O]
				}
			}
			Q.className = L;
			return Q
		};
		J.addClass = J.dom.addClass;
		J.dom._styleFixer = J.dom._styleFixer || {};
		J.dom._styleFilter = J.dom._styleFilter || [];
		J.dom._styleFilter.filter = function(M, P, Q) {
			for (var L = 0, O = J.dom._styleFilter, N; N = O[L]; L++) {
				if (N = N[Q]) {
					P = N(M, P)
				}
			}
			return P
		};
		J.string.toCamelCase = function(L) {
			if (L.indexOf("-") < 0 && L.indexOf("_") < 0) {
				return L
			}
			return L.replace(/[-_][^-_]/g, function(M) {
				return M.charAt(1).toUpperCase()
			})
		};
		J.dom.getStyle = function(N, M) {
			var Q = J.dom;
			N = Q.g(N);
			M = J.string.toCamelCase(M);
			var P = N.style[M];
			if (!P) {
				var L = Q._styleFixer[M],
					O = N.currentStyle || getComputedStyle(N, null);
				P = L && L.get ? L.get(N, O) : O[L || M]
			}
			if (L = Q._styleFilter) {
				P = L.filter(M, P, "get")
			}
			return P
		};
		J.getStyle = J.dom.getStyle;
		if (/opera\/(\d+\.\d)/i.test(navigator.userAgent)) {
			J.browser.opera = +RegExp["\x241"]
		}
		J.browser.isWebkit = /webkit/i.test(navigator.userAgent);
		J.browser.isGecko = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent);
		J.browser.isStrict = document.compatMode == "CSS1Compat";
		J.dom.getPosition = function(L) {
			L = J.dom.g(L);
			var U = J.dom.getDocument(L),
				O = J.browser,
				R = J.dom.getStyle,
				N = O.isGecko > 0 && U.getBoxObjectFor && R(L, "position") == "absolute" && (L.style.top === "" || L.style.left ===
					""),
				S = {
					left: 0,
					top: 0
				},
				Q = (O.ie && !O.isStrict) ? U.body : U.documentElement,
				V, M;
			if (L == Q) {
				return S
			}
			if (L.getBoundingClientRect) {
				M = L.getBoundingClientRect();
				S.left = Math.floor(M.left) + Math.max(U.documentElement.scrollLeft, U.body.scrollLeft);
				S.top = Math.floor(M.top) + Math.max(U.documentElement.scrollTop, U.body.scrollTop);
				S.left -= U.documentElement.clientLeft;
				S.top -= U.documentElement.clientTop;
				var T = U.body,
					W = parseInt(R(T, "borderLeftWidth")),
					P = parseInt(R(T, "borderTopWidth"));
				if (O.ie && !O.isStrict) {
					S.left -= isNaN(W) ? 2 : W;
					S.top -= isNaN(P) ? 2 : P
				}
			} else {
				V = L;
				do {
					S.left += V.offsetLeft;
					S.top += V.offsetTop;
					if (O.isWebkit > 0 && R(V, "position") == "fixed") {
						S.left += U.body.scrollLeft;
						S.top += U.body.scrollTop;
						break
					}
					V = V.offsetParent
				} while (V && V != L);
				if (O.opera > 0 || (O.isWebkit > 0 && R(L, "position") == "absolute")) {
					S.top -= U.body.offsetTop
				}
				V = L.offsetParent;
				while (V && V != U.body) {
					S.left -= V.scrollLeft;
					if (!O.opera || V.tagName != "TR") {
						S.top -= V.scrollTop
					}
					V = V.offsetParent
				}
			}
			return S
		};
		if (/firefox\/(\d+\.\d)/i.test(navigator.userAgent)) {
			J.browser.firefox = +RegExp["\x241"]
		}(function() {
			var L = navigator.userAgent;
			if (/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(L) && !/chrome/i.test(L)) {
				J.browser.safari = +(RegExp["\x241"] || RegExp["\x242"])
			}
		})();
		if (/chrome\/(\d+\.\d)/i.test(navigator.userAgent)) {
			J.browser.chrome = +RegExp["\x241"]
		}
		J.array = J.array || {};
		J.array.each = function(Q, O) {
			var N, P, M, L = Q.length;
			if ("function" == typeof O) {
				for (M = 0; M < L; M++) {
					P = Q[M];
					N = O.call(Q, P, M);
					if (N === false) {
						break
					}
				}
			}
			return Q
		};
		J.each = J.array.each;
		J.lang.guid = function() {
			return "GUID__" + (window[J.guid]._counter++).toString(36)
		};
		window[J.guid]._counter = window[J.guid]._counter || 1;
		window[J.guid]._instances = window[J.guid]._instances || {};
		J.lang.isFunction = function(L) {
			return "[object Function]" == Object.prototype.toString.call(L)
		};
		J.lang.isNumber = function(L) {
			return "[object Number]" == Object.prototype.toString.call(L)
		};
		J.lang.Class = function(L) {
			this.guid = L || J.lang.guid();
			window[J.guid]._instances[this.guid] = this
		};
		window[J.guid]._instances = window[J.guid]._instances || {};
		J.lang.Class.prototype.dispose = function() {
			delete window[J.guid]._instances[this.guid];
			for (var L in this) {
				if (!J.lang.isFunction(this[L])) {
					delete this[L]
				}
			}
			this.disposed = true
		};
		J.lang.Class.prototype.toString = function() {
			return "[object " + (this._className || "Object") + "]"
		};
		J.lang.Event = function(L, M) {
			this.type = L;
			this.returnValue = true;
			this.target = M || null;
			this.currentTarget = null
		};
		J.lang.Class.prototype.addEventListener = function(O, N, M) {
			if (!J.lang.isFunction(N)) {
				return
			}!this.__listeners && (this.__listeners = {});
			var L = this.__listeners,
				P;
			if (typeof M == "string" && M) {
				if (/[^\w\-]/.test(M)) {
					throw ("nonstandard key:" + M)
				} else {
					N.hashCode = M;
					P = M
				}
			}
			O.indexOf("on") != 0 && (O = "on" + O);
			typeof L[O] != "object" && (L[O] = {});
			P = P || J.lang.guid();
			N.hashCode = P;
			L[O][P] = N
		};
		J.lang.Class.prototype.removeEventListener = function(N, M) {
			if (J.lang.isFunction(M)) {
				M = M.hashCode
			} else {
				if (!J.lang.isString(M)) {
					return
				}
			}!this.__listeners && (this.__listeners = {});
			N.indexOf("on") != 0 && (N = "on" + N);
			var L = this.__listeners;
			if (!L[N]) {
				return
			}
			L[N][M] && delete L[N][M]
		};
		J.lang.Class.prototype.dispatchEvent = function(O, L) {
			if (J.lang.isString(O)) {
				O = new J.lang.Event(O)
			}!this.__listeners && (this.__listeners = {});
			L = L || {};
			for (var N in L) {
				O[N] = L[N]
			}
			var N, M = this.__listeners,
				P = O.type;
			O.target = O.target || this;
			O.currentTarget = this;
			P.indexOf("on") != 0 && (P = "on" + P);
			J.lang.isFunction(this[P]) && this[P].apply(this, arguments);
			if (typeof M[P] == "object") {
				for (N in M[P]) {
					M[P][N].apply(this, arguments)
				}
			}
			return O.returnValue
		};
		J.lang.inherits = function(R, P, O) {
			var N, Q, L = R.prototype,
				M = new Function();
			M.prototype = P.prototype;
			Q = R.prototype = new M();
			for (N in L) {
				Q[N] = L[N]
			}
			R.prototype.constructor = R;
			R.superClass = P.prototype;
			if ("string" == typeof O) {
				Q._className = O
			}
		};
		J.inherits = J.lang.inherits;
		J.lang.instance = function(L) {
			return window[J.guid]._instances[L] || null
		};
		J.platform = J.platform || {};
		J.platform.isAndroid = /android/i.test(navigator.userAgent);
		if (/android (\d+(\.\d)?)/i.test(navigator.userAgent)) {
			J.platform.android = J.android = RegExp["\x241"]
		}
		J.platform.isIpad = /ipad/i.test(navigator.userAgent);
		J.platform.isIphone = /iphone/i.test(navigator.userAgent);
		J.platform.iosVersion = /iphone os (\d)\_/i.test(navigator.userAgent) ? +RegExp["\x241"] : 0;
		J.lang.Event.prototype.inherit = function(N) {
			var M = this;
			this.domEvent = N = window.event || N;
			M.clientX = N.clientX || N.pageX;
			M.clientY = N.clientY || N.pageY;
			M.offsetX = N.offsetX || N.layerX;
			M.offsetY = N.offsetY || N.layerY;
			M.screenX = N.screenX;
			M.screenY = N.screenY;
			M.ctrlKey = N.ctrlKey || N.metaKey;
			M.shiftKey = N.shiftKey;
			M.altKey = N.altKey;
			if (N.touches) {
				M.touches = [];
				for (var L = 0; L < N.touches.length; L++) {
					M.touches.push({
						clientX: N.touches[L].clientX,
						clientY: N.touches[L].clientY,
						screenX: N.touches[L].screenX,
						screenY: N.touches[L].screenY,
						pageX: N.touches[L].pageX,
						pageY: N.touches[L].pageY,
						target: N.touches[L].target,
						identifier: N.touches[L].identifier
					})
				}
			}
			if (N.changedTouches) {
				M.changedTouches = [];
				for (var L = 0; L < N.changedTouches.length; L++) {
					M.changedTouches.push({
						clientX: N.changedTouches[L].clientX,
						clientY: N.changedTouches[L].clientY,
						screenX: N.changedTouches[L].screenX,
						screenY: N.changedTouches[L].screenY,
						pageX: N.changedTouches[L].pageX,
						pageY: N.changedTouches[L].pageY,
						target: N.changedTouches[L].target,
						identifier: N.changedTouches[L].identifier
					})
				}
			}
			if (N.targetTouches) {
				M.targetTouches = [];
				for (var L = 0; L < N.targetTouches.length; L++) {
					M.targetTouches.push({
						clientX: N.targetTouches[L].clientX,
						clientY: N.targetTouches[L].clientY,
						screenX: N.targetTouches[L].screenX,
						screenY: N.targetTouches[L].screenY,
						pageX: N.targetTouches[L].pageX,
						pageY: N.targetTouches[L].pageY,
						target: N.targetTouches[L].target,
						identifier: N.targetTouches[L].identifier
					})
				}
			}
			M.rotation = N.rotation;
			M.scale = N.scale;
			return M
		};
		var F = J.lang.Event;
		J.lang.decontrol = function(M) {
			var L = window[J.guid];
			L._instances && (delete L._instances[M])
		};
		J.event = {};
		J.on = J.event.on = function(N, M, L) {
			if (!(N = J.g(N))) {
				return N
			}
			M = M.replace(/^on/, "");
			if (N.addEventListener) {
				N.addEventListener(M, L, false)
			} else {
				if (N.attachEvent) {
					N.attachEvent("on" + M, L)
				}
			}
			return N
		};
		J.un = J.event.un = function(N, M, L) {
			if (!(N = J.g(N))) {
				return N
			}
			M = M.replace(/^on/, "");
			if (N.removeEventListener) {
				N.removeEventListener(M, L, false)
			} else {
				if (N.detachEvent) {
					N.detachEvent("on" + M, L)
				}
			}
			return N
		};
		J.dom.hasClass = function(N, M) {
			if (!N || !N.className || typeof N.className != "string") {
				return false
			}
			var L = -1;
			try {
				L = N.className == M || N.className.indexOf(M)
			} catch (O) {
				return false
			}
			return L > -1
		};
		var u = u || {};
		u._register = [];
		u.register = function(L) {
			this._register.push(L)
		};
		var G = window.BMAP_AUTHENTIC_KEY || "";
		u._rd = {};
		u.verify = function() {
			var L = u.apiUrl + "?qt=verify&ak=" + G;
			o.request(L, function(M) {
				if (M && M.error !== 0) {
					if (typeof map !== "undefined") {
						map.getContainer().innerHTML = "";
						map.__listeners = {}
					}
					u = null;
					var N =
						"百度未授权使用地图API,可能是因为您提供的密钥不是有效的百度LBS开放平台密钥,或此密钥未对本应用的百度地图JavaScriptAPI授权。您可以访问如下网址了解如何获取有效的密钥:http://lbsyun.baidu.com/apiconsole/key#。";
					switch (M.error) {
						case 101:
							N = "开发者禁用了该ak的jsapi服务权限。您可以访问如下网址了解如何获取有效的密钥:http://lbsyun.baidu.com/apiconsole/key#。";
							break;
						case 102:
							N = "开发者Referer不正确。您可以访问如下网址了解如何获取有效的密钥:http://lbsyun.baidu.com/apiconsole/key#。";
							break
					}
					alert(N)
				}
			})
		};
		u.copyright = function() {};
		window.BMap = u;
		u.Map = m;
		u.Point = w;
		u.Pixel = j;
		u.Size = d;
		u.Bounds = f;
		u.Projection = n;
		u.MercatorProjection = r;
		u.TileLayer = l;
		u.Control = x;
		u.ScaleControl = y;
		u.ZoomControl = C;
		u.CopyrightControl = k;
		u.Overlay = E;
		u.Marker = z;
		u.Icon = h;
		u.MassFeature = q;
		function m(O, Q) {
			O = J.g(O);
			if (!O) {
				return
			}
			var P = this;
			J.lang.Class.call(P);
			P.config = {
				useVectorMap: false,
				enableDragging: true,
				enableDblclickZoom: true,
				enablePinchToZoom: true,
				enableInertialDragging: true,
				minZoom: 4,
				maxZoom: 18,
				dpr: 2,
				tileSize: 256,
				fixCenterWhenPinch: false,
				fixCenterWhenResize: false,
				backgroundColor: "#F5F3F0",
				personalUrls: "dd",
				mapStyle: null
			};
			J.extend(P.config, Q || {});
			P.projection = new r();
			P.container = O;
			P._setStyle(O);
			O.unselectable = "on";
			O.innerHTML = "";
			O.appendChild(P._render());
			var M = P.getSize();
			P.width = M.width;
			P.height = M.height;
			P.offsetX = 0;
			P.offsetY = 0;
			P.platform = O.firstChild;
			P.preWebkitTransform = "";
			P.maskLayer = P.platform.firstChild;
			P.maskLayer.style.width = P.width + "px";
			P.maskLayer.style.height = P.height + "px";
			P._panes = {};
			P.centerPoint = new w(0, 0);
			P.zoomLevel = 3;
			P.lastLevel = -1;
			P.defaultZoomLevel = null;
			P.defaultCenter = null;
			P._checkZoom();
			P.temp = {
				lastDomMoveTime: 0,
				registerIndex: -1
			};
			for (var N = 0; N < u._register.length; N++) {
				u._register[N](P)
			}
			P.temp.registerIndex = N;
			var L = P.config.useVectorMap;
			if (L) {
				P.vectorLayerMgr = new VectorLayerMgr(P)
			} else {
				P.rasterLayerMgr = new c(P)
			}
			P._bind();
			p.load("opmb", function() {
				P._asyncRegister()
			});
			O = null;
			P.addCopyrightControl()
		}
		J.lang.inherits(m, J.lang.Class, "Map");
		J.extend(m.prototype, {
			_render: function() {
				var L = document.createElement("div");
				L.style.cssText = "position:absolute;overflow:visible;left:0;top:0;z-index:0;";
				var M = document.createElement("div");
				M.style.cssText = "position:absolute;left:0;top:0;z-index:10;overflow:hidden;";
				L.appendChild(M);
				return L
			},
			_setStyle: function(O) {
				var N = O.style;
				var M = N.cssText;
				if (o.getCurrentStyle(O).position != "absolute") {
					M += "position: relative; z-index: 0;"
				}
				var L = this.config.backgroundColor;
				M += ("overflow:hidden;background-color:" + L + ";color:#000;text-align:left");
				N.cssText = M
			},
			_bind: function() {
				var L = this;
				L._watchSize = function() {
					var M = L.getSize();
					if (L.width !== M.width || L.height !== M.height) {
						L.width = M.width;
						L.height = M.height;
						var O = new d(L.width, L.height);
						var P = new F("onbeforeresize");
						P.size = O;
						L.dispatchEvent(P);
						if (!L.config.fixCenterWhenResize) {
							L._updateCenterPoint((M.width - L.width) / 2, (M.height - L.height) / 2)
						}
						L.maskLayer.style.width = L.width + "px";
						L.maskLayer.style.height = L.height + "px";
						var N = new F("onresize");
						N.size = M;
						L.dispatchEvent(N)
					}
				};
				L.temp.autoResizeTimer = setInterval(L._watchSize, 1000)
			},
			_zoomTo: function(N) {
				if (!J.lang.isNumber(N)) {
					return
				}
				N = this._getProperZoom(N).zoom;
				if (N == this.zoomLevel) {
					return
				}
				var M = this.temp;
				if (M.dragAni) {
					M.dragAni.stop()
				}
				this.lastLevel = this.zoomLevel;
				this.zoomLevel = N;
				var L = new F("onzoomstart");
				L.evtSrc = "zoomTo";
				this.dispatchEvent(L)
			},
			setZoom: function(L) {
				this._zoomTo(L)
			},
			zoomIn: function() {
				this._zoomTo(this.zoomLevel + 1)
			},
			zoomOut: function() {
				this._zoomTo(this.zoomLevel - 1)
			},
			setCenter: function(L) {
				if (L.equals(this.centerPoint)) {
					return
				}
				this.panTo(L, {
					noAnimation: true
				})
			},
			isLoaded: function() {
				return !!this.loaded
			},
			centerAndZoom: function(L, P) {
				var O = this;
				P = parseInt(P, 10);
				if (!(L instanceof w) || !P) {
					return
				}
				L = O.projection.lngLatToMercator(L);
				P = O._getProperZoom(P).zoom;
				if (L.equals(O.getCenter()) && P === O.getZoom()) {
					return
				}
				O.lastLevel = O.zoomLevel || P;
				O.zoomLevel = P;
				O.centerPoint = new w(L.lng, L.lat);
				O.defaultZoomLevel = O.defaultZoomLevel || O.zoomLevel;
				O.defaultCenter = O.defaultCenter || O.centerPoint;
				var M = new F("oncenterzoomend");
				M.point = new w(L.lng, L.lat);
				M.pixel = O.pointToPixel(O.centerPoint);
				M.zoom = O.zoomLevel;
				O.dispatchEvent(M);
				if (!O.loaded) {
					var N = new F("onload");
					N.point = new w(L.lng, L.lat);
					N.pixel = O.pointToPixel(O.centerPoint);
					N.zoom = P;
					O.dispatchEvent(N)
				}
			},
			reset: function() {
				this.centerAndZoom(this.defaultCenter, this.defaultZoomLevel)
			},
			getContainer: function() {
				return this.container
			},
			getSize: function() {
				return new d(this.container.clientWidth, this.container.clientHeight)
			},
			getCenter: function() {
				var L = this.projection.mercatorToLngLat(this.centerPoint);
				return L
			},
			getZoom: function() {
				return this.zoomLevel
			},
			_getProperZoom: function(N) {
				var M = this.config.minZoom;
				var L = this.config.maxZoom;
				var O = false;
				if (N < M) {
					O = true;
					N = M
				}
				if (N > L) {
					O = true;
					N = L
				}
				return {
					zoom: N,
					exceeded: O
				}
			},
			panTo: function(M, O) {
				if (!(M instanceof w) || M.equals(this.centerPoint)) {
					return
				}
				var N = this.pointToPixel(M);
				var L = this.width / 2;
				var P = this.height / 2;
				O = O || {};
				if (Math.abs(L - N.x) > this.width || Math.abs(P - N.y) > this.height || O.noAnimation) {
					this._panTo(L - N.x, P - N.y)
				} else {
					this._panBy(L - N.x, P - N.y, {
						duration: O.duration
					})
				}
			},
			_panTo: function(M, L) {
				var N = this.temp;
				if (N.dragAni) {
					N.dragAni.stop()
				}
				this.dispatchEvent(new F("onmovestart"));
				this._setPlatformPosition(this.offsetX + M, this.offsetY + L);
				this.dispatchEvent(new F("onmoveend"))
			},
			panBy: function(M, L, N) {
				M = M || 0;
				L = L || 0;
				N = N || {};
				if (Math.abs(M) <= this.width && Math.abs(L) <= this.height && (!N.noAnimation)) {
					this._panBy(M, L)
				} else {
					this._panTo(M, L)
				}
			},
			_panBy: function(N, M, Q) {
				var P = this;
				Q = Q || {};
				this.dispatchEvent(new F("onmovestart"));
				var L = P.offsetX;
				var R = P.offsetY;
				var O = P.temp;
				if (O.dragAni) {
					O.dragAni.stop()
				}
				if (O.panAni) {
					O.panAni.stop()
				}
				O.panAni = new v({
					fps: Q.fps || 30,
					duration: Q.duration || 500,
					transition: Q.transition || i.easeInOutQuad,
					render: function(S) {
						P._setPlatformPosition(L + N * S, R + M * S)
					},
					finish: function(S) {
						P.dispatchEvent(new F("onmoveend"));
						P.temp.panAni = null
					}
				})
			},
			_setPlatformPosition: function(L, M) {
				if (isNaN(L) || isNaN(M)) {
					return
				}
				if (this.offsetX == L && this.offsetY == M) {
					return
				}
				this._updateCenterPoint(this.offsetX - L, this.offsetY - M);
				this.offsetX = L;
				this.offsetY = M;
				o.css3TransformDom(this.platform, L, M);
				o.css3TransformDom(this.maskLayer, -L, -M);
				this.dispatchEvent(new F("onmoving"))
			},
			_updateCenterPoint: function(M, L) {
				var N = this.getZoomUnits(this.zoomLevel);
				var O = this.centerPoint;
				this.centerPoint = new w(O.lng + M * N, O.lat - L * N)
			},
			getZoomUnits: function(L) {
				return Math.pow(2, (this.config.maxZoom - L))
			},
			getTileUnits: function(L) {
				return this.getZoomUnits(L) * this.config.tileSize
			},
			pointToPixel: function(M, P) {
				if (!M) {
					return
				}
				M = this.projection.lngLatToMercator(M);
				P = P || {};
				var O = P.zoom || this.zoomLevel;
				var S = P.centerPoint || this.centerPoint;
				var Q = P.basePoint || new j(this.width / 2, this.height / 2);
				var N = this.getZoomUnits(O);
				var L = (M.lng - S.lng) / N + Q.x;
				var R = (S.lat - M.lat) / N + Q.y;
				return new j(L, R)
			},
			pixelToPoint: function(N, M) {
				if (!N) {
					return
				}
				M = M || {};
				var T = M.zoom || this.zoomLevel;
				var O = M.centerPoint || this.centerPoint;
				var L = M.basePoint || new j(this.width / 2, this.height / 2);
				var S = this.getZoomUnits(T);
				var Q = O.lng + S * (N.x - L.x);
				var P = O.lat - S * (N.y - L.y);
				var R = new w(Q, P);
				R = this.projection.mercatorToLngLat(R);
				return R
			},
			pointToOverlayPixel: function(L, N) {
				if (!L) {
					return
				}
				var M = this.pointToPixel(L, N);
				M.x -= this.offsetX;
				M.y -= this.offsetY;
				return M
			},
			overlayPixelToPoint: function(L, N) {
				if (!L) {
					return
				}
				var M = new j(L.x, L.y);
				M.x += this.offsetX;
				M.y += this.offsetY;
				return this.pixelToPoint(M, N)
			},
			getBounds: function() {
				if (!this.isLoaded()) {
					return new f()
				}
				var M = new j(0, this.height);
				var L = new j(this.width, 0);
				var O = this.pixelToPoint(M);
				var N = this.pixelToPoint(L);
				return new f(O, N)
			},
			_getBestLevel: function(M, N) {
				var Q = N.margins || [10, 10, 10, 10];
				var R = Q[1] + Q[3];
				var P = Q[0] + Q[2];
				var L = this.config.minZoom;
				var T = this.config.maxZoom;
				for (var O = T; O >= L; O--) {
					var S = this.getZoomUnits(O);
					if (M.toSpan().lng / S < this.width - R && M.toSpan().lat / S < this.height - P) {
						break
					}
				}
				if (O < L) {
					O = L
				}
				if (O > T) {
					O = T
				}
				return O
			},
			getViewport: function(U, M) {
				var Y = {
					center: this.getCenter(),
					zoom: this.getZoom()
				};
				if (!U || !U instanceof f && U.length == 0 || U instanceof f && U.isEmpty()) {
					return Y
				}
				var W = [];
				if (U instanceof f) {
					W.push(U.getNorthEast());
					W.push(U.getSouthWest())
				} else {
					W = U.slice(0)
				}
				M = M || {};
				var Q = [];
				for (var R = 0, P = W.length; R < P; R++) {
					Q.push(this.projection.lngLatToMercator(W[R]))
				}
				var N = new f();
				for (var R = Q.length - 1; R >= 0; R--) {
					N.extend(Q[R])
				}
				if (N.isEmpty()) {
					return Y
				}
				var L = N.getCenter();
				var X = this._getBestLevel(N, M);
				if (M.margins) {
					var T = M.margins;
					var S = (T[1] - T[3]) / 2;
					var V = (T[0] - T[2]) / 2;
					var O = this.getZoomUnits(X);
					L.lng = L.lng + O * S;
					L.lat = L.lat + O * V
				}
				L = this.projection.mercatorToLngLat(L);
				return {
					center: L,
					zoom: X
				}
			},
			setViewport: function(M, N) {
				var L;
				if (M && M.center) {
					L = M
				} else {
					L = this.getViewport(M, N)
				}
				N = N || {};
				if (L.zoom == this.zoomLevel && N.enableAnimation !== false) {
					this.panTo(L.center, {
						duration: 210
					})
				} else {
					this.centerAndZoom(L.center, L.zoom)
				}
			},
			getPanes: function() {
				return this._panes
			},
			getOverlays: function() {
				var O = [];
				var P = this._overlays;
				var N = this._customOverlays;
				if (P) {
					for (var M in P) {
						if (P[M] instanceof I) {
							O.push(P[M])
						}
					}
				}
				if (N) {
					for (var M = 0, L = N.length; M < L; M++) {
						O.push(N[M])
					}
				}
				return O
			},
			_asyncRegister: function() {
				for (var M = this.temp.registerIndex, L = u._register.length; M < L; M++) {
					u._register[M](this)
				}
				this.temp.registerIndex = M
			},
			_checkZoom: function() {
				var L = this.config;
				if (L.minZoom < 3) {
					L.minZoom = 3
				}
				if (L.maxZoom > 18) {
					L.maxZoom = 18
				}
			},
			addControl: function(L) {
				if (L && J.lang.isFunction(L._i)) {
					L._i(this);
					this.dispatchEvent(new F("onaddcontrol", L))
				}
			},
			removeControl: function(L) {
				if (L && J.lang.isFunction(L.remove)) {
					L.remove();
					this.dispatchEvent(new F("onremovecontrol", L))
				}
			},
			addOverlay: function(L) {
				if (L && J.lang.isFunction(L._i)) {
					L._i(this);
					this.dispatchEvent(new F("onaddoverlay", L))
				}
			},
			removeOverlay: function(L) {
				if (L && J.lang.isFunction(L.remove)) {
					L.remove();
					this.dispatchEvent(new F("onremoveoverlay", L))
				}
			},
			clearOverlays: function() {
				this.dispatchEvent(new F("onclearoverlays"))
			},
			addMassFeatures: function(M) {
				var L = new F("onaddmassfeatures");
				L.massFeatures = M;
				this.dispatchEvent(L)
			},
			removeMassFeatures: function(M) {
				var L = new F("onremovemassfeatures");
				L.massFeatures = M;
				this.dispatchEvent(L)
			},
			clearMassFeatures: function() {
				var L = new F("onclearmassfeatures");
				this.dispatchEvent(L)
			},
			addTileLayer: function(L) {
				if (L) {
					this.dispatchEvent(new F("onaddtilelayer", L))
				}
			},
			removeTileLayer: function(L) {
				if (L) {
					this.dispatchEvent(new F("onremovetilelayer", L))
				}
			},
			enableDragging: function() {
				this.config.enableDragging = true
			},
			disableDragging: function() {
				this.config.enableDragging = false
			},
			enableInertialDragging: function() {
				this.config.enableInertialDragging = true
			},
			disableInertialDragging: function() {
				this.config.enableInertialDragging = false
			},
			enableDoubleClickZoom: function() {
				this.config.enableDblclickZoom = true
			},
			disableDoubleClickZoom: function() {
				this.config.enableDblclickZoom = false
			},
			enablePinchToZoom: function() {
				this.config.enablePinchToZoom = true
			},
			disablePinchToZoom: function() {
				this.config.enablePinchToZoom = false
			},
			addCopyrightControl: function() {
				var L = new k();
				this.addControl(L)
			}
		});
		function f(L, M) {
			if (L && !M) {
				M = L
			}
			this._sw = this._ne = null;
			this._swLng = this._swLat = null;
			this._neLng = this._neLat = null;
			if (L) {
				this._sw = new w(L.lng, L.lat);
				this._ne = new w(M.lng, M.lat);
				this._swLng = L.lng;
				this._swLat = L.lat;
				this._neLng = M.lng;
				this._neLat = M.lat
			}
		}
		J.object.extend(f.prototype, {
			isEmpty: function() {
				return !this._sw || !this._ne
			},
			equals: function(L) {
				if (!(L instanceof f) || this.isEmpty()) {
					return false
				}
				return this.getSouthWest().equals(L.getSouthWest()) && this.getNorthEast().equals(L.getNorthEast())
			},
			getSouthWest: function() {
				return this._sw
			},
			getNorthEast: function() {
				return this._ne
			},
			getCenter: function() {
				if (this.isEmpty()) {
					return null
				}
				return new w((this._swLng + this._neLng) / 2, (this._swLat + this._neLat) / 2)
			},
			extend: function(L) {
				if (!(L instanceof w)) {
					return
				}
				var M = L.lng,
					N = L.lat;
				if (!this._sw) {
					this._sw = new w(0, 0)
				}
				if (!this._ne) {
					this._ne = new w(0, 0)
				}
				if (!this._swLng || this._swLng > M) {
					this._sw.lng = this._swLng = M
				}
				if (!this._neLng || this._neLng < M) {
					this._ne.lng = this._neLng = M
				}
				if (!this._swLat || this._swLat > N) {
					this._sw.lat = this._swLat = N
				}
				if (!this._neLat || this._neLat < N) {
					this._ne.lat = this._neLat = N
				}
			},
			toSpan: function() {
				if (this.isEmpty()) {
					return new w(0, 0)
				}
				return new w(Math.abs(this._neLng - this._swLng), Math.abs(this._neLat - this._swLat))
			}
		});
		function w(L, M) {
			this.lng = parseFloat(L);
			this.lat = parseFloat(M)
		}
		w.prototype.equals = function(L) {
			return L && this.lat == L.lat && this.lng == L.lng
		};
		function n() {}
		n.prototype.lngLatToPoint = function() {};
		n.prototype.pointToLngLat = function() {};
		function r() {}
		J.extend(r, {
			EARTHRADIUS: 6370996.81,
			MCBAND: [12890594.86, 8362377.87, 5591021, 3481989.83, 1678043.12, 0],
			LLBAND: [75, 60, 45, 30, 15, 0],
			MC2LL: [
				[1.410526172116255e-8, 0.00000898305509648872, -1.9939833816331, 200.9824383106796, -187.2403703815547,
					91.6087516669843, -23.38765649603339, 2.57121317296198, -0.03801003308653, 17337981.2
				],
				[-7.435856389565537e-9, 0.000008983055097726239, -0.78625201886289, 96.32687599759846, -1.85204757529826, -
					59.36935905485877, 47.40033549296737, -16.50741931063887, 2.28786674699375, 10260144.86
				],
				[-3.030883460898826e-8, 0.00000898305509983578, 0.30071316287616, 59.74293618442277, 7.357984074871, -
					25.38371002664745, 13.45380521110908, -3.29883767235584, 0.32710905363475, 6856817.37
				],
				[-1.981981304930552e-8, 0.000008983055099779535, 0.03278182852591, 40.31678527705744, 0.65659298677277, -
					4.44255534477492, 0.85341911805263, 0.12923347998204, -0.04625736007561, 4482777.06
				],
				[3.09191371068437e-9, 0.000008983055096812155, 0.00006995724062, 23.10934304144901, -0.00023663490511, -
					0.6321817810242, -0.00663494467273, 0.03430082397953, -0.00466043876332, 2555164.4
				],
				[2.890871144776878e-9, 0.000008983055095805407, -3.068298e-8, 7.47137025468032, -0.00000353937994, -
					0.02145144861037, -0.00001234426596, 0.00010322952773, -0.00000323890364, 826088.5
				]
			],
			LL2MC: [
				[-0.0015702102444, 111320.7020616939, 1704480524535203, -10338987376042340, 26112667856603880, -
					35149669176653700, 26595700718403920, -10725012454188240, 1800819912950474, 82.5
				],
				[0.0008277824516172526, 111320.7020463578, 647795574.6671607, -4082003173.641316, 10774905663.51142, -
					15171875531.51559, 12053065338.62167, -5124939663.577472, 913311935.9512032, 67.5
				],
				[0.00337398766765, 111320.7020202162, 4481351.045890365, -23393751.19931662, 79682215.47186455, -
					115964993.2797253, 97236711.15602145, -43661946.33752821, 8477230.501135234, 52.5
				],
				[0.00220636496208, 111320.7020209128, 51751.86112841131, 3796837.749470245, 992013.7397791013, -
					1221952.21711287, 1340652.697009075, -620943.6990984312, 144416.9293806241, 37.5
				],
				[-0.0003441963504368392, 111320.7020576856, 278.2353980772752, 2485758.690035394, 6070.750963243378,
					54821.18345352118, 9540.606633304236, -2710.55326746645, 1405.483844121726, 22.5
				],
				[-0.0003218135878613132, 111320.7020701615, 0.00369383431289, 823725.6402795718, 0.46104986909093,
					2351.343141331292, 1.58060784298199, 8.77738589078284, 0.37238884252424, 7.45
				]
			],
			getDistanceByMC: function(Q, O) {
				if (!Q || !O) {
					return 0
				}
				var M;
				var P;
				var L;
				var N;
				Q = this.convertMC2LL(Q);
				if (!Q) {
					return 0
				}
				M = this.toRadians(Q.lng);
				P = this.toRadians(Q.lat);
				O = this.convertMC2LL(O);
				if (!O) {
					return 0
				}
				L = this.toRadians(O.lng);
				N = this.toRadians(O.lat);
				return this.getDistance(M, L, P, N)
			},
			getDistanceByLL: function(Q, O) {
				if (!Q || !O) {
					return 0
				}
				Q.lng = this.getLoop(Q.lng, -180, 180);
				Q.lat = this.getRange(Q.lat, -74, 74);
				O.lng = this.getLoop(O.lng, -180, 180);
				O.lat = this.getRange(O.lat, -74, 74);
				var M;
				var L;
				var P;
				var N;
				M = this.toRadians(Q.lng);
				P = this.toRadians(Q.lat);
				L = this.toRadians(O.lng);
				N = this.toRadians(O.lat);
				return this.getDistance(M, L, P, N)
			},
			convertMC2LL: function(M) {
				if (M === null || M === undefined) {
					return new w(0, 0)
				}
				var N;
				var P;
				N = new w(Math.abs(M.lng), Math.abs(M.lat));
				for (var O = 0; O < this.MCBAND.length; O++) {
					if (N.lat >= this.MCBAND[O]) {
						P = this.MC2LL[O];
						break
					}
				}
				var L = this.convertor(M, P);
				var M = new w(L.lng.toFixed(6), L.lat.toFixed(6));
				return M
			},
			convertLL2MC: function(L) {
				if (L === null || L === undefined) {
					return new w(0, 0)
				}
				if (L.lng > 180 || L.lng < -180 || L.lat > 90 || L.lat < -90) {
					return new w(0, 0)
				}
				var M;
				var O;
				L.lng = this.getLoop(L.lng, -180, 180);
				L.lat = this.getRange(L.lat, -74, 74);
				M = new w(L.lng, L.lat);
				for (var N = 0; N < this.LLBAND.length; N++) {
					if (M.lat >= this.LLBAND[N]) {
						O = this.LL2MC[N];
						break
					}
				}
				if (!O) {
					for (var N = 0; N < this.LLBAND.length; N++) {
						if (M.lat <= -this.LLBAND[N]) {
							O = this.LL2MC[N];
							break
						}
					}
				}
				var P = this.convertor(L, O);
				var L = new w(P.lng.toFixed(2), P.lat.toFixed(2));
				return L
			},
			convertor: function(N, O) {
				if (!N || !O) {
					return
				}
				var L = O[0] + O[1] * Math.abs(N.lng);
				var M = Math.abs(N.lat) / O[9];
				var P = O[2] + O[3] * M + O[4] * M * M + O[5] * M * M * M + O[6] * M * M * M * M + O[7] * M * M * M * M * M +
					O[8] * M * M * M * M * M * M;
				L *= (N.lng < 0 ? -1 : 1);
				P *= (N.lat < 0 ? -1 : 1);
				return new w(L, P)
			},
			getDistance: function(M, L, O, N) {
				return this.EARTHRADIUS * Math.acos((Math.sin(O) * Math.sin(N) + Math.cos(O) * Math.cos(N) * Math.cos(L - M)))
			},
			toRadians: function(L) {
				return Math.PI * L / 180
			},
			toDegrees: function(L) {
				return (180 * L) / Math.PI
			},
			getRange: function(N, M, L) {
				if (M != null) {
					N = Math.max(N, M)
				}
				if (L != null) {
					N = Math.min(N, L)
				}
				return N
			},
			getLoop: function(N, M, L) {
				while (N > L) {
					N -= L - M
				}
				while (N < M) {
					N += L - M
				}
				return N
			}
		});
		J.extend(r.prototype, {
			lngLatToMercator: function(L) {
				return r.convertLL2MC(L)
			},
			lngLatToPoint: function(L) {
				var M = r.convertLL2MC(L);
				return new j(M.lng, M.lat)
			},
			mercatorToLngLat: function(L) {
				return r.convertMC2LL(L)
			},
			pointToLngLat: function(L) {
				var M = new w(L.x, L.y);
				return r.convertMC2LL(M)
			},
			pointToPixel: function(M, Q, P, O, R) {
				if (!M) {
					return
				}
				M = this.lngLatToMercator(M, R);
				var N = this.getZoomUnits(Q);
				var L = Math.round((M.lng - P.lng) / N + O.width / 2);
				var S = Math.round((P.lat - M.lat) / N + O.height / 2);
				return new j(L, S)
			},
			pixelToPoint: function(L, T, P, N, M) {
				if (!L) {
					return
				}
				var S = this.getZoomUnits(T);
				var Q = P.lng + S * (L.x - N.width / 2);
				var O = P.lat - S * (L.y - N.height / 2);
				var R = new w(Q, O);
				return this.mercatorToLngLat(R, M)
			},
			getZoomUnits: function(L) {
				return Math.pow(2, (18 - L))
			}
		});
		u.httpUrl = {
			TILE_ONLINE_URLS: ["online0.map.bdimg.com", "online1.map.bdimg.com", "online2.map.bdimg.com",
				"online3.map.bdimg.com", "online4.map.bdimg.com"
			],
			baidumap: "map.baidu.com",
			main_domain_nocdn: {
				baidu: "api.map.baidu.com"
			},
			main_domain_cdn: {
				other: ["api.map.baidu.com"],
				baidu: ["api0.map.bdimg.com", "api1.map.bdimg.com", "api2.map.bdimg.com"]
			}
		};
		u.httpsUrl = {
			TILE_ONLINE_URLS: ["gss0.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv",
				"gss0.bdstatic.com/8bo_dTSlRMgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRcgBo1vgoIiO_jowehsv",
				"gss0.bdstatic.com/8bo_dTSlRsgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlQ1gBo1vgoIiO_jowehsv"
			],
			baidumap: "gsp0.baidu.com/80MWsjip0QIZ8tyhnq",
			main_domain_nocdn: {
				baidu: "gsp0.baidu.com/9_Q4sjOpB1gCo2Kml5_Y_D3",
				other: "api.map.baidu.com"
			},
			main_domain_cdn: {
				other: "api.map.baidu.com",
				baidu: ["gss0.bdstatic.com/9_Q4vHSd2RZ3otebn9fN2DJv", "gss0.baidu.com/9_Q4vXSd2RZ3otebn9fN2DJv",
					"gss0.bdstatic.com/9_Q4vnSd2RZ3otebn9fN2DJv"
				]
			}
		};
		u.urlType = {
			"0": {
				proto: "http://",
				domain: u.httpUrl
			},
			"1": {
				proto: "https://",
				domain: u.httpsUrl
			},
			"2": {
				proto: "https://",
				domain: u.httpsUrl
			}
		};
		if (window.BMAP_PROTOCOL && window.BMAP_PROTOCOL === "https") {
			window.HOST_TYPE = 2
		}
		u.urlStr = window.HOST_TYPE || "0";
		u.url = u.urlType[u.urlStr];
		u.mapUrl = u.url.proto + u.url.domain["baidumap"] + "/";
		u.apiUrl = u.url.proto + (u.urlStr == "2" ? u.url.domain["main_domain_nocdn"]["other"] : u.url.domain[
			"main_domain_nocdn"]["baidu"]) + "/";
		u.apiUrlCdn = u.url.proto + (u.urlStr == "2" ? u.url.domain["main_domain_cdn"]["other"] : u.url.domain[
			"main_domain_cdn"]["baidu"][0]) + "/";
		var o = {
			setPosition: function(N, L) {
				var M = N.style;
				M.left = L[0] + "px";
				M.top = L[1] + "px"
			},
			setUnSelectable: function(L) {
				L.style.MozUserSelect = "none"
			},
			isInDocument: function(L) {
				return L && L.parentNode && L.parentNode.nodeType != 11
			},
			beforeEndHTML: function(M, L) {
				J.dom.insertHTML(M, "beforeEnd", L);
				return M.lastChild
			},
			getPosition: function(L) {
				var M = {
					left: 0,
					top: 0
				};
				while (L && L.offsetParent) {
					M.left += L.offsetLeft;
					M.top += L.offsetTop;
					L = L.offsetParent
				}
				return M
			},
			stopBubble: function(L) {
				var L = window.event || L;
				L.stopPropagation ? L.stopPropagation() : L.cancelBubble = true
			},
			preventDefault: function(L) {
				var L = window.event || L;
				L.preventDefault ? L.preventDefault() : L.returnValue = false;
				return false
			},
			stopAndPrevent: function(L) {
				this.stopBubble(L);
				return this.preventDefault(L)
			},
			getScroll: function() {
				var L = document.documentElement,
					M = document.body;
				if (L && (L.scrollTop || L.scrollLeft)) {
					return [L.scrollTop, L.scrollLeft]
				} else {
					if (M) {
						return [M.scrollTop, M.scrollLeft]
					} else {
						return [0, 0]
					}
				}
			},
			getDistanceByPixel: function(M, L) {
				if (!M || !L) {
					return
				}
				return Math.round(Math.sqrt(Math.pow(M.x - L.x, 2) + Math.pow(M.y - L.y, 2)))
			},
			create: function(M, L, N) {
				var O = document.createElement(M);
				if (N) {
					O = document.createElementNS(N, M)
				}
				return J.dom.setAttrs(O, L || {})
			},
			getCurrentStyle: function(L) {
				if (L.currentStyle) {
					return L.currentStyle
				} else {
					if (L.ownerDocument && L.ownerDocument.defaultView) {
						return L.ownerDocument.defaultView.getComputedStyle(L, null)
					}
				}
			},
			isDefined: function(L) {
				return typeof L != "undefined"
			},
			isSupportCanvas: function() {
				if (typeof this.isSupportCanvas.result != "boolean") {
					this.isSupportCanvas.result = !!this.create("canvas").getContext
				}
				return this.isSupportCanvas.result
			},
			getCurrentTime: function() {
				return (new Date).getTime()
			},
			isAndroid23More: function() {
				if (J.platform.isAndroid && parseFloat(J.platform.android) > 2.3) {
					return true
				}
				return false
			},
			canUseTranslate3d: function() {
				if (typeof this.canUseTranslate3d.result !== "boolean") {
					this.canUseTranslate3d.result = o.isAndroid23More() || J.platform.isIphone
				}
				return this.canUseTranslate3d.result
			},
			css3TransformDom: function(P, M, Q, O) {
				var L = "";
				if (O !== undefined) {
					L = " scale(" + O + ")"
				}
				var N = "";
				if (this.canUseTranslate3d()) {
					N = "translate3d(" + M + "px," + Q + "px,0px)"
				} else {
					N = "translate(" + M + "px," + Q + "px)"
				}
				P.style.WebkitTransform = N + L
			},
			request: function(O, L) {
				if (L) {
					var N = (Math.random() * 100000).toFixed(0);
					u._rd["_cbk" + N] = function(P) {
						L && L(P);
						delete u._rd["_cbk" + N]
					};
					O += "&callback=BMap._rd._cbk" + N
				}
				var M = this.create("script", {
					src: O,
					type: "text/javascript",
					charset: "utf-8"
				});
				M.addEventListener("load", function(Q) {
					var P = Q.target;
					P.parentNode.removeChild(P)
				}, false);
				document.getElementsByTagName("head")[0].appendChild(M);
				M = null
			}
		};
		function v(O) {
			var L = {
				duration: 1000,
				fps: 30,
				delay: 0,
				transition: i.linear,
				onStop: function() {}
			};
			this._anis = [];
			if (O) {
				for (var M in O) {
					L[M] = O[M]
				}
			}
			this._opts = L;
			if (J.lang.isNumber(L.delay)) {
				var N = this;
				setTimeout(function() {
					N.start()
				}, L.delay)
			} else {
				if (L.delay != v.INFINITE) {
					this.start()
				}
			}
		}
		v.INFINITE = "INFINITE";
		v.prototype.start = function() {
			if (window.requestAnimationFrame) {
				var L = this;
				L._timer = window.requestAnimationFrame(function(M) {
					L._loop(M)
				})
			} else {
				this._beginTime = o.getCurrentTime();
				this._endTime = this._beginTime + this._opts.duration;
				this._loop()
			}
		};
		v.prototype._loop = function() {
			var M = this;
			var L = o.getCurrentTime();
			if (!this._beginTime) {
				this._beginTime = L;
				this._endTime = this._beginTime + this._opts.duration
			}
			if (L >= M._endTime) {
				if (J.lang.isFunction(M._opts.render)) {
					M._opts.render(M._opts.transition(1))
				}
				if (J.lang.isFunction(M._opts.finish)) {
					M._opts.finish()
				}
				return
			}
			M.schedule = M._opts.transition((L - M._beginTime) / M._opts.duration);
			if (J.lang.isFunction(M._opts.render)) {
				M._opts.render(M.schedule)
			}
			if (!M.terminative) {
				if (window.requestAnimationFrame) {
					M._timer = requestAnimationFrame(function(N) {
						M._loop(N)
					})
				} else {
					M._timer = setTimeout(function() {
						M._loop()
					}, 1000 / M._opts.fps)
				}
			}
		};
		v.prototype.stop = function(M) {
			this.terminative = true;
			for (var L = 0; L < this._anis.length; L++) {
				this._anis[L].stop();
				this._anis[L] = null
			}
			this._anis.length = 0;
			if (this._timer) {
				if (window.cancelAnimationFrame) {
					cancelAnimationFrame(this._timer)
				} else {
					clearTimeout(this._timer)
				}
				this._timer = null
			}
			this._opts.onStop(this.schedule);
			if (M) {
				this._endTime = this._beginTime;
				this._loop()
			}
		};
		var i = {
			linear: function(L) {
				return L
			},
			reverse: function(L) {
				return 1 - L
			},
			easeInQuad: function(L) {
				return L * L
			},
			easeInCubic: function(L) {
				return Math.pow(L, 3)
			},
			easeOutQuad: function(L) {
				return -(L * (L - 2))
			},
			easeOutCubic: function(L) {
				return Math.pow((L - 1), 3) + 1
			},
			easeInOutQuad: function(L) {
				if (L < 0.5) {
					return L * L * 2
				} else {
					return -2 * (L - 2) * L - 1
				}
				return
			},
			easeInOutCubic: function(L) {
				if (L < 0.5) {
					return Math.pow(L, 3) * 4
				} else {
					return Math.pow(L - 1, 3) * 4 + 1
				}
			},
			easeInOutSine: function(L) {
				return (1 - Math.cos(Math.PI * L)) / 2
			}
		};
		i["ease-in"] = i.easeInQuad;
		i["ease-out"] = i.easeOutQuad;
		function j(L, M) {
			this.x = L || 0;
			this.y = M || 0
		}
		j.prototype.equals = function(L) {
			return L && L.x == this.x && L.y == this.y
		};
		function d(M, L) {
			this.width = M || 0;
			this.height = L || 0
		}
		d.prototype.equals = function(L) {
			return L && this.width == L.width && this.height == L.height
		};
		var B = 0;
		function p() {}
		J.object.extend(p, {
			Request: {
				INITIAL: -1,
				WAITING: 0,
				COMPLETED: 1
			},
			getDependency: function() {
				return {
					opmb: [],
					control: [],
					marker: [],
					massfeatures: []
				}
			},
			Config: {
				_baseUrl: "http://api.map.baidu.com/getmodules?type=lite"
			},
			delayFlag: false,
			ModuleTree: {
				_modules: {},
				_arrMdls: []
			},
			load: function(N, P, M) {
				var L = this.getModule(N);
				if (L._status == this.Request.COMPLETED) {
					if (M) {
						P && P()
					}
					return
				} else {
					if (L._status == this.Request.INITIAL) {
						this.combine(N);
						this.pushUniqueMdl(N);
						var O = this;
						if (O.delayFlag == false) {
							O.delayFlag = true;
							window.setTimeout(function() {
								var W = O.ModuleTree._arrMdls.slice(0);
								var Y = [];
								for (var S = 0, R = W.length; S < R; S++) {
									var X = W[S],
										Q = A.asyncMdlVer[X],
										U = "async_" + X + "_" + Q;
									if (!A.chkVersion(U)) {
										W[W[S]] = "";
										Y.push(X + "_" + Q)
									} else {
										W[W[S]] = A.getVersion(U)
									}
								}
								if (Y.length == 0) {
									for (var S = 0, R = W.length; S < R; S++) {
										var Z = W[S],
											U = "async_" + Z + "_" + A.asyncMdlVer[Z],
											V = A.getVersion(U);
										p.run(Z, V)
									}
								} else {
									var T = O.Config._baseUrl + "&mod=" + Y.join(",") + "&sendSequenceNum=" + B + "&v=1.0";
									o.request(T);
									window["sendSequenceNum" + B] = W;
									B++
								}
								O.delayFlag = false;
								O.ModuleTree._arrMdls.length = 0
							}, 1)
						}
						L._status = this.Request.WAITING
					}
					L._callbacks.push(P)
				}
			},
			combine: function(L) {
				var N = this.getDependency();
				if (L && N[L]) {
					var N = N[L];
					for (var M = 0; M < N.length; M++) {
						this.combine(N[M]);
						if (!this.ModuleTree._modules[N[M]]) {
							this.pushUniqueMdl(N[M])
						}
					}
				}
			},
			pushUniqueMdl: function(O) {
				var L = this.ModuleTree._arrMdls;
				for (var N = 0, M = L.length; N < M; N++) {
					if (L[N] == O) {
						return
					}
				}
				L.push(O)
			},
			getModule: function(M) {
				var L;
				if (!this.ModuleTree._modules[M]) {
					this.ModuleTree._modules[M] = {};
					this.ModuleTree._modules[M]._status = this.Request.INITIAL;
					this.ModuleTree._modules[M]._callbacks = []
				}
				L = this.ModuleTree._modules[M];
				return L
			},
			run: function(O, R) {
				var M = "async_" + O + "_" + A.asyncMdlVer[O],
					Q = "async_" + O;
				if (!A.chkVersion(M)) {
					A.saveVersion(M, R, Q)
				}
				var N = this.getModule(O);
				try {
					eval(R)
				} catch (S) {
					return
				}
				N._status = this.Request.COMPLETED;
				for (var P = 0, L = N._callbacks.length; P < L; P++) {
					N._callbacks[P]()
				}
				N._callbacks.length = 0
			}
		});
		window._jsload = function(Q, S, R) {
			var L = window["sendSequenceNum" + R],
				N = Q.split("_")[0];
			L[N] = S;
			var P = true;
			for (var O = 0, M = L.length; O < M; O++) {
				if (L[L[O]].length <= 0) {
					P = false;
					break
				}
			}
			if (P) {
				for (var O = 0, M = L.length; O < M; O++) {
					var Q = L[O],
						S = L[Q];
					p.run(Q, S)
				}
				L.length = 0;
				delete window["sendSequenceNum" + R]
			}
		};
		var A = {
			asyncMdlVer: {
				control: "ldhxzj",
				marker: "01zsya",
				opmb: "dt2tyx",
				massfeatures: "j0omg2"
			},
			chkVersion: function(L) {
				try {
					var M = window.localStorage;
					if (!M) {
						return false
					}
					return M[L] && M[L].length > 0
				} catch (N) {
					return false
				}
			},
			saveVersion: function(L, R, P) {
				try {
					var N = window.localStorage;
					if (N) {
						for (var M = N.length, O = M - 1; O >= 0; O--) {
							var S = N.key(O);
							if (S.indexOf(P) > -1) {
								N.removeItem(S)
							}
						}
						N.setItem(L, R)
					}
				} catch (Q) {}
			},
			getVersion: function(L) {
				try {
					var M = window.localStorage;
					if (!M) {
						return ""
					}
					return M.getItem(L)
				} catch (N) {
					return ""
				}
			}
		};
		void
		function(N, L, M) {
			void
			function(Y, ay, aa) {
				var av = "alog";
				var W = aa[av];
				if (W && W.defined) {
					return
				}
				var am = ay.all && Y.attachEvent,
					ar, R = (W && W.l) || +new Date,
					ac = Y.logId || (+new Date).toString(36) + Math.random().toString(36).substr(2, 3),
					ae = 0,
					ag = {},
					ak = function(aF) {
						var aA = arguments;
						var az, aC, aE, aD;
						if (aF == "define" || aF == "require") {
							for (var aB = 1; aB < aA.length; aB++) {
								switch (typeof aA[aB]) {
									case "string":
										az = aA[aB];
										break;
									case "object":
										aE = aA[aB];
										break;
									case "function":
										aD = aA[aB];
										break
								}
							}
							if (aF == "require") {
								if (az && !aE) {
									aE = [az]
								}
								az = null
							}
							az = !az ? "#" + (ae++) : az;
							aC = ah[az] = (ah[az] || {});
							if (!aC.defined) {
								aC.name = az;
								aC.requires = aE;
								aC.creator = aD;
								if (aF == "define") {
									aC.defining = true
								}
								ab(aC)
							}
							return
						}
						if (typeof aF == "function") {
							aF(ak);
							return
						}
						String(aF).replace(/^(?:([\w$_]+)\.)?(\w+)$/, function(aG, aH, aI) {
							aA[0] = aI;
							Z.apply(ak.tracker(aH), aA)
						})
					},
					aq = {},
					S = {},
					ah = {
						alog: {
							name: "alog",
							defined: true,
							instance: ak
						}
					},
					an;
				function au(az) {
					var aB = P.get("alias") || {};
					var aC = aB[az] || (az + ".js");
					if (ag[aC]) {
						return
					}
					ag[aC] = true;
					var aA = "script";
					var aE = ay.createElement(aA);
					var aD = ay.getElementsByTagName(aA)[0];
					aE.async = !0;
					aE.src = aC;
					aD.parentNode.insertBefore(aE, aD)
				}
				function ab(aB) {
					if (aB.defined) {
						return
					}
					var aF = true;
					var aE = [];
					var aC = aB.requires;
					for (var aA = 0; aC && aA < aC.length; aA++) {
						var az = aC[aA];
						var aD = ah[az] = (ah[az] || {});
						if (aD.defined || aD == aB) {
							aE.push(aD.instance)
						} else {
							aF = false;
							if (!aD.defining) {
								au(az)
							}
							aD.waiting = aD.waiting || {};
							aD.waiting[aB.name] = aB
						}
					}
					if (aF) {
						aB.defined = true;
						if (aB.creator) {
							aB.instance = aB.creator.apply(aB, aE)
						}
						ao(aB)
					}
				}
				function ao(az) {
					for (var aA in az.waiting) {
						ab(az.waiting[aA])
					}
				}
				function V(az) {
					return (az || new Date) - R
				}
				function aj(aB, az, aC) {
					if (!aB) {
						return
					}
					if (typeof aB == "string") {
						aC = az;
						az = aB;
						aB = ak
					}
					try {
						if (aB == ak) {
							aq[az] = aq[az] || [];
							aq[az].unshift(aC);
							return
						}
						if (aB.addEventListener) {
							aB.addEventListener(az, aC, false)
						} else {
							if (aB.attachEvent) {
								aB.attachEvent("on" + az, aC)
							}
						}
					} catch (aA) {}
				}
				function al(aC, az, aE) {
					if (!aC) {
						return
					}
					if (typeof aC == "string") {
						aE = az;
						az = aC;
						aC = ak
					}
					try {
						if (aC == ak) {
							var aD = aq[az];
							if (!aD) {
								return
							}
							var aB = aD.length;
							while (aB--) {
								if (aD[aB] === aE) {
									aD.splice(aB, 1)
								}
							}
							return
						}
						if (aC.removeEventListener) {
							aC.removeEventListener(az, aE, false)
						} else {
							aC.detachEvent && aC.detachEvent("on" + az, aE)
						}
					} catch (aA) {}
				}
				function af(aB) {
					var aE = aq[aB],
						az = 0;
					if (!aE) {
						return
					}
					var aA = [];
					var aC = arguments;
					for (var aD = 1; aD < aC.length; aD++) {
						aA.push(aC[aD])
					}
					var aD = aE.length;
					while (aD--) {
						if (aE[aD].apply(this, aA)) {
							az++
						}
					}
					return az
				}
				function ax(aB, aD) {
					if (!aB || !aD) {
						return
					}
					var aE = new Image(1, 1),
						az = [],
						aA = "img_" + (+new Date);
					for (var aC in aD) {
						if (aD[aC]) {
							az.push(aC + "=" + encodeURIComponent(aD[aC]))
						}
					}
					ak[aA] = aE;
					aE.onload = aE.onerror = function() {
						ak[aA] = aE = aE.onload = aE.onerror = null;
						delete ak[aA]
					};
					aE.src = aB + "?" + az.join("&")
				}
				function X(aA, aB) {
					if (!aA) {
						return aB
					}
					var az = {};
					for (var aC in aB) {
						if (aA[aC] !== null) {
							az[aA[aC] || aC] = aB[aC]
						}
					}
					return az
				}
				function Z() {
					var aA = arguments;
					var aE = aA[0];
					if (this.created || /^(on|un|set|get|create)$/.test(aE)) {
						var aC = ai.prototype[aE];
						var aD = [];
						for (var aB = 1, az = aA.length; aB < az; aB++) {
							aD.push(aA[aB])
						}
						if (typeof aC == "function") {
							aC.apply(this, aD)
						}
					} else {
						this.argsList.push(aA)
					}
				}
				function ap(aB, aA) {
					var az = {};
					for (var aC in aB) {
						if (aB.hasOwnProperty(aC)) {
							az[aC] = aB[aC]
						}
					}
					for (var aC in aA) {
						if (aA.hasOwnProperty(aC)) {
							az[aC] = aA[aC]
						}
					}
					return az
				}
				function ai(az) {
					this.name = az;
					this.fields = {
						protocolParameter: {
							postUrl: null,
							protocolParameter: null
						}
					};
					this.argsList = [];
					this["alog"] = ak
				}
				function Q(aC) {
					var az;
					aC = aC || "default";
					if (aC == "*") {
						az = [];
						for (var aB in S) {
							az.push(S[aB])
						}
						return az
					}
					var aA = S[aC];
					if (!aA) {
						aA = S[aC] = new ai(aC)
					}
					return aA
				}
				ai.prototype.start = ai.prototype.create = function(az) {
					if (this.created) {
						return
					}
					if (typeof az == "object") {
						this.set(az)
					}
					this.created = new Date;
					this.fire("create", this);
					var aA;
					while (aA = this.argsList.shift()) {
						Z.apply(this, aA)
					}
				};
				ai.prototype.send = function(aC, aA) {
					var aB = ap({
						ts: V().toString(36),
						t: aC,
						sid: ac
					}, this.fields);
					if (typeof aA == "object") {
						aB = ap(aB, aA)
					} else {
						var az = arguments;
						switch (aC) {
							case "pageview":
								if (az[1]) {
									aB.page = az[1]
								}
								if (az[2]) {
									aB.title = az[2]
								}
								break;
							case "event":
								if (az[1]) {
									aB.eventCategory = az[1]
								}
								if (az[2]) {
									aB.eventAction = az[2]
								}
								if (az[3]) {
									aB.eventLabel = az[3]
								}
								if (az[4]) {
									aB.eventValue = az[4]
								}
								break;
							case "timing":
								if (az[1]) {
									aB.timingCategory = az[1]
								}
								if (az[2]) {
									aB.timingVar = az[2]
								}
								if (az[3]) {
									aB.timingValue = az[3]
								}
								if (az[4]) {
									aB.timingLabel = az[4]
								}
								break;
							case "exception":
								if (az[1]) {
									aB.exDescription = az[1]
								}
								if (az[2]) {
									aB.exFatal = az[2]
								}
								break;
							default:
								return
						}
					}
					this.fire("send", aB);
					ax(this.fields.postUrl, X(this.fields.protocolParameter, aB))
				};
				ai.prototype.set = function(az, aA) {
					if (typeof az == "string") {
						if (az == "protocolParameter") {
							aA = ap({
								postUrl: null,
								protocolParameter: null
							}, aA)
						}
						this.fields[az] = aA
					} else {
						if (typeof az == "object") {
							for (var aB in az) {
								this.set(aB, az[aB])
							}
						}
					}
				};
				ai.prototype.get = function(aA, aB) {
					var az = this.fields[aA];
					if (typeof aB == "function") {
						aB(az)
					}
					return az
				};
				ai.prototype.fire = function(az, aA) {
					return ak.fire(this.name + "." + az, aA)
				};
				ai.prototype.on = function(az, aA) {
					ak.on(this.name + "." + az, aA)
				};
				ai.prototype.un = function(az, aA) {
					ak.un(this.name + "." + az, aA)
				};
				ak.name = "alog";
				ak.sid = ac;
				ak.defined = true;
				ak.timestamp = V;
				ak.un = al;
				ak.on = aj;
				ak.fire = af;
				ak.tracker = Q;
				ak("init");
				var O = ai.prototype;
				s(O, {
					start: O.start,
					create: O.create,
					send: O.send,
					set: O.set,
					get: O.get,
					on: O.on,
					un: O.un,
					fire: O.fire
				});
				var P = Q();
				P.set("protocolParameter", {
					alias: null
				});
				if (W) {
					var ad = [].concat(W.p || [], W.q || []);
					W.p = W.q = null;
					for (var at in ak) {
						if (ak.hasOwnProperty(at)) {
							W[at] = ak[at]
						}
					}
					ak.p = ak.q = {
						push: function(az) {
							ak.apply(ak, az)
						}
					};
					for (var aw = 0; aw < ad.length; aw++) {
						ak.apply(ak, ad[aw])
					}
				}
				aa[av] = ak;
				if (am) {
					aj(ay, "mouseup", function(aA) {
						var az = aA.target || aA.srcElement;
						if (az.nodeType == 1 && /^ajavascript:/i.test(az.tagName + az.href)) {
							ar = new Date
						}
					})
				}
				function T() {
					if (am && (new Date - ar < 50)) {
						return
					}
					if (an) {
						return
					}
					an = true;
					var az = 0;
					for (var aB in S) {
						var aA = S[aB];
						if (aA.created) {
							az += aA.fire("unload")
						}
					}
					if (az) {
						var aC = new Date;
						while (new Date - aC < 100) {}
					}
				}
				var U = false;
				Y.onerror = function(aD, aB, az, aC) {
					var aA = true;
					if (!aB && /^script error/i.test(aD)) {
						if (U) {
							aA = false
						} else {
							U = true
						}
					}
					if (aA) {
						aa.alog("exception.send", "exception", {
							msg: aD,
							js: aB,
							ln: az,
							col: aC
						})
					}
					return false
				};
				aa.alog("exception.on", "catch", function(az) {
					aa.alog("exception.send", "exception", {
						msg: az.msg,
						js: az.path,
						ln: az.ln,
						method: az.method,
						flag: "catch"
					})
				})
			}(N, L, M);
			void
			function(aa, ba, bj) {
				var at = "18_5";
				var aF = {
					product: "18",
					page: at,
					monkey_page: "",
					speed_page: "",
					monkey: {
						sample: "0.1"
					},
					exception: {
						sample: "0.1"
					},
					cus: {
						sample: "0.1"
					},
					feature: {
						sample: "0"
					}
				};
				var aE = "http://fex.bdstatic.com";
				var Y = "http://static.tieba.baidu.com";
				var Q = Y;
				if (aa.location.protocol === "https:") {
					aE = "https://fex.bdstatic.com";
					Y = "https://gsp0.baidu.com/5aAHeD3nKhI2p27j8IqW0jdnxx1xbK";
					Q = Y
				}
				var ab = aF.product;
				var aJ = aF.page;
				var aZ = aF.monkey_page;
				var aT = aF.speed_page;
				var V = Math.random;
				var az = Y + "/tb/pms/img/st.gif";
				var ae = az;
				var aA = aF.monkey;
				var av = aF.exception;
				var ai = aF.cus;
				var aG = aF.feature;
				if (aA && aA.sample && V() < aA.sample) {
					var R = bj.alog.tracker("monkey");
					var aM;
					var X = aa.screen;
					var bh = ba.referrer;
					R.set("ver", 5);
					R.set("pid", 241);
					if (X) {
						R.set("px", X.width + "*" + X.height)
					}
					R.set("ref", bh);
					bj.alog("monkey.on", "create", function() {
						aM = bj.alog.timestamp;
						R.set("protocolParameter", {
							reports: null
						})
					});
					bj.alog("monkey.on", "send", function(bl) {
						if (bl.t == "pageview") {
							bl.cmd = "open"
						}
						if (bl.now) {
							bl.ts = aM(bl.now).toString(36);
							bl.now = ""
						}
					});
					bj.alog("monkey.create", {
						page: aJ,
						pid: "241",
						p: ab,
						dv: 6,
						postUrl: ae,
						reports: {
							refer: 1
						}
					});
					bj.alog("monkey.send", "pageview", {
						now: +new Date
					})
				}
				if (av && av.sample && V() < av.sample) {
					var ap = false;
					aa.onerror = function(bp, bn, bl, bo) {
						var bm = true;
						if (!bn && /^script error/i.test(bp)) {
							if (ap) {
								bm = false
							} else {
								ap = true
							}
						}
						if (bm) {
							bj.alog("exception.send", "exception", {
								msg: bp,
								js: bn,
								ln: bl,
								col: bo
							})
						}
						return false
					};
					bj.alog("exception.on", "catch", function(bl) {
						bj.alog("exception.send", "exception", {
							msg: bl.msg,
							js: bl.path,
							ln: bl.ln,
							method: bl.method,
							flag: "catch"
						})
					});
					bj.alog("exception.create", {
						postUrl: ae,
						dv: 7,
						page: aZ ? aZ : aJ,
						pid: "170",
						p: ab
					})
				}
				if (ai && ai.sample && V() < ai.sample) {
					bj.alog("cus.on", "time", function(bo) {
						var bn = {};
						var bl = false;
						var bp;
						if (bo.toString() !== "[object Object]") {
							return
						}
						for (var bm in bo) {
							if (bm == "page") {
								bn.page = bo[bm];
								continue
							}
							bp = parseInt(bo[bm]);
							if (bp > 0 && /^z_/.test(bm)) {
								bl = true;
								bn[bm] = bp
							}
						}
						if (bl) {
							bj.alog("cus.send", "time", bn)
						}
					});
					bj.alog("cus.on", "count", function(bo) {
						var bn = {};
						var bl = false;
						if (typeof bo === "string") {
							bo = [bo]
						}
						if (bo instanceof Array) {
							for (var bm = 0; bm < bo.length; bm++) {
								if (/^z_/.test(bo[bm])) {
									bl = true;
									bn[bo[bm]] = 1
								} else {
									if (/^page:/.test(bo[bm])) {
										bn.page = bo[bm].substring(5)
									}
								}
							}
						}
						if (bl) {
							bj.alog("cus.send", "count", bn)
						}
					});
					bj.alog("cus.create", {
						dv: 3,
						postUrl: az,
						page: aJ,
						p: ab
					})
				}
				if (aG && aG.sample && V() < aG.sample) {
					var a8 = ["Moz", "O", "ms", "Webkit"];
					var ar = ["-webkit-", "-moz-", "-o-", "-ms-"];
					var aC = function() {
						if (typeof ba.createElement !== "function") {
							return ba.createElement(arguments[0])
						} else {
							return ba.createElement.apply(ba, arguments)
						}
					};
					var bf = {
						elem: aC("dpFeatureTest")
					};
					var ac = {
						style: bf.elem.style
					};
					function an(bm, bl) {
						return typeof bm === bl
					}
					function U(bm, bp, bo) {
						var bn;
						for (var bl in bm) {
							if (bm[bl] in bp) {
								if (bo === false) {
									return bm[bl]
								}
								bn = bp[bm[bl]];
								if (an(bn, "function")) {
									return fnBind(bn, bo || bp)
								}
								return bn
							}
						}
						return false
					}
					function aj(bn, bl, bm) {
						return bd(bn, undefined, undefined, bl, bm)
					}
					function bd(br, bl, bo, bp, bq) {
						var bm = br.charAt(0).toUpperCase() + br.slice(1),
							bn = (br + " " + a8.join(bm + " ") + bm).split(" ");
						if (an(bl, "string") || an(bl, "undefined")) {
							return aO(bn, bl, bp, bq)
						} else {
							bn = (br + " " + (a8).join(bm + " ") + bm).split(" ");
							return U(bn, bl, bo)
						}
					}
					function aO(bp, bn, bs, bq) {
						bq = an(bq, "undefined") ? false : bq;
						var bt, bo, bl, bm, br;
						bl = bp.length;
						for (bo = 0; bo < bl; bo++) {
							bm = bp[bo];
							br = ac.style[bm];
							if (!!~("" + bm).indexOf("-")) {
								bm = al(bm)
							}
							if (ac.style[bm] !== undefined) {
								return bn == "pfx" ? bm : true
							}
						}
						return false
					}
					function al(bl) {
						return bl.replace(/([a-z])-([a-z])/g, function(bo, bn, bm) {
							return bn + bm.toUpperCase()
						}).replace(/^-/, "")
					}
					var ax = function(bn, bm, bl) {
						if (bn.indexOf("@") === 0) {
							return atRule(bn)
						}
						if (bn.indexOf("-") != -1) {
							bn = al(bn)
						}
						if (!bm) {
							return bd(bn, "pfx")
						} else {
							return bd(bn, bm, bl)
						}
					};
					function a4() {
						var bl = aC("canvas");
						return !!(bl.getContext && bl.getContext("2d"))
					}
					function aV() {
						var bl = aC("div");
						return ("draggable" in bl) || ("ondragstart" in bl && "ondrop" in bl)
					}
					function ah() {
						var bl = "localStorage";
						try {
							localStorage.setItem(bl, bl);
							localStorage.removeItem(bl);
							return true
						} catch (bm) {
							return false
						}
					}
					function aL() {
						return "content" in ba.createElement("template")
					}
					function aX() {
						return "createShadowRoot" in ba.createElement("a")
					}
					function aS() {
						return "registerElement" in ba
					}
					function O() {
						return "import" in ba.createElement("link")
					}
					function T() {
						return "getItems" in ba
					}
					function aq() {
						return "EventSource" in window
					}
					function a7(bn, bo) {
						var bl = {
							lossy: "UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",
							lossless: "UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",
							alpha: "UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",
							animation: "UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"
						};
						var bm = new Image();
						bm.onload = function() {
							var bp = (bm.width > 0) && (bm.height > 0);
							bo(bn, bp)
						};
						bm.onerror = function() {
							bo(bn, false)
						};
						bm.src = "data:image/webp;base64," + bl[bn]
					}
					function bi(bm, bl) {
						ag.f["WebP-" + bm] = bl;
						return bl
					}
					function aY() {
						return "openDatabase" in aa
					}
					function a3() {
						return "performance" in aa && "timing" in aa.performance
					}
					function be() {
						return "performance" in aa && "mark" in aa.performance
					}
					function aB() {
						return !!(Array.prototype && Array.prototype.every && Array.prototype.filter && Array.prototype.forEach &&
							Array.prototype.indexOf && Array.prototype.lastIndexOf && Array.prototype.map && Array.prototype.some &&
							Array.prototype.reduce && Array.prototype.reduceRight && Array.isArray)
					}
					function ad() {
						return "Promise" in aa && "cast" in aa.Promise && "resolve" in aa.Promise && "reject" in aa.Promise && "all" in
							aa.Promise && "race" in aa.Promise && (function() {
								var bl;
								new aa.Promise(function(bm) {
									bl = bm
								});
								return typeof bl === "function"
							}())
					}
					function ao() {
						var bl = !!(aa.ProgressEvent);
						var bm = !!(aa.FormData);
						var bn = aa.XMLHttpRequest && "withCredentials" in new XMLHttpRequest;
						return bl && bm && bn
					}
					function aN() {
						return "geolocation" in navigator
					}
					function ay() {
						var bm = aC("canvas");
						var bl = "probablySupportsContext" in bm ? "probablySupportsContext" : "supportsContext";
						if (bl in bm) {
							return bm[bl]("webgl") || bm[bl]("experimental-webgl")
						}
						return "WebGLRenderingContext" in aa
					}
					function aI() {
						return !!ba.createElementNS && !!ba.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect
					}
					function a5() {
						return !!aa.Worker
					}
					function a1() {
						return "WebSocket" in aa && aa.WebSocket.CLOSING === 2
					}
					function aQ() {
						var bl = ba.createElement("video");
						return !!bl.canPlayType
					}
					function am() {
						var bl = ba.createElement("audio");
						return !!bl.canPlayType
					}
					function aW() {
						return !!(aa.history && "pushState" in aa.history)
					}
					function aH() {
						return !!(aa.File && aa.FileReader)
					}
					function aK() {
						return "postMessage" in window
					}
					function aP() {
						return !!aa.webkitNotifications || ("Notification" in aa && "permission" in aa.Notification &&
							"requestPermission" in aa.Notification)
					}
					function aD() {
						var bn = ["webkit", "moz", "o", "ms"];
						var bm = aa.requestAnimationFrame;
						for (var bl = 0; bl < bn.length && !bm; ++bl) {
							bm = aa[bn[bl] + "RequestAnimationFrame"]
						}
						return !!bm
					}
					function aR() {
						return "JSON" in aa && "parse" in JSON && "stringify" in JSON
					}
					function a6() {
						return !!(ax("exitFullscreen", ba, false) || ax("cancelFullScreen", ba, false))
					}
					function ak() {
						return !!ax("Intl", aa)
					}
					function a0() {
						return aj("flexBasis", "1px", true)
					}
					function a2() {
						return !!aj("perspective", "1px", true)
					}
					function au() {
						return aj("shapeOutside", "content-box", true)
					}
					function bk() {
						var bl = aC("div");
						bl.style.cssText = ar.join("filter:blur(2px); ");
						return !!bl.style.length && ((ba.documentMode === undefined || ba.documentMode > 9))
					}
					function Z() {
						return "XMLHttpRequest" in aa && "withCredentials" in new XMLHttpRequest()
					}
					function W() {
						return aC("progress").max !== undefined
					}
					function aU() {
						return aC("meter").max !== undefined
					}
					function bc() {
						return "sendBeacon" in navigator
					}
					function a9() {
						return aj("borderRadius", "0px", true)
					}
					function P() {
						return aj("boxShadow", "1px 1px", true)
					}
					function S() {
						var bm = aC("div");
						var bl = bm.style;
						bl.cssText = ar.join("opacity:.55;");
						return (/^0.55$/).test(bl.opacity)
					}
					function bb() {
						return aO(["textShadow"], undefined, "1px 1px")
					}
					function af() {
						return aj("animationName", "a", true)
					}
					function aw() {
						return aj("transition", "all", true)
					}
					function bg() {
						return navigator.userAgent.indexOf("Android 2.") === -1 && aj("transform", "scale(1)", true)
					}
					var ag = {
						f: {},
						t: function(bl, bn, bm) {
							this.f[bl] = bn.apply(this, [].slice.call(arguments, 2))
						},
						c: function(bm, bl) {
							bm.apply(this, [].slice.call(arguments, 1))
						},
						runAllTest: function() {
							var bl = this;
							bl.t("bdrs", a9);
							bl.t("bxsd", P);
							bl.t("opat", S);
							bl.t("txsd", bb);
							bl.t("anim", af);
							bl.t("trsi", aw);
							bl.t("trfm", bg);
							bl.t("flex", a0);
							bl.t("3dtr", a2);
							bl.t("shpe", au);
							bl.t("fltr", bk);
							bl.t("cavs", a4);
							bl.t("dgdp", aV);
							bl.t("locs", ah);
							bl.t("wctem", aL);
							bl.t("wcsdd", aX);
							bl.t("wccse", aS);
							bl.t("wchti", O);
							bl.c(a7, "lossy", bi);
							bl.c(a7, "lossless", bi);
							bl.c(a7, "alpha", bi);
							bl.c(a7, "animation", bi);
							bl.t("wsql", aY);
							bl.t("natm", a3);
							bl.t("ustm", be);
							bl.t("arra", aB);
							bl.t("prms", ad);
							bl.t("xhr2", ao);
							bl.t("wbgl", ay);
							bl.t("geol", aN);
							bl.t("svg", aI);
							bl.t("work", a5);
							bl.t("wbsk", a1);
							bl.t("vido", aQ);
							bl.t("audo", am);
							bl.t("hsty", aW);
							bl.t("file", aH);
							bl.t("psmg", aK);
							bl.t("wknf", aP);
							bl.t("rqaf", aD);
							bl.t("json", aR);
							bl.t("flsc", a6);
							bl.t("i18n", ak);
							bl.t("cors", Z);
							bl.t("prog", W);
							bl.t("metr", aU);
							bl.t("becn", bc);
							bl.t("mcrd", T);
							bl.t("esrc", aq)
						}
					};
					var R = bj.alog.tracker("feature");
					R.on("commit", function() {
						ag.runAllTest();
						var bl = setInterval(function() {
							if ("WebP-lossy" in ag.f && "WebP-lossless" in ag.f && "WebP-alpha" in ag.f && "WebP-animation" in ag.f) {
								for (var bm in ag.f) {
									ag.f[bm] = ag.f[bm] ? "y" : "n"
								}
								R.send("feature", ag.f);
								clearInterval(bl)
							}
						}, 500)
					});
					bj.alog("feature.create", {
						dv: 4,
						postUrl: az,
						page: aZ ? aZ : aJ,
						p: ab
					});
					bj.alog("feature.fire", "commit")
				}
			}(N, L, M)
		}(window, document, u);
		u._alog = u.alog || function() {};
		u.alog("cus.fire", "count", "z_loadscriptcount");
		if (location.protocol === "https:") {
			u.alog("cus.fire", "count", "z_httpscount")
		}
		function s(L, M) {
			for (var N in M) {
				L[N] = M[N]
			}
		}
		function c(L) {
			this.map = L;
			this.tileLayers = [];
			this.bufferNumber = 30;
			this.realBufferNumber = 0;
			this.curViewTiles = {};
			this.bufferTiles = {};
			this.layersContainer = this.createLayersContainer();
			this.initialize()
		}
		J.extend(c.prototype, {
			createLayersContainer: function() {
				var L = document.createElement("div");
				L.style.cssText = "position:absolute;left:0;top:0;z-index:0;";
				this.map.platform.appendChild(L);
				return L
			},
			initialize: function() {
				var L = this;
				var M = this.map;
				M.addEventListener("onload", function() {
					L.loadBaseTileLayer()
				});
				M.addEventListener("oncenterzoomend", function() {
					L.reDrawCurViewTiles()
				});
				M.addEventListener("addtilelayer", function(N) {
					L.addTileLayer(N)
				});
				M.addEventListener("removetilelayer", function(N) {
					L.removeTileLayer(N)
				});
				M.addEventListener("moving", function(N) {
					L.reDrawCurViewTiles()
				});
				M.addEventListener("zoomstart", function(P) {
					if (P.evtSrc === "zoomTo") {
						if (this._zoomMapByAnimation) {
							var O = new j(this.width / 2, this.height / 2);
							var N = this.zoomLevel;
							this._zoomMapByAnimation(this, O, N)
						} else {
							L.reDrawCurViewTiles()
						}
					}
				});
				M.addEventListener("zoomend", function(N) {
					L.reDrawCurViewTiles()
				});
				M.addEventListener("resize", function(N) {
					L.reDrawCurViewTiles()
				})
			},
			loadBaseTileLayer: function() {
				var M = this.map;
				if (!M.loaded) {
					var N = new l();
					var L = M.config.mapStyle ? e : H;
					J.extend(N, L);
					M.addTileLayer(N);
					M.loaded = true
				}
			},
			addTileLayer: function(P) {
				var O = this.map;
				var M = P.target;
				for (var N = 0, L = this.tileLayers.length; N < L; N++) {
					if (this.tileLayers[N] === M) {
						return
					}
				}
				this.tileLayers.push(M);
				M.initialize(O, this.layersContainer);
				this.reDrawCurViewTiles()
			},
			removeTileLayer: function(S) {
				var R = this;
				var N = S.target;
				var L = R.curViewTiles;
				var P = R.bufferTiles;
				for (var Q in P) {
					var M = Q.split("-")[1];
					if (M == N.guid) {
						delete P[Q]
					}
				}
				for (var Q in L) {
					var M = Q.split("-")[1];
					if (M == N.guid) {
						delete L[Q]
					}
				}
				N.remove();
				for (var O = this.tileLayers.length - 1; O >= 0; O--) {
					if (this.tileLayers[O] === N) {
						this.tileLayers.splice(O, 1)
					}
				}
				R.reDrawCurViewTiles()
			},
			getTileName: function(L, M) {
				return "TILE-" + M.guid + "-" + L[0] + "-" + L[1] + "-" + L[2]
			},
			reDrawCurViewTiles: function() {
				var V = this.tileLayers.length;
				if (V <= 0) {
					return
				}
				var an = this.map;
				var M = an.getZoom();
				var ad = an.centerPoint;
				var U = an.getZoomUnits(M);
				var O = an.getTileUnits(M);
				var W = Math.ceil(ad.lat / O);
				var R = Math.ceil(ad.lng / O);
				var Z = an.config.tileSize;
				var P = [W, R, (ad.lat - W * O) / O * Z, (ad.lng - R * O) / O * Z];
				var ak = an.width;
				var ab = an.height;
				var ai = P[0] - Math.ceil((ab / 2 - P[2]) / Z);
				var N = P[1] - Math.ceil((ak / 2 - P[3]) / Z);
				var af = P[0] + Math.ceil((ab / 2 + P[2]) / Z);
				var Y = P[1] + Math.ceil((ak / 2 + P[3]) / Z);
				var X = this.tileLayers;
				var aa = this.curViewTiles;
				var L = [];
				for (var ae = 0, aj = X.length; ae < aj; ae++) {
					var ap = X[ae];
					o.css3TransformDom(ap.tilesDiv, Math.round(-an.offsetX + ak / 2), Math.round(-an.offsetY + ab / 2));
					for (var am in aa) {
						var ao = aa[am];
						var al = ao.info;
						if (al[2] !== M || (al[2] === M && (ai > al[0] || af <= al[0] || N > al[1] || Y <= al[1]))) {
							this.hideTile(ao)
						}
					}
					L.length = 0;
					for (var ah = ai; ah < af; ah++) {
						for (var ag = N; ag < Y; ag++) {
							L.push([ah, ag])
						}
					}
					L.sort((function(aq) {
						return function(ar, at) {
							return ((0.4 * Math.abs(ar[1] - aq[1]) + 0.6 * Math.abs(ar[0] - aq[0])) - (0.4 * Math.abs(at[1] - aq[1]) +
								0.6 * Math.abs(at[0] - aq[0])))
						}
					})([P[0] - 1, P[1] - 1]));
					var T = -ad.lng / U;
					var S = ad.lat / U;
					var Q = [Math.round(S), Math.round(T)];
					for (var ah = 0, ac = L.length; ah < ac; ah++) {
						this.showTile([L[ah][0], L[ah][1], M], Q, ap, Z)
					}
				}
			},
			showTile: function(Q, P, T, V) {
				var N = this.getTileName(Q, T);
				var O = (Q[1] * V) + P[1];
				var M = (-1 - Q[0]) * V + P[0];
				var U = this.curViewTiles[N];
				if (U && U.img) {
					o.css3TransformDom(U.img, O, M);
					return
				}
				U = this.bufferTiles[N];
				if (U && U.img) {
					T.tilesDiv.insertBefore(U.img, T.tilesDiv.lastChild);
					this.curViewTiles[N] = U;
					o.css3TransformDom(U.img, O, M);
					return
				}
				var R = new j(Q[1], Q[0]);
				var L = T.getTilesUrl(R, Q[2]);
				var S = [O, M];
				U = new b(this, L, S, Q, T, V);
				this.curViewTiles[N] = U
			},
			hideTile: function(M) {
				var L = M.img;
				if (L) {
					if (o.isInDocument(L)) {
						L.parentNode.removeChild(L)
					}
				}
				delete this.curViewTiles[M.name];
				if (!M.loaded) {
					L = null;
					M.img = null;
					M.mgr = null
				}
			}
		});
		function l(L) {
			this.opts = L || {};
			this.baseLayer = this.opts.baseLayer || false;
			this.zIndex = this.opts.zIndex || 0;
			this.guid = l._guid++
		}
		l._guid = 0;
		J.lang.inherits(l, J.lang.Class, "TileLayer");
		J.extend(l.prototype, {
			initialize: function(N, L) {
				if (this.baseLayer) {
					this.zIndex = -1
				}
				this.map = N;
				if (!this.tilesDiv) {
					var O = o.create("div");
					var M = O.style;
					M.cssText = "position:absolute;left:0;top:0;z-index:" + this.zIndex;
					L.appendChild(O);
					this.tilesDiv = O
				}
			},
			remove: function() {
				if (this.tilesDiv && this.tilesDiv.parentNode) {
					this.tilesDiv.innerHTML = "";
					this.tilesDiv.parentNode.removeChild(this.tilesDiv)
				}
				delete this.tilesDiv
			},
			getTilesUrl: function(M, N) {
				var L = "";
				if (this.opts.tileUrlTemplate) {
					L = this.opts.tileUrlTemplate.replace(/\{X\}/, M.x);
					L = L.replace(/\{Y\}/, M.y);
					L = L.replace(/\{Z\}/, N)
				}
				return L
			},
			getTileVersion: function(M) {
				var N = window.TILE_VERSION;
				var L = "20170730";
				if (N && N.ditu) {
					var O = N.ditu;
					if (O[M] && O[M]["updateDate"]) {
						L = O[M]["updateDate"]
					}
				}
				return L
			}
		});
		function b(R, L, N, M, O, T) {
			this.mgr = R;
			this.position = N;
			this.name = R.getTileName(M, O);
			this.info = M;
			var S = o.create("img");
			o.setUnSelectable(S);
			S.galleryImg = false;
			var Q = S.style;
			Q.cssText = "position:absolute;width:" + T + "px;height:" + T + "px;left:0;top:0;";
			o.css3TransformDom(S, N[0], N[1]);
			this.img = S;
			this.src = L;
			this.errorImgSrc = u.apiUrlCdn + "/images/blank.gif";
			var P = this;
			P.img.onload = function() {
				P.loaded = true;
				if (!P.mgr) {
					return
				}
				var V = P.mgr;
				var U = V.bufferTiles;
				if (!U[P.name]) {
					V.realBufferNumber++;
					U[P.name] = P
				}
				if (P.img && !o.isInDocument(P.img) && O.tilesDiv) {
					O.tilesDiv.appendChild(P.img)
				}
				var X = V.realBufferNumber - V.bufferNumber;
				for (var Y in U) {
					if (X <= 0) {
						break
					}
					if (!V.curViewTiles[Y]) {
						var W = U[Y].img;
						if (W && W.parentNode) {
							W.parentNode.removeChild(W)
						}
						W = null;
						U[Y].img = null;
						U[Y].mgr = null;
						delete U[Y];
						V.realBufferNumber--;
						X--
					}
				}
			};
			P.img.onerror = function() {
				var V = P.img;
				var W = V ? V.getAttribute("errorCount") : true;
				if (V && (!W || W && W < 5)) {
					W = W || 0;
					W++;
					V.src = L;
					V.setAttribute("errorCount", W)
				} else {
					if (!P.mgr) {
						return
					}
					var U = P.mgr;
					P.img.src = P.errorImgSrc;
					if (P.img && !o.isInDocument(P.img)) {
						O.tilesDiv.appendChild(P.img)
					}
				}
			};
			P.img.src = L
		}
		var H = new l({
			baseLayer: true
		});
		H.getTilesUrl = function(N, P) {
			var S = N.x;
			var O = N.y;
			var Q = u.url.domain["TILE_ONLINE_URLS"];
			var R = "x=" + S + "&y=" + O + "&z=" + P + "&styles=pl&scaler=2";
			var M = u.url.proto + Q[Math.abs(S + O) % Q.length] + "/tile/?qt=vtile&" + R;
			var L = this.getTileVersion("normal");
			M += "&udt=" + L;
			return M.replace(/-(\d+)/gi, "M$1")
		};
		var e = new l({
			baseLayer: true
		});
		e.getTilesUrl = function(O, T) {
			var M = this.map;
			var U = O.x;
			var P = O.y;
			var S = u.url.domain["main_domain_cdn"]["baidu"];
			var Q = "x=" + U + "&y=" + P + "&z=" + T + "&scale=2";
			var N = u.url.proto + S[Math.abs(U + P) % S.length] + "/customimage/tile/?" + Q;
			var R = this.getTileVersion("normal");
			N += "&udt=" + R;
			var L = this.getStyleParam();
			N += L;
			return N.replace("{x}", U).replace("{y}", P).replace("{z}", T)
		};
		e.getStyleParam = function() {
			var M = this.map.config.mapStyle;
			var N = "&";
			if (M.style) {
				N = N + "customid=" + M.style
			} else {
				if (M.styleJson) {
					var L = this.styleJson2styleString(M.styleJson);
					N = N + "styles=" + encodeURIComponent(L)
				}
			}
			return N
		};
		e.styleJson2styleString = function(L) {
			var Q = {
				featureType: "t",
				elementType: "e",
				visibility: "v",
				color: "c",
				lightness: "l",
				saturation: "s",
				weight: "w",
				zoom: "z",
				hue: "h"
			};
			var S = {
				all: "all",
				geometry: "g",
				"geometry.fill": "g.f",
				"geometry.stroke": "g.s",
				labels: "l",
				"labels.text.fill": "l.t.f",
				"labels.text.stroke": "l.t.s",
				"lables.text": "l.t",
				"labels.icon": "l.i"
			};
			var T = [];
			for (var M = 0, R; R = L[M]; M++) {
				var O = R.stylers;
				delete R.stylers;
				J.extend(R, O);
				var N = [];
				for (var P in Q) {
					if (R[P]) {
						if (P === "elementType") {
							N.push(Q[P] + ":" + S[R[P]])
						} else {
							N.push(Q[P] + ":" + R[P])
						}
					}
				}
				if (N.length > 2) {
					T.push(N.join("|"))
				}
			}
			return T.join(",")
		};
		function a() {
			this.map = null;
			this._overlays = {};
			this._customOverlays = []
		}
		J.extend(a.prototype, {
			draw: function(L) {
				for (var M in this._overlays) {
					this._overlays[M].draw(L)
				}
				J.array.each(this._customOverlays, function(N) {
					N.draw(L)
				})
			}
		});
		u.register(function(M) {
			M.overlayDiv = document.createElement("div");
			M.overlayDiv.style.cssText = "position:absolute;z-index:100;left:0;top:0;width:0;height:0;";
			M._panes.markerPane = document.createElement("div");
			M._panes.markerPane.style.cssText = "position:absolute;z-index:100;left:0;top:0;width: 0;height: 0;";
			M.overlayDiv.appendChild(M._panes.markerPane);
			M.platform.appendChild(M.overlayDiv);
			var L = new a();
			L.map = M;
			M._overlays = L._overlays;
			M._customOverlays = L._customOverlays;
			M.addEventListener("load", function(N) {
				L.draw(N)
			});
			M.addEventListener("moveend", function(N) {
				L.draw(N)
			});
			M.addEventListener("zooming", function(N) {
				L.draw(N)
			});
			M.addEventListener("zoomend", function(N) {
				L.draw(N)
			});
			M.addEventListener("oncenterzoomend", function(N) {
				L.draw(N)
			});
			M.addEventListener("resize", function(N) {
				L.draw(N)
			});
			M.addEventListener("addoverlay", function(R) {
				var O = R.target;
				if (O instanceof I) {
					if (!L._overlays[O.guid]) {
						L._overlays[O.guid] = O
					}
				} else {
					var Q = false;
					for (var P = 0, N = L._customOverlays.length; P < N; P++) {
						if (L._customOverlays[P] === O) {
							Q = true;
							break
						}
					}
					if (!Q) {
						L._customOverlays.push(O)
					}
				}
			});
			M.addEventListener("removeoverlay", function(Q) {
				var O = Q.target;
				if (O instanceof I) {
					delete L._overlays[O.guid]
				} else {
					for (var P = 0, N = L._customOverlays.length; P < N; P++) {
						if (L._customOverlays[P] === O) {
							L._customOverlays.splice(P, 1);
							break
						}
					}
				}
			});
			M.addEventListener("clearoverlays", function(Q) {
				for (var P in L._overlays) {
					if (L._overlays[P]._config.enableMassClear) {
						L._overlays[P].remove();
						delete L._overlays[P]
					}
				}
				for (var N = L._customOverlays.length, O = N - 1; O >= 0; O--) {
					if (L._customOverlays[O].enableMassClear !== false) {
						L._customOverlays[O].remove();
						L._customOverlays[O] = null;
						L._customOverlays.splice(O, 1)
					}
				}
			})
		});
		function E() {
			this._type = "overlay"
		}
		J.lang.inherits(E, J.lang.Class, "Overlay");
		E.getZIndex = function(L) {
			L = L * 1;
			if (!L) {
				return 0
			}
			return (L * -100000) << 1
		};
		J.extend(E.prototype, {
			_i: function(L) {
				if (!this.domElement && J.lang.isFunction(this.initialize)) {
					this.domElement = this.initialize(L);
					if (this.domElement) {
						this.domElement.style.WebkitUserSelect = "none"
					}
				}
				this.draw()
			},
			initialize: function(L) {
				throw "initialize方法未实现"
			},
			draw: function() {
				throw "draw方法未实现"
			},
			remove: function() {
				if (this.domElement && this.domElement.parentNode) {
					this.domElement.parentNode.removeChild(this.domElement)
				}
				this.domElement = null;
				this.dispatchEvent(new F("onremove"))
			},
			hide: function() {
				if (this.domElement) {
					J.dom.hide(this.domElement)
				}
			},
			show: function() {
				if (this.domElement) {
					J.dom.show(this.domElement)
				}
			},
			isVisible: function() {
				if (!this.domElement) {
					return false
				}
				if (this.domElement.style.display == "none" || this.domElement.style.visibility == "hidden") {
					return false
				}
				return true
			}
		});
		function I() {
			J.lang.Class.call(this);
			E.call(this);
			this.map = null;
			this._visible = true
		}
		J.lang.inherits(I, E, "OverlayInternal");
		J.extend(I.prototype, {
			initialize: function(L) {
				this.map = L;
				J.lang.Class.call(this, this.guid);
				return null
			},
			getMap: function() {
				return this.map
			},
			draw: function() {},
			remove: function() {
				this.map = null;
				J.lang.decontrol(this.guid);
				E.prototype.remove.call(this)
			},
			hide: function() {
				if (this._visible == false) {
					return
				}
				this._visible = false
			},
			show: function() {
				if (this._visible == true) {
					return
				}
				this._visible = true
			},
			isVisible: function() {
				if (!this.domElement) {
					return false
				}
				return !!this._visible
			},
			getContainer: function() {
				return this.domElement
			},
			setConfig: function(M) {
				M = M || {};
				for (var L in M) {
					this._config[L] = M[L]
				}
			},
			setZIndex: function(L) {
				this.zIndex = L
			},
			enableMassClear: function() {
				this._config.enableMassClear = true
			},
			disableMassClear: function() {
				this._config.enableMassClear = false
			}
		});
		function h(M, N, Q) {
			var P = this.dpr = 2;
			if (!M || !N) {
				return
			}
			Q = Q || {};
			N.width = N.width / P;
			N.height = N.height / P;
			if (Q.anchor && Q.anchor instanceof d) {
				Q.anchor.width = Q.anchor.width / P;
				Q.anchor.height = Q.anchor.height / P
			}
			if (Q.imageOffset && Q.imageOffset instanceof d) {
				Q.imageOffset.width = Math.floor(Q.imageOffset.width / P);
				Q.imageOffset.height = Math.floor(Q.imageOffset.height / P)
			}
			if (Q.backGroundImageSize && Q.backGroundImageSize instanceof d) {
				Q.backGroundImageSize.width = Math.floor(Q.backGroundImageSize.width / P);
				Q.backGroundImageSize.height = Math.floor(Q.backGroundImageSize.height / P)
			}
			this.size = N;
			this.imageUrl = M;
			var L = new d(Math.floor(N.width / 2), N.height);
			var O = new d(N.width, N.height);
			var R = {
				anchor: L,
				imageOffset: new d(0, 0),
				backGroundImageSize: O
			};
			J.extend(R, Q);
			this.anchor = R.anchor;
			this.imageOffset = R.imageOffset;
			this.backGroundImageSize = R.backGroundImageSize
		}
		J.extend(h.prototype, {
			setImageUrl: function(L) {
				if (!L) {
					return
				}
				this.imageUrl = L
			},
			setSize: function(L) {
				if (!L) {
					return
				}
				this.size = new d(L.width / this.dpr, L.height / this.dpr)
			},
			setAnchor: function(L) {
				if (!L) {
					return
				}
				this.anchor = new d(L.width / this.dpr, L.height / this.dpr)
			},
			setImageOffset: function(L) {
				if (!L) {
					return
				}
				this.imageOffset = new d(L.width / this.dpr, L.height / this.dpr)
			},
			getHTML: function() {
				var L = '<img style="position:absolute;padding:0;margin:0;border:0;left:' + this.imageOffset.width + "px;top:" +
					this.imageOffset.height + "px;width:" + this.backGroundImageSize.width + "px;height:" + this.backGroundImageSize
					.height + 'px;"src="' + this.imageUrl + '"/>';
				return L
			},
			setBackGroundImageSize: function(L) {
				if (!L) {
					return
				}
				this.backGroundImageSize = new d(L.width / this.dpr, L.height / this.dpr)
			},
			toString: function() {
				return "Icon"
			}
		});
		var D = new h(u.apiUrlCdn + "/images/hd_red_marker.png", new d(47, 50));
		function z(L, M) {
			I.call(this);
			M = M || {};
			this.point = L;
			this.map = null;
			this._config = {
				offset: new d(0, 0),
				icon: D,
				baseZIndex: 0,
				clickable: true,
				isTop: false,
				enableMassClear: true
			};
			this.setConfig(M);
			if (o.isDefined(M.enableClicking)) {
				this._config.clickable = M.enableClicking
			}
			this._loadAsyncCode()
		}
		J.lang.inherits(z, I, "Marker");
		J.extend(z.prototype, {
			_loadAsyncCode: function() {
				var L = this;
				p.load("marker", function() {
					L._loadAsyncCodeCbk()
				})
			},
			setIcon: function(L) {
				if (L instanceof h) {
					this._config.icon = L
				}
			},
			getIcon: function() {
				return this._config.icon
			},
			getPosition: function() {
				return this.point
			},
			setPosition: function(L) {
				if (L instanceof w) {
					this.point = new w(L.lng, L.lat)
				}
			},
			setTop: function(M, L) {
				this._config.isTop = !!M;
				if (M) {
					this._addi = L || 0
				}
			},
			setOffset: function(L) {
				if (L instanceof d) {
					this._config.offset = L
				}
			},
			getOffset: function() {
				return this._config.offset
			}
		});
		function x() {
			this._map = null;
			this._container;
			this._type = "control";
			this._visible = true
		}
		J.lang.inherits(x, J.lang.Class, "Control");
		J.extend(x.prototype, {
			initialize: function(L) {
				this._map = L;
				if (this._container) {
					L.container.appendChild(this._container);
					return this._container
				}
				return
			},
			_i: function(L) {
				if (!this._container && this.initialize && J.lang.isFunction(this.initialize)) {
					this._container = this.initialize(L)
				}
				this._opts = this._opts || {};
				this._setStyle();
				this._setPosition();
				if (this._container) {
					this._container._jsobj = this
				}
			},
			_setStyle: function() {
				var N = this._container;
				if (N) {
					var L = N.style;
					var M = this._container.style.zIndex || 10;
					L.position = "absolute";
					L.zIndex = M
				}
			},
			remove: function() {
				this._map = null;
				if (!this._container) {
					return
				}
				this._container.parentNode && this._container.parentNode.removeChild(this._container);
				this._container._jsobj = null;
				this._container = null
			},
			_render: function() {
				this._container = o.beforeEndHTML(this._map.container, "<div></div>");
				if (this._visible == false) {
					J.dom.hide(this._container)
				}
				return this._container
			},
			_setPosition: function() {
				this.setAnchor(this._opts.anchor)
			},
			setAnchor: function(N) {
				if (this.anchorFixed || !J.lang.isNumber(N) || isNaN(N) || N < BMAP_ANCHOR_TOP_LEFT || N >
					BMAP_ANCHOR_BOTTOM_RIGHT) {
					N = this.defaultAnchor
				}
				this._opts = this._opts || {};
				this._opts.offset = this._opts.offset || this.defaultOffset;
				var M = this._opts.anchor;
				this._opts.anchor = N;
				if (!this._container) {
					return
				}
				var P = this._container;
				var L = this._opts.offset.width;
				var O = this._opts.offset.height;
				switch (N) {
					case BMAP_ANCHOR_TOP_LEFT:
						P.style.top = O + "px";
						P.style.left = L + "px";
						break;
					case BMAP_ANCHOR_TOP_RIGHT:
						P.style.top = O + "px";
						P.style.right = L + "px";
						break;
					case BMAP_ANCHOR_BOTTOM_LEFT:
						P.style.bottom = O + "px";
						P.style.left = L + "px";
						break;
					case BMAP_ANCHOR_BOTTOM_RIGHT:
						P.style.bottom = O + "px";
						P.style.right = L + "px";
						break;
					default:
						break
				}
			},
			getAnchor: function() {
				return this._opts.anchor
			},
			setOffset: function(L) {
				if (!(L instanceof d)) {
					return
				}
				this._opts = this._opts || {};
				this._opts.offset = new d(L.width, L.height);
				if (!this._container) {
					return
				}
				this.setAnchor(this._opts.anchor)
			},
			getOffset: function() {
				return this._opts.offset
			},
			getDom: function() {
				return this._container
			},
			show: function() {
				this._visible = true;
				if (this._container) {
					J.dom.show(this._container)
				}
			},
			hide: function() {
				this._visible = false;
				if (this._container) {
					J.dom.hide(this._container)
				}
			},
			isVisible: function() {
				if (!this._container && !this._map) {
					return false
				}
				return !!this._visible
			}
		});
		window.BMAP_ANCHOR_TOP_LEFT = 0;
		window.BMAP_ANCHOR_TOP_RIGHT = 1;
		window.BMAP_ANCHOR_BOTTOM_LEFT = 2;
		window.BMAP_ANCHOR_BOTTOM_RIGHT = 3;
		function y(L) {
			x.call(this);
			L = L || {};
			this._opts = {};
			this._opts = J.object.extend(J.object.extend(this._opts, {
				color: "black",
				unit: "metric"
			}), L);
			this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT;
			this.defaultOffset = new d(20, 10);
			this.setAnchor(L.anchor);
			this._units = {
				metric: {
					name: "metric",
					conv: 1,
					incon: 1000,
					u1: "米",
					u2: "公里"
				}
			};
			if (!this._units[this._opts.unit]) {
				this._opts.unit = "metric"
			}
			this._scaleText = null;
			this._numberArray = {};
			this._loadAsyncCode()
		}
		J.lang.inherits(y, x, "ScaleControl");
		J.object.extend(y.prototype, {
			_loadAsyncCode: function() {
				var L = this;
				p.load("control", function() {
					L._loadAsyncCodeCbk()
				})
			},
			initialize: function(L) {
				this._map = L;
				return this._container
			},
			setColor: function(L) {
				this._opts.color = L + ""
			},
			getColor: function() {
				return this._opts.color
			}
		});
		function C(L) {
			x.call(this);
			L = L || {};
			this._opts = {};
			this._opts = J.object.extend(this._opts, L);
			this.defaultAnchor = BMAP_ANCHOR_BOTTOM_RIGHT;
			this.defaultOffset = new u.Size(8, 14);
			this.setAnchor(L.anchor)
		}
		J.lang.inherits(C, x, "ZoomControl");
		J.object.extend(C.prototype, {
			initialize: function(M) {
				this._map = M;
				var O = this._container = document.createElement("div");
				O.style.cssText = "box-shadow:1px 1px 2px rgba(0,0,0,.4);background:rgba(255,255,255,.8);border-radius: 3px;";
				var L = this._zoomIn = document.createElement("div");
				L.style.cssText = "width:36px;height:42px;text-align:center;line-height:42px;font-family:arial;color:#000;";
				L.innerHTML =
					'<div style="font-size:24px;border-bottom:solid 1px #ccc;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events: none;">+</div>';
				var N = this._zoomOut = document.createElement("div");
				N.style.cssText = "width:36px;height:42px;text-align:center;line-height:42px;font-family:arial;color:#000;";
				N.innerHTML =
					'<div style="font-size:40px;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;">-</div>';
				O.appendChild(L);
				O.appendChild(N);
				M.getContainer().appendChild(O);
				this.bindEvt();
				return O
			},
			bindEvt: function() {
				var L = this;
				var M = L._map;
				L._zoomIn.onclick = function() {
					M.zoomIn();
					L.zoomChangeHandler()
				};
				L._zoomOut.onclick = function() {
					M.zoomOut();
					L.zoomChangeHandler()
				};
				L._zoomIn.ontouchstart = function() {
					this.style.background = "rgba(94,169,221,.8)"
				};
				L._zoomIn.ontouchend = function() {
					this.style.background = ""
				};
				L._zoomOut.ontouchstart = function() {
					this.style.background = "rgba(94,169,221,.8)"
				};
				L._zoomOut.ontouchend = function() {
					this.style.background = ""
				};
				L.zoomChangeHandler = function() {
					if (M.getZoom() >= M.config.maxZoom) {
						L._zoomIn.style.background = "rgba(205,205,205,.8)"
					} else {
						L._zoomIn.style.background = ""
					}
					if (M.getZoom() <= M.config.minZoom) {
						L._zoomOut.style.background = "rgba(205,205,205,.8)"
					} else {
						L._zoomOut.style.background = ""
					}
				};
				M.addEventListener("zoomend", L.zoomChangeHandler);
				M.addEventListener("centerzoomend", L.zoomChangeHandler);
				M.addEventListener("load", L.zoomChangeHandler)
			}
		});
		function k(L) {
			this["defaultAnchor"] = BMAP_ANCHOR_BOTTOM_LEFT;
			this["defaultOffset"] = new d(1, 1);
			this._cZIndex = 30;
			this.IMG_URL = u.apiUrlCdn + "images/copyright_logo_hd.png"
		}
		k.prototype = new x();
		k.prototype.initialize = function(M) {
			this._map = M;
			var N = o.create("div");
			var L = o.create("a", {
				title: "到百度地图查看此区域",
				target: "_blank",
				href: "http://map.baidu.com/?sr=1"
			});
			L.style.outline = "none";
			N.style.height = "25px";
			L.href = "http://map.baidu.com/?sr=1";
			L.innerHTML = "<img style='border:none;width:68px;height:25px' src='" + this.IMG_URL + "' />";
			N.appendChild(L);
			M.getContainer().appendChild(N);
			return N
		};
		var K = new h(u.apiUrlCdn + "/images/hd_red_marker.png", new d(47, 50));
		function q(L, M) {
			J.lang.Class.call(this);
			M = M || {};
			this.point = L;
			this._opts = {
				icon: K,
				data: "",
				margin: 0
			};
			this._opts = J.object.extend(this._opts, M)
		}
		J.lang.inherits(q, J.lang.Class, "MassFeature");
		J.extend(q.prototype, {
			getData: function() {
				return this._opts.data
			},
			getIcon: function() {
				return this._opts.icon
			},
			getPosition: function() {
				return this.point
			}
		});
		function t(L) {
			this._map = L;
			this._asyncCodeLoaded = false;
			this._massFeatures = [];
			this._IconCache = {};
			this._needLoadImgNumber = 0
		}
		u.register(function(M) {
			var L = new t(M);
			L.initialize()
		});
		J.extend(t.prototype, {
			initialize: function() {
				var M = this._map;
				var L = this;
				M.addEventListener("addmassfeatures", function(Q) {
					var N = Q.massFeatures;
					for (var S = 0, P = N.length; S < P; S++) {
						var R = N[S];
						var O = R.guid;
						if (!L._massFeatures[O]) {
							L._massFeatures[O] = 1;
							L._massFeatures.push(R)
						}
					}
					L._loadAsyncCode(function() {
						L.drawMassFeatures(true)
					})
				});
				M.addEventListener("removemassfeatures", function(Q) {
					var N = Q.massFeatures;
					for (var S = 0, P = N.length; S < P; S++) {
						for (var R = L._massFeatures.length - 1; R >= 0; R--) {
							if (N[S].guid === L._massFeatures[R].guid) {
								var O = L._massFeatures[R].guid;
								L._massFeatures.splice(R, 1);
								delete L._massFeatures[O];
								break
							}
						}
					}
					L._loadAsyncCode(function() {
						L.drawMassFeatures()
					})
				});
				M.addEventListener("clearmassfeatures", function(N) {
					L._massFeatures.length = 0;
					for (var O in L._massFeatures) {
						delete L._massFeatures[O]
					}
					L._loadAsyncCode(function() {
						L.drawMassFeatures()
					})
				})
			},
			_loadAsyncCode: function(L) {
				var M = this;
				p.load("massfeatures", function() {
					if (!M._asyncCodeLoaded) {
						M._loadAsyncCodeCbk()
					}
					L && L()
				}, true)
			}
		});
		u.verify();
	})();
})();