Quellcode durchsuchen

第二阶段三级医院随访进度及出组情况

许家烙好人 vor 9 Monaten
Ursprung
Commit
5c16c1f9b6

+ 8 - 0
api/statistics-api.js

@ -314,6 +314,10 @@
		getFirstStageEntryData: function(data){
			return httpRequest.get("/copd/statistics/getFirstStageEntryData", {data: data}); 
		},
		// 慢阻肺第二阶段三级医院随访进度及出组情况
		getFollowAndOutData: function(data){
			return httpRequest.get("/copd/statistics/getFollowAndOutData", {data: data}); 
		},
		
        		
		
@ -486,6 +490,10 @@
		exportGradeHospitalEntryData: function(data, filename){
			return httpRequest.downLoadFileForAjax("/copd/statistics/exportGradeHospitalEntryData", filename, data);
		},
		// 慢阻肺第二阶段三级医院随访进度及出组情况导出
		exportFollowAndOutData: function(data, filename){
			return httpRequest.downLoadFileForAjax("/copd/statistics/exportFollowAndOutData", filename, data);
		},
		
		
		

+ 13 - 4
app/statistics/html/comprehensive-query.html

@ -84,7 +84,8 @@
									handleNodeId!=58&&
									handleNodeId!=59&&
									handleNodeId!=60&&
									handleNodeId!=61
									handleNodeId!=61&&
									handleNodeId!=62
									' >
							<div class="searchDiv" v-if="tabsId!=5">
								<template v-if="handleNodeId!=44&&expertFamilyIdType != 'zhuanke1'&&handleNodeId!=45">
@ -469,7 +470,9 @@
											handleNodeId!=58&&
											handleNodeId!=59&&
											handleNodeId!=60&&
											handleNodeId!=61">
											handleNodeId!=61&&
											handleNodeId!=62
											">
								<label class="c-333 c-f14" for="">数据范围:</label>
								<el-select v-model="rangeCode" style="width:100px;" class="pr10">
									<el-option v-for="(item , index) in rangeList" :key="index" :label="item.name" :value="item.code"></el-option>
@ -508,7 +511,9 @@
										handleNodeId!=58&&
										handleNodeId!=59&&
										handleNodeId!=60&&
										handleNodeId!=61">
										handleNodeId!=61&&
										handleNodeId!=62
										">
								<el-button type="primary" size="mini" @click="searchHandle(true)">查询</el-button>
								<el-button type="ff9526" size="mini" @click="exportHandle">导出</el-button>
								<span class="eliminate" @click="eliminateClick">清除筛选条件</span>
@ -826,6 +831,7 @@
								<mzf-dejdsjyy-sfjd v-if="handleNodeId==60"></mzf-dejdsjyy-sfjd>
								<!-- 第二阶段社区医院随访进度 -->
								<mzf-dyjd-rzsfjd v-if="handleNodeId==61" type="dejdsqsfjd"></mzf-dyjd-rzsfjd>
								<mzf-dejdsjyy-sfjdjczqk v-if="handleNodeId==62" type="dejdsjyysfjdjczqk"></mzf-dejdsjyy-sfjdjczqk>
							</div>
							<div v-if="handleNodeShow == 3">
								<el-table v-if="collectCode == 1" border :data="diseaseReport" style="width: 100%" v-loading="loadingTwo" class="mt20" >
@ -888,7 +894,9 @@
										handleNodeId!=58&&
										handleNodeId!=59&&
										handleNodeId!=60&&
										handleNodeId!=61">
										handleNodeId!=61&&
										handleNodeId!=62
										">
								<div class="c-t-right mt20">
									<el-pagination 
									  @current-change="handleCurrentChange"
@ -957,6 +965,7 @@
	<script src="../js/dejdsqyyRzjd.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/dejdsjyysfjd.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/dejdsqyysfjd.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/dejdsjyysfjdjczqk.js" type="text/javascript" charset="utf-8"></script>
	
</body>

+ 121 - 0
app/statistics/html/dejdsjyysfjdjczqk.html

@ -0,0 +1,121 @@
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>第二阶段三级医院随访进度及出组情况</title>
	<meta name="author" content="yihu.com" />
	<meta name="format-detection" content="telephone=no" />
	<meta name="viewport"
		content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<link rel="stylesheet" type="text/css" href="../../../css/font-awesome.min.css" />
	<link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
	<link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
	<link rel="stylesheet" type="text/css" href="../../../css/flex.css" />
	<link rel="stylesheet" type="text/css" href="../../../css/element-ui.css" />
	<link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="../css/common.css" />
	<link rel="stylesheet" type="text/css" href="../css/mzfWorksheet.css" />
</head>
<style>
</style>
<body style="margin: 0;overflow-x: auto;" v-cloak>
	<div id="main" class="">
		<div class="ui-col-1 bgc-fff" style="min-width: 900px;">
			<div class="flexibleBox">
				<div class="flex maxBox">
					<div class="inquireTime">查询时间
						<el-date-picker v-model="startTime" type="date" placeholder="选择日期"
							:picker-options="type=='dyjdrzsfjd'? setDisabled1:setDisabled" @change='startTimeChange'>
						</el-date-picker> ~
						<el-date-picker v-model="endTime" type="date" placeholder="选择日期" :picker-options="setDisabled"
							@change='endTimeChange'>
						</el-date-picker>
					</div>
					<div class="selectedButton">
						<el-button type="primary" size="mini" @click="confirm">确定</el-button>
						<el-button type="ff9526" size="mini" @click="exportHandle">导出</el-button>
					</div>
				</div>
			</div>
			<el-table border :data="dejdsjyyRzDate" :span-method="objectSpanMethod" style="width: 100%"
				v-loading="loadingTwo" height='650' class="mt20">
				<template>
					<!-- <el-table-column  type="index" width='50' label="序号" align="center"></el-table-column> -->
					<!-- <el-table-column> -->
					<el-table-column prop="gradeHospitalName" label="三级医院名称" align="center">
					</el-table-column>
					<el-table-column label="统计起始日期:YYYY/MM/DD" align="center">
						<el-table-column label="各随访累计例(次)数" align="center">
							<el-table-column prop="f_v1_all" label="累计v1数" align="center"> </el-table-column>
							<el-table-column prop="f_v2_all" label="累计v2数" align="center"> </el-table-column>
							<el-table-column prop="f_v3_all" label="累计v3数" align="center"> </el-table-column>
							<el-table-column prop="f_v4_all" label="累计v4数" align="center"> </el-table-column>
							<el-table-column prop="f_v5_all" label="累计v5数" align="center"> </el-table-column>
							<el-table-column prop="f_v6_all" label="累计v6数" align="center"> </el-table-column>
						</el-table-column>
					</el-table-column>
					<el-table-column label="统计截止日期:YYYY/MM/DD" align="center">
						<el-table-column prop="v2Count" label="各随访新增例(次)数" align="center">
							<el-table-column prop="f_v1" label="新增v1数" align="center"> </el-table-column>
							<el-table-column prop="f_v2" label="新增v2数" align="center"> </el-table-column>
							<el-table-column prop="f_v3" label="新增v3数" align="center"> </el-table-column>
							<el-table-column prop="f_v4" label="新增v4数" align="center"> </el-table-column>
							<el-table-column prop="f_v5" label="新增v5数" align="center"> </el-table-column>
							<el-table-column prop="f_v6" label="新增v6数" align="center"> </el-table-column>
				
							<!-- <el-table-column prop="v4EndCount" label="累计v5(次)数" :render-header='renderHeadeRexpert' align="center"
								index=16></el-table-column> -->
								<!-- <el-table-column prop="v4EndCount" label="累计v5(次)数" :render-header='renderHeadeRexpert' align="center"
								index=16></el-table-column> -->
						</el-table-column>
						<el-table-column prop="v2Count" label="累计/新增出组、失访数" align="center">
							<el-table-column prop="out_all_count" label="累积出组数" align="center"> </el-table-column>
							<el-table-column prop="out_count" label="新增出组数" align="center"> </el-table-column>
							<el-table-column prop="lost_all_count" label="累积失访数" align="center"> </el-table-column>
							<el-table-column prop="lost_count" label="新增失访数" align="center"> </el-table-column>
							<el-table-column prop="out_lost_count" label="新增出组数(包括失访)" align="center"> </el-table-column>
							<el-table-column prop="out_lost_all_count" label="累计出组数(包括失访)" align="center"> </el-table-column>
				</template>
			</el-table>
			<!-- <div class="c-t-right mt20">
				<el-pagination 
				  @current-change="handleCurrentChange"
				  :current-page.sync="currentPage"
				  :page-size="currentSize"
				  layout="total, prev, pager, next, jumper"
				  :total="datatotal">
				</el-pagination>
			</div> -->
		</div>
	</div>
	<script src="../../../js/FileSaver/FileSaver.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/jquery-2.2.4.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/element-ui.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../plugins/toastr/toastr.min.js"></script>
	<script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../api/home-api.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../api/statistics-api.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../component/common/event-bus.js"></script>
	<script src="../../../component/statistics/header-tab.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../component/statistics/header-prompt.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript" src="../../../api/sign_api.js"></script>
	<script src="../js/common.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/dejdsjyysfjdjczqk.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>

+ 1 - 0
app/statistics/js/comprehensive-query.js

@ -86,6 +86,7 @@ new Vue({
			 {label: '第二阶段社区医院入组进度', id:'59'},
			 {label: '第二阶段三级医院随访进度', id:'60'},
			 {label: '第二阶段社区医院随访进度', id:'61'},
			 {label: '第二阶段三级医院随访进度及出组情况', id:'62'},
		],
		handleNodeShow:1,
		handleNodeId:0,

+ 262 - 0
app/statistics/js/dejdsjyysfjdjczqk.js

@ -0,0 +1,262 @@
var template = ''
$.ajax('../html/dejdsjyysfjdjczqk.html',{
	data: {},
	dataType: 'html',
	cache: false,
	timeout: 60000, 
	async: false,
	error: function(res) {
	},
	success: function(res) {
		template = res
	}
})
Vue.component('mzf-dejdsjyy-sfjdjczqk', {
	props: ['type'],
	template: template,
	data: function() {
		return {
			dejdsjyyRzDate:[],
			testArr1: [],
			testArr2: [],
			testPosition1: 0,
			testPosition2: 0,
			list:[],
			startTime:new Date('2023','05','26'),
			endTime:new Date(),
			regionList:[],
			regionData:[
				{label:'全市',id:'1',type:'1'}
			],
			regionListList:[],
			tertiaryHospitalsData:[
				{label:'全部',id:'1',type:'2'}
			],
			communityHospitalsList:[],
			communityHospitalsData:[
				{label:'全部',id:'1',type:'3'}
			],
			groupingList:[],
			groupingData:[
				{label:'全部',id:'1',type:'4'}
			],
			administrationStatusList:[],
			administrationStatusData:[
				{label:'全部',id:'1',type:'5'}
			],
			show:false,
			showTwo:false,
			showThree:false,
			currentPage:1,
			currentSize:10, 
			datatotal:0, //总数
			loadingTwo:false,
			setDisabled:{
				disabledDate:function(time) {
					return time.getTime() < new Date('2023','05','26') || time.getTime() > Date.now();
				}
			},
			s:'',
			e:'',
			mergeObj: {},
			mergeArr: ['areaName', 'gradeHospitalName', 'value','communityHospitalName','targetEntryCont','v1AllCount','firstV1FinishDate','v1MonthCount','entryRate'],
		}
	},
	created: function(){
		this.s = this.startTime.format('yyyy-MM-dd')
		this.e = this.endTime.format('yyyy-MM-dd')
		this.list.unshift({type:'0',id:'time',label:this.s +"~"+ this.e})
		this.getFollowAndOutData()
	},
	watch:{
		'startTime':{
			 handler:function(o) {
				if(!o) {
					this.list.splice(0,1)
				}
			 },
			 deep: true,
			 immediate: true
		},
		'endTime':{
			 handler:function(o) {
				if(!o) {
					this.list.splice(0,1)
				}
			 },
			 deep: true,
			 immediate: true
		},
	},
	methods: {
		getFollowAndOutData:function() {
			var vm = this
			vm.loadingTwo = true
			var data = {
				startTime:this.startTime.format('yyyy-MM-dd'),
				endTime:this.endTime.format('yyyy-MM-dd')
			}
			statisticAPI.getFollowAndOutData({
				jsonStr:JSON.stringify(data)
			}).then(function(res){
				if(res.status == 200) {
					console.log(res,'随访进度及出组情况');
					vm.loadingTwo = false
					vm.dejdsjyyRzDate = res.data.data
					// vm.dejdsjyyRzDate= vm.mergeArrays(res.data.data01,res.data.data02)
					console.log('我是第二阶段三级医院随访进度及出组情况',vm.dejdsjyyRzDate)
					vm.getSpanArr(vm.dejdsjyyRzDate)
				}
			}).catch(function(err){
				vm.loadingTwo = false
			})
		},
		//合并新数组
		mergeArrays:function(array1, array2) {
		    var mergedArray = [];
		array1.forEach(function(item1,index){
			array2.slice(index*3,index*3+3).forEach(function(item2){
				 var mergedObj = Object.assign({}, item1, item2, { newDetail: 'Detail ' + i });
				  mergedArray.push(mergedObj);
			})
		})
		    return mergedArray;
		},
		startTimeChange:function(o) {
			if(!this.list[0] || this.list[0].type!=0) {
			 this.list.unshift({type:'0',id:'time',label:o.format('yyyy-MM-dd') +"~"+ this.endTime.format('yyyy-MM-dd')})
			}else{
				this.list[0].label = o.format('yyyy-MM-dd') +"~"+ this.endTime.format('yyyy-MM-dd')
			}
		},
		endTimeChange:function(o) {
			if(!this.list[0] || this.list[0].type!=0) {
				this.list.unshift({type:'0',id:'time',label:this.startTime.format('yyyy-MM-dd') +"~"+ o.format('yyyy-MM-dd')})
			}else{
				this.list[0].label = this.startTime.format('yyyy-MM-dd') +"~"+ o.format('yyyy-MM-dd')
			}
		},
		deleteClick:function(item) {
			if(item.id == "time") {
				this.startTime = ''
				this.endTime = ''
				this.list.splice(0,1)
			}
			var index = this.list.findIndex(function(v){
				return item.id == v.id
			})
			this.list.splice(index,1)
		},
		// 下一页  上一页
		handleCurrentChange:function(val) {
			var vm = this
			vm.currentPage = val
		},
		change:function(val) {
			this.list = this.list.concat(val)
		},
		// 确定
		confirm:function() {
			this.getFollowAndOutData()
		},
		// 取消
		cancel:function() {
			this.startTime = new Date('2023','05','26')
			this.endTime = new Date()
			if(!this.list[0] || this.list[0].type!=0) {
			 this.list.unshift({type:'0',id:'time',label:this.startTime.format('yyyy-MM-dd') +"~"+ this.endTime.format('yyyy-MM-dd')})
			}else{
				this.list[0].label = this.startTime.format('yyyy-MM-dd') +"~"+ this.endTime.format('yyyy-MM-dd')
			}
		},
		// 导出
		exportHandle:function() {
			var vm = this
			vm.loadingTwo = true
			var data = {
				startTime:this.startTime.format('yyyy-MM-dd'),
				endTime:this.endTime.format('yyyy-MM-dd')
			}
			var jsonStr = JSON.stringify(data)
			statisticAPI.exportFollowAndOutData({
				jsonStr: encodeURIComponent(jsonStr)
			},'慢阻肺第二阶段三级医院随访进度及出组情况.xls').then(function(res){
				vm.loadingTwo = false
			})
		},
	getSpanArr(data) {
		this.mergeArr.forEach((key, index1) => {
			var count = 0; // 用来记录需要合并行的起始位置
			this.mergeObj[key] = []; // 记录每一列的合并信息
			data.forEach((item, index) => {
				// index == 0表示数据为第一行,直接 push 一个 1
				if(index === 0) {
					this.mergeObj[key].push(1); 
				} else {
					// 判断当前行是否与上一行其值相等 如果相等 在 count 记录的位置其值 +1 表示当前行需要合并 并push 一个 0 作为占位
					if(key==='v1MonthCount'||key==='targetEntryCont'||key==='firstV1FinishDate'||key==='v1AllCount'||key==='entryRate'){
						if(item[key] === data[index - 1][key] && this.mergeObj[key][count]%3!=0) {
								this.mergeObj[key][count] += 1;
								this.mergeObj[key].push(0);
						} else {
							// 如果当前行和上一行其值不相等 
							count = index; // 记录当前位置 
							this.mergeObj[key].push(1); // 重新push 一个 1
						}
					}else{
						if(item[key] === data[index - 1][key]  ) {
								this.mergeObj[key][count] += 1;
								this.mergeObj[key].push(0);
						} else {
							// 如果当前行和上一行其值不相等 
							count = index; // 记录当前位置 
							this.mergeObj[key].push(1); // 重新push 一个 1
						}
					}
					
				}
			})
		})
	},
	
	//得到行、列的合并值
	objectSpanMethod: function({row, column, rowIndex, columnIndex}) {
	    if(this.mergeArr.indexOf(column.property) !== -1) { 
	        // 判断其值是不是为0 
	        if(this.mergeObj[column.property][rowIndex]) { 
	            return [this.mergeObj[column.property][rowIndex], 1]
	        } else {
	            // 如果为0则为需要合并的行
	            return [0, 0]; 
	        }
	    }
	},	
	
	renderHeadeRexpert: function(h, item) {
				var index = item.$index
			  return [
				index=='2'?'目标V2入组例数':index=='3'?'首例V1入筛时间(YYYY/MM/DD)':index=='7'?'首例V2入组时间(YYYY/MM/DD)':index=='10'?'入组完成率':'',
				h(
				  'el-tooltip',
				  {
					props: {
					  content: (function() {
						return 	index=='2'?'即目标入组例数(与管理目标数一致)':index=='3'?'完成V1的提交时间,即“第一例完成V1并成功纳入筛选期的访视日期':index=='7'?'查询第一个入组的时间(访视2触发入组,统计第一个做访视2的患者,且是完成访视2提交的时间。)':index=='10'?'入组完成率=已入组/目标V2入组例数':''
					  })(),
					  placement: 'top'
					}
				  },
				  [
					h('span', {
					  class: {
						'el-icon-question': true
					  }
					})
				  ]
				)
			  ]
			},
	
	}
})