123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329 |
- var template = ''
- $.ajax('../../../component/statistics/LascProgress/index.html', {
- data: {},
- dataType: 'html',
- cache: false,
- timeout: 60000,
- async: false,
- error: function (res) {},
- success: function (res) {
- template = res
- }
- })
- Vue.component('lasc-progress', {
- template: template,
- props: [],
- data: function () {
- return {
- years: [],
- yearType: '1',
- chooseYear: null,
- chooseTime: null,
- rangeOptions: [
- { label: '区', value: '1' },
- { label: '社区', value: '2' },
- { label: '居住地', value: '3' }
- ],
- areaOptions: [
- { label: '思明区', value: '350203' },
- { label: '海沧区', value: '350205' },
- { label: '湖里区', value: '350206' },
- { label: '集美区', value: '350211' },
- { label: '同安区', value: '350212' },
- { label: '翔安区', value: '350213' }
- ],
- hospitalOptions: [],
- teamOptions: [],
- form: {
- range: '1'
- },
- loading: false,
- exportLoading: false,
- tableData: [],
- tableHeader: [
- { label: '机构', prop: 'gynOrg' },
- { label: '筛查总人数', prop: 'total' },
- { label: '待评估人数', prop: 'status0' },
- { label: '已评估人数', prop: 'status1' },
- { label: '已评估且管理人数', prop: 'status2' },
- { label: '宫颈待完善乳腺待完善人数', prop: 'status3' },
- { label: '宫颈待完善乳腺完成筛查人数', prop: 'status4' },
- { label: '宫颈完成筛查乳腺待完善人数', prop: 'status5' }
- ],
- level: 0,
- visible: false,
- query: {},
- page: 1,
- size: 10,
- total: 0,
- messageVisible: false,
- messInfo: null,
- remind: '',
- dialogLoading: false,
- dialogExportLoading: false,
- statusOptions: [],
- rehabilitationHospital: [],
- archiveList: [],
- inviteStatus: [
- { value: '', label: '全部' },
- { value: '1', label: '门诊患者' },
- { value: '2', label: '出院患者' }
- ],
- communityHospitals: [],
- title: '',
- dialogVisible: false,
- signatoryList: []
- }
- },
- methods: {
- init() {
- var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
- if (selectedRole.code.indexOf('350200') > -1) {
- this.level = 1 // 市卫健委
- this.areaOptions = [
- { label: '厦门市', value: '' },
- { 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: '1',
- area: selectedRole.code
- }
- this.getHospital(selectedRole.code)
- } else {
- this.level = 3 // 社区管理
- this.rangeOptions = [
- { label: '社区', value: '2' },
- { label: '团队', value: 'team' }
- ]
- this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
- this.hospitalOptions = [{ name: selectedRole.name, code: selectedRole.code }]
- this.form = {
- range: '2',
- town: selectedRole.code.substring(0, 6),
- hospital: selectedRole.code
- }
- this.getTeam(selectedRole.code)
- }
- this.initTime()
- this.searchFn()
- this.hospitalsByType()
- },
- 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
- }
- },
- getDictData() {
- var vm = this
- statisticAPI.getDictByDictName({ name: 'rehabilitation_status' }).then(function (res) {
- vm.statusOptions = [{ value: '全部', code: '' }]
- vm.statusOptions = vm.statusOptions.concat(res.list)
- })
- statisticAPI.getDictByDictName({ name: 'rehabilitation_hospital' }).then(function (res) {
- vm.rehabilitationHospital = [{ value: '全部', code: '' }]
- vm.rehabilitationHospital = vm.rehabilitationHospital.concat(res.list)
- })
- statisticAPI.getDictByDictName({ name: 'archive_status' }).then(function (res) {
- vm.archiveList = [{ value: '全部', code: '' }]
- vm.archiveList = vm.archiveList.concat(res.list)
- })
- },
- searchFn() {
- var vm = this
- this.loading = true
- var params = {
- ...this.form,
- page:this.page,
- size:this.size
- }
- vm.tableData = []
- if (this.chooseTime) {
- params.startTime = this.chooseTime[0]
- params.endTime = this.chooseTime[1]
- }
- httpRequest.get('doctor/twoCancers/count/twoCancerProgress', { data: params }).then(function (res) {
- if (res.status == 200) {
- vm.tableData = res.detailModelList
- vm.total = res.totalCount
- }
- vm.loading = false
- })
- },
- exportTable() {
- var vm = this
- var params = {
- ...this.form,
- page:this.page,
- size:this.size
- }
- if (this.chooseTime) {
- params.startTime = this.chooseTime[0]
- params.endTime = this.chooseTime[1]
- }
- this.exportLoading = true
- var fileName = `两癌筛查进度统计${new Date().getTime()}.xls`
- httpRequest.downLoadFileForAjax('doctor/twoCancers/count/exportTwoCancerProgress', fileName, params).then(function () {
- vm.exportLoading = false
- })
- },
- eliminateClick() {
- var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
- if (this.level == 1) {
- this.form = {
- range: '1'
- }
- } else if (this.level == 2) {
- this.form = {
- range: '1',
- area: selectedRole.code
- }
- this.getHospital(selectedRole.code)
- } else {
- this.form = {
- range: '2',
- town: selectedRole.code.substring(0, 6),
- hospital: selectedRole.code
- }
- this.getTeam(selectedRole.code)
- }
- this.yearType = '1'
- this.chooseYear = new Date().getFullYear()
- this.chooseTime = null
- this.$forceUpdate()
- },
- getHospital(code, flag = true) {
- var vm = this
- if (flag) {
- delete this.form.hospital
- delete this.form.team
- }
- var params = {
- type: 5,
- code: code
- }
- if (!code) {
- vm.hospitalOptions = [{ name: '全部', value: '' }]
- vm.teamOptions = [{ name: '全部', value: '' }]
- return false
- }
- httpRequest.post('common/district', { data: params }).then(function (res) {
- vm.hospitalOptions = res.list
- })
- },
-
- handleCurrentChange(val) {
- this.page = val
- this.searchFn()
- },
- handleSizeChange(val) {
- this.size = val
- this.searchFn()
- },
- // 获取社区医院
- hospitalsByType() {
- var vm = this
- // var code
- var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
- if (selectedRole.code.indexOf('350200') > -1) {
- code = '350200' // 市卫健委
- } else if (selectedRole.code.length == 6) {
- code = selectedRole.code
- } else {
- this.level = 3 // 社区管理
- }
- if (selectedRole.code.length > 6) {
- this.communityHospitals = [{ label: selectedRole.name, value: selectedRole.code }]
- } else {
- var type = 1
- if (selectedRole.code.indexOf('350200') > -1) {
- type = 1 // 市卫健委
- } else if (selectedRole.code.length == 6) {
- type = 2
- }
- statisticAPI
- .hospitalsByType({
- type: type,
- code: selectedRole.code
- })
- .then(function (res) {
- if (res.status == 200) {
- vm.communityHospitals = [{ label: '全部', value: '' }]
- res.list.forEach(function (v) {
- vm.communityHospitals.push({
- value: v.code,
- label: v.name
- })
- })
- }
- })
- .catch(function (err) {
- console.log(err, 'Errr')
- })
- }
- },
- closeDialog() {
- this.visible = false
- },
- closeDialog1() {
- this.dialogVisible = false
- },
- getData(data) {
- if (data) {
- this.yearType = data.yearType
- this.form.range = data.range
- this.form.area = data.area
- this.form.hospital = data.hospital
- this.form.team = data.team
- if (this.yearType == 1) {
- this.chooseYear = data.time
- } else {
- this.chooseTime = data.time
- }
- if (this.form.hospital) {
- // 如果有社区code传过来就调社区医院列表接口
- this.getHospital(data.area, false)
- }
- if (this.form.team) {
- // 如果有团队code传过来就调团队列表接口
- this.getTeam(data.hospital, false)
- }
- this.searchFn()
- } else {
- this.init()
- }
- }
- },
- mounted() {
- this.init()
- }
- })
|