123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <template>
- <u-popup :show="isShow" @close="close" :closeOnClickOverlay="false" :overlay="false" :closeable="false" :round="10">
- <view class="container">
- <view class="info">
- <view class="info-head">
- <view>
- {{renderItem(workTrackInfo,'planName','--')}}
- </view>
- <view>
- {{renderItem(workTrackInfo,'classTime','--')}}
- </view>
- </view>
- <view class="info-body">
- <view class="item">
- <view class="label">当前状态:</view>
- <view class="value"
- :class="{
- 'orange': workTrackInfo.workStatus == '1',
- 'red': workTrackInfo.workStatus == '0',
- 'green': workTrackInfo.workStatus == '2',
- }"
- >{{workStatusObj[renderItem(workTrackInfo,'workStatus','')]}}</view>
- </view>
-
- <view class="item">
- <view class="label">完成率:</view>
- <view class="value green">{{renderItem(trackInfo,'percentage','--')}}%</view>
- </view>
-
- <view class="item">
- <view class="label">最近报警:</view>
- <view class="value red">{{renderItem(newAlarm,'alarmName','--')}}</view>
- </view>
-
- </view>
- </view>
- </view>
- </u-popup>
- </template>
- <script>
- import {isArray,clone,isObject,isEmpty } from 'lodash'
- import {getImages} from '@/plugins/images'
- import {copyProps,clearProps} from '@/utils/gdtq.js'
- export default {
- props: {
- trackInfo: {
- type: Object,
- default: () => {
- return {}
- }
- },
- workTrackInfo: {
- type: Object,
- default: () => {
- return {}
- }
- },
- },
-
- computed: {
- newAlarm() {
- let list = []
- if(!this.isNull(this.renderItem(this.workTrackInfo,'alarmList',''))) {
- list = this.workTrackInfo.alarmList
- }
-
- if(isEmpty(list)) {
- return ''
- } else {
- let len = list.length
- return list[len-1]
- }
-
- }
- },
- data() {
- return {
- isShow: true,
- workStatusObj: {
- 0: '未开始',
- 1: '执行中',
- 2: '已结束',
- 3: '已失效',
- }
- }
- },
- mounted() {
-
- },
-
- methods: {
-
-
- }
- }
- </script>
- <style lang="scss" scoped>
- .orange {
- color: #FF8000 !important;
- }
- .red {
- color: #EB4141 !important;
- }
- .green {
- color: #68D100 !important;
- }
-
- .container {
- // background: #fff;
- // padding: 52rpx 48rpx;
-
- font-size: 28rpx;
- // min-height: 360rpx;
-
- .info {
- border-radius: 20rpx;
- background: #fff;
-
- // padding: 0 44rpx;
- &-head{
- margin: 32rpx 48rpx;
- // display: flex;
- view:nth-child(1) {
- font-family: PingFangSC, PingFang SC;
- font-weight: 600;
- font-size: 32rpx;
- color: #333333;
- text-align: left;
- font-style: normal;
- padding: 0 ;
- width: auto;
- }
- view {
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 28rpx;
- color: #666666;
- line-height: 40rpx;
- text-align: left;
- font-style: normal;
- margin-top: 12rpx;
- }
- }
- &-body {
- overflow: hidden;
- background: #F6FAFF;
- border-radius: 10rpx;
- margin: 0rpx 24rpx 24rpx 24rpx;
- .item {
- margin: 20rpx 32rpx;
- display: flex;
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 28rpx;
- color: #333333;
-
- .label {
- color: #333333;
- }
- .value {
-
- color: #333333;
- flex: 1;
- text-align: right;
- }
- }
- }
- }
- }
-
-
-
- </style>
|