theme.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="theme">
  3. <view class="title">请先选定一个主题进行追踪</view>
  4. <view class="content">
  5. <view class="item"
  6. v-for="(item, index) in themeList"
  7. @click="checkedHandle(item)"
  8. :key="index">
  9. <view class="left">
  10. <image :src="`../../static/theme${item.id}.png`"></image>
  11. </view>
  12. <view class="right">
  13. <text>{{item.title}}</text>
  14. <text>{{item.des}}</text>
  15. </view>
  16. <image v-if="theme.id === item.id" src="../../../static/theme.png"></image>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import { mapState } from "vuex";
  23. const themeList = [{
  24. id: 0,
  25. title: '个案追踪',
  26. des: '评价诊疗服务的内涵质量以及对各种诊疗规范、临床路径等的执行力',
  27. },{
  28. id: 1,
  29. title: '系统追踪',
  30. des: '评价对各种质量与安全管理制度与流程的执行力、医院服务的连贯性及多学科综合的服务能力',
  31. }]
  32. export default {
  33. data() {
  34. return {
  35. themeList
  36. }
  37. },
  38. computed: {
  39. ...mapState({
  40. theme: state => state.creatingSituations.theme
  41. })
  42. },
  43. methods: {
  44. checkedHandle: function(item) {
  45. this.myCommit('theme', item);
  46. this.myCommit('stepActive', 1);
  47. },
  48. myCommit: function(key, data) {
  49. this.$store.commit({type: 'creatingSituations/comChangeState',key,data});
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="less">
  55. .theme {
  56. overflow: hidden;
  57. width: 100%;
  58. .content {
  59. display: flex;
  60. flex-direction: column;
  61. align-items: center;
  62. .item {
  63. position: relative;
  64. display: flex;
  65. flex-direction: row;
  66. margin: 62.5rpx 0;
  67. border-radius: 15rpx;
  68. padding: 37.5rpx 50rpx;
  69. width: 625rpx;
  70. height: 187.5rpx;
  71. background: linear-gradient(270deg, #6697FE 0%, #4980F2 100%);
  72. box-shadow: 0 12.5rpx 12.5rpx 0 rgba(73, 128, 242, 0.2);
  73. >image {
  74. position: absolute;
  75. top: 10rpx;
  76. right: 10rpx;
  77. width: 46.87rpx;
  78. height: 46.87rpx;
  79. }
  80. .left {
  81. margin-right: 25rpx;
  82. image {
  83. width: 112.5rpx;
  84. height: 112.5rpx;
  85. }
  86. }
  87. .right {
  88. display: flex;
  89. flex-direction: column;
  90. text {
  91. font-size: 17.5rpx;
  92. line-height: 25rpx;
  93. color: #fff;
  94. &:first-child {
  95. margin-bottom: 5rpx;
  96. font-size: 30rpx;
  97. font-weight: bold;
  98. line-height: 45rpx;
  99. }
  100. }
  101. }
  102. &:first-child {
  103. margin-top: 125rpx;
  104. background: linear-gradient(270deg, #00CCBB 0%, #00CCAA 100%);
  105. box-shadow: 0 12.5rpx 12.5rpx 0 rgba(0, 204, 170, 0.2);
  106. }
  107. }
  108. }
  109. }
  110. </style>