123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <template>
- <view
- class="examine-item"
- @click="handleToDetail">
- <view class="content">
- {{ itemData.content || '' }}
- </view>
- <view class="time">
- {{ itemData.createTime }}
- </view>
- <view v-if="itemData.createUser" class="info">
- <wk-avatar
- :name="itemData.createUser.realname"
- :avatar="itemData.createUser.img"
- :size="12"
- class="avatar" />
- <view class="info-text">
- 由{{ itemData.createUser.realname }}提交的{{ itemData.categoryTitle }}
- </view>
- <view
- v-if="statusObj"
- :style="{
- backgroundColor: statusObj.bg,
- color: statusObj.color
- }"
- class="status">
- {{ statusObj.label }}
- </view>
- </view>
- </view>
- </template>
- <script>
- import { mapGetters } from 'vuex'
- export default {
- name: 'DetailExaminationItem',
- props: {
- itemData: {
- type: Object,
- required: true
- }
- },
- computed: {
- ...mapGetters({
- calcStatus: 'base/calcStatus'
- }),
- statusObj() {
- return this.calcStatus(this.itemData.examineStatus)
- }
- },
- methods: {
- handleToDetail() {
- this.$Router.navigateTo({
- url: '/pages_examine/detail',
- query: {
- id: this.itemData.examineId,
- examineId: this.itemData.categoryId
- }
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .examine-item {
- width: 100%;
- padding: 20rpx 32rpx;
- background-color: white;
- border-bottom: 1rpx solid $border-color;
- .content {
- font-size: $wk-font-large;
- color: $dark;
- }
- .time {
- font-size: $wk-font-sm;
- color: $light;
- margin-top: 10rpx;
- }
- .info {
- margin-top: 10rpx;
- @include left;
- .avatar {
- width: 60rpx;
- height: 60rpx;
- margin-right: 15rpx;
- }
- .info-text {
- font-size: $wk-font-sm;
- color: $gray;
- flex: 1;
- }
- .status {
- width: 130rpx;
- height: 40rpx;
- font-size: 26rpx;
- font-weight: 500;
- line-height: normal;
- border-radius: 4rpx;
- margin-left: 10rpx;
- @include center;
- }
- }
- }
- </style>
|