ljj 6 anos atrás
pai
commit
6dd8627d73

+ 21 - 0
component/common/nodata.js

@ -0,0 +1,21 @@
(function() {
	
	Vue.component('nodata', {
        template: '	<div class="nodata flex_coloumn f_xy_c" style="margin-top:150px">\
                            <img style="width:50%;max-width:200px" src="../../../page/bigDataOut/images/nodeData.png">\
                            <div class="mt10" style="font-size:16px;color:#909090">暂无数据</div>\
                    </div>',
		props: ["arr",'needShow'], //可以传数组 可以传显隐
		data: function() {
			return {
			}
		},
        computed: {
            hasData:function(){
                return  (arr && arr.length>0) || needShow
            }
        }
	})
})()

+ 20 - 0
js/api/bigDataOut-api.js

@ -0,0 +1,20 @@
(function(exports) {
	var bigDataOutApi = {
        // 获取热搜
		hot_words: function() {
            var params ={
                reCount:5,
                type:1
            }
            return httpRequest.get("/api/v1.0/resource/text_search/hot_words",{data: params,getServer:true})
        },
        //全文检索
		text_search: function(data) {
            return httpRequest.get("/api/v1.0/resource/text_search",{data: data,getServer:true})
        },
	}
	
	exports.bigDataOutApi = bigDataOutApi;
})(window)

+ 1 - 0
js/post.js

@ -6,6 +6,7 @@
		"../js/plugins/toastr/toastr.min.js",
		"../js/plugins/layer/layer.min.js",
		"../component/common/event-bus.js",
		"../component/common/nodata.js",
		"../js/element.js",
		"../js/es6-promise.js",
		"../js/api/http-request.js",

+ 1 - 1
js/util.js

@ -34,7 +34,7 @@ function resetClientWidth() {
	}
}
resetClientWidth()
if(!window.noUse)resetClientWidth()
function isMobilePhone(n) {
	var reg = /^1[34578]\d{9}$/

+ 93 - 0
page/bigDataOut/component/resultList.js

@ -0,0 +1,93 @@
(function () {
    Vue.component('resultlist', {
        template: '<div >\
                        <div v-if="data && data.length>0">\
                         <div class="result_list flex f_wrap" v-for="item in data" >\
                            <div class="flex"><span class="des">就诊日期</span>:<span class="result">{{forMatterDate(item.event_date)}}</span></div>\
                            <div class="flex"><span class="des">就诊类型</span>:<span class="result">{{(item.event_type==0 && \'门诊\') || (item.event_type==1 && \'住院\')}}</span></div>\
                            <div class="flex"><span class="des text_s ">性别</span>:<span class="result">{{(item.patient_sex==1 && \'男\') || (item.patient_sex==2 && \'女\') || "" }}</span></div>\
                            <div class="flex"><span class="des">出生日期</span>:<span class="result">{{forMatterDate(item.patient_birthday)}}</span></div>\
                            <div class="flex"><span class="des text_s">姓名</span>:<span class="result">{{item.patient_name}}</span></div>\
                            <div class="flex"><span class="des text_s">医生</span>:<span class="result">{{item.doctor}}</span></div>\
                            <div class="flex"><span class="des text_s ">就诊医院</span>:<span class="result two_width">{{item.org_name}}</span></div>\
                            <div class="flex"><span class="des text_s  " >就诊科室</span>:<span class="result two_width">{{item.dept_name}}</span></div>\
                            <div class="f_14" v-html="item.hl"></div>\
                        </div>\
                        <div class="block flex f_xy_c">\
                                <el-pagination\
                                @size-change="handleSizeChange"\
                                @current-change="handleCurrentChange"\
                                :current-page="currentPage"\
                                :page-sizes="pageSizeArr"\
                                :page-size="pageSize"\
                                layout="total, sizes, prev, pager, next, jumper"\
                                :total="total">\
                            </el-pagination>\
                        </div>\
                        </div>\
                        <nodata v-else ></nodata>\
                    </div>',
        props: ['keyword','filters'],
        data: function () {
            return {
                currentPage:1,
                pageSizeArr:[15,30,50,100],
                pageSize:15,
                total:0,
                data:[],
                searchKey:''
            }
        },
        mounted: function () {
            
        },
        methods: {
            forMatterDate:function(date){
                return 	new Date(date).format('yyyy-MM-dd')
            },
            handleCurrentChange:function(val){ //page
                this.currentPage = val;
                this.getList()
            },
            handleSizeChange:function(val){// size
                this.pageSize=val;
                this.initData()
            },
            getList:function(){
                var vm=this;
                var params={
                    page:this.currentPage,
                    size:this.pageSize,
                    keyword:this.keyword,
                    filters:this.filters
                }
                
                GlobalEventBus.$emit('setLoading',{
                    loading:true
                });
        
                bigDataOutApi.text_search(params).then(function(res){
                    GlobalEventBus.$emit('setLoading');
                    vm.data=res.detailModelList;
                    vm.total=res.totalCount;
                }).catch(function(err){
                    
                    console.erroe(err)
                    
                    GlobalEventBus.$emit('setLoading');
                })
            },
            initData:function(){  //初始化数据
                this.currentPage = 1;
                this.getList()
            }
        },
        watch: {
            resultList(val){
                
            }
        }
    })
})()

+ 32 - 3
page/bigDataOut/css/flex.css

@ -4,7 +4,12 @@
    display:-webkit-flex;
    display:flex;
}
.flex_coloumn{
    display:-webkit-box;
    display:-webkit-flex;
    display:flex;
    flex-direction: column
}
.f_xy_c{    
    -webkit-justify-content: center;
    justify-content: center;
@ -19,7 +24,10 @@
    -webkit-justify-content: center;
    justify-content: center;
}
.f_x_e{
    -webkit-justify-content: flex-end;
    justify-content: flex-end;
}
.f_g_1{
    -webkit-flex-grow:1;
    flex-grow:1;
@ -44,4 +52,25 @@
    -o-text-overflow:ellipsis; /*溢出省略号,支持opera*/
    overflow:hidden;/*溢出隐藏*/
}
}
/* 文本两端对齐 */
.text_s{  
    text-align:justify;
    text-justify:distribute-all-lines;/*ie6-8*/
    text-align-last:justify;/* ie9*/
    -moz-text-align-last:justify;/*ff*/
    -webkit-text-align-last:justify;/*chrome 20+*/
}
@media screen and (-webkit-min-device-pixel-ratio:0){/* chrome*/
    .text_s:after{
        content:".";
        display: inline-block;
        width:100%;
        overflow:hidden;
        height:0;
    }
}
[v-cloak] {
    display: none;
}

+ 45 - 0
page/bigDataOut/css/home.css

@ -0,0 +1,45 @@
.search_box {
   padding: 235px;
   padding-top: 138px;
   padding-bottom: 150px
}
.search_box  button{
    background-color: #009dfe;
    border-radius: 2px;
    letter-spacing: 7px;
    margin-left: 21px
}
.search_list span{
    color: #909090;
    font-size: 14px;
    margin: 17px 40px 0 12px;
    cursor: pointer;
}
.el-input{
    min-width: 700px
}
.enter_list{
    padding-left: 275px;
    padding-right: 413px
}
.enter_list >div{
    padding: 9px 9px 16px 9px;
    cursor: pointer;
    color: #323232;
    background-color: #f9f8fe;
	border: solid 1px #e7e7e7;
    font-size: 16px;
    width: 33%;
    box-sizing: border-box;
    min-width: 200px
}
.enter_list >div>img{
    width: 100%
}
.enter_list >div:hover{
    border: solid 1px #33b1fe;
    color: #33b1fe;
}
.enter_list >div>img{
    margin-bottom: 10px;
}

+ 80 - 0
page/bigDataOut/css/search.css

@ -0,0 +1,80 @@
.search_box {
    padding: 235px;
    padding-top: 30px;
    padding-bottom: 50px
 }
 .search_box  button{
     background-color: #009dfe;
     border-radius: 2px;
     letter-spacing: 7px;
     margin-left: 21px
 }
 .search_list span{
     color: #909090;
     font-size: 14px;
     margin: 17px 40px 0 12px;
     cursor: pointer;
 }
 .search_box  .el-input{
    min-width: 700px
}
 .enter_list{
     padding-left: 275px;
     padding-right: 413px
 }
 .enter_list >div{
     padding: 9px 9px 16px 9px;
     cursor: pointer;
     color: #323232;
     background-color: #f9f8fe;
     border: solid 1px #e7e7e7;
     font-size: 16px;
     width: 33%;
     box-sizing: border-box;
     min-width: 200px
 }
 .enter_list >div>img{
     width: 100%
 }
 .enter_list >div:hover{
     border: solid 1px #33b1fe;
     color: #33b1fe;
 }
 .enter_list >div>img{
     margin-bottom: 10px;
 }
 .result_list{
     padding: 23px  37px 21px 19px;
     border: solid 1px #e7e7e7;
     font-size: 16px;
     margin: 0 24px 15px 30px;
 }
 .result_list >div{
    margin-right: 44px;
    margin-bottom:15px
 }
 .result_list .des{
     width: 64px;
     color: #323232;
     height: 20px;
 }
 .result_list .result{
     width: 144px;
     color: #909090;
     border-bottom: solid 1px #e7e7e7;
     padding-bottom: 5px
 }
 .two_width{
     width:412px!important
 }
 em{
     color: red
 }
 .f_14{
     font-size: 14px
 }
 .el-pagination{
     font-size: 16px;
     margin: 0 24px 15px 30px;
 }

+ 50 - 0
page/bigDataOut/html/home.html

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>质控管理</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <script src="../../../js/head.js"></script>
    <link rel="stylesheet" href="../css/home.css"/>
</head>
<body>
    <div id="app" style="height: 100%;" v-cloak>
        <div class="search_box" >
            <div class="flex f_xy_c ">
                    <el-input placeholder="请输入内容"  v-model="searchKey" style="" clearable>
                        </el-input>
                        <el-button type="primary" @click="goSearch(searchKey)">搜索</el-button>
            </div>
            <div class="search_list flex">
                <span class="f_s_0" v-for="item in hotList" @click="goSearch(item)">{{item}}</span>
            </div>
        </div>
      
        <div class="flex f_xy_c enter_list f_x_s">
            <div style="margin-right:37px" @click="setIndexPage('2-1')">
                <img src="../images/smallSee.jpg" >
                <div>医疗大数据分析</div>
            </div>
            <div style="margin-right:37px" @click="setIndexPage('2-3')">
                <img src="../images/smallSee.jpg" >
                <div>居民健康管理大数据分析</div>
            </div>
            <div>
                <img src="../images/smallSee.jpg"  @click="setIndexPage('2-2')">
                <div>医保费用支出分析</div>
            </div>
        </div>
    </div>
    <script>
       window.noUse =true
    </script>
    <script src="../../../js/post.js"></script>
    <script src="../../../js/api/bigDataOut-api.js"></script>
    <script src="../js/home.js"></script>
</body>
</html>

+ 4 - 2
page/bigDataOut/html/index.html

@ -3,7 +3,7 @@
<head>
    <meta charset="UTF-8">
    <title>质控管理</title>
    <title>呵呵</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <script src="../../../js/head.js"></script>
    <link rel="stylesheet" href="../css/index.css"/>
@ -53,7 +53,9 @@
            </el-main>
        </el-container>
    </div>
    <script>
        window.noUse =true
     </script>
    <script src="../../../js/post.js"></script>
    <script src="../js/index.js"></script>
</body>

+ 60 - 0
page/bigDataOut/html/search.html

@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>质控管理</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <script src="../../../js/head.js"></script>
    <link rel="stylesheet" href="../css/search.css"/>
</head>
<body>
    <div id="app" style="height: 100%;" v-cloak>
        <div class="search_box" >
            <div class="flex f_xy_c ">
                    <el-input placeholder="请输入内容"  v-model="searchKey" style="" clearable>
                        </el-input>
                        <el-button type="primary" @click="search(searchKey)">搜索</el-button>
            </div>
            <div class="search_list flex">
                <span class="f_s_0" v-for="item in hotList" @click="search(item)">{{item}}</span>
            </div>
        </div>
      
        <div class="flex f_x_e">
                <el-radio-group v-model="type" style="margin-right:24px;margin-bottom: 10px" size="medium">
                        <el-radio-button label="全部"></el-radio-button>
                        <el-radio-button label="门诊"></el-radio-button>
                        <el-radio-button label="住院"></el-radio-button>
                      </el-radio-group>
        </div>
        <resultlist :keyword="searchword" v-show="type=='全部'" ref="allEvent" ></resultlist>
        <resultlist :keyword="searchword"  :filters="'event_type=1'"  v-show="type=='门诊'" ref="outpatient" ></resultlist>
        <resultlist  :keyword="searchword"  :filters="'event_type=2'"  v-show="type=='住院'" ref="hospitalization"></resultlist>
        <!-- <div class="result_list flex f_wrap" v-for="item in resultList">
           <div class="flex"><span class="des">就诊日期</span>:<span class="result">{{forMatterDate(item.event_date)}}</span></div>
           <div class="flex"><span class="des">就诊类型</span>:<span class="result">{{(item.event_type==0 && '门诊') || (item.event_type==1 && '住院')}}</span></div>
           <div class="flex"><span class="des text_s ">性别</span>:<span class="result">{{item.patient_sex==1?'男':'女'}}</span></div>
           <div class="flex"><span class="des">出生日期</span>:<span class="result">{{forMatterDate(item.patient_birthday)}}</span></div>
           <div class="flex"><span class="des text_s">姓名</span>:<span class="result">{{item.patient_name}}</span></div>
           <div class="flex"><span class="des text_s">医生</span>:<span class="result">{{item.doctor}}</span></div>
           <div class="flex"><span class="des text_s ">就诊医院</span>:<span class="result two_width">{{item.org_name}}</span></div>
           <div class="flex"><span class="des text_s  " >就诊科室</span>:<span class="result two_width">{{item.dept_name}}</span></div>
           <div class="f_14" v-html="item.hl"></div>
        </div> -->
    </div>
    <script>
     window.noUse =true
    </script>
    <script src="../../../js/post.js"></script>
    <script src="../component/resultList.js"></script>
    <script src="../../../js/api/bigDataOut-api.js"></script>
    <script src="../js/search.js"></script>
</body>
</html>

BIN
page/bigDataOut/images/nodeData.png


BIN
page/bigDataOut/images/smallSee.jpg


+ 42 - 0
page/bigDataOut/js/home.js

@ -0,0 +1,42 @@
new Vue({
	el: '#app',
	data: function () {
		return {
            searchKey:'',
            hotList:[]
		}
	},
	computed: {
	},
	mounted:function() {
		this.getHot()
	},
	methods: {
		getHot:function(){
			var vm=this;
			bigDataOutApi.hot_words().then(function(res){
				vm.hotList=res
			}).catch(function(err){
				console.err(err)
			})
		},
        setIndexPage:function(key){
            
            GlobalEventBus.$emit('setleftTabUrl', {
					key: key
			});
        },
        goSearch:function(value){
			if(!value)value=''
			url = '../html/search.html?search='+value;
			GlobalEventBus.$emit('setIframeUrl', {
				history: {url:url,text:'全文病历检索'}
			});
        }
	},
	watch: {
	}
})

+ 59 - 40
page/bigDataOut/js/index.js

@ -4,10 +4,10 @@ new Vue({
		return {
			// iframeSrc: "../../new-quailty-manager/html/new-quailty-manager.html", 
			loading: false,
			tabList: [],
			historyArr:[{url:'../../bigData/html/home.html',text:'测试'},],  //历史记录
			historyArr:[{url:'../html/home.html',text:'首页'},],  //历史记录
			activeIndex:'0' , //当前历史记录选中的下标
			leftTabActive:'2-0',//左边菜单中当前高亮下标
			leftTabActive:'0-0',//左边菜单中当前高亮下标
			isCollapse: false, //导航栏是否隐藏
			screenWidth: document.body.clientWidth,//屏幕宽度
		}
@ -23,21 +23,30 @@ new Vue({
	},
	mounted:function() {
		this.resize()
		GlobalEventBus.$on("setLoading", function(arg) {
		
			if(arg.loading){
				vm.loading = true
			}			
			else{
				vm.loading = false
			}
		});
		GlobalEventBus.$on("setIframeUrl", function(arg) {
		
			vm.setHistory(arg.history)
		});
		this.bidnEvent()
	},
	methods: {
		bidnEvent:function(){  //供子页面调用的事件 (子页面是iframe)
			var vm =this;
			GlobalEventBus.$on("setLoading", function(arg) {  //控制整个界面加载
		
				if(arg && arg.loading){
					vm.loading = true
				}			
				else{
					vm.loading = false
				}
			});
			GlobalEventBus.$on("setIframeUrl", function(arg) { //新打开窗口并且记录历史记录
			
				vm.setHistory(arg.history)
			});
			GlobalEventBus.$on("setleftTabUrl", function(arg) { //打开左边菜单中的页面 可直接传对应  
				
				vm.handleSelect(arg.key)
			});
		},
		resize:function() { //监听页面改变大小
			const that = this
			this.isCollapse = this.screenWidth >= 786 ? false : true;
@ -57,25 +66,30 @@ new Vue({
				this.isCollapse = !this.isCollapse;
				  break;
				case '2-0':
				
				activeObj = 	{url:'../html/search.html',text:'全文病历检索'};
				  break;
				case '2-1':
				activeObj = 	{url:'../../bigData/html/medical.html',text:'各个'};
				window.open('../../bigData/html/medical.html')
				  break;
				case '2-2':
				  
				window.open('../../bigData/html/medical.html')
				  break;
				case '2-3':
				 
			  }
				window.open('../../bigData/html/home.html')
				break;
				case '2-4':
				activeObj = 	{url:'../html/search.html',text:'医保控费分析'};
				break;
				}
				if(!activeObj)return 
			 this.leftTabActive=key
			 activeObj.fromLeft=true
			// key=key.toString()
			// this.isActive = key.substring(0, 1)
			// var childrenIndex= key.split('-')[1]-1;
			// var activeObj = 	this.tabList[(this.isActive-1)].children[childrenIndex];
			if(activeObj)
			vm.setHistory(activeObj)
		},
		deleteHistory:function(index){
@ -85,30 +99,34 @@ new Vue({
			}
		},
		setHistory:function(obj){  
			
				
			var vm = this;
			var exist = false;
			var index = null;
	
			if(typeof(obj)=='string'){ //有些页面直接传url过来  先检测是是左边菜单中的哪个
		
			// if(typeof(obj)=='string'){ //如果左边菜单换成数组的话  现在暂时没空
			
				vm.tabList.forEach(function(v){
					v.children.forEach(function(value){
						if(typeof(obj)=='string' && obj.indexOf(value.url) != -1){  
							var	obj1 =newObj(value);
							obj1.url=obj;
							obj=obj1;
						}
					})
				})
			}	
			// 	vm.tabList.forEach(function(v){
			// 		v.children.forEach(function(value){
			// 			if(typeof(obj)=='string' && obj.indexOf(value.url) != -1){  
			// 				var	obj1 =newObj(value);
			// 				obj1.url=obj;
			// 				obj=obj1;
			// 			}
			// 		})
			// 	})
			// }	
			vm.historyArr=	vm.historyArr.map(function(v,i){   //检测要跳转的url是否在历史记录中
				if(obj.url.indexOf(v.url.split('?')[0]) != -1 ){  
					switch (obj.url){                                   //已经存在并且在左边的菜单的话则需要高亮左边菜单
						case "../html/home.html":obj.index='0-0';break;
						case "../html/search.html":obj.index='2-0';break; 
					}
					exist=true;
					index = i;
					if(v.url!=obj.url) v.url=obj.url     //如果参数不同则重新赋值
					if(v.url!=obj.url && !obj.fromLeft) v.url=obj.url     //如果参数不同则重新赋值  按左边的则不需要比较
					
				}
				return v
@ -120,10 +138,11 @@ new Vue({
			else{						//存在则直接跳转
				this.activeIndex =index
			}
	     	if(obj.index)	this.leftTabActive=obj.index    //控制左边菜单选中
			if(obj.index)	
	    this.leftTabActive=obj.index    //控制左边菜单选中
		},
		controlRouter:function(key) {
            debugger
            
			switch (key) {
			  case '1':
				this.closeAllHistory();
@ -147,7 +166,7 @@ new Vue({
				  })
				  this.activeIndex=0
			}
		  },
			},
	},
	watch: {
		screenWidth:function(value) {

+ 73 - 0
page/bigDataOut/js/search.js

@ -0,0 +1,73 @@
new Vue({
	el: '#app',
	data: function () {
		return {
			searchKey:'',//input的值
			searchword:'',//搜索时传给子组件的值(可能input改变了未按搜索 所以分成两个)
            hotList:[],
			type:'全部', 
			allEventInit:false,  //判断是否需要重新加载数据
			outpatientInit:false,
			hospitalizationInit:false
		}
	},
	computed: {
	
	},
	mounted:function() {
		this.getHot();
	
		this.searchKey =(GetRequest().search && decodeURIComponent(GetRequest().search)) || ''
	
			this.initData(this.searchKey);
	
	},
	methods: {
		getHot:function(){
			var vm=this;
			bigDataOutApi.hot_words().then(function(res){
				vm.hotList=res
			}).catch(function(err){
				console.err(err)
			})
		},
		initData:function(keyword){
			this.searchword=keyword
			
			this.allEventInit =false;
			this.outpatientInit =false;
			this.hospitalizationInit =false;
			var vm=this
			this.$nextTick(function () {
				switch (vm.type){
					case '全部':vm.$refs.allEvent.initData();vm.allEventInit =true;break;
					case '门诊':vm.$refs.outpatient.initData();vm.outpatientInit =true;break;
					case '住院':vm.$refs.hospitalization.initData();vm.hospitalizationInit =true;break
				}
			})
			
		},
        setIndexPage:function(key){ //前往左边菜单页面
            
            GlobalEventBus.$emit('setleftTabUrl', {
					key: key
			});
        },
        search:function(value){
			this.searchKey=value
			this.initData(value);
		}
	},
	watch: {
		type:function(value){
			switch (value){
				case '全部':if(!this.allEventInit){this.$refs.allEvent.initData();this.allEventInit =true};break;
				case '门诊':if(!this.outpatientInit){this.$refs.outpatient.initData();this.outpatientInit =true;}break;
				case '住院':if(!this.hospitalizationInit){this.$refs.hospitalization.initData();this.hospitalizationInit =true;}break
			}
		}
	}
})