123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <template>
- <view class="mission-list-item" @click="gooDetails">
- <view v-if="!isClose" class="time">
- <text class="com-text">2020-11-26 15:33:08</text>
- </view>
- <view class="card">
- <view class="top-box">
- <view :class="['bg-box', isClose ? 'disabled-bg' : 'hight-bg']">
- <text>{{isClose ? '改善结案' : '改善中'}}</text>
- </view>
- <text class="title">柜子上方50cm不能遮住喷水器</text>
- <view class="row">
- <view class="col">
- <image class="com-icon" src="/static/search-icon.png"></image>
- <text class="com-text">第3/9次查核计划</text>
- </view>
- <view class="col">
- <image class="com-icon" src="/static/location-icon.png"></image>
- <text class="com-text">分诊处(门诊)</text>
- </view>
- </view>
- </view>
- <view class="bottom-box">
- <text class="com-text">情境名称:环境设施安全</text>
- <text class="com-text">改善人:张晴晴</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- props: {
- isClose: { // 是否结案
- type: Boolean,
- default: false
- }
- },
- computed: {
- bgImage(){
- console.log(`url(~@/static/${!this.isClose ? 'hight' : 'disabled'}-bg.png)`)
- return `../../../../static/${!this.isClose ? 'hight' : 'disabled'}-bg.png`;
- }
- },
- methods: {
- // 跳转详情页面(改善任务)
- gooDetails(){
- console.log(9)
- uni.navigateTo({
- url: '/pages/mission-details/mission-details'
- });
- }
- }
- }
- </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: 203.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 {
- line-height: 45rpx;
- font-size: 25rpx;
- font-weight: bold;
- color: #292C33;
- }
-
- .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>
|