适配授权管理员相关显示
This commit is contained in:
parent
dc68492c0c
commit
80a73c2c40
@ -8,11 +8,25 @@
|
|||||||
<view class="item-title">有效期</view>
|
<view class="item-title">有效期</view>
|
||||||
<view v-if="currentKeyInfo.keyType === 1">永久</view>
|
<view v-if="currentKeyInfo.keyType === 1">永久</view>
|
||||||
<view v-else-if="currentKeyInfo.keyType === 3">单次</view>
|
<view v-else-if="currentKeyInfo.keyType === 3">单次</view>
|
||||||
|
<view v-else-if="currentKeyInfo.keyType === 4">
|
||||||
|
<view class="item-content">{{ timeFormat(currentKeyInfo.startDate, 'yyyy-mm-dd') }}</view>
|
||||||
|
<view class="item-content">{{ timeFormat(currentKeyInfo.endDate, 'yyyy-mm-dd') }}</view>
|
||||||
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<view class="item-content">{{ timeFormat(currentKeyInfo.startDate, 'yyyy-mm-dd h:M') }}</view>
|
<view class="item-content">{{ timeFormat(currentKeyInfo.startDate, 'yyyy-mm-dd h:M') }}</view>
|
||||||
<view class="item-content">{{ timeFormat(currentKeyInfo.endDate, 'yyyy-mm-dd h:M') }}</view>
|
<view class="item-content">{{ timeFormat(currentKeyInfo.endDate, 'yyyy-mm-dd h:M') }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="currentKeyInfo.keyType === 4" class="item" style="margin-top: 2rpx">
|
||||||
|
<view class="item-title">有效日</view>
|
||||||
|
<view class="item-content">{{ convertWeekDaysToChineseString(currentKeyInfo.weekDays) }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="item" v-if="currentKeyInfo.keyType === 4" style="margin-top: 2rpx">
|
||||||
|
<view class="item-title">有效时间</view>
|
||||||
|
<view class="item-content">
|
||||||
|
{{ timeFormat(currentKeyInfo.startDate, 'h:M') }}-{{ timeFormat(currentKeyInfo.endDate, 'h:M') }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="item" style="margin-top: 20rpx">
|
<view class="item" style="margin-top: 20rpx">
|
||||||
<view class="item-title">接收者</view>
|
<view class="item-title">接收者</view>
|
||||||
<view class="item-content">{{ currentKeyInfo.username }}</view>
|
<view class="item-content">{{ currentKeyInfo.username }}</view>
|
||||||
@ -79,8 +93,23 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
convertWeekDaysToChineseString(weekDays) {
|
||||||
|
const dayMap = {
|
||||||
|
1: '一',
|
||||||
|
2: '二',
|
||||||
|
3: '三',
|
||||||
|
4: '四',
|
||||||
|
5: '五',
|
||||||
|
6: '六',
|
||||||
|
7: '日'
|
||||||
|
}
|
||||||
|
|
||||||
|
const chineseWeekDays = weekDays.map(day => dayMap[day])
|
||||||
|
|
||||||
|
return chineseWeekDays.join(',')
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user