FlowCard.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!-- 我的流程中所用卡片 -->
  2. <template>
  3. <view class="flow-card-box">
  4. <view class="card-content">
  5. <view class="content-left">
  6. <view class="title">
  7. {{props.cardInfo.title}}
  8. </view>
  9. <view class="time">
  10. <view class="icon">
  11. <image style="width: 100%; height: 100%;" src="/static/images/components/card/clock.svg" mode="scaleToFill"></image>
  12. </view>
  13. <text>{{props.cardInfo.time}}</text>
  14. </view>
  15. </view>
  16. <view class="content-status-icon">
  17. <image style="width: 100%; height: 100%;" :src="`/static/images/components/card/flow-${props.cardInfo.flow}.svg`" mode="scaleToFill"></image>
  18. </view>
  19. </view>
  20. <view class="btn">
  21. <button style="border-radius: 9999px;" type="primary" @tap="clickDetail">查看详情</button>
  22. </view>
  23. </view>
  24. </template>
  25. <script setup>
  26. const props = defineProps({
  27. cardInfo:{
  28. type:Object,
  29. default:()=>{
  30. return {
  31. title:"张三提交的水库水情表",
  32. time:"2024-04-10 12:00:00",
  33. flow:"待审批",
  34. id:"1"
  35. }
  36. }
  37. }
  38. })
  39. const emit = defineEmits(['handleClickDetail'])
  40. const clickDetail = ()=>{
  41. emit('handleClickDetail')
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. .flow-card-box{
  46. padding: 32rpx;
  47. background: #FFFFFF;
  48. border-radius: 12rpx;
  49. .card-content{
  50. display: flex;
  51. justify-content: space-between;
  52. align-items: center;
  53. margin-bottom: 20px;
  54. .content-left{
  55. .title{
  56. font-family: Source Han Sans;
  57. font-size: 20px;
  58. font-weight: 600;
  59. font-feature-settings: "kern" on;
  60. color: $uni-text-color;
  61. margin-bottom: 10px;
  62. }
  63. .time{
  64. display: flex;
  65. align-items: center;
  66. .icon{
  67. width: 16px;
  68. height: 16px;
  69. margin-right: 8px;
  70. }
  71. text{
  72. font-family: Roboto;
  73. font-size: 16px;
  74. font-weight: bold;
  75. font-feature-settings: "kern" on;
  76. color: $uni-text-color;
  77. }
  78. }
  79. }
  80. .content-status-icon{
  81. width: 55px;
  82. height: 48px;
  83. }
  84. }
  85. .btn{
  86. width: 130px;
  87. }
  88. }
  89. </style>