theme.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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,index)"
  8. :key="index">
  9. <div class="up">
  10. <view class="left">
  11. <image :src="`../../static/theme${item.id}.png`"></image>
  12. </view>
  13. <view class="right">
  14. <view>
  15. <text>{{item.title}}</text>
  16. </view>
  17. <view class="descontent">
  18. <text>{{item.des}}</text>
  19. </view>
  20. </view>
  21. </div>
  22. <!-- <div class="down" v-if="index == 1">
  23. <div class="leftBtn" @click="checkedHandle(item,index,'NORMAL')">普通</div>
  24. <div class="rightBtn" @click="checkedHandle(item,index,'MULTI')">督查+自查</div>
  25. </div> -->
  26. <image class="checkmark" v-if="theme.id === item.id" src="../../../static/theme.png"></image>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import { mapState } from "vuex";
  33. import {themeList} from "./utils.js";
  34. export default {
  35. data() {
  36. return {
  37. themeList
  38. }
  39. },
  40. computed: {
  41. ...mapState({
  42. theme: state => state.creatingSituations.theme
  43. })
  44. },
  45. methods: {
  46. /**
  47. * @param {Object} item 操作数据
  48. * @param {number} index 操作下标
  49. * @param {string} type 操作类型
  50. */
  51. checkedHandle: function(item,index,type) {
  52. //by yfb 20230210 修改入口
  53. // if(index==0||(index == 1&&type == 'NORMAL')){
  54. // //个案/普通系统追踪
  55. // this.myCommit('theme',{...item,type:'NORMAL'});
  56. // this.myCommit('needReload', true);
  57. // this.myCommit('stepActive', 1);
  58. // }
  59. // if(index == 1 && type == 'MULTI'){
  60. // //督查+自查
  61. // this.myCommit('theme',{...item,type:type});
  62. // this.myCommit('needReload', true);
  63. // this.myCommit('stepActive', 1);
  64. // }
  65. if(index==0||index==1){
  66. //个案/普通系统追踪
  67. this.myCommit('theme',{...item,type:'NORMAL'});
  68. this.myCommit('needReload', true);
  69. this.myCommit('stepActive', 1);
  70. }
  71. if(index == 2){
  72. //督查+自查
  73. this.myCommit('theme',{...item,type:'MULTI'});
  74. this.myCommit('needReload', true);
  75. this.myCommit('stepActive', 1);
  76. }
  77. },
  78. myCommit: function(key, data) {
  79. this.$store.commit({type: 'creatingSituations/comChangeState',key,data});
  80. }
  81. }
  82. }
  83. </script>
  84. <style lang="less">
  85. .theme {
  86. overflow: hidden;
  87. width: 100%;
  88. height: 100%;
  89. .content {
  90. display: flex;
  91. flex-direction: column;
  92. align-items: center;
  93. .item {
  94. position: relative;
  95. margin: 0 auto;
  96. width: 92%;
  97. border-radius: 15rpx;
  98. background: linear-gradient(270deg, #6697FE 0%, #4980F2 100%);
  99. box-shadow: 0 20rpx 20rpx 0 rgba(73, 128, 242, 0.2);
  100. margin-bottom: 18px;
  101. .checkmark {
  102. position: absolute;
  103. top: 10rpx;
  104. right: 10rpx;
  105. width: 46.87rpx;
  106. height: 46.87rpx;
  107. }
  108. .up {
  109. display: flex;
  110. flex-direction: row;
  111. // padding: 37.5rpx 50rpx;
  112. padding: 37.5rpx 25rpx;
  113. //min-height: 90%;
  114. // >image {
  115. // position: absolute;
  116. // top: 10rpx;
  117. // right: 10rpx;
  118. // width: 46.87rpx;
  119. // height: 46.87rpx;
  120. // }
  121. .left {
  122. margin-right: 20rpx;
  123. image {
  124. width: 112.5rpx;
  125. height: 112.5rpx;
  126. }
  127. }
  128. .right {
  129. display: flex;
  130. flex-direction: column;
  131. text {
  132. font-size: 17.5rpx;
  133. line-height: 30rpx;
  134. color: #fff;
  135. &:first-child {
  136. margin-bottom: 5rpx;
  137. font-size: 30rpx;
  138. font-weight: bold;
  139. line-height: 45rpx;
  140. }
  141. }
  142. .descontent{
  143. //height:60%;
  144. // margin-top:5px;
  145. text {
  146. font-size: 12rpx;
  147. line-height: 25rpx;
  148. font-weight: normal;
  149. color: rgba(255,255,255,0.8);
  150. &:first-child {
  151. margin-bottom: 5rpx;
  152. font-size: 20rpx;
  153. //font-weight: ;
  154. line-height: 25rpx;
  155. }
  156. }
  157. }
  158. }
  159. }
  160. &:first-child {
  161. //margin-top: 70rpx;
  162. margin-top: 10rpx;
  163. // margin-bottom: 125rpx;
  164. // margin-bottom: 32rpx;
  165. background: linear-gradient(270deg, #00CCBB 0%, #00CCAA 100%);
  166. box-shadow: 0 20rpx 20rpx 0 rgba(0, 204, 170, 0.2);
  167. }
  168. &:last-child{
  169. // margin-top: 0rpx;
  170. // margin-bottom: 125rpx;
  171. // margin-bottom: 32rpx;
  172. background: linear-gradient(270deg, #18AAF2 0%, #4DC3FF 100%);
  173. box-shadow: 0 20rpx 20rpx 0 rgba(73,157,242, 0.2);
  174. }
  175. }
  176. }
  177. }
  178. </style>