(function(){ Vue.component('tizheng-info', { template: '
\

体征信息

\ \
\
指标
\
\ 舒张压\ 收缩压\
\
\ \
\
\
\
周期
\
\ 一周一月一年\
\
\
偏高{{total.high}}
\
正常{{total.normal}}
\
偏低{{total.low}}
\
', props: ['patient'], data: function() { return { selectedTab: 1, // 1-血糖, 2-血压 xtzb: [{ label: '早餐前', value: '1' },{ label: '早餐后', value: '2' },{ label: '午餐前', value: '3' },{ label: '午餐后', value: '4' },{ label: '晚餐前', value: '5' },{ label: '晚餐后', value: '6' },{ label: '睡前', value: '7' }], selectedXT: 1, selectedDateType: 1, total: {} } }, computed: { }, watch: { selectedXT: function(val) { EventBus.$emit("get-chart-data", { type: this.selectedTab, dateType: this.selectedDateType, gi_type: val }); } }, methods: { pre: function(){ if(this.selectedTab == 2){ return false; } this.selectedTab == 2; }, next: function(){ if(this.selectedTab == 1){ return false; } this.selectedTab == 1; }, chooseTab: function(str){ this.selectedTab = str; }, changeDateType: function(type){ this.selectedDateType = type; EventBus.$emit("get-chart-data", { type: this.selectedTab, dateType: this.selectedDateType, gi_type: this.selectedTab == 2 ? 0 : this.selectedXT }); } }, mounted: function() { var vm = this; //初始化下拉列表 // $('.zb-select').dropkick(); initZBInfo(vm); }, }); function initZBInfo(vm){ EventBus.$on('show-disease-zhibiao', function(arg){ var type = arg.type; // 2-高血压, 1-糖尿病 vm.selectedTab = type ; }); EventBus.$on("get-zhibiao-count", function(arg){ vm.total = arg.total; }) } })()