record-tabs.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. function GetRequest() {
  2. var url = location.search; //获取url中"?"符后的字串
  3. var theRequest = new Object();
  4. if (url.indexOf("?") != -1) {
  5. var str = url.substr(1);
  6. strs = str.split("&");
  7. for(var i = 0; i < strs.length; i ++) {
  8. theRequest[strs[i].split("=")[0]]=(strs[i].split("=")[1]);
  9. }
  10. }
  11. return theRequest;
  12. }
  13. var query = GetRequest();
  14. function reseverLinks(str) {
  15. var link = top.menuLinkMap[str];
  16. return {
  17. href: link.href+"?code="+query['code'],
  18. title: str
  19. }
  20. }
  21. new Vue({
  22. el: '#app',
  23. data: {
  24. isAgent: false,
  25. innerTabs: [{title:'咨询',href:'../consultation/consultation.html'},
  26. {title:'随访',href:'../follow-up/follow-up.html'},
  27. {title:'代预约',href:'../toBeReserved/toBeReserved.html'},
  28. {title:'健康指导',href:'../guidance/guidance.html'},
  29. {title:'健康教育',href:'../education/education.html'},
  30. {title:'统计',href:'../census/census.html'}
  31. ],
  32. activeidx: ""
  33. },
  34. mounted: function() {
  35. this.activeidx = query.tabIdex || "0"
  36. }
  37. })