123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- (function(){
- Vue.component('hospital-filter',{
- template:'<div style="height: 400px;overflow: auto;margin-bottom: 50px;">\
- <el-tabs v-model="activeName" :stretch="true">\
- <el-tab-pane label="等级医院" name="0">\
- <div class="ptb10 c-f14 plr15 c-border-b ui-grid c-cursor-p" :class="{\'bgc-f2f3f4\':hospitalCode==item.code}" v-for="(item,index) in hopitalList" :key="index" @click="selHospitalItem(item)" >\
- <div class="ui-col-1">\
- {{item.name}}\
- </div>\
- </div>\
- </el-tab-pane>\
- <el-tab-pane label="社区医院" name="1">\
- <div class="ptb10 c-f14 plr15 c-border-b ui-grid c-cursor-p" :class="{\'bgc-f2f3f4\':hospitalCode==item.code}" v-for="(item,index) in chopitalList" :key="index" @click="selHospitalItem(item)" >\
- <div class="ui-col-1">\
- {{item.name}}\
- </div>\
- </div>\
- </el-tab-pane>\
- </el-tabs>\
- <div id="footer">\
- <div class="c-row btn-wrap c-border-top fr">\
- <div class="div-foot-btn mr20" @click="resetClick">\
- <a href="#" class="c-666 f-fs16">取消</a>\
- </div>\
- <div class="div-foot-btn active" @click="confirmClick">\
- <a href="#" class="c-666 f-fs16">确认</a>\
- </div>\
- </div>\
- </div>\
- </div>',
- props:['chopitalList','hopitalList'],
- data: function(){
- return {
- activeName:0,
- hospitalCode:"",
- hospitalItem:{},
- }
- },
- mounted: function(){
- },
- methods: {
- resetClick:function(){
- this.$emit('vuedals:close', {});
- },
- confirmClick:function(){
- var vm = this;
- if(vm.hospitalCode){
- //触发刷新
- this.$emit('vuedals:close', {
- hospitalItem: vm.hospitalItem,
- hospitalCode: vm.hospitalCode,
- activeName:vm.activeName,
- });
- }else{
- vm.$message.error("请选择医院")
- }
- },
- selHospitalItem:function(item){
- var vm = this;
- vm.hospitalItem = item
- vm.hospitalCode = item.code
- }
- }
- });
-
- })()
|