2 커밋 f85f822096 ... 47e01eb4c3

작성자 SHA1 메시지 날짜
  hwy 47e01eb4c3 合并 1 개월 전
  hwy d9575ef1fc 康复随访 1 개월 전

+ 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>

+ 169 - 108
app/rehabilitation/html/guide_the_message.html

@ -168,112 +168,173 @@
									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>

+ 312 - 296
app/rehabilitation/js/guide_the_message.js

@ -1,254 +1,263 @@
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%'],
@ -256,20 +265,20 @@ top.rehabilitationGuideVue = new Vue({
        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'
			})
		},
    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
@ -614,43 +623,50 @@ top.rehabilitationGuideVue = new Vue({
	}
})
$("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");  
	});  
}
$('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')
  })
}

+ 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
}