var template = '' $.ajax('../../../component/statistics/LascCervical/index.html', { data: {}, dataType: 'html', cache: false, timeout: 60000, async: false, error: function (res) {}, success: function (res) { template = res } }) Vue.component('lasc-cervical', { template: template, props: [], data: function () { return { years: [], yearType: '1', loadingTwo: false, chooseYear: null, chooseTime: null, query: { page: 1, size: 10, total: 0 }, 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: [], constantHeader: [ { label: '下转次数', prop: 'totalTimes', width: '90' }, { label: '门诊下转次数', prop: 'mzTimes', width: '110' }, { label: '出院下转次数', prop: 'zyTimes', width: '110' }, { label: '下转人数', prop: 'totalNum', width: '110' }, { label: '门诊下转人数', prop: 'mzNum', width: '110' }, { label: '出院下转人数', prop: 'zyNum', width: '110' }, { label: '门诊下转已评估', prop: 'mzScreenNum', width: '120' }, { label: '门诊下转未评估', prop: 'unMzScreenNum', width: '120' }, { label: '出院下转已评估', prop: 'zyScreenNum', width: '120' }, { label: '出院下转未评估', prop: 'unZyScreenNum', width: '120' } ], level: 0, visible: false, dataRangeOption: [], dialogTableData: [], dialogHeader: [ { label: '居民姓名', prop: 'name', width: '100' }, { label: '证件号码', prop: 'idcard', width: '100' }, { label: '手机号', prop: 'mobile', width: '110' }, { label: '年龄', prop: 'age', width: '90' }, { label: '出生日期', prop: 'birthday', width: '90' }, { label: '常驻地址', prop: 'address', width: '100' }, { label: '个人筛查状态', prop: 'statusName', width: '100' } ], 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: [], cervicalHeaderGroups: [ { label: '宫颈癌管理情况', children: [ { prop: 'num2', label: '妇科检查人数' }, { prop: 'assessNum', label: '线上评估人数' }, { prop: 'orderNum', label: '线上预约人数' } ] }, { label: '宫颈妇科检查情况', children: [ { prop: 'jujueNum', label: '拒绝' }, { prop: 'yicongNum', label: '依从' }, { prop: 'num3', label: '检查人数' }, { prop: 'waitNum', label: '待完善人数' } ] }, { label: 'HPV检查情况', children: [ { prop: 'hpvNum', label: '检查人数' }, { prop: 'n1', label: '待完善人数' } ] }, { label: '高危HPV分型检测情况', children: [ { prop: 'hpvH', label: '高危HPV阳性人数' }, { prop: 'hpv16', label: '16型阳性人数' }, { prop: 'hpv18', label: '18型阳性人数' }, { prop: 'hpv31', label: '31型阳性人数' }, { prop: 'hpv33', label: '33型阳性人数' }, { prop: 'hpv35', label: '35型阳性人数' }, { prop: 'hpv39', label: '39型阳性人数' }, { prop: 'hpv45', label: '45型阳性人数' }, { prop: 'hpv51', label: '51型阳性人数' }, { prop: 'hpv52', label: '52型阳性人数' }, { prop: 'hpv53', label: '53型阳性人数' }, { prop: 'hpv56', label: '56型阳性人数' }, { prop: 'hpv58', label: '58型阳性人数' }, { prop: 'hpv59', label: '59型阳性人数' }, { prop: 'hpv66', label: '66型阳性人数' }, { prop: 'hpv68', label: '68型阳性人数' }, { prop: 'hpv73', label: '73型阳性人数' }, { prop: 'hpv82', label: '82型阳性人数' } ] }, { label: '低危HPV分型检测情况', children: [ { prop: 'hpvL', label: '低危HPV阳性人数' }, { prop: 'hpv6', label: '6型阳性人数' }, { prop: 'hpv11', label: '11型阳性人数' }, { prop: 'hpv42', label: '42型阳性人数' }, { prop: 'hpv43', label: '43型阳性人数' }, { prop: 'hpv44', label: '44型阳性人数' }, { prop: 'hpv81', label: '81型阳性人数' }, { prop: 'hpv83', label: '83型阳性人数' } ] }, { label: '宫颈细胞学检查情况', children: [ { prop: 'cytNum', label: '检查人数' }, { prop: 'cytNum1', label: '检查异常人数' }, { prop: 'cytNum2', label: '待完善人数' } ] }, { label: '初筛结果临床评估情况', children: [ { prop: 'preNum', label: '检查人数' }, { prop: 'preNum1', label: '待完善人数' }, { prop: 'preNum2', label: '未见异常,定期筛查' }, { prop: 'preNum3', label: '异常,6-12个月复查' }, { prop: 'preNum4', label: '异常,嘱进一步行阴道镜检查' } ] }, { label: '阴道镜检查情况', children: [ { prop: 'colNum', label: '需要阴道镜检查人数' }, { prop: 'colNum1', label: '阴道镜检查人数' }, { prop: 'colNum2', label: '接受检查人数' }, { prop: 'colNum3', label: '拒绝检查人数' }, { prop: 'colNum4', label: '未见异常人数' }, { prop: 'colNum5', label: '异常人数' }, { prop: 'colNum6', label: '待完善人数' } ] }, { label: '阴道镜检查随访情况', children: [ { prop: 'colfNum', label: '已随访人数' }, { prop: 'colfNum1', label: '待随访人数' }, { prop: 'colfNum2', label: '未见异常' }, { prop: 'colfNum3', label: '低度病变' }, { prop: 'colfNum4', label: '高度病变' }, { prop: 'colfNum5', label: '可疑癌' }, { prop: 'colfNum6', label: '其他' }, { prop: 'colfNum7', label: '不详' } ] }, { label: '组织病理学检查情况', children: [ { prop: 'cpatNum', label: '需要组织病理学检查' }, { prop: 'cpatNum1', label: '病理学检查人数' }, { prop: 'cpatNum2', label: '接受检查人数' }, { prop: 'cpatNum3', label: '拒绝检查人数' }, { prop: 'cpatNum4', label: '未见异常人数' }, { prop: 'cpatNum5', label: '炎症' }, { prop: 'cpatNum6', label: '低级别病变(原CIN1)' }, { prop: 'cpatNum7', label: '高级别病变(原CIN2及CIN3)' }, { prop: 'cpatNum8', label: '宫颈原位腺癌(AIS)' }, { prop: 'cpatNum9', label: '宫颈微小浸润癌(鳞癌/腺癌)' }, { prop: 'cpatNum10', label: '宫颈浸润癌(鳞癌/腺癌)' } ] }, { label: '组织病理学检查随访情况', children: [ { prop: 'cpatfNum', label: '已随访人数' }, { prop: 'cpatfNum1', label: '待随访人数' }, { prop: 'cpatfNum2', label: '炎症' }, { prop: 'cpatfNum3', label: '低级别病变(原CIN1)' }, { prop: 'cpatfNum4', label: '高级别病变(原CIN2及CIN3)' }, { prop: 'cpatfNum5', label: '宫颈原位腺癌(AIS)' }, { prop: 'cpatfNum6', label: '宫颈微小浸润癌(鳞癌/腺癌)' }, { prop: 'cpatfNum7', label: '宫颈浸润癌(鳞癌/腺癌)' } ] }, { label: '最后诊断情况', children: [ { prop: 'finNum', label: '未见异常人数' }, { prop: 'finNum1', label: '炎症' }, { prop: 'finNum2', label: '低级别病变(原CIN1)' }, { prop: 'finNum3', label: '高级别病变(原CIN2及CIN3)' }, { prop: 'finNum4', label: '宫颈原位腺癌(AIS)' }, { prop: 'finNum5', label: '宫颈微小浸润癌(鳞癌/腺癌)' }, { prop: 'finNum6', label: '宫颈浸润癌(鳞癌/腺癌)' }, { prop: 'finNum7', label: '待完善人数' } ] }, { label: '宫颈病变接受治疗情况', children: [ { prop: 'finTNum1', label: '接受治疗人数' }, { prop: 'finTNum2', label: '不接受治疗人数' }, { prop: 'finTNum3', label: '不详人数' } ] }, { label: '术后病理—接受组织病理学检查情况', children: [ { prop: 'finSNum1', label: '接受检查人数' }, { prop: 'finSNum2', label: '不接受检查人数' }, { prop: 'finSNum3', label: '炎症' }, { prop: 'finSNum4', label: '低级别病变(原CIN1)' }, { prop: 'finSNum5', label: '高级别病变(原CIN2及CIN3)' }, { prop: 'finSNum6', label: '宫颈微小浸润癌(鳞癌/腺癌)' }, { prop: 'finSNum7', label: '宫颈浸润癌(鳞癌/腺癌)' } ] } ], currentEditData: '', serviceRecordVisable: false } }, methods: { back() { this.currentEditData = '' this.serviceRecordVisable = false }, gotoService(item) { this.currentEditData = item.patient this.serviceRecordVisable = true }, 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: '2', town: selectedRole.code } this.getHospital(selectedRole.code) } else { this.level = 3 // 社区管理 this.rangeOptions = [{ label: '社区', value: '2' }] 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() {}, 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/cervicalQualityCount', { data: params }).then(function (res) { if (res.status == 200) { vm.tableData = res.detailModelList vm.total = res.totalCount } console.log('22222222222222222', vm.tableData) vm.loading = false }) }, exportTable() { 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/exportCervicalQualityCount', fileName, params).then(function () { this.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', area: selectedRole.code.substring(0, 6), hospital: selectedRole.code } this.getTeam(selectedRole.code) } this.chooseYear = new Date().getFullYear() this.chooseTime = null const now = new Date() // 获取当前日期 const endDate = new Date() // 获取30天前的日期 const startDate = new Date() startDate.setDate(endDate.getDate() - 30) this.chooseTime = [this.formatDate(startDate), this.formatDate(endDate)] this.init() 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 }) }, getTeam(code, flag = true) { var vm = this if (flag) { delete this.form.team } var params = { hospital: code } httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) { vm.teamOptions = res.data }) }, 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') }) } }, openDialog(row, prop) { var vm = this vm.dialogLoading = true this.query.type = 'g_' + prop this.query.orgCode = row.orgCode var params = { ...this.query, range: (this.form && this.form.range) || '', town: (this.form && this.form.town) || '' } vm.dialogTableData = [] if (this.chooseTime) { params.startTime = this.chooseTime[0] params.endTime = this.chooseTime[1] } delete params.total httpRequest.get('doctor/twoCancers/count/caseDataList', { data: params }).then(function (res) { vm.dialogTableData = res.detailModelList vm.query.total = res.totalCount vm.visible = true vm.dialogLoading = false }) }, caseDataList() { var vm = this vm.dialogLoading = true var params = { ...this.query, range: (this.form && this.form.range) || '', town: (this.form && this.form.town) || '', hospital: (this.form && this.form.hospital) || '' } vm.dialogTableData = [] if (this.chooseTime) { params.startTime = this.chooseTime[0] params.endTime = this.chooseTime[1] } delete params.total httpRequest.get('doctor/twoCancers/count/caseDataList', { data: params }).then(function (res) { vm.dialogTableData = res.detailModelList vm.query.total = res.totalCount vm.dialogLoading = false }) }, dialogSearchFn() { this.caseDataList() }, handleCurrentChange1(val) { this.query.page = val this.caseDataList() }, handleSizeChange1(val) { this.query.size = val this.caseDataList() }, dialogExportFn() { var vm = this this.dialogExportLoading = true var params = { ...this.query, range: (this.form && this.form.range) || '', town: (this.form && this.form.town) || '', hospital: (this.form && this.form.hospital) || '' } if (this.chooseTime) { params.startTime = this.chooseTime[0] params.endTime = this.chooseTime[1] } var fileName = `个案数据列表${new Date().getTime()}.xls` httpRequest.downLoadFileForAjax('doctor/twoCancers/count/exportCaseDataList', fileName, params).then(function () { vm.dialogExportLoading = false }) }, dialogResetFn() { this.query = { page: 1, size: 10, total: 0, type:this.query.type, orgCode:this.query.orgCode, } this.caseDataList() }, 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() } }, formatDate(date) { const year = date.getFullYear() const month = String(date.getMonth() + 1).padStart(2, '0') const day = String(date.getDate()).padStart(2, '0') return `${year}-${month}-${day}` } }, mounted() { const now = new Date() // 获取当前日期 const endDate = new Date() // 获取30天前的日期 const startDate = new Date() startDate.setDate(endDate.getDate() - 30) this.chooseTime = [this.formatDate(startDate), this.formatDate(endDate)] this.init() } })