123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- (function () {
- Vue.component('resultlist', {
- template: '<div >\
- <div v-if="data && data.length>0">\
- <div v-for="item in data" style="margin-bottom:15px;cursor: pointer;" @click="go(item)">\
- <div class="result_list flex f_wrap" >\
- <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>\
- <div v-if="item.hl" class="zhaiyao" v-html="item.hl"></div>\
- </div>\
- <div class="block flex f_y_c f_x_e">\
- <el-pagination\
- @size-change="handleSizeChange"\
- background\
- @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;
- if(vm.currentPage = 1){
-
- GlobalEventBus.$emit('getSearchData',{data:vm.data})
- }
-
- }).catch(function(err){
- GlobalEventBus.$emit('setLoading');
- })
- },
- initData:function(){ //初始化数据
- this.currentPage = 1;
- this.getList()
- },
- go:function(item){
- var date = this.forMatterDate(item.event_date),
- orgName = item.org_name,
- profileId=item.rowkey,
- eventType=item.event_type,
- searchWord=this.keyword
- var url = httpRequest.server+'/profile/app/templateDetails/html/hospitalIndex.html?'+
- 'date='+date+'&orgName='+orgName+'&profileId='+profileId+'&eventType='+eventType+
- '&searchWord='+searchWord
-
- window.open(url)
- }
- },
- watch: {
- resultList(val){
-
- }
- }
- })
- })()
|