| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 | 
							- var template = ''
 
- $.ajax('../../../component/statistics/FollowRecord/index.html', {
 
-   data: {},
 
-   dataType: 'html',
 
-   cache: false,
 
-   timeout: 60000,
 
-   async: false,
 
-   error: function (res) {},
 
-   success: function (res) {
 
-     template = res
 
-   }
 
- })
 
- Vue.component('follow-record', {
 
-   template: template,
 
-   props: [],
 
-   data: function () {
 
-     return {
 
-       years: [],
 
-       yearType: '1',
 
-       chooseYear: null,
 
-       chooseTime: null,
 
-       rangeOptions: [
 
-         { label: '区', value: 'town' },
 
-         { label: '社区', value: 'hospital' },
 
-         { label: '团队', value: 'team' }
 
-       ],
 
-       areaOptions: [
 
-         { label: '思明区', value: '350203' },
 
-         { label: '海沧区', value: '350205' },
 
-         { label: '湖里区', value: '350206' },
 
-         { label: '集美区', value: '350211' },
 
-         { label: '同安区', value: '350212' },
 
-         { label: '翔安区', value: '350213' }
 
-       ],
 
-       hospitalOptions: [],
 
-       teamOptions: [],
 
-       form: {
 
-         range: 'town'
 
-       },
 
-       loading: false,
 
-       exportLoading: false,
 
-       tableData: [],
 
-       tableHeader: [
 
-         { label: '居民', prop: 'name', width: '100' },
 
-         { label: '年龄', prop: 'age', width: '90' },
 
-         { label: '性别', prop: 'sex', width: '90' },
 
-         { label: '手机号', prop: 'mobile', width: '110' },
 
-         { label: '下转医院', prop: 'turnHospitalName', width: '130' },
 
-         { label: '下转医生', prop: 'turnDoctorName', width: '90' },
 
-         { label: '下转时间', prop: 'createTime', width: '140' },
 
-         { label: '所属机构', prop: 'hospitalName', width: '130' },
 
-         { label: '随访医生', prop: 'doctorName', width: '90' },
 
-         { label: '计划随访时间', prop: 'followupPlanDate', width: '140' },
 
-         { label: '实际随访时间', prop: 'followupDate', width: '140' }
 
-       ],
 
-       page: 1,
 
-       size: 10,
 
-       total: 0,
 
-       level: 0,
 
-       visible: false,
 
-       record: {},
 
-       selectTak: [],
 
-       takingListChecked: [],
 
-       takingList: [],
 
-       selectAdverse: [],
 
-       adverseEventArr: [],
 
-       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' }
 
-       ],
 
-       info: {}
 
-     }
 
-   },
 
-   methods: {
 
-     init() {
 
-       var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
 
-       if (selectedRole.code.indexOf('350200') > -1) {
 
-         this.level = 1 //  市卫健委
 
-         this.areaOptions = [
 
-           { label: '思明区', value: '350203' },
 
-           { label: '海沧区', value: '350205' },
 
-           { label: '湖里区', value: '350206' },
 
-           { label: '集美区', value: '350211' },
 
-           { label: '同安区', value: '350212' },
 
-           { label: '翔安区', value: '350213' }
 
-         ]
 
-       } else if (selectedRole.code.length == 6) {
 
-         this.level = 2 // 区管理
 
-         this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
 
-         this.form = {
 
-           range: 'town',
 
-           area: selectedRole.code
 
-         }
 
-         this.getHospital(selectedRole.code)
 
-       }  else {
 
-         this.level = 3 // 社区管理
 
-         this.rangeOptions = [
 
-           { label: '社区', value: 'hospital' },
 
-           { label: '团队', value: 'team' }
 
-         ]
 
-         this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code.substring(0, 6) }]
 
-         this.hospitalOptions = [{ name: selectedRole.name, code: selectedRole.code }]
 
-         this.form = {
 
-           range: 'hospital',
 
-           area: selectedRole.code.substring(0, 6),
 
-           hospital: selectedRole.code
 
-         }
 
-         this.getTeam(selectedRole.code)
 
-       }
 
-       this.initTime()
 
-       this.getList()
 
-     },
 
-     initTime() {
 
-       var vm = this
 
-       var now = new Date()
 
-       vm.nowyear = vm.chooseYear = now.getFullYear()
 
-       vm.years = []
 
-       for (i = vm.nowyear; i >= 2013; i--) {
 
-         vm.years.push(i)
 
-       }
 
-     },
 
-     resetArea() {
 
-       if (this.level == 1) {
 
-         delete this.form.area
 
-         delete this.form.hospital
 
-         delete this.form.team
 
-       } else if (this.level == 2) {
 
-         delete this.form.hospital
 
-         delete this.form.team
 
-       } else {
 
-         delete this.form.team
 
-       }
 
-     },
 
-     getList() {
 
-       var vm = this
 
-       this.loading = true
 
-       var params = {
 
-         ...this.form,
 
-         page: this.page,
 
-         pageSize: this.size
 
-       }
 
-       if (this.yearType == '1') {
 
-         params.startDate = this.chooseYear + '-01-01'
 
-         params.endDate = this.chooseYear + '-12-31'
 
-       } else {
 
-         if (this.chooseTime) {
 
-           params.startDate = this.chooseTime[0]
 
-           params.endDate = this.chooseTime[1]
 
-         }
 
-       }
 
-       httpRequest.get('statistics/collaborate/gxbRehabilitationFollowupRecord', { data: params }).then(function (res) {
 
-         if (res.status == 200) {
 
-           vm.tableData = res.detailModelList
 
-           vm.total = res.totalCount
 
-         }
 
-         vm.loading = false
 
-       })
 
-     },
 
-     queryDate() {
 
-       this.page = 1
 
-       this.getList()
 
-     },
 
-     exportTable() {
 
-       var vm = this
 
-       var params = {
 
-         ...this.form,
 
-         page: this.page,
 
-         pageSize: this.size
 
-       }
 
-       if (this.yearType == '1') {
 
-         params.startDate = this.chooseYear + '-01-01'
 
-         params.endDate = this.chooseYear + '-12-31'
 
-       } else {
 
-         if (this.chooseTime) {
 
-           params.startDate = this.chooseTime[0]
 
-           params.endDate = this.chooseTime[1]
 
-         }
 
-       }
 
-       this.exportLoading = true
 
-       var fileName = `康复随访记录${new Date().getTime()}.xls`
 
-       httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbRehabilitationFollowupRecord', fileName, params).then(function () {
 
-         vm.exportLoading = false
 
-       })
 
-     },
 
-     eliminateClick() {
 
-       this.resetArea()
 
-       this.yearType = '1'
 
-       this.chooseYear = new Date().getFullYear()
 
-       this.chooseTime = null
 
-       delete this.form.isSign
 
-       delete this.form.name
 
-       delete this.form.eventType
 
-       this.$forceUpdate()
 
-     },
 
-     getHospital(code) {
 
-       var vm = this
 
-       delete this.form.hospital
 
-       delete this.form.team
 
-       var params = {
 
-         type: 5,
 
-         code: code
 
-       }
 
-       httpRequest.post('common/district', { data: params }).then(function (res) {
 
-         vm.hospitalOptions = [{ code: '', name: '全部' }]
 
-         vm.hospitalOptions = vm.hospitalOptions.concat(res.list)
 
-       })
 
-     },
 
-     getTeam(code) {
 
-       var vm = this
 
-       delete this.form.team
 
-       var params = {
 
-         hospital: code,
 
-         area: this.form.area
 
-       }
 
-       httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
 
-         vm.teamOptions = [{ id: '', name: '全部' }]
 
-         vm.teamOptions = vm.teamOptions.concat(res.data)
 
-       })
 
-     },
 
-     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
 
-         }
 
-       })
 
-     },
 
-     handleCurrentChange(val) {
 
-       this.page = val
 
-       this.getList()
 
-     },
 
-     handleSizeChange(val) {
 
-       this.size = val
 
-       this.getList()
 
-     },
 
-     openDialog(scope) {
 
-       var vm = this
 
-       this.visible = true
 
-       this.info = {
 
-         sex: scope.row.sex,
 
-         name: scope.row.name,
 
-         age: scope.row.age,
 
-         doctorName: scope.row.doctorName
 
-       }
 
-       httpRequest.get('doctor/visitDetail/selectFollowupDiseaseById', { data: { type: 'XiaXinCoronaryHear', followupId: scope.row.id } }).then(function (res) {
 
-         if (res.status == 200) {
 
-           var data = res.data
 
-           console.log(data, 'Data')
 
-           // vm.record = data.followup
 
-           if (data.content) {
 
-             vm.record = data.content
 
-             vm.$set(vm, 'takingListChecked', data.content && data.content.takeMedicine.split(','))
 
-             vm.$set(vm, 'adverseEventArr', data.content && data.content.adverseEvent.split(','))
 
-             vm.flag = '2'
 
-             vm.selectTak = vm.takingListChecked.map(function (index) {
 
-               vm.takingList[index].index = index
 
-               return vm.takingList[index]
 
-             })
 
-             vm.selectAdverse = vm.adverseEventArr.map(function (index) {
 
-               vm.badEventList1[index].index = index
 
-               return vm.badEventList1[index]
 
-             })
 
-           }
 
-           return
 
-           vm.followData = res.data
 
-           vm.form.sex = data.sex
 
-           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')
 
-         }
 
-       })
 
-     },
 
-     closeDialog() {
 
-       this.visible = false
 
-     }
 
-   },
 
-   mounted() {
 
-     this.init()
 
-     this.getDictByDictName()
 
-   }
 
- })
 
 
  |