123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <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">
- <text>{{item.title}}</text>
- <text>{{item.des}}</text>
- </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) {
-
- 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);
-
- }
-
- },
- 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;
- width:80%;
- margin: 0 auto;
- border-radius: 15rpx;
- background: linear-gradient(270deg, #6697FE 0%, #4980F2 100%);
- box-shadow: 0 12.5rpx 12.5rpx 0 rgba(73, 128, 242, 0.2);
-
-
- .checkmark {
- position: absolute;
- top: 10rpx;
- right: 10rpx;
- width: 46.87rpx;
- height: 46.87rpx;
- }
-
-
- .up {
- display: flex;
- flex-direction: row;
- padding: 37.5rpx 50rpx;
-
- // >image {
- // position: absolute;
- // top: 10rpx;
- // right: 10rpx;
- // width: 46.87rpx;
- // height: 46.87rpx;
- // }
-
- .left {
- margin-right: 25rpx;
- image {
- width: 112.5rpx;
- height: 112.5rpx;
- }
- }
- .right {
- display: flex;
- flex-direction: column;
- text {
- font-size: 17.5rpx;
- line-height: 25rpx;
- color: #fff;
- &:first-child {
- margin-bottom: 5rpx;
- font-size: 30rpx;
- font-weight: bold;
- line-height: 45rpx;
- }
- }
- }
- }
- .down {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- padding-bottom:50rpx;
- .leftBtn,.rightBtn {
- width: 237.5rpx;
- height: 62.5rpx;
- line-height:62.5rpx;
- background: #FFFFFF;
- border-radius: 31.25rpx;
- text-align: center;
- font-size: 30rpx;
- font-family: SourceHanSansCN-Medium, SourceHanSansCN;
- font-weight: 500;
- color: #4980F2;
- }
- .rightBtn {
- margin-left: 37.5rpx;
- }
- }
-
- &:first-child {
- margin-top: 125rpx;
- margin-bottom: 125rpx;
- background: linear-gradient(270deg, #00CCBB 0%, #00CCAA 100%);
- box-shadow: 0 12.5rpx 12.5rpx 0 rgba(0, 204, 170, 0.2);
- }
- }
- }
- }
- </style>
|