浏览代码

康复随访

hwy 1 月之前
父节点
当前提交
d9575ef1fc

+ 1 - 1
app/jbsc/js/statistics.js

@ -111,7 +111,7 @@ new Vue({
    //   mobile: null,
    //   birthday: null
    // }
    vm.name=vm.scListItem.patientName
    // vm.name=vm.scListItem.patientName
    if(httpData.scListItem){
      vm.scListItem=JSON.parse(decodeURIComponent(httpData.scListItem))
      vm.name=vm.scListItem.patientName

+ 408 - 75
app/rehabilitation/html/followRecord.html

@ -10,29 +10,22 @@
    <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>
  <style>
    #app {
      display: flex;
      /* display: flex; */
    }
    .left {
      width: 550px;
      border-right: 1px solid rgba(0, 0, 0, 0.1);
      height: 100%;
    }
    .right {
      width: 300px;
    }
    .left .question-box {
      border-radius: 6px;
      border: 1px solid rgba(0, 0, 0, 0.1);
      margin: 20px 20px 0;
      padding: 10px 20px;
      height: 680px;
      padding: 10px 20px 50px 20px;
      box-sizing: border-box;
      overflow: auto;
    }
    .title {
      font-weight: bold;
@ -44,76 +37,112 @@
      border-top: 1px solid rgba(0, 0, 0, 0.1);
      font-size: 14px;
    }
    .form-label {
      margin: 2px 0 6px 0;
    }
    .mb8{
      margin-bottom: 8px;
    }
    .right .base-info{
      padding: 20px;
      border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    .right .complete-rate{
      padding: 20px;
      border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    .el-checkbox + .el-checkbox {
      margin-left: 0;
    }
    .btn-box{
      padding: 20px;
    }
    .progress{
      /* margin: 10px auto 0; */
      background: #fff;
      height: 126px;
      display: flex;
      justify-content: center;
    }
    .info-item{
      display: flex;
      font-size: 14px;
    .el-checkbox {
      margin-right: 0;
    }
  </style>
  <body>
    <div id="app" v-cloak>
      <div class="left">
      <div class="left" :style="flag=='2'?'pointer-events: none;':''">
        <div class="question-box">
          <div class="title mb8">随访问题</div>
          <div class="form-item">
            <div class="form-label">1、评估时间</div>
            <el-date-picker v-model="form.evaluationTime" type="datetime" placeholder="选择日期时间"></el-date-picker>
          </div>
          <div class="form-item">
            <div class="form-label">2、评估医院</div>
            <el-input v-model="form.hospital"></el-input>
          </div>
          <div class="form-item">
            <div class="form-label">3、评估机构</div>
            <el-input v-model="form.insi"></el-input>
          </div>
          <div class="form-item">
            <div class="form-label">4、姓名</div>
            <el-input v-model="form.name"></el-input>
          </div>
          <div class="form-item">
            <div class="form-label">5、年龄</div>
            <el-input v-model="form.age"></el-input>
          </div>
          <div class="form-item">
            <div class="form-label">6、性别</div>
            <el-radio v-model="form.sex" label="1">男</el-radio>
            <el-radio v-model="form.sex" label="2">女</el-radio>
          </div>
          <div class="form-item">
            <div class="form-label">7、性别</div>
            <el-input v-model="form.sex1"></el-input>
          </div>
          <div class="form-item">
            <div class="form-label">7、性别</div>
            <el-input v-model="form.sex1"></el-input>
          </div>
          <el-form label-position="left" label-width="120px">
            <el-form-item label="姓名" required>
              <el-input v-model="form.patientName" placeholder="请输入姓名" :readonly="true"></el-input>
            </el-form-item>
            <el-form-item label="随访日期" required>
              <el-date-picker v-model="form.followupDate" type="datetime" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" placeholder="请选择随访日期"></el-date-picker>
            </el-form-item>
            <el-form-item label="随访医生" required>
              <el-input v-model="form.doctorName" placeholder="请输入随访医生" :readonly="true"></el-input>
            </el-form-item>
            <el-form-item label="血压" required>
              <el-row :gutter="10" style="display: flex">
                <el-col :span="8">
                  <el-input v-model="form.bloodPressure" placeholder="" :readonly="!editable"></el-input>
                </el-col>
                <el-col :span="2">/</el-col>
                <el-col :span="8">
                  <el-input v-model="form.bloodPressureDown" placeholder="" :readonly="!editable"></el-input>
                </el-col>
                <el-col :span="6">mmHg</el-col>
              </el-row>
            </el-form-item>
            <el-form-item label="心率" required>
              <el-input v-model="form.heartRate" placeholder="请输入心率" :readonly="!editable">
                <template slot="append">次/分钟</template>
              </el-input>
            </el-form-item>
            <el-form-item label="LDL-C" required>
              <el-input v-model="form.ldlc" placeholder="请输入LDL-C" :readonly="!editable">
                <template slot="append">mmol/L</template>
              </el-input>
            </el-form-item>
            <el-form-item label="糖化血红蛋白" required>
              <el-input v-model="form.thxhdb" placeholder="请输入糖化血红蛋白" :readonly="!editable">
                <template slot="append">%</template>
              </el-input>
            </el-form-item>
            <el-form-item label="吸烟情况" required>
              <el-radio-group v-model="form.smoking" :disabled="!editable">
                <el-radio label="1">已戒烟或从未吸烟</el-radio>
                <el-radio label="5">仍吸烟</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="饮酒情况" required>
              <el-radio-group v-model="form.drinking" :disabled="!editable">
                <el-radio label="1">戒酒或不饮酒</el-radio>
                <el-radio label="4">仍饮酒</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="目前服用药物" required>
              <el-checkbox-group v-model="takingListChecked" :disabled="!editable">
                <el-checkbox v-for="(item,index) in takingList" :key="item.code" :label="index">{{ item.value }}</el-checkbox>
              </el-checkbox-group>
            </el-form-item>
            <el-form-item label="不良事件种类">
              <el-checkbox-group v-model="adverseEventArr" :disabled="!editable">
                <el-checkbox v-for="(item,index) in badEventList1" :key="item.key" :label="index">{{ item.name }}</el-checkbox>
              </el-checkbox-group>
            </el-form-item>
            <el-form-item label="其他事件">
              <el-input type="textarea" v-model="form.otherEvents" placeholder="请输入其他事件情况" :rows="3" :maxlength="200" show-word-limit :readonly="!editable"></el-input>
            </el-form-item>
            <el-form-item label="是否转诊上级医院" required label-width="150px">
              <el-radio-group v-model="form.isMoveSuperiorHospital" :disabled="!editable">
                <el-radio label="1">是</el-radio>
                <el-radio label="2">否</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="随访医院" required>
              <el-input v-model="form.followHospital" placeholder="请输入随访医院" :readonly="true"></el-input>
            </el-form-item>
          </el-form>
        </div>
        <div
          v-if="flag=='1'"
          class="btns"
          style="
            position: fixed;
            left: 0;
            bottom: 0;
            border: 1px solid #e5e5e5;
            background-color: #fff;
            z-index: 99;
            width: 100%;
            height: 60px;
            padding: 0 50px;
            display: flex;
            align-items: center;
            justify-content: space-between;
          ">
          <div style="height: 40px; width: 150px; background-color: #fff; color: red; line-height: 40px; text-align: center; border: 1px solid red" @click="close">退出</div>
          <div style="height: 40px; width: 150px; background-color: #17b3ec; line-height: 40px; text-align: center; color: #fff" @click="onSave">提交</div>
        </div>
      </div>
      <div class="right">
      <!-- <div class="right">
        <div class="base-info">
          <div class="title mb8">基本信息</div>
          <div class="info-item">
@ -138,8 +167,7 @@
        <div class="btn-box">
          <el-button type="primary" style="width: 100%;">提交</el-button>
        </div>
        <!-- <el-button>退出</el-button> -->
      </div>
      </div> -->
    </div>
    <script type="text/javascript" src="../../../js/vue.js"></script>
    <script type="text/javascript" src="../../../js/jquery-2.2.4.js"></script>
@ -153,17 +181,322 @@
    <script type="text/javascript" src="../../../js/underscore-1.9.1.js"></script>
    <script type="text/javascript" src="../../../component/rehabilitation/server-items-detail.js"></script>
    <script type="text/javascript" src="../../../js/util.js" charset="utf-8"></script>
    
    <script type="text/javascript" src="../js/vaile.js" charset="utf-8"></script>
    <script>
      var httpData = GetRequest()
      new Vue({
        el: '#app',
        data() {
          var vm = this
          return {
            form: {},
            takingListChecked: [],
            adverseEventArr: [],
            docInfo: JSON.parse(localStorage.docInfo),
            badEventListChecked: [],
            editable: true,
            isLoaded: false,
            followup: '',
            followTypes: [
              { code: '2', text: '家庭' },
              { code: '3', text: '电话' }
            ],
            PositiveList: [
              { name: '无阳性体征', checkBox: false, key: 'PositiveNo' },
              { name: '颈静脉怒张', checkBox: false, key: 'PositiveJugular' },
              { name: '肺部啰音', checkBox: false, key: 'PositiveLungs' },
              { name: '心脏杂音', checkBox: false, key: 'PositiveHeart' },
              { name: '双下肢水肿', checkBox: false, key: 'PositiveLower' }
            ],
            badEventList1: [
              { name: '无不良事件', checkBox: false, key: 'badEventNo' },
              { name: '心源性原因再次入院', checkBox: false, key: 'badEventCardiac' },
              { name: '再发心梗', checkBox: false, key: 'badEventMyocardial' },
              { name: '脑卒中', checkBox: false, key: 'badEventStroke' },
              { name: '严重出血', checkBox: false, key: 'badEventBleeding' },
              { name: '外周血管栓塞', checkBox: false, key: 'badEventVascular' },
              { name: '恶性心律失常(室速/室颤)', checkBox: false, key: 'badEventMalignant' },
              { name: '左室附壁血栓', checkBox: false, key: 'badEventBlood' },
              { name: '死亡', checkBox: false, key: 'badEventBusy' },
              { name: '其他', checkBox: false, key: 'badEventOther' }
            ],
            drugEffectsList: [
              { name: '无', checkBox: false, key: 'drugEffectsNo' },
              { name: '出血', checkBox: false, key: 'drugEffectsBleeding' },
              { name: '心率低于55次/分', checkBox: false, key: 'drugEffectsHeartLow' },
              { name: '收缩压低于100mmHg', checkBox: false, key: 'drugEffectspressureLow' },
              { name: '转氨酶升高', checkBox: false, key: 'drugEffectsTransaminase' },
              { name: '肌酶升高', checkBox: false, key: 'drugEffectsEnzymes' },
              { name: '其他', checkBox: false, key: 'drugEffectsOther' }
            ],
            bleedingList: [
              { name: '皮肤粘膜', checkBox: false, key: 'bleedingSkin' },
              { name: '消化道', checkBox: false, key: 'bleedingDigestive' },
              { name: '泌尿道', checkBox: false, key: 'bleedingUrinary' },
              { name: '呼吸道', checkBox: false, key: 'bleedingRespiratory' },
              { name: '脑出血', checkBox: false, key: 'bleedingCerebral' },
              { name: '其他', checkBox: false, key: 'bleedingOther' }
            ],
            followData: '',
            form: {
              type: '2', //版本 目前第二版
              followId: '',
              patientCode: '',
              doctorCode: '',
              patientName: '', // 姓名
              sex: '', // 性别
              followupDate: '', // 随访日期
              doctorName: '', //随访医生
              bloodPressure: '', // 血压1
              bloodPressureDown: '', // 血压2
              heartRate: '', // 心率
              ldlc: '', //LDL-C
              thxhdb: '', //糖化血红蛋白
              positiveSigns: '', // 阳性体征
              smoking: '', // 吸烟情况
              drinking: '', // 饮酒情况
              randomBloodSugar: '', // 血糖
              ccsLevel: '', // 心绞痛
              nyhaLevel: '', // 心功能
              takeMedicine: '', // 目前服用药物
              drugSideEffects: '', // 药物副作用
              otherDrugSideEffects: '', // 其他副作用情况
              bleedingSite: '', // 出血部位
              bleedingDegree: '', // 出血程度
              mace: '', // 不良心血管病事件(MACE)
              adverseEvent: '', // 不良事件种类 心源性原因再次入院
              otherEvents: '', // 其他事件
              isMoveSuperiorHospital: '', // 是否转诊上级医院
              followHospital: '' // 随访医院
            },
            serviceInfo: {},
            takingList: [],
            flag: '1',
            rules: {
              form: {
                patientName: [{ required: true, message: '请输入姓名' }],
                followupDate: [{ required: true, message: '请选择随访日期' }],
                doctorName: [{ required: true, message: '请输入随访医生' }],
                bloodPressure: [{ required: true, message: '请输入完整血压' }],
                bloodPressureDown: [{ required: true, message: '请输入完整血压' }],
                heartRate: [{ required: true, message: '请输入心率' }],
                positiveSigns: {
                  value: function () {
                    return _.some(vm.PositiveList, function (v) {
                      return v.checkBox === true
                    })
                  }
                },
                smoking: [{ required: true, message: '请选择吸烟情况' }],
                drinking: [{ required: true, message: '请选择饮酒情况' }],
                // taking: {
                //   value: function () {
                //     return _.some(vm.takingList, function (v) {
                //       return v.checkBox === true
                //     })
                //   },
                //   rule: [{ required: true, message: '请选择目前服用药物' }]
                // },
                // drugEffects: {
                //   value: function () {
                //     return _.some(vm.drugEffectsList, function (v) {
                //       return v.checkBox === true
                //     })
                //   },
                //   rule: [{ required: true, message: '请选择药物副作用情况' }]
                // },
                // mace: [{ required: true, message: '请选择是否有不良心血管病事件' }],
                isMoveSuperiorHospital: [{ required: true, message: '请选择是否转诊上级医院' }],
                followHospital: [{ required: true, message: '请输入随访医院' }]
              }
            }
          }
        },
        watch: {
          'form.takeMedicine': {
            handler: function (value) {
              console.log(value, 'sssssssssssssss')
            }
          }
        },
        mounted: function () {
          var vm = this
          this.getDictByDictName()
          if (httpData.serviceInfo) {
            vm.serviceInfo = JSON.parse(decodeURIComponent(httpData.serviceInfo))
            console.log(vm.serviceInfo, 'dsaaaaaaaaaaaaaa222')
          }
          this.form.patientName = vm.serviceInfo.patientName
          this.form.followId = vm.serviceInfo.relationCode
          this.form.followHospital = this.docInfo.hospitalName
          this.form.doctorName = this.docInfo.name
          this.form.doctorCode = this.docInfo.code
          this.getFollowup(vm.serviceInfo.relationCode)
          this.load()
          console.log('docInfo', this.docInfo)
        },
        methods: {
          load: function () {
            var vm = this
            httpRequest.get('doctor/visitDetail/selectFollowupDiseaseById', { data: { type: 'XiaXinCoronaryHear', followupId: vm.serviceInfo.relationCode } }).then(function (res) {
              console.log(res, '000000000')
              if (res.status == '200') {
                vm.followup = _.assign(vm.followup, res.data.followup)
                if (res.data.content) {
                  vm.form = _.assign(vm.form, res.data.content)
                  vm.$set(vm, 'takingListChecked', res.data.content && res.data.content.takeMedicine.split(','))
                  vm.$set(vm, 'adverseEventArr', res.data.content && res.data.content.adverseEvent.split(','))
                  vm.flag = '2'
                }
                console.log(vm.form, '122222222222', vm.takingListChecked, vm.adverseEventArr, vm.takingList)
              }
            })
          },
          getFollowup: function (code) {
            var vm = this
            httpRequest.get('doctor/followup/getFollowup', { data: { id: code } }).then(function (res) {
              if (res.status == 200) {
                var data = res.data
                vm.followData = res.data
                vm.form.sex = data.sex
                vm.form.followupDate = data.followupDate
                vm.followup = {
                  followup_id: code,
                  // status: data.status,
                  // patientName: vm.serviceInfo.patientName,
                  followupNextDate: data.followupNextDate,
                  followupType: data.followupType,
                  followupClass: data.followupClass,
                  jwDoctorWorkType: data.jwDoctorWorkType,
                  followupDate: data.followupDate,
                  doctorName: data.doctorName,
                  orgName: data.orgName
                  // type: vm.serviceInfo.type
                }
                console.log(vm.followup, '我是vm.followup')
              }
            })
          },
          getDictByDictName: function () {
            var vm = this
            httpRequest.get('/common/getDictByDictName', { data: { name: 'CurrentlyTakingMedication' } }).then(function (res) {
              if (res.status == 200) {
                var data = res.list
                data.forEach(function (v) {
                  v.checkBox = false
                })
                vm.takingList = data
              }
            })
          },
          close: function () {
            var index = parent.layer.getFrameIndex(window.name) //先得到当前iframe层的索引
            parent.layer.close(index) //再执行关闭
          },
          onSave: function () {
            var vm = this
            var errors = suifangValidate.call(this)
            console.log(errors)
            if (errors.length) {
              layer.msg(errors[0].message)
              return Promise.reject()
            }
            if (vm.takingListChecked.length == 0) {
              layer.msg('请选择目前服用药物')
              return Promise.reject()
            }
            if (vm.adverseEventArr.length == 0) {
              layer.msg('请选择药物副作用情况')
              return Promise.reject()
            }
            var loadding = top.layer.load(0, { shade: false }) //0代表加载的风格,支持0-2
            var positiveSignsarr = []
            var takeMedicinearr = []
            var drugSideEffectsarr = []
            var bleedingSitearr = []
            for (var i = 0; i < vm.PositiveList.length; i++) {
              if (vm.PositiveList[i].checkBox == true) {
                positiveSignsarr.push(i)
              }
            }
            vm.form.positiveSigns = positiveSignsarr.join()
            // for (var i = 0; i < vm.takingList.length; i++) {
            //   if (vm.takingList[i].checkBox == true) {
            //     takeMedicinearr.push(i)
            //   }
            // }
            vm.form.takeMedicine = vm.takingListChecked.join()
            for (var i = 0; i < vm.drugEffectsList.length; i++) {
              if (vm.drugEffectsList[i].checkBox == true) {
                drugSideEffectsarr.push(i)
              }
            }
            vm.form.drugSideEffects = drugSideEffectsarr.join()
            for (var i = 0; i < vm.bleedingList.length; i++) {
              if (vm.bleedingList[i].checkBox == true) {
                bleedingSitearr.push(i)
              }
            }
            vm.form.bleedingSite = bleedingSitearr.join()
            var badEventList = vm.form.type == 2 ? vm.badEventList1 : vm.badEventList
            // for (var i = 0; i < badEventList.length; i++) {
            //   if (badEventList[i].checkBox == true) {
            //     adverseEventarr.push(i)
            //   }
            // }
            vm.form.adverseEvent = vm.adverseEventArr.join()
            var content = vm.form
            content = _.mapObject(content, function (v) {
              if (v === false) {
                return ''
              } else if (v === true) {
                return 1
              }
              return v
            })
            return httpRequest
              .post('doctor/visitDetail/saveFollowupDiseaseArchives', {
                data: {
                  type: 'XiaXinCoronaryHear',
                  followupId: vm.serviceInfo.relationCode,
                  jsonData: JSON.stringify({
                    followup: vm.followup,
                    content: content
                  })
                }
              })
              .then(function (res) {
                if (res.status == '200') {
                  httpRequest
                    .post('doctor/followup/finishFollowup', {
                      data: {
                        id: vm.followData.id
                      }
                    })
                    .then(function () {
                      httpRequest
                        .post('doctor/specialist/rehabilitation/updateNoteAndImageRehabilitationOperate', {
                          data: {
                            planDetailId: httpData.planDetailId,
                            node: '完成',
                            image: '',
                            relationCode: vm.serviceInfo.relationCode
                          }
                        })
                        .then(function (res) {
                          console.log(res, '我是完成随访')
                        })
                      top.layer.close(loadding)
                    })
                }
                return res
              })
          }
        }
      })
    </script>

+ 372 - 271
app/rehabilitation/html/guide_the_message.html

@ -1,279 +1,380 @@
<!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="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="{
  <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="{
									step: '00:05',
									minTime:startTime,
									start:'08:00',
									end:'20:00'
								}"
								value-format="HH:mm"
								@change="appointHelpCheck(service)"
								ref="timePicker"
								placeholder="选择时间">
							</el-time-select>
						</div>
						<button class="btn btn-12b7f5" v-if="(!service.appointmentTime && selectCheckTyperadio==1 &&!showAppointHelpCheckBtn && doctorlevel==2 && service.isMyTask==1) || (service.appointmentTime && service.isMyTask==1 && !service.completeTime && !showRecordFinished  && doctorlevel==2)" @click="openHelpCheck">开启协诊</button>
						<button class="btn btn-12b7f5" v-if="(!service.appointmentTime && selectCheckTyperadio==1 &&!showAppointHelpCheckBtn  && service.isMyTask==1 ) || (service.appointmentTime && service.isMyTask==1 && !showRecordFinished && !service.completeTime)" style="width: auto" @click="recordFinished">记录完成情况</button>
						<!-- 复诊的确认完成 -->
						<button class="btn btn-zhidao" v-if="islimit&&service.planStatus!=0 && service.status!=1 && service.isMyTask==1 && service.type==7 && showRecordFinished && showRecordFinished" @click="qrwc(service.patient,service.type)">确认完成</button>
					</div>
					<div v-if="!islimit&&service.planStatus!=0" class="flex-box btns-group clearfix"> <!-- 不限制频次 -->
						<button class="btn btn-12b7f5" v-if="service.type==6 && service.recordStatus!=1 && service.isMyTask==1 && service.operate==1" @click="openFollowRecordForm" style="width: auto">记录随访表单</button>
						<button class="btn btn-12b7f5" v-if="service.type==6 && service.recordStatus==1" @click="qwapp" style="width: auto">查看随访结果</button>
					</div>
	      		</div>
	      		<div class="complete-info" v-if="(islimit&&service.status==1)||(!islimit&&service.recordStatus==1)">
	      			<div class="complete-title">完成情况</div>
	      			<div class="ptb10">
	      				<p class="f14 mb5"><span class="c-999">完成时间:</span>{{service.completeTime}}</p>
	      				<p class="f14 mb5"><span class="c-999">执行医生:</span>{{service.operatorDoctorName}}</p>
	      			</div>
	      		</div>
	      		<div class="note-info pt10" v-if="service.type==1">
	      			<p class="f14 c-333">服务完成笔记</p>
	      			<textarea v-if="((islimit&&service.status!=1) || (!islimit&&service.recordStatus!=1)) && service.isMyTask==1" class="form-control" style="resize: none;" rows="4" placeholder="可备注您的服务记录" v-model="service.node"></textarea>
	      			<div v-else>{{service.node || '暂无服务记录'}}</div>
	      		</div>
	      		<div class="note-info ptb10" v-if="service.type==1 && ((islimit&&service.status!=1) || (!islimit&&service.recordStatus!=1)) && service.isMyTask==1">
	      			<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==1&& ((islimit&&service.status==1) || (!islimit&&service.recordStatus==1))">
	      			<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>
				<!-- type 服务项 1 电话/短信关怀 2康复咨询 3远程健康监测 4 上门服务 5康复指导 6 康复随访 7 复诊 -->
				<div class="note-info pt10" v-if="(service.type==4 || service.type==5 || service.type==7) && service.status==1">
					<p class="f14 c-333">关联记录</p>
					<div class="ptb10" v-if="service.type==4&&service.relationList&&service.relationList.length>0">
						<div v-for="(o, i) in service.relationList">
							<p class="f14 mb5"><span class="c-999">服务时间:</span>{{o.patientExpectedServeTime}}</p>
							<p class="f14 mb5"><span class="c-999">服务地址:</span>{{o.serveAddress}}</p>
							<p class="f14 mb5"><span class="c-999">服务描述:</span>{{o.serveDesc}}</p>
							<p class="f14 mb5"><span class="c-999">服务医生:</span>{{o.doctorName}}</p>
						</div>
					</div>
					<div class="pt10" v-if="service.type==5&&service.relationList&&service.relationList.length>0">
						<div v-for="(o, i) in service.relationList" class="ui-grid mb20 pb5" style="border-bottom: 1px solid #D7DCE6;align-items: center;" @click="viewGuidance(o)">
							<div class="ui-col-1 c-666">{{o.attachedTitle}}</div>
							<div class="ui-col-0 c-999">{{o.czrq}}</div>
							<img src="../images/arrow_icon.png" width="7px" height="14px" class="ml10"/>
						</div>
					</div>
					<div class="ptb10" v-if="service.type==7&&service.relationList&&service.relationList.length>0">
						<div v-for="(o, i) in service.relationList">
							<p class="f14 mb5"><span class="c-999">预约医院:</span>{{o.orgName}}</p>
							<p class="f14 mb5"><span class="c-999">预约科室:</span>{{o.deptName}}</p>
							<p class="f14 mb5"><span class="c-999">预约医生:</span>{{o.doctorName}}</p>
							<p class="f14 mb5"><span class="c-999">就诊时间:</span>{{o.startTime}}</p>
							<p class="f14 mb5"><span class="c-999">挂号时间:</span>{{o.czrq}}</p>
						</div>
					</div>
					<div v-if="!service.relationList || service.relationList.length==0" class="guanlian-list c-999">暂无关联记录</div>
				</div>
	      		<div id="outerdiv" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:2;width:100%;height:100%;display:none;">
				    <div id="innerdiv" style="position:absolute;">
				        <img id="bigimg" style="border:5px solid #fff;" src="" />
				    </div>
				</div>
	      		<div class="text-center ptb50" v-if="islimit&&service.planStatus!=0 && service.status!=1 && service.isMyTask==1 && service.type==1">
	      			<button class="btn btn-zhidao" @click="qrwc(service.patient,service.type)">确认完成</button>
	      		</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 src="../../../js/element-ui.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../js/jsencrypt.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../plugins/toastr/toastr.min.js"></script>
		<script type="text/javascript" src="../../../plugins/layer/layer.min.js"></script>
		<script type="text/javascript" src="../../../api/http-request.js"></script>
		<script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
		<script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="../../../plugins/layer/layer.min.js" ></script>
		<script type="text/javascript" src="../js/guide_the_message.js"></script>
	</body>
                value-format="HH:mm"
                @change="appointHelpCheck(service)"
                ref="timePicker"
                placeholder="选择时间"></el-time-select>
            </div>
            <button
              class="btn btn-12b7f5"
              v-if="(!service.appointmentTime && selectCheckTyperadio==1 &&!showAppointHelpCheckBtn && doctorlevel==2 && service.isMyTask==1) || (service.appointmentTime && service.isMyTask==1 && !service.completeTime && !showRecordFinished  && doctorlevel==2)"
              @click="openHelpCheck">
              开启协诊
            </button>
            <button
              class="btn btn-12b7f5"
              v-if="(!service.appointmentTime && selectCheckTyperadio==1 &&!showAppointHelpCheckBtn  && service.isMyTask==1 ) || (service.appointmentTime && service.isMyTask==1 && !showRecordFinished && !service.completeTime)"
              style="width: auto"
              @click="recordFinished">
              记录完成情况
            </button>
            <!-- 复诊的确认完成 -->
            <button
              class="btn btn-zhidao"
              v-if="islimit&&service.planStatus!=0 && service.status!=1 && service.isMyTask==1 && service.type==7 && showRecordFinished && showRecordFinished"
              @click="qrwc(service.patient,service.type)">
              确认完成
            </button>
          </div>
          <div v-if="!islimit&&service.planStatus!=0" class="flex-box btns-group clearfix">
            <!-- 不限制频次 -->
            <button
              class="btn btn-12b7f5"
              v-if="service.type==6 && service.recordStatus!=1 && service.isMyTask==1 && service.operate==1"
              @click="openFollowRecordForm"
              style="width: auto">
              记录随访表单
            </button>
            <button class="btn btn-12b7f5" v-if="service.type==6 && service.recordStatus==1" @click="qwapp" style="width: auto">查看随访结果</button>
          </div>
        </div>
        <div class="complete-info" v-if="(islimit&&service.status==1)||(!islimit&&service.recordStatus==1)">
          <div class="complete-title">完成情况</div>
          <div class="ptb10">
            <p class="f14 mb5">
              <span class="c-999">完成时间:</span>
              {{service.completeTime}}
            </p>
            <p class="f14 mb5">
              <span class="c-999">执行医生:</span>
              {{service.operatorDoctorName}}
            </p>
          </div>
        </div>
        <div class="note-info pt10" v-if="service.type==1">
          <p class="f14 c-333">服务完成笔记</p>
          <textarea
            v-if="((islimit&&service.status!=1) || (!islimit&&service.recordStatus!=1)) && service.isMyTask==1"
            class="form-control"
            style="resize: none"
            rows="4"
            placeholder="可备注您的服务记录"
            v-model="service.node"></textarea>
          <div v-else>{{service.node || '暂无服务记录'}}</div>
        </div>
        <div class="note-info ptb10" v-if="service.type==1 && ((islimit&&service.status!=1) || (!islimit&&service.recordStatus!=1)) && service.isMyTask==1">
          <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==1&& ((islimit&&service.status==1) || (!islimit&&service.recordStatus==1))">
          <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>
        <!-- type 服务项 1 电话/短信关怀 2康复咨询 3远程健康监测 4 上门服务 5康复指导 6 康复随访 7 复诊 -->
        <div class="note-info pt10" v-if="(service.type==4 || service.type==5 || service.type==7) && service.status==1">
          <p class="f14 c-333">关联记录</p>
          <div class="ptb10" v-if="service.type==4&&service.relationList&&service.relationList.length>0">
            <div v-for="(o, i) in service.relationList">
              <p class="f14 mb5">
                <span class="c-999">服务时间:</span>
                {{o.patientExpectedServeTime}}
              </p>
              <p class="f14 mb5">
                <span class="c-999">服务地址:</span>
                {{o.serveAddress}}
              </p>
              <p class="f14 mb5">
                <span class="c-999">服务描述:</span>
                {{o.serveDesc}}
              </p>
              <p class="f14 mb5">
                <span class="c-999">服务医生:</span>
                {{o.doctorName}}
              </p>
            </div>
          </div>
          <div class="pt10" v-if="service.type==5&&service.relationList&&service.relationList.length>0">
            <div v-for="(o, i) in service.relationList" class="ui-grid mb20 pb5" style="border-bottom: 1px solid #d7dce6; align-items: center" @click="viewGuidance(o)">
              <div class="ui-col-1 c-666">{{o.attachedTitle}}</div>
              <div class="ui-col-0 c-999">{{o.czrq}}</div>
              <img src="../images/arrow_icon.png" width="7px" height="14px" class="ml10" />
            </div>
          </div>
          <div class="ptb10" v-if="service.type==7&&service.relationList&&service.relationList.length>0">
            <div v-for="(o, i) in service.relationList">
              <p class="f14 mb5">
                <span class="c-999">预约医院:</span>
                {{o.orgName}}
              </p>
              <p class="f14 mb5">
                <span class="c-999">预约科室:</span>
                {{o.deptName}}
              </p>
              <p class="f14 mb5">
                <span class="c-999">预约医生:</span>
                {{o.doctorName}}
              </p>
              <p class="f14 mb5">
                <span class="c-999">就诊时间:</span>
                {{o.startTime}}
              </p>
              <p class="f14 mb5">
                <span class="c-999">挂号时间:</span>
                {{o.czrq}}
              </p>
            </div>
          </div>
          <div v-if="!service.relationList || service.relationList.length==0" class="guanlian-list c-999">暂无关联记录</div>
        </div>
        <div id="outerdiv" style="position: fixed; top: 0; left: 0; background: rgba(0, 0, 0, 0.7); z-index: 2; width: 100%; height: 100%; display: none">
          <div id="innerdiv" style="position: absolute">
            <img id="bigimg" style="border: 5px solid #fff" src="" />
          </div>
        </div>
        <div class="text-center ptb50" v-if="islimit&&service.planStatus!=0 && service.status!=1 && service.isMyTask==1 && service.type==1">
          <button class="btn btn-zhidao" @click="qrwc(service.patient,service.type)">确认完成</button>
        </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 src="../../../js/element-ui.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../js/jsencrypt.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../../plugins/toastr/toastr.min.js"></script>
    <script type="text/javascript" src="../../../plugins/layer/layer.min.js"></script>
    <script type="text/javascript" src="../../../api/http-request.js"></script>
    <script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
    <script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="../../../plugins/layer/layer.min.js"></script>
    <script type="text/javascript" src="../js/guide_the_message.js"></script>
  </body>
</html>

+ 8 - 3
app/rehabilitation/html/rehabilitation_management.html

@ -156,9 +156,14 @@
								<div>></div>
							</div>
							<div class="filter-info" v-else>
									<span>该患者近一年未进行冠心病的风险评估</span>
									<el-button type="text" @click="gotoSc">前往筛查</el-button>
							</div>
							<template v-if="planInfo.disease=='3'">
										<span>该患者近一年未进行冠心病的风险评估</span>
										<el-button type="text" @click="gotoSc" v-if="loginDoctor.doctorType!='1'">前往筛查</el-button>
									</template>
									<template v-else>
										<span>暂无筛查记录</span>
									</template>
								</div>
						</div>
						<div class="ui-grid mt15 pb15">
							<div class="ui-col-1 c-f16 c-333">康复计划</div>

+ 642 - 624
app/rehabilitation/js/guide_the_message.js

@ -1,642 +1,660 @@
var httpData = GetRequest();
var docInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'));
var tempwindow;
var previewLayerIndex, followupLayerIndex, KFZDlayerIndex;
function closeGuidancePreview(){
	layer.close(previewLayerIndex)
var httpData = GetRequest()
var docInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'))
var tempwindow
var previewLayerIndex, followupLayerIndex, KFZDlayerIndex
function closeGuidancePreview() {
  layer.close(previewLayerIndex)
}
function closeFollowUpLayer(planDetaiId, relationCode){
	if($.isArray(relationCode)) {
		$.each(relationCode, function(index, item){
			top.rehabilitationGuideVue.saveRehabilitationOperateRecord(planDetaiId, 6, item)
		})
	} else {
		top.rehabilitationGuideVue.saveRehabilitationOperateRecord(planDetaiId, 6, relationCode)
	}
	layer.close(followupLayerIndex)
function closeFollowUpLayer(planDetaiId, relationCode) {
  if ($.isArray(relationCode)) {
    $.each(relationCode, function (index, item) {
      top.rehabilitationGuideVue.saveRehabilitationOperateRecord(planDetaiId, 6, item)
    })
  } else {
    top.rehabilitationGuideVue.saveRehabilitationOperateRecord(planDetaiId, 6, relationCode)
  }
  layer.close(followupLayerIndex)
}
function closeKFZDlayer(planDetaiId){
	top.rehabilitationGuideVue.saveRehabilitationOperateRecord(planDetaiId, 5)
	layer.close(KFZDlayerIndex)
function closeKFZDlayer(planDetaiId) {
  top.rehabilitationGuideVue.saveRehabilitationOperateRecord(planDetaiId, 5)
  layer.close(KFZDlayerIndex)
}
function showSuccessMessage(msg) {
	layer.msg(msg, {
		icon: 1
	})
  layer.msg(msg, {
    icon: 1
  })
}
function showErrorMessage(msg) {
	layer.msg(msg, {
		icon: 5
	})
  layer.msg(msg, {
    icon: 5
  })
}
top.rehabilitationGuideVue = new Vue({
	el: "#app",
	data: {
		doctorlevel:docInfo.doctorlevel,
		imgData: {
			accept: 'image/gif, image/jpeg, image/png, image/jpg',
		},
		isCollapse: false,
		selectCheckTyperadio:0,	
		showAppointHelpCheckBtn:true, //点击预约协诊按钮结束变为false
		showRecordFinished:false,	//点击完成记录按钮变为true
		appointTime:'',
		appointDate:"",
		appointHour:'',
		upImgs: [],
		upImgArr: [],
		planid: httpData['planid'], // 服务项id
		service: {
			relationRecordImg:{},
			messageList:{},
		},
		startTime:'',
		pickerOptions:{
			disabledDate:function(time) {
				return time.format('yyyy-MM-dd') < new Date().format('yyyy-MM-dd')
			}
		},
		pId: httpData['pId'], // 康复计划id
		patient: httpData['patient'],
		patientName: decodeURI(httpData['patientName']),
		layerIndex: undefined,
		recordId: httpData['recordId']||undefined,
		islimit: false,
	},
	watch:{
		appointDate:function(){
			if(this.appointDate==new Date().format('yyyy-MM-dd')){
				this.startTime=new Date(new Date().getTime()).format('hh:mm')
			}else{
				this.startTime=''
			}
		}
	},
	mounted: function() {
		this.getServiceItem();
	},
	methods: {
		// 提醒患者 num 1康复指导2康复下转3复诊提醒4上门服务提醒5家签提醒
		sendSpecialistWeixinMessage: function(type){
			var vm = this
			var text = ''
			if(type==4){ // 上门服务
				text = '请问您是否确认提醒'+vm.patientName+'居民预约上门护理服务?'
			} else if(type==7){ // 康复复诊
				text = '请问您是否确认提醒'+vm.patientName+'居民进行复诊?'
			}
			var current=layer.confirm(text, {
				btn: ['确定', '取消'],
				title: "提示"
			}, function (index) {
				var reservationTypeObj={0:2,1:3,2:1}
				var _type = type == 4? 4:type==7?3:''
				var loading = layer.load(0, {shade: false})
				var params = {
					patient: vm.patient,
					doctor: docInfo.uid,
					type: _type,
					relationCode: vm.planid,
					planId: vm.pId,
					reservationType:reservationTypeObj[vm.selectCheckTyperadio] //复诊类型:1线上,2线下,3远程
				}
				rehaAPI.sendSpecialistWeixinMessage(params).then(function(res){
					layer.close(loading)
					if(res.status == 200){
						showSuccessMessage('提交成功!')
						if(_type == 3 || _type == 4){ // 提醒患者后,即认为是已完成
							vm.saveRehabilitationOperateRecord(vm.planid, type)
						}
					} else {
						showErrorMessage(res.msg)
					}
				})
				layer.close(current); //再执行关闭
			})
		},
		appointHelpCheck:function(data){
			var vm=this
			vm.showAppointHelpCheckBtn=false
			vm.appointTime=vm.appointDate+' '+vm.appointHour
			var params={
				patient:vm.patient,
				doctor:data.familyDoctorCode,
				doctorName:data.familyDoctorName, //家签医生
				sendTime:vm.appointTime,
				planDetailId:vm.planid,
				appointmentDoctor:data.specialistDoctorCode,
				appointmentDoctorName:data.specialistDoctorName //专科医生
			}
			var loading = layer.load(0, {shade: false})
			rehaAPI.appointmentConsultation(params).then(function(res){
				layer.close(loading)
				if(res.status == 200){
					showSuccessMessage('操作成功')
					setTimeout(function(){
						vm.getServiceItem()
					},400)
				} else {
					showErrorMessage(res.msg)
				}
			})			
		},
		encryptCode: function(docCode) {
			var publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4lT0JWcv9xx6Q1hsxMal2F1AmKti/xVbBeh8jrD5CiYsFTH0DO1Mpyvv8YtkGdnDSLRjOQOA1PiaYvZoHIhml/jTvEMsvFlAD5i1BsHa5blLlJxQNp/XI7wpMZPfczqO+I/JONrV6ib+6Ci/1FyTjPQfHaiT2ehGyM/CFzOW1PQIDAQAB"
			var encrypt =new JSEncrypt()
			encrypt.setPublicKey(publicKey)
			return encodeURIComponent(encrypt.encrypt(docCode))
		},
		openWindow(url, p1, p2){
			try{
				if(tempwindow)
					tempwindow.close()
			}catch(e){
				console.log(e)
			}
			
			if(p1){
				tempwindow = window.open('_blank', p1, p2)
			} else {
				tempwindow = window.open('_blank')
			}
			tempwindow.location = url
		},	
		openHelpCheck:function(){
			var encryptCode = this.encryptCode(docInfo.uid)
			var url = httpRequest.teamworkService + '/#/teamwork/login?_code='+ encryptCode
            this.openWindow(url)
		},
		recordFinished:function(){
			this.showRecordFinished=true
		},
		//康复指导
		kfzd:function(){
			var vm=this, str = '../../rehabilitation/html/rehabilitation_guidance.html?patient='+vm.patient+'&planDetaiId='+vm.planid+'&planId='+vm.pId
			KFZDlayerIndex = layer.open({
				type: 2,
				//				  offset: ['100px'], //右下角弹出
				area: ['660px', '650px'],
				shade: 0.5,
				title: '康复指导',
				fixed: true, //不固定
				maxmin: true,
				closeBtn: 1,
				shift: 5,
				shadeClose: false, //点击遮罩关闭层
				content: str,
				end: function() { // 未点击确定按钮,点击关闭按钮  
					this.getServiceItem();   
				}
			});
		},
		// 康复随访计划
		sfjh: function(){
			var vm=this
			followupLayerIndex = layer.open({
				type: 2,
				//				  offset: ['100px'], //右下角弹出
				area: ['80%', '650px'],
				shade: 0.5,
				title: '随访计划',
				fixed: true, //不固定
				maxmin: true,
				closeBtn: 1,
				shift: 5,
				shadeClose: false, //点击遮罩关闭层
				content:'../../followup/html/followup_newplan.html?patient='+vm.patient+'&planDetaiId='+vm.planid+'&planId='+vm.pId,
				end: function() { // 未点击确定按钮,点击关闭按钮  
					this.getServiceItem();    
				}
			});
		},
		zwkf: function() {
			top.layer.msg('此功能暂未开放', {
				icon: 1
			});
		},
		//康复指导
		jkzd: function(planId,patient) {
			var vm = this
			top.layer.open({
				type: 2,
				//				  offset: ['100px'], //右下角弹出
				area: ['80%', '648px'],
				shade: 0.5,
				title: '健康教育',
				fixed: true, //不固定
				maxmin: true,
				closeBtn: 1,
				shift: 5,
				shadeClose: false, //点击遮罩关闭层
				content: '../../guidance/html/index.html#/person-edit-panel?patient=' + patient + '&planId=' + planId
			});
		},
		openFollowResult(){
			top.layer.open({
				type: 2,
				area: ['600px', '700px'],
				shade: 0.5,
				title: '查看随访表单',
				fixed: true, //不固定
				maxmin: true,
				closeBtn: 1,
				// shift: 5,
				shadeClose: false, //点击遮罩关闭层
				content: '../html/followResult.html'
			})
		},
		rehabilitationReservation(){
			top.layer.open({
  el: '#app',
  data: {
    doctorlevel: docInfo.doctorlevel,
    imgData: {
      accept: 'image/gif, image/jpeg, image/png, image/jpg'
    },
    isCollapse: false,
    selectCheckTyperadio: 0,
    showAppointHelpCheckBtn: true, //点击预约协诊按钮结束变为false
    showRecordFinished: false, //点击完成记录按钮变为true
    appointTime: '',
    appointDate: '',
    appointHour: '',
    upImgs: [],
    upImgArr: [],
    planid: httpData['planid'], // 服务项id
    service: {
      relationRecordImg: {},
      messageList: {}
    },
    startTime: '',
    pickerOptions: {
      disabledDate: function (time) {
        return time.format('yyyy-MM-dd') < new Date().format('yyyy-MM-dd')
      }
    },
    pId: httpData['pId'], // 康复计划id
    patient: httpData['patient'],
    patientName: decodeURI(httpData['patientName']),
    layerIndex: undefined,
    recordId: httpData['recordId'] || undefined,
    islimit: false
  },
  watch: {
    appointDate: function () {
      if (this.appointDate == new Date().format('yyyy-MM-dd')) {
        this.startTime = new Date(new Date().getTime()).format('hh:mm')
      } else {
        this.startTime = ''
      }
    }
  },
  mounted: function () {
    this.getServiceItem()
  },
  methods: {
    // 提醒患者 num 1康复指导2康复下转3复诊提醒4上门服务提醒5家签提醒
    sendSpecialistWeixinMessage: function (type) {
      var vm = this
      var text = ''
      if (type == 4) {
        // 上门服务
        text = '请问您是否确认提醒' + vm.patientName + '居民预约上门护理服务?'
      } else if (type == 7) {
        // 康复复诊
        text = '请问您是否确认提醒' + vm.patientName + '居民进行复诊?'
      }
      var current = layer.confirm(
        text,
        {
          btn: ['确定', '取消'],
          title: '提示'
        },
        function (index) {
          var reservationTypeObj = { 0: 2, 1: 3, 2: 1 }
          var _type = type == 4 ? 4 : type == 7 ? 3 : ''
          var loading = layer.load(0, { shade: false })
          var params = {
            patient: vm.patient,
            doctor: docInfo.uid,
            type: _type,
            relationCode: vm.planid,
            planId: vm.pId,
            reservationType: reservationTypeObj[vm.selectCheckTyperadio] //复诊类型:1线上,2线下,3远程
          }
          rehaAPI.sendSpecialistWeixinMessage(params).then(function (res) {
            layer.close(loading)
            if (res.status == 200) {
              showSuccessMessage('提交成功!')
              if (_type == 3 || _type == 4) {
                // 提醒患者后,即认为是已完成
                vm.saveRehabilitationOperateRecord(vm.planid, type)
              }
            } else {
              showErrorMessage(res.msg)
            }
          })
          layer.close(current) //再执行关闭
        }
      )
    },
    appointHelpCheck: function (data) {
      var vm = this
      vm.showAppointHelpCheckBtn = false
      vm.appointTime = vm.appointDate + ' ' + vm.appointHour
      var params = {
        patient: vm.patient,
        doctor: data.familyDoctorCode,
        doctorName: data.familyDoctorName, //家签医生
        sendTime: vm.appointTime,
        planDetailId: vm.planid,
        appointmentDoctor: data.specialistDoctorCode,
        appointmentDoctorName: data.specialistDoctorName //专科医生
      }
      var loading = layer.load(0, { shade: false })
      rehaAPI.appointmentConsultation(params).then(function (res) {
        layer.close(loading)
        if (res.status == 200) {
          showSuccessMessage('操作成功')
          setTimeout(function () {
            vm.getServiceItem()
          }, 400)
        } else {
          showErrorMessage(res.msg)
        }
      })
    },
    encryptCode: function (docCode) {
      var publicKey =
        'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4lT0JWcv9xx6Q1hsxMal2F1AmKti/xVbBeh8jrD5CiYsFTH0DO1Mpyvv8YtkGdnDSLRjOQOA1PiaYvZoHIhml/jTvEMsvFlAD5i1BsHa5blLlJxQNp/XI7wpMZPfczqO+I/JONrV6ib+6Ci/1FyTjPQfHaiT2ehGyM/CFzOW1PQIDAQAB'
      var encrypt = new JSEncrypt()
      encrypt.setPublicKey(publicKey)
      return encodeURIComponent(encrypt.encrypt(docCode))
    },
    openWindow(url, p1, p2) {
      try {
        if (tempwindow) tempwindow.close()
      } catch (e) {
        console.log(e)
      }
      if (p1) {
        tempwindow = window.open('_blank', p1, p2)
      } else {
        tempwindow = window.open('_blank')
      }
      tempwindow.location = url
    },
    openHelpCheck: function () {
      var encryptCode = this.encryptCode(docInfo.uid)
      var url = httpRequest.teamworkService + '/#/teamwork/login?_code=' + encryptCode
      this.openWindow(url)
    },
    recordFinished: function () {
      this.showRecordFinished = true
    },
    //康复指导
    kfzd: function () {
      var vm = this,
        str = '../../rehabilitation/html/rehabilitation_guidance.html?patient=' + vm.patient + '&planDetaiId=' + vm.planid + '&planId=' + vm.pId
      KFZDlayerIndex = layer.open({
        type: 2,
        //				  offset: ['100px'], //右下角弹出
        area: ['660px', '650px'],
        shade: 0.5,
        title: '康复指导',
        fixed: true, //不固定
        maxmin: true,
        closeBtn: 1,
        shift: 5,
        shadeClose: false, //点击遮罩关闭层
        content: str,
        end: function () {
          // 未点击确定按钮,点击关闭按钮
          this.getServiceItem()
        }
      })
    },
    // 康复随访计划
    sfjh: function () {
      var vm = this
      followupLayerIndex = layer.open({
        type: 2,
        //				  offset: ['100px'], //右下角弹出
        area: ['80%', '650px'],
        shade: 0.5,
        title: '随访计划',
        fixed: true, //不固定
        maxmin: true,
        closeBtn: 1,
        shift: 5,
        shadeClose: false, //点击遮罩关闭层
        content: '../../followup/html/followup_newplan.html?patient=' + vm.patient + '&planDetaiId=' + vm.planid + '&planId=' + vm.pId,
        end: function () {
          // 未点击确定按钮,点击关闭按钮
          this.getServiceItem()
        }
      })
    },
    zwkf: function () {
      top.layer.msg('此功能暂未开放', {
        icon: 1
      })
    },
    //康复指导
    jkzd: function (planId, patient) {
      var vm = this
      top.layer.open({
        type: 2,
        //				  offset: ['100px'], //右下角弹出
        area: ['80%', '648px'],
        shade: 0.5,
        title: '健康教育',
        fixed: true, //不固定
        maxmin: true,
        closeBtn: 1,
        shift: 5,
        shadeClose: false, //点击遮罩关闭层
        content: '../../guidance/html/index.html#/person-edit-panel?patient=' + patient + '&planId=' + planId
      })
    },
    // openFollowResult() {
    //   top.layer.open({
    //     type: 2,
    //     area: ['600px', '700px'],
    //     shade: 0.5,
    //     title: '查看随访表单',
    //     fixed: true, //不固定
    //     maxmin: true,
    //     closeBtn: 1,
    //     // shift: 5,
    //     shadeClose: false, //点击遮罩关闭层
    //     content: '../html/followResult.html'
    //   })
    // },
    rehabilitationReservation() {
      top.layer.open({
        type: 2,
        closeBtn: 1, // 显示关闭按钮
        area: ['800px', '90%'],
        title: '预约挂号',
        content: '../../jbsc/html/appointment/appoint-select.html?patient=' + this.patient + '&surveyCode='
      })
		},
		openFollowRecordForm(){
			top.layer.open({
				type: 2,
				area: ['850px', '700px'],
				shade: 0.5,
				title: '记录随访表单',
				fixed: true, //不固定
				maxmin: true,
				closeBtn: 1,
				// shift: 5,
				shadeClose: false, //点击遮罩关闭层
				content: '../html/followRecord.html'
			})
		},
		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;
					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()
							}
						})
    },
    openFollowRecordForm() {
      top.layer.open({
        type: 2,
        area: ['600px', '700px'],
        shade: 0.5,
        title: '记录随访表单',
        fixed: true, //不固定
        maxmin: true,
        closeBtn: 1,
        // shift: 5,
        shadeClose: false, //点击遮罩关闭层
        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
    }
  }
})
					}
					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 () {
  var _this = $(this) //将当前的img元素作为_this传入函数
  imgShow('#outerdiv', '#innerdiv', '#bigimg', _this)
})
function imgShow(outerdiv, innerdiv, bigimg, _this) {
  var src = _this.attr('src') //获取当前点击的pimg元素中的src属性
  $(bigimg).attr('src', src) //设置#bigimg元素的src属性
  /*获取当前点击图片的真实大小,并显示弹出层及大图*/
  $('<img/>')
    .attr('src', src)
    .load(function () {
      var windowW = $(window).width() //获取当前窗口宽度
      var windowH = $(window).height() //获取当前窗口高度
      var realWidth = this.width //获取图片真实宽度
      var realHeight = this.height //获取图片真实高度
      var imgWidth, imgHeight
      var scale = 0.8 //缩放尺寸,当图片真实宽度和高度大于窗口宽度和高度时进行缩放
      if (realHeight > windowH * scale) {
        //判断图片高度
        imgHeight = windowH * scale //如大于窗口高度,图片高度进行缩放
        imgWidth = (imgHeight / realHeight) * realWidth //等比例缩放宽度
        if (imgWidth > windowW * scale) {
          //如宽度扔大于窗口宽度
          imgWidth = windowW * scale //再对宽度进行缩放
        }
      } else if (realWidth > windowW * scale) {
        //如图片高度合适,判断图片宽度
        imgWidth = windowW * scale //如大于窗口宽度,图片宽度进行缩放
        imgHeight = (imgWidth / realWidth) * realHeight //等比例缩放高度
      } else {
        //如果图片真实高度和宽度都符合要求,高宽不变
        imgWidth = realWidth
        imgHeight = realHeight
      }
      $(bigimg).css('width', imgWidth) //以最终的宽度对图片缩放
$("body").on('click','img',function(){  
	var _this = $(this);//将当前的img元素作为_this传入函数  
	imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);  
}); 
function imgShow(outerdiv, innerdiv, bigimg, _this){  
	var src = _this.attr("src");//获取当前点击的pimg元素中的src属性  
	$(bigimg).attr("src", src);//设置#bigimg元素的src属性  
		/*获取当前点击图片的真实大小,并显示弹出层及大图*/  
	$("<img/>").attr("src", src).load(function(){  
		var windowW = $(window).width();//获取当前窗口宽度  
		var windowH = $(window).height();//获取当前窗口高度  
		var realWidth = this.width;//获取图片真实宽度  
		var realHeight = this.height;//获取图片真实高度  
		var imgWidth, imgHeight;  
		var scale = 0.8;//缩放尺寸,当图片真实宽度和高度大于窗口宽度和高度时进行缩放  
			
		if(realHeight>windowH*scale) {//判断图片高度  
			imgHeight = windowH*scale;//如大于窗口高度,图片高度进行缩放  
			imgWidth = imgHeight/realHeight*realWidth;//等比例缩放宽度  
			if(imgWidth>windowW*scale) {//如宽度扔大于窗口宽度  
				imgWidth = windowW*scale;//再对宽度进行缩放  
			}  
		} else if(realWidth>windowW*scale) {//如图片高度合适,判断图片宽度  
			imgWidth = windowW*scale;//如大于窗口宽度,图片宽度进行缩放  
						imgHeight = imgWidth/realWidth*realHeight;//等比例缩放高度  
		} else {//如果图片真实高度和宽度都符合要求,高宽不变  
			imgWidth = realWidth;  
			imgHeight = realHeight;  
		}  
				$(bigimg).css("width",imgWidth);//以最终的宽度对图片缩放  
			
		var w = (windowW-imgWidth)/2;//计算图片与窗口左边距  
		var h = (windowH-imgHeight)/2;//计算图片与窗口上边距  
		$(innerdiv).css({"top":h, "left":w});//设置#innerdiv的top和left属性  
		$(outerdiv).fadeIn("fast");//淡入显示#outerdiv及.pimg  
	});  
	$(outerdiv).click(function(){//再次点击淡出消失弹出层  
		$(this).fadeOut("fast");  
	});  
}
      var w = (windowW - imgWidth) / 2 //计算图片与窗口左边距
      var h = (windowH - imgHeight) / 2 //计算图片与窗口上边距
      $(innerdiv).css({ 'top': h, 'left': w }) //设置#innerdiv的top和left属性
      $(outerdiv).fadeIn('fast') //淡入显示#outerdiv及.pimg
    })
  $(outerdiv).click(function () {
    //再次点击淡出消失弹出层
    $(this).fadeOut('fast')
  })
}

+ 9 - 3
app/rehabilitation/js/rehabilitation_management.js

@ -45,6 +45,7 @@
			currentDay:null,//带中文格式的当前年月
			currentDayForEn:null,//不带中文格式年月日2018/10/01如果写成/的话  转换成时间戳会变成北京时间8点
			calendarData:[],//日历数据
			loginDoctor:JSON.parse(localStorage.getItem('wlyyAgent')),
			timeAxisData:[],//时间轴数据
			__Data:[],//当前的年月(日历)
			__xData:[],//当前的年月(时间轴)
@ -89,7 +90,11 @@
		},
		methods:{
			gotoCheck:function(){
      window.location.href='../../jbsc/html/statistics.html?scListItem='+encodeURIComponent(JSON.stringify(this.scList[0]))
				var obj= {
					patientName:this.planInfo.patientName,
					patientCode:this.planInfo.patientCode
				}
      window.location.href='../../jbsc/html/statistics.html?scListItem='+encodeURIComponent(JSON.stringify(obj))
			},
			view: function (code) {
				var vm = this
@ -124,9 +129,10 @@
			},
			getList:function(){
				var vm=this
				console.log('211111111111111111111111',vm.planInfo)
				rehaAPI.getList({
					doctor: docInfo.code,
					diseaseType: 3,
					diseaseType: vm.planInfo.disease,
					type: '',
					patientName: '',
					patientCode:  this.patientCode,
@ -134,7 +140,7 @@
					pageNo: 1,
					pageSize: 1,
					filterType: 1,
					isAscvd: 1
					isAscvd: vm.planInfo.disease=='3'? 1:''
				}).then(function(res){
          vm.scList= res.data
					console.log(res,'dasssssssssssssssssss')

+ 34 - 0
app/rehabilitation/js/vaile.js

@ -0,0 +1,34 @@
var suifangValidate = function () {
  var vm = this
  var invalideArr = []
  function validate(field) {
    _.mapObject(vm.rules[field], function (o, k) {
      if (_.isArray(o)) {
        _.each(o, function (v) {
          if (v.required) {
            if (!vm[field][k]) {
              invalideArr.push(v)
            }
          }
        })
      } else {
        if (_.isFunction(o.value)) {
          var val = o.value()
          _.each(o.rule, function (v) {
            if (v.required) {
              if (!val) {
                invalideArr.push(v)
              }
            }
          })
        }
      }
    })
  }
  validate('followup')
  validate('form')
  return invalideArr
}