StoryList.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <div class="content-container">
  3. <el-row class="title-bar">
  4. <p class="page-title">六院联创</p>
  5. </el-row>
  6. <div class="list-group">
  7. <div v-for="(item,index) in typeList" :key="index" class="list-item" :class="currentSelect === index ? 'active' : ''" @click="selectItem(index, item)">
  8. <i class="icon iconfont" :class="item.icon" /> {{ item.title }}
  9. </div>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. typeList: [
  18. {
  19. type: 1,
  20. title: '平安医院',
  21. icon: 'icon-common_satisfaction'
  22. },
  23. {
  24. type: 2,
  25. title: '质量医院',
  26. icon: 'icon-common_quality'
  27. },
  28. {
  29. type: 3,
  30. title: '健康医院',
  31. icon: 'icon-common_safety'
  32. },
  33. {
  34. type: 4,
  35. title: '智慧医院',
  36. icon: 'icon-common_saving'
  37. },
  38. {
  39. type: 5,
  40. title: '健康医院',
  41. icon: 'icon-common_health'
  42. },
  43. {
  44. type: 6,
  45. title: '节约型医院',
  46. icon: 'icon-common_saving'
  47. }
  48. ],
  49. currentSelect: 0
  50. }
  51. },
  52. mounted() {
  53. this.$emit('selectItem', 1, '平安医院')
  54. },
  55. methods: {
  56. selectItem(index, item) {
  57. this.currentSelect = index
  58. this.$emit('selectItem', item.type, item.title)
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. .content-container {
  65. background: #193142;
  66. margin: 10px 0 0 10px;
  67. height: calc(100vh - 85px);
  68. .title-bar {
  69. border-left: 6px solid #36556B;
  70. height: 40px;
  71. line-height: 40px;
  72. text-indent: 15px;
  73. background: #113849;
  74. .page-title {
  75. font-size: 16px;
  76. font-weight: bold;
  77. color: #FFF;
  78. margin: 0;
  79. background: linear-gradient(0deg, #FFFFFF 0%, #98A8B7 100%);
  80. -webkit-background-clip: text;
  81. -webkit-text-fill-color: transparent;
  82. }
  83. }
  84. .list-group{
  85. height: calc(100vh - 140px);
  86. background: #193142;
  87. .list-item{
  88. height: 40px;
  89. line-height: 40px;
  90. color: #FFF;
  91. padding: 0 30px;
  92. font-size: 14px;
  93. .icon{
  94. position: relative;
  95. top: 2px;
  96. }
  97. &.active{
  98. color: #08A6DC;
  99. position: relative;
  100. &::after{
  101. position: absolute;
  102. content: "";
  103. width: 0;
  104. height: 0;
  105. top: calc(50% - 3.5px);
  106. right: -3px;
  107. border-left: 7px solid transparent;
  108. border-right: 7px solid transparent;
  109. border-bottom: 7px solid #08A6DC;
  110. transform:rotate(270deg);
  111. }
  112. }
  113. }
  114. }
  115. }
  116. </style>