theme.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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. <text>{{item.title}}</text>
  15. <text>{{item.des}}</text>
  16. </view>
  17. </div>
  18. <!-- <div class="down" v-if="index == 1">
  19. <div class="leftBtn" @click="checkedHandle(item,index,'NORMAL')">普通</div>
  20. <div class="rightBtn" @click="checkedHandle(item,index,'MULTI')">督查+自查</div>
  21. </div> -->
  22. <!-- <div class="mid">
  23. <view class="left">
  24. <image :src="`../../static/theme${item.id}.png`"></image>
  25. </view>
  26. <view class="right">
  27. <text>{{item.title}}</text>
  28. <text>{{item.des}}</text>
  29. </view>
  30. </div>
  31. <div class="down">
  32. <view class="left">
  33. <image :src="`../../static/theme${item.id}.png`"></image>
  34. </view>
  35. <view class="right">
  36. <text>{{item.title}}</text>
  37. <text>{{item.des}}</text>
  38. </view>
  39. </div> -->
  40. <image class="checkmark" v-if="theme.id === item.id" src="../../../static/theme.png"></image>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import { mapState } from "vuex";
  47. import {themeList} from "./utils.js";
  48. export default {
  49. data() {
  50. return {
  51. themeList
  52. }
  53. },
  54. computed: {
  55. ...mapState({
  56. theme: state => state.creatingSituations.theme
  57. })
  58. },
  59. methods: {
  60. /**
  61. * @param {Object} item 操作数据
  62. * @param {number} index 操作下标
  63. * @param {string} type 操作类型
  64. */
  65. checkedHandle: function(item,index,type) {
  66. //by yfb 20230210 修改入口
  67. // if(index==0||(index == 1&&type == 'NORMAL')){
  68. // //个案/普通系统追踪
  69. // this.myCommit('theme',{...item,type:'NORMAL'});
  70. // this.myCommit('needReload', true);
  71. // this.myCommit('stepActive', 1);
  72. // }
  73. // if(index == 1 && type == 'MULTI'){
  74. // //督查+自查
  75. // this.myCommit('theme',{...item,type:type});
  76. // this.myCommit('needReload', true);
  77. // this.myCommit('stepActive', 1);
  78. // }
  79. if(index==0||index==1){
  80. //个案/普通系统追踪
  81. this.myCommit('theme',{...item,type:'NORMAL'});
  82. this.myCommit('needReload', true);
  83. this.myCommit('stepActive', 1);
  84. }
  85. if(index == 2){
  86. //督查+自查
  87. this.myCommit('theme',{...item,type:'MULTI'});
  88. this.myCommit('needReload', true);
  89. this.myCommit('stepActive', 1);
  90. }
  91. },
  92. myCommit: function(key, data) {
  93. this.$store.commit({type: 'creatingSituations/comChangeState',key,data});
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="less">
  99. .theme {
  100. overflow: hidden;
  101. width: 100%;
  102. height: 100%;
  103. .content {
  104. display: flex;
  105. flex-direction: column;
  106. align-items: center;
  107. .item {
  108. position: relative;
  109. width:90%;
  110. margin: 0 auto;
  111. border-radius: 15rpx;
  112. background: linear-gradient(270deg, #6697FE 0%, #4980F2 100%);
  113. box-shadow: 0 12.5rpx 12.5rpx 0 rgba(73, 128, 242, 0.2);
  114. margin-bottom: 22px;
  115. .checkmark {
  116. position: absolute;
  117. top: 10rpx;
  118. right: 10rpx;
  119. width: 46.87rpx;
  120. height: 46.87rpx;
  121. }
  122. .up {
  123. display: flex;
  124. flex-direction: row;
  125. // padding: 37.5rpx 50rpx;
  126. padding: 37.5rpx 20rpx;
  127. // >image {
  128. // position: absolute;
  129. // top: 10rpx;
  130. // right: 10rpx;
  131. // width: 46.87rpx;
  132. // height: 46.87rpx;
  133. // }
  134. .left {
  135. margin-right: 25rpx;
  136. image {
  137. width: 112.5rpx;
  138. height: 112.5rpx;
  139. }
  140. }
  141. .right {
  142. display: flex;
  143. flex-direction: column;
  144. text {
  145. font-size: 17.5rpx;
  146. line-height: 25rpx;
  147. color: #fff;
  148. &:first-child {
  149. margin-bottom: 5rpx;
  150. font-size: 30rpx;
  151. font-weight: bold;
  152. line-height: 45rpx;
  153. }
  154. }
  155. }
  156. }
  157. .mid {
  158. display: flex;
  159. flex-direction: row;
  160. align-items: center;
  161. justify-content: center;
  162. padding-bottom:50rpx;
  163. .left {
  164. margin-right: 25rpx;
  165. image {
  166. width: 112.5rpx;
  167. height: 112.5rpx;
  168. }
  169. }
  170. .right {
  171. display: flex;
  172. flex-direction: column;
  173. text {
  174. font-size: 17.5rpx;
  175. line-height: 25rpx;
  176. color: #fff;
  177. &:first-child {
  178. margin-bottom: 5rpx;
  179. font-size: 30rpx;
  180. font-weight: bold;
  181. line-height: 45rpx;
  182. }
  183. }
  184. }
  185. // .leftBtn,.rightBtn {
  186. // width: 237.5rpx;
  187. // height: 62.5rpx;
  188. // line-height:62.5rpx;
  189. // background: #FFFFFF;
  190. // border-radius: 31.25rpx;
  191. // text-align: center;
  192. // font-size: 30rpx;
  193. // font-family: SourceHanSansCN-Medium, SourceHanSansCN;
  194. // font-weight: 500;
  195. // color: #4980F2;
  196. // }
  197. // .rightBtn {
  198. // margin-left: 37.5rpx;
  199. // }
  200. }
  201. .down {
  202. display: flex;
  203. flex-direction: row;
  204. align-items: center;
  205. justify-content: center;
  206. padding-bottom:50rpx;
  207. .left {
  208. margin-right: 25rpx;
  209. image {
  210. width: 112.5rpx;
  211. height: 112.5rpx;
  212. }
  213. }
  214. .right {
  215. display: flex;
  216. flex-direction: column;
  217. text {
  218. font-size: 17.5rpx;
  219. line-height: 25rpx;
  220. color: #fff;
  221. &:first-child {
  222. margin-bottom: 5rpx;
  223. font-size: 30rpx;
  224. font-weight: bold;
  225. line-height: 45rpx;
  226. }
  227. }
  228. }
  229. // .leftBtn,.rightBtn {
  230. // width: 237.5rpx;
  231. // height: 62.5rpx;
  232. // line-height:62.5rpx;
  233. // background: #FFFFFF;
  234. // border-radius: 31.25rpx;
  235. // text-align: center;
  236. // font-size: 30rpx;
  237. // font-family: SourceHanSansCN-Medium, SourceHanSansCN;
  238. // font-weight: 500;
  239. // color: #499DF2;
  240. // }
  241. // .rightBtn {
  242. // margin-left: 37.5rpx;
  243. // }
  244. }
  245. &:first-child {
  246. margin-top: 125rpx;
  247. // margin-bottom: 125rpx;
  248. margin-bottom: 40rpx;
  249. background: linear-gradient(270deg, #00CCBB 0%, #00CCAA 100%);
  250. box-shadow: 0 12.5rpx 12.5rpx 0 rgba(0, 204, 170, 0.2);
  251. }
  252. }
  253. }
  254. }
  255. </style>