yht2016 преди 3 години
родител
ревизия
0ac49926c2

+ 4 - 0
api/statistics-api.js

@ -108,6 +108,10 @@
        selectHospital: function(data){
            return httpRequest.get("specialistStatistics/selectHospital", {data: data});
        },
		//数据导出查询
		getWHFInfoList: function(data){
		    return httpRequest.get("third/door/getWHFInfoList", {data: data});
		},
        
    }

+ 120 - 0
app/statistics/html/consult-not-reply.html

@ -0,0 +1,120 @@
<!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" />
</head>
<style>
	.el-table th{
		background: #F5F5FA;
	}
	.el-radio-button:first-child .el-radio-button__inner{
		border-radius: 15px 0 0 15px;
	}
	.el-radio-button:last-child .el-radio-button__inner{
		border-radius:  0 15px 15px 0;
	}
</style>
<body style="margin: 0;overflow-x: auto;">
    <div id="main" class="c-hide ">
        <header-tab appname="咨询未及时回复" isback="true" isrefresh="true"></header-tab>
        <div class="p20 bgc-f2f3f5">  
        	<div  style="border:1px solid #d7dce6">
		        <div class="ui-grid  bgc-f2f3f5">
		        	<div class="ui-col-1 bgc-fff p20" style="min-width: 900px;" :style="{ height: height + 'px' }">
		        		<div class="searchDiv">
		        			<el-radio v-model="radio" label="1">按签约年度:</el-radio>
		        			<el-select v-model="chooseYear" style="width:120px;" class="pr20">
				                <el-option v-for="(item , index) in years" :key="index" :label="item" :value="item"></el-option>
				            </el-select>
				            <el-radio v-model="radio" label="2">创建时间:</el-radio>
				            <el-date-picker v-model="start" type="date" unlink-panels placeholder="开始日期" value-format="yyyy-MM-dd" style="width:140px;"  :clearable="false" :picker-options="pickerOptions">
							</el-date-picker>
							<span class="c-999">-</span>
							<el-date-picker v-model="end" type="date" unlink-panels placeholder="结束日期" value-format="yyyy-MM-dd"  style="width:140px;"  :clearable="false" :picker-options="pickerOptions">
							</el-date-picker>
		        		</div>
		        		<div class="searchDiv mt20">
		        			<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>
				            </el-select>
		        			<label class="c-333 c-f14" for="" v-if="initlevel == 4||initlevel == 3">地区:</label>
		        			<el-select v-model="areaCode" style="width:100px;" class="pr10" v-if="initlevel == 4||initlevel == 3">
				                <el-option v-for="(item , index) in areaList" :key="index" :label="item.name" :value="item.code"></el-option>
				            </el-select>
		        			<label class="c-333 c-f14" for="" v-show="rangeCode!='town'">社区:</label>
		        			<el-select v-model="communityCode" style="width:200px;" class="pr10" v-show="rangeCode!='town'">
				                <el-option v-for="(item , index) in communityList" :key="index" :label="item.name" :value="item.code"></el-option>
				            </el-select>
		        			<label class="c-333 c-f14" for="" v-show="rangeCode == 'team'">团队:</label>
		        			<el-select v-model="teamCode" style="width:150px;" class="pr10" v-show="rangeCode == 'team'">
				                <el-option v-for="(item , index) in teamList" :key="index" :label="item.name" :value="item.id"></el-option>
				            </el-select>
				            <el-button type="primary" size="mini" @click="searchHandle">查询</el-button>
				            <el-button type="ff9526" size="mini" @click="exportHandle">导出</el-button>
		        		</div>
			        	<div>
			        		<el-table border :data="tabledata" style="width: 100%" class="mt20" v-loading="isloading">
			        			<el-table-column fixed type="index" label="序号" width="50" min-width="50" align="center"></el-table-column>
								<el-table-column prop="symptoms" label="咨询内容" min-width="100"></el-table-column>
								<el-table-column prop="name" label="居民姓名" align="center" min-width="100"></el-table-column>
								<el-table-column prop="create_time" label="咨询时间" align="center" min-width="100"></el-table-column>
								<el-table-column prop="reply_time" label="回复时间" align="center" min-width="100"></el-table-column>
								<el-table-column prop="content" label="回复内容" min-width="100"></el-table-column>
								<el-table-column prop="team_name" label="团队" align="center" min-width="100"></el-table-column>
								<el-table-column prop="doctor_name" label="全科医生" align="center" min-width="100"></el-table-column>
								<el-table-column prop="doctor_health_name" label="健管师" align="center" min-width="100"></el-table-column>
							</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>
		        </div>
	        </div>
        </div>
        <!--模态框组件-->
        <vuedals></vuedals>
    </div>
    <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/common/vuedals.js" type="text/javascript" charset="utf-8"></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 src="../js/common.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/consult-not-reply.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>

+ 3 - 3
app/statistics/html/home.html

@ -108,9 +108,9 @@
                </div>
                <div class="section-body mb30 mt10">
                    <div class="c-row n-row">
                        <div @click="goToPage(3)" class="c-20 mt20 c-t-center clearfix">
                            <img src="../../../images/shujudaochu_icon.png">
                            <div class="c-f12 c-999 mt10">数据导出</div>
                        <div v-for="item in dataQuery" @click="showDetail(item.url)" class="c-20 mt20 c-t-center clearfix">
                            <img :src="item.photo">
                            <div class="c-f12 c-999 mt10">{{item.label}}</div>
                        </div>
                    </div>
                </div>

+ 283 - 0
app/statistics/js/consult-not-reply.js

@ -0,0 +1,283 @@
Vue.use(Vuedals.default);
new Vue({
	el: "#main",
	data: {
		height:"",
        isloading:false,  //加载中
        start:"",
        end:"",
		tabledata:[],   //表格数据	
		levelList:[{level:"4",areaLevel:"2"},{level:"3",areaLevel:"3"},{level:"2",areaLevel:"4"}],  //两种搜索,地区等级对比
		areaLevel:"",  // 2、市,3、区,4、社区,5、团队
		initareaLevel:"",
		initlevel: '',
		initarea: '',
		level: '',
		area: '',
		areaTitle: '',
		index: '121',
		lowLevel: '',
		initlowLevel:"",
		years:[],
		chooseYear: '',
		userRole: '',
		tableHeader:[],
		pickerOptions:{
			disabledDate(time) {
                return time.getTime() > Date.now()
        	},
		},
       	radio:'1',
       	searchJson:{},
       	currentPage:1,
       	currentSize:10,
       	datatotal:0,
       	rangeList:[],
       	rangeCode:"",
       	areaList:[],
       	areaCode:"",
       	communityList:[{code:"",name:"全部"}],
       	communityCode:"",
       	teamList:[{code:"",name:"全部"}],
       	teamCode:"",
	},
	components: {
		vuedals: Vuedals.Component
	},
	watch: {
	    rangeCode: function (val) {
			var vm=this
			if(vm.initlevel != 2){
				vm.communityCode=""
			}
			vm.teamCode=""
	    },
	    areaCode:function(val){
			var vm=this
	    	vm.selChange(3)
	    },
	    communityCode:function(val){
			var vm=this
			vm.selChange(5)
	    },
	},
	mounted: function () {
		var vm=this
		//初始化数据
		initData(vm);
		vm.height = document.body.offsetHeight - 85
		window.onresize = function () {
			vm.height = document.body.offsetHeight - 85
			console.log(vm.height)
		}
	},
	methods: {
		beforeReq:function(flag){
			var vm=this,startDate="",endDate=""
			if(vm.radio=="1"){
				startDate = getStartDate(vm.chooseYear)
				endDate = getEndDate(vm.chooseYear)
			}else{
				if(!vm.start&&!vm.end){
					this.$message({
			          message: '请选择创建时间',
			          type: 'warning'
			        });
			        return false
				}else{
					if(vm.start>vm.end){
						this.$message({
				          message: '开始时间应早于结束时间',
				          type: 'warning'
				        });
				        return false
					}else{
						startDate = vm.start
						endDate = vm.end
					}
				}
			}
			return {start:startDate,end:endDate}
		},
		searchHandle:function(){
			var vm = this,searchJson=undefined
			searchJson = vm.beforeReq()
			if(searchJson){
				vm.currentPage = 1
				vm.searchJson = {
					startDate:searchJson.start,
					endDate:searchJson.end,
					range:vm.rangeCode,
					team:vm.teamCode,
					hospital:vm.communityCode,
					area:vm.areaCode=="350200"?"":vm.areaCode,
					size:vm.currentSize,
					page:vm.currentPage,
				}
				vm.getWHFInfoList()
			}
		},
		getWHFInfoList:function(){
			var vm = this
			vm.isloading = true
			var params=JSON.parse(JSON.stringify(vm.searchJson))
			params.page = vm.currentPage
			statisticAPI.getWHFInfoList(params).then(function(res){
				if(res.status == 200) {
					if(res.data.data){
						vm.tabledata = res.data.data.consultTeams
						vm.datatotal = res.data.data.consultTeamsSize
					}
                } else {
                    vm.$message.error(res.msg)
                }
				vm.isloading = false
			})
		},
		exportHandle:function(){
			var vm =this
			var vm = this,searchJson=undefined
			searchJson = vm.beforeReq()
			if(searchJson){
			    var areaCode = vm.areaCode=="350200"?"":vm.areaCode
				let str = httpRequest.server + 'third/door/appAdminToExcel?startDate='+searchJson.start+'&endDate='+searchJson.end+'&range='+vm.rangeCode+'&area='+areaCode+'&hospital='+vm.communityCode+'&team='+vm.teamCode
	            console.log(str)
	            window.location.href = str
			}
		},
		backClick:function(){
			history.go(-1);
		},
		bindEvent:function(){
			var vm=this
			//监听后退按钮的操作
			EventBus.$on("back-click", function (arg) {
				EventBus.$emit('update-statistics-time', {}); //更新统计时间
				vm.backClick()
			});
			//监听页面刷新
			EventBus.$on("refresh-click", function (arg) {
				EventBus.$emit('update-statistics-time', {}); //更新统计时间
				initData(vm)
			});
			$("#main").removeClass("c-hide");
		},
      	handleCurrentChange:function(val) {
      		this.currentPage = val
      		this.getWHFInfoList()
      	},
      	//获取省市区  type:区3
        getDistrict: function(type,code,name) {
            var vm=this,list = [],param=""
            if(type == 3){
            	list = [{code:code,name:name}]
            	param = "area"
            }else  if(type == 5){
            	list = [{code:"",name:"全部"}]
            	param = "community"
            }
            var params={
                type:type,code:code
            }
            homeAPI.getDistrict(params).then(function(res) {
                if(res.status == 200) {
                    vm[param+"List"]=list.concat(res.list)
                    vm[param+"Code"]=vm[param+"List"][0].code
                } else {
                    vm.$message.error(res.msg)
                }
            })
        },
        selChange:function(type){
        	var vm=this,name=""
        	if(type == 3){
        		vm.initSelOption("community")
        		vm.initSelOption("team")
        		vm.getCommunityHospital()
        	}else if(type == 5){
        		vm.initSelOption("team")
    			vm.teamListByArea()
        	}
        },
        initSelOption:function(param){
        	var vm=this
        	vm[param+"List"]=[{code:"",name:"全部"}]
        	if(param == "team"){
        		vm[param+"List"]=[{id:"",name:"全部"}]
        	}
            vm[param+"Code"]=vm[param+"List"][0].code||vm[param+"List"][0].id
        },
        getCommunityHospital:function() {
        	var vm=this,list = [{code:"",name:"全部"}],param="community"
            homeAPI.getCommunityHospital({area:vm.areaCode=='350200'?"":vm.areaCode}).then(function(res) {
                if(res.status == 200) {
                    vm[param+"List"]=list.concat(res.data)
                    vm[param+"Code"]=vm[param+"List"][0].code
                } else {
                    vm.$message.error(res.msg)
                }
            })
		},
		teamListByArea:function() {
        	var vm=this,list = [{id:"",name:"全部"}],param="team"
            homeAPI.teamListByArea({area:vm.areaCode=='350200'?"":vm.areaCode,hospital:vm.communityCode}).then(function(res) {
                if(res.status == 200) {
                    vm[param+"List"]=list.concat(res.data)
                    vm[param+"Code"]=vm[param+"List"][0].id
                } else {
                    vm.$message.error(res.msg)
                }
            })
		}
    },
})
function initData(vm) {
	//获得缓存中缓存的角色权限
	var userRole = window.sessionStorage.getItem("selectedRole");
	if (!userRole) {
		return false;
	}
	vm.userRole = JSON.parse(userRole);
	//level:2、市,3、区,4、社区,5、团队
	vm.initareaLevel = vm.areaLevel = vm.userRole.code == '350200' ? 2 : vm.userRole.code.length == 6 ? 3 : 4;
	vm.initlevel = vm.level = vm.userRole.code == '350200' ? 4 : vm.userRole.code.length == 6 ? 3 : 2;
//	vm.lowLevel = vm.initlowLevel = vm.userRole.code == '350200' ? 3 : vm.userRole.code.length == 6 ? 2 : 1;
				
	vm.initarea =vm.area  = vm.userRole.code;
	vm.areaTitle = vm.userRole.name;
	
	vm.rangeList=[{name:"按区",code:"town"},{name:"按社区",code:"hospital"},{name:"按团队",code:"team"}]
	
	if(vm.initlevel == 4){   //市获取区
		vm.getDistrict(3,vm.initarea,vm.areaTitle.substr(0,3))
		vm.rangeCode = vm.rangeList[0].code
	}else if(vm.initlevel == 3){   //区获取社区
		vm.areaList = [{code:vm.initarea,name:vm.areaTitle}]
		vm.areaCode = vm.initarea
		vm.rangeCode = vm.rangeList[0].code
	}else if(vm.initlevel == 2){   //社区获取团队
		vm.communityList = [{code:vm.initarea,name:vm.areaTitle}]
		vm.communityCode = vm.initarea
		vm.rangeList.shift() 
		vm.rangeCode = vm.rangeList[0].code
	}
	vm.searchJson.range = 	vm.rangeCode
	//初始化时间
	var now = new Date();
	vm.end = now.format("yyyy-MM-dd")
	var start = now.getTime() - 30*24*60*60*1000
	vm.start = new Date(start).format("yyyy-MM-dd")
	
	vm.nowyear = vm.chooseYear = now.getFullYear()
	vm.nowmonth = now.getMonth()+1
	vm.years = []
	for(i=vm.nowyear; i>=2016; i--){
		vm.years.push(i)
	}
	
	vm.tabledata = []
	vm.bindEvent()
}

+ 11 - 0
app/statistics/js/home.js

@ -100,6 +100,17 @@ new Vue({
		        people: 0
		    }
		},
		dataQuery: [{
			photo: '../../../images/shujudaochu_icon.png',
			label: '数据查询',
			url: 'comprehensive-query.html',
			allowArea:"",
		},{
			photo: '../../../images/weijishihuifu_icon.png',
			label: '咨询未及时回复',
			url: 'consult-not-reply.html',
			allowArea:"",
		}]
	},
	methods: {
		open: function() {

BIN
images/weijishihuifu_icon.png


BIN
images/weijishihuifu_zhihui_icon.png