| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 | 
							- var template = ''
 
- $.ajax('../../../component/statistics/PersonInfo/index.html', {
 
-   data: {},
 
-   dataType: 'html',
 
-   cache: false,
 
-   timeout: 60000,
 
-   async: false,
 
-   error: function (res) {},
 
-   success: function (res) {
 
-     template = res
 
-   }
 
- })
 
- Vue.component('person-info', {
 
-   template: template,
 
-   props: [],
 
-   data: function () {
 
-     return {
 
-       visible: false,
 
-       code: '0fab4dd67e074e16ac86db6b6c15233e',
 
-       loading: false,
 
-       type: '1',
 
-       patientInfo: {},
 
-       assessment: [],
 
-       turnup: [],
 
-       jzList: [],
 
-       turnDown: [],
 
-       rehabilitation: [],
 
-       tabListName: ['assessment', 'turnup', 'jzList', 'turnDown', 'rehabilitation'],
 
-       rehabilitationDetailVisible: false,
 
-       sfList: [],
 
-       currentPlan: {},
 
-       sfNumObj: {},
 
-       PlanDetailItems: [],
 
-       service: {},
 
-       messageVisible: false,
 
-       messInfo: ''
 
-     }
 
-   },
 
-   mounted() {
 
-     this.getPatientInfo()
 
-     this.getPatientDetailList(1)
 
-   },
 
-   methods: {
 
-     setImg(str) {
 
-       return httpRequest.getImgUrl(str)
 
-     },
 
-     getPatientInfo() {
 
-       var vm = this
 
-       httpRequest.get('statistics/collaborate/patientDetailInfo', { data: { code: vm.code } }).then(function (res) {
 
-         vm.patientInfo = res.data
 
-       })
 
-     },
 
-     goAssessment(code) {
 
-       top.layer.open({
 
-         type: 2,
 
-         //				  offset: ['100px'], //右下角弹出
 
-         area: ['568px', '80%'],
 
-         shade: 0.5,
 
-         title: '查看筛选结果',
 
-         fixed: true, //不固定
 
-         maxmin: true,
 
-         closeBtn: 1,
 
-         shift: 5,
 
-         shadeClose: false, //点击遮罩关闭层
 
-         content: '../../../app/jbsc/html/view_screening_results.html?resultCode=' + code + '&btnHide=1'
 
-       })
 
-     },
 
-     previewMess(item) {
 
-       var vm = this
 
-       httpRequest.post('doctor/screen/getSurveyMessage', { data: { surveyResultCode: item.hospital_service_item_id } }).then(function (res) {
 
-         vm.messageVisible = true
 
-         vm.messInfo = res.data
 
-       })
 
-     },
 
-     closeMessageDialog() {
 
-       this.messageVisible = false
 
-     },
 
-     transformDataToAssessmentFormat(data, type) {
 
-       // 创建一个空对象用于存储按年份分组的数据
 
-       var groupedByYear = {}
 
-       // 创建一个数组用于记录年份出现的顺序
 
-       var yearOrder = []
 
-       // 遍历原始数据数组
 
-       data.forEach(function (item) {
 
-         // 根据type参数选择不同的时间字段
 
-         var timeField = item.czrq || item.outpatientTime || item.createTime
 
-         // 解析日期字符串并获取年份、月份和日期
 
-         var date = new Date(timeField)
 
-         var year = date.getFullYear()
 
-         var formattedDate = (date.getMonth() + 1).toString().padStart(2, '0') + '-' + date.getDate().toString().padStart(2, '0')
 
-         var formattedTime = date.toTimeString().split(' ')[0]
 
-         // 如果还没有这个年份的数据,初始化一个新的数组,并记录年份顺序
 
-         if (!groupedByYear[year]) {
 
-           groupedByYear[year] = []
 
-           yearOrder.push(year) // 记录年份首次出现的位置
 
-         }
 
-         // 构建新的对象并添加到对应年份的数组中
 
-         groupedByYear[year].push({
 
-           date: formattedDate,
 
-           time: formattedTime,
 
-           ...item
 
-         })
 
-       })
 
-       // 然后构建最终的评估对象,按照原始顺序
 
-       var assessment = yearOrder.map(function (year) {
 
-         return {
 
-           year: year,
 
-           children: groupedByYear[year]
 
-         }
 
-       })
 
-       return assessment
 
-     },
 
-     handleClick(item) {
 
-       this.getPatientDetailList(item.name)
 
-     },
 
-     getPatientDetailList(type) {
 
-       var vm = this
 
-       vm.loading = true
 
-       httpRequest.get('statistics/collaborate/patientDetailList', { data: { code: vm.code, type: type } }).then(function (res) {
 
-         var data = vm.transformDataToAssessmentFormat(res.data, type)
 
-         vm[vm.tabListName[Number(type) - 1]] = data
 
-         vm.loading = false
 
-       })
 
-     },
 
-     openDialog(type) {
 
-       this.visible = true
 
-       this.type = type
 
-     },
 
-     closeDialog() {
 
-       this.visible = false
 
-     },
 
-     copyToClipboard(text) {
 
-       var textarea = document.createElement('textarea')
 
-       textarea.style.position = 'fixed'
 
-       textarea.style.opacity = 0
 
-       textarea.value = text
 
-       document.body.appendChild(textarea)
 
-       textarea.select()
 
-       document.execCommand('copy')
 
-       document.body.removeChild(textarea)
 
-       this.$message.success('复制成功')
 
-     },
 
-     toDetail(item) {
 
-       console.log(item, 'kkkkkkkkkkkkkkkkkkkkkkkk')
 
-       var vm = this
 
-       var params = {
 
-         planDetailId: item.id
 
-       }
 
-       if (item.visitCount == 1 || item.visitCount == 3) {
 
-         vm.previewMess(item)
 
-       } else {
 
-         rehaAPI.serviceItem(params).then(function (res) {
 
-           if (res.status == 200) {
 
-             vm.service = res.data
 
-             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(vm.service)) + '&planDetailId=' + item.id,
 
-               end: function () {
 
-                 // 未点击确定按钮,点击关闭按钮
 
-               }
 
-             })
 
-           }
 
-         })
 
-       }
 
-     },
 
-     toRehabilitationDetail(item) {
 
-       this.currentPlan = item
 
-       this.getSfList()
 
-       this.rehabilitationDetailVisible = true
 
-     },
 
-     getSfList() {
 
-       var vm = this
 
-       var params = {
 
-         searchTask: 6,
 
-         planId: this.currentPlan.id,
 
-         executeEndTime: '',
 
-         executeStartTime: '',
 
-         status: ''
 
-       }
 
-       var params1 = {
 
-         searchTask: '',
 
-         planId: this.currentPlan.id,
 
-         executeEndTime: '',
 
-         executeStartTime: '',
 
-         status: ''
 
-       }
 
-       httpRequest.get('doctor/specialist/rehabilitation/calendarPlanDetailList', { data: params }).then(function (res) {
 
-         vm.sfList = res.data
 
-       })
 
-       httpRequest.get('doctor/specialist/rehabilitation/calendarPlanDetailItems', { data: params1 }).then(function (res) {
 
-         vm.PlanDetailItems = res.data.filter(function (item) {
 
-           if (item.code == 6) {
 
-             vm.sfNumObj = item
 
-           }
 
-           if (item.code == 2 || item.code == 3) {
 
-             console.log(item, 'kkkkkkkkkkkkkkkkkkkkkkkkkk')
 
-             return item.compeletTotal != 0
 
-           }
 
-           if (item.code != 2 && item.code != 3) {
 
-             return item.code != 4 && item.code != 5 && item.code != 6
 
-           }
 
-         })
 
-       })
 
-     },
 
-     back() {
 
-       this.rehabilitationDetailVisible = false
 
-     }
 
-   }
 
- })
 
 
  |