123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- <template>
- <view class="mission-list-item" @click="gotoDetails(task.id)">
- <view v-if="!isDetails && !isComplete" class="time">
- <text class="com-text">{{ task.recordTime }}</text>
- </view>
- <view class="card">
- <view class="top-box">
- <view v-show="!isDetails" :class="['bg-box', isComplete ? 'disabled-bg' : 'hight-bg']">
- <text>{{isComplete ? '改善结案' : '改善中'}}</text>
- </view>
- <text class="title">
- <text v-if="taskTypeName" class="taskTypeName">{{taskTypeName}}</text>
- {{ task.checkItemName }}
- </text>
- <text class="subtitle">{{ task.checkPointName }}</text>
- <view class="row">
- <view class="col">
- <image class="com-icon" src="/static/search-icon.png"></image>
- <text class="com-text">{{ task.checkPlan }}</text>
- </view>
- <view class="col">
- <image class="com-icon" src="/static/location-icon.png"></image>
- <text class="com-text">{{ task.deptName }}</text>
- </view>
- </view>
- </view>
- <view class="bottom-box">
- <text class="com-text">情境名称:{{ task.situationName }}</text>
- <text class="com-text">改善人:{{ task.improveEmpName }}</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- props: {
- // 当前遍历的任务
- task: {
- type: Object,
- default: () => {
- return {}
- }
- },
- // 是否结案
- isComplete: {
- type: Boolean,
- default: false
- },
- // 是否是详情页面
- isDetails: {
- type: Boolean,
- default: false
- }
- },
- computed: {
- bgImage(){
- return `../../../static/${!this.isComplete ? 'hight' : 'disabled'}-bg.png`;
- },
- taskTypeName(){
- //改善类型 0 普通 1督查 2自查
- if(this.task.improveType == 2 )return '自';
- if(this.task.improveType == 1 )return '督';
- return null
- }
- },
- methods: {
- // 跳转详情页面(改善任务)
- gotoDetails(id){
- uni.setStorageSync('taskId', id);
- uni.navigateTo({
- url: `/pages/mission-details/mission-details?taskId=${id}&pathName=missionDetails`
- });
- }
- }
- }
- </script>
- <style lang="less">
- .mission-list-item {
- margin-bottom: 25rpx;
- overflow: hidden;
- .time {
- height: 47.5rpx;
- line-height: 45rpx;
- padding-left: 25rpx;
- }
- .card {
- position: relative;
- display: flex;
- flex-direction: column;
- height: 240.75rpx;
- background-color: #fff;
- padding: 0 25rpx;
- .top-box {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- flex: 1;
- margin-top: 35rpx;
- margin-bottom: 28.12rpx;
- }
- .title {
- width: 100%;
- font-size: 25rpx;
- font-weight: bold;
- color: #292C33;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow-x: hidden;
- .taskTypeName {
- display: inline-block;
- color: #fff;
- margin-right:8rpx;
- padding: 1.25rpx 2rpx;
- border-radius: 3rpx;
- background-color:#ff6680;
- // text-overflow: ellipsis;
- // white-space: nowrap;
- // overflow-x: hidden;
- }
- }
- .subtitle {
- font-size: 12px;
- color: #666F80;
- margin:10rpx 0;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .row {
- display: flex;
- align-items: center;
- .col {
- display: flex;
- align-items: center;
- height: 20rpx;
- &:first-child {
- margin-right: 50rpx;
- }
- .com-icon {
- margin-right: 9.37rpx;
- width: 20rpx;
- height: 20rpx;
- }
- }
- }
- .bottom-box {
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 70rpx;
- border-top: 0.62rpx solid #DADEE6;
- }
- .bg-box {
- position: absolute;
- top: 0;
- right: 0;
- width: 112.5rpx;
- height: 35rpx;
- background-size: 100% 100%;
- padding-left: 12.5rpx;
- text-align: center;
- >text {
- line-height: 35rpx;
- font-size: 17.5rpx;
- color: #fff;
- }
- }
- .hight-bg {
- background-image: url('~@/static/hight-bg.png');
- }
- .disabled-bg {
- background-image: url('~@/static/disabled-bg.png');
- }
- }
- .com-text {
- font-size: 22.5rpx;
- color: #666F80;
- }
- }
- </style>
|