123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <template>
- <view class="theme">
- <view class="title">请先选定一个主题进行追踪</view>
- <view class="content">
- <view class="item"
- v-for="(item, index) in themeList"
- @click="checkedHandle(item,index)"
- :key="index">
- <div class="up">
- <view class="left">
- <image :src="`../../static/theme${item.id}.png`"></image>
- </view>
- <view class="right">
- <view>
- <text>{{item.title}}</text>
- </view>
- <view class="descontent">
- <text>{{item.des}}</text>
- </view>
- </view>
- </div>
- <!-- <div class="down" v-if="index == 1">
- <div class="leftBtn" @click="checkedHandle(item,index,'NORMAL')">普通</div>
- <div class="rightBtn" @click="checkedHandle(item,index,'MULTI')">督查+自查</div>
- </div> -->
-
- <image class="checkmark" v-if="theme.id === item.id" src="../../../static/theme.png"></image>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { mapState } from "vuex";
- import {themeList} from "./utils.js";
-
- export default {
- data() {
- return {
- themeList
- }
- },
- computed: {
- ...mapState({
- theme: state => state.creatingSituations.theme
- })
- },
- methods: {
- /**
- * @param {Object} item 操作数据
- * @param {number} index 操作下标
- * @param {string} type 操作类型
- */
- checkedHandle: function(item,index,type) {
- //by yfb 20230210 修改入口
- // if(index==0||(index == 1&&type == 'NORMAL')){
- // //个案/普通系统追踪
- // this.myCommit('theme',{...item,type:'NORMAL'});
- // this.myCommit('needReload', true);
- // this.myCommit('stepActive', 1);
- // }
- // if(index == 1 && type == 'MULTI'){
- // //督查+自查
- // this.myCommit('theme',{...item,type:type});
- // this.myCommit('needReload', true);
- // this.myCommit('stepActive', 1);
-
- // }
- if(index==0||index==1){
- //个案/普通系统追踪
- this.myCommit('theme',{...item,type:'NORMAL'});
- this.myCommit('needReload', true);
- this.myCommit('stepActive', 1);
- }
- if(index == 2){
- //督查+自查
- this.myCommit('theme',{...item,type:'MULTI'});
- this.myCommit('needReload', true);
- this.myCommit('stepActive', 1);
-
- }
-
- },
- myCommit: function(key, data) {
- this.$store.commit({type: 'creatingSituations/comChangeState',key,data});
- }
- }
- }
- </script>
- <style lang="less">
- .theme {
- overflow: hidden;
- width: 100%;
- height: 100%;
- .content {
- display: flex;
- flex-direction: column;
- align-items: center;
- .item {
- position: relative;
- margin: 0 auto;
- width: 92%;
- border-radius: 15rpx;
- background: linear-gradient(270deg, #6697FE 0%, #4980F2 100%);
- box-shadow: 0 20rpx 20rpx 0 rgba(73, 128, 242, 0.2);
- margin-bottom: 18px;
-
-
- .checkmark {
- position: absolute;
- top: 10rpx;
- right: 10rpx;
- width: 46.87rpx;
- height: 46.87rpx;
- }
-
-
- .up {
- display: flex;
- flex-direction: row;
- // padding: 37.5rpx 50rpx;
- padding: 37.5rpx 25rpx;
- //min-height: 90%;
- // >image {
- // position: absolute;
- // top: 10rpx;
- // right: 10rpx;
- // width: 46.87rpx;
- // height: 46.87rpx;
- // }
-
- .left {
- margin-right: 20rpx;
- image {
- width: 112.5rpx;
- height: 112.5rpx;
- }
- }
- .right {
- display: flex;
- flex-direction: column;
- text {
- font-size: 17.5rpx;
- line-height: 30rpx;
- color: #fff;
- &:first-child {
- margin-bottom: 5rpx;
- font-size: 30rpx;
- font-weight: bold;
- line-height: 45rpx;
- }
- }
- .descontent{
- //height:60%;
- // margin-top:5px;
- text {
- font-size: 12rpx;
- line-height: 25rpx;
- font-weight: normal;
- color: rgba(255,255,255,0.8);
- &:first-child {
- margin-bottom: 5rpx;
- font-size: 20rpx;
- //font-weight: ;
- line-height: 25rpx;
- }
- }
- }
- }
- }
-
- &:first-child {
- //margin-top: 70rpx;
- margin-top: 10rpx;
- // margin-bottom: 125rpx;
- // margin-bottom: 32rpx;
- background: linear-gradient(270deg, #00CCBB 0%, #00CCAA 100%);
- box-shadow: 0 20rpx 20rpx 0 rgba(0, 204, 170, 0.2);
- }
- &:last-child{
- // margin-top: 0rpx;
- // margin-bottom: 125rpx;
- // margin-bottom: 32rpx;
- background: linear-gradient(270deg, #18AAF2 0%, #4DC3FF 100%);
- box-shadow: 0 20rpx 20rpx 0 rgba(73,157,242, 0.2);
- }
- }
- }
- }
- </style>
|