TabPage.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <div class="tab-wrap">
  3. <div class="tab" v-if="modlues&&modlues.length>0">
  4. <p v-for="(it,index) in modlues" :key="it.id">
  5. <span :class="{current:index==0}" v-if="type[it.type]==1">
  6. <i>{{index + 1 }}</i>
  7. {{it.name}}
  8. </span>
  9. </p>
  10. </div>
  11. <!-- 内容 -->
  12. <div class="content">这里放明细</div>
  13. </div>
  14. </template>
  15. <script type="text/javascript">
  16. export default {
  17. name:'TabPage',
  18. data(){
  19. let sysConfig = this.$store.state.sysConfig;
  20. let allMoudles = this.$store.state.allMoudles;
  21. return{
  22. config:sysConfig,
  23. modlues:allMoudles,
  24. type:{
  25. "1":sysConfig.filter(item=>item.code=="symptoms_show")[0].value,
  26. "2":sysConfig.filter(item=>item.code=="diagnosis_show")[0].value,
  27. "3":sysConfig.filter(item=>item.code=="omhistory_show")[0].value,
  28. "4":sysConfig.filter(item=>item.code=="replenish_show")[0].value,
  29. }
  30. }
  31. },
  32. created(){
  33. console.log('配置信息:',this.config,'type',this.type)
  34. }
  35. }
  36. </script>
  37. <style lang="less" scoped>
  38. .tab-wrap{
  39. width: 100%;
  40. height: 100%;
  41. .tab{
  42. height: .82rem;
  43. line-height: .82rem;
  44. border-bottom: 1px solid #EDEDED;
  45. box-sizing: border-box;
  46. // padding: 0 .2rem;
  47. padding-top: .16rem;
  48. p{
  49. display: inline-block;
  50. }
  51. span{
  52. font-size: .24rem;
  53. display: inline-block;
  54. vertical-align: top;
  55. width:1.48rem;
  56. height: .5rem;
  57. line-height: .5rem;
  58. // background: #E5ECFC;
  59. // border-radius: 25px;
  60. // color: #0043E8;
  61. color: #7C828E;
  62. text-align: center;
  63. margin-left: .2rem;
  64. margin-right: .19rem;
  65. }
  66. .current{
  67. color: #0043E8;
  68. background: #E5ECFC;
  69. border-radius: 25px;
  70. }
  71. }
  72. .content{
  73. font-size: .3rem;
  74. }
  75. }
  76. </style>