index.vue 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <navigator hover-class="none" :url="prourl" class="u-border-top u-flex mes-block">
  3. <!-- <u-circle-progress border-width="18" active-color="#2979ff" :percent="parobj.finishNum/parobj.pointNum">
  4. <view class="u-progress-content">
  5. <view class="u-progress-dot"></view>
  6. <text class='u-progress-info'>{{(parobj.finishNum/parobj.pointNum)*100}}% </text>
  7. </view>
  8. </u-circle-progress> -->
  9. <cyuan :percent="Math.round(parobj.completed/parobj.total)" />
  10. <view class="u-m-l-14">
  11. <view class="mes-rig-tile u-f-30">{{parobj.name}}</view>
  12. <view class="mes-rig-blue u-m-t-24">任务日期:{{beginTime.slice(0,10)}}</view>
  13. <view class="u-flex u-m-t-28">
  14. <view class="mes-rig-blue u-m-r-18">开始时间:{{beginTime.slice(10,-3)}}</view>
  15. <view class="">
  16. <u-tag :type="parobj.status==1?'primary':parobj.status==2?'warning':'error' "
  17. :text="status[parobj.status]" size="mini" mode="dark" />
  18. </view>
  19. </view>
  20. <view class="mes-rig-blue u-m-t-28">截至时间:{{endTime.slice(10,-3)}}</view>
  21. <view class="mes-rig-blue u-m-t-28">今日巡检:{{`${parobj.completed}/${parobj.total}`}}</view>
  22. <!-- <view class="mes-rig-grey u-m-t-14">计划巡查:50</view> -->
  23. </view>
  24. <view class="u-absolute " style="right: 15rpx">
  25. <u-icon name="arrow-right" color="rgba(229, 229, 229, 1)" size="40"></u-icon>
  26. </view>
  27. </navigator>
  28. </template>
  29. <script>
  30. import dayjs from "dayjs";
  31. import cyuan from '../c-yuan/index.vue'
  32. export default {
  33. props: {
  34. prourl: {
  35. type: String
  36. },
  37. parobj: {
  38. type: Object,
  39. }
  40. },
  41. components: {
  42. cyuan
  43. },
  44. data() {
  45. return {
  46. status: ["", '未开始', '进行中', '已结束',"超时漏检","超时完成"]
  47. }
  48. },
  49. created() {
  50. },
  51. computed:{
  52. beginTime(){
  53. return dayjs(this.parobj.beginTime).format("YYYY-MM-DD HH:mm:ss")
  54. },
  55. endTime(){
  56. return dayjs(this.parobj.endTime).format("YYYY-MM-DD HH:mm:ss")
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss">
  62. .mes-block {
  63. padding: 34rpx;
  64. padding-bottom: 8rpx;
  65. text-align: left;
  66. font-size: 28rpx;
  67. .mes-rig-tile {
  68. font-size: 30rpx;
  69. font-family: Microsoft YaHei-3970(82674968);
  70. font-weight: 400;
  71. color: #333333;
  72. }
  73. .mes-rig-blue {
  74. font-size: 26rpx;
  75. font-family: Microsoft YaHei-3970(82674968);
  76. font-weight: 400;
  77. color: #999999;
  78. }
  79. .mes-rig-grey {
  80. color: rgba(128, 128, 128, 1);
  81. }
  82. .u-progress-info {
  83. font-size: 36rpx;
  84. font-family: Microsoft YaHei-3970(82674968);
  85. font-weight: 400;
  86. color: #4A8BFF;
  87. }
  88. }
  89. </style>