zyz 7 years ago
parent
commit
ab12b3c9b5

+ 3 - 0
app/record/css/record.css

@ -0,0 +1,3 @@
.service-nav-tabs{margin-bottom: 10px;margin-top: 10px;}
.service-nav-tabs li a{background: #f5f5fa;border-color:#d7dce6;color: #666666;margin-left: 10px;padding: 8px 20px;}
.service-nav-tabs li.active a{color: #12b7f5;}

+ 6 - 0
app/record/js/record.js

@ -0,0 +1,6 @@
new Vue({
  el: '#app',
  data: {
    
  }
})

+ 18 - 0
app/record/record.html

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link />
		<link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css"/>
		<link rel="stylesheet" href="../record/css/record.css" />
	</head>
	<body id="app">
		<inner-tabs :tabs="innerTabs" :activeidx="activeidx"></inner-tabs>
		
		<script type="text/javascript" src="../../js/vue.js"></script>
		<script src="../../component/record/inner-tabs.js"></script>
		<script src="../../component/record/record-tabs.js"></script>
		<!--<script type="text/javascript" src="js/record.js"></script>-->
	</body>
</html>

+ 37 - 0
component/record/inner-tabs.js

@ -0,0 +1,37 @@
Vue.component('inner-tabs', {
	template: '<ul class="nav nav-tabs service-nav-tabs">\
			  		<li v-for="(tab,index) in tabs" role="presentation" :class="{active: (activeidx == index)}">\
			  			<a @click="load(tab, index)">{{tab.title}}</a>\
			  		</li>\
				</nav>\
				<div class="inner-main" style="height: calc(100% - 40px);overflow:hidden;">\
					<iframe :src="url" width="100%" height="100%" frameborder="0" seamless style="display: inline"></iframe>\
				</div>\
				</div>',
	props: ["tabs","activeidx"],
	data: function() {
		return {
			url: ""
		}
	},
	methods: {
		load: function(tab, index) {
//			top.GlobalEventBus.$emit("active-inner-tabs."+this.namespce, tab)
			this.url = tab.href
			this.activeidx = index
		},
		activeTab: function(index) {
//			this.activeidx = index
//			this.url = this.tabs[this.activeidx].href
//			this.load(this.tabs[index], index)
		}
	},
	mounted: function() {
		
	},
	watch: {
		activeidx: function(idx) {
			this.url = this.tabs[idx].href
		}
	}
})

+ 17 - 0
component/record/record-tabs.js

@ -0,0 +1,17 @@
new Vue({
  el: '#app',
  data: {
    innerTabs: [{title:'咨询',href:'record.html?code=1'},
    			{title:'随访',href:'record.html?code=2'},
    			{title:'待预约',href:'record.html?code=3'},
    			{title:'健康指导',href:'record.html?code=4'},
    			{title:'健康教育',href:'record.html?code=5'},
    			{title:'统计',href:'record.html?code=6'}
    ],
    activeidx: ""
  },
  mounted: function() {
  	var vm = this
  	vm.activeidx = query.tabIdex || "0"
  }
})